@ht-rnd/json-schema-editor 1.0.4 → 1.0.5
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/lib/main.es.js +1742 -1739
- package/dist/lib/main.umd.js +13 -13
- package/package.json +1 -1
package/dist/lib/main.umd.js
CHANGED
|
@@ -14,12 +14,12 @@
|
|
|
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 Ri;function gh(){return Ri||(Ri=1,process.env.NODE_ENV!=="production"&&(function(){function e(C){if(C==null)return null;if(typeof C=="function")return C.$$typeof===D?null:C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case m:return"Fragment";case f:return"Profiler";case _:return"StrictMode";case $:return"Suspense";case E:return"SuspenseList";case
|
|
17
|
+
*/var Ri;function gh(){return Ri||(Ri=1,process.env.NODE_ENV!=="production"&&(function(){function e(C){if(C==null)return null;if(typeof C=="function")return C.$$typeof===D?null:C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case m:return"Fragment";case f:return"Profiler";case _:return"StrictMode";case $:return"Suspense";case E:return"SuspenseList";case U:return"Activity"}if(typeof C=="object")switch(typeof C.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),C.$$typeof){case y:return"Portal";case x:return C.displayName||"Context";case b:return(C._context.displayName||"Context")+".Consumer";case g:var M=C.render;return C=C.displayName,C||(C=M.displayName||M.name||"",C=C!==""?"ForwardRef("+C+")":"ForwardRef"),C;case j:return M=C.displayName||null,M!==null?M:e(C.type)||"Memo";case I:M=C._payload,C=C._init;try{return e(C(M))}catch{}}return null}function t(C){return""+C}function r(C){try{t(C);var M=!1}catch{M=!0}if(M){M=console;var P=M.error,k=typeof Symbol=="function"&&Symbol.toStringTag&&C[Symbol.toStringTag]||C.constructor.name||"Object";return P.call(M,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",k),t(C)}}function n(C){if(C===m)return"<>";if(typeof C=="object"&&C!==null&&C.$$typeof===I)return"<...>";try{var M=e(C);return M?"<"+M+">":"<...>"}catch{return"<...>"}}function s(){var C=V.A;return C===null?null:C.getOwner()}function o(){return Error("react-stack-top-frame")}function a(C){if(q.call(C,"key")){var M=Object.getOwnPropertyDescriptor(C,"key").get;if(M&&M.isReactWarning)return!1}return C.key!==void 0}function i(C,M){function P(){K||(K=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",M))}P.isReactWarning=!0,Object.defineProperty(C,"key",{get:P,configurable:!0})}function c(){var C=e(this.type);return se[C]||(se[C]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),C=this.props.ref,C!==void 0?C:null}function l(C,M,P,k,N,z){var F=P.ref;return C={$$typeof:w,type:C,key:M,props:P,_owner:k},(F!==void 0?F:null)!==null?Object.defineProperty(C,"ref",{enumerable:!1,get:c}):Object.defineProperty(C,"ref",{enumerable:!1,value:null}),C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(C,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(C,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:N}),Object.defineProperty(C,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:z}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C}function u(C,M,P,k,N,z){var F=M.children;if(F!==void 0)if(k)if(W(F)){for(k=0;k<F.length;k++)h(F[k]);Object.freeze&&Object.freeze(F)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(F);if(q.call(M,"key")){F=e(C);var Y=Object.keys(M).filter(function(oe){return oe!=="key"});k=0<Y.length?"{key: someKey, "+Y.join(": ..., ")+": ...}":"{key: someKey}",H[F+k]||(Y=0<Y.length?"{"+Y.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,k,F,Y,F),H[F+k]=!0)}if(F=null,P!==void 0&&(r(P),F=""+P),a(M)&&(r(M.key),F=""+M.key),"key"in M){P={};for(var de in M)de!=="key"&&(P[de]=M[de])}else P=M;return F&&i(P,typeof C=="function"?C.displayName||C.name||"Unknown":C),l(C,F,P,s(),N,q)}function p(C){h(C)?C._store&&(C._store.validated=1):typeof C=="object"&&C!==null&&C.$$typeof===O&&(C._payload.status==="fulfilled"?h(C._payload.value)&&C._payload.value._store&&(C._payload.value._store.validated=1):C._store&&(C._store.validated=1))}function h(C){return typeof C=="object"&&C!==null&&C.$$typeof===x}var v=Z,x=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),w=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),V=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.prototype.hasOwnProperty,W=Array.isArray,ee=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(C){return C()}};var K,se={},L=v.react_stack_bottom_frame.bind(v,o)(),he=ee(n(o)),H={};Qr.Fragment=m,Qr.jsx=function(C,M,P){var k=1e4>V.recentlyCreatedOwnerStacks++;return u(C,M,P,!1,k?Error("react-stack-top-frame"):L,k?ee(n(C)):he)},Qr.jsxs=function(C,M,P){var k=1e4>V.recentlyCreatedOwnerStacks++;return u(C,M,P,!0,k?Error("react-stack-top-frame"):L,k?ee(n(C)):he)}})()),Qr}var Ai;function vh(){return Ai||(Ai=1,process.env.NODE_ENV==="production"?Sn.exports=ph():Sn.exports=gh()),Sn.exports}var d=vh(),en=e=>e.type==="checkbox",ar=e=>e instanceof Date,et=e=>e==null;const Pi=e=>typeof e=="object";var Be=e=>!et(e)&&!Array.isArray(e)&&Pi(e)&&!ar(e),Ti=e=>Be(e)&&e.target?en(e.target)?e.target.checked:e.target.value:e,yh=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Oi=(e,t)=>e.has(yh(t)),bh=e=>{const t=e.constructor&&e.constructor.prototype;return Be(t)&&t.hasOwnProperty("isPrototypeOf")},jo=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Le(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(jo&&(e instanceof Blob||n))&&(r||Be(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!bh(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=Le(e[s]));else return e;return t}var En=e=>/^\w*$/.test(e),Fe=e=>e===void 0,kn=e=>Array.isArray(e)?e.filter(Boolean):[],No=e=>kn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),te=(e,t,r)=>{if(!t||!Be(e))return r;const n=(En(t)?[t]:No(t)).reduce((s,o)=>et(s)?s:s[o],e);return Fe(n)||n===e?Fe(e[t])?r:e[t]:n},nt=e=>typeof e=="boolean",Ie=(e,t,r)=>{let n=-1;const s=En(t)?[t]:No(t),o=s.length,a=o-1;for(;++n<o;){const i=s[n];let c=r;if(n!==a){const l=e[i];c=Be(l)||Array.isArray(l)?l:isNaN(+s[n+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=c,e=e[i]}};const Cn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},lt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Rt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ro=Z.createContext(null);Ro.displayName="HookFormContext";const Ze=()=>Z.useContext(Ro),_h=e=>{const{children:t,...r}=e;return Z.createElement(Ro.Provider,{value:r},t)};var Ii=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const a=o;return t._proxyFormState[a]!==lt.all&&(t._proxyFormState[a]=!n||lt.all),r&&(r[a]=!0),e[a]}});return s};const jn=typeof window<"u"?Z.useLayoutEffect:Z.useEffect;function Di(e){const t=Ze(),{control:r=t.control,disabled:n,name:s,exact:o}=e||{},[a,i]=Z.useState(r._formState),c=Z.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return jn(()=>r._subscribe({name:s,formState:c.current,exact:o,callback:l=>{!n&&i({...r._formState,...l})}}),[s,n,o]),Z.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),Z.useMemo(()=>Ii(a,r,c.current,!1),[a,r])}var st=e=>typeof e=="string",Ao=(e,t,r,n,s)=>st(e)?(n&&t.watch.add(e),te(r,e,s)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),te(r,o))):(n&&(t.watchAll=!0),r),Po=e=>et(e)||!Pi(e);function dt(e,t,r=new WeakSet){if(Po(e)||Po(t))return Object.is(e,t);if(ar(e)&&ar(t))return e.getTime()===t.getTime();const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const o of n){const a=e[o];if(!s.includes(o))return!1;if(o!=="ref"){const i=t[o];if(ar(a)&&ar(i)||Be(a)&&Be(i)||Array.isArray(a)&&Array.isArray(i)?!dt(a,i,r):!Object.is(a,i))return!1}}return!0}function tn(e){const t=Ze(),{control:r=t.control,name:n,defaultValue:s,disabled:o,exact:a,compute:i}=e||{},c=Z.useRef(s),l=Z.useRef(i),u=Z.useRef(void 0),p=Z.useRef(r),h=Z.useRef(n);l.current=i;const[v,x]=Z.useState(()=>{const w=r._getWatch(n,c.current);return l.current?l.current(w):w}),y=Z.useCallback(w=>{const g=Ao(n,r._names,w||r._formValues,!1,c.current);return l.current?l.current(g):g},[r._formValues,r._names,n]),m=Z.useCallback(w=>{if(!o){const g=Ao(n,r._names,w||r._formValues,!1,c.current);if(l.current){const $=l.current(g);dt($,u.current)||(x($),u.current=$)}else x(g)}},[r._formValues,r._names,o,n]);jn(()=>((p.current!==r||!dt(h.current,n))&&(p.current=r,h.current=n,m()),r._subscribe({name:n,formState:{values:!0},exact:a,callback:w=>{m(w.values)}})),[r,a,n,m]),Z.useEffect(()=>r._removeUnmounted());const _=p.current!==r,f=h.current,b=Z.useMemo(()=>{if(o)return null;const w=!_&&!dt(f,n);return _||w?y():null},[o,_,n,f,y]);return b!==null?b:v}function xh(e){const t=Ze(),{name:r,disabled:n,control:s=t.control,shouldUnregister:o,defaultValue:a}=e,i=Oi(s._names.array,r),c=Z.useMemo(()=>te(s._formValues,r,te(s._defaultValues,r,a)),[s,r,a]),l=tn({control:s,name:r,defaultValue:c,exact:!0}),u=Di({control:s,name:r,exact:!0}),p=Z.useRef(e),h=Z.useRef(void 0),v=Z.useRef(s.register(r,{...e.rules,value:l,...nt(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const x=Z.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!te(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!te(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!te(u.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!te(u.validatingFields,r)},error:{enumerable:!0,get:()=>te(u.errors,r)}}),[u,r]),y=Z.useCallback(b=>v.current.onChange({target:{value:Ti(b),name:r},type:Cn.CHANGE}),[r]),m=Z.useCallback(()=>v.current.onBlur({target:{value:te(s._formValues,r),name:r},type:Cn.BLUR}),[r,s._formValues]),_=Z.useCallback(b=>{const w=te(s._fields,r);w&&b&&(w._f.ref={focus:()=>b.focus&&b.focus(),select:()=>b.select&&b.select(),setCustomValidity:g=>b.setCustomValidity(g),reportValidity:()=>b.reportValidity()})},[s._fields,r]),f=Z.useMemo(()=>({name:r,value:l,...nt(n)||u.disabled?{disabled:u.disabled||n}:{},onChange:y,onBlur:m,ref:_}),[r,n,u.disabled,y,m,_,l]);return Z.useEffect(()=>{const b=s._options.shouldUnregister||o,w=h.current;w&&w!==r&&!i&&s.unregister(w),s.register(r,{...p.current.rules,...nt(p.current.disabled)?{disabled:p.current.disabled}:{}});const g=($,E)=>{const j=te(s._fields,$);j&&j._f&&(j._f.mount=E)};if(g(r,!0),b){const $=Le(te(s._options.defaultValues,r,p.current.defaultValue));Ie(s._defaultValues,r,$),Fe(te(s._formValues,r))&&Ie(s._formValues,r,$)}return!i&&s.register(r),h.current=r,()=>{(i?b&&!s._state.action:b)?s.unregister(r):g(r,!1)}},[r,s,i,o]),Z.useEffect(()=>{s._setDisabledField({disabled:n,name:r})},[n,r,s]),Z.useMemo(()=>({field:f,formState:u,fieldState:x}),[f,u,x])}const qt=e=>e.render(xh(e));var To=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},tt=e=>Array.isArray(e)?e:[e],Mi=()=>{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}};function Vi(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const s=e[n],o=t[n];if(s&&Be(s)&&o){const a=Vi(s,o);Be(a)&&(r[n]=a)}else e[n]&&(r[n]=o)}return r}var Ke=e=>Be(e)&&!Object.keys(e).length,Oo=e=>e.type==="file",ft=e=>typeof e=="function",Nn=e=>{if(!jo)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Fi=e=>e.type==="select-multiple",Io=e=>e.type==="radio",wh=e=>Io(e)||en(e),Do=e=>Nn(e)&&e.isConnected;function $h(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Fe(e)?n++:e[t[n++]];return e}function Sh(e){for(const t in e)if(e.hasOwnProperty(t)&&!Fe(e[t]))return!1;return!0}function Ue(e,t){const r=Array.isArray(t)?t:En(t)?[t]:No(t),n=r.length===1?e:$h(e,r),s=r.length-1,o=r[s];return n&&delete n[o],s!==0&&(Be(n)&&Ke(n)||Array.isArray(n)&&Sh(n))&&Ue(e,r.slice(0,-1)),e}var Eh=e=>{for(const t in e)if(ft(e[t]))return!0;return!1};function Li(e){return Array.isArray(e)||Be(e)&&!Eh(e)}function Mo(e,t={}){for(const r in e){const n=e[r];Li(n)?(t[r]=Array.isArray(n)?[]:{},Mo(n,t[r])):Fe(n)||(t[r]=!0)}return t}function vr(e,t,r){r||(r=Mo(t));for(const n in e){const s=e[n];if(Li(s))Fe(t)||Po(r[n])?r[n]=Mo(s,Array.isArray(s)?[]:{}):vr(s,et(t)?{}:t[n],r[n]);else{const o=t[n];r[n]=!dt(s,o)}}return r}const zi={value:!1,isValid:!1},qi={value:!0,isValid:!0};var Ui=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Fe(e[0].attributes.value)?Fe(e[0].value)||e[0].value===""?qi:{value:e[0].value,isValid:!0}:qi:zi}return zi},Bi=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Fe(e)?e:t?e===""?NaN:e&&+e:r&&st(e)?new Date(e):n?n(e):e;const Wi={isValid:!1,value:null};var Hi=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Wi):Wi;function Gi(e){const t=e.ref;return Oo(t)?t.files:Io(t)?Hi(e.refs).value:Fi(t)?[...t.selectedOptions].map(({value:r})=>r):en(t)?Ui(e.refs).value:Bi(Fe(t.value)?e.ref.value:t.value,e)}var kh=(e,t,r,n)=>{const s={};for(const o of e){const a=te(t,o);a&&Ie(s,o,a._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},Rn=e=>e instanceof RegExp,rn=e=>Fe(e)?e:Rn(e)?e.source:Be(e)?Rn(e.value)?e.value.source:e.value:e,yr=e=>({isOnSubmit:!e||e===lt.onSubmit,isOnBlur:e===lt.onBlur,isOnChange:e===lt.onChange,isOnAll:e===lt.all,isOnTouch:e===lt.onTouched});const Zi="AsyncFunction";var Ch=e=>!!e&&!!e.validate&&!!(ft(e.validate)&&e.validate.constructor.name===Zi||Be(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Zi)),jh=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Vo=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const br=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const o=te(e,s);if(o){const{_f:a,...i}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],s)&&!n)return!0;if(a.ref&&t(a.ref,a.name)&&!n)return!0;if(br(i,t))break}else if(Be(i)&&br(i,t))break}}};function Ki(e,t,r){const n=te(e,r);if(n||En(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const o=s.join("."),a=te(t,o),i=te(e,o);if(a&&!Array.isArray(a)&&r!==o)return{name:r};if(i&&i.type)return{name:o,error:i};if(i&&i.root&&i.root.type)return{name:`${o}.root`,error:i.root};s.pop()}return{name:r}}var Nh=(e,t,r,n)=>{r(e);const{name:s,...o}=e;return Ke(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!n||lt.all))},Rh=(e,t,r)=>!e||!t||e===t||tt(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Ah=(e,t,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(t||e):(r?n.isOnBlur:s.isOnBlur)?!e:(r?n.isOnChange:s.isOnChange)?e:!0,Ph=(e,t)=>!kn(te(e,t)).length&&Ue(e,t),Yi=(e,t,r)=>{const n=tt(te(e,r));return Ie(n,"root",t[r]),Ie(e,r,n),e};function Ji(e,t,r="validate"){if(st(e)||Array.isArray(e)&&e.every(st)||nt(e)&&!e)return{type:r,message:st(e)?e:"",ref:t}}var _r=e=>Be(e)&&!Rn(e)?e:{value:e,message:""},Fo=async(e,t,r,n,s,o)=>{const{ref:a,refs:i,required:c,maxLength:l,minLength:u,min:p,max:h,pattern:v,validate:x,name:y,valueAsNumber:m,mount:_}=e._f,f=te(r,y);if(!_||t.has(y))return{};const b=i?i[0]:a,w=V=>{s&&b.reportValidity&&(b.setCustomValidity(nt(V)?"":V||""),b.reportValidity())},g={},$=Io(a),E=en(a),j=$||E,O=(m||Oo(a))&&Fe(a.value)&&Fe(f)||Nn(a)&&a.value===""||f===""||Array.isArray(f)&&!f.length,z=To.bind(null,y,n,g),D=(V,U,W,ee=Rt.maxLength,K=Rt.minLength)=>{const se=V?U:W;g[y]={type:V?ee:K,message:se,ref:a,...z(V?ee:K,se)}};if(o?!Array.isArray(f)||!f.length:c&&(!j&&(O||et(f))||nt(f)&&!f||E&&!Ui(i).isValid||$&&!Hi(i).isValid)){const{value:V,message:U}=st(c)?{value:!!c,message:c}:_r(c);if(V&&(g[y]={type:Rt.required,message:U,ref:b,...z(Rt.required,U)},!n))return w(U),g}if(!O&&(!et(p)||!et(h))){let V,U;const W=_r(h),ee=_r(p);if(!et(f)&&!isNaN(f)){const K=a.valueAsNumber||f&&+f;et(W.value)||(V=K>W.value),et(ee.value)||(U=K<ee.value)}else{const K=a.valueAsDate||new Date(f),se=H=>new Date(new Date().toDateString()+" "+H),L=a.type=="time",he=a.type=="week";st(W.value)&&f&&(V=L?se(f)>se(W.value):he?f>W.value:K>new Date(W.value)),st(ee.value)&&f&&(U=L?se(f)<se(ee.value):he?f<ee.value:K<new Date(ee.value))}if((V||U)&&(D(!!V,W.message,ee.message,Rt.max,Rt.min),!n))return w(g[y].message),g}if((l||u)&&!O&&(st(f)||o&&Array.isArray(f))){const V=_r(l),U=_r(u),W=!et(V.value)&&f.length>+V.value,ee=!et(U.value)&&f.length<+U.value;if((W||ee)&&(D(W,V.message,U.message),!n))return w(g[y].message),g}if(v&&!O&&st(f)){const{value:V,message:U}=_r(v);if(Rn(V)&&!f.match(V)&&(g[y]={type:Rt.pattern,message:U,ref:a,...z(Rt.pattern,U)},!n))return w(U),g}if(x){if(ft(x)){const V=await x(f,r),U=Ji(V,b);if(U&&(g[y]={...U,...z(Rt.validate,U.message)},!n))return w(U.message),g}else if(Be(x)){let V={};for(const U in x){if(!Ke(V)&&!n)break;const W=Ji(await x[U](f,r),b,U);W&&(V={...W,...z(U,W.message)},w(W.message),n&&(g[y]=V))}if(!Ke(V)&&(g[y]={ref:b,...V},!n))return g}}return w(!0),g};const Th={mode:lt.onSubmit,reValidateMode:lt.onChange,shouldFocusError:!0};function Oh(e={}){let t={...Th,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:ft(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},s=Be(t.defaultValues)||Be(t.values)?Le(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:Le(s),a={action:!1,mount:!1,watch:!1},i={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let p={...u};const h={array:Mi(),state:Mi()},v=t.criteriaMode===lt.all,x=R=>I=>{clearTimeout(l),l=setTimeout(R,I)},y=async R=>{if(!t.disabled&&(u.isValid||p.isValid||R)){const I=t.resolver?Ke((await E()).errors):await O(n,!0);I!==r.isValid&&h.state.next({isValid:I})}},m=(R,I)=>{!t.disabled&&(u.isValidating||u.validatingFields||p.isValidating||p.validatingFields)&&((R||Array.from(i.mount)).forEach(B=>{B&&(I?Ie(r.validatingFields,B,I):Ue(r.validatingFields,B))}),h.state.next({validatingFields:r.validatingFields,isValidating:!Ke(r.validatingFields)}))},_=(R,I=[],B,re,ne=!0,X=!0)=>{if(re&&B&&!t.disabled){if(a.action=!0,X&&Array.isArray(te(n,R))){const me=B(te(n,R),re.argA,re.argB);ne&&Ie(n,R,me)}if(X&&Array.isArray(te(r.errors,R))){const me=B(te(r.errors,R),re.argA,re.argB);ne&&Ie(r.errors,R,me),Ph(r.errors,R)}if((u.touchedFields||p.touchedFields)&&X&&Array.isArray(te(r.touchedFields,R))){const me=B(te(r.touchedFields,R),re.argA,re.argB);ne&&Ie(r.touchedFields,R,me)}(u.dirtyFields||p.dirtyFields)&&(r.dirtyFields=vr(s,o)),h.state.next({name:R,isDirty:D(R,I),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ie(o,R,I)},f=(R,I)=>{Ie(r.errors,R,I),h.state.next({errors:r.errors})},b=R=>{r.errors=R,h.state.next({errors:r.errors,isValid:!1})},w=(R,I,B,re)=>{const ne=te(n,R);if(ne){const X=te(o,R,Fe(B)?te(s,R):B);Fe(X)||re&&re.defaultChecked||I?Ie(o,R,I?X:Gi(ne._f)):W(R,X),a.mount&&!a.action&&y()}},g=(R,I,B,re,ne)=>{let X=!1,me=!1;const Pe={name:R};if(!t.disabled){if(!B||re){(u.isDirty||p.isDirty)&&(me=r.isDirty,r.isDirty=Pe.isDirty=D(),X=me!==Pe.isDirty);const Ve=dt(te(s,R),I);me=!!te(r.dirtyFields,R),Ve?Ue(r.dirtyFields,R):Ie(r.dirtyFields,R,!0),Pe.dirtyFields=r.dirtyFields,X=X||(u.dirtyFields||p.dirtyFields)&&me!==!Ve}if(B){const Ve=te(r.touchedFields,R);Ve||(Ie(r.touchedFields,R,B),Pe.touchedFields=r.touchedFields,X=X||(u.touchedFields||p.touchedFields)&&Ve!==B)}X&&ne&&h.state.next(Pe)}return X?Pe:{}},$=(R,I,B,re)=>{const ne=te(r.errors,R),X=(u.isValid||p.isValid)&&nt(I)&&r.isValid!==I;if(t.delayError&&B?(c=x(()=>f(R,B)),c(t.delayError)):(clearTimeout(l),c=null,B?Ie(r.errors,R,B):Ue(r.errors,R)),(B?!dt(ne,B):ne)||!Ke(re)||X){const me={...re,...X&&nt(I)?{isValid:I}:{},errors:r.errors,name:R};r={...r,...me},h.state.next(me)}},E=async R=>{m(R,!0);const I=await t.resolver(o,t.context,kh(R||i.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return m(R),I},j=async R=>{const{errors:I}=await E(R);if(R)for(const B of R){const re=te(I,B);re?Ie(r.errors,B,re):Ue(r.errors,B)}else r.errors=I;return I},O=async(R,I,B={valid:!0})=>{for(const re in R){const ne=R[re];if(ne){const{_f:X,...me}=ne;if(X){const Pe=i.array.has(X.name),Ve=ne._f&&Ch(ne._f);Ve&&u.validatingFields&&m([X.name],!0);const Qe=await Fo(ne,i.disabled,o,v,t.shouldUseNativeValidation&&!I,Pe);if(Ve&&u.validatingFields&&m([X.name]),Qe[X.name]&&(B.valid=!1,I))break;!I&&(te(Qe,X.name)?Pe?Yi(r.errors,Qe,X.name):Ie(r.errors,X.name,Qe[X.name]):Ue(r.errors,X.name))}!Ke(me)&&await O(me,I,B)}}return B.valid},z=()=>{for(const R of i.unMount){const I=te(n,R);I&&(I._f.refs?I._f.refs.every(B=>!Do(B)):!Do(I._f.ref))&&F(R)}i.unMount=new Set},D=(R,I)=>!t.disabled&&(R&&I&&Ie(o,R,I),!dt(H(),s)),V=(R,I,B)=>Ao(R,i,{...a.mount?o:Fe(I)?s:st(R)?{[R]:I}:I},B,I),U=R=>kn(te(a.mount?o:s,R,t.shouldUnregister?te(s,R,[]):[])),W=(R,I,B={})=>{const re=te(n,R);let ne=I;if(re){const X=re._f;X&&(!X.disabled&&Ie(o,R,Bi(I,X)),ne=Nn(X.ref)&&et(I)?"":I,Fi(X.ref)?[...X.ref.options].forEach(me=>me.selected=ne.includes(me.value)):X.refs?en(X.ref)?X.refs.forEach(me=>{(!me.defaultChecked||!me.disabled)&&(Array.isArray(ne)?me.checked=!!ne.find(Pe=>Pe===me.value):me.checked=ne===me.value||!!ne)}):X.refs.forEach(me=>me.checked=me.value===ne):Oo(X.ref)?X.ref.value="":(X.ref.value=ne,X.ref.type||h.state.next({name:R,values:Le(o)})))}(B.shouldDirty||B.shouldTouch)&&g(R,ne,B.shouldTouch,B.shouldDirty,!0),B.shouldValidate&&he(R)},ee=(R,I,B)=>{for(const re in I){if(!I.hasOwnProperty(re))return;const ne=I[re],X=R+"."+re,me=te(n,X);(i.array.has(R)||Be(ne)||me&&!me._f)&&!ar(ne)?ee(X,ne,B):W(X,ne,B)}},K=(R,I,B={})=>{const re=te(n,R),ne=i.array.has(R),X=Le(I);Ie(o,R,X),ne?(h.array.next({name:R,values:Le(o)}),(u.isDirty||u.dirtyFields||p.isDirty||p.dirtyFields)&&B.shouldDirty&&h.state.next({name:R,dirtyFields:vr(s,o),isDirty:D(R,X)})):re&&!re._f&&!et(X)?ee(R,X,B):W(R,X,B),Vo(R,i)&&h.state.next({...r,name:R}),h.state.next({name:a.mount?R:void 0,values:Le(o)})},se=async R=>{a.mount=!0;const I=R.target;let B=I.name,re=!0;const ne=te(n,B),X=Ve=>{re=Number.isNaN(Ve)||ar(Ve)&&isNaN(Ve.getTime())||dt(Ve,te(o,B,Ve))},me=yr(t.mode),Pe=yr(t.reValidateMode);if(ne){let Ve,Qe;const Jr=I.type?Gi(ne._f):Ti(R),or=R.type===Cn.BLUR||R.type===Cn.FOCUS_OUT,o$=!jh(ne._f)&&!t.resolver&&!te(r.errors,B)&&!ne._f.deps||Ah(or,te(r.touchedFields,B),r.isSubmitted,Pe,me),Si=Vo(B,i,or);Ie(o,B,Jr),or?(!I||!I.readOnly)&&(ne._f.onBlur&&ne._f.onBlur(R),c&&c(0)):ne._f.onChange&&ne._f.onChange(R);const Ei=g(B,Jr,or),a$=!Ke(Ei)||Si;if(!or&&h.state.next({name:B,type:R.type,values:Le(o)}),o$)return(u.isValid||p.isValid)&&(t.mode==="onBlur"?or&&y():or||y()),a$&&h.state.next({name:B,...Si?{}:Ei});if(!or&&Si&&h.state.next({...r}),t.resolver){const{errors:mh}=await E([B]);if(X(Jr),re){const i$=Ki(r.errors,n,B),hh=Ki(mh,n,i$.name||B);Ve=hh.error,B=hh.name,Qe=Ke(mh)}}else m([B],!0),Ve=(await Fo(ne,i.disabled,o,v,t.shouldUseNativeValidation))[B],m([B]),X(Jr),re&&(Ve?Qe=!1:(u.isValid||p.isValid)&&(Qe=await O(n,!0)));re&&(ne._f.deps&&(!Array.isArray(ne._f.deps)||ne._f.deps.length>0)&&he(ne._f.deps),$(B,Qe,Ve,Ei))}},L=(R,I)=>{if(te(r.errors,I)&&R.focus)return R.focus(),1},he=async(R,I={})=>{let B,re;const ne=tt(R);if(t.resolver){const X=await j(Fe(R)?R:ne);B=Ke(X),re=R?!ne.some(me=>te(X,me)):B}else R?(re=(await Promise.all(ne.map(async X=>{const me=te(n,X);return await O(me&&me._f?{[X]:me}:me)}))).every(Boolean),!(!re&&!r.isValid)&&y()):re=B=await O(n);return h.state.next({...!st(R)||(u.isValid||p.isValid)&&B!==r.isValid?{}:{name:R},...t.resolver||!R?{isValid:B}:{},errors:r.errors}),I.shouldFocus&&!re&&br(n,L,R?ne:i.mount),re},H=(R,I)=>{let B={...a.mount?o:s};return I&&(B=Vi(I.dirtyFields?r.dirtyFields:r.touchedFields,B)),Fe(R)?B:st(R)?te(B,R):R.map(re=>te(B,re))},C=(R,I)=>({invalid:!!te((I||r).errors,R),isDirty:!!te((I||r).dirtyFields,R),error:te((I||r).errors,R),isValidating:!!te(r.validatingFields,R),isTouched:!!te((I||r).touchedFields,R)}),M=R=>{R&&tt(R).forEach(I=>Ue(r.errors,I)),h.state.next({errors:R?r.errors:{}})},P=(R,I,B)=>{const re=(te(n,R,{_f:{}})._f||{}).ref,ne=te(r.errors,R)||{},{ref:X,message:me,type:Pe,...Ve}=ne;Ie(r.errors,R,{...Ve,...I,ref:re}),h.state.next({name:R,errors:r.errors,isValid:!1}),B&&B.shouldFocus&&re&&re.focus&&re.focus()},k=(R,I)=>ft(R)?h.state.subscribe({next:B=>"values"in B&&R(V(void 0,I),B)}):V(R,I,!0),N=R=>h.state.subscribe({next:I=>{Rh(R.name,I.name,R.exact)&&Nh(I,R.formState||u,ze,R.reRenderRoot)&&R.callback({values:{...o},...r,...I,defaultValues:s})}}).unsubscribe,q=R=>(a.mount=!0,p={...p,...R.formState},N({...R,formState:p})),F=(R,I={})=>{for(const B of R?tt(R):i.mount)i.mount.delete(B),i.array.delete(B),I.keepValue||(Ue(n,B),Ue(o,B)),!I.keepError&&Ue(r.errors,B),!I.keepDirty&&Ue(r.dirtyFields,B),!I.keepTouched&&Ue(r.touchedFields,B),!I.keepIsValidating&&Ue(r.validatingFields,B),!t.shouldUnregister&&!I.keepDefaultValue&&Ue(s,B);h.state.next({values:Le(o)}),h.state.next({...r,...I.keepDirty?{isDirty:D()}:{}}),!I.keepIsValid&&y()},Y=({disabled:R,name:I})=>{(nt(R)&&a.mount||R||i.disabled.has(I))&&(R?i.disabled.add(I):i.disabled.delete(I))},de=(R,I={})=>{let B=te(n,R);const re=nt(I.disabled)||nt(t.disabled);return Ie(n,R,{...B||{},_f:{...B&&B._f?B._f:{ref:{name:R}},name:R,mount:!0,...I}}),i.mount.add(R),B?Y({disabled:nt(I.disabled)?I.disabled:t.disabled,name:R}):w(R,!0,I.value),{...re?{disabled:I.disabled||t.disabled}:{},...t.progressive?{required:!!I.required,min:rn(I.min),max:rn(I.max),minLength:rn(I.minLength),maxLength:rn(I.maxLength),pattern:rn(I.pattern)}:{},name:R,onChange:se,onBlur:se,ref:ne=>{if(ne){de(R,I),B=te(n,R);const X=Fe(ne.value)&&ne.querySelectorAll&&ne.querySelectorAll("input,select,textarea")[0]||ne,me=wh(X),Pe=B._f.refs||[];if(me?Pe.find(Ve=>Ve===X):X===B._f.ref)return;Ie(n,R,{_f:{...B._f,...me?{refs:[...Pe.filter(Do),X,...Array.isArray(te(s,R))?[{}]:[]],ref:{type:X.type,name:R}}:{ref:X}}}),w(R,!1,void 0,X)}else B=te(n,R,{}),B._f&&(B._f.mount=!1),(t.shouldUnregister||I.shouldUnregister)&&!(Oi(i.array,R)&&a.action)&&i.unMount.add(R)}}},oe=()=>t.shouldFocusError&&br(n,L,i.mount),A=R=>{nt(R)&&(h.state.next({disabled:R}),br(n,(I,B)=>{const re=te(n,B);re&&(I.disabled=re._f.disabled||R,Array.isArray(re._f.refs)&&re._f.refs.forEach(ne=>{ne.disabled=re._f.disabled||R}))},0,!1))},T=(R,I)=>async B=>{let re;B&&(B.preventDefault&&B.preventDefault(),B.persist&&B.persist());let ne=Le(o);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:X,values:me}=await E();r.errors=X,ne=Le(me)}else await O(n);if(i.disabled.size)for(const X of i.disabled)Ue(ne,X);if(Ue(r.errors,"root"),Ke(r.errors)){h.state.next({errors:{}});try{await R(ne,B)}catch(X){re=X}}else I&&await I({...r.errors},B),oe(),setTimeout(oe);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ke(r.errors)&&!re,submitCount:r.submitCount+1,errors:r.errors}),re)throw re},G=(R,I={})=>{te(n,R)&&(Fe(I.defaultValue)?K(R,Le(te(s,R))):(K(R,I.defaultValue),Ie(s,R,Le(I.defaultValue))),I.keepTouched||Ue(r.touchedFields,R),I.keepDirty||(Ue(r.dirtyFields,R),r.isDirty=I.defaultValue?D(R,Le(te(s,R))):D()),I.keepError||(Ue(r.errors,R),u.isValid&&y()),h.state.next({...r}))},J=(R,I={})=>{const B=R?Le(R):s,re=Le(B),ne=Ke(R),X=ne?s:re;if(I.keepDefaultValues||(s=B),!I.keepValues){if(I.keepDirtyValues){const me=new Set([...i.mount,...Object.keys(vr(s,o))]);for(const Pe of Array.from(me))te(r.dirtyFields,Pe)?Ie(X,Pe,te(o,Pe)):K(Pe,te(X,Pe))}else{if(jo&&Fe(R))for(const me of i.mount){const Pe=te(n,me);if(Pe&&Pe._f){const Ve=Array.isArray(Pe._f.refs)?Pe._f.refs[0]:Pe._f.ref;if(Nn(Ve)){const Qe=Ve.closest("form");if(Qe){Qe.reset();break}}}}if(I.keepFieldsRef)for(const me of i.mount)K(me,te(X,me));else n={}}o=t.shouldUnregister?I.keepDefaultValues?Le(s):{}:Le(X),h.array.next({values:{...X}}),h.state.next({values:{...X}})}i={mount:I.keepDirtyValues?i.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!u.isValid||!!I.keepIsValid||!!I.keepDirtyValues||!t.shouldUnregister&&!Ke(X),a.watch=!!t.shouldUnregister,h.state.next({submitCount:I.keepSubmitCount?r.submitCount:0,isDirty:ne?!1:I.keepDirty?r.isDirty:!!(I.keepDefaultValues&&!dt(R,s)),isSubmitted:I.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:ne?{}:I.keepDirtyValues?I.keepDefaultValues&&o?vr(s,o):r.dirtyFields:I.keepDefaultValues&&R?vr(s,R):I.keepDirty?r.dirtyFields:{},touchedFields:I.keepTouched?r.touchedFields:{},errors:I.keepErrors?r.errors:{},isSubmitSuccessful:I.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:s})},ie=(R,I)=>J(ft(R)?R(o):R,I),ge=(R,I={})=>{const B=te(n,R),re=B&&B._f;if(re){const ne=re.refs?re.refs[0]:re.ref;ne.focus&&(ne.focus(),I.shouldSelect&&ft(ne.select)&&ne.select())}},ze=R=>{r={...r,...R}},qe={control:{register:de,unregister:F,getFieldState:C,handleSubmit:T,setError:P,_subscribe:N,_runSchema:E,_focusError:oe,_getWatch:V,_getDirty:D,_setValid:y,_setFieldArray:_,_setDisabledField:Y,_setErrors:b,_getFieldArray:U,_reset:J,_resetDefaultValues:()=>ft(t.defaultValues)&&t.defaultValues().then(R=>{ie(R,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:z,_disableForm:A,_subjects:h,_proxyFormState:u,get _fields(){return n},get _formValues(){return o},get _state(){return a},set _state(R){a=R},get _defaultValues(){return s},get _names(){return i},set _names(R){i=R},get _formState(){return r},get _options(){return t},set _options(R){t={...t,...R}}},subscribe:q,trigger:he,register:de,handleSubmit:T,watch:k,setValue:K,getValues:H,reset:ie,resetField:G,clearErrors:M,unregister:F,setError:P,setFocus:ge,getFieldState:C};return{...qe,formControl:qe}}var Ut=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Lo=(e,t,r={})=>r.shouldFocus||Fe(r.shouldFocus)?r.focusName||`${e}.${Fe(r.focusIndex)?t:r.focusIndex}.`:"",zo=(e,t)=>[...e,...tt(t)],qo=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Uo(e,t,r){return[...e.slice(0,t),...tt(r),...e.slice(t)]}var Bo=(e,t,r)=>Array.isArray(e)?(Fe(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Wo=(e,t)=>[...tt(t),...tt(e)];function Ih(e,t){let r=0;const n=[...e];for(const s of t)n.splice(s-r,1),r++;return kn(n).length?n:[]}var Ho=(e,t)=>Fe(t)?[]:Ih(e,tt(t).sort((r,n)=>r-n)),Go=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Xi=(e,t,r)=>(e[t]=r,e);function Qi(e){const t=Ze(),{control:r=t.control,name:n,keyName:s="id",shouldUnregister:o,rules:a}=e,[i,c]=Z.useState(r._getFieldArray(n)),l=Z.useRef(r._getFieldArray(n).map(Ut)),u=Z.useRef(!1);r._names.array.add(n),Z.useMemo(()=>a&&i.length>=0&&r.register(n,a),[r,n,i.length,a]),jn(()=>r._subjects.array.subscribe({next:({values:w,name:g})=>{if(g===n||!g){const $=te(w,n);Array.isArray($)&&(c($),l.current=$.map(Ut))}}}).unsubscribe,[r,n]);const p=Z.useCallback(w=>{u.current=!0,r._setFieldArray(n,w)},[r,n]),h=(w,g)=>{const $=tt(Le(w)),E=zo(r._getFieldArray(n),$);r._names.focus=Lo(n,E.length-1,g),l.current=zo(l.current,$.map(Ut)),p(E),c(E),r._setFieldArray(n,E,zo,{argA:qo(w)})},v=(w,g)=>{const $=tt(Le(w)),E=Wo(r._getFieldArray(n),$);r._names.focus=Lo(n,0,g),l.current=Wo(l.current,$.map(Ut)),p(E),c(E),r._setFieldArray(n,E,Wo,{argA:qo(w)})},x=w=>{const g=Ho(r._getFieldArray(n),w);l.current=Ho(l.current,w),p(g),c(g),!Array.isArray(te(r._fields,n))&&Ie(r._fields,n,void 0),r._setFieldArray(n,g,Ho,{argA:w})},y=(w,g,$)=>{const E=tt(Le(g)),j=Uo(r._getFieldArray(n),w,E);r._names.focus=Lo(n,w,$),l.current=Uo(l.current,w,E.map(Ut)),p(j),c(j),r._setFieldArray(n,j,Uo,{argA:w,argB:qo(g)})},m=(w,g)=>{const $=r._getFieldArray(n);Go($,w,g),Go(l.current,w,g),p($),c($),r._setFieldArray(n,$,Go,{argA:w,argB:g},!1)},_=(w,g)=>{const $=r._getFieldArray(n);Bo($,w,g),Bo(l.current,w,g),p($),c($),r._setFieldArray(n,$,Bo,{argA:w,argB:g},!1)},f=(w,g)=>{const $=Le(g),E=Xi(r._getFieldArray(n),w,$);l.current=[...E].map((j,O)=>!j||O===w?Ut():l.current[O]),p(E),c([...E]),r._setFieldArray(n,E,Xi,{argA:w,argB:$},!0,!1)},b=w=>{const g=tt(Le(w));l.current=g.map(Ut),p([...g]),c([...g]),r._setFieldArray(n,[...g],$=>$,{},!0,!1)};return Z.useEffect(()=>{if(r._state.action=!1,Vo(n,r._names)&&r._subjects.state.next({...r._formState}),u.current&&(!yr(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!yr(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then(w=>{const g=te(w.errors,n),$=te(r._formState.errors,n);($?!g&&$.type||g&&($.type!==g.type||$.message!==g.message):g&&g.type)&&(g?Ie(r._formState.errors,n,g):Ue(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const w=te(r._fields,n);w&&w._f&&!(yr(r._options.reValidateMode).isOnSubmit&&yr(r._options.mode).isOnSubmit)&&Fo(w,r._names.disabled,r._formValues,r._options.criteriaMode===lt.all,r._options.shouldUseNativeValidation,!0).then(g=>!Ke(g)&&r._subjects.state.next({errors:Yi(r._formState.errors,g,n)}))}r._subjects.state.next({name:n,values:Le(r._formValues)}),r._names.focus&&br(r._fields,(w,g)=>{if(r._names.focus&&g.startsWith(r._names.focus)&&w.focus)return w.focus(),1}),r._names.focus="",r._setValid(),u.current=!1},[i,n,r]),Z.useEffect(()=>(!te(r._formValues,n)&&r._setFieldArray(n),()=>{const w=(g,$)=>{const E=te(r._fields,g);E&&E._f&&(E._f.mount=$)};r._options.shouldUnregister||o?r.unregister(n):w(n,!1)}),[n,r,s,o]),{swap:Z.useCallback(m,[p,n,r]),move:Z.useCallback(_,[p,n,r]),prepend:Z.useCallback(v,[p,n,r]),append:Z.useCallback(h,[p,n,r]),remove:Z.useCallback(x,[p,n,r]),insert:Z.useCallback(y,[p,n,r]),update:Z.useCallback(f,[p,n,r]),replace:Z.useCallback(b,[p,n,r]),fields:Z.useMemo(()=>i.map((w,g)=>({...w,[s]:l.current[g]||Ut()})),[i,s])}}function Dh(e={}){const t=Z.useRef(void 0),r=Z.useRef(void 0),[n,s]=Z.useState({isDirty:!1,isValidating:!1,isLoading:ft(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:ft(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!ft(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...i}=Oh(e);t.current={...i,formState:n}}const o=t.current.control;return o._options=e,jn(()=>{const a=o._subscribe({formState:o._proxyFormState,callback:()=>s({...o._formState}),reRenderRoot:!0});return s(i=>({...i,isReady:!0})),o._formState.isReady=!0,a},[o]),Z.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Z.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),Z.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),Z.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),Z.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==n.isDirty&&o._subjects.state.next({isDirty:a})}},[o,n.isDirty]),Z.useEffect(()=>{var a;e.values&&!dt(e.values,r.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((a=o._options.resetOptions)===null||a===void 0)&&a.keepIsValid||o._setValid(),r.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[o,e.values]),Z.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=Ii(n,o),t.current}const Mh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let nn=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Mh[r[e]&63];return t};function ec(e,[t,r]){return Math.min(r,Math.max(t,e))}function be(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 Vh(e,t){const r=S.createContext(t),n=o=>{const{children:a,...i}=o,c=S.useMemo(()=>i,Object.values(i));return d.jsx(r.Provider,{value:c,children:a})};n.displayName=e+"Provider";function s(o){const a=S.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[n,s]}function xt(e,t=[]){let r=[];function n(o,a){const i=S.createContext(a),c=r.length;r=[...r,a];const l=p=>{var _;const{scope:h,children:v,...x}=p,y=((_=h==null?void 0:h[e])==null?void 0:_[c])||i,m=S.useMemo(()=>x,Object.values(x));return d.jsx(y.Provider,{value:m,children:v})};l.displayName=o+"Provider";function u(p,h){var y;const v=((y=h==null?void 0:h[e])==null?void 0:y[c])||i,x=S.useContext(v);if(x)return x;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[l,u]}const s=()=>{const o=r.map(a=>S.createContext(a));return function(i){const c=(i==null?void 0:i[e])||o;return S.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return s.scopeName=e,[n,Fh(s,...t)]}function Fh(...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(o){const a=n.reduce((i,{useScope:c,scopeName:l})=>{const p=c(o)[`__scope${l}`];return{...i,...p}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function tc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xr(...e){return t=>{let r=!1;const n=e.map(s=>{const o=tc(s,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<n.length;s++){const o=n[s];typeof o=="function"?o():tc(e[s],null)}}}}function De(...e){return S.useCallback(xr(...e),e)}function rc(e){const t=Lh(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(qh);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function Lh(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=Bh(s),i=Uh(o,s.props);return s.type!==S.Fragment&&(i.ref=n?xr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zh=Symbol("radix.slottable");function qh(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zh}function Uh(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function Bh(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)}function nc(e){const t=e+"CollectionProvider",[r,n]=xt(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:m,children:_}=y,f=Z.useRef(null),b=Z.useRef(new Map).current;return d.jsx(s,{scope:m,itemMap:b,collectionRef:f,children:_})};a.displayName=t;const i=e+"CollectionSlot",c=rc(i),l=Z.forwardRef((y,m)=>{const{scope:_,children:f}=y,b=o(i,_),w=De(m,b.collectionRef);return d.jsx(c,{ref:w,children:f})});l.displayName=i;const u=e+"CollectionItemSlot",p="data-radix-collection-item",h=rc(u),v=Z.forwardRef((y,m)=>{const{scope:_,children:f,...b}=y,w=Z.useRef(null),g=De(m,w),$=o(u,_);return Z.useEffect(()=>($.itemMap.set(w,{ref:w,...b}),()=>void $.itemMap.delete(w))),d.jsx(h,{[p]:"",ref:g,children:f})});v.displayName=u;function x(y){const m=o(e+"CollectionConsumer",y);return Z.useCallback(()=>{const f=m.collectionRef.current;if(!f)return[];const b=Array.from(f.querySelectorAll(`[${p}]`));return Array.from(m.itemMap.values()).sort(($,E)=>b.indexOf($.ref.current)-b.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:l,ItemSlot:v},x,n]}var Wh=S.createContext(void 0);function Zo(e){const t=S.useContext(Wh);return e||t||"ltr"}function Hh(e){const t=Gh(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(Kh);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function Gh(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=Jh(s),i=Yh(o,s.props);return s.type!==S.Fragment&&(i.ref=n?xr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Zh=Symbol("radix.slottable");function Kh(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Zh}function Yh(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function Jh(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 Xh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],je=Xh.reduce((e,t)=>{const r=Hh(`Primitive.${t}`),n=S.forwardRef((s,o)=>{const{asChild:a,...i}=s,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Qh(e,t){e&&$n.flushSync(()=>e.dispatchEvent(t))}function Bt(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function ep(e,t=globalThis==null?void 0:globalThis.document){const r=Bt(e);S.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var tp="DismissableLayer",Ko="dismissableLayer.update",rp="dismissableLayer.pointerDownOutside",np="dismissableLayer.focusOutside",sc,oc=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),An=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:i,...c}=e,l=S.useContext(oc),[u,p]=S.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=S.useState({}),x=De(t,E=>p(E)),y=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=y.indexOf(m),f=u?y.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,w=f>=_,g=ap(E=>{const j=E.target,O=[...l.branches].some(z=>z.contains(j));!w||O||(s==null||s(E),a==null||a(E),E.defaultPrevented||i==null||i())},h),$=ip(E=>{const j=E.target;[...l.branches].some(z=>z.contains(j))||(o==null||o(E),a==null||a(E),E.defaultPrevented||i==null||i())},h);return ep(E=>{f===l.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},h),S.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(sc=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),ac(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=sc)}},[u,h,r,l]),S.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),ac())},[u,l]),S.useEffect(()=>{const E=()=>v({});return document.addEventListener(Ko,E),()=>document.removeEventListener(Ko,E)},[]),d.jsx(je.div,{...c,ref:x,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:be(e.onFocusCapture,$.onFocusCapture),onBlurCapture:be(e.onBlurCapture,$.onBlurCapture),onPointerDownCapture:be(e.onPointerDownCapture,g.onPointerDownCapture)})});An.displayName=tp;var sp="DismissableLayerBranch",op=S.forwardRef((e,t)=>{const r=S.useContext(oc),n=S.useRef(null),s=De(t,n);return S.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),d.jsx(je.div,{...e,ref:s})});op.displayName=sp;function ap(e,t=globalThis==null?void 0:globalThis.document){const r=Bt(e),n=S.useRef(!1),s=S.useRef(()=>{});return S.useEffect(()=>{const o=i=>{if(i.target&&!n.current){let c=function(){ic(rp,r,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function ip(e,t=globalThis==null?void 0:globalThis.document){const r=Bt(e),n=S.useRef(!1);return S.useEffect(()=>{const s=o=>{o.target&&!n.current&&ic(np,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ac(){const e=new CustomEvent(Ko);document.dispatchEvent(e)}function ic(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Qh(s,o):s.dispatchEvent(o)}var Yo=0;function cc(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lc()),document.body.insertAdjacentElement("beforeend",e[1]??lc()),Yo++,()=>{Yo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Yo--}},[])}function lc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Jo="focusScope.autoFocusOnMount",Xo="focusScope.autoFocusOnUnmount",uc={bubbles:!1,cancelable:!0},cp="FocusScope",Qo=S.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...a}=e,[i,c]=S.useState(null),l=Bt(s),u=Bt(o),p=S.useRef(null),h=De(t,y=>c(y)),v=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(n){let y=function(b){if(v.paused||!i)return;const w=b.target;i.contains(w)?p.current=w:Wt(p.current,{select:!0})},m=function(b){if(v.paused||!i)return;const w=b.relatedTarget;w!==null&&(i.contains(w)||Wt(p.current,{select:!0}))},_=function(b){if(document.activeElement===document.body)for(const g of b)g.removedNodes.length>0&&Wt(i)};document.addEventListener("focusin",y),document.addEventListener("focusout",m);const f=new MutationObserver(_);return i&&f.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",m),f.disconnect()}}},[n,i,v.paused]),S.useEffect(()=>{if(i){mc.add(v);const y=document.activeElement;if(!i.contains(y)){const _=new CustomEvent(Jo,uc);i.addEventListener(Jo,l),i.dispatchEvent(_),_.defaultPrevented||(lp(hp(dc(i)),{select:!0}),document.activeElement===y&&Wt(i))}return()=>{i.removeEventListener(Jo,l),setTimeout(()=>{const _=new CustomEvent(Xo,uc);i.addEventListener(Xo,u),i.dispatchEvent(_),_.defaultPrevented||Wt(y??document.body,{select:!0}),i.removeEventListener(Xo,u),mc.remove(v)},0)}}},[i,l,u,v]);const x=S.useCallback(y=>{if(!r&&!n||v.paused)return;const m=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,_=document.activeElement;if(m&&_){const f=y.currentTarget,[b,w]=up(f);b&&w?!y.shiftKey&&_===w?(y.preventDefault(),r&&Wt(b,{select:!0})):y.shiftKey&&_===b&&(y.preventDefault(),r&&Wt(w,{select:!0})):_===f&&y.preventDefault()}},[r,n,v.paused]);return d.jsx(je.div,{tabIndex:-1,...a,ref:h,onKeyDown:x})});Qo.displayName=cp;function lp(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Wt(n,{select:t}),document.activeElement!==r)return}function up(e){const t=dc(e),r=fc(t,e),n=fc(t.reverse(),e);return[r,n]}function dc(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function fc(e,t){for(const r of e)if(!dp(r,{upTo:t}))return r}function dp(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fp(e){return e instanceof HTMLInputElement&&"select"in e}function Wt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&fp(e)&&t&&e.select()}}var mc=mp();function mp(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=hc(e,t),e.unshift(t)},remove(t){var r;e=hc(e,t),(r=e[0])==null||r.resume()}}}function hc(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function hp(e){return e.filter(t=>t.tagName!=="A")}var Ye=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},pp=S[" useId ".trim().toString()]||(()=>{}),gp=0;function Ht(e){const[t,r]=S.useState(pp());return Ye(()=>{r(n=>n??String(gp++))},[e]),e||(t?`radix-${t}`:"")}const vp=["top","right","bottom","left"],Gt=Math.min,ot=Math.max,Pn=Math.round,Tn=Math.floor,wt=e=>({x:e,y:e}),yp={left:"right",right:"left",bottom:"top",top:"bottom"},bp={start:"end",end:"start"};function ea(e,t,r){return ot(e,Gt(t,r))}function At(e,t){return typeof e=="function"?e(t):e}function Pt(e){return e.split("-")[0]}function wr(e){return e.split("-")[1]}function ta(e){return e==="x"?"y":"x"}function ra(e){return e==="y"?"height":"width"}const _p=new Set(["top","bottom"]);function $t(e){return _p.has(Pt(e))?"y":"x"}function na(e){return ta($t(e))}function xp(e,t,r){r===void 0&&(r=!1);const n=wr(e),s=na(e),o=ra(s);let a=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=On(a)),[a,On(a)]}function wp(e){const t=On(e);return[sa(e),t,sa(t)]}function sa(e){return e.replace(/start|end/g,t=>bp[t])}const pc=["left","right"],gc=["right","left"],$p=["top","bottom"],Sp=["bottom","top"];function Ep(e,t,r){switch(e){case"top":case"bottom":return r?t?gc:pc:t?pc:gc;case"left":case"right":return t?$p:Sp;default:return[]}}function kp(e,t,r,n){const s=wr(e);let o=Ep(Pt(e),r==="start",n);return s&&(o=o.map(a=>a+"-"+s),t&&(o=o.concat(o.map(sa)))),o}function On(e){return e.replace(/left|right|bottom|top/g,t=>yp[t])}function Cp(e){return{top:0,right:0,bottom:0,left:0,...e}}function vc(e){return typeof e!="number"?Cp(e):{top:e,right:e,bottom:e,left:e}}function In(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function yc(e,t,r){let{reference:n,floating:s}=e;const o=$t(t),a=na(t),i=ra(a),c=Pt(t),l=o==="y",u=n.x+n.width/2-s.width/2,p=n.y+n.height/2-s.height/2,h=n[i]/2-s[i]/2;let v;switch(c){case"top":v={x:u,y:n.y-s.height};break;case"bottom":v={x:u,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:p};break;case"left":v={x:n.x-s.width,y:p};break;default:v={x:n.x,y:n.y}}switch(wr(t)){case"start":v[a]-=h*(r&&l?-1:1);break;case"end":v[a]+=h*(r&&l?-1:1);break}return v}const jp=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:a}=r,i=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:p}=yc(l,n,c),h=n,v={},x=0;for(let y=0;y<i.length;y++){const{name:m,fn:_}=i[y],{x:f,y:b,data:w,reset:g}=await _({x:u,y:p,initialPlacement:n,placement:h,strategy:s,middlewareData:v,rects:l,platform:a,elements:{reference:e,floating:t}});u=f??u,p=b??p,v={...v,[m]:{...v[m],...w}},g&&x<=50&&(x++,typeof g=="object"&&(g.placement&&(h=g.placement),g.rects&&(l=g.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):g.rects),{x:u,y:p}=yc(l,h,c)),y=-1)}return{x:u,y:p,placement:h,strategy:s,middlewareData:v}};async function sn(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:a,elements:i,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:h=!1,padding:v=0}=At(t,e),x=vc(v),m=i[h?p==="floating"?"reference":"floating":p],_=In(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(m)))==null||r?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(i.floating)),boundary:l,rootBoundary:u,strategy:c})),f=p==="floating"?{x:n,y:s,width:a.floating.width,height:a.floating.height}:a.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(i.floating)),w=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},g=In(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:f,offsetParent:b,strategy:c}):f);return{top:(_.top-g.top+x.top)/w.y,bottom:(g.bottom-_.bottom+x.bottom)/w.y,left:(_.left-g.left+x.left)/w.x,right:(g.right-_.right+x.right)/w.x}}const Np=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:a,elements:i,middlewareData:c}=t,{element:l,padding:u=0}=At(e,t)||{};if(l==null)return{};const p=vc(u),h={x:r,y:n},v=na(s),x=ra(v),y=await a.getDimensions(l),m=v==="y",_=m?"top":"left",f=m?"bottom":"right",b=m?"clientHeight":"clientWidth",w=o.reference[x]+o.reference[v]-h[v]-o.floating[x],g=h[v]-o.reference[v],$=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let E=$?$[b]:0;(!E||!await(a.isElement==null?void 0:a.isElement($)))&&(E=i.floating[b]||o.floating[x]);const j=w/2-g/2,O=E/2-y[x]/2-1,z=Gt(p[_],O),D=Gt(p[f],O),V=z,U=E-y[x]-D,W=E/2-y[x]/2+j,ee=ea(V,W,U),K=!c.arrow&&wr(s)!=null&&W!==ee&&o.reference[x]/2-(W<V?z:D)-y[x]/2<0,se=K?W<V?W-V:W-U:0;return{[v]:h[v]+se,data:{[v]:ee,centerOffset:W-ee-se,...K&&{alignmentOffset:se}},reset:K}}}),Rp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:a,initialPlacement:i,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:y=!0,...m}=At(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const _=Pt(s),f=$t(i),b=Pt(i)===i,w=await(c.isRTL==null?void 0:c.isRTL(l.floating)),g=h||(b||!y?[On(i)]:wp(i)),$=x!=="none";!h&&$&&g.push(...kp(i,y,x,w));const E=[i,...g],j=await sn(t,m),O=[];let z=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&O.push(j[_]),p){const W=xp(s,a,w);O.push(j[W[0]],j[W[1]])}if(z=[...z,{placement:s,overflows:O}],!O.every(W=>W<=0)){var D,V;const W=(((D=o.flip)==null?void 0:D.index)||0)+1,ee=E[W];if(ee&&(!(p==="alignment"?f!==$t(ee):!1)||z.every(L=>$t(L.placement)===f?L.overflows[0]>0:!0)))return{data:{index:W,overflows:z},reset:{placement:ee}};let K=(V=z.filter(se=>se.overflows[0]<=0).sort((se,L)=>se.overflows[1]-L.overflows[1])[0])==null?void 0:V.placement;if(!K)switch(v){case"bestFit":{var U;const se=(U=z.filter(L=>{if($){const he=$t(L.placement);return he===f||he==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(he=>he>0).reduce((he,H)=>he+H,0)]).sort((L,he)=>L[1]-he[1])[0])==null?void 0:U[0];se&&(K=se);break}case"initialPlacement":K=i;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function bc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _c(e){return vp.some(t=>e[t]>=0)}const Ap=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=At(e,t);switch(n){case"referenceHidden":{const o=await sn(t,{...s,elementContext:"reference"}),a=bc(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:_c(a)}}}case"escaped":{const o=await sn(t,{...s,altBoundary:!0}),a=bc(o,r.floating);return{data:{escapedOffsets:a,escaped:_c(a)}}}default:return{}}}}},xc=new Set(["left","top"]);async function Pp(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),a=Pt(r),i=wr(r),c=$t(r)==="y",l=xc.has(a)?-1:1,u=o&&c?-1:1,p=At(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof x=="number"&&(v=i==="end"?x*-1:x),c?{x:v*u,y:h*l}:{x:h*l,y:v*u}}const Tp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:a,middlewareData:i}=t,c=await Pp(t,e);return a===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:a}}}}},Op=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:i={fn:m=>{let{x:_,y:f}=m;return{x:_,y:f}}},...c}=At(e,t),l={x:r,y:n},u=await sn(t,c),p=$t(Pt(s)),h=ta(p);let v=l[h],x=l[p];if(o){const m=h==="y"?"top":"left",_=h==="y"?"bottom":"right",f=v+u[m],b=v-u[_];v=ea(f,v,b)}if(a){const m=p==="y"?"top":"left",_=p==="y"?"bottom":"right",f=x+u[m],b=x-u[_];x=ea(f,x,b)}const y=i.fn({...t,[h]:v,[p]:x});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[h]:o,[p]:a}}}}}},Ip=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:l=!0}=At(e,t),u={x:r,y:n},p=$t(s),h=ta(p);let v=u[h],x=u[p];const y=At(i,t),m=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const b=h==="y"?"height":"width",w=o.reference[h]-o.floating[b]+m.mainAxis,g=o.reference[h]+o.reference[b]-m.mainAxis;v<w?v=w:v>g&&(v=g)}if(l){var _,f;const b=h==="y"?"width":"height",w=xc.has(Pt(s)),g=o.reference[p]-o.floating[b]+(w&&((_=a.offset)==null?void 0:_[p])||0)+(w?0:m.crossAxis),$=o.reference[p]+o.reference[b]+(w?0:((f=a.offset)==null?void 0:f[p])||0)-(w?m.crossAxis:0);x<g?x=g:x>$&&(x=$)}return{[h]:v,[p]:x}}}},Dp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:o,platform:a,elements:i}=t,{apply:c=()=>{},...l}=At(e,t),u=await sn(t,l),p=Pt(s),h=wr(s),v=$t(s)==="y",{width:x,height:y}=o.floating;let m,_;p==="top"||p==="bottom"?(m=p,_=h===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(_=p,m=h==="end"?"top":"bottom");const f=y-u.top-u.bottom,b=x-u.left-u.right,w=Gt(y-u[m],f),g=Gt(x-u[_],b),$=!t.middlewareData.shift;let E=w,j=g;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(j=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=f),$&&!h){const z=ot(u.left,0),D=ot(u.right,0),V=ot(u.top,0),U=ot(u.bottom,0);v?j=x-2*(z!==0||D!==0?z+D:ot(u.left,u.right)):E=y-2*(V!==0||U!==0?V+U:ot(u.top,u.bottom))}await c({...t,availableWidth:j,availableHeight:E});const O=await a.getDimensions(i.floating);return x!==O.width||y!==O.height?{reset:{rects:!0}}:{}}}};function Dn(){return typeof window<"u"}function $r(e){return wc(e)?(e.nodeName||"").toLowerCase():"#document"}function at(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function St(e){var t;return(t=(wc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wc(e){return Dn()?e instanceof Node||e instanceof at(e).Node:!1}function mt(e){return Dn()?e instanceof Element||e instanceof at(e).Element:!1}function Et(e){return Dn()?e instanceof HTMLElement||e instanceof at(e).HTMLElement:!1}function $c(e){return!Dn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof at(e).ShadowRoot}const Mp=new Set(["inline","contents"]);function on(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=ht(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Mp.has(s)}const Vp=new Set(["table","td","th"]);function Fp(e){return Vp.has($r(e))}const Lp=[":popover-open",":modal"];function Mn(e){return Lp.some(t=>{try{return e.matches(t)}catch{return!1}})}const zp=["transform","translate","scale","rotate","perspective"],qp=["transform","translate","scale","rotate","perspective","filter"],Up=["paint","layout","strict","content"];function oa(e){const t=aa(),r=mt(e)?ht(e):e;return zp.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||qp.some(n=>(r.willChange||"").includes(n))||Up.some(n=>(r.contain||"").includes(n))}function Bp(e){let t=Zt(e);for(;Et(t)&&!Sr(t);){if(oa(t))return t;if(Mn(t))return null;t=Zt(t)}return null}function aa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Wp=new Set(["html","body","#document"]);function Sr(e){return Wp.has($r(e))}function ht(e){return at(e).getComputedStyle(e)}function Vn(e){return mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zt(e){if($r(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$c(e)&&e.host||St(e);return $c(t)?t.host:t}function Sc(e){const t=Zt(e);return Sr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Et(t)&&on(t)?t:Sc(t)}function an(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Sc(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),a=at(s);if(o){const i=ia(a);return t.concat(a,a.visualViewport||[],on(s)?s:[],i&&r?an(i):[])}return t.concat(s,an(s,[],r))}function ia(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ec(e){const t=ht(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Et(e),o=s?e.offsetWidth:r,a=s?e.offsetHeight:n,i=Pn(r)!==o||Pn(n)!==a;return i&&(r=o,n=a),{width:r,height:n,$:i}}function ca(e){return mt(e)?e:e.contextElement}function Er(e){const t=ca(e);if(!Et(t))return wt(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=Ec(t);let a=(o?Pn(r.width):r.width)/n,i=(o?Pn(r.height):r.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Hp=wt(0);function kc(e){const t=at(e);return!aa()||!t.visualViewport?Hp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gp(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==at(e)?!1:t}function ir(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=ca(e);let a=wt(1);t&&(n?mt(n)&&(a=Er(n)):a=Er(e));const i=Gp(o,r,n)?kc(o):wt(0);let c=(s.left+i.x)/a.x,l=(s.top+i.y)/a.y,u=s.width/a.x,p=s.height/a.y;if(o){const h=at(o),v=n&&mt(n)?at(n):n;let x=h,y=ia(x);for(;y&&n&&v!==x;){const m=Er(y),_=y.getBoundingClientRect(),f=ht(y),b=_.left+(y.clientLeft+parseFloat(f.paddingLeft))*m.x,w=_.top+(y.clientTop+parseFloat(f.paddingTop))*m.y;c*=m.x,l*=m.y,u*=m.x,p*=m.y,c+=b,l+=w,x=at(y),y=ia(x)}}return In({width:u,height:p,x:c,y:l})}function Fn(e,t){const r=Vn(e).scrollLeft;return t?t.left+r:ir(St(e)).left+r}function Cc(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Fn(e,r),s=r.top+t.scrollTop;return{x:n,y:s}}function Zp(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",a=St(n),i=t?Mn(t.floating):!1;if(n===a||i&&o)return r;let c={scrollLeft:0,scrollTop:0},l=wt(1);const u=wt(0),p=Et(n);if((p||!p&&!o)&&(($r(n)!=="body"||on(a))&&(c=Vn(n)),Et(n))){const v=ir(n);l=Er(n),u.x=v.x+n.clientLeft,u.y=v.y+n.clientTop}const h=a&&!p&&!o?Cc(a,c):wt(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+h.x,y:r.y*l.y-c.scrollTop*l.y+u.y+h.y}}function Kp(e){return Array.from(e.getClientRects())}function Yp(e){const t=St(e),r=Vn(e),n=e.ownerDocument.body,s=ot(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=ot(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Fn(e);const i=-r.scrollTop;return ht(n).direction==="rtl"&&(a+=ot(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:a,y:i}}const jc=25;function Jp(e,t){const r=at(e),n=St(e),s=r.visualViewport;let o=n.clientWidth,a=n.clientHeight,i=0,c=0;if(s){o=s.width,a=s.height;const u=aa();(!u||u&&t==="fixed")&&(i=s.offsetLeft,c=s.offsetTop)}const l=Fn(n);if(l<=0){const u=n.ownerDocument,p=u.body,h=getComputedStyle(p),v=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,x=Math.abs(n.clientWidth-p.clientWidth-v);x<=jc&&(o-=x)}else l<=jc&&(o+=l);return{width:o,height:a,x:i,y:c}}const Xp=new Set(["absolute","fixed"]);function Qp(e,t){const r=ir(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=Et(e)?Er(e):wt(1),a=e.clientWidth*o.x,i=e.clientHeight*o.y,c=s*o.x,l=n*o.y;return{width:a,height:i,x:c,y:l}}function Nc(e,t,r){let n;if(t==="viewport")n=Jp(e,r);else if(t==="document")n=Yp(St(e));else if(mt(t))n=Qp(t,r);else{const s=kc(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return In(n)}function Rc(e,t){const r=Zt(e);return r===t||!mt(r)||Sr(r)?!1:ht(r).position==="fixed"||Rc(r,t)}function eg(e,t){const r=t.get(e);if(r)return r;let n=an(e,[],!1).filter(i=>mt(i)&&$r(i)!=="body"),s=null;const o=ht(e).position==="fixed";let a=o?Zt(e):e;for(;mt(a)&&!Sr(a);){const i=ht(a),c=oa(a);!c&&i.position==="fixed"&&(s=null),(o?!c&&!s:!c&&i.position==="static"&&!!s&&Xp.has(s.position)||on(a)&&!c&&Rc(e,a))?n=n.filter(u=>u!==a):s=i,a=Zt(a)}return t.set(e,n),n}function tg(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const a=[...r==="clippingAncestors"?Mn(t)?[]:eg(t,this._c):[].concat(r),n],i=a[0],c=a.reduce((l,u)=>{const p=Nc(t,u,s);return l.top=ot(p.top,l.top),l.right=Gt(p.right,l.right),l.bottom=Gt(p.bottom,l.bottom),l.left=ot(p.left,l.left),l},Nc(t,i,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function rg(e){const{width:t,height:r}=Ec(e);return{width:t,height:r}}function ng(e,t,r){const n=Et(t),s=St(t),o=r==="fixed",a=ir(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const c=wt(0);function l(){c.x=Fn(s)}if(n||!n&&!o)if(($r(t)!=="body"||on(s))&&(i=Vn(t)),n){const v=ir(t,!0,o,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else s&&l();o&&!n&&s&&l();const u=s&&!n&&!o?Cc(s,i):wt(0),p=a.left+i.scrollLeft-c.x-u.x,h=a.top+i.scrollTop-c.y-u.y;return{x:p,y:h,width:a.width,height:a.height}}function la(e){return ht(e).position==="static"}function Ac(e,t){if(!Et(e)||ht(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return St(e)===r&&(r=r.ownerDocument.body),r}function Pc(e,t){const r=at(e);if(Mn(e))return r;if(!Et(e)){let s=Zt(e);for(;s&&!Sr(s);){if(mt(s)&&!la(s))return s;s=Zt(s)}return r}let n=Ac(e,t);for(;n&&Fp(n)&&la(n);)n=Ac(n,t);return n&&Sr(n)&&la(n)&&!oa(n)?r:n||Bp(e)||r}const sg=async function(e){const t=this.getOffsetParent||Pc,r=this.getDimensions,n=await r(e.floating);return{reference:ng(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function og(e){return ht(e).direction==="rtl"}const ag={convertOffsetParentRelativeRectToViewportRelativeRect:Zp,getDocumentElement:St,getClippingRect:tg,getOffsetParent:Pc,getElementRects:sg,getClientRects:Kp,getDimensions:rg,getScale:Er,isElement:mt,isRTL:og};function Tc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ig(e,t){let r=null,n;const s=St(e);function o(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),o();const l=e.getBoundingClientRect(),{left:u,top:p,width:h,height:v}=l;if(i||t(),!h||!v)return;const x=Tn(p),y=Tn(s.clientWidth-(u+h)),m=Tn(s.clientHeight-(p+v)),_=Tn(u),b={rootMargin:-x+"px "+-y+"px "+-m+"px "+-_+"px",threshold:ot(0,Gt(1,c))||1};let w=!0;function g($){const E=$[0].intersectionRatio;if(E!==c){if(!w)return a();E?a(!1,E):n=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!Tc(l,e.getBoundingClientRect())&&a(),w=!1}try{r=new IntersectionObserver(g,{...b,root:s.ownerDocument})}catch{r=new IntersectionObserver(g,b)}r.observe(e)}return a(!0),o}function cg(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=ca(e),u=s||o?[...l?an(l):[],...an(t)]:[];u.forEach(_=>{s&&_.addEventListener("scroll",r,{passive:!0}),o&&_.addEventListener("resize",r)});const p=l&&i?ig(l,r):null;let h=-1,v=null;a&&(v=new ResizeObserver(_=>{let[f]=_;f&&f.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(t)})),r()}),l&&!c&&v.observe(l),v.observe(t));let x,y=c?ir(e):null;c&&m();function m(){const _=ir(e);y&&!Tc(y,_)&&r(),y=_,x=requestAnimationFrame(m)}return r(),()=>{var _;u.forEach(f=>{s&&f.removeEventListener("scroll",r),o&&f.removeEventListener("resize",r)}),p==null||p(),(_=v)==null||_.disconnect(),v=null,c&&cancelAnimationFrame(x)}}const lg=Tp,ug=Op,dg=Rp,fg=Dp,mg=Ap,Oc=Np,hg=Ip,pg=(e,t,r)=>{const n=new Map,s={platform:ag,...r},o={...s.platform,_c:n};return jp(e,t,{...s,platform:o})};var gg=typeof document<"u",vg=function(){},Ln=gg?Z.useLayoutEffect:vg;function zn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!zn(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!zn(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ic(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dc(e,t){const r=Ic(e);return Math.round(t*r)/r}function ua(e){const t=S.useRef(e);return Ln(()=>{t.current=e}),t}function yg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:a}={},transform:i=!0,whileElementsMounted:c,open:l}=e,[u,p]=S.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=S.useState(n);zn(h,n)||v(n);const[x,y]=S.useState(null),[m,_]=S.useState(null),f=S.useCallback(L=>{L!==$.current&&($.current=L,y(L))},[]),b=S.useCallback(L=>{L!==E.current&&(E.current=L,_(L))},[]),w=o||x,g=a||m,$=S.useRef(null),E=S.useRef(null),j=S.useRef(u),O=c!=null,z=ua(c),D=ua(s),V=ua(l),U=S.useCallback(()=>{if(!$.current||!E.current)return;const L={placement:t,strategy:r,middleware:h};D.current&&(L.platform=D.current),pg($.current,E.current,L).then(he=>{const H={...he,isPositioned:V.current!==!1};W.current&&!zn(j.current,H)&&(j.current=H,$n.flushSync(()=>{p(H)}))})},[h,t,r,D,V]);Ln(()=>{l===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,p(L=>({...L,isPositioned:!1})))},[l]);const W=S.useRef(!1);Ln(()=>(W.current=!0,()=>{W.current=!1}),[]),Ln(()=>{if(w&&($.current=w),g&&(E.current=g),w&&g){if(z.current)return z.current(w,g,U);U()}},[w,g,U,z,O]);const ee=S.useMemo(()=>({reference:$,floating:E,setReference:f,setFloating:b}),[f,b]),K=S.useMemo(()=>({reference:w,floating:g}),[w,g]),se=S.useMemo(()=>{const L={position:r,left:0,top:0};if(!K.floating)return L;const he=Dc(K.floating,u.x),H=Dc(K.floating,u.y);return i?{...L,transform:"translate("+he+"px, "+H+"px)",...Ic(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:he,top:H}},[r,i,K.floating,u.x,u.y]);return S.useMemo(()=>({...u,update:U,refs:ee,elements:K,floatingStyles:se}),[u,U,ee,K,se])}const bg=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Oc({element:n.current,padding:s}).fn(r):{}:n?Oc({element:n,padding:s}).fn(r):{}}}},_g=(e,t)=>({...lg(e),options:[e,t]}),xg=(e,t)=>({...ug(e),options:[e,t]}),wg=(e,t)=>({...hg(e),options:[e,t]}),$g=(e,t)=>({...dg(e),options:[e,t]}),Sg=(e,t)=>({...fg(e),options:[e,t]}),Eg=(e,t)=>({...mg(e),options:[e,t]}),kg=(e,t)=>({...bg(e),options:[e,t]});var Cg="Arrow",Mc=S.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return d.jsx(je.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Mc.displayName=Cg;var jg=Mc;function da(e){const[t,r]=S.useState(void 0);return Ye(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let a,i;if("borderBoxSize"in o){const c=o.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,i=l.blockSize}else a=e.offsetWidth,i=e.offsetHeight;r({width:a,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var fa="Popper",[Vc,qn]=xt(fa),[Ng,Fc]=Vc(fa),Lc=e=>{const{__scopePopper:t,children:r}=e,[n,s]=S.useState(null);return d.jsx(Ng,{scope:t,anchor:n,onAnchorChange:s,children:r})};Lc.displayName=fa;var zc="PopperAnchor",qc=S.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=Fc(zc,r),a=S.useRef(null),i=De(t,a),c=S.useRef(null);return S.useEffect(()=>{const l=c.current;c.current=(n==null?void 0:n.current)||a.current,l!==c.current&&o.onAnchorChange(c.current)}),n?null:d.jsx(je.div,{...s,ref:i})});qc.displayName=zc;var ma="PopperContent",[Rg,Ag]=Vc(ma),Uc=S.forwardRef((e,t)=>{var F,Y,de,oe,A,T;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:x,...y}=e,m=Fc(ma,r),[_,f]=S.useState(null),b=De(t,G=>f(G)),[w,g]=S.useState(null),$=da(w),E=($==null?void 0:$.width)??0,j=($==null?void 0:$.height)??0,O=n+(o!=="center"?"-"+o:""),z=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],V=D.length>0,U={padding:z,boundary:D.filter(Tg),altBoundary:V},{refs:W,floatingStyles:ee,placement:K,isPositioned:se,middlewareData:L}=yg({strategy:"fixed",placement:O,whileElementsMounted:(...G)=>cg(...G,{animationFrame:v==="always"}),elements:{reference:m.anchor},middleware:[_g({mainAxis:s+j,alignmentAxis:a}),c&&xg({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?wg():void 0,...U}),c&&$g({...U}),Sg({...U,apply:({elements:G,rects:J,availableWidth:ie,availableHeight:ge})=>{const{width:ze,height:rt}=J.reference,qe=G.floating.style;qe.setProperty("--radix-popper-available-width",`${ie}px`),qe.setProperty("--radix-popper-available-height",`${ge}px`),qe.setProperty("--radix-popper-anchor-width",`${ze}px`),qe.setProperty("--radix-popper-anchor-height",`${rt}px`)}}),w&&kg({element:w,padding:i}),Og({arrowWidth:E,arrowHeight:j}),h&&Eg({strategy:"referenceHidden",...U})]}),[he,H]=Hc(K),C=Bt(x);Ye(()=>{se&&(C==null||C())},[se,C]);const M=(F=L.arrow)==null?void 0:F.x,P=(Y=L.arrow)==null?void 0:Y.y,k=((de=L.arrow)==null?void 0:de.centerOffset)!==0,[N,q]=S.useState();return Ye(()=>{_&&q(window.getComputedStyle(_).zIndex)},[_]),d.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:se?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:N,"--radix-popper-transform-origin":[(oe=L.transformOrigin)==null?void 0:oe.x,(A=L.transformOrigin)==null?void 0:A.y].join(" "),...((T=L.hide)==null?void 0:T.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Rg,{scope:r,placedSide:he,onArrowChange:g,arrowX:M,arrowY:P,shouldHideArrow:k,children:d.jsx(je.div,{"data-side":he,"data-align":H,...y,ref:b,style:{...y.style,animation:se?void 0:"none"}})})})});Uc.displayName=ma;var Bc="PopperArrow",Pg={top:"bottom",right:"left",bottom:"top",left:"right"},Wc=S.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=Ag(Bc,n),a=Pg[o.placedSide];return d.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:d.jsx(jg,{...s,ref:r,style:{...s.style,display:"block"}})})});Wc.displayName=Bc;function Tg(e){return e!==null}var Og=e=>({name:"transformOrigin",options:e,fn(t){var m,_,f;const{placement:r,rects:n,middlewareData:s}=t,a=((m=s.arrow)==null?void 0:m.centerOffset)!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[l,u]=Hc(r),p={start:"0%",center:"50%",end:"100%"}[u],h=(((_=s.arrow)==null?void 0:_.x)??0)+i/2,v=(((f=s.arrow)==null?void 0:f.y)??0)+c/2;let x="",y="";return l==="bottom"?(x=a?p:`${h}px`,y=`${-c}px`):l==="top"?(x=a?p:`${h}px`,y=`${n.floating.height+c}px`):l==="right"?(x=`${-c}px`,y=a?p:`${v}px`):l==="left"&&(x=`${n.floating.width+c}px`,y=a?p:`${v}px`),{data:{x,y}}}});function Hc(e){const[t,r="center"]=e.split("-");return[t,r]}var Gc=Lc,Zc=qc,Kc=Uc,Yc=Wc,Ig="Portal",Un=S.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[s,o]=S.useState(!1);Ye(()=>o(!0),[]);const a=r||s&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?ki.createPortal(d.jsx(je.div,{...n,ref:t}),a):null});Un.displayName=Ig;function Dg(e){const t=Mg(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(Fg);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function Mg(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=zg(s),i=Lg(o,s.props);return s.type!==S.Fragment&&(i.ref=n?xr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vg=Symbol("radix.slottable");function Fg(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vg}function Lg(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function zg(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 qg=S[" useInsertionEffect ".trim().toString()]||Ye;function cr({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,a]=Ug({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:s;{const u=S.useRef(e!==void 0);S.useEffect(()=>{const p=u.current;p!==i&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,n])}const l=S.useCallback(u=>{var p;if(i){const h=Bg(u)?u(e):u;h!==e&&((p=a.current)==null||p.call(a,h))}else o(u)},[i,e,o,a]);return[c,l]}function Ug({defaultProp:e,onChange:t}){const[r,n]=S.useState(e),s=S.useRef(r),o=S.useRef(t);return qg(()=>{o.current=t},[t]),S.useEffect(()=>{var a;s.current!==r&&((a=o.current)==null||a.call(o,r),s.current=r)},[r,s]),[r,n,o]}function Bg(e){return typeof e=="function"}function ha(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Jc=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Wg="VisuallyHidden",Xc=S.forwardRef((e,t)=>d.jsx(je.span,{...e,ref:t,style:{...Jc,...e.style}}));Xc.displayName=Wg;var Hg=Xc,Gg=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kr=new WeakMap,Bn=new WeakMap,Wn={},pa=0,Qc=function(e){return e&&(e.host||Qc(e.parentNode))},Zg=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Qc(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Kg=function(e,t,r,n){var s=Zg(t,Array.isArray(e)?e:[e]);Wn[r]||(Wn[r]=new WeakMap);var o=Wn[r],a=[],i=new Set,c=new Set(s),l=function(p){!p||i.has(p)||(i.add(p),l(p.parentNode))};s.forEach(l);var u=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(h){if(i.has(h))u(h);else try{var v=h.getAttribute(n),x=v!==null&&v!=="false",y=(kr.get(h)||0)+1,m=(o.get(h)||0)+1;kr.set(h,y),o.set(h,m),a.push(h),y===1&&x&&Bn.set(h,!0),m===1&&h.setAttribute(r,"true"),x||h.setAttribute(n,"true")}catch(_){console.error("aria-hidden: cannot operate on ",h,_)}})};return u(t),i.clear(),pa++,function(){a.forEach(function(p){var h=kr.get(p)-1,v=o.get(p)-1;kr.set(p,h),o.set(p,v),h||(Bn.has(p)||p.removeAttribute(n),Bn.delete(p)),v||p.removeAttribute(r)}),pa--,pa||(kr=new WeakMap,kr=new WeakMap,Bn=new WeakMap,Wn={})}},el=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=Gg(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),Kg(n,s,r,"aria-hidden")):function(){return null}},kt=function(){return kt=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},kt.apply(this,arguments)};function tl(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function Yg(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Hn="right-scroll-bar-position",Gn="width-before-scroll-bar",Jg="with-scroll-bars-hidden",Xg="--removed-body-scroll-bar-size";function ga(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Qg(e,t){var r=Z.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var ev=typeof window<"u"?S.useLayoutEffect:S.useEffect,rl=new WeakMap;function tv(e,t){var r=Qg(null,function(n){return e.forEach(function(s){return ga(s,n)})});return ev(function(){var n=rl.get(r);if(n){var s=new Set(n),o=new Set(e),a=r.current;s.forEach(function(i){o.has(i)||ga(i,null)}),o.forEach(function(i){s.has(i)||ga(i,a)})}rl.set(r,e)},[e]),r}function rv(e){return e}function nv(e,t){t===void 0&&(t=rv);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var a=t(o,n);return r.push(a),function(){r=r.filter(function(i){return i!==a})}},assignSyncMedium:function(o){for(n=!0;r.length;){var a=r;r=[],a.forEach(o)}r={push:function(i){return o(i)},filter:function(){return r}}},assignMedium:function(o){n=!0;var a=[];if(r.length){var i=r;r=[],i.forEach(o),a=r}var c=function(){var u=a;a=[],u.forEach(o)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),r}}}};return s}function sv(e){e===void 0&&(e={});var t=nv(null);return t.options=kt({async:!0,ssr:!1},e),t}var nl=function(e){var t=e.sideCar,r=tl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return S.createElement(n,kt({},r))};nl.isSideCarExport=!0;function ov(e,t){return e.useMedium(t),nl}var sl=sv(),va=function(){},Zn=S.forwardRef(function(e,t){var r=S.useRef(null),n=S.useState({onScrollCapture:va,onWheelCapture:va,onTouchMoveCapture:va}),s=n[0],o=n[1],a=e.forwardProps,i=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,p=e.shards,h=e.sideCar,v=e.noRelative,x=e.noIsolation,y=e.inert,m=e.allowPinchZoom,_=e.as,f=_===void 0?"div":_,b=e.gapMode,w=tl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),g=h,$=tv([r,t]),E=kt(kt({},w),s);return S.createElement(S.Fragment,null,u&&S.createElement(g,{sideCar:sl,removeScrollBar:l,shards:p,noRelative:v,noIsolation:x,inert:y,setCallbacks:o,allowPinchZoom:!!m,lockRef:r,gapMode:b}),a?S.cloneElement(S.Children.only(i),kt(kt({},E),{ref:$})):S.createElement(f,kt({},E,{className:c,ref:$}),i))});Zn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Zn.classNames={fullWidth:Gn,zeroRight:Hn};var av=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function iv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=av();return t&&e.setAttribute("nonce",t),e}function cv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var uv=function(){var e=0,t=null;return{add:function(r){e==0&&(t=iv())&&(cv(t,r),lv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dv=function(){var e=uv();return function(t,r){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ol=function(){var e=dv(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},fv={left:0,top:0,right:0,gap:0},ya=function(e){return parseInt(e||"",10)||0},mv=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[ya(r),ya(n),ya(s)]},hv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fv;var t=mv(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},pv=ol(),Cr="data-scroll-locked",gv=function(e,t,r,n){var s=e.left,o=e.top,a=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
22
|
+
<%s key={someKey} {...props} />`,k,F,Y,F),H[F+k]=!0)}if(F=null,P!==void 0&&(r(P),F=""+P),a(M)&&(r(M.key),F=""+M.key),"key"in M){P={};for(var de in M)de!=="key"&&(P[de]=M[de])}else P=M;return F&&i(P,typeof C=="function"?C.displayName||C.name||"Unknown":C),l(C,F,P,s(),N,z)}function h(C){p(C)?C._store&&(C._store.validated=1):typeof C=="object"&&C!==null&&C.$$typeof===I&&(C._payload.status==="fulfilled"?p(C._payload.value)&&C._payload.value._store&&(C._payload.value._store.validated=1):C._store&&(C._store.validated=1))}function p(C){return typeof C=="object"&&C!==null&&C.$$typeof===w}var v=Z,w=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),x=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),V=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=Object.prototype.hasOwnProperty,W=Array.isArray,ee=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(C){return C()}};var K,se={},L=v.react_stack_bottom_frame.bind(v,o)(),he=ee(n(o)),H={};Qr.Fragment=m,Qr.jsx=function(C,M,P){var k=1e4>V.recentlyCreatedOwnerStacks++;return u(C,M,P,!1,k?Error("react-stack-top-frame"):L,k?ee(n(C)):he)},Qr.jsxs=function(C,M,P){var k=1e4>V.recentlyCreatedOwnerStacks++;return u(C,M,P,!0,k?Error("react-stack-top-frame"):L,k?ee(n(C)):he)}})()),Qr}var Ai;function vh(){return Ai||(Ai=1,process.env.NODE_ENV==="production"?Sn.exports=ph():Sn.exports=gh()),Sn.exports}var d=vh(),en=e=>e.type==="checkbox",ar=e=>e instanceof Date,et=e=>e==null;const Pi=e=>typeof e=="object";var Be=e=>!et(e)&&!Array.isArray(e)&&Pi(e)&&!ar(e),Ti=e=>Be(e)&&e.target?en(e.target)?e.target.checked:e.target.value:e,yh=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Oi=(e,t)=>e.has(yh(t)),bh=e=>{const t=e.constructor&&e.constructor.prototype;return Be(t)&&t.hasOwnProperty("isPrototypeOf")},jo=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Le(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(jo&&(e instanceof Blob||n))&&(r||Be(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!bh(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=Le(e[s]));else return e;return t}var En=e=>/^\w*$/.test(e),Fe=e=>e===void 0,kn=e=>Array.isArray(e)?e.filter(Boolean):[],No=e=>kn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),te=(e,t,r)=>{if(!t||!Be(e))return r;const n=(En(t)?[t]:No(t)).reduce((s,o)=>et(s)?s:s[o],e);return Fe(n)||n===e?Fe(e[t])?r:e[t]:n},nt=e=>typeof e=="boolean",Ie=(e,t,r)=>{let n=-1;const s=En(t)?[t]:No(t),o=s.length,a=o-1;for(;++n<o;){const i=s[n];let c=r;if(n!==a){const l=e[i];c=Be(l)||Array.isArray(l)?l:isNaN(+s[n+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=c,e=e[i]}};const Cn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},lt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Rt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ro=Z.createContext(null);Ro.displayName="HookFormContext";const Ze=()=>Z.useContext(Ro),_h=e=>{const{children:t,...r}=e;return Z.createElement(Ro.Provider,{value:r},t)};var Ii=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const a=o;return t._proxyFormState[a]!==lt.all&&(t._proxyFormState[a]=!n||lt.all),r&&(r[a]=!0),e[a]}});return s};const jn=typeof window<"u"?Z.useLayoutEffect:Z.useEffect;function Di(e){const t=Ze(),{control:r=t.control,disabled:n,name:s,exact:o}=e||{},[a,i]=Z.useState(r._formState),c=Z.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return jn(()=>r._subscribe({name:s,formState:c.current,exact:o,callback:l=>{!n&&i({...r._formState,...l})}}),[s,n,o]),Z.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),Z.useMemo(()=>Ii(a,r,c.current,!1),[a,r])}var st=e=>typeof e=="string",Ao=(e,t,r,n,s)=>st(e)?(n&&t.watch.add(e),te(r,e,s)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),te(r,o))):(n&&(t.watchAll=!0),r),Po=e=>et(e)||!Pi(e);function dt(e,t,r=new WeakSet){if(Po(e)||Po(t))return Object.is(e,t);if(ar(e)&&ar(t))return e.getTime()===t.getTime();const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const o of n){const a=e[o];if(!s.includes(o))return!1;if(o!=="ref"){const i=t[o];if(ar(a)&&ar(i)||Be(a)&&Be(i)||Array.isArray(a)&&Array.isArray(i)?!dt(a,i,r):!Object.is(a,i))return!1}}return!0}function tn(e){const t=Ze(),{control:r=t.control,name:n,defaultValue:s,disabled:o,exact:a,compute:i}=e||{},c=Z.useRef(s),l=Z.useRef(i),u=Z.useRef(void 0),h=Z.useRef(r),p=Z.useRef(n);l.current=i;const[v,w]=Z.useState(()=>{const x=r._getWatch(n,c.current);return l.current?l.current(x):x}),y=Z.useCallback(x=>{const g=Ao(n,r._names,x||r._formValues,!1,c.current);return l.current?l.current(g):g},[r._formValues,r._names,n]),m=Z.useCallback(x=>{if(!o){const g=Ao(n,r._names,x||r._formValues,!1,c.current);if(l.current){const $=l.current(g);dt($,u.current)||(w($),u.current=$)}else w(g)}},[r._formValues,r._names,o,n]);jn(()=>((h.current!==r||!dt(p.current,n))&&(h.current=r,p.current=n,m()),r._subscribe({name:n,formState:{values:!0},exact:a,callback:x=>{m(x.values)}})),[r,a,n,m]),Z.useEffect(()=>r._removeUnmounted());const _=h.current!==r,f=p.current,b=Z.useMemo(()=>{if(o)return null;const x=!_&&!dt(f,n);return _||x?y():null},[o,_,n,f,y]);return b!==null?b:v}function xh(e){const t=Ze(),{name:r,disabled:n,control:s=t.control,shouldUnregister:o,defaultValue:a}=e,i=Oi(s._names.array,r),c=Z.useMemo(()=>te(s._formValues,r,te(s._defaultValues,r,a)),[s,r,a]),l=tn({control:s,name:r,defaultValue:c,exact:!0}),u=Di({control:s,name:r,exact:!0}),h=Z.useRef(e),p=Z.useRef(void 0),v=Z.useRef(s.register(r,{...e.rules,value:l,...nt(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const w=Z.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!te(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!te(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!te(u.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!te(u.validatingFields,r)},error:{enumerable:!0,get:()=>te(u.errors,r)}}),[u,r]),y=Z.useCallback(b=>v.current.onChange({target:{value:Ti(b),name:r},type:Cn.CHANGE}),[r]),m=Z.useCallback(()=>v.current.onBlur({target:{value:te(s._formValues,r),name:r},type:Cn.BLUR}),[r,s._formValues]),_=Z.useCallback(b=>{const x=te(s._fields,r);x&&b&&(x._f.ref={focus:()=>b.focus&&b.focus(),select:()=>b.select&&b.select(),setCustomValidity:g=>b.setCustomValidity(g),reportValidity:()=>b.reportValidity()})},[s._fields,r]),f=Z.useMemo(()=>({name:r,value:l,...nt(n)||u.disabled?{disabled:u.disabled||n}:{},onChange:y,onBlur:m,ref:_}),[r,n,u.disabled,y,m,_,l]);return Z.useEffect(()=>{const b=s._options.shouldUnregister||o,x=p.current;x&&x!==r&&!i&&s.unregister(x),s.register(r,{...h.current.rules,...nt(h.current.disabled)?{disabled:h.current.disabled}:{}});const g=($,E)=>{const j=te(s._fields,$);j&&j._f&&(j._f.mount=E)};if(g(r,!0),b){const $=Le(te(s._options.defaultValues,r,h.current.defaultValue));Ie(s._defaultValues,r,$),Fe(te(s._formValues,r))&&Ie(s._formValues,r,$)}return!i&&s.register(r),p.current=r,()=>{(i?b&&!s._state.action:b)?s.unregister(r):g(r,!1)}},[r,s,i,o]),Z.useEffect(()=>{s._setDisabledField({disabled:n,name:r})},[n,r,s]),Z.useMemo(()=>({field:f,formState:u,fieldState:w}),[f,u,w])}const qt=e=>e.render(xh(e));var To=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},tt=e=>Array.isArray(e)?e:[e],Mi=()=>{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}};function Vi(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const s=e[n],o=t[n];if(s&&Be(s)&&o){const a=Vi(s,o);Be(a)&&(r[n]=a)}else e[n]&&(r[n]=o)}return r}var Ke=e=>Be(e)&&!Object.keys(e).length,Oo=e=>e.type==="file",ft=e=>typeof e=="function",Nn=e=>{if(!jo)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Fi=e=>e.type==="select-multiple",Io=e=>e.type==="radio",wh=e=>Io(e)||en(e),Do=e=>Nn(e)&&e.isConnected;function $h(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Fe(e)?n++:e[t[n++]];return e}function Sh(e){for(const t in e)if(e.hasOwnProperty(t)&&!Fe(e[t]))return!1;return!0}function Ue(e,t){const r=Array.isArray(t)?t:En(t)?[t]:No(t),n=r.length===1?e:$h(e,r),s=r.length-1,o=r[s];return n&&delete n[o],s!==0&&(Be(n)&&Ke(n)||Array.isArray(n)&&Sh(n))&&Ue(e,r.slice(0,-1)),e}var Eh=e=>{for(const t in e)if(ft(e[t]))return!0;return!1};function Li(e){return Array.isArray(e)||Be(e)&&!Eh(e)}function Mo(e,t={}){for(const r in e){const n=e[r];Li(n)?(t[r]=Array.isArray(n)?[]:{},Mo(n,t[r])):Fe(n)||(t[r]=!0)}return t}function vr(e,t,r){r||(r=Mo(t));for(const n in e){const s=e[n];if(Li(s))Fe(t)||Po(r[n])?r[n]=Mo(s,Array.isArray(s)?[]:{}):vr(s,et(t)?{}:t[n],r[n]);else{const o=t[n];r[n]=!dt(s,o)}}return r}const zi={value:!1,isValid:!1},qi={value:!0,isValid:!0};var Ui=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Fe(e[0].attributes.value)?Fe(e[0].value)||e[0].value===""?qi:{value:e[0].value,isValid:!0}:qi:zi}return zi},Bi=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Fe(e)?e:t?e===""?NaN:e&&+e:r&&st(e)?new Date(e):n?n(e):e;const Wi={isValid:!1,value:null};var Hi=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Wi):Wi;function Gi(e){const t=e.ref;return Oo(t)?t.files:Io(t)?Hi(e.refs).value:Fi(t)?[...t.selectedOptions].map(({value:r})=>r):en(t)?Ui(e.refs).value:Bi(Fe(t.value)?e.ref.value:t.value,e)}var kh=(e,t,r,n)=>{const s={};for(const o of e){const a=te(t,o);a&&Ie(s,o,a._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},Rn=e=>e instanceof RegExp,rn=e=>Fe(e)?e:Rn(e)?e.source:Be(e)?Rn(e.value)?e.value.source:e.value:e,yr=e=>({isOnSubmit:!e||e===lt.onSubmit,isOnBlur:e===lt.onBlur,isOnChange:e===lt.onChange,isOnAll:e===lt.all,isOnTouch:e===lt.onTouched});const Zi="AsyncFunction";var Ch=e=>!!e&&!!e.validate&&!!(ft(e.validate)&&e.validate.constructor.name===Zi||Be(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Zi)),jh=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Vo=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const br=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const o=te(e,s);if(o){const{_f:a,...i}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],s)&&!n)return!0;if(a.ref&&t(a.ref,a.name)&&!n)return!0;if(br(i,t))break}else if(Be(i)&&br(i,t))break}}};function Ki(e,t,r){const n=te(e,r);if(n||En(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const o=s.join("."),a=te(t,o),i=te(e,o);if(a&&!Array.isArray(a)&&r!==o)return{name:r};if(i&&i.type)return{name:o,error:i};if(i&&i.root&&i.root.type)return{name:`${o}.root`,error:i.root};s.pop()}return{name:r}}var Nh=(e,t,r,n)=>{r(e);const{name:s,...o}=e;return Ke(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!n||lt.all))},Rh=(e,t,r)=>!e||!t||e===t||tt(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Ah=(e,t,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(t||e):(r?n.isOnBlur:s.isOnBlur)?!e:(r?n.isOnChange:s.isOnChange)?e:!0,Ph=(e,t)=>!kn(te(e,t)).length&&Ue(e,t),Yi=(e,t,r)=>{const n=tt(te(e,r));return Ie(n,"root",t[r]),Ie(e,r,n),e};function Ji(e,t,r="validate"){if(st(e)||Array.isArray(e)&&e.every(st)||nt(e)&&!e)return{type:r,message:st(e)?e:"",ref:t}}var _r=e=>Be(e)&&!Rn(e)?e:{value:e,message:""},Fo=async(e,t,r,n,s,o)=>{const{ref:a,refs:i,required:c,maxLength:l,minLength:u,min:h,max:p,pattern:v,validate:w,name:y,valueAsNumber:m,mount:_}=e._f,f=te(r,y);if(!_||t.has(y))return{};const b=i?i[0]:a,x=V=>{s&&b.reportValidity&&(b.setCustomValidity(nt(V)?"":V||""),b.reportValidity())},g={},$=Io(a),E=en(a),j=$||E,I=(m||Oo(a))&&Fe(a.value)&&Fe(f)||Nn(a)&&a.value===""||f===""||Array.isArray(f)&&!f.length,U=To.bind(null,y,n,g),D=(V,q,W,ee=Rt.maxLength,K=Rt.minLength)=>{const se=V?q:W;g[y]={type:V?ee:K,message:se,ref:a,...U(V?ee:K,se)}};if(o?!Array.isArray(f)||!f.length:c&&(!j&&(I||et(f))||nt(f)&&!f||E&&!Ui(i).isValid||$&&!Hi(i).isValid)){const{value:V,message:q}=st(c)?{value:!!c,message:c}:_r(c);if(V&&(g[y]={type:Rt.required,message:q,ref:b,...U(Rt.required,q)},!n))return x(q),g}if(!I&&(!et(h)||!et(p))){let V,q;const W=_r(p),ee=_r(h);if(!et(f)&&!isNaN(f)){const K=a.valueAsNumber||f&&+f;et(W.value)||(V=K>W.value),et(ee.value)||(q=K<ee.value)}else{const K=a.valueAsDate||new Date(f),se=H=>new Date(new Date().toDateString()+" "+H),L=a.type=="time",he=a.type=="week";st(W.value)&&f&&(V=L?se(f)>se(W.value):he?f>W.value:K>new Date(W.value)),st(ee.value)&&f&&(q=L?se(f)<se(ee.value):he?f<ee.value:K<new Date(ee.value))}if((V||q)&&(D(!!V,W.message,ee.message,Rt.max,Rt.min),!n))return x(g[y].message),g}if((l||u)&&!I&&(st(f)||o&&Array.isArray(f))){const V=_r(l),q=_r(u),W=!et(V.value)&&f.length>+V.value,ee=!et(q.value)&&f.length<+q.value;if((W||ee)&&(D(W,V.message,q.message),!n))return x(g[y].message),g}if(v&&!I&&st(f)){const{value:V,message:q}=_r(v);if(Rn(V)&&!f.match(V)&&(g[y]={type:Rt.pattern,message:q,ref:a,...U(Rt.pattern,q)},!n))return x(q),g}if(w){if(ft(w)){const V=await w(f,r),q=Ji(V,b);if(q&&(g[y]={...q,...U(Rt.validate,q.message)},!n))return x(q.message),g}else if(Be(w)){let V={};for(const q in w){if(!Ke(V)&&!n)break;const W=Ji(await w[q](f,r),b,q);W&&(V={...W,...U(q,W.message)},x(W.message),n&&(g[y]=V))}if(!Ke(V)&&(g[y]={ref:b,...V},!n))return g}}return x(!0),g};const Th={mode:lt.onSubmit,reValidateMode:lt.onChange,shouldFocusError:!0};function Oh(e={}){let t={...Th,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:ft(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},s=Be(t.defaultValues)||Be(t.values)?Le(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:Le(s),a={action:!1,mount:!1,watch:!1},i={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...u};const p={array:Mi(),state:Mi()},v=t.criteriaMode===lt.all,w=R=>O=>{clearTimeout(l),l=setTimeout(R,O)},y=async R=>{if(!t.disabled&&(u.isValid||h.isValid||R)){const O=t.resolver?Ke((await E()).errors):await I(n,!0);O!==r.isValid&&p.state.next({isValid:O})}},m=(R,O)=>{!t.disabled&&(u.isValidating||u.validatingFields||h.isValidating||h.validatingFields)&&((R||Array.from(i.mount)).forEach(B=>{B&&(O?Ie(r.validatingFields,B,O):Ue(r.validatingFields,B))}),p.state.next({validatingFields:r.validatingFields,isValidating:!Ke(r.validatingFields)}))},_=(R,O=[],B,re,ne=!0,X=!0)=>{if(re&&B&&!t.disabled){if(a.action=!0,X&&Array.isArray(te(n,R))){const me=B(te(n,R),re.argA,re.argB);ne&&Ie(n,R,me)}if(X&&Array.isArray(te(r.errors,R))){const me=B(te(r.errors,R),re.argA,re.argB);ne&&Ie(r.errors,R,me),Ph(r.errors,R)}if((u.touchedFields||h.touchedFields)&&X&&Array.isArray(te(r.touchedFields,R))){const me=B(te(r.touchedFields,R),re.argA,re.argB);ne&&Ie(r.touchedFields,R,me)}(u.dirtyFields||h.dirtyFields)&&(r.dirtyFields=vr(s,o)),p.state.next({name:R,isDirty:D(R,O),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ie(o,R,O)},f=(R,O)=>{Ie(r.errors,R,O),p.state.next({errors:r.errors})},b=R=>{r.errors=R,p.state.next({errors:r.errors,isValid:!1})},x=(R,O,B,re)=>{const ne=te(n,R);if(ne){const X=te(o,R,Fe(B)?te(s,R):B);Fe(X)||re&&re.defaultChecked||O?Ie(o,R,O?X:Gi(ne._f)):W(R,X),a.mount&&!a.action&&y()}},g=(R,O,B,re,ne)=>{let X=!1,me=!1;const Pe={name:R};if(!t.disabled){if(!B||re){(u.isDirty||h.isDirty)&&(me=r.isDirty,r.isDirty=Pe.isDirty=D(),X=me!==Pe.isDirty);const Ve=dt(te(s,R),O);me=!!te(r.dirtyFields,R),Ve?Ue(r.dirtyFields,R):Ie(r.dirtyFields,R,!0),Pe.dirtyFields=r.dirtyFields,X=X||(u.dirtyFields||h.dirtyFields)&&me!==!Ve}if(B){const Ve=te(r.touchedFields,R);Ve||(Ie(r.touchedFields,R,B),Pe.touchedFields=r.touchedFields,X=X||(u.touchedFields||h.touchedFields)&&Ve!==B)}X&&ne&&p.state.next(Pe)}return X?Pe:{}},$=(R,O,B,re)=>{const ne=te(r.errors,R),X=(u.isValid||h.isValid)&&nt(O)&&r.isValid!==O;if(t.delayError&&B?(c=w(()=>f(R,B)),c(t.delayError)):(clearTimeout(l),c=null,B?Ie(r.errors,R,B):Ue(r.errors,R)),(B?!dt(ne,B):ne)||!Ke(re)||X){const me={...re,...X&&nt(O)?{isValid:O}:{},errors:r.errors,name:R};r={...r,...me},p.state.next(me)}},E=async R=>{m(R,!0);const O=await t.resolver(o,t.context,kh(R||i.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return m(R),O},j=async R=>{const{errors:O}=await E(R);if(R)for(const B of R){const re=te(O,B);re?Ie(r.errors,B,re):Ue(r.errors,B)}else r.errors=O;return O},I=async(R,O,B={valid:!0})=>{for(const re in R){const ne=R[re];if(ne){const{_f:X,...me}=ne;if(X){const Pe=i.array.has(X.name),Ve=ne._f&&Ch(ne._f);Ve&&u.validatingFields&&m([X.name],!0);const Qe=await Fo(ne,i.disabled,o,v,t.shouldUseNativeValidation&&!O,Pe);if(Ve&&u.validatingFields&&m([X.name]),Qe[X.name]&&(B.valid=!1,O))break;!O&&(te(Qe,X.name)?Pe?Yi(r.errors,Qe,X.name):Ie(r.errors,X.name,Qe[X.name]):Ue(r.errors,X.name))}!Ke(me)&&await I(me,O,B)}}return B.valid},U=()=>{for(const R of i.unMount){const O=te(n,R);O&&(O._f.refs?O._f.refs.every(B=>!Do(B)):!Do(O._f.ref))&&F(R)}i.unMount=new Set},D=(R,O)=>!t.disabled&&(R&&O&&Ie(o,R,O),!dt(H(),s)),V=(R,O,B)=>Ao(R,i,{...a.mount?o:Fe(O)?s:st(R)?{[R]:O}:O},B,O),q=R=>kn(te(a.mount?o:s,R,t.shouldUnregister?te(s,R,[]):[])),W=(R,O,B={})=>{const re=te(n,R);let ne=O;if(re){const X=re._f;X&&(!X.disabled&&Ie(o,R,Bi(O,X)),ne=Nn(X.ref)&&et(O)?"":O,Fi(X.ref)?[...X.ref.options].forEach(me=>me.selected=ne.includes(me.value)):X.refs?en(X.ref)?X.refs.forEach(me=>{(!me.defaultChecked||!me.disabled)&&(Array.isArray(ne)?me.checked=!!ne.find(Pe=>Pe===me.value):me.checked=ne===me.value||!!ne)}):X.refs.forEach(me=>me.checked=me.value===ne):Oo(X.ref)?X.ref.value="":(X.ref.value=ne,X.ref.type||p.state.next({name:R,values:Le(o)})))}(B.shouldDirty||B.shouldTouch)&&g(R,ne,B.shouldTouch,B.shouldDirty,!0),B.shouldValidate&&he(R)},ee=(R,O,B)=>{for(const re in O){if(!O.hasOwnProperty(re))return;const ne=O[re],X=R+"."+re,me=te(n,X);(i.array.has(R)||Be(ne)||me&&!me._f)&&!ar(ne)?ee(X,ne,B):W(X,ne,B)}},K=(R,O,B={})=>{const re=te(n,R),ne=i.array.has(R),X=Le(O);Ie(o,R,X),ne?(p.array.next({name:R,values:Le(o)}),(u.isDirty||u.dirtyFields||h.isDirty||h.dirtyFields)&&B.shouldDirty&&p.state.next({name:R,dirtyFields:vr(s,o),isDirty:D(R,X)})):re&&!re._f&&!et(X)?ee(R,X,B):W(R,X,B),Vo(R,i)&&p.state.next({...r,name:R}),p.state.next({name:a.mount?R:void 0,values:Le(o)})},se=async R=>{a.mount=!0;const O=R.target;let B=O.name,re=!0;const ne=te(n,B),X=Ve=>{re=Number.isNaN(Ve)||ar(Ve)&&isNaN(Ve.getTime())||dt(Ve,te(o,B,Ve))},me=yr(t.mode),Pe=yr(t.reValidateMode);if(ne){let Ve,Qe;const Jr=O.type?Gi(ne._f):Ti(R),or=R.type===Cn.BLUR||R.type===Cn.FOCUS_OUT,o$=!jh(ne._f)&&!t.resolver&&!te(r.errors,B)&&!ne._f.deps||Ah(or,te(r.touchedFields,B),r.isSubmitted,Pe,me),Si=Vo(B,i,or);Ie(o,B,Jr),or?(!O||!O.readOnly)&&(ne._f.onBlur&&ne._f.onBlur(R),c&&c(0)):ne._f.onChange&&ne._f.onChange(R);const Ei=g(B,Jr,or),a$=!Ke(Ei)||Si;if(!or&&p.state.next({name:B,type:R.type,values:Le(o)}),o$)return(u.isValid||h.isValid)&&(t.mode==="onBlur"?or&&y():or||y()),a$&&p.state.next({name:B,...Si?{}:Ei});if(!or&&Si&&p.state.next({...r}),t.resolver){const{errors:mh}=await E([B]);if(X(Jr),re){const i$=Ki(r.errors,n,B),hh=Ki(mh,n,i$.name||B);Ve=hh.error,B=hh.name,Qe=Ke(mh)}}else m([B],!0),Ve=(await Fo(ne,i.disabled,o,v,t.shouldUseNativeValidation))[B],m([B]),X(Jr),re&&(Ve?Qe=!1:(u.isValid||h.isValid)&&(Qe=await I(n,!0)));re&&(ne._f.deps&&(!Array.isArray(ne._f.deps)||ne._f.deps.length>0)&&he(ne._f.deps),$(B,Qe,Ve,Ei))}},L=(R,O)=>{if(te(r.errors,O)&&R.focus)return R.focus(),1},he=async(R,O={})=>{let B,re;const ne=tt(R);if(t.resolver){const X=await j(Fe(R)?R:ne);B=Ke(X),re=R?!ne.some(me=>te(X,me)):B}else R?(re=(await Promise.all(ne.map(async X=>{const me=te(n,X);return await I(me&&me._f?{[X]:me}:me)}))).every(Boolean),!(!re&&!r.isValid)&&y()):re=B=await I(n);return p.state.next({...!st(R)||(u.isValid||h.isValid)&&B!==r.isValid?{}:{name:R},...t.resolver||!R?{isValid:B}:{},errors:r.errors}),O.shouldFocus&&!re&&br(n,L,R?ne:i.mount),re},H=(R,O)=>{let B={...a.mount?o:s};return O&&(B=Vi(O.dirtyFields?r.dirtyFields:r.touchedFields,B)),Fe(R)?B:st(R)?te(B,R):R.map(re=>te(B,re))},C=(R,O)=>({invalid:!!te((O||r).errors,R),isDirty:!!te((O||r).dirtyFields,R),error:te((O||r).errors,R),isValidating:!!te(r.validatingFields,R),isTouched:!!te((O||r).touchedFields,R)}),M=R=>{R&&tt(R).forEach(O=>Ue(r.errors,O)),p.state.next({errors:R?r.errors:{}})},P=(R,O,B)=>{const re=(te(n,R,{_f:{}})._f||{}).ref,ne=te(r.errors,R)||{},{ref:X,message:me,type:Pe,...Ve}=ne;Ie(r.errors,R,{...Ve,...O,ref:re}),p.state.next({name:R,errors:r.errors,isValid:!1}),B&&B.shouldFocus&&re&&re.focus&&re.focus()},k=(R,O)=>ft(R)?p.state.subscribe({next:B=>"values"in B&&R(V(void 0,O),B)}):V(R,O,!0),N=R=>p.state.subscribe({next:O=>{Rh(R.name,O.name,R.exact)&&Nh(O,R.formState||u,ze,R.reRenderRoot)&&R.callback({values:{...o},...r,...O,defaultValues:s})}}).unsubscribe,z=R=>(a.mount=!0,h={...h,...R.formState},N({...R,formState:h})),F=(R,O={})=>{for(const B of R?tt(R):i.mount)i.mount.delete(B),i.array.delete(B),O.keepValue||(Ue(n,B),Ue(o,B)),!O.keepError&&Ue(r.errors,B),!O.keepDirty&&Ue(r.dirtyFields,B),!O.keepTouched&&Ue(r.touchedFields,B),!O.keepIsValidating&&Ue(r.validatingFields,B),!t.shouldUnregister&&!O.keepDefaultValue&&Ue(s,B);p.state.next({values:Le(o)}),p.state.next({...r,...O.keepDirty?{isDirty:D()}:{}}),!O.keepIsValid&&y()},Y=({disabled:R,name:O})=>{(nt(R)&&a.mount||R||i.disabled.has(O))&&(R?i.disabled.add(O):i.disabled.delete(O))},de=(R,O={})=>{let B=te(n,R);const re=nt(O.disabled)||nt(t.disabled);return Ie(n,R,{...B||{},_f:{...B&&B._f?B._f:{ref:{name:R}},name:R,mount:!0,...O}}),i.mount.add(R),B?Y({disabled:nt(O.disabled)?O.disabled:t.disabled,name:R}):x(R,!0,O.value),{...re?{disabled:O.disabled||t.disabled}:{},...t.progressive?{required:!!O.required,min:rn(O.min),max:rn(O.max),minLength:rn(O.minLength),maxLength:rn(O.maxLength),pattern:rn(O.pattern)}:{},name:R,onChange:se,onBlur:se,ref:ne=>{if(ne){de(R,O),B=te(n,R);const X=Fe(ne.value)&&ne.querySelectorAll&&ne.querySelectorAll("input,select,textarea")[0]||ne,me=wh(X),Pe=B._f.refs||[];if(me?Pe.find(Ve=>Ve===X):X===B._f.ref)return;Ie(n,R,{_f:{...B._f,...me?{refs:[...Pe.filter(Do),X,...Array.isArray(te(s,R))?[{}]:[]],ref:{type:X.type,name:R}}:{ref:X}}}),x(R,!1,void 0,X)}else B=te(n,R,{}),B._f&&(B._f.mount=!1),(t.shouldUnregister||O.shouldUnregister)&&!(Oi(i.array,R)&&a.action)&&i.unMount.add(R)}}},oe=()=>t.shouldFocusError&&br(n,L,i.mount),A=R=>{nt(R)&&(p.state.next({disabled:R}),br(n,(O,B)=>{const re=te(n,B);re&&(O.disabled=re._f.disabled||R,Array.isArray(re._f.refs)&&re._f.refs.forEach(ne=>{ne.disabled=re._f.disabled||R}))},0,!1))},T=(R,O)=>async B=>{let re;B&&(B.preventDefault&&B.preventDefault(),B.persist&&B.persist());let ne=Le(o);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:X,values:me}=await E();r.errors=X,ne=Le(me)}else await I(n);if(i.disabled.size)for(const X of i.disabled)Ue(ne,X);if(Ue(r.errors,"root"),Ke(r.errors)){p.state.next({errors:{}});try{await R(ne,B)}catch(X){re=X}}else O&&await O({...r.errors},B),oe(),setTimeout(oe);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ke(r.errors)&&!re,submitCount:r.submitCount+1,errors:r.errors}),re)throw re},G=(R,O={})=>{te(n,R)&&(Fe(O.defaultValue)?K(R,Le(te(s,R))):(K(R,O.defaultValue),Ie(s,R,Le(O.defaultValue))),O.keepTouched||Ue(r.touchedFields,R),O.keepDirty||(Ue(r.dirtyFields,R),r.isDirty=O.defaultValue?D(R,Le(te(s,R))):D()),O.keepError||(Ue(r.errors,R),u.isValid&&y()),p.state.next({...r}))},J=(R,O={})=>{const B=R?Le(R):s,re=Le(B),ne=Ke(R),X=ne?s:re;if(O.keepDefaultValues||(s=B),!O.keepValues){if(O.keepDirtyValues){const me=new Set([...i.mount,...Object.keys(vr(s,o))]);for(const Pe of Array.from(me))te(r.dirtyFields,Pe)?Ie(X,Pe,te(o,Pe)):K(Pe,te(X,Pe))}else{if(jo&&Fe(R))for(const me of i.mount){const Pe=te(n,me);if(Pe&&Pe._f){const Ve=Array.isArray(Pe._f.refs)?Pe._f.refs[0]:Pe._f.ref;if(Nn(Ve)){const Qe=Ve.closest("form");if(Qe){Qe.reset();break}}}}if(O.keepFieldsRef)for(const me of i.mount)K(me,te(X,me));else n={}}o=t.shouldUnregister?O.keepDefaultValues?Le(s):{}:Le(X),p.array.next({values:{...X}}),p.state.next({values:{...X}})}i={mount:O.keepDirtyValues?i.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!u.isValid||!!O.keepIsValid||!!O.keepDirtyValues||!t.shouldUnregister&&!Ke(X),a.watch=!!t.shouldUnregister,p.state.next({submitCount:O.keepSubmitCount?r.submitCount:0,isDirty:ne?!1:O.keepDirty?r.isDirty:!!(O.keepDefaultValues&&!dt(R,s)),isSubmitted:O.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:ne?{}:O.keepDirtyValues?O.keepDefaultValues&&o?vr(s,o):r.dirtyFields:O.keepDefaultValues&&R?vr(s,R):O.keepDirty?r.dirtyFields:{},touchedFields:O.keepTouched?r.touchedFields:{},errors:O.keepErrors?r.errors:{},isSubmitSuccessful:O.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:s})},ie=(R,O)=>J(ft(R)?R(o):R,O),ge=(R,O={})=>{const B=te(n,R),re=B&&B._f;if(re){const ne=re.refs?re.refs[0]:re.ref;ne.focus&&(ne.focus(),O.shouldSelect&&ft(ne.select)&&ne.select())}},ze=R=>{r={...r,...R}},qe={control:{register:de,unregister:F,getFieldState:C,handleSubmit:T,setError:P,_subscribe:N,_runSchema:E,_focusError:oe,_getWatch:V,_getDirty:D,_setValid:y,_setFieldArray:_,_setDisabledField:Y,_setErrors:b,_getFieldArray:q,_reset:J,_resetDefaultValues:()=>ft(t.defaultValues)&&t.defaultValues().then(R=>{ie(R,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:U,_disableForm:A,_subjects:p,_proxyFormState:u,get _fields(){return n},get _formValues(){return o},get _state(){return a},set _state(R){a=R},get _defaultValues(){return s},get _names(){return i},set _names(R){i=R},get _formState(){return r},get _options(){return t},set _options(R){t={...t,...R}}},subscribe:z,trigger:he,register:de,handleSubmit:T,watch:k,setValue:K,getValues:H,reset:ie,resetField:G,clearErrors:M,unregister:F,setError:P,setFocus:ge,getFieldState:C};return{...qe,formControl:qe}}var Ut=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Lo=(e,t,r={})=>r.shouldFocus||Fe(r.shouldFocus)?r.focusName||`${e}.${Fe(r.focusIndex)?t:r.focusIndex}.`:"",zo=(e,t)=>[...e,...tt(t)],qo=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Uo(e,t,r){return[...e.slice(0,t),...tt(r),...e.slice(t)]}var Bo=(e,t,r)=>Array.isArray(e)?(Fe(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Wo=(e,t)=>[...tt(t),...tt(e)];function Ih(e,t){let r=0;const n=[...e];for(const s of t)n.splice(s-r,1),r++;return kn(n).length?n:[]}var Ho=(e,t)=>Fe(t)?[]:Ih(e,tt(t).sort((r,n)=>r-n)),Go=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Xi=(e,t,r)=>(e[t]=r,e);function Qi(e){const t=Ze(),{control:r=t.control,name:n,keyName:s="id",shouldUnregister:o,rules:a}=e,[i,c]=Z.useState(r._getFieldArray(n)),l=Z.useRef(r._getFieldArray(n).map(Ut)),u=Z.useRef(!1);r._names.array.add(n),Z.useMemo(()=>a&&i.length>=0&&r.register(n,a),[r,n,i.length,a]),jn(()=>r._subjects.array.subscribe({next:({values:x,name:g})=>{if(g===n||!g){const $=te(x,n);Array.isArray($)&&(c($),l.current=$.map(Ut))}}}).unsubscribe,[r,n]);const h=Z.useCallback(x=>{u.current=!0,r._setFieldArray(n,x)},[r,n]),p=(x,g)=>{const $=tt(Le(x)),E=zo(r._getFieldArray(n),$);r._names.focus=Lo(n,E.length-1,g),l.current=zo(l.current,$.map(Ut)),h(E),c(E),r._setFieldArray(n,E,zo,{argA:qo(x)})},v=(x,g)=>{const $=tt(Le(x)),E=Wo(r._getFieldArray(n),$);r._names.focus=Lo(n,0,g),l.current=Wo(l.current,$.map(Ut)),h(E),c(E),r._setFieldArray(n,E,Wo,{argA:qo(x)})},w=x=>{const g=Ho(r._getFieldArray(n),x);l.current=Ho(l.current,x),h(g),c(g),!Array.isArray(te(r._fields,n))&&Ie(r._fields,n,void 0),r._setFieldArray(n,g,Ho,{argA:x})},y=(x,g,$)=>{const E=tt(Le(g)),j=Uo(r._getFieldArray(n),x,E);r._names.focus=Lo(n,x,$),l.current=Uo(l.current,x,E.map(Ut)),h(j),c(j),r._setFieldArray(n,j,Uo,{argA:x,argB:qo(g)})},m=(x,g)=>{const $=r._getFieldArray(n);Go($,x,g),Go(l.current,x,g),h($),c($),r._setFieldArray(n,$,Go,{argA:x,argB:g},!1)},_=(x,g)=>{const $=r._getFieldArray(n);Bo($,x,g),Bo(l.current,x,g),h($),c($),r._setFieldArray(n,$,Bo,{argA:x,argB:g},!1)},f=(x,g)=>{const $=Le(g),E=Xi(r._getFieldArray(n),x,$);l.current=[...E].map((j,I)=>!j||I===x?Ut():l.current[I]),h(E),c([...E]),r._setFieldArray(n,E,Xi,{argA:x,argB:$},!0,!1)},b=x=>{const g=tt(Le(x));l.current=g.map(Ut),h([...g]),c([...g]),r._setFieldArray(n,[...g],$=>$,{},!0,!1)};return Z.useEffect(()=>{if(r._state.action=!1,Vo(n,r._names)&&r._subjects.state.next({...r._formState}),u.current&&(!yr(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!yr(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then(x=>{const g=te(x.errors,n),$=te(r._formState.errors,n);($?!g&&$.type||g&&($.type!==g.type||$.message!==g.message):g&&g.type)&&(g?Ie(r._formState.errors,n,g):Ue(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const x=te(r._fields,n);x&&x._f&&!(yr(r._options.reValidateMode).isOnSubmit&&yr(r._options.mode).isOnSubmit)&&Fo(x,r._names.disabled,r._formValues,r._options.criteriaMode===lt.all,r._options.shouldUseNativeValidation,!0).then(g=>!Ke(g)&&r._subjects.state.next({errors:Yi(r._formState.errors,g,n)}))}r._subjects.state.next({name:n,values:Le(r._formValues)}),r._names.focus&&br(r._fields,(x,g)=>{if(r._names.focus&&g.startsWith(r._names.focus)&&x.focus)return x.focus(),1}),r._names.focus="",r._setValid(),u.current=!1},[i,n,r]),Z.useEffect(()=>(!te(r._formValues,n)&&r._setFieldArray(n),()=>{const x=(g,$)=>{const E=te(r._fields,g);E&&E._f&&(E._f.mount=$)};r._options.shouldUnregister||o?r.unregister(n):x(n,!1)}),[n,r,s,o]),{swap:Z.useCallback(m,[h,n,r]),move:Z.useCallback(_,[h,n,r]),prepend:Z.useCallback(v,[h,n,r]),append:Z.useCallback(p,[h,n,r]),remove:Z.useCallback(w,[h,n,r]),insert:Z.useCallback(y,[h,n,r]),update:Z.useCallback(f,[h,n,r]),replace:Z.useCallback(b,[h,n,r]),fields:Z.useMemo(()=>i.map((x,g)=>({...x,[s]:l.current[g]||Ut()})),[i,s])}}function Dh(e={}){const t=Z.useRef(void 0),r=Z.useRef(void 0),[n,s]=Z.useState({isDirty:!1,isValidating:!1,isLoading:ft(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:ft(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!ft(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...i}=Oh(e);t.current={...i,formState:n}}const o=t.current.control;return o._options=e,jn(()=>{const a=o._subscribe({formState:o._proxyFormState,callback:()=>s({...o._formState}),reRenderRoot:!0});return s(i=>({...i,isReady:!0})),o._formState.isReady=!0,a},[o]),Z.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Z.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),Z.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),Z.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),Z.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==n.isDirty&&o._subjects.state.next({isDirty:a})}},[o,n.isDirty]),Z.useEffect(()=>{var a;e.values&&!dt(e.values,r.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((a=o._options.resetOptions)===null||a===void 0)&&a.keepIsValid||o._setValid(),r.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[o,e.values]),Z.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=Ii(n,o),t.current}const Mh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let nn=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Mh[r[e]&63];return t};function ec(e,[t,r]){return Math.min(r,Math.max(t,e))}function be(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 Vh(e,t){const r=S.createContext(t),n=o=>{const{children:a,...i}=o,c=S.useMemo(()=>i,Object.values(i));return d.jsx(r.Provider,{value:c,children:a})};n.displayName=e+"Provider";function s(o){const a=S.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[n,s]}function xt(e,t=[]){let r=[];function n(o,a){const i=S.createContext(a),c=r.length;r=[...r,a];const l=h=>{var _;const{scope:p,children:v,...w}=h,y=((_=p==null?void 0:p[e])==null?void 0:_[c])||i,m=S.useMemo(()=>w,Object.values(w));return d.jsx(y.Provider,{value:m,children:v})};l.displayName=o+"Provider";function u(h,p){var y;const v=((y=p==null?void 0:p[e])==null?void 0:y[c])||i,w=S.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[l,u]}const s=()=>{const o=r.map(a=>S.createContext(a));return function(i){const c=(i==null?void 0:i[e])||o;return S.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return s.scopeName=e,[n,Fh(s,...t)]}function Fh(...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(o){const a=n.reduce((i,{useScope:c,scopeName:l})=>{const h=c(o)[`__scope${l}`];return{...i,...h}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function tc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xr(...e){return t=>{let r=!1;const n=e.map(s=>{const o=tc(s,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<n.length;s++){const o=n[s];typeof o=="function"?o():tc(e[s],null)}}}}function De(...e){return S.useCallback(xr(...e),e)}function rc(e){const t=Lh(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(qh);if(c){const l=c.props.children,u=i.map(h=>h===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:h);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function Lh(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=Bh(s),i=Uh(o,s.props);return s.type!==S.Fragment&&(i.ref=n?xr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zh=Symbol("radix.slottable");function qh(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zh}function Uh(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function Bh(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)}function nc(e){const t=e+"CollectionProvider",[r,n]=xt(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:m,children:_}=y,f=Z.useRef(null),b=Z.useRef(new Map).current;return d.jsx(s,{scope:m,itemMap:b,collectionRef:f,children:_})};a.displayName=t;const i=e+"CollectionSlot",c=rc(i),l=Z.forwardRef((y,m)=>{const{scope:_,children:f}=y,b=o(i,_),x=De(m,b.collectionRef);return d.jsx(c,{ref:x,children:f})});l.displayName=i;const u=e+"CollectionItemSlot",h="data-radix-collection-item",p=rc(u),v=Z.forwardRef((y,m)=>{const{scope:_,children:f,...b}=y,x=Z.useRef(null),g=De(m,x),$=o(u,_);return Z.useEffect(()=>($.itemMap.set(x,{ref:x,...b}),()=>void $.itemMap.delete(x))),d.jsx(p,{[h]:"",ref:g,children:f})});v.displayName=u;function w(y){const m=o(e+"CollectionConsumer",y);return Z.useCallback(()=>{const f=m.collectionRef.current;if(!f)return[];const b=Array.from(f.querySelectorAll(`[${h}]`));return Array.from(m.itemMap.values()).sort(($,E)=>b.indexOf($.ref.current)-b.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:l,ItemSlot:v},w,n]}var Wh=S.createContext(void 0);function Zo(e){const t=S.useContext(Wh);return e||t||"ltr"}function Hh(e){const t=Gh(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(Kh);if(c){const l=c.props.children,u=i.map(h=>h===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:h);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function Gh(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=Jh(s),i=Yh(o,s.props);return s.type!==S.Fragment&&(i.ref=n?xr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Zh=Symbol("radix.slottable");function Kh(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Zh}function Yh(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function Jh(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 Xh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],je=Xh.reduce((e,t)=>{const r=Hh(`Primitive.${t}`),n=S.forwardRef((s,o)=>{const{asChild:a,...i}=s,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Qh(e,t){e&&$n.flushSync(()=>e.dispatchEvent(t))}function Bt(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function ep(e,t=globalThis==null?void 0:globalThis.document){const r=Bt(e);S.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var tp="DismissableLayer",Ko="dismissableLayer.update",rp="dismissableLayer.pointerDownOutside",np="dismissableLayer.focusOutside",sc,oc=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),An=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:i,...c}=e,l=S.useContext(oc),[u,h]=S.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=S.useState({}),w=De(t,E=>h(E)),y=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=y.indexOf(m),f=u?y.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,x=f>=_,g=ap(E=>{const j=E.target,I=[...l.branches].some(U=>U.contains(j));!x||I||(s==null||s(E),a==null||a(E),E.defaultPrevented||i==null||i())},p),$=ip(E=>{const j=E.target;[...l.branches].some(U=>U.contains(j))||(o==null||o(E),a==null||a(E),E.defaultPrevented||i==null||i())},p);return ep(E=>{f===l.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},p),S.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(sc=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),ac(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=sc)}},[u,p,r,l]),S.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),ac())},[u,l]),S.useEffect(()=>{const E=()=>v({});return document.addEventListener(Ko,E),()=>document.removeEventListener(Ko,E)},[]),d.jsx(je.div,{...c,ref:w,style:{pointerEvents:b?x?"auto":"none":void 0,...e.style},onFocusCapture:be(e.onFocusCapture,$.onFocusCapture),onBlurCapture:be(e.onBlurCapture,$.onBlurCapture),onPointerDownCapture:be(e.onPointerDownCapture,g.onPointerDownCapture)})});An.displayName=tp;var sp="DismissableLayerBranch",op=S.forwardRef((e,t)=>{const r=S.useContext(oc),n=S.useRef(null),s=De(t,n);return S.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),d.jsx(je.div,{...e,ref:s})});op.displayName=sp;function ap(e,t=globalThis==null?void 0:globalThis.document){const r=Bt(e),n=S.useRef(!1),s=S.useRef(()=>{});return S.useEffect(()=>{const o=i=>{if(i.target&&!n.current){let c=function(){ic(rp,r,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function ip(e,t=globalThis==null?void 0:globalThis.document){const r=Bt(e),n=S.useRef(!1);return S.useEffect(()=>{const s=o=>{o.target&&!n.current&&ic(np,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ac(){const e=new CustomEvent(Ko);document.dispatchEvent(e)}function ic(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Qh(s,o):s.dispatchEvent(o)}var Yo=0;function cc(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lc()),document.body.insertAdjacentElement("beforeend",e[1]??lc()),Yo++,()=>{Yo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Yo--}},[])}function lc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Jo="focusScope.autoFocusOnMount",Xo="focusScope.autoFocusOnUnmount",uc={bubbles:!1,cancelable:!0},cp="FocusScope",Qo=S.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...a}=e,[i,c]=S.useState(null),l=Bt(s),u=Bt(o),h=S.useRef(null),p=De(t,y=>c(y)),v=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(n){let y=function(b){if(v.paused||!i)return;const x=b.target;i.contains(x)?h.current=x:Wt(h.current,{select:!0})},m=function(b){if(v.paused||!i)return;const x=b.relatedTarget;x!==null&&(i.contains(x)||Wt(h.current,{select:!0}))},_=function(b){if(document.activeElement===document.body)for(const g of b)g.removedNodes.length>0&&Wt(i)};document.addEventListener("focusin",y),document.addEventListener("focusout",m);const f=new MutationObserver(_);return i&&f.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",m),f.disconnect()}}},[n,i,v.paused]),S.useEffect(()=>{if(i){mc.add(v);const y=document.activeElement;if(!i.contains(y)){const _=new CustomEvent(Jo,uc);i.addEventListener(Jo,l),i.dispatchEvent(_),_.defaultPrevented||(lp(hp(dc(i)),{select:!0}),document.activeElement===y&&Wt(i))}return()=>{i.removeEventListener(Jo,l),setTimeout(()=>{const _=new CustomEvent(Xo,uc);i.addEventListener(Xo,u),i.dispatchEvent(_),_.defaultPrevented||Wt(y??document.body,{select:!0}),i.removeEventListener(Xo,u),mc.remove(v)},0)}}},[i,l,u,v]);const w=S.useCallback(y=>{if(!r&&!n||v.paused)return;const m=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,_=document.activeElement;if(m&&_){const f=y.currentTarget,[b,x]=up(f);b&&x?!y.shiftKey&&_===x?(y.preventDefault(),r&&Wt(b,{select:!0})):y.shiftKey&&_===b&&(y.preventDefault(),r&&Wt(x,{select:!0})):_===f&&y.preventDefault()}},[r,n,v.paused]);return d.jsx(je.div,{tabIndex:-1,...a,ref:p,onKeyDown:w})});Qo.displayName=cp;function lp(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Wt(n,{select:t}),document.activeElement!==r)return}function up(e){const t=dc(e),r=fc(t,e),n=fc(t.reverse(),e);return[r,n]}function dc(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function fc(e,t){for(const r of e)if(!dp(r,{upTo:t}))return r}function dp(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fp(e){return e instanceof HTMLInputElement&&"select"in e}function Wt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&fp(e)&&t&&e.select()}}var mc=mp();function mp(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=hc(e,t),e.unshift(t)},remove(t){var r;e=hc(e,t),(r=e[0])==null||r.resume()}}}function hc(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function hp(e){return e.filter(t=>t.tagName!=="A")}var Ye=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},pp=S[" useId ".trim().toString()]||(()=>{}),gp=0;function Ht(e){const[t,r]=S.useState(pp());return Ye(()=>{r(n=>n??String(gp++))},[e]),e||(t?`radix-${t}`:"")}const vp=["top","right","bottom","left"],Gt=Math.min,ot=Math.max,Pn=Math.round,Tn=Math.floor,wt=e=>({x:e,y:e}),yp={left:"right",right:"left",bottom:"top",top:"bottom"},bp={start:"end",end:"start"};function ea(e,t,r){return ot(e,Gt(t,r))}function At(e,t){return typeof e=="function"?e(t):e}function Pt(e){return e.split("-")[0]}function wr(e){return e.split("-")[1]}function ta(e){return e==="x"?"y":"x"}function ra(e){return e==="y"?"height":"width"}const _p=new Set(["top","bottom"]);function $t(e){return _p.has(Pt(e))?"y":"x"}function na(e){return ta($t(e))}function xp(e,t,r){r===void 0&&(r=!1);const n=wr(e),s=na(e),o=ra(s);let a=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=On(a)),[a,On(a)]}function wp(e){const t=On(e);return[sa(e),t,sa(t)]}function sa(e){return e.replace(/start|end/g,t=>bp[t])}const pc=["left","right"],gc=["right","left"],$p=["top","bottom"],Sp=["bottom","top"];function Ep(e,t,r){switch(e){case"top":case"bottom":return r?t?gc:pc:t?pc:gc;case"left":case"right":return t?$p:Sp;default:return[]}}function kp(e,t,r,n){const s=wr(e);let o=Ep(Pt(e),r==="start",n);return s&&(o=o.map(a=>a+"-"+s),t&&(o=o.concat(o.map(sa)))),o}function On(e){return e.replace(/left|right|bottom|top/g,t=>yp[t])}function Cp(e){return{top:0,right:0,bottom:0,left:0,...e}}function vc(e){return typeof e!="number"?Cp(e):{top:e,right:e,bottom:e,left:e}}function In(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function yc(e,t,r){let{reference:n,floating:s}=e;const o=$t(t),a=na(t),i=ra(a),c=Pt(t),l=o==="y",u=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,p=n[i]/2-s[i]/2;let v;switch(c){case"top":v={x:u,y:n.y-s.height};break;case"bottom":v={x:u,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:h};break;case"left":v={x:n.x-s.width,y:h};break;default:v={x:n.x,y:n.y}}switch(wr(t)){case"start":v[a]-=p*(r&&l?-1:1);break;case"end":v[a]+=p*(r&&l?-1:1);break}return v}const jp=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:a}=r,i=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:h}=yc(l,n,c),p=n,v={},w=0;for(let y=0;y<i.length;y++){const{name:m,fn:_}=i[y],{x:f,y:b,data:x,reset:g}=await _({x:u,y:h,initialPlacement:n,placement:p,strategy:s,middlewareData:v,rects:l,platform:a,elements:{reference:e,floating:t}});u=f??u,h=b??h,v={...v,[m]:{...v[m],...x}},g&&w<=50&&(w++,typeof g=="object"&&(g.placement&&(p=g.placement),g.rects&&(l=g.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):g.rects),{x:u,y:h}=yc(l,p,c)),y=-1)}return{x:u,y:h,placement:p,strategy:s,middlewareData:v}};async function sn(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:a,elements:i,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:p=!1,padding:v=0}=At(t,e),w=vc(v),m=i[p?h==="floating"?"reference":"floating":h],_=In(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(m)))==null||r?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(i.floating)),boundary:l,rootBoundary:u,strategy:c})),f=h==="floating"?{x:n,y:s,width:a.floating.width,height:a.floating.height}:a.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(i.floating)),x=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},g=In(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:f,offsetParent:b,strategy:c}):f);return{top:(_.top-g.top+w.top)/x.y,bottom:(g.bottom-_.bottom+w.bottom)/x.y,left:(_.left-g.left+w.left)/x.x,right:(g.right-_.right+w.right)/x.x}}const Np=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:a,elements:i,middlewareData:c}=t,{element:l,padding:u=0}=At(e,t)||{};if(l==null)return{};const h=vc(u),p={x:r,y:n},v=na(s),w=ra(v),y=await a.getDimensions(l),m=v==="y",_=m?"top":"left",f=m?"bottom":"right",b=m?"clientHeight":"clientWidth",x=o.reference[w]+o.reference[v]-p[v]-o.floating[w],g=p[v]-o.reference[v],$=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let E=$?$[b]:0;(!E||!await(a.isElement==null?void 0:a.isElement($)))&&(E=i.floating[b]||o.floating[w]);const j=x/2-g/2,I=E/2-y[w]/2-1,U=Gt(h[_],I),D=Gt(h[f],I),V=U,q=E-y[w]-D,W=E/2-y[w]/2+j,ee=ea(V,W,q),K=!c.arrow&&wr(s)!=null&&W!==ee&&o.reference[w]/2-(W<V?U:D)-y[w]/2<0,se=K?W<V?W-V:W-q:0;return{[v]:p[v]+se,data:{[v]:ee,centerOffset:W-ee-se,...K&&{alignmentOffset:se}},reset:K}}}),Rp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:a,initialPlacement:i,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:y=!0,...m}=At(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const _=Pt(s),f=$t(i),b=Pt(i)===i,x=await(c.isRTL==null?void 0:c.isRTL(l.floating)),g=p||(b||!y?[On(i)]:wp(i)),$=w!=="none";!p&&$&&g.push(...kp(i,y,w,x));const E=[i,...g],j=await sn(t,m),I=[];let U=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&I.push(j[_]),h){const W=xp(s,a,x);I.push(j[W[0]],j[W[1]])}if(U=[...U,{placement:s,overflows:I}],!I.every(W=>W<=0)){var D,V;const W=(((D=o.flip)==null?void 0:D.index)||0)+1,ee=E[W];if(ee&&(!(h==="alignment"?f!==$t(ee):!1)||U.every(L=>$t(L.placement)===f?L.overflows[0]>0:!0)))return{data:{index:W,overflows:U},reset:{placement:ee}};let K=(V=U.filter(se=>se.overflows[0]<=0).sort((se,L)=>se.overflows[1]-L.overflows[1])[0])==null?void 0:V.placement;if(!K)switch(v){case"bestFit":{var q;const se=(q=U.filter(L=>{if($){const he=$t(L.placement);return he===f||he==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(he=>he>0).reduce((he,H)=>he+H,0)]).sort((L,he)=>L[1]-he[1])[0])==null?void 0:q[0];se&&(K=se);break}case"initialPlacement":K=i;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function bc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _c(e){return vp.some(t=>e[t]>=0)}const Ap=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=At(e,t);switch(n){case"referenceHidden":{const o=await sn(t,{...s,elementContext:"reference"}),a=bc(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:_c(a)}}}case"escaped":{const o=await sn(t,{...s,altBoundary:!0}),a=bc(o,r.floating);return{data:{escapedOffsets:a,escaped:_c(a)}}}default:return{}}}}},xc=new Set(["left","top"]);async function Pp(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),a=Pt(r),i=wr(r),c=$t(r)==="y",l=xc.has(a)?-1:1,u=o&&c?-1:1,h=At(t,e);let{mainAxis:p,crossAxis:v,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return i&&typeof w=="number"&&(v=i==="end"?w*-1:w),c?{x:v*u,y:p*l}:{x:p*l,y:v*u}}const Tp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:a,middlewareData:i}=t,c=await Pp(t,e);return a===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:a}}}}},Op=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:i={fn:m=>{let{x:_,y:f}=m;return{x:_,y:f}}},...c}=At(e,t),l={x:r,y:n},u=await sn(t,c),h=$t(Pt(s)),p=ta(h);let v=l[p],w=l[h];if(o){const m=p==="y"?"top":"left",_=p==="y"?"bottom":"right",f=v+u[m],b=v-u[_];v=ea(f,v,b)}if(a){const m=h==="y"?"top":"left",_=h==="y"?"bottom":"right",f=w+u[m],b=w-u[_];w=ea(f,w,b)}const y=i.fn({...t,[p]:v,[h]:w});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[p]:o,[h]:a}}}}}},Ip=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:l=!0}=At(e,t),u={x:r,y:n},h=$t(s),p=ta(h);let v=u[p],w=u[h];const y=At(i,t),m=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const b=p==="y"?"height":"width",x=o.reference[p]-o.floating[b]+m.mainAxis,g=o.reference[p]+o.reference[b]-m.mainAxis;v<x?v=x:v>g&&(v=g)}if(l){var _,f;const b=p==="y"?"width":"height",x=xc.has(Pt(s)),g=o.reference[h]-o.floating[b]+(x&&((_=a.offset)==null?void 0:_[h])||0)+(x?0:m.crossAxis),$=o.reference[h]+o.reference[b]+(x?0:((f=a.offset)==null?void 0:f[h])||0)-(x?m.crossAxis:0);w<g?w=g:w>$&&(w=$)}return{[p]:v,[h]:w}}}},Dp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:o,platform:a,elements:i}=t,{apply:c=()=>{},...l}=At(e,t),u=await sn(t,l),h=Pt(s),p=wr(s),v=$t(s)==="y",{width:w,height:y}=o.floating;let m,_;h==="top"||h==="bottom"?(m=h,_=p===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(_=h,m=p==="end"?"top":"bottom");const f=y-u.top-u.bottom,b=w-u.left-u.right,x=Gt(y-u[m],f),g=Gt(w-u[_],b),$=!t.middlewareData.shift;let E=x,j=g;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(j=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=f),$&&!p){const U=ot(u.left,0),D=ot(u.right,0),V=ot(u.top,0),q=ot(u.bottom,0);v?j=w-2*(U!==0||D!==0?U+D:ot(u.left,u.right)):E=y-2*(V!==0||q!==0?V+q:ot(u.top,u.bottom))}await c({...t,availableWidth:j,availableHeight:E});const I=await a.getDimensions(i.floating);return w!==I.width||y!==I.height?{reset:{rects:!0}}:{}}}};function Dn(){return typeof window<"u"}function $r(e){return wc(e)?(e.nodeName||"").toLowerCase():"#document"}function at(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function St(e){var t;return(t=(wc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wc(e){return Dn()?e instanceof Node||e instanceof at(e).Node:!1}function mt(e){return Dn()?e instanceof Element||e instanceof at(e).Element:!1}function Et(e){return Dn()?e instanceof HTMLElement||e instanceof at(e).HTMLElement:!1}function $c(e){return!Dn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof at(e).ShadowRoot}const Mp=new Set(["inline","contents"]);function on(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=ht(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Mp.has(s)}const Vp=new Set(["table","td","th"]);function Fp(e){return Vp.has($r(e))}const Lp=[":popover-open",":modal"];function Mn(e){return Lp.some(t=>{try{return e.matches(t)}catch{return!1}})}const zp=["transform","translate","scale","rotate","perspective"],qp=["transform","translate","scale","rotate","perspective","filter"],Up=["paint","layout","strict","content"];function oa(e){const t=aa(),r=mt(e)?ht(e):e;return zp.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||qp.some(n=>(r.willChange||"").includes(n))||Up.some(n=>(r.contain||"").includes(n))}function Bp(e){let t=Zt(e);for(;Et(t)&&!Sr(t);){if(oa(t))return t;if(Mn(t))return null;t=Zt(t)}return null}function aa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Wp=new Set(["html","body","#document"]);function Sr(e){return Wp.has($r(e))}function ht(e){return at(e).getComputedStyle(e)}function Vn(e){return mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zt(e){if($r(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$c(e)&&e.host||St(e);return $c(t)?t.host:t}function Sc(e){const t=Zt(e);return Sr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Et(t)&&on(t)?t:Sc(t)}function an(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Sc(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),a=at(s);if(o){const i=ia(a);return t.concat(a,a.visualViewport||[],on(s)?s:[],i&&r?an(i):[])}return t.concat(s,an(s,[],r))}function ia(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ec(e){const t=ht(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Et(e),o=s?e.offsetWidth:r,a=s?e.offsetHeight:n,i=Pn(r)!==o||Pn(n)!==a;return i&&(r=o,n=a),{width:r,height:n,$:i}}function ca(e){return mt(e)?e:e.contextElement}function Er(e){const t=ca(e);if(!Et(t))return wt(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=Ec(t);let a=(o?Pn(r.width):r.width)/n,i=(o?Pn(r.height):r.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Hp=wt(0);function kc(e){const t=at(e);return!aa()||!t.visualViewport?Hp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gp(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==at(e)?!1:t}function ir(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=ca(e);let a=wt(1);t&&(n?mt(n)&&(a=Er(n)):a=Er(e));const i=Gp(o,r,n)?kc(o):wt(0);let c=(s.left+i.x)/a.x,l=(s.top+i.y)/a.y,u=s.width/a.x,h=s.height/a.y;if(o){const p=at(o),v=n&&mt(n)?at(n):n;let w=p,y=ia(w);for(;y&&n&&v!==w;){const m=Er(y),_=y.getBoundingClientRect(),f=ht(y),b=_.left+(y.clientLeft+parseFloat(f.paddingLeft))*m.x,x=_.top+(y.clientTop+parseFloat(f.paddingTop))*m.y;c*=m.x,l*=m.y,u*=m.x,h*=m.y,c+=b,l+=x,w=at(y),y=ia(w)}}return In({width:u,height:h,x:c,y:l})}function Fn(e,t){const r=Vn(e).scrollLeft;return t?t.left+r:ir(St(e)).left+r}function Cc(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Fn(e,r),s=r.top+t.scrollTop;return{x:n,y:s}}function Zp(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",a=St(n),i=t?Mn(t.floating):!1;if(n===a||i&&o)return r;let c={scrollLeft:0,scrollTop:0},l=wt(1);const u=wt(0),h=Et(n);if((h||!h&&!o)&&(($r(n)!=="body"||on(a))&&(c=Vn(n)),Et(n))){const v=ir(n);l=Er(n),u.x=v.x+n.clientLeft,u.y=v.y+n.clientTop}const p=a&&!h&&!o?Cc(a,c):wt(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+p.x,y:r.y*l.y-c.scrollTop*l.y+u.y+p.y}}function Kp(e){return Array.from(e.getClientRects())}function Yp(e){const t=St(e),r=Vn(e),n=e.ownerDocument.body,s=ot(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=ot(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Fn(e);const i=-r.scrollTop;return ht(n).direction==="rtl"&&(a+=ot(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:a,y:i}}const jc=25;function Jp(e,t){const r=at(e),n=St(e),s=r.visualViewport;let o=n.clientWidth,a=n.clientHeight,i=0,c=0;if(s){o=s.width,a=s.height;const u=aa();(!u||u&&t==="fixed")&&(i=s.offsetLeft,c=s.offsetTop)}const l=Fn(n);if(l<=0){const u=n.ownerDocument,h=u.body,p=getComputedStyle(h),v=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,w=Math.abs(n.clientWidth-h.clientWidth-v);w<=jc&&(o-=w)}else l<=jc&&(o+=l);return{width:o,height:a,x:i,y:c}}const Xp=new Set(["absolute","fixed"]);function Qp(e,t){const r=ir(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=Et(e)?Er(e):wt(1),a=e.clientWidth*o.x,i=e.clientHeight*o.y,c=s*o.x,l=n*o.y;return{width:a,height:i,x:c,y:l}}function Nc(e,t,r){let n;if(t==="viewport")n=Jp(e,r);else if(t==="document")n=Yp(St(e));else if(mt(t))n=Qp(t,r);else{const s=kc(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return In(n)}function Rc(e,t){const r=Zt(e);return r===t||!mt(r)||Sr(r)?!1:ht(r).position==="fixed"||Rc(r,t)}function eg(e,t){const r=t.get(e);if(r)return r;let n=an(e,[],!1).filter(i=>mt(i)&&$r(i)!=="body"),s=null;const o=ht(e).position==="fixed";let a=o?Zt(e):e;for(;mt(a)&&!Sr(a);){const i=ht(a),c=oa(a);!c&&i.position==="fixed"&&(s=null),(o?!c&&!s:!c&&i.position==="static"&&!!s&&Xp.has(s.position)||on(a)&&!c&&Rc(e,a))?n=n.filter(u=>u!==a):s=i,a=Zt(a)}return t.set(e,n),n}function tg(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const a=[...r==="clippingAncestors"?Mn(t)?[]:eg(t,this._c):[].concat(r),n],i=a[0],c=a.reduce((l,u)=>{const h=Nc(t,u,s);return l.top=ot(h.top,l.top),l.right=Gt(h.right,l.right),l.bottom=Gt(h.bottom,l.bottom),l.left=ot(h.left,l.left),l},Nc(t,i,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function rg(e){const{width:t,height:r}=Ec(e);return{width:t,height:r}}function ng(e,t,r){const n=Et(t),s=St(t),o=r==="fixed",a=ir(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const c=wt(0);function l(){c.x=Fn(s)}if(n||!n&&!o)if(($r(t)!=="body"||on(s))&&(i=Vn(t)),n){const v=ir(t,!0,o,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else s&&l();o&&!n&&s&&l();const u=s&&!n&&!o?Cc(s,i):wt(0),h=a.left+i.scrollLeft-c.x-u.x,p=a.top+i.scrollTop-c.y-u.y;return{x:h,y:p,width:a.width,height:a.height}}function la(e){return ht(e).position==="static"}function Ac(e,t){if(!Et(e)||ht(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return St(e)===r&&(r=r.ownerDocument.body),r}function Pc(e,t){const r=at(e);if(Mn(e))return r;if(!Et(e)){let s=Zt(e);for(;s&&!Sr(s);){if(mt(s)&&!la(s))return s;s=Zt(s)}return r}let n=Ac(e,t);for(;n&&Fp(n)&&la(n);)n=Ac(n,t);return n&&Sr(n)&&la(n)&&!oa(n)?r:n||Bp(e)||r}const sg=async function(e){const t=this.getOffsetParent||Pc,r=this.getDimensions,n=await r(e.floating);return{reference:ng(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function og(e){return ht(e).direction==="rtl"}const ag={convertOffsetParentRelativeRectToViewportRelativeRect:Zp,getDocumentElement:St,getClippingRect:tg,getOffsetParent:Pc,getElementRects:sg,getClientRects:Kp,getDimensions:rg,getScale:Er,isElement:mt,isRTL:og};function Tc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ig(e,t){let r=null,n;const s=St(e);function o(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),o();const l=e.getBoundingClientRect(),{left:u,top:h,width:p,height:v}=l;if(i||t(),!p||!v)return;const w=Tn(h),y=Tn(s.clientWidth-(u+p)),m=Tn(s.clientHeight-(h+v)),_=Tn(u),b={rootMargin:-w+"px "+-y+"px "+-m+"px "+-_+"px",threshold:ot(0,Gt(1,c))||1};let x=!0;function g($){const E=$[0].intersectionRatio;if(E!==c){if(!x)return a();E?a(!1,E):n=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!Tc(l,e.getBoundingClientRect())&&a(),x=!1}try{r=new IntersectionObserver(g,{...b,root:s.ownerDocument})}catch{r=new IntersectionObserver(g,b)}r.observe(e)}return a(!0),o}function cg(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=ca(e),u=s||o?[...l?an(l):[],...an(t)]:[];u.forEach(_=>{s&&_.addEventListener("scroll",r,{passive:!0}),o&&_.addEventListener("resize",r)});const h=l&&i?ig(l,r):null;let p=-1,v=null;a&&(v=new ResizeObserver(_=>{let[f]=_;f&&f.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(t)})),r()}),l&&!c&&v.observe(l),v.observe(t));let w,y=c?ir(e):null;c&&m();function m(){const _=ir(e);y&&!Tc(y,_)&&r(),y=_,w=requestAnimationFrame(m)}return r(),()=>{var _;u.forEach(f=>{s&&f.removeEventListener("scroll",r),o&&f.removeEventListener("resize",r)}),h==null||h(),(_=v)==null||_.disconnect(),v=null,c&&cancelAnimationFrame(w)}}const lg=Tp,ug=Op,dg=Rp,fg=Dp,mg=Ap,Oc=Np,hg=Ip,pg=(e,t,r)=>{const n=new Map,s={platform:ag,...r},o={...s.platform,_c:n};return jp(e,t,{...s,platform:o})};var gg=typeof document<"u",vg=function(){},Ln=gg?Z.useLayoutEffect:vg;function zn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!zn(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!zn(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ic(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dc(e,t){const r=Ic(e);return Math.round(t*r)/r}function ua(e){const t=S.useRef(e);return Ln(()=>{t.current=e}),t}function yg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:a}={},transform:i=!0,whileElementsMounted:c,open:l}=e,[u,h]=S.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,v]=S.useState(n);zn(p,n)||v(n);const[w,y]=S.useState(null),[m,_]=S.useState(null),f=S.useCallback(L=>{L!==$.current&&($.current=L,y(L))},[]),b=S.useCallback(L=>{L!==E.current&&(E.current=L,_(L))},[]),x=o||w,g=a||m,$=S.useRef(null),E=S.useRef(null),j=S.useRef(u),I=c!=null,U=ua(c),D=ua(s),V=ua(l),q=S.useCallback(()=>{if(!$.current||!E.current)return;const L={placement:t,strategy:r,middleware:p};D.current&&(L.platform=D.current),pg($.current,E.current,L).then(he=>{const H={...he,isPositioned:V.current!==!1};W.current&&!zn(j.current,H)&&(j.current=H,$n.flushSync(()=>{h(H)}))})},[p,t,r,D,V]);Ln(()=>{l===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,h(L=>({...L,isPositioned:!1})))},[l]);const W=S.useRef(!1);Ln(()=>(W.current=!0,()=>{W.current=!1}),[]),Ln(()=>{if(x&&($.current=x),g&&(E.current=g),x&&g){if(U.current)return U.current(x,g,q);q()}},[x,g,q,U,I]);const ee=S.useMemo(()=>({reference:$,floating:E,setReference:f,setFloating:b}),[f,b]),K=S.useMemo(()=>({reference:x,floating:g}),[x,g]),se=S.useMemo(()=>{const L={position:r,left:0,top:0};if(!K.floating)return L;const he=Dc(K.floating,u.x),H=Dc(K.floating,u.y);return i?{...L,transform:"translate("+he+"px, "+H+"px)",...Ic(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:he,top:H}},[r,i,K.floating,u.x,u.y]);return S.useMemo(()=>({...u,update:q,refs:ee,elements:K,floatingStyles:se}),[u,q,ee,K,se])}const bg=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Oc({element:n.current,padding:s}).fn(r):{}:n?Oc({element:n,padding:s}).fn(r):{}}}},_g=(e,t)=>({...lg(e),options:[e,t]}),xg=(e,t)=>({...ug(e),options:[e,t]}),wg=(e,t)=>({...hg(e),options:[e,t]}),$g=(e,t)=>({...dg(e),options:[e,t]}),Sg=(e,t)=>({...fg(e),options:[e,t]}),Eg=(e,t)=>({...mg(e),options:[e,t]}),kg=(e,t)=>({...bg(e),options:[e,t]});var Cg="Arrow",Mc=S.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return d.jsx(je.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Mc.displayName=Cg;var jg=Mc;function da(e){const[t,r]=S.useState(void 0);return Ye(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let a,i;if("borderBoxSize"in o){const c=o.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,i=l.blockSize}else a=e.offsetWidth,i=e.offsetHeight;r({width:a,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var fa="Popper",[Vc,qn]=xt(fa),[Ng,Fc]=Vc(fa),Lc=e=>{const{__scopePopper:t,children:r}=e,[n,s]=S.useState(null);return d.jsx(Ng,{scope:t,anchor:n,onAnchorChange:s,children:r})};Lc.displayName=fa;var zc="PopperAnchor",qc=S.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=Fc(zc,r),a=S.useRef(null),i=De(t,a),c=S.useRef(null);return S.useEffect(()=>{const l=c.current;c.current=(n==null?void 0:n.current)||a.current,l!==c.current&&o.onAnchorChange(c.current)}),n?null:d.jsx(je.div,{...s,ref:i})});qc.displayName=zc;var ma="PopperContent",[Rg,Ag]=Vc(ma),Uc=S.forwardRef((e,t)=>{var F,Y,de,oe,A,T;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:v="optimized",onPlaced:w,...y}=e,m=Fc(ma,r),[_,f]=S.useState(null),b=De(t,G=>f(G)),[x,g]=S.useState(null),$=da(x),E=($==null?void 0:$.width)??0,j=($==null?void 0:$.height)??0,I=n+(o!=="center"?"-"+o:""),U=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],V=D.length>0,q={padding:U,boundary:D.filter(Tg),altBoundary:V},{refs:W,floatingStyles:ee,placement:K,isPositioned:se,middlewareData:L}=yg({strategy:"fixed",placement:I,whileElementsMounted:(...G)=>cg(...G,{animationFrame:v==="always"}),elements:{reference:m.anchor},middleware:[_g({mainAxis:s+j,alignmentAxis:a}),c&&xg({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?wg():void 0,...q}),c&&$g({...q}),Sg({...q,apply:({elements:G,rects:J,availableWidth:ie,availableHeight:ge})=>{const{width:ze,height:rt}=J.reference,qe=G.floating.style;qe.setProperty("--radix-popper-available-width",`${ie}px`),qe.setProperty("--radix-popper-available-height",`${ge}px`),qe.setProperty("--radix-popper-anchor-width",`${ze}px`),qe.setProperty("--radix-popper-anchor-height",`${rt}px`)}}),x&&kg({element:x,padding:i}),Og({arrowWidth:E,arrowHeight:j}),p&&Eg({strategy:"referenceHidden",...q})]}),[he,H]=Hc(K),C=Bt(w);Ye(()=>{se&&(C==null||C())},[se,C]);const M=(F=L.arrow)==null?void 0:F.x,P=(Y=L.arrow)==null?void 0:Y.y,k=((de=L.arrow)==null?void 0:de.centerOffset)!==0,[N,z]=S.useState();return Ye(()=>{_&&z(window.getComputedStyle(_).zIndex)},[_]),d.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:se?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:N,"--radix-popper-transform-origin":[(oe=L.transformOrigin)==null?void 0:oe.x,(A=L.transformOrigin)==null?void 0:A.y].join(" "),...((T=L.hide)==null?void 0:T.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Rg,{scope:r,placedSide:he,onArrowChange:g,arrowX:M,arrowY:P,shouldHideArrow:k,children:d.jsx(je.div,{"data-side":he,"data-align":H,...y,ref:b,style:{...y.style,animation:se?void 0:"none"}})})})});Uc.displayName=ma;var Bc="PopperArrow",Pg={top:"bottom",right:"left",bottom:"top",left:"right"},Wc=S.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=Ag(Bc,n),a=Pg[o.placedSide];return d.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:d.jsx(jg,{...s,ref:r,style:{...s.style,display:"block"}})})});Wc.displayName=Bc;function Tg(e){return e!==null}var Og=e=>({name:"transformOrigin",options:e,fn(t){var m,_,f;const{placement:r,rects:n,middlewareData:s}=t,a=((m=s.arrow)==null?void 0:m.centerOffset)!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[l,u]=Hc(r),h={start:"0%",center:"50%",end:"100%"}[u],p=(((_=s.arrow)==null?void 0:_.x)??0)+i/2,v=(((f=s.arrow)==null?void 0:f.y)??0)+c/2;let w="",y="";return l==="bottom"?(w=a?h:`${p}px`,y=`${-c}px`):l==="top"?(w=a?h:`${p}px`,y=`${n.floating.height+c}px`):l==="right"?(w=`${-c}px`,y=a?h:`${v}px`):l==="left"&&(w=`${n.floating.width+c}px`,y=a?h:`${v}px`),{data:{x:w,y}}}});function Hc(e){const[t,r="center"]=e.split("-");return[t,r]}var Gc=Lc,Zc=qc,Kc=Uc,Yc=Wc,Ig="Portal",Un=S.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[s,o]=S.useState(!1);Ye(()=>o(!0),[]);const a=r||s&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?ki.createPortal(d.jsx(je.div,{...n,ref:t}),a):null});Un.displayName=Ig;function Dg(e){const t=Mg(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(Fg);if(c){const l=c.props.children,u=i.map(h=>h===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:h);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function Mg(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=zg(s),i=Lg(o,s.props);return s.type!==S.Fragment&&(i.ref=n?xr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vg=Symbol("radix.slottable");function Fg(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vg}function Lg(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function zg(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 qg=S[" useInsertionEffect ".trim().toString()]||Ye;function cr({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,a]=Ug({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:s;{const u=S.useRef(e!==void 0);S.useEffect(()=>{const h=u.current;h!==i&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,n])}const l=S.useCallback(u=>{var h;if(i){const p=Bg(u)?u(e):u;p!==e&&((h=a.current)==null||h.call(a,p))}else o(u)},[i,e,o,a]);return[c,l]}function Ug({defaultProp:e,onChange:t}){const[r,n]=S.useState(e),s=S.useRef(r),o=S.useRef(t);return qg(()=>{o.current=t},[t]),S.useEffect(()=>{var a;s.current!==r&&((a=o.current)==null||a.call(o,r),s.current=r)},[r,s]),[r,n,o]}function Bg(e){return typeof e=="function"}function ha(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Jc=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Wg="VisuallyHidden",Xc=S.forwardRef((e,t)=>d.jsx(je.span,{...e,ref:t,style:{...Jc,...e.style}}));Xc.displayName=Wg;var Hg=Xc,Gg=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kr=new WeakMap,Bn=new WeakMap,Wn={},pa=0,Qc=function(e){return e&&(e.host||Qc(e.parentNode))},Zg=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Qc(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Kg=function(e,t,r,n){var s=Zg(t,Array.isArray(e)?e:[e]);Wn[r]||(Wn[r]=new WeakMap);var o=Wn[r],a=[],i=new Set,c=new Set(s),l=function(h){!h||i.has(h)||(i.add(h),l(h.parentNode))};s.forEach(l);var u=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(p){if(i.has(p))u(p);else try{var v=p.getAttribute(n),w=v!==null&&v!=="false",y=(kr.get(p)||0)+1,m=(o.get(p)||0)+1;kr.set(p,y),o.set(p,m),a.push(p),y===1&&w&&Bn.set(p,!0),m===1&&p.setAttribute(r,"true"),w||p.setAttribute(n,"true")}catch(_){console.error("aria-hidden: cannot operate on ",p,_)}})};return u(t),i.clear(),pa++,function(){a.forEach(function(h){var p=kr.get(h)-1,v=o.get(h)-1;kr.set(h,p),o.set(h,v),p||(Bn.has(h)||h.removeAttribute(n),Bn.delete(h)),v||h.removeAttribute(r)}),pa--,pa||(kr=new WeakMap,kr=new WeakMap,Bn=new WeakMap,Wn={})}},el=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=Gg(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),Kg(n,s,r,"aria-hidden")):function(){return null}},kt=function(){return kt=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},kt.apply(this,arguments)};function tl(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function Yg(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Hn="right-scroll-bar-position",Gn="width-before-scroll-bar",Jg="with-scroll-bars-hidden",Xg="--removed-body-scroll-bar-size";function ga(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Qg(e,t){var r=Z.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var ev=typeof window<"u"?S.useLayoutEffect:S.useEffect,rl=new WeakMap;function tv(e,t){var r=Qg(null,function(n){return e.forEach(function(s){return ga(s,n)})});return ev(function(){var n=rl.get(r);if(n){var s=new Set(n),o=new Set(e),a=r.current;s.forEach(function(i){o.has(i)||ga(i,null)}),o.forEach(function(i){s.has(i)||ga(i,a)})}rl.set(r,e)},[e]),r}function rv(e){return e}function nv(e,t){t===void 0&&(t=rv);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var a=t(o,n);return r.push(a),function(){r=r.filter(function(i){return i!==a})}},assignSyncMedium:function(o){for(n=!0;r.length;){var a=r;r=[],a.forEach(o)}r={push:function(i){return o(i)},filter:function(){return r}}},assignMedium:function(o){n=!0;var a=[];if(r.length){var i=r;r=[],i.forEach(o),a=r}var c=function(){var u=a;a=[],u.forEach(o)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),r}}}};return s}function sv(e){e===void 0&&(e={});var t=nv(null);return t.options=kt({async:!0,ssr:!1},e),t}var nl=function(e){var t=e.sideCar,r=tl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return S.createElement(n,kt({},r))};nl.isSideCarExport=!0;function ov(e,t){return e.useMedium(t),nl}var sl=sv(),va=function(){},Zn=S.forwardRef(function(e,t){var r=S.useRef(null),n=S.useState({onScrollCapture:va,onWheelCapture:va,onTouchMoveCapture:va}),s=n[0],o=n[1],a=e.forwardProps,i=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,h=e.shards,p=e.sideCar,v=e.noRelative,w=e.noIsolation,y=e.inert,m=e.allowPinchZoom,_=e.as,f=_===void 0?"div":_,b=e.gapMode,x=tl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),g=p,$=tv([r,t]),E=kt(kt({},x),s);return S.createElement(S.Fragment,null,u&&S.createElement(g,{sideCar:sl,removeScrollBar:l,shards:h,noRelative:v,noIsolation:w,inert:y,setCallbacks:o,allowPinchZoom:!!m,lockRef:r,gapMode:b}),a?S.cloneElement(S.Children.only(i),kt(kt({},E),{ref:$})):S.createElement(f,kt({},E,{className:c,ref:$}),i))});Zn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Zn.classNames={fullWidth:Gn,zeroRight:Hn};var av=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function iv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=av();return t&&e.setAttribute("nonce",t),e}function cv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var uv=function(){var e=0,t=null;return{add:function(r){e==0&&(t=iv())&&(cv(t,r),lv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dv=function(){var e=uv();return function(t,r){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ol=function(){var e=dv(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},fv={left:0,top:0,right:0,gap:0},ya=function(e){return parseInt(e||"",10)||0},mv=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[ya(r),ya(n),ya(s)]},hv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fv;var t=mv(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},pv=ol(),Cr="data-scroll-locked",gv=function(e,t,r,n){var s=e.left,o=e.top,a=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
23
23
|
.`.concat(Jg,` {
|
|
24
24
|
overflow: hidden `).concat(n,`;
|
|
25
25
|
padding-right: `).concat(i,"px ").concat(n,`;
|
|
@@ -56,10 +56,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
56
56
|
body[`).concat(Cr,`] {
|
|
57
57
|
`).concat(Xg,": ").concat(i,`px;
|
|
58
58
|
}
|
|
59
|
-
`)},al=function(){var e=parseInt(document.body.getAttribute(Cr)||"0",10);return isFinite(e)?e:0},vv=function(){S.useEffect(function(){return document.body.setAttribute(Cr,(al()+1).toString()),function(){var e=al()-1;e<=0?document.body.removeAttribute(Cr):document.body.setAttribute(Cr,e.toString())}},[])},yv=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;vv();var o=S.useMemo(function(){return hv(s)},[s]);return S.createElement(pv,{styles:gv(o,!t,s,r?"":"!important")})},ba=!1;if(typeof window<"u")try{var Kn=Object.defineProperty({},"passive",{get:function(){return ba=!0,!0}});window.addEventListener("test",Kn,Kn),window.removeEventListener("test",Kn,Kn)}catch{ba=!1}var jr=ba?{passive:!1}:!1,bv=function(e){return e.tagName==="TEXTAREA"},il=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!bv(e)&&r[t]==="visible")},_v=function(e){return il(e,"overflowY")},xv=function(e){return il(e,"overflowX")},cl=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=ll(e,n);if(s){var o=ul(e,n),a=o[1],i=o[2];if(a>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},wv=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},$v=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},ll=function(e,t){return e==="v"?_v(t):xv(t)},ul=function(e,t){return e==="v"?wv(t):$v(t)},Sv=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ev=function(e,t,r,n,s){var o=Sv(e,window.getComputedStyle(t).direction),a=o*n,i=r.target,c=t.contains(i),l=!1,u=a>0,
|
|
59
|
+
`)},al=function(){var e=parseInt(document.body.getAttribute(Cr)||"0",10);return isFinite(e)?e:0},vv=function(){S.useEffect(function(){return document.body.setAttribute(Cr,(al()+1).toString()),function(){var e=al()-1;e<=0?document.body.removeAttribute(Cr):document.body.setAttribute(Cr,e.toString())}},[])},yv=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;vv();var o=S.useMemo(function(){return hv(s)},[s]);return S.createElement(pv,{styles:gv(o,!t,s,r?"":"!important")})},ba=!1;if(typeof window<"u")try{var Kn=Object.defineProperty({},"passive",{get:function(){return ba=!0,!0}});window.addEventListener("test",Kn,Kn),window.removeEventListener("test",Kn,Kn)}catch{ba=!1}var jr=ba?{passive:!1}:!1,bv=function(e){return e.tagName==="TEXTAREA"},il=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!bv(e)&&r[t]==="visible")},_v=function(e){return il(e,"overflowY")},xv=function(e){return il(e,"overflowX")},cl=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=ll(e,n);if(s){var o=ul(e,n),a=o[1],i=o[2];if(a>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},wv=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},$v=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},ll=function(e,t){return e==="v"?_v(t):xv(t)},ul=function(e,t){return e==="v"?wv(t):$v(t)},Sv=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ev=function(e,t,r,n,s){var o=Sv(e,window.getComputedStyle(t).direction),a=o*n,i=r.target,c=t.contains(i),l=!1,u=a>0,h=0,p=0;do{if(!i)break;var v=ul(e,i),w=v[0],y=v[1],m=v[2],_=y-m-o*w;(w||_)&&ll(e,i)&&(h+=_,p+=w);var f=i.parentNode;i=f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE?f.host:f}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(u&&Math.abs(h)<1||!u&&Math.abs(p)<1)&&(l=!0),l},Yn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dl=function(e){return[e.deltaX,e.deltaY]},fl=function(e){return e&&"current"in e?e.current:e},kv=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Cv=function(e){return`
|
|
60
60
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
61
61
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
62
|
-
`)},jv=0,Nr=[];function Nv(e){var t=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),s=S.useState(jv++)[0],o=S.useState(ol)[0],a=S.useRef(e);S.useEffect(function(){a.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var y=Yg([e.lockRef.current],(e.shards||[]).map(fl),!0).filter(Boolean);return y.forEach(function(m){return m.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var i=S.useCallback(function(y,m){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!a.current.allowPinchZoom;var _=Yn(y),f=r.current,b="deltaX"in y?y.deltaX:f[0]-_[0],w="deltaY"in y?y.deltaY:f[1]-_[1],g,$=y.target,E=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in y&&E==="h"&&$.type==="range")return!1;var j=cl(E,$);if(!j)return!0;if(j?g=E:(g=E==="v"?"h":"v",j=cl(E,$)),!j)return!1;if(!n.current&&"changedTouches"in y&&(b||w)&&(n.current=g),!g)return!0;var O=n.current||g;return Ev(O,m,y,O==="h"?b:w)},[]),c=S.useCallback(function(y){var m=y;if(!(!Nr.length||Nr[Nr.length-1]!==o)){var _="deltaY"in m?dl(m):Yn(m),f=t.current.filter(function(g){return g.name===m.type&&(g.target===m.target||m.target===g.shadowParent)&&kv(g.delta,_)})[0];if(f&&f.should){m.cancelable&&m.preventDefault();return}if(!f){var b=(a.current.shards||[]).map(fl).filter(Boolean).filter(function(g){return g.contains(m.target)}),w=b.length>0?i(m,b[0]):!a.current.noIsolation;w&&m.cancelable&&m.preventDefault()}}},[]),l=S.useCallback(function(y,m,_,f){var b={name:y,delta:m,target:_,should:f,shadowParent:Rv(_)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(w){return w!==b})},1)},[]),u=S.useCallback(function(y){r.current=Yn(y),n.current=void 0},[]),p=S.useCallback(function(y){l(y.type,dl(y),y.target,i(y,e.lockRef.current))},[]),h=S.useCallback(function(y){l(y.type,Yn(y),y.target,i(y,e.lockRef.current))},[]);S.useEffect(function(){return Nr.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",c,jr),document.addEventListener("touchmove",c,jr),document.addEventListener("touchstart",u,jr),function(){Nr=Nr.filter(function(y){return y!==o}),document.removeEventListener("wheel",c,jr),document.removeEventListener("touchmove",c,jr),document.removeEventListener("touchstart",u,jr)}},[]);var v=e.removeScrollBar,x=e.inert;return S.createElement(S.Fragment,null,x?S.createElement(o,{styles:Cv(s)}):null,v?S.createElement(yv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Rv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Av=ov(sl,Nv);var _a=S.forwardRef(function(e,t){return S.createElement(Zn,kt({},e,{ref:t,sideCar:Av}))});_a.classNames=Zn.classNames;var Pv=[" ","Enter","ArrowUp","ArrowDown"],Tv=[" ","Enter"],lr="Select",[Jn,Xn,Ov]=nc(lr),[Rr]=xt(lr,[Ov,qn]),Qn=qn(),[Iv,Kt]=Rr(lr),[Dv,Mv]=Rr(lr),ml=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:o,value:a,defaultValue:i,onValueChange:c,dir:l,name:u,autoComplete:p,disabled:h,required:v,form:x}=e,y=Qn(t),[m,_]=S.useState(null),[f,b]=S.useState(null),[w,g]=S.useState(!1),$=Zo(l),[E,j]=cr({prop:n,defaultProp:s??!1,onChange:o,caller:lr}),[O,z]=cr({prop:a,defaultProp:i,onChange:c,caller:lr}),D=S.useRef(null),V=m?x||!!m.closest("form"):!0,[U,W]=S.useState(new Set),ee=Array.from(U).map(K=>K.props.value).join(";");return d.jsx(Gc,{...y,children:d.jsxs(Iv,{required:v,scope:t,trigger:m,onTriggerChange:_,valueNode:f,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:g,contentId:Ht(),value:O,onValueChange:z,open:E,onOpenChange:j,dir:$,triggerPointerDownPosRef:D,disabled:h,children:[d.jsx(Jn.Provider,{scope:t,children:d.jsx(Dv,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(K=>{W(se=>new Set(se).add(K))},[]),onNativeOptionRemove:S.useCallback(K=>{W(se=>{const L=new Set(se);return L.delete(K),L})},[]),children:r})}),V?d.jsxs(Il,{"aria-hidden":!0,required:v,tabIndex:-1,name:u,autoComplete:p,value:O,onChange:K=>z(K.target.value),disabled:h,form:x,children:[O===void 0?d.jsx("option",{value:""}):null,Array.from(U)]},ee):null]})})};ml.displayName=lr;var hl="SelectTrigger",pl=S.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,o=Qn(r),a=Kt(hl,r),i=a.disabled||n,c=De(t,a.onTriggerChange),l=Xn(r),u=S.useRef("touch"),[p,h,v]=Ml(y=>{const m=l().filter(b=>!b.disabled),_=m.find(b=>b.value===a.value),f=Vl(m,y,_);f!==void 0&&a.onValueChange(f.value)}),x=y=>{i||(a.onOpenChange(!0),v()),y&&(a.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return d.jsx(Zc,{asChild:!0,...o,children:d.jsx(je.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Dl(a.value)?"":void 0,...s,ref:c,onClick:be(s.onClick,y=>{y.currentTarget.focus(),u.current!=="mouse"&&x(y)}),onPointerDown:be(s.onPointerDown,y=>{u.current=y.pointerType;const m=y.target;m.hasPointerCapture(y.pointerId)&&m.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(x(y),y.preventDefault())}),onKeyDown:be(s.onKeyDown,y=>{const m=p.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&h(y.key),!(m&&y.key===" ")&&Pv.includes(y.key)&&(x(),y.preventDefault())})})})});pl.displayName=hl;var gl="SelectValue",vl=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:a="",...i}=e,c=Kt(gl,r),{onValueNodeHasChildrenChange:l}=c,u=o!==void 0,p=De(t,c.onValueNodeChange);return Ye(()=>{l(u)},[l,u]),d.jsx(je.span,{...i,ref:p,style:{pointerEvents:"none"},children:Dl(c.value)?d.jsx(d.Fragment,{children:a}):o})});vl.displayName=gl;var Vv="SelectIcon",yl=S.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return d.jsx(je.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});yl.displayName=Vv;var Fv="SelectPortal",bl=e=>d.jsx(Un,{asChild:!0,...e});bl.displayName=Fv;var ur="SelectContent",_l=S.forwardRef((e,t)=>{const r=Kt(ur,e.__scopeSelect),[n,s]=S.useState();if(Ye(()=>{s(new DocumentFragment)},[]),!r.open){const o=n;return o?$n.createPortal(d.jsx(xl,{scope:e.__scopeSelect,children:d.jsx(Jn.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),o):null}return d.jsx(wl,{...e,ref:t})});_l.displayName=ur;var pt=10,[xl,Yt]=Rr(ur),Lv="SelectContentImpl",zv=Dg("SelectContent.RemoveScroll"),wl=S.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:a,side:i,sideOffset:c,align:l,alignOffset:u,arrowPadding:p,collisionBoundary:h,collisionPadding:v,sticky:x,hideWhenDetached:y,avoidCollisions:m,..._}=e,f=Kt(ur,r),[b,w]=S.useState(null),[g,$]=S.useState(null),E=De(t,F=>w(F)),[j,O]=S.useState(null),[z,D]=S.useState(null),V=Xn(r),[U,W]=S.useState(!1),ee=S.useRef(!1);S.useEffect(()=>{if(b)return el(b)},[b]),cc();const K=S.useCallback(F=>{const[Y,...de]=V().map(T=>T.ref.current),[oe]=de.slice(-1),A=document.activeElement;for(const T of F)if(T===A||(T==null||T.scrollIntoView({block:"nearest"}),T===Y&&g&&(g.scrollTop=0),T===oe&&g&&(g.scrollTop=g.scrollHeight),T==null||T.focus(),document.activeElement!==A))return},[V,g]),se=S.useCallback(()=>K([j,b]),[K,j,b]);S.useEffect(()=>{U&&se()},[U,se]);const{onOpenChange:L,triggerPointerDownPosRef:he}=f;S.useEffect(()=>{if(b){let F={x:0,y:0};const Y=oe=>{var A,T;F={x:Math.abs(Math.round(oe.pageX)-(((A=he.current)==null?void 0:A.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((T=he.current)==null?void 0:T.y)??0))}},de=oe=>{F.x<=10&&F.y<=10?oe.preventDefault():b.contains(oe.target)||L(!1),document.removeEventListener("pointermove",Y),he.current=null};return he.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",de,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",de,{capture:!0})}}},[b,L,he]),S.useEffect(()=>{const F=()=>L(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[L]);const[H,C]=Ml(F=>{const Y=V().filter(A=>!A.disabled),de=Y.find(A=>A.ref.current===document.activeElement),oe=Vl(Y,F,de);oe&&setTimeout(()=>oe.ref.current.focus())}),M=S.useCallback((F,Y,de)=>{const oe=!ee.current&&!de;(f.value!==void 0&&f.value===Y||oe)&&(O(F),oe&&(ee.current=!0))},[f.value]),P=S.useCallback(()=>b==null?void 0:b.focus(),[b]),k=S.useCallback((F,Y,de)=>{const oe=!ee.current&&!de;(f.value!==void 0&&f.value===Y||oe)&&D(F)},[f.value]),N=n==="popper"?xa:$l,q=N===xa?{side:i,sideOffset:c,align:l,alignOffset:u,arrowPadding:p,collisionBoundary:h,collisionPadding:v,sticky:x,hideWhenDetached:y,avoidCollisions:m}:{};return d.jsx(xl,{scope:r,content:b,viewport:g,onViewportChange:$,itemRefCallback:M,selectedItem:j,onItemLeave:P,itemTextRefCallback:k,focusSelectedItem:se,selectedItemText:z,position:n,isPositioned:U,searchRef:H,children:d.jsx(_a,{as:zv,allowPinchZoom:!0,children:d.jsx(Qo,{asChild:!0,trapped:f.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:be(s,F=>{var Y;(Y=f.trigger)==null||Y.focus({preventScroll:!0}),F.preventDefault()}),children:d.jsx(An,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>f.onOpenChange(!1),children:d.jsx(N,{role:"listbox",id:f.contentId,"data-state":f.open?"open":"closed",dir:f.dir,onContextMenu:F=>F.preventDefault(),..._,...q,onPlaced:()=>W(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:be(_.onKeyDown,F=>{const Y=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!Y&&F.key.length===1&&C(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let oe=V().filter(A=>!A.disabled).map(A=>A.ref.current);if(["ArrowUp","End"].includes(F.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const A=F.target,T=oe.indexOf(A);oe=oe.slice(T+1)}setTimeout(()=>K(oe)),F.preventDefault()}})})})})})})});wl.displayName=Lv;var qv="SelectItemAlignedPosition",$l=S.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=Kt(ur,r),a=Yt(ur,r),[i,c]=S.useState(null),[l,u]=S.useState(null),p=De(t,E=>u(E)),h=Xn(r),v=S.useRef(!1),x=S.useRef(!0),{viewport:y,selectedItem:m,selectedItemText:_,focusSelectedItem:f}=a,b=S.useCallback(()=>{if(o.trigger&&o.valueNode&&i&&l&&y&&m&&_){const E=o.trigger.getBoundingClientRect(),j=l.getBoundingClientRect(),O=o.valueNode.getBoundingClientRect(),z=_.getBoundingClientRect();if(o.dir!=="rtl"){const A=z.left-j.left,T=O.left-A,G=E.left-T,J=E.width+G,ie=Math.max(J,j.width),ge=window.innerWidth-pt,ze=ec(T,[pt,Math.max(pt,ge-ie)]);i.style.minWidth=J+"px",i.style.left=ze+"px"}else{const A=j.right-z.right,T=window.innerWidth-O.right-A,G=window.innerWidth-E.right-T,J=E.width+G,ie=Math.max(J,j.width),ge=window.innerWidth-pt,ze=ec(T,[pt,Math.max(pt,ge-ie)]);i.style.minWidth=J+"px",i.style.right=ze+"px"}const D=h(),V=window.innerHeight-pt*2,U=y.scrollHeight,W=window.getComputedStyle(l),ee=parseInt(W.borderTopWidth,10),K=parseInt(W.paddingTop,10),se=parseInt(W.borderBottomWidth,10),L=parseInt(W.paddingBottom,10),he=ee+K+U+L+se,H=Math.min(m.offsetHeight*5,he),C=window.getComputedStyle(y),M=parseInt(C.paddingTop,10),P=parseInt(C.paddingBottom,10),k=E.top+E.height/2-pt,N=V-k,q=m.offsetHeight/2,F=m.offsetTop+q,Y=ee+K+F,de=he-Y;if(Y<=k){const A=D.length>0&&m===D[D.length-1].ref.current;i.style.bottom="0px";const T=l.clientHeight-y.offsetTop-y.offsetHeight,G=Math.max(N,q+(A?P:0)+T+se),J=Y+G;i.style.height=J+"px"}else{const A=D.length>0&&m===D[0].ref.current;i.style.top="0px";const G=Math.max(k,ee+y.offsetTop+(A?M:0)+q)+de;i.style.height=G+"px",y.scrollTop=Y-k+y.offsetTop}i.style.margin=`${pt}px 0`,i.style.minHeight=H+"px",i.style.maxHeight=V+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[h,o.trigger,o.valueNode,i,l,y,m,_,o.dir,n]);Ye(()=>b(),[b]);const[w,g]=S.useState();Ye(()=>{l&&g(window.getComputedStyle(l).zIndex)},[l]);const $=S.useCallback(E=>{E&&x.current===!0&&(b(),f==null||f(),x.current=!1)},[b,f]);return d.jsx(Bv,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:v,onScrollButtonChange:$,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:d.jsx(je.div,{...s,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});$l.displayName=qv;var Uv="SelectPopperPosition",xa=S.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=pt,...o}=e,a=Qn(r);return d.jsx(Kc,{...a,...o,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});xa.displayName=Uv;var[Bv,wa]=Rr(ur,{}),$a="SelectViewport",Sl=S.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=Yt($a,r),a=wa($a,r),i=De(t,o.onViewportChange),c=S.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),d.jsx(Jn.Slot,{scope:r,children:d.jsx(je.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:be(s.onScroll,l=>{const u=l.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:h}=a;if(h!=null&&h.current&&p){const v=Math.abs(c.current-u.scrollTop);if(v>0){const x=window.innerHeight-pt*2,y=parseFloat(p.style.minHeight),m=parseFloat(p.style.height),_=Math.max(y,m);if(_<x){const f=_+v,b=Math.min(x,f),w=f-b;p.style.height=b+"px",p.style.bottom==="0px"&&(u.scrollTop=w>0?w:0,p.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});Sl.displayName=$a;var El="SelectGroup",[Wv,Hv]=Rr(El),Gv=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Ht();return d.jsx(Wv,{scope:r,id:s,children:d.jsx(je.div,{role:"group","aria-labelledby":s,...n,ref:t})})});Gv.displayName=El;var kl="SelectLabel",Zv=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Hv(kl,r);return d.jsx(je.div,{id:s.id,...n,ref:t})});Zv.displayName=kl;var es="SelectItem",[Kv,Cl]=Rr(es),jl=S.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:o,...a}=e,i=Kt(es,r),c=Yt(es,r),l=i.value===n,[u,p]=S.useState(o??""),[h,v]=S.useState(!1),x=De(t,f=>{var b;return(b=c.itemRefCallback)==null?void 0:b.call(c,f,n,s)}),y=Ht(),m=S.useRef("touch"),_=()=>{s||(i.onValueChange(n),i.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Kv,{scope:r,value:n,disabled:s,textId:y,isSelected:l,onItemTextChange:S.useCallback(f=>{p(b=>b||((f==null?void 0:f.textContent)??"").trim())},[]),children:d.jsx(Jn.ItemSlot,{scope:r,value:n,disabled:s,textValue:u,children:d.jsx(je.div,{role:"option","aria-labelledby":y,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...a,ref:x,onFocus:be(a.onFocus,()=>v(!0)),onBlur:be(a.onBlur,()=>v(!1)),onClick:be(a.onClick,()=>{m.current!=="mouse"&&_()}),onPointerUp:be(a.onPointerUp,()=>{m.current==="mouse"&&_()}),onPointerDown:be(a.onPointerDown,f=>{m.current=f.pointerType}),onPointerMove:be(a.onPointerMove,f=>{var b;m.current=f.pointerType,s?(b=c.onItemLeave)==null||b.call(c):m.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(a.onPointerLeave,f=>{var b;f.currentTarget===document.activeElement&&((b=c.onItemLeave)==null||b.call(c))}),onKeyDown:be(a.onKeyDown,f=>{var w;((w=c.searchRef)==null?void 0:w.current)!==""&&f.key===" "||(Tv.includes(f.key)&&_(),f.key===" "&&f.preventDefault())})})})})});jl.displayName=es;var cn="SelectItemText",Nl=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,a=Kt(cn,r),i=Yt(cn,r),c=Cl(cn,r),l=Mv(cn,r),[u,p]=S.useState(null),h=De(t,_=>p(_),c.onItemTextChange,_=>{var f;return(f=i.itemTextRefCallback)==null?void 0:f.call(i,_,c.value,c.disabled)}),v=u==null?void 0:u.textContent,x=S.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:y,onNativeOptionRemove:m}=l;return Ye(()=>(y(x),()=>m(x)),[y,m,x]),d.jsxs(d.Fragment,{children:[d.jsx(je.span,{id:c.textId,...o,ref:h}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?$n.createPortal(o.children,a.valueNode):null]})});Nl.displayName=cn;var Rl="SelectItemIndicator",Al=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return Cl(Rl,r).isSelected?d.jsx(je.span,{"aria-hidden":!0,...n,ref:t}):null});Al.displayName=Rl;var Sa="SelectScrollUpButton",Pl=S.forwardRef((e,t)=>{const r=Yt(Sa,e.__scopeSelect),n=wa(Sa,e.__scopeSelect),[s,o]=S.useState(!1),a=De(t,n.onScrollButtonChange);return Ye(()=>{if(r.viewport&&r.isPositioned){let i=function(){const l=c.scrollTop>0;o(l)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),s?d.jsx(Ol,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop-c.offsetHeight)}}):null});Pl.displayName=Sa;var Ea="SelectScrollDownButton",Tl=S.forwardRef((e,t)=>{const r=Yt(Ea,e.__scopeSelect),n=wa(Ea,e.__scopeSelect),[s,o]=S.useState(!1),a=De(t,n.onScrollButtonChange);return Ye(()=>{if(r.viewport&&r.isPositioned){let i=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;o(u)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),s?d.jsx(Ol,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop+c.offsetHeight)}}):null});Tl.displayName=Ea;var Ol=S.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=Yt("SelectScrollButton",r),a=S.useRef(null),i=Xn(r),c=S.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return S.useEffect(()=>()=>c(),[c]),Ye(()=>{var u;const l=i().find(p=>p.ref.current===document.activeElement);(u=l==null?void 0:l.ref.current)==null||u.scrollIntoView({block:"nearest"})},[i]),d.jsx(je.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:be(s.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:be(s.onPointerMove,()=>{var l;(l=o.onItemLeave)==null||l.call(o),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:be(s.onPointerLeave,()=>{c()})})}),Yv="SelectSeparator",Jv=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return d.jsx(je.div,{"aria-hidden":!0,...n,ref:t})});Jv.displayName=Yv;var ka="SelectArrow",Xv=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Qn(r),o=Kt(ka,r),a=Yt(ka,r);return o.open&&a.position==="popper"?d.jsx(Yc,{...s,...n,ref:t}):null});Xv.displayName=ka;var Qv="SelectBubbleInput",Il=S.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const s=S.useRef(null),o=De(n,s),a=ha(t);return S.useEffect(()=>{const i=s.current;if(!i)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&u){const p=new Event("change",{bubbles:!0});u.call(i,t),i.dispatchEvent(p)}},[a,t]),d.jsx(je.select,{...r,style:{...Jc,...r.style},ref:o,defaultValue:t})});Il.displayName=Qv;function Dl(e){return e===""||e===void 0}function Ml(e){const t=Bt(e),r=S.useRef(""),n=S.useRef(0),s=S.useCallback(a=>{const i=r.current+a;t(i),(function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))})(i)},[t]),o=S.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function Vl(e,t,r){const s=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let a=ey(e,Math.max(o,0));s.length===1&&(a=a.filter(l=>l!==r));const c=a.find(l=>l.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function ey(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var ty=ml,ry=pl,ny=vl,sy=yl,oy=bl,ay=_l,iy=Sl,cy=jl,ly=Nl,uy=Al,dy=Pl,fy=Tl;/**
|
|
62
|
+
`)},jv=0,Nr=[];function Nv(e){var t=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),s=S.useState(jv++)[0],o=S.useState(ol)[0],a=S.useRef(e);S.useEffect(function(){a.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var y=Yg([e.lockRef.current],(e.shards||[]).map(fl),!0).filter(Boolean);return y.forEach(function(m){return m.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var i=S.useCallback(function(y,m){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!a.current.allowPinchZoom;var _=Yn(y),f=r.current,b="deltaX"in y?y.deltaX:f[0]-_[0],x="deltaY"in y?y.deltaY:f[1]-_[1],g,$=y.target,E=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in y&&E==="h"&&$.type==="range")return!1;var j=cl(E,$);if(!j)return!0;if(j?g=E:(g=E==="v"?"h":"v",j=cl(E,$)),!j)return!1;if(!n.current&&"changedTouches"in y&&(b||x)&&(n.current=g),!g)return!0;var I=n.current||g;return Ev(I,m,y,I==="h"?b:x)},[]),c=S.useCallback(function(y){var m=y;if(!(!Nr.length||Nr[Nr.length-1]!==o)){var _="deltaY"in m?dl(m):Yn(m),f=t.current.filter(function(g){return g.name===m.type&&(g.target===m.target||m.target===g.shadowParent)&&kv(g.delta,_)})[0];if(f&&f.should){m.cancelable&&m.preventDefault();return}if(!f){var b=(a.current.shards||[]).map(fl).filter(Boolean).filter(function(g){return g.contains(m.target)}),x=b.length>0?i(m,b[0]):!a.current.noIsolation;x&&m.cancelable&&m.preventDefault()}}},[]),l=S.useCallback(function(y,m,_,f){var b={name:y,delta:m,target:_,should:f,shadowParent:Rv(_)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(x){return x!==b})},1)},[]),u=S.useCallback(function(y){r.current=Yn(y),n.current=void 0},[]),h=S.useCallback(function(y){l(y.type,dl(y),y.target,i(y,e.lockRef.current))},[]),p=S.useCallback(function(y){l(y.type,Yn(y),y.target,i(y,e.lockRef.current))},[]);S.useEffect(function(){return Nr.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",c,jr),document.addEventListener("touchmove",c,jr),document.addEventListener("touchstart",u,jr),function(){Nr=Nr.filter(function(y){return y!==o}),document.removeEventListener("wheel",c,jr),document.removeEventListener("touchmove",c,jr),document.removeEventListener("touchstart",u,jr)}},[]);var v=e.removeScrollBar,w=e.inert;return S.createElement(S.Fragment,null,w?S.createElement(o,{styles:Cv(s)}):null,v?S.createElement(yv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Rv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Av=ov(sl,Nv);var _a=S.forwardRef(function(e,t){return S.createElement(Zn,kt({},e,{ref:t,sideCar:Av}))});_a.classNames=Zn.classNames;var Pv=[" ","Enter","ArrowUp","ArrowDown"],Tv=[" ","Enter"],lr="Select",[Jn,Xn,Ov]=nc(lr),[Rr]=xt(lr,[Ov,qn]),Qn=qn(),[Iv,Kt]=Rr(lr),[Dv,Mv]=Rr(lr),ml=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:o,value:a,defaultValue:i,onValueChange:c,dir:l,name:u,autoComplete:h,disabled:p,required:v,form:w}=e,y=Qn(t),[m,_]=S.useState(null),[f,b]=S.useState(null),[x,g]=S.useState(!1),$=Zo(l),[E,j]=cr({prop:n,defaultProp:s??!1,onChange:o,caller:lr}),[I,U]=cr({prop:a,defaultProp:i,onChange:c,caller:lr}),D=S.useRef(null),V=m?w||!!m.closest("form"):!0,[q,W]=S.useState(new Set),ee=Array.from(q).map(K=>K.props.value).join(";");return d.jsx(Gc,{...y,children:d.jsxs(Iv,{required:v,scope:t,trigger:m,onTriggerChange:_,valueNode:f,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:g,contentId:Ht(),value:I,onValueChange:U,open:E,onOpenChange:j,dir:$,triggerPointerDownPosRef:D,disabled:p,children:[d.jsx(Jn.Provider,{scope:t,children:d.jsx(Dv,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(K=>{W(se=>new Set(se).add(K))},[]),onNativeOptionRemove:S.useCallback(K=>{W(se=>{const L=new Set(se);return L.delete(K),L})},[]),children:r})}),V?d.jsxs(Il,{"aria-hidden":!0,required:v,tabIndex:-1,name:u,autoComplete:h,value:I,onChange:K=>U(K.target.value),disabled:p,form:w,children:[I===void 0?d.jsx("option",{value:""}):null,Array.from(q)]},ee):null]})})};ml.displayName=lr;var hl="SelectTrigger",pl=S.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,o=Qn(r),a=Kt(hl,r),i=a.disabled||n,c=De(t,a.onTriggerChange),l=Xn(r),u=S.useRef("touch"),[h,p,v]=Ml(y=>{const m=l().filter(b=>!b.disabled),_=m.find(b=>b.value===a.value),f=Vl(m,y,_);f!==void 0&&a.onValueChange(f.value)}),w=y=>{i||(a.onOpenChange(!0),v()),y&&(a.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return d.jsx(Zc,{asChild:!0,...o,children:d.jsx(je.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Dl(a.value)?"":void 0,...s,ref:c,onClick:be(s.onClick,y=>{y.currentTarget.focus(),u.current!=="mouse"&&w(y)}),onPointerDown:be(s.onPointerDown,y=>{u.current=y.pointerType;const m=y.target;m.hasPointerCapture(y.pointerId)&&m.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(w(y),y.preventDefault())}),onKeyDown:be(s.onKeyDown,y=>{const m=h.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&p(y.key),!(m&&y.key===" ")&&Pv.includes(y.key)&&(w(),y.preventDefault())})})})});pl.displayName=hl;var gl="SelectValue",vl=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:a="",...i}=e,c=Kt(gl,r),{onValueNodeHasChildrenChange:l}=c,u=o!==void 0,h=De(t,c.onValueNodeChange);return Ye(()=>{l(u)},[l,u]),d.jsx(je.span,{...i,ref:h,style:{pointerEvents:"none"},children:Dl(c.value)?d.jsx(d.Fragment,{children:a}):o})});vl.displayName=gl;var Vv="SelectIcon",yl=S.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return d.jsx(je.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});yl.displayName=Vv;var Fv="SelectPortal",bl=e=>d.jsx(Un,{asChild:!0,...e});bl.displayName=Fv;var ur="SelectContent",_l=S.forwardRef((e,t)=>{const r=Kt(ur,e.__scopeSelect),[n,s]=S.useState();if(Ye(()=>{s(new DocumentFragment)},[]),!r.open){const o=n;return o?$n.createPortal(d.jsx(xl,{scope:e.__scopeSelect,children:d.jsx(Jn.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),o):null}return d.jsx(wl,{...e,ref:t})});_l.displayName=ur;var pt=10,[xl,Yt]=Rr(ur),Lv="SelectContentImpl",zv=Dg("SelectContent.RemoveScroll"),wl=S.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:a,side:i,sideOffset:c,align:l,alignOffset:u,arrowPadding:h,collisionBoundary:p,collisionPadding:v,sticky:w,hideWhenDetached:y,avoidCollisions:m,..._}=e,f=Kt(ur,r),[b,x]=S.useState(null),[g,$]=S.useState(null),E=De(t,F=>x(F)),[j,I]=S.useState(null),[U,D]=S.useState(null),V=Xn(r),[q,W]=S.useState(!1),ee=S.useRef(!1);S.useEffect(()=>{if(b)return el(b)},[b]),cc();const K=S.useCallback(F=>{const[Y,...de]=V().map(T=>T.ref.current),[oe]=de.slice(-1),A=document.activeElement;for(const T of F)if(T===A||(T==null||T.scrollIntoView({block:"nearest"}),T===Y&&g&&(g.scrollTop=0),T===oe&&g&&(g.scrollTop=g.scrollHeight),T==null||T.focus(),document.activeElement!==A))return},[V,g]),se=S.useCallback(()=>K([j,b]),[K,j,b]);S.useEffect(()=>{q&&se()},[q,se]);const{onOpenChange:L,triggerPointerDownPosRef:he}=f;S.useEffect(()=>{if(b){let F={x:0,y:0};const Y=oe=>{var A,T;F={x:Math.abs(Math.round(oe.pageX)-(((A=he.current)==null?void 0:A.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((T=he.current)==null?void 0:T.y)??0))}},de=oe=>{F.x<=10&&F.y<=10?oe.preventDefault():b.contains(oe.target)||L(!1),document.removeEventListener("pointermove",Y),he.current=null};return he.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",de,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",de,{capture:!0})}}},[b,L,he]),S.useEffect(()=>{const F=()=>L(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[L]);const[H,C]=Ml(F=>{const Y=V().filter(A=>!A.disabled),de=Y.find(A=>A.ref.current===document.activeElement),oe=Vl(Y,F,de);oe&&setTimeout(()=>oe.ref.current.focus())}),M=S.useCallback((F,Y,de)=>{const oe=!ee.current&&!de;(f.value!==void 0&&f.value===Y||oe)&&(I(F),oe&&(ee.current=!0))},[f.value]),P=S.useCallback(()=>b==null?void 0:b.focus(),[b]),k=S.useCallback((F,Y,de)=>{const oe=!ee.current&&!de;(f.value!==void 0&&f.value===Y||oe)&&D(F)},[f.value]),N=n==="popper"?xa:$l,z=N===xa?{side:i,sideOffset:c,align:l,alignOffset:u,arrowPadding:h,collisionBoundary:p,collisionPadding:v,sticky:w,hideWhenDetached:y,avoidCollisions:m}:{};return d.jsx(xl,{scope:r,content:b,viewport:g,onViewportChange:$,itemRefCallback:M,selectedItem:j,onItemLeave:P,itemTextRefCallback:k,focusSelectedItem:se,selectedItemText:U,position:n,isPositioned:q,searchRef:H,children:d.jsx(_a,{as:zv,allowPinchZoom:!0,children:d.jsx(Qo,{asChild:!0,trapped:f.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:be(s,F=>{var Y;(Y=f.trigger)==null||Y.focus({preventScroll:!0}),F.preventDefault()}),children:d.jsx(An,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>f.onOpenChange(!1),children:d.jsx(N,{role:"listbox",id:f.contentId,"data-state":f.open?"open":"closed",dir:f.dir,onContextMenu:F=>F.preventDefault(),..._,...z,onPlaced:()=>W(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:be(_.onKeyDown,F=>{const Y=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!Y&&F.key.length===1&&C(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let oe=V().filter(A=>!A.disabled).map(A=>A.ref.current);if(["ArrowUp","End"].includes(F.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const A=F.target,T=oe.indexOf(A);oe=oe.slice(T+1)}setTimeout(()=>K(oe)),F.preventDefault()}})})})})})})});wl.displayName=Lv;var qv="SelectItemAlignedPosition",$l=S.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=Kt(ur,r),a=Yt(ur,r),[i,c]=S.useState(null),[l,u]=S.useState(null),h=De(t,E=>u(E)),p=Xn(r),v=S.useRef(!1),w=S.useRef(!0),{viewport:y,selectedItem:m,selectedItemText:_,focusSelectedItem:f}=a,b=S.useCallback(()=>{if(o.trigger&&o.valueNode&&i&&l&&y&&m&&_){const E=o.trigger.getBoundingClientRect(),j=l.getBoundingClientRect(),I=o.valueNode.getBoundingClientRect(),U=_.getBoundingClientRect();if(o.dir!=="rtl"){const A=U.left-j.left,T=I.left-A,G=E.left-T,J=E.width+G,ie=Math.max(J,j.width),ge=window.innerWidth-pt,ze=ec(T,[pt,Math.max(pt,ge-ie)]);i.style.minWidth=J+"px",i.style.left=ze+"px"}else{const A=j.right-U.right,T=window.innerWidth-I.right-A,G=window.innerWidth-E.right-T,J=E.width+G,ie=Math.max(J,j.width),ge=window.innerWidth-pt,ze=ec(T,[pt,Math.max(pt,ge-ie)]);i.style.minWidth=J+"px",i.style.right=ze+"px"}const D=p(),V=window.innerHeight-pt*2,q=y.scrollHeight,W=window.getComputedStyle(l),ee=parseInt(W.borderTopWidth,10),K=parseInt(W.paddingTop,10),se=parseInt(W.borderBottomWidth,10),L=parseInt(W.paddingBottom,10),he=ee+K+q+L+se,H=Math.min(m.offsetHeight*5,he),C=window.getComputedStyle(y),M=parseInt(C.paddingTop,10),P=parseInt(C.paddingBottom,10),k=E.top+E.height/2-pt,N=V-k,z=m.offsetHeight/2,F=m.offsetTop+z,Y=ee+K+F,de=he-Y;if(Y<=k){const A=D.length>0&&m===D[D.length-1].ref.current;i.style.bottom="0px";const T=l.clientHeight-y.offsetTop-y.offsetHeight,G=Math.max(N,z+(A?P:0)+T+se),J=Y+G;i.style.height=J+"px"}else{const A=D.length>0&&m===D[0].ref.current;i.style.top="0px";const G=Math.max(k,ee+y.offsetTop+(A?M:0)+z)+de;i.style.height=G+"px",y.scrollTop=Y-k+y.offsetTop}i.style.margin=`${pt}px 0`,i.style.minHeight=H+"px",i.style.maxHeight=V+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[p,o.trigger,o.valueNode,i,l,y,m,_,o.dir,n]);Ye(()=>b(),[b]);const[x,g]=S.useState();Ye(()=>{l&&g(window.getComputedStyle(l).zIndex)},[l]);const $=S.useCallback(E=>{E&&w.current===!0&&(b(),f==null||f(),w.current=!1)},[b,f]);return d.jsx(Bv,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:v,onScrollButtonChange:$,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:d.jsx(je.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});$l.displayName=qv;var Uv="SelectPopperPosition",xa=S.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=pt,...o}=e,a=Qn(r);return d.jsx(Kc,{...a,...o,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});xa.displayName=Uv;var[Bv,wa]=Rr(ur,{}),$a="SelectViewport",Sl=S.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=Yt($a,r),a=wa($a,r),i=De(t,o.onViewportChange),c=S.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),d.jsx(Jn.Slot,{scope:r,children:d.jsx(je.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:be(s.onScroll,l=>{const u=l.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:p}=a;if(p!=null&&p.current&&h){const v=Math.abs(c.current-u.scrollTop);if(v>0){const w=window.innerHeight-pt*2,y=parseFloat(h.style.minHeight),m=parseFloat(h.style.height),_=Math.max(y,m);if(_<w){const f=_+v,b=Math.min(w,f),x=f-b;h.style.height=b+"px",h.style.bottom==="0px"&&(u.scrollTop=x>0?x:0,h.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});Sl.displayName=$a;var El="SelectGroup",[Wv,Hv]=Rr(El),Gv=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Ht();return d.jsx(Wv,{scope:r,id:s,children:d.jsx(je.div,{role:"group","aria-labelledby":s,...n,ref:t})})});Gv.displayName=El;var kl="SelectLabel",Zv=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Hv(kl,r);return d.jsx(je.div,{id:s.id,...n,ref:t})});Zv.displayName=kl;var es="SelectItem",[Kv,Cl]=Rr(es),jl=S.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:o,...a}=e,i=Kt(es,r),c=Yt(es,r),l=i.value===n,[u,h]=S.useState(o??""),[p,v]=S.useState(!1),w=De(t,f=>{var b;return(b=c.itemRefCallback)==null?void 0:b.call(c,f,n,s)}),y=Ht(),m=S.useRef("touch"),_=()=>{s||(i.onValueChange(n),i.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Kv,{scope:r,value:n,disabled:s,textId:y,isSelected:l,onItemTextChange:S.useCallback(f=>{h(b=>b||((f==null?void 0:f.textContent)??"").trim())},[]),children:d.jsx(Jn.ItemSlot,{scope:r,value:n,disabled:s,textValue:u,children:d.jsx(je.div,{role:"option","aria-labelledby":y,"data-highlighted":p?"":void 0,"aria-selected":l&&p,"data-state":l?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...a,ref:w,onFocus:be(a.onFocus,()=>v(!0)),onBlur:be(a.onBlur,()=>v(!1)),onClick:be(a.onClick,()=>{m.current!=="mouse"&&_()}),onPointerUp:be(a.onPointerUp,()=>{m.current==="mouse"&&_()}),onPointerDown:be(a.onPointerDown,f=>{m.current=f.pointerType}),onPointerMove:be(a.onPointerMove,f=>{var b;m.current=f.pointerType,s?(b=c.onItemLeave)==null||b.call(c):m.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(a.onPointerLeave,f=>{var b;f.currentTarget===document.activeElement&&((b=c.onItemLeave)==null||b.call(c))}),onKeyDown:be(a.onKeyDown,f=>{var x;((x=c.searchRef)==null?void 0:x.current)!==""&&f.key===" "||(Tv.includes(f.key)&&_(),f.key===" "&&f.preventDefault())})})})})});jl.displayName=es;var cn="SelectItemText",Nl=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,a=Kt(cn,r),i=Yt(cn,r),c=Cl(cn,r),l=Mv(cn,r),[u,h]=S.useState(null),p=De(t,_=>h(_),c.onItemTextChange,_=>{var f;return(f=i.itemTextRefCallback)==null?void 0:f.call(i,_,c.value,c.disabled)}),v=u==null?void 0:u.textContent,w=S.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:y,onNativeOptionRemove:m}=l;return Ye(()=>(y(w),()=>m(w)),[y,m,w]),d.jsxs(d.Fragment,{children:[d.jsx(je.span,{id:c.textId,...o,ref:p}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?$n.createPortal(o.children,a.valueNode):null]})});Nl.displayName=cn;var Rl="SelectItemIndicator",Al=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return Cl(Rl,r).isSelected?d.jsx(je.span,{"aria-hidden":!0,...n,ref:t}):null});Al.displayName=Rl;var Sa="SelectScrollUpButton",Pl=S.forwardRef((e,t)=>{const r=Yt(Sa,e.__scopeSelect),n=wa(Sa,e.__scopeSelect),[s,o]=S.useState(!1),a=De(t,n.onScrollButtonChange);return Ye(()=>{if(r.viewport&&r.isPositioned){let i=function(){const l=c.scrollTop>0;o(l)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),s?d.jsx(Ol,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop-c.offsetHeight)}}):null});Pl.displayName=Sa;var Ea="SelectScrollDownButton",Tl=S.forwardRef((e,t)=>{const r=Yt(Ea,e.__scopeSelect),n=wa(Ea,e.__scopeSelect),[s,o]=S.useState(!1),a=De(t,n.onScrollButtonChange);return Ye(()=>{if(r.viewport&&r.isPositioned){let i=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;o(u)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),s?d.jsx(Ol,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop+c.offsetHeight)}}):null});Tl.displayName=Ea;var Ol=S.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=Yt("SelectScrollButton",r),a=S.useRef(null),i=Xn(r),c=S.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return S.useEffect(()=>()=>c(),[c]),Ye(()=>{var u;const l=i().find(h=>h.ref.current===document.activeElement);(u=l==null?void 0:l.ref.current)==null||u.scrollIntoView({block:"nearest"})},[i]),d.jsx(je.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:be(s.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:be(s.onPointerMove,()=>{var l;(l=o.onItemLeave)==null||l.call(o),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:be(s.onPointerLeave,()=>{c()})})}),Yv="SelectSeparator",Jv=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return d.jsx(je.div,{"aria-hidden":!0,...n,ref:t})});Jv.displayName=Yv;var ka="SelectArrow",Xv=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Qn(r),o=Kt(ka,r),a=Yt(ka,r);return o.open&&a.position==="popper"?d.jsx(Yc,{...s,...n,ref:t}):null});Xv.displayName=ka;var Qv="SelectBubbleInput",Il=S.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const s=S.useRef(null),o=De(n,s),a=ha(t);return S.useEffect(()=>{const i=s.current;if(!i)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&u){const h=new Event("change",{bubbles:!0});u.call(i,t),i.dispatchEvent(h)}},[a,t]),d.jsx(je.select,{...r,style:{...Jc,...r.style},ref:o,defaultValue:t})});Il.displayName=Qv;function Dl(e){return e===""||e===void 0}function Ml(e){const t=Bt(e),r=S.useRef(""),n=S.useRef(0),s=S.useCallback(a=>{const i=r.current+a;t(i),(function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))})(i)},[t]),o=S.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function Vl(e,t,r){const s=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let a=ey(e,Math.max(o,0));s.length===1&&(a=a.filter(l=>l!==r));const c=a.find(l=>l.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function ey(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var ty=ml,ry=pl,ny=vl,sy=yl,oy=bl,ay=_l,iy=Sl,cy=jl,ly=Nl,uy=Al,dy=Pl,fy=Tl;/**
|
|
63
63
|
* @license lucide-react v0.525.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
@@ -124,7 +124,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
124
124
|
*
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const Hl=Tt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Gl(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=Gl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Zl(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Gl(e))&&(n&&(n+=" "),n+=t);return n}const xy=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},wy=(e,t)=>({classGroupId:e,validator:t}),Kl=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),ts="-",Yl=[],$y="arbitrary..",Sy=e=>{const t=ky(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Ey(a);const i=a.split(ts),c=i[0]===""&&i.length>1?1:0;return Jl(i,c,t)},getConflictingClassGroupIds:(a,i)=>{if(i){const c=n[a],l=r[a];return c?l?xy(l,c):c:l||Yl}return r[a]||Yl}}},Jl=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const s=e[t],o=r.nextPart.get(s);if(o){const l=Jl(e,t+1,o);if(l)return l}const a=r.validators;if(a===null)return;const i=t===0?e.join(ts):e.slice(t).join(ts),c=a.length;for(let l=0;l<c;l++){const u=a[l];if(u.validator(i))return u.classGroupId}},Ey=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?$y+n:void 0})(),ky=e=>{const{theme:t,classGroups:r}=e;return Cy(r,t)},Cy=(e,t)=>{const r=Kl();for(const n in e){const s=e[n];Ca(s,r,n,t)}return r},Ca=(e,t,r,n)=>{const s=e.length;for(let o=0;o<s;o++){const a=e[o];jy(a,t,r,n)}},jy=(e,t,r,n)=>{if(typeof e=="string"){Ny(e,t,r);return}if(typeof e=="function"){Ry(e,t,r,n);return}Ay(e,t,r,n)},Ny=(e,t,r)=>{const n=e===""?t:Xl(t,e);n.classGroupId=r},Ry=(e,t,r,n)=>{if(Py(e)){Ca(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(wy(r,e))},Ay=(e,t,r,n)=>{const s=Object.entries(e),o=s.length;for(let a=0;a<o;a++){const[i,c]=s[a];Ca(c,Xl(t,i),r,n)}},Xl=(e,t)=>{let r=e;const n=t.split(ts),s=n.length;for(let o=0;o<s;o++){const a=n[o];let i=r.nextPart.get(a);i||(i=Kl(),r.nextPart.set(a,i)),r=i}return r},Py=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ty=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const s=(o,a)=>{r[o]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(o){let a=r[o];if(a!==void 0)return a;if((a=n[o])!==void 0)return s(o,a),a},set(o,a){o in r?r[o]=a:s(o,a)}}},ja="!",Ql=":",Oy=[],eu=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),Iy=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const o=[];let a=0,i=0,c=0,l;const u=s.length;for(let y=0;y<u;y++){const m=s[y];if(a===0&&i===0){if(m===Ql){o.push(s.slice(c,y)),c=y+1;continue}if(m==="/"){l=y;continue}}m==="["?a++:m==="]"?a--:m==="("?i++:m===")"&&i--}const p=o.length===0?s:s.slice(c);let h=p,v=!1;p.endsWith(ja)?(h=p.slice(0,-1),v=!0):p.startsWith(ja)&&(h=p.slice(1),v=!0);const x=l&&l>c?l-c:void 0;return eu(o,v,h,x)};if(t){const s=t+Ql,o=n;n=a=>a.startsWith(s)?o(a.slice(s.length)):eu(Oy,!1,a,void 0,!0)}if(r){const s=n;n=o=>r({className:o,parseClassName:s})}return n},Dy=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let s=[];for(let o=0;o<r.length;o++){const a=r[o],i=a[0]==="[",c=t.has(a);i||c?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(a)):s.push(a)}return s.length>0&&(s.sort(),n.push(...s)),n}},My=e=>({cache:Ty(e.cacheSize),parseClassName:Iy(e),sortModifiers:Dy(e),...Sy(e)}),Vy=/\s+/,Fy=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:o}=t,a=[],i=e.trim().split(Vy);let c="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{isExternal:p,modifiers:h,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:y}=r(u);if(p){c=u+(c.length>0?" "+c:c);continue}let m=!!y,_=n(m?x.substring(0,y):x);if(!_){if(!m){c=u+(c.length>0?" "+c:c);continue}if(_=n(x),!_){c=u+(c.length>0?" "+c:c);continue}m=!1}const f=h.length===0?"":h.length===1?h[0]:o(h).join(":"),b=v?f+ja:f,w=b+_;if(a.indexOf(w)>-1)continue;a.push(w);const g=s(_,m);for(let $=0;$<g.length;++$){const E=g[$];a.push(b+E)}c=u+(c.length>0?" "+c:c)}return c},Ly=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=tu(r))&&(s&&(s+=" "),s+=n);return s},tu=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=tu(e[n]))&&(r&&(r+=" "),r+=t);return r},zy=(e,...t)=>{let r,n,s,o;const a=c=>{const l=t.reduce((u,p)=>p(u),e());return r=My(l),n=r.cache.get,s=r.cache.set,o=i,i(c)},i=c=>{const l=n(c);if(l)return l;const u=Fy(c,r);return s(c,u),u};return o=a,(...c)=>o(Ly(...c))},qy=[],He=e=>{const t=r=>r[e]||qy;return t.isThemeGetter=!0,t},ru=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Uy=/^\d+\/\d+$/,By=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Wy=/\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$/,Hy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Gy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ar=e=>Uy.test(e),Se=e=>!!e&&!Number.isNaN(Number(e)),Jt=e=>!!e&&Number.isInteger(Number(e)),Na=e=>e.endsWith("%")&&Se(e.slice(0,-1)),Ot=e=>By.test(e),Ky=()=>!0,Yy=e=>Wy.test(e)&&!Hy.test(e),su=()=>!1,Jy=e=>Gy.test(e),Xy=e=>Zy.test(e),Qy=e=>!ce(e)&&!le(e),eb=e=>Pr(e,lu,su),ce=e=>ru.test(e),dr=e=>Pr(e,uu,Yy),Ra=e=>Pr(e,ob,Se),ou=e=>Pr(e,iu,su),tb=e=>Pr(e,cu,Xy),rs=e=>Pr(e,du,Jy),le=e=>nu.test(e),ln=e=>Tr(e,uu),rb=e=>Tr(e,ab),au=e=>Tr(e,iu),nb=e=>Tr(e,lu),sb=e=>Tr(e,cu),ns=e=>Tr(e,du,!0),Pr=(e,t,r)=>{const n=ru.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Tr=(e,t,r=!1)=>{const n=nu.exec(e);return n?n[1]?t(n[1]):r:!1},iu=e=>e==="position"||e==="percentage",cu=e=>e==="image"||e==="url",lu=e=>e==="length"||e==="size"||e==="bg-size",uu=e=>e==="length",ob=e=>e==="number",ab=e=>e==="family-name",du=e=>e==="shadow",ib=zy(()=>{const e=He("color"),t=He("font"),r=He("text"),n=He("font-weight"),s=He("tracking"),o=He("leading"),a=He("breakpoint"),i=He("container"),c=He("spacing"),l=He("radius"),u=He("shadow"),p=He("inset-shadow"),h=He("text-shadow"),v=He("drop-shadow"),x=He("blur"),y=He("perspective"),m=He("aspect"),_=He("ease"),f=He("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],g=()=>[...w(),le,ce],$=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],j=()=>[le,ce,c],O=()=>[Ar,"full","auto",...j()],z=()=>[Jt,"none","subgrid",le,ce],D=()=>["auto",{span:["full",Jt,le,ce]},Jt,le,ce],V=()=>[Jt,"auto",le,ce],U=()=>["auto","min","max","fr",le,ce],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...j()],se=()=>[Ar,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],L=()=>[e,le,ce],he=()=>[...w(),au,ou,{position:[le,ce]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",nb,eb,{size:[le,ce]}],M=()=>[Na,ln,dr],P=()=>["","none","full",l,le,ce],k=()=>["",Se,ln,dr],N=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>[Se,Na,au,ou],Y=()=>["","none",x,le,ce],de=()=>["none",Se,le,ce],oe=()=>["none",Se,le,ce],A=()=>[Se,le,ce],T=()=>[Ar,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ot],breakpoint:[Ot],color:[Ky],container:[Ot],"drop-shadow":[Ot],ease:["in","out","in-out"],font:[Qy],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ot],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ot],shadow:[Ot],spacing:["px",Se],text:[Ot],"text-shadow":[Ot],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ar,ce,le,m]}],container:["container"],columns:[{columns:[Se,ce,le,i]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:g()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[Jt,"auto",le,ce]}],basis:[{basis:[Ar,"full","auto",i,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Se,Ar,"auto","initial","none",ce]}],grow:[{grow:["",Se,le,ce]}],shrink:[{shrink:["",Se,le,ce]}],order:[{order:[Jt,"first","last","none",le,ce]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:se()}],w:[{w:[i,"screen",...se()]}],"min-w":[{"min-w":[i,"screen","none",...se()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...se()]}],h:[{h:["screen","lh",...se()]}],"min-h":[{"min-h":["screen","lh","none",...se()]}],"max-h":[{"max-h":["screen","lh",...se()]}],"font-size":[{text:["base",r,ln,dr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,le,Ra]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Na,ce]}],"font-family":[{font:[rb,ce,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,le,ce]}],"line-clamp":[{"line-clamp":[Se,"none",le,Ra]}],leading:[{leading:[o,...j()]}],"list-image":[{"list-image":["none",le,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:[Se,"from-font","auto",le,dr]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Se,"auto",le,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:he()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Jt,le,ce],radial:["",le,ce],conic:[Jt,le,ce]},sb,tb]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:M()}],"gradient-via-pos":[{via:M()}],"gradient-to-pos":[{to:M()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:k()}],"border-w-x":[{"border-x":k()}],"border-w-y":[{"border-y":k()}],"border-w-s":[{"border-s":k()}],"border-w-e":[{"border-e":k()}],"border-w-t":[{"border-t":k()}],"border-w-r":[{"border-r":k()}],"border-w-b":[{"border-b":k()}],"border-w-l":[{"border-l":k()}],"divide-x":[{"divide-x":k()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":k()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...N(),"hidden","none"]}],"divide-style":[{divide:[...N(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...N(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Se,le,ce]}],"outline-w":[{outline:["",Se,ln,dr]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",u,ns,rs]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",p,ns,rs]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Se,dr]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":k()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",h,ns,rs]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Se,le,ce]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Se]}],"mask-image-linear-from-pos":[{"mask-linear-from":F()}],"mask-image-linear-to-pos":[{"mask-linear-to":F()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":F()}],"mask-image-t-to-pos":[{"mask-t-to":F()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":F()}],"mask-image-r-to-pos":[{"mask-r-to":F()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":F()}],"mask-image-b-to-pos":[{"mask-b-to":F()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":F()}],"mask-image-l-to-pos":[{"mask-l-to":F()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":F()}],"mask-image-x-to-pos":[{"mask-x-to":F()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":F()}],"mask-image-y-to-pos":[{"mask-y-to":F()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[le,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":F()}],"mask-image-radial-to-pos":[{"mask-radial-to":F()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[Se]}],"mask-image-conic-from-pos":[{"mask-conic-from":F()}],"mask-image-conic-to-pos":[{"mask-conic-to":F()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:he()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,ce]}],filter:[{filter:["","none",le,ce]}],blur:[{blur:Y()}],brightness:[{brightness:[Se,le,ce]}],contrast:[{contrast:[Se,le,ce]}],"drop-shadow":[{"drop-shadow":["","none",v,ns,rs]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Se,le,ce]}],"hue-rotate":[{"hue-rotate":[Se,le,ce]}],invert:[{invert:["",Se,le,ce]}],saturate:[{saturate:[Se,le,ce]}],sepia:[{sepia:["",Se,le,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",le,ce]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[Se,le,ce]}],"backdrop-contrast":[{"backdrop-contrast":[Se,le,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Se,le,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Se,le,ce]}],"backdrop-invert":[{"backdrop-invert":["",Se,le,ce]}],"backdrop-opacity":[{"backdrop-opacity":[Se,le,ce]}],"backdrop-saturate":[{"backdrop-saturate":[Se,le,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Se,le,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Se,"initial",le,ce]}],ease:[{ease:["linear","initial",_,le,ce]}],delay:[{delay:[Se,le,ce]}],animate:[{animate:["none",f,le,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,le,ce]}],"perspective-origin":[{"perspective-origin":g()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[le,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:g()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:T()}],"translate-x":[{"translate-x":T()}],"translate-y":[{"translate-y":T()}],"translate-z":[{"translate-z":T()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,ce]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",le,ce]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Se,ln,dr,Ra]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function _e(...e){return ib(Zl(e))}function Or({...e}){return d.jsx(ty,{"data-slot":"select",...e})}function Ir({...e}){return d.jsx(ny,{"data-slot":"select-value",...e})}function Dr({className:e,size:t="default",children:r,...n}){return d.jsxs(ry,{"data-slot":"select-trigger","data-size":t,className:_e("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r,d.jsx(sy,{asChild:!0,children:d.jsx(ql,{className:"size-4 opacity-50"})})]})}function Mr({className:e,children:t,position:r="popper",...n}){return d.jsx(oy,{children:d.jsxs(ay,{"data-slot":"select-content",className:_e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[d.jsx(cb,{}),d.jsx(iy,{className:_e("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(lb,{})]})})}function Ct({className:e,children:t,...r}){return d.jsxs(cy,{"data-slot":"select-item",className:_e("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(uy,{children:d.jsx(zl,{className:"size-4"})})}),d.jsx(ly,{children:t})]})}function cb({className:e,...t}){return d.jsx(dy,{"data-slot":"select-scroll-up-button",className:_e("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(yy,{className:"size-4"})})}function lb({className:e,...t}){return d.jsx(fy,{"data-slot":"select-scroll-down-button",className:_e("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(ql,{className:"size-4"})})}const Te=Z.forwardRef(({className:e,type:t,...r},n)=>d.jsx("input",{type:t,"data-slot":"input",className:_e("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r}));Te.displayName="Input";var ub=Symbol.for("react.lazy"),ss=S[" use ".trim().toString()];function db(e){return typeof e=="object"&&e!==null&&"then"in e}function fu(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ub&&"_payload"in e&&db(e._payload)}function Aa(e){const t=fb(e),r=S.forwardRef((n,s)=>{let{children:o,...a}=n;fu(o)&&typeof ss=="function"&&(o=ss(o._payload));const i=S.Children.toArray(o),c=i.find(hb);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}var Pa=Aa("Slot");function fb(e){const t=S.forwardRef((r,n)=>{let{children:s,...o}=r;if(fu(s)&&typeof ss=="function"&&(s=ss(s._payload)),S.isValidElement(s)){const a=gb(s),i=pb(o,s.props);return s.type!==S.Fragment&&(i.ref=n?xr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mb=Symbol("radix.slottable");function hb(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mb}function pb(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function gb(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)}const mu=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hu=Zl,pu=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return hu(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,a=Object.keys(s).map(l=>{const u=r==null?void 0:r[l],p=o==null?void 0:o[l];if(u===null)return null;const h=mu(u)||mu(p);return s[l][h]}),i=r&&Object.entries(r).reduce((l,u)=>{let[p,h]=u;return h===void 0||(l[p]=h),l},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((l,u)=>{let{class:p,className:h,...v}=u;return Object.entries(v).every(x=>{let[y,m]=x;return Array.isArray(m)?m.includes({...o,...i}[y]):{...o,...i}[y]===m})?[...l,p,h]:l},[]);return hu(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)},Ta=pu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Xt=Z.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const a=n?Pa:"button";return d.jsx(a,{"data-slot":"button",ref:o,className:_e(Ta({variant:t,size:r,className:e})),...s})});function vb(e,t){return S.useReducer((r,n)=>t[r][n]??r,e)}var Qt=e=>{const{present:t,children:r}=e,n=yb(t),s=typeof r=="function"?r({present:n.isPresent}):S.Children.only(r),o=De(n.ref,bb(s));return typeof r=="function"||n.isPresent?S.cloneElement(s,{ref:o}):null};Qt.displayName="Presence";function yb(e){const[t,r]=S.useState(),n=S.useRef(null),s=S.useRef(e),o=S.useRef("none"),a=e?"mounted":"unmounted",[i,c]=vb(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const l=os(n.current);o.current=i==="mounted"?l:"none"},[i]),Ye(()=>{const l=n.current,u=s.current;if(u!==e){const h=o.current,v=os(l);e?c("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&h!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Ye(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,p=v=>{const y=os(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&y&&(c("ANIMATION_END"),!s.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=v=>{v.target===t&&(o.current=os(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:S.useCallback(l=>{n.current=l?getComputedStyle(l):null,r(l)},[])}}function os(e){return(e==null?void 0:e.animationName)||"none"}function bb(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 _b=Symbol("radix.slottable");function xb(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=_b,t}var[as]=xt("Tooltip",[qn]),is=qn(),gu="TooltipProvider",wb=700,Oa="tooltip.open",[$b,Ia]=as(gu),vu=e=>{const{__scopeTooltip:t,delayDuration:r=wb,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,a=S.useRef(!0),i=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),d.jsx($b,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:S.useCallback(l=>{i.current=l},[]),disableHoverableContent:s,children:o})};vu.displayName=gu;var un="Tooltip",[Sb,dn]=as(un),yu=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s,onOpenChange:o,disableHoverableContent:a,delayDuration:i}=e,c=Ia(un,e.__scopeTooltip),l=is(t),[u,p]=S.useState(null),h=Ht(),v=S.useRef(0),x=a??c.disableHoverableContent,y=i??c.delayDuration,m=S.useRef(!1),[_,f]=cr({prop:n,defaultProp:s??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Oa))):c.onClose(),o==null||o(E)},caller:un}),b=S.useMemo(()=>_?m.current?"delayed-open":"instant-open":"closed",[_]),w=S.useCallback(()=>{window.clearTimeout(v.current),v.current=0,m.current=!1,f(!0)},[f]),g=S.useCallback(()=>{window.clearTimeout(v.current),v.current=0,f(!1)},[f]),$=S.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{m.current=!0,f(!0),v.current=0},y)},[y,f]);return S.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),d.jsx(Gc,{...l,children:d.jsx(Sb,{scope:t,contentId:h,open:_,stateAttribute:b,trigger:u,onTriggerChange:p,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayedRef.current?$():w()},[c.isOpenDelayedRef,$,w]),onTriggerLeave:S.useCallback(()=>{x?g():(window.clearTimeout(v.current),v.current=0)},[g,x]),onOpen:w,onClose:g,disableHoverableContent:x,children:r})})};yu.displayName=un;var Da="TooltipTrigger",bu=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=dn(Da,r),o=Ia(Da,r),a=is(r),i=S.useRef(null),c=De(t,i,s.onTriggerChange),l=S.useRef(!1),u=S.useRef(!1),p=S.useCallback(()=>l.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),d.jsx(Zc,{asChild:!0,...a,children:d.jsx(je.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:be(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:be(e.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:be(e.onPointerDown,()=>{s.open&&s.onClose(),l.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:be(e.onFocus,()=>{l.current||s.onOpen()}),onBlur:be(e.onBlur,s.onClose),onClick:be(e.onClick,s.onClose)})})});bu.displayName=Da;var Ma="TooltipPortal",[Eb,kb]=as(Ma,{forceMount:void 0}),_u=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:s}=e,o=dn(Ma,t);return d.jsx(Eb,{scope:t,forceMount:r,children:d.jsx(Qt,{present:r||o.open,children:d.jsx(Un,{asChild:!0,container:s,children:n})})})};_u.displayName=Ma;var Vr="TooltipContent",xu=S.forwardRef((e,t)=>{const r=kb(Vr,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,a=dn(Vr,e.__scopeTooltip);return d.jsx(Qt,{present:n||a.open,children:a.disableHoverableContent?d.jsx(wu,{side:s,...o,ref:t}):d.jsx(Cb,{side:s,...o,ref:t})})}),Cb=S.forwardRef((e,t)=>{const r=dn(Vr,e.__scopeTooltip),n=Ia(Vr,e.__scopeTooltip),s=S.useRef(null),o=De(t,s),[a,i]=S.useState(null),{trigger:c,onClose:l}=r,u=s.current,{onPointerInTransitChange:p}=n,h=S.useCallback(()=>{i(null),p(!1)},[p]),v=S.useCallback((x,y)=>{const m=x.currentTarget,_={x:x.clientX,y:x.clientY},f=Ab(_,m.getBoundingClientRect()),b=Pb(_,f),w=Tb(y.getBoundingClientRect()),g=Ib([...b,...w]);i(g),p(!0)},[p]);return S.useEffect(()=>()=>h(),[h]),S.useEffect(()=>{if(c&&u){const x=m=>v(m,u),y=m=>v(m,c);return c.addEventListener("pointerleave",x),u.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",x),u.removeEventListener("pointerleave",y)}}},[c,u,v,h]),S.useEffect(()=>{if(a){const x=y=>{const m=y.target,_={x:y.clientX,y:y.clientY},f=(c==null?void 0:c.contains(m))||(u==null?void 0:u.contains(m)),b=!Ob(_,a);f?h():b&&(h(),l())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,u,a,l,h]),d.jsx(wu,{...e,ref:o})}),[jb,Nb]=as(un,{isInside:!1}),Rb=xb("TooltipContent"),wu=S.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:a,...i}=e,c=dn(Vr,r),l=is(r),{onClose:u}=c;return S.useEffect(()=>(document.addEventListener(Oa,u),()=>document.removeEventListener(Oa,u)),[u]),S.useEffect(()=>{if(c.trigger){const p=h=>{const v=h.target;v!=null&&v.contains(c.trigger)&&u()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,u]),d.jsx(An,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:u,children:d.jsxs(Kc,{"data-state":c.stateAttribute,...l,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(Rb,{children:n}),d.jsx(jb,{scope:r,isInside:!0,children:d.jsx(Hg,{id:c.contentId,role:"tooltip",children:s||n})})]})})});xu.displayName=Vr;var $u="TooltipArrow",Su=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=is(r);return Nb($u,r).isInside?null:d.jsx(Yc,{...s,...n,ref:t})});Su.displayName=$u;function Ab(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Pb(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Tb(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function Ob(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const i=t[o],c=t[a],l=i.x,u=i.y,p=c.x,h=c.y;u>n!=h>n&&r<(p-l)*(n-u)/(h-u)+l&&(s=!s)}return s}function Ib(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Db(t)}function Db(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],a=r[r.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Mb=vu,Vb=yu,Fb=bu,Lb=_u,zb=xu,qb=Su;function Ub({delayDuration:e=0,...t}){return d.jsx(Mb,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Eu({...e}){return d.jsx(Ub,{children:d.jsx(Vb,{"data-slot":"tooltip",...e})})}function ku({...e}){return d.jsx(Fb,{"data-slot":"tooltip-trigger",...e})}function Cu({className:e,sideOffset:t=0,children:r,...n}){return d.jsx(Lb,{children:d.jsxs(zb,{"data-slot":"tooltip-content",sideOffset:t,className:_e("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...n,children:[r,d.jsx(qb,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const Bb=({theme:e,readOnly:t,rootType:r,onAddField:n,onOpenSettings:s})=>{const{control:o}=Ze();return d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Te,{value:"root",disabled:!0,className:"w-40"}),d.jsxs(Or,{disabled:!0,value:r,children:[d.jsx(Dr,{className:"w-40",children:d.jsx(Ir,{})}),d.jsx(Mr,{className:`${e} max-h-52 bg-background text-foreground border-input`,children:d.jsx(Ct,{value:r,children:r})})]}),d.jsx(qt,{control:o,name:"root.title",render:({field:a})=>d.jsx(Te,{placeholder:"Title",disabled:t,className:"flex-1",...a})}),d.jsx(qt,{control:o,name:"root.description",render:({field:a})=>d.jsx(Te,{placeholder:"Description",disabled:t,className:"flex-1",...a})}),d.jsxs(Eu,{children:[d.jsx(ku,{asChild:!0,children:d.jsx(Xt,{disabled:!0,size:"icon",children:d.jsx(Wl,{})})}),d.jsx(Cu,{children:d.jsx("p",{children:"Required"})})]}),d.jsx("div",{className:"border-l-2 border-input"}),d.jsx(Xt,{size:"icon",variant:"ghost","data-testid":"root-settings-button",onClick:()=>s("root"),children:d.jsx(Bl,{className:"text-blue-500"})}),r==="object"&&d.jsx(Xt,{size:"icon",variant:"ghost","data-testid":"root-add-button",disabled:t,onClick:n,children:d.jsx(Ul,{className:"text-green-500"})}),d.jsx("div",{})]})},cs={form:{width:"full",height:"md"},output:{position:"bottom",showJson:!0,width:"full",height:"md"},settings:{width:"md"},spacing:"md"},ju={sm:"max-h-[300px]",md:"max-h-[500px]",lg:"max-h-[800px]",full:"max-h-full"},Wb={sm:300,md:500,lg:800,full:void 0},Va={sm:"w-full max-w-[600px]",md:"w-full max-w-[800px]",lg:"w-full max-w-[1200px]",full:"w-full"},Hb={sm:"sm:max-w-[500px]",md:"sm:max-w-[700px]",lg:"sm:max-w-[1000px]",full:"w-full sm:max-w-full"},Gb={top:"flex-col-reverse",bottom:"flex-col",left:"flex-row-reverse",right:"flex-row"},Nu={sm:"gap-2",md:"gap-4",lg:"gap-6"},Zb=["string","integer","number","boolean","object","array"],Kb=["int-32","int-64"],Yb=["float","double","big-decimal"],Jb=["date","date-time","local-date-time","time","duration","email","hostname","ipv4","ipv6","password","html","json","json-path","uri","uri-refrence","uri-template","relative-json-pointer","json-pointer","regex","uuid"];function Xb(e){const t=Qb(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(t_);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function Qb(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=n_(s),i=r_(o,s.props);return s.type!==S.Fragment&&(i.ref=n?xr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var e_=Symbol("radix.slottable");function t_(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===e_}function r_(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function n_(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 ls="Dialog",[Ru,Au]=xt(ls),[s_,gt]=Ru(ls),Pu=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:a=!0}=e,i=S.useRef(null),c=S.useRef(null),[l,u]=cr({prop:n,defaultProp:s??!1,onChange:o,caller:ls});return d.jsx(s_,{scope:t,triggerRef:i,contentRef:c,contentId:Ht(),titleId:Ht(),descriptionId:Ht(),open:l,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(p=>!p),[u]),modal:a,children:r})};Pu.displayName=ls;var Tu="DialogTrigger",Ou=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=gt(Tu,r),o=De(t,s.triggerRef);return d.jsx(je.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":za(s.open),...n,ref:o,onClick:be(e.onClick,s.onOpenToggle)})});Ou.displayName=Tu;var Fa="DialogPortal",[o_,Iu]=Ru(Fa,{forceMount:void 0}),Du=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=gt(Fa,t);return d.jsx(o_,{scope:t,forceMount:r,children:S.Children.map(n,a=>d.jsx(Qt,{present:r||o.open,children:d.jsx(Un,{asChild:!0,container:s,children:a})}))})};Du.displayName=Fa;var us="DialogOverlay",Mu=S.forwardRef((e,t)=>{const r=Iu(us,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=gt(us,e.__scopeDialog);return o.modal?d.jsx(Qt,{present:n||o.open,children:d.jsx(i_,{...s,ref:t})}):null});Mu.displayName=us;var a_=Xb("DialogOverlay.RemoveScroll"),i_=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=gt(us,r);return d.jsx(_a,{as:a_,allowPinchZoom:!0,shards:[s.contentRef],children:d.jsx(je.div,{"data-state":za(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),fr="DialogContent",Vu=S.forwardRef((e,t)=>{const r=Iu(fr,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=gt(fr,e.__scopeDialog);return d.jsx(Qt,{present:n||o.open,children:o.modal?d.jsx(c_,{...s,ref:t}):d.jsx(l_,{...s,ref:t})})});Vu.displayName=fr;var c_=S.forwardRef((e,t)=>{const r=gt(fr,e.__scopeDialog),n=S.useRef(null),s=De(t,r.contentRef,n);return S.useEffect(()=>{const o=n.current;if(o)return el(o)},[]),d.jsx(Fu,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:be(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&o.preventDefault()}),onFocusOutside:be(e.onFocusOutside,o=>o.preventDefault())})}),l_=S.forwardRef((e,t)=>{const r=gt(fr,e.__scopeDialog),n=S.useRef(!1),s=S.useRef(!1);return d.jsx(Fu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,i;(a=e.onCloseAutoFocus)==null||a.call(e,o),o.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=o.target;((l=r.triggerRef.current)==null?void 0:l.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),Fu=S.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...a}=e,i=gt(fr,r),c=S.useRef(null),l=De(t,c);return cc(),d.jsxs(d.Fragment,{children:[d.jsx(Qo,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:d.jsx(An,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":za(i.open),...a,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(d_,{titleId:i.titleId}),d.jsx(m_,{contentRef:c,descriptionId:i.descriptionId})]})]})}),La="DialogTitle",Lu=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=gt(La,r);return d.jsx(je.h2,{id:s.titleId,...n,ref:t})});Lu.displayName=La;var zu="DialogDescription",qu=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=gt(zu,r);return d.jsx(je.p,{id:s.descriptionId,...n,ref:t})});qu.displayName=zu;var Uu="DialogClose",Bu=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=gt(Uu,r);return d.jsx(je.button,{type:"button",...n,ref:t,onClick:be(e.onClick,()=>s.onOpenChange(!1))})});Bu.displayName=Uu;function za(e){return e?"open":"closed"}var Wu="DialogTitleWarning",[u_,Hu]=Vh(Wu,{contentName:fr,titleName:La,docsSlug:"dialog"}),d_=({titleId:e})=>{const t=Hu(Wu),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
127
|
+
*/const Hl=Tt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Gl(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=Gl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Zl(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Gl(e))&&(n&&(n+=" "),n+=t);return n}const xy=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},wy=(e,t)=>({classGroupId:e,validator:t}),Kl=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),ts="-",Yl=[],$y="arbitrary..",Sy=e=>{const t=ky(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Ey(a);const i=a.split(ts),c=i[0]===""&&i.length>1?1:0;return Jl(i,c,t)},getConflictingClassGroupIds:(a,i)=>{if(i){const c=n[a],l=r[a];return c?l?xy(l,c):c:l||Yl}return r[a]||Yl}}},Jl=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const s=e[t],o=r.nextPart.get(s);if(o){const l=Jl(e,t+1,o);if(l)return l}const a=r.validators;if(a===null)return;const i=t===0?e.join(ts):e.slice(t).join(ts),c=a.length;for(let l=0;l<c;l++){const u=a[l];if(u.validator(i))return u.classGroupId}},Ey=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?$y+n:void 0})(),ky=e=>{const{theme:t,classGroups:r}=e;return Cy(r,t)},Cy=(e,t)=>{const r=Kl();for(const n in e){const s=e[n];Ca(s,r,n,t)}return r},Ca=(e,t,r,n)=>{const s=e.length;for(let o=0;o<s;o++){const a=e[o];jy(a,t,r,n)}},jy=(e,t,r,n)=>{if(typeof e=="string"){Ny(e,t,r);return}if(typeof e=="function"){Ry(e,t,r,n);return}Ay(e,t,r,n)},Ny=(e,t,r)=>{const n=e===""?t:Xl(t,e);n.classGroupId=r},Ry=(e,t,r,n)=>{if(Py(e)){Ca(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(wy(r,e))},Ay=(e,t,r,n)=>{const s=Object.entries(e),o=s.length;for(let a=0;a<o;a++){const[i,c]=s[a];Ca(c,Xl(t,i),r,n)}},Xl=(e,t)=>{let r=e;const n=t.split(ts),s=n.length;for(let o=0;o<s;o++){const a=n[o];let i=r.nextPart.get(a);i||(i=Kl(),r.nextPart.set(a,i)),r=i}return r},Py=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ty=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const s=(o,a)=>{r[o]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(o){let a=r[o];if(a!==void 0)return a;if((a=n[o])!==void 0)return s(o,a),a},set(o,a){o in r?r[o]=a:s(o,a)}}},ja="!",Ql=":",Oy=[],eu=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),Iy=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const o=[];let a=0,i=0,c=0,l;const u=s.length;for(let y=0;y<u;y++){const m=s[y];if(a===0&&i===0){if(m===Ql){o.push(s.slice(c,y)),c=y+1;continue}if(m==="/"){l=y;continue}}m==="["?a++:m==="]"?a--:m==="("?i++:m===")"&&i--}const h=o.length===0?s:s.slice(c);let p=h,v=!1;h.endsWith(ja)?(p=h.slice(0,-1),v=!0):h.startsWith(ja)&&(p=h.slice(1),v=!0);const w=l&&l>c?l-c:void 0;return eu(o,v,p,w)};if(t){const s=t+Ql,o=n;n=a=>a.startsWith(s)?o(a.slice(s.length)):eu(Oy,!1,a,void 0,!0)}if(r){const s=n;n=o=>r({className:o,parseClassName:s})}return n},Dy=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let s=[];for(let o=0;o<r.length;o++){const a=r[o],i=a[0]==="[",c=t.has(a);i||c?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(a)):s.push(a)}return s.length>0&&(s.sort(),n.push(...s)),n}},My=e=>({cache:Ty(e.cacheSize),parseClassName:Iy(e),sortModifiers:Dy(e),...Sy(e)}),Vy=/\s+/,Fy=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:o}=t,a=[],i=e.trim().split(Vy);let c="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{isExternal:h,modifiers:p,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:y}=r(u);if(h){c=u+(c.length>0?" "+c:c);continue}let m=!!y,_=n(m?w.substring(0,y):w);if(!_){if(!m){c=u+(c.length>0?" "+c:c);continue}if(_=n(w),!_){c=u+(c.length>0?" "+c:c);continue}m=!1}const f=p.length===0?"":p.length===1?p[0]:o(p).join(":"),b=v?f+ja:f,x=b+_;if(a.indexOf(x)>-1)continue;a.push(x);const g=s(_,m);for(let $=0;$<g.length;++$){const E=g[$];a.push(b+E)}c=u+(c.length>0?" "+c:c)}return c},Ly=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=tu(r))&&(s&&(s+=" "),s+=n);return s},tu=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=tu(e[n]))&&(r&&(r+=" "),r+=t);return r},zy=(e,...t)=>{let r,n,s,o;const a=c=>{const l=t.reduce((u,h)=>h(u),e());return r=My(l),n=r.cache.get,s=r.cache.set,o=i,i(c)},i=c=>{const l=n(c);if(l)return l;const u=Fy(c,r);return s(c,u),u};return o=a,(...c)=>o(Ly(...c))},qy=[],He=e=>{const t=r=>r[e]||qy;return t.isThemeGetter=!0,t},ru=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Uy=/^\d+\/\d+$/,By=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Wy=/\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$/,Hy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Gy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ar=e=>Uy.test(e),Se=e=>!!e&&!Number.isNaN(Number(e)),Jt=e=>!!e&&Number.isInteger(Number(e)),Na=e=>e.endsWith("%")&&Se(e.slice(0,-1)),Ot=e=>By.test(e),Ky=()=>!0,Yy=e=>Wy.test(e)&&!Hy.test(e),su=()=>!1,Jy=e=>Gy.test(e),Xy=e=>Zy.test(e),Qy=e=>!ce(e)&&!le(e),eb=e=>Pr(e,lu,su),ce=e=>ru.test(e),dr=e=>Pr(e,uu,Yy),Ra=e=>Pr(e,ob,Se),ou=e=>Pr(e,iu,su),tb=e=>Pr(e,cu,Xy),rs=e=>Pr(e,du,Jy),le=e=>nu.test(e),ln=e=>Tr(e,uu),rb=e=>Tr(e,ab),au=e=>Tr(e,iu),nb=e=>Tr(e,lu),sb=e=>Tr(e,cu),ns=e=>Tr(e,du,!0),Pr=(e,t,r)=>{const n=ru.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Tr=(e,t,r=!1)=>{const n=nu.exec(e);return n?n[1]?t(n[1]):r:!1},iu=e=>e==="position"||e==="percentage",cu=e=>e==="image"||e==="url",lu=e=>e==="length"||e==="size"||e==="bg-size",uu=e=>e==="length",ob=e=>e==="number",ab=e=>e==="family-name",du=e=>e==="shadow",ib=zy(()=>{const e=He("color"),t=He("font"),r=He("text"),n=He("font-weight"),s=He("tracking"),o=He("leading"),a=He("breakpoint"),i=He("container"),c=He("spacing"),l=He("radius"),u=He("shadow"),h=He("inset-shadow"),p=He("text-shadow"),v=He("drop-shadow"),w=He("blur"),y=He("perspective"),m=He("aspect"),_=He("ease"),f=He("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],g=()=>[...x(),le,ce],$=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],j=()=>[le,ce,c],I=()=>[Ar,"full","auto",...j()],U=()=>[Jt,"none","subgrid",le,ce],D=()=>["auto",{span:["full",Jt,le,ce]},Jt,le,ce],V=()=>[Jt,"auto",le,ce],q=()=>["auto","min","max","fr",le,ce],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...j()],se=()=>[Ar,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],L=()=>[e,le,ce],he=()=>[...x(),au,ou,{position:[le,ce]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",nb,eb,{size:[le,ce]}],M=()=>[Na,ln,dr],P=()=>["","none","full",l,le,ce],k=()=>["",Se,ln,dr],N=()=>["solid","dashed","dotted","double"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>[Se,Na,au,ou],Y=()=>["","none",w,le,ce],de=()=>["none",Se,le,ce],oe=()=>["none",Se,le,ce],A=()=>[Se,le,ce],T=()=>[Ar,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ot],breakpoint:[Ot],color:[Ky],container:[Ot],"drop-shadow":[Ot],ease:["in","out","in-out"],font:[Qy],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ot],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ot],shadow:[Ot],spacing:["px",Se],text:[Ot],"text-shadow":[Ot],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ar,ce,le,m]}],container:["container"],columns:[{columns:[Se,ce,le,i]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:g()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Jt,"auto",le,ce]}],basis:[{basis:[Ar,"full","auto",i,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Se,Ar,"auto","initial","none",ce]}],grow:[{grow:["",Se,le,ce]}],shrink:[{shrink:["",Se,le,ce]}],order:[{order:[Jt,"first","last","none",le,ce]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:se()}],w:[{w:[i,"screen",...se()]}],"min-w":[{"min-w":[i,"screen","none",...se()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...se()]}],h:[{h:["screen","lh",...se()]}],"min-h":[{"min-h":["screen","lh","none",...se()]}],"max-h":[{"max-h":["screen","lh",...se()]}],"font-size":[{text:["base",r,ln,dr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,le,Ra]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Na,ce]}],"font-family":[{font:[rb,ce,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,le,ce]}],"line-clamp":[{"line-clamp":[Se,"none",le,Ra]}],leading:[{leading:[o,...j()]}],"list-image":[{"list-image":["none",le,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:[Se,"from-font","auto",le,dr]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Se,"auto",le,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:he()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Jt,le,ce],radial:["",le,ce],conic:[Jt,le,ce]},sb,tb]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:M()}],"gradient-via-pos":[{via:M()}],"gradient-to-pos":[{to:M()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:k()}],"border-w-x":[{"border-x":k()}],"border-w-y":[{"border-y":k()}],"border-w-s":[{"border-s":k()}],"border-w-e":[{"border-e":k()}],"border-w-t":[{"border-t":k()}],"border-w-r":[{"border-r":k()}],"border-w-b":[{"border-b":k()}],"border-w-l":[{"border-l":k()}],"divide-x":[{"divide-x":k()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":k()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...N(),"hidden","none"]}],"divide-style":[{divide:[...N(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...N(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Se,le,ce]}],"outline-w":[{outline:["",Se,ln,dr]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",u,ns,rs]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",h,ns,rs]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Se,dr]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":k()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,ns,rs]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Se,le,ce]}],"mix-blend":[{"mix-blend":[...z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":z()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Se]}],"mask-image-linear-from-pos":[{"mask-linear-from":F()}],"mask-image-linear-to-pos":[{"mask-linear-to":F()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":F()}],"mask-image-t-to-pos":[{"mask-t-to":F()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":F()}],"mask-image-r-to-pos":[{"mask-r-to":F()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":F()}],"mask-image-b-to-pos":[{"mask-b-to":F()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":F()}],"mask-image-l-to-pos":[{"mask-l-to":F()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":F()}],"mask-image-x-to-pos":[{"mask-x-to":F()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":F()}],"mask-image-y-to-pos":[{"mask-y-to":F()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[le,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":F()}],"mask-image-radial-to-pos":[{"mask-radial-to":F()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":x()}],"mask-image-conic-pos":[{"mask-conic":[Se]}],"mask-image-conic-from-pos":[{"mask-conic-from":F()}],"mask-image-conic-to-pos":[{"mask-conic-to":F()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:he()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,ce]}],filter:[{filter:["","none",le,ce]}],blur:[{blur:Y()}],brightness:[{brightness:[Se,le,ce]}],contrast:[{contrast:[Se,le,ce]}],"drop-shadow":[{"drop-shadow":["","none",v,ns,rs]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Se,le,ce]}],"hue-rotate":[{"hue-rotate":[Se,le,ce]}],invert:[{invert:["",Se,le,ce]}],saturate:[{saturate:[Se,le,ce]}],sepia:[{sepia:["",Se,le,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",le,ce]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[Se,le,ce]}],"backdrop-contrast":[{"backdrop-contrast":[Se,le,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Se,le,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Se,le,ce]}],"backdrop-invert":[{"backdrop-invert":["",Se,le,ce]}],"backdrop-opacity":[{"backdrop-opacity":[Se,le,ce]}],"backdrop-saturate":[{"backdrop-saturate":[Se,le,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Se,le,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Se,"initial",le,ce]}],ease:[{ease:["linear","initial",_,le,ce]}],delay:[{delay:[Se,le,ce]}],animate:[{animate:["none",f,le,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,le,ce]}],"perspective-origin":[{"perspective-origin":g()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[le,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:g()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:T()}],"translate-x":[{"translate-x":T()}],"translate-y":[{"translate-y":T()}],"translate-z":[{"translate-z":T()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,ce]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",le,ce]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Se,ln,dr,Ra]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function _e(...e){return ib(Zl(e))}function Or({...e}){return d.jsx(ty,{"data-slot":"select",...e})}function Ir({...e}){return d.jsx(ny,{"data-slot":"select-value",...e})}function Dr({className:e,size:t="default",children:r,...n}){return d.jsxs(ry,{"data-slot":"select-trigger","data-size":t,className:_e("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r,d.jsx(sy,{asChild:!0,children:d.jsx(ql,{className:"size-4 opacity-50"})})]})}function Mr({className:e,children:t,position:r="popper",...n}){return d.jsx(oy,{children:d.jsxs(ay,{"data-slot":"select-content",className:_e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[d.jsx(cb,{}),d.jsx(iy,{className:_e("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(lb,{})]})})}function Ct({className:e,children:t,...r}){return d.jsxs(cy,{"data-slot":"select-item",className:_e("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(uy,{children:d.jsx(zl,{className:"size-4"})})}),d.jsx(ly,{children:t})]})}function cb({className:e,...t}){return d.jsx(dy,{"data-slot":"select-scroll-up-button",className:_e("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(yy,{className:"size-4"})})}function lb({className:e,...t}){return d.jsx(fy,{"data-slot":"select-scroll-down-button",className:_e("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(ql,{className:"size-4"})})}const Te=Z.forwardRef(({className:e,type:t,...r},n)=>d.jsx("input",{type:t,"data-slot":"input",className:_e("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r}));Te.displayName="Input";var ub=Symbol.for("react.lazy"),ss=S[" use ".trim().toString()];function db(e){return typeof e=="object"&&e!==null&&"then"in e}function fu(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ub&&"_payload"in e&&db(e._payload)}function Aa(e){const t=fb(e),r=S.forwardRef((n,s)=>{let{children:o,...a}=n;fu(o)&&typeof ss=="function"&&(o=ss(o._payload));const i=S.Children.toArray(o),c=i.find(hb);if(c){const l=c.props.children,u=i.map(h=>h===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:h);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}var Pa=Aa("Slot");function fb(e){const t=S.forwardRef((r,n)=>{let{children:s,...o}=r;if(fu(s)&&typeof ss=="function"&&(s=ss(s._payload)),S.isValidElement(s)){const a=gb(s),i=pb(o,s.props);return s.type!==S.Fragment&&(i.ref=n?xr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mb=Symbol("radix.slottable");function hb(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mb}function pb(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function gb(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)}const mu=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hu=Zl,pu=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return hu(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,a=Object.keys(s).map(l=>{const u=r==null?void 0:r[l],h=o==null?void 0:o[l];if(u===null)return null;const p=mu(u)||mu(h);return s[l][p]}),i=r&&Object.entries(r).reduce((l,u)=>{let[h,p]=u;return p===void 0||(l[h]=p),l},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((l,u)=>{let{class:h,className:p,...v}=u;return Object.entries(v).every(w=>{let[y,m]=w;return Array.isArray(m)?m.includes({...o,...i}[y]):{...o,...i}[y]===m})?[...l,h,p]:l},[]);return hu(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)},Ta=pu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Xt=Z.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const a=n?Pa:"button";return d.jsx(a,{"data-slot":"button",ref:o,className:_e(Ta({variant:t,size:r,className:e})),...s})});function vb(e,t){return S.useReducer((r,n)=>t[r][n]??r,e)}var Qt=e=>{const{present:t,children:r}=e,n=yb(t),s=typeof r=="function"?r({present:n.isPresent}):S.Children.only(r),o=De(n.ref,bb(s));return typeof r=="function"||n.isPresent?S.cloneElement(s,{ref:o}):null};Qt.displayName="Presence";function yb(e){const[t,r]=S.useState(),n=S.useRef(null),s=S.useRef(e),o=S.useRef("none"),a=e?"mounted":"unmounted",[i,c]=vb(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const l=os(n.current);o.current=i==="mounted"?l:"none"},[i]),Ye(()=>{const l=n.current,u=s.current;if(u!==e){const p=o.current,v=os(l);e?c("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&p!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Ye(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,h=v=>{const y=os(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&y&&(c("ANIMATION_END"),!s.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},p=v=>{v.target===t&&(o.current=os(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:S.useCallback(l=>{n.current=l?getComputedStyle(l):null,r(l)},[])}}function os(e){return(e==null?void 0:e.animationName)||"none"}function bb(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 _b=Symbol("radix.slottable");function xb(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=_b,t}var[as]=xt("Tooltip",[qn]),is=qn(),gu="TooltipProvider",wb=700,Oa="tooltip.open",[$b,Ia]=as(gu),vu=e=>{const{__scopeTooltip:t,delayDuration:r=wb,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,a=S.useRef(!0),i=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),d.jsx($b,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:S.useCallback(l=>{i.current=l},[]),disableHoverableContent:s,children:o})};vu.displayName=gu;var un="Tooltip",[Sb,dn]=as(un),yu=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s,onOpenChange:o,disableHoverableContent:a,delayDuration:i}=e,c=Ia(un,e.__scopeTooltip),l=is(t),[u,h]=S.useState(null),p=Ht(),v=S.useRef(0),w=a??c.disableHoverableContent,y=i??c.delayDuration,m=S.useRef(!1),[_,f]=cr({prop:n,defaultProp:s??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Oa))):c.onClose(),o==null||o(E)},caller:un}),b=S.useMemo(()=>_?m.current?"delayed-open":"instant-open":"closed",[_]),x=S.useCallback(()=>{window.clearTimeout(v.current),v.current=0,m.current=!1,f(!0)},[f]),g=S.useCallback(()=>{window.clearTimeout(v.current),v.current=0,f(!1)},[f]),$=S.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{m.current=!0,f(!0),v.current=0},y)},[y,f]);return S.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),d.jsx(Gc,{...l,children:d.jsx(Sb,{scope:t,contentId:p,open:_,stateAttribute:b,trigger:u,onTriggerChange:h,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayedRef.current?$():x()},[c.isOpenDelayedRef,$,x]),onTriggerLeave:S.useCallback(()=>{w?g():(window.clearTimeout(v.current),v.current=0)},[g,w]),onOpen:x,onClose:g,disableHoverableContent:w,children:r})})};yu.displayName=un;var Da="TooltipTrigger",bu=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=dn(Da,r),o=Ia(Da,r),a=is(r),i=S.useRef(null),c=De(t,i,s.onTriggerChange),l=S.useRef(!1),u=S.useRef(!1),h=S.useCallback(()=>l.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),d.jsx(Zc,{asChild:!0,...a,children:d.jsx(je.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:be(e.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:be(e.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:be(e.onPointerDown,()=>{s.open&&s.onClose(),l.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:be(e.onFocus,()=>{l.current||s.onOpen()}),onBlur:be(e.onBlur,s.onClose),onClick:be(e.onClick,s.onClose)})})});bu.displayName=Da;var Ma="TooltipPortal",[Eb,kb]=as(Ma,{forceMount:void 0}),_u=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:s}=e,o=dn(Ma,t);return d.jsx(Eb,{scope:t,forceMount:r,children:d.jsx(Qt,{present:r||o.open,children:d.jsx(Un,{asChild:!0,container:s,children:n})})})};_u.displayName=Ma;var Vr="TooltipContent",xu=S.forwardRef((e,t)=>{const r=kb(Vr,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,a=dn(Vr,e.__scopeTooltip);return d.jsx(Qt,{present:n||a.open,children:a.disableHoverableContent?d.jsx(wu,{side:s,...o,ref:t}):d.jsx(Cb,{side:s,...o,ref:t})})}),Cb=S.forwardRef((e,t)=>{const r=dn(Vr,e.__scopeTooltip),n=Ia(Vr,e.__scopeTooltip),s=S.useRef(null),o=De(t,s),[a,i]=S.useState(null),{trigger:c,onClose:l}=r,u=s.current,{onPointerInTransitChange:h}=n,p=S.useCallback(()=>{i(null),h(!1)},[h]),v=S.useCallback((w,y)=>{const m=w.currentTarget,_={x:w.clientX,y:w.clientY},f=Ab(_,m.getBoundingClientRect()),b=Pb(_,f),x=Tb(y.getBoundingClientRect()),g=Ib([...b,...x]);i(g),h(!0)},[h]);return S.useEffect(()=>()=>p(),[p]),S.useEffect(()=>{if(c&&u){const w=m=>v(m,u),y=m=>v(m,c);return c.addEventListener("pointerleave",w),u.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",w),u.removeEventListener("pointerleave",y)}}},[c,u,v,p]),S.useEffect(()=>{if(a){const w=y=>{const m=y.target,_={x:y.clientX,y:y.clientY},f=(c==null?void 0:c.contains(m))||(u==null?void 0:u.contains(m)),b=!Ob(_,a);f?p():b&&(p(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[c,u,a,l,p]),d.jsx(wu,{...e,ref:o})}),[jb,Nb]=as(un,{isInside:!1}),Rb=xb("TooltipContent"),wu=S.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:a,...i}=e,c=dn(Vr,r),l=is(r),{onClose:u}=c;return S.useEffect(()=>(document.addEventListener(Oa,u),()=>document.removeEventListener(Oa,u)),[u]),S.useEffect(()=>{if(c.trigger){const h=p=>{const v=p.target;v!=null&&v.contains(c.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,u]),d.jsx(An,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:h=>h.preventDefault(),onDismiss:u,children:d.jsxs(Kc,{"data-state":c.stateAttribute,...l,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(Rb,{children:n}),d.jsx(jb,{scope:r,isInside:!0,children:d.jsx(Hg,{id:c.contentId,role:"tooltip",children:s||n})})]})})});xu.displayName=Vr;var $u="TooltipArrow",Su=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=is(r);return Nb($u,r).isInside?null:d.jsx(Yc,{...s,...n,ref:t})});Su.displayName=$u;function Ab(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Pb(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Tb(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function Ob(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const i=t[o],c=t[a],l=i.x,u=i.y,h=c.x,p=c.y;u>n!=p>n&&r<(h-l)*(n-u)/(p-u)+l&&(s=!s)}return s}function Ib(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Db(t)}function Db(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],a=r[r.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Mb=vu,Vb=yu,Fb=bu,Lb=_u,zb=xu,qb=Su;function Ub({delayDuration:e=0,...t}){return d.jsx(Mb,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Eu({...e}){return d.jsx(Ub,{children:d.jsx(Vb,{"data-slot":"tooltip",...e})})}function ku({...e}){return d.jsx(Fb,{"data-slot":"tooltip-trigger",...e})}function Cu({className:e,sideOffset:t=0,children:r,...n}){return d.jsx(Lb,{children:d.jsxs(zb,{"data-slot":"tooltip-content",sideOffset:t,className:_e("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...n,children:[r,d.jsx(qb,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const Bb=({theme:e,readOnly:t,rootType:r,onAddField:n,onOpenSettings:s})=>{const{control:o}=Ze();return d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Te,{value:"root",disabled:!0,className:"w-40"}),d.jsxs(Or,{disabled:!0,value:r,children:[d.jsx(Dr,{className:"w-40",children:d.jsx(Ir,{})}),d.jsx(Mr,{className:`${e} max-h-52 bg-background text-foreground border-input`,children:d.jsx(Ct,{value:r,children:r})})]}),d.jsx(qt,{control:o,name:"root.title",render:({field:a})=>d.jsx(Te,{placeholder:"Title",disabled:t,className:"flex-1",...a})}),d.jsx(qt,{control:o,name:"root.description",render:({field:a})=>d.jsx(Te,{placeholder:"Description",disabled:t,className:"flex-1",...a})}),d.jsxs(Eu,{children:[d.jsx(ku,{asChild:!0,children:d.jsx(Xt,{disabled:!0,size:"icon",children:d.jsx(Wl,{})})}),d.jsx(Cu,{children:d.jsx("p",{children:"Required"})})]}),d.jsx("div",{className:"border-l-2 border-input"}),d.jsx(Xt,{size:"icon",variant:"ghost","data-testid":"root-settings-button",onClick:()=>s("root"),children:d.jsx(Bl,{className:"text-blue-500"})}),r==="object"&&d.jsx(Xt,{size:"icon",variant:"ghost","data-testid":"root-add-button",disabled:t,onClick:n,children:d.jsx(Ul,{className:"text-green-500"})}),d.jsx("div",{})]})},cs={form:{width:"full",height:"md"},output:{position:"bottom",showJson:!0,width:"full",height:"md"},settings:{width:"md"},spacing:"md"},ju={sm:"max-h-[300px]",md:"max-h-[500px]",lg:"max-h-[800px]",full:"max-h-full"},Wb={sm:300,md:500,lg:800,full:void 0},Va={sm:"w-full max-w-[600px]",md:"w-full max-w-[800px]",lg:"w-full max-w-[1200px]",full:"w-full"},Hb={sm:"sm:max-w-[500px]",md:"sm:max-w-[700px]",lg:"sm:max-w-[1000px]",full:"w-full sm:max-w-full"},Gb={top:"flex-col-reverse",bottom:"flex-col",left:"flex-row-reverse",right:"flex-row"},Nu={sm:"gap-2",md:"gap-4",lg:"gap-6"},Zb=["string","integer","number","boolean","object","array"],Kb=["int-32","int-64"],Yb=["float","double","big-decimal"],Jb=["date","date-time","local-date-time","time","duration","email","hostname","ipv4","ipv6","password","html","json","json-path","uri","uri-refrence","uri-template","relative-json-pointer","json-pointer","regex","uuid"];function Xb(e){const t=Qb(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(t_);if(c){const l=c.props.children,u=i.map(h=>h===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:h);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function Qb(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=n_(s),i=r_(o,s.props);return s.type!==S.Fragment&&(i.ref=n?xr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var e_=Symbol("radix.slottable");function t_(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===e_}function r_(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function n_(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 ls="Dialog",[Ru,Au]=xt(ls),[s_,gt]=Ru(ls),Pu=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:a=!0}=e,i=S.useRef(null),c=S.useRef(null),[l,u]=cr({prop:n,defaultProp:s??!1,onChange:o,caller:ls});return d.jsx(s_,{scope:t,triggerRef:i,contentRef:c,contentId:Ht(),titleId:Ht(),descriptionId:Ht(),open:l,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(h=>!h),[u]),modal:a,children:r})};Pu.displayName=ls;var Tu="DialogTrigger",Ou=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=gt(Tu,r),o=De(t,s.triggerRef);return d.jsx(je.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":za(s.open),...n,ref:o,onClick:be(e.onClick,s.onOpenToggle)})});Ou.displayName=Tu;var Fa="DialogPortal",[o_,Iu]=Ru(Fa,{forceMount:void 0}),Du=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=gt(Fa,t);return d.jsx(o_,{scope:t,forceMount:r,children:S.Children.map(n,a=>d.jsx(Qt,{present:r||o.open,children:d.jsx(Un,{asChild:!0,container:s,children:a})}))})};Du.displayName=Fa;var us="DialogOverlay",Mu=S.forwardRef((e,t)=>{const r=Iu(us,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=gt(us,e.__scopeDialog);return o.modal?d.jsx(Qt,{present:n||o.open,children:d.jsx(i_,{...s,ref:t})}):null});Mu.displayName=us;var a_=Xb("DialogOverlay.RemoveScroll"),i_=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=gt(us,r);return d.jsx(_a,{as:a_,allowPinchZoom:!0,shards:[s.contentRef],children:d.jsx(je.div,{"data-state":za(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),fr="DialogContent",Vu=S.forwardRef((e,t)=>{const r=Iu(fr,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=gt(fr,e.__scopeDialog);return d.jsx(Qt,{present:n||o.open,children:o.modal?d.jsx(c_,{...s,ref:t}):d.jsx(l_,{...s,ref:t})})});Vu.displayName=fr;var c_=S.forwardRef((e,t)=>{const r=gt(fr,e.__scopeDialog),n=S.useRef(null),s=De(t,r.contentRef,n);return S.useEffect(()=>{const o=n.current;if(o)return el(o)},[]),d.jsx(Fu,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:be(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&o.preventDefault()}),onFocusOutside:be(e.onFocusOutside,o=>o.preventDefault())})}),l_=S.forwardRef((e,t)=>{const r=gt(fr,e.__scopeDialog),n=S.useRef(!1),s=S.useRef(!1);return d.jsx(Fu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,i;(a=e.onCloseAutoFocus)==null||a.call(e,o),o.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=o.target;((l=r.triggerRef.current)==null?void 0:l.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),Fu=S.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...a}=e,i=gt(fr,r),c=S.useRef(null),l=De(t,c);return cc(),d.jsxs(d.Fragment,{children:[d.jsx(Qo,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:d.jsx(An,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":za(i.open),...a,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(d_,{titleId:i.titleId}),d.jsx(m_,{contentRef:c,descriptionId:i.descriptionId})]})]})}),La="DialogTitle",Lu=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=gt(La,r);return d.jsx(je.h2,{id:s.titleId,...n,ref:t})});Lu.displayName=La;var zu="DialogDescription",qu=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=gt(zu,r);return d.jsx(je.p,{id:s.descriptionId,...n,ref:t})});qu.displayName=zu;var Uu="DialogClose",Bu=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=gt(Uu,r);return d.jsx(je.button,{type:"button",...n,ref:t,onClick:be(e.onClick,()=>s.onOpenChange(!1))})});Bu.displayName=Uu;function za(e){return e?"open":"closed"}var Wu="DialogTitleWarning",[u_,Hu]=Vh(Wu,{contentName:fr,titleName:La,docsSlug:"dialog"}),d_=({titleId:e})=>{const t=Hu(Wu),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
128
128
|
|
|
129
129
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
130
130
|
|
|
@@ -134,12 +134,12 @@ You can add a description to the \`${Fr}\` by passing a \`${ad}\` component as a
|
|
|
134
134
|
|
|
135
135
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Fr}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
136
136
|
|
|
137
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return S.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},C_=Qu,j_=ed,N_=td,R_=rd,A_=nd,P_=cd,T_=ud,O_=od,I_=id;function D_({...e}){return d.jsx(C_,{"data-slot":"alert-dialog",...e})}function M_({...e}){return d.jsx(j_,{"data-slot":"alert-dialog-trigger",...e})}function V_({...e}){return d.jsx(N_,{"data-slot":"alert-dialog-portal",...e})}function F_({className:e,...t}){return d.jsx(R_,{"data-slot":"alert-dialog-overlay",className:_e("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function L_({className:e,...t}){return d.jsxs(V_,{children:[d.jsx(F_,{}),d.jsx(A_,{"data-slot":"alert-dialog-content",className:_e("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function z_({className:e,...t}){return d.jsx("div",{"data-slot":"alert-dialog-header",className:_e("flex flex-col gap-2 text-center sm:text-left",e),...t})}function q_({className:e,...t}){return d.jsx("div",{"data-slot":"alert-dialog-footer",className:_e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function U_({className:e,...t}){return d.jsx(O_,{"data-slot":"alert-dialog-title",className:_e("text-lg font-semibold",e),...t})}function B_({className:e,...t}){return d.jsx(I_,{"data-slot":"alert-dialog-description",className:_e("text-muted-foreground text-sm",e),...t})}function W_({className:e,...t}){return d.jsx(P_,{className:_e(Ta(),e),...t})}function H_({className:e,...t}){return d.jsx(T_,{className:_e(Ta({variant:"outline"}),e),...t})}const G_=({theme:e,readOnly:t,control:r,fieldPath:n,isSimpleType:s,isRootLevel:o,onRemove:a,onOpenSettings:i,onTypeChange:c})=>{const l=tn({control:r,name:`${n}.key`});return d.jsxs("div",{className:"p-2 flex gap-2","data-testid":"field",children:[s&&d.jsx(qt,{control:r,name:`${n}.key`,render:({field:u})=>d.jsx(Te,{placeholder:"field_name",disabled:t,className:"w-40",...u})}),d.jsx(qt,{control:r,name:`${n}.schema.type`,render:({field:u})=>d.jsxs(Or,{disabled:t,onValueChange:p=>{u.onChange(p),c(p)},value:u.value,children:[d.jsx(Dr,{className:"w-40",children:d.jsx(Ir,{})}),d.jsx(Mr,{className:`${e} max-h-52 bg-background text-foreground border-input`,children:Zb.map(p=>d.jsx(Ct,{value:p,children:p},p))})]})}),d.jsx(qt,{control:r,name:`${n}.schema.title`,render:({field:u})=>d.jsx(Te,{placeholder:"Title",disabled:t,className:"flex-1",...u})}),d.jsx(qt,{control:r,name:`${n}.schema.description`,render:({field:u})=>d.jsx(Te,{placeholder:"Description",disabled:t,className:"flex-1",...u})}),s&&d.jsxs("div",{className:"flex gap-2",children:[d.jsx(qt,{control:r,name:`${n}.isRequired`,render:({field:u})=>d.jsxs(Eu,{children:[d.jsx(ku,{asChild:!0,children:d.jsx(Xt,{"data-testid":"required",disabled:t,size:"icon",variant:u.value?"default":"outline",onClick:()=>{u.onChange(!u.value)},children:d.jsx(Wl,{})})}),d.jsx(Cu,{children:d.jsx("p",{children:"Required"})})]})}),d.jsx("div",{className:"border-l-2 border-input"})]}),d.jsx(Xt,{size:"icon",variant:"ghost",onClick:()=>i(`${n}.schema`),children:d.jsx(Bl,{className:"text-blue-500"})}),o&&d.jsxs(D_,{children:[d.jsx(M_,{asChild:!0,children:d.jsx(Xt,{size:"icon",variant:"ghost","data-testid":"delete-button",disabled:t,children:d.jsx(_y,{className:"text-red-500"})})}),d.jsxs(L_,{className:_e("border-input",e),children:[d.jsxs(z_,{children:[d.jsx(U_,{className:"text-foreground",children:"Are you absolutely sure?"}),d.jsxs(B_,{children:["This action cannot be undone. This will permanently delete field"," ",l,"."]})]}),d.jsxs(q_,{children:[d.jsx(H_,{className:"text-foreground",children:"Cancel"}),d.jsx(W_,{onClick:a,children:"Delete"})]})]})]})]})},ds=({theme:e,readOnly:t,fieldPath:r,onRemove:n,onOpenSettings:s,isSimpleType:o=!0,isRootLevel:a=!1})=>{const{control:i,setValue:c}=Ze(),l=tn({control:i,name:`${r}.schema.type`}),{fields:u,append:p,remove:h}=Qi({control:i,name:`${r}.schema.properties`}),v=()=>{const y=nn(6);p({id:y,key:`field_${y}`,isRequired:!1,schema:{type:"string"}})},x=y=>{let m={};y==="object"?m={type:"object",properties:[],additionalProperties:!0}:y==="array"?m={type:"array"}:m={type:y},c(`${r}.schema`,m)};return d.jsxs("div",{children:[d.jsx(G_,{theme:e,readOnly:t,control:i,fieldPath:r,isSimpleType:o,isRootLevel:a,onRemove:n,onOpenSettings:s,onTypeChange:x}),l==="object"&&d.jsxs("div",{className:"ml-2 pl-2 border-l-2 border-input",children:[u.map((y,m)=>d.jsx(ds,{readOnly:t,theme:e,fieldPath:`${r}.schema.properties.${m}`,onRemove:()=>h(m),onOpenSettings:s,isRootLevel:!0},y.id)),d.jsxs(Xt,{disabled:t,size:"sm",variant:"outline",onClick:v,className:"ml-2 mt-2 mb-4 flex gap-2 text-green-500",children:[d.jsx(Ul,{})," Add Field"]})]}),l==="array"&&d.jsx("div",{className:"ml-2 pl-2 border-l-2 border-input mr-11","data-testid":"field-array",children:d.jsx(ds,{theme:e,readOnly:t,fieldPath:`${r}.schema.items`,onRemove:()=>{},onOpenSettings:s,isSimpleType:!1})})]},`${r}-${l}`)};function Z_({theme:e,readOnly:t,fields:r,onRemove:n,onOpenSettings:s}){return d.jsx("div",{className:"pl-2 border-l-2 border-input",children:r.map((o,a)=>d.jsx(ds,{readOnly:t,theme:e,fieldPath:`properties.${a}`,onRemove:()=>n(a),onOpenSettings:s,isRootLevel:!0},o.fieldId))})}var K_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Y_=K_.reduce((e,t)=>{const r=Aa(`Primitive.${t}`),n=S.forwardRef((s,o)=>{const{asChild:a,...i}=s,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),J_="Label",dd=S.forwardRef((e,t)=>d.jsx(Y_.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())}}));dd.displayName=J_;var X_=dd;function Q_({className:e,...t}){return d.jsx(X_,{"data-slot":"label",className:_e("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const fd=Z.createContext({}),Ne=({...e})=>d.jsx(fd.Provider,{value:{name:e.name},children:d.jsx(qt,{...e})}),Ua=()=>{const e=Z.useContext(fd),t=Z.useContext(md),{getFieldState:r}=Ze(),n=Di({name:e.name}),s=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},md=Z.createContext({});function xe({className:e,...t}){const r=Z.useId();return d.jsx(md.Provider,{value:{id:r},children:d.jsx("div",{"data-slot":"form-item",className:_e("grid gap-2",e),...t})})}function we({className:e,...t}){const{error:r,formItemId:n}=Ua();return d.jsx(Q_,{"data-slot":"form-label","data-error":!!r,className:_e("data-[error=true]:text-destructive",e),htmlFor:n,...t})}function ke({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:s}=Ua();return d.jsx(Pa,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${s}`:`${n}`,"aria-invalid":!!t,...e})}function Ce({className:e,...t}){const{error:r,formMessageId:n}=Ua(),s=r?String((r==null?void 0:r.message)??""):t.children;return s?d.jsx("p",{"data-slot":"form-message",id:n,className:_e("text-destructive text-sm",e),...t,children:s}):null}var fs="Checkbox",[e0]=xt(fs),[t0,Ba]=e0(fs);function r0(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:s,disabled:o,form:a,name:i,onCheckedChange:c,required:l,value:u="on",internal_do_not_use_render:p}=e,[h,v]=cr({prop:r,defaultProp:s??!1,onChange:c,caller:fs}),[x,y]=S.useState(null),[m,_]=S.useState(null),f=S.useRef(!1),b=x?!!a||!!x.closest("form"):!0,w={checked:h,disabled:o,setChecked:v,control:x,setControl:y,name:i,form:a,value:u,hasConsumerStoppedPropagationRef:f,required:l,defaultChecked:er(s)?!1:s,isFormControl:b,bubbleInput:m,setBubbleInput:_};return d.jsx(t0,{scope:t,...w,children:n0(p)?p(w):n})}var hd="CheckboxTrigger",pd=S.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},s)=>{const{control:o,value:a,disabled:i,checked:c,required:l,setControl:u,setChecked:p,hasConsumerStoppedPropagationRef:h,isFormControl:v,bubbleInput:x}=Ba(hd,e),y=De(s,u),m=S.useRef(c);return S.useEffect(()=>{const _=o==null?void 0:o.form;if(_){const f=()=>p(m.current);return _.addEventListener("reset",f),()=>_.removeEventListener("reset",f)}},[o,p]),d.jsx(je.button,{type:"button",role:"checkbox","aria-checked":er(c)?"mixed":c,"aria-required":l,"data-state":xd(c),"data-disabled":i?"":void 0,disabled:i,value:a,...n,ref:y,onKeyDown:be(t,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:be(r,_=>{p(f=>er(f)?!0:!f),x&&v&&(h.current=_.isPropagationStopped(),h.current||_.stopPropagation())})})});pd.displayName=hd;var gd=S.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:o,required:a,disabled:i,value:c,onCheckedChange:l,form:u,...p}=e;return d.jsx(r0,{__scopeCheckbox:r,checked:s,defaultChecked:o,disabled:i,required:a,onCheckedChange:l,name:n,form:u,value:c,internal_do_not_use_render:({isFormControl:h})=>d.jsxs(d.Fragment,{children:[d.jsx(pd,{...p,ref:t,__scopeCheckbox:r}),h&&d.jsx(_d,{__scopeCheckbox:r})]})})});gd.displayName=fs;var vd="CheckboxIndicator",yd=S.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...s}=e,o=Ba(vd,r);return d.jsx(Qt,{present:n||er(o.checked)||o.checked===!0,children:d.jsx(je.span,{"data-state":xd(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});yd.displayName=vd;var bd="CheckboxBubbleInput",_d=S.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:a,required:i,disabled:c,name:l,value:u,form:p,bubbleInput:h,setBubbleInput:v}=Ba(bd,e),x=De(r,v),y=ha(o),m=da(n);S.useEffect(()=>{const f=h;if(!f)return;const b=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(b,"checked").set,$=!s.current;if(y!==o&&g){const E=new Event("click",{bubbles:$});f.indeterminate=er(o),g.call(f,er(o)?!1:o),f.dispatchEvent(E)}},[h,y,o,s]);const _=S.useRef(er(o)?!1:o);return d.jsx(je.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??_.current,required:i,disabled:c,name:l,value:u,form:p,...t,tabIndex:-1,ref:x,style:{...t.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});_d.displayName=bd;function n0(e){return typeof e=="function"}function er(e){return e==="indeterminate"}function xd(e){return er(e)?"indeterminate":e?"checked":"unchecked"}function ms({className:e,...t}){return d.jsx(gd,{"data-slot":"checkbox",className:_e("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(yd,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:d.jsx(zl,{className:"size-3.5"})})})}const s0=pu("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function wd({className:e,variant:t,asChild:r=!1,...n}){const s=r?Pa:"span";return d.jsx(s,{"data-slot":"badge",className:_e(s0({variant:t}),e),...n})}const o0=/[\n#?=&\t,./-]+/,a0=/^[^a-zA-Z0-9]*|[^a-zA-Z0-9]*$/g,i0=Z.createContext(null),fn=Z.forwardRef(({children:e,value:t,onValueChange:r,placeholder:n,maxItems:s,minItems:o,className:a,disabled:i=!1,dir:c,...l},u)=>{const[p,h]=Z.useState(-1),[v,x]=Z.useState(""),[y,m]=Z.useState(i),[_,f]=Z.useState(i),[b,w]=Z.useState(!1),[g,$]=Z.useState(""),E=o??0,j=s??1/0,O=Z.useCallback(K=>{!t.includes(K)&&t.length<j&&r([...t,K])},[t]),z=Z.useCallback(K=>{t.includes(K)&&t.length>E&&r(t.filter(se=>se!==K))},[t]),D=Z.useCallback(K=>{K.preventDefault();const se=K.clipboardData.getData("text").split(o0),L=[...t];se.forEach(he=>{const H=he.replaceAll(a0,"").trim();H.length>0&&!L.includes(H)&&L.length<j&&L.push(H)}),r(L),x("")},[t]),V=Z.useCallback(K=>{const se=K.currentTarget,L=se.value.substring(se.selectionStart??0,se.selectionEnd??0);$(L),w(L===v)},[v]);Z.useEffect(()=>{(()=>{i==!1&&(t.length-1>=E?f(!1):f(!0),t.length+1<=j?m(!1):m(!0))})()},[t]);const U=Z.useCallback(async K=>{K.stopPropagation();const se=()=>{const C=p+1>t.length-1?-1:p+1;h(C)},L=()=>{const C=p-1<0?t.length-1:p-1;h(C)},he=()=>{const C=p-1<=0?t.length-1===0?-1:0:p-1;h(C)},H=K.currentTarget;switch(K.key){case"ArrowLeft":c==="rtl"?t.length>0&&p!==-1&&se():t.length>0&&H.selectionStart===0&&L();break;case"ArrowRight":c==="rtl"?t.length>0&&H.selectionStart===0&&L():t.length>0&&p!==-1&&se();break;case"Backspace":case"Delete":t.length>0&&(p!==-1&&p<t.length?(z(t[p]),he()):H.selectionStart===0&&(g===v||b)&&z(t[t.length-1]));break;case"Escape":const C=p===-1?t.length-1:-1;h(C);break;case"Enter":v.trim()!==""&&(K.preventDefault(),O(v),x(""));break}},[p,t,v,z]),W=Z.useCallback(K=>{K.preventDefault(),K.stopPropagation()},[]),ee=Z.useCallback(K=>{x(K.currentTarget.value)},[]);return d.jsx(i0.Provider,{value:{value:t,onValueChange:r,inputValue:v,setInputValue:x,activeIndex:p,setActiveIndex:h},children:d.jsxs("div",{...l,ref:u,dir:c,className:_e("flex items-center flex-wrap gap-1 rounded-lg bg-background overflow-hidden",{"focus-within:ring-ring":p===-1},a),children:[t.map((K,se)=>d.jsxs(wd,{tabIndex:p!==-1?0:p,"aria-disabled":_,"data-active":p===se,className:_e("relative px-1 rounded flex items-center gap-1 data-[active='true']:ring-2 data-[active='true']:ring-muted-foreground truncate aria-disabled:opacity-50 aria-disabled:cursor-not-allowed"),variant:"secondary",children:[d.jsx("span",{className:"text-xs",children:K}),d.jsxs("button",{type:"button","aria-label":`Remove ${K} option`,"aria-roledescription":"button to remove option",disabled:_,onMouseDown:W,onClick:()=>z(K),className:"disabled:cursor-not-allowed",children:[d.jsxs("span",{className:"sr-only",children:["Remove ",K," option"]}),d.jsx(Hl,{className:"h-4 w-4 hover:stroke-destructive"})]})]},K)),d.jsx(Te,{tabIndex:0,"aria-label":"input tag",disabled:y,onKeyDown:U,onPaste:D,value:v,onSelect:V,onChange:p===-1?ee:void 0,placeholder:n,onClick:()=>h(-1),className:_e("border border-input h-9 min-w-fit flex-1 focus-visible:outline-0 focus-visible:ring-0 focus-visible:ring-offset-0 placeholder:text-muted-foreground px-2",p!==-1&&"caret-transparent")})]})})});fn.displayName="TagsInput";const c0=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:s}=Ze(),o=s(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(Ne,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Default Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ne,{control:n,name:`${t}.minimum`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.maximum`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(Ne,{control:n,name:`${t}.exclusiveMin`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Exclusive Minimum"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.exclusiveMax`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Exclusive Maximum"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsx(Ne,{control:n,name:`${t}.multipleOf`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Multiple Of"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Format"}),d.jsx(ke,{children:d.jsxs(Or,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(Dr,{children:d.jsx(Ir,{placeholder:"Choose data type"})}),d.jsxs(Mr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Ct,{value:"none",children:"none"}),Yb.map(i=>d.jsx(Ct,{value:i,children:i},i))]})]})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(xe,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(ke,{children:d.jsx(ms,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange})}),d.jsx(we,{className:"ml-2",children:"Enable Enum"}),d.jsx(Ce,{})]})}),o&&d.jsx(Ne,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Enum Values"}),d.jsx(ke,{children:d.jsx(fn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx(Ce,{})]})})]})},l0=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:s}=Ze(),o=s(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(Ne,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Default Value"}),d.jsx(ke,{children:d.jsx(Te,{disabled:r,...a})}),d.jsx(Ce,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ne,{control:n,name:`${t}.minLength`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Length"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.maxLength`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Length"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsx(Ne,{control:n,name:`${t}.pattern`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Pattern (Regular Expression)"}),d.jsx(ke,{children:d.jsx(Te,{disabled:r,...a})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Format"}),d.jsxs(Or,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(ke,{children:d.jsx(Dr,{children:d.jsx(Ir,{placeholder:"Choose data type"})})}),d.jsxs(Mr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Ct,{value:"none",children:"none"}),Jb.map(i=>d.jsx(Ct,{value:i,children:i},i))]})]}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(xe,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(ke,{children:d.jsx(ms,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange})}),d.jsx(we,{className:"ml-2",children:"Enable Enum"}),d.jsx(Ce,{})]})}),o&&d.jsx(Ne,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Enum Values"}),d.jsx(ke,{children:d.jsx(fn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx(Ce,{})]})})]})},u0=({theme:e,basePath:t,readOnly:r})=>{const{control:n}=Ze();return d.jsx("form",{children:d.jsx(Ne,{control:n,name:`${t}.default`,render:({field:s})=>d.jsxs(xe,{className:"flex gap-2",children:[d.jsx(we,{children:"Default Value"}),d.jsxs(Or,{onValueChange:s.onChange,defaultValue:s.value,disabled:r,children:[d.jsx(ke,{children:d.jsx(Dr,{children:d.jsx(Ir,{placeholder:"False"})})}),d.jsxs(Mr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Ct,{value:"true","data-testid":"true",children:"True"}),d.jsx(Ct,{value:"false",children:"False"})]})]}),d.jsx(Ce,{})]})})})},d0=({basePath:e,readOnly:t})=>{const{control:r}=Ze();return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ne,{control:r,name:`${e}.minItems`,render:({field:n})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Items"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:r,name:`${e}.maxItems`,render:({field:n})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Items"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(Ne,{control:r,name:`${e}.minContains`,render:({field:n})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Contains"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:r,name:`${e}.maxContains`,render:({field:n})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Contains"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsx(Ne,{control:r,name:`${e}.uniqueItems`,render:({field:n})=>d.jsxs(xe,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(ke,{children:d.jsx(ms,{checked:n.value,onCheckedChange:n.onChange,disabled:t})}),d.jsx(we,{className:"ml-2",children:"Unique Items"}),d.jsx(Ce,{})]})})]})},f0=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:s}=Ze(),o=s(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(Ne,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Default Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ne,{control:n,name:`${t}.minimum`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.maximum`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(Ne,{control:n,name:`${t}.exclusiveMin`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Exclusive Minimum"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.exclusiveMax`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Exclusive Maximum"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsx(Ne,{control:n,name:`${t}.multipleOf`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Multiple Of"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Format"}),d.jsx(ke,{children:d.jsxs(Or,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(Dr,{children:d.jsx(Ir,{placeholder:"Choose data type"})}),d.jsxs(Mr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Ct,{value:"none",children:"none"}),Kb.map(i=>d.jsx(Ct,{value:i,children:i},i))]})]})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(xe,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(ke,{children:d.jsx(ms,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange,defaultValue:0})}),d.jsx(we,{className:"ml-2",children:"Enable Enum"}),d.jsx(Ce,{})]})}),o&&d.jsx(Ne,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Enum Values"}),d.jsx(ke,{children:d.jsx(fn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx(Ce,{})]})})]})};var hs={exports:{}},Wa={},Dt={},mr={},Ha={},Ga={},Za={},$d;function ps(){return $d||($d=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((b,w)=>`${b}${w}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((b,w)=>(w instanceof r&&(b[w.str]=(b[w.str]||0)+1),b),{})}}e._Code=n,e.nil=new n("");function s(_,...f){const b=[_[0]];let w=0;for(;w<f.length;)i(b,f[w]),b.push(_[++w]);return new n(b)}e._=s;const o=new n("+");function a(_,...f){const b=[v(_[0])];let w=0;for(;w<f.length;)b.push(o),i(b,f[w]),b.push(o,v(_[++w]));return c(b),new n(b)}e.str=a;function i(_,f){f instanceof n?_.push(...f._items):f instanceof r?_.push(f):_.push(p(f))}e.addCodeArg=i;function c(_){let f=1;for(;f<_.length-1;){if(_[f]===o){const b=l(_[f-1],_[f+1]);if(b!==void 0){_.splice(f-1,3,b);continue}_[f++]="+"}f++}}function l(_,f){if(f==='""')return _;if(_==='""')return f;if(typeof _=="string")return f instanceof r||_[_.length-1]!=='"'?void 0:typeof f!="string"?`${_.slice(0,-1)}${f}"`:f[0]==='"'?_.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!(_ instanceof r))return`"${_}${f.slice(1)}`}function u(_,f){return f.emptyStr()?_:_.emptyStr()?f:a`${_}${f}`}e.strConcat=u;function p(_){return typeof _=="number"||typeof _=="boolean"||_===null?_:v(Array.isArray(_)?_.join(","):_)}function h(_){return new n(v(_))}e.stringify=h;function v(_){return JSON.stringify(_).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function x(_){return typeof _=="string"&&e.IDENTIFIER.test(_)?new n(`.${_}`):s`[${_}]`}e.getProperty=x;function y(_){if(typeof _=="string"&&e.IDENTIFIER.test(_))return new n(`${_}`);throw new Error(`CodeGen: invalid export name: ${_}, use explicit $id name mapping`)}e.getEsmExportName=y;function m(_){return new n(_.toString())}e.regexpCode=m})(Za)),Za}var Ka={},Sd;function Ed(){return Sd||(Sd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=ps();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class s{constructor({prefixes:l,parent:u}={}){this._names={},this._prefixes=l,this._parent=u}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const u=this._names[l]||this._nameGroup(l);return`${l}${u.index++}`}_nameGroup(l){var u,p;if(!((p=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||p===void 0)&&p.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=s;class o extends t.Name{constructor(l,u){super(u),this.prefix=l}setValue(l,{property:u,itemIndex:p}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(u)}[${p}]`}}e.ValueScopeName=o;const a=(0,t._)`\n`;class i extends s{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?a:t.nil}}get(){return this._scope}name(l){return new o(l,this._newName(l))}value(l,u){var p;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const h=this.toName(l),{prefix:v}=h,x=(p=u.key)!==null&&p!==void 0?p:u.ref;let y=this._values[v];if(y){const f=y.get(x);if(f)return f}else y=this._values[v]=new Map;y.set(x,h);const m=this._scope[v]||(this._scope[v]=[]),_=m.length;return m[_]=u.ref,h.setValue(u,{property:v,itemIndex:_}),h}getValue(l,u){const p=this._values[l];if(p)return p.get(u)}scopeRefs(l,u=this._values){return this._reduceValues(u,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${l}${p.scopePath}`})}scopeCode(l=this._values,u,p){return this._reduceValues(l,h=>{if(h.value===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return h.value.code},u,p)}_reduceValues(l,u,p={},h){let v=t.nil;for(const x in l){const y=l[x];if(!y)continue;const m=p[x]=p[x]||new Map;y.forEach(_=>{if(m.has(_))return;m.set(_,n.Started);let f=u(_);if(f){const b=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${b} ${_} = ${f};${this.opts._n}`}else if(f=h==null?void 0:h(_))v=(0,t._)`${v}${f}${this.opts._n}`;else throw new r(_);m.set(_,n.Completed)})}return v}}e.ValueScope=i})(Ka)),Ka}var kd;function ye(){return kd||(kd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=ps(),r=Ed();var n=ps();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var s=Ed();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(k,N){return this}}class a extends o{constructor(k,N,q){super(),this.varKind=k,this.name=N,this.rhs=q}render({es5:k,_n:N}){const q=k?r.varKinds.var:this.varKind,F=this.rhs===void 0?"":` = ${this.rhs}`;return`${q} ${this.name}${F};`+N}optimizeNames(k,N){if(k[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,k,N)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends o{constructor(k,N,q){super(),this.lhs=k,this.rhs=N,this.sideEffects=q}render({_n:k}){return`${this.lhs} = ${this.rhs};`+k}optimizeNames(k,N){if(!(this.lhs instanceof t.Name&&!k[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,k,N),this}get names(){const k=this.lhs instanceof t.Name?{}:{...this.lhs.names};return U(k,this.rhs)}}class c extends i{constructor(k,N,q,F){super(k,q,F),this.op=N}render({_n:k}){return`${this.lhs} ${this.op}= ${this.rhs};`+k}}class l extends o{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`${this.label}:`+k}}class u extends o{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`break${this.label?` ${this.label}`:""};`+k}}class p extends o{constructor(k){super(),this.error=k}render({_n:k}){return`throw ${this.error};`+k}get names(){return this.error.names}}class h extends o{constructor(k){super(),this.code=k}render({_n:k}){return`${this.code};`+k}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(k,N){return this.code=W(this.code,k,N),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends o{constructor(k=[]){super(),this.nodes=k}render(k){return this.nodes.reduce((N,q)=>N+q.render(k),"")}optimizeNodes(){const{nodes:k}=this;let N=k.length;for(;N--;){const q=k[N].optimizeNodes();Array.isArray(q)?k.splice(N,1,...q):q?k[N]=q:k.splice(N,1)}return k.length>0?this:void 0}optimizeNames(k,N){const{nodes:q}=this;let F=q.length;for(;F--;){const Y=q[F];Y.optimizeNames(k,N)||(ee(k,Y.names),q.splice(F,1))}return q.length>0?this:void 0}get names(){return this.nodes.reduce((k,N)=>V(k,N.names),{})}}class x extends v{render(k){return"{"+k._n+super.render(k)+"}"+k._n}}class y extends v{}class m extends x{}m.kind="else";class _ extends x{constructor(k,N){super(N),this.condition=k}render(k){let N=`if(${this.condition})`+super.render(k);return this.else&&(N+="else "+this.else.render(k)),N}optimizeNodes(){super.optimizeNodes();const k=this.condition;if(k===!0)return this.nodes;let N=this.else;if(N){const q=N.optimizeNodes();N=this.else=Array.isArray(q)?new m(q):q}if(N)return k===!1?N instanceof _?N:N.nodes:this.nodes.length?this:new _(K(k),N instanceof _?[N]:N.nodes);if(!(k===!1||!this.nodes.length))return this}optimizeNames(k,N){var q;if(this.else=(q=this.else)===null||q===void 0?void 0:q.optimizeNames(k,N),!!(super.optimizeNames(k,N)||this.else))return this.condition=W(this.condition,k,N),this}get names(){const k=super.names;return U(k,this.condition),this.else&&V(k,this.else.names),k}}_.kind="if";class f extends x{}f.kind="for";class b extends f{constructor(k){super(),this.iteration=k}render(k){return`for(${this.iteration})`+super.render(k)}optimizeNames(k,N){if(super.optimizeNames(k,N))return this.iteration=W(this.iteration,k,N),this}get names(){return V(super.names,this.iteration.names)}}class w extends f{constructor(k,N,q,F){super(),this.varKind=k,this.name=N,this.from=q,this.to=F}render(k){const N=k.es5?r.varKinds.var:this.varKind,{name:q,from:F,to:Y}=this;return`for(${N} ${q}=${F}; ${q}<${Y}; ${q}++)`+super.render(k)}get names(){const k=U(super.names,this.from);return U(k,this.to)}}class g extends f{constructor(k,N,q,F){super(),this.loop=k,this.varKind=N,this.name=q,this.iterable=F}render(k){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(k)}optimizeNames(k,N){if(super.optimizeNames(k,N))return this.iterable=W(this.iterable,k,N),this}get names(){return V(super.names,this.iterable.names)}}class $ extends x{constructor(k,N,q){super(),this.name=k,this.args=N,this.async=q}render(k){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(k)}}$.kind="func";class E extends v{render(k){return"return "+super.render(k)}}E.kind="return";class j extends x{render(k){let N="try"+super.render(k);return this.catch&&(N+=this.catch.render(k)),this.finally&&(N+=this.finally.render(k)),N}optimizeNodes(){var k,N;return super.optimizeNodes(),(k=this.catch)===null||k===void 0||k.optimizeNodes(),(N=this.finally)===null||N===void 0||N.optimizeNodes(),this}optimizeNames(k,N){var q,F;return super.optimizeNames(k,N),(q=this.catch)===null||q===void 0||q.optimizeNames(k,N),(F=this.finally)===null||F===void 0||F.optimizeNames(k,N),this}get names(){const k=super.names;return this.catch&&V(k,this.catch.names),this.finally&&V(k,this.finally.names),k}}class O extends x{constructor(k){super(),this.error=k}render(k){return`catch(${this.error})`+super.render(k)}}O.kind="catch";class z extends x{render(k){return"finally"+super.render(k)}}z.kind="finally";class D{constructor(k,N={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...N,_n:N.lines?`
|
|
138
|
-
`:""},this._extScope=k,this._scope=new r.Scope({parent:k}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(k){return this._scope.name(k)}scopeName(k){return this._extScope.name(k)}scopeValue(k,N){const q=this._extScope.value(k,N);return(this._values[q.prefix]||(this._values[q.prefix]=new Set)).add(q),q}getScopeValue(k,N){return this._extScope.getValue(k,N)}scopeRefs(k){return this._extScope.scopeRefs(k,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(k,N,q,F){const Y=this._scope.toName(N);return q!==void 0&&F&&(this._constants[Y.str]=q),this._leafNode(new a(k,Y,q)),Y}const(k,N,q){return this._def(r.varKinds.const,k,N,q)}let(k,N,q){return this._def(r.varKinds.let,k,N,q)}var(k,N,q){return this._def(r.varKinds.var,k,N,q)}assign(k,N,q){return this._leafNode(new i(k,N,q))}add(k,N){return this._leafNode(new c(k,e.operators.ADD,N))}code(k){return typeof k=="function"?k():k!==t.nil&&this._leafNode(new h(k)),this}object(...k){const N=["{"];for(const[q,F]of k)N.length>1&&N.push(","),N.push(q),(q!==F||this.opts.es5)&&(N.push(":"),(0,t.addCodeArg)(N,F));return N.push("}"),new t._Code(N)}if(k,N,q){if(this._blockNode(new _(k)),N&&q)this.code(N).else().code(q).endIf();else if(N)this.code(N).endIf();else if(q)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(k){return this._elseNode(new _(k))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(_,m)}_for(k,N){return this._blockNode(k),N&&this.code(N).endFor(),this}for(k,N){return this._for(new b(k),N)}forRange(k,N,q,F,Y=this.opts.es5?r.varKinds.var:r.varKinds.let){const de=this._scope.toName(k);return this._for(new w(Y,de,N,q),()=>F(de))}forOf(k,N,q,F=r.varKinds.const){const Y=this._scope.toName(k);if(this.opts.es5){const de=N instanceof t.Name?N:this.var("_arr",N);return this.forRange("_i",0,(0,t._)`${de}.length`,oe=>{this.var(Y,(0,t._)`${de}[${oe}]`),q(Y)})}return this._for(new g("of",F,Y,N),()=>q(Y))}forIn(k,N,q,F=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(k,(0,t._)`Object.keys(${N})`,q);const Y=this._scope.toName(k);return this._for(new g("in",F,Y,N),()=>q(Y))}endFor(){return this._endBlockNode(f)}label(k){return this._leafNode(new l(k))}break(k){return this._leafNode(new u(k))}return(k){const N=new E;if(this._blockNode(N),this.code(k),N.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(k,N,q){if(!N&&!q)throw new Error('CodeGen: "try" without "catch" and "finally"');const F=new j;if(this._blockNode(F),this.code(k),N){const Y=this.name("e");this._currNode=F.catch=new O(Y),N(Y)}return q&&(this._currNode=F.finally=new z,this.code(q)),this._endBlockNode(O,z)}throw(k){return this._leafNode(new p(k))}block(k,N){return this._blockStarts.push(this._nodes.length),k&&this.code(k).endBlock(N),this}endBlock(k){const N=this._blockStarts.pop();if(N===void 0)throw new Error("CodeGen: not in self-balancing block");const q=this._nodes.length-N;if(q<0||k!==void 0&&q!==k)throw new Error(`CodeGen: wrong number of nodes: ${q} vs ${k} expected`);return this._nodes.length=N,this}func(k,N=t.nil,q,F){return this._blockNode(new $(k,N,q)),F&&this.code(F).endFunc(),this}endFunc(){return this._endBlockNode($)}optimize(k=1){for(;k-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(k){return this._currNode.nodes.push(k),this}_blockNode(k){this._currNode.nodes.push(k),this._nodes.push(k)}_endBlockNode(k,N){const q=this._currNode;if(q instanceof k||N&&q instanceof N)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${N?`${k.kind}/${N.kind}`:k.kind}"`)}_elseNode(k){const N=this._currNode;if(!(N instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=N.else=k,this}get _root(){return this._nodes[0]}get _currNode(){const k=this._nodes;return k[k.length-1]}set _currNode(k){const N=this._nodes;N[N.length-1]=k}}e.CodeGen=D;function V(P,k){for(const N in k)P[N]=(P[N]||0)+(k[N]||0);return P}function U(P,k){return k instanceof t._CodeOrName?V(P,k.names):P}function W(P,k,N){if(P instanceof t.Name)return q(P);if(!F(P))return P;return new t._Code(P._items.reduce((Y,de)=>(de instanceof t.Name&&(de=q(de)),de instanceof t._Code?Y.push(...de._items):Y.push(de),Y),[]));function q(Y){const de=N[Y.str];return de===void 0||k[Y.str]!==1?Y:(delete k[Y.str],de)}function F(Y){return Y instanceof t._Code&&Y._items.some(de=>de instanceof t.Name&&k[de.str]===1&&N[de.str]!==void 0)}}function ee(P,k){for(const N in k)P[N]=(P[N]||0)-(k[N]||0)}function K(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,t._)`!${M(P)}`}e.not=K;const se=C(e.operators.AND);function L(...P){return P.reduce(se)}e.and=L;const he=C(e.operators.OR);function H(...P){return P.reduce(he)}e.or=H;function C(P){return(k,N)=>k===t.nil?N:N===t.nil?k:(0,t._)`${M(k)} ${P} ${M(N)}`}function M(P){return P instanceof t.Name?P:(0,t._)`(${P})`}})(Ga)),Ga}var Ee={},Cd;function Re(){if(Cd)return Ee;Cd=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.checkStrictMode=Ee.getErrorPath=Ee.Type=Ee.useFunc=Ee.setEvaluated=Ee.evaluatedPropsToName=Ee.mergeEvaluated=Ee.eachItem=Ee.unescapeJsonPointer=Ee.escapeJsonPointer=Ee.escapeFragment=Ee.unescapeFragment=Ee.schemaRefOrVal=Ee.schemaHasRulesButRef=Ee.schemaHasRules=Ee.checkUnknownRules=Ee.alwaysValidSchema=Ee.toHash=void 0;const e=ye(),t=ps();function r(g){const $={};for(const E of g)$[E]=!0;return $}Ee.toHash=r;function n(g,$){return typeof $=="boolean"?$:Object.keys($).length===0?!0:(s(g,$),!o($,g.self.RULES.all))}Ee.alwaysValidSchema=n;function s(g,$=g.schema){const{opts:E,self:j}=g;if(!E.strictSchema||typeof $=="boolean")return;const O=j.RULES.keywords;for(const z in $)O[z]||w(g,`unknown keyword: "${z}"`)}Ee.checkUnknownRules=s;function o(g,$){if(typeof g=="boolean")return!g;for(const E in g)if($[E])return!0;return!1}Ee.schemaHasRules=o;function a(g,$){if(typeof g=="boolean")return!g;for(const E in g)if(E!=="$ref"&&$.all[E])return!0;return!1}Ee.schemaHasRulesButRef=a;function i({topSchemaRef:g,schemaPath:$},E,j,O){if(!O){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,e._)`${E}`}return(0,e._)`${g}${$}${(0,e.getProperty)(j)}`}Ee.schemaRefOrVal=i;function c(g){return p(decodeURIComponent(g))}Ee.unescapeFragment=c;function l(g){return encodeURIComponent(u(g))}Ee.escapeFragment=l;function u(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}Ee.escapeJsonPointer=u;function p(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}Ee.unescapeJsonPointer=p;function h(g,$){if(Array.isArray(g))for(const E of g)$(E);else $(g)}Ee.eachItem=h;function v({mergeNames:g,mergeToName:$,mergeValues:E,resultToName:j}){return(O,z,D,V)=>{const U=D===void 0?z:D instanceof e.Name?(z instanceof e.Name?g(O,z,D):$(O,z,D),D):z instanceof e.Name?($(O,D,z),z):E(z,D);return V===e.Name&&!(U instanceof e.Name)?j(O,U):U}}Ee.mergeEvaluated={props:v({mergeNames:(g,$,E)=>g.if((0,e._)`${E} !== true && ${$} !== undefined`,()=>{g.if((0,e._)`${$} === true`,()=>g.assign(E,!0),()=>g.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${$})`))}),mergeToName:(g,$,E)=>g.if((0,e._)`${E} !== true`,()=>{$===!0?g.assign(E,!0):(g.assign(E,(0,e._)`${E} || {}`),y(g,E,$))}),mergeValues:(g,$)=>g===!0?!0:{...g,...$},resultToName:x}),items:v({mergeNames:(g,$,E)=>g.if((0,e._)`${E} !== true && ${$} !== undefined`,()=>g.assign(E,(0,e._)`${$} === true ? true : ${E} > ${$} ? ${E} : ${$}`)),mergeToName:(g,$,E)=>g.if((0,e._)`${E} !== true`,()=>g.assign(E,$===!0?!0:(0,e._)`${E} > ${$} ? ${E} : ${$}`)),mergeValues:(g,$)=>g===!0?!0:Math.max(g,$),resultToName:(g,$)=>g.var("items",$)})};function x(g,$){if($===!0)return g.var("props",!0);const E=g.var("props",(0,e._)`{}`);return $!==void 0&&y(g,E,$),E}Ee.evaluatedPropsToName=x;function y(g,$,E){Object.keys(E).forEach(j=>g.assign((0,e._)`${$}${(0,e.getProperty)(j)}`,!0))}Ee.setEvaluated=y;const m={};function _(g,$){return g.scopeValue("func",{ref:$,code:m[$.code]||(m[$.code]=new t._Code($.code))})}Ee.useFunc=_;var f;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(f||(Ee.Type=f={}));function b(g,$,E){if(g instanceof e.Name){const j=$===f.Num;return E?j?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:j?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)(g).toString():"/"+u(g)}Ee.getErrorPath=b;function w(g,$,E=g.opts.strictSchema){if(E){if($=`strict mode: ${$}`,E===!0)throw new Error($);g.self.logger.warn($)}}return Ee.checkStrictMode=w,Ee}var gs={},jd;function vt(){if(jd)return gs;jd=1,Object.defineProperty(gs,"__esModule",{value:!0});const e=ye(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return gs.default=t,gs}var Nd;function vs(){return Nd||(Nd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=ye(),r=Re(),n=vt();e.keywordError={message:({keyword:m})=>(0,t.str)`must pass "${m}" keyword validation`},e.keyword$DataError={message:({keyword:m,schemaType:_})=>_?(0,t.str)`"${m}" keyword must be ${_} ($data)`:(0,t.str)`"${m}" keyword is invalid ($data)`};function s(m,_=e.keywordError,f,b){const{it:w}=m,{gen:g,compositeRule:$,allErrors:E}=w,j=p(m,_,f);b??($||E)?c(g,j):l(w,(0,t._)`[${j}]`)}e.reportError=s;function o(m,_=e.keywordError,f){const{it:b}=m,{gen:w,compositeRule:g,allErrors:$}=b,E=p(m,_,f);c(w,E),g||$||l(b,n.default.vErrors)}e.reportExtraError=o;function a(m,_){m.assign(n.default.errors,_),m.if((0,t._)`${n.default.vErrors} !== null`,()=>m.if(_,()=>m.assign((0,t._)`${n.default.vErrors}.length`,_),()=>m.assign(n.default.vErrors,null)))}e.resetErrorsCount=a;function i({gen:m,keyword:_,schemaValue:f,data:b,errsCount:w,it:g}){if(w===void 0)throw new Error("ajv implementation error");const $=m.name("err");m.forRange("i",w,n.default.errors,E=>{m.const($,(0,t._)`${n.default.vErrors}[${E}]`),m.if((0,t._)`${$}.instancePath === undefined`,()=>m.assign((0,t._)`${$}.instancePath`,(0,t.strConcat)(n.default.instancePath,g.errorPath))),m.assign((0,t._)`${$}.schemaPath`,(0,t.str)`${g.errSchemaPath}/${_}`),g.opts.verbose&&(m.assign((0,t._)`${$}.schema`,f),m.assign((0,t._)`${$}.data`,b))})}e.extendErrors=i;function c(m,_){const f=m.const("err",_);m.if((0,t._)`${n.default.vErrors} === null`,()=>m.assign(n.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${n.default.vErrors}.push(${f})`),m.code((0,t._)`${n.default.errors}++`)}function l(m,_){const{gen:f,validateName:b,schemaEnv:w}=m;w.$async?f.throw((0,t._)`new ${m.ValidationError}(${_})`):(f.assign((0,t._)`${b}.errors`,_),f.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(m,_,f){const{createErrors:b}=m.it;return b===!1?(0,t._)`{}`:h(m,_,f)}function h(m,_,f={}){const{gen:b,it:w}=m,g=[v(w,f),x(m,f)];return y(m,_,g),b.object(...g)}function v({errorPath:m},{instancePath:_}){const f=_?(0,t.str)`${m}${(0,r.getErrorPath)(_,r.Type.Str)}`:m;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,f)]}function x({keyword:m,it:{errSchemaPath:_}},{schemaPath:f,parentSchema:b}){let w=b?_:(0,t.str)`${_}/${m}`;return f&&(w=(0,t.str)`${w}${(0,r.getErrorPath)(f,r.Type.Str)}`),[u.schemaPath,w]}function y(m,{params:_,message:f},b){const{keyword:w,data:g,schemaValue:$,it:E}=m,{opts:j,propertyName:O,topSchemaRef:z,schemaPath:D}=E;b.push([u.keyword,w],[u.params,typeof _=="function"?_(m):_||(0,t._)`{}`]),j.messages&&b.push([u.message,typeof f=="function"?f(m):f]),j.verbose&&b.push([u.schema,$],[u.parentSchema,(0,t._)`${z}${D}`],[n.default.data,g]),O&&b.push([u.propertyName,O])}})(Ha)),Ha}var Rd;function m0(){if(Rd)return mr;Rd=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.boolOrEmptySchema=mr.topBoolOrEmptySchema=void 0;const e=vs(),t=ye(),r=vt(),n={message:"boolean schema is false"};function s(i){const{gen:c,schema:l,validateName:u}=i;l===!1?a(i,!1):typeof l=="object"&&l.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${u}.errors`,null),c.return(!0))}mr.topBoolOrEmptySchema=s;function o(i,c){const{gen:l,schema:u}=i;u===!1?(l.var(c,!1),a(i)):l.var(c,!0)}mr.boolOrEmptySchema=o;function a(i,c){const{gen:l,data:u}=i,p={gen:l,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:i};(0,e.reportError)(p,n,void 0,c)}return mr}var Ge={},hr={},Ad;function Pd(){if(Ad)return hr;Ad=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.getRules=hr.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(s){return typeof s=="string"&&t.has(s)}hr.isJSONType=r;function n(){const s={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...s,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},s.number,s.string,s.array,s.object],post:{rules:[]},all:{},keywords:{}}}return hr.getRules=n,hr}var Mt={},Td;function Od(){if(Td)return Mt;Td=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.shouldUseRule=Mt.shouldUseGroup=Mt.schemaHasRulesForType=void 0;function e({schema:n,self:s},o){const a=s.RULES.types[o];return a&&a!==!0&&t(n,a)}Mt.schemaHasRulesForType=e;function t(n,s){return s.rules.some(o=>r(n,o))}Mt.shouldUseGroup=t;function r(n,s){var o;return n[s.keyword]!==void 0||((o=s.definition.implements)===null||o===void 0?void 0:o.some(a=>n[a]!==void 0))}return Mt.shouldUseRule=r,Mt}var Id;function ys(){if(Id)return Ge;Id=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.reportTypeError=Ge.checkDataTypes=Ge.checkDataType=Ge.coerceAndCheckDataType=Ge.getJSONTypes=Ge.getSchemaTypes=Ge.DataType=void 0;const e=Pd(),t=Od(),r=vs(),n=ye(),s=Re();var o;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(o||(Ge.DataType=o={}));function a(f){const b=i(f.type);if(b.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!b.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&b.push("null")}return b}Ge.getSchemaTypes=a;function i(f){const b=Array.isArray(f)?f:f?[f]:[];if(b.every(e.isJSONType))return b;throw new Error("type must be JSONType or JSONType[]: "+b.join(","))}Ge.getJSONTypes=i;function c(f,b){const{gen:w,data:g,opts:$}=f,E=u(b,$.coerceTypes),j=b.length>0&&!(E.length===0&&b.length===1&&(0,t.schemaHasRulesForType)(f,b[0]));if(j){const O=x(b,g,$.strictNumbers,o.Wrong);w.if(O,()=>{E.length?p(f,b,E):m(f)})}return j}Ge.coerceAndCheckDataType=c;const l=new Set(["string","number","integer","boolean","null"]);function u(f,b){return b?f.filter(w=>l.has(w)||b==="array"&&w==="array"):[]}function p(f,b,w){const{gen:g,data:$,opts:E}=f,j=g.let("dataType",(0,n._)`typeof ${$}`),O=g.let("coerced",(0,n._)`undefined`);E.coerceTypes==="array"&&g.if((0,n._)`${j} == 'object' && Array.isArray(${$}) && ${$}.length == 1`,()=>g.assign($,(0,n._)`${$}[0]`).assign(j,(0,n._)`typeof ${$}`).if(x(b,$,E.strictNumbers),()=>g.assign(O,$))),g.if((0,n._)`${O} !== undefined`);for(const D of w)(l.has(D)||D==="array"&&E.coerceTypes==="array")&&z(D);g.else(),m(f),g.endIf(),g.if((0,n._)`${O} !== undefined`,()=>{g.assign($,O),h(f,O)});function z(D){switch(D){case"string":g.elseIf((0,n._)`${j} == "number" || ${j} == "boolean"`).assign(O,(0,n._)`"" + ${$}`).elseIf((0,n._)`${$} === null`).assign(O,(0,n._)`""`);return;case"number":g.elseIf((0,n._)`${j} == "boolean" || ${$} === null
|
|
139
|
-
|| (${j} == "string" && ${$} && ${$} == +${$})`).assign(
|
|
140
|
-
|| (${j} === "string" && ${$} && ${$} == +${$} && !(${$} % 1))`).assign(
|
|
141
|
-
|| ${j} === "boolean" || ${$} === null`).assign(O,(0,n._)`[${$}]`)}}}function h({gen:f,parentData:b,parentDataProperty:w},g){f.if((0,n._)`${b} !== undefined`,()=>f.assign((0,n._)`${b}[${w}]`,g))}function v(f,b,w,g=o.Correct){const $=g===o.Correct?n.operators.EQ:n.operators.NEQ;let E;switch(f){case"null":return(0,n._)`${b} ${$} null`;case"array":E=(0,n._)`Array.isArray(${b})`;break;case"object":E=(0,n._)`${b} && typeof ${b} == "object" && !Array.isArray(${b})`;break;case"integer":E=j((0,n._)`!(${b} % 1) && !isNaN(${b})`);break;case"number":E=j();break;default:return(0,n._)`typeof ${b} ${$} ${f}`}return g===o.Correct?E:(0,n.not)(E);function j(O=n.nil){return(0,n.and)((0,n._)`typeof ${b} == "number"`,O,w?(0,n._)`isFinite(${b})`:n.nil)}}Ge.checkDataType=v;function x(f,b,w,g){if(f.length===1)return v(f[0],b,w,g);let $;const E=(0,s.toHash)(f);if(E.array&&E.object){const j=(0,n._)`typeof ${b} != "object"`;$=E.null?j:(0,n._)`!${b} || ${j}`,delete E.null,delete E.array,delete E.object}else $=n.nil;E.number&&delete E.integer;for(const j in E)$=(0,n.and)($,v(j,b,w,g));return $}Ge.checkDataTypes=x;const y={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:b})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${b}}`};function m(f){const b=_(f);(0,r.reportError)(b,y)}Ge.reportTypeError=m;function _(f){const{gen:b,data:w,schema:g}=f,$=(0,s.schemaRefOrVal)(f,g,"type");return{gen:b,keyword:"type",data:w,schema:g.type,schemaCode:$,schemaValue:$,parentSchema:g,params:{},it:f}}return Ge}var mn={},Dd;function h0(){if(Dd)return mn;Dd=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.assignDefaults=void 0;const e=ye(),t=Re();function r(s,o){const{properties:a,items:i}=s.schema;if(o==="object"&&a)for(const c in a)n(s,c,a[c].default);else o==="array"&&Array.isArray(i)&&i.forEach((c,l)=>n(s,l,c.default))}mn.assignDefaults=r;function n(s,o,a){const{gen:i,compositeRule:c,data:l,opts:u}=s;if(a===void 0)return;const p=(0,e._)`${l}${(0,e.getProperty)(o)}`;if(c){(0,t.checkStrictMode)(s,`default is ignored for: ${p}`);return}let h=(0,e._)`${p} === undefined`;u.useDefaults==="empty"&&(h=(0,e._)`${h} || ${p} === null || ${p} === ""`),i.if(h,(0,e._)`${p} = ${(0,e.stringify)(a)}`)}return mn}var yt={},Me={},Md;function bt(){if(Md)return Me;Md=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.validateUnion=Me.validateArray=Me.usePattern=Me.callValidateCode=Me.schemaProperties=Me.allSchemaProperties=Me.noPropertyInData=Me.propertyInData=Me.isOwnProperty=Me.hasPropFunc=Me.reportMissingProp=Me.checkMissingProp=Me.checkReportMissingProp=void 0;const e=ye(),t=Re(),r=vt(),n=Re();function s(f,b){const{gen:w,data:g,it:$}=f;w.if(u(w,g,b,$.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${b}`},!0),f.error()})}Me.checkReportMissingProp=s;function o({gen:f,data:b,it:{opts:w}},g,$){return(0,e.or)(...g.map(E=>(0,e.and)(u(f,b,E,w.ownProperties),(0,e._)`${$} = ${E}`)))}Me.checkMissingProp=o;function a(f,b){f.setParams({missingProperty:b},!0),f.error()}Me.reportMissingProp=a;function i(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Me.hasPropFunc=i;function c(f,b,w){return(0,e._)`${i(f)}.call(${b}, ${w})`}Me.isOwnProperty=c;function l(f,b,w,g){const $=(0,e._)`${b}${(0,e.getProperty)(w)} !== undefined`;return g?(0,e._)`${$} && ${c(f,b,w)}`:$}Me.propertyInData=l;function u(f,b,w,g){const $=(0,e._)`${b}${(0,e.getProperty)(w)} === undefined`;return g?(0,e.or)($,(0,e.not)(c(f,b,w))):$}Me.noPropertyInData=u;function p(f){return f?Object.keys(f).filter(b=>b!=="__proto__"):[]}Me.allSchemaProperties=p;function h(f,b){return p(b).filter(w=>!(0,t.alwaysValidSchema)(f,b[w]))}Me.schemaProperties=h;function v({schemaCode:f,data:b,it:{gen:w,topSchemaRef:g,schemaPath:$,errorPath:E},it:j},O,z,D){const V=D?(0,e._)`${f}, ${b}, ${g}${$}`:b,U=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,E)],[r.default.parentData,j.parentData],[r.default.parentDataProperty,j.parentDataProperty],[r.default.rootData,r.default.rootData]];j.opts.dynamicRef&&U.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const W=(0,e._)`${V}, ${w.object(...U)}`;return z!==e.nil?(0,e._)`${O}.call(${z}, ${W})`:(0,e._)`${O}(${W})`}Me.callValidateCode=v;const x=(0,e._)`new RegExp`;function y({gen:f,it:{opts:b}},w){const g=b.unicodeRegExp?"u":"",{regExp:$}=b.code,E=$(w,g);return f.scopeValue("pattern",{key:E.toString(),ref:E,code:(0,e._)`${$.code==="new RegExp"?x:(0,n.useFunc)(f,$)}(${w}, ${g})`})}Me.usePattern=y;function m(f){const{gen:b,data:w,keyword:g,it:$}=f,E=b.name("valid");if($.allErrors){const O=b.let("valid",!0);return j(()=>b.assign(O,!1)),O}return b.var(E,!0),j(()=>b.break()),E;function j(O){const z=b.const("len",(0,e._)`${w}.length`);b.forRange("i",0,z,D=>{f.subschema({keyword:g,dataProp:D,dataPropType:t.Type.Num},E),b.if((0,e.not)(E),O)})}}Me.validateArray=m;function _(f){const{gen:b,schema:w,keyword:g,it:$}=f;if(!Array.isArray(w))throw new Error("ajv implementation error");if(w.some(z=>(0,t.alwaysValidSchema)($,z))&&!$.opts.unevaluated)return;const j=b.let("valid",!1),O=b.name("_valid");b.block(()=>w.forEach((z,D)=>{const V=f.subschema({keyword:g,schemaProp:D,compositeRule:!0},O);b.assign(j,(0,e._)`${j} || ${O}`),f.mergeValidEvaluated(V,O)||b.if((0,e.not)(j))})),f.result(j,()=>f.reset(),()=>f.error(!0))}return Me.validateUnion=_,Me}var Vd;function p0(){if(Vd)return yt;Vd=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.validateKeywordUsage=yt.validSchemaType=yt.funcKeywordCode=yt.macroKeywordCode=void 0;const e=ye(),t=vt(),r=bt(),n=vs();function s(h,v){const{gen:x,keyword:y,schema:m,parentSchema:_,it:f}=h,b=v.macro.call(f.self,m,_,f),w=l(x,y,b);f.opts.validateSchema!==!1&&f.self.validateSchema(b,!0);const g=x.name("valid");h.subschema({schema:b,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${y}`,topSchemaRef:w,compositeRule:!0},g),h.pass(g,()=>h.error(!0))}yt.macroKeywordCode=s;function o(h,v){var x;const{gen:y,keyword:m,schema:_,parentSchema:f,$data:b,it:w}=h;c(w,v);const g=!b&&v.compile?v.compile.call(w.self,_,f,w):v.validate,$=l(y,m,g),E=y.let("valid");h.block$data(E,j),h.ok((x=v.valid)!==null&&x!==void 0?x:E);function j(){if(v.errors===!1)D(),v.modifying&&a(h),V(()=>h.error());else{const U=v.async?O():z();v.modifying&&a(h),V(()=>i(h,U))}}function O(){const U=y.let("ruleErrs",null);return y.try(()=>D((0,e._)`await `),W=>y.assign(E,!1).if((0,e._)`${W} instanceof ${w.ValidationError}`,()=>y.assign(U,(0,e._)`${W}.errors`),()=>y.throw(W))),U}function z(){const U=(0,e._)`${$}.errors`;return y.assign(U,null),D(e.nil),U}function D(U=v.async?(0,e._)`await `:e.nil){const W=w.opts.passContext?t.default.this:t.default.self,ee=!("compile"in v&&!b||v.schema===!1);y.assign(E,(0,e._)`${U}${(0,r.callValidateCode)(h,$,W,ee)}`,v.modifying)}function V(U){var W;y.if((0,e.not)((W=v.valid)!==null&&W!==void 0?W:E),U)}}yt.funcKeywordCode=o;function a(h){const{gen:v,data:x,it:y}=h;v.if(y.parentData,()=>v.assign(x,(0,e._)`${y.parentData}[${y.parentDataProperty}]`))}function i(h,v){const{gen:x}=h;x.if((0,e._)`Array.isArray(${v})`,()=>{x.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(h)},()=>h.error())}function c({schemaEnv:h},v){if(v.async&&!h.$async)throw new Error("async keyword in sync schema")}function l(h,v,x){if(x===void 0)throw new Error(`keyword "${v}" failed to compile`);return h.scopeValue("keyword",typeof x=="function"?{ref:x}:{ref:x,code:(0,e.stringify)(x)})}function u(h,v,x=!1){return!v.length||v.some(y=>y==="array"?Array.isArray(h):y==="object"?h&&typeof h=="object"&&!Array.isArray(h):typeof h==y||x&&typeof h>"u")}yt.validSchemaType=u;function p({schema:h,opts:v,self:x,errSchemaPath:y},m,_){if(Array.isArray(m.keyword)?!m.keyword.includes(_):m.keyword!==_)throw new Error("ajv implementation error");const f=m.dependencies;if(f!=null&&f.some(b=>!Object.prototype.hasOwnProperty.call(h,b)))throw new Error(`parent schema must have dependencies of ${_}: ${f.join(",")}`);if(m.validateSchema&&!m.validateSchema(h[_])){const w=`keyword "${_}" value is invalid at path "${y}": `+x.errorsText(m.validateSchema.errors);if(v.validateSchema==="log")x.logger.error(w);else throw new Error(w)}}return yt.validateKeywordUsage=p,yt}var Vt={},Fd;function g0(){if(Fd)return Vt;Fd=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.extendSubschemaMode=Vt.extendSubschemaData=Vt.getSubschema=void 0;const e=ye(),t=Re();function r(o,{keyword:a,schemaProp:i,schema:c,schemaPath:l,errSchemaPath:u,topSchemaRef:p}){if(a!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const h=o.schema[a];return i===void 0?{schema:h,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${a}`}:{schema:h[i],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(i)}`,errSchemaPath:`${o.errSchemaPath}/${a}/${(0,t.escapeFragment)(i)}`}}if(c!==void 0){if(l===void 0||u===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:l,topSchemaRef:p,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}Vt.getSubschema=r;function n(o,a,{dataProp:i,dataPropType:c,data:l,dataTypes:u,propertyName:p}){if(l!==void 0&&i!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:h}=a;if(i!==void 0){const{errorPath:x,dataPathArr:y,opts:m}=a,_=h.let("data",(0,e._)`${a.data}${(0,e.getProperty)(i)}`,!0);v(_),o.errorPath=(0,e.str)`${x}${(0,t.getErrorPath)(i,c,m.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${i}`,o.dataPathArr=[...y,o.parentDataProperty]}if(l!==void 0){const x=l instanceof e.Name?l:h.let("data",l,!0);v(x),p!==void 0&&(o.propertyName=p)}u&&(o.dataTypes=u);function v(x){o.data=x,o.dataLevel=a.dataLevel+1,o.dataTypes=[],a.definedProperties=new Set,o.parentData=a.data,o.dataNames=[...a.dataNames,x]}}Vt.extendSubschemaData=n;function s(o,{jtdDiscriminator:a,jtdMetadata:i,compositeRule:c,createErrors:l,allErrors:u}){c!==void 0&&(o.compositeRule=c),l!==void 0&&(o.createErrors=l),u!==void 0&&(o.allErrors=u),o.jtdDiscriminator=a,o.jtdMetadata=i}return Vt.extendSubschemaMode=s,Vt}var Je={},Ya,Ld;function zd(){return Ld||(Ld=1,Ya=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var a=o[s];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),Ya}var Ja={exports:{}},qd;function v0(){if(qd)return Ja.exports;qd=1;var e=Ja.exports=function(n,s,o){typeof s=="function"&&(o=s,s={}),o=s.cb||o;var a=typeof o=="function"?o:o.pre||function(){},i=o.post||function(){};t(s,a,i,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(n,s,o,a,i,c,l,u,p,h){if(a&&typeof a=="object"&&!Array.isArray(a)){s(a,i,c,l,u,p,h);for(var v in a){var x=a[v];if(Array.isArray(x)){if(v in e.arrayKeywords)for(var y=0;y<x.length;y++)t(n,s,o,x[y],i+"/"+v+"/"+y,c,i,v,a,y)}else if(v in e.propsKeywords){if(x&&typeof x=="object")for(var m in x)t(n,s,o,x[m],i+"/"+v+"/"+r(m),c,i,v,a,m)}else(v in e.keywords||n.allKeys&&!(v in e.skipKeywords))&&t(n,s,o,x,i+"/"+v,c,i,v,a)}o(a,i,c,l,u,p,h)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Ja.exports}var Ud;function bs(){if(Ud)return Je;Ud=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.getSchemaRefs=Je.resolveUrl=Je.normalizeId=Je._getFullPath=Je.getFullPath=Je.inlineRef=void 0;const e=Re(),t=zd(),r=v0(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(y,m=!0){return typeof y=="boolean"?!0:m===!0?!a(y):m?i(y)<=m:!1}Je.inlineRef=s;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(y){for(const m in y){if(o.has(m))return!0;const _=y[m];if(Array.isArray(_)&&_.some(a)||typeof _=="object"&&a(_))return!0}return!1}function i(y){let m=0;for(const _ in y){if(_==="$ref")return 1/0;if(m++,!n.has(_)&&(typeof y[_]=="object"&&(0,e.eachItem)(y[_],f=>m+=i(f)),m===1/0))return 1/0}return m}function c(y,m="",_){_!==!1&&(m=p(m));const f=y.parse(m);return l(y,f)}Je.getFullPath=c;function l(y,m){return y.serialize(m).split("#")[0]+"#"}Je._getFullPath=l;const u=/#\/?$/;function p(y){return y?y.replace(u,""):""}Je.normalizeId=p;function h(y,m,_){return _=p(_),y.resolve(m,_)}Je.resolveUrl=h;const v=/^[a-z_][-a-z0-9._]*$/i;function x(y,m){if(typeof y=="boolean")return{};const{schemaId:_,uriResolver:f}=this.opts,b=p(y[_]||m),w={"":b},g=c(f,b,!1),$={},E=new Set;return r(y,{allKeys:!0},(z,D,V,U)=>{if(U===void 0)return;const W=g+D;let ee=w[U];typeof z[_]=="string"&&(ee=K.call(this,z[_])),se.call(this,z.$anchor),se.call(this,z.$dynamicAnchor),w[D]=ee;function K(L){const he=this.opts.uriResolver.resolve;if(L=p(ee?he(ee,L):L),E.has(L))throw O(L);E.add(L);let H=this.refs[L];return typeof H=="string"&&(H=this.refs[H]),typeof H=="object"?j(z,H.schema,L):L!==p(W)&&(L[0]==="#"?(j(z,$[L],L),$[L]=z):this.refs[L]=W),L}function se(L){if(typeof L=="string"){if(!v.test(L))throw new Error(`invalid anchor "${L}"`);K.call(this,`#${L}`)}}}),$;function j(z,D,V){if(D!==void 0&&!t(z,D))throw O(V)}function O(z){return new Error(`reference "${z}" resolves to more than one schema`)}}return Je.getSchemaRefs=x,Je}var Bd;function hn(){if(Bd)return Dt;Bd=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.getData=Dt.KeywordCxt=Dt.validateFunctionCode=void 0;const e=m0(),t=ys(),r=Od(),n=ys(),s=h0(),o=p0(),a=g0(),i=ye(),c=vt(),l=bs(),u=Re(),p=vs();function h(A){if(g(A)&&(E(A),w(A))){m(A);return}v(A,()=>(0,e.topBoolOrEmptySchema)(A))}Dt.validateFunctionCode=h;function v({gen:A,validateName:T,schema:G,schemaEnv:J,opts:ie},ge){ie.code.es5?A.func(T,(0,i._)`${c.default.data}, ${c.default.valCxt}`,J.$async,()=>{A.code((0,i._)`"use strict"; ${f(G,ie)}`),y(A,ie),A.code(ge)}):A.func(T,(0,i._)`${c.default.data}, ${x(ie)}`,J.$async,()=>A.code(f(G,ie)).code(ge))}function x(A){return(0,i._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${A.dynamicRef?(0,i._)`, ${c.default.dynamicAnchors}={}`:i.nil}}={}`}function y(A,T){A.if(c.default.valCxt,()=>{A.var(c.default.instancePath,(0,i._)`${c.default.valCxt}.${c.default.instancePath}`),A.var(c.default.parentData,(0,i._)`${c.default.valCxt}.${c.default.parentData}`),A.var(c.default.parentDataProperty,(0,i._)`${c.default.valCxt}.${c.default.parentDataProperty}`),A.var(c.default.rootData,(0,i._)`${c.default.valCxt}.${c.default.rootData}`),T.dynamicRef&&A.var(c.default.dynamicAnchors,(0,i._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{A.var(c.default.instancePath,(0,i._)`""`),A.var(c.default.parentData,(0,i._)`undefined`),A.var(c.default.parentDataProperty,(0,i._)`undefined`),A.var(c.default.rootData,c.default.data),T.dynamicRef&&A.var(c.default.dynamicAnchors,(0,i._)`{}`)})}function m(A){const{schema:T,opts:G,gen:J}=A;v(A,()=>{G.$comment&&T.$comment&&U(A),z(A),J.let(c.default.vErrors,null),J.let(c.default.errors,0),G.unevaluated&&_(A),j(A),W(A)})}function _(A){const{gen:T,validateName:G}=A;A.evaluated=T.const("evaluated",(0,i._)`${G}.evaluated`),T.if((0,i._)`${A.evaluated}.dynamicProps`,()=>T.assign((0,i._)`${A.evaluated}.props`,(0,i._)`undefined`)),T.if((0,i._)`${A.evaluated}.dynamicItems`,()=>T.assign((0,i._)`${A.evaluated}.items`,(0,i._)`undefined`))}function f(A,T){const G=typeof A=="object"&&A[T.schemaId];return G&&(T.code.source||T.code.process)?(0,i._)`/*# sourceURL=${G} */`:i.nil}function b(A,T){if(g(A)&&(E(A),w(A))){$(A,T);return}(0,e.boolOrEmptySchema)(A,T)}function w({schema:A,self:T}){if(typeof A=="boolean")return!A;for(const G in A)if(T.RULES.all[G])return!0;return!1}function g(A){return typeof A.schema!="boolean"}function $(A,T){const{schema:G,gen:J,opts:ie}=A;ie.$comment&&G.$comment&&U(A),D(A),V(A);const ge=J.const("_errs",c.default.errors);j(A,ge),J.var(T,(0,i._)`${ge} === ${c.default.errors}`)}function E(A){(0,u.checkUnknownRules)(A),O(A)}function j(A,T){if(A.opts.jtd)return K(A,[],!1,T);const G=(0,t.getSchemaTypes)(A.schema),J=(0,t.coerceAndCheckDataType)(A,G);K(A,G,!J,T)}function O(A){const{schema:T,errSchemaPath:G,opts:J,self:ie}=A;T.$ref&&J.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(T,ie.RULES)&&ie.logger.warn(`$ref: keywords ignored in schema at path "${G}"`)}function z(A){const{schema:T,opts:G}=A;T.default!==void 0&&G.useDefaults&&G.strictSchema&&(0,u.checkStrictMode)(A,"default is ignored in the schema root")}function D(A){const T=A.schema[A.opts.schemaId];T&&(A.baseId=(0,l.resolveUrl)(A.opts.uriResolver,A.baseId,T))}function V(A){if(A.schema.$async&&!A.schemaEnv.$async)throw new Error("async schema in sync schema")}function U({gen:A,schemaEnv:T,schema:G,errSchemaPath:J,opts:ie}){const ge=G.$comment;if(ie.$comment===!0)A.code((0,i._)`${c.default.self}.logger.log(${ge})`);else if(typeof ie.$comment=="function"){const ze=(0,i.str)`${J}/$comment`,rt=A.scopeValue("root",{ref:T.root});A.code((0,i._)`${c.default.self}.opts.$comment(${ge}, ${ze}, ${rt}.schema)`)}}function W(A){const{gen:T,schemaEnv:G,validateName:J,ValidationError:ie,opts:ge}=A;G.$async?T.if((0,i._)`${c.default.errors} === 0`,()=>T.return(c.default.data),()=>T.throw((0,i._)`new ${ie}(${c.default.vErrors})`)):(T.assign((0,i._)`${J}.errors`,c.default.vErrors),ge.unevaluated&&ee(A),T.return((0,i._)`${c.default.errors} === 0`))}function ee({gen:A,evaluated:T,props:G,items:J}){G instanceof i.Name&&A.assign((0,i._)`${T}.props`,G),J instanceof i.Name&&A.assign((0,i._)`${T}.items`,J)}function K(A,T,G,J){const{gen:ie,schema:ge,data:ze,allErrors:rt,opts:qe,self:R}=A,{RULES:I}=R;if(ge.$ref&&(qe.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(ge,I))){ie.block(()=>F(A,"$ref",I.all.$ref.definition));return}qe.jtd||L(A,T),ie.block(()=>{for(const re of I.rules)B(re);B(I.post)});function B(re){(0,r.shouldUseGroup)(ge,re)&&(re.type?(ie.if((0,n.checkDataType)(re.type,ze,qe.strictNumbers)),se(A,re),T.length===1&&T[0]===re.type&&G&&(ie.else(),(0,n.reportTypeError)(A)),ie.endIf()):se(A,re),rt||ie.if((0,i._)`${c.default.errors} === ${J||0}`))}}function se(A,T){const{gen:G,schema:J,opts:{useDefaults:ie}}=A;ie&&(0,s.assignDefaults)(A,T.type),G.block(()=>{for(const ge of T.rules)(0,r.shouldUseRule)(J,ge)&&F(A,ge.keyword,ge.definition,T.type)})}function L(A,T){A.schemaEnv.meta||!A.opts.strictTypes||(he(A,T),A.opts.allowUnionTypes||H(A,T),C(A,A.dataTypes))}function he(A,T){if(T.length){if(!A.dataTypes.length){A.dataTypes=T;return}T.forEach(G=>{P(A.dataTypes,G)||N(A,`type "${G}" not allowed by context "${A.dataTypes.join(",")}"`)}),k(A,T)}}function H(A,T){T.length>1&&!(T.length===2&&T.includes("null"))&&N(A,"use allowUnionTypes to allow union type keyword")}function C(A,T){const G=A.self.RULES.all;for(const J in G){const ie=G[J];if(typeof ie=="object"&&(0,r.shouldUseRule)(A.schema,ie)){const{type:ge}=ie.definition;ge.length&&!ge.some(ze=>M(T,ze))&&N(A,`missing type "${ge.join(",")}" for keyword "${J}"`)}}}function M(A,T){return A.includes(T)||T==="number"&&A.includes("integer")}function P(A,T){return A.includes(T)||T==="integer"&&A.includes("number")}function k(A,T){const G=[];for(const J of A.dataTypes)P(T,J)?G.push(J):T.includes("integer")&&J==="number"&&G.push("integer");A.dataTypes=G}function N(A,T){const G=A.schemaEnv.baseId+A.errSchemaPath;T+=` at "${G}" (strictTypes)`,(0,u.checkStrictMode)(A,T,A.opts.strictTypes)}class q{constructor(T,G,J){if((0,o.validateKeywordUsage)(T,G,J),this.gen=T.gen,this.allErrors=T.allErrors,this.keyword=J,this.data=T.data,this.schema=T.schema[J],this.$data=G.$data&&T.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(T,this.schema,J,this.$data),this.schemaType=G.schemaType,this.parentSchema=T.schema,this.params={},this.it=T,this.def=G,this.$data)this.schemaCode=T.gen.const("vSchema",oe(this.$data,T));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,G.schemaType,G.allowUndefined))throw new Error(`${J} value must be ${JSON.stringify(G.schemaType)}`);("code"in G?G.trackErrors:G.errors!==!1)&&(this.errsCount=T.gen.const("_errs",c.default.errors))}result(T,G,J){this.failResult((0,i.not)(T),G,J)}failResult(T,G,J){this.gen.if(T),J?J():this.error(),G?(this.gen.else(),G(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(T,G){this.failResult((0,i.not)(T),void 0,G)}fail(T){if(T===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(T),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(T){if(!this.$data)return this.fail(T);const{schemaCode:G}=this;this.fail((0,i._)`${G} !== undefined && (${(0,i.or)(this.invalid$data(),T)})`)}error(T,G,J){if(G){this.setParams(G),this._error(T,J),this.setParams({});return}this._error(T,J)}_error(T,G){(T?p.reportExtraError:p.reportError)(this,this.def.error,G)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(T){this.allErrors||this.gen.if(T)}setParams(T,G){G?Object.assign(this.params,T):this.params=T}block$data(T,G,J=i.nil){this.gen.block(()=>{this.check$data(T,J),G()})}check$data(T=i.nil,G=i.nil){if(!this.$data)return;const{gen:J,schemaCode:ie,schemaType:ge,def:ze}=this;J.if((0,i.or)((0,i._)`${ie} === undefined`,G)),T!==i.nil&&J.assign(T,!0),(ge.length||ze.validateSchema)&&(J.elseIf(this.invalid$data()),this.$dataError(),T!==i.nil&&J.assign(T,!1)),J.else()}invalid$data(){const{gen:T,schemaCode:G,schemaType:J,def:ie,it:ge}=this;return(0,i.or)(ze(),rt());function ze(){if(J.length){if(!(G instanceof i.Name))throw new Error("ajv implementation error");const qe=Array.isArray(J)?J:[J];return(0,i._)`${(0,n.checkDataTypes)(qe,G,ge.opts.strictNumbers,n.DataType.Wrong)}`}return i.nil}function rt(){if(ie.validateSchema){const qe=T.scopeValue("validate$data",{ref:ie.validateSchema});return(0,i._)`!${qe}(${G})`}return i.nil}}subschema(T,G){const J=(0,a.getSubschema)(this.it,T);(0,a.extendSubschemaData)(J,this.it,T),(0,a.extendSubschemaMode)(J,T);const ie={...this.it,...J,items:void 0,props:void 0};return b(ie,G),ie}mergeEvaluated(T,G){const{it:J,gen:ie}=this;J.opts.unevaluated&&(J.props!==!0&&T.props!==void 0&&(J.props=u.mergeEvaluated.props(ie,T.props,J.props,G)),J.items!==!0&&T.items!==void 0&&(J.items=u.mergeEvaluated.items(ie,T.items,J.items,G)))}mergeValidEvaluated(T,G){const{it:J,gen:ie}=this;if(J.opts.unevaluated&&(J.props!==!0||J.items!==!0))return ie.if(G,()=>this.mergeEvaluated(T,i.Name)),!0}}Dt.KeywordCxt=q;function F(A,T,G,J){const ie=new q(A,G,T);"code"in G?G.code(ie,J):ie.$data&&G.validate?(0,o.funcKeywordCode)(ie,G):"macro"in G?(0,o.macroKeywordCode)(ie,G):(G.compile||G.validate)&&(0,o.funcKeywordCode)(ie,G)}const Y=/^\/(?:[^~]|~0|~1)*$/,de=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function oe(A,{dataLevel:T,dataNames:G,dataPathArr:J}){let ie,ge;if(A==="")return c.default.rootData;if(A[0]==="/"){if(!Y.test(A))throw new Error(`Invalid JSON-pointer: ${A}`);ie=A,ge=c.default.rootData}else{const R=de.exec(A);if(!R)throw new Error(`Invalid JSON-pointer: ${A}`);const I=+R[1];if(ie=R[2],ie==="#"){if(I>=T)throw new Error(qe("property/index",I));return J[T-I]}if(I>T)throw new Error(qe("data",I));if(ge=G[T-I],!ie)return ge}let ze=ge;const rt=ie.split("/");for(const R of rt)R&&(ge=(0,i._)`${ge}${(0,i.getProperty)((0,u.unescapeJsonPointer)(R))}`,ze=(0,i._)`${ze} && ${ge}`);return ze;function qe(R,I){return`Cannot access ${R} ${I} levels up, current level is ${T}`}}return Dt.getData=oe,Dt}var _s={},Wd;function xs(){if(Wd)return _s;Wd=1,Object.defineProperty(_s,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return _s.default=e,_s}var ws={},Hd;function pn(){if(Hd)return ws;Hd=1,Object.defineProperty(ws,"__esModule",{value:!0});const e=bs();class t extends Error{constructor(n,s,o,a){super(a||`can't resolve reference ${o} from id ${s}`),this.missingRef=(0,e.resolveUrl)(n,s,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return ws.default=t,ws}var it={},Gd;function $s(){if(Gd)return it;Gd=1,Object.defineProperty(it,"__esModule",{value:!0}),it.resolveSchema=it.getCompilingSchema=it.resolveRef=it.compileSchema=it.SchemaEnv=void 0;const e=ye(),t=xs(),r=vt(),n=bs(),s=Re(),o=hn();class a{constructor(_){var f;this.refs={},this.dynamicAnchors={};let b;typeof _.schema=="object"&&(b=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(f=_.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(b==null?void 0:b[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=b==null?void 0:b.$async,this.refs={}}}it.SchemaEnv=a;function i(m){const _=u.call(this,m);if(_)return _;const f=(0,n.getFullPath)(this.opts.uriResolver,m.root.baseId),{es5:b,lines:w}=this.opts.code,{ownProperties:g}=this.opts,$=new e.CodeGen(this.scope,{es5:b,lines:w,ownProperties:g});let E;m.$async&&(E=$.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const j=$.scopeName("validate");m.validateName=j;const O={gen:$,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:$.scopeValue("schema",this.opts.code.source===!0?{ref:m.schema,code:(0,e.stringify)(m.schema)}:{ref:m.schema}),validateName:j,ValidationError:E,schema:m.schema,schemaEnv:m,rootId:f,baseId:m.baseId||f,schemaPath:e.nil,errSchemaPath:m.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let z;try{this._compilations.add(m),(0,o.validateFunctionCode)(O),$.optimize(this.opts.code.optimize);const D=$.toString();z=`${$.scopeRefs(r.default.scope)}return ${D}`,this.opts.code.process&&(z=this.opts.code.process(z,m));const U=new Function(`${r.default.self}`,`${r.default.scope}`,z)(this,this.scope.get());if(this.scope.value(j,{ref:U}),U.errors=null,U.schema=m.schema,U.schemaEnv=m,m.$async&&(U.$async=!0),this.opts.code.source===!0&&(U.source={validateName:j,validateCode:D,scopeValues:$._values}),this.opts.unevaluated){const{props:W,items:ee}=O;U.evaluated={props:W instanceof e.Name?void 0:W,items:ee instanceof e.Name?void 0:ee,dynamicProps:W instanceof e.Name,dynamicItems:ee instanceof e.Name},U.source&&(U.source.evaluated=(0,e.stringify)(U.evaluated))}return m.validate=U,m}catch(D){throw delete m.validate,delete m.validateName,z&&this.logger.error("Error compiling schema, function code:",z),D}finally{this._compilations.delete(m)}}it.compileSchema=i;function c(m,_,f){var b;f=(0,n.resolveUrl)(this.opts.uriResolver,_,f);const w=m.refs[f];if(w)return w;let g=h.call(this,m,f);if(g===void 0){const $=(b=m.localRefs)===null||b===void 0?void 0:b[f],{schemaId:E}=this.opts;$&&(g=new a({schema:$,schemaId:E,root:m,baseId:_}))}if(g!==void 0)return m.refs[f]=l.call(this,g)}it.resolveRef=c;function l(m){return(0,n.inlineRef)(m.schema,this.opts.inlineRefs)?m.schema:m.validate?m:i.call(this,m)}function u(m){for(const _ of this._compilations)if(p(_,m))return _}it.getCompilingSchema=u;function p(m,_){return m.schema===_.schema&&m.root===_.root&&m.baseId===_.baseId}function h(m,_){let f;for(;typeof(f=this.refs[_])=="string";)_=f;return f||this.schemas[_]||v.call(this,m,_)}function v(m,_){const f=this.opts.uriResolver.parse(_),b=(0,n._getFullPath)(this.opts.uriResolver,f);let w=(0,n.getFullPath)(this.opts.uriResolver,m.baseId,void 0);if(Object.keys(m.schema).length>0&&b===w)return y.call(this,f,m);const g=(0,n.normalizeId)(b),$=this.refs[g]||this.schemas[g];if(typeof $=="string"){const E=v.call(this,m,$);return typeof(E==null?void 0:E.schema)!="object"?void 0:y.call(this,f,E)}if(typeof($==null?void 0:$.schema)=="object"){if($.validate||i.call(this,$),g===(0,n.normalizeId)(_)){const{schema:E}=$,{schemaId:j}=this.opts,O=E[j];return O&&(w=(0,n.resolveUrl)(this.opts.uriResolver,w,O)),new a({schema:E,schemaId:j,root:m,baseId:w})}return y.call(this,f,$)}}it.resolveSchema=v;const x=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(m,{baseId:_,schema:f,root:b}){var w;if(((w=m.fragment)===null||w===void 0?void 0:w[0])!=="/")return;for(const E of m.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const j=f[(0,s.unescapeFragment)(E)];if(j===void 0)return;f=j;const O=typeof f=="object"&&f[this.opts.schemaId];!x.has(E)&&O&&(_=(0,n.resolveUrl)(this.opts.uriResolver,_,O))}let g;if(typeof f!="boolean"&&f.$ref&&!(0,s.schemaHasRulesButRef)(f,this.RULES)){const E=(0,n.resolveUrl)(this.opts.uriResolver,_,f.$ref);g=v.call(this,b,E)}const{schemaId:$}=this.opts;if(g=g||new a({schema:f,schemaId:$,root:b,baseId:_}),g.schema!==g.root.schema)return g}return it}const y0={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Ss={},gn={exports:{}},Xa,Zd;function Kd(){if(Zd)return Xa;Zd=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(h){let v="",x=0,y=0;for(y=0;y<h.length;y++)if(x=h[y].charCodeAt(0),x!==48){if(!(x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102))return"";v+=h[y];break}for(y+=1;y<h.length;y++){if(x=h[y].charCodeAt(0),!(x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102))return"";v+=h[y]}return v}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(h){return h.length=0,!0}function o(h,v,x){if(h.length){const y=r(h);if(y!=="")v.push(y);else return x.error=!0,!1;h.length=0}return!0}function a(h){let v=0;const x={error:!1,address:"",zone:""},y=[],m=[];let _=!1,f=!1,b=o;for(let w=0;w<h.length;w++){const g=h[w];if(!(g==="["||g==="]"))if(g===":"){if(_===!0&&(f=!0),!b(m,y,x))break;if(++v>7){x.error=!0;break}w>0&&h[w-1]===":"&&(_=!0),y.push(":");continue}else if(g==="%"){if(!b(m,y,x))break;b=s}else{m.push(g);continue}}return m.length&&(b===s?x.zone=m.join(""):f?y.push(m.join("")):y.push(r(m))),x.address=y.join(""),x}function i(h){if(c(h,":")<2)return{host:h,isIPV6:!1};const v=a(h);if(v.error)return{host:h,isIPV6:!1};{let x=v.address,y=v.address;return v.zone&&(x+="%"+v.zone,y+="%25"+v.zone),{host:x,isIPV6:!0,escapedHost:y}}}function c(h,v){let x=0;for(let y=0;y<h.length;y++)h[y]===v&&x++;return x}function l(h){let v=h;const x=[];let y=-1,m=0;for(;m=v.length;){if(m===1){if(v===".")break;if(v==="/"){x.push("/");break}else{x.push(v);break}}else if(m===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){x.push("/");break}}else if(m===3&&v==="/.."){x.length!==0&&x.pop(),x.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),x.length!==0&&x.pop();continue}}if((y=v.indexOf("/",1))===-1){x.push(v);break}else x.push(v.slice(0,y)),v=v.slice(y)}return x.join("")}function u(h,v){const x=v!==!0?escape:unescape;return h.scheme!==void 0&&(h.scheme=x(h.scheme)),h.userinfo!==void 0&&(h.userinfo=x(h.userinfo)),h.host!==void 0&&(h.host=x(h.host)),h.path!==void 0&&(h.path=x(h.path)),h.query!==void 0&&(h.query=x(h.query)),h.fragment!==void 0&&(h.fragment=x(h.fragment)),h}function p(h){const v=[];if(h.userinfo!==void 0&&(v.push(h.userinfo),v.push("@")),h.host!==void 0){let x=unescape(h.host);if(!t(x)){const y=i(x);y.isIPV6===!0?x=`[${y.escapedHost}]`:x=h.host}v.push(x)}return(typeof h.port=="number"||typeof h.port=="string")&&(v.push(":"),v.push(String(h.port))),v.length?v.join(""):void 0}return Xa={nonSimpleDomain:n,recomposeAuthority:p,normalizeComponentEncoding:u,removeDotSegments:l,isIPv4:t,isUUID:e,normalizeIPv6:i,stringArrayToHexStripped:r},Xa}var Qa,Yd;function b0(){if(Yd)return Qa;Yd=1;const{isUUID:e}=Kd(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(g){return r.indexOf(g)!==-1}function s(g){return g.secure===!0?!0:g.secure===!1?!1:g.scheme?g.scheme.length===3&&(g.scheme[0]==="w"||g.scheme[0]==="W")&&(g.scheme[1]==="s"||g.scheme[1]==="S")&&(g.scheme[2]==="s"||g.scheme[2]==="S"):!1}function o(g){return g.host||(g.error=g.error||"HTTP URIs must have a host."),g}function a(g){const $=String(g.scheme).toLowerCase()==="https";return(g.port===($?443:80)||g.port==="")&&(g.port=void 0),g.path||(g.path="/"),g}function i(g){return g.secure=s(g),g.resourceName=(g.path||"/")+(g.query?"?"+g.query:""),g.path=void 0,g.query=void 0,g}function c(g){if((g.port===(s(g)?443:80)||g.port==="")&&(g.port=void 0),typeof g.secure=="boolean"&&(g.scheme=g.secure?"wss":"ws",g.secure=void 0),g.resourceName){const[$,E]=g.resourceName.split("?");g.path=$&&$!=="/"?$:void 0,g.query=E,g.resourceName=void 0}return g.fragment=void 0,g}function l(g,$){if(!g.path)return g.error="URN can not be parsed",g;const E=g.path.match(t);if(E){const j=$.scheme||g.scheme||"urn";g.nid=E[1].toLowerCase(),g.nss=E[2];const O=`${j}:${$.nid||g.nid}`,z=w(O);g.path=void 0,z&&(g=z.parse(g,$))}else g.error=g.error||"URN can not be parsed.";return g}function u(g,$){if(g.nid===void 0)throw new Error("URN without nid cannot be serialized");const E=$.scheme||g.scheme||"urn",j=g.nid.toLowerCase(),O=`${E}:${$.nid||j}`,z=w(O);z&&(g=z.serialize(g,$));const D=g,V=g.nss;return D.path=`${j||$.nid}:${V}`,$.skipEscape=!0,D}function p(g,$){const E=g;return E.uuid=E.nss,E.nss=void 0,!$.tolerant&&(!E.uuid||!e(E.uuid))&&(E.error=E.error||"UUID is not valid."),E}function h(g){const $=g;return $.nss=(g.uuid||"").toLowerCase(),$}const v={scheme:"http",domainHost:!0,parse:o,serialize:a},x={scheme:"https",domainHost:v.domainHost,parse:o,serialize:a},y={scheme:"ws",domainHost:!0,parse:i,serialize:c},m={scheme:"wss",domainHost:y.domainHost,parse:y.parse,serialize:y.serialize},b={http:v,https:x,ws:y,wss:m,urn:{scheme:"urn",parse:l,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:h,skipNormalize:!0}};Object.setPrototypeOf(b,null);function w(g){return g&&(b[g]||b[g.toLowerCase()])||void 0}return Qa={wsIsSecure:s,SCHEMES:b,isValidSchemeName:n,getSchemeHandler:w},Qa}var Jd;function _0(){if(Jd)return gn.exports;Jd=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:s,nonSimpleDomain:o}=Kd(),{SCHEMES:a,getSchemeHandler:i}=b0();function c(m,_){return typeof m=="string"?m=h(x(m,_),_):typeof m=="object"&&(m=x(h(m,_),_)),m}function l(m,_,f){const b=f?Object.assign({scheme:"null"},f):{scheme:"null"},w=u(x(m,b),x(_,b),b,!0);return b.skipEscape=!0,h(w,b)}function u(m,_,f,b){const w={};return b||(m=x(h(m,f),f),_=x(h(_,f),f)),f=f||{},!f.tolerant&&_.scheme?(w.scheme=_.scheme,w.userinfo=_.userinfo,w.host=_.host,w.port=_.port,w.path=t(_.path||""),w.query=_.query):(_.userinfo!==void 0||_.host!==void 0||_.port!==void 0?(w.userinfo=_.userinfo,w.host=_.host,w.port=_.port,w.path=t(_.path||""),w.query=_.query):(_.path?(_.path[0]==="/"?w.path=t(_.path):((m.userinfo!==void 0||m.host!==void 0||m.port!==void 0)&&!m.path?w.path="/"+_.path:m.path?w.path=m.path.slice(0,m.path.lastIndexOf("/")+1)+_.path:w.path=_.path,w.path=t(w.path)),w.query=_.query):(w.path=m.path,_.query!==void 0?w.query=_.query:w.query=m.query),w.userinfo=m.userinfo,w.host=m.host,w.port=m.port),w.scheme=m.scheme),w.fragment=_.fragment,w}function p(m,_,f){return typeof m=="string"?(m=unescape(m),m=h(n(x(m,f),!0),{...f,skipEscape:!0})):typeof m=="object"&&(m=h(n(m,!0),{...f,skipEscape:!0})),typeof _=="string"?(_=unescape(_),_=h(n(x(_,f),!0),{...f,skipEscape:!0})):typeof _=="object"&&(_=h(n(_,!0),{...f,skipEscape:!0})),m.toLowerCase()===_.toLowerCase()}function h(m,_){const f={host:m.host,scheme:m.scheme,userinfo:m.userinfo,port:m.port,path:m.path,query:m.query,nid:m.nid,nss:m.nss,uuid:m.uuid,fragment:m.fragment,reference:m.reference,resourceName:m.resourceName,secure:m.secure,error:""},b=Object.assign({},_),w=[],g=i(b.scheme||f.scheme);g&&g.serialize&&g.serialize(f,b),f.path!==void 0&&(b.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),b.reference!=="suffix"&&f.scheme&&w.push(f.scheme,":");const $=r(f);if($!==void 0&&(b.reference!=="suffix"&&w.push("//"),w.push($),f.path&&f.path[0]!=="/"&&w.push("/")),f.path!==void 0){let E=f.path;!b.absolutePath&&(!g||!g.absolutePath)&&(E=t(E)),$===void 0&&E[0]==="/"&&E[1]==="/"&&(E="/%2F"+E.slice(2)),w.push(E)}return f.query!==void 0&&w.push("?",f.query),f.fragment!==void 0&&w.push("#",f.fragment),w.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function x(m,_){const f=Object.assign({},_),b={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let w=!1;f.reference==="suffix"&&(f.scheme?m=f.scheme+":"+m:m="//"+m);const g=m.match(v);if(g){if(b.scheme=g[1],b.userinfo=g[3],b.host=g[4],b.port=parseInt(g[5],10),b.path=g[6]||"",b.query=g[7],b.fragment=g[8],isNaN(b.port)&&(b.port=g[5]),b.host)if(s(b.host)===!1){const j=e(b.host);b.host=j.host.toLowerCase(),w=j.isIPV6}else w=!0;b.scheme===void 0&&b.userinfo===void 0&&b.host===void 0&&b.port===void 0&&b.query===void 0&&!b.path?b.reference="same-document":b.scheme===void 0?b.reference="relative":b.fragment===void 0?b.reference="absolute":b.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==b.reference&&(b.error=b.error||"URI is not a "+f.reference+" reference.");const $=i(f.scheme||b.scheme);if(!f.unicodeSupport&&(!$||!$.unicodeSupport)&&b.host&&(f.domainHost||$&&$.domainHost)&&w===!1&&o(b.host))try{b.host=URL.domainToASCII(b.host.toLowerCase())}catch(E){b.error=b.error||"Host's domain name can not be converted to ASCII: "+E}(!$||$&&!$.skipNormalize)&&(m.indexOf("%")!==-1&&(b.scheme!==void 0&&(b.scheme=unescape(b.scheme)),b.host!==void 0&&(b.host=unescape(b.host))),b.path&&(b.path=escape(unescape(b.path))),b.fragment&&(b.fragment=encodeURI(decodeURIComponent(b.fragment)))),$&&$.parse&&$.parse(b,f)}else b.error=b.error||"URI can not be parsed.";return b}const y={SCHEMES:a,normalize:c,resolve:l,resolveComponent:u,equal:p,serialize:h,parse:x};return gn.exports=y,gn.exports.default=y,gn.exports.fastUri=y,gn.exports}var Xd;function x0(){if(Xd)return Ss;Xd=1,Object.defineProperty(Ss,"__esModule",{value:!0});const e=_0();return e.code='require("ajv/dist/runtime/uri").default',Ss.default=e,Ss}var Qd;function ef(){return Qd||(Qd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=hn();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=ye();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=xs(),s=pn(),o=Pd(),a=$s(),i=ye(),c=bs(),l=ys(),u=Re(),p=y0,h=x0(),v=(H,C)=>new RegExp(H,C);v.code="new RegExp";const x=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function b(H){var C,M,P,k,N,q,F,Y,de,oe,A,T,G,J,ie,ge,ze,rt,qe,R,I,B,re,ne,X;const me=H.strict,Pe=(C=H.code)===null||C===void 0?void 0:C.optimize,Ve=Pe===!0||Pe===void 0?1:Pe||0,Qe=(P=(M=H.code)===null||M===void 0?void 0:M.regExp)!==null&&P!==void 0?P:v,Jr=(k=H.uriResolver)!==null&&k!==void 0?k:h.default;return{strictSchema:(q=(N=H.strictSchema)!==null&&N!==void 0?N:me)!==null&&q!==void 0?q:!0,strictNumbers:(Y=(F=H.strictNumbers)!==null&&F!==void 0?F:me)!==null&&Y!==void 0?Y:!0,strictTypes:(oe=(de=H.strictTypes)!==null&&de!==void 0?de:me)!==null&&oe!==void 0?oe:"log",strictTuples:(T=(A=H.strictTuples)!==null&&A!==void 0?A:me)!==null&&T!==void 0?T:"log",strictRequired:(J=(G=H.strictRequired)!==null&&G!==void 0?G:me)!==null&&J!==void 0?J:!1,code:H.code?{...H.code,optimize:Ve,regExp:Qe}:{optimize:Ve,regExp:Qe},loopRequired:(ie=H.loopRequired)!==null&&ie!==void 0?ie:f,loopEnum:(ge=H.loopEnum)!==null&&ge!==void 0?ge:f,meta:(ze=H.meta)!==null&&ze!==void 0?ze:!0,messages:(rt=H.messages)!==null&&rt!==void 0?rt:!0,inlineRefs:(qe=H.inlineRefs)!==null&&qe!==void 0?qe:!0,schemaId:(R=H.schemaId)!==null&&R!==void 0?R:"$id",addUsedSchema:(I=H.addUsedSchema)!==null&&I!==void 0?I:!0,validateSchema:(B=H.validateSchema)!==null&&B!==void 0?B:!0,validateFormats:(re=H.validateFormats)!==null&&re!==void 0?re:!0,unicodeRegExp:(ne=H.unicodeRegExp)!==null&&ne!==void 0?ne:!0,int32range:(X=H.int32range)!==null&&X!==void 0?X:!0,uriResolver:Jr}}class w{constructor(C={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,C=this.opts={...C,...b(C)};const{es5:M,lines:P}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:y,es5:M,lines:P}),this.logger=V(C.logger);const k=C.validateFormats;C.validateFormats=!1,this.RULES=(0,o.getRules)(),g.call(this,m,C,"NOT SUPPORTED"),g.call(this,_,C,"DEPRECATED","warn"),this._metaOpts=z.call(this),C.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),C.keywords&&O.call(this,C.keywords),typeof C.meta=="object"&&this.addMetaSchema(C.meta),E.call(this),C.validateFormats=k}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:C,meta:M,schemaId:P}=this.opts;let k=p;P==="id"&&(k={...p},k.id=k.$id,delete k.$id),M&&C&&this.addMetaSchema(k,k[P],!1)}defaultMeta(){const{meta:C,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof C=="object"?C[M]||C:void 0}validate(C,M){let P;if(typeof C=="string"){if(P=this.getSchema(C),!P)throw new Error(`no schema with key or ref "${C}"`)}else P=this.compile(C);const k=P(M);return"$async"in P||(this.errors=P.errors),k}compile(C,M){const P=this._addSchema(C,M);return P.validate||this._compileSchemaEnv(P)}compileAsync(C,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return k.call(this,C,M);async function k(oe,A){await N.call(this,oe.$schema);const T=this._addSchema(oe,A);return T.validate||q.call(this,T)}async function N(oe){oe&&!this.getSchema(oe)&&await k.call(this,{$ref:oe},!0)}async function q(oe){try{return this._compileSchemaEnv(oe)}catch(A){if(!(A instanceof s.default))throw A;return F.call(this,A),await Y.call(this,A.missingSchema),q.call(this,oe)}}function F({missingSchema:oe,missingRef:A}){if(this.refs[oe])throw new Error(`AnySchema ${oe} is loaded but ${A} cannot be resolved`)}async function Y(oe){const A=await de.call(this,oe);this.refs[oe]||await N.call(this,A.$schema),this.refs[oe]||this.addSchema(A,oe,M)}async function de(oe){const A=this._loading[oe];if(A)return A;try{return await(this._loading[oe]=P(oe))}finally{delete this._loading[oe]}}}addSchema(C,M,P,k=this.opts.validateSchema){if(Array.isArray(C)){for(const q of C)this.addSchema(q,void 0,P,k);return this}let N;if(typeof C=="object"){const{schemaId:q}=this.opts;if(N=C[q],N!==void 0&&typeof N!="string")throw new Error(`schema ${q} must be string`)}return M=(0,c.normalizeId)(M||N),this._checkUnique(M),this.schemas[M]=this._addSchema(C,P,M,k,!0),this}addMetaSchema(C,M,P=this.opts.validateSchema){return this.addSchema(C,M,!0,P),this}validateSchema(C,M){if(typeof C=="boolean")return!0;let P;if(P=C.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const k=this.validate(P,C);if(!k&&M){const N="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(N);else throw new Error(N)}return k}getSchema(C){let M;for(;typeof(M=$.call(this,C))=="string";)C=M;if(M===void 0){const{schemaId:P}=this.opts,k=new a.SchemaEnv({schema:{},schemaId:P});if(M=a.resolveSchema.call(this,k,C),!M)return;this.refs[C]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(C){if(C instanceof RegExp)return this._removeAllSchemas(this.schemas,C),this._removeAllSchemas(this.refs,C),this;switch(typeof C){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const M=$.call(this,C);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[C],delete this.refs[C],this}case"object":{const M=C;this._cache.delete(M);let P=C[this.opts.schemaId];return P&&(P=(0,c.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(C){for(const M of C)this.addKeyword(M);return this}addKeyword(C,M){let P;if(typeof C=="string")P=C,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=P);else if(typeof C=="object"&&M===void 0){if(M=C,P=M.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,P,M),!M)return(0,u.eachItem)(P,N=>ee.call(this,N)),this;se.call(this,M);const k={...M,type:(0,l.getJSONTypes)(M.type),schemaType:(0,l.getJSONTypes)(M.schemaType)};return(0,u.eachItem)(P,k.type.length===0?N=>ee.call(this,N,k):N=>k.type.forEach(q=>ee.call(this,N,k,q))),this}getKeyword(C){const M=this.RULES.all[C];return typeof M=="object"?M.definition:!!M}removeKeyword(C){const{RULES:M}=this;delete M.keywords[C],delete M.all[C];for(const P of M.rules){const k=P.rules.findIndex(N=>N.keyword===C);k>=0&&P.rules.splice(k,1)}return this}addFormat(C,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[C]=M,this}errorsText(C=this.errors,{separator:M=", ",dataVar:P="data"}={}){return!C||C.length===0?"No errors":C.map(k=>`${P}${k.instancePath} ${k.message}`).reduce((k,N)=>k+M+N)}$dataMetaSchema(C,M){const P=this.RULES.all;C=JSON.parse(JSON.stringify(C));for(const k of M){const N=k.split("/").slice(1);let q=C;for(const F of N)q=q[F];for(const F in P){const Y=P[F];if(typeof Y!="object")continue;const{$data:de}=Y.definition,oe=q[F];de&&oe&&(q[F]=he(oe))}}return C}_removeAllSchemas(C,M){for(const P in C){const k=C[P];(!M||M.test(P))&&(typeof k=="string"?delete C[P]:k&&!k.meta&&(this._cache.delete(k.schema),delete C[P]))}}_addSchema(C,M,P,k=this.opts.validateSchema,N=this.opts.addUsedSchema){let q;const{schemaId:F}=this.opts;if(typeof C=="object")q=C[F];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof C!="boolean")throw new Error("schema must be object or boolean")}let Y=this._cache.get(C);if(Y!==void 0)return Y;P=(0,c.normalizeId)(q||P);const de=c.getSchemaRefs.call(this,C,P);return Y=new a.SchemaEnv({schema:C,schemaId:F,meta:M,baseId:P,localRefs:de}),this._cache.set(Y.schema,Y),N&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=Y),k&&this.validateSchema(C,!0),Y}_checkUnique(C){if(this.schemas[C]||this.refs[C])throw new Error(`schema with key or id "${C}" already exists`)}_compileSchemaEnv(C){if(C.meta?this._compileMetaSchema(C):a.compileSchema.call(this,C),!C.validate)throw new Error("ajv implementation error");return C.validate}_compileMetaSchema(C){const M=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,C)}finally{this.opts=M}}}w.ValidationError=n.default,w.MissingRefError=s.default,e.default=w;function g(H,C,M,P="error"){for(const k in H){const N=k;N in C&&this.logger[P](`${M}: option ${k}. ${H[N]}`)}}function $(H){return H=(0,c.normalizeId)(H),this.schemas[H]||this.refs[H]}function E(){const H=this.opts.schemas;if(H)if(Array.isArray(H))this.addSchema(H);else for(const C in H)this.addSchema(H[C],C)}function j(){for(const H in this.opts.formats){const C=this.opts.formats[H];C&&this.addFormat(H,C)}}function O(H){if(Array.isArray(H)){this.addVocabulary(H);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const C in H){const M=H[C];M.keyword||(M.keyword=C),this.addKeyword(M)}}function z(){const H={...this.opts};for(const C of x)delete H[C];return H}const D={log(){},warn(){},error(){}};function V(H){if(H===!1)return D;if(H===void 0)return console;if(H.log&&H.warn&&H.error)return H;throw new Error("logger must implement log, warn and error methods")}const U=/^[a-z_$][a-z0-9_$:-]*$/i;function W(H,C){const{RULES:M}=this;if((0,u.eachItem)(H,P=>{if(M.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!U.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!C&&C.$data&&!("code"in C||"validate"in C))throw new Error('$data keyword must have "code" or "validate" function')}function ee(H,C,M){var P;const k=C==null?void 0:C.post;if(M&&k)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:N}=this;let q=k?N.post:N.rules.find(({type:Y})=>Y===M);if(q||(q={type:M,rules:[]},N.rules.push(q)),N.keywords[H]=!0,!C)return;const F={keyword:H,definition:{...C,type:(0,l.getJSONTypes)(C.type),schemaType:(0,l.getJSONTypes)(C.schemaType)}};C.before?K.call(this,q,F,C.before):q.rules.push(F),N.all[H]=F,(P=C.implements)===null||P===void 0||P.forEach(Y=>this.addKeyword(Y))}function K(H,C,M){const P=H.rules.findIndex(k=>k.keyword===M);P>=0?H.rules.splice(P,0,C):(H.rules.push(C),this.logger.warn(`rule ${M} is not defined`))}function se(H){let{metaSchema:C}=H;C!==void 0&&(H.$data&&this.opts.$data&&(C=he(C)),H.validateSchema=this.compile(C,!0))}const L={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function he(H){return{anyOf:[H,L]}}})(Wa)),Wa}var Es={},ks={},Cs={},tf;function w0(){if(tf)return Cs;tf=1,Object.defineProperty(Cs,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Cs.default=e,Cs}var tr={},rf;function ei(){if(rf)return tr;rf=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.callRef=tr.getValidate=void 0;const e=pn(),t=bt(),r=ye(),n=vt(),s=$s(),o=Re(),a={keyword:"$ref",schemaType:"string",code(l){const{gen:u,schema:p,it:h}=l,{baseId:v,schemaEnv:x,validateName:y,opts:m,self:_}=h,{root:f}=x;if((p==="#"||p==="#/")&&v===f.baseId)return w();const b=s.resolveRef.call(_,f,v,p);if(b===void 0)throw new e.default(h.opts.uriResolver,v,p);if(b instanceof s.SchemaEnv)return g(b);return $(b);function w(){if(x===f)return c(l,y,x,x.$async);const E=u.scopeValue("root",{ref:f});return c(l,(0,r._)`${E}.validate`,f,f.$async)}function g(E){const j=i(l,E);c(l,j,E,E.$async)}function $(E){const j=u.scopeValue("schema",m.code.source===!0?{ref:E,code:(0,r.stringify)(E)}:{ref:E}),O=u.name("valid"),z=l.subschema({schema:E,dataTypes:[],schemaPath:r.nil,topSchemaRef:j,errSchemaPath:p},O);l.mergeEvaluated(z),l.ok(O)}}};function i(l,u){const{gen:p}=l;return u.validate?p.scopeValue("validate",{ref:u.validate}):(0,r._)`${p.scopeValue("wrapper",{ref:u})}.validate`}tr.getValidate=i;function c(l,u,p,h){const{gen:v,it:x}=l,{allErrors:y,schemaEnv:m,opts:_}=x,f=_.passContext?n.default.this:r.nil;h?b():w();function b(){if(!m.$async)throw new Error("async schema referenced by sync schema");const E=v.let("valid");v.try(()=>{v.code((0,r._)`await ${(0,t.callValidateCode)(l,u,f)}`),$(u),y||v.assign(E,!0)},j=>{v.if((0,r._)`!(${j} instanceof ${x.ValidationError})`,()=>v.throw(j)),g(j),y||v.assign(E,!1)}),l.ok(E)}function w(){l.result((0,t.callValidateCode)(l,u,f),()=>$(u),()=>g(u))}function g(E){const j=(0,r._)`${E}.errors`;v.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${j} : ${n.default.vErrors}.concat(${j})`),v.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function $(E){var j;if(!x.opts.unevaluated)return;const O=(j=p==null?void 0:p.validate)===null||j===void 0?void 0:j.evaluated;if(x.props!==!0)if(O&&!O.dynamicProps)O.props!==void 0&&(x.props=o.mergeEvaluated.props(v,O.props,x.props));else{const z=v.var("props",(0,r._)`${E}.evaluated.props`);x.props=o.mergeEvaluated.props(v,z,x.props,r.Name)}if(x.items!==!0)if(O&&!O.dynamicItems)O.items!==void 0&&(x.items=o.mergeEvaluated.items(v,O.items,x.items));else{const z=v.var("items",(0,r._)`${E}.evaluated.items`);x.items=o.mergeEvaluated.items(v,z,x.items,r.Name)}}}return tr.callRef=c,tr.default=a,tr}var nf;function sf(){if(nf)return ks;nf=1,Object.defineProperty(ks,"__esModule",{value:!0});const e=w0(),t=ei(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return ks.default=r,ks}var js={},Ns={},of;function $0(){if(of)return Ns;of=1,Object.defineProperty(Ns,"__esModule",{value:!0});const e=ye(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:o,schemaCode:a})=>(0,e.str)`must be ${r[o].okStr} ${a}`,params:({keyword:o,schemaCode:a})=>(0,e._)`{comparison: ${r[o].okStr}, limit: ${a}}`},s={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(o){const{keyword:a,data:i,schemaCode:c}=o;o.fail$data((0,e._)`${i} ${r[a].fail} ${c} || isNaN(${i})`)}};return Ns.default=s,Ns}var Rs={},af;function S0(){if(af)return Rs;af=1,Object.defineProperty(Rs,"__esModule",{value:!0});const e=ye(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:s,data:o,schemaCode:a,it:i}=n,c=i.opts.multipleOfPrecision,l=s.let("res"),u=c?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${c}`:(0,e._)`${l} !== parseInt(${l})`;n.fail$data((0,e._)`(${a} === 0 || (${l} = ${o}/${a}, ${u}))`)}};return Rs.default=r,Rs}var As={},Ps={},cf;function E0(){if(cf)return Ps;cf=1,Object.defineProperty(Ps,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,s=0,o;for(;s<r;)n++,o=t.charCodeAt(s++),o>=55296&&o<=56319&&s<r&&(o=t.charCodeAt(s),(o&64512)===56320&&s++);return n}return Ps.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ps}var lf;function k0(){if(lf)return As;lf=1,Object.defineProperty(As,"__esModule",{value:!0});const e=ye(),t=Re(),r=E0(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:a}){const i=o==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${a} characters`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:a,data:i,schemaCode:c,it:l}=o,u=a==="maxLength"?e.operators.GT:e.operators.LT,p=l.opts.unicode===!1?(0,e._)`${i}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${i})`;o.fail$data((0,e._)`${p} ${u} ${c}`)}};return As.default=s,As}var Ts={},uf;function C0(){if(uf)return Ts;uf=1,Object.defineProperty(Ts,"__esModule",{value:!0});const e=bt(),t=ye(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,t.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,t._)`{pattern: ${s}}`},code(s){const{data:o,$data:a,schema:i,schemaCode:c,it:l}=s,u=l.opts.unicodeRegExp?"u":"",p=a?(0,t._)`(new RegExp(${c}, ${u}))`:(0,e.usePattern)(s,i);s.fail$data((0,t._)`!${p}.test(${o})`)}};return Ts.default=n,Ts}var Os={},df;function j0(){if(df)return Os;df=1,Object.defineProperty(Os,"__esModule",{value:!0});const e=ye(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const o=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${s} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:s,data:o,schemaCode:a}=n,i=s==="maxProperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${o}).length ${i} ${a}`)}};return Os.default=r,Os}var Is={},ff;function N0(){if(ff)return Is;ff=1,Object.defineProperty(Is,"__esModule",{value:!0});const e=bt(),t=ye(),r=Re(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,t.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,t._)`{missingProperty: ${o}}`},code(o){const{gen:a,schema:i,schemaCode:c,data:l,$data:u,it:p}=o,{opts:h}=p;if(!u&&i.length===0)return;const v=i.length>=h.loopRequired;if(p.allErrors?x():y(),h.strictRequired){const f=o.parentSchema.properties,{definedProperties:b}=o.it;for(const w of i)if((f==null?void 0:f[w])===void 0&&!b.has(w)){const g=p.schemaEnv.baseId+p.errSchemaPath,$=`required property "${w}" is not defined at "${g}" (strictRequired)`;(0,r.checkStrictMode)(p,$,p.opts.strictRequired)}}function x(){if(v||u)o.block$data(t.nil,m);else for(const f of i)(0,e.checkReportMissingProp)(o,f)}function y(){const f=a.let("missing");if(v||u){const b=a.let("valid",!0);o.block$data(b,()=>_(f,b)),o.ok(b)}else a.if((0,e.checkMissingProp)(o,i,f)),(0,e.reportMissingProp)(o,f),a.else()}function m(){a.forOf("prop",c,f=>{o.setParams({missingProperty:f}),a.if((0,e.noPropertyInData)(a,l,f,h.ownProperties),()=>o.error())})}function _(f,b){o.setParams({missingProperty:f}),a.forOf(f,c,()=>{a.assign(b,(0,e.propertyInData)(a,l,f,h.ownProperties)),a.if((0,t.not)(b),()=>{o.error(),a.break()})},t.nil)}}};return Is.default=s,Is}var Ds={},mf;function R0(){if(mf)return Ds;mf=1,Object.defineProperty(Ds,"__esModule",{value:!0});const e=ye(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const o=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${s} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:s,data:o,schemaCode:a}=n,i=s==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`${o}.length ${i} ${a}`)}};return Ds.default=r,Ds}var Ms={},Vs={},hf;function ti(){if(hf)return Vs;hf=1,Object.defineProperty(Vs,"__esModule",{value:!0});const e=zd();return e.code='require("ajv/dist/runtime/equal").default',Vs.default=e,Vs}var pf;function A0(){if(pf)return Ms;pf=1,Object.defineProperty(Ms,"__esModule",{value:!0});const e=ys(),t=ye(),r=Re(),n=ti(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:i}})=>(0,t.str)`must NOT have duplicate items (items ## ${i} and ${a} are identical)`,params:({params:{i:a,j:i}})=>(0,t._)`{i: ${a}, j: ${i}}`},code(a){const{gen:i,data:c,$data:l,schema:u,parentSchema:p,schemaCode:h,it:v}=a;if(!l&&!u)return;const x=i.let("valid"),y=p.items?(0,e.getSchemaTypes)(p.items):[];a.block$data(x,m,(0,t._)`${h} === false`),a.ok(x);function m(){const w=i.let("i",(0,t._)`${c}.length`),g=i.let("j");a.setParams({i:w,j:g}),i.assign(x,!0),i.if((0,t._)`${w} > 1`,()=>(_()?f:b)(w,g))}function _(){return y.length>0&&!y.some(w=>w==="object"||w==="array")}function f(w,g){const $=i.name("item"),E=(0,e.checkDataTypes)(y,$,v.opts.strictNumbers,e.DataType.Wrong),j=i.const("indices",(0,t._)`{}`);i.for((0,t._)`;${w}--;`,()=>{i.let($,(0,t._)`${c}[${w}]`),i.if(E,(0,t._)`continue`),y.length>1&&i.if((0,t._)`typeof ${$} == "string"`,(0,t._)`${$} += "_"`),i.if((0,t._)`typeof ${j}[${$}] == "number"`,()=>{i.assign(g,(0,t._)`${j}[${$}]`),a.error(),i.assign(x,!1).break()}).code((0,t._)`${j}[${$}] = ${w}`)})}function b(w,g){const $=(0,r.useFunc)(i,n.default),E=i.name("outer");i.label(E).for((0,t._)`;${w}--;`,()=>i.for((0,t._)`${g} = ${w}; ${g}--;`,()=>i.if((0,t._)`${$}(${c}[${w}], ${c}[${g}])`,()=>{a.error(),i.assign(x,!1).break(E)})))}}};return Ms.default=o,Ms}var Fs={},gf;function P0(){if(gf)return Fs;gf=1,Object.defineProperty(Fs,"__esModule",{value:!0});const e=ye(),t=Re(),r=ti(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,e._)`{allowedValue: ${o}}`},code(o){const{gen:a,data:i,$data:c,schemaCode:l,schema:u}=o;c||u&&typeof u=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(a,r.default)}(${i}, ${l})`):o.fail((0,e._)`${u} !== ${i}`)}};return Fs.default=s,Fs}var Ls={},vf;function T0(){if(vf)return Ls;vf=1,Object.defineProperty(Ls,"__esModule",{value:!0});const e=ye(),t=Re(),r=ti(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,e._)`{allowedValues: ${o}}`},code(o){const{gen:a,data:i,$data:c,schema:l,schemaCode:u,it:p}=o;if(!c&&l.length===0)throw new Error("enum must have non-empty array");const h=l.length>=p.opts.loopEnum;let v;const x=()=>v??(v=(0,t.useFunc)(a,r.default));let y;if(h||c)y=a.let("valid"),o.block$data(y,m);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const f=a.const("vSchema",u);y=(0,e.or)(...l.map((b,w)=>_(f,w)))}o.pass(y);function m(){a.assign(y,!1),a.forOf("v",u,f=>a.if((0,e._)`${x()}(${i}, ${f})`,()=>a.assign(y,!0).break()))}function _(f,b){const w=l[b];return typeof w=="object"&&w!==null?(0,e._)`${x()}(${i}, ${f}[${b}])`:(0,e._)`${i} === ${w}`}}};return Ls.default=s,Ls}var yf;function bf(){if(yf)return js;yf=1,Object.defineProperty(js,"__esModule",{value:!0});const e=$0(),t=S0(),r=k0(),n=C0(),s=j0(),o=N0(),a=R0(),i=A0(),c=P0(),l=T0(),u=[e.default,t.default,r.default,n.default,s.default,o.default,a.default,i.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default];return js.default=u,js}var zs={},Lr={},_f;function xf(){if(_f)return Lr;_f=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.validateAdditionalItems=void 0;const e=ye(),t=Re(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{parentSchema:a,it:i}=o,{items:c}=a;if(!Array.isArray(c)){(0,t.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(o,c)}};function s(o,a){const{gen:i,schema:c,data:l,keyword:u,it:p}=o;p.items=!0;const h=i.const("len",(0,e._)`${l}.length`);if(c===!1)o.setParams({len:a.length}),o.pass((0,e._)`${h} <= ${a.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(p,c)){const x=i.var("valid",(0,e._)`${h} <= ${a.length}`);i.if((0,e.not)(x),()=>v(x)),o.ok(x)}function v(x){i.forRange("i",a.length,h,y=>{o.subschema({keyword:u,dataProp:y,dataPropType:t.Type.Num},x),p.allErrors||i.if((0,e.not)(x),()=>i.break())})}}return Lr.validateAdditionalItems=s,Lr.default=n,Lr}var qs={},zr={},wf;function $f(){if(wf)return zr;wf=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.validateTuple=void 0;const e=ye(),t=Re(),r=bt(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:a,it:i}=o;if(Array.isArray(a))return s(o,"additionalItems",a);i.items=!0,!(0,t.alwaysValidSchema)(i,a)&&o.ok((0,r.validateArray)(o))}};function s(o,a,i=o.schema){const{gen:c,parentSchema:l,data:u,keyword:p,it:h}=o;y(l),h.opts.unevaluated&&i.length&&h.items!==!0&&(h.items=t.mergeEvaluated.items(c,i.length,h.items));const v=c.name("valid"),x=c.const("len",(0,e._)`${u}.length`);i.forEach((m,_)=>{(0,t.alwaysValidSchema)(h,m)||(c.if((0,e._)`${x} > ${_}`,()=>o.subschema({keyword:p,schemaProp:_,dataProp:_},v)),o.ok(v))});function y(m){const{opts:_,errSchemaPath:f}=h,b=i.length,w=b===m.minItems&&(b===m.maxItems||m[a]===!1);if(_.strictTuples&&!w){const g=`"${p}" is ${b}-tuple, but minItems or maxItems/${a} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(h,g,_.strictTuples)}}}return zr.validateTuple=s,zr.default=n,zr}var Sf;function O0(){if(Sf)return qs;Sf=1,Object.defineProperty(qs,"__esModule",{value:!0});const e=$f(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return qs.default=t,qs}var Us={},Ef;function I0(){if(Ef)return Us;Ef=1,Object.defineProperty(Us,"__esModule",{value:!0});const e=ye(),t=Re(),r=bt(),n=xf(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{schema:i,parentSchema:c,it:l}=a,{prefixItems:u}=c;l.items=!0,!(0,t.alwaysValidSchema)(l,i)&&(u?(0,n.validateAdditionalItems)(a,u):a.ok((0,r.validateArray)(a)))}};return Us.default=o,Us}var Bs={},kf;function D0(){if(kf)return Bs;kf=1,Object.defineProperty(Bs,"__esModule",{value:!0});const e=ye(),t=Re(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:o}})=>o===void 0?(0,e.str)`must contain at least ${s} valid item(s)`:(0,e.str)`must contain at least ${s} and no more than ${o} valid item(s)`,params:({params:{min:s,max:o}})=>o===void 0?(0,e._)`{minContains: ${s}}`:(0,e._)`{minContains: ${s}, maxContains: ${o}}`},code(s){const{gen:o,schema:a,parentSchema:i,data:c,it:l}=s;let u,p;const{minContains:h,maxContains:v}=i;l.opts.next?(u=h===void 0?1:h,p=v):u=1;const x=o.const("len",(0,e._)`${c}.length`);if(s.setParams({min:u,max:p}),p===void 0&&u===0){(0,t.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&u>p){(0,t.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,t.alwaysValidSchema)(l,a)){let b=(0,e._)`${x} >= ${u}`;p!==void 0&&(b=(0,e._)`${b} && ${x} <= ${p}`),s.pass(b);return}l.items=!0;const y=o.name("valid");p===void 0&&u===1?_(y,()=>o.if(y,()=>o.break())):u===0?(o.let(y,!0),p!==void 0&&o.if((0,e._)`${c}.length > 0`,m)):(o.let(y,!1),m()),s.result(y,()=>s.reset());function m(){const b=o.name("_valid"),w=o.let("count",0);_(b,()=>o.if(b,()=>f(w)))}function _(b,w){o.forRange("i",0,x,g=>{s.subschema({keyword:"contains",dataProp:g,dataPropType:t.Type.Num,compositeRule:!0},b),w()})}function f(b){o.code((0,e._)`${b}++`),p===void 0?o.if((0,e._)`${b} >= ${u}`,()=>o.assign(y,!0).break()):(o.if((0,e._)`${b} > ${p}`,()=>o.assign(y,!1).break()),u===1?o.assign(y,!0):o.if((0,e._)`${b} >= ${u}`,()=>o.assign(y,!0)))}}};return Bs.default=n,Bs}var ri={},Cf;function ni(){return Cf||(Cf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ye(),r=Re(),n=bt();e.error={message:({params:{property:c,depsCount:l,deps:u}})=>{const p=l===1?"property":"properties";return(0,t.str)`must have ${p} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:l,deps:u,missingProperty:p}})=>(0,t._)`{property: ${c},
|
|
142
|
-
missingProperty: ${
|
|
137
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return S.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},C_=Qu,j_=ed,N_=td,R_=rd,A_=nd,P_=cd,T_=ud,O_=od,I_=id;function D_({...e}){return d.jsx(C_,{"data-slot":"alert-dialog",...e})}function M_({...e}){return d.jsx(j_,{"data-slot":"alert-dialog-trigger",...e})}function V_({...e}){return d.jsx(N_,{"data-slot":"alert-dialog-portal",...e})}function F_({className:e,...t}){return d.jsx(R_,{"data-slot":"alert-dialog-overlay",className:_e("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function L_({className:e,...t}){return d.jsxs(V_,{children:[d.jsx(F_,{}),d.jsx(A_,{"data-slot":"alert-dialog-content",className:_e("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function z_({className:e,...t}){return d.jsx("div",{"data-slot":"alert-dialog-header",className:_e("flex flex-col gap-2 text-center sm:text-left",e),...t})}function q_({className:e,...t}){return d.jsx("div",{"data-slot":"alert-dialog-footer",className:_e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function U_({className:e,...t}){return d.jsx(O_,{"data-slot":"alert-dialog-title",className:_e("text-lg font-semibold",e),...t})}function B_({className:e,...t}){return d.jsx(I_,{"data-slot":"alert-dialog-description",className:_e("text-muted-foreground text-sm",e),...t})}function W_({className:e,...t}){return d.jsx(P_,{className:_e(Ta(),e),...t})}function H_({className:e,...t}){return d.jsx(T_,{className:_e(Ta({variant:"outline"}),e),...t})}const G_=({theme:e,readOnly:t,control:r,fieldPath:n,isSimpleType:s,isRootLevel:o,onRemove:a,onOpenSettings:i,onTypeChange:c})=>{const l=tn({control:r,name:`${n}.key`});return d.jsxs("div",{className:"p-2 flex gap-2","data-testid":"field",children:[s&&d.jsx(qt,{control:r,name:`${n}.key`,render:({field:u})=>d.jsx(Te,{placeholder:"field_name",disabled:t,className:"w-40",...u})}),d.jsx(qt,{control:r,name:`${n}.schema.type`,render:({field:u})=>d.jsxs(Or,{disabled:t,onValueChange:h=>{u.onChange(h),c(h)},value:u.value,children:[d.jsx(Dr,{className:"w-40",children:d.jsx(Ir,{})}),d.jsx(Mr,{className:`${e} max-h-52 bg-background text-foreground border-input`,children:Zb.map(h=>d.jsx(Ct,{value:h,children:h},h))})]})}),d.jsx(qt,{control:r,name:`${n}.schema.title`,render:({field:u})=>d.jsx(Te,{placeholder:"Title",disabled:t,className:"flex-1",...u})}),d.jsx(qt,{control:r,name:`${n}.schema.description`,render:({field:u})=>d.jsx(Te,{placeholder:"Description",disabled:t,className:"flex-1",...u})}),s&&d.jsxs("div",{className:"flex gap-2",children:[d.jsx(qt,{control:r,name:`${n}.isRequired`,render:({field:u})=>d.jsxs(Eu,{children:[d.jsx(ku,{asChild:!0,children:d.jsx(Xt,{"data-testid":"required",disabled:t,size:"icon",variant:u.value?"default":"outline",onClick:()=>{u.onChange(!u.value)},children:d.jsx(Wl,{})})}),d.jsx(Cu,{children:d.jsx("p",{children:"Required"})})]})}),d.jsx("div",{className:"border-l-2 border-input"})]}),d.jsx(Xt,{size:"icon",variant:"ghost",onClick:()=>i(`${n}.schema`),children:d.jsx(Bl,{className:"text-blue-500"})}),o&&d.jsxs(D_,{children:[d.jsx(M_,{asChild:!0,children:d.jsx(Xt,{size:"icon",variant:"ghost","data-testid":"delete-button",disabled:t,children:d.jsx(_y,{className:"text-red-500"})})}),d.jsxs(L_,{className:_e("border-input",e),children:[d.jsxs(z_,{children:[d.jsx(U_,{className:"text-foreground",children:"Are you absolutely sure?"}),d.jsxs(B_,{children:["This action cannot be undone. This will permanently delete field"," ",l,"."]})]}),d.jsxs(q_,{children:[d.jsx(H_,{className:"text-foreground",children:"Cancel"}),d.jsx(W_,{onClick:a,children:"Delete"})]})]})]})]})},ds=({theme:e,readOnly:t,fieldPath:r,onRemove:n,onOpenSettings:s,isSimpleType:o=!0,isRootLevel:a=!1})=>{const{control:i,setValue:c}=Ze(),l=tn({control:i,name:`${r}.schema.type`}),{fields:u,append:h,remove:p}=Qi({control:i,name:`${r}.schema.properties`}),v=()=>{const y=nn(6);h({id:y,key:`field_${y}`,isRequired:!1,schema:{type:"string"}})},w=y=>{let m={};y==="object"?m={type:"object",properties:[],additionalProperties:!0}:y==="array"?m={type:"array"}:m={type:y},c(`${r}.schema`,m)};return d.jsxs("div",{children:[d.jsx(G_,{theme:e,readOnly:t,control:i,fieldPath:r,isSimpleType:o,isRootLevel:a,onRemove:n,onOpenSettings:s,onTypeChange:w}),l==="object"&&d.jsxs("div",{className:"ml-2 pl-2 border-l-2 border-input",children:[u.map((y,m)=>d.jsx(ds,{readOnly:t,theme:e,fieldPath:`${r}.schema.properties.${m}`,onRemove:()=>p(m),onOpenSettings:s,isRootLevel:!0},y.id)),d.jsxs(Xt,{disabled:t,size:"sm",variant:"outline",onClick:v,className:"ml-2 mt-2 mb-4 flex gap-2 text-green-500",children:[d.jsx(Ul,{})," Add Field"]})]}),l==="array"&&d.jsx("div",{className:"ml-2 pl-2 border-l-2 border-input mr-11","data-testid":"field-array",children:d.jsx(ds,{theme:e,readOnly:t,fieldPath:`${r}.schema.items`,onRemove:()=>{},onOpenSettings:s,isSimpleType:!1})})]},`${r}-${l}`)};function Z_({theme:e,readOnly:t,fields:r,onRemove:n,onOpenSettings:s}){return d.jsx("div",{className:"pl-2 border-l-2 border-input",children:r.map((o,a)=>d.jsx(ds,{readOnly:t,theme:e,fieldPath:`properties.${a}`,onRemove:()=>n(a),onOpenSettings:s,isRootLevel:!0},o.fieldId))})}var K_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Y_=K_.reduce((e,t)=>{const r=Aa(`Primitive.${t}`),n=S.forwardRef((s,o)=>{const{asChild:a,...i}=s,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),J_="Label",dd=S.forwardRef((e,t)=>d.jsx(Y_.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())}}));dd.displayName=J_;var X_=dd;function Q_({className:e,...t}){return d.jsx(X_,{"data-slot":"label",className:_e("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const fd=Z.createContext({}),Ne=({...e})=>d.jsx(fd.Provider,{value:{name:e.name},children:d.jsx(qt,{...e})}),Ua=()=>{const e=Z.useContext(fd),t=Z.useContext(md),{getFieldState:r}=Ze(),n=Di({name:e.name}),s=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},md=Z.createContext({});function xe({className:e,...t}){const r=Z.useId();return d.jsx(md.Provider,{value:{id:r},children:d.jsx("div",{"data-slot":"form-item",className:_e("grid gap-2",e),...t})})}function we({className:e,...t}){const{error:r,formItemId:n}=Ua();return d.jsx(Q_,{"data-slot":"form-label","data-error":!!r,className:_e("data-[error=true]:text-destructive",e),htmlFor:n,...t})}function ke({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:s}=Ua();return d.jsx(Pa,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${s}`:`${n}`,"aria-invalid":!!t,...e})}function Ce({className:e,...t}){const{error:r,formMessageId:n}=Ua(),s=r?String((r==null?void 0:r.message)??""):t.children;return s?d.jsx("p",{"data-slot":"form-message",id:n,className:_e("text-destructive text-sm",e),...t,children:s}):null}var fs="Checkbox",[e0]=xt(fs),[t0,Ba]=e0(fs);function r0(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:s,disabled:o,form:a,name:i,onCheckedChange:c,required:l,value:u="on",internal_do_not_use_render:h}=e,[p,v]=cr({prop:r,defaultProp:s??!1,onChange:c,caller:fs}),[w,y]=S.useState(null),[m,_]=S.useState(null),f=S.useRef(!1),b=w?!!a||!!w.closest("form"):!0,x={checked:p,disabled:o,setChecked:v,control:w,setControl:y,name:i,form:a,value:u,hasConsumerStoppedPropagationRef:f,required:l,defaultChecked:er(s)?!1:s,isFormControl:b,bubbleInput:m,setBubbleInput:_};return d.jsx(t0,{scope:t,...x,children:n0(h)?h(x):n})}var hd="CheckboxTrigger",pd=S.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},s)=>{const{control:o,value:a,disabled:i,checked:c,required:l,setControl:u,setChecked:h,hasConsumerStoppedPropagationRef:p,isFormControl:v,bubbleInput:w}=Ba(hd,e),y=De(s,u),m=S.useRef(c);return S.useEffect(()=>{const _=o==null?void 0:o.form;if(_){const f=()=>h(m.current);return _.addEventListener("reset",f),()=>_.removeEventListener("reset",f)}},[o,h]),d.jsx(je.button,{type:"button",role:"checkbox","aria-checked":er(c)?"mixed":c,"aria-required":l,"data-state":xd(c),"data-disabled":i?"":void 0,disabled:i,value:a,...n,ref:y,onKeyDown:be(t,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:be(r,_=>{h(f=>er(f)?!0:!f),w&&v&&(p.current=_.isPropagationStopped(),p.current||_.stopPropagation())})})});pd.displayName=hd;var gd=S.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:o,required:a,disabled:i,value:c,onCheckedChange:l,form:u,...h}=e;return d.jsx(r0,{__scopeCheckbox:r,checked:s,defaultChecked:o,disabled:i,required:a,onCheckedChange:l,name:n,form:u,value:c,internal_do_not_use_render:({isFormControl:p})=>d.jsxs(d.Fragment,{children:[d.jsx(pd,{...h,ref:t,__scopeCheckbox:r}),p&&d.jsx(_d,{__scopeCheckbox:r})]})})});gd.displayName=fs;var vd="CheckboxIndicator",yd=S.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...s}=e,o=Ba(vd,r);return d.jsx(Qt,{present:n||er(o.checked)||o.checked===!0,children:d.jsx(je.span,{"data-state":xd(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});yd.displayName=vd;var bd="CheckboxBubbleInput",_d=S.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:a,required:i,disabled:c,name:l,value:u,form:h,bubbleInput:p,setBubbleInput:v}=Ba(bd,e),w=De(r,v),y=ha(o),m=da(n);S.useEffect(()=>{const f=p;if(!f)return;const b=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(b,"checked").set,$=!s.current;if(y!==o&&g){const E=new Event("click",{bubbles:$});f.indeterminate=er(o),g.call(f,er(o)?!1:o),f.dispatchEvent(E)}},[p,y,o,s]);const _=S.useRef(er(o)?!1:o);return d.jsx(je.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??_.current,required:i,disabled:c,name:l,value:u,form:h,...t,tabIndex:-1,ref:w,style:{...t.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});_d.displayName=bd;function n0(e){return typeof e=="function"}function er(e){return e==="indeterminate"}function xd(e){return er(e)?"indeterminate":e?"checked":"unchecked"}function ms({className:e,...t}){return d.jsx(gd,{"data-slot":"checkbox",className:_e("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(yd,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:d.jsx(zl,{className:"size-3.5"})})})}const s0=pu("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function wd({className:e,variant:t,asChild:r=!1,...n}){const s=r?Pa:"span";return d.jsx(s,{"data-slot":"badge",className:_e(s0({variant:t}),e),...n})}const o0=/[\n#?=&\t,./-]+/,a0=/^[^a-zA-Z0-9]*|[^a-zA-Z0-9]*$/g,i0=Z.createContext(null),fn=Z.forwardRef(({children:e,value:t,onValueChange:r,placeholder:n,maxItems:s,minItems:o,className:a,disabled:i=!1,dir:c,...l},u)=>{const[h,p]=Z.useState(-1),[v,w]=Z.useState(""),[y,m]=Z.useState(i),[_,f]=Z.useState(i),[b,x]=Z.useState(!1),[g,$]=Z.useState(""),E=o??0,j=s??1/0,I=Z.useCallback(K=>{!t.includes(K)&&t.length<j&&r([...t,K])},[t]),U=Z.useCallback(K=>{t.includes(K)&&t.length>E&&r(t.filter(se=>se!==K))},[t]),D=Z.useCallback(K=>{K.preventDefault();const se=K.clipboardData.getData("text").split(o0),L=[...t];se.forEach(he=>{const H=he.replaceAll(a0,"").trim();H.length>0&&!L.includes(H)&&L.length<j&&L.push(H)}),r(L),w("")},[t]),V=Z.useCallback(K=>{const se=K.currentTarget,L=se.value.substring(se.selectionStart??0,se.selectionEnd??0);$(L),x(L===v)},[v]);Z.useEffect(()=>{(()=>{i==!1&&(t.length-1>=E?f(!1):f(!0),t.length+1<=j?m(!1):m(!0))})()},[t]);const q=Z.useCallback(async K=>{K.stopPropagation();const se=()=>{const C=h+1>t.length-1?-1:h+1;p(C)},L=()=>{const C=h-1<0?t.length-1:h-1;p(C)},he=()=>{const C=h-1<=0?t.length-1===0?-1:0:h-1;p(C)},H=K.currentTarget;switch(K.key){case"ArrowLeft":c==="rtl"?t.length>0&&h!==-1&&se():t.length>0&&H.selectionStart===0&&L();break;case"ArrowRight":c==="rtl"?t.length>0&&H.selectionStart===0&&L():t.length>0&&h!==-1&&se();break;case"Backspace":case"Delete":t.length>0&&(h!==-1&&h<t.length?(U(t[h]),he()):H.selectionStart===0&&(g===v||b)&&U(t[t.length-1]));break;case"Escape":const C=h===-1?t.length-1:-1;p(C);break;case"Enter":v.trim()!==""&&(K.preventDefault(),I(v),w(""));break}},[h,t,v,U]),W=Z.useCallback(K=>{K.preventDefault(),K.stopPropagation()},[]),ee=Z.useCallback(K=>{w(K.currentTarget.value)},[]);return d.jsx(i0.Provider,{value:{value:t,onValueChange:r,inputValue:v,setInputValue:w,activeIndex:h,setActiveIndex:p},children:d.jsxs("div",{...l,ref:u,dir:c,className:_e("flex items-center flex-wrap gap-1 rounded-lg bg-background overflow-hidden",{"focus-within:ring-ring":h===-1},a),children:[t.map((K,se)=>d.jsxs(wd,{tabIndex:h!==-1?0:h,"aria-disabled":_,"data-active":h===se,className:_e("relative px-1 rounded flex items-center gap-1 data-[active='true']:ring-2 data-[active='true']:ring-muted-foreground truncate aria-disabled:opacity-50 aria-disabled:cursor-not-allowed"),variant:"secondary",children:[d.jsx("span",{className:"text-xs",children:K}),d.jsxs("button",{type:"button","aria-label":`Remove ${K} option`,"aria-roledescription":"button to remove option",disabled:_,onMouseDown:W,onClick:()=>U(K),className:"disabled:cursor-not-allowed",children:[d.jsxs("span",{className:"sr-only",children:["Remove ",K," option"]}),d.jsx(Hl,{className:"h-4 w-4 hover:stroke-destructive"})]})]},K)),d.jsx(Te,{tabIndex:0,"aria-label":"input tag",disabled:y,onKeyDown:q,onPaste:D,value:v,onSelect:V,onChange:h===-1?ee:void 0,placeholder:n,onClick:()=>p(-1),className:_e("border border-input h-9 min-w-fit flex-1 focus-visible:outline-0 focus-visible:ring-0 focus-visible:ring-offset-0 placeholder:text-muted-foreground px-2",h!==-1&&"caret-transparent")})]})})});fn.displayName="TagsInput";const c0=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:s}=Ze(),o=s(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(Ne,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Default Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ne,{control:n,name:`${t}.minimum`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.maximum`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(Ne,{control:n,name:`${t}.exclusiveMin`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Exclusive Minimum"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.exclusiveMax`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Exclusive Maximum"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsx(Ne,{control:n,name:`${t}.multipleOf`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Multiple Of"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Format"}),d.jsx(ke,{children:d.jsxs(Or,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(Dr,{children:d.jsx(Ir,{placeholder:"Choose data type"})}),d.jsxs(Mr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Ct,{value:"none",children:"none"}),Yb.map(i=>d.jsx(Ct,{value:i,children:i},i))]})]})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(xe,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(ke,{children:d.jsx(ms,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange})}),d.jsx(we,{className:"ml-2",children:"Enable Enum"}),d.jsx(Ce,{})]})}),o&&d.jsx(Ne,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Enum Values"}),d.jsx(ke,{children:d.jsx(fn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx(Ce,{})]})})]})},l0=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:s}=Ze(),o=s(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(Ne,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Default Value"}),d.jsx(ke,{children:d.jsx(Te,{disabled:r,...a})}),d.jsx(Ce,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ne,{control:n,name:`${t}.minLength`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Length"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.maxLength`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Length"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsx(Ne,{control:n,name:`${t}.pattern`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Pattern (Regular Expression)"}),d.jsx(ke,{children:d.jsx(Te,{disabled:r,...a})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Format"}),d.jsxs(Or,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(ke,{children:d.jsx(Dr,{children:d.jsx(Ir,{placeholder:"Choose data type"})})}),d.jsxs(Mr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Ct,{value:"none",children:"none"}),Jb.map(i=>d.jsx(Ct,{value:i,children:i},i))]})]}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(xe,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(ke,{children:d.jsx(ms,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange})}),d.jsx(we,{className:"ml-2",children:"Enable Enum"}),d.jsx(Ce,{})]})}),o&&d.jsx(Ne,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Enum Values"}),d.jsx(ke,{children:d.jsx(fn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx(Ce,{})]})})]})},u0=({theme:e,basePath:t,readOnly:r})=>{const{control:n}=Ze();return d.jsx("form",{children:d.jsx(Ne,{control:n,name:`${t}.default`,render:({field:s})=>d.jsxs(xe,{className:"flex gap-2",children:[d.jsx(we,{children:"Default Value"}),d.jsxs(Or,{onValueChange:s.onChange,defaultValue:s.value,disabled:r,children:[d.jsx(ke,{children:d.jsx(Dr,{children:d.jsx(Ir,{placeholder:"False"})})}),d.jsxs(Mr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Ct,{value:"true","data-testid":"true",children:"True"}),d.jsx(Ct,{value:"false",children:"False"})]})]}),d.jsx(Ce,{})]})})})},d0=({basePath:e,readOnly:t})=>{const{control:r}=Ze();return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ne,{control:r,name:`${e}.minItems`,render:({field:n})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Items"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:r,name:`${e}.maxItems`,render:({field:n})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Items"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(Ne,{control:r,name:`${e}.minContains`,render:({field:n})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Contains"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:r,name:`${e}.maxContains`,render:({field:n})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Contains"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsx(Ne,{control:r,name:`${e}.uniqueItems`,render:({field:n})=>d.jsxs(xe,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(ke,{children:d.jsx(ms,{checked:n.value,onCheckedChange:n.onChange,disabled:t})}),d.jsx(we,{className:"ml-2",children:"Unique Items"}),d.jsx(Ce,{})]})})]})},f0=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:s}=Ze(),o=s(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(Ne,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Default Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ne,{control:n,name:`${t}.minimum`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.maximum`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Value"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(Ne,{control:n,name:`${t}.exclusiveMin`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Exclusive Minimum"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.exclusiveMax`,render:({field:a})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Exclusive Maximum"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsx(Ne,{control:n,name:`${t}.multipleOf`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Multiple Of"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Format"}),d.jsx(ke,{children:d.jsxs(Or,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(Dr,{children:d.jsx(Ir,{placeholder:"Choose data type"})}),d.jsxs(Mr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Ct,{value:"none",children:"none"}),Kb.map(i=>d.jsx(Ct,{value:i,children:i},i))]})]})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(xe,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(ke,{children:d.jsx(ms,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange,defaultValue:0})}),d.jsx(we,{className:"ml-2",children:"Enable Enum"}),d.jsx(Ce,{})]})}),o&&d.jsx(Ne,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(xe,{children:[d.jsx(we,{children:"Enum Values"}),d.jsx(ke,{children:d.jsx(fn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx(Ce,{})]})})]})};var hs={exports:{}},Wa={},Dt={},mr={},Ha={},Ga={},Za={},$d;function ps(){return $d||($d=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((b,x)=>`${b}${x}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((b,x)=>(x instanceof r&&(b[x.str]=(b[x.str]||0)+1),b),{})}}e._Code=n,e.nil=new n("");function s(_,...f){const b=[_[0]];let x=0;for(;x<f.length;)i(b,f[x]),b.push(_[++x]);return new n(b)}e._=s;const o=new n("+");function a(_,...f){const b=[v(_[0])];let x=0;for(;x<f.length;)b.push(o),i(b,f[x]),b.push(o,v(_[++x]));return c(b),new n(b)}e.str=a;function i(_,f){f instanceof n?_.push(...f._items):f instanceof r?_.push(f):_.push(h(f))}e.addCodeArg=i;function c(_){let f=1;for(;f<_.length-1;){if(_[f]===o){const b=l(_[f-1],_[f+1]);if(b!==void 0){_.splice(f-1,3,b);continue}_[f++]="+"}f++}}function l(_,f){if(f==='""')return _;if(_==='""')return f;if(typeof _=="string")return f instanceof r||_[_.length-1]!=='"'?void 0:typeof f!="string"?`${_.slice(0,-1)}${f}"`:f[0]==='"'?_.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!(_ instanceof r))return`"${_}${f.slice(1)}`}function u(_,f){return f.emptyStr()?_:_.emptyStr()?f:a`${_}${f}`}e.strConcat=u;function h(_){return typeof _=="number"||typeof _=="boolean"||_===null?_:v(Array.isArray(_)?_.join(","):_)}function p(_){return new n(v(_))}e.stringify=p;function v(_){return JSON.stringify(_).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function w(_){return typeof _=="string"&&e.IDENTIFIER.test(_)?new n(`.${_}`):s`[${_}]`}e.getProperty=w;function y(_){if(typeof _=="string"&&e.IDENTIFIER.test(_))return new n(`${_}`);throw new Error(`CodeGen: invalid export name: ${_}, use explicit $id name mapping`)}e.getEsmExportName=y;function m(_){return new n(_.toString())}e.regexpCode=m})(Za)),Za}var Ka={},Sd;function Ed(){return Sd||(Sd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=ps();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class s{constructor({prefixes:l,parent:u}={}){this._names={},this._prefixes=l,this._parent=u}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const u=this._names[l]||this._nameGroup(l);return`${l}${u.index++}`}_nameGroup(l){var u,h;if(!((h=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||h===void 0)&&h.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=s;class o extends t.Name{constructor(l,u){super(u),this.prefix=l}setValue(l,{property:u,itemIndex:h}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(u)}[${h}]`}}e.ValueScopeName=o;const a=(0,t._)`\n`;class i extends s{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?a:t.nil}}get(){return this._scope}name(l){return new o(l,this._newName(l))}value(l,u){var h;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const p=this.toName(l),{prefix:v}=p,w=(h=u.key)!==null&&h!==void 0?h:u.ref;let y=this._values[v];if(y){const f=y.get(w);if(f)return f}else y=this._values[v]=new Map;y.set(w,p);const m=this._scope[v]||(this._scope[v]=[]),_=m.length;return m[_]=u.ref,p.setValue(u,{property:v,itemIndex:_}),p}getValue(l,u){const h=this._values[l];if(h)return h.get(u)}scopeRefs(l,u=this._values){return this._reduceValues(u,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,t._)`${l}${h.scopePath}`})}scopeCode(l=this._values,u,h){return this._reduceValues(l,p=>{if(p.value===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return p.value.code},u,h)}_reduceValues(l,u,h={},p){let v=t.nil;for(const w in l){const y=l[w];if(!y)continue;const m=h[w]=h[w]||new Map;y.forEach(_=>{if(m.has(_))return;m.set(_,n.Started);let f=u(_);if(f){const b=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${b} ${_} = ${f};${this.opts._n}`}else if(f=p==null?void 0:p(_))v=(0,t._)`${v}${f}${this.opts._n}`;else throw new r(_);m.set(_,n.Completed)})}return v}}e.ValueScope=i})(Ka)),Ka}var kd;function ye(){return kd||(kd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=ps(),r=Ed();var n=ps();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var s=Ed();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(k,N){return this}}class a extends o{constructor(k,N,z){super(),this.varKind=k,this.name=N,this.rhs=z}render({es5:k,_n:N}){const z=k?r.varKinds.var:this.varKind,F=this.rhs===void 0?"":` = ${this.rhs}`;return`${z} ${this.name}${F};`+N}optimizeNames(k,N){if(k[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,k,N)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends o{constructor(k,N,z){super(),this.lhs=k,this.rhs=N,this.sideEffects=z}render({_n:k}){return`${this.lhs} = ${this.rhs};`+k}optimizeNames(k,N){if(!(this.lhs instanceof t.Name&&!k[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,k,N),this}get names(){const k=this.lhs instanceof t.Name?{}:{...this.lhs.names};return q(k,this.rhs)}}class c extends i{constructor(k,N,z,F){super(k,z,F),this.op=N}render({_n:k}){return`${this.lhs} ${this.op}= ${this.rhs};`+k}}class l extends o{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`${this.label}:`+k}}class u extends o{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`break${this.label?` ${this.label}`:""};`+k}}class h extends o{constructor(k){super(),this.error=k}render({_n:k}){return`throw ${this.error};`+k}get names(){return this.error.names}}class p extends o{constructor(k){super(),this.code=k}render({_n:k}){return`${this.code};`+k}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(k,N){return this.code=W(this.code,k,N),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends o{constructor(k=[]){super(),this.nodes=k}render(k){return this.nodes.reduce((N,z)=>N+z.render(k),"")}optimizeNodes(){const{nodes:k}=this;let N=k.length;for(;N--;){const z=k[N].optimizeNodes();Array.isArray(z)?k.splice(N,1,...z):z?k[N]=z:k.splice(N,1)}return k.length>0?this:void 0}optimizeNames(k,N){const{nodes:z}=this;let F=z.length;for(;F--;){const Y=z[F];Y.optimizeNames(k,N)||(ee(k,Y.names),z.splice(F,1))}return z.length>0?this:void 0}get names(){return this.nodes.reduce((k,N)=>V(k,N.names),{})}}class w extends v{render(k){return"{"+k._n+super.render(k)+"}"+k._n}}class y extends v{}class m extends w{}m.kind="else";class _ extends w{constructor(k,N){super(N),this.condition=k}render(k){let N=`if(${this.condition})`+super.render(k);return this.else&&(N+="else "+this.else.render(k)),N}optimizeNodes(){super.optimizeNodes();const k=this.condition;if(k===!0)return this.nodes;let N=this.else;if(N){const z=N.optimizeNodes();N=this.else=Array.isArray(z)?new m(z):z}if(N)return k===!1?N instanceof _?N:N.nodes:this.nodes.length?this:new _(K(k),N instanceof _?[N]:N.nodes);if(!(k===!1||!this.nodes.length))return this}optimizeNames(k,N){var z;if(this.else=(z=this.else)===null||z===void 0?void 0:z.optimizeNames(k,N),!!(super.optimizeNames(k,N)||this.else))return this.condition=W(this.condition,k,N),this}get names(){const k=super.names;return q(k,this.condition),this.else&&V(k,this.else.names),k}}_.kind="if";class f extends w{}f.kind="for";class b extends f{constructor(k){super(),this.iteration=k}render(k){return`for(${this.iteration})`+super.render(k)}optimizeNames(k,N){if(super.optimizeNames(k,N))return this.iteration=W(this.iteration,k,N),this}get names(){return V(super.names,this.iteration.names)}}class x extends f{constructor(k,N,z,F){super(),this.varKind=k,this.name=N,this.from=z,this.to=F}render(k){const N=k.es5?r.varKinds.var:this.varKind,{name:z,from:F,to:Y}=this;return`for(${N} ${z}=${F}; ${z}<${Y}; ${z}++)`+super.render(k)}get names(){const k=q(super.names,this.from);return q(k,this.to)}}class g extends f{constructor(k,N,z,F){super(),this.loop=k,this.varKind=N,this.name=z,this.iterable=F}render(k){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(k)}optimizeNames(k,N){if(super.optimizeNames(k,N))return this.iterable=W(this.iterable,k,N),this}get names(){return V(super.names,this.iterable.names)}}class $ extends w{constructor(k,N,z){super(),this.name=k,this.args=N,this.async=z}render(k){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(k)}}$.kind="func";class E extends v{render(k){return"return "+super.render(k)}}E.kind="return";class j extends w{render(k){let N="try"+super.render(k);return this.catch&&(N+=this.catch.render(k)),this.finally&&(N+=this.finally.render(k)),N}optimizeNodes(){var k,N;return super.optimizeNodes(),(k=this.catch)===null||k===void 0||k.optimizeNodes(),(N=this.finally)===null||N===void 0||N.optimizeNodes(),this}optimizeNames(k,N){var z,F;return super.optimizeNames(k,N),(z=this.catch)===null||z===void 0||z.optimizeNames(k,N),(F=this.finally)===null||F===void 0||F.optimizeNames(k,N),this}get names(){const k=super.names;return this.catch&&V(k,this.catch.names),this.finally&&V(k,this.finally.names),k}}class I extends w{constructor(k){super(),this.error=k}render(k){return`catch(${this.error})`+super.render(k)}}I.kind="catch";class U extends w{render(k){return"finally"+super.render(k)}}U.kind="finally";class D{constructor(k,N={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...N,_n:N.lines?`
|
|
138
|
+
`:""},this._extScope=k,this._scope=new r.Scope({parent:k}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(k){return this._scope.name(k)}scopeName(k){return this._extScope.name(k)}scopeValue(k,N){const z=this._extScope.value(k,N);return(this._values[z.prefix]||(this._values[z.prefix]=new Set)).add(z),z}getScopeValue(k,N){return this._extScope.getValue(k,N)}scopeRefs(k){return this._extScope.scopeRefs(k,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(k,N,z,F){const Y=this._scope.toName(N);return z!==void 0&&F&&(this._constants[Y.str]=z),this._leafNode(new a(k,Y,z)),Y}const(k,N,z){return this._def(r.varKinds.const,k,N,z)}let(k,N,z){return this._def(r.varKinds.let,k,N,z)}var(k,N,z){return this._def(r.varKinds.var,k,N,z)}assign(k,N,z){return this._leafNode(new i(k,N,z))}add(k,N){return this._leafNode(new c(k,e.operators.ADD,N))}code(k){return typeof k=="function"?k():k!==t.nil&&this._leafNode(new p(k)),this}object(...k){const N=["{"];for(const[z,F]of k)N.length>1&&N.push(","),N.push(z),(z!==F||this.opts.es5)&&(N.push(":"),(0,t.addCodeArg)(N,F));return N.push("}"),new t._Code(N)}if(k,N,z){if(this._blockNode(new _(k)),N&&z)this.code(N).else().code(z).endIf();else if(N)this.code(N).endIf();else if(z)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(k){return this._elseNode(new _(k))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(_,m)}_for(k,N){return this._blockNode(k),N&&this.code(N).endFor(),this}for(k,N){return this._for(new b(k),N)}forRange(k,N,z,F,Y=this.opts.es5?r.varKinds.var:r.varKinds.let){const de=this._scope.toName(k);return this._for(new x(Y,de,N,z),()=>F(de))}forOf(k,N,z,F=r.varKinds.const){const Y=this._scope.toName(k);if(this.opts.es5){const de=N instanceof t.Name?N:this.var("_arr",N);return this.forRange("_i",0,(0,t._)`${de}.length`,oe=>{this.var(Y,(0,t._)`${de}[${oe}]`),z(Y)})}return this._for(new g("of",F,Y,N),()=>z(Y))}forIn(k,N,z,F=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(k,(0,t._)`Object.keys(${N})`,z);const Y=this._scope.toName(k);return this._for(new g("in",F,Y,N),()=>z(Y))}endFor(){return this._endBlockNode(f)}label(k){return this._leafNode(new l(k))}break(k){return this._leafNode(new u(k))}return(k){const N=new E;if(this._blockNode(N),this.code(k),N.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(k,N,z){if(!N&&!z)throw new Error('CodeGen: "try" without "catch" and "finally"');const F=new j;if(this._blockNode(F),this.code(k),N){const Y=this.name("e");this._currNode=F.catch=new I(Y),N(Y)}return z&&(this._currNode=F.finally=new U,this.code(z)),this._endBlockNode(I,U)}throw(k){return this._leafNode(new h(k))}block(k,N){return this._blockStarts.push(this._nodes.length),k&&this.code(k).endBlock(N),this}endBlock(k){const N=this._blockStarts.pop();if(N===void 0)throw new Error("CodeGen: not in self-balancing block");const z=this._nodes.length-N;if(z<0||k!==void 0&&z!==k)throw new Error(`CodeGen: wrong number of nodes: ${z} vs ${k} expected`);return this._nodes.length=N,this}func(k,N=t.nil,z,F){return this._blockNode(new $(k,N,z)),F&&this.code(F).endFunc(),this}endFunc(){return this._endBlockNode($)}optimize(k=1){for(;k-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(k){return this._currNode.nodes.push(k),this}_blockNode(k){this._currNode.nodes.push(k),this._nodes.push(k)}_endBlockNode(k,N){const z=this._currNode;if(z instanceof k||N&&z instanceof N)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${N?`${k.kind}/${N.kind}`:k.kind}"`)}_elseNode(k){const N=this._currNode;if(!(N instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=N.else=k,this}get _root(){return this._nodes[0]}get _currNode(){const k=this._nodes;return k[k.length-1]}set _currNode(k){const N=this._nodes;N[N.length-1]=k}}e.CodeGen=D;function V(P,k){for(const N in k)P[N]=(P[N]||0)+(k[N]||0);return P}function q(P,k){return k instanceof t._CodeOrName?V(P,k.names):P}function W(P,k,N){if(P instanceof t.Name)return z(P);if(!F(P))return P;return new t._Code(P._items.reduce((Y,de)=>(de instanceof t.Name&&(de=z(de)),de instanceof t._Code?Y.push(...de._items):Y.push(de),Y),[]));function z(Y){const de=N[Y.str];return de===void 0||k[Y.str]!==1?Y:(delete k[Y.str],de)}function F(Y){return Y instanceof t._Code&&Y._items.some(de=>de instanceof t.Name&&k[de.str]===1&&N[de.str]!==void 0)}}function ee(P,k){for(const N in k)P[N]=(P[N]||0)-(k[N]||0)}function K(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,t._)`!${M(P)}`}e.not=K;const se=C(e.operators.AND);function L(...P){return P.reduce(se)}e.and=L;const he=C(e.operators.OR);function H(...P){return P.reduce(he)}e.or=H;function C(P){return(k,N)=>k===t.nil?N:N===t.nil?k:(0,t._)`${M(k)} ${P} ${M(N)}`}function M(P){return P instanceof t.Name?P:(0,t._)`(${P})`}})(Ga)),Ga}var Ee={},Cd;function Re(){if(Cd)return Ee;Cd=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.checkStrictMode=Ee.getErrorPath=Ee.Type=Ee.useFunc=Ee.setEvaluated=Ee.evaluatedPropsToName=Ee.mergeEvaluated=Ee.eachItem=Ee.unescapeJsonPointer=Ee.escapeJsonPointer=Ee.escapeFragment=Ee.unescapeFragment=Ee.schemaRefOrVal=Ee.schemaHasRulesButRef=Ee.schemaHasRules=Ee.checkUnknownRules=Ee.alwaysValidSchema=Ee.toHash=void 0;const e=ye(),t=ps();function r(g){const $={};for(const E of g)$[E]=!0;return $}Ee.toHash=r;function n(g,$){return typeof $=="boolean"?$:Object.keys($).length===0?!0:(s(g,$),!o($,g.self.RULES.all))}Ee.alwaysValidSchema=n;function s(g,$=g.schema){const{opts:E,self:j}=g;if(!E.strictSchema||typeof $=="boolean")return;const I=j.RULES.keywords;for(const U in $)I[U]||x(g,`unknown keyword: "${U}"`)}Ee.checkUnknownRules=s;function o(g,$){if(typeof g=="boolean")return!g;for(const E in g)if($[E])return!0;return!1}Ee.schemaHasRules=o;function a(g,$){if(typeof g=="boolean")return!g;for(const E in g)if(E!=="$ref"&&$.all[E])return!0;return!1}Ee.schemaHasRulesButRef=a;function i({topSchemaRef:g,schemaPath:$},E,j,I){if(!I){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,e._)`${E}`}return(0,e._)`${g}${$}${(0,e.getProperty)(j)}`}Ee.schemaRefOrVal=i;function c(g){return h(decodeURIComponent(g))}Ee.unescapeFragment=c;function l(g){return encodeURIComponent(u(g))}Ee.escapeFragment=l;function u(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}Ee.escapeJsonPointer=u;function h(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}Ee.unescapeJsonPointer=h;function p(g,$){if(Array.isArray(g))for(const E of g)$(E);else $(g)}Ee.eachItem=p;function v({mergeNames:g,mergeToName:$,mergeValues:E,resultToName:j}){return(I,U,D,V)=>{const q=D===void 0?U:D instanceof e.Name?(U instanceof e.Name?g(I,U,D):$(I,U,D),D):U instanceof e.Name?($(I,D,U),U):E(U,D);return V===e.Name&&!(q instanceof e.Name)?j(I,q):q}}Ee.mergeEvaluated={props:v({mergeNames:(g,$,E)=>g.if((0,e._)`${E} !== true && ${$} !== undefined`,()=>{g.if((0,e._)`${$} === true`,()=>g.assign(E,!0),()=>g.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${$})`))}),mergeToName:(g,$,E)=>g.if((0,e._)`${E} !== true`,()=>{$===!0?g.assign(E,!0):(g.assign(E,(0,e._)`${E} || {}`),y(g,E,$))}),mergeValues:(g,$)=>g===!0?!0:{...g,...$},resultToName:w}),items:v({mergeNames:(g,$,E)=>g.if((0,e._)`${E} !== true && ${$} !== undefined`,()=>g.assign(E,(0,e._)`${$} === true ? true : ${E} > ${$} ? ${E} : ${$}`)),mergeToName:(g,$,E)=>g.if((0,e._)`${E} !== true`,()=>g.assign(E,$===!0?!0:(0,e._)`${E} > ${$} ? ${E} : ${$}`)),mergeValues:(g,$)=>g===!0?!0:Math.max(g,$),resultToName:(g,$)=>g.var("items",$)})};function w(g,$){if($===!0)return g.var("props",!0);const E=g.var("props",(0,e._)`{}`);return $!==void 0&&y(g,E,$),E}Ee.evaluatedPropsToName=w;function y(g,$,E){Object.keys(E).forEach(j=>g.assign((0,e._)`${$}${(0,e.getProperty)(j)}`,!0))}Ee.setEvaluated=y;const m={};function _(g,$){return g.scopeValue("func",{ref:$,code:m[$.code]||(m[$.code]=new t._Code($.code))})}Ee.useFunc=_;var f;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(f||(Ee.Type=f={}));function b(g,$,E){if(g instanceof e.Name){const j=$===f.Num;return E?j?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:j?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)(g).toString():"/"+u(g)}Ee.getErrorPath=b;function x(g,$,E=g.opts.strictSchema){if(E){if($=`strict mode: ${$}`,E===!0)throw new Error($);g.self.logger.warn($)}}return Ee.checkStrictMode=x,Ee}var gs={},jd;function vt(){if(jd)return gs;jd=1,Object.defineProperty(gs,"__esModule",{value:!0});const e=ye(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return gs.default=t,gs}var Nd;function vs(){return Nd||(Nd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=ye(),r=Re(),n=vt();e.keywordError={message:({keyword:m})=>(0,t.str)`must pass "${m}" keyword validation`},e.keyword$DataError={message:({keyword:m,schemaType:_})=>_?(0,t.str)`"${m}" keyword must be ${_} ($data)`:(0,t.str)`"${m}" keyword is invalid ($data)`};function s(m,_=e.keywordError,f,b){const{it:x}=m,{gen:g,compositeRule:$,allErrors:E}=x,j=h(m,_,f);b??($||E)?c(g,j):l(x,(0,t._)`[${j}]`)}e.reportError=s;function o(m,_=e.keywordError,f){const{it:b}=m,{gen:x,compositeRule:g,allErrors:$}=b,E=h(m,_,f);c(x,E),g||$||l(b,n.default.vErrors)}e.reportExtraError=o;function a(m,_){m.assign(n.default.errors,_),m.if((0,t._)`${n.default.vErrors} !== null`,()=>m.if(_,()=>m.assign((0,t._)`${n.default.vErrors}.length`,_),()=>m.assign(n.default.vErrors,null)))}e.resetErrorsCount=a;function i({gen:m,keyword:_,schemaValue:f,data:b,errsCount:x,it:g}){if(x===void 0)throw new Error("ajv implementation error");const $=m.name("err");m.forRange("i",x,n.default.errors,E=>{m.const($,(0,t._)`${n.default.vErrors}[${E}]`),m.if((0,t._)`${$}.instancePath === undefined`,()=>m.assign((0,t._)`${$}.instancePath`,(0,t.strConcat)(n.default.instancePath,g.errorPath))),m.assign((0,t._)`${$}.schemaPath`,(0,t.str)`${g.errSchemaPath}/${_}`),g.opts.verbose&&(m.assign((0,t._)`${$}.schema`,f),m.assign((0,t._)`${$}.data`,b))})}e.extendErrors=i;function c(m,_){const f=m.const("err",_);m.if((0,t._)`${n.default.vErrors} === null`,()=>m.assign(n.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${n.default.vErrors}.push(${f})`),m.code((0,t._)`${n.default.errors}++`)}function l(m,_){const{gen:f,validateName:b,schemaEnv:x}=m;x.$async?f.throw((0,t._)`new ${m.ValidationError}(${_})`):(f.assign((0,t._)`${b}.errors`,_),f.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function h(m,_,f){const{createErrors:b}=m.it;return b===!1?(0,t._)`{}`:p(m,_,f)}function p(m,_,f={}){const{gen:b,it:x}=m,g=[v(x,f),w(m,f)];return y(m,_,g),b.object(...g)}function v({errorPath:m},{instancePath:_}){const f=_?(0,t.str)`${m}${(0,r.getErrorPath)(_,r.Type.Str)}`:m;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,f)]}function w({keyword:m,it:{errSchemaPath:_}},{schemaPath:f,parentSchema:b}){let x=b?_:(0,t.str)`${_}/${m}`;return f&&(x=(0,t.str)`${x}${(0,r.getErrorPath)(f,r.Type.Str)}`),[u.schemaPath,x]}function y(m,{params:_,message:f},b){const{keyword:x,data:g,schemaValue:$,it:E}=m,{opts:j,propertyName:I,topSchemaRef:U,schemaPath:D}=E;b.push([u.keyword,x],[u.params,typeof _=="function"?_(m):_||(0,t._)`{}`]),j.messages&&b.push([u.message,typeof f=="function"?f(m):f]),j.verbose&&b.push([u.schema,$],[u.parentSchema,(0,t._)`${U}${D}`],[n.default.data,g]),I&&b.push([u.propertyName,I])}})(Ha)),Ha}var Rd;function m0(){if(Rd)return mr;Rd=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.boolOrEmptySchema=mr.topBoolOrEmptySchema=void 0;const e=vs(),t=ye(),r=vt(),n={message:"boolean schema is false"};function s(i){const{gen:c,schema:l,validateName:u}=i;l===!1?a(i,!1):typeof l=="object"&&l.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${u}.errors`,null),c.return(!0))}mr.topBoolOrEmptySchema=s;function o(i,c){const{gen:l,schema:u}=i;u===!1?(l.var(c,!1),a(i)):l.var(c,!0)}mr.boolOrEmptySchema=o;function a(i,c){const{gen:l,data:u}=i,h={gen:l,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:i};(0,e.reportError)(h,n,void 0,c)}return mr}var Ge={},hr={},Ad;function Pd(){if(Ad)return hr;Ad=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.getRules=hr.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(s){return typeof s=="string"&&t.has(s)}hr.isJSONType=r;function n(){const s={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...s,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},s.number,s.string,s.array,s.object],post:{rules:[]},all:{},keywords:{}}}return hr.getRules=n,hr}var Mt={},Td;function Od(){if(Td)return Mt;Td=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.shouldUseRule=Mt.shouldUseGroup=Mt.schemaHasRulesForType=void 0;function e({schema:n,self:s},o){const a=s.RULES.types[o];return a&&a!==!0&&t(n,a)}Mt.schemaHasRulesForType=e;function t(n,s){return s.rules.some(o=>r(n,o))}Mt.shouldUseGroup=t;function r(n,s){var o;return n[s.keyword]!==void 0||((o=s.definition.implements)===null||o===void 0?void 0:o.some(a=>n[a]!==void 0))}return Mt.shouldUseRule=r,Mt}var Id;function ys(){if(Id)return Ge;Id=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.reportTypeError=Ge.checkDataTypes=Ge.checkDataType=Ge.coerceAndCheckDataType=Ge.getJSONTypes=Ge.getSchemaTypes=Ge.DataType=void 0;const e=Pd(),t=Od(),r=vs(),n=ye(),s=Re();var o;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(o||(Ge.DataType=o={}));function a(f){const b=i(f.type);if(b.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!b.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&b.push("null")}return b}Ge.getSchemaTypes=a;function i(f){const b=Array.isArray(f)?f:f?[f]:[];if(b.every(e.isJSONType))return b;throw new Error("type must be JSONType or JSONType[]: "+b.join(","))}Ge.getJSONTypes=i;function c(f,b){const{gen:x,data:g,opts:$}=f,E=u(b,$.coerceTypes),j=b.length>0&&!(E.length===0&&b.length===1&&(0,t.schemaHasRulesForType)(f,b[0]));if(j){const I=w(b,g,$.strictNumbers,o.Wrong);x.if(I,()=>{E.length?h(f,b,E):m(f)})}return j}Ge.coerceAndCheckDataType=c;const l=new Set(["string","number","integer","boolean","null"]);function u(f,b){return b?f.filter(x=>l.has(x)||b==="array"&&x==="array"):[]}function h(f,b,x){const{gen:g,data:$,opts:E}=f,j=g.let("dataType",(0,n._)`typeof ${$}`),I=g.let("coerced",(0,n._)`undefined`);E.coerceTypes==="array"&&g.if((0,n._)`${j} == 'object' && Array.isArray(${$}) && ${$}.length == 1`,()=>g.assign($,(0,n._)`${$}[0]`).assign(j,(0,n._)`typeof ${$}`).if(w(b,$,E.strictNumbers),()=>g.assign(I,$))),g.if((0,n._)`${I} !== undefined`);for(const D of x)(l.has(D)||D==="array"&&E.coerceTypes==="array")&&U(D);g.else(),m(f),g.endIf(),g.if((0,n._)`${I} !== undefined`,()=>{g.assign($,I),p(f,I)});function U(D){switch(D){case"string":g.elseIf((0,n._)`${j} == "number" || ${j} == "boolean"`).assign(I,(0,n._)`"" + ${$}`).elseIf((0,n._)`${$} === null`).assign(I,(0,n._)`""`);return;case"number":g.elseIf((0,n._)`${j} == "boolean" || ${$} === null
|
|
139
|
+
|| (${j} == "string" && ${$} && ${$} == +${$})`).assign(I,(0,n._)`+${$}`);return;case"integer":g.elseIf((0,n._)`${j} === "boolean" || ${$} === null
|
|
140
|
+
|| (${j} === "string" && ${$} && ${$} == +${$} && !(${$} % 1))`).assign(I,(0,n._)`+${$}`);return;case"boolean":g.elseIf((0,n._)`${$} === "false" || ${$} === 0 || ${$} === null`).assign(I,!1).elseIf((0,n._)`${$} === "true" || ${$} === 1`).assign(I,!0);return;case"null":g.elseIf((0,n._)`${$} === "" || ${$} === 0 || ${$} === false`),g.assign(I,null);return;case"array":g.elseIf((0,n._)`${j} === "string" || ${j} === "number"
|
|
141
|
+
|| ${j} === "boolean" || ${$} === null`).assign(I,(0,n._)`[${$}]`)}}}function p({gen:f,parentData:b,parentDataProperty:x},g){f.if((0,n._)`${b} !== undefined`,()=>f.assign((0,n._)`${b}[${x}]`,g))}function v(f,b,x,g=o.Correct){const $=g===o.Correct?n.operators.EQ:n.operators.NEQ;let E;switch(f){case"null":return(0,n._)`${b} ${$} null`;case"array":E=(0,n._)`Array.isArray(${b})`;break;case"object":E=(0,n._)`${b} && typeof ${b} == "object" && !Array.isArray(${b})`;break;case"integer":E=j((0,n._)`!(${b} % 1) && !isNaN(${b})`);break;case"number":E=j();break;default:return(0,n._)`typeof ${b} ${$} ${f}`}return g===o.Correct?E:(0,n.not)(E);function j(I=n.nil){return(0,n.and)((0,n._)`typeof ${b} == "number"`,I,x?(0,n._)`isFinite(${b})`:n.nil)}}Ge.checkDataType=v;function w(f,b,x,g){if(f.length===1)return v(f[0],b,x,g);let $;const E=(0,s.toHash)(f);if(E.array&&E.object){const j=(0,n._)`typeof ${b} != "object"`;$=E.null?j:(0,n._)`!${b} || ${j}`,delete E.null,delete E.array,delete E.object}else $=n.nil;E.number&&delete E.integer;for(const j in E)$=(0,n.and)($,v(j,b,x,g));return $}Ge.checkDataTypes=w;const y={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:b})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${b}}`};function m(f){const b=_(f);(0,r.reportError)(b,y)}Ge.reportTypeError=m;function _(f){const{gen:b,data:x,schema:g}=f,$=(0,s.schemaRefOrVal)(f,g,"type");return{gen:b,keyword:"type",data:x,schema:g.type,schemaCode:$,schemaValue:$,parentSchema:g,params:{},it:f}}return Ge}var mn={},Dd;function h0(){if(Dd)return mn;Dd=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.assignDefaults=void 0;const e=ye(),t=Re();function r(s,o){const{properties:a,items:i}=s.schema;if(o==="object"&&a)for(const c in a)n(s,c,a[c].default);else o==="array"&&Array.isArray(i)&&i.forEach((c,l)=>n(s,l,c.default))}mn.assignDefaults=r;function n(s,o,a){const{gen:i,compositeRule:c,data:l,opts:u}=s;if(a===void 0)return;const h=(0,e._)`${l}${(0,e.getProperty)(o)}`;if(c){(0,t.checkStrictMode)(s,`default is ignored for: ${h}`);return}let p=(0,e._)`${h} === undefined`;u.useDefaults==="empty"&&(p=(0,e._)`${p} || ${h} === null || ${h} === ""`),i.if(p,(0,e._)`${h} = ${(0,e.stringify)(a)}`)}return mn}var yt={},Me={},Md;function bt(){if(Md)return Me;Md=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.validateUnion=Me.validateArray=Me.usePattern=Me.callValidateCode=Me.schemaProperties=Me.allSchemaProperties=Me.noPropertyInData=Me.propertyInData=Me.isOwnProperty=Me.hasPropFunc=Me.reportMissingProp=Me.checkMissingProp=Me.checkReportMissingProp=void 0;const e=ye(),t=Re(),r=vt(),n=Re();function s(f,b){const{gen:x,data:g,it:$}=f;x.if(u(x,g,b,$.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${b}`},!0),f.error()})}Me.checkReportMissingProp=s;function o({gen:f,data:b,it:{opts:x}},g,$){return(0,e.or)(...g.map(E=>(0,e.and)(u(f,b,E,x.ownProperties),(0,e._)`${$} = ${E}`)))}Me.checkMissingProp=o;function a(f,b){f.setParams({missingProperty:b},!0),f.error()}Me.reportMissingProp=a;function i(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Me.hasPropFunc=i;function c(f,b,x){return(0,e._)`${i(f)}.call(${b}, ${x})`}Me.isOwnProperty=c;function l(f,b,x,g){const $=(0,e._)`${b}${(0,e.getProperty)(x)} !== undefined`;return g?(0,e._)`${$} && ${c(f,b,x)}`:$}Me.propertyInData=l;function u(f,b,x,g){const $=(0,e._)`${b}${(0,e.getProperty)(x)} === undefined`;return g?(0,e.or)($,(0,e.not)(c(f,b,x))):$}Me.noPropertyInData=u;function h(f){return f?Object.keys(f).filter(b=>b!=="__proto__"):[]}Me.allSchemaProperties=h;function p(f,b){return h(b).filter(x=>!(0,t.alwaysValidSchema)(f,b[x]))}Me.schemaProperties=p;function v({schemaCode:f,data:b,it:{gen:x,topSchemaRef:g,schemaPath:$,errorPath:E},it:j},I,U,D){const V=D?(0,e._)`${f}, ${b}, ${g}${$}`:b,q=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,E)],[r.default.parentData,j.parentData],[r.default.parentDataProperty,j.parentDataProperty],[r.default.rootData,r.default.rootData]];j.opts.dynamicRef&&q.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const W=(0,e._)`${V}, ${x.object(...q)}`;return U!==e.nil?(0,e._)`${I}.call(${U}, ${W})`:(0,e._)`${I}(${W})`}Me.callValidateCode=v;const w=(0,e._)`new RegExp`;function y({gen:f,it:{opts:b}},x){const g=b.unicodeRegExp?"u":"",{regExp:$}=b.code,E=$(x,g);return f.scopeValue("pattern",{key:E.toString(),ref:E,code:(0,e._)`${$.code==="new RegExp"?w:(0,n.useFunc)(f,$)}(${x}, ${g})`})}Me.usePattern=y;function m(f){const{gen:b,data:x,keyword:g,it:$}=f,E=b.name("valid");if($.allErrors){const I=b.let("valid",!0);return j(()=>b.assign(I,!1)),I}return b.var(E,!0),j(()=>b.break()),E;function j(I){const U=b.const("len",(0,e._)`${x}.length`);b.forRange("i",0,U,D=>{f.subschema({keyword:g,dataProp:D,dataPropType:t.Type.Num},E),b.if((0,e.not)(E),I)})}}Me.validateArray=m;function _(f){const{gen:b,schema:x,keyword:g,it:$}=f;if(!Array.isArray(x))throw new Error("ajv implementation error");if(x.some(U=>(0,t.alwaysValidSchema)($,U))&&!$.opts.unevaluated)return;const j=b.let("valid",!1),I=b.name("_valid");b.block(()=>x.forEach((U,D)=>{const V=f.subschema({keyword:g,schemaProp:D,compositeRule:!0},I);b.assign(j,(0,e._)`${j} || ${I}`),f.mergeValidEvaluated(V,I)||b.if((0,e.not)(j))})),f.result(j,()=>f.reset(),()=>f.error(!0))}return Me.validateUnion=_,Me}var Vd;function p0(){if(Vd)return yt;Vd=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.validateKeywordUsage=yt.validSchemaType=yt.funcKeywordCode=yt.macroKeywordCode=void 0;const e=ye(),t=vt(),r=bt(),n=vs();function s(p,v){const{gen:w,keyword:y,schema:m,parentSchema:_,it:f}=p,b=v.macro.call(f.self,m,_,f),x=l(w,y,b);f.opts.validateSchema!==!1&&f.self.validateSchema(b,!0);const g=w.name("valid");p.subschema({schema:b,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${y}`,topSchemaRef:x,compositeRule:!0},g),p.pass(g,()=>p.error(!0))}yt.macroKeywordCode=s;function o(p,v){var w;const{gen:y,keyword:m,schema:_,parentSchema:f,$data:b,it:x}=p;c(x,v);const g=!b&&v.compile?v.compile.call(x.self,_,f,x):v.validate,$=l(y,m,g),E=y.let("valid");p.block$data(E,j),p.ok((w=v.valid)!==null&&w!==void 0?w:E);function j(){if(v.errors===!1)D(),v.modifying&&a(p),V(()=>p.error());else{const q=v.async?I():U();v.modifying&&a(p),V(()=>i(p,q))}}function I(){const q=y.let("ruleErrs",null);return y.try(()=>D((0,e._)`await `),W=>y.assign(E,!1).if((0,e._)`${W} instanceof ${x.ValidationError}`,()=>y.assign(q,(0,e._)`${W}.errors`),()=>y.throw(W))),q}function U(){const q=(0,e._)`${$}.errors`;return y.assign(q,null),D(e.nil),q}function D(q=v.async?(0,e._)`await `:e.nil){const W=x.opts.passContext?t.default.this:t.default.self,ee=!("compile"in v&&!b||v.schema===!1);y.assign(E,(0,e._)`${q}${(0,r.callValidateCode)(p,$,W,ee)}`,v.modifying)}function V(q){var W;y.if((0,e.not)((W=v.valid)!==null&&W!==void 0?W:E),q)}}yt.funcKeywordCode=o;function a(p){const{gen:v,data:w,it:y}=p;v.if(y.parentData,()=>v.assign(w,(0,e._)`${y.parentData}[${y.parentDataProperty}]`))}function i(p,v){const{gen:w}=p;w.if((0,e._)`Array.isArray(${v})`,()=>{w.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(p)},()=>p.error())}function c({schemaEnv:p},v){if(v.async&&!p.$async)throw new Error("async keyword in sync schema")}function l(p,v,w){if(w===void 0)throw new Error(`keyword "${v}" failed to compile`);return p.scopeValue("keyword",typeof w=="function"?{ref:w}:{ref:w,code:(0,e.stringify)(w)})}function u(p,v,w=!1){return!v.length||v.some(y=>y==="array"?Array.isArray(p):y==="object"?p&&typeof p=="object"&&!Array.isArray(p):typeof p==y||w&&typeof p>"u")}yt.validSchemaType=u;function h({schema:p,opts:v,self:w,errSchemaPath:y},m,_){if(Array.isArray(m.keyword)?!m.keyword.includes(_):m.keyword!==_)throw new Error("ajv implementation error");const f=m.dependencies;if(f!=null&&f.some(b=>!Object.prototype.hasOwnProperty.call(p,b)))throw new Error(`parent schema must have dependencies of ${_}: ${f.join(",")}`);if(m.validateSchema&&!m.validateSchema(p[_])){const x=`keyword "${_}" value is invalid at path "${y}": `+w.errorsText(m.validateSchema.errors);if(v.validateSchema==="log")w.logger.error(x);else throw new Error(x)}}return yt.validateKeywordUsage=h,yt}var Vt={},Fd;function g0(){if(Fd)return Vt;Fd=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.extendSubschemaMode=Vt.extendSubschemaData=Vt.getSubschema=void 0;const e=ye(),t=Re();function r(o,{keyword:a,schemaProp:i,schema:c,schemaPath:l,errSchemaPath:u,topSchemaRef:h}){if(a!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const p=o.schema[a];return i===void 0?{schema:p,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${a}`}:{schema:p[i],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(i)}`,errSchemaPath:`${o.errSchemaPath}/${a}/${(0,t.escapeFragment)(i)}`}}if(c!==void 0){if(l===void 0||u===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:l,topSchemaRef:h,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}Vt.getSubschema=r;function n(o,a,{dataProp:i,dataPropType:c,data:l,dataTypes:u,propertyName:h}){if(l!==void 0&&i!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:p}=a;if(i!==void 0){const{errorPath:w,dataPathArr:y,opts:m}=a,_=p.let("data",(0,e._)`${a.data}${(0,e.getProperty)(i)}`,!0);v(_),o.errorPath=(0,e.str)`${w}${(0,t.getErrorPath)(i,c,m.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${i}`,o.dataPathArr=[...y,o.parentDataProperty]}if(l!==void 0){const w=l instanceof e.Name?l:p.let("data",l,!0);v(w),h!==void 0&&(o.propertyName=h)}u&&(o.dataTypes=u);function v(w){o.data=w,o.dataLevel=a.dataLevel+1,o.dataTypes=[],a.definedProperties=new Set,o.parentData=a.data,o.dataNames=[...a.dataNames,w]}}Vt.extendSubschemaData=n;function s(o,{jtdDiscriminator:a,jtdMetadata:i,compositeRule:c,createErrors:l,allErrors:u}){c!==void 0&&(o.compositeRule=c),l!==void 0&&(o.createErrors=l),u!==void 0&&(o.allErrors=u),o.jtdDiscriminator=a,o.jtdMetadata=i}return Vt.extendSubschemaMode=s,Vt}var Je={},Ya,Ld;function zd(){return Ld||(Ld=1,Ya=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var a=o[s];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),Ya}var Ja={exports:{}},qd;function v0(){if(qd)return Ja.exports;qd=1;var e=Ja.exports=function(n,s,o){typeof s=="function"&&(o=s,s={}),o=s.cb||o;var a=typeof o=="function"?o:o.pre||function(){},i=o.post||function(){};t(s,a,i,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(n,s,o,a,i,c,l,u,h,p){if(a&&typeof a=="object"&&!Array.isArray(a)){s(a,i,c,l,u,h,p);for(var v in a){var w=a[v];if(Array.isArray(w)){if(v in e.arrayKeywords)for(var y=0;y<w.length;y++)t(n,s,o,w[y],i+"/"+v+"/"+y,c,i,v,a,y)}else if(v in e.propsKeywords){if(w&&typeof w=="object")for(var m in w)t(n,s,o,w[m],i+"/"+v+"/"+r(m),c,i,v,a,m)}else(v in e.keywords||n.allKeys&&!(v in e.skipKeywords))&&t(n,s,o,w,i+"/"+v,c,i,v,a)}o(a,i,c,l,u,h,p)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Ja.exports}var Ud;function bs(){if(Ud)return Je;Ud=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.getSchemaRefs=Je.resolveUrl=Je.normalizeId=Je._getFullPath=Je.getFullPath=Je.inlineRef=void 0;const e=Re(),t=zd(),r=v0(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(y,m=!0){return typeof y=="boolean"?!0:m===!0?!a(y):m?i(y)<=m:!1}Je.inlineRef=s;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(y){for(const m in y){if(o.has(m))return!0;const _=y[m];if(Array.isArray(_)&&_.some(a)||typeof _=="object"&&a(_))return!0}return!1}function i(y){let m=0;for(const _ in y){if(_==="$ref")return 1/0;if(m++,!n.has(_)&&(typeof y[_]=="object"&&(0,e.eachItem)(y[_],f=>m+=i(f)),m===1/0))return 1/0}return m}function c(y,m="",_){_!==!1&&(m=h(m));const f=y.parse(m);return l(y,f)}Je.getFullPath=c;function l(y,m){return y.serialize(m).split("#")[0]+"#"}Je._getFullPath=l;const u=/#\/?$/;function h(y){return y?y.replace(u,""):""}Je.normalizeId=h;function p(y,m,_){return _=h(_),y.resolve(m,_)}Je.resolveUrl=p;const v=/^[a-z_][-a-z0-9._]*$/i;function w(y,m){if(typeof y=="boolean")return{};const{schemaId:_,uriResolver:f}=this.opts,b=h(y[_]||m),x={"":b},g=c(f,b,!1),$={},E=new Set;return r(y,{allKeys:!0},(U,D,V,q)=>{if(q===void 0)return;const W=g+D;let ee=x[q];typeof U[_]=="string"&&(ee=K.call(this,U[_])),se.call(this,U.$anchor),se.call(this,U.$dynamicAnchor),x[D]=ee;function K(L){const he=this.opts.uriResolver.resolve;if(L=h(ee?he(ee,L):L),E.has(L))throw I(L);E.add(L);let H=this.refs[L];return typeof H=="string"&&(H=this.refs[H]),typeof H=="object"?j(U,H.schema,L):L!==h(W)&&(L[0]==="#"?(j(U,$[L],L),$[L]=U):this.refs[L]=W),L}function se(L){if(typeof L=="string"){if(!v.test(L))throw new Error(`invalid anchor "${L}"`);K.call(this,`#${L}`)}}}),$;function j(U,D,V){if(D!==void 0&&!t(U,D))throw I(V)}function I(U){return new Error(`reference "${U}" resolves to more than one schema`)}}return Je.getSchemaRefs=w,Je}var Bd;function hn(){if(Bd)return Dt;Bd=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.getData=Dt.KeywordCxt=Dt.validateFunctionCode=void 0;const e=m0(),t=ys(),r=Od(),n=ys(),s=h0(),o=p0(),a=g0(),i=ye(),c=vt(),l=bs(),u=Re(),h=vs();function p(A){if(g(A)&&(E(A),x(A))){m(A);return}v(A,()=>(0,e.topBoolOrEmptySchema)(A))}Dt.validateFunctionCode=p;function v({gen:A,validateName:T,schema:G,schemaEnv:J,opts:ie},ge){ie.code.es5?A.func(T,(0,i._)`${c.default.data}, ${c.default.valCxt}`,J.$async,()=>{A.code((0,i._)`"use strict"; ${f(G,ie)}`),y(A,ie),A.code(ge)}):A.func(T,(0,i._)`${c.default.data}, ${w(ie)}`,J.$async,()=>A.code(f(G,ie)).code(ge))}function w(A){return(0,i._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${A.dynamicRef?(0,i._)`, ${c.default.dynamicAnchors}={}`:i.nil}}={}`}function y(A,T){A.if(c.default.valCxt,()=>{A.var(c.default.instancePath,(0,i._)`${c.default.valCxt}.${c.default.instancePath}`),A.var(c.default.parentData,(0,i._)`${c.default.valCxt}.${c.default.parentData}`),A.var(c.default.parentDataProperty,(0,i._)`${c.default.valCxt}.${c.default.parentDataProperty}`),A.var(c.default.rootData,(0,i._)`${c.default.valCxt}.${c.default.rootData}`),T.dynamicRef&&A.var(c.default.dynamicAnchors,(0,i._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{A.var(c.default.instancePath,(0,i._)`""`),A.var(c.default.parentData,(0,i._)`undefined`),A.var(c.default.parentDataProperty,(0,i._)`undefined`),A.var(c.default.rootData,c.default.data),T.dynamicRef&&A.var(c.default.dynamicAnchors,(0,i._)`{}`)})}function m(A){const{schema:T,opts:G,gen:J}=A;v(A,()=>{G.$comment&&T.$comment&&q(A),U(A),J.let(c.default.vErrors,null),J.let(c.default.errors,0),G.unevaluated&&_(A),j(A),W(A)})}function _(A){const{gen:T,validateName:G}=A;A.evaluated=T.const("evaluated",(0,i._)`${G}.evaluated`),T.if((0,i._)`${A.evaluated}.dynamicProps`,()=>T.assign((0,i._)`${A.evaluated}.props`,(0,i._)`undefined`)),T.if((0,i._)`${A.evaluated}.dynamicItems`,()=>T.assign((0,i._)`${A.evaluated}.items`,(0,i._)`undefined`))}function f(A,T){const G=typeof A=="object"&&A[T.schemaId];return G&&(T.code.source||T.code.process)?(0,i._)`/*# sourceURL=${G} */`:i.nil}function b(A,T){if(g(A)&&(E(A),x(A))){$(A,T);return}(0,e.boolOrEmptySchema)(A,T)}function x({schema:A,self:T}){if(typeof A=="boolean")return!A;for(const G in A)if(T.RULES.all[G])return!0;return!1}function g(A){return typeof A.schema!="boolean"}function $(A,T){const{schema:G,gen:J,opts:ie}=A;ie.$comment&&G.$comment&&q(A),D(A),V(A);const ge=J.const("_errs",c.default.errors);j(A,ge),J.var(T,(0,i._)`${ge} === ${c.default.errors}`)}function E(A){(0,u.checkUnknownRules)(A),I(A)}function j(A,T){if(A.opts.jtd)return K(A,[],!1,T);const G=(0,t.getSchemaTypes)(A.schema),J=(0,t.coerceAndCheckDataType)(A,G);K(A,G,!J,T)}function I(A){const{schema:T,errSchemaPath:G,opts:J,self:ie}=A;T.$ref&&J.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(T,ie.RULES)&&ie.logger.warn(`$ref: keywords ignored in schema at path "${G}"`)}function U(A){const{schema:T,opts:G}=A;T.default!==void 0&&G.useDefaults&&G.strictSchema&&(0,u.checkStrictMode)(A,"default is ignored in the schema root")}function D(A){const T=A.schema[A.opts.schemaId];T&&(A.baseId=(0,l.resolveUrl)(A.opts.uriResolver,A.baseId,T))}function V(A){if(A.schema.$async&&!A.schemaEnv.$async)throw new Error("async schema in sync schema")}function q({gen:A,schemaEnv:T,schema:G,errSchemaPath:J,opts:ie}){const ge=G.$comment;if(ie.$comment===!0)A.code((0,i._)`${c.default.self}.logger.log(${ge})`);else if(typeof ie.$comment=="function"){const ze=(0,i.str)`${J}/$comment`,rt=A.scopeValue("root",{ref:T.root});A.code((0,i._)`${c.default.self}.opts.$comment(${ge}, ${ze}, ${rt}.schema)`)}}function W(A){const{gen:T,schemaEnv:G,validateName:J,ValidationError:ie,opts:ge}=A;G.$async?T.if((0,i._)`${c.default.errors} === 0`,()=>T.return(c.default.data),()=>T.throw((0,i._)`new ${ie}(${c.default.vErrors})`)):(T.assign((0,i._)`${J}.errors`,c.default.vErrors),ge.unevaluated&&ee(A),T.return((0,i._)`${c.default.errors} === 0`))}function ee({gen:A,evaluated:T,props:G,items:J}){G instanceof i.Name&&A.assign((0,i._)`${T}.props`,G),J instanceof i.Name&&A.assign((0,i._)`${T}.items`,J)}function K(A,T,G,J){const{gen:ie,schema:ge,data:ze,allErrors:rt,opts:qe,self:R}=A,{RULES:O}=R;if(ge.$ref&&(qe.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(ge,O))){ie.block(()=>F(A,"$ref",O.all.$ref.definition));return}qe.jtd||L(A,T),ie.block(()=>{for(const re of O.rules)B(re);B(O.post)});function B(re){(0,r.shouldUseGroup)(ge,re)&&(re.type?(ie.if((0,n.checkDataType)(re.type,ze,qe.strictNumbers)),se(A,re),T.length===1&&T[0]===re.type&&G&&(ie.else(),(0,n.reportTypeError)(A)),ie.endIf()):se(A,re),rt||ie.if((0,i._)`${c.default.errors} === ${J||0}`))}}function se(A,T){const{gen:G,schema:J,opts:{useDefaults:ie}}=A;ie&&(0,s.assignDefaults)(A,T.type),G.block(()=>{for(const ge of T.rules)(0,r.shouldUseRule)(J,ge)&&F(A,ge.keyword,ge.definition,T.type)})}function L(A,T){A.schemaEnv.meta||!A.opts.strictTypes||(he(A,T),A.opts.allowUnionTypes||H(A,T),C(A,A.dataTypes))}function he(A,T){if(T.length){if(!A.dataTypes.length){A.dataTypes=T;return}T.forEach(G=>{P(A.dataTypes,G)||N(A,`type "${G}" not allowed by context "${A.dataTypes.join(",")}"`)}),k(A,T)}}function H(A,T){T.length>1&&!(T.length===2&&T.includes("null"))&&N(A,"use allowUnionTypes to allow union type keyword")}function C(A,T){const G=A.self.RULES.all;for(const J in G){const ie=G[J];if(typeof ie=="object"&&(0,r.shouldUseRule)(A.schema,ie)){const{type:ge}=ie.definition;ge.length&&!ge.some(ze=>M(T,ze))&&N(A,`missing type "${ge.join(",")}" for keyword "${J}"`)}}}function M(A,T){return A.includes(T)||T==="number"&&A.includes("integer")}function P(A,T){return A.includes(T)||T==="integer"&&A.includes("number")}function k(A,T){const G=[];for(const J of A.dataTypes)P(T,J)?G.push(J):T.includes("integer")&&J==="number"&&G.push("integer");A.dataTypes=G}function N(A,T){const G=A.schemaEnv.baseId+A.errSchemaPath;T+=` at "${G}" (strictTypes)`,(0,u.checkStrictMode)(A,T,A.opts.strictTypes)}class z{constructor(T,G,J){if((0,o.validateKeywordUsage)(T,G,J),this.gen=T.gen,this.allErrors=T.allErrors,this.keyword=J,this.data=T.data,this.schema=T.schema[J],this.$data=G.$data&&T.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(T,this.schema,J,this.$data),this.schemaType=G.schemaType,this.parentSchema=T.schema,this.params={},this.it=T,this.def=G,this.$data)this.schemaCode=T.gen.const("vSchema",oe(this.$data,T));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,G.schemaType,G.allowUndefined))throw new Error(`${J} value must be ${JSON.stringify(G.schemaType)}`);("code"in G?G.trackErrors:G.errors!==!1)&&(this.errsCount=T.gen.const("_errs",c.default.errors))}result(T,G,J){this.failResult((0,i.not)(T),G,J)}failResult(T,G,J){this.gen.if(T),J?J():this.error(),G?(this.gen.else(),G(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(T,G){this.failResult((0,i.not)(T),void 0,G)}fail(T){if(T===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(T),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(T){if(!this.$data)return this.fail(T);const{schemaCode:G}=this;this.fail((0,i._)`${G} !== undefined && (${(0,i.or)(this.invalid$data(),T)})`)}error(T,G,J){if(G){this.setParams(G),this._error(T,J),this.setParams({});return}this._error(T,J)}_error(T,G){(T?h.reportExtraError:h.reportError)(this,this.def.error,G)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(T){this.allErrors||this.gen.if(T)}setParams(T,G){G?Object.assign(this.params,T):this.params=T}block$data(T,G,J=i.nil){this.gen.block(()=>{this.check$data(T,J),G()})}check$data(T=i.nil,G=i.nil){if(!this.$data)return;const{gen:J,schemaCode:ie,schemaType:ge,def:ze}=this;J.if((0,i.or)((0,i._)`${ie} === undefined`,G)),T!==i.nil&&J.assign(T,!0),(ge.length||ze.validateSchema)&&(J.elseIf(this.invalid$data()),this.$dataError(),T!==i.nil&&J.assign(T,!1)),J.else()}invalid$data(){const{gen:T,schemaCode:G,schemaType:J,def:ie,it:ge}=this;return(0,i.or)(ze(),rt());function ze(){if(J.length){if(!(G instanceof i.Name))throw new Error("ajv implementation error");const qe=Array.isArray(J)?J:[J];return(0,i._)`${(0,n.checkDataTypes)(qe,G,ge.opts.strictNumbers,n.DataType.Wrong)}`}return i.nil}function rt(){if(ie.validateSchema){const qe=T.scopeValue("validate$data",{ref:ie.validateSchema});return(0,i._)`!${qe}(${G})`}return i.nil}}subschema(T,G){const J=(0,a.getSubschema)(this.it,T);(0,a.extendSubschemaData)(J,this.it,T),(0,a.extendSubschemaMode)(J,T);const ie={...this.it,...J,items:void 0,props:void 0};return b(ie,G),ie}mergeEvaluated(T,G){const{it:J,gen:ie}=this;J.opts.unevaluated&&(J.props!==!0&&T.props!==void 0&&(J.props=u.mergeEvaluated.props(ie,T.props,J.props,G)),J.items!==!0&&T.items!==void 0&&(J.items=u.mergeEvaluated.items(ie,T.items,J.items,G)))}mergeValidEvaluated(T,G){const{it:J,gen:ie}=this;if(J.opts.unevaluated&&(J.props!==!0||J.items!==!0))return ie.if(G,()=>this.mergeEvaluated(T,i.Name)),!0}}Dt.KeywordCxt=z;function F(A,T,G,J){const ie=new z(A,G,T);"code"in G?G.code(ie,J):ie.$data&&G.validate?(0,o.funcKeywordCode)(ie,G):"macro"in G?(0,o.macroKeywordCode)(ie,G):(G.compile||G.validate)&&(0,o.funcKeywordCode)(ie,G)}const Y=/^\/(?:[^~]|~0|~1)*$/,de=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function oe(A,{dataLevel:T,dataNames:G,dataPathArr:J}){let ie,ge;if(A==="")return c.default.rootData;if(A[0]==="/"){if(!Y.test(A))throw new Error(`Invalid JSON-pointer: ${A}`);ie=A,ge=c.default.rootData}else{const R=de.exec(A);if(!R)throw new Error(`Invalid JSON-pointer: ${A}`);const O=+R[1];if(ie=R[2],ie==="#"){if(O>=T)throw new Error(qe("property/index",O));return J[T-O]}if(O>T)throw new Error(qe("data",O));if(ge=G[T-O],!ie)return ge}let ze=ge;const rt=ie.split("/");for(const R of rt)R&&(ge=(0,i._)`${ge}${(0,i.getProperty)((0,u.unescapeJsonPointer)(R))}`,ze=(0,i._)`${ze} && ${ge}`);return ze;function qe(R,O){return`Cannot access ${R} ${O} levels up, current level is ${T}`}}return Dt.getData=oe,Dt}var _s={},Wd;function xs(){if(Wd)return _s;Wd=1,Object.defineProperty(_s,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return _s.default=e,_s}var ws={},Hd;function pn(){if(Hd)return ws;Hd=1,Object.defineProperty(ws,"__esModule",{value:!0});const e=bs();class t extends Error{constructor(n,s,o,a){super(a||`can't resolve reference ${o} from id ${s}`),this.missingRef=(0,e.resolveUrl)(n,s,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return ws.default=t,ws}var it={},Gd;function $s(){if(Gd)return it;Gd=1,Object.defineProperty(it,"__esModule",{value:!0}),it.resolveSchema=it.getCompilingSchema=it.resolveRef=it.compileSchema=it.SchemaEnv=void 0;const e=ye(),t=xs(),r=vt(),n=bs(),s=Re(),o=hn();class a{constructor(_){var f;this.refs={},this.dynamicAnchors={};let b;typeof _.schema=="object"&&(b=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(f=_.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(b==null?void 0:b[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=b==null?void 0:b.$async,this.refs={}}}it.SchemaEnv=a;function i(m){const _=u.call(this,m);if(_)return _;const f=(0,n.getFullPath)(this.opts.uriResolver,m.root.baseId),{es5:b,lines:x}=this.opts.code,{ownProperties:g}=this.opts,$=new e.CodeGen(this.scope,{es5:b,lines:x,ownProperties:g});let E;m.$async&&(E=$.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const j=$.scopeName("validate");m.validateName=j;const I={gen:$,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:$.scopeValue("schema",this.opts.code.source===!0?{ref:m.schema,code:(0,e.stringify)(m.schema)}:{ref:m.schema}),validateName:j,ValidationError:E,schema:m.schema,schemaEnv:m,rootId:f,baseId:m.baseId||f,schemaPath:e.nil,errSchemaPath:m.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let U;try{this._compilations.add(m),(0,o.validateFunctionCode)(I),$.optimize(this.opts.code.optimize);const D=$.toString();U=`${$.scopeRefs(r.default.scope)}return ${D}`,this.opts.code.process&&(U=this.opts.code.process(U,m));const q=new Function(`${r.default.self}`,`${r.default.scope}`,U)(this,this.scope.get());if(this.scope.value(j,{ref:q}),q.errors=null,q.schema=m.schema,q.schemaEnv=m,m.$async&&(q.$async=!0),this.opts.code.source===!0&&(q.source={validateName:j,validateCode:D,scopeValues:$._values}),this.opts.unevaluated){const{props:W,items:ee}=I;q.evaluated={props:W instanceof e.Name?void 0:W,items:ee instanceof e.Name?void 0:ee,dynamicProps:W instanceof e.Name,dynamicItems:ee instanceof e.Name},q.source&&(q.source.evaluated=(0,e.stringify)(q.evaluated))}return m.validate=q,m}catch(D){throw delete m.validate,delete m.validateName,U&&this.logger.error("Error compiling schema, function code:",U),D}finally{this._compilations.delete(m)}}it.compileSchema=i;function c(m,_,f){var b;f=(0,n.resolveUrl)(this.opts.uriResolver,_,f);const x=m.refs[f];if(x)return x;let g=p.call(this,m,f);if(g===void 0){const $=(b=m.localRefs)===null||b===void 0?void 0:b[f],{schemaId:E}=this.opts;$&&(g=new a({schema:$,schemaId:E,root:m,baseId:_}))}if(g!==void 0)return m.refs[f]=l.call(this,g)}it.resolveRef=c;function l(m){return(0,n.inlineRef)(m.schema,this.opts.inlineRefs)?m.schema:m.validate?m:i.call(this,m)}function u(m){for(const _ of this._compilations)if(h(_,m))return _}it.getCompilingSchema=u;function h(m,_){return m.schema===_.schema&&m.root===_.root&&m.baseId===_.baseId}function p(m,_){let f;for(;typeof(f=this.refs[_])=="string";)_=f;return f||this.schemas[_]||v.call(this,m,_)}function v(m,_){const f=this.opts.uriResolver.parse(_),b=(0,n._getFullPath)(this.opts.uriResolver,f);let x=(0,n.getFullPath)(this.opts.uriResolver,m.baseId,void 0);if(Object.keys(m.schema).length>0&&b===x)return y.call(this,f,m);const g=(0,n.normalizeId)(b),$=this.refs[g]||this.schemas[g];if(typeof $=="string"){const E=v.call(this,m,$);return typeof(E==null?void 0:E.schema)!="object"?void 0:y.call(this,f,E)}if(typeof($==null?void 0:$.schema)=="object"){if($.validate||i.call(this,$),g===(0,n.normalizeId)(_)){const{schema:E}=$,{schemaId:j}=this.opts,I=E[j];return I&&(x=(0,n.resolveUrl)(this.opts.uriResolver,x,I)),new a({schema:E,schemaId:j,root:m,baseId:x})}return y.call(this,f,$)}}it.resolveSchema=v;const w=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(m,{baseId:_,schema:f,root:b}){var x;if(((x=m.fragment)===null||x===void 0?void 0:x[0])!=="/")return;for(const E of m.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const j=f[(0,s.unescapeFragment)(E)];if(j===void 0)return;f=j;const I=typeof f=="object"&&f[this.opts.schemaId];!w.has(E)&&I&&(_=(0,n.resolveUrl)(this.opts.uriResolver,_,I))}let g;if(typeof f!="boolean"&&f.$ref&&!(0,s.schemaHasRulesButRef)(f,this.RULES)){const E=(0,n.resolveUrl)(this.opts.uriResolver,_,f.$ref);g=v.call(this,b,E)}const{schemaId:$}=this.opts;if(g=g||new a({schema:f,schemaId:$,root:b,baseId:_}),g.schema!==g.root.schema)return g}return it}const y0={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Ss={},gn={exports:{}},Xa,Zd;function Kd(){if(Zd)return Xa;Zd=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(p){let v="",w=0,y=0;for(y=0;y<p.length;y++)if(w=p[y].charCodeAt(0),w!==48){if(!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=p[y];break}for(y+=1;y<p.length;y++){if(w=p[y].charCodeAt(0),!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=p[y]}return v}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(p){return p.length=0,!0}function o(p,v,w){if(p.length){const y=r(p);if(y!=="")v.push(y);else return w.error=!0,!1;p.length=0}return!0}function a(p){let v=0;const w={error:!1,address:"",zone:""},y=[],m=[];let _=!1,f=!1,b=o;for(let x=0;x<p.length;x++){const g=p[x];if(!(g==="["||g==="]"))if(g===":"){if(_===!0&&(f=!0),!b(m,y,w))break;if(++v>7){w.error=!0;break}x>0&&p[x-1]===":"&&(_=!0),y.push(":");continue}else if(g==="%"){if(!b(m,y,w))break;b=s}else{m.push(g);continue}}return m.length&&(b===s?w.zone=m.join(""):f?y.push(m.join("")):y.push(r(m))),w.address=y.join(""),w}function i(p){if(c(p,":")<2)return{host:p,isIPV6:!1};const v=a(p);if(v.error)return{host:p,isIPV6:!1};{let w=v.address,y=v.address;return v.zone&&(w+="%"+v.zone,y+="%25"+v.zone),{host:w,isIPV6:!0,escapedHost:y}}}function c(p,v){let w=0;for(let y=0;y<p.length;y++)p[y]===v&&w++;return w}function l(p){let v=p;const w=[];let y=-1,m=0;for(;m=v.length;){if(m===1){if(v===".")break;if(v==="/"){w.push("/");break}else{w.push(v);break}}else if(m===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){w.push("/");break}}else if(m===3&&v==="/.."){w.length!==0&&w.pop(),w.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),w.length!==0&&w.pop();continue}}if((y=v.indexOf("/",1))===-1){w.push(v);break}else w.push(v.slice(0,y)),v=v.slice(y)}return w.join("")}function u(p,v){const w=v!==!0?escape:unescape;return p.scheme!==void 0&&(p.scheme=w(p.scheme)),p.userinfo!==void 0&&(p.userinfo=w(p.userinfo)),p.host!==void 0&&(p.host=w(p.host)),p.path!==void 0&&(p.path=w(p.path)),p.query!==void 0&&(p.query=w(p.query)),p.fragment!==void 0&&(p.fragment=w(p.fragment)),p}function h(p){const v=[];if(p.userinfo!==void 0&&(v.push(p.userinfo),v.push("@")),p.host!==void 0){let w=unescape(p.host);if(!t(w)){const y=i(w);y.isIPV6===!0?w=`[${y.escapedHost}]`:w=p.host}v.push(w)}return(typeof p.port=="number"||typeof p.port=="string")&&(v.push(":"),v.push(String(p.port))),v.length?v.join(""):void 0}return Xa={nonSimpleDomain:n,recomposeAuthority:h,normalizeComponentEncoding:u,removeDotSegments:l,isIPv4:t,isUUID:e,normalizeIPv6:i,stringArrayToHexStripped:r},Xa}var Qa,Yd;function b0(){if(Yd)return Qa;Yd=1;const{isUUID:e}=Kd(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(g){return r.indexOf(g)!==-1}function s(g){return g.secure===!0?!0:g.secure===!1?!1:g.scheme?g.scheme.length===3&&(g.scheme[0]==="w"||g.scheme[0]==="W")&&(g.scheme[1]==="s"||g.scheme[1]==="S")&&(g.scheme[2]==="s"||g.scheme[2]==="S"):!1}function o(g){return g.host||(g.error=g.error||"HTTP URIs must have a host."),g}function a(g){const $=String(g.scheme).toLowerCase()==="https";return(g.port===($?443:80)||g.port==="")&&(g.port=void 0),g.path||(g.path="/"),g}function i(g){return g.secure=s(g),g.resourceName=(g.path||"/")+(g.query?"?"+g.query:""),g.path=void 0,g.query=void 0,g}function c(g){if((g.port===(s(g)?443:80)||g.port==="")&&(g.port=void 0),typeof g.secure=="boolean"&&(g.scheme=g.secure?"wss":"ws",g.secure=void 0),g.resourceName){const[$,E]=g.resourceName.split("?");g.path=$&&$!=="/"?$:void 0,g.query=E,g.resourceName=void 0}return g.fragment=void 0,g}function l(g,$){if(!g.path)return g.error="URN can not be parsed",g;const E=g.path.match(t);if(E){const j=$.scheme||g.scheme||"urn";g.nid=E[1].toLowerCase(),g.nss=E[2];const I=`${j}:${$.nid||g.nid}`,U=x(I);g.path=void 0,U&&(g=U.parse(g,$))}else g.error=g.error||"URN can not be parsed.";return g}function u(g,$){if(g.nid===void 0)throw new Error("URN without nid cannot be serialized");const E=$.scheme||g.scheme||"urn",j=g.nid.toLowerCase(),I=`${E}:${$.nid||j}`,U=x(I);U&&(g=U.serialize(g,$));const D=g,V=g.nss;return D.path=`${j||$.nid}:${V}`,$.skipEscape=!0,D}function h(g,$){const E=g;return E.uuid=E.nss,E.nss=void 0,!$.tolerant&&(!E.uuid||!e(E.uuid))&&(E.error=E.error||"UUID is not valid."),E}function p(g){const $=g;return $.nss=(g.uuid||"").toLowerCase(),$}const v={scheme:"http",domainHost:!0,parse:o,serialize:a},w={scheme:"https",domainHost:v.domainHost,parse:o,serialize:a},y={scheme:"ws",domainHost:!0,parse:i,serialize:c},m={scheme:"wss",domainHost:y.domainHost,parse:y.parse,serialize:y.serialize},b={http:v,https:w,ws:y,wss:m,urn:{scheme:"urn",parse:l,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:h,serialize:p,skipNormalize:!0}};Object.setPrototypeOf(b,null);function x(g){return g&&(b[g]||b[g.toLowerCase()])||void 0}return Qa={wsIsSecure:s,SCHEMES:b,isValidSchemeName:n,getSchemeHandler:x},Qa}var Jd;function _0(){if(Jd)return gn.exports;Jd=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:s,nonSimpleDomain:o}=Kd(),{SCHEMES:a,getSchemeHandler:i}=b0();function c(m,_){return typeof m=="string"?m=p(w(m,_),_):typeof m=="object"&&(m=w(p(m,_),_)),m}function l(m,_,f){const b=f?Object.assign({scheme:"null"},f):{scheme:"null"},x=u(w(m,b),w(_,b),b,!0);return b.skipEscape=!0,p(x,b)}function u(m,_,f,b){const x={};return b||(m=w(p(m,f),f),_=w(p(_,f),f)),f=f||{},!f.tolerant&&_.scheme?(x.scheme=_.scheme,x.userinfo=_.userinfo,x.host=_.host,x.port=_.port,x.path=t(_.path||""),x.query=_.query):(_.userinfo!==void 0||_.host!==void 0||_.port!==void 0?(x.userinfo=_.userinfo,x.host=_.host,x.port=_.port,x.path=t(_.path||""),x.query=_.query):(_.path?(_.path[0]==="/"?x.path=t(_.path):((m.userinfo!==void 0||m.host!==void 0||m.port!==void 0)&&!m.path?x.path="/"+_.path:m.path?x.path=m.path.slice(0,m.path.lastIndexOf("/")+1)+_.path:x.path=_.path,x.path=t(x.path)),x.query=_.query):(x.path=m.path,_.query!==void 0?x.query=_.query:x.query=m.query),x.userinfo=m.userinfo,x.host=m.host,x.port=m.port),x.scheme=m.scheme),x.fragment=_.fragment,x}function h(m,_,f){return typeof m=="string"?(m=unescape(m),m=p(n(w(m,f),!0),{...f,skipEscape:!0})):typeof m=="object"&&(m=p(n(m,!0),{...f,skipEscape:!0})),typeof _=="string"?(_=unescape(_),_=p(n(w(_,f),!0),{...f,skipEscape:!0})):typeof _=="object"&&(_=p(n(_,!0),{...f,skipEscape:!0})),m.toLowerCase()===_.toLowerCase()}function p(m,_){const f={host:m.host,scheme:m.scheme,userinfo:m.userinfo,port:m.port,path:m.path,query:m.query,nid:m.nid,nss:m.nss,uuid:m.uuid,fragment:m.fragment,reference:m.reference,resourceName:m.resourceName,secure:m.secure,error:""},b=Object.assign({},_),x=[],g=i(b.scheme||f.scheme);g&&g.serialize&&g.serialize(f,b),f.path!==void 0&&(b.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),b.reference!=="suffix"&&f.scheme&&x.push(f.scheme,":");const $=r(f);if($!==void 0&&(b.reference!=="suffix"&&x.push("//"),x.push($),f.path&&f.path[0]!=="/"&&x.push("/")),f.path!==void 0){let E=f.path;!b.absolutePath&&(!g||!g.absolutePath)&&(E=t(E)),$===void 0&&E[0]==="/"&&E[1]==="/"&&(E="/%2F"+E.slice(2)),x.push(E)}return f.query!==void 0&&x.push("?",f.query),f.fragment!==void 0&&x.push("#",f.fragment),x.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function w(m,_){const f=Object.assign({},_),b={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let x=!1;f.reference==="suffix"&&(f.scheme?m=f.scheme+":"+m:m="//"+m);const g=m.match(v);if(g){if(b.scheme=g[1],b.userinfo=g[3],b.host=g[4],b.port=parseInt(g[5],10),b.path=g[6]||"",b.query=g[7],b.fragment=g[8],isNaN(b.port)&&(b.port=g[5]),b.host)if(s(b.host)===!1){const j=e(b.host);b.host=j.host.toLowerCase(),x=j.isIPV6}else x=!0;b.scheme===void 0&&b.userinfo===void 0&&b.host===void 0&&b.port===void 0&&b.query===void 0&&!b.path?b.reference="same-document":b.scheme===void 0?b.reference="relative":b.fragment===void 0?b.reference="absolute":b.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==b.reference&&(b.error=b.error||"URI is not a "+f.reference+" reference.");const $=i(f.scheme||b.scheme);if(!f.unicodeSupport&&(!$||!$.unicodeSupport)&&b.host&&(f.domainHost||$&&$.domainHost)&&x===!1&&o(b.host))try{b.host=URL.domainToASCII(b.host.toLowerCase())}catch(E){b.error=b.error||"Host's domain name can not be converted to ASCII: "+E}(!$||$&&!$.skipNormalize)&&(m.indexOf("%")!==-1&&(b.scheme!==void 0&&(b.scheme=unescape(b.scheme)),b.host!==void 0&&(b.host=unescape(b.host))),b.path&&(b.path=escape(unescape(b.path))),b.fragment&&(b.fragment=encodeURI(decodeURIComponent(b.fragment)))),$&&$.parse&&$.parse(b,f)}else b.error=b.error||"URI can not be parsed.";return b}const y={SCHEMES:a,normalize:c,resolve:l,resolveComponent:u,equal:h,serialize:p,parse:w};return gn.exports=y,gn.exports.default=y,gn.exports.fastUri=y,gn.exports}var Xd;function x0(){if(Xd)return Ss;Xd=1,Object.defineProperty(Ss,"__esModule",{value:!0});const e=_0();return e.code='require("ajv/dist/runtime/uri").default',Ss.default=e,Ss}var Qd;function ef(){return Qd||(Qd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=hn();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=ye();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=xs(),s=pn(),o=Pd(),a=$s(),i=ye(),c=bs(),l=ys(),u=Re(),h=y0,p=x0(),v=(H,C)=>new RegExp(H,C);v.code="new RegExp";const w=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function b(H){var C,M,P,k,N,z,F,Y,de,oe,A,T,G,J,ie,ge,ze,rt,qe,R,O,B,re,ne,X;const me=H.strict,Pe=(C=H.code)===null||C===void 0?void 0:C.optimize,Ve=Pe===!0||Pe===void 0?1:Pe||0,Qe=(P=(M=H.code)===null||M===void 0?void 0:M.regExp)!==null&&P!==void 0?P:v,Jr=(k=H.uriResolver)!==null&&k!==void 0?k:p.default;return{strictSchema:(z=(N=H.strictSchema)!==null&&N!==void 0?N:me)!==null&&z!==void 0?z:!0,strictNumbers:(Y=(F=H.strictNumbers)!==null&&F!==void 0?F:me)!==null&&Y!==void 0?Y:!0,strictTypes:(oe=(de=H.strictTypes)!==null&&de!==void 0?de:me)!==null&&oe!==void 0?oe:"log",strictTuples:(T=(A=H.strictTuples)!==null&&A!==void 0?A:me)!==null&&T!==void 0?T:"log",strictRequired:(J=(G=H.strictRequired)!==null&&G!==void 0?G:me)!==null&&J!==void 0?J:!1,code:H.code?{...H.code,optimize:Ve,regExp:Qe}:{optimize:Ve,regExp:Qe},loopRequired:(ie=H.loopRequired)!==null&&ie!==void 0?ie:f,loopEnum:(ge=H.loopEnum)!==null&&ge!==void 0?ge:f,meta:(ze=H.meta)!==null&&ze!==void 0?ze:!0,messages:(rt=H.messages)!==null&&rt!==void 0?rt:!0,inlineRefs:(qe=H.inlineRefs)!==null&&qe!==void 0?qe:!0,schemaId:(R=H.schemaId)!==null&&R!==void 0?R:"$id",addUsedSchema:(O=H.addUsedSchema)!==null&&O!==void 0?O:!0,validateSchema:(B=H.validateSchema)!==null&&B!==void 0?B:!0,validateFormats:(re=H.validateFormats)!==null&&re!==void 0?re:!0,unicodeRegExp:(ne=H.unicodeRegExp)!==null&&ne!==void 0?ne:!0,int32range:(X=H.int32range)!==null&&X!==void 0?X:!0,uriResolver:Jr}}class x{constructor(C={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,C=this.opts={...C,...b(C)};const{es5:M,lines:P}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:y,es5:M,lines:P}),this.logger=V(C.logger);const k=C.validateFormats;C.validateFormats=!1,this.RULES=(0,o.getRules)(),g.call(this,m,C,"NOT SUPPORTED"),g.call(this,_,C,"DEPRECATED","warn"),this._metaOpts=U.call(this),C.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),C.keywords&&I.call(this,C.keywords),typeof C.meta=="object"&&this.addMetaSchema(C.meta),E.call(this),C.validateFormats=k}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:C,meta:M,schemaId:P}=this.opts;let k=h;P==="id"&&(k={...h},k.id=k.$id,delete k.$id),M&&C&&this.addMetaSchema(k,k[P],!1)}defaultMeta(){const{meta:C,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof C=="object"?C[M]||C:void 0}validate(C,M){let P;if(typeof C=="string"){if(P=this.getSchema(C),!P)throw new Error(`no schema with key or ref "${C}"`)}else P=this.compile(C);const k=P(M);return"$async"in P||(this.errors=P.errors),k}compile(C,M){const P=this._addSchema(C,M);return P.validate||this._compileSchemaEnv(P)}compileAsync(C,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return k.call(this,C,M);async function k(oe,A){await N.call(this,oe.$schema);const T=this._addSchema(oe,A);return T.validate||z.call(this,T)}async function N(oe){oe&&!this.getSchema(oe)&&await k.call(this,{$ref:oe},!0)}async function z(oe){try{return this._compileSchemaEnv(oe)}catch(A){if(!(A instanceof s.default))throw A;return F.call(this,A),await Y.call(this,A.missingSchema),z.call(this,oe)}}function F({missingSchema:oe,missingRef:A}){if(this.refs[oe])throw new Error(`AnySchema ${oe} is loaded but ${A} cannot be resolved`)}async function Y(oe){const A=await de.call(this,oe);this.refs[oe]||await N.call(this,A.$schema),this.refs[oe]||this.addSchema(A,oe,M)}async function de(oe){const A=this._loading[oe];if(A)return A;try{return await(this._loading[oe]=P(oe))}finally{delete this._loading[oe]}}}addSchema(C,M,P,k=this.opts.validateSchema){if(Array.isArray(C)){for(const z of C)this.addSchema(z,void 0,P,k);return this}let N;if(typeof C=="object"){const{schemaId:z}=this.opts;if(N=C[z],N!==void 0&&typeof N!="string")throw new Error(`schema ${z} must be string`)}return M=(0,c.normalizeId)(M||N),this._checkUnique(M),this.schemas[M]=this._addSchema(C,P,M,k,!0),this}addMetaSchema(C,M,P=this.opts.validateSchema){return this.addSchema(C,M,!0,P),this}validateSchema(C,M){if(typeof C=="boolean")return!0;let P;if(P=C.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const k=this.validate(P,C);if(!k&&M){const N="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(N);else throw new Error(N)}return k}getSchema(C){let M;for(;typeof(M=$.call(this,C))=="string";)C=M;if(M===void 0){const{schemaId:P}=this.opts,k=new a.SchemaEnv({schema:{},schemaId:P});if(M=a.resolveSchema.call(this,k,C),!M)return;this.refs[C]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(C){if(C instanceof RegExp)return this._removeAllSchemas(this.schemas,C),this._removeAllSchemas(this.refs,C),this;switch(typeof C){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const M=$.call(this,C);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[C],delete this.refs[C],this}case"object":{const M=C;this._cache.delete(M);let P=C[this.opts.schemaId];return P&&(P=(0,c.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(C){for(const M of C)this.addKeyword(M);return this}addKeyword(C,M){let P;if(typeof C=="string")P=C,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=P);else if(typeof C=="object"&&M===void 0){if(M=C,P=M.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,P,M),!M)return(0,u.eachItem)(P,N=>ee.call(this,N)),this;se.call(this,M);const k={...M,type:(0,l.getJSONTypes)(M.type),schemaType:(0,l.getJSONTypes)(M.schemaType)};return(0,u.eachItem)(P,k.type.length===0?N=>ee.call(this,N,k):N=>k.type.forEach(z=>ee.call(this,N,k,z))),this}getKeyword(C){const M=this.RULES.all[C];return typeof M=="object"?M.definition:!!M}removeKeyword(C){const{RULES:M}=this;delete M.keywords[C],delete M.all[C];for(const P of M.rules){const k=P.rules.findIndex(N=>N.keyword===C);k>=0&&P.rules.splice(k,1)}return this}addFormat(C,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[C]=M,this}errorsText(C=this.errors,{separator:M=", ",dataVar:P="data"}={}){return!C||C.length===0?"No errors":C.map(k=>`${P}${k.instancePath} ${k.message}`).reduce((k,N)=>k+M+N)}$dataMetaSchema(C,M){const P=this.RULES.all;C=JSON.parse(JSON.stringify(C));for(const k of M){const N=k.split("/").slice(1);let z=C;for(const F of N)z=z[F];for(const F in P){const Y=P[F];if(typeof Y!="object")continue;const{$data:de}=Y.definition,oe=z[F];de&&oe&&(z[F]=he(oe))}}return C}_removeAllSchemas(C,M){for(const P in C){const k=C[P];(!M||M.test(P))&&(typeof k=="string"?delete C[P]:k&&!k.meta&&(this._cache.delete(k.schema),delete C[P]))}}_addSchema(C,M,P,k=this.opts.validateSchema,N=this.opts.addUsedSchema){let z;const{schemaId:F}=this.opts;if(typeof C=="object")z=C[F];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof C!="boolean")throw new Error("schema must be object or boolean")}let Y=this._cache.get(C);if(Y!==void 0)return Y;P=(0,c.normalizeId)(z||P);const de=c.getSchemaRefs.call(this,C,P);return Y=new a.SchemaEnv({schema:C,schemaId:F,meta:M,baseId:P,localRefs:de}),this._cache.set(Y.schema,Y),N&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=Y),k&&this.validateSchema(C,!0),Y}_checkUnique(C){if(this.schemas[C]||this.refs[C])throw new Error(`schema with key or id "${C}" already exists`)}_compileSchemaEnv(C){if(C.meta?this._compileMetaSchema(C):a.compileSchema.call(this,C),!C.validate)throw new Error("ajv implementation error");return C.validate}_compileMetaSchema(C){const M=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,C)}finally{this.opts=M}}}x.ValidationError=n.default,x.MissingRefError=s.default,e.default=x;function g(H,C,M,P="error"){for(const k in H){const N=k;N in C&&this.logger[P](`${M}: option ${k}. ${H[N]}`)}}function $(H){return H=(0,c.normalizeId)(H),this.schemas[H]||this.refs[H]}function E(){const H=this.opts.schemas;if(H)if(Array.isArray(H))this.addSchema(H);else for(const C in H)this.addSchema(H[C],C)}function j(){for(const H in this.opts.formats){const C=this.opts.formats[H];C&&this.addFormat(H,C)}}function I(H){if(Array.isArray(H)){this.addVocabulary(H);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const C in H){const M=H[C];M.keyword||(M.keyword=C),this.addKeyword(M)}}function U(){const H={...this.opts};for(const C of w)delete H[C];return H}const D={log(){},warn(){},error(){}};function V(H){if(H===!1)return D;if(H===void 0)return console;if(H.log&&H.warn&&H.error)return H;throw new Error("logger must implement log, warn and error methods")}const q=/^[a-z_$][a-z0-9_$:-]*$/i;function W(H,C){const{RULES:M}=this;if((0,u.eachItem)(H,P=>{if(M.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!q.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!C&&C.$data&&!("code"in C||"validate"in C))throw new Error('$data keyword must have "code" or "validate" function')}function ee(H,C,M){var P;const k=C==null?void 0:C.post;if(M&&k)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:N}=this;let z=k?N.post:N.rules.find(({type:Y})=>Y===M);if(z||(z={type:M,rules:[]},N.rules.push(z)),N.keywords[H]=!0,!C)return;const F={keyword:H,definition:{...C,type:(0,l.getJSONTypes)(C.type),schemaType:(0,l.getJSONTypes)(C.schemaType)}};C.before?K.call(this,z,F,C.before):z.rules.push(F),N.all[H]=F,(P=C.implements)===null||P===void 0||P.forEach(Y=>this.addKeyword(Y))}function K(H,C,M){const P=H.rules.findIndex(k=>k.keyword===M);P>=0?H.rules.splice(P,0,C):(H.rules.push(C),this.logger.warn(`rule ${M} is not defined`))}function se(H){let{metaSchema:C}=H;C!==void 0&&(H.$data&&this.opts.$data&&(C=he(C)),H.validateSchema=this.compile(C,!0))}const L={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function he(H){return{anyOf:[H,L]}}})(Wa)),Wa}var Es={},ks={},Cs={},tf;function w0(){if(tf)return Cs;tf=1,Object.defineProperty(Cs,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Cs.default=e,Cs}var tr={},rf;function ei(){if(rf)return tr;rf=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.callRef=tr.getValidate=void 0;const e=pn(),t=bt(),r=ye(),n=vt(),s=$s(),o=Re(),a={keyword:"$ref",schemaType:"string",code(l){const{gen:u,schema:h,it:p}=l,{baseId:v,schemaEnv:w,validateName:y,opts:m,self:_}=p,{root:f}=w;if((h==="#"||h==="#/")&&v===f.baseId)return x();const b=s.resolveRef.call(_,f,v,h);if(b===void 0)throw new e.default(p.opts.uriResolver,v,h);if(b instanceof s.SchemaEnv)return g(b);return $(b);function x(){if(w===f)return c(l,y,w,w.$async);const E=u.scopeValue("root",{ref:f});return c(l,(0,r._)`${E}.validate`,f,f.$async)}function g(E){const j=i(l,E);c(l,j,E,E.$async)}function $(E){const j=u.scopeValue("schema",m.code.source===!0?{ref:E,code:(0,r.stringify)(E)}:{ref:E}),I=u.name("valid"),U=l.subschema({schema:E,dataTypes:[],schemaPath:r.nil,topSchemaRef:j,errSchemaPath:h},I);l.mergeEvaluated(U),l.ok(I)}}};function i(l,u){const{gen:h}=l;return u.validate?h.scopeValue("validate",{ref:u.validate}):(0,r._)`${h.scopeValue("wrapper",{ref:u})}.validate`}tr.getValidate=i;function c(l,u,h,p){const{gen:v,it:w}=l,{allErrors:y,schemaEnv:m,opts:_}=w,f=_.passContext?n.default.this:r.nil;p?b():x();function b(){if(!m.$async)throw new Error("async schema referenced by sync schema");const E=v.let("valid");v.try(()=>{v.code((0,r._)`await ${(0,t.callValidateCode)(l,u,f)}`),$(u),y||v.assign(E,!0)},j=>{v.if((0,r._)`!(${j} instanceof ${w.ValidationError})`,()=>v.throw(j)),g(j),y||v.assign(E,!1)}),l.ok(E)}function x(){l.result((0,t.callValidateCode)(l,u,f),()=>$(u),()=>g(u))}function g(E){const j=(0,r._)`${E}.errors`;v.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${j} : ${n.default.vErrors}.concat(${j})`),v.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function $(E){var j;if(!w.opts.unevaluated)return;const I=(j=h==null?void 0:h.validate)===null||j===void 0?void 0:j.evaluated;if(w.props!==!0)if(I&&!I.dynamicProps)I.props!==void 0&&(w.props=o.mergeEvaluated.props(v,I.props,w.props));else{const U=v.var("props",(0,r._)`${E}.evaluated.props`);w.props=o.mergeEvaluated.props(v,U,w.props,r.Name)}if(w.items!==!0)if(I&&!I.dynamicItems)I.items!==void 0&&(w.items=o.mergeEvaluated.items(v,I.items,w.items));else{const U=v.var("items",(0,r._)`${E}.evaluated.items`);w.items=o.mergeEvaluated.items(v,U,w.items,r.Name)}}}return tr.callRef=c,tr.default=a,tr}var nf;function sf(){if(nf)return ks;nf=1,Object.defineProperty(ks,"__esModule",{value:!0});const e=w0(),t=ei(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return ks.default=r,ks}var js={},Ns={},of;function $0(){if(of)return Ns;of=1,Object.defineProperty(Ns,"__esModule",{value:!0});const e=ye(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:o,schemaCode:a})=>(0,e.str)`must be ${r[o].okStr} ${a}`,params:({keyword:o,schemaCode:a})=>(0,e._)`{comparison: ${r[o].okStr}, limit: ${a}}`},s={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(o){const{keyword:a,data:i,schemaCode:c}=o;o.fail$data((0,e._)`${i} ${r[a].fail} ${c} || isNaN(${i})`)}};return Ns.default=s,Ns}var Rs={},af;function S0(){if(af)return Rs;af=1,Object.defineProperty(Rs,"__esModule",{value:!0});const e=ye(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:s,data:o,schemaCode:a,it:i}=n,c=i.opts.multipleOfPrecision,l=s.let("res"),u=c?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${c}`:(0,e._)`${l} !== parseInt(${l})`;n.fail$data((0,e._)`(${a} === 0 || (${l} = ${o}/${a}, ${u}))`)}};return Rs.default=r,Rs}var As={},Ps={},cf;function E0(){if(cf)return Ps;cf=1,Object.defineProperty(Ps,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,s=0,o;for(;s<r;)n++,o=t.charCodeAt(s++),o>=55296&&o<=56319&&s<r&&(o=t.charCodeAt(s),(o&64512)===56320&&s++);return n}return Ps.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ps}var lf;function k0(){if(lf)return As;lf=1,Object.defineProperty(As,"__esModule",{value:!0});const e=ye(),t=Re(),r=E0(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:a}){const i=o==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${a} characters`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:a,data:i,schemaCode:c,it:l}=o,u=a==="maxLength"?e.operators.GT:e.operators.LT,h=l.opts.unicode===!1?(0,e._)`${i}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${i})`;o.fail$data((0,e._)`${h} ${u} ${c}`)}};return As.default=s,As}var Ts={},uf;function C0(){if(uf)return Ts;uf=1,Object.defineProperty(Ts,"__esModule",{value:!0});const e=bt(),t=ye(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,t.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,t._)`{pattern: ${s}}`},code(s){const{data:o,$data:a,schema:i,schemaCode:c,it:l}=s,u=l.opts.unicodeRegExp?"u":"",h=a?(0,t._)`(new RegExp(${c}, ${u}))`:(0,e.usePattern)(s,i);s.fail$data((0,t._)`!${h}.test(${o})`)}};return Ts.default=n,Ts}var Os={},df;function j0(){if(df)return Os;df=1,Object.defineProperty(Os,"__esModule",{value:!0});const e=ye(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const o=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${s} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:s,data:o,schemaCode:a}=n,i=s==="maxProperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${o}).length ${i} ${a}`)}};return Os.default=r,Os}var Is={},ff;function N0(){if(ff)return Is;ff=1,Object.defineProperty(Is,"__esModule",{value:!0});const e=bt(),t=ye(),r=Re(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,t.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,t._)`{missingProperty: ${o}}`},code(o){const{gen:a,schema:i,schemaCode:c,data:l,$data:u,it:h}=o,{opts:p}=h;if(!u&&i.length===0)return;const v=i.length>=p.loopRequired;if(h.allErrors?w():y(),p.strictRequired){const f=o.parentSchema.properties,{definedProperties:b}=o.it;for(const x of i)if((f==null?void 0:f[x])===void 0&&!b.has(x)){const g=h.schemaEnv.baseId+h.errSchemaPath,$=`required property "${x}" is not defined at "${g}" (strictRequired)`;(0,r.checkStrictMode)(h,$,h.opts.strictRequired)}}function w(){if(v||u)o.block$data(t.nil,m);else for(const f of i)(0,e.checkReportMissingProp)(o,f)}function y(){const f=a.let("missing");if(v||u){const b=a.let("valid",!0);o.block$data(b,()=>_(f,b)),o.ok(b)}else a.if((0,e.checkMissingProp)(o,i,f)),(0,e.reportMissingProp)(o,f),a.else()}function m(){a.forOf("prop",c,f=>{o.setParams({missingProperty:f}),a.if((0,e.noPropertyInData)(a,l,f,p.ownProperties),()=>o.error())})}function _(f,b){o.setParams({missingProperty:f}),a.forOf(f,c,()=>{a.assign(b,(0,e.propertyInData)(a,l,f,p.ownProperties)),a.if((0,t.not)(b),()=>{o.error(),a.break()})},t.nil)}}};return Is.default=s,Is}var Ds={},mf;function R0(){if(mf)return Ds;mf=1,Object.defineProperty(Ds,"__esModule",{value:!0});const e=ye(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const o=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${s} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:s,data:o,schemaCode:a}=n,i=s==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`${o}.length ${i} ${a}`)}};return Ds.default=r,Ds}var Ms={},Vs={},hf;function ti(){if(hf)return Vs;hf=1,Object.defineProperty(Vs,"__esModule",{value:!0});const e=zd();return e.code='require("ajv/dist/runtime/equal").default',Vs.default=e,Vs}var pf;function A0(){if(pf)return Ms;pf=1,Object.defineProperty(Ms,"__esModule",{value:!0});const e=ys(),t=ye(),r=Re(),n=ti(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:i}})=>(0,t.str)`must NOT have duplicate items (items ## ${i} and ${a} are identical)`,params:({params:{i:a,j:i}})=>(0,t._)`{i: ${a}, j: ${i}}`},code(a){const{gen:i,data:c,$data:l,schema:u,parentSchema:h,schemaCode:p,it:v}=a;if(!l&&!u)return;const w=i.let("valid"),y=h.items?(0,e.getSchemaTypes)(h.items):[];a.block$data(w,m,(0,t._)`${p} === false`),a.ok(w);function m(){const x=i.let("i",(0,t._)`${c}.length`),g=i.let("j");a.setParams({i:x,j:g}),i.assign(w,!0),i.if((0,t._)`${x} > 1`,()=>(_()?f:b)(x,g))}function _(){return y.length>0&&!y.some(x=>x==="object"||x==="array")}function f(x,g){const $=i.name("item"),E=(0,e.checkDataTypes)(y,$,v.opts.strictNumbers,e.DataType.Wrong),j=i.const("indices",(0,t._)`{}`);i.for((0,t._)`;${x}--;`,()=>{i.let($,(0,t._)`${c}[${x}]`),i.if(E,(0,t._)`continue`),y.length>1&&i.if((0,t._)`typeof ${$} == "string"`,(0,t._)`${$} += "_"`),i.if((0,t._)`typeof ${j}[${$}] == "number"`,()=>{i.assign(g,(0,t._)`${j}[${$}]`),a.error(),i.assign(w,!1).break()}).code((0,t._)`${j}[${$}] = ${x}`)})}function b(x,g){const $=(0,r.useFunc)(i,n.default),E=i.name("outer");i.label(E).for((0,t._)`;${x}--;`,()=>i.for((0,t._)`${g} = ${x}; ${g}--;`,()=>i.if((0,t._)`${$}(${c}[${x}], ${c}[${g}])`,()=>{a.error(),i.assign(w,!1).break(E)})))}}};return Ms.default=o,Ms}var Fs={},gf;function P0(){if(gf)return Fs;gf=1,Object.defineProperty(Fs,"__esModule",{value:!0});const e=ye(),t=Re(),r=ti(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,e._)`{allowedValue: ${o}}`},code(o){const{gen:a,data:i,$data:c,schemaCode:l,schema:u}=o;c||u&&typeof u=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(a,r.default)}(${i}, ${l})`):o.fail((0,e._)`${u} !== ${i}`)}};return Fs.default=s,Fs}var Ls={},vf;function T0(){if(vf)return Ls;vf=1,Object.defineProperty(Ls,"__esModule",{value:!0});const e=ye(),t=Re(),r=ti(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,e._)`{allowedValues: ${o}}`},code(o){const{gen:a,data:i,$data:c,schema:l,schemaCode:u,it:h}=o;if(!c&&l.length===0)throw new Error("enum must have non-empty array");const p=l.length>=h.opts.loopEnum;let v;const w=()=>v??(v=(0,t.useFunc)(a,r.default));let y;if(p||c)y=a.let("valid"),o.block$data(y,m);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const f=a.const("vSchema",u);y=(0,e.or)(...l.map((b,x)=>_(f,x)))}o.pass(y);function m(){a.assign(y,!1),a.forOf("v",u,f=>a.if((0,e._)`${w()}(${i}, ${f})`,()=>a.assign(y,!0).break()))}function _(f,b){const x=l[b];return typeof x=="object"&&x!==null?(0,e._)`${w()}(${i}, ${f}[${b}])`:(0,e._)`${i} === ${x}`}}};return Ls.default=s,Ls}var yf;function bf(){if(yf)return js;yf=1,Object.defineProperty(js,"__esModule",{value:!0});const e=$0(),t=S0(),r=k0(),n=C0(),s=j0(),o=N0(),a=R0(),i=A0(),c=P0(),l=T0(),u=[e.default,t.default,r.default,n.default,s.default,o.default,a.default,i.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default];return js.default=u,js}var zs={},Lr={},_f;function xf(){if(_f)return Lr;_f=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.validateAdditionalItems=void 0;const e=ye(),t=Re(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{parentSchema:a,it:i}=o,{items:c}=a;if(!Array.isArray(c)){(0,t.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(o,c)}};function s(o,a){const{gen:i,schema:c,data:l,keyword:u,it:h}=o;h.items=!0;const p=i.const("len",(0,e._)`${l}.length`);if(c===!1)o.setParams({len:a.length}),o.pass((0,e._)`${p} <= ${a.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(h,c)){const w=i.var("valid",(0,e._)`${p} <= ${a.length}`);i.if((0,e.not)(w),()=>v(w)),o.ok(w)}function v(w){i.forRange("i",a.length,p,y=>{o.subschema({keyword:u,dataProp:y,dataPropType:t.Type.Num},w),h.allErrors||i.if((0,e.not)(w),()=>i.break())})}}return Lr.validateAdditionalItems=s,Lr.default=n,Lr}var qs={},zr={},wf;function $f(){if(wf)return zr;wf=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.validateTuple=void 0;const e=ye(),t=Re(),r=bt(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:a,it:i}=o;if(Array.isArray(a))return s(o,"additionalItems",a);i.items=!0,!(0,t.alwaysValidSchema)(i,a)&&o.ok((0,r.validateArray)(o))}};function s(o,a,i=o.schema){const{gen:c,parentSchema:l,data:u,keyword:h,it:p}=o;y(l),p.opts.unevaluated&&i.length&&p.items!==!0&&(p.items=t.mergeEvaluated.items(c,i.length,p.items));const v=c.name("valid"),w=c.const("len",(0,e._)`${u}.length`);i.forEach((m,_)=>{(0,t.alwaysValidSchema)(p,m)||(c.if((0,e._)`${w} > ${_}`,()=>o.subschema({keyword:h,schemaProp:_,dataProp:_},v)),o.ok(v))});function y(m){const{opts:_,errSchemaPath:f}=p,b=i.length,x=b===m.minItems&&(b===m.maxItems||m[a]===!1);if(_.strictTuples&&!x){const g=`"${h}" is ${b}-tuple, but minItems or maxItems/${a} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(p,g,_.strictTuples)}}}return zr.validateTuple=s,zr.default=n,zr}var Sf;function O0(){if(Sf)return qs;Sf=1,Object.defineProperty(qs,"__esModule",{value:!0});const e=$f(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return qs.default=t,qs}var Us={},Ef;function I0(){if(Ef)return Us;Ef=1,Object.defineProperty(Us,"__esModule",{value:!0});const e=ye(),t=Re(),r=bt(),n=xf(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{schema:i,parentSchema:c,it:l}=a,{prefixItems:u}=c;l.items=!0,!(0,t.alwaysValidSchema)(l,i)&&(u?(0,n.validateAdditionalItems)(a,u):a.ok((0,r.validateArray)(a)))}};return Us.default=o,Us}var Bs={},kf;function D0(){if(kf)return Bs;kf=1,Object.defineProperty(Bs,"__esModule",{value:!0});const e=ye(),t=Re(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:o}})=>o===void 0?(0,e.str)`must contain at least ${s} valid item(s)`:(0,e.str)`must contain at least ${s} and no more than ${o} valid item(s)`,params:({params:{min:s,max:o}})=>o===void 0?(0,e._)`{minContains: ${s}}`:(0,e._)`{minContains: ${s}, maxContains: ${o}}`},code(s){const{gen:o,schema:a,parentSchema:i,data:c,it:l}=s;let u,h;const{minContains:p,maxContains:v}=i;l.opts.next?(u=p===void 0?1:p,h=v):u=1;const w=o.const("len",(0,e._)`${c}.length`);if(s.setParams({min:u,max:h}),h===void 0&&u===0){(0,t.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(h!==void 0&&u>h){(0,t.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,t.alwaysValidSchema)(l,a)){let b=(0,e._)`${w} >= ${u}`;h!==void 0&&(b=(0,e._)`${b} && ${w} <= ${h}`),s.pass(b);return}l.items=!0;const y=o.name("valid");h===void 0&&u===1?_(y,()=>o.if(y,()=>o.break())):u===0?(o.let(y,!0),h!==void 0&&o.if((0,e._)`${c}.length > 0`,m)):(o.let(y,!1),m()),s.result(y,()=>s.reset());function m(){const b=o.name("_valid"),x=o.let("count",0);_(b,()=>o.if(b,()=>f(x)))}function _(b,x){o.forRange("i",0,w,g=>{s.subschema({keyword:"contains",dataProp:g,dataPropType:t.Type.Num,compositeRule:!0},b),x()})}function f(b){o.code((0,e._)`${b}++`),h===void 0?o.if((0,e._)`${b} >= ${u}`,()=>o.assign(y,!0).break()):(o.if((0,e._)`${b} > ${h}`,()=>o.assign(y,!1).break()),u===1?o.assign(y,!0):o.if((0,e._)`${b} >= ${u}`,()=>o.assign(y,!0)))}}};return Bs.default=n,Bs}var ri={},Cf;function ni(){return Cf||(Cf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ye(),r=Re(),n=bt();e.error={message:({params:{property:c,depsCount:l,deps:u}})=>{const h=l===1?"property":"properties";return(0,t.str)`must have ${h} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:l,deps:u,missingProperty:h}})=>(0,t._)`{property: ${c},
|
|
142
|
+
missingProperty: ${h},
|
|
143
143
|
depsCount: ${l},
|
|
144
|
-
deps: ${u}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[l,u]=o(c);a(c,l),i(c,u)}};function o({schema:c}){const l={},u={};for(const p in c){if(p==="__proto__")continue;const h=Array.isArray(c[p])?l:u;h[p]=c[p]}return[l,u]}function a(c,l=c.schema){const{gen:u,data:p,it:h}=c;if(Object.keys(l).length===0)return;const v=u.let("missing");for(const x in l){const y=l[x];if(y.length===0)continue;const m=(0,n.propertyInData)(u,p,x,h.opts.ownProperties);c.setParams({property:x,depsCount:y.length,deps:y.join(", ")}),h.allErrors?u.if(m,()=>{for(const _ of y)(0,n.checkReportMissingProp)(c,_)}):(u.if((0,t._)`${m} && (${(0,n.checkMissingProp)(c,y,v)})`),(0,n.reportMissingProp)(c,v),u.else())}}e.validatePropertyDeps=a;function i(c,l=c.schema){const{gen:u,data:p,keyword:h,it:v}=c,x=u.name("valid");for(const y in l)(0,r.alwaysValidSchema)(v,l[y])||(u.if((0,n.propertyInData)(u,p,y,v.opts.ownProperties),()=>{const m=c.subschema({keyword:h,schemaProp:y},x);c.mergeValidEvaluated(m,x)},()=>u.var(x,!0)),c.ok(x))}e.validateSchemaDeps=i,e.default=s})(ri)),ri}var Ws={},jf;function M0(){if(jf)return Ws;jf=1,Object.defineProperty(Ws,"__esModule",{value:!0});const e=ye(),t=Re(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>(0,e._)`{propertyName: ${s.propertyName}}`},code(s){const{gen:o,schema:a,data:i,it:c}=s;if((0,t.alwaysValidSchema)(c,a))return;const l=o.name("valid");o.forIn("key",i,u=>{s.setParams({propertyName:u}),s.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},l),o.if((0,e.not)(l),()=>{s.error(!0),c.allErrors||o.break()})}),s.ok(l)}};return Ws.default=n,Ws}var Hs={},Nf;function Rf(){if(Nf)return Hs;Nf=1,Object.defineProperty(Hs,"__esModule",{value:!0});const e=bt(),t=ye(),r=vt(),n=Re(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,t._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:i,schema:c,parentSchema:l,data:u,errsCount:p,it:h}=a;if(!p)throw new Error("ajv implementation error");const{allErrors:v,opts:x}=h;if(h.props=!0,x.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(h,c))return;const y=(0,e.allSchemaProperties)(l.properties),m=(0,e.allSchemaProperties)(l.patternProperties);_(),a.ok((0,t._)`${p} === ${r.default.errors}`);function _(){i.forIn("key",u,$=>{!y.length&&!m.length?w($):i.if(f($),()=>w($))})}function f($){let E;if(y.length>8){const j=(0,n.schemaRefOrVal)(h,l.properties,"properties");E=(0,e.isOwnProperty)(i,j,$)}else y.length?E=(0,t.or)(...y.map(j=>(0,t._)`${$} === ${j}`)):E=t.nil;return m.length&&(E=(0,t.or)(E,...m.map(j=>(0,t._)`${(0,e.usePattern)(a,j)}.test(${$})`))),(0,t.not)(E)}function b($){i.code((0,t._)`delete ${u}[${$}]`)}function w($){if(x.removeAdditional==="all"||x.removeAdditional&&c===!1){b($);return}if(c===!1){a.setParams({additionalProperty:$}),a.error(),v||i.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(h,c)){const E=i.name("valid");x.removeAdditional==="failing"?(g($,E,!1),i.if((0,t.not)(E),()=>{a.reset(),b($)})):(g($,E),v||i.if((0,t.not)(E),()=>i.break()))}}function g($,E,j){const O={keyword:"additionalProperties",dataProp:$,dataPropType:n.Type.Str};j===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(O,E)}}};return Hs.default=o,Hs}var Gs={},Af;function V0(){if(Af)return Gs;Af=1,Object.defineProperty(Gs,"__esModule",{value:!0});const e=hn(),t=bt(),r=Re(),n=Rf(),s={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:a,schema:i,parentSchema:c,data:l,it:u}=o;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(u,n.default,"additionalProperties"));const p=(0,t.allSchemaProperties)(i);for(const m of p)u.definedProperties.add(m);u.opts.unevaluated&&p.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(a,(0,r.toHash)(p),u.props));const h=p.filter(m=>!(0,r.alwaysValidSchema)(u,i[m]));if(h.length===0)return;const v=a.name("valid");for(const m of h)x(m)?y(m):(a.if((0,t.propertyInData)(a,l,m,u.opts.ownProperties)),y(m),u.allErrors||a.else().var(v,!0),a.endIf()),o.it.definedProperties.add(m),o.ok(v);function x(m){return u.opts.useDefaults&&!u.compositeRule&&i[m].default!==void 0}function y(m){o.subschema({keyword:"properties",schemaProp:m,dataProp:m},v)}}};return Gs.default=s,Gs}var Zs={},Pf;function F0(){if(Pf)return Zs;Pf=1,Object.defineProperty(Zs,"__esModule",{value:!0});const e=bt(),t=ye(),r=Re(),n=Re(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:a,schema:i,data:c,parentSchema:l,it:u}=o,{opts:p}=u,h=(0,e.allSchemaProperties)(i),v=h.filter(w=>(0,r.alwaysValidSchema)(u,i[w]));if(h.length===0||v.length===h.length&&(!u.opts.unevaluated||u.props===!0))return;const x=p.strictSchema&&!p.allowMatchingProperties&&l.properties,y=a.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,n.evaluatedPropsToName)(a,u.props));const{props:m}=u;_();function _(){for(const w of h)x&&f(w),u.allErrors?b(w):(a.var(y,!0),b(w),a.if(y))}function f(w){for(const g in x)new RegExp(w).test(g)&&(0,r.checkStrictMode)(u,`property ${g} matches pattern ${w} (use allowMatchingProperties)`)}function b(w){a.forIn("key",c,g=>{a.if((0,t._)`${(0,e.usePattern)(o,w)}.test(${g})`,()=>{const $=v.includes(w);$||o.subschema({keyword:"patternProperties",schemaProp:w,dataProp:g,dataPropType:n.Type.Str},y),u.opts.unevaluated&&m!==!0?a.assign((0,t._)`${m}[${g}]`,!0):!$&&!u.allErrors&&a.if((0,t.not)(y),()=>a.break())})})}}};return Zs.default=s,Zs}var Ks={},Tf;function L0(){if(Tf)return Ks;Tf=1,Object.defineProperty(Ks,"__esModule",{value:!0});const e=Re(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:s,it:o}=r;if((0,e.alwaysValidSchema)(o,s)){r.fail();return}const a=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Ks.default=t,Ks}var Ys={},Of;function z0(){if(Of)return Ys;Of=1,Object.defineProperty(Ys,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:bt().validateUnion,error:{message:"must match a schema in anyOf"}};return Ys.default=t,Ys}var Js={},If;function q0(){if(If)return Js;If=1,Object.defineProperty(Js,"__esModule",{value:!0});const e=ye(),t=Re(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>(0,e._)`{passingSchemas: ${s.passing}}`},code(s){const{gen:o,schema:a,parentSchema:i,it:c}=s;if(!Array.isArray(a))throw new Error("ajv implementation error");if(c.opts.discriminator&&i.discriminator)return;const l=a,u=o.let("valid",!1),p=o.let("passing",null),h=o.name("_valid");s.setParams({passing:p}),o.block(v),s.result(u,()=>s.reset(),()=>s.error(!0));function v(){l.forEach((x,y)=>{let m;(0,t.alwaysValidSchema)(c,x)?o.var(h,!0):m=s.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},h),y>0&&o.if((0,e._)`${h} && ${u}`).assign(u,!1).assign(p,(0,e._)`[${p}, ${y}]`).else(),o.if(h,()=>{o.assign(u,!0),o.assign(p,y),m&&s.mergeEvaluated(m,e.Name)})})}}};return Js.default=n,Js}var Xs={},Df;function U0(){if(Df)return Xs;Df=1,Object.defineProperty(Xs,"__esModule",{value:!0});const e=Re(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:s,it:o}=r;if(!Array.isArray(s))throw new Error("ajv implementation error");const a=n.name("valid");s.forEach((i,c)=>{if((0,e.alwaysValidSchema)(o,i))return;const l=r.subschema({keyword:"allOf",schemaProp:c},a);r.ok(a),r.mergeEvaluated(l)})}};return Xs.default=t,Xs}var Qs={},Mf;function B0(){if(Mf)return Qs;Mf=1,Object.defineProperty(Qs,"__esModule",{value:!0});const e=ye(),t=Re(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:a,parentSchema:i,it:c}=o;i.then===void 0&&i.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const l=s(c,"then"),u=s(c,"else");if(!l&&!u)return;const p=a.let("valid",!0),h=a.name("_valid");if(v(),o.reset(),l&&u){const y=a.let("ifClause");o.setParams({ifClause:y}),a.if(h,x("then",y),x("else",y))}else l?a.if(h,x("then")):a.if((0,e.not)(h),x("else"));o.pass(p,()=>o.error(!0));function v(){const y=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},h);o.mergeEvaluated(y)}function x(y,m){return()=>{const _=o.subschema({keyword:y},h);a.assign(p,h),o.mergeValidEvaluated(_,p),m?a.assign(m,(0,e._)`${y}`):o.setParams({ifClause:y})}}}};function s(o,a){const i=o.schema[a];return i!==void 0&&!(0,t.alwaysValidSchema)(o,i)}return Qs.default=n,Qs}var eo={},Vf;function W0(){if(Vf)return eo;Vf=1,Object.defineProperty(eo,"__esModule",{value:!0});const e=Re(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:s}){n.if===void 0&&(0,e.checkStrictMode)(s,`"${r}" without "if" is ignored`)}};return eo.default=t,eo}var Ff;function Lf(){if(Ff)return zs;Ff=1,Object.defineProperty(zs,"__esModule",{value:!0});const e=xf(),t=O0(),r=$f(),n=I0(),s=D0(),o=ni(),a=M0(),i=Rf(),c=V0(),l=F0(),u=L0(),p=z0(),h=q0(),v=U0(),x=B0(),y=W0();function m(_=!1){const f=[u.default,p.default,h.default,v.default,x.default,y.default,a.default,i.default,o.default,c.default,l.default];return _?f.push(t.default,n.default):f.push(e.default,r.default),f.push(s.default),f}return zs.default=m,zs}var to={},qr={},zf;function qf(){if(zf)return qr;zf=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.dynamicAnchor=void 0;const e=ye(),t=vt(),r=$s(),n=ei(),s={keyword:"$dynamicAnchor",schemaType:"string",code:i=>o(i,i.schema)};function o(i,c){const{gen:l,it:u}=i;u.schemaEnv.root.dynamicAnchors[c]=!0;const p=(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(c)}`,h=u.errSchemaPath==="#"?u.validateName:a(i);l.if((0,e._)`!${p}`,()=>l.assign(p,h))}qr.dynamicAnchor=o;function a(i){const{schemaEnv:c,schema:l,self:u}=i.it,{root:p,baseId:h,localRefs:v,meta:x}=c.root,{schemaId:y}=u.opts,m=new r.SchemaEnv({schema:l,schemaId:y,root:p,baseId:h,localRefs:v,meta:x});return r.compileSchema.call(u,m),(0,n.getValidate)(i,m)}return qr.default=s,qr}var Ur={},Uf;function Bf(){if(Uf)return Ur;Uf=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.dynamicRef=void 0;const e=ye(),t=vt(),r=ei(),n={keyword:"$dynamicRef",schemaType:"string",code:o=>s(o,o.schema)};function s(o,a){const{gen:i,keyword:c,it:l}=o;if(a[0]!=="#")throw new Error(`"${c}" only supports hash fragment reference`);const u=a.slice(1);if(l.allErrors)p();else{const v=i.let("valid",!1);p(v),o.ok(v)}function p(v){if(l.schemaEnv.root.dynamicAnchors[u]){const x=i.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(u)}`);i.if(x,h(x,v),h(l.validateName,v))}else h(l.validateName,v)()}function h(v,x){return x?()=>i.block(()=>{(0,r.callRef)(o,v),i.let(x,!0)}):()=>(0,r.callRef)(o,v)}}return Ur.dynamicRef=s,Ur.default=n,Ur}var ro={},Wf;function H0(){if(Wf)return ro;Wf=1,Object.defineProperty(ro,"__esModule",{value:!0});const e=qf(),t=Re(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,e.dynamicAnchor)(n,""):(0,t.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return ro.default=r,ro}var no={},Hf;function G0(){if(Hf)return no;Hf=1,Object.defineProperty(no,"__esModule",{value:!0});const e=Bf(),t={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,e.dynamicRef)(r,r.schema)};return no.default=t,no}var Gf;function Z0(){if(Gf)return to;Gf=1,Object.defineProperty(to,"__esModule",{value:!0});const e=qf(),t=Bf(),r=H0(),n=G0(),s=[e.default,t.default,r.default,n.default];return to.default=s,to}var so={},oo={},Zf;function K0(){if(Zf)return oo;Zf=1,Object.defineProperty(oo,"__esModule",{value:!0});const e=ni(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:r=>(0,e.validatePropertyDeps)(r)};return oo.default=t,oo}var ao={},Kf;function Y0(){if(Kf)return ao;Kf=1,Object.defineProperty(ao,"__esModule",{value:!0});const e=ni(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,e.validateSchemaDeps)(r)};return ao.default=t,ao}var io={},Yf;function J0(){if(Yf)return io;Yf=1,Object.defineProperty(io,"__esModule",{value:!0});const e=Re(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:s}){n.contains===void 0&&(0,e.checkStrictMode)(s,`"${r}" without "contains" is ignored`)}};return io.default=t,io}var Jf;function X0(){if(Jf)return so;Jf=1,Object.defineProperty(so,"__esModule",{value:!0});const e=K0(),t=Y0(),r=J0(),n=[e.default,t.default,r.default];return so.default=n,so}var co={},lo={},Xf;function Q0(){if(Xf)return lo;Xf=1,Object.defineProperty(lo,"__esModule",{value:!0});const e=ye(),t=Re(),r=vt(),s={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,e._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){const{gen:a,schema:i,data:c,errsCount:l,it:u}=o;if(!l)throw new Error("ajv implementation error");const{allErrors:p,props:h}=u;h instanceof e.Name?a.if((0,e._)`${h} !== true`,()=>a.forIn("key",c,m=>a.if(x(h,m),()=>v(m)))):h!==!0&&a.forIn("key",c,m=>h===void 0?v(m):a.if(y(h,m),()=>v(m))),u.props=!0,o.ok((0,e._)`${l} === ${r.default.errors}`);function v(m){if(i===!1){o.setParams({unevaluatedProperty:m}),o.error(),p||a.break();return}if(!(0,t.alwaysValidSchema)(u,i)){const _=a.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:m,dataPropType:t.Type.Str},_),p||a.if((0,e.not)(_),()=>a.break())}}function x(m,_){return(0,e._)`!${m} || !${m}[${_}]`}function y(m,_){const f=[];for(const b in m)m[b]===!0&&f.push((0,e._)`${_} !== ${b}`);return(0,e.and)(...f)}}};return lo.default=s,lo}var uo={},Qf;function ex(){if(Qf)return uo;Qf=1,Object.defineProperty(uo,"__esModule",{value:!0});const e=ye(),t=Re(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{gen:o,schema:a,data:i,it:c}=s,l=c.items||0;if(l===!0)return;const u=o.const("len",(0,e._)`${i}.length`);if(a===!1)s.setParams({len:l}),s.fail((0,e._)`${u} > ${l}`);else if(typeof a=="object"&&!(0,t.alwaysValidSchema)(c,a)){const h=o.var("valid",(0,e._)`${u} <= ${l}`);o.if((0,e.not)(h),()=>p(h,l)),s.ok(h)}c.items=!0;function p(h,v){o.forRange("i",v,u,x=>{s.subschema({keyword:"unevaluatedItems",dataProp:x,dataPropType:t.Type.Num},h),c.allErrors||o.if((0,e.not)(h),()=>o.break())})}}};return uo.default=n,uo}var em;function tx(){if(em)return co;em=1,Object.defineProperty(co,"__esModule",{value:!0});const e=Q0(),t=ex(),r=[e.default,t.default];return co.default=r,co}var fo={},mo={},tm;function rx(){if(tm)return mo;tm=1,Object.defineProperty(mo,"__esModule",{value:!0});const e=ye(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,s){const{gen:o,data:a,$data:i,schema:c,schemaCode:l,it:u}=n,{opts:p,errSchemaPath:h,schemaEnv:v,self:x}=u;if(!p.validateFormats)return;i?y():m();function y(){const _=o.scopeValue("formats",{ref:x.formats,code:p.code.formats}),f=o.const("fDef",(0,e._)`${_}[${l}]`),b=o.let("fType"),w=o.let("format");o.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>o.assign(b,(0,e._)`${f}.type || "string"`).assign(w,(0,e._)`${f}.validate`),()=>o.assign(b,(0,e._)`"string"`).assign(w,f)),n.fail$data((0,e.or)(g(),$()));function g(){return p.strictSchema===!1?e.nil:(0,e._)`${l} && !${w}`}function $(){const E=v.$async?(0,e._)`(${f}.async ? await ${w}(${a}) : ${w}(${a}))`:(0,e._)`${w}(${a})`,j=(0,e._)`(typeof ${w} == "function" ? ${E} : ${w}.test(${a}))`;return(0,e._)`${w} && ${w} !== true && ${b} === ${s} && !${j}`}}function m(){const _=x.formats[c];if(!_){g();return}if(_===!0)return;const[f,b,w]=$(_);f===s&&n.pass(E());function g(){if(p.strictSchema===!1){x.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${c}" ignored in schema at path "${h}"`}}function $(j){const O=j instanceof RegExp?(0,e.regexpCode)(j):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(c)}`:void 0,z=o.scopeValue("formats",{key:c,ref:j,code:O});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,e._)`${z}.validate`]:["string",j,z]}function E(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${w}(${a})`}return typeof b=="function"?(0,e._)`${w}(${a})`:(0,e._)`${w}.test(${a})`}}}};return mo.default=r,mo}var rm;function nm(){if(rm)return fo;rm=1,Object.defineProperty(fo,"__esModule",{value:!0});const t=[rx().default];return fo.default=t,fo}var pr={},sm;function om(){return sm||(sm=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.contentVocabulary=pr.metadataVocabulary=void 0,pr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],pr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),pr}var am;function nx(){if(am)return Es;am=1,Object.defineProperty(Es,"__esModule",{value:!0});const e=sf(),t=bf(),r=Lf(),n=Z0(),s=X0(),o=tx(),a=nm(),i=om(),c=[n.default,e.default,t.default,(0,r.default)(!0),a.default,i.metadataVocabulary,i.contentVocabulary,s.default,o.default];return Es.default=c,Es}var ho={},vn={},im;function sx(){if(im)return vn;im=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(vn.DiscrError=e={})),vn}var cm;function lm(){if(cm)return ho;cm=1,Object.defineProperty(ho,"__esModule",{value:!0});const e=ye(),t=sx(),r=$s(),n=pn(),s=Re(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:i,tagName:c}})=>i===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:i,tag:c,tagName:l}})=>(0,e._)`{error: ${i}, tag: ${l}, tagValue: ${c}}`},code(i){const{gen:c,data:l,schema:u,parentSchema:p,it:h}=i,{oneOf:v}=p;if(!h.opts.discriminator)throw new Error("discriminator: requires discriminator option");const x=u.propertyName;if(typeof x!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const y=c.let("valid",!1),m=c.const("tag",(0,e._)`${l}${(0,e.getProperty)(x)}`);c.if((0,e._)`typeof ${m} == "string"`,()=>_(),()=>i.error(!1,{discrError:t.DiscrError.Tag,tag:m,tagName:x})),i.ok(y);function _(){const w=b();c.if(!1);for(const g in w)c.elseIf((0,e._)`${m} === ${g}`),c.assign(y,f(w[g]));c.else(),i.error(!1,{discrError:t.DiscrError.Mapping,tag:m,tagName:x}),c.endIf()}function f(w){const g=c.name("valid"),$=i.subschema({keyword:"oneOf",schemaProp:w},g);return i.mergeEvaluated($,e.Name),g}function b(){var w;const g={},$=j(p);let E=!0;for(let D=0;D<v.length;D++){let V=v[D];if(V!=null&&V.$ref&&!(0,s.schemaHasRulesButRef)(V,h.self.RULES)){const W=V.$ref;if(V=r.resolveRef.call(h.self,h.schemaEnv.root,h.baseId,W),V instanceof r.SchemaEnv&&(V=V.schema),V===void 0)throw new n.default(h.opts.uriResolver,h.baseId,W)}const U=(w=V==null?void 0:V.properties)===null||w===void 0?void 0:w[x];if(typeof U!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${x}"`);E=E&&($||j(V)),O(U,D)}if(!E)throw new Error(`discriminator: "${x}" must be required`);return g;function j({required:D}){return Array.isArray(D)&&D.includes(x)}function O(D,V){if(D.const)z(D.const,V);else if(D.enum)for(const U of D.enum)z(U,V);else throw new Error(`discriminator: "properties/${x}" must have "const" or "enum"`)}function z(D,V){if(typeof D!="string"||D in g)throw new Error(`discriminator: "${x}" values must be unique strings`);g[D]=V}}}};return ho.default=a,ho}var po={};const ox={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}},ax={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}},ix={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}},cx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}},lx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}},ux={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}},dx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},fx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};var um;function mx(){if(um)return po;um=1,Object.defineProperty(po,"__esModule",{value:!0});const e=ox,t=ax,r=ix,n=cx,s=lx,o=ux,a=dx,i=fx,c=["/properties"];function l(u){return[e,t,r,n,s,p(this,o),a,p(this,i)].forEach(h=>this.addMetaSchema(h,void 0,!1)),this;function p(h,v){return u?h.$dataMetaSchema(v,c):v}}return po.default=l,po}var dm;function hx(){return dm||(dm=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const r=ef(),n=nx(),s=lm(),o=mx(),a="https://json-schema.org/draft/2020-12/schema";class i extends r.default{constructor(v={}){super({...v,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(v=>this.addVocabulary(v)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:v,meta:x}=this.opts;x&&(o.default.call(this,v),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv2020=i,e.exports=t=i,e.exports.Ajv2020=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var c=hn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=ye();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var u=xs();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var p=pn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})(hs,hs.exports)),hs.exports}var px=hx();const gx=ji(px);var go={exports:{}},si={},fm;function vx(){return fm||(fm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(D,V){return{validate:D,compare:V}}e.fullFormats={date:t(o,a),time:t(c(!0),l),"date-time":t(h(!0),v),"iso-time":t(c(),u),"iso-date-time":t(h(),x),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:z,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:b,int32:{type:"number",validate:$},int64:{type:"number",validate:E},float:{type:"number",validate:j},double:{type:"number",validate:j},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,x),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(D){return D%4===0&&(D%100!==0||D%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(D){const V=n.exec(D);if(!V)return!1;const U=+V[1],W=+V[2],ee=+V[3];return W>=1&&W<=12&&ee>=1&&ee<=(W===2&&r(U)?29:s[W])}function a(D,V){if(D&&V)return D>V?1:D<V?-1:0}const i=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(D){return function(U){const W=i.exec(U);if(!W)return!1;const ee=+W[1],K=+W[2],se=+W[3],L=W[4],he=W[5]==="-"?-1:1,H=+(W[6]||0),C=+(W[7]||0);if(H>23||C>59||D&&!L)return!1;if(ee<=23&&K<=59&&se<60)return!0;const M=K-C*he,P=ee-H*he-(M<0?1:0);return(P===23||P===-1)&&(M===59||M===-1)&&se<61}}function l(D,V){if(!(D&&V))return;const U=new Date("2020-01-01T"+D).valueOf(),W=new Date("2020-01-01T"+V).valueOf();if(U&&W)return U-W}function u(D,V){if(!(D&&V))return;const U=i.exec(D),W=i.exec(V);if(U&&W)return D=U[1]+U[2]+U[3],V=W[1]+W[2]+W[3],D>V?1:D<V?-1:0}const p=/t|\s/i;function h(D){const V=c(D);return function(W){const ee=W.split(p);return ee.length===2&&o(ee[0])&&V(ee[1])}}function v(D,V){if(!(D&&V))return;const U=new Date(D).valueOf(),W=new Date(V).valueOf();if(U&&W)return U-W}function x(D,V){if(!(D&&V))return;const[U,W]=D.split(p),[ee,K]=V.split(p),se=a(U,ee);if(se!==void 0)return se||l(W,K)}const y=/\/|:/,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function _(D){return y.test(D)&&m.test(D)}const f=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function b(D){return f.lastIndex=0,f.test(D)}const w=-2147483648,g=2**31-1;function $(D){return Number.isInteger(D)&&D<=g&&D>=w}function E(D){return Number.isInteger(D)}function j(){return!0}const O=/[^\\]\\Z/;function z(D){if(O.test(D))return!1;try{return new RegExp(D),!0}catch{return!1}}})(si)),si}var oi={},vo={exports:{}},yo={},mm;function yx(){if(mm)return yo;mm=1,Object.defineProperty(yo,"__esModule",{value:!0});const e=sf(),t=bf(),r=Lf(),n=nm(),s=om(),o=[e.default,t.default,(0,r.default)(),n.default,s.metadataVocabulary,s.contentVocabulary];return yo.default=o,yo}const bx={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var hm;function _x(){return hm||(hm=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=ef(),n=yx(),s=lm(),o=bx,a=["/properties"],i="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(x=>this.addVocabulary(x)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const x=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(x,i,!1),this.refs["http://json-schema.org/schema"]=i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=hn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=ye();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var p=xs();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var h=pn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return h.default}})})(vo,vo.exports)),vo.exports}var pm;function xx(){return pm||(pm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=_x(),r=ye(),n=r.operators,s={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},o={message:({keyword:i,schemaCode:c})=>(0,r.str)`should be ${s[i].okStr} ${c}`,params:({keyword:i,schemaCode:c})=>(0,r._)`{comparison: ${s[i].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:o,code(i){const{gen:c,data:l,schemaCode:u,keyword:p,it:h}=i,{opts:v,self:x}=h;if(!v.validateFormats)return;const y=new t.KeywordCxt(h,x.RULES.all.format.definition,"format");y.$data?m():_();function m(){const b=c.scopeValue("formats",{ref:x.formats,code:v.code.formats}),w=c.const("fmt",(0,r._)`${b}[${y.schemaCode}]`);i.fail$data((0,r.or)((0,r._)`typeof ${w} != "object"`,(0,r._)`${w} instanceof RegExp`,(0,r._)`typeof ${w}.compare != "function"`,f(w)))}function _(){const b=y.schema,w=x.formats[b];if(!w||w===!0)return;if(typeof w!="object"||w instanceof RegExp||typeof w.compare!="function")throw new Error(`"${p}": format "${b}" does not define "compare" function`);const g=c.scopeValue("formats",{key:b,ref:w,code:v.code.formats?(0,r._)`${v.code.formats}${(0,r.getProperty)(b)}`:void 0});i.fail$data(f(g))}function f(b){return(0,r._)`${b}.compare(${l}, ${u}) ${s[p].fail} 0`}},dependencies:["format"]};const a=i=>(i.addKeyword(e.formatLimitDefinition),i);e.default=a})(oi)),oi}var gm;function wx(){return gm||(gm=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=vx(),n=xx(),s=ye(),o=new s.Name("fullFormats"),a=new s.Name("fastFormats"),i=(l,u={keywords:!0})=>{if(Array.isArray(u))return c(l,u,r.fullFormats,o),l;const[p,h]=u.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,o],v=u.formats||r.formatNames;return c(l,v,p,h),u.keywords&&(0,n.default)(l),l};i.get=(l,u="full")=>{const h=(u==="fast"?r.fastFormats:r.fullFormats)[l];if(!h)throw new Error(`Unknown format "${l}"`);return h};function c(l,u,p,h){var v,x;(v=(x=l.opts.code).formats)!==null&&v!==void 0||(x.formats=(0,s._)`require("ajv-formats/dist/formats").${h}`);for(const y of u)l.addFormat(y,p[y])}e.exports=t=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i})(go,go.exports)),go.exports}var $x=wx();const Sx=ji($x),Ex="https://json-schema.org/draft/2020-12/schema",ai=new gx;Sx(ai);function vm(e){return ai.validate(Ex,e)?null:ai.errors||[]}function kx({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:_e("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var ii="rovingFocusGroup.onEntryFocus",Cx={bubbles:!1,cancelable:!0},yn="RovingFocusGroup",[ci,ym,jx]=nc(yn),[Nx,bm]=xt(yn,[jx]),[Rx,Ax]=Nx(yn),_m=S.forwardRef((e,t)=>d.jsx(ci.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(ci.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Px,{...e,ref:t})})}));_m.displayName=yn;var Px=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...p}=e,h=S.useRef(null),v=De(t,h),x=Zo(o),[y,m]=cr({prop:a,defaultProp:i??null,onChange:c,caller:yn}),[_,f]=S.useState(!1),b=Bt(l),w=ym(r),g=S.useRef(!1),[$,E]=S.useState(0);return S.useEffect(()=>{const j=h.current;if(j)return j.addEventListener(ii,b),()=>j.removeEventListener(ii,b)},[b]),d.jsx(Rx,{scope:r,orientation:n,dir:x,loop:s,currentTabStopId:y,onItemFocus:S.useCallback(j=>m(j),[m]),onItemShiftTab:S.useCallback(()=>f(!0),[]),onFocusableItemAdd:S.useCallback(()=>E(j=>j+1),[]),onFocusableItemRemove:S.useCallback(()=>E(j=>j-1),[]),children:d.jsx(je.div,{tabIndex:_||$===0?-1:0,"data-orientation":n,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:be(e.onMouseDown,()=>{g.current=!0}),onFocus:be(e.onFocus,j=>{const O=!g.current;if(j.target===j.currentTarget&&O&&!_){const z=new CustomEvent(ii,Cx);if(j.currentTarget.dispatchEvent(z),!z.defaultPrevented){const D=w().filter(K=>K.focusable),V=D.find(K=>K.active),U=D.find(K=>K.id===y),ee=[V,U,...D].filter(Boolean).map(K=>K.ref.current);$m(ee,u)}}g.current=!1}),onBlur:be(e.onBlur,()=>f(!1))})})}),xm="RovingFocusGroupItem",wm=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,children:a,...i}=e,c=Ht(),l=o||c,u=Ax(xm,r),p=u.currentTabStopId===l,h=ym(r),{onFocusableItemAdd:v,onFocusableItemRemove:x,currentTabStopId:y}=u;return S.useEffect(()=>{if(n)return v(),()=>x()},[n,v,x]),d.jsx(ci.ItemSlot,{scope:r,id:l,focusable:n,active:s,children:d.jsx(je.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:be(e.onMouseDown,m=>{n?u.onItemFocus(l):m.preventDefault()}),onFocus:be(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:be(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){u.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const _=Ix(m,u.orientation,u.dir);if(_!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let b=h().filter(w=>w.focusable).map(w=>w.ref.current);if(_==="last")b.reverse();else if(_==="prev"||_==="next"){_==="prev"&&b.reverse();const w=b.indexOf(m.currentTarget);b=u.loop?Dx(b,w+1):b.slice(w+1)}setTimeout(()=>$m(b))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:y!=null}):a})})});wm.displayName=xm;var Tx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ox(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ix(e,t,r){const n=Ox(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Tx[n]}function $m(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Dx(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Mx=_m,Vx=wm,li="Radio",[Fx,Sm]=xt(li),[Lx,zx]=Fx(li),Em=S.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:o,disabled:a,value:i="on",onCheck:c,form:l,...u}=e,[p,h]=S.useState(null),v=De(t,m=>h(m)),x=S.useRef(!1),y=p?l||!!p.closest("form"):!0;return d.jsxs(Lx,{scope:r,checked:s,disabled:a,children:[d.jsx(je.button,{type:"button",role:"radio","aria-checked":s,"data-state":Nm(s),"data-disabled":a?"":void 0,disabled:a,value:i,...u,ref:v,onClick:be(e.onClick,m=>{s||c==null||c(),y&&(x.current=m.isPropagationStopped(),x.current||m.stopPropagation())})}),y&&d.jsx(jm,{control:p,bubbles:!x.current,name:n,value:i,checked:s,required:o,disabled:a,form:l,style:{transform:"translateX(-100%)"}})]})});Em.displayName=li;var km="RadioIndicator",Cm=S.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...s}=e,o=zx(km,r);return d.jsx(Qt,{present:n||o.checked,children:d.jsx(je.span,{"data-state":Nm(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});Cm.displayName=km;var qx="RadioBubbleInput",jm=S.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...s},o)=>{const a=S.useRef(null),i=De(a,o),c=ha(r),l=da(t);return S.useEffect(()=>{const u=a.current;if(!u)return;const p=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&v){const x=new Event("click",{bubbles:n});v.call(u,r),u.dispatchEvent(x)}},[c,r,n]),d.jsx(je.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...s.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});jm.displayName=qx;function Nm(e){return e?"checked":"unchecked"}var Ux=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],bo="RadioGroup",[Bx]=xt(bo,[bm,Sm]),Rm=bm(),Am=Sm(),[Wx,Hx]=Bx(bo),Pm=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:o,required:a=!1,disabled:i=!1,orientation:c,dir:l,loop:u=!0,onValueChange:p,...h}=e,v=Rm(r),x=Zo(l),[y,m]=cr({prop:o,defaultProp:s??null,onChange:p,caller:bo});return d.jsx(Wx,{scope:r,name:n,required:a,disabled:i,value:y,onValueChange:m,children:d.jsx(Mx,{asChild:!0,...v,orientation:c,dir:x,loop:u,children:d.jsx(je.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":i?"":void 0,dir:x,...h,ref:t})})})});Pm.displayName=bo;var Tm="RadioGroupItem",Om=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...s}=e,o=Hx(Tm,r),a=o.disabled||n,i=Rm(r),c=Am(r),l=S.useRef(null),u=De(t,l),p=o.value===s.value,h=S.useRef(!1);return S.useEffect(()=>{const v=y=>{Ux.includes(y.key)&&(h.current=!0)},x=()=>h.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",x)}},[]),d.jsx(Vx,{asChild:!0,...i,focusable:!a,active:p,children:d.jsx(Em,{disabled:a,required:o.required,checked:p,...c,...s,name:o.name,ref:u,onCheck:()=>o.onValueChange(s.value),onKeyDown:be(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:be(s.onFocus,()=>{var v;h.current&&((v=l.current)==null||v.click())})})})});Om.displayName=Tm;var Gx="RadioGroupIndicator",Im=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,s=Am(r);return d.jsx(Cm,{...s,...n,ref:t})});Im.displayName=Gx;var Zx=Pm,Kx=Om,Yx=Im;function Jx({className:e,...t}){return d.jsx(Zx,{"data-slot":"radio-group",className:_e("grid gap-3",e),...t})}function ui({className:e,...t}){return d.jsx(Kx,{"data-slot":"radio-group-item",className:_e("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(Yx,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(by,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}const Xx=({basePath:e,readOnly:t})=>{const{control:r,setValue:n,getValues:s}=Ze(),[o,a]=Z.useState(JSON.stringify(s(`${e}.additionalProperties`),null,2)),[i,c]=Z.useState(null);tn({control:r,name:`${e}.isModifiable`});const l=tn({control:r,name:`${e}.additionalProperties`});Z.useEffect(()=>{c(null),a(JSON.stringify(l,null,2))},[l]);let u;typeof l=="boolean"?u=l?"true":"false":typeof l=="object"&&l!==null?u="schema":u="true";const p=h=>{const v=`${e}.additionalProperties`;if(h==="true")n(v,!0);else if(h==="false")n(v,!1);else{const x={type:"string"};n(v,x),a(JSON.stringify(x,null,2))}};return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ne,{control:r,name:`${e}.minProperties`,render:({field:h})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Properties"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,value:h.value??"",onChange:v=>h.onChange(v.target.value===""?null:Number(v.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:r,name:`${e}.maxProperties`,render:({field:h})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Properties"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,value:h.value??"",onChange:v=>h.onChange(v.target.value===""?null:Number(v.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(we,{children:"Additional Properties"}),d.jsxs(Jx,{value:u,onValueChange:p,className:"flex space-x-4 pt-2",disabled:t,children:[d.jsxs(xe,{className:"flex items-center space-x-2",children:[d.jsx(ui,{value:"true",id:"ap-true"}),d.jsx(we,{htmlFor:"ap-true",className:"font-normal",children:"Allow (true)"})]}),d.jsxs(xe,{className:"flex items-center space-x-2",children:[d.jsx(ui,{value:"false",id:"ap-false"}),d.jsx(we,{htmlFor:"ap-false",className:"font-normal",children:"Disallow (false)"})]}),d.jsxs(xe,{className:"flex items-center space-x-2",children:[d.jsx(ui,{value:"schema",id:"ap-schema"}),d.jsx(we,{htmlFor:"ap-schema",className:"font-normal",children:"Specify Schema"})]})]}),d.jsx(Ce,{})]}),u==="schema"&&d.jsxs(xe,{children:[d.jsx(ke,{children:d.jsx(kx,{"data-testid":"schema-textarea",rows:6,disabled:t,className:"font-mono",value:o,onChange:h=>{const v=h.target.value;a(v);try{const x=JSON.parse(v),y=vm(x);if(y){const m=y.map(_=>`${_.instancePath} - ${_.message}`);c(m)}else n(`${e}.additionalProperties`,x)}catch{c(["Invalid schema structure."])}}})}),i&&i.length>0&&d.jsx("div",{className:"mt-2 text-sm font-medium text-destructive",children:i.map((h,v)=>d.jsx("p",{children:h},v))})]}),d.jsx(Ne,{control:r,name:`${e}."x-modifiable"`,render:({field:h})=>d.jsxs(xe,{className:"mt-2",children:[d.jsx(we,{children:"Modifiable Properties"}),d.jsx(ke,{children:d.jsx(fn,{disabled:t,value:h.value||[],onValueChange:h.onChange,placeholder:"Enter your modifiable properties"})}),d.jsx(Ce,{})]})})]})},Qx=({basePath:e,readOnly:t})=>{const{control:r}=Ze();return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(Ne,{control:r,name:`${e}["$schema"]`,render:({field:n})=>d.jsxs(xe,{children:[d.jsx(we,{children:"$schema"}),d.jsx(ke,{children:d.jsx(Te,{placeholder:"e.g., http://json-schema.org/draft/2020-12/schema",disabled:t,...n,value:n.value??"http://json-schema.org/draft/2020-12/schema"})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:r,name:`${e}["$id"]`,render:({field:n})=>d.jsxs(xe,{children:[d.jsx(we,{children:"$id"}),d.jsx(ke,{children:d.jsx(Te,{disabled:t,...n,value:n.value??""})}),d.jsx(Ce,{})]})})]})};var ew=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tw=ew.reduce((e,t)=>{const r=Aa(`Primitive.${t}`),n=S.forwardRef((s,o)=>{const{asChild:a,...i}=s,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),rw="Separator",Dm="horizontal",nw=["horizontal","vertical"],Mm=S.forwardRef((e,t)=>{const{decorative:r,orientation:n=Dm,...s}=e,o=sw(n)?n:Dm,i=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return d.jsx(tw.div,{"data-orientation":o,...i,...s,ref:t})});Mm.displayName=rw;function sw(e){return nw.includes(e)}var ow=Mm;function aw({className:e,orientation:t="horizontal",decorative:r=!0,...n}){return d.jsx(ow,{"data-slot":"separator",decorative:r,orientation:t,className:_e("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n})}const iw=({theme:e,basePath:t,readOnly:r})=>{const{watch:n}=Ze(),s=n(`${t}.type`),o=()=>{switch(s){case"number":return d.jsx(c0,{theme:e,basePath:t,readOnly:r});case"integer":return d.jsx(f0,{theme:e,basePath:t,readOnly:r});case"string":return d.jsx(l0,{theme:e,basePath:t,readOnly:r});case"boolean":return d.jsx(u0,{theme:e,basePath:t,readOnly:r});case"array":return d.jsx(d0,{theme:e,basePath:t,readOnly:r});case"object":return d.jsx(Xx,{theme:e,basePath:t,readOnly:r});default:return d.jsx(d.Fragment,{children:`Settings for type ${s} are not yet implemented.`})}};return d.jsxs("div",{children:[t==="root"&&d.jsxs(d.Fragment,{children:[d.jsx(Qx,{theme:e,basePath:t,readOnly:r}),d.jsx(aw,{className:"my-4"})]}),o()]})};function cw({...e}){return d.jsx(Gu,{"data-slot":"dialog",...e})}function lw({...e}){return d.jsx(Zu,{"data-slot":"dialog-portal",...e})}function uw({className:e,...t}){return d.jsx(Ku,{"data-slot":"dialog-overlay",className:_e("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function dw({className:e,children:t,showCloseButton:r=!0,...n}){return d.jsxs(lw,{"data-slot":"dialog-portal",children:[d.jsx(uw,{}),d.jsxs(Yu,{"data-slot":"dialog-content",className:_e("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,r&&d.jsxs(qa,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[d.jsx(Hl,{}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function fw({className:e,...t}){return d.jsx("div",{"data-slot":"dialog-header",className:_e("flex flex-col gap-2 text-center sm:text-left",e),...t})}function mw({className:e,...t}){return d.jsx(Ju,{"data-slot":"dialog-title",className:_e("text-lg leading-none font-semibold",e),...t})}const hw=({theme:e,readOnly:t,className:r,isOpen:n,fieldPath:s,onClose:o})=>{const{getValues:a}=Ze(),i=s?a(s):null;return d.jsx(cw,{open:n,onOpenChange:c=>!c&&o(),children:d.jsxs(dw,{className:_e("bg-background text-foreground border-input",e,r),children:[d.jsx(fw,{children:d.jsxs(mw,{className:"capitalize",children:[i==null?void 0:i.type," Schema Settings"]})}),s&&d.jsx(iw,{basePath:s,theme:e,readOnly:t}),d.jsx(Xt,{onClick:o,variant:"default",children:"Close"})]})})},Vm=(e,t,r)=>{if(e&&"reportValidity"in e){const n=te(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},di=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Vm(n.ref,r,e):n&&n.refs&&n.refs.forEach(s=>Vm(s,r,e))}},Fm=(e,t)=>{t.shouldUseNativeValidation&&di(e,t);const r={};for(const n in e){const s=te(t.fields,n),o=Object.assign(e[n]||{},{ref:s&&s.ref});if(pw(t.names||Object.keys(e),n)){const a=Object.assign({},te(r,n));Ie(a,"root",o),Ie(r,n,a)}else Ie(r,n,o)}return r},pw=(e,t)=>{const r=Lm(t);return e.some(n=>Lm(n).match(`^${r}\\.\\d+`))};function Lm(e){return e.replace(/\]|\[/g,"")}function zm(e,t,r){function n(i,c){var l;Object.defineProperty(i,"_zod",{value:i._zod??{},enumerable:!1}),(l=i._zod).traits??(l.traits=new Set),i._zod.traits.add(e),t(i,c);for(const u in a.prototype)u in i||Object.defineProperty(i,u,{value:a.prototype[u].bind(i)});i._zod.constr=a,i._zod.def=c}const s=(r==null?void 0:r.Parent)??Object;class o extends s{}Object.defineProperty(o,"name",{value:e});function a(i){var c;const l=r!=null&&r.Parent?new o:this;n(l,i),(c=l._zod).deferred??(c.deferred=[]);for(const u of l._zod.deferred)u();return l}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:i=>{var c,l;return r!=null&&r.Parent&&i instanceof r.Parent?!0:(l=(c=i==null?void 0:i._zod)==null?void 0:c.traits)==null?void 0:l.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}class gw extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const vw={};function qm(e){return vw}function yw(e,t){return typeof t=="bigint"?t.toString():t}const Um=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function _o(e){return typeof e=="string"?e:e==null?void 0:e.message}function Bm(e,t,r){var s,o,a,i,c,l;const n={...e,path:e.path??[]};if(!e.message){const u=_o((a=(o=(s=e.inst)==null?void 0:s._zod.def)==null?void 0:o.error)==null?void 0:a.call(o,e))??_o((i=t==null?void 0:t.error)==null?void 0:i.call(t,e))??_o((c=r.customError)==null?void 0:c.call(r,e))??_o((l=r.localeError)==null?void 0:l.call(r,e))??"Invalid input";n.message=u}return delete n.inst,delete n.continue,t!=null&&t.reportInput||delete n.input,n}const Wm=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,yw,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},bw=zm("$ZodError",Wm),Hm=zm("$ZodError",Wm,{Parent:Error}),_w=(e=>(t,r,n,s)=>{const o=n?Object.assign(n,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new gw;if(a.issues.length){const i=new((s==null?void 0:s.Err)??e)(a.issues.map(c=>Bm(c,o,qm())));throw Um(i,s==null?void 0:s.callee),i}return a.value})(Hm),xw=(e=>async(t,r,n,s)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const i=new((s==null?void 0:s.Err)??e)(a.issues.map(c=>Bm(c,o,qm())));throw Um(i,s==null?void 0:s.callee),i}return a.value})(Hm);function Gm(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function ww(e,t){for(var r={};e.length;){var n=e[0],s=n.code,o=n.message,a=n.path.join(".");if(!r[a])if("unionErrors"in n){var i=n.unionErrors[0].errors[0];r[a]={message:i.message,type:i.code}}else r[a]={message:o,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(u){return u.errors.forEach(function(p){return e.push(p)})}),t){var c=r[a].types,l=c&&c[n.code];r[a]=To(a,t,r,s,l?[].concat(l,n.message):n.message)}e.shift()}return r}function $w(e,t){for(var r={};e.length;){var n=e[0],s=n.code,o=n.message,a=n.path.join(".");if(!r[a])if(n.code==="invalid_union"&&n.errors.length>0){var i=n.errors[0][0];r[a]={message:i.message,type:i.code}}else r[a]={message:o,type:s};if(n.code==="invalid_union"&&n.errors.forEach(function(u){return u.forEach(function(p){return e.push(p)})}),t){var c=r[a].types,l=c&&c[n.code];r[a]=To(a,t,r,s,l?[].concat(l,n.message):n.message)}e.shift()}return r}function Sw(e,t,r){if(r===void 0&&(r={}),(function(n){return"_def"in n&&typeof n._def=="object"&&"typeName"in n._def})(e))return function(n,s,o){try{return Promise.resolve(Gm(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(a){return o.shouldUseNativeValidation&&di({},o),{errors:{},values:r.raw?Object.assign({},n):a}})},function(a){if((function(i){return Array.isArray(i==null?void 0:i.issues)})(a))return{values:{},errors:Fm(ww(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,s,o){try{return Promise.resolve(Gm(function(){return Promise.resolve((r.mode==="sync"?_w:xw)(e,n,t)).then(function(a){return o.shouldUseNativeValidation&&di({},o),{errors:{},values:r.raw?Object.assign({},n):a}})},function(a){if((function(i){return i instanceof bw})(a))return{values:{},errors:Fm($w(a.issues,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}var Oe;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const o={};for(const a of s)o[a]=a;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(i=>typeof s[s[i]]!="number"),a={};for(const i of o)a[i]=s[i];return e.objectValues(a)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&o.push(a);return o},e.find=(s,o)=>{for(const a of s)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Oe||(Oe={}));var Zm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Zm||(Zm={}));const ue=Oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),rr=e=>{switch(typeof e){case"undefined":return ue.undefined;case"string":return ue.string;case"number":return Number.isNaN(e)?ue.nan:ue.number;case"boolean":return ue.boolean;case"function":return ue.function;case"bigint":return ue.bigint;case"symbol":return ue.symbol;case"object":return Array.isArray(e)?ue.array:e===null?ue.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ue.promise:typeof Map<"u"&&e instanceof Map?ue.map:typeof Set<"u"&&e instanceof Set?ue.set:typeof Date<"u"&&e instanceof Date?ue.date:ue.object;default:return ue.unknown}},Q=Oe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ft extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let i=n,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(i[l]=i[l]||{_errors:[]},i[l]._errors.push(r(a))):i[l]=i[l]||{_errors:[]},i=i[l],c++}}};return s(this),n}static assert(t){if(!(t instanceof Ft))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];r[o]=r[o]||[],r[o].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Ft.create=e=>new Ft(e);const fi=(e,t)=>{let r;switch(e.code){case Q.invalid_type:e.received===ue.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Q.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Oe.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:r=`Unrecognized key(s) in object: ${Oe.joinValues(e.keys,", ")}`;break;case Q.invalid_union:r="Invalid input";break;case Q.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Oe.joinValues(e.options)}`;break;case Q.invalid_enum_value:r=`Invalid enum value. Expected ${Oe.joinValues(e.options)}, received '${e.received}'`;break;case Q.invalid_arguments:r="Invalid function arguments";break;case Q.invalid_return_type:r="Invalid function return type";break;case Q.invalid_date:r="Invalid date";break;case Q.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Oe.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Q.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Q.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Q.custom:r="Invalid input";break;case Q.invalid_intersection_types:r="Intersection results could not be merged";break;case Q.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Q.not_finite:r="Number must be finite";break;default:r=t.defaultError,Oe.assertNever(e)}return{message:r}};let Ew=fi;function kw(){return Ew}const Cw=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],a={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let i="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)i=l(a,{data:t,defaultError:i}).message;return{...s,path:o,message:i}};function ae(e,t){const r=kw(),n=Cw({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===fi?void 0:fi].filter(s=>!!s)});e.common.issues.push(n)}class Xe{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const s of r){if(s.status==="aborted")return ve;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const o=await s.key,a=await s.value;n.push({key:o,value:a})}return Xe.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:o,value:a}=s;if(o.status==="aborted"||a.status==="aborted")return ve;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(n[o.value]=a.value)}return{status:t.value,value:n}}}const ve=Object.freeze({status:"aborted"}),bn=e=>({status:"dirty",value:e}),ut=e=>({status:"valid",value:e}),Km=e=>e.status==="aborted",Ym=e=>e.status==="dirty",Br=e=>e.status==="valid",xo=e=>typeof Promise<"u"&&e instanceof Promise;var fe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(fe||(fe={}));class jt{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Jm=(e,t)=>{if(Br(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Ft(e.common.issues);return this._error=r,this._error}}};function $e(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(a,i)=>{const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??i.defaultError}:typeof i.data>"u"?{message:c??n??i.defaultError}:a.code!=="invalid_type"?{message:i.defaultError}:{message:c??r??i.defaultError}},description:s}}class Ae{get description(){return this._def.description}_getType(t){return rr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:rr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Xe,ctx:{common:t.parent.common,data:t.data,parsedType:rr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(xo(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rr(t)},s=this._parseSync({data:t,path:n.path,parent:n});return Jm(n,s)}"~validate"(t){var n,s;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rr(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:r});return Br(o)?{value:o.value}:{issues:r.common.issues}}catch(o){(s=(n=o==null?void 0:o.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>Br(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rr(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(xo(s)?s:Promise.resolve(s));return Jm(n,o)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{const a=t(s),i=()=>o.addIssue({code:Q.custom,...n(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(i(),!1)):a?!0:(i(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Zr({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return sr.create(this,this._def)}nullable(){return Kr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Nt.create(this)}promise(){return ko.create(this,this._def)}or(t){return $o.create([this,t],this._def)}and(t){return So.create(this,t,this._def)}transform(t){return new Zr({...$e(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new yi({...$e(this._def),innerType:this,defaultValue:r,typeName:pe.ZodDefault})}brand(){return new Yw({typeName:pe.ZodBranded,type:this,...$e(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new bi({...$e(this._def),innerType:this,catchValue:r,typeName:pe.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return _i.create(this,t)}readonly(){return xi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const jw=/^c[^\s-]{8,}$/i,Nw=/^[0-9a-z]+$/,Rw=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Aw=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Pw=/^[a-z0-9_-]{21}$/i,Tw=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ow=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Iw=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Dw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let mi;const Mw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Vw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Fw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Lw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zw=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,qw=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Xm="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Uw=new RegExp(`^${Xm}$`);function Qm(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function Bw(e){return new RegExp(`^${Qm(e)}$`)}function Ww(e){let t=`${Xm}T${Qm(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Hw(e,t){return!!((t==="v4"||!t)&&Mw.test(e)||(t==="v6"||!t)&&Fw.test(e))}function Gw(e,t){if(!Tw.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function Zw(e,t){return!!((t==="v4"||!t)&&Vw.test(e)||(t==="v6"||!t)&&Lw.test(e))}class Lt extends Ae{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ue.string){const o=this._getOrReturnCtx(t);return ae(o,{code:Q.invalid_type,expected:ue.string,received:o.parsedType}),ve}const n=new Xe;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,i=t.data.length<o.value;(a||i)&&(s=this._getOrReturnCtx(t,s),a?ae(s,{code:Q.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&ae(s,{code:Q.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")Iw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"email",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")mi||(mi=new RegExp(Dw,"u")),mi.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"emoji",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Aw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"uuid",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")Pw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"nanoid",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")jw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"cuid",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Nw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"cuid2",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Rw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"ulid",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ae(s,{validation:"url",code:Q.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"regex",code:Q.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Ww(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?Uw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?Bw(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Ow.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"duration",code:Q.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?Hw(t.data,o.version)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"ip",code:Q.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?Gw(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"jwt",code:Q.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?Zw(t.data,o.version)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"cidr",code:Q.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?zw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"base64",code:Q.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?qw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"base64url",code:Q.invalid_string,message:o.message}),n.dirty()):Oe.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:Q.invalid_string,...fe.errToObj(n)})}_addCheck(t){return new Lt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...fe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...fe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...fe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...fe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...fe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...fe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...fe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...fe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...fe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...fe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...fe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...fe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...fe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...fe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...fe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...fe.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...fe.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...fe.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...fe.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...fe.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...fe.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...fe.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...fe.errToObj(r)})}nonempty(t){return this.min(1,fe.errToObj(t))}trim(){return new Lt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Lt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Lt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Lt.create=e=>new Lt({checks:[],typeName:pe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...$e(e)});function Kw(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=Number.parseInt(e.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return o%a/10**s}class Wr extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ue.number){const o=this._getOrReturnCtx(t);return ae(o,{code:Q.invalid_type,expected:ue.number,received:o.parsedType}),ve}let n;const s=new Xe;for(const o of this._def.checks)o.kind==="int"?Oe.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?Kw(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.not_finite,message:o.message}),s.dirty()):Oe.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,fe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,fe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,fe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,fe.toString(r))}setLimit(t,r,n,s){return new Wr({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:fe.toString(s)}]})}_addCheck(t){return new Wr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:fe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:fe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Oe.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}Wr.create=e=>new Wr({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class _n extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ue.bigint)return this._getInvalidInput(t);let n;const s=new Xe;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Oe.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return ae(r,{code:Q.invalid_type,expected:ue.bigint,received:r.parsedType}),ve}gte(t,r){return this.setLimit("min",t,!0,fe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,fe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,fe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,fe.toString(r))}setLimit(t,r,n,s){return new _n({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:fe.toString(s)}]})}_addCheck(t){return new _n({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}_n.create=e=>new _n({checks:[],typeName:pe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...$e(e)});class hi extends Ae{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ue.boolean){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.boolean,received:n.parsedType}),ve}return ut(t.data)}}hi.create=e=>new hi({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class wo extends Ae{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ue.date){const o=this._getOrReturnCtx(t);return ae(o,{code:Q.invalid_type,expected:ue.date,received:o.parsedType}),ve}if(Number.isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ae(o,{code:Q.invalid_date}),ve}const n=new Xe;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):Oe.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new wo({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:fe.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:fe.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}wo.create=e=>new wo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pe.ZodDate,...$e(e)});class eh extends Ae{_parse(t){if(this._getType(t)!==ue.symbol){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.symbol,received:n.parsedType}),ve}return ut(t.data)}}eh.create=e=>new eh({typeName:pe.ZodSymbol,...$e(e)});class th extends Ae{_parse(t){if(this._getType(t)!==ue.undefined){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.undefined,received:n.parsedType}),ve}return ut(t.data)}}th.create=e=>new th({typeName:pe.ZodUndefined,...$e(e)});class rh extends Ae{_parse(t){if(this._getType(t)!==ue.null){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.null,received:n.parsedType}),ve}return ut(t.data)}}rh.create=e=>new rh({typeName:pe.ZodNull,...$e(e)});class pi extends Ae{constructor(){super(...arguments),this._any=!0}_parse(t){return ut(t.data)}}pi.create=e=>new pi({typeName:pe.ZodAny,...$e(e)});class nh extends Ae{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ut(t.data)}}nh.create=e=>new nh({typeName:pe.ZodUnknown,...$e(e)});class nr extends Ae{_parse(t){const r=this._getOrReturnCtx(t);return ae(r,{code:Q.invalid_type,expected:ue.never,received:r.parsedType}),ve}}nr.create=e=>new nr({typeName:pe.ZodNever,...$e(e)});class sh extends Ae{_parse(t){if(this._getType(t)!==ue.undefined){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.void,received:n.parsedType}),ve}return ut(t.data)}}sh.create=e=>new sh({typeName:pe.ZodVoid,...$e(e)});class Nt extends Ae{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==ue.array)return ae(r,{code:Q.invalid_type,expected:ue.array,received:r.parsedType}),ve;if(s.exactLength!==null){const a=r.data.length>s.exactLength.value,i=r.data.length<s.exactLength.value;(a||i)&&(ae(r,{code:a?Q.too_big:Q.too_small,minimum:i?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(ae(r,{code:Q.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(ae(r,{code:Q.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,i)=>s.type._parseAsync(new jt(r,a,r.path,i)))).then(a=>Xe.mergeArray(n,a));const o=[...r.data].map((a,i)=>s.type._parseSync(new jt(r,a,r.path,i)));return Xe.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new Nt({...this._def,minLength:{value:t,message:fe.toString(r)}})}max(t,r){return new Nt({...this._def,maxLength:{value:t,message:fe.toString(r)}})}length(t,r){return new Nt({...this._def,exactLength:{value:t,message:fe.toString(r)}})}nonempty(t){return this.min(1,t)}}Nt.create=(e,t)=>new Nt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...$e(t)});function Hr(e){if(e instanceof We){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=sr.create(Hr(n))}return new We({...e._def,shape:()=>t})}else return e instanceof Nt?new Nt({...e._def,type:Hr(e.element)}):e instanceof sr?sr.create(Hr(e.unwrap())):e instanceof Kr?Kr.create(Hr(e.unwrap())):e instanceof gr?gr.create(e.items.map(t=>Hr(t))):e}class We extends Ae{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Oe.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ue.object){const l=this._getOrReturnCtx(t);return ae(l,{code:Q.invalid_type,expected:ue.object,received:l.parsedType}),ve}const{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),i=[];if(!(this._def.catchall instanceof nr&&this._def.unknownKeys==="strip"))for(const l in s.data)a.includes(l)||i.push(l);const c=[];for(const l of a){const u=o[l],p=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new jt(s,p,s.path,l)),alwaysSet:l in s.data})}if(this._def.catchall instanceof nr){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of i)c.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(l==="strict")i.length>0&&(ae(s,{code:Q.unrecognized_keys,keys:i}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of i){const p=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new jt(s,p,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const p=await u.key,h=await u.value;l.push({key:p,value:h,alwaysSet:u.alwaysSet})}return l}).then(l=>Xe.mergeObjectSync(n,l)):Xe.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return fe.errToObj,new We({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var o,a;const s=((a=(o=this._def).errorMap)==null?void 0:a.call(o,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:fe.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new We({...this._def,unknownKeys:"strip"})}passthrough(){return new We({...this._def,unknownKeys:"passthrough"})}extend(t){return new We({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new We({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pe.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new We({...this._def,catchall:t})}pick(t){const r={};for(const n of Oe.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new We({...this._def,shape:()=>r})}omit(t){const r={};for(const n of Oe.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new We({...this._def,shape:()=>r})}deepPartial(){return Hr(this)}partial(t){const r={};for(const n of Oe.objectKeys(this.shape)){const s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new We({...this._def,shape:()=>r})}required(t){const r={};for(const n of Oe.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof sr;)o=o._def.innerType;r[n]=o}return new We({...this._def,shape:()=>r})}keyof(){return ih(Oe.objectKeys(this.shape))}}We.create=(e,t)=>new We({shape:()=>e,unknownKeys:"strip",catchall:nr.create(),typeName:pe.ZodObject,...$e(t)}),We.strictCreate=(e,t)=>new We({shape:()=>e,unknownKeys:"strict",catchall:nr.create(),typeName:pe.ZodObject,...$e(t)}),We.lazycreate=(e,t)=>new We({shape:e,unknownKeys:"strip",catchall:nr.create(),typeName:pe.ZodObject,...$e(t)});class $o extends Ae{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(const i of o)if(i.result.status==="valid")return i.result;for(const i of o)if(i.result.status==="dirty")return r.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(i=>new Ft(i.ctx.common.issues));return ae(r,{code:Q.invalid_union,unionErrors:a}),ve}if(r.common.async)return Promise.all(n.map(async o=>{const a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(s);{let o;const a=[];for(const c of n){const l={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(c=>new Ft(c));return ae(r,{code:Q.invalid_union,unionErrors:i}),ve}}get options(){return this._def.options}}$o.create=(e,t)=>new $o({options:e,typeName:pe.ZodUnion,...$e(t)});function gi(e,t){const r=rr(e),n=rr(t);if(e===t)return{valid:!0,data:e};if(r===ue.object&&n===ue.object){const s=Oe.objectKeys(t),o=Oe.objectKeys(e).filter(i=>s.indexOf(i)!==-1),a={...e,...t};for(const i of o){const c=gi(e[i],t[i]);if(!c.valid)return{valid:!1};a[i]=c.data}return{valid:!0,data:a}}else if(r===ue.array&&n===ue.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const a=e[o],i=t[o],c=gi(a,i);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===ue.date&&n===ue.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class So extends Ae{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=(o,a)=>{if(Km(o)||Km(a))return ve;const i=gi(o.value,a.value);return i.valid?((Ym(o)||Ym(a))&&r.dirty(),{status:r.value,value:i.data}):(ae(n,{code:Q.invalid_intersection_types}),ve)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,a])=>s(o,a)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}So.create=(e,t,r)=>new So({left:e,right:t,typeName:pe.ZodIntersection,...$e(r)});class gr extends Ae{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ue.array)return ae(n,{code:Q.invalid_type,expected:ue.array,received:n.parsedType}),ve;if(n.data.length<this._def.items.length)return ae(n,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&n.data.length>this._def.items.length&&(ae(n,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...n.data].map((a,i)=>{const c=this._def.items[i]||this._def.rest;return c?c._parse(new jt(n,a,n.path,i)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>Xe.mergeArray(r,a)):Xe.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new gr({...this._def,rest:t})}}gr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new gr({items:e,typeName:pe.ZodTuple,rest:null,...$e(t)})};class Eo extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ue.object)return ae(n,{code:Q.invalid_type,expected:ue.object,received:n.parsedType}),ve;const s=[],o=this._def.keyType,a=this._def.valueType;for(const i in n.data)s.push({key:o._parse(new jt(n,i,n.path,i)),value:a._parse(new jt(n,n.data[i],n.path,i)),alwaysSet:i in n.data});return n.common.async?Xe.mergeObjectAsync(r,s):Xe.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Ae?new Eo({keyType:t,valueType:r,typeName:pe.ZodRecord,...$e(n)}):new Eo({keyType:Lt.create(),valueType:t,typeName:pe.ZodRecord,...$e(r)})}}class oh extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ue.map)return ae(n,{code:Q.invalid_type,expected:ue.map,received:n.parsedType}),ve;const s=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([i,c],l)=>({key:s._parse(new jt(n,i,n.path,[l,"key"])),value:o._parse(new jt(n,c,n.path,[l,"value"]))}));if(n.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return ve;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),i.set(l.value,u.value)}return{status:r.value,value:i}})}else{const i=new Map;for(const c of a){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return ve;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),i.set(l.value,u.value)}return{status:r.value,value:i}}}}oh.create=(e,t,r)=>new oh({valueType:t,keyType:e,typeName:pe.ZodMap,...$e(r)});class xn extends Ae{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ue.set)return ae(n,{code:Q.invalid_type,expected:ue.set,received:n.parsedType}),ve;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(ae(n,{code:Q.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(ae(n,{code:Q.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const o=this._def.valueType;function a(c){const l=new Set;for(const u of c){if(u.status==="aborted")return ve;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}const i=[...n.data.values()].map((c,l)=>o._parse(new jt(n,c,n.path,l)));return n.common.async?Promise.all(i).then(c=>a(c)):a(i)}min(t,r){return new xn({...this._def,minSize:{value:t,message:fe.toString(r)}})}max(t,r){return new xn({...this._def,maxSize:{value:t,message:fe.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}xn.create=(e,t)=>new xn({valueType:e,minSize:null,maxSize:null,typeName:pe.ZodSet,...$e(t)});class vi extends Ae{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}vi.create=(e,t)=>new vi({getter:e,typeName:pe.ZodLazy,...$e(t)});class ah extends Ae{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return ae(r,{received:r.data,code:Q.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}ah.create=(e,t)=>new ah({value:e,typeName:pe.ZodLiteral,...$e(t)});function ih(e,t){return new Gr({values:e,typeName:pe.ZodEnum,...$e(t)})}class Gr extends Ae{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return ae(r,{expected:Oe.joinValues(n),received:r.parsedType,code:Q.invalid_type}),ve}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return ae(r,{received:r.data,code:Q.invalid_enum_value,options:n}),ve}return ut(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return Gr.create(t,{...this._def,...r})}exclude(t,r=this._def){return Gr.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}Gr.create=ih;class ch extends Ae{_parse(t){const r=Oe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==ue.string&&n.parsedType!==ue.number){const s=Oe.objectValues(r);return ae(n,{expected:Oe.joinValues(s),received:n.parsedType,code:Q.invalid_type}),ve}if(this._cache||(this._cache=new Set(Oe.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=Oe.objectValues(r);return ae(n,{received:n.data,code:Q.invalid_enum_value,options:s}),ve}return ut(t.data)}get enum(){return this._def.values}}ch.create=(e,t)=>new ch({values:e,typeName:pe.ZodNativeEnum,...$e(t)});class ko extends Ae{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ue.promise&&r.common.async===!1)return ae(r,{code:Q.invalid_type,expected:ue.promise,received:r.parsedType}),ve;const n=r.parsedType===ue.promise?r.data:Promise.resolve(r.data);return ut(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ko.create=(e,t)=>new ko({type:e,typeName:pe.ZodPromise,...$e(t)});class Zr extends Ae{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:a=>{ae(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const a=s.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async i=>{if(r.value==="aborted")return ve;const c=await this._def.schema._parseAsync({data:i,path:n.path,parent:n});return c.status==="aborted"?ve:c.status==="dirty"||r.value==="dirty"?bn(c.value):c});{if(r.value==="aborted")return ve;const i=this._def.schema._parseSync({data:a,path:n.path,parent:n});return i.status==="aborted"?ve:i.status==="dirty"||r.value==="dirty"?bn(i.value):i}}if(s.type==="refinement"){const a=i=>{const c=s.refinement(i,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?ve:(i.status==="dirty"&&r.dirty(),a(i.value),{status:r.value,value:i.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>i.status==="aborted"?ve:(i.status==="dirty"&&r.dirty(),a(i.value).then(()=>({status:r.value,value:i.value}))))}if(s.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Br(a))return ve;const i=s.transform(a.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:i}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>Br(a)?Promise.resolve(s.transform(a.value,o)).then(i=>({status:r.value,value:i})):ve);Oe.assertNever(s)}}Zr.create=(e,t,r)=>new Zr({schema:e,typeName:pe.ZodEffects,effect:t,...$e(r)}),Zr.createWithPreprocess=(e,t,r)=>new Zr({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,...$e(r)});class sr extends Ae{_parse(t){return this._getType(t)===ue.undefined?ut(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}sr.create=(e,t)=>new sr({innerType:e,typeName:pe.ZodOptional,...$e(t)});class Kr extends Ae{_parse(t){return this._getType(t)===ue.null?ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Kr.create=(e,t)=>new Kr({innerType:e,typeName:pe.ZodNullable,...$e(t)});class yi extends Ae{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===ue.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}yi.create=(e,t)=>new yi({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class bi extends Ae{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return xo(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ft(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ft(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}bi.create=(e,t)=>new bi({innerType:e,typeName:pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class lh extends Ae{_parse(t){if(this._getType(t)!==ue.nan){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.nan,received:n.parsedType}),ve}return{status:"valid",value:t.data}}}lh.create=e=>new lh({typeName:pe.ZodNaN,...$e(e)});class Yw extends Ae{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class _i extends Ae{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?ve:o.status==="dirty"?(r.dirty(),bn(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?ve:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new _i({in:t,out:r,typeName:pe.ZodPipeline})}}class xi extends Ae{_parse(t){const r=this._def.innerType._parse(t),n=s=>(Br(s)&&(s.value=Object.freeze(s.value)),s);return xo(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}xi.create=(e,t)=>new xi({innerType:e,typeName:pe.ZodReadonly,...$e(t)});var pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(pe||(pe={}));const _t=Lt.create,ct=Wr.create,Co=hi.create,uh=pi.create;nr.create;const wn=Nt.create,wi=We.create,dh=$o.create;So.create,gr.create;const Jw=Eo.create,$i=vi.create,Xw=Gr.create;ko.create,sr.create,Kr.create;const Yr=wi({type:Xw(["string","number","integer","boolean","object","array"]).optional(),title:_t().optional(),description:_t().optional(),default:uh().optional(),minimum:ct().optional(),maximum:ct().optional(),exclusiveMin:ct().optional(),exclusiveMax:ct().optional(),multipleOf:ct().optional(),minLength:ct().optional(),maxLength:ct().optional(),minContains:ct().optional(),maxContains:ct().optional(),minProperties:ct().optional(),maxProperties:ct().optional(),isModifiable:Co().optional(),"x-modifiable":wn(_t()).optional(),pattern:_t().optional(),format:_t().optional(),minItems:ct().optional(),maxItems:ct().optional(),uniqueItems:Co().optional(),enum:wn(uh()).optional(),$id:_t().optional(),$schema:_t().optional()}).extend({properties:$i(()=>Jw(_t(),Yr)).optional(),items:$i(()=>dh([Yr,wn(Yr)])).optional(),required:wn(_t()).optional(),additionalProperties:$i(()=>dh([Co(),Yr])).optional()}),Qw=wi({root:Yr,properties:wn(wi({id:_t(),key:_t().min(1),isRequired:Co(),schema:Yr}))}),e$=e=>{const t=o=>{const a={...o};if(Array.isArray(a.properties)){const i={},c=[];a.properties.forEach(l=>{l.key&&(i[l.key]=t(l.schema),l.isRequired&&c.push(l.key))}),a.properties=i,c.length>0&&(a.required=c)}return typeof a.items=="object"&&a.items!==null&&!Array.isArray(a.items)?a.items=t(a.items):Array.isArray(a.items)&&(a.items=a.items.map(i=>t(i))),a},r={...t(e.root)},n={},s=[];return e.properties.forEach(o=>{o.key&&(n[o.key]=t(o.schema),o.isRequired&&s.push(o.key))}),Object.keys(n).length>0&&(r.properties=n),s.length>0&&(r.required=s),r},t$=e=>{const t=i=>{const c={...i};if(typeof c.properties=="object"&&!Array.isArray(c.properties)){const l=[];Object.keys(c.properties).forEach(u=>{var h;const p=c.properties[u];l.push({id:nn(6),key:u,isRequired:((h=c.required)==null?void 0:h.includes(u))||!1,schema:t(p)})}),c.properties=l}return typeof c.items=="object"&&c.items!==null&&!Array.isArray(c.items)?c.items=t(c.items):Array.isArray(c.items)&&(c.items=c.items.map(l=>t(l))),c},{properties:r,required:n,...s}=e,a=t({properties:r,required:n});return{root:{...s,...a.root},properties:a.properties||[]}},r$=({rootType:e="object",defaultValue:t})=>{const r=nn(6),n=Dh({resolver:Sw(Qw),defaultValues:t?t$(t):{root:{type:e,$schema:"http://json-schema.org/draft/2020-12/schema",...e==="object"&&{additionalProperties:!0},...e==="array"&&{items:{type:"string"}}},properties:e==="object"?[{id:r,key:`field_${r}`,isRequired:!1,schema:{type:"number"}}]:[]}}),s=n.watch(),o=Z.useMemo(()=>e$(s),[s]);return{methods:n,jsonSchema:o}},n$=({textAreaRef:e,triggerAutoSize:t,maxHeight:r=Number.MAX_SAFE_INTEGER,minHeight:n=0})=>{const[s,o]=S.useState(!0);S.useEffect(()=>{const i=e.current;if(i){s&&(i.style.minHeight=`${n+6}px`,r>n&&(i.style.maxHeight=`${r}px`),o(!1)),i.style.height=`${n+6}px`;const c=i.scrollHeight;c>r?i.style.height=`${r}px`:i.style.height=`${c+6}px`}},[e.current,t])},fh=S.forwardRef(({maxHeight:e=Number.MAX_SAFE_INTEGER,minHeight:t=52,className:r,onChange:n,value:s,...o},a)=>{const i=S.useRef(null),[c,l]=S.useState("");return n$({textAreaRef:i,triggerAutoSize:c,maxHeight:e,minHeight:t}),Z.useImperativeHandle(a,()=>({textArea:i.current,focus:()=>{var u;return(u=i==null?void 0:i.current)==null?void 0:u.focus()},maxHeight:e,minHeight:t})),S.useEffect(()=>{l(s)},[o==null?void 0:o.defaultValue,s]),d.jsx("textarea",{...o,value:s,ref:i,className:_e("flex w-full rounded-md border border-input bg-transparent dark:bg-input/30 px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),onChange:u=>{l(u.target.value),n==null||n(u)}})});fh.displayName="AutosizeTextarea";const s$=({rootType:e="object",readOnly:t=!1,theme:r="light",styles:n,onChange:s,defaultValue:o})=>{const{methods:a,jsonSchema:i}=r$({rootType:e,defaultValue:o}),{setError:c,clearErrors:l,watch:u}=a,p=u("properties"),[h,v]=Z.useState(null);Z.useEffect(()=>{s&&s(i)},[i,s]),Z.useEffect(()=>{const O=vm(i);JSON.stringify(O)!==JSON.stringify(h)&&v(O)},[i,h]),Z.useEffect(()=>{l(),h&&h.forEach(O=>{const z=O.instancePath.split("/").filter(Boolean);if(z[0]==="properties"&&z.length>=3){const D=(p==null?void 0:p.findIndex(V=>V.key===z[1]))??-1;D!==-1&&c(`properties.${D}.schema.${z[2]}`,{type:"ajv",message:O.message})}else z.length>0&&c(`root.${z[0]}`,{type:"ajv",message:O.message})})},[h,p,c,l]),Z.useEffect(()=>{if(!o){const O=nn(6),z={root:{type:e,$schema:"http://json-schema.org/draft/2020-12/schema",...e==="object"&&{additionalProperties:!0},...e==="array"&&{items:{type:"string"}}},properties:e==="object"?[{id:O,key:`field_${O}`,isRequired:!1,schema:{type:"number"}}]:[]};a.reset(z)}},[e,a,o]);const{fields:x,append:y,remove:m}=Qi({control:a.control,name:"properties",keyName:"fieldId"}),_=()=>{const O=nn(6);y({id:O,key:`field_${O}`,isRequired:!1,schema:{type:"string"}})},[f,b]=Z.useState({isOpen:!1,fieldPath:null}),w=O=>{b({isOpen:!0,fieldPath:O})},g={...cs,...n,output:{...cs.output,...n==null?void 0:n.output},form:{...cs.form,...n==null?void 0:n.form},settings:{...cs.settings,...n==null?void 0:n.settings}},$=Z.useRef(null),[E,j]=Z.useState("overflow-hidden");return Z.useEffect(()=>{var z;const O=(z=$.current)==null?void 0:z.textArea;O&&(O.scrollHeight>O.clientHeight?j("overflow-y-auto"):j("overflow-hidden"))},[i]),d.jsxs(_h,{...a,children:[d.jsx("div",{className:_e("bg-background text-foreground flex flex-col",r,Nu[g.spacing]),children:d.jsxs("div",{className:_e("bg-background text-foreground flex",r,Gb[g.output.position],Nu[g.spacing]),children:[d.jsxs("div",{className:_e("p-4 pr-2 flex flex-col gap-2 border border-input rounded-lg overflow-y-auto",Va[g.form.width],ju[g.form.height]),children:[d.jsx(Bb,{theme:r,readOnly:t,rootType:e,onAddField:_,onOpenSettings:w}),e==="object"&&d.jsx(Z_,{theme:r,readOnly:t,fields:x,onRemove:m,onOpenSettings:w}),e==="array"&&d.jsx("div",{className:"ml-2 pl-2 border-l-2 border-input",children:d.jsx(ds,{theme:r,readOnly:t,fieldPath:"root.items",onRemove:()=>{},onOpenSettings:w,isSimpleType:!1,isRootLevel:!1})})]}),h?d.jsxs("div",{className:_e("p-6 bg-background text-foreground border border-input rounded-lg overflow-y-auto overflow-x-auto",Va[g.output.width],ju[g.output.height]),children:[d.jsx("p",{className:"text-lg",children:"JSON Schema Errors"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:`The generated JSON Schema has ${h==null?void 0:h.length}
|
|
145
|
-
${(h==null?void 0:h.length)>1?"errors.":"error."}`}),d.jsx("ul",{className:"mt-4 flex flex-col gap-2",children:h==null?void 0:h.map((
|
|
144
|
+
deps: ${u}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[l,u]=o(c);a(c,l),i(c,u)}};function o({schema:c}){const l={},u={};for(const h in c){if(h==="__proto__")continue;const p=Array.isArray(c[h])?l:u;p[h]=c[h]}return[l,u]}function a(c,l=c.schema){const{gen:u,data:h,it:p}=c;if(Object.keys(l).length===0)return;const v=u.let("missing");for(const w in l){const y=l[w];if(y.length===0)continue;const m=(0,n.propertyInData)(u,h,w,p.opts.ownProperties);c.setParams({property:w,depsCount:y.length,deps:y.join(", ")}),p.allErrors?u.if(m,()=>{for(const _ of y)(0,n.checkReportMissingProp)(c,_)}):(u.if((0,t._)`${m} && (${(0,n.checkMissingProp)(c,y,v)})`),(0,n.reportMissingProp)(c,v),u.else())}}e.validatePropertyDeps=a;function i(c,l=c.schema){const{gen:u,data:h,keyword:p,it:v}=c,w=u.name("valid");for(const y in l)(0,r.alwaysValidSchema)(v,l[y])||(u.if((0,n.propertyInData)(u,h,y,v.opts.ownProperties),()=>{const m=c.subschema({keyword:p,schemaProp:y},w);c.mergeValidEvaluated(m,w)},()=>u.var(w,!0)),c.ok(w))}e.validateSchemaDeps=i,e.default=s})(ri)),ri}var Ws={},jf;function M0(){if(jf)return Ws;jf=1,Object.defineProperty(Ws,"__esModule",{value:!0});const e=ye(),t=Re(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>(0,e._)`{propertyName: ${s.propertyName}}`},code(s){const{gen:o,schema:a,data:i,it:c}=s;if((0,t.alwaysValidSchema)(c,a))return;const l=o.name("valid");o.forIn("key",i,u=>{s.setParams({propertyName:u}),s.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},l),o.if((0,e.not)(l),()=>{s.error(!0),c.allErrors||o.break()})}),s.ok(l)}};return Ws.default=n,Ws}var Hs={},Nf;function Rf(){if(Nf)return Hs;Nf=1,Object.defineProperty(Hs,"__esModule",{value:!0});const e=bt(),t=ye(),r=vt(),n=Re(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,t._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:i,schema:c,parentSchema:l,data:u,errsCount:h,it:p}=a;if(!h)throw new Error("ajv implementation error");const{allErrors:v,opts:w}=p;if(p.props=!0,w.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(p,c))return;const y=(0,e.allSchemaProperties)(l.properties),m=(0,e.allSchemaProperties)(l.patternProperties);_(),a.ok((0,t._)`${h} === ${r.default.errors}`);function _(){i.forIn("key",u,$=>{!y.length&&!m.length?x($):i.if(f($),()=>x($))})}function f($){let E;if(y.length>8){const j=(0,n.schemaRefOrVal)(p,l.properties,"properties");E=(0,e.isOwnProperty)(i,j,$)}else y.length?E=(0,t.or)(...y.map(j=>(0,t._)`${$} === ${j}`)):E=t.nil;return m.length&&(E=(0,t.or)(E,...m.map(j=>(0,t._)`${(0,e.usePattern)(a,j)}.test(${$})`))),(0,t.not)(E)}function b($){i.code((0,t._)`delete ${u}[${$}]`)}function x($){if(w.removeAdditional==="all"||w.removeAdditional&&c===!1){b($);return}if(c===!1){a.setParams({additionalProperty:$}),a.error(),v||i.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(p,c)){const E=i.name("valid");w.removeAdditional==="failing"?(g($,E,!1),i.if((0,t.not)(E),()=>{a.reset(),b($)})):(g($,E),v||i.if((0,t.not)(E),()=>i.break()))}}function g($,E,j){const I={keyword:"additionalProperties",dataProp:$,dataPropType:n.Type.Str};j===!1&&Object.assign(I,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(I,E)}}};return Hs.default=o,Hs}var Gs={},Af;function V0(){if(Af)return Gs;Af=1,Object.defineProperty(Gs,"__esModule",{value:!0});const e=hn(),t=bt(),r=Re(),n=Rf(),s={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:a,schema:i,parentSchema:c,data:l,it:u}=o;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(u,n.default,"additionalProperties"));const h=(0,t.allSchemaProperties)(i);for(const m of h)u.definedProperties.add(m);u.opts.unevaluated&&h.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(a,(0,r.toHash)(h),u.props));const p=h.filter(m=>!(0,r.alwaysValidSchema)(u,i[m]));if(p.length===0)return;const v=a.name("valid");for(const m of p)w(m)?y(m):(a.if((0,t.propertyInData)(a,l,m,u.opts.ownProperties)),y(m),u.allErrors||a.else().var(v,!0),a.endIf()),o.it.definedProperties.add(m),o.ok(v);function w(m){return u.opts.useDefaults&&!u.compositeRule&&i[m].default!==void 0}function y(m){o.subschema({keyword:"properties",schemaProp:m,dataProp:m},v)}}};return Gs.default=s,Gs}var Zs={},Pf;function F0(){if(Pf)return Zs;Pf=1,Object.defineProperty(Zs,"__esModule",{value:!0});const e=bt(),t=ye(),r=Re(),n=Re(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:a,schema:i,data:c,parentSchema:l,it:u}=o,{opts:h}=u,p=(0,e.allSchemaProperties)(i),v=p.filter(x=>(0,r.alwaysValidSchema)(u,i[x]));if(p.length===0||v.length===p.length&&(!u.opts.unevaluated||u.props===!0))return;const w=h.strictSchema&&!h.allowMatchingProperties&&l.properties,y=a.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,n.evaluatedPropsToName)(a,u.props));const{props:m}=u;_();function _(){for(const x of p)w&&f(x),u.allErrors?b(x):(a.var(y,!0),b(x),a.if(y))}function f(x){for(const g in w)new RegExp(x).test(g)&&(0,r.checkStrictMode)(u,`property ${g} matches pattern ${x} (use allowMatchingProperties)`)}function b(x){a.forIn("key",c,g=>{a.if((0,t._)`${(0,e.usePattern)(o,x)}.test(${g})`,()=>{const $=v.includes(x);$||o.subschema({keyword:"patternProperties",schemaProp:x,dataProp:g,dataPropType:n.Type.Str},y),u.opts.unevaluated&&m!==!0?a.assign((0,t._)`${m}[${g}]`,!0):!$&&!u.allErrors&&a.if((0,t.not)(y),()=>a.break())})})}}};return Zs.default=s,Zs}var Ks={},Tf;function L0(){if(Tf)return Ks;Tf=1,Object.defineProperty(Ks,"__esModule",{value:!0});const e=Re(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:s,it:o}=r;if((0,e.alwaysValidSchema)(o,s)){r.fail();return}const a=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Ks.default=t,Ks}var Ys={},Of;function z0(){if(Of)return Ys;Of=1,Object.defineProperty(Ys,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:bt().validateUnion,error:{message:"must match a schema in anyOf"}};return Ys.default=t,Ys}var Js={},If;function q0(){if(If)return Js;If=1,Object.defineProperty(Js,"__esModule",{value:!0});const e=ye(),t=Re(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>(0,e._)`{passingSchemas: ${s.passing}}`},code(s){const{gen:o,schema:a,parentSchema:i,it:c}=s;if(!Array.isArray(a))throw new Error("ajv implementation error");if(c.opts.discriminator&&i.discriminator)return;const l=a,u=o.let("valid",!1),h=o.let("passing",null),p=o.name("_valid");s.setParams({passing:h}),o.block(v),s.result(u,()=>s.reset(),()=>s.error(!0));function v(){l.forEach((w,y)=>{let m;(0,t.alwaysValidSchema)(c,w)?o.var(p,!0):m=s.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},p),y>0&&o.if((0,e._)`${p} && ${u}`).assign(u,!1).assign(h,(0,e._)`[${h}, ${y}]`).else(),o.if(p,()=>{o.assign(u,!0),o.assign(h,y),m&&s.mergeEvaluated(m,e.Name)})})}}};return Js.default=n,Js}var Xs={},Df;function U0(){if(Df)return Xs;Df=1,Object.defineProperty(Xs,"__esModule",{value:!0});const e=Re(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:s,it:o}=r;if(!Array.isArray(s))throw new Error("ajv implementation error");const a=n.name("valid");s.forEach((i,c)=>{if((0,e.alwaysValidSchema)(o,i))return;const l=r.subschema({keyword:"allOf",schemaProp:c},a);r.ok(a),r.mergeEvaluated(l)})}};return Xs.default=t,Xs}var Qs={},Mf;function B0(){if(Mf)return Qs;Mf=1,Object.defineProperty(Qs,"__esModule",{value:!0});const e=ye(),t=Re(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:a,parentSchema:i,it:c}=o;i.then===void 0&&i.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const l=s(c,"then"),u=s(c,"else");if(!l&&!u)return;const h=a.let("valid",!0),p=a.name("_valid");if(v(),o.reset(),l&&u){const y=a.let("ifClause");o.setParams({ifClause:y}),a.if(p,w("then",y),w("else",y))}else l?a.if(p,w("then")):a.if((0,e.not)(p),w("else"));o.pass(h,()=>o.error(!0));function v(){const y=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p);o.mergeEvaluated(y)}function w(y,m){return()=>{const _=o.subschema({keyword:y},p);a.assign(h,p),o.mergeValidEvaluated(_,h),m?a.assign(m,(0,e._)`${y}`):o.setParams({ifClause:y})}}}};function s(o,a){const i=o.schema[a];return i!==void 0&&!(0,t.alwaysValidSchema)(o,i)}return Qs.default=n,Qs}var eo={},Vf;function W0(){if(Vf)return eo;Vf=1,Object.defineProperty(eo,"__esModule",{value:!0});const e=Re(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:s}){n.if===void 0&&(0,e.checkStrictMode)(s,`"${r}" without "if" is ignored`)}};return eo.default=t,eo}var Ff;function Lf(){if(Ff)return zs;Ff=1,Object.defineProperty(zs,"__esModule",{value:!0});const e=xf(),t=O0(),r=$f(),n=I0(),s=D0(),o=ni(),a=M0(),i=Rf(),c=V0(),l=F0(),u=L0(),h=z0(),p=q0(),v=U0(),w=B0(),y=W0();function m(_=!1){const f=[u.default,h.default,p.default,v.default,w.default,y.default,a.default,i.default,o.default,c.default,l.default];return _?f.push(t.default,n.default):f.push(e.default,r.default),f.push(s.default),f}return zs.default=m,zs}var to={},qr={},zf;function qf(){if(zf)return qr;zf=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.dynamicAnchor=void 0;const e=ye(),t=vt(),r=$s(),n=ei(),s={keyword:"$dynamicAnchor",schemaType:"string",code:i=>o(i,i.schema)};function o(i,c){const{gen:l,it:u}=i;u.schemaEnv.root.dynamicAnchors[c]=!0;const h=(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(c)}`,p=u.errSchemaPath==="#"?u.validateName:a(i);l.if((0,e._)`!${h}`,()=>l.assign(h,p))}qr.dynamicAnchor=o;function a(i){const{schemaEnv:c,schema:l,self:u}=i.it,{root:h,baseId:p,localRefs:v,meta:w}=c.root,{schemaId:y}=u.opts,m=new r.SchemaEnv({schema:l,schemaId:y,root:h,baseId:p,localRefs:v,meta:w});return r.compileSchema.call(u,m),(0,n.getValidate)(i,m)}return qr.default=s,qr}var Ur={},Uf;function Bf(){if(Uf)return Ur;Uf=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.dynamicRef=void 0;const e=ye(),t=vt(),r=ei(),n={keyword:"$dynamicRef",schemaType:"string",code:o=>s(o,o.schema)};function s(o,a){const{gen:i,keyword:c,it:l}=o;if(a[0]!=="#")throw new Error(`"${c}" only supports hash fragment reference`);const u=a.slice(1);if(l.allErrors)h();else{const v=i.let("valid",!1);h(v),o.ok(v)}function h(v){if(l.schemaEnv.root.dynamicAnchors[u]){const w=i.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(u)}`);i.if(w,p(w,v),p(l.validateName,v))}else p(l.validateName,v)()}function p(v,w){return w?()=>i.block(()=>{(0,r.callRef)(o,v),i.let(w,!0)}):()=>(0,r.callRef)(o,v)}}return Ur.dynamicRef=s,Ur.default=n,Ur}var ro={},Wf;function H0(){if(Wf)return ro;Wf=1,Object.defineProperty(ro,"__esModule",{value:!0});const e=qf(),t=Re(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,e.dynamicAnchor)(n,""):(0,t.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return ro.default=r,ro}var no={},Hf;function G0(){if(Hf)return no;Hf=1,Object.defineProperty(no,"__esModule",{value:!0});const e=Bf(),t={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,e.dynamicRef)(r,r.schema)};return no.default=t,no}var Gf;function Z0(){if(Gf)return to;Gf=1,Object.defineProperty(to,"__esModule",{value:!0});const e=qf(),t=Bf(),r=H0(),n=G0(),s=[e.default,t.default,r.default,n.default];return to.default=s,to}var so={},oo={},Zf;function K0(){if(Zf)return oo;Zf=1,Object.defineProperty(oo,"__esModule",{value:!0});const e=ni(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:r=>(0,e.validatePropertyDeps)(r)};return oo.default=t,oo}var ao={},Kf;function Y0(){if(Kf)return ao;Kf=1,Object.defineProperty(ao,"__esModule",{value:!0});const e=ni(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,e.validateSchemaDeps)(r)};return ao.default=t,ao}var io={},Yf;function J0(){if(Yf)return io;Yf=1,Object.defineProperty(io,"__esModule",{value:!0});const e=Re(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:s}){n.contains===void 0&&(0,e.checkStrictMode)(s,`"${r}" without "contains" is ignored`)}};return io.default=t,io}var Jf;function X0(){if(Jf)return so;Jf=1,Object.defineProperty(so,"__esModule",{value:!0});const e=K0(),t=Y0(),r=J0(),n=[e.default,t.default,r.default];return so.default=n,so}var co={},lo={},Xf;function Q0(){if(Xf)return lo;Xf=1,Object.defineProperty(lo,"__esModule",{value:!0});const e=ye(),t=Re(),r=vt(),s={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,e._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){const{gen:a,schema:i,data:c,errsCount:l,it:u}=o;if(!l)throw new Error("ajv implementation error");const{allErrors:h,props:p}=u;p instanceof e.Name?a.if((0,e._)`${p} !== true`,()=>a.forIn("key",c,m=>a.if(w(p,m),()=>v(m)))):p!==!0&&a.forIn("key",c,m=>p===void 0?v(m):a.if(y(p,m),()=>v(m))),u.props=!0,o.ok((0,e._)`${l} === ${r.default.errors}`);function v(m){if(i===!1){o.setParams({unevaluatedProperty:m}),o.error(),h||a.break();return}if(!(0,t.alwaysValidSchema)(u,i)){const _=a.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:m,dataPropType:t.Type.Str},_),h||a.if((0,e.not)(_),()=>a.break())}}function w(m,_){return(0,e._)`!${m} || !${m}[${_}]`}function y(m,_){const f=[];for(const b in m)m[b]===!0&&f.push((0,e._)`${_} !== ${b}`);return(0,e.and)(...f)}}};return lo.default=s,lo}var uo={},Qf;function ex(){if(Qf)return uo;Qf=1,Object.defineProperty(uo,"__esModule",{value:!0});const e=ye(),t=Re(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{gen:o,schema:a,data:i,it:c}=s,l=c.items||0;if(l===!0)return;const u=o.const("len",(0,e._)`${i}.length`);if(a===!1)s.setParams({len:l}),s.fail((0,e._)`${u} > ${l}`);else if(typeof a=="object"&&!(0,t.alwaysValidSchema)(c,a)){const p=o.var("valid",(0,e._)`${u} <= ${l}`);o.if((0,e.not)(p),()=>h(p,l)),s.ok(p)}c.items=!0;function h(p,v){o.forRange("i",v,u,w=>{s.subschema({keyword:"unevaluatedItems",dataProp:w,dataPropType:t.Type.Num},p),c.allErrors||o.if((0,e.not)(p),()=>o.break())})}}};return uo.default=n,uo}var em;function tx(){if(em)return co;em=1,Object.defineProperty(co,"__esModule",{value:!0});const e=Q0(),t=ex(),r=[e.default,t.default];return co.default=r,co}var fo={},mo={},tm;function rx(){if(tm)return mo;tm=1,Object.defineProperty(mo,"__esModule",{value:!0});const e=ye(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,s){const{gen:o,data:a,$data:i,schema:c,schemaCode:l,it:u}=n,{opts:h,errSchemaPath:p,schemaEnv:v,self:w}=u;if(!h.validateFormats)return;i?y():m();function y(){const _=o.scopeValue("formats",{ref:w.formats,code:h.code.formats}),f=o.const("fDef",(0,e._)`${_}[${l}]`),b=o.let("fType"),x=o.let("format");o.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>o.assign(b,(0,e._)`${f}.type || "string"`).assign(x,(0,e._)`${f}.validate`),()=>o.assign(b,(0,e._)`"string"`).assign(x,f)),n.fail$data((0,e.or)(g(),$()));function g(){return h.strictSchema===!1?e.nil:(0,e._)`${l} && !${x}`}function $(){const E=v.$async?(0,e._)`(${f}.async ? await ${x}(${a}) : ${x}(${a}))`:(0,e._)`${x}(${a})`,j=(0,e._)`(typeof ${x} == "function" ? ${E} : ${x}.test(${a}))`;return(0,e._)`${x} && ${x} !== true && ${b} === ${s} && !${j}`}}function m(){const _=w.formats[c];if(!_){g();return}if(_===!0)return;const[f,b,x]=$(_);f===s&&n.pass(E());function g(){if(h.strictSchema===!1){w.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${c}" ignored in schema at path "${p}"`}}function $(j){const I=j instanceof RegExp?(0,e.regexpCode)(j):h.code.formats?(0,e._)`${h.code.formats}${(0,e.getProperty)(c)}`:void 0,U=o.scopeValue("formats",{key:c,ref:j,code:I});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,e._)`${U}.validate`]:["string",j,U]}function E(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${x}(${a})`}return typeof b=="function"?(0,e._)`${x}(${a})`:(0,e._)`${x}.test(${a})`}}}};return mo.default=r,mo}var rm;function nm(){if(rm)return fo;rm=1,Object.defineProperty(fo,"__esModule",{value:!0});const t=[rx().default];return fo.default=t,fo}var pr={},sm;function om(){return sm||(sm=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.contentVocabulary=pr.metadataVocabulary=void 0,pr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],pr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),pr}var am;function nx(){if(am)return Es;am=1,Object.defineProperty(Es,"__esModule",{value:!0});const e=sf(),t=bf(),r=Lf(),n=Z0(),s=X0(),o=tx(),a=nm(),i=om(),c=[n.default,e.default,t.default,(0,r.default)(!0),a.default,i.metadataVocabulary,i.contentVocabulary,s.default,o.default];return Es.default=c,Es}var ho={},vn={},im;function sx(){if(im)return vn;im=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(vn.DiscrError=e={})),vn}var cm;function lm(){if(cm)return ho;cm=1,Object.defineProperty(ho,"__esModule",{value:!0});const e=ye(),t=sx(),r=$s(),n=pn(),s=Re(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:i,tagName:c}})=>i===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:i,tag:c,tagName:l}})=>(0,e._)`{error: ${i}, tag: ${l}, tagValue: ${c}}`},code(i){const{gen:c,data:l,schema:u,parentSchema:h,it:p}=i,{oneOf:v}=h;if(!p.opts.discriminator)throw new Error("discriminator: requires discriminator option");const w=u.propertyName;if(typeof w!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const y=c.let("valid",!1),m=c.const("tag",(0,e._)`${l}${(0,e.getProperty)(w)}`);c.if((0,e._)`typeof ${m} == "string"`,()=>_(),()=>i.error(!1,{discrError:t.DiscrError.Tag,tag:m,tagName:w})),i.ok(y);function _(){const x=b();c.if(!1);for(const g in x)c.elseIf((0,e._)`${m} === ${g}`),c.assign(y,f(x[g]));c.else(),i.error(!1,{discrError:t.DiscrError.Mapping,tag:m,tagName:w}),c.endIf()}function f(x){const g=c.name("valid"),$=i.subschema({keyword:"oneOf",schemaProp:x},g);return i.mergeEvaluated($,e.Name),g}function b(){var x;const g={},$=j(h);let E=!0;for(let D=0;D<v.length;D++){let V=v[D];if(V!=null&&V.$ref&&!(0,s.schemaHasRulesButRef)(V,p.self.RULES)){const W=V.$ref;if(V=r.resolveRef.call(p.self,p.schemaEnv.root,p.baseId,W),V instanceof r.SchemaEnv&&(V=V.schema),V===void 0)throw new n.default(p.opts.uriResolver,p.baseId,W)}const q=(x=V==null?void 0:V.properties)===null||x===void 0?void 0:x[w];if(typeof q!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${w}"`);E=E&&($||j(V)),I(q,D)}if(!E)throw new Error(`discriminator: "${w}" must be required`);return g;function j({required:D}){return Array.isArray(D)&&D.includes(w)}function I(D,V){if(D.const)U(D.const,V);else if(D.enum)for(const q of D.enum)U(q,V);else throw new Error(`discriminator: "properties/${w}" must have "const" or "enum"`)}function U(D,V){if(typeof D!="string"||D in g)throw new Error(`discriminator: "${w}" values must be unique strings`);g[D]=V}}}};return ho.default=a,ho}var po={};const ox={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}},ax={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}},ix={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}},cx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}},lx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}},ux={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}},dx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},fx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};var um;function mx(){if(um)return po;um=1,Object.defineProperty(po,"__esModule",{value:!0});const e=ox,t=ax,r=ix,n=cx,s=lx,o=ux,a=dx,i=fx,c=["/properties"];function l(u){return[e,t,r,n,s,h(this,o),a,h(this,i)].forEach(p=>this.addMetaSchema(p,void 0,!1)),this;function h(p,v){return u?p.$dataMetaSchema(v,c):v}}return po.default=l,po}var dm;function hx(){return dm||(dm=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const r=ef(),n=nx(),s=lm(),o=mx(),a="https://json-schema.org/draft/2020-12/schema";class i extends r.default{constructor(v={}){super({...v,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(v=>this.addVocabulary(v)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:v,meta:w}=this.opts;w&&(o.default.call(this,v),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv2020=i,e.exports=t=i,e.exports.Ajv2020=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var c=hn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=ye();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var u=xs();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var h=pn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return h.default}})})(hs,hs.exports)),hs.exports}var px=hx();const gx=ji(px);var go={exports:{}},si={},fm;function vx(){return fm||(fm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(D,V){return{validate:D,compare:V}}e.fullFormats={date:t(o,a),time:t(c(!0),l),"date-time":t(p(!0),v),"iso-time":t(c(),u),"iso-date-time":t(p(),w),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:U,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:b,int32:{type:"number",validate:$},int64:{type:"number",validate:E},float:{type:"number",validate:j},double:{type:"number",validate:j},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,w),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(D){return D%4===0&&(D%100!==0||D%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(D){const V=n.exec(D);if(!V)return!1;const q=+V[1],W=+V[2],ee=+V[3];return W>=1&&W<=12&&ee>=1&&ee<=(W===2&&r(q)?29:s[W])}function a(D,V){if(D&&V)return D>V?1:D<V?-1:0}const i=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(D){return function(q){const W=i.exec(q);if(!W)return!1;const ee=+W[1],K=+W[2],se=+W[3],L=W[4],he=W[5]==="-"?-1:1,H=+(W[6]||0),C=+(W[7]||0);if(H>23||C>59||D&&!L)return!1;if(ee<=23&&K<=59&&se<60)return!0;const M=K-C*he,P=ee-H*he-(M<0?1:0);return(P===23||P===-1)&&(M===59||M===-1)&&se<61}}function l(D,V){if(!(D&&V))return;const q=new Date("2020-01-01T"+D).valueOf(),W=new Date("2020-01-01T"+V).valueOf();if(q&&W)return q-W}function u(D,V){if(!(D&&V))return;const q=i.exec(D),W=i.exec(V);if(q&&W)return D=q[1]+q[2]+q[3],V=W[1]+W[2]+W[3],D>V?1:D<V?-1:0}const h=/t|\s/i;function p(D){const V=c(D);return function(W){const ee=W.split(h);return ee.length===2&&o(ee[0])&&V(ee[1])}}function v(D,V){if(!(D&&V))return;const q=new Date(D).valueOf(),W=new Date(V).valueOf();if(q&&W)return q-W}function w(D,V){if(!(D&&V))return;const[q,W]=D.split(h),[ee,K]=V.split(h),se=a(q,ee);if(se!==void 0)return se||l(W,K)}const y=/\/|:/,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function _(D){return y.test(D)&&m.test(D)}const f=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function b(D){return f.lastIndex=0,f.test(D)}const x=-2147483648,g=2**31-1;function $(D){return Number.isInteger(D)&&D<=g&&D>=x}function E(D){return Number.isInteger(D)}function j(){return!0}const I=/[^\\]\\Z/;function U(D){if(I.test(D))return!1;try{return new RegExp(D),!0}catch{return!1}}})(si)),si}var oi={},vo={exports:{}},yo={},mm;function yx(){if(mm)return yo;mm=1,Object.defineProperty(yo,"__esModule",{value:!0});const e=sf(),t=bf(),r=Lf(),n=nm(),s=om(),o=[e.default,t.default,(0,r.default)(),n.default,s.metadataVocabulary,s.contentVocabulary];return yo.default=o,yo}const bx={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var hm;function _x(){return hm||(hm=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=ef(),n=yx(),s=lm(),o=bx,a=["/properties"],i="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(w=>this.addVocabulary(w)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const w=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(w,i,!1),this.refs["http://json-schema.org/schema"]=i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=hn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=ye();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=xs();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var p=pn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})(vo,vo.exports)),vo.exports}var pm;function xx(){return pm||(pm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=_x(),r=ye(),n=r.operators,s={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},o={message:({keyword:i,schemaCode:c})=>(0,r.str)`should be ${s[i].okStr} ${c}`,params:({keyword:i,schemaCode:c})=>(0,r._)`{comparison: ${s[i].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:o,code(i){const{gen:c,data:l,schemaCode:u,keyword:h,it:p}=i,{opts:v,self:w}=p;if(!v.validateFormats)return;const y=new t.KeywordCxt(p,w.RULES.all.format.definition,"format");y.$data?m():_();function m(){const b=c.scopeValue("formats",{ref:w.formats,code:v.code.formats}),x=c.const("fmt",(0,r._)`${b}[${y.schemaCode}]`);i.fail$data((0,r.or)((0,r._)`typeof ${x} != "object"`,(0,r._)`${x} instanceof RegExp`,(0,r._)`typeof ${x}.compare != "function"`,f(x)))}function _(){const b=y.schema,x=w.formats[b];if(!x||x===!0)return;if(typeof x!="object"||x instanceof RegExp||typeof x.compare!="function")throw new Error(`"${h}": format "${b}" does not define "compare" function`);const g=c.scopeValue("formats",{key:b,ref:x,code:v.code.formats?(0,r._)`${v.code.formats}${(0,r.getProperty)(b)}`:void 0});i.fail$data(f(g))}function f(b){return(0,r._)`${b}.compare(${l}, ${u}) ${s[h].fail} 0`}},dependencies:["format"]};const a=i=>(i.addKeyword(e.formatLimitDefinition),i);e.default=a})(oi)),oi}var gm;function wx(){return gm||(gm=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=vx(),n=xx(),s=ye(),o=new s.Name("fullFormats"),a=new s.Name("fastFormats"),i=(l,u={keywords:!0})=>{if(Array.isArray(u))return c(l,u,r.fullFormats,o),l;const[h,p]=u.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,o],v=u.formats||r.formatNames;return c(l,v,h,p),u.keywords&&(0,n.default)(l),l};i.get=(l,u="full")=>{const p=(u==="fast"?r.fastFormats:r.fullFormats)[l];if(!p)throw new Error(`Unknown format "${l}"`);return p};function c(l,u,h,p){var v,w;(v=(w=l.opts.code).formats)!==null&&v!==void 0||(w.formats=(0,s._)`require("ajv-formats/dist/formats").${p}`);for(const y of u)l.addFormat(y,h[y])}e.exports=t=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i})(go,go.exports)),go.exports}var $x=wx();const Sx=ji($x),Ex="https://json-schema.org/draft/2020-12/schema",ai=new gx;Sx(ai);function vm(e){return ai.validate(Ex,e)?null:ai.errors||[]}function kx({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:_e("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var ii="rovingFocusGroup.onEntryFocus",Cx={bubbles:!1,cancelable:!0},yn="RovingFocusGroup",[ci,ym,jx]=nc(yn),[Nx,bm]=xt(yn,[jx]),[Rx,Ax]=Nx(yn),_m=S.forwardRef((e,t)=>d.jsx(ci.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(ci.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Px,{...e,ref:t})})}));_m.displayName=yn;var Px=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...h}=e,p=S.useRef(null),v=De(t,p),w=Zo(o),[y,m]=cr({prop:a,defaultProp:i??null,onChange:c,caller:yn}),[_,f]=S.useState(!1),b=Bt(l),x=ym(r),g=S.useRef(!1),[$,E]=S.useState(0);return S.useEffect(()=>{const j=p.current;if(j)return j.addEventListener(ii,b),()=>j.removeEventListener(ii,b)},[b]),d.jsx(Rx,{scope:r,orientation:n,dir:w,loop:s,currentTabStopId:y,onItemFocus:S.useCallback(j=>m(j),[m]),onItemShiftTab:S.useCallback(()=>f(!0),[]),onFocusableItemAdd:S.useCallback(()=>E(j=>j+1),[]),onFocusableItemRemove:S.useCallback(()=>E(j=>j-1),[]),children:d.jsx(je.div,{tabIndex:_||$===0?-1:0,"data-orientation":n,...h,ref:v,style:{outline:"none",...e.style},onMouseDown:be(e.onMouseDown,()=>{g.current=!0}),onFocus:be(e.onFocus,j=>{const I=!g.current;if(j.target===j.currentTarget&&I&&!_){const U=new CustomEvent(ii,Cx);if(j.currentTarget.dispatchEvent(U),!U.defaultPrevented){const D=x().filter(K=>K.focusable),V=D.find(K=>K.active),q=D.find(K=>K.id===y),ee=[V,q,...D].filter(Boolean).map(K=>K.ref.current);$m(ee,u)}}g.current=!1}),onBlur:be(e.onBlur,()=>f(!1))})})}),xm="RovingFocusGroupItem",wm=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,children:a,...i}=e,c=Ht(),l=o||c,u=Ax(xm,r),h=u.currentTabStopId===l,p=ym(r),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:y}=u;return S.useEffect(()=>{if(n)return v(),()=>w()},[n,v,w]),d.jsx(ci.ItemSlot,{scope:r,id:l,focusable:n,active:s,children:d.jsx(je.span,{tabIndex:h?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:be(e.onMouseDown,m=>{n?u.onItemFocus(l):m.preventDefault()}),onFocus:be(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:be(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){u.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const _=Ix(m,u.orientation,u.dir);if(_!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let b=p().filter(x=>x.focusable).map(x=>x.ref.current);if(_==="last")b.reverse();else if(_==="prev"||_==="next"){_==="prev"&&b.reverse();const x=b.indexOf(m.currentTarget);b=u.loop?Dx(b,x+1):b.slice(x+1)}setTimeout(()=>$m(b))}}),children:typeof a=="function"?a({isCurrentTabStop:h,hasTabStop:y!=null}):a})})});wm.displayName=xm;var Tx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ox(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ix(e,t,r){const n=Ox(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Tx[n]}function $m(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Dx(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Mx=_m,Vx=wm,li="Radio",[Fx,Sm]=xt(li),[Lx,zx]=Fx(li),Em=S.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:o,disabled:a,value:i="on",onCheck:c,form:l,...u}=e,[h,p]=S.useState(null),v=De(t,m=>p(m)),w=S.useRef(!1),y=h?l||!!h.closest("form"):!0;return d.jsxs(Lx,{scope:r,checked:s,disabled:a,children:[d.jsx(je.button,{type:"button",role:"radio","aria-checked":s,"data-state":Nm(s),"data-disabled":a?"":void 0,disabled:a,value:i,...u,ref:v,onClick:be(e.onClick,m=>{s||c==null||c(),y&&(w.current=m.isPropagationStopped(),w.current||m.stopPropagation())})}),y&&d.jsx(jm,{control:h,bubbles:!w.current,name:n,value:i,checked:s,required:o,disabled:a,form:l,style:{transform:"translateX(-100%)"}})]})});Em.displayName=li;var km="RadioIndicator",Cm=S.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...s}=e,o=zx(km,r);return d.jsx(Qt,{present:n||o.checked,children:d.jsx(je.span,{"data-state":Nm(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});Cm.displayName=km;var qx="RadioBubbleInput",jm=S.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...s},o)=>{const a=S.useRef(null),i=De(a,o),c=ha(r),l=da(t);return S.useEffect(()=>{const u=a.current;if(!u)return;const h=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==r&&v){const w=new Event("click",{bubbles:n});v.call(u,r),u.dispatchEvent(w)}},[c,r,n]),d.jsx(je.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...s.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});jm.displayName=qx;function Nm(e){return e?"checked":"unchecked"}var Ux=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],bo="RadioGroup",[Bx]=xt(bo,[bm,Sm]),Rm=bm(),Am=Sm(),[Wx,Hx]=Bx(bo),Pm=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:o,required:a=!1,disabled:i=!1,orientation:c,dir:l,loop:u=!0,onValueChange:h,...p}=e,v=Rm(r),w=Zo(l),[y,m]=cr({prop:o,defaultProp:s??null,onChange:h,caller:bo});return d.jsx(Wx,{scope:r,name:n,required:a,disabled:i,value:y,onValueChange:m,children:d.jsx(Mx,{asChild:!0,...v,orientation:c,dir:w,loop:u,children:d.jsx(je.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":i?"":void 0,dir:w,...p,ref:t})})})});Pm.displayName=bo;var Tm="RadioGroupItem",Om=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...s}=e,o=Hx(Tm,r),a=o.disabled||n,i=Rm(r),c=Am(r),l=S.useRef(null),u=De(t,l),h=o.value===s.value,p=S.useRef(!1);return S.useEffect(()=>{const v=y=>{Ux.includes(y.key)&&(p.current=!0)},w=()=>p.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",w),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",w)}},[]),d.jsx(Vx,{asChild:!0,...i,focusable:!a,active:h,children:d.jsx(Em,{disabled:a,required:o.required,checked:h,...c,...s,name:o.name,ref:u,onCheck:()=>o.onValueChange(s.value),onKeyDown:be(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:be(s.onFocus,()=>{var v;p.current&&((v=l.current)==null||v.click())})})})});Om.displayName=Tm;var Gx="RadioGroupIndicator",Im=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,s=Am(r);return d.jsx(Cm,{...s,...n,ref:t})});Im.displayName=Gx;var Zx=Pm,Kx=Om,Yx=Im;function Jx({className:e,...t}){return d.jsx(Zx,{"data-slot":"radio-group",className:_e("grid gap-3",e),...t})}function ui({className:e,...t}){return d.jsx(Kx,{"data-slot":"radio-group-item",className:_e("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(Yx,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(by,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}const Xx=({basePath:e,readOnly:t})=>{const{control:r,setValue:n,getValues:s}=Ze(),[o,a]=Z.useState(JSON.stringify(s(`${e}.additionalProperties`),null,2)),[i,c]=Z.useState(null);tn({control:r,name:`${e}.isModifiable`});const l=tn({control:r,name:`${e}.additionalProperties`});Z.useEffect(()=>{c(null),a(JSON.stringify(l,null,2))},[l]);let u;typeof l=="boolean"?u=l?"true":"false":typeof l=="object"&&l!==null?u="schema":u="true";const h=p=>{const v=`${e}.additionalProperties`;if(p==="true")n(v,!0);else if(p==="false")n(v,!1);else{const w={type:"string"};n(v,w),a(JSON.stringify(w,null,2))}};return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Ne,{control:r,name:`${e}.minProperties`,render:({field:p})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Minimum Properties"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,value:p.value??"",onChange:v=>p.onChange(v.target.value===""?null:Number(v.target.value))})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:r,name:`${e}.maxProperties`,render:({field:p})=>d.jsxs(xe,{className:"flex-1",children:[d.jsx(we,{children:"Maximum Properties"}),d.jsx(ke,{children:d.jsx(Te,{type:"number",disabled:t,value:p.value??"",onChange:v=>p.onChange(v.target.value===""?null:Number(v.target.value))})}),d.jsx(Ce,{})]})})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(we,{children:"Additional Properties"}),d.jsxs(Jx,{value:u,onValueChange:h,className:"flex space-x-4 pt-2",disabled:t,children:[d.jsxs(xe,{className:"flex items-center space-x-2",children:[d.jsx(ui,{value:"true",id:"ap-true"}),d.jsx(we,{htmlFor:"ap-true",className:"font-normal",children:"Allow (true)"})]}),d.jsxs(xe,{className:"flex items-center space-x-2",children:[d.jsx(ui,{value:"false",id:"ap-false"}),d.jsx(we,{htmlFor:"ap-false",className:"font-normal",children:"Disallow (false)"})]}),d.jsxs(xe,{className:"flex items-center space-x-2",children:[d.jsx(ui,{value:"schema",id:"ap-schema"}),d.jsx(we,{htmlFor:"ap-schema",className:"font-normal",children:"Specify Schema"})]})]}),d.jsx(Ce,{})]}),u==="schema"&&d.jsxs(xe,{children:[d.jsx(ke,{children:d.jsx(kx,{"data-testid":"schema-textarea",rows:6,disabled:t,className:"font-mono",value:o,onChange:p=>{const v=p.target.value;a(v);try{const w=JSON.parse(v),y=vm(w);if(y){const m=y.map(_=>`${_.instancePath} - ${_.message}`);c(m)}else n(`${e}.additionalProperties`,w)}catch{c(["Invalid schema structure."])}}})}),i&&i.length>0&&d.jsx("div",{className:"mt-2 text-sm font-medium text-destructive",children:i.map((p,v)=>d.jsx("p",{children:p},v))})]}),d.jsx(Ne,{control:r,name:`${e}."x-modifiable"`,render:({field:p})=>d.jsxs(xe,{className:"mt-2",children:[d.jsx(we,{children:"Modifiable Properties"}),d.jsx(ke,{children:d.jsx(fn,{disabled:t,value:p.value||[],onValueChange:p.onChange,placeholder:"Enter your modifiable properties"})}),d.jsx(Ce,{})]})})]})},Qx=({basePath:e,readOnly:t})=>{const{control:r}=Ze();return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(Ne,{control:r,name:`${e}["$schema"]`,render:({field:n})=>d.jsxs(xe,{children:[d.jsx(we,{children:"$schema"}),d.jsx(ke,{children:d.jsx(Te,{placeholder:"e.g., http://json-schema.org/draft/2020-12/schema",disabled:t,...n,value:n.value??"http://json-schema.org/draft/2020-12/schema"})}),d.jsx(Ce,{})]})}),d.jsx(Ne,{control:r,name:`${e}["$id"]`,render:({field:n})=>d.jsxs(xe,{children:[d.jsx(we,{children:"$id"}),d.jsx(ke,{children:d.jsx(Te,{disabled:t,...n,value:n.value??""})}),d.jsx(Ce,{})]})})]})};var ew=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tw=ew.reduce((e,t)=>{const r=Aa(`Primitive.${t}`),n=S.forwardRef((s,o)=>{const{asChild:a,...i}=s,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),rw="Separator",Dm="horizontal",nw=["horizontal","vertical"],Mm=S.forwardRef((e,t)=>{const{decorative:r,orientation:n=Dm,...s}=e,o=sw(n)?n:Dm,i=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return d.jsx(tw.div,{"data-orientation":o,...i,...s,ref:t})});Mm.displayName=rw;function sw(e){return nw.includes(e)}var ow=Mm;function aw({className:e,orientation:t="horizontal",decorative:r=!0,...n}){return d.jsx(ow,{"data-slot":"separator",decorative:r,orientation:t,className:_e("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n})}const iw=({theme:e,basePath:t,readOnly:r})=>{const{watch:n}=Ze(),s=n(`${t}.type`),o=()=>{switch(s){case"number":return d.jsx(c0,{theme:e,basePath:t,readOnly:r});case"integer":return d.jsx(f0,{theme:e,basePath:t,readOnly:r});case"string":return d.jsx(l0,{theme:e,basePath:t,readOnly:r});case"boolean":return d.jsx(u0,{theme:e,basePath:t,readOnly:r});case"array":return d.jsx(d0,{theme:e,basePath:t,readOnly:r});case"object":return d.jsx(Xx,{theme:e,basePath:t,readOnly:r});default:return d.jsx(d.Fragment,{children:`Settings for type ${s} are not yet implemented.`})}};return d.jsxs("div",{children:[t==="root"&&d.jsxs(d.Fragment,{children:[d.jsx(Qx,{theme:e,basePath:t,readOnly:r}),d.jsx(aw,{className:"my-4"})]}),o()]})};function cw({...e}){return d.jsx(Gu,{"data-slot":"dialog",...e})}function lw({...e}){return d.jsx(Zu,{"data-slot":"dialog-portal",...e})}function uw({className:e,...t}){return d.jsx(Ku,{"data-slot":"dialog-overlay",className:_e("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function dw({className:e,children:t,showCloseButton:r=!0,...n}){return d.jsxs(lw,{"data-slot":"dialog-portal",children:[d.jsx(uw,{}),d.jsxs(Yu,{"data-slot":"dialog-content",className:_e("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,r&&d.jsxs(qa,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[d.jsx(Hl,{}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function fw({className:e,...t}){return d.jsx("div",{"data-slot":"dialog-header",className:_e("flex flex-col gap-2 text-center sm:text-left",e),...t})}function mw({className:e,...t}){return d.jsx(Ju,{"data-slot":"dialog-title",className:_e("text-lg leading-none font-semibold",e),...t})}const hw=({theme:e,readOnly:t,className:r,isOpen:n,fieldPath:s,onClose:o})=>{const{getValues:a}=Ze(),i=s?a(s):null;return d.jsx(cw,{open:n,onOpenChange:c=>!c&&o(),children:d.jsxs(dw,{className:_e("bg-background text-foreground border-input",e,r),children:[d.jsx(fw,{children:d.jsxs(mw,{className:"capitalize",children:[i==null?void 0:i.type," Schema Settings"]})}),s&&d.jsx(iw,{basePath:s,theme:e,readOnly:t}),d.jsx(Xt,{onClick:o,variant:"default",children:"Close"})]})})},Vm=(e,t,r)=>{if(e&&"reportValidity"in e){const n=te(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},di=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Vm(n.ref,r,e):n&&n.refs&&n.refs.forEach(s=>Vm(s,r,e))}},Fm=(e,t)=>{t.shouldUseNativeValidation&&di(e,t);const r={};for(const n in e){const s=te(t.fields,n),o=Object.assign(e[n]||{},{ref:s&&s.ref});if(pw(t.names||Object.keys(e),n)){const a=Object.assign({},te(r,n));Ie(a,"root",o),Ie(r,n,a)}else Ie(r,n,o)}return r},pw=(e,t)=>{const r=Lm(t);return e.some(n=>Lm(n).match(`^${r}\\.\\d+`))};function Lm(e){return e.replace(/\]|\[/g,"")}function zm(e,t,r){function n(i,c){var l;Object.defineProperty(i,"_zod",{value:i._zod??{},enumerable:!1}),(l=i._zod).traits??(l.traits=new Set),i._zod.traits.add(e),t(i,c);for(const u in a.prototype)u in i||Object.defineProperty(i,u,{value:a.prototype[u].bind(i)});i._zod.constr=a,i._zod.def=c}const s=(r==null?void 0:r.Parent)??Object;class o extends s{}Object.defineProperty(o,"name",{value:e});function a(i){var c;const l=r!=null&&r.Parent?new o:this;n(l,i),(c=l._zod).deferred??(c.deferred=[]);for(const u of l._zod.deferred)u();return l}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:i=>{var c,l;return r!=null&&r.Parent&&i instanceof r.Parent?!0:(l=(c=i==null?void 0:i._zod)==null?void 0:c.traits)==null?void 0:l.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}class gw extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const vw={};function qm(e){return vw}function yw(e,t){return typeof t=="bigint"?t.toString():t}const Um=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function _o(e){return typeof e=="string"?e:e==null?void 0:e.message}function Bm(e,t,r){var s,o,a,i,c,l;const n={...e,path:e.path??[]};if(!e.message){const u=_o((a=(o=(s=e.inst)==null?void 0:s._zod.def)==null?void 0:o.error)==null?void 0:a.call(o,e))??_o((i=t==null?void 0:t.error)==null?void 0:i.call(t,e))??_o((c=r.customError)==null?void 0:c.call(r,e))??_o((l=r.localeError)==null?void 0:l.call(r,e))??"Invalid input";n.message=u}return delete n.inst,delete n.continue,t!=null&&t.reportInput||delete n.input,n}const Wm=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,yw,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},bw=zm("$ZodError",Wm),Hm=zm("$ZodError",Wm,{Parent:Error}),_w=(e=>(t,r,n,s)=>{const o=n?Object.assign(n,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new gw;if(a.issues.length){const i=new((s==null?void 0:s.Err)??e)(a.issues.map(c=>Bm(c,o,qm())));throw Um(i,s==null?void 0:s.callee),i}return a.value})(Hm),xw=(e=>async(t,r,n,s)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const i=new((s==null?void 0:s.Err)??e)(a.issues.map(c=>Bm(c,o,qm())));throw Um(i,s==null?void 0:s.callee),i}return a.value})(Hm);function Gm(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function ww(e,t){for(var r={};e.length;){var n=e[0],s=n.code,o=n.message,a=n.path.join(".");if(!r[a])if("unionErrors"in n){var i=n.unionErrors[0].errors[0];r[a]={message:i.message,type:i.code}}else r[a]={message:o,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(u){return u.errors.forEach(function(h){return e.push(h)})}),t){var c=r[a].types,l=c&&c[n.code];r[a]=To(a,t,r,s,l?[].concat(l,n.message):n.message)}e.shift()}return r}function $w(e,t){for(var r={};e.length;){var n=e[0],s=n.code,o=n.message,a=n.path.join(".");if(!r[a])if(n.code==="invalid_union"&&n.errors.length>0){var i=n.errors[0][0];r[a]={message:i.message,type:i.code}}else r[a]={message:o,type:s};if(n.code==="invalid_union"&&n.errors.forEach(function(u){return u.forEach(function(h){return e.push(h)})}),t){var c=r[a].types,l=c&&c[n.code];r[a]=To(a,t,r,s,l?[].concat(l,n.message):n.message)}e.shift()}return r}function Sw(e,t,r){if(r===void 0&&(r={}),(function(n){return"_def"in n&&typeof n._def=="object"&&"typeName"in n._def})(e))return function(n,s,o){try{return Promise.resolve(Gm(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(a){return o.shouldUseNativeValidation&&di({},o),{errors:{},values:r.raw?Object.assign({},n):a}})},function(a){if((function(i){return Array.isArray(i==null?void 0:i.issues)})(a))return{values:{},errors:Fm(ww(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,s,o){try{return Promise.resolve(Gm(function(){return Promise.resolve((r.mode==="sync"?_w:xw)(e,n,t)).then(function(a){return o.shouldUseNativeValidation&&di({},o),{errors:{},values:r.raw?Object.assign({},n):a}})},function(a){if((function(i){return i instanceof bw})(a))return{values:{},errors:Fm($w(a.issues,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}var Oe;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const o={};for(const a of s)o[a]=a;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(i=>typeof s[s[i]]!="number"),a={};for(const i of o)a[i]=s[i];return e.objectValues(a)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&o.push(a);return o},e.find=(s,o)=>{for(const a of s)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Oe||(Oe={}));var Zm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Zm||(Zm={}));const ue=Oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),rr=e=>{switch(typeof e){case"undefined":return ue.undefined;case"string":return ue.string;case"number":return Number.isNaN(e)?ue.nan:ue.number;case"boolean":return ue.boolean;case"function":return ue.function;case"bigint":return ue.bigint;case"symbol":return ue.symbol;case"object":return Array.isArray(e)?ue.array:e===null?ue.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ue.promise:typeof Map<"u"&&e instanceof Map?ue.map:typeof Set<"u"&&e instanceof Set?ue.set:typeof Date<"u"&&e instanceof Date?ue.date:ue.object;default:return ue.unknown}},Q=Oe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ft extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let i=n,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(i[l]=i[l]||{_errors:[]},i[l]._errors.push(r(a))):i[l]=i[l]||{_errors:[]},i=i[l],c++}}};return s(this),n}static assert(t){if(!(t instanceof Ft))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];r[o]=r[o]||[],r[o].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Ft.create=e=>new Ft(e);const fi=(e,t)=>{let r;switch(e.code){case Q.invalid_type:e.received===ue.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Q.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Oe.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:r=`Unrecognized key(s) in object: ${Oe.joinValues(e.keys,", ")}`;break;case Q.invalid_union:r="Invalid input";break;case Q.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Oe.joinValues(e.options)}`;break;case Q.invalid_enum_value:r=`Invalid enum value. Expected ${Oe.joinValues(e.options)}, received '${e.received}'`;break;case Q.invalid_arguments:r="Invalid function arguments";break;case Q.invalid_return_type:r="Invalid function return type";break;case Q.invalid_date:r="Invalid date";break;case Q.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Oe.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Q.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Q.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Q.custom:r="Invalid input";break;case Q.invalid_intersection_types:r="Intersection results could not be merged";break;case Q.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Q.not_finite:r="Number must be finite";break;default:r=t.defaultError,Oe.assertNever(e)}return{message:r}};let Ew=fi;function kw(){return Ew}const Cw=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],a={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let i="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)i=l(a,{data:t,defaultError:i}).message;return{...s,path:o,message:i}};function ae(e,t){const r=kw(),n=Cw({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===fi?void 0:fi].filter(s=>!!s)});e.common.issues.push(n)}class Xe{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const s of r){if(s.status==="aborted")return ve;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const o=await s.key,a=await s.value;n.push({key:o,value:a})}return Xe.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:o,value:a}=s;if(o.status==="aborted"||a.status==="aborted")return ve;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(n[o.value]=a.value)}return{status:t.value,value:n}}}const ve=Object.freeze({status:"aborted"}),bn=e=>({status:"dirty",value:e}),ut=e=>({status:"valid",value:e}),Km=e=>e.status==="aborted",Ym=e=>e.status==="dirty",Br=e=>e.status==="valid",xo=e=>typeof Promise<"u"&&e instanceof Promise;var fe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(fe||(fe={}));class jt{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Jm=(e,t)=>{if(Br(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Ft(e.common.issues);return this._error=r,this._error}}};function $e(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(a,i)=>{const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??i.defaultError}:typeof i.data>"u"?{message:c??n??i.defaultError}:a.code!=="invalid_type"?{message:i.defaultError}:{message:c??r??i.defaultError}},description:s}}class Ae{get description(){return this._def.description}_getType(t){return rr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:rr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Xe,ctx:{common:t.parent.common,data:t.data,parsedType:rr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(xo(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rr(t)},s=this._parseSync({data:t,path:n.path,parent:n});return Jm(n,s)}"~validate"(t){var n,s;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rr(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:r});return Br(o)?{value:o.value}:{issues:r.common.issues}}catch(o){(s=(n=o==null?void 0:o.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>Br(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rr(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(xo(s)?s:Promise.resolve(s));return Jm(n,o)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{const a=t(s),i=()=>o.addIssue({code:Q.custom,...n(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(i(),!1)):a?!0:(i(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Zr({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return sr.create(this,this._def)}nullable(){return Kr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Nt.create(this)}promise(){return ko.create(this,this._def)}or(t){return $o.create([this,t],this._def)}and(t){return So.create(this,t,this._def)}transform(t){return new Zr({...$e(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new yi({...$e(this._def),innerType:this,defaultValue:r,typeName:pe.ZodDefault})}brand(){return new Yw({typeName:pe.ZodBranded,type:this,...$e(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new bi({...$e(this._def),innerType:this,catchValue:r,typeName:pe.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return _i.create(this,t)}readonly(){return xi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const jw=/^c[^\s-]{8,}$/i,Nw=/^[0-9a-z]+$/,Rw=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Aw=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Pw=/^[a-z0-9_-]{21}$/i,Tw=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ow=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Iw=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Dw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let mi;const Mw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Vw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Fw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Lw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zw=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,qw=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Xm="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Uw=new RegExp(`^${Xm}$`);function Qm(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function Bw(e){return new RegExp(`^${Qm(e)}$`)}function Ww(e){let t=`${Xm}T${Qm(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Hw(e,t){return!!((t==="v4"||!t)&&Mw.test(e)||(t==="v6"||!t)&&Fw.test(e))}function Gw(e,t){if(!Tw.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function Zw(e,t){return!!((t==="v4"||!t)&&Vw.test(e)||(t==="v6"||!t)&&Lw.test(e))}class Lt extends Ae{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ue.string){const o=this._getOrReturnCtx(t);return ae(o,{code:Q.invalid_type,expected:ue.string,received:o.parsedType}),ve}const n=new Xe;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,i=t.data.length<o.value;(a||i)&&(s=this._getOrReturnCtx(t,s),a?ae(s,{code:Q.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&ae(s,{code:Q.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")Iw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"email",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")mi||(mi=new RegExp(Dw,"u")),mi.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"emoji",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Aw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"uuid",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")Pw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"nanoid",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")jw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"cuid",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Nw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"cuid2",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Rw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"ulid",code:Q.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ae(s,{validation:"url",code:Q.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"regex",code:Q.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Ww(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?Uw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?Bw(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Ow.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"duration",code:Q.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?Hw(t.data,o.version)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"ip",code:Q.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?Gw(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"jwt",code:Q.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?Zw(t.data,o.version)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"cidr",code:Q.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?zw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"base64",code:Q.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?qw.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"base64url",code:Q.invalid_string,message:o.message}),n.dirty()):Oe.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:Q.invalid_string,...fe.errToObj(n)})}_addCheck(t){return new Lt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...fe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...fe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...fe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...fe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...fe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...fe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...fe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...fe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...fe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...fe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...fe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...fe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...fe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...fe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...fe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...fe.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...fe.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...fe.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...fe.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...fe.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...fe.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...fe.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...fe.errToObj(r)})}nonempty(t){return this.min(1,fe.errToObj(t))}trim(){return new Lt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Lt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Lt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Lt.create=e=>new Lt({checks:[],typeName:pe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...$e(e)});function Kw(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=Number.parseInt(e.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return o%a/10**s}class Wr extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ue.number){const o=this._getOrReturnCtx(t);return ae(o,{code:Q.invalid_type,expected:ue.number,received:o.parsedType}),ve}let n;const s=new Xe;for(const o of this._def.checks)o.kind==="int"?Oe.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?Kw(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.not_finite,message:o.message}),s.dirty()):Oe.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,fe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,fe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,fe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,fe.toString(r))}setLimit(t,r,n,s){return new Wr({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:fe.toString(s)}]})}_addCheck(t){return new Wr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:fe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:fe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Oe.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}Wr.create=e=>new Wr({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class _n extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ue.bigint)return this._getInvalidInput(t);let n;const s=new Xe;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),ae(n,{code:Q.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Oe.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return ae(r,{code:Q.invalid_type,expected:ue.bigint,received:r.parsedType}),ve}gte(t,r){return this.setLimit("min",t,!0,fe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,fe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,fe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,fe.toString(r))}setLimit(t,r,n,s){return new _n({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:fe.toString(s)}]})}_addCheck(t){return new _n({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}_n.create=e=>new _n({checks:[],typeName:pe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...$e(e)});class hi extends Ae{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ue.boolean){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.boolean,received:n.parsedType}),ve}return ut(t.data)}}hi.create=e=>new hi({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class wo extends Ae{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ue.date){const o=this._getOrReturnCtx(t);return ae(o,{code:Q.invalid_type,expected:ue.date,received:o.parsedType}),ve}if(Number.isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ae(o,{code:Q.invalid_date}),ve}const n=new Xe;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Q.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):Oe.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new wo({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:fe.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:fe.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}wo.create=e=>new wo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pe.ZodDate,...$e(e)});class eh extends Ae{_parse(t){if(this._getType(t)!==ue.symbol){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.symbol,received:n.parsedType}),ve}return ut(t.data)}}eh.create=e=>new eh({typeName:pe.ZodSymbol,...$e(e)});class th extends Ae{_parse(t){if(this._getType(t)!==ue.undefined){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.undefined,received:n.parsedType}),ve}return ut(t.data)}}th.create=e=>new th({typeName:pe.ZodUndefined,...$e(e)});class rh extends Ae{_parse(t){if(this._getType(t)!==ue.null){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.null,received:n.parsedType}),ve}return ut(t.data)}}rh.create=e=>new rh({typeName:pe.ZodNull,...$e(e)});class pi extends Ae{constructor(){super(...arguments),this._any=!0}_parse(t){return ut(t.data)}}pi.create=e=>new pi({typeName:pe.ZodAny,...$e(e)});class nh extends Ae{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ut(t.data)}}nh.create=e=>new nh({typeName:pe.ZodUnknown,...$e(e)});class nr extends Ae{_parse(t){const r=this._getOrReturnCtx(t);return ae(r,{code:Q.invalid_type,expected:ue.never,received:r.parsedType}),ve}}nr.create=e=>new nr({typeName:pe.ZodNever,...$e(e)});class sh extends Ae{_parse(t){if(this._getType(t)!==ue.undefined){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.void,received:n.parsedType}),ve}return ut(t.data)}}sh.create=e=>new sh({typeName:pe.ZodVoid,...$e(e)});class Nt extends Ae{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==ue.array)return ae(r,{code:Q.invalid_type,expected:ue.array,received:r.parsedType}),ve;if(s.exactLength!==null){const a=r.data.length>s.exactLength.value,i=r.data.length<s.exactLength.value;(a||i)&&(ae(r,{code:a?Q.too_big:Q.too_small,minimum:i?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(ae(r,{code:Q.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(ae(r,{code:Q.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,i)=>s.type._parseAsync(new jt(r,a,r.path,i)))).then(a=>Xe.mergeArray(n,a));const o=[...r.data].map((a,i)=>s.type._parseSync(new jt(r,a,r.path,i)));return Xe.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new Nt({...this._def,minLength:{value:t,message:fe.toString(r)}})}max(t,r){return new Nt({...this._def,maxLength:{value:t,message:fe.toString(r)}})}length(t,r){return new Nt({...this._def,exactLength:{value:t,message:fe.toString(r)}})}nonempty(t){return this.min(1,t)}}Nt.create=(e,t)=>new Nt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...$e(t)});function Hr(e){if(e instanceof We){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=sr.create(Hr(n))}return new We({...e._def,shape:()=>t})}else return e instanceof Nt?new Nt({...e._def,type:Hr(e.element)}):e instanceof sr?sr.create(Hr(e.unwrap())):e instanceof Kr?Kr.create(Hr(e.unwrap())):e instanceof gr?gr.create(e.items.map(t=>Hr(t))):e}class We extends Ae{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Oe.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ue.object){const l=this._getOrReturnCtx(t);return ae(l,{code:Q.invalid_type,expected:ue.object,received:l.parsedType}),ve}const{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),i=[];if(!(this._def.catchall instanceof nr&&this._def.unknownKeys==="strip"))for(const l in s.data)a.includes(l)||i.push(l);const c=[];for(const l of a){const u=o[l],h=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new jt(s,h,s.path,l)),alwaysSet:l in s.data})}if(this._def.catchall instanceof nr){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of i)c.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(l==="strict")i.length>0&&(ae(s,{code:Q.unrecognized_keys,keys:i}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of i){const h=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new jt(s,h,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const h=await u.key,p=await u.value;l.push({key:h,value:p,alwaysSet:u.alwaysSet})}return l}).then(l=>Xe.mergeObjectSync(n,l)):Xe.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return fe.errToObj,new We({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var o,a;const s=((a=(o=this._def).errorMap)==null?void 0:a.call(o,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:fe.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new We({...this._def,unknownKeys:"strip"})}passthrough(){return new We({...this._def,unknownKeys:"passthrough"})}extend(t){return new We({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new We({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pe.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new We({...this._def,catchall:t})}pick(t){const r={};for(const n of Oe.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new We({...this._def,shape:()=>r})}omit(t){const r={};for(const n of Oe.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new We({...this._def,shape:()=>r})}deepPartial(){return Hr(this)}partial(t){const r={};for(const n of Oe.objectKeys(this.shape)){const s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new We({...this._def,shape:()=>r})}required(t){const r={};for(const n of Oe.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof sr;)o=o._def.innerType;r[n]=o}return new We({...this._def,shape:()=>r})}keyof(){return ih(Oe.objectKeys(this.shape))}}We.create=(e,t)=>new We({shape:()=>e,unknownKeys:"strip",catchall:nr.create(),typeName:pe.ZodObject,...$e(t)}),We.strictCreate=(e,t)=>new We({shape:()=>e,unknownKeys:"strict",catchall:nr.create(),typeName:pe.ZodObject,...$e(t)}),We.lazycreate=(e,t)=>new We({shape:e,unknownKeys:"strip",catchall:nr.create(),typeName:pe.ZodObject,...$e(t)});class $o extends Ae{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(const i of o)if(i.result.status==="valid")return i.result;for(const i of o)if(i.result.status==="dirty")return r.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(i=>new Ft(i.ctx.common.issues));return ae(r,{code:Q.invalid_union,unionErrors:a}),ve}if(r.common.async)return Promise.all(n.map(async o=>{const a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(s);{let o;const a=[];for(const c of n){const l={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(c=>new Ft(c));return ae(r,{code:Q.invalid_union,unionErrors:i}),ve}}get options(){return this._def.options}}$o.create=(e,t)=>new $o({options:e,typeName:pe.ZodUnion,...$e(t)});function gi(e,t){const r=rr(e),n=rr(t);if(e===t)return{valid:!0,data:e};if(r===ue.object&&n===ue.object){const s=Oe.objectKeys(t),o=Oe.objectKeys(e).filter(i=>s.indexOf(i)!==-1),a={...e,...t};for(const i of o){const c=gi(e[i],t[i]);if(!c.valid)return{valid:!1};a[i]=c.data}return{valid:!0,data:a}}else if(r===ue.array&&n===ue.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const a=e[o],i=t[o],c=gi(a,i);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===ue.date&&n===ue.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class So extends Ae{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=(o,a)=>{if(Km(o)||Km(a))return ve;const i=gi(o.value,a.value);return i.valid?((Ym(o)||Ym(a))&&r.dirty(),{status:r.value,value:i.data}):(ae(n,{code:Q.invalid_intersection_types}),ve)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,a])=>s(o,a)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}So.create=(e,t,r)=>new So({left:e,right:t,typeName:pe.ZodIntersection,...$e(r)});class gr extends Ae{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ue.array)return ae(n,{code:Q.invalid_type,expected:ue.array,received:n.parsedType}),ve;if(n.data.length<this._def.items.length)return ae(n,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&n.data.length>this._def.items.length&&(ae(n,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...n.data].map((a,i)=>{const c=this._def.items[i]||this._def.rest;return c?c._parse(new jt(n,a,n.path,i)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>Xe.mergeArray(r,a)):Xe.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new gr({...this._def,rest:t})}}gr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new gr({items:e,typeName:pe.ZodTuple,rest:null,...$e(t)})};class Eo extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ue.object)return ae(n,{code:Q.invalid_type,expected:ue.object,received:n.parsedType}),ve;const s=[],o=this._def.keyType,a=this._def.valueType;for(const i in n.data)s.push({key:o._parse(new jt(n,i,n.path,i)),value:a._parse(new jt(n,n.data[i],n.path,i)),alwaysSet:i in n.data});return n.common.async?Xe.mergeObjectAsync(r,s):Xe.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Ae?new Eo({keyType:t,valueType:r,typeName:pe.ZodRecord,...$e(n)}):new Eo({keyType:Lt.create(),valueType:t,typeName:pe.ZodRecord,...$e(r)})}}class oh extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ue.map)return ae(n,{code:Q.invalid_type,expected:ue.map,received:n.parsedType}),ve;const s=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([i,c],l)=>({key:s._parse(new jt(n,i,n.path,[l,"key"])),value:o._parse(new jt(n,c,n.path,[l,"value"]))}));if(n.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return ve;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),i.set(l.value,u.value)}return{status:r.value,value:i}})}else{const i=new Map;for(const c of a){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return ve;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),i.set(l.value,u.value)}return{status:r.value,value:i}}}}oh.create=(e,t,r)=>new oh({valueType:t,keyType:e,typeName:pe.ZodMap,...$e(r)});class xn extends Ae{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ue.set)return ae(n,{code:Q.invalid_type,expected:ue.set,received:n.parsedType}),ve;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(ae(n,{code:Q.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(ae(n,{code:Q.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const o=this._def.valueType;function a(c){const l=new Set;for(const u of c){if(u.status==="aborted")return ve;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}const i=[...n.data.values()].map((c,l)=>o._parse(new jt(n,c,n.path,l)));return n.common.async?Promise.all(i).then(c=>a(c)):a(i)}min(t,r){return new xn({...this._def,minSize:{value:t,message:fe.toString(r)}})}max(t,r){return new xn({...this._def,maxSize:{value:t,message:fe.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}xn.create=(e,t)=>new xn({valueType:e,minSize:null,maxSize:null,typeName:pe.ZodSet,...$e(t)});class vi extends Ae{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}vi.create=(e,t)=>new vi({getter:e,typeName:pe.ZodLazy,...$e(t)});class ah extends Ae{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return ae(r,{received:r.data,code:Q.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}ah.create=(e,t)=>new ah({value:e,typeName:pe.ZodLiteral,...$e(t)});function ih(e,t){return new Gr({values:e,typeName:pe.ZodEnum,...$e(t)})}class Gr extends Ae{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return ae(r,{expected:Oe.joinValues(n),received:r.parsedType,code:Q.invalid_type}),ve}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return ae(r,{received:r.data,code:Q.invalid_enum_value,options:n}),ve}return ut(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return Gr.create(t,{...this._def,...r})}exclude(t,r=this._def){return Gr.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}Gr.create=ih;class ch extends Ae{_parse(t){const r=Oe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==ue.string&&n.parsedType!==ue.number){const s=Oe.objectValues(r);return ae(n,{expected:Oe.joinValues(s),received:n.parsedType,code:Q.invalid_type}),ve}if(this._cache||(this._cache=new Set(Oe.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=Oe.objectValues(r);return ae(n,{received:n.data,code:Q.invalid_enum_value,options:s}),ve}return ut(t.data)}get enum(){return this._def.values}}ch.create=(e,t)=>new ch({values:e,typeName:pe.ZodNativeEnum,...$e(t)});class ko extends Ae{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ue.promise&&r.common.async===!1)return ae(r,{code:Q.invalid_type,expected:ue.promise,received:r.parsedType}),ve;const n=r.parsedType===ue.promise?r.data:Promise.resolve(r.data);return ut(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ko.create=(e,t)=>new ko({type:e,typeName:pe.ZodPromise,...$e(t)});class Zr extends Ae{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:a=>{ae(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const a=s.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async i=>{if(r.value==="aborted")return ve;const c=await this._def.schema._parseAsync({data:i,path:n.path,parent:n});return c.status==="aborted"?ve:c.status==="dirty"||r.value==="dirty"?bn(c.value):c});{if(r.value==="aborted")return ve;const i=this._def.schema._parseSync({data:a,path:n.path,parent:n});return i.status==="aborted"?ve:i.status==="dirty"||r.value==="dirty"?bn(i.value):i}}if(s.type==="refinement"){const a=i=>{const c=s.refinement(i,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?ve:(i.status==="dirty"&&r.dirty(),a(i.value),{status:r.value,value:i.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>i.status==="aborted"?ve:(i.status==="dirty"&&r.dirty(),a(i.value).then(()=>({status:r.value,value:i.value}))))}if(s.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Br(a))return ve;const i=s.transform(a.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:i}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>Br(a)?Promise.resolve(s.transform(a.value,o)).then(i=>({status:r.value,value:i})):ve);Oe.assertNever(s)}}Zr.create=(e,t,r)=>new Zr({schema:e,typeName:pe.ZodEffects,effect:t,...$e(r)}),Zr.createWithPreprocess=(e,t,r)=>new Zr({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,...$e(r)});class sr extends Ae{_parse(t){return this._getType(t)===ue.undefined?ut(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}sr.create=(e,t)=>new sr({innerType:e,typeName:pe.ZodOptional,...$e(t)});class Kr extends Ae{_parse(t){return this._getType(t)===ue.null?ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Kr.create=(e,t)=>new Kr({innerType:e,typeName:pe.ZodNullable,...$e(t)});class yi extends Ae{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===ue.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}yi.create=(e,t)=>new yi({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class bi extends Ae{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return xo(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ft(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ft(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}bi.create=(e,t)=>new bi({innerType:e,typeName:pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class lh extends Ae{_parse(t){if(this._getType(t)!==ue.nan){const n=this._getOrReturnCtx(t);return ae(n,{code:Q.invalid_type,expected:ue.nan,received:n.parsedType}),ve}return{status:"valid",value:t.data}}}lh.create=e=>new lh({typeName:pe.ZodNaN,...$e(e)});class Yw extends Ae{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class _i extends Ae{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?ve:o.status==="dirty"?(r.dirty(),bn(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?ve:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new _i({in:t,out:r,typeName:pe.ZodPipeline})}}class xi extends Ae{_parse(t){const r=this._def.innerType._parse(t),n=s=>(Br(s)&&(s.value=Object.freeze(s.value)),s);return xo(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}xi.create=(e,t)=>new xi({innerType:e,typeName:pe.ZodReadonly,...$e(t)});var pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(pe||(pe={}));const _t=Lt.create,ct=Wr.create,Co=hi.create,uh=pi.create;nr.create;const wn=Nt.create,wi=We.create,dh=$o.create;So.create,gr.create;const Jw=Eo.create,$i=vi.create,Xw=Gr.create;ko.create,sr.create,Kr.create;const Yr=wi({type:Xw(["string","number","integer","boolean","object","array"]).optional(),title:_t().optional(),description:_t().optional(),default:uh().optional(),minimum:ct().optional(),maximum:ct().optional(),exclusiveMin:ct().optional(),exclusiveMax:ct().optional(),multipleOf:ct().optional(),minLength:ct().optional(),maxLength:ct().optional(),minContains:ct().optional(),maxContains:ct().optional(),minProperties:ct().optional(),maxProperties:ct().optional(),isModifiable:Co().optional(),"x-modifiable":wn(_t()).optional(),pattern:_t().optional(),format:_t().optional(),minItems:ct().optional(),maxItems:ct().optional(),uniqueItems:Co().optional(),enum:wn(uh()).optional(),$id:_t().optional(),$schema:_t().optional()}).extend({properties:$i(()=>Jw(_t(),Yr)).optional(),items:$i(()=>dh([Yr,wn(Yr)])).optional(),required:wn(_t()).optional(),additionalProperties:$i(()=>dh([Co(),Yr])).optional()}),Qw=wi({root:Yr,properties:wn(wi({id:_t(),key:_t().min(1),isRequired:Co(),schema:Yr}))}),e$=e=>{const t=o=>{const a={...o};if(Array.isArray(a.properties)){const i={},c=[];a.properties.forEach(l=>{l.key&&(i[l.key]=t(l.schema),l.isRequired&&c.push(l.key))}),a.properties=i,c.length>0&&(a.required=c)}return typeof a.items=="object"&&a.items!==null&&!Array.isArray(a.items)?a.items=t(a.items):Array.isArray(a.items)&&(a.items=a.items.map(i=>t(i))),a},r={...t(e.root)},n={},s=[];return e.properties.forEach(o=>{o.key&&(n[o.key]=t(o.schema),o.isRequired&&s.push(o.key))}),Object.keys(n).length>0&&(r.properties=n),s.length>0&&(r.required=s),r},t$=e=>{const t=i=>{const c={...i};if(typeof c.properties=="object"&&!Array.isArray(c.properties)){const l=[];Object.keys(c.properties).forEach(u=>{var p;const h=c.properties[u];l.push({id:nn(6),key:u,isRequired:((p=c.required)==null?void 0:p.includes(u))||!1,schema:t(h)})}),c.properties=l}return typeof c.items=="object"&&c.items!==null&&!Array.isArray(c.items)?c.items=t(c.items):Array.isArray(c.items)&&(c.items=c.items.map(l=>t(l))),c},{properties:r,required:n,...s}=e,a=t({properties:r,required:n});return{root:{...s,...a.root},properties:a.properties||[]}},r$=({rootType:e="object",defaultValue:t})=>{const r=nn(6),n=Dh({resolver:Sw(Qw),defaultValues:t?t$(t):{root:{type:e,$schema:"http://json-schema.org/draft/2020-12/schema",...e==="object"&&{additionalProperties:!0},...e==="array"&&{items:{type:"string"}}},properties:e==="object"?[{id:r,key:`field_${r}`,isRequired:!1,schema:{type:"number"}}]:[]}}),s=n.watch(),o=Z.useMemo(()=>e$(s),[s]);return{methods:n,jsonSchema:o}},n$=({textAreaRef:e,triggerAutoSize:t,maxHeight:r=Number.MAX_SAFE_INTEGER,minHeight:n=0})=>{const[s,o]=S.useState(!0);S.useEffect(()=>{const i=e.current;if(i){s&&(i.style.minHeight=`${n+6}px`,r>n&&(i.style.maxHeight=`${r}px`),o(!1)),i.style.height=`${n+6}px`;const c=i.scrollHeight;c>r?i.style.height=`${r}px`:i.style.height=`${c+6}px`}},[e.current,t])},fh=S.forwardRef(({maxHeight:e=Number.MAX_SAFE_INTEGER,minHeight:t=52,className:r,onChange:n,value:s,...o},a)=>{const i=S.useRef(null),[c,l]=S.useState("");return n$({textAreaRef:i,triggerAutoSize:c,maxHeight:e,minHeight:t}),Z.useImperativeHandle(a,()=>({textArea:i.current,focus:()=>{var u;return(u=i==null?void 0:i.current)==null?void 0:u.focus()},maxHeight:e,minHeight:t})),S.useEffect(()=>{l(s)},[o==null?void 0:o.defaultValue,s]),d.jsx("textarea",{...o,value:s,ref:i,className:_e("flex w-full rounded-md border border-input bg-transparent dark:bg-input/30 px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),onChange:u=>{l(u.target.value),n==null||n(u)}})});fh.displayName="AutosizeTextarea";const s$=({rootType:e="object",readOnly:t=!1,theme:r="light",styles:n,onChange:s,defaultValue:o})=>{const{methods:a,jsonSchema:i}=r$({rootType:e,defaultValue:o}),{setError:c,clearErrors:l,getValues:u}=a,[h,p]=Z.useState(null);Z.useEffect(()=>{s&&s(i)},[i,s]),Z.useEffect(()=>{const j=vm(i);JSON.stringify(j)!==JSON.stringify(h)&&p(j)},[i,h]),Z.useEffect(()=>{if(l(),h){const j=u("properties");h.forEach(I=>{const U=I.instancePath.split("/").filter(Boolean);if(U[0]==="properties"&&U.length>=3){const D=(j==null?void 0:j.findIndex(V=>V.key===U[1]))??-1;D!==-1&&c(`properties.${D}.schema.${U[2]}`,{type:"ajv",message:I.message})}else U.length>0&&c(`root.${U[0]}`,{type:"ajv",message:I.message})})}},[h,u,c,l]),Z.useEffect(()=>{if(!o){const j=nn(6),I={root:{type:e,$schema:"http://json-schema.org/draft/2020-12/schema",...e==="object"&&{additionalProperties:!0},...e==="array"&&{items:{type:"string"}}},properties:e==="object"?[{id:j,key:`field_${j}`,isRequired:!1,schema:{type:"number"}}]:[]};a.reset(I)}},[e,a,o]);const{fields:v,append:w,remove:y}=Qi({control:a.control,name:"properties",keyName:"fieldId"}),m=()=>{const j=nn(6);w({id:j,key:`field_${j}`,isRequired:!1,schema:{type:"string"}})},[_,f]=Z.useState({isOpen:!1,fieldPath:null}),b=j=>{f({isOpen:!0,fieldPath:j})},x={...cs,...n,output:{...cs.output,...n==null?void 0:n.output},form:{...cs.form,...n==null?void 0:n.form},settings:{...cs.settings,...n==null?void 0:n.settings}},g=Z.useRef(null),[$,E]=Z.useState("overflow-hidden");return Z.useEffect(()=>{var I;const j=(I=g.current)==null?void 0:I.textArea;j&&(j.scrollHeight>j.clientHeight?E("overflow-y-auto"):E("overflow-hidden"))},[i]),d.jsxs(_h,{...a,children:[d.jsx("div",{className:_e("bg-background text-foreground flex flex-col",r,Nu[x.spacing]),children:d.jsxs("div",{className:_e("bg-background text-foreground flex",r,Gb[x.output.position],Nu[x.spacing]),children:[d.jsxs("div",{className:_e("p-4 pr-2 flex flex-col gap-2 border border-input rounded-lg overflow-y-auto",Va[x.form.width],ju[x.form.height]),children:[d.jsx(Bb,{theme:r,readOnly:t,rootType:e,onAddField:m,onOpenSettings:b}),e==="object"&&d.jsx(Z_,{theme:r,readOnly:t,fields:v,onRemove:y,onOpenSettings:b}),e==="array"&&d.jsx("div",{className:"ml-2 pl-2 border-l-2 border-input",children:d.jsx(ds,{theme:r,readOnly:t,fieldPath:"root.items",onRemove:()=>{},onOpenSettings:b,isSimpleType:!1,isRootLevel:!1})})]}),h?d.jsxs("div",{className:_e("p-6 bg-background text-foreground border border-input rounded-lg overflow-y-auto overflow-x-auto",Va[x.output.width],ju[x.output.height]),children:[d.jsx("p",{className:"text-lg",children:"JSON Schema Errors"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:`The generated JSON Schema has ${h==null?void 0:h.length}
|
|
145
|
+
${(h==null?void 0:h.length)>1?"errors.":"error."}`}),d.jsx("ul",{className:"mt-4 flex flex-col gap-2",children:h==null?void 0:h.map((j,I)=>d.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[d.jsxs(wd,{variant:"destructive",className:"font-mono",children:["root",j.instancePath]}),d.jsx("span",{children:j.message})]},I))})]}):x.output.showJson&&d.jsx(fh,{ref:g,readOnly:!0,maxHeight:Wb[x.output.height],value:JSON.stringify(i,null,2),className:_e("font-mono",Va[x.output.width],$)})]})}),d.jsx(hw,{theme:r,readOnly:t,isOpen:_.isOpen,fieldPath:_.fieldPath,className:Hb[x.settings.width],onClose:()=>f({isOpen:!1,fieldPath:null})})]})};zt.JsonSchemaEditor=s$,Object.defineProperty(zt,Symbol.toStringTag,{value:"Module"})}));
|