brauz-questionnaire-ui 0.0.7 → 0.0.8

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.
@@ -1,6 +1,6 @@
1
- (function(T,U){typeof exports=="object"&&typeof module<"u"?module.exports=U(require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react/jsx-runtime","react","react-dom"],U):(T=typeof globalThis<"u"?globalThis:T||self,T["brauz-questionnaire-ui"]=U(T["react/jsx-runtime"],T.React,T.reactDOM))})(this,(function(T,U,Lu){"use strict";function zu(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const b=zu(U),ms=zu(Lu),rb={with_section_title:!0,with_label:!0,form_config:{},renderFooter:null},$u=U.createContext();function nb({children:e,config:t={}}){const r=U.useMemo(()=>({...rb,...t}),[JSON.stringify(t)]);return T.jsx($u.Provider,{value:r,children:e})}function la(){return U.useContext($u)}var Co=e=>e.type==="checkbox",En=e=>e instanceof Date,$t=e=>e==null;const Uu=e=>typeof e=="object";var yt=e=>!$t(e)&&!Array.isArray(e)&&Uu(e)&&!En(e),Yu=e=>yt(e)&&e.target?Co(e.target)?e.target.checked:e.target.value:e,ob=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ju=(e,t)=>e.has(ob(t)),sb=e=>{const t=e.constructor&&e.constructor.prototype;return yt(t)&&t.hasOwnProperty("isPrototypeOf")},ua=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function vt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(ua&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(yt(e)&&sb(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=vt(e[o]));return n}var gs=e=>/^\w*$/.test(e),st=e=>e===void 0,fa=e=>Array.isArray(e)?e.filter(Boolean):[],da=e=>fa(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ae=(e,t,r)=>{if(!t||!yt(e))return r;const n=(gs(t)?[t]:da(t)).reduce((o,s)=>$t(o)?o:o[s],e);return st(n)||n===e?st(e[t])?r:e[t]:n},Bt=e=>typeof e=="boolean",It=e=>typeof e=="function",Ve=(e,t,r)=>{let n=-1;const o=gs(t)?[t]:da(t),s=o.length,i=s-1;for(;++n<s;){const a=o[n];let c=r;if(n!==i){const u=e[a];c=yt(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=c,e=e[a]}};const ys={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ar={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Lr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ha=U.createContext(null);ha.displayName="HookFormControlContext";const pa=()=>U.useContext(ha);var Vu=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==ar.all&&(t._proxyFormState[i]=!n||ar.all),r&&(r[i]=!0),e[i]}});return o};const ma=typeof window<"u"?U.useLayoutEffect:U.useEffect;function Bu(e){const t=pa(),{control:r=t,disabled:n,name:o,exact:s}=e||{},[i,a]=U.useState(r._formState),c=U.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return ma(()=>r._subscribe({name:o,formState:c.current,exact:s,callback:u=>{!n&&a({...r._formState,...u})}}),[o,n,s]),U.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),U.useMemo(()=>Vu(i,r,c.current,!1),[i,r])}var Ht=e=>typeof e=="string",ga=(e,t,r,n,o)=>Ht(e)?(n&&t.watch.add(e),ae(r,e,o)):Array.isArray(e)?e.map(s=>(n&&t.watch.add(s),ae(r,s))):(n&&(t.watchAll=!0),r),ya=e=>$t(e)||!Uu(e);function cr(e,t,r=new WeakSet){if(ya(e)||ya(t))return Object.is(e,t);if(En(e)&&En(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const i=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const a=t[s];if(En(i)&&En(a)||yt(i)&&yt(a)||Array.isArray(i)&&Array.isArray(a)?!cr(i,a,r):!Object.is(i,a))return!1}}return!0}function Hu(e){const t=pa(),{control:r=t,name:n,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},c=U.useRef(o),u=U.useRef(a),l=U.useRef(void 0),f=U.useRef(r),d=U.useRef(n);u.current=a;const[h,m]=U.useState(()=>{const w=r._getWatch(n,c.current);return u.current?u.current(w):w}),p=U.useCallback(w=>{const _=ga(n,r._names,w||r._formValues,!1,c.current);return u.current?u.current(_):_},[r._formValues,r._names,n]),g=U.useCallback(w=>{if(!s){const _=ga(n,r._names,w||r._formValues,!1,c.current);if(u.current){const S=u.current(_);cr(S,l.current)||(m(S),l.current=S)}else m(_)}},[r._formValues,r._names,s,n]);ma(()=>((f.current!==r||!cr(d.current,n))&&(f.current=r,d.current=n,g()),r._subscribe({name:n,formState:{values:!0},exact:i,callback:w=>{g(w.values)}})),[r,i,n,g]),U.useEffect(()=>r._removeUnmounted());const y=f.current!==r,O=d.current,x=U.useMemo(()=>{if(s)return null;const w=!y&&!cr(O,n);return y||w?p():null},[s,y,n,O,p]);return x!==null?x:h}function ib(e){const t=pa(),{name:r,disabled:n,control:o=t,shouldUnregister:s,defaultValue:i,exact:a=!0}=e,c=ju(o._names.array,r),u=U.useMemo(()=>ae(o._formValues,r,ae(o._defaultValues,r,i)),[o,r,i]),l=Hu({control:o,name:r,defaultValue:u,exact:a}),f=Bu({control:o,name:r,exact:a}),d=U.useRef(e),h=U.useRef(void 0),m=U.useRef(o.register(r,{...e.rules,value:l,...Bt(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;const p=U.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ae(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!ae(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!ae(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!ae(f.validatingFields,r)},error:{enumerable:!0,get:()=>ae(f.errors,r)}}),[f,r]),g=U.useCallback(w=>m.current.onChange({target:{value:Yu(w),name:r},type:ys.CHANGE}),[r]),y=U.useCallback(()=>m.current.onBlur({target:{value:ae(o._formValues,r),name:r},type:ys.BLUR}),[r,o._formValues]),O=U.useCallback(w=>{const _=ae(o._fields,r);_&&_._f&&w&&(_._f.ref={focus:()=>It(w.focus)&&w.focus(),select:()=>It(w.select)&&w.select(),setCustomValidity:S=>It(w.setCustomValidity)&&w.setCustomValidity(S),reportValidity:()=>It(w.reportValidity)&&w.reportValidity()})},[o._fields,r]),x=U.useMemo(()=>({name:r,value:l,...Bt(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:g,onBlur:y,ref:O}),[r,n,f.disabled,g,y,O,l]);return U.useEffect(()=>{const w=o._options.shouldUnregister||s,_=h.current;_&&_!==r&&!c&&o.unregister(_),o.register(r,{...d.current.rules,...Bt(d.current.disabled)?{disabled:d.current.disabled}:{}});const S=(I,v)=>{const E=ae(o._fields,I);E&&E._f&&(E._f.mount=v)};if(S(r,!0),w){const I=vt(ae(o._options.defaultValues,r,d.current.defaultValue));Ve(o._defaultValues,r,I),st(ae(o._formValues,r))&&Ve(o._formValues,r,I)}return!c&&o.register(r),h.current=r,()=>{(c?w&&!o._state.action:w)?o.unregister(r):S(r,!1)}},[r,o,c,s]),U.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),U.useMemo(()=>({field:x,formState:f,fieldState:p}),[x,f,p])}const ab=e=>e.render(ib(e)),va=U.createContext(null);va.displayName="HookFormContext";const cb=()=>U.useContext(va),lb=e=>{const{children:t,watch:r,getValues:n,getFieldState:o,setError:s,clearErrors:i,setValue:a,trigger:c,formState:u,resetField:l,reset:f,handleSubmit:d,unregister:h,control:m,register:p,setFocus:g,subscribe:y}=e;return U.createElement(va.Provider,{value:U.useMemo(()=>({watch:r,getValues:n,getFieldState:o,setError:s,clearErrors:i,setValue:a,trigger:c,formState:u,resetField:l,reset:f,handleSubmit:d,unregister:h,control:m,register:p,setFocus:g,subscribe:y}),[i,m,u,o,n,d,p,f,l,s,g,a,y,c,h,r])},U.createElement(ha.Provider,{value:m},t))};var ba=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},To=e=>Array.isArray(e)?e:[e],Zu=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}};function Gu(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const o=e[n],s=t[n];if(o&&yt(o)&&s){const i=Gu(o,s);yt(i)&&(r[n]=i)}else e[n]&&(r[n]=s)}return r}var Ft=e=>yt(e)&&!Object.keys(e).length,wa=e=>e.type==="file",vs=e=>{if(!ua)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},qu=e=>e.type==="select-multiple",_a=e=>e.type==="radio",ub=e=>_a(e)||Co(e),Sa=e=>vs(e)&&e.isConnected;function fb(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=st(e)?n++:e[t[n++]];return e}function db(e){for(const t in e)if(e.hasOwnProperty(t)&&!st(e[t]))return!1;return!0}function bt(e,t){const r=Array.isArray(t)?t:gs(t)?[t]:da(t),n=r.length===1?e:fb(e,r),o=r.length-1,s=r[o];return n&&delete n[s],o!==0&&(yt(n)&&Ft(n)||Array.isArray(n)&&db(n))&&bt(e,r.slice(0,-1)),e}var hb=e=>{for(const t in e)if(It(e[t]))return!0;return!1};function Ku(e){return Array.isArray(e)||yt(e)&&!hb(e)}function ka(e,t={}){for(const r in e){const n=e[r];Ku(n)?(t[r]=Array.isArray(n)?[]:{},ka(n,t[r])):st(n)||(t[r]=!0)}return t}function Hn(e,t,r){r||(r=ka(t));for(const n in e){const o=e[n];if(Ku(o))st(t)||ya(r[n])?r[n]=ka(o,Array.isArray(o)?[]:{}):Hn(o,$t(t)?{}:t[n],r[n]);else{const s=t[n];r[n]=!cr(o,s)}}return r}const Ju={value:!1,isValid:!1},Xu={value:!0,isValid:!0};var Qu=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&&!st(e[0].attributes.value)?st(e[0].value)||e[0].value===""?Xu:{value:e[0].value,isValid:!0}:Xu:Ju}return Ju},ef=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>st(e)?e:t?e===""?NaN:e&&+e:r&&Ht(e)?new Date(e):n?n(e):e;const tf={isValid:!1,value:null};var rf=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,tf):tf;function nf(e){const t=e.ref;return wa(t)?t.files:_a(t)?rf(e.refs).value:qu(t)?[...t.selectedOptions].map(({value:r})=>r):Co(t)?Qu(e.refs).value:ef(st(t.value)?e.ref.value:t.value,e)}var pb=(e,t,r,n)=>{const o={};for(const s of e){const i=ae(t,s);i&&Ve(o,s,i._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},bs=e=>e instanceof RegExp,Do=e=>st(e)?e:bs(e)?e.source:yt(e)?bs(e.value)?e.value.source:e.value:e,of=e=>({isOnSubmit:!e||e===ar.onSubmit,isOnBlur:e===ar.onBlur,isOnChange:e===ar.onChange,isOnAll:e===ar.all,isOnTouch:e===ar.onTouched});const sf="AsyncFunction";var mb=e=>!!e&&!!e.validate&&!!(It(e.validate)&&e.validate.constructor.name===sf||yt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===sf)),gb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),af=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Ao=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const s=ae(e,o);if(s){const{_f:i,...a}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!n)return!0;if(i.ref&&t(i.ref,i.name)&&!n)return!0;if(Ao(a,t))break}else if(yt(a)&&Ao(a,t))break}}};function cf(e,t,r){const n=ae(e,r);if(n||gs(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const s=o.join("."),i=ae(t,s),a=ae(e,s);if(i&&!Array.isArray(i)&&r!==s)return{name:r};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};o.pop()}return{name:r}}var yb=(e,t,r,n)=>{r(e);const{name:o,...s}=e;return Ft(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!n||ar.all))},vb=(e,t,r)=>!e||!t||e===t||To(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),bb=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,wb=(e,t)=>!fa(ae(e,t)).length&&bt(e,t),_b=(e,t,r)=>{const n=To(ae(e,r));return Ve(n,"root",t[r]),Ve(e,r,n),e};function lf(e,t,r="validate"){if(Ht(e)||Array.isArray(e)&&e.every(Ht)||Bt(e)&&!e)return{type:r,message:Ht(e)?e:"",ref:t}}var Zn=e=>yt(e)&&!bs(e)?e:{value:e,message:""},uf=async(e,t,r,n,o,s)=>{const{ref:i,refs:a,required:c,maxLength:u,minLength:l,min:f,max:d,pattern:h,validate:m,name:p,valueAsNumber:g,mount:y}=e._f,O=ae(r,p);if(!y||t.has(p))return{};const x=a?a[0]:i,w=M=>{o&&x.reportValidity&&(x.setCustomValidity(Bt(M)?"":M||""),x.reportValidity())},_={},S=_a(i),I=Co(i),v=S||I,E=(g||wa(i))&&st(i.value)&&st(O)||vs(i)&&i.value===""||O===""||Array.isArray(O)&&!O.length,P=ba.bind(null,p,n,_),A=(M,F,N,W=Lr.maxLength,C=Lr.minLength)=>{const k=M?F:N;_[p]={type:M?W:C,message:k,ref:i,...P(M?W:C,k)}};if(s?!Array.isArray(O)||!O.length:c&&(!v&&(E||$t(O))||Bt(O)&&!O||I&&!Qu(a).isValid||S&&!rf(a).isValid)){const{value:M,message:F}=Ht(c)?{value:!!c,message:c}:Zn(c);if(M&&(_[p]={type:Lr.required,message:F,ref:x,...P(Lr.required,F)},!n))return w(F),_}if(!E&&(!$t(f)||!$t(d))){let M,F;const N=Zn(d),W=Zn(f);if(!$t(O)&&!isNaN(O)){const C=i.valueAsNumber||O&&+O;$t(N.value)||(M=C>N.value),$t(W.value)||(F=C<W.value)}else{const C=i.valueAsDate||new Date(O),k=D=>new Date(new Date().toDateString()+" "+D),Y=i.type=="time",$=i.type=="week";Ht(N.value)&&O&&(M=Y?k(O)>k(N.value):$?O>N.value:C>new Date(N.value)),Ht(W.value)&&O&&(F=Y?k(O)<k(W.value):$?O<W.value:C<new Date(W.value))}if((M||F)&&(A(!!M,N.message,W.message,Lr.max,Lr.min),!n))return w(_[p].message),_}if((u||l)&&!E&&(Ht(O)||s&&Array.isArray(O))){const M=Zn(u),F=Zn(l),N=!$t(M.value)&&O.length>+M.value,W=!$t(F.value)&&O.length<+F.value;if((N||W)&&(A(N,M.message,F.message),!n))return w(_[p].message),_}if(h&&!E&&Ht(O)){const{value:M,message:F}=Zn(h);if(bs(M)&&!O.match(M)&&(_[p]={type:Lr.pattern,message:F,ref:i,...P(Lr.pattern,F)},!n))return w(F),_}if(m){if(It(m)){const M=await m(O,r),F=lf(M,x);if(F&&(_[p]={...F,...P(Lr.validate,F.message)},!n))return w(F.message),_}else if(yt(m)){let M={};for(const F in m){if(!Ft(M)&&!n)break;const N=lf(await m[F](O,r),x,F);N&&(M={...N,...P(F,N.message)},w(N.message),n&&(_[p]=M))}if(!Ft(M)&&(_[p]={ref:x,...M},!n))return _}}return w(!0),_};const Sb={mode:ar.onSubmit,reValidateMode:ar.onChange,shouldFocusError:!0};function kb(e={}){let t={...Sb,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:It(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=yt(t.defaultValues)||yt(t.values)?vt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:vt(o),i={action:!1,mount:!1,watch:!1,keepIsValid:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const l={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={...l};let d={...f};const h={array:Zu(),state:Zu()},m=t.criteriaMode===ar.all,p=R=>j=>{clearTimeout(u),u=setTimeout(R,j)},g=async R=>{if(!i.keepIsValid&&!t.disabled&&(f.isValid||d.isValid||R)){let j;t.resolver?(j=Ft((await v()).errors),y()):j=await P(n,!0),j!==r.isValid&&h.state.next({isValid:j})}},y=(R,j)=>{!t.disabled&&(f.isValidating||f.validatingFields||d.isValidating||d.validatingFields)&&((R||Array.from(a.mount)).forEach(H=>{H&&(j?Ve(r.validatingFields,H,j):bt(r.validatingFields,H))}),h.state.next({validatingFields:r.validatingFields,isValidating:!Ft(r.validatingFields)}))},O=(R,j=[],H,ee,te=!0,re=!0)=>{if(ee&&H&&!t.disabled){if(i.action=!0,re&&Array.isArray(ae(n,R))){const ue=H(ae(n,R),ee.argA,ee.argB);te&&Ve(n,R,ue)}if(re&&Array.isArray(ae(r.errors,R))){const ue=H(ae(r.errors,R),ee.argA,ee.argB);te&&Ve(r.errors,R,ue),wb(r.errors,R)}if((f.touchedFields||d.touchedFields)&&re&&Array.isArray(ae(r.touchedFields,R))){const ue=H(ae(r.touchedFields,R),ee.argA,ee.argB);te&&Ve(r.touchedFields,R,ue)}(f.dirtyFields||d.dirtyFields)&&(r.dirtyFields=Hn(o,s)),h.state.next({name:R,isDirty:M(R,j),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ve(s,R,j)},x=(R,j)=>{Ve(r.errors,R,j),h.state.next({errors:r.errors})},w=R=>{r.errors=R,h.state.next({errors:r.errors,isValid:!1})},_=(R,j,H,ee)=>{const te=ae(n,R);if(te){const re=ae(s,R,st(H)?ae(o,R):H);st(re)||ee&&ee.defaultChecked||j?Ve(s,R,j?re:nf(te._f)):W(R,re),i.mount&&!i.action&&g()}},S=(R,j,H,ee,te)=>{let re=!1,ue=!1;const be={name:R};if(!t.disabled){if(!H||ee){(f.isDirty||d.isDirty)&&(ue=r.isDirty,r.isDirty=be.isDirty=M(),re=ue!==be.isDirty);const Ee=cr(ae(o,R),j);ue=!!ae(r.dirtyFields,R),Ee?bt(r.dirtyFields,R):Ve(r.dirtyFields,R,!0),be.dirtyFields=r.dirtyFields,re=re||(f.dirtyFields||d.dirtyFields)&&ue!==!Ee}if(H){const Ee=ae(r.touchedFields,R);Ee||(Ve(r.touchedFields,R,H),be.touchedFields=r.touchedFields,re=re||(f.touchedFields||d.touchedFields)&&Ee!==H)}re&&te&&h.state.next(be)}return re?be:{}},I=(R,j,H,ee)=>{const te=ae(r.errors,R),re=(f.isValid||d.isValid)&&Bt(j)&&r.isValid!==j;if(t.delayError&&H?(c=p(()=>x(R,H)),c(t.delayError)):(clearTimeout(u),c=null,H?Ve(r.errors,R,H):bt(r.errors,R)),(H?!cr(te,H):te)||!Ft(ee)||re){const ue={...ee,...re&&Bt(j)?{isValid:j}:{},errors:r.errors,name:R};r={...r,...ue},h.state.next(ue)}},v=async R=>(y(R,!0),await t.resolver(s,t.context,pb(R||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),E=async R=>{const{errors:j}=await v(R);if(y(R),R)for(const H of R){const ee=ae(j,H);ee?Ve(r.errors,H,ee):bt(r.errors,H)}else r.errors=j;return j},P=async(R,j,H={valid:!0})=>{for(const ee in R){const te=R[ee];if(te){const{_f:re,...ue}=te;if(re){const be=a.array.has(re.name),Ee=te._f&&mb(te._f);Ee&&f.validatingFields&&y([re.name],!0);const Le=await uf(te,a.disabled,s,m,t.shouldUseNativeValidation&&!j,be);if(Ee&&f.validatingFields&&y([re.name]),Le[re.name]&&(H.valid=!1,j||e.shouldUseNativeValidation))break;!j&&(ae(Le,re.name)?be?_b(r.errors,Le,re.name):Ve(r.errors,re.name,Le[re.name]):bt(r.errors,re.name))}!Ft(ue)&&await P(ue,j,H)}}return H.valid},A=()=>{for(const R of a.unMount){const j=ae(n,R);j&&(j._f.refs?j._f.refs.every(H=>!Sa(H)):!Sa(j._f.ref))&&oe(R)}a.unMount=new Set},M=(R,j)=>!t.disabled&&(R&&j&&Ve(s,R,j),!cr(V(),o)),F=(R,j,H)=>ga(R,a,{...i.mount?s:st(j)?o:Ht(R)?{[R]:j}:j},H,j),N=R=>fa(ae(i.mount?s:o,R,t.shouldUnregister?ae(o,R,[]):[])),W=(R,j,H={})=>{const ee=ae(n,R);let te=j;if(ee){const re=ee._f;re&&(!re.disabled&&Ve(s,R,ef(j,re)),te=vs(re.ref)&&$t(j)?"":j,qu(re.ref)?[...re.ref.options].forEach(ue=>ue.selected=te.includes(ue.value)):re.refs?Co(re.ref)?re.refs.forEach(ue=>{(!ue.defaultChecked||!ue.disabled)&&(Array.isArray(te)?ue.checked=!!te.find(be=>be===ue.value):ue.checked=te===ue.value||!!te)}):re.refs.forEach(ue=>ue.checked=ue.value===te):wa(re.ref)?re.ref.value="":(re.ref.value=te,re.ref.type||h.state.next({name:R,values:vt(s)})))}(H.shouldDirty||H.shouldTouch)&&S(R,te,H.shouldTouch,H.shouldDirty,!0),H.shouldValidate&&D(R)},C=(R,j,H)=>{for(const ee in j){if(!j.hasOwnProperty(ee))return;const te=j[ee],re=R+"."+ee,ue=ae(n,re);(a.array.has(R)||yt(te)||ue&&!ue._f)&&!En(te)?C(re,te,H):W(re,te,H)}},k=(R,j,H={})=>{const ee=ae(n,R),te=a.array.has(R),re=vt(j);Ve(s,R,re),te?(h.array.next({name:R,values:vt(s)}),(f.isDirty||f.dirtyFields||d.isDirty||d.dirtyFields)&&H.shouldDirty&&h.state.next({name:R,dirtyFields:Hn(o,s),isDirty:M(R,re)})):ee&&!ee._f&&!$t(re)?C(R,re,H):W(R,re,H),af(R,a)?h.state.next({...r,name:R,values:vt(s)}):h.state.next({name:i.mount?R:void 0,values:vt(s)})},Y=async R=>{i.mount=!0;const j=R.target;let H=j.name,ee=!0;const te=ae(n,H),re=Ee=>{ee=Number.isNaN(Ee)||En(Ee)&&isNaN(Ee.getTime())||cr(Ee,ae(s,H,Ee))},ue=of(t.mode),be=of(t.reValidateMode);if(te){let Ee,Le;const ot=j.type?nf(te._f):Yu(R),Qe=R.type===ys.BLUR||R.type===ys.FOCUS_OUT,xt=!gb(te._f)&&!t.resolver&&!ae(r.errors,H)&&!te._f.deps||bb(Qe,ae(r.touchedFields,H),r.isSubmitted,be,ue),gt=af(H,a,Qe);Ve(s,H,ot),Qe?(!j||!j.readOnly)&&(te._f.onBlur&&te._f.onBlur(R),c&&c(0)):te._f.onChange&&te._f.onChange(R);const dt=S(H,ot,Qe),jt=!Ft(dt)||gt;if(!Qe&&h.state.next({name:H,type:R.type,values:vt(s)}),xt)return(f.isValid||d.isValid)&&(t.mode==="onBlur"?Qe&&g():Qe||g()),jt&&h.state.next({name:H,...gt?{}:dt});if(!Qe&&gt&&h.state.next({...r}),t.resolver){const{errors:_r}=await v([H]);if(y([H]),re(ot),ee){const Sr=cf(r.errors,n,H),_e=cf(_r,n,Sr.name||H);Ee=_e.error,H=_e.name,Le=Ft(_r)}}else y([H],!0),Ee=(await uf(te,a.disabled,s,m,t.shouldUseNativeValidation))[H],y([H]),re(ot),ee&&(Ee?Le=!1:(f.isValid||d.isValid)&&(Le=await P(n,!0)));ee&&(te._f.deps&&(!Array.isArray(te._f.deps)||te._f.deps.length>0)&&D(te._f.deps),I(H,Le,Ee,dt))}},$=(R,j)=>{if(ae(r.errors,j)&&R.focus)return R.focus(),1},D=async(R,j={})=>{let H,ee;const te=To(R);if(t.resolver){const re=await E(st(R)?R:te);H=Ft(re),ee=R?!te.some(ue=>ae(re,ue)):H}else R?(ee=(await Promise.all(te.map(async re=>{const ue=ae(n,re);return await P(ue&&ue._f?{[re]:ue}:ue)}))).every(Boolean),!(!ee&&!r.isValid)&&g()):ee=H=await P(n);return h.state.next({...!Ht(R)||(f.isValid||d.isValid)&&H!==r.isValid?{}:{name:R},...t.resolver||!R?{isValid:H}:{},errors:r.errors}),j.shouldFocus&&!ee&&Ao(n,$,R?te:a.mount),ee},V=(R,j)=>{let H={...i.mount?s:o};return j&&(H=Gu(j.dirtyFields?r.dirtyFields:r.touchedFields,H)),st(R)?H:Ht(R)?ae(H,R):R.map(ee=>ae(H,ee))},Z=(R,j)=>({invalid:!!ae((j||r).errors,R),isDirty:!!ae((j||r).dirtyFields,R),error:ae((j||r).errors,R),isValidating:!!ae(r.validatingFields,R),isTouched:!!ae((j||r).touchedFields,R)}),G=R=>{R&&To(R).forEach(j=>bt(r.errors,j)),h.state.next({errors:R?r.errors:{}})},B=(R,j,H)=>{const ee=(ae(n,R,{_f:{}})._f||{}).ref,te=ae(r.errors,R)||{},{ref:re,message:ue,type:be,...Ee}=te;Ve(r.errors,R,{...Ee,...j,ref:ee}),h.state.next({name:R,errors:r.errors,isValid:!1}),H&&H.shouldFocus&&ee&&ee.focus&&ee.focus()},L=(R,j)=>It(R)?h.state.subscribe({next:H=>"values"in H&&R(F(void 0,j),H)}):F(R,j,!0),J=R=>h.state.subscribe({next:j=>{vb(R.name,j.name,R.exact)&&yb(j,R.formState||f,We,R.reRenderRoot)&&R.callback({values:{...s},...r,...j,defaultValues:o})}}).unsubscribe,q=R=>(i.mount=!0,d={...d,...R.formState},J({...R,formState:{...l,...R.formState}})),oe=(R,j={})=>{for(const H of R?To(R):a.mount)a.mount.delete(H),a.array.delete(H),j.keepValue||(bt(n,H),bt(s,H)),!j.keepError&&bt(r.errors,H),!j.keepDirty&&bt(r.dirtyFields,H),!j.keepTouched&&bt(r.touchedFields,H),!j.keepIsValidating&&bt(r.validatingFields,H),!t.shouldUnregister&&!j.keepDefaultValue&&bt(o,H);h.state.next({values:vt(s)}),h.state.next({...r,...j.keepDirty?{isDirty:M()}:{}}),!j.keepIsValid&&g()},Q=({disabled:R,name:j})=>{if(Bt(R)&&i.mount||R||a.disabled.has(j)){const te=a.disabled.has(j)!==!!R;R?a.disabled.add(j):a.disabled.delete(j),te&&i.mount&&!i.action&&g()}},ne=(R,j={})=>{let H=ae(n,R);const ee=Bt(j.disabled)||Bt(t.disabled);return Ve(n,R,{...H||{},_f:{...H&&H._f?H._f:{ref:{name:R}},name:R,mount:!0,...j}}),a.mount.add(R),H?Q({disabled:Bt(j.disabled)?j.disabled:t.disabled,name:R}):_(R,!0,j.value),{...ee?{disabled:j.disabled||t.disabled}:{},...t.progressive?{required:!!j.required,min:Do(j.min),max:Do(j.max),minLength:Do(j.minLength),maxLength:Do(j.maxLength),pattern:Do(j.pattern)}:{},name:R,onChange:Y,onBlur:Y,ref:te=>{if(te){ne(R,j),H=ae(n,R);const re=st(te.value)&&te.querySelectorAll&&te.querySelectorAll("input,select,textarea")[0]||te,ue=ub(re),be=H._f.refs||[];if(ue?be.find(Ee=>Ee===re):re===H._f.ref)return;Ve(n,R,{_f:{...H._f,...ue?{refs:[...be.filter(Sa),re,...Array.isArray(ae(o,R))?[{}]:[]],ref:{type:re.type,name:R}}:{ref:re}}}),_(R,!1,void 0,re)}else H=ae(n,R,{}),H._f&&(H._f.mount=!1),(t.shouldUnregister||j.shouldUnregister)&&!(ju(a.array,R)&&i.action)&&a.unMount.add(R)}}},le=()=>t.shouldFocusError&&Ao(n,$,a.mount),K=R=>{Bt(R)&&(h.state.next({disabled:R}),Ao(n,(j,H)=>{const ee=ae(n,H);ee&&(j.disabled=ee._f.disabled||R,Array.isArray(ee._f.refs)&&ee._f.refs.forEach(te=>{te.disabled=ee._f.disabled||R}))},0,!1))},Se=(R,j)=>async H=>{let ee;H&&(H.preventDefault&&H.preventDefault(),H.persist&&H.persist());let te=vt(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:re,values:ue}=await v();y(),r.errors=re,te=vt(ue)}else await P(n);if(a.disabled.size)for(const re of a.disabled)bt(te,re);if(bt(r.errors,"root"),Ft(r.errors)){h.state.next({errors:{}});try{await R(te,H)}catch(re){ee=re}}else j&&await j({...r.errors},H),le(),setTimeout(le);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ft(r.errors)&&!ee,submitCount:r.submitCount+1,errors:r.errors}),ee)throw ee},Ie=(R,j={})=>{ae(n,R)&&(st(j.defaultValue)?k(R,vt(ae(o,R))):(k(R,j.defaultValue),Ve(o,R,vt(j.defaultValue))),j.keepTouched||bt(r.touchedFields,R),j.keepDirty||(bt(r.dirtyFields,R),r.isDirty=j.defaultValue?M(R,vt(ae(o,R))):M()),j.keepError||(bt(r.errors,R),f.isValid&&g()),h.state.next({...r}))},ke=(R,j={})=>{const H=R?vt(R):o,ee=vt(H),te=Ft(R),re=te?o:ee;if(j.keepDefaultValues||(o=H),!j.keepValues){if(j.keepDirtyValues){const ue=new Set([...a.mount,...Object.keys(Hn(o,s))]);for(const be of Array.from(ue)){const Ee=ae(r.dirtyFields,be),Le=ae(s,be),ot=ae(re,be);Ee&&!st(Le)?Ve(re,be,Le):!Ee&&!st(ot)&&k(be,ot)}}else{if(ua&&st(R))for(const ue of a.mount){const be=ae(n,ue);if(be&&be._f){const Ee=Array.isArray(be._f.refs)?be._f.refs[0]:be._f.ref;if(vs(Ee)){const Le=Ee.closest("form");if(Le){Le.reset();break}}}}if(j.keepFieldsRef)for(const ue of a.mount)k(ue,ae(re,ue));else n={}}s=t.shouldUnregister?j.keepDefaultValues?vt(o):{}:vt(re),h.array.next({values:{...re}}),h.state.next({values:{...re}})}a={mount:j.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!j.keepIsValid||!!j.keepDirtyValues||!t.shouldUnregister&&!Ft(re),i.watch=!!t.shouldUnregister,i.keepIsValid=!!j.keepIsValid,i.action=!1,j.keepErrors||(r.errors={}),h.state.next({submitCount:j.keepSubmitCount?r.submitCount:0,isDirty:te?!1:j.keepDirty?r.isDirty:!!(j.keepDefaultValues&&!cr(R,o)),isSubmitted:j.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:te?{}:j.keepDirtyValues?j.keepDefaultValues&&s?Hn(o,s):r.dirtyFields:j.keepDefaultValues&&R?Hn(o,R):j.keepDirty?r.dirtyFields:{},touchedFields:j.keepTouched?r.touchedFields:{},errors:j.keepErrors?r.errors:{},isSubmitSuccessful:j.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ge=(R,j)=>ke(It(R)?R(s):R,{...t.resetOptions,...j}),Re=(R,j={})=>{const H=ae(n,R),ee=H&&H._f;if(ee){const te=ee.refs?ee.refs[0]:ee.ref;te.focus&&setTimeout(()=>{te.focus(),j.shouldSelect&&It(te.select)&&te.select()})}},We=R=>{r={...r,...R}},nt={control:{register:ne,unregister:oe,getFieldState:Z,handleSubmit:Se,setError:B,_subscribe:J,_runSchema:v,_updateIsValidating:y,_focusError:le,_getWatch:F,_getDirty:M,_setValid:g,_setFieldArray:O,_setDisabledField:Q,_setErrors:w,_getFieldArray:N,_reset:ke,_resetDefaultValues:()=>It(t.defaultValues)&&t.defaultValues().then(R=>{Ge(R,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:A,_disableForm:K,_subjects:h,_proxyFormState:f,get _fields(){return n},get _formValues(){return s},get _state(){return i},set _state(R){i=R},get _defaultValues(){return o},get _names(){return a},set _names(R){a=R},get _formState(){return r},get _options(){return t},set _options(R){t={...t,...R}}},subscribe:q,trigger:D,register:ne,handleSubmit:Se,watch:L,setValue:k,getValues:V,reset:Ge,resetField:Ie,clearErrors:G,unregister:oe,setError:B,setFocus:Re,getFieldState:Z};return{...nt,formControl:nt}}function xb(e={}){const t=U.useRef(void 0),r=U.useRef(void 0),[n,o]=U.useState({isDirty:!1,isValidating:!1,isLoading:It(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:It(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!It(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...a}=kb(e);t.current={...a,formState:n}}const s=t.current.control;return s._options=e,ma(()=>{const i=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(a=>({...a,isReady:!0})),s._formState.isReady=!0,i},[s]),U.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),U.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),U.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),U.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),U.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==n.isDirty&&s._subjects.state.next({isDirty:i})}},[s,n.isDirty]),U.useEffect(()=>{var i;e.values&&!cr(e.values,r.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((i=s._options.resetOptions)===null||i===void 0)&&i.keepIsValid||s._setValid(),r.current=e.values,o(a=>({...a}))):s._resetDefaultValues()},[s,e.values]),U.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=U.useMemo(()=>Vu(n,s),[s,n]),t.current}function X(e,t,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const u=i.prototype,l=Object.keys(u);for(let f=0;f<l.length;f++){const d=l[f];d in a||(a[d]=u[d].bind(a))}}const o=r?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var c;const u=r?.Parent?new s:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const l of u._zod.deferred)l();return u}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Gn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ff extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const df={};function On(e){return df}function hf(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function xa(e,t){return typeof t=="bigint"?t.toString():t}function Ea(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Oa(e){return e==null}function Ca(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}const pf=Symbol("evaluating");function Be(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==pf)return n===void 0&&(n=pf,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Cn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function nn(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function mf(e){return JSON.stringify(e)}function Eb(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const gf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ws(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Ob=Ea(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Mo(e){if(ws(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(ws(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function yf(e){return Mo(e)?{...e}:Array.isArray(e)?[...e]:e}const Cb=new Set(["string","number","symbol"]);function qn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function on(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function we(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Tb(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Db(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=nn(e._zod.def,{get shape(){const i={};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=r.shape[a])}return Cn(this,"shape",i),i},checks:[]});return on(e,s)}function Ab(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=nn(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return Cn(this,"shape",i),i},checks:[]});return on(e,s)}function Mb(e,t){if(!Mo(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const s=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=nn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Cn(this,"shape",s),s}});return on(e,o)}function Pb(e,t){if(!Mo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=nn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Cn(this,"shape",n),n}});return on(e,r)}function Nb(e,t){const r=nn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Cn(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return on(e,r)}function Ib(e,t,r){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=nn(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(r)for(const u in r){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return Cn(this,"shape",c),c},checks:[]});return on(t,i)}function Fb(e,t,r){const n=nn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const i in r){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return Cn(this,"shape",s),s}});return on(t,n)}function Kn(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function vf(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function _s(e){return typeof e=="string"?e:e?.message}function Tn(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=_s(e.inst?._zod.def?.error?.(e))??_s(t?.error?.(e))??_s(r.customError?.(e))??_s(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function Ta(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Po(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const bf=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,xa,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Da=X("$ZodError",bf),Ss=X("$ZodError",bf,{Parent:Error});function Rb(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function Wb(e,t=r=>r.message){const r={_errors:[]},n=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(i=>n({issues:i}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)r._errors.push(t(s));else{let i=r,a=0;for(;a<s.path.length;){const c=s.path[a];a===s.path.length-1?(i[c]=i[c]||{_errors:[]},i[c]._errors.push(t(s))):i[c]=i[c]||{_errors:[]},i=i[c],a++}}};return n(e),r}const ks=e=>(t,r,n,o)=>{const s=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise)throw new Gn;if(i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>Tn(c,s,On())));throw gf(a,o?.callee),a}return i.value},Lb=ks(Ss),xs=e=>async(t,r,n,o)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>Tn(c,s,On())));throw gf(a,o?.callee),a}return i.value},zb=xs(Ss),Es=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Gn;return s.issues.length?{success:!1,error:new(e??Da)(s.issues.map(i=>Tn(i,o,On())))}:{success:!0,data:s.value}},$b=Es(Ss),Os=e=>async(t,r,n)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>Tn(i,o,On())))}:{success:!0,data:s.value}},Ub=Os(Ss),Yb=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ks(e)(t,r,o)},jb=e=>(t,r,n)=>ks(e)(t,r,n),Vb=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return xs(e)(t,r,o)},Bb=e=>async(t,r,n)=>xs(e)(t,r,n),Hb=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Es(e)(t,r,o)},Zb=e=>(t,r,n)=>Es(e)(t,r,n),Gb=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Os(e)(t,r,o)},qb=e=>async(t,r,n)=>Os(e)(t,r,n),Kb=/^[cC][^\s-]{8,}$/,Jb=/^[0-9a-z]+$/,Xb=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Qb=/^[0-9a-vA-V]{20}$/,ew=/^[A-Za-z0-9]{27}$/,tw=/^[a-zA-Z0-9_-]{21}$/,rw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,nw=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,wf=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ow=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,sw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function iw(){return new RegExp(sw,"u")}const aw=/^(?:(?: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])$/,cw=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,lw=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,uw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,fw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,_f=/^[A-Za-z0-9_-]*$/,dw=/^\+[1-9]\d{6,14}$/,Sf="(?:(?:\\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])))",hw=new RegExp(`^${Sf}$`);function kf(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function pw(e){return new RegExp(`^${kf(e)}$`)}function mw(e){const t=kf({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Sf}T(?:${n})$`)}const gw=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},yw=/^[^A-Z]*$/,vw=/^[^a-z]*$/,er=X("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),xf={number:"number",bigint:"bigint",object:"date"},bw=X("$ZodCheckLessThan",(e,t)=>{er.init(e,t);const r=xf[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ww=X("$ZodCheckGreaterThan",(e,t)=>{er.init(e,t);const r=xf[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),_w=X("$ZodCheckMaxLength",(e,t)=>{var r;er.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Oa(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const i=Ta(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Sw=X("$ZodCheckMinLength",(e,t)=>{var r;er.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Oa(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const i=Ta(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),kw=X("$ZodCheckLengthEquals",(e,t)=>{var r;er.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Oa(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,s=o.length;if(s===t.length)return;const i=Ta(o),a=s>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Cs=X("$ZodCheckStringFormat",(e,t)=>{var r,n;er.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),xw=X("$ZodCheckRegex",(e,t)=>{Cs.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ew=X("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=yw),Cs.init(e,t)}),Ow=X("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=vw),Cs.init(e,t)}),Cw=X("$ZodCheckIncludes",(e,t)=>{er.init(e,t);const r=qn(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Tw=X("$ZodCheckStartsWith",(e,t)=>{er.init(e,t);const r=new RegExp(`^${qn(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Dw=X("$ZodCheckEndsWith",(e,t)=>{er.init(e,t);const r=new RegExp(`.*${qn(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Aw=X("$ZodCheckOverwrite",(e,t)=>{er.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Mw{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
1
+ (function(T,U){typeof exports=="object"&&typeof module<"u"?module.exports=U(require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react/jsx-runtime","react","react-dom"],U):(T=typeof globalThis<"u"?globalThis:T||self,T["brauz-questionnaire-ui"]=U(T["react/jsx-runtime"],T.React,T.reactDOM))})(this,(function(T,U,Lu){"use strict";function zu(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const b=zu(U),ms=zu(Lu),nb={with_section_title:!0,with_label:!0,form_config:{},renderFooter:null},$u=U.createContext();function ob({children:e,config:t={}}){const r=U.useMemo(()=>({...nb,...t}),[JSON.stringify(t)]);return T.jsx($u.Provider,{value:r,children:e})}function la(){return U.useContext($u)}var Co=e=>e.type==="checkbox",En=e=>e instanceof Date,$t=e=>e==null;const Uu=e=>typeof e=="object";var yt=e=>!$t(e)&&!Array.isArray(e)&&Uu(e)&&!En(e),Yu=e=>yt(e)&&e.target?Co(e.target)?e.target.checked:e.target.value:e,sb=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ju=(e,t)=>e.has(sb(t)),ib=e=>{const t=e.constructor&&e.constructor.prototype;return yt(t)&&t.hasOwnProperty("isPrototypeOf")},ua=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function vt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(ua&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(yt(e)&&ib(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=vt(e[o]));return n}var gs=e=>/^\w*$/.test(e),st=e=>e===void 0,fa=e=>Array.isArray(e)?e.filter(Boolean):[],da=e=>fa(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ae=(e,t,r)=>{if(!t||!yt(e))return r;const n=(gs(t)?[t]:da(t)).reduce((o,s)=>$t(o)?o:o[s],e);return st(n)||n===e?st(e[t])?r:e[t]:n},Bt=e=>typeof e=="boolean",It=e=>typeof e=="function",Ve=(e,t,r)=>{let n=-1;const o=gs(t)?[t]:da(t),s=o.length,i=s-1;for(;++n<s;){const a=o[n];let c=r;if(n!==i){const u=e[a];c=yt(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=c,e=e[a]}};const ys={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ar={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Lr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ha=U.createContext(null);ha.displayName="HookFormControlContext";const pa=()=>U.useContext(ha);var Vu=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==ar.all&&(t._proxyFormState[i]=!n||ar.all),r&&(r[i]=!0),e[i]}});return o};const ma=typeof window<"u"?U.useLayoutEffect:U.useEffect;function Bu(e){const t=pa(),{control:r=t,disabled:n,name:o,exact:s}=e||{},[i,a]=U.useState(r._formState),c=U.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return ma(()=>r._subscribe({name:o,formState:c.current,exact:s,callback:u=>{!n&&a({...r._formState,...u})}}),[o,n,s]),U.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),U.useMemo(()=>Vu(i,r,c.current,!1),[i,r])}var Ht=e=>typeof e=="string",ga=(e,t,r,n,o)=>Ht(e)?(n&&t.watch.add(e),ae(r,e,o)):Array.isArray(e)?e.map(s=>(n&&t.watch.add(s),ae(r,s))):(n&&(t.watchAll=!0),r),ya=e=>$t(e)||!Uu(e);function cr(e,t,r=new WeakSet){if(ya(e)||ya(t))return Object.is(e,t);if(En(e)&&En(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const i=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const a=t[s];if(En(i)&&En(a)||yt(i)&&yt(a)||Array.isArray(i)&&Array.isArray(a)?!cr(i,a,r):!Object.is(i,a))return!1}}return!0}function Hu(e){const t=pa(),{control:r=t,name:n,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},c=U.useRef(o),u=U.useRef(a),l=U.useRef(void 0),f=U.useRef(r),d=U.useRef(n);u.current=a;const[h,m]=U.useState(()=>{const w=r._getWatch(n,c.current);return u.current?u.current(w):w}),p=U.useCallback(w=>{const _=ga(n,r._names,w||r._formValues,!1,c.current);return u.current?u.current(_):_},[r._formValues,r._names,n]),g=U.useCallback(w=>{if(!s){const _=ga(n,r._names,w||r._formValues,!1,c.current);if(u.current){const S=u.current(_);cr(S,l.current)||(m(S),l.current=S)}else m(_)}},[r._formValues,r._names,s,n]);ma(()=>((f.current!==r||!cr(d.current,n))&&(f.current=r,d.current=n,g()),r._subscribe({name:n,formState:{values:!0},exact:i,callback:w=>{g(w.values)}})),[r,i,n,g]),U.useEffect(()=>r._removeUnmounted());const y=f.current!==r,O=d.current,x=U.useMemo(()=>{if(s)return null;const w=!y&&!cr(O,n);return y||w?p():null},[s,y,n,O,p]);return x!==null?x:h}function ab(e){const t=pa(),{name:r,disabled:n,control:o=t,shouldUnregister:s,defaultValue:i,exact:a=!0}=e,c=ju(o._names.array,r),u=U.useMemo(()=>ae(o._formValues,r,ae(o._defaultValues,r,i)),[o,r,i]),l=Hu({control:o,name:r,defaultValue:u,exact:a}),f=Bu({control:o,name:r,exact:a}),d=U.useRef(e),h=U.useRef(void 0),m=U.useRef(o.register(r,{...e.rules,value:l,...Bt(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;const p=U.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ae(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!ae(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!ae(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!ae(f.validatingFields,r)},error:{enumerable:!0,get:()=>ae(f.errors,r)}}),[f,r]),g=U.useCallback(w=>m.current.onChange({target:{value:Yu(w),name:r},type:ys.CHANGE}),[r]),y=U.useCallback(()=>m.current.onBlur({target:{value:ae(o._formValues,r),name:r},type:ys.BLUR}),[r,o._formValues]),O=U.useCallback(w=>{const _=ae(o._fields,r);_&&_._f&&w&&(_._f.ref={focus:()=>It(w.focus)&&w.focus(),select:()=>It(w.select)&&w.select(),setCustomValidity:S=>It(w.setCustomValidity)&&w.setCustomValidity(S),reportValidity:()=>It(w.reportValidity)&&w.reportValidity()})},[o._fields,r]),x=U.useMemo(()=>({name:r,value:l,...Bt(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:g,onBlur:y,ref:O}),[r,n,f.disabled,g,y,O,l]);return U.useEffect(()=>{const w=o._options.shouldUnregister||s,_=h.current;_&&_!==r&&!c&&o.unregister(_),o.register(r,{...d.current.rules,...Bt(d.current.disabled)?{disabled:d.current.disabled}:{}});const S=(I,v)=>{const E=ae(o._fields,I);E&&E._f&&(E._f.mount=v)};if(S(r,!0),w){const I=vt(ae(o._options.defaultValues,r,d.current.defaultValue));Ve(o._defaultValues,r,I),st(ae(o._formValues,r))&&Ve(o._formValues,r,I)}return!c&&o.register(r),h.current=r,()=>{(c?w&&!o._state.action:w)?o.unregister(r):S(r,!1)}},[r,o,c,s]),U.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),U.useMemo(()=>({field:x,formState:f,fieldState:p}),[x,f,p])}const cb=e=>e.render(ab(e)),va=U.createContext(null);va.displayName="HookFormContext";const lb=()=>U.useContext(va),ub=e=>{const{children:t,watch:r,getValues:n,getFieldState:o,setError:s,clearErrors:i,setValue:a,trigger:c,formState:u,resetField:l,reset:f,handleSubmit:d,unregister:h,control:m,register:p,setFocus:g,subscribe:y}=e;return U.createElement(va.Provider,{value:U.useMemo(()=>({watch:r,getValues:n,getFieldState:o,setError:s,clearErrors:i,setValue:a,trigger:c,formState:u,resetField:l,reset:f,handleSubmit:d,unregister:h,control:m,register:p,setFocus:g,subscribe:y}),[i,m,u,o,n,d,p,f,l,s,g,a,y,c,h,r])},U.createElement(ha.Provider,{value:m},t))};var ba=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},To=e=>Array.isArray(e)?e:[e],Zu=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}};function Gu(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const o=e[n],s=t[n];if(o&&yt(o)&&s){const i=Gu(o,s);yt(i)&&(r[n]=i)}else e[n]&&(r[n]=s)}return r}var Ft=e=>yt(e)&&!Object.keys(e).length,wa=e=>e.type==="file",vs=e=>{if(!ua)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},qu=e=>e.type==="select-multiple",_a=e=>e.type==="radio",fb=e=>_a(e)||Co(e),Sa=e=>vs(e)&&e.isConnected;function db(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=st(e)?n++:e[t[n++]];return e}function hb(e){for(const t in e)if(e.hasOwnProperty(t)&&!st(e[t]))return!1;return!0}function bt(e,t){const r=Array.isArray(t)?t:gs(t)?[t]:da(t),n=r.length===1?e:db(e,r),o=r.length-1,s=r[o];return n&&delete n[s],o!==0&&(yt(n)&&Ft(n)||Array.isArray(n)&&hb(n))&&bt(e,r.slice(0,-1)),e}var pb=e=>{for(const t in e)if(It(e[t]))return!0;return!1};function Ku(e){return Array.isArray(e)||yt(e)&&!pb(e)}function ka(e,t={}){for(const r in e){const n=e[r];Ku(n)?(t[r]=Array.isArray(n)?[]:{},ka(n,t[r])):st(n)||(t[r]=!0)}return t}function Hn(e,t,r){r||(r=ka(t));for(const n in e){const o=e[n];if(Ku(o))st(t)||ya(r[n])?r[n]=ka(o,Array.isArray(o)?[]:{}):Hn(o,$t(t)?{}:t[n],r[n]);else{const s=t[n];r[n]=!cr(o,s)}}return r}const Ju={value:!1,isValid:!1},Xu={value:!0,isValid:!0};var Qu=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&&!st(e[0].attributes.value)?st(e[0].value)||e[0].value===""?Xu:{value:e[0].value,isValid:!0}:Xu:Ju}return Ju},ef=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>st(e)?e:t?e===""?NaN:e&&+e:r&&Ht(e)?new Date(e):n?n(e):e;const tf={isValid:!1,value:null};var rf=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,tf):tf;function nf(e){const t=e.ref;return wa(t)?t.files:_a(t)?rf(e.refs).value:qu(t)?[...t.selectedOptions].map(({value:r})=>r):Co(t)?Qu(e.refs).value:ef(st(t.value)?e.ref.value:t.value,e)}var mb=(e,t,r,n)=>{const o={};for(const s of e){const i=ae(t,s);i&&Ve(o,s,i._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},bs=e=>e instanceof RegExp,Do=e=>st(e)?e:bs(e)?e.source:yt(e)?bs(e.value)?e.value.source:e.value:e,of=e=>({isOnSubmit:!e||e===ar.onSubmit,isOnBlur:e===ar.onBlur,isOnChange:e===ar.onChange,isOnAll:e===ar.all,isOnTouch:e===ar.onTouched});const sf="AsyncFunction";var gb=e=>!!e&&!!e.validate&&!!(It(e.validate)&&e.validate.constructor.name===sf||yt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===sf)),yb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),af=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Ao=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const s=ae(e,o);if(s){const{_f:i,...a}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!n)return!0;if(i.ref&&t(i.ref,i.name)&&!n)return!0;if(Ao(a,t))break}else if(yt(a)&&Ao(a,t))break}}};function cf(e,t,r){const n=ae(e,r);if(n||gs(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const s=o.join("."),i=ae(t,s),a=ae(e,s);if(i&&!Array.isArray(i)&&r!==s)return{name:r};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};o.pop()}return{name:r}}var vb=(e,t,r,n)=>{r(e);const{name:o,...s}=e;return Ft(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!n||ar.all))},bb=(e,t,r)=>!e||!t||e===t||To(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),wb=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,_b=(e,t)=>!fa(ae(e,t)).length&&bt(e,t),Sb=(e,t,r)=>{const n=To(ae(e,r));return Ve(n,"root",t[r]),Ve(e,r,n),e};function lf(e,t,r="validate"){if(Ht(e)||Array.isArray(e)&&e.every(Ht)||Bt(e)&&!e)return{type:r,message:Ht(e)?e:"",ref:t}}var Zn=e=>yt(e)&&!bs(e)?e:{value:e,message:""},uf=async(e,t,r,n,o,s)=>{const{ref:i,refs:a,required:c,maxLength:u,minLength:l,min:f,max:d,pattern:h,validate:m,name:p,valueAsNumber:g,mount:y}=e._f,O=ae(r,p);if(!y||t.has(p))return{};const x=a?a[0]:i,w=M=>{o&&x.reportValidity&&(x.setCustomValidity(Bt(M)?"":M||""),x.reportValidity())},_={},S=_a(i),I=Co(i),v=S||I,E=(g||wa(i))&&st(i.value)&&st(O)||vs(i)&&i.value===""||O===""||Array.isArray(O)&&!O.length,P=ba.bind(null,p,n,_),A=(M,F,N,W=Lr.maxLength,C=Lr.minLength)=>{const k=M?F:N;_[p]={type:M?W:C,message:k,ref:i,...P(M?W:C,k)}};if(s?!Array.isArray(O)||!O.length:c&&(!v&&(E||$t(O))||Bt(O)&&!O||I&&!Qu(a).isValid||S&&!rf(a).isValid)){const{value:M,message:F}=Ht(c)?{value:!!c,message:c}:Zn(c);if(M&&(_[p]={type:Lr.required,message:F,ref:x,...P(Lr.required,F)},!n))return w(F),_}if(!E&&(!$t(f)||!$t(d))){let M,F;const N=Zn(d),W=Zn(f);if(!$t(O)&&!isNaN(O)){const C=i.valueAsNumber||O&&+O;$t(N.value)||(M=C>N.value),$t(W.value)||(F=C<W.value)}else{const C=i.valueAsDate||new Date(O),k=D=>new Date(new Date().toDateString()+" "+D),Y=i.type=="time",$=i.type=="week";Ht(N.value)&&O&&(M=Y?k(O)>k(N.value):$?O>N.value:C>new Date(N.value)),Ht(W.value)&&O&&(F=Y?k(O)<k(W.value):$?O<W.value:C<new Date(W.value))}if((M||F)&&(A(!!M,N.message,W.message,Lr.max,Lr.min),!n))return w(_[p].message),_}if((u||l)&&!E&&(Ht(O)||s&&Array.isArray(O))){const M=Zn(u),F=Zn(l),N=!$t(M.value)&&O.length>+M.value,W=!$t(F.value)&&O.length<+F.value;if((N||W)&&(A(N,M.message,F.message),!n))return w(_[p].message),_}if(h&&!E&&Ht(O)){const{value:M,message:F}=Zn(h);if(bs(M)&&!O.match(M)&&(_[p]={type:Lr.pattern,message:F,ref:i,...P(Lr.pattern,F)},!n))return w(F),_}if(m){if(It(m)){const M=await m(O,r),F=lf(M,x);if(F&&(_[p]={...F,...P(Lr.validate,F.message)},!n))return w(F.message),_}else if(yt(m)){let M={};for(const F in m){if(!Ft(M)&&!n)break;const N=lf(await m[F](O,r),x,F);N&&(M={...N,...P(F,N.message)},w(N.message),n&&(_[p]=M))}if(!Ft(M)&&(_[p]={ref:x,...M},!n))return _}}return w(!0),_};const kb={mode:ar.onSubmit,reValidateMode:ar.onChange,shouldFocusError:!0};function xb(e={}){let t={...kb,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:It(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=yt(t.defaultValues)||yt(t.values)?vt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:vt(o),i={action:!1,mount:!1,watch:!1,keepIsValid:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const l={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={...l};let d={...f};const h={array:Zu(),state:Zu()},m=t.criteriaMode===ar.all,p=R=>j=>{clearTimeout(u),u=setTimeout(R,j)},g=async R=>{if(!i.keepIsValid&&!t.disabled&&(f.isValid||d.isValid||R)){let j;t.resolver?(j=Ft((await v()).errors),y()):j=await P(n,!0),j!==r.isValid&&h.state.next({isValid:j})}},y=(R,j)=>{!t.disabled&&(f.isValidating||f.validatingFields||d.isValidating||d.validatingFields)&&((R||Array.from(a.mount)).forEach(H=>{H&&(j?Ve(r.validatingFields,H,j):bt(r.validatingFields,H))}),h.state.next({validatingFields:r.validatingFields,isValidating:!Ft(r.validatingFields)}))},O=(R,j=[],H,ee,te=!0,re=!0)=>{if(ee&&H&&!t.disabled){if(i.action=!0,re&&Array.isArray(ae(n,R))){const ue=H(ae(n,R),ee.argA,ee.argB);te&&Ve(n,R,ue)}if(re&&Array.isArray(ae(r.errors,R))){const ue=H(ae(r.errors,R),ee.argA,ee.argB);te&&Ve(r.errors,R,ue),_b(r.errors,R)}if((f.touchedFields||d.touchedFields)&&re&&Array.isArray(ae(r.touchedFields,R))){const ue=H(ae(r.touchedFields,R),ee.argA,ee.argB);te&&Ve(r.touchedFields,R,ue)}(f.dirtyFields||d.dirtyFields)&&(r.dirtyFields=Hn(o,s)),h.state.next({name:R,isDirty:M(R,j),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ve(s,R,j)},x=(R,j)=>{Ve(r.errors,R,j),h.state.next({errors:r.errors})},w=R=>{r.errors=R,h.state.next({errors:r.errors,isValid:!1})},_=(R,j,H,ee)=>{const te=ae(n,R);if(te){const re=ae(s,R,st(H)?ae(o,R):H);st(re)||ee&&ee.defaultChecked||j?Ve(s,R,j?re:nf(te._f)):W(R,re),i.mount&&!i.action&&g()}},S=(R,j,H,ee,te)=>{let re=!1,ue=!1;const be={name:R};if(!t.disabled){if(!H||ee){(f.isDirty||d.isDirty)&&(ue=r.isDirty,r.isDirty=be.isDirty=M(),re=ue!==be.isDirty);const Ee=cr(ae(o,R),j);ue=!!ae(r.dirtyFields,R),Ee?bt(r.dirtyFields,R):Ve(r.dirtyFields,R,!0),be.dirtyFields=r.dirtyFields,re=re||(f.dirtyFields||d.dirtyFields)&&ue!==!Ee}if(H){const Ee=ae(r.touchedFields,R);Ee||(Ve(r.touchedFields,R,H),be.touchedFields=r.touchedFields,re=re||(f.touchedFields||d.touchedFields)&&Ee!==H)}re&&te&&h.state.next(be)}return re?be:{}},I=(R,j,H,ee)=>{const te=ae(r.errors,R),re=(f.isValid||d.isValid)&&Bt(j)&&r.isValid!==j;if(t.delayError&&H?(c=p(()=>x(R,H)),c(t.delayError)):(clearTimeout(u),c=null,H?Ve(r.errors,R,H):bt(r.errors,R)),(H?!cr(te,H):te)||!Ft(ee)||re){const ue={...ee,...re&&Bt(j)?{isValid:j}:{},errors:r.errors,name:R};r={...r,...ue},h.state.next(ue)}},v=async R=>(y(R,!0),await t.resolver(s,t.context,mb(R||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),E=async R=>{const{errors:j}=await v(R);if(y(R),R)for(const H of R){const ee=ae(j,H);ee?Ve(r.errors,H,ee):bt(r.errors,H)}else r.errors=j;return j},P=async(R,j,H={valid:!0})=>{for(const ee in R){const te=R[ee];if(te){const{_f:re,...ue}=te;if(re){const be=a.array.has(re.name),Ee=te._f&&gb(te._f);Ee&&f.validatingFields&&y([re.name],!0);const Le=await uf(te,a.disabled,s,m,t.shouldUseNativeValidation&&!j,be);if(Ee&&f.validatingFields&&y([re.name]),Le[re.name]&&(H.valid=!1,j||e.shouldUseNativeValidation))break;!j&&(ae(Le,re.name)?be?Sb(r.errors,Le,re.name):Ve(r.errors,re.name,Le[re.name]):bt(r.errors,re.name))}!Ft(ue)&&await P(ue,j,H)}}return H.valid},A=()=>{for(const R of a.unMount){const j=ae(n,R);j&&(j._f.refs?j._f.refs.every(H=>!Sa(H)):!Sa(j._f.ref))&&oe(R)}a.unMount=new Set},M=(R,j)=>!t.disabled&&(R&&j&&Ve(s,R,j),!cr(V(),o)),F=(R,j,H)=>ga(R,a,{...i.mount?s:st(j)?o:Ht(R)?{[R]:j}:j},H,j),N=R=>fa(ae(i.mount?s:o,R,t.shouldUnregister?ae(o,R,[]):[])),W=(R,j,H={})=>{const ee=ae(n,R);let te=j;if(ee){const re=ee._f;re&&(!re.disabled&&Ve(s,R,ef(j,re)),te=vs(re.ref)&&$t(j)?"":j,qu(re.ref)?[...re.ref.options].forEach(ue=>ue.selected=te.includes(ue.value)):re.refs?Co(re.ref)?re.refs.forEach(ue=>{(!ue.defaultChecked||!ue.disabled)&&(Array.isArray(te)?ue.checked=!!te.find(be=>be===ue.value):ue.checked=te===ue.value||!!te)}):re.refs.forEach(ue=>ue.checked=ue.value===te):wa(re.ref)?re.ref.value="":(re.ref.value=te,re.ref.type||h.state.next({name:R,values:vt(s)})))}(H.shouldDirty||H.shouldTouch)&&S(R,te,H.shouldTouch,H.shouldDirty,!0),H.shouldValidate&&D(R)},C=(R,j,H)=>{for(const ee in j){if(!j.hasOwnProperty(ee))return;const te=j[ee],re=R+"."+ee,ue=ae(n,re);(a.array.has(R)||yt(te)||ue&&!ue._f)&&!En(te)?C(re,te,H):W(re,te,H)}},k=(R,j,H={})=>{const ee=ae(n,R),te=a.array.has(R),re=vt(j);Ve(s,R,re),te?(h.array.next({name:R,values:vt(s)}),(f.isDirty||f.dirtyFields||d.isDirty||d.dirtyFields)&&H.shouldDirty&&h.state.next({name:R,dirtyFields:Hn(o,s),isDirty:M(R,re)})):ee&&!ee._f&&!$t(re)?C(R,re,H):W(R,re,H),af(R,a)?h.state.next({...r,name:R,values:vt(s)}):h.state.next({name:i.mount?R:void 0,values:vt(s)})},Y=async R=>{i.mount=!0;const j=R.target;let H=j.name,ee=!0;const te=ae(n,H),re=Ee=>{ee=Number.isNaN(Ee)||En(Ee)&&isNaN(Ee.getTime())||cr(Ee,ae(s,H,Ee))},ue=of(t.mode),be=of(t.reValidateMode);if(te){let Ee,Le;const ot=j.type?nf(te._f):Yu(R),Qe=R.type===ys.BLUR||R.type===ys.FOCUS_OUT,xt=!yb(te._f)&&!t.resolver&&!ae(r.errors,H)&&!te._f.deps||wb(Qe,ae(r.touchedFields,H),r.isSubmitted,be,ue),gt=af(H,a,Qe);Ve(s,H,ot),Qe?(!j||!j.readOnly)&&(te._f.onBlur&&te._f.onBlur(R),c&&c(0)):te._f.onChange&&te._f.onChange(R);const dt=S(H,ot,Qe),jt=!Ft(dt)||gt;if(!Qe&&h.state.next({name:H,type:R.type,values:vt(s)}),xt)return(f.isValid||d.isValid)&&(t.mode==="onBlur"?Qe&&g():Qe||g()),jt&&h.state.next({name:H,...gt?{}:dt});if(!Qe&&gt&&h.state.next({...r}),t.resolver){const{errors:_r}=await v([H]);if(y([H]),re(ot),ee){const Sr=cf(r.errors,n,H),_e=cf(_r,n,Sr.name||H);Ee=_e.error,H=_e.name,Le=Ft(_r)}}else y([H],!0),Ee=(await uf(te,a.disabled,s,m,t.shouldUseNativeValidation))[H],y([H]),re(ot),ee&&(Ee?Le=!1:(f.isValid||d.isValid)&&(Le=await P(n,!0)));ee&&(te._f.deps&&(!Array.isArray(te._f.deps)||te._f.deps.length>0)&&D(te._f.deps),I(H,Le,Ee,dt))}},$=(R,j)=>{if(ae(r.errors,j)&&R.focus)return R.focus(),1},D=async(R,j={})=>{let H,ee;const te=To(R);if(t.resolver){const re=await E(st(R)?R:te);H=Ft(re),ee=R?!te.some(ue=>ae(re,ue)):H}else R?(ee=(await Promise.all(te.map(async re=>{const ue=ae(n,re);return await P(ue&&ue._f?{[re]:ue}:ue)}))).every(Boolean),!(!ee&&!r.isValid)&&g()):ee=H=await P(n);return h.state.next({...!Ht(R)||(f.isValid||d.isValid)&&H!==r.isValid?{}:{name:R},...t.resolver||!R?{isValid:H}:{},errors:r.errors}),j.shouldFocus&&!ee&&Ao(n,$,R?te:a.mount),ee},V=(R,j)=>{let H={...i.mount?s:o};return j&&(H=Gu(j.dirtyFields?r.dirtyFields:r.touchedFields,H)),st(R)?H:Ht(R)?ae(H,R):R.map(ee=>ae(H,ee))},Z=(R,j)=>({invalid:!!ae((j||r).errors,R),isDirty:!!ae((j||r).dirtyFields,R),error:ae((j||r).errors,R),isValidating:!!ae(r.validatingFields,R),isTouched:!!ae((j||r).touchedFields,R)}),G=R=>{R&&To(R).forEach(j=>bt(r.errors,j)),h.state.next({errors:R?r.errors:{}})},B=(R,j,H)=>{const ee=(ae(n,R,{_f:{}})._f||{}).ref,te=ae(r.errors,R)||{},{ref:re,message:ue,type:be,...Ee}=te;Ve(r.errors,R,{...Ee,...j,ref:ee}),h.state.next({name:R,errors:r.errors,isValid:!1}),H&&H.shouldFocus&&ee&&ee.focus&&ee.focus()},L=(R,j)=>It(R)?h.state.subscribe({next:H=>"values"in H&&R(F(void 0,j),H)}):F(R,j,!0),J=R=>h.state.subscribe({next:j=>{bb(R.name,j.name,R.exact)&&vb(j,R.formState||f,We,R.reRenderRoot)&&R.callback({values:{...s},...r,...j,defaultValues:o})}}).unsubscribe,q=R=>(i.mount=!0,d={...d,...R.formState},J({...R,formState:{...l,...R.formState}})),oe=(R,j={})=>{for(const H of R?To(R):a.mount)a.mount.delete(H),a.array.delete(H),j.keepValue||(bt(n,H),bt(s,H)),!j.keepError&&bt(r.errors,H),!j.keepDirty&&bt(r.dirtyFields,H),!j.keepTouched&&bt(r.touchedFields,H),!j.keepIsValidating&&bt(r.validatingFields,H),!t.shouldUnregister&&!j.keepDefaultValue&&bt(o,H);h.state.next({values:vt(s)}),h.state.next({...r,...j.keepDirty?{isDirty:M()}:{}}),!j.keepIsValid&&g()},Q=({disabled:R,name:j})=>{if(Bt(R)&&i.mount||R||a.disabled.has(j)){const te=a.disabled.has(j)!==!!R;R?a.disabled.add(j):a.disabled.delete(j),te&&i.mount&&!i.action&&g()}},ne=(R,j={})=>{let H=ae(n,R);const ee=Bt(j.disabled)||Bt(t.disabled);return Ve(n,R,{...H||{},_f:{...H&&H._f?H._f:{ref:{name:R}},name:R,mount:!0,...j}}),a.mount.add(R),H?Q({disabled:Bt(j.disabled)?j.disabled:t.disabled,name:R}):_(R,!0,j.value),{...ee?{disabled:j.disabled||t.disabled}:{},...t.progressive?{required:!!j.required,min:Do(j.min),max:Do(j.max),minLength:Do(j.minLength),maxLength:Do(j.maxLength),pattern:Do(j.pattern)}:{},name:R,onChange:Y,onBlur:Y,ref:te=>{if(te){ne(R,j),H=ae(n,R);const re=st(te.value)&&te.querySelectorAll&&te.querySelectorAll("input,select,textarea")[0]||te,ue=fb(re),be=H._f.refs||[];if(ue?be.find(Ee=>Ee===re):re===H._f.ref)return;Ve(n,R,{_f:{...H._f,...ue?{refs:[...be.filter(Sa),re,...Array.isArray(ae(o,R))?[{}]:[]],ref:{type:re.type,name:R}}:{ref:re}}}),_(R,!1,void 0,re)}else H=ae(n,R,{}),H._f&&(H._f.mount=!1),(t.shouldUnregister||j.shouldUnregister)&&!(ju(a.array,R)&&i.action)&&a.unMount.add(R)}}},le=()=>t.shouldFocusError&&Ao(n,$,a.mount),K=R=>{Bt(R)&&(h.state.next({disabled:R}),Ao(n,(j,H)=>{const ee=ae(n,H);ee&&(j.disabled=ee._f.disabled||R,Array.isArray(ee._f.refs)&&ee._f.refs.forEach(te=>{te.disabled=ee._f.disabled||R}))},0,!1))},Se=(R,j)=>async H=>{let ee;H&&(H.preventDefault&&H.preventDefault(),H.persist&&H.persist());let te=vt(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:re,values:ue}=await v();y(),r.errors=re,te=vt(ue)}else await P(n);if(a.disabled.size)for(const re of a.disabled)bt(te,re);if(bt(r.errors,"root"),Ft(r.errors)){h.state.next({errors:{}});try{await R(te,H)}catch(re){ee=re}}else j&&await j({...r.errors},H),le(),setTimeout(le);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ft(r.errors)&&!ee,submitCount:r.submitCount+1,errors:r.errors}),ee)throw ee},Ie=(R,j={})=>{ae(n,R)&&(st(j.defaultValue)?k(R,vt(ae(o,R))):(k(R,j.defaultValue),Ve(o,R,vt(j.defaultValue))),j.keepTouched||bt(r.touchedFields,R),j.keepDirty||(bt(r.dirtyFields,R),r.isDirty=j.defaultValue?M(R,vt(ae(o,R))):M()),j.keepError||(bt(r.errors,R),f.isValid&&g()),h.state.next({...r}))},ke=(R,j={})=>{const H=R?vt(R):o,ee=vt(H),te=Ft(R),re=te?o:ee;if(j.keepDefaultValues||(o=H),!j.keepValues){if(j.keepDirtyValues){const ue=new Set([...a.mount,...Object.keys(Hn(o,s))]);for(const be of Array.from(ue)){const Ee=ae(r.dirtyFields,be),Le=ae(s,be),ot=ae(re,be);Ee&&!st(Le)?Ve(re,be,Le):!Ee&&!st(ot)&&k(be,ot)}}else{if(ua&&st(R))for(const ue of a.mount){const be=ae(n,ue);if(be&&be._f){const Ee=Array.isArray(be._f.refs)?be._f.refs[0]:be._f.ref;if(vs(Ee)){const Le=Ee.closest("form");if(Le){Le.reset();break}}}}if(j.keepFieldsRef)for(const ue of a.mount)k(ue,ae(re,ue));else n={}}s=t.shouldUnregister?j.keepDefaultValues?vt(o):{}:vt(re),h.array.next({values:{...re}}),h.state.next({values:{...re}})}a={mount:j.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!j.keepIsValid||!!j.keepDirtyValues||!t.shouldUnregister&&!Ft(re),i.watch=!!t.shouldUnregister,i.keepIsValid=!!j.keepIsValid,i.action=!1,j.keepErrors||(r.errors={}),h.state.next({submitCount:j.keepSubmitCount?r.submitCount:0,isDirty:te?!1:j.keepDirty?r.isDirty:!!(j.keepDefaultValues&&!cr(R,o)),isSubmitted:j.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:te?{}:j.keepDirtyValues?j.keepDefaultValues&&s?Hn(o,s):r.dirtyFields:j.keepDefaultValues&&R?Hn(o,R):j.keepDirty?r.dirtyFields:{},touchedFields:j.keepTouched?r.touchedFields:{},errors:j.keepErrors?r.errors:{},isSubmitSuccessful:j.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ge=(R,j)=>ke(It(R)?R(s):R,{...t.resetOptions,...j}),Re=(R,j={})=>{const H=ae(n,R),ee=H&&H._f;if(ee){const te=ee.refs?ee.refs[0]:ee.ref;te.focus&&setTimeout(()=>{te.focus(),j.shouldSelect&&It(te.select)&&te.select()})}},We=R=>{r={...r,...R}},nt={control:{register:ne,unregister:oe,getFieldState:Z,handleSubmit:Se,setError:B,_subscribe:J,_runSchema:v,_updateIsValidating:y,_focusError:le,_getWatch:F,_getDirty:M,_setValid:g,_setFieldArray:O,_setDisabledField:Q,_setErrors:w,_getFieldArray:N,_reset:ke,_resetDefaultValues:()=>It(t.defaultValues)&&t.defaultValues().then(R=>{Ge(R,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:A,_disableForm:K,_subjects:h,_proxyFormState:f,get _fields(){return n},get _formValues(){return s},get _state(){return i},set _state(R){i=R},get _defaultValues(){return o},get _names(){return a},set _names(R){a=R},get _formState(){return r},get _options(){return t},set _options(R){t={...t,...R}}},subscribe:q,trigger:D,register:ne,handleSubmit:Se,watch:L,setValue:k,getValues:V,reset:Ge,resetField:Ie,clearErrors:G,unregister:oe,setError:B,setFocus:Re,getFieldState:Z};return{...nt,formControl:nt}}function Eb(e={}){const t=U.useRef(void 0),r=U.useRef(void 0),[n,o]=U.useState({isDirty:!1,isValidating:!1,isLoading:It(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:It(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!It(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...a}=xb(e);t.current={...a,formState:n}}const s=t.current.control;return s._options=e,ma(()=>{const i=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(a=>({...a,isReady:!0})),s._formState.isReady=!0,i},[s]),U.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),U.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),U.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),U.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),U.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==n.isDirty&&s._subjects.state.next({isDirty:i})}},[s,n.isDirty]),U.useEffect(()=>{var i;e.values&&!cr(e.values,r.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((i=s._options.resetOptions)===null||i===void 0)&&i.keepIsValid||s._setValid(),r.current=e.values,o(a=>({...a}))):s._resetDefaultValues()},[s,e.values]),U.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=U.useMemo(()=>Vu(n,s),[s,n]),t.current}function X(e,t,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const u=i.prototype,l=Object.keys(u);for(let f=0;f<l.length;f++){const d=l[f];d in a||(a[d]=u[d].bind(a))}}const o=r?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var c;const u=r?.Parent?new s:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const l of u._zod.deferred)l();return u}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Gn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ff extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const df={};function On(e){return df}function hf(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function xa(e,t){return typeof t=="bigint"?t.toString():t}function Ea(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Oa(e){return e==null}function Ca(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}const pf=Symbol("evaluating");function Be(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==pf)return n===void 0&&(n=pf,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Cn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function nn(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function mf(e){return JSON.stringify(e)}function Ob(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const gf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ws(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Cb=Ea(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Mo(e){if(ws(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(ws(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function yf(e){return Mo(e)?{...e}:Array.isArray(e)?[...e]:e}const Tb=new Set(["string","number","symbol"]);function qn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function on(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function we(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Db(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Ab(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=nn(e._zod.def,{get shape(){const i={};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=r.shape[a])}return Cn(this,"shape",i),i},checks:[]});return on(e,s)}function Mb(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=nn(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return Cn(this,"shape",i),i},checks:[]});return on(e,s)}function Pb(e,t){if(!Mo(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const s=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=nn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Cn(this,"shape",s),s}});return on(e,o)}function Nb(e,t){if(!Mo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=nn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Cn(this,"shape",n),n}});return on(e,r)}function Ib(e,t){const r=nn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Cn(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return on(e,r)}function Fb(e,t,r){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=nn(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(r)for(const u in r){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return Cn(this,"shape",c),c},checks:[]});return on(t,i)}function Rb(e,t,r){const n=nn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const i in r){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return Cn(this,"shape",s),s}});return on(t,n)}function Kn(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function vf(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function _s(e){return typeof e=="string"?e:e?.message}function Tn(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=_s(e.inst?._zod.def?.error?.(e))??_s(t?.error?.(e))??_s(r.customError?.(e))??_s(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function Ta(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Po(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const bf=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,xa,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Da=X("$ZodError",bf),Ss=X("$ZodError",bf,{Parent:Error});function Wb(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function Lb(e,t=r=>r.message){const r={_errors:[]},n=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(i=>n({issues:i}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)r._errors.push(t(s));else{let i=r,a=0;for(;a<s.path.length;){const c=s.path[a];a===s.path.length-1?(i[c]=i[c]||{_errors:[]},i[c]._errors.push(t(s))):i[c]=i[c]||{_errors:[]},i=i[c],a++}}};return n(e),r}const ks=e=>(t,r,n,o)=>{const s=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise)throw new Gn;if(i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>Tn(c,s,On())));throw gf(a,o?.callee),a}return i.value},zb=ks(Ss),xs=e=>async(t,r,n,o)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>Tn(c,s,On())));throw gf(a,o?.callee),a}return i.value},$b=xs(Ss),Es=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Gn;return s.issues.length?{success:!1,error:new(e??Da)(s.issues.map(i=>Tn(i,o,On())))}:{success:!0,data:s.value}},Ub=Es(Ss),Os=e=>async(t,r,n)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>Tn(i,o,On())))}:{success:!0,data:s.value}},Yb=Os(Ss),jb=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ks(e)(t,r,o)},Vb=e=>(t,r,n)=>ks(e)(t,r,n),Bb=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return xs(e)(t,r,o)},Hb=e=>async(t,r,n)=>xs(e)(t,r,n),Zb=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Es(e)(t,r,o)},Gb=e=>(t,r,n)=>Es(e)(t,r,n),qb=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Os(e)(t,r,o)},Kb=e=>async(t,r,n)=>Os(e)(t,r,n),Jb=/^[cC][^\s-]{8,}$/,Xb=/^[0-9a-z]+$/,Qb=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ew=/^[0-9a-vA-V]{20}$/,tw=/^[A-Za-z0-9]{27}$/,rw=/^[a-zA-Z0-9_-]{21}$/,nw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ow=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,wf=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,sw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,iw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function aw(){return new RegExp(iw,"u")}const cw=/^(?:(?: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])$/,lw=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,uw=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,fw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,dw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,_f=/^[A-Za-z0-9_-]*$/,hw=/^\+[1-9]\d{6,14}$/,Sf="(?:(?:\\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])))",pw=new RegExp(`^${Sf}$`);function kf(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function mw(e){return new RegExp(`^${kf(e)}$`)}function gw(e){const t=kf({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Sf}T(?:${n})$`)}const yw=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},vw=/^[^A-Z]*$/,bw=/^[^a-z]*$/,er=X("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),xf={number:"number",bigint:"bigint",object:"date"},ww=X("$ZodCheckLessThan",(e,t)=>{er.init(e,t);const r=xf[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),_w=X("$ZodCheckGreaterThan",(e,t)=>{er.init(e,t);const r=xf[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Sw=X("$ZodCheckMaxLength",(e,t)=>{var r;er.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Oa(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const i=Ta(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),kw=X("$ZodCheckMinLength",(e,t)=>{var r;er.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Oa(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const i=Ta(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),xw=X("$ZodCheckLengthEquals",(e,t)=>{var r;er.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Oa(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,s=o.length;if(s===t.length)return;const i=Ta(o),a=s>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Cs=X("$ZodCheckStringFormat",(e,t)=>{var r,n;er.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Ew=X("$ZodCheckRegex",(e,t)=>{Cs.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ow=X("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=vw),Cs.init(e,t)}),Cw=X("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=bw),Cs.init(e,t)}),Tw=X("$ZodCheckIncludes",(e,t)=>{er.init(e,t);const r=qn(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Dw=X("$ZodCheckStartsWith",(e,t)=>{er.init(e,t);const r=new RegExp(`^${qn(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Aw=X("$ZodCheckEndsWith",(e,t)=>{er.init(e,t);const r=new RegExp(`.*${qn(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Mw=X("$ZodCheckOverwrite",(e,t)=>{er.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Pw{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
2
2
  `).filter(i=>i),o=Math.min(...n.map(i=>i.length-i.trimStart().length)),s=n.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const t=Function,r=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...r,o.join(`
3
- `))}}const Pw={major:4,minor:3,patch:6},ht=X("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pw;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const o of n)for(const s of o._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(i,a,c)=>{let u=Kn(i),l;for(const f of a){if(f._zod.def.when){if(!f._zod.def.when(i))continue}else if(u)continue;const d=i.issues.length,h=f._zod.check(i);if(h instanceof Promise&&c?.async===!1)throw new Gn;if(l||h instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await h,i.issues.length!==d&&(u||(u=Kn(i,d)))});else{if(i.issues.length===d)continue;u||(u=Kn(i,d))}}return l?l.then(()=>i):i},s=(i,a,c)=>{if(Kn(i))return i.aborted=!0,i;const u=o(a,n,c);if(u instanceof Promise){if(c.async===!1)throw new Gn;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction==="backward"){const u=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(l=>s(l,i,a)):s(u,i,a)}const c=e._zod.parse(i,a);if(c instanceof Promise){if(a.async===!1)throw new Gn;return c.then(u=>o(u,n,a))}return o(c,n,a)}}Be(e,"~standard",()=>({validate:o=>{try{const s=$b(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Ub(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),Aa=X("$ZodString",(e,t)=>{ht.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??gw(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),it=X("$ZodStringFormat",(e,t)=>{Cs.init(e,t),Aa.init(e,t)}),Nw=X("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=nw),it.init(e,t)}),Iw=X("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=wf(n))}else t.pattern??(t.pattern=wf());it.init(e,t)}),Fw=X("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ow),it.init(e,t)}),Rw=X("$ZodURL",(e,t)=>{it.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Ww=X("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=iw()),it.init(e,t)}),Lw=X("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=tw),it.init(e,t)}),zw=X("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Kb),it.init(e,t)}),$w=X("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Jb),it.init(e,t)}),Uw=X("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Xb),it.init(e,t)}),Yw=X("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Qb),it.init(e,t)}),jw=X("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ew),it.init(e,t)}),Vw=X("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=mw(t)),it.init(e,t)}),Bw=X("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=hw),it.init(e,t)}),Hw=X("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=pw(t)),it.init(e,t)}),Zw=X("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=rw),it.init(e,t)}),Gw=X("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=aw),it.init(e,t),e._zod.bag.format="ipv4"}),qw=X("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=cw),it.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Kw=X("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=lw),it.init(e,t)}),Jw=X("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=uw),it.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[o,s]=n;if(!s)throw new Error;const i=Number(s);if(`${i}`!==s)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Ef(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Xw=X("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=fw),it.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Ef(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Qw(e){if(!_f.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ef(r)}const e_=X("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=_f),it.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Qw(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),t_=X("$ZodE164",(e,t)=>{t.pattern??(t.pattern=dw),it.init(e,t)});function r_(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const n_=X("$ZodJWT",(e,t)=>{it.init(e,t),e._zod.check=r=>{r_(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),o_=X("$ZodAny",(e,t)=>{ht.init(e,t),e._zod.parse=r=>r}),s_=X("$ZodUnknown",(e,t)=>{ht.init(e,t),e._zod.parse=r=>r}),i_=X("$ZodNever",(e,t)=>{ht.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),a_=X("$ZodDate",(e,t)=>{ht.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const o=r.value,s=o instanceof Date;return s&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...s?{received:"Invalid Date"}:{},inst:e}),r}});function Of(e,t,r){e.issues.length&&t.issues.push(...vf(r,e.issues)),t.value[r]=e.value}const c_=X("$ZodArray",(e,t)=>{ht.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const a=o[i],c=t.element._zod.run({value:a,issues:[]},n);c instanceof Promise?s.push(c.then(u=>Of(u,r,i))):Of(c,r,i)}return s.length?Promise.all(s).then(()=>r):r}});function Ts(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...vf(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function Cf(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=Tb(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Tf(e,t,r,n,o,s){const i=[],a=o.keySet,c=o.catchall._zod,u=c.def.type,l=c.optout==="optional";for(const f in t){if(a.has(f))continue;if(u==="never"){i.push(f);continue}const d=c.run({value:t[f],issues:[]},n);d instanceof Promise?e.push(d.then(h=>Ts(h,r,f,t,l))):Ts(d,r,f,t,l)}return i.length&&r.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}const l_=X("$ZodObject",(e,t)=>{if(ht.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const n=Ea(()=>Cf(t));Be(e._zod,"propValues",()=>{const a=t.shape,c={};for(const u in a){const l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(const f of l.values)c[u].add(f)}}return c});const o=ws,s=t.catchall;let i;e._zod.parse=(a,c)=>{i??(i=n.value);const u=a.value;if(!o(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};const l=[],f=i.shape;for(const d of i.keys){const h=f[d],m=h._zod.optout==="optional",p=h._zod.run({value:u[d],issues:[]},c);p instanceof Promise?l.push(p.then(g=>Ts(g,a,d,u,m))):Ts(p,a,d,u,m)}return s?Tf(l,u,a,c,n.value,e):l.length?Promise.all(l).then(()=>a):a}}),u_=X("$ZodObjectJIT",(e,t)=>{l_.init(e,t);const r=e._zod.parse,n=Ea(()=>Cf(t)),o=d=>{const h=new Mw(["shape","payload","ctx"]),m=n.value,p=x=>{const w=mf(x);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};h.write("const input = payload.value;");const g=Object.create(null);let y=0;for(const x of m.keys)g[x]=`key_${y++}`;h.write("const newResult = {};");for(const x of m.keys){const w=g[x],_=mf(x),I=d[x]?._zod?.optout==="optional";h.write(`const ${w} = ${p(x)};`),I?h.write(`
3
+ `))}}const Nw={major:4,minor:3,patch:6},ht=X("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Nw;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const o of n)for(const s of o._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(i,a,c)=>{let u=Kn(i),l;for(const f of a){if(f._zod.def.when){if(!f._zod.def.when(i))continue}else if(u)continue;const d=i.issues.length,h=f._zod.check(i);if(h instanceof Promise&&c?.async===!1)throw new Gn;if(l||h instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await h,i.issues.length!==d&&(u||(u=Kn(i,d)))});else{if(i.issues.length===d)continue;u||(u=Kn(i,d))}}return l?l.then(()=>i):i},s=(i,a,c)=>{if(Kn(i))return i.aborted=!0,i;const u=o(a,n,c);if(u instanceof Promise){if(c.async===!1)throw new Gn;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction==="backward"){const u=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(l=>s(l,i,a)):s(u,i,a)}const c=e._zod.parse(i,a);if(c instanceof Promise){if(a.async===!1)throw new Gn;return c.then(u=>o(u,n,a))}return o(c,n,a)}}Be(e,"~standard",()=>({validate:o=>{try{const s=Ub(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Yb(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),Aa=X("$ZodString",(e,t)=>{ht.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??yw(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),it=X("$ZodStringFormat",(e,t)=>{Cs.init(e,t),Aa.init(e,t)}),Iw=X("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ow),it.init(e,t)}),Fw=X("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=wf(n))}else t.pattern??(t.pattern=wf());it.init(e,t)}),Rw=X("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=sw),it.init(e,t)}),Ww=X("$ZodURL",(e,t)=>{it.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Lw=X("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=aw()),it.init(e,t)}),zw=X("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=rw),it.init(e,t)}),$w=X("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Jb),it.init(e,t)}),Uw=X("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Xb),it.init(e,t)}),Yw=X("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Qb),it.init(e,t)}),jw=X("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ew),it.init(e,t)}),Vw=X("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=tw),it.init(e,t)}),Bw=X("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=gw(t)),it.init(e,t)}),Hw=X("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=pw),it.init(e,t)}),Zw=X("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=mw(t)),it.init(e,t)}),Gw=X("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=nw),it.init(e,t)}),qw=X("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=cw),it.init(e,t),e._zod.bag.format="ipv4"}),Kw=X("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=lw),it.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Jw=X("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=uw),it.init(e,t)}),Xw=X("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=fw),it.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[o,s]=n;if(!s)throw new Error;const i=Number(s);if(`${i}`!==s)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Ef(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Qw=X("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=dw),it.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Ef(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function e_(e){if(!_f.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ef(r)}const t_=X("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=_f),it.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{e_(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),r_=X("$ZodE164",(e,t)=>{t.pattern??(t.pattern=hw),it.init(e,t)});function n_(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const o_=X("$ZodJWT",(e,t)=>{it.init(e,t),e._zod.check=r=>{n_(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),s_=X("$ZodAny",(e,t)=>{ht.init(e,t),e._zod.parse=r=>r}),i_=X("$ZodUnknown",(e,t)=>{ht.init(e,t),e._zod.parse=r=>r}),a_=X("$ZodNever",(e,t)=>{ht.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),c_=X("$ZodDate",(e,t)=>{ht.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const o=r.value,s=o instanceof Date;return s&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...s?{received:"Invalid Date"}:{},inst:e}),r}});function Of(e,t,r){e.issues.length&&t.issues.push(...vf(r,e.issues)),t.value[r]=e.value}const l_=X("$ZodArray",(e,t)=>{ht.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const a=o[i],c=t.element._zod.run({value:a,issues:[]},n);c instanceof Promise?s.push(c.then(u=>Of(u,r,i))):Of(c,r,i)}return s.length?Promise.all(s).then(()=>r):r}});function Ts(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...vf(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function Cf(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=Db(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Tf(e,t,r,n,o,s){const i=[],a=o.keySet,c=o.catchall._zod,u=c.def.type,l=c.optout==="optional";for(const f in t){if(a.has(f))continue;if(u==="never"){i.push(f);continue}const d=c.run({value:t[f],issues:[]},n);d instanceof Promise?e.push(d.then(h=>Ts(h,r,f,t,l))):Ts(d,r,f,t,l)}return i.length&&r.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}const u_=X("$ZodObject",(e,t)=>{if(ht.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const n=Ea(()=>Cf(t));Be(e._zod,"propValues",()=>{const a=t.shape,c={};for(const u in a){const l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(const f of l.values)c[u].add(f)}}return c});const o=ws,s=t.catchall;let i;e._zod.parse=(a,c)=>{i??(i=n.value);const u=a.value;if(!o(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};const l=[],f=i.shape;for(const d of i.keys){const h=f[d],m=h._zod.optout==="optional",p=h._zod.run({value:u[d],issues:[]},c);p instanceof Promise?l.push(p.then(g=>Ts(g,a,d,u,m))):Ts(p,a,d,u,m)}return s?Tf(l,u,a,c,n.value,e):l.length?Promise.all(l).then(()=>a):a}}),f_=X("$ZodObjectJIT",(e,t)=>{u_.init(e,t);const r=e._zod.parse,n=Ea(()=>Cf(t)),o=d=>{const h=new Pw(["shape","payload","ctx"]),m=n.value,p=x=>{const w=mf(x);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};h.write("const input = payload.value;");const g=Object.create(null);let y=0;for(const x of m.keys)g[x]=`key_${y++}`;h.write("const newResult = {};");for(const x of m.keys){const w=g[x],_=mf(x),I=d[x]?._zod?.optout==="optional";h.write(`const ${w} = ${p(x)};`),I?h.write(`
4
4
  if (${w}.issues.length) {
5
5
  if (${_} in input) {
6
6
  payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
@@ -34,14 +34,14 @@
34
34
  newResult[${_}] = ${w}.value;
35
35
  }
36
36
 
37
- `)}h.write("payload.value = newResult;"),h.write("return payload;");const O=h.compile();return(x,w)=>O(d,x,w)};let s;const i=ws,a=!df.jitless,u=a&&Ob.value,l=t.catchall;let f;e._zod.parse=(d,h)=>{f??(f=n.value);const m=d.value;return i(m)?a&&u&&h?.async===!1&&h.jitless!==!0?(s||(s=o(t.shape)),d=s(d,h),l?Tf([],m,d,h,f,e):d):r(d,h):(d.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),d)}});function Df(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!Kn(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(i=>Tn(i,n,On())))}),t)}const f_=X("$ZodUnion",(e,t)=>{ht.init(e,t),Be(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Be(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Be(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Be(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Ca(s.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(r)return n(o,s);let i=!1;const a=[];for(const c of t.options){const u=c._zod.run({value:o.value,issues:[]},s);if(u instanceof Promise)a.push(u),i=!0;else{if(u.issues.length===0)return u;a.push(u)}}return i?Promise.all(a).then(c=>Df(c,o,e,s)):Df(a,o,e,s)}}),d_=X("$ZodIntersection",(e,t)=>{ht.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,s=t.left._zod.run({value:o,issues:[]},n),i=t.right._zod.run({value:o,issues:[]},n);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([c,u])=>Af(r,c,u)):Af(r,s,i)}});function Ma(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Mo(e)&&Mo(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),o={...e,...t};for(const s of n){const i=Ma(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],s=t[n],i=Ma(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Af(e,t,r){const n=new Map;let o;for(const a of t.issues)if(a.code==="unrecognized_keys"){o??(o=a);for(const c of a.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else e.issues.push(a);for(const a of r.issues)if(a.code==="unrecognized_keys")for(const c of a.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else e.issues.push(a);const s=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&o&&e.issues.push({...o,keys:s}),Kn(e))return e;const i=Ma(t.value,r.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const h_=X("$ZodEnum",(e,t)=>{ht.init(e,t);const r=hf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>Cb.has(typeof o)).map(o=>typeof o=="string"?qn(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:e}),o}}),p_=X("$ZodLiteral",(e,t)=>{if(ht.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?qn(n):n?qn(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{const s=n.value;return r.has(s)||n.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),n}}),m_=X("$ZodTransform",(e,t)=>{ht.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ff(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r));if(o instanceof Promise)throw new Gn;return r.value=o,r}});function Mf(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Pf=X("$ZodOptional",(e,t)=>{ht.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Be(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ca(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Mf(s,r.value)):Mf(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),g_=X("$ZodExactOptional",(e,t)=>{Pf.init(e,t),Be(e._zod,"values",()=>t.innerType._zod.values),Be(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),y_=X("$ZodNullable",(e,t)=>{ht.init(e,t),Be(e._zod,"optin",()=>t.innerType._zod.optin),Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ca(r.source)}|null)$`):void 0}),Be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),v_=X("$ZodDefault",(e,t)=>{ht.init(e,t),e._zod.optin="optional",Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Nf(s,t)):Nf(o,t)}});function Nf(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const b_=X("$ZodPrefault",(e,t)=>{ht.init(e,t),e._zod.optin="optional",Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),w_=X("$ZodNonOptional",(e,t)=>{ht.init(e,t),Be(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>If(s,e)):If(o,e)}});function If(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const __=X("$ZodCatch",(e,t)=>{ht.init(e,t),Be(e._zod,"optin",()=>t.innerType._zod.optin),Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(i=>Tn(i,n,On()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>Tn(s,n,On()))},input:r.value}),r.issues=[]),r)}}),S_=X("$ZodPipe",(e,t)=>{ht.init(e,t),Be(e._zod,"values",()=>t.in._zod.values),Be(e._zod,"optin",()=>t.in._zod.optin),Be(e._zod,"optout",()=>t.out._zod.optout),Be(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(i=>Ds(i,t.in,n)):Ds(s,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Ds(s,t.out,n)):Ds(o,t.out,n)}});function Ds(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const k_=X("$ZodReadonly",(e,t)=>{ht.init(e,t),Be(e._zod,"propValues",()=>t.innerType._zod.propValues),Be(e._zod,"values",()=>t.innerType._zod.values),Be(e._zod,"optin",()=>t.innerType?._zod?.optin),Be(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(Ff):Ff(o)}});function Ff(e){return e.value=Object.freeze(e.value),e}const x_=X("$ZodCustom",(e,t)=>{er.init(e,t),ht.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(s=>Rf(s,r,n,e));Rf(o,r,n,e)}});function Rf(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(Po(o))}}var Wf;class E_{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function O_(){return new E_}(Wf=globalThis).__zod_globalRegistry??(Wf.__zod_globalRegistry=O_());const No=globalThis.__zod_globalRegistry;function C_(e,t){return new e({type:"string",...we(t)})}function T_(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...we(t)})}function Lf(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...we(t)})}function D_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...we(t)})}function A_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...we(t)})}function M_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...we(t)})}function P_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...we(t)})}function N_(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...we(t)})}function I_(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...we(t)})}function F_(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...we(t)})}function R_(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...we(t)})}function W_(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...we(t)})}function L_(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...we(t)})}function z_(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...we(t)})}function $_(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...we(t)})}function U_(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...we(t)})}function Y_(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...we(t)})}function j_(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...we(t)})}function V_(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...we(t)})}function B_(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...we(t)})}function H_(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...we(t)})}function Z_(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...we(t)})}function G_(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...we(t)})}function q_(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...we(t)})}function K_(e,t){return new e({type:"string",format:"date",check:"string_format",...we(t)})}function J_(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...we(t)})}function X_(e,t){return new e({type:"string",format:"duration",check:"string_format",...we(t)})}function Q_(e){return new e({type:"any"})}function e0(e){return new e({type:"unknown"})}function t0(e,t){return new e({type:"never",...we(t)})}function r0(e,t){return new e({type:"date",coerce:!0,...we(t)})}function n0(e,t){return new bw({check:"less_than",...we(t),value:e,inclusive:!0})}function o0(e,t){return new ww({check:"greater_than",...we(t),value:e,inclusive:!0})}function zf(e,t){return new _w({check:"max_length",...we(t),maximum:e})}function As(e,t){return new Sw({check:"min_length",...we(t),minimum:e})}function $f(e,t){return new kw({check:"length_equals",...we(t),length:e})}function s0(e,t){return new xw({check:"string_format",format:"regex",...we(t),pattern:e})}function i0(e){return new Ew({check:"string_format",format:"lowercase",...we(e)})}function a0(e){return new Ow({check:"string_format",format:"uppercase",...we(e)})}function c0(e,t){return new Cw({check:"string_format",format:"includes",...we(t),includes:e})}function l0(e,t){return new Tw({check:"string_format",format:"starts_with",...we(t),prefix:e})}function u0(e,t){return new Dw({check:"string_format",format:"ends_with",...we(t),suffix:e})}function Jn(e){return new Aw({check:"overwrite",tx:e})}function f0(e){return Jn(t=>t.normalize(e))}function d0(){return Jn(e=>e.trim())}function h0(){return Jn(e=>e.toLowerCase())}function p0(){return Jn(e=>e.toUpperCase())}function m0(){return Jn(e=>Eb(e))}function g0(e,t,r){return new e({type:"array",element:t,...we(r)})}function y0(e,t,r){return new e({type:"custom",check:"custom",fn:t,...we(r)})}function v0(e){const t=b0(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Po(n,r.value,t._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(Po(o))}},e(r.value,r)));return t}function b0(e,t){const r=new er({check:"custom",...we(t)});return r._zod.check=e,r}function Uf(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??No,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Et(e,t,r={path:[],schemaPath:[]}){var n;const o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,r.schemaPath.includes(e)&&(s.cycle=r.path),s.schema;const i={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,i);const a=e._zod.toJSONSchema?.();if(a)i.schema=a;else{const l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,l);else{const d=i.schema,h=t.processors[o.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);h(e,t,d,l)}const f=e._zod.parent;f&&(i.ref||(i.ref=f),Et(f,t,l),t.seen.get(f).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(i.schema,c),t.io==="input"&&Rt(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&i.schema._prefault&&((n=i.schema).default??(n.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function Yf(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const i of e.seen.entries()){const a=e.metadataRegistry.get(i[0])?.id;if(a){const c=n.get(a);if(c&&c!==i[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,i[0])}}const o=i=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(i[0])?.id,d=e.external.uri??(m=>m);if(f)return{ref:d(f)};const h=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=h,{defId:h,ref:`${d("__shared")}#/${a}/${h}`}}if(i[1]===r)return{ref:"#"};const u=`#/${a}/`,l=i[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},s=i=>{if(i[1].schema.$ref)return;const a=i[1],{ref:c,defId:u}=o(i);a.def={...a.schema},u&&(a.defId=u);const l=a.schema;for(const f in l)delete l[f];l.$ref=c};if(e.cycles==="throw")for(const i of e.seen.entries()){const a=i[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
37
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");const O=h.compile();return(x,w)=>O(d,x,w)};let s;const i=ws,a=!df.jitless,u=a&&Cb.value,l=t.catchall;let f;e._zod.parse=(d,h)=>{f??(f=n.value);const m=d.value;return i(m)?a&&u&&h?.async===!1&&h.jitless!==!0?(s||(s=o(t.shape)),d=s(d,h),l?Tf([],m,d,h,f,e):d):r(d,h):(d.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),d)}});function Df(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!Kn(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(i=>Tn(i,n,On())))}),t)}const d_=X("$ZodUnion",(e,t)=>{ht.init(e,t),Be(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Be(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Be(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Be(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Ca(s.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(r)return n(o,s);let i=!1;const a=[];for(const c of t.options){const u=c._zod.run({value:o.value,issues:[]},s);if(u instanceof Promise)a.push(u),i=!0;else{if(u.issues.length===0)return u;a.push(u)}}return i?Promise.all(a).then(c=>Df(c,o,e,s)):Df(a,o,e,s)}}),h_=X("$ZodIntersection",(e,t)=>{ht.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,s=t.left._zod.run({value:o,issues:[]},n),i=t.right._zod.run({value:o,issues:[]},n);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([c,u])=>Af(r,c,u)):Af(r,s,i)}});function Ma(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Mo(e)&&Mo(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),o={...e,...t};for(const s of n){const i=Ma(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],s=t[n],i=Ma(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Af(e,t,r){const n=new Map;let o;for(const a of t.issues)if(a.code==="unrecognized_keys"){o??(o=a);for(const c of a.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else e.issues.push(a);for(const a of r.issues)if(a.code==="unrecognized_keys")for(const c of a.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else e.issues.push(a);const s=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&o&&e.issues.push({...o,keys:s}),Kn(e))return e;const i=Ma(t.value,r.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const p_=X("$ZodEnum",(e,t)=>{ht.init(e,t);const r=hf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>Tb.has(typeof o)).map(o=>typeof o=="string"?qn(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:e}),o}}),m_=X("$ZodLiteral",(e,t)=>{if(ht.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?qn(n):n?qn(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{const s=n.value;return r.has(s)||n.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),n}}),g_=X("$ZodTransform",(e,t)=>{ht.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ff(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r));if(o instanceof Promise)throw new Gn;return r.value=o,r}});function Mf(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Pf=X("$ZodOptional",(e,t)=>{ht.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Be(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ca(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Mf(s,r.value)):Mf(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),y_=X("$ZodExactOptional",(e,t)=>{Pf.init(e,t),Be(e._zod,"values",()=>t.innerType._zod.values),Be(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),v_=X("$ZodNullable",(e,t)=>{ht.init(e,t),Be(e._zod,"optin",()=>t.innerType._zod.optin),Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ca(r.source)}|null)$`):void 0}),Be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),b_=X("$ZodDefault",(e,t)=>{ht.init(e,t),e._zod.optin="optional",Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Nf(s,t)):Nf(o,t)}});function Nf(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const w_=X("$ZodPrefault",(e,t)=>{ht.init(e,t),e._zod.optin="optional",Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),__=X("$ZodNonOptional",(e,t)=>{ht.init(e,t),Be(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>If(s,e)):If(o,e)}});function If(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const S_=X("$ZodCatch",(e,t)=>{ht.init(e,t),Be(e._zod,"optin",()=>t.innerType._zod.optin),Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(i=>Tn(i,n,On()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>Tn(s,n,On()))},input:r.value}),r.issues=[]),r)}}),k_=X("$ZodPipe",(e,t)=>{ht.init(e,t),Be(e._zod,"values",()=>t.in._zod.values),Be(e._zod,"optin",()=>t.in._zod.optin),Be(e._zod,"optout",()=>t.out._zod.optout),Be(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(i=>Ds(i,t.in,n)):Ds(s,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Ds(s,t.out,n)):Ds(o,t.out,n)}});function Ds(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const x_=X("$ZodReadonly",(e,t)=>{ht.init(e,t),Be(e._zod,"propValues",()=>t.innerType._zod.propValues),Be(e._zod,"values",()=>t.innerType._zod.values),Be(e._zod,"optin",()=>t.innerType?._zod?.optin),Be(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(Ff):Ff(o)}});function Ff(e){return e.value=Object.freeze(e.value),e}const E_=X("$ZodCustom",(e,t)=>{er.init(e,t),ht.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(s=>Rf(s,r,n,e));Rf(o,r,n,e)}});function Rf(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(Po(o))}}var Wf;class O_{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function C_(){return new O_}(Wf=globalThis).__zod_globalRegistry??(Wf.__zod_globalRegistry=C_());const No=globalThis.__zod_globalRegistry;function T_(e,t){return new e({type:"string",...we(t)})}function D_(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...we(t)})}function Lf(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...we(t)})}function A_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...we(t)})}function M_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...we(t)})}function P_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...we(t)})}function N_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...we(t)})}function I_(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...we(t)})}function F_(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...we(t)})}function R_(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...we(t)})}function W_(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...we(t)})}function L_(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...we(t)})}function z_(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...we(t)})}function $_(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...we(t)})}function U_(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...we(t)})}function Y_(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...we(t)})}function j_(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...we(t)})}function V_(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...we(t)})}function B_(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...we(t)})}function H_(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...we(t)})}function Z_(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...we(t)})}function G_(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...we(t)})}function q_(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...we(t)})}function K_(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...we(t)})}function J_(e,t){return new e({type:"string",format:"date",check:"string_format",...we(t)})}function X_(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...we(t)})}function Q_(e,t){return new e({type:"string",format:"duration",check:"string_format",...we(t)})}function e0(e){return new e({type:"any"})}function t0(e){return new e({type:"unknown"})}function r0(e,t){return new e({type:"never",...we(t)})}function n0(e,t){return new e({type:"date",coerce:!0,...we(t)})}function o0(e,t){return new ww({check:"less_than",...we(t),value:e,inclusive:!0})}function s0(e,t){return new _w({check:"greater_than",...we(t),value:e,inclusive:!0})}function zf(e,t){return new Sw({check:"max_length",...we(t),maximum:e})}function As(e,t){return new kw({check:"min_length",...we(t),minimum:e})}function $f(e,t){return new xw({check:"length_equals",...we(t),length:e})}function i0(e,t){return new Ew({check:"string_format",format:"regex",...we(t),pattern:e})}function a0(e){return new Ow({check:"string_format",format:"lowercase",...we(e)})}function c0(e){return new Cw({check:"string_format",format:"uppercase",...we(e)})}function l0(e,t){return new Tw({check:"string_format",format:"includes",...we(t),includes:e})}function u0(e,t){return new Dw({check:"string_format",format:"starts_with",...we(t),prefix:e})}function f0(e,t){return new Aw({check:"string_format",format:"ends_with",...we(t),suffix:e})}function Jn(e){return new Mw({check:"overwrite",tx:e})}function d0(e){return Jn(t=>t.normalize(e))}function h0(){return Jn(e=>e.trim())}function p0(){return Jn(e=>e.toLowerCase())}function m0(){return Jn(e=>e.toUpperCase())}function g0(){return Jn(e=>Ob(e))}function y0(e,t,r){return new e({type:"array",element:t,...we(r)})}function v0(e,t,r){return new e({type:"custom",check:"custom",fn:t,...we(r)})}function b0(e){const t=w0(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Po(n,r.value,t._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(Po(o))}},e(r.value,r)));return t}function w0(e,t){const r=new er({check:"custom",...we(t)});return r._zod.check=e,r}function Uf(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??No,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Et(e,t,r={path:[],schemaPath:[]}){var n;const o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,r.schemaPath.includes(e)&&(s.cycle=r.path),s.schema;const i={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,i);const a=e._zod.toJSONSchema?.();if(a)i.schema=a;else{const l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,l);else{const d=i.schema,h=t.processors[o.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);h(e,t,d,l)}const f=e._zod.parent;f&&(i.ref||(i.ref=f),Et(f,t,l),t.seen.get(f).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(i.schema,c),t.io==="input"&&Rt(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&i.schema._prefault&&((n=i.schema).default??(n.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function Yf(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const i of e.seen.entries()){const a=e.metadataRegistry.get(i[0])?.id;if(a){const c=n.get(a);if(c&&c!==i[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,i[0])}}const o=i=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(i[0])?.id,d=e.external.uri??(m=>m);if(f)return{ref:d(f)};const h=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=h,{defId:h,ref:`${d("__shared")}#/${a}/${h}`}}if(i[1]===r)return{ref:"#"};const u=`#/${a}/`,l=i[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},s=i=>{if(i[1].schema.$ref)return;const a=i[1],{ref:c,defId:u}=o(i);a.def={...a.schema},u&&(a.defId=u);const l=a.schema;for(const f in l)delete l[f];l.$ref=c};if(e.cycles==="throw")for(const i of e.seen.entries()){const a=i[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
38
38
 
39
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const a=i[1];if(t===i[0]){s(i);continue}if(e.external){const u=e.external.registry.get(i[0])?.id;if(t!==i[0]&&u){s(i);continue}}if(e.metadataRegistry.get(i[0])?.id){s(i);continue}if(a.cycle){s(i);continue}if(a.count>1&&e.reused==="ref"){s(i);continue}}}function jf(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=i=>{const a=e.seen.get(i);if(a.ref===null)return;const c=a.def??a.schema,u={...c},l=a.ref;if(a.ref=null,l){n(l);const d=e.seen.get(l),h=d.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(h)):Object.assign(c,h),Object.assign(c,u),i._zod.parent===l)for(const p in c)p==="$ref"||p==="allOf"||p in u||delete c[p];if(h.$ref&&d.def)for(const p in c)p==="$ref"||p==="allOf"||p in d.def&&JSON.stringify(c[p])===JSON.stringify(d.def[p])&&delete c[p]}const f=i._zod.parent;if(f&&f!==l){n(f);const d=e.seen.get(f);if(d?.schema.$ref&&(c.$ref=d.schema.$ref,d.def))for(const h in c)h==="$ref"||h==="allOf"||h in d.def&&JSON.stringify(c[h])===JSON.stringify(d.def[h])&&delete c[h]}e.override({zodSchema:i,jsonSchema:c,path:a.path??[]})};for(const i of[...e.seen.entries()].reverse())n(i[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const i=e.external.registry.get(t)?.id;if(!i)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(i)}Object.assign(o,r.def??r.schema);const s=e.external?.defs??{};for(const i of e.seen.entries()){const a=i[1];a.def&&a.defId&&(s[a.defId]=a.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const i=JSON.parse(JSON.stringify(o));return Object.defineProperty(i,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ms(t,"input",e.processors),output:Ms(t,"output",e.processors)}},enumerable:!1,writable:!1}),i}catch{throw new Error("Error converting schema to JSON.")}}function Rt(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Rt(n.element,r);if(n.type==="set")return Rt(n.valueType,r);if(n.type==="lazy")return Rt(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return Rt(n.innerType,r);if(n.type==="intersection")return Rt(n.left,r)||Rt(n.right,r);if(n.type==="record"||n.type==="map")return Rt(n.keyType,r)||Rt(n.valueType,r);if(n.type==="pipe")return Rt(n.in,r)||Rt(n.out,r);if(n.type==="object"){for(const o in n.shape)if(Rt(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(const o of n.options)if(Rt(o,r))return!0;return!1}if(n.type==="tuple"){for(const o of n.items)if(Rt(o,r))return!0;return!!(n.rest&&Rt(n.rest,r))}return!1}const w0=(e,t={})=>r=>{const n=Uf({...r,processors:t});return Et(e,n),Yf(n,e),jf(n,e)},Ms=(e,t,r={})=>n=>{const{libraryOptions:o,target:s}=n??{},i=Uf({...o??{},target:s,io:t,processors:r});return Et(e,i),Yf(i,e),jf(i,e)},_0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},S0=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:s,maximum:i,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof i=="number"&&(o.maxLength=i),a&&(o.format=_0[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),u&&(o.contentEncoding=u),c&&c.size>0){const l=[...c];l.length===1?o.pattern=l[0].source:l.length>1&&(o.allOf=[...l.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},k0=(e,t,r,n)=>{r.not={}},x0=(e,t,r,n)=>{},E0=(e,t,r,n)=>{},O0=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},C0=(e,t,r,n)=>{const o=e._zod.def,s=hf(o.entries);s.every(i=>typeof i=="number")&&(r.type="number"),s.every(i=>typeof i=="string")&&(r.type="string"),r.enum=s},T0=(e,t,r,n)=>{const o=e._zod.def,s=[];for(const i of o.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(i))}else s.push(i);if(s.length!==0)if(s.length===1){const i=s[0];r.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[i]:r.const=i}else s.every(i=>typeof i=="number")&&(r.type="number"),s.every(i=>typeof i=="string")&&(r.type="string"),s.every(i=>typeof i=="boolean")&&(r.type="boolean"),s.every(i=>i===null)&&(r.type="null"),r.enum=s},D0=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},A0=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},M0=(e,t,r,n)=>{const o=r,s=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;typeof i=="number"&&(o.minItems=i),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=Et(s.element,t,{...n,path:[...n.path,"items"]})},P0=(e,t,r,n)=>{const o=r,s=e._zod.def;o.type="object",o.properties={};const i=s.shape;for(const u in i)o.properties[u]=Et(i[u],t,{...n,path:[...n.path,"properties",u]});const a=new Set(Object.keys(i)),c=new Set([...a].filter(u=>{const l=s.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(o.required=Array.from(c)),s.catchall?._zod.def.type==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=Et(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},N0=(e,t,r,n)=>{const o=e._zod.def,s=o.inclusive===!1,i=o.options.map((a,c)=>Et(a,t,{...n,path:[...n.path,s?"oneOf":"anyOf",c]}));s?r.oneOf=i:r.anyOf=i},I0=(e,t,r,n)=>{const o=e._zod.def,s=Et(o.left,t,{...n,path:[...n.path,"allOf",0]}),i=Et(o.right,t,{...n,path:[...n.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(s)?s.allOf:[s],...a(i)?i.allOf:[i]];r.allOf=c},F0=(e,t,r,n)=>{const o=e._zod.def,s=Et(o.innerType,t,n),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=o.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},R0=(e,t,r,n)=>{const o=e._zod.def;Et(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType},W0=(e,t,r,n)=>{const o=e._zod.def;Et(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},L0=(e,t,r,n)=>{const o=e._zod.def;Et(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},z0=(e,t,r,n)=>{const o=e._zod.def;Et(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=i},$0=(e,t,r,n)=>{const o=e._zod.def,s=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Et(s,t,n);const i=t.seen.get(e);i.ref=s},U0=(e,t,r,n)=>{const o=e._zod.def;Et(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType,r.readOnly=!0},Vf=(e,t,r,n)=>{const o=e._zod.def;Et(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType},Y0=X("ZodISODateTime",(e,t)=>{Vw.init(e,t),ut.init(e,t)});function j0(e){return q_(Y0,e)}const V0=X("ZodISODate",(e,t)=>{Bw.init(e,t),ut.init(e,t)});function B0(e){return K_(V0,e)}const H0=X("ZodISOTime",(e,t)=>{Hw.init(e,t),ut.init(e,t)});function Z0(e){return J_(H0,e)}const G0=X("ZodISODuration",(e,t)=>{Zw.init(e,t),ut.init(e,t)});function q0(e){return X_(G0,e)}const tr=X("ZodError",(e,t)=>{Da.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Wb(e,r)},flatten:{value:r=>Rb(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,xa,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,xa,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),K0=ks(tr),J0=xs(tr),X0=Es(tr),Q0=Os(tr),e1=Yb(tr),t1=jb(tr),r1=Vb(tr),n1=Bb(tr),o1=Hb(tr),s1=Zb(tr),i1=Gb(tr),a1=qb(tr),pt=X("ZodType",(e,t)=>(ht.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ms(e,"input"),output:Ms(e,"output")}}),e.toJSONSchema=w0(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(nn(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>on(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>K0(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>X0(e,r,n),e.parseAsync=async(r,n)=>J0(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Q0(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>e1(e,r,n),e.decode=(r,n)=>t1(e,r,n),e.encodeAsync=async(r,n)=>r1(e,r,n),e.decodeAsync=async(r,n)=>n1(e,r,n),e.safeEncode=(r,n)=>o1(e,r,n),e.safeDecode=(r,n)=>s1(e,r,n),e.safeEncodeAsync=async(r,n)=>i1(e,r,n),e.safeDecodeAsync=async(r,n)=>a1(e,r,n),e.refine=(r,n)=>e.check(nS(r,n)),e.superRefine=r=>e.check(oS(r)),e.overwrite=r=>e.check(Jn(r)),e.optional=()=>Xf(e),e.exactOptional=()=>V1(e),e.nullable=()=>Qf(e),e.nullish=()=>Xf(Qf(e)),e.nonoptional=r=>K1(e,r),e.array=()=>qf(e),e.or=r=>F1([e,r]),e.and=r=>W1(e,r),e.transform=r=>td(e,Y1(r)),e.default=r=>Z1(e,r),e.prefault=r=>q1(e,r),e.catch=r=>X1(e,r),e.pipe=r=>td(e,r),e.readonly=()=>tS(e),e.describe=r=>{const n=e.clone();return No.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return No.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return No.get(e);const n=e.clone();return No.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),Bf=X("_ZodString",(e,t)=>{Aa.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,s)=>S0(e,n,o);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(s0(...n)),e.includes=(...n)=>e.check(c0(...n)),e.startsWith=(...n)=>e.check(l0(...n)),e.endsWith=(...n)=>e.check(u0(...n)),e.min=(...n)=>e.check(As(...n)),e.max=(...n)=>e.check(zf(...n)),e.length=(...n)=>e.check($f(...n)),e.nonempty=(...n)=>e.check(As(1,...n)),e.lowercase=n=>e.check(i0(n)),e.uppercase=n=>e.check(a0(n)),e.trim=()=>e.check(d0()),e.normalize=(...n)=>e.check(f0(...n)),e.toLowerCase=()=>e.check(h0()),e.toUpperCase=()=>e.check(p0()),e.slugify=()=>e.check(m0())}),c1=X("ZodString",(e,t)=>{Aa.init(e,t),Bf.init(e,t),e.email=r=>e.check(T_(l1,r)),e.url=r=>e.check(N_(u1,r)),e.jwt=r=>e.check(G_(E1,r)),e.emoji=r=>e.check(I_(f1,r)),e.guid=r=>e.check(Lf(Zf,r)),e.uuid=r=>e.check(D_(Ps,r)),e.uuidv4=r=>e.check(A_(Ps,r)),e.uuidv6=r=>e.check(M_(Ps,r)),e.uuidv7=r=>e.check(P_(Ps,r)),e.nanoid=r=>e.check(F_(d1,r)),e.guid=r=>e.check(Lf(Zf,r)),e.cuid=r=>e.check(R_(h1,r)),e.cuid2=r=>e.check(W_(p1,r)),e.ulid=r=>e.check(L_(m1,r)),e.base64=r=>e.check(B_(S1,r)),e.base64url=r=>e.check(H_(k1,r)),e.xid=r=>e.check(z_(g1,r)),e.ksuid=r=>e.check($_(y1,r)),e.ipv4=r=>e.check(U_(v1,r)),e.ipv6=r=>e.check(Y_(b1,r)),e.cidrv4=r=>e.check(j_(w1,r)),e.cidrv6=r=>e.check(V_(_1,r)),e.e164=r=>e.check(Z_(x1,r)),e.datetime=r=>e.check(j0(r)),e.date=r=>e.check(B0(r)),e.time=r=>e.check(Z0(r)),e.duration=r=>e.check(q0(r))});function Hf(e){return C_(c1,e)}const ut=X("ZodStringFormat",(e,t)=>{it.init(e,t),Bf.init(e,t)}),l1=X("ZodEmail",(e,t)=>{Fw.init(e,t),ut.init(e,t)}),Zf=X("ZodGUID",(e,t)=>{Nw.init(e,t),ut.init(e,t)}),Ps=X("ZodUUID",(e,t)=>{Iw.init(e,t),ut.init(e,t)}),u1=X("ZodURL",(e,t)=>{Rw.init(e,t),ut.init(e,t)}),f1=X("ZodEmoji",(e,t)=>{Ww.init(e,t),ut.init(e,t)}),d1=X("ZodNanoID",(e,t)=>{Lw.init(e,t),ut.init(e,t)}),h1=X("ZodCUID",(e,t)=>{zw.init(e,t),ut.init(e,t)}),p1=X("ZodCUID2",(e,t)=>{$w.init(e,t),ut.init(e,t)}),m1=X("ZodULID",(e,t)=>{Uw.init(e,t),ut.init(e,t)}),g1=X("ZodXID",(e,t)=>{Yw.init(e,t),ut.init(e,t)}),y1=X("ZodKSUID",(e,t)=>{jw.init(e,t),ut.init(e,t)}),v1=X("ZodIPv4",(e,t)=>{Gw.init(e,t),ut.init(e,t)}),b1=X("ZodIPv6",(e,t)=>{qw.init(e,t),ut.init(e,t)}),w1=X("ZodCIDRv4",(e,t)=>{Kw.init(e,t),ut.init(e,t)}),_1=X("ZodCIDRv6",(e,t)=>{Jw.init(e,t),ut.init(e,t)}),S1=X("ZodBase64",(e,t)=>{Xw.init(e,t),ut.init(e,t)}),k1=X("ZodBase64URL",(e,t)=>{e_.init(e,t),ut.init(e,t)}),x1=X("ZodE164",(e,t)=>{t_.init(e,t),ut.init(e,t)}),E1=X("ZodJWT",(e,t)=>{n_.init(e,t),ut.init(e,t)}),O1=X("ZodAny",(e,t)=>{o_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>x0()});function C1(){return Q_(O1)}const T1=X("ZodUnknown",(e,t)=>{s_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>E0()});function Gf(){return e0(T1)}const D1=X("ZodNever",(e,t)=>{i_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>k0(e,r,n)});function A1(e){return t0(D1,e)}const M1=X("ZodDate",(e,t)=>{a_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,s)=>O0(e,n),e.min=(n,o)=>e.check(o0(n,o)),e.max=(n,o)=>e.check(n0(n,o));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null}),P1=X("ZodArray",(e,t)=>{c_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>M0(e,r,n,o),e.element=t.element,e.min=(r,n)=>e.check(As(r,n)),e.nonempty=r=>e.check(As(1,r)),e.max=(r,n)=>e.check(zf(r,n)),e.length=(r,n)=>e.check($f(r,n)),e.unwrap=()=>e.element});function qf(e,t){return g0(P1,e,t)}const N1=X("ZodObject",(e,t)=>{u_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>P0(e,r,n,o),Be(e,"shape",()=>t.shape),e.keyof=()=>L1(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Gf()}),e.loose=()=>e.clone({...e._zod.def,catchall:Gf()}),e.strict=()=>e.clone({...e._zod.def,catchall:A1()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Mb(e,r),e.safeExtend=r=>Pb(e,r),e.merge=r=>Nb(e,r),e.pick=r=>Db(e,r),e.omit=r=>Ab(e,r),e.partial=(...r)=>Ib(Jf,e,r[0]),e.required=(...r)=>Fb(ed,e,r[0])});function Kf(e,t){const r={type:"object",shape:e??{},...we(t)};return new N1(r)}const I1=X("ZodUnion",(e,t)=>{f_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>N0(e,r,n,o),e.options=t.options});function F1(e,t){return new I1({type:"union",options:e,...we(t)})}const R1=X("ZodIntersection",(e,t)=>{d_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>I0(e,r,n,o)});function W1(e,t){return new R1({type:"intersection",left:e,right:t})}const Pa=X("ZodEnum",(e,t)=>{h_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,s)=>C0(e,n,o),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const s={};for(const i of n)if(r.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Pa({...t,checks:[],...we(o),entries:s})},e.exclude=(n,o)=>{const s={...t.entries};for(const i of n)if(r.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new Pa({...t,checks:[],...we(o),entries:s})}});function L1(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Pa({type:"enum",entries:r,...we(t)})}const z1=X("ZodLiteral",(e,t)=>{p_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>T0(e,r,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function $1(e,t){return new z1({type:"literal",values:Array.isArray(e)?e:[e],...we(t)})}const U1=X("ZodTransform",(e,t)=>{m_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>A0(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ff(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Po(s,r.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(Po(i))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function Y1(e){return new U1({type:"transform",transform:e})}const Jf=X("ZodOptional",(e,t)=>{Pf.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Vf(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Xf(e){return new Jf({type:"optional",innerType:e})}const j1=X("ZodExactOptional",(e,t)=>{g_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Vf(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function V1(e){return new j1({type:"optional",innerType:e})}const B1=X("ZodNullable",(e,t)=>{y_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>F0(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Qf(e){return new B1({type:"nullable",innerType:e})}const H1=X("ZodDefault",(e,t)=>{v_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>W0(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Z1(e,t){return new H1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():yf(t)}})}const G1=X("ZodPrefault",(e,t)=>{b_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>L0(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function q1(e,t){return new G1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():yf(t)}})}const ed=X("ZodNonOptional",(e,t)=>{w_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>R0(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function K1(e,t){return new ed({type:"nonoptional",innerType:e,...we(t)})}const J1=X("ZodCatch",(e,t)=>{__.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>z0(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function X1(e,t){return new J1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Q1=X("ZodPipe",(e,t)=>{S_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>$0(e,r,n,o),e.in=t.in,e.out=t.out});function td(e,t){return new Q1({type:"pipe",in:e,out:t})}const eS=X("ZodReadonly",(e,t)=>{k_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>U0(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function tS(e){return new eS({type:"readonly",innerType:e})}const rS=X("ZodCustom",(e,t)=>{x_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>D0(e,r)});function nS(e,t={}){return y0(rS,e,t)}function oS(e){return v0(e)}function sS(e){return r0(M1,e)}var rd;function ce(){return rd.apply(null,arguments)}function iS(e){rd=e}function lr(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Dn(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function $e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Na(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if($e(e,t))return!1;return!0}function Ut(e){return e===void 0}function zr(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Io(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function nd(e,t){var r=[],n,o=e.length;for(n=0;n<o;++n)r.push(t(e[n],n));return r}function sn(e,t){for(var r in t)$e(t,r)&&(e[r]=t[r]);return $e(t,"toString")&&(e.toString=t.toString),$e(t,"valueOf")&&(e.valueOf=t.valueOf),e}function kr(e,t,r,n){return Ad(e,t,r,n,!0).utc()}function aS(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Ce(e){return e._pf==null&&(e._pf=aS()),e._pf}var Ia;Array.prototype.some?Ia=Array.prototype.some:Ia=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function Fa(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=Ce(e),r=Ia.call(t.parsedDateParts,function(o){return o!=null}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function Ns(e){var t=kr(NaN);return e!=null?sn(Ce(t),e):Ce(t).userInvalidated=!0,t}var od=ce.momentProperties=[],Ra=!1;function Wa(e,t){var r,n,o,s=od.length;if(Ut(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Ut(t._i)||(e._i=t._i),Ut(t._f)||(e._f=t._f),Ut(t._l)||(e._l=t._l),Ut(t._strict)||(e._strict=t._strict),Ut(t._tzm)||(e._tzm=t._tzm),Ut(t._isUTC)||(e._isUTC=t._isUTC),Ut(t._offset)||(e._offset=t._offset),Ut(t._pf)||(e._pf=Ce(t)),Ut(t._locale)||(e._locale=t._locale),s>0)for(r=0;r<s;r++)n=od[r],o=t[n],Ut(o)||(e[n]=o);return e}function Fo(e){Wa(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Ra===!1&&(Ra=!0,ce.updateOffset(this),Ra=!1)}function ur(e){return e instanceof Fo||e!=null&&e._isAMomentObject!=null}function sd(e){ce.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function rr(e,t){var r=!0;return sn(function(){if(ce.deprecationHandler!=null&&ce.deprecationHandler(null,e),r){var n=[],o,s,i,a=arguments.length;for(s=0;s<a;s++){if(o="",typeof arguments[s]=="object"){o+=`
39
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const a=i[1];if(t===i[0]){s(i);continue}if(e.external){const u=e.external.registry.get(i[0])?.id;if(t!==i[0]&&u){s(i);continue}}if(e.metadataRegistry.get(i[0])?.id){s(i);continue}if(a.cycle){s(i);continue}if(a.count>1&&e.reused==="ref"){s(i);continue}}}function jf(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=i=>{const a=e.seen.get(i);if(a.ref===null)return;const c=a.def??a.schema,u={...c},l=a.ref;if(a.ref=null,l){n(l);const d=e.seen.get(l),h=d.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(h)):Object.assign(c,h),Object.assign(c,u),i._zod.parent===l)for(const p in c)p==="$ref"||p==="allOf"||p in u||delete c[p];if(h.$ref&&d.def)for(const p in c)p==="$ref"||p==="allOf"||p in d.def&&JSON.stringify(c[p])===JSON.stringify(d.def[p])&&delete c[p]}const f=i._zod.parent;if(f&&f!==l){n(f);const d=e.seen.get(f);if(d?.schema.$ref&&(c.$ref=d.schema.$ref,d.def))for(const h in c)h==="$ref"||h==="allOf"||h in d.def&&JSON.stringify(c[h])===JSON.stringify(d.def[h])&&delete c[h]}e.override({zodSchema:i,jsonSchema:c,path:a.path??[]})};for(const i of[...e.seen.entries()].reverse())n(i[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const i=e.external.registry.get(t)?.id;if(!i)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(i)}Object.assign(o,r.def??r.schema);const s=e.external?.defs??{};for(const i of e.seen.entries()){const a=i[1];a.def&&a.defId&&(s[a.defId]=a.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const i=JSON.parse(JSON.stringify(o));return Object.defineProperty(i,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ms(t,"input",e.processors),output:Ms(t,"output",e.processors)}},enumerable:!1,writable:!1}),i}catch{throw new Error("Error converting schema to JSON.")}}function Rt(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Rt(n.element,r);if(n.type==="set")return Rt(n.valueType,r);if(n.type==="lazy")return Rt(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return Rt(n.innerType,r);if(n.type==="intersection")return Rt(n.left,r)||Rt(n.right,r);if(n.type==="record"||n.type==="map")return Rt(n.keyType,r)||Rt(n.valueType,r);if(n.type==="pipe")return Rt(n.in,r)||Rt(n.out,r);if(n.type==="object"){for(const o in n.shape)if(Rt(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(const o of n.options)if(Rt(o,r))return!0;return!1}if(n.type==="tuple"){for(const o of n.items)if(Rt(o,r))return!0;return!!(n.rest&&Rt(n.rest,r))}return!1}const _0=(e,t={})=>r=>{const n=Uf({...r,processors:t});return Et(e,n),Yf(n,e),jf(n,e)},Ms=(e,t,r={})=>n=>{const{libraryOptions:o,target:s}=n??{},i=Uf({...o??{},target:s,io:t,processors:r});return Et(e,i),Yf(i,e),jf(i,e)},S0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},k0=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:s,maximum:i,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof i=="number"&&(o.maxLength=i),a&&(o.format=S0[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),u&&(o.contentEncoding=u),c&&c.size>0){const l=[...c];l.length===1?o.pattern=l[0].source:l.length>1&&(o.allOf=[...l.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},x0=(e,t,r,n)=>{r.not={}},E0=(e,t,r,n)=>{},O0=(e,t,r,n)=>{},C0=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},T0=(e,t,r,n)=>{const o=e._zod.def,s=hf(o.entries);s.every(i=>typeof i=="number")&&(r.type="number"),s.every(i=>typeof i=="string")&&(r.type="string"),r.enum=s},D0=(e,t,r,n)=>{const o=e._zod.def,s=[];for(const i of o.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(i))}else s.push(i);if(s.length!==0)if(s.length===1){const i=s[0];r.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[i]:r.const=i}else s.every(i=>typeof i=="number")&&(r.type="number"),s.every(i=>typeof i=="string")&&(r.type="string"),s.every(i=>typeof i=="boolean")&&(r.type="boolean"),s.every(i=>i===null)&&(r.type="null"),r.enum=s},A0=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},M0=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},P0=(e,t,r,n)=>{const o=r,s=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;typeof i=="number"&&(o.minItems=i),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=Et(s.element,t,{...n,path:[...n.path,"items"]})},N0=(e,t,r,n)=>{const o=r,s=e._zod.def;o.type="object",o.properties={};const i=s.shape;for(const u in i)o.properties[u]=Et(i[u],t,{...n,path:[...n.path,"properties",u]});const a=new Set(Object.keys(i)),c=new Set([...a].filter(u=>{const l=s.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(o.required=Array.from(c)),s.catchall?._zod.def.type==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=Et(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},I0=(e,t,r,n)=>{const o=e._zod.def,s=o.inclusive===!1,i=o.options.map((a,c)=>Et(a,t,{...n,path:[...n.path,s?"oneOf":"anyOf",c]}));s?r.oneOf=i:r.anyOf=i},F0=(e,t,r,n)=>{const o=e._zod.def,s=Et(o.left,t,{...n,path:[...n.path,"allOf",0]}),i=Et(o.right,t,{...n,path:[...n.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(s)?s.allOf:[s],...a(i)?i.allOf:[i]];r.allOf=c},R0=(e,t,r,n)=>{const o=e._zod.def,s=Et(o.innerType,t,n),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=o.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},W0=(e,t,r,n)=>{const o=e._zod.def;Et(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType},L0=(e,t,r,n)=>{const o=e._zod.def;Et(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},z0=(e,t,r,n)=>{const o=e._zod.def;Et(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},$0=(e,t,r,n)=>{const o=e._zod.def;Et(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=i},U0=(e,t,r,n)=>{const o=e._zod.def,s=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Et(s,t,n);const i=t.seen.get(e);i.ref=s},Y0=(e,t,r,n)=>{const o=e._zod.def;Et(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType,r.readOnly=!0},Vf=(e,t,r,n)=>{const o=e._zod.def;Et(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType},j0=X("ZodISODateTime",(e,t)=>{Bw.init(e,t),ut.init(e,t)});function V0(e){return K_(j0,e)}const B0=X("ZodISODate",(e,t)=>{Hw.init(e,t),ut.init(e,t)});function H0(e){return J_(B0,e)}const Z0=X("ZodISOTime",(e,t)=>{Zw.init(e,t),ut.init(e,t)});function G0(e){return X_(Z0,e)}const q0=X("ZodISODuration",(e,t)=>{Gw.init(e,t),ut.init(e,t)});function K0(e){return Q_(q0,e)}const tr=X("ZodError",(e,t)=>{Da.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Lb(e,r)},flatten:{value:r=>Wb(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,xa,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,xa,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),J0=ks(tr),X0=xs(tr),Q0=Es(tr),e1=Os(tr),t1=jb(tr),r1=Vb(tr),n1=Bb(tr),o1=Hb(tr),s1=Zb(tr),i1=Gb(tr),a1=qb(tr),c1=Kb(tr),pt=X("ZodType",(e,t)=>(ht.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ms(e,"input"),output:Ms(e,"output")}}),e.toJSONSchema=_0(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(nn(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>on(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>J0(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Q0(e,r,n),e.parseAsync=async(r,n)=>X0(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>e1(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>t1(e,r,n),e.decode=(r,n)=>r1(e,r,n),e.encodeAsync=async(r,n)=>n1(e,r,n),e.decodeAsync=async(r,n)=>o1(e,r,n),e.safeEncode=(r,n)=>s1(e,r,n),e.safeDecode=(r,n)=>i1(e,r,n),e.safeEncodeAsync=async(r,n)=>a1(e,r,n),e.safeDecodeAsync=async(r,n)=>c1(e,r,n),e.refine=(r,n)=>e.check(oS(r,n)),e.superRefine=r=>e.check(sS(r)),e.overwrite=r=>e.check(Jn(r)),e.optional=()=>Xf(e),e.exactOptional=()=>B1(e),e.nullable=()=>Qf(e),e.nullish=()=>Xf(Qf(e)),e.nonoptional=r=>J1(e,r),e.array=()=>qf(e),e.or=r=>R1([e,r]),e.and=r=>L1(e,r),e.transform=r=>td(e,j1(r)),e.default=r=>G1(e,r),e.prefault=r=>K1(e,r),e.catch=r=>Q1(e,r),e.pipe=r=>td(e,r),e.readonly=()=>rS(e),e.describe=r=>{const n=e.clone();return No.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return No.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return No.get(e);const n=e.clone();return No.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),Bf=X("_ZodString",(e,t)=>{Aa.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,s)=>k0(e,n,o);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(i0(...n)),e.includes=(...n)=>e.check(l0(...n)),e.startsWith=(...n)=>e.check(u0(...n)),e.endsWith=(...n)=>e.check(f0(...n)),e.min=(...n)=>e.check(As(...n)),e.max=(...n)=>e.check(zf(...n)),e.length=(...n)=>e.check($f(...n)),e.nonempty=(...n)=>e.check(As(1,...n)),e.lowercase=n=>e.check(a0(n)),e.uppercase=n=>e.check(c0(n)),e.trim=()=>e.check(h0()),e.normalize=(...n)=>e.check(d0(...n)),e.toLowerCase=()=>e.check(p0()),e.toUpperCase=()=>e.check(m0()),e.slugify=()=>e.check(g0())}),l1=X("ZodString",(e,t)=>{Aa.init(e,t),Bf.init(e,t),e.email=r=>e.check(D_(u1,r)),e.url=r=>e.check(I_(f1,r)),e.jwt=r=>e.check(q_(O1,r)),e.emoji=r=>e.check(F_(d1,r)),e.guid=r=>e.check(Lf(Zf,r)),e.uuid=r=>e.check(A_(Ps,r)),e.uuidv4=r=>e.check(M_(Ps,r)),e.uuidv6=r=>e.check(P_(Ps,r)),e.uuidv7=r=>e.check(N_(Ps,r)),e.nanoid=r=>e.check(R_(h1,r)),e.guid=r=>e.check(Lf(Zf,r)),e.cuid=r=>e.check(W_(p1,r)),e.cuid2=r=>e.check(L_(m1,r)),e.ulid=r=>e.check(z_(g1,r)),e.base64=r=>e.check(H_(k1,r)),e.base64url=r=>e.check(Z_(x1,r)),e.xid=r=>e.check($_(y1,r)),e.ksuid=r=>e.check(U_(v1,r)),e.ipv4=r=>e.check(Y_(b1,r)),e.ipv6=r=>e.check(j_(w1,r)),e.cidrv4=r=>e.check(V_(_1,r)),e.cidrv6=r=>e.check(B_(S1,r)),e.e164=r=>e.check(G_(E1,r)),e.datetime=r=>e.check(V0(r)),e.date=r=>e.check(H0(r)),e.time=r=>e.check(G0(r)),e.duration=r=>e.check(K0(r))});function Hf(e){return T_(l1,e)}const ut=X("ZodStringFormat",(e,t)=>{it.init(e,t),Bf.init(e,t)}),u1=X("ZodEmail",(e,t)=>{Rw.init(e,t),ut.init(e,t)}),Zf=X("ZodGUID",(e,t)=>{Iw.init(e,t),ut.init(e,t)}),Ps=X("ZodUUID",(e,t)=>{Fw.init(e,t),ut.init(e,t)}),f1=X("ZodURL",(e,t)=>{Ww.init(e,t),ut.init(e,t)}),d1=X("ZodEmoji",(e,t)=>{Lw.init(e,t),ut.init(e,t)}),h1=X("ZodNanoID",(e,t)=>{zw.init(e,t),ut.init(e,t)}),p1=X("ZodCUID",(e,t)=>{$w.init(e,t),ut.init(e,t)}),m1=X("ZodCUID2",(e,t)=>{Uw.init(e,t),ut.init(e,t)}),g1=X("ZodULID",(e,t)=>{Yw.init(e,t),ut.init(e,t)}),y1=X("ZodXID",(e,t)=>{jw.init(e,t),ut.init(e,t)}),v1=X("ZodKSUID",(e,t)=>{Vw.init(e,t),ut.init(e,t)}),b1=X("ZodIPv4",(e,t)=>{qw.init(e,t),ut.init(e,t)}),w1=X("ZodIPv6",(e,t)=>{Kw.init(e,t),ut.init(e,t)}),_1=X("ZodCIDRv4",(e,t)=>{Jw.init(e,t),ut.init(e,t)}),S1=X("ZodCIDRv6",(e,t)=>{Xw.init(e,t),ut.init(e,t)}),k1=X("ZodBase64",(e,t)=>{Qw.init(e,t),ut.init(e,t)}),x1=X("ZodBase64URL",(e,t)=>{t_.init(e,t),ut.init(e,t)}),E1=X("ZodE164",(e,t)=>{r_.init(e,t),ut.init(e,t)}),O1=X("ZodJWT",(e,t)=>{o_.init(e,t),ut.init(e,t)}),C1=X("ZodAny",(e,t)=>{s_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>E0()});function T1(){return e0(C1)}const D1=X("ZodUnknown",(e,t)=>{i_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>O0()});function Gf(){return t0(D1)}const A1=X("ZodNever",(e,t)=>{a_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>x0(e,r,n)});function M1(e){return r0(A1,e)}const P1=X("ZodDate",(e,t)=>{c_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,s)=>C0(e,n),e.min=(n,o)=>e.check(s0(n,o)),e.max=(n,o)=>e.check(o0(n,o));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null}),N1=X("ZodArray",(e,t)=>{l_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>P0(e,r,n,o),e.element=t.element,e.min=(r,n)=>e.check(As(r,n)),e.nonempty=r=>e.check(As(1,r)),e.max=(r,n)=>e.check(zf(r,n)),e.length=(r,n)=>e.check($f(r,n)),e.unwrap=()=>e.element});function qf(e,t){return y0(N1,e,t)}const I1=X("ZodObject",(e,t)=>{f_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>N0(e,r,n,o),Be(e,"shape",()=>t.shape),e.keyof=()=>z1(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Gf()}),e.loose=()=>e.clone({...e._zod.def,catchall:Gf()}),e.strict=()=>e.clone({...e._zod.def,catchall:M1()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Pb(e,r),e.safeExtend=r=>Nb(e,r),e.merge=r=>Ib(e,r),e.pick=r=>Ab(e,r),e.omit=r=>Mb(e,r),e.partial=(...r)=>Fb(Jf,e,r[0]),e.required=(...r)=>Rb(ed,e,r[0])});function Kf(e,t){const r={type:"object",shape:e??{},...we(t)};return new I1(r)}const F1=X("ZodUnion",(e,t)=>{d_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>I0(e,r,n,o),e.options=t.options});function R1(e,t){return new F1({type:"union",options:e,...we(t)})}const W1=X("ZodIntersection",(e,t)=>{h_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>F0(e,r,n,o)});function L1(e,t){return new W1({type:"intersection",left:e,right:t})}const Pa=X("ZodEnum",(e,t)=>{p_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,o,s)=>T0(e,n,o),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const s={};for(const i of n)if(r.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Pa({...t,checks:[],...we(o),entries:s})},e.exclude=(n,o)=>{const s={...t.entries};for(const i of n)if(r.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new Pa({...t,checks:[],...we(o),entries:s})}});function z1(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Pa({type:"enum",entries:r,...we(t)})}const $1=X("ZodLiteral",(e,t)=>{m_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>D0(e,r,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function U1(e,t){return new $1({type:"literal",values:Array.isArray(e)?e:[e],...we(t)})}const Y1=X("ZodTransform",(e,t)=>{g_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>M0(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ff(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Po(s,r.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(Po(i))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function j1(e){return new Y1({type:"transform",transform:e})}const Jf=X("ZodOptional",(e,t)=>{Pf.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Vf(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Xf(e){return new Jf({type:"optional",innerType:e})}const V1=X("ZodExactOptional",(e,t)=>{y_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Vf(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function B1(e){return new V1({type:"optional",innerType:e})}const H1=X("ZodNullable",(e,t)=>{v_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>R0(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Qf(e){return new H1({type:"nullable",innerType:e})}const Z1=X("ZodDefault",(e,t)=>{b_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>L0(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function G1(e,t){return new Z1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():yf(t)}})}const q1=X("ZodPrefault",(e,t)=>{w_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>z0(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function K1(e,t){return new q1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():yf(t)}})}const ed=X("ZodNonOptional",(e,t)=>{__.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>W0(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function J1(e,t){return new ed({type:"nonoptional",innerType:e,...we(t)})}const X1=X("ZodCatch",(e,t)=>{S_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>$0(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Q1(e,t){return new X1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const eS=X("ZodPipe",(e,t)=>{k_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>U0(e,r,n,o),e.in=t.in,e.out=t.out});function td(e,t){return new eS({type:"pipe",in:e,out:t})}const tS=X("ZodReadonly",(e,t)=>{x_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Y0(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function rS(e){return new tS({type:"readonly",innerType:e})}const nS=X("ZodCustom",(e,t)=>{E_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,n,o)=>A0(e,r)});function oS(e,t={}){return v0(nS,e,t)}function sS(e){return b0(e)}function iS(e){return n0(P1,e)}var rd;function ce(){return rd.apply(null,arguments)}function aS(e){rd=e}function lr(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Dn(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function $e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Na(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if($e(e,t))return!1;return!0}function Ut(e){return e===void 0}function zr(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Io(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function nd(e,t){var r=[],n,o=e.length;for(n=0;n<o;++n)r.push(t(e[n],n));return r}function sn(e,t){for(var r in t)$e(t,r)&&(e[r]=t[r]);return $e(t,"toString")&&(e.toString=t.toString),$e(t,"valueOf")&&(e.valueOf=t.valueOf),e}function kr(e,t,r,n){return Ad(e,t,r,n,!0).utc()}function cS(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Ce(e){return e._pf==null&&(e._pf=cS()),e._pf}var Ia;Array.prototype.some?Ia=Array.prototype.some:Ia=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function Fa(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=Ce(e),r=Ia.call(t.parsedDateParts,function(o){return o!=null}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function Ns(e){var t=kr(NaN);return e!=null?sn(Ce(t),e):Ce(t).userInvalidated=!0,t}var od=ce.momentProperties=[],Ra=!1;function Wa(e,t){var r,n,o,s=od.length;if(Ut(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Ut(t._i)||(e._i=t._i),Ut(t._f)||(e._f=t._f),Ut(t._l)||(e._l=t._l),Ut(t._strict)||(e._strict=t._strict),Ut(t._tzm)||(e._tzm=t._tzm),Ut(t._isUTC)||(e._isUTC=t._isUTC),Ut(t._offset)||(e._offset=t._offset),Ut(t._pf)||(e._pf=Ce(t)),Ut(t._locale)||(e._locale=t._locale),s>0)for(r=0;r<s;r++)n=od[r],o=t[n],Ut(o)||(e[n]=o);return e}function Fo(e){Wa(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Ra===!1&&(Ra=!0,ce.updateOffset(this),Ra=!1)}function ur(e){return e instanceof Fo||e!=null&&e._isAMomentObject!=null}function sd(e){ce.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function rr(e,t){var r=!0;return sn(function(){if(ce.deprecationHandler!=null&&ce.deprecationHandler(null,e),r){var n=[],o,s,i,a=arguments.length;for(s=0;s<a;s++){if(o="",typeof arguments[s]=="object"){o+=`
40
40
  [`+s+"] ";for(i in arguments[0])$e(arguments[0],i)&&(o+=i+": "+arguments[0][i]+", ");o=o.slice(0,-2)}else o=arguments[s];n.push(o)}sd(e+`
41
41
  Arguments: `+Array.prototype.slice.call(n).join("")+`
42
- `+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var id={};function ad(e,t){ce.deprecationHandler!=null&&ce.deprecationHandler(e,t),id[e]||(sd(t),id[e]=!0)}ce.suppressDeprecationWarnings=!1,ce.deprecationHandler=null;function xr(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function cS(e){var t,r;for(r in e)$e(e,r)&&(t=e[r],xr(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function La(e,t){var r=sn({},e),n;for(n in t)$e(t,n)&&(Dn(e[n])&&Dn(t[n])?(r[n]={},sn(r[n],e[n]),sn(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)$e(e,n)&&!$e(t,n)&&Dn(e[n])&&(r[n]=sn({},r[n]));return r}function za(e){e!=null&&this.set(e)}var $a;Object.keys?$a=Object.keys:$a=function(e){var t,r=[];for(t in e)$e(e,t)&&r.push(t);return r};var lS={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function uS(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return xr(n)?n.call(t,r):n}function Er(e,t,r){var n=""+Math.abs(e),o=t-n.length,s=e>=0;return(s?r?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}var Ua=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Is=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ya={},Xn={};function ge(e,t,r,n){var o=n;typeof n=="string"&&(o=function(){return this[n]()}),e&&(Xn[e]=o),t&&(Xn[t[0]]=function(){return Er(o.apply(this,arguments),t[1],t[2])}),r&&(Xn[r]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function fS(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function dS(e){var t=e.match(Ua),r,n;for(r=0,n=t.length;r<n;r++)Xn[t[r]]?t[r]=Xn[t[r]]:t[r]=fS(t[r]);return function(o){var s="",i;for(i=0;i<n;i++)s+=xr(t[i])?t[i].call(o,e):t[i];return s}}function Fs(e,t){return e.isValid()?(t=cd(t,e.localeData()),Ya[t]=Ya[t]||dS(t),Ya[t](e)):e.localeData().invalidDate()}function cd(e,t){var r=5;function n(o){return t.longDateFormat(o)||o}for(Is.lastIndex=0;r>=0&&Is.test(e);)e=e.replace(Is,n),Is.lastIndex=0,r-=1;return e}var hS={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function pS(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(Ua).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var mS="Invalid date";function gS(){return this._invalidDate}var yS="%d",vS=/\d{1,2}/;function bS(e){return this._ordinal.replace("%d",e)}var wS={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function _S(e,t,r,n){var o=this._relativeTime[r];return xr(o)?o(e,t,r,n):o.replace(/%d/i,e)}function SS(e,t){var r=this._relativeTime[e>0?"future":"past"];return xr(r)?r(t):r.replace(/%s/i,t)}var ld={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function nr(e){return typeof e=="string"?ld[e]||ld[e.toLowerCase()]:void 0}function ja(e){var t={},r,n;for(n in e)$e(e,n)&&(r=nr(n),r&&(t[r]=e[n]));return t}var kS={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function xS(e){var t=[],r;for(r in e)$e(e,r)&&t.push({unit:r,priority:kS[r]});return t.sort(function(n,o){return n.priority-o.priority}),t}var ud=/\d/,Zt=/\d\d/,fd=/\d{3}/,Va=/\d{4}/,Rs=/[+-]?\d{6}/,et=/\d\d?/,dd=/\d\d\d\d?/,hd=/\d\d\d\d\d\d?/,Ws=/\d{1,3}/,Ba=/\d{1,4}/,Ls=/[+-]?\d{1,6}/,Qn=/\d+/,zs=/[+-]?\d+/,ES=/Z|[+-]\d\d:?\d\d/gi,$s=/Z|[+-]\d\d(?::?\d\d)?/gi,OS=/[+-]?\d+(\.\d{1,3})?/,Ro=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,eo=/^[1-9]\d?/,Ha=/^([1-9]\d|\d)/,Us;Us={};function fe(e,t,r){Us[e]=xr(t)?t:function(n,o){return n&&r?r:t}}function CS(e,t){return $e(Us,e)?Us[e](t._strict,t._locale):new RegExp(TS(e))}function TS(e){return $r(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,o,s){return r||n||o||s}))}function $r(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function or(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Fe(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=or(t)),r}var Za={};function qe(e,t){var r,n=t,o;for(typeof e=="string"&&(e=[e]),zr(t)&&(n=function(s,i){i[t]=Fe(s)}),o=e.length,r=0;r<o;r++)Za[e[r]]=n}function Wo(e,t){qe(e,function(r,n,o,s){o._w=o._w||{},t(r,o._w,o,s)})}function DS(e,t,r){t!=null&&$e(Za,e)&&Za[e](t,r._a,r,e)}function Ys(e){return e%4===0&&e%100!==0||e%400===0}var Tt=0,Ur=1,Or=2,St=3,fr=4,Yr=5,An=6,AS=7,MS=8;ge("Y",0,0,function(){var e=this.year();return e<=9999?Er(e,4):"+"+e}),ge(0,["YY",2],0,function(){return this.year()%100}),ge(0,["YYYY",4],0,"year"),ge(0,["YYYYY",5],0,"year"),ge(0,["YYYYYY",6,!0],0,"year"),fe("Y",zs),fe("YY",et,Zt),fe("YYYY",Ba,Va),fe("YYYYY",Ls,Rs),fe("YYYYYY",Ls,Rs),qe(["YYYYY","YYYYYY"],Tt),qe("YYYY",function(e,t){t[Tt]=e.length===2?ce.parseTwoDigitYear(e):Fe(e)}),qe("YY",function(e,t){t[Tt]=ce.parseTwoDigitYear(e)}),qe("Y",function(e,t){t[Tt]=parseInt(e,10)});function Lo(e){return Ys(e)?366:365}ce.parseTwoDigitYear=function(e){return Fe(e)+(Fe(e)>68?1900:2e3)};var pd=to("FullYear",!0);function PS(){return Ys(this.year())}function to(e,t){return function(r){return r!=null?(md(this,e,r),ce.updateOffset(this,t),this):zo(this,e)}}function zo(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function md(e,t,r){var n,o,s,i,a;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(o?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(o?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(o?n.setUTCHours(r):n.setHours(r));case"Date":return void(o?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}s=r,i=e.month(),a=e.date(),a=a===29&&i===1&&!Ys(s)?28:a,o?n.setUTCFullYear(s,i,a):n.setFullYear(s,i,a)}}function NS(e){return e=nr(e),xr(this[e])?this[e]():this}function IS(e,t){if(typeof e=="object"){e=ja(e);var r=xS(e),n,o=r.length;for(n=0;n<o;n++)this[r[n].unit](e[r[n].unit])}else if(e=nr(e),xr(this[e]))return this[e](t);return this}function FS(e,t){return(e%t+t)%t}var mt;Array.prototype.indexOf?mt=Array.prototype.indexOf:mt=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Ga(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=FS(t,12);return e+=(t-r)/12,r===1?Ys(e)?29:28:31-r%7%2}ge("M",["MM",2],"Mo",function(){return this.month()+1}),ge("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),ge("MMMM",0,0,function(e){return this.localeData().months(this,e)}),fe("M",et,eo),fe("MM",et,Zt),fe("MMM",function(e,t){return t.monthsShortRegex(e)}),fe("MMMM",function(e,t){return t.monthsRegex(e)}),qe(["M","MM"],function(e,t){t[Ur]=Fe(e)-1}),qe(["MMM","MMMM"],function(e,t,r,n){var o=r._locale.monthsParse(e,n,r._strict);o!=null?t[Ur]=o:Ce(r).invalidMonth=e});var RS="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),gd="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),yd=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,WS=Ro,LS=Ro;function zS(e,t){return e?lr(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||yd).test(t)?"format":"standalone"][e.month()]:lr(this._months)?this._months:this._months.standalone}function $S(e,t){return e?lr(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[yd.test(t)?"format":"standalone"][e.month()]:lr(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function US(e,t,r){var n,o,s,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=kr([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return r?t==="MMM"?(o=mt.call(this._shortMonthsParse,i),o!==-1?o:null):(o=mt.call(this._longMonthsParse,i),o!==-1?o:null):t==="MMM"?(o=mt.call(this._shortMonthsParse,i),o!==-1?o:(o=mt.call(this._longMonthsParse,i),o!==-1?o:null)):(o=mt.call(this._longMonthsParse,i),o!==-1?o:(o=mt.call(this._shortMonthsParse,i),o!==-1?o:null))}function YS(e,t,r){var n,o,s;if(this._monthsParseExact)return US.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(o=kr([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(s="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[n]=new RegExp(s.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function vd(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Fe(t);else if(t=e.localeData().monthsParse(t),!zr(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,Ga(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function bd(e){return e!=null?(vd(this,e),ce.updateOffset(this,!0),this):zo(this,"Month")}function jS(){return Ga(this.year(),this.month())}function VS(e){return this._monthsParseExact?($e(this,"_monthsRegex")||wd.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):($e(this,"_monthsShortRegex")||(this._monthsShortRegex=WS),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function BS(e){return this._monthsParseExact?($e(this,"_monthsRegex")||wd.call(this),e?this._monthsStrictRegex:this._monthsRegex):($e(this,"_monthsRegex")||(this._monthsRegex=LS),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function wd(){function e(c,u){return u.length-c.length}var t=[],r=[],n=[],o,s,i,a;for(o=0;o<12;o++)s=kr([2e3,o]),i=$r(this.monthsShort(s,"")),a=$r(this.months(s,"")),t.push(i),r.push(a),n.push(a),n.push(i);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function HS(e,t,r,n,o,s,i){var a;return e<100&&e>=0?(a=new Date(e+400,t,r,n,o,s,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,r,n,o,s,i),a}function $o(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function js(e,t,r){var n=7+t-r,o=(7+$o(e,0,n).getUTCDay()-t)%7;return-o+n-1}function _d(e,t,r,n,o){var s=(7+r-n)%7,i=js(e,n,o),a=1+7*(t-1)+s+i,c,u;return a<=0?(c=e-1,u=Lo(c)+a):a>Lo(e)?(c=e+1,u=a-Lo(e)):(c=e,u=a),{year:c,dayOfYear:u}}function Uo(e,t,r){var n=js(e.year(),t,r),o=Math.floor((e.dayOfYear()-n-1)/7)+1,s,i;return o<1?(i=e.year()-1,s=o+jr(i,t,r)):o>jr(e.year(),t,r)?(s=o-jr(e.year(),t,r),i=e.year()+1):(i=e.year(),s=o),{week:s,year:i}}function jr(e,t,r){var n=js(e,t,r),o=js(e+1,t,r);return(Lo(e)-n+o)/7}ge("w",["ww",2],"wo","week"),ge("W",["WW",2],"Wo","isoWeek"),fe("w",et,eo),fe("ww",et,Zt),fe("W",et,eo),fe("WW",et,Zt),Wo(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=Fe(e)});function ZS(e){return Uo(e,this._week.dow,this._week.doy).week}var GS={dow:0,doy:6};function qS(){return this._week.dow}function KS(){return this._week.doy}function JS(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function XS(e){var t=Uo(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}ge("d",0,"do","day"),ge("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),ge("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),ge("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),ge("e",0,0,"weekday"),ge("E",0,0,"isoWeekday"),fe("d",et),fe("e",et),fe("E",et),fe("dd",function(e,t){return t.weekdaysMinRegex(e)}),fe("ddd",function(e,t){return t.weekdaysShortRegex(e)}),fe("dddd",function(e,t){return t.weekdaysRegex(e)}),Wo(["dd","ddd","dddd"],function(e,t,r,n){var o=r._locale.weekdaysParse(e,n,r._strict);o!=null?t.d=o:Ce(r).invalidWeekday=e}),Wo(["d","e","E"],function(e,t,r,n){t[n]=Fe(e)});function QS(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function ek(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function qa(e,t){return e.slice(t,7).concat(e.slice(0,t))}var tk="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Sd="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),rk="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),nk=Ro,ok=Ro,sk=Ro;function ik(e,t){var r=lr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?qa(r,this._week.dow):e?r[e.day()]:r}function ak(e){return e===!0?qa(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ck(e){return e===!0?qa(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function lk(e,t,r){var n,o,s,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=kr([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return r?t==="dddd"?(o=mt.call(this._weekdaysParse,i),o!==-1?o:null):t==="ddd"?(o=mt.call(this._shortWeekdaysParse,i),o!==-1?o:null):(o=mt.call(this._minWeekdaysParse,i),o!==-1?o:null):t==="dddd"?(o=mt.call(this._weekdaysParse,i),o!==-1||(o=mt.call(this._shortWeekdaysParse,i),o!==-1)?o:(o=mt.call(this._minWeekdaysParse,i),o!==-1?o:null)):t==="ddd"?(o=mt.call(this._shortWeekdaysParse,i),o!==-1||(o=mt.call(this._weekdaysParse,i),o!==-1)?o:(o=mt.call(this._minWeekdaysParse,i),o!==-1?o:null)):(o=mt.call(this._minWeekdaysParse,i),o!==-1||(o=mt.call(this._weekdaysParse,i),o!==-1)?o:(o=mt.call(this._shortWeekdaysParse,i),o!==-1?o:null))}function uk(e,t,r){var n,o,s;if(this._weekdaysParseExact)return lk.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=kr([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(s="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(s.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function fk(e){if(!this.isValid())return e!=null?this:NaN;var t=zo(this,"Day");return e!=null?(e=QS(e,this.localeData()),this.add(e-t,"d")):t}function dk(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function hk(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=ek(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function pk(e){return this._weekdaysParseExact?($e(this,"_weekdaysRegex")||Ka.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):($e(this,"_weekdaysRegex")||(this._weekdaysRegex=nk),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function mk(e){return this._weekdaysParseExact?($e(this,"_weekdaysRegex")||Ka.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):($e(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ok),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function gk(e){return this._weekdaysParseExact?($e(this,"_weekdaysRegex")||Ka.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):($e(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=sk),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ka(){function e(l,f){return f.length-l.length}var t=[],r=[],n=[],o=[],s,i,a,c,u;for(s=0;s<7;s++)i=kr([2e3,1]).day(s),a=$r(this.weekdaysMin(i,"")),c=$r(this.weekdaysShort(i,"")),u=$r(this.weekdays(i,"")),t.push(a),r.push(c),n.push(u),o.push(a),o.push(c),o.push(u);t.sort(e),r.sort(e),n.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Ja(){return this.hours()%12||12}function yk(){return this.hours()||24}ge("H",["HH",2],0,"hour"),ge("h",["hh",2],0,Ja),ge("k",["kk",2],0,yk),ge("hmm",0,0,function(){return""+Ja.apply(this)+Er(this.minutes(),2)}),ge("hmmss",0,0,function(){return""+Ja.apply(this)+Er(this.minutes(),2)+Er(this.seconds(),2)}),ge("Hmm",0,0,function(){return""+this.hours()+Er(this.minutes(),2)}),ge("Hmmss",0,0,function(){return""+this.hours()+Er(this.minutes(),2)+Er(this.seconds(),2)});function kd(e,t){ge(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}kd("a",!0),kd("A",!1);function xd(e,t){return t._meridiemParse}fe("a",xd),fe("A",xd),fe("H",et,Ha),fe("h",et,eo),fe("k",et,eo),fe("HH",et,Zt),fe("hh",et,Zt),fe("kk",et,Zt),fe("hmm",dd),fe("hmmss",hd),fe("Hmm",dd),fe("Hmmss",hd),qe(["H","HH"],St),qe(["k","kk"],function(e,t,r){var n=Fe(e);t[St]=n===24?0:n}),qe(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),qe(["h","hh"],function(e,t,r){t[St]=Fe(e),Ce(r).bigHour=!0}),qe("hmm",function(e,t,r){var n=e.length-2;t[St]=Fe(e.substr(0,n)),t[fr]=Fe(e.substr(n)),Ce(r).bigHour=!0}),qe("hmmss",function(e,t,r){var n=e.length-4,o=e.length-2;t[St]=Fe(e.substr(0,n)),t[fr]=Fe(e.substr(n,2)),t[Yr]=Fe(e.substr(o)),Ce(r).bigHour=!0}),qe("Hmm",function(e,t,r){var n=e.length-2;t[St]=Fe(e.substr(0,n)),t[fr]=Fe(e.substr(n))}),qe("Hmmss",function(e,t,r){var n=e.length-4,o=e.length-2;t[St]=Fe(e.substr(0,n)),t[fr]=Fe(e.substr(n,2)),t[Yr]=Fe(e.substr(o))});function vk(e){return(e+"").toLowerCase().charAt(0)==="p"}var bk=/[ap]\.?m?\.?/i,wk=to("Hours",!0);function _k(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var Ed={calendar:lS,longDateFormat:hS,invalidDate:mS,ordinal:yS,dayOfMonthOrdinalParse:vS,relativeTime:wS,months:RS,monthsShort:gd,week:GS,weekdays:tk,weekdaysMin:rk,weekdaysShort:Sd,meridiemParse:bk},at={},Yo={},jo;function Sk(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function Od(e){return e&&e.toLowerCase().replace("_","-")}function kk(e){for(var t=0,r,n,o,s;t<e.length;){for(s=Od(e[t]).split("-"),r=s.length,n=Od(e[t+1]),n=n?n.split("-"):null;r>0;){if(o=Vs(s.slice(0,r).join("-")),o)return o;if(n&&n.length>=r&&Sk(s,n)>=r-1)break;r--}t++}return jo}function xk(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Vs(e){var t=null,r;if(at[e]===void 0&&typeof module<"u"&&module&&module.exports&&xk(e))try{t=jo._abbr,r=require,r("./locale/"+e),an(t)}catch{at[e]=null}return at[e]}function an(e,t){var r;return e&&(Ut(t)?r=Vr(e):r=Xa(e,t),r?jo=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),jo._abbr}function Xa(e,t){if(t!==null){var r,n=Ed;if(t.abbr=e,at[e]!=null)ad("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=at[e]._config;else if(t.parentLocale!=null)if(at[t.parentLocale]!=null)n=at[t.parentLocale]._config;else if(r=Vs(t.parentLocale),r!=null)n=r._config;else return Yo[t.parentLocale]||(Yo[t.parentLocale]=[]),Yo[t.parentLocale].push({name:e,config:t}),null;return at[e]=new za(La(n,t)),Yo[e]&&Yo[e].forEach(function(o){Xa(o.name,o.config)}),an(e),at[e]}else return delete at[e],null}function Ek(e,t){if(t!=null){var r,n,o=Ed;at[e]!=null&&at[e].parentLocale!=null?at[e].set(La(at[e]._config,t)):(n=Vs(e),n!=null&&(o=n._config),t=La(o,t),n==null&&(t.abbr=e),r=new za(t),r.parentLocale=at[e],at[e]=r),an(e)}else at[e]!=null&&(at[e].parentLocale!=null?(at[e]=at[e].parentLocale,e===an()&&an(e)):at[e]!=null&&delete at[e]);return at[e]}function Vr(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return jo;if(!lr(e)){if(t=Vs(e),t)return t;e=[e]}return kk(e)}function Ok(){return $a(at)}function Qa(e){var t,r=e._a;return r&&Ce(e).overflow===-2&&(t=r[Ur]<0||r[Ur]>11?Ur:r[Or]<1||r[Or]>Ga(r[Tt],r[Ur])?Or:r[St]<0||r[St]>24||r[St]===24&&(r[fr]!==0||r[Yr]!==0||r[An]!==0)?St:r[fr]<0||r[fr]>59?fr:r[Yr]<0||r[Yr]>59?Yr:r[An]<0||r[An]>999?An:-1,Ce(e)._overflowDayOfYear&&(t<Tt||t>Or)&&(t=Or),Ce(e)._overflowWeeks&&t===-1&&(t=AS),Ce(e)._overflowWeekday&&t===-1&&(t=MS),Ce(e).overflow=t),e}var Ck=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Tk=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Dk=/Z|[+-]\d\d(?::?\d\d)?/,Bs=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ec=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ak=/^\/?Date\((-?\d+)/i,Mk=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Pk={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Cd(e){var t,r,n=e._i,o=Ck.exec(n)||Tk.exec(n),s,i,a,c,u=Bs.length,l=ec.length;if(o){for(Ce(e).iso=!0,t=0,r=u;t<r;t++)if(Bs[t][1].exec(o[1])){i=Bs[t][0],s=Bs[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(o[3]){for(t=0,r=l;t<r;t++)if(ec[t][1].exec(o[3])){a=(o[2]||" ")+ec[t][0];break}if(a==null){e._isValid=!1;return}}if(!s&&a!=null){e._isValid=!1;return}if(o[4])if(Dk.exec(o[4]))c="Z";else{e._isValid=!1;return}e._f=i+(a||"")+(c||""),rc(e)}else e._isValid=!1}function Nk(e,t,r,n,o,s){var i=[Ik(e),gd.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(o,10)];return s&&i.push(parseInt(s,10)),i}function Ik(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Fk(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Rk(e,t,r){if(e){var n=Sd.indexOf(e),o=new Date(t[0],t[1],t[2]).getDay();if(n!==o)return Ce(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function Wk(e,t,r){if(e)return Pk[e];if(t)return 0;var n=parseInt(r,10),o=n%100,s=(n-o)/100;return s*60+o}function Td(e){var t=Mk.exec(Fk(e._i)),r;if(t){if(r=Nk(t[4],t[3],t[2],t[5],t[6],t[7]),!Rk(t[1],r,e))return;e._a=r,e._tzm=Wk(t[8],t[9],t[10]),e._d=$o.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Ce(e).rfc2822=!0}else e._isValid=!1}function Lk(e){var t=Ak.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Cd(e),e._isValid===!1)delete e._isValid;else return;if(Td(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ce.createFromInputFallback(e)}ce.createFromInputFallback=rr("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function ro(e,t,r){return e??t??r}function zk(e){var t=new Date(ce.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function tc(e){var t,r,n=[],o,s,i;if(!e._d){for(o=zk(e),e._w&&e._a[Or]==null&&e._a[Ur]==null&&$k(e),e._dayOfYear!=null&&(i=ro(e._a[Tt],o[Tt]),(e._dayOfYear>Lo(i)||e._dayOfYear===0)&&(Ce(e)._overflowDayOfYear=!0),r=$o(i,0,e._dayOfYear),e._a[Ur]=r.getUTCMonth(),e._a[Or]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=o[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[St]===24&&e._a[fr]===0&&e._a[Yr]===0&&e._a[An]===0&&(e._nextDay=!0,e._a[St]=0),e._d=(e._useUTC?$o:HS).apply(null,n),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[St]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(Ce(e).weekdayMismatch=!0)}}function $k(e){var t,r,n,o,s,i,a,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,i=4,r=ro(t.GG,e._a[Tt],Uo(tt(),1,4).year),n=ro(t.W,1),o=ro(t.E,1),(o<1||o>7)&&(c=!0)):(s=e._locale._week.dow,i=e._locale._week.doy,u=Uo(tt(),s,i),r=ro(t.gg,e._a[Tt],u.year),n=ro(t.w,u.week),t.d!=null?(o=t.d,(o<0||o>6)&&(c=!0)):t.e!=null?(o=t.e+s,(t.e<0||t.e>6)&&(c=!0)):o=s),n<1||n>jr(r,s,i)?Ce(e)._overflowWeeks=!0:c!=null?Ce(e)._overflowWeekday=!0:(a=_d(r,n,o,s,i),e._a[Tt]=a.year,e._dayOfYear=a.dayOfYear)}ce.ISO_8601=function(){},ce.RFC_2822=function(){};function rc(e){if(e._f===ce.ISO_8601){Cd(e);return}if(e._f===ce.RFC_2822){Td(e);return}e._a=[],Ce(e).empty=!0;var t=""+e._i,r,n,o,s,i,a=t.length,c=0,u,l;for(o=cd(e._f,e._locale).match(Ua)||[],l=o.length,r=0;r<l;r++)s=o[r],n=(t.match(CS(s,e))||[])[0],n&&(i=t.substr(0,t.indexOf(n)),i.length>0&&Ce(e).unusedInput.push(i),t=t.slice(t.indexOf(n)+n.length),c+=n.length),Xn[s]?(n?Ce(e).empty=!1:Ce(e).unusedTokens.push(s),DS(s,n,e)):e._strict&&!n&&Ce(e).unusedTokens.push(s);Ce(e).charsLeftOver=a-c,t.length>0&&Ce(e).unusedInput.push(t),e._a[St]<=12&&Ce(e).bigHour===!0&&e._a[St]>0&&(Ce(e).bigHour=void 0),Ce(e).parsedDateParts=e._a.slice(0),Ce(e).meridiem=e._meridiem,e._a[St]=Uk(e._locale,e._a[St],e._meridiem),u=Ce(e).era,u!==null&&(e._a[Tt]=e._locale.erasConvertYear(u,e._a[Tt])),tc(e),Qa(e)}function Uk(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function Yk(e){var t,r,n,o,s,i,a=!1,c=e._f.length;if(c===0){Ce(e).invalidFormat=!0,e._d=new Date(NaN);return}for(o=0;o<c;o++)s=0,i=!1,t=Wa({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[o],rc(t),Fa(t)&&(i=!0),s+=Ce(t).charsLeftOver,s+=Ce(t).unusedTokens.length*10,Ce(t).score=s,a?s<n&&(n=s,r=t):(n==null||s<n||i)&&(n=s,r=t,i&&(a=!0));sn(e,r||t)}function jk(e){if(!e._d){var t=ja(e._i),r=t.day===void 0?t.date:t.day;e._a=nd([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),tc(e)}}function Vk(e){var t=new Fo(Qa(Dd(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Dd(e){var t=e._i,r=e._f;return e._locale=e._locale||Vr(e._l),t===null||r===void 0&&t===""?Ns({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),ur(t)?new Fo(Qa(t)):(Io(t)?e._d=t:lr(r)?Yk(e):r?rc(e):Bk(e),Fa(e)||(e._d=null),e))}function Bk(e){var t=e._i;Ut(t)?e._d=new Date(ce.now()):Io(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Lk(e):lr(t)?(e._a=nd(t.slice(0),function(r){return parseInt(r,10)}),tc(e)):Dn(t)?jk(e):zr(t)?e._d=new Date(t):ce.createFromInputFallback(e)}function Ad(e,t,r,n,o){var s={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Dn(e)&&Na(e)||lr(e)&&e.length===0)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=r,s._i=e,s._f=t,s._strict=n,Vk(s)}function tt(e,t,r,n){return Ad(e,t,r,n,!1)}var Hk=rr("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Ns()}),Zk=rr("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=tt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Ns()});function Md(e,t){var r,n;if(t.length===1&&lr(t[0])&&(t=t[0]),!t.length)return tt();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function Gk(){var e=[].slice.call(arguments,0);return Md("isBefore",e)}function qk(){var e=[].slice.call(arguments,0);return Md("isAfter",e)}var Kk=function(){return Date.now?Date.now():+new Date},Vo=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Jk(e){var t,r=!1,n,o=Vo.length;for(t in e)if($e(e,t)&&!(mt.call(Vo,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<o;++n)if(e[Vo[n]]){if(r)return!1;parseFloat(e[Vo[n]])!==Fe(e[Vo[n]])&&(r=!0)}return!0}function Xk(){return this._isValid}function Qk(){return dr(NaN)}function Hs(e){var t=ja(e),r=t.year||0,n=t.quarter||0,o=t.month||0,s=t.week||t.isoWeek||0,i=t.day||0,a=t.hour||0,c=t.minute||0,u=t.second||0,l=t.millisecond||0;this._isValid=Jk(t),this._milliseconds=+l+u*1e3+c*6e4+a*1e3*60*60,this._days=+i+s*7,this._months=+o+n*3+r*12,this._data={},this._locale=Vr(),this._bubble()}function Zs(e){return e instanceof Hs}function nc(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function ex(e,t,r){var n=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0,i;for(i=0;i<n;i++)Fe(e[i])!==Fe(t[i])&&s++;return s+o}function Pd(e,t){ge(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Er(~~(r/60),2)+t+Er(~~r%60,2)})}Pd("Z",":"),Pd("ZZ",""),fe("Z",$s),fe("ZZ",$s),qe(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=oc($s,e)});var tx=/([\+\-]|\d\d)/gi;function oc(e,t){var r=(t||"").match(e),n,o,s;return r===null?null:(n=r[r.length-1]||[],o=(n+"").match(tx)||["-",0,0],s=+(o[1]*60)+Fe(o[2]),s===0?0:o[0]==="+"?s:-s)}function sc(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(ur(e)||Io(e)?e.valueOf():tt(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),ce.updateOffset(r,!1),r):tt(e).local()}function ic(e){return-Math.round(e._d.getTimezoneOffset())}ce.updateOffset=function(){};function rx(e,t,r){var n=this._offset||0,o;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=oc($s,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(o=ic(this)),this._offset=e,this._isUTC=!0,o!=null&&this.add(o,"m"),n!==e&&(!t||this._changeInProgress?Rd(this,dr(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ce.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:ic(this)}function nx(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function ox(e){return this.utcOffset(0,e)}function sx(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(ic(this),"m")),this}function ix(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=oc(ES,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function ax(e){return this.isValid()?(e=e?tt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function cx(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function lx(){if(!Ut(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Wa(e,this),e=Dd(e),e._a?(t=e._isUTC?kr(e._a):tt(e._a),this._isDSTShifted=this.isValid()&&ex(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ux(){return this.isValid()?!this._isUTC:!1}function fx(){return this.isValid()?this._isUTC:!1}function Nd(){return this.isValid()?this._isUTC&&this._offset===0:!1}var dx=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,hx=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function dr(e,t){var r=e,n=null,o,s,i;return Zs(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:zr(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=dx.exec(e))?(o=n[1]==="-"?-1:1,r={y:0,d:Fe(n[Or])*o,h:Fe(n[St])*o,m:Fe(n[fr])*o,s:Fe(n[Yr])*o,ms:Fe(nc(n[An]*1e3))*o}):(n=hx.exec(e))?(o=n[1]==="-"?-1:1,r={y:Mn(n[2],o),M:Mn(n[3],o),w:Mn(n[4],o),d:Mn(n[5],o),h:Mn(n[6],o),m:Mn(n[7],o),s:Mn(n[8],o)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(i=px(tt(r.from),tt(r.to)),r={},r.ms=i.milliseconds,r.M=i.months),s=new Hs(r),Zs(e)&&$e(e,"_locale")&&(s._locale=e._locale),Zs(e)&&$e(e,"_isValid")&&(s._isValid=e._isValid),s}dr.fn=Hs.prototype,dr.invalid=Qk;function Mn(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Id(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function px(e,t){var r;return e.isValid()&&t.isValid()?(t=sc(t,e),e.isBefore(t)?r=Id(e,t):(r=Id(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Fd(e,t){return function(r,n){var o,s;return n!==null&&!isNaN(+n)&&(ad(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=r,r=n,n=s),o=dr(r,n),Rd(this,o,e),this}}function Rd(e,t,r,n){var o=t._milliseconds,s=nc(t._days),i=nc(t._months);e.isValid()&&(n=n??!0,i&&vd(e,zo(e,"Month")+i*r),s&&md(e,"Date",zo(e,"Date")+s*r),o&&e._d.setTime(e._d.valueOf()+o*r),n&&ce.updateOffset(e,s||i))}var mx=Fd(1,"add"),gx=Fd(-1,"subtract");function Wd(e){return typeof e=="string"||e instanceof String}function yx(e){return ur(e)||Io(e)||Wd(e)||zr(e)||bx(e)||vx(e)||e===null||e===void 0}function vx(e){var t=Dn(e)&&!Na(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o,s,i=n.length;for(o=0;o<i;o+=1)s=n[o],r=r||$e(e,s);return t&&r}function bx(e){var t=lr(e),r=!1;return t&&(r=e.filter(function(n){return!zr(n)&&Wd(e)}).length===0),t&&r}function wx(e){var t=Dn(e)&&!Na(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],o,s;for(o=0;o<n.length;o+=1)s=n[o],r=r||$e(e,s);return t&&r}function _x(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function Sx(e,t){arguments.length===1&&(arguments[0]?yx(arguments[0])?(e=arguments[0],t=void 0):wx(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||tt(),n=sc(r,this).startOf("day"),o=ce.calendarFormat(this,n)||"sameElse",s=t&&(xr(t[o])?t[o].call(this,r):t[o]);return this.format(s||this.localeData().calendar(o,this,tt(r)))}function kx(){return new Fo(this)}function xx(e,t){var r=ur(e)?e:tt(e);return this.isValid()&&r.isValid()?(t=nr(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function Ex(e,t){var r=ur(e)?e:tt(e);return this.isValid()&&r.isValid()?(t=nr(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function Ox(e,t,r,n){var o=ur(e)?e:tt(e),s=ur(t)?t:tt(t);return this.isValid()&&o.isValid()&&s.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(o,r):!this.isBefore(o,r))&&(n[1]===")"?this.isBefore(s,r):!this.isAfter(s,r))):!1}function Cx(e,t){var r=ur(e)?e:tt(e),n;return this.isValid()&&r.isValid()?(t=nr(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function Tx(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Dx(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ax(e,t,r){var n,o,s;if(!this.isValid())return NaN;if(n=sc(e,this),!n.isValid())return NaN;switch(o=(n.utcOffset()-this.utcOffset())*6e4,t=nr(t),t){case"year":s=Gs(this,n)/12;break;case"month":s=Gs(this,n);break;case"quarter":s=Gs(this,n)/3;break;case"second":s=(this-n)/1e3;break;case"minute":s=(this-n)/6e4;break;case"hour":s=(this-n)/36e5;break;case"day":s=(this-n-o)/864e5;break;case"week":s=(this-n-o)/6048e5;break;default:s=this-n}return r?s:or(s)}function Gs(e,t){if(e.date()<t.date())return-Gs(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),o,s;return t-n<0?(o=e.clone().add(r-1,"months"),s=(t-n)/(n-o)):(o=e.clone().add(r+1,"months"),s=(t-n)/(o-n)),-(r+s)||0}ce.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",ce.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Mx(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Px(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?Fs(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):xr(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Fs(r,"Z")):Fs(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Nx(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,o,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(r+n+o+s)}function Ix(e){e||(e=this.isUtc()?ce.defaultFormatUtc:ce.defaultFormat);var t=Fs(this,e);return this.localeData().postformat(t)}function Fx(e,t){return this.isValid()&&(ur(e)&&e.isValid()||tt(e).isValid())?dr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Rx(e){return this.from(tt(),e)}function Wx(e,t){return this.isValid()&&(ur(e)&&e.isValid()||tt(e).isValid())?dr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Lx(e){return this.to(tt(),e)}function Ld(e){var t;return e===void 0?this._locale._abbr:(t=Vr(e),t!=null&&(this._locale=t),this)}var zd=rr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function $d(){return this._locale}var qs=1e3,no=60*qs,Ks=60*no,Ud=(365*400+97)*24*Ks;function oo(e,t){return(e%t+t)%t}function Yd(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Ud:new Date(e,t,r).valueOf()}function jd(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Ud:Date.UTC(e,t,r)}function zx(e){var t,r;if(e=nr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?jd:Yd,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=oo(t+(this._isUTC?0:this.utcOffset()*no),Ks);break;case"minute":t=this._d.valueOf(),t-=oo(t,no);break;case"second":t=this._d.valueOf(),t-=oo(t,qs);break}return this._d.setTime(t),ce.updateOffset(this,!0),this}function $x(e){var t,r;if(e=nr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?jd:Yd,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Ks-oo(t+(this._isUTC?0:this.utcOffset()*no),Ks)-1;break;case"minute":t=this._d.valueOf(),t+=no-oo(t,no)-1;break;case"second":t=this._d.valueOf(),t+=qs-oo(t,qs)-1;break}return this._d.setTime(t),ce.updateOffset(this,!0),this}function Ux(){return this._d.valueOf()-(this._offset||0)*6e4}function Yx(){return Math.floor(this.valueOf()/1e3)}function jx(){return new Date(this.valueOf())}function Vx(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Bx(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Hx(){return this.isValid()?this.toISOString():null}function Zx(){return Fa(this)}function Gx(){return sn({},Ce(this))}function qx(){return Ce(this).overflow}function Kx(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}ge("N",0,0,"eraAbbr"),ge("NN",0,0,"eraAbbr"),ge("NNN",0,0,"eraAbbr"),ge("NNNN",0,0,"eraName"),ge("NNNNN",0,0,"eraNarrow"),ge("y",["y",1],"yo","eraYear"),ge("y",["yy",2],0,"eraYear"),ge("y",["yyy",3],0,"eraYear"),ge("y",["yyyy",4],0,"eraYear"),fe("N",ac),fe("NN",ac),fe("NNN",ac),fe("NNNN",aE),fe("NNNNN",cE),qe(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var o=r._locale.erasParse(e,n,r._strict);o?Ce(r).era=o:Ce(r).invalidEra=e}),fe("y",Qn),fe("yy",Qn),fe("yyy",Qn),fe("yyyy",Qn),fe("yo",lE),qe(["y","yy","yyy","yyyy"],Tt),qe(["yo"],function(e,t,r,n){var o;r._locale._eraYearOrdinalRegex&&(o=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Tt]=r._locale.eraYearOrdinalParse(e,o):t[Tt]=parseInt(e,10)});function Jx(e,t){var r,n,o,s=this._eras||Vr("en")._eras;for(r=0,n=s.length;r<n;++r)switch(typeof s[r].since==="string"&&(o=ce(s[r].since).startOf("day"),s[r].since=o.valueOf()),typeof s[r].until){case"undefined":s[r].until=1/0;break;case"string":o=ce(s[r].until).startOf("day").valueOf(),s[r].until=o.valueOf();break}return s}function Xx(e,t,r){var n,o,s=this.eras(),i,a,c;for(e=e.toUpperCase(),n=0,o=s.length;n<o;++n)if(i=s[n].name.toUpperCase(),a=s[n].abbr.toUpperCase(),c=s[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(a===e)return s[n];break;case"NNNN":if(i===e)return s[n];break;case"NNNNN":if(c===e)return s[n];break}else if([i,a,c].indexOf(e)>=0)return s[n]}function Qx(e,t){var r=e.since<=e.until?1:-1;return t===void 0?ce(e.since).year():ce(e.since).year()+(t-e.offset)*r}function eE(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function tE(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function rE(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function nE(){var e,t,r,n,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(r=o[e].since<=o[e].until?1:-1,n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until||o[e].until<=n&&n<=o[e].since)return(this.year()-ce(o[e].since).year())*r+o[e].offset;return this.year()}function oE(e){return $e(this,"_erasNameRegex")||cc.call(this),e?this._erasNameRegex:this._erasRegex}function sE(e){return $e(this,"_erasAbbrRegex")||cc.call(this),e?this._erasAbbrRegex:this._erasRegex}function iE(e){return $e(this,"_erasNarrowRegex")||cc.call(this),e?this._erasNarrowRegex:this._erasRegex}function ac(e,t){return t.erasAbbrRegex(e)}function aE(e,t){return t.erasNameRegex(e)}function cE(e,t){return t.erasNarrowRegex(e)}function lE(e,t){return t._eraYearOrdinalRegex||Qn}function cc(){var e=[],t=[],r=[],n=[],o,s,i,a,c,u=this.eras();for(o=0,s=u.length;o<s;++o)i=$r(u[o].name),a=$r(u[o].abbr),c=$r(u[o].narrow),t.push(i),e.push(a),r.push(c),n.push(i),n.push(a),n.push(c);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}ge(0,["gg",2],0,function(){return this.weekYear()%100}),ge(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Js(e,t){ge(0,[e,e.length],0,t)}Js("gggg","weekYear"),Js("ggggg","weekYear"),Js("GGGG","isoWeekYear"),Js("GGGGG","isoWeekYear"),fe("G",zs),fe("g",zs),fe("GG",et,Zt),fe("gg",et,Zt),fe("GGGG",Ba,Va),fe("gggg",Ba,Va),fe("GGGGG",Ls,Rs),fe("ggggg",Ls,Rs),Wo(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=Fe(e)}),Wo(["gg","GG"],function(e,t,r,n){t[n]=ce.parseTwoDigitYear(e)});function uE(e){return Vd.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function fE(e){return Vd.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function dE(){return jr(this.year(),1,4)}function hE(){return jr(this.isoWeekYear(),1,4)}function pE(){var e=this.localeData()._week;return jr(this.year(),e.dow,e.doy)}function mE(){var e=this.localeData()._week;return jr(this.weekYear(),e.dow,e.doy)}function Vd(e,t,r,n,o){var s;return e==null?Uo(this,n,o).year:(s=jr(e,n,o),t>s&&(t=s),gE.call(this,e,t,r,n,o))}function gE(e,t,r,n,o){var s=_d(e,t,r,n,o),i=$o(s.year,0,s.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}ge("Q",0,"Qo","quarter"),fe("Q",ud),qe("Q",function(e,t){t[Ur]=(Fe(e)-1)*3});function yE(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}ge("D",["DD",2],"Do","date"),fe("D",et,eo),fe("DD",et,Zt),fe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),qe(["D","DD"],Or),qe("Do",function(e,t){t[Or]=Fe(e.match(et)[0])});var Bd=to("Date",!0);ge("DDD",["DDDD",3],"DDDo","dayOfYear"),fe("DDD",Ws),fe("DDDD",fd),qe(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Fe(e)});function vE(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}ge("m",["mm",2],0,"minute"),fe("m",et,Ha),fe("mm",et,Zt),qe(["m","mm"],fr);var bE=to("Minutes",!1);ge("s",["ss",2],0,"second"),fe("s",et,Ha),fe("ss",et,Zt),qe(["s","ss"],Yr);var wE=to("Seconds",!1);ge("S",0,0,function(){return~~(this.millisecond()/100)}),ge(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),ge(0,["SSS",3],0,"millisecond"),ge(0,["SSSS",4],0,function(){return this.millisecond()*10}),ge(0,["SSSSS",5],0,function(){return this.millisecond()*100}),ge(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),ge(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),ge(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),ge(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),fe("S",Ws,ud),fe("SS",Ws,Zt),fe("SSS",Ws,fd);var cn,Hd;for(cn="SSSS";cn.length<=9;cn+="S")fe(cn,Qn);function _E(e,t){t[An]=Fe(("0."+e)*1e3)}for(cn="S";cn.length<=9;cn+="S")qe(cn,_E);Hd=to("Milliseconds",!1),ge("z",0,0,"zoneAbbr"),ge("zz",0,0,"zoneName");function SE(){return this._isUTC?"UTC":""}function kE(){return this._isUTC?"Coordinated Universal Time":""}var se=Fo.prototype;se.add=mx,se.calendar=Sx,se.clone=kx,se.diff=Ax,se.endOf=$x,se.format=Ix,se.from=Fx,se.fromNow=Rx,se.to=Wx,se.toNow=Lx,se.get=NS,se.invalidAt=qx,se.isAfter=xx,se.isBefore=Ex,se.isBetween=Ox,se.isSame=Cx,se.isSameOrAfter=Tx,se.isSameOrBefore=Dx,se.isValid=Zx,se.lang=zd,se.locale=Ld,se.localeData=$d,se.max=Zk,se.min=Hk,se.parsingFlags=Gx,se.set=IS,se.startOf=zx,se.subtract=gx,se.toArray=Vx,se.toObject=Bx,se.toDate=jx,se.toISOString=Px,se.inspect=Nx,typeof Symbol<"u"&&Symbol.for!=null&&(se[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),se.toJSON=Hx,se.toString=Mx,se.unix=Yx,se.valueOf=Ux,se.creationData=Kx,se.eraName=eE,se.eraNarrow=tE,se.eraAbbr=rE,se.eraYear=nE,se.year=pd,se.isLeapYear=PS,se.weekYear=uE,se.isoWeekYear=fE,se.quarter=se.quarters=yE,se.month=bd,se.daysInMonth=jS,se.week=se.weeks=JS,se.isoWeek=se.isoWeeks=XS,se.weeksInYear=pE,se.weeksInWeekYear=mE,se.isoWeeksInYear=dE,se.isoWeeksInISOWeekYear=hE,se.date=Bd,se.day=se.days=fk,se.weekday=dk,se.isoWeekday=hk,se.dayOfYear=vE,se.hour=se.hours=wk,se.minute=se.minutes=bE,se.second=se.seconds=wE,se.millisecond=se.milliseconds=Hd,se.utcOffset=rx,se.utc=ox,se.local=sx,se.parseZone=ix,se.hasAlignedHourOffset=ax,se.isDST=cx,se.isLocal=ux,se.isUtcOffset=fx,se.isUtc=Nd,se.isUTC=Nd,se.zoneAbbr=SE,se.zoneName=kE,se.dates=rr("dates accessor is deprecated. Use date instead.",Bd),se.months=rr("months accessor is deprecated. Use month instead",bd),se.years=rr("years accessor is deprecated. Use year instead",pd),se.zone=rr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",nx),se.isDSTShifted=rr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",lx);function xE(e){return tt(e*1e3)}function EE(){return tt.apply(null,arguments).parseZone()}function Zd(e){return e}var Ue=za.prototype;Ue.calendar=uS,Ue.longDateFormat=pS,Ue.invalidDate=gS,Ue.ordinal=bS,Ue.preparse=Zd,Ue.postformat=Zd,Ue.relativeTime=_S,Ue.pastFuture=SS,Ue.set=cS,Ue.eras=Jx,Ue.erasParse=Xx,Ue.erasConvertYear=Qx,Ue.erasAbbrRegex=sE,Ue.erasNameRegex=oE,Ue.erasNarrowRegex=iE,Ue.months=zS,Ue.monthsShort=$S,Ue.monthsParse=YS,Ue.monthsRegex=BS,Ue.monthsShortRegex=VS,Ue.week=ZS,Ue.firstDayOfYear=KS,Ue.firstDayOfWeek=qS,Ue.weekdays=ik,Ue.weekdaysMin=ck,Ue.weekdaysShort=ak,Ue.weekdaysParse=uk,Ue.weekdaysRegex=pk,Ue.weekdaysShortRegex=mk,Ue.weekdaysMinRegex=gk,Ue.isPM=vk,Ue.meridiem=_k;function Xs(e,t,r,n){var o=Vr(),s=kr().set(n,t);return o[r](s,e)}function Gd(e,t,r){if(zr(e)&&(t=e,e=void 0),e=e||"",t!=null)return Xs(e,t,r,"month");var n,o=[];for(n=0;n<12;n++)o[n]=Xs(e,n,r,"month");return o}function lc(e,t,r,n){typeof e=="boolean"?(zr(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,zr(t)&&(r=t,t=void 0),t=t||"");var o=Vr(),s=e?o._week.dow:0,i,a=[];if(r!=null)return Xs(t,(r+s)%7,n,"day");for(i=0;i<7;i++)a[i]=Xs(t,(i+s)%7,n,"day");return a}function OE(e,t){return Gd(e,t,"months")}function CE(e,t){return Gd(e,t,"monthsShort")}function TE(e,t,r){return lc(e,t,r,"weekdays")}function DE(e,t,r){return lc(e,t,r,"weekdaysShort")}function AE(e,t,r){return lc(e,t,r,"weekdaysMin")}an("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=Fe(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}}),ce.lang=rr("moment.lang is deprecated. Use moment.locale instead.",an),ce.langData=rr("moment.langData is deprecated. Use moment.localeData instead.",Vr);var Br=Math.abs;function ME(){var e=this._data;return this._milliseconds=Br(this._milliseconds),this._days=Br(this._days),this._months=Br(this._months),e.milliseconds=Br(e.milliseconds),e.seconds=Br(e.seconds),e.minutes=Br(e.minutes),e.hours=Br(e.hours),e.months=Br(e.months),e.years=Br(e.years),this}function qd(e,t,r,n){var o=dr(t,r);return e._milliseconds+=n*o._milliseconds,e._days+=n*o._days,e._months+=n*o._months,e._bubble()}function PE(e,t){return qd(this,e,t,1)}function NE(e,t){return qd(this,e,t,-1)}function Kd(e){return e<0?Math.floor(e):Math.ceil(e)}function IE(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,o,s,i,a,c;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=Kd(uc(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,o=or(e/1e3),n.seconds=o%60,s=or(o/60),n.minutes=s%60,i=or(s/60),n.hours=i%24,t+=or(i/24),c=or(Jd(t)),r+=c,t-=Kd(uc(c)),a=or(r/12),r%=12,n.days=t,n.months=r,n.years=a,this}function Jd(e){return e*4800/146097}function uc(e){return e*146097/4800}function FE(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=nr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+Jd(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(uc(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function Hr(e){return function(){return this.as(e)}}var Xd=Hr("ms"),RE=Hr("s"),WE=Hr("m"),LE=Hr("h"),zE=Hr("d"),$E=Hr("w"),UE=Hr("M"),YE=Hr("Q"),jE=Hr("y"),VE=Xd;function BE(){return dr(this)}function HE(e){return e=nr(e),this.isValid()?this[e+"s"]():NaN}function Pn(e){return function(){return this.isValid()?this._data[e]:NaN}}var ZE=Pn("milliseconds"),GE=Pn("seconds"),qE=Pn("minutes"),KE=Pn("hours"),JE=Pn("days"),XE=Pn("months"),QE=Pn("years");function eO(){return or(this.days()/7)}var Zr=Math.round,so={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function tO(e,t,r,n,o){return o.relativeTime(t||1,!!r,e,n)}function rO(e,t,r,n){var o=dr(e).abs(),s=Zr(o.as("s")),i=Zr(o.as("m")),a=Zr(o.as("h")),c=Zr(o.as("d")),u=Zr(o.as("M")),l=Zr(o.as("w")),f=Zr(o.as("y")),d=s<=r.ss&&["s",s]||s<r.s&&["ss",s]||i<=1&&["m"]||i<r.m&&["mm",i]||a<=1&&["h"]||a<r.h&&["hh",a]||c<=1&&["d"]||c<r.d&&["dd",c];return r.w!=null&&(d=d||l<=1&&["w"]||l<r.w&&["ww",l]),d=d||u<=1&&["M"]||u<r.M&&["MM",u]||f<=1&&["y"]||["yy",f],d[2]=t,d[3]=+e>0,d[4]=n,tO.apply(null,d)}function nO(e){return e===void 0?Zr:typeof e=="function"?(Zr=e,!0):!1}function oO(e,t){return so[e]===void 0?!1:t===void 0?so[e]:(so[e]=t,e==="s"&&(so.ss=t-1),!0)}function sO(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=so,o,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},so,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),o=this.localeData(),s=rO(this,!r,n,o),r&&(s=o.pastFuture(+this,s)),o.postformat(s)}var fc=Math.abs;function io(e){return(e>0)-(e<0)||+e}function Qs(){if(!this.isValid())return this.localeData().invalidDate();var e=fc(this._milliseconds)/1e3,t=fc(this._days),r=fc(this._months),n,o,s,i,a=this.asSeconds(),c,u,l,f;return a?(n=or(e/60),o=or(n/60),e%=60,n%=60,s=or(r/12),r%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=io(this._months)!==io(a)?"-":"",l=io(this._days)!==io(a)?"-":"",f=io(this._milliseconds)!==io(a)?"-":"",c+"P"+(s?u+s+"Y":"")+(r?u+r+"M":"")+(t?l+t+"D":"")+(o||n||e?"T":"")+(o?f+o+"H":"")+(n?f+n+"M":"")+(e?f+i+"S":"")):"P0D"}var ze=Hs.prototype;ze.isValid=Xk,ze.abs=ME,ze.add=PE,ze.subtract=NE,ze.as=FE,ze.asMilliseconds=Xd,ze.asSeconds=RE,ze.asMinutes=WE,ze.asHours=LE,ze.asDays=zE,ze.asWeeks=$E,ze.asMonths=UE,ze.asQuarters=YE,ze.asYears=jE,ze.valueOf=VE,ze._bubble=IE,ze.clone=BE,ze.get=HE,ze.milliseconds=ZE,ze.seconds=GE,ze.minutes=qE,ze.hours=KE,ze.days=JE,ze.weeks=eO,ze.months=XE,ze.years=QE,ze.humanize=sO,ze.toISOString=Qs,ze.toString=Qs,ze.toJSON=Qs,ze.locale=Ld,ze.localeData=$d,ze.toIsoString=rr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qs),ze.lang=zd,ge("X",0,0,"unix"),ge("x",0,0,"valueOf"),fe("x",zs),fe("X",OS),qe("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}),qe("x",function(e,t,r){r._d=new Date(Fe(e))});ce.version="2.30.1",iS(tt),ce.fn=se,ce.min=Gk,ce.max=qk,ce.now=Kk,ce.utc=kr,ce.unix=xE,ce.months=OE,ce.isDate=Io,ce.locale=an,ce.invalid=Ns,ce.duration=dr,ce.isMoment=ur,ce.weekdays=TE,ce.parseZone=EE,ce.localeData=Vr,ce.isDuration=Zs,ce.monthsShort=CE,ce.weekdaysMin=AE,ce.defineLocale=Xa,ce.updateLocale=Ek,ce.locales=Ok,ce.weekdaysShort=DE,ce.normalizeUnits=nr,ce.relativeTimeRounding=nO,ce.relativeTimeThreshold=oO,ce.calendarFormat=_x,ce.prototype=se,ce.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Qd=(e,t,r)=>{if(e&&"reportValidity"in e){const n=ae(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},dc=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Qd(n.ref,r,e):n&&n.refs&&n.refs.forEach(o=>Qd(o,r,e))}},eh=(e,t)=>{t.shouldUseNativeValidation&&dc(e,t);const r={};for(const n in e){const o=ae(t.fields,n),s=Object.assign(e[n]||{},{ref:o&&o.ref});if(iO(t.names||Object.keys(e),n)){const i=Object.assign({},ae(r,n));Ve(i,"root",s),Ve(r,n,i)}else Ve(r,n,s)}return r},iO=(e,t)=>{const r=th(t);return e.some(n=>th(n).match(`^${r}\\.\\d+`))};function th(e){return e.replace(/\]|\[/g,"")}function rh(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function aO(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,i=n.path.join(".");if(!r[i])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[i]={message:a.message,type:a.code}}else r[i]={message:s,type:o};if("unionErrors"in n&&n.unionErrors.forEach(function(l){return l.errors.forEach(function(f){return e.push(f)})}),t){var c=r[i].types,u=c&&c[n.code];r[i]=ba(i,t,r,o,u?[].concat(u,n.message):n.message)}e.shift()}return r}function cO(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,i=n.path.join(".");if(!r[i])if(n.code==="invalid_union"&&n.errors.length>0){var a=n.errors[0][0];r[i]={message:a.message,type:a.code}}else r[i]={message:s,type:o};if(n.code==="invalid_union"&&n.errors.forEach(function(l){return l.forEach(function(f){return e.push(f)})}),t){var c=r[i].types,u=c&&c[n.code];r[i]=ba(i,t,r,o,u?[].concat(u,n.message):n.message)}e.shift()}return r}function lO(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,o,s){try{return Promise.resolve(rh(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(i){return s.shouldUseNativeValidation&&dc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return Array.isArray(a?.issues)})(i))return{values:{},errors:eh(aO(i.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,o,s){try{return Promise.resolve(rh(function(){return Promise.resolve((r.mode==="sync"?Lb:zb)(e,n,t)).then(function(i){return s.shouldUseNativeValidation&&dc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return a instanceof Da})(i))return{values:{},errors:eh(cO(i.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const{entries:nh,setPrototypeOf:oh,isFrozen:uO,getPrototypeOf:fO,getOwnPropertyDescriptor:dO}=Object;let{freeze:Wt,seal:sr,create:hc}=Object,{apply:pc,construct:mc}=typeof Reflect<"u"&&Reflect;Wt||(Wt=function(t){return t}),sr||(sr=function(t){return t}),pc||(pc=function(t,r){for(var n=arguments.length,o=new Array(n>2?n-2:0),s=2;s<n;s++)o[s-2]=arguments[s];return t.apply(r,o)}),mc||(mc=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return new t(...n)});const ei=zt(Array.prototype.forEach),hO=zt(Array.prototype.lastIndexOf),sh=zt(Array.prototype.pop),Bo=zt(Array.prototype.push),pO=zt(Array.prototype.splice),ti=zt(String.prototype.toLowerCase),gc=zt(String.prototype.toString),yc=zt(String.prototype.match),Ho=zt(String.prototype.replace),mO=zt(String.prototype.indexOf),gO=zt(String.prototype.trim),hr=zt(Object.prototype.hasOwnProperty),Lt=zt(RegExp.prototype.test),Zo=yO(TypeError);function zt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return pc(e,t,n)}}function yO(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mc(e,r)}}function Pe(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ti;oh&&oh(e,null);let n=t.length;for(;n--;){let o=t[n];if(typeof o=="string"){const s=r(o);s!==o&&(uO(t)||(t[n]=s),o=s)}e[o]=!0}return e}function vO(e){for(let t=0;t<e.length;t++)hr(e,t)||(e[t]=null);return e}function Cr(e){const t=hc(null);for(const[r,n]of nh(e))hr(e,r)&&(Array.isArray(n)?t[r]=vO(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=Cr(n):t[r]=n);return t}function Go(e,t){for(;e!==null;){const n=dO(e,t);if(n){if(n.get)return zt(n.get);if(typeof n.value=="function")return zt(n.value)}e=fO(e)}function r(){return null}return r}const ih=Wt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),vc=Wt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),bc=Wt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),bO=Wt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),wc=Wt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),wO=Wt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ah=Wt(["#text"]),ch=Wt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),_c=Wt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),lh=Wt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ri=Wt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_O=sr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),SO=sr(/<%[\w\W]*|[\w\W]*%>/gm),kO=sr(/\$\{[\w\W]*/gm),xO=sr(/^data-[\-\w.\u00B7-\uFFFF]+$/),EO=sr(/^aria-[\-\w]+$/),uh=sr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),OO=sr(/^(?:\w+script|data):/i),CO=sr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fh=sr(/^html$/i),TO=sr(/^[a-z][.\w]*(-[.\w]+)+$/i);var dh=Object.freeze({__proto__:null,ARIA_ATTR:EO,ATTR_WHITESPACE:CO,CUSTOM_ELEMENT:TO,DATA_ATTR:xO,DOCTYPE_NAME:fh,ERB_EXPR:SO,IS_ALLOWED_URI:uh,IS_SCRIPT_OR_DATA:OO,MUSTACHE_EXPR:_O,TMPLIT_EXPR:kO});const qo={element:1,text:3,progressingInstruction:7,comment:8,document:9},DO=function(){return typeof window>"u"?null:window},AO=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(n=r.getAttribute(o));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},hh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ph(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:DO();const t=ye=>ph(ye);if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==qo.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const n=r,o=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:i,Node:a,Element:c,NodeFilter:u,NamedNodeMap:l=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:h}=e,m=c.prototype,p=Go(m,"cloneNode"),g=Go(m,"remove"),y=Go(m,"nextSibling"),O=Go(m,"childNodes"),x=Go(m,"parentNode");if(typeof i=="function"){const ye=r.createElement("template");ye.content&&ye.content.ownerDocument&&(r=ye.content.ownerDocument)}let w,_="";const{implementation:S,createNodeIterator:I,createDocumentFragment:v,getElementsByTagName:E}=r,{importNode:P}=n;let A=hh();t.isSupported=typeof nh=="function"&&typeof x=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:M,ERB_EXPR:F,TMPLIT_EXPR:N,DATA_ATTR:W,ARIA_ATTR:C,IS_SCRIPT_OR_DATA:k,ATTR_WHITESPACE:Y,CUSTOM_ELEMENT:$}=dh;let{IS_ALLOWED_URI:D}=dh,V=null;const Z=Pe({},[...ih,...vc,...bc,...wc,...ah]);let G=null;const B=Pe({},[...ch,..._c,...lh,...ri]);let L=Object.seal(hc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),J=null,q=null;const oe=Object.seal(hc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Q=!0,ne=!0,le=!1,K=!0,Se=!1,Ie=!0,ke=!1,Ge=!1,Re=!1,We=!1,rt=!1,nt=!1,R=!0,j=!1;const H="user-content-";let ee=!0,te=!1,re={},ue=null;const be=Pe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ee=null;const Le=Pe({},["audio","video","img","source","image","track"]);let ot=null;const Qe=Pe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xt="http://www.w3.org/1998/Math/MathML",gt="http://www.w3.org/2000/svg",dt="http://www.w3.org/1999/xhtml";let jt=dt,_r=!1,Sr=null;const _e=Pe({},[xt,gt,dt],gc);let De=Pe({},["mi","mo","mn","ms","mtext"]),ve=Pe({},["annotation-xml"]);const Oe=Pe({},["title","style","font","a","script"]);let Je=null;const xe=["application/xhtml+xml","text/html"],en="text/html";let ct=null,Pt=null;const Qt=r.createElement("form"),Eo=function(z){return z instanceof RegExp||z instanceof Function},Fu=function(){let z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Pt&&Pt===z)){if((!z||typeof z!="object")&&(z={}),z=Cr(z),Je=xe.indexOf(z.PARSER_MEDIA_TYPE)===-1?en:z.PARSER_MEDIA_TYPE,ct=Je==="application/xhtml+xml"?gc:ti,V=hr(z,"ALLOWED_TAGS")?Pe({},z.ALLOWED_TAGS,ct):Z,G=hr(z,"ALLOWED_ATTR")?Pe({},z.ALLOWED_ATTR,ct):B,Sr=hr(z,"ALLOWED_NAMESPACES")?Pe({},z.ALLOWED_NAMESPACES,gc):_e,ot=hr(z,"ADD_URI_SAFE_ATTR")?Pe(Cr(Qe),z.ADD_URI_SAFE_ATTR,ct):Qe,Ee=hr(z,"ADD_DATA_URI_TAGS")?Pe(Cr(Le),z.ADD_DATA_URI_TAGS,ct):Le,ue=hr(z,"FORBID_CONTENTS")?Pe({},z.FORBID_CONTENTS,ct):be,J=hr(z,"FORBID_TAGS")?Pe({},z.FORBID_TAGS,ct):Cr({}),q=hr(z,"FORBID_ATTR")?Pe({},z.FORBID_ATTR,ct):Cr({}),re=hr(z,"USE_PROFILES")?z.USE_PROFILES:!1,Q=z.ALLOW_ARIA_ATTR!==!1,ne=z.ALLOW_DATA_ATTR!==!1,le=z.ALLOW_UNKNOWN_PROTOCOLS||!1,K=z.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Se=z.SAFE_FOR_TEMPLATES||!1,Ie=z.SAFE_FOR_XML!==!1,ke=z.WHOLE_DOCUMENT||!1,We=z.RETURN_DOM||!1,rt=z.RETURN_DOM_FRAGMENT||!1,nt=z.RETURN_TRUSTED_TYPE||!1,Re=z.FORCE_BODY||!1,R=z.SANITIZE_DOM!==!1,j=z.SANITIZE_NAMED_PROPS||!1,ee=z.KEEP_CONTENT!==!1,te=z.IN_PLACE||!1,D=z.ALLOWED_URI_REGEXP||uh,jt=z.NAMESPACE||dt,De=z.MATHML_TEXT_INTEGRATION_POINTS||De,ve=z.HTML_INTEGRATION_POINTS||ve,L=z.CUSTOM_ELEMENT_HANDLING||{},z.CUSTOM_ELEMENT_HANDLING&&Eo(z.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(L.tagNameCheck=z.CUSTOM_ELEMENT_HANDLING.tagNameCheck),z.CUSTOM_ELEMENT_HANDLING&&Eo(z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(L.attributeNameCheck=z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),z.CUSTOM_ELEMENT_HANDLING&&typeof z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(L.allowCustomizedBuiltInElements=z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Se&&(ne=!1),rt&&(We=!0),re&&(V=Pe({},ah),G=[],re.html===!0&&(Pe(V,ih),Pe(G,ch)),re.svg===!0&&(Pe(V,vc),Pe(G,_c),Pe(G,ri)),re.svgFilters===!0&&(Pe(V,bc),Pe(G,_c),Pe(G,ri)),re.mathMl===!0&&(Pe(V,wc),Pe(G,lh),Pe(G,ri))),z.ADD_TAGS&&(typeof z.ADD_TAGS=="function"?oe.tagCheck=z.ADD_TAGS:(V===Z&&(V=Cr(V)),Pe(V,z.ADD_TAGS,ct))),z.ADD_ATTR&&(typeof z.ADD_ATTR=="function"?oe.attributeCheck=z.ADD_ATTR:(G===B&&(G=Cr(G)),Pe(G,z.ADD_ATTR,ct))),z.ADD_URI_SAFE_ATTR&&Pe(ot,z.ADD_URI_SAFE_ATTR,ct),z.FORBID_CONTENTS&&(ue===be&&(ue=Cr(ue)),Pe(ue,z.FORBID_CONTENTS,ct)),z.ADD_FORBID_CONTENTS&&(ue===be&&(ue=Cr(ue)),Pe(ue,z.ADD_FORBID_CONTENTS,ct)),ee&&(V["#text"]=!0),ke&&Pe(V,["html","head","body"]),V.table&&(Pe(V,["tbody"]),delete J.tbody),z.TRUSTED_TYPES_POLICY){if(typeof z.TRUSTED_TYPES_POLICY.createHTML!="function")throw Zo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof z.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Zo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=z.TRUSTED_TYPES_POLICY,_=w.createHTML("")}else w===void 0&&(w=AO(h,o)),w!==null&&typeof _=="string"&&(_=w.createHTML(""));Wt&&Wt(z),Pt=z}},Bv=Pe({},[...vc,...bc,...bO]),Hv=Pe({},[...wc,...wO]),xR=function(z){let ie=x(z);(!ie||!ie.tagName)&&(ie={namespaceURI:jt,tagName:"template"});const pe=ti(z.tagName),lt=ti(ie.tagName);return Sr[z.namespaceURI]?z.namespaceURI===gt?ie.namespaceURI===dt?pe==="svg":ie.namespaceURI===xt?pe==="svg"&&(lt==="annotation-xml"||De[lt]):!!Bv[pe]:z.namespaceURI===xt?ie.namespaceURI===dt?pe==="math":ie.namespaceURI===gt?pe==="math"&&ve[lt]:!!Hv[pe]:z.namespaceURI===dt?ie.namespaceURI===gt&&!ve[lt]||ie.namespaceURI===xt&&!De[lt]?!1:!Hv[pe]&&(Oe[pe]||!Bv[pe]):!!(Je==="application/xhtml+xml"&&Sr[z.namespaceURI]):!1},Wr=function(z){Bo(t.removed,{element:z});try{x(z).removeChild(z)}catch{g(z)}},Bn=function(z,ie){try{Bo(t.removed,{attribute:ie.getAttributeNode(z),from:ie})}catch{Bo(t.removed,{attribute:null,from:ie})}if(ie.removeAttribute(z),z==="is")if(We||rt)try{Wr(ie)}catch{}else try{ie.setAttribute(z,"")}catch{}},Zv=function(z){let ie=null,pe=null;if(Re)z="<remove></remove>"+z;else{const _t=yc(z,/^[\r\n\t ]+/);pe=_t&&_t[0]}Je==="application/xhtml+xml"&&jt===dt&&(z='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+z+"</body></html>");const lt=w?w.createHTML(z):z;if(jt===dt)try{ie=new d().parseFromString(lt,Je)}catch{}if(!ie||!ie.documentElement){ie=S.createDocument(jt,"template",null);try{ie.documentElement.innerHTML=_r?_:lt}catch{}}const Nt=ie.body||ie.documentElement;return z&&pe&&Nt.insertBefore(r.createTextNode(pe),Nt.childNodes[0]||null),jt===dt?E.call(ie,ke?"html":"body")[0]:ke?ie.documentElement:Nt},Gv=function(z){return I.call(z.ownerDocument||z,z,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Ru=function(z){return z instanceof f&&(typeof z.nodeName!="string"||typeof z.textContent!="string"||typeof z.removeChild!="function"||!(z.attributes instanceof l)||typeof z.removeAttribute!="function"||typeof z.setAttribute!="function"||typeof z.namespaceURI!="string"||typeof z.insertBefore!="function"||typeof z.hasChildNodes!="function")},qv=function(z){return typeof a=="function"&&z instanceof a};function tn(ye,z,ie){ei(ye,pe=>{pe.call(t,z,ie,Pt)})}const Kv=function(z){let ie=null;if(tn(A.beforeSanitizeElements,z,null),Ru(z))return Wr(z),!0;const pe=ct(z.nodeName);if(tn(A.uponSanitizeElement,z,{tagName:pe,allowedTags:V}),Ie&&z.hasChildNodes()&&!qv(z.firstElementChild)&&Lt(/<[/\w!]/g,z.innerHTML)&&Lt(/<[/\w!]/g,z.textContent)||z.nodeType===qo.progressingInstruction||Ie&&z.nodeType===qo.comment&&Lt(/<[/\w]/g,z.data))return Wr(z),!0;if(!(oe.tagCheck instanceof Function&&oe.tagCheck(pe))&&(!V[pe]||J[pe])){if(!J[pe]&&Xv(pe)&&(L.tagNameCheck instanceof RegExp&&Lt(L.tagNameCheck,pe)||L.tagNameCheck instanceof Function&&L.tagNameCheck(pe)))return!1;if(ee&&!ue[pe]){const lt=x(z)||z.parentNode,Nt=O(z)||z.childNodes;if(Nt&&lt){const _t=Nt.length;for(let Vt=_t-1;Vt>=0;--Vt){const rn=p(Nt[Vt],!0);rn.__removalCount=(z.__removalCount||0)+1,lt.insertBefore(rn,y(z))}}}return Wr(z),!0}return z instanceof c&&!xR(z)||(pe==="noscript"||pe==="noembed"||pe==="noframes")&&Lt(/<\/no(script|embed|frames)/i,z.innerHTML)?(Wr(z),!0):(Se&&z.nodeType===qo.text&&(ie=z.textContent,ei([M,F,N],lt=>{ie=Ho(ie,lt," ")}),z.textContent!==ie&&(Bo(t.removed,{element:z.cloneNode()}),z.textContent=ie)),tn(A.afterSanitizeElements,z,null),!1)},Jv=function(z,ie,pe){if(R&&(ie==="id"||ie==="name")&&(pe in r||pe in Qt))return!1;if(!(ne&&!q[ie]&&Lt(W,ie))){if(!(Q&&Lt(C,ie))){if(!(oe.attributeCheck instanceof Function&&oe.attributeCheck(ie,z))){if(!G[ie]||q[ie]){if(!(Xv(z)&&(L.tagNameCheck instanceof RegExp&&Lt(L.tagNameCheck,z)||L.tagNameCheck instanceof Function&&L.tagNameCheck(z))&&(L.attributeNameCheck instanceof RegExp&&Lt(L.attributeNameCheck,ie)||L.attributeNameCheck instanceof Function&&L.attributeNameCheck(ie,z))||ie==="is"&&L.allowCustomizedBuiltInElements&&(L.tagNameCheck instanceof RegExp&&Lt(L.tagNameCheck,pe)||L.tagNameCheck instanceof Function&&L.tagNameCheck(pe))))return!1}else if(!ot[ie]){if(!Lt(D,Ho(pe,Y,""))){if(!((ie==="src"||ie==="xlink:href"||ie==="href")&&z!=="script"&&mO(pe,"data:")===0&&Ee[z])){if(!(le&&!Lt(k,Ho(pe,Y,"")))){if(pe)return!1}}}}}}}return!0},Xv=function(z){return z!=="annotation-xml"&&yc(z,$)},Qv=function(z){tn(A.beforeSanitizeAttributes,z,null);const{attributes:ie}=z;if(!ie||Ru(z))return;const pe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let lt=ie.length;for(;lt--;){const Nt=ie[lt],{name:_t,namespaceURI:Vt,value:rn}=Nt,Oo=ct(_t),Wu=rn;let Ct=_t==="value"?Wu:gO(Wu);if(pe.attrName=Oo,pe.attrValue=Ct,pe.keepAttr=!0,pe.forceKeepAttr=void 0,tn(A.uponSanitizeAttribute,z,pe),Ct=pe.attrValue,j&&(Oo==="id"||Oo==="name")&&(Bn(_t,z),Ct=H+Ct),Ie&&Lt(/((--!?|])>)|<\/(style|title|textarea)/i,Ct)){Bn(_t,z);continue}if(Oo==="attributename"&&yc(Ct,"href")){Bn(_t,z);continue}if(pe.forceKeepAttr)continue;if(!pe.keepAttr){Bn(_t,z);continue}if(!K&&Lt(/\/>/i,Ct)){Bn(_t,z);continue}Se&&ei([M,F,N],tb=>{Ct=Ho(Ct,tb," ")});const eb=ct(z.nodeName);if(!Jv(eb,Oo,Ct)){Bn(_t,z);continue}if(w&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Vt)switch(h.getAttributeType(eb,Oo)){case"TrustedHTML":{Ct=w.createHTML(Ct);break}case"TrustedScriptURL":{Ct=w.createScriptURL(Ct);break}}if(Ct!==Wu)try{Vt?z.setAttributeNS(Vt,_t,Ct):z.setAttribute(_t,Ct),Ru(z)?Wr(z):sh(t.removed)}catch{Bn(_t,z)}}tn(A.afterSanitizeAttributes,z,null)},ER=function ye(z){let ie=null;const pe=Gv(z);for(tn(A.beforeSanitizeShadowDOM,z,null);ie=pe.nextNode();)tn(A.uponSanitizeShadowNode,ie,null),Kv(ie),Qv(ie),ie.content instanceof s&&ye(ie.content);tn(A.afterSanitizeShadowDOM,z,null)};return t.sanitize=function(ye){let z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=null,pe=null,lt=null,Nt=null;if(_r=!ye,_r&&(ye="<!-->"),typeof ye!="string"&&!qv(ye))if(typeof ye.toString=="function"){if(ye=ye.toString(),typeof ye!="string")throw Zo("dirty is not a string, aborting")}else throw Zo("toString is not a function");if(!t.isSupported)return ye;if(Ge||Fu(z),t.removed=[],typeof ye=="string"&&(te=!1),te){if(ye.nodeName){const rn=ct(ye.nodeName);if(!V[rn]||J[rn])throw Zo("root node is forbidden and cannot be sanitized in-place")}}else if(ye instanceof a)ie=Zv("<!---->"),pe=ie.ownerDocument.importNode(ye,!0),pe.nodeType===qo.element&&pe.nodeName==="BODY"||pe.nodeName==="HTML"?ie=pe:ie.appendChild(pe);else{if(!We&&!Se&&!ke&&ye.indexOf("<")===-1)return w&&nt?w.createHTML(ye):ye;if(ie=Zv(ye),!ie)return We?null:nt?_:""}ie&&Re&&Wr(ie.firstChild);const _t=Gv(te?ye:ie);for(;lt=_t.nextNode();)Kv(lt),Qv(lt),lt.content instanceof s&&ER(lt.content);if(te)return ye;if(We){if(rt)for(Nt=v.call(ie.ownerDocument);ie.firstChild;)Nt.appendChild(ie.firstChild);else Nt=ie;return(G.shadowroot||G.shadowrootmode)&&(Nt=P.call(n,Nt,!0)),Nt}let Vt=ke?ie.outerHTML:ie.innerHTML;return ke&&V["!doctype"]&&ie.ownerDocument&&ie.ownerDocument.doctype&&ie.ownerDocument.doctype.name&&Lt(fh,ie.ownerDocument.doctype.name)&&(Vt="<!DOCTYPE "+ie.ownerDocument.doctype.name+`>
43
- `+Vt),Se&&ei([M,F,N],rn=>{Vt=Ho(Vt,rn," ")}),w&&nt?w.createHTML(Vt):Vt},t.setConfig=function(){let ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fu(ye),Ge=!0},t.clearConfig=function(){Pt=null,Ge=!1},t.isValidAttribute=function(ye,z,ie){Pt||Fu({});const pe=ct(ye),lt=ct(z);return Jv(pe,lt,ie)},t.addHook=function(ye,z){typeof z=="function"&&Bo(A[ye],z)},t.removeHook=function(ye,z){if(z!==void 0){const ie=hO(A[ye],z);return ie===-1?void 0:pO(A[ye],ie,1)[0]}return sh(A[ye])},t.removeHooks=function(ye){A[ye]=[]},t.removeAllHooks=function(){A=hh()},t}var MO=ph();function mh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nn(...e){return t=>{let r=!1;const n=e.map(o=>{const s=mh(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():mh(e[o],null)}}}}function He(...e){return b.useCallback(Nn(...e),e)}var PO=Symbol.for("react.lazy"),ni=b[" use ".trim().toString()];function NO(e){return typeof e=="object"&&e!==null&&"then"in e}function gh(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===PO&&"_payload"in e&&NO(e._payload)}function yh(e){const t=IO(e),r=b.forwardRef((n,o)=>{let{children:s,...i}=n;gh(s)&&typeof ni=="function"&&(s=ni(s._payload));const a=b.Children.toArray(s),c=a.find(RO);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var vh=yh("Slot");function IO(e){const t=b.forwardRef((r,n)=>{let{children:o,...s}=r;if(gh(o)&&typeof ni=="function"&&(o=ni(o._payload)),b.isValidElement(o)){const i=LO(o),a=WO(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Nn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var FO=Symbol("radix.slottable");function RO(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===FO}function WO(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function LO(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function bh(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=bh(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function oi(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=bh(e))&&(n&&(n+=" "),n+=t);return n}const zO=(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},$O=(e,t)=>({classGroupId:e,validator:t}),wh=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),si="-",_h=[],UO="arbitrary..",YO=e=>{const t=VO(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return jO(i);const a=i.split(si),c=a[0]===""&&a.length>1?1:0;return Sh(a,c,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=n[i],u=r[i];return c?u?zO(u,c):c:u||_h}return r[i]||_h}}},Sh=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const u=Sh(e,t+1,s);if(u)return u}const i=r.validators;if(i===null)return;const a=t===0?e.join(si):e.slice(t).join(si),c=i.length;for(let u=0;u<c;u++){const l=i[u];if(l.validator(a))return l.classGroupId}},jO=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?UO+n:void 0})(),VO=e=>{const{theme:t,classGroups:r}=e;return BO(r,t)},BO=(e,t)=>{const r=wh();for(const n in e){const o=e[n];Sc(o,r,n,t)}return r},Sc=(e,t,r,n)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];HO(i,t,r,n)}},HO=(e,t,r,n)=>{if(typeof e=="string"){ZO(e,t,r);return}if(typeof e=="function"){GO(e,t,r,n);return}qO(e,t,r,n)},ZO=(e,t,r)=>{const n=e===""?t:kh(t,e);n.classGroupId=r},GO=(e,t,r,n)=>{if(KO(e)){Sc(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push($O(r,e))},qO=(e,t,r,n)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[a,c]=o[i];Sc(c,kh(t,a),r,n)}},kh=(e,t)=>{let r=e;const n=t.split(si),o=n.length;for(let s=0;s<o;s++){const i=n[s];let a=r.nextPart.get(i);a||(a=wh(),r.nextPart.set(i,a)),r=a}return r},KO=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,JO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(s,i)=>{r[s]=i,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let i=r[s];if(i!==void 0)return i;if((i=n[s])!==void 0)return o(s,i),i},set(s,i){s in r?r[s]=i:o(s,i)}}},kc="!",xh=":",XO=[],Eh=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),QO=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let i=0,a=0,c=0,u;const l=o.length;for(let p=0;p<l;p++){const g=o[p];if(i===0&&a===0){if(g===xh){s.push(o.slice(c,p)),c=p+1;continue}if(g==="/"){u=p;continue}}g==="["?i++:g==="]"?i--:g==="("?a++:g===")"&&a--}const f=s.length===0?o:o.slice(c);let d=f,h=!1;f.endsWith(kc)?(d=f.slice(0,-1),h=!0):f.startsWith(kc)&&(d=f.slice(1),h=!0);const m=u&&u>c?u-c:void 0;return Eh(s,h,d,m)};if(t){const o=t+xh,s=n;n=i=>i.startsWith(o)?s(i.slice(o.length)):Eh(XO,!1,i,void 0,!0)}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},eC=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let s=0;s<r.length;s++){const i=r[s],a=i[0]==="[",c=t.has(i);a||c?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(i)):o.push(i)}return o.length>0&&(o.sort(),n.push(...o)),n}},tC=e=>({cache:JO(e.cacheSize),parseClassName:QO(e),sortModifiers:eC(e),...YO(e)}),rC=/\s+/,nC=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(rC);let c="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}=r(l);if(f){c=l+(c.length>0?" "+c:c);continue}let g=!!p,y=n(g?m.substring(0,p):m);if(!y){if(!g){c=l+(c.length>0?" "+c:c);continue}if(y=n(m),!y){c=l+(c.length>0?" "+c:c);continue}g=!1}const O=d.length===0?"":d.length===1?d[0]:s(d).join(":"),x=h?O+kc:O,w=x+y;if(i.indexOf(w)>-1)continue;i.push(w);const _=o(y,g);for(let S=0;S<_.length;++S){const I=_[S];i.push(x+I)}c=l+(c.length>0?" "+c:c)}return c},oC=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Oh(r))&&(o&&(o+=" "),o+=n);return o},Oh=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Oh(e[n]))&&(r&&(r+=" "),r+=t);return r},sC=(e,...t)=>{let r,n,o,s;const i=c=>{const u=t.reduce((l,f)=>f(l),e());return r=tC(u),n=r.cache.get,o=r.cache.set,s=a,a(c)},a=c=>{const u=n(c);if(u)return u;const l=nC(c,r);return o(c,l),l};return s=i,(...c)=>s(oC(...c))},iC=[],kt=e=>{const t=r=>r[e]||iC;return t.isThemeGetter=!0,t},Ch=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Th=/^\((?:(\w[\w-]*):)?(.+)\)$/i,aC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,cC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lC=/\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$/,uC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ln=e=>aC.test(e),Me=e=>!!e&&!Number.isNaN(Number(e)),un=e=>!!e&&Number.isInteger(Number(e)),xc=e=>e.endsWith("%")&&Me(e.slice(0,-1)),Gr=e=>cC.test(e),Dh=()=>!0,hC=e=>lC.test(e)&&!uC.test(e),Ec=()=>!1,pC=e=>fC.test(e),mC=e=>dC.test(e),gC=e=>!de(e)&&!he(e),yC=e=>fn(e,Fh,Ec),de=e=>Ch.test(e),In=e=>fn(e,Rh,hC),Ah=e=>fn(e,EC,Me),vC=e=>fn(e,Lh,Dh),bC=e=>fn(e,Wh,Ec),Mh=e=>fn(e,Nh,Ec),wC=e=>fn(e,Ih,mC),ii=e=>fn(e,zh,pC),he=e=>Th.test(e),Ko=e=>Fn(e,Rh),_C=e=>Fn(e,Wh),Ph=e=>Fn(e,Nh),SC=e=>Fn(e,Fh),kC=e=>Fn(e,Ih),ai=e=>Fn(e,zh,!0),xC=e=>Fn(e,Lh,!0),fn=(e,t,r)=>{const n=Ch.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Fn=(e,t,r=!1)=>{const n=Th.exec(e);return n?n[1]?t(n[1]):r:!1},Nh=e=>e==="position"||e==="percentage",Ih=e=>e==="image"||e==="url",Fh=e=>e==="length"||e==="size"||e==="bg-size",Rh=e=>e==="length",EC=e=>e==="number",Wh=e=>e==="family-name",Lh=e=>e==="number"||e==="weight",zh=e=>e==="shadow",Oc=sC(()=>{const e=kt("color"),t=kt("font"),r=kt("text"),n=kt("font-weight"),o=kt("tracking"),s=kt("leading"),i=kt("breakpoint"),a=kt("container"),c=kt("spacing"),u=kt("radius"),l=kt("shadow"),f=kt("inset-shadow"),d=kt("text-shadow"),h=kt("drop-shadow"),m=kt("blur"),p=kt("perspective"),g=kt("aspect"),y=kt("ease"),O=kt("animate"),x=()=>["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"],_=()=>[...w(),he,de],S=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],v=()=>[he,de,c],E=()=>[ln,"full","auto",...v()],P=()=>[un,"none","subgrid",he,de],A=()=>["auto",{span:["full",un,he,de]},un,he,de],M=()=>[un,"auto",he,de],F=()=>["auto","min","max","fr",he,de],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],C=()=>["auto",...v()],k=()=>[ln,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...v()],Y=()=>[ln,"screen","full","dvw","lvw","svw","min","max","fit",...v()],$=()=>[ln,"screen","full","lh","dvh","lvh","svh","min","max","fit",...v()],D=()=>[e,he,de],V=()=>[...w(),Ph,Mh,{position:[he,de]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",SC,yC,{size:[he,de]}],B=()=>[xc,Ko,In],L=()=>["","none","full",u,he,de],J=()=>["",Me,Ko,In],q=()=>["solid","dashed","dotted","double"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[Me,xc,Ph,Mh],ne=()=>["","none",m,he,de],le=()=>["none",Me,he,de],K=()=>["none",Me,he,de],Se=()=>[Me,he,de],Ie=()=>[ln,"full",...v()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gr],breakpoint:[Gr],color:[Dh],container:[Gr],"drop-shadow":[Gr],ease:["in","out","in-out"],font:[gC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gr],shadow:[Gr],spacing:["px",Me],text:[Gr],"text-shadow":[Gr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ln,de,he,g]}],container:["container"],columns:[{columns:[Me,de,he,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{"inset-s":E(),start:E()}],end:[{"inset-e":E(),end:E()}],"inset-bs":[{"inset-bs":E()}],"inset-be":[{"inset-be":E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[un,"auto",he,de]}],basis:[{basis:[ln,"full","auto",a,...v()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Me,ln,"auto","initial","none",de]}],grow:[{grow:["",Me,he,de]}],shrink:[{shrink:["",Me,he,de]}],order:[{order:[un,"first","last","none",he,de]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:v()}],"gap-x":[{"gap-x":v()}],"gap-y":[{"gap-y":v()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:v()}],px:[{px:v()}],py:[{py:v()}],ps:[{ps:v()}],pe:[{pe:v()}],pbs:[{pbs:v()}],pbe:[{pbe:v()}],pt:[{pt:v()}],pr:[{pr:v()}],pb:[{pb:v()}],pl:[{pl:v()}],m:[{m:C()}],mx:[{mx:C()}],my:[{my:C()}],ms:[{ms:C()}],me:[{me:C()}],mbs:[{mbs:C()}],mbe:[{mbe:C()}],mt:[{mt:C()}],mr:[{mr:C()}],mb:[{mb:C()}],ml:[{ml:C()}],"space-x":[{"space-x":v()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":v()}],"space-y-reverse":["space-y-reverse"],size:[{size:k()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...$()]}],"min-block-size":[{"min-block":["auto",...$()]}],"max-block-size":[{"max-block":["none",...$()]}],w:[{w:[a,"screen",...k()]}],"min-w":[{"min-w":[a,"screen","none",...k()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...k()]}],h:[{h:["screen","lh",...k()]}],"min-h":[{"min-h":["screen","lh","none",...k()]}],"max-h":[{"max-h":["screen","lh",...k()]}],"font-size":[{text:["base",r,Ko,In]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,xC,vC]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xc,de]}],"font-family":[{font:[_C,bC,t]}],"font-features":[{"font-features":[de]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,he,de]}],"line-clamp":[{"line-clamp":[Me,"none",he,Ah]}],leading:[{leading:[s,...v()]}],"list-image":[{"list-image":["none",he,de]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,de]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:[Me,"from-font","auto",he,In]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Me,"auto",he,de]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,de]}],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",he,de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},un,he,de],radial:["",he,de],conic:[un,he,de]},kC,wC]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...q(),"hidden","none"]}],"divide-style":[{divide:[...q(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Me,he,de]}],"outline-w":[{outline:["",Me,Ko,In]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",l,ai,ii]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",f,ai,ii]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Me,In]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",d,ai,ii]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[Me,he,de]}],"mix-blend":[{"mix-blend":[...oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":oe()}],"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":[Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[he,de]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,de]}],filter:[{filter:["","none",he,de]}],blur:[{blur:ne()}],brightness:[{brightness:[Me,he,de]}],contrast:[{contrast:[Me,he,de]}],"drop-shadow":[{"drop-shadow":["","none",h,ai,ii]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",Me,he,de]}],"hue-rotate":[{"hue-rotate":[Me,he,de]}],invert:[{invert:["",Me,he,de]}],saturate:[{saturate:[Me,he,de]}],sepia:[{sepia:["",Me,he,de]}],"backdrop-filter":[{"backdrop-filter":["","none",he,de]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[Me,he,de]}],"backdrop-contrast":[{"backdrop-contrast":[Me,he,de]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Me,he,de]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Me,he,de]}],"backdrop-invert":[{"backdrop-invert":["",Me,he,de]}],"backdrop-opacity":[{"backdrop-opacity":[Me,he,de]}],"backdrop-saturate":[{"backdrop-saturate":[Me,he,de]}],"backdrop-sepia":[{"backdrop-sepia":["",Me,he,de]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":v()}],"border-spacing-x":[{"border-spacing-x":v()}],"border-spacing-y":[{"border-spacing-y":v()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,de]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Me,"initial",he,de]}],ease:[{ease:["linear","initial",y,he,de]}],delay:[{delay:[Me,he,de]}],animate:[{animate:["none",O,he,de]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,he,de]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:K()}],"scale-x":[{"scale-x":K()}],"scale-y":[{"scale-y":K()}],"scale-z":[{"scale-z":K()}],"scale-3d":["scale-3d"],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[he,de,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he,de]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mbs":[{"scroll-mbs":v()}],"scroll-mbe":[{"scroll-mbe":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pbs":[{"scroll-pbs":v()}],"scroll-pbe":[{"scroll-pbe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he,de]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Me,Ko,In,Ah]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Dt(...e){return Oc(oi(e))}var OC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],CC=OC.reduce((e,t)=>{const r=yh(`Primitive.${t}`),n=b.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(c,{...a,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),TC="Label",$h=b.forwardRef((e,t)=>T.jsx(CC.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));$h.displayName=TC;var DC=$h;function AC({className:e,...t}){return T.jsx(DC,{"data-slot":"label",className:Dt("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 MC=lb,Uh=b.createContext({}),PC=({...e})=>T.jsx(Uh.Provider,{value:{name:e.name},children:T.jsx(ab,{...e})}),ci=()=>{const e=b.useContext(Uh),t=b.useContext(Yh),{getFieldState:r}=cb(),n=Bu({name:e.name}),o=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...o}},Yh=b.createContext({});function Cc({className:e,...t}){const r=b.useId();return T.jsx(Yh.Provider,{value:{id:r},children:T.jsx("div",{"data-slot":"form-item",className:Dt("grid gap-2",e),...t})})}function Tc({className:e,...t}){const{error:r,formItemId:n}=ci();return T.jsx(AC,{"data-slot":"form-label","data-error":!!r,className:Dt("data-[error=true]:text-destructive",e),htmlFor:n,...t})}function li({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=ci();return T.jsx(vh,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function NC({className:e,...t}){const{formDescriptionId:r}=ci();return T.jsx("p",{"data-slot":"form-description",id:r,className:Dt("text-muted-foreground text-sm",e),...t})}function IC({className:e,...t}){const{error:r,formMessageId:n}=ci(),o=r?String(r?.message??""):t.children;return o?T.jsx("p",{"data-slot":"form-message",id:n,className:Dt("text-destructive text-sm",e),...t,children:o}):null}const jh=b.forwardRef(function({className:t,type:r,...n},o){return T.jsx("input",{ref:o,type:r,"data-slot":"input",className:Dt("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",t),...n})});function Vh(...e){return Oc(oi(e))}const FC=(e={})=>{const{field:t={},form:r={},question:n={},disabled:o=!1}=e;return T.jsx(jh,{...t,type:n.validation?.type==="email"?"email":n?.id?.includes("phone")?"tel":"text",placeholder:n.placeholder||"Your answer here...",className:Vh("bq-input",r.formState.errors[n.reference_id]?"border-destructive focus-visible:ring-destructive":""),disabled:o})};function RC({className:e,...t}){return T.jsx("textarea",{"data-slot":"textarea",className:Dt("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})}const WC=(e={})=>{const{field:t={},form:r={},question:n={},disabled:o=!1}=e;return T.jsx(RC,{...t,rows:4,placeholder:n.placeholder||"Your detailed answer...",className:Vh("bq-textarea",r.formState.errors[n.reference_id]?"border-destructive focus-visible:ring-destructive":""),disabled:o})};function Te(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function LC(e,t){const r=b.createContext(t),n=s=>{const{children:i,...a}=s,c=b.useMemo(()=>a,Object.values(a));return T.jsx(r.Provider,{value:c,children:i})};n.displayName=e+"Provider";function o(s){const i=b.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function qr(e,t=[]){let r=[];function n(s,i){const a=b.createContext(i),c=r.length;r=[...r,i];const u=f=>{const{scope:d,children:h,...m}=f,p=d?.[e]?.[c]||a,g=b.useMemo(()=>m,Object.values(m));return T.jsx(p.Provider,{value:g,children:h})};u.displayName=s+"Provider";function l(f,d){const h=d?.[e]?.[c]||a,m=b.useContext(h);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,l]}const o=()=>{const s=r.map(i=>b.createContext(i));return function(a){const c=a?.[e]||s;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[n,zC(o,...t)]}function zC(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=n.reduce((a,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...a,...f}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function $C(e){const t=UC(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),c=a.find(jC);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function UC(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=BC(o),a=VC(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Nn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var YC=Symbol("radix.slottable");function jC(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===YC}function VC(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function BC(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var HC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ne=HC.reduce((e,t)=>{const r=$C(`Primitive.${t}`),n=b.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(c,{...a,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ZC(e,t){e&&ms.flushSync(()=>e.dispatchEvent(t))}function Bh(e){const t=GC(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),c=a.find(KC);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function GC(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=XC(o),a=JC(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Nn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qC=Symbol("radix.slottable");function KC(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qC}function JC(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function XC(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Hh(e){const t=e+"CollectionProvider",[r,n]=qr(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:g,children:y}=p,O=U.useRef(null),x=U.useRef(new Map).current;return T.jsx(o,{scope:g,itemMap:x,collectionRef:O,children:y})};i.displayName=t;const a=e+"CollectionSlot",c=Bh(a),u=U.forwardRef((p,g)=>{const{scope:y,children:O}=p,x=s(a,y),w=He(g,x.collectionRef);return T.jsx(c,{ref:w,children:O})});u.displayName=a;const l=e+"CollectionItemSlot",f="data-radix-collection-item",d=Bh(l),h=U.forwardRef((p,g)=>{const{scope:y,children:O,...x}=p,w=U.useRef(null),_=He(g,w),S=s(l,y);return U.useEffect(()=>(S.itemMap.set(w,{ref:w,...x}),()=>{S.itemMap.delete(w)})),T.jsx(d,{[f]:"",ref:_,children:O})});h.displayName=l;function m(p){const g=s(e+"CollectionConsumer",p);return U.useCallback(()=>{const O=g.collectionRef.current;if(!O)return[];const x=Array.from(O.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((S,I)=>x.indexOf(S.ref.current)-x.indexOf(I.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},m,n]}var At=globalThis?.document?b.useLayoutEffect:()=>{},QC=b[" useId ".trim().toString()]||(()=>{}),eT=0;function dn(e){const[t,r]=b.useState(QC());return At(()=>{r(n=>n??String(eT++))},[e]),e||(t?`radix-${t}`:"")}function hn(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...r)=>t.current?.(...r),[])}var tT=b[" useInsertionEffect ".trim().toString()]||At;function Rn({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,i]=rT({defaultProp:t,onChange:r}),a=e!==void 0,c=a?e:o;{const l=b.useRef(e!==void 0);b.useEffect(()=>{const f=l.current;f!==a&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=a},[a,n])}const u=b.useCallback(l=>{if(a){const f=nT(l)?l(e):l;f!==e&&i.current?.(f)}else s(l)},[a,e,s,i]);return[c,u]}function rT({defaultProp:e,onChange:t}){const[r,n]=b.useState(e),o=b.useRef(r),s=b.useRef(t);return tT(()=>{s.current=t},[t]),b.useEffect(()=>{o.current!==r&&(s.current?.(r),o.current=r)},[r,o]),[r,n,s]}function nT(e){return typeof e=="function"}var oT=b.createContext(void 0);function Dc(e){const t=b.useContext(oT);return e||t||"ltr"}var Ac="rovingFocusGroup.onEntryFocus",sT={bubbles:!1,cancelable:!0},Jo="RovingFocusGroup",[Mc,Zh,iT]=Hh(Jo),[aT,Gh]=qr(Jo,[iT]),[cT,lT]=aT(Jo),qh=b.forwardRef((e,t)=>T.jsx(Mc.Provider,{scope:e.__scopeRovingFocusGroup,children:T.jsx(Mc.Slot,{scope:e.__scopeRovingFocusGroup,children:T.jsx(uT,{...e,ref:t})})}));qh.displayName=Jo;var uT=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:l=!1,...f}=e,d=b.useRef(null),h=He(t,d),m=Dc(s),[p,g]=Rn({prop:i,defaultProp:a??null,onChange:c,caller:Jo}),[y,O]=b.useState(!1),x=hn(u),w=Zh(r),_=b.useRef(!1),[S,I]=b.useState(0);return b.useEffect(()=>{const v=d.current;if(v)return v.addEventListener(Ac,x),()=>v.removeEventListener(Ac,x)},[x]),T.jsx(cT,{scope:r,orientation:n,dir:m,loop:o,currentTabStopId:p,onItemFocus:b.useCallback(v=>g(v),[g]),onItemShiftTab:b.useCallback(()=>O(!0),[]),onFocusableItemAdd:b.useCallback(()=>I(v=>v+1),[]),onFocusableItemRemove:b.useCallback(()=>I(v=>v-1),[]),children:T.jsx(Ne.div,{tabIndex:y||S===0?-1:0,"data-orientation":n,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:Te(e.onMouseDown,()=>{_.current=!0}),onFocus:Te(e.onFocus,v=>{const E=!_.current;if(v.target===v.currentTarget&&E&&!y){const P=new CustomEvent(Ac,sT);if(v.currentTarget.dispatchEvent(P),!P.defaultPrevented){const A=w().filter(C=>C.focusable),M=A.find(C=>C.active),F=A.find(C=>C.id===p),W=[M,F,...A].filter(Boolean).map(C=>C.ref.current);Xh(W,l)}}_.current=!1}),onBlur:Te(e.onBlur,()=>O(!1))})})}),Kh="RovingFocusGroupItem",Jh=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,children:i,...a}=e,c=dn(),u=s||c,l=lT(Kh,r),f=l.currentTabStopId===u,d=Zh(r),{onFocusableItemAdd:h,onFocusableItemRemove:m,currentTabStopId:p}=l;return b.useEffect(()=>{if(n)return h(),()=>m()},[n,h,m]),T.jsx(Mc.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:T.jsx(Ne.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:Te(e.onMouseDown,g=>{n?l.onItemFocus(u):g.preventDefault()}),onFocus:Te(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:Te(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){l.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=hT(g,l.orientation,l.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=d().filter(w=>w.focusable).map(w=>w.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const w=x.indexOf(g.currentTarget);x=l.loop?pT(x,w+1):x.slice(w+1)}setTimeout(()=>Xh(x))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:p!=null}):i})})});Jh.displayName=Kh;var fT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function dT(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function hT(e,t,r){const n=dT(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return fT[n]}function Xh(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function pT(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var mT=qh,gT=Jh;function Pc(e){const[t,r]=b.useState(void 0);return At(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}function Nc(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function yT(e,t){return b.useReducer((r,n)=>t[r][n]??r,e)}var pn=e=>{const{present:t,children:r}=e,n=vT(t),o=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),s=He(n.ref,bT(o));return typeof r=="function"||n.isPresent?b.cloneElement(o,{ref:s}):null};pn.displayName="Presence";function vT(e){const[t,r]=b.useState(),n=b.useRef(null),o=b.useRef(e),s=b.useRef("none"),i=e?"mounted":"unmounted",[a,c]=yT(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=ui(n.current);s.current=a==="mounted"?u:"none"},[a]),At(()=>{const u=n.current,l=o.current;if(l!==e){const d=s.current,h=ui(u);e?c("MOUNT"):h==="none"||u?.display==="none"?c("UNMOUNT"):c(l&&d!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),At(()=>{if(t){let u;const l=t.ownerDocument.defaultView??window,f=h=>{const p=ui(n.current).includes(CSS.escape(h.animationName));if(h.target===t&&p&&(c("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},d=h=>{h.target===t&&(s.current=ui(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{l.clearTimeout(u),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function ui(e){return e?.animationName||"none"}function bT(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ic="Radio",[wT,Qh]=qr(Ic),[_T,ST]=wT(Ic),ep=b.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:s,disabled:i,value:a="on",onCheck:c,form:u,...l}=e,[f,d]=b.useState(null),h=He(t,g=>d(g)),m=b.useRef(!1),p=f?u||!!f.closest("form"):!0;return T.jsxs(_T,{scope:r,checked:o,disabled:i,children:[T.jsx(Ne.button,{type:"button",role:"radio","aria-checked":o,"data-state":op(o),"data-disabled":i?"":void 0,disabled:i,value:a,...l,ref:h,onClick:Te(e.onClick,g=>{o||c?.(),p&&(m.current=g.isPropagationStopped(),m.current||g.stopPropagation())})}),p&&T.jsx(np,{control:f,bubbles:!m.current,name:n,value:a,checked:o,required:s,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});ep.displayName=Ic;var tp="RadioIndicator",rp=b.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,s=ST(tp,r);return T.jsx(pn,{present:n||s.checked,children:T.jsx(Ne.span,{"data-state":op(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});rp.displayName=tp;var kT="RadioBubbleInput",np=b.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},s)=>{const i=b.useRef(null),a=He(i,s),c=Nc(r),u=Pc(t);return b.useEffect(()=>{const l=i.current;if(!l)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(c!==r&&h){const m=new Event("click",{bubbles:n});h.call(l,r),l.dispatchEvent(m)}},[c,r,n]),T.jsx(Ne.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:a,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});np.displayName=kT;function op(e){return e?"checked":"unchecked"}var xT=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],fi="RadioGroup",[ET]=qr(fi,[Gh,Qh]),sp=Gh(),ip=Qh(),[OT,CT]=ET(fi),ap=b.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:s,required:i=!1,disabled:a=!1,orientation:c,dir:u,loop:l=!0,onValueChange:f,...d}=e,h=sp(r),m=Dc(u),[p,g]=Rn({prop:s,defaultProp:o??null,onChange:f,caller:fi});return T.jsx(OT,{scope:r,name:n,required:i,disabled:a,value:p,onValueChange:g,children:T.jsx(mT,{asChild:!0,...h,orientation:c,dir:m,loop:l,children:T.jsx(Ne.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":a?"":void 0,dir:m,...d,ref:t})})})});ap.displayName=fi;var cp="RadioGroupItem",lp=b.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,s=CT(cp,r),i=s.disabled||n,a=sp(r),c=ip(r),u=b.useRef(null),l=He(t,u),f=s.value===o.value,d=b.useRef(!1);return b.useEffect(()=>{const h=p=>{xT.includes(p.key)&&(d.current=!0)},m=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)}},[]),T.jsx(gT,{asChild:!0,...a,focusable:!i,active:f,children:T.jsx(ep,{disabled:i,required:s.required,checked:f,...c,...o,name:s.name,ref:l,onCheck:()=>s.onValueChange(o.value),onKeyDown:Te(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Te(o.onFocus,()=>{d.current&&u.current?.click()})})})});lp.displayName=cp;var TT="RadioGroupIndicator",up=b.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=ip(r);return T.jsx(rp,{...o,...n,ref:t})});up.displayName=TT;var DT=ap,AT=lp,MT=up;const fp=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();const PT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const NT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase());const dp=e=>{const t=NT(e);return t.charAt(0).toUpperCase()+t.slice(1)};var IT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const FT=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const RT=U.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:i,...a},c)=>U.createElement("svg",{ref:c,...IT,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:fp("lucide",o),...!s&&!FT(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,l])=>U.createElement(u,l)),...Array.isArray(s)?s:[s]]));const mn=(e,t)=>{const r=U.forwardRef(({className:n,...o},s)=>U.createElement(RT,{ref:s,iconNode:t,className:fp(`lucide-${PT(dp(e))}`,`lucide-${e}`,n),...o}));return r.displayName=dp(e),r};const WT=mn("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const hp=mn("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Fc=mn("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const LT=mn("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const zT=mn("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const $T=mn("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const UT=mn("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const YT=mn("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function jT({className:e,...t}){return T.jsx(DT,{"data-slot":"radio-group",className:Dt("grid gap-3",e),...t})}function VT({className:e,...t}){return T.jsx(AT,{"data-slot":"radio-group-item",className:Dt("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:T.jsx(MT,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:T.jsx(UT,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}const BT=(e={})=>{const{field:t={},form:r={},question:n={},disabled:o=!1}=e;return T.jsx(jT,{onValueChange:t.onChange,value:t.value,className:`bq-radio-group space-y-1 ${r.formState.errors[n.reference_id]?"rounded-md border border-destructive p-3":""}`,children:(n.options||[]).map(s=>{const i=`${n.reference_id}-${s.value}`;return T.jsxs(Cc,{className:"flex items-center space-x-2 hover:bg-muted/50 rounded-md transition-colors",children:[T.jsx(li,{children:T.jsx(VT,{className:"bq-radio-item w-4 h-4 border focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",value:s.value,id:i,disabled:o})}),T.jsx(Tc,{htmlFor:i,className:"font-normal cursor-pointer",children:s.label})]},s.value)})})};var di="Checkbox",[HT]=qr(di),[ZT,Rc]=HT(di);function GT(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:c,required:u,value:l="on",internal_do_not_use_render:f}=e,[d,h]=Rn({prop:r,defaultProp:o??!1,onChange:c,caller:di}),[m,p]=b.useState(null),[g,y]=b.useState(null),O=b.useRef(!1),x=m?!!i||!!m.closest("form"):!0,w={checked:d,disabled:s,setChecked:h,control:m,setControl:p,name:a,form:i,value:l,hasConsumerStoppedPropagationRef:O,required:u,defaultChecked:gn(o)?!1:o,isFormControl:x,bubbleInput:g,setBubbleInput:y};return T.jsx(ZT,{scope:t,...w,children:qT(f)?f(w):n})}var pp="CheckboxTrigger",mp=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:s,value:i,disabled:a,checked:c,required:u,setControl:l,setChecked:f,hasConsumerStoppedPropagationRef:d,isFormControl:h,bubbleInput:m}=Rc(pp,e),p=He(o,l),g=b.useRef(c);return b.useEffect(()=>{const y=s?.form;if(y){const O=()=>f(g.current);return y.addEventListener("reset",O),()=>y.removeEventListener("reset",O)}},[s,f]),T.jsx(Ne.button,{type:"button",role:"checkbox","aria-checked":gn(c)?"mixed":c,"aria-required":u,"data-state":_p(c),"data-disabled":a?"":void 0,disabled:a,value:i,...n,ref:p,onKeyDown:Te(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Te(r,y=>{f(O=>gn(O)?!0:!O),m&&h&&(d.current=y.isPropagationStopped(),d.current||y.stopPropagation())})})});mp.displayName=pp;var gp=b.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:s,required:i,disabled:a,value:c,onCheckedChange:u,form:l,...f}=e;return T.jsx(GT,{__scopeCheckbox:r,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:u,name:n,form:l,value:c,internal_do_not_use_render:({isFormControl:d})=>T.jsxs(T.Fragment,{children:[T.jsx(mp,{...f,ref:t,__scopeCheckbox:r}),d&&T.jsx(wp,{__scopeCheckbox:r})]})})});gp.displayName=di;var yp="CheckboxIndicator",vp=b.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,s=Rc(yp,r);return T.jsx(pn,{present:n||gn(s.checked)||s.checked===!0,children:T.jsx(Ne.span,{"data-state":_p(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});vp.displayName=yp;var bp="CheckboxBubbleInput",wp=b.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:c,name:u,value:l,form:f,bubbleInput:d,setBubbleInput:h}=Rc(bp,e),m=He(r,h),p=Nc(s),g=Pc(n);b.useEffect(()=>{const O=d;if(!O)return;const x=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(x,"checked").set,S=!o.current;if(p!==s&&_){const I=new Event("click",{bubbles:S});O.indeterminate=gn(s),_.call(O,gn(s)?!1:s),O.dispatchEvent(I)}},[d,p,s,o]);const y=b.useRef(gn(s)?!1:s);return T.jsx(Ne.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:a,disabled:c,name:u,value:l,form:f,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});wp.displayName=bp;function qT(e){return typeof e=="function"}function gn(e){return e==="indeterminate"}function _p(e){return gn(e)?"indeterminate":e?"checked":"unchecked"}function KT({className:e,...t}){return T.jsx(gp,{"data-slot":"checkbox",className:Dt("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:T.jsx(vp,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:T.jsx(hp,{className:"size-3.5"})})})}const JT=(e={})=>{const{field:t={},question:r={},disabled:n=!1}=e,{options:o=[]}=r;return o.map((s,i)=>T.jsxs(Cc,{className:"flex items-center space-x-1 hover:bg-muted/50 rounded-md transition-colors",children:[T.jsx(li,{children:T.jsx(KT,{className:"bq-checkbox w-4 h-4 border border-input focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",checked:t.value?.includes(s.value),onCheckedChange:a=>a?t.onChange([...t.value||[],s.value]):t.onChange((t.value||[]).filter(c=>c!==s.value)),id:`${r.reference_id}-${s.value}`,disabled:n})}),T.jsx(Tc,{htmlFor:`${r.reference_id}-${s.value}`,className:"flex-1 font-normal cursor-pointer text-sm leading-relaxed",children:s.label})]},i))};function Sp(e,[t,r]){return Math.min(r,Math.max(t,e))}function XT(e,t=globalThis?.document){const r=hn(e);b.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var QT="DismissableLayer",Wc="dismissableLayer.update",eD="dismissableLayer.pointerDownOutside",tD="dismissableLayer.focusOutside",kp,xp=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hi=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,u=b.useContext(xp),[l,f]=b.useState(null),d=l?.ownerDocument??globalThis?.document,[,h]=b.useState({}),m=He(t,I=>f(I)),p=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(g),O=l?p.indexOf(l):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,w=O>=y,_=oD(I=>{const v=I.target,E=[...u.branches].some(P=>P.contains(v));!w||E||(o?.(I),i?.(I),I.defaultPrevented||a?.())},d),S=sD(I=>{const v=I.target;[...u.branches].some(P=>P.contains(v))||(s?.(I),i?.(I),I.defaultPrevented||a?.())},d);return XT(I=>{O===u.layers.size-1&&(n?.(I),!I.defaultPrevented&&a&&(I.preventDefault(),a()))},d),b.useEffect(()=>{if(l)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(kp=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(l)),u.layers.add(l),Ep(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=kp)}},[l,d,r,u]),b.useEffect(()=>()=>{l&&(u.layers.delete(l),u.layersWithOutsidePointerEventsDisabled.delete(l),Ep())},[l,u]),b.useEffect(()=>{const I=()=>h({});return document.addEventListener(Wc,I),()=>document.removeEventListener(Wc,I)},[]),T.jsx(Ne.div,{...c,ref:m,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:Te(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Te(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Te(e.onPointerDownCapture,_.onPointerDownCapture)})});hi.displayName=QT;var rD="DismissableLayerBranch",nD=b.forwardRef((e,t)=>{const r=b.useContext(xp),n=b.useRef(null),o=He(t,n);return b.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),T.jsx(Ne.div,{...e,ref:o})});nD.displayName=rD;function oD(e,t=globalThis?.document){const r=hn(e),n=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let c=function(){Op(eD,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function sD(e,t=globalThis?.document){const r=hn(e),n=b.useRef(!1);return b.useEffect(()=>{const o=s=>{s.target&&!n.current&&Op(tD,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Ep(){const e=new CustomEvent(Wc);document.dispatchEvent(e)}function Op(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?ZC(o,s):o.dispatchEvent(s)}var Lc=0;function zc(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Cp()),document.body.insertAdjacentElement("beforeend",e[1]??Cp()),Lc++,()=>{Lc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Lc--}},[])}function Cp(){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 $c="focusScope.autoFocusOnMount",Uc="focusScope.autoFocusOnUnmount",Tp={bubbles:!1,cancelable:!0},iD="FocusScope",pi=b.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=b.useState(null),u=hn(o),l=hn(s),f=b.useRef(null),d=He(t,p=>c(p)),h=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(n){let p=function(x){if(h.paused||!a)return;const w=x.target;a.contains(w)?f.current=w:yn(f.current,{select:!0})},g=function(x){if(h.paused||!a)return;const w=x.relatedTarget;w!==null&&(a.contains(w)||yn(f.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const _ of x)_.removedNodes.length>0&&yn(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",g);const O=new MutationObserver(y);return a&&O.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",g),O.disconnect()}}},[n,a,h.paused]),b.useEffect(()=>{if(a){Mp.add(h);const p=document.activeElement;if(!a.contains(p)){const y=new CustomEvent($c,Tp);a.addEventListener($c,u),a.dispatchEvent(y),y.defaultPrevented||(aD(dD(Dp(a)),{select:!0}),document.activeElement===p&&yn(a))}return()=>{a.removeEventListener($c,u),setTimeout(()=>{const y=new CustomEvent(Uc,Tp);a.addEventListener(Uc,l),a.dispatchEvent(y),y.defaultPrevented||yn(p??document.body,{select:!0}),a.removeEventListener(Uc,l),Mp.remove(h)},0)}}},[a,u,l,h]);const m=b.useCallback(p=>{if(!r&&!n||h.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(g&&y){const O=p.currentTarget,[x,w]=cD(O);x&&w?!p.shiftKey&&y===w?(p.preventDefault(),r&&yn(x,{select:!0})):p.shiftKey&&y===x&&(p.preventDefault(),r&&yn(w,{select:!0})):y===O&&p.preventDefault()}},[r,n,h.paused]);return T.jsx(Ne.div,{tabIndex:-1,...i,ref:d,onKeyDown:m})});pi.displayName=iD;function aD(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(yn(n,{select:t}),document.activeElement!==r)return}function cD(e){const t=Dp(e),r=Ap(t,e),n=Ap(t.reverse(),e);return[r,n]}function Dp(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ap(e,t){for(const r of e)if(!lD(r,{upTo:t}))return r}function lD(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 uD(e){return e instanceof HTMLInputElement&&"select"in e}function yn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&uD(e)&&t&&e.select()}}var Mp=fD();function fD(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Pp(e,t),e.unshift(t)},remove(t){e=Pp(e,t),e[0]?.resume()}}}function Pp(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function dD(e){return e.filter(t=>t.tagName!=="A")}const hD=["top","right","bottom","left"],vn=Math.min,Gt=Math.max,mi=Math.round,gi=Math.floor,Tr=e=>({x:e,y:e}),pD={left:"right",right:"left",bottom:"top",top:"bottom"},mD={start:"end",end:"start"};function Yc(e,t,r){return Gt(e,vn(t,r))}function Kr(e,t){return typeof e=="function"?e(t):e}function Jr(e){return e.split("-")[0]}function ao(e){return e.split("-")[1]}function jc(e){return e==="x"?"y":"x"}function Vc(e){return e==="y"?"height":"width"}const gD=new Set(["top","bottom"]);function Dr(e){return gD.has(Jr(e))?"y":"x"}function Bc(e){return jc(Dr(e))}function yD(e,t,r){r===void 0&&(r=!1);const n=ao(e),o=Bc(e),s=Vc(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=yi(i)),[i,yi(i)]}function vD(e){const t=yi(e);return[Hc(e),t,Hc(t)]}function Hc(e){return e.replace(/start|end/g,t=>mD[t])}const Np=["left","right"],Ip=["right","left"],bD=["top","bottom"],wD=["bottom","top"];function _D(e,t,r){switch(e){case"top":case"bottom":return r?t?Ip:Np:t?Np:Ip;case"left":case"right":return t?bD:wD;default:return[]}}function SD(e,t,r,n){const o=ao(e);let s=_D(Jr(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Hc)))),s}function yi(e){return e.replace(/left|right|bottom|top/g,t=>pD[t])}function kD(e){return{top:0,right:0,bottom:0,left:0,...e}}function Fp(e){return typeof e!="number"?kD(e):{top:e,right:e,bottom:e,left:e}}function vi(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Rp(e,t,r){let{reference:n,floating:o}=e;const s=Dr(t),i=Bc(t),a=Vc(i),c=Jr(t),u=s==="y",l=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,d=n[a]/2-o[a]/2;let h;switch(c){case"top":h={x:l,y:n.y-o.height};break;case"bottom":h={x:l,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-o.width,y:f};break;default:h={x:n.x,y:n.y}}switch(ao(t)){case"start":h[i]-=d*(r&&u?-1:1);break;case"end":h[i]+=d*(r&&u?-1:1);break}return h}async function xD(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Kr(t,e),m=Fp(h),g=a[d?f==="floating"?"reference":"floating":f],y=vi(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(g)))==null||r?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:l,strategy:c})),O=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),w=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},_=vi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:O,offsetParent:x,strategy:c}):O);return{top:(y.top-_.top+m.top)/w.y,bottom:(_.bottom-y.bottom+m.bottom)/w.y,left:(y.left-_.left+m.left)/w.x,right:(_.right-y.right+m.right)/w.x}}const ED=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:i}=r,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=Rp(u,n,c),d=n,h={},m=0;for(let g=0;g<a.length;g++){var p;const{name:y,fn:O}=a[g],{x,y:w,data:_,reset:S}=await O({x:l,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:h,rects:u,platform:{...i,detectOverflow:(p=i.detectOverflow)!=null?p:xD},elements:{reference:e,floating:t}});l=x??l,f=w??f,h={...h,[y]:{...h[y],..._}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(u=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:l,y:f}=Rp(u,d,c)),g=-1)}return{x:l,y:f,placement:d,strategy:o,middlewareData:h}},OD=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:u,padding:l=0}=Kr(e,t)||{};if(u==null)return{};const f=Fp(l),d={x:r,y:n},h=Bc(o),m=Vc(h),p=await i.getDimensions(u),g=h==="y",y=g?"top":"left",O=g?"bottom":"right",x=g?"clientHeight":"clientWidth",w=s.reference[m]+s.reference[h]-d[h]-s.floating[m],_=d[h]-s.reference[h],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let I=S?S[x]:0;(!I||!await(i.isElement==null?void 0:i.isElement(S)))&&(I=a.floating[x]||s.floating[m]);const v=w/2-_/2,E=I/2-p[m]/2-1,P=vn(f[y],E),A=vn(f[O],E),M=P,F=I-p[m]-A,N=I/2-p[m]/2+v,W=Yc(M,N,F),C=!c.arrow&&ao(o)!=null&&N!==W&&s.reference[m]/2-(N<M?P:A)-p[m]/2<0,k=C?N<M?N-M:N-F:0;return{[h]:d[h]+k,data:{[h]:W,centerOffset:N-W-k,...C&&{alignmentOffset:k}},reset:C}}}),CD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...g}=Kr(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=Jr(o),O=Dr(a),x=Jr(a)===a,w=await(c.isRTL==null?void 0:c.isRTL(u.floating)),_=d||(x||!p?[yi(a)]:vD(a)),S=m!=="none";!d&&S&&_.push(...SD(a,p,m,w));const I=[a,..._],v=await c.detectOverflow(t,g),E=[];let P=((n=s.flip)==null?void 0:n.overflows)||[];if(l&&E.push(v[y]),f){const N=yD(o,i,w);E.push(v[N[0]],v[N[1]])}if(P=[...P,{placement:o,overflows:E}],!E.every(N=>N<=0)){var A,M;const N=(((A=s.flip)==null?void 0:A.index)||0)+1,W=I[N];if(W&&(!(f==="alignment"?O!==Dr(W):!1)||P.every(Y=>Dr(Y.placement)===O?Y.overflows[0]>0:!0)))return{data:{index:N,overflows:P},reset:{placement:W}};let C=(M=P.filter(k=>k.overflows[0]<=0).sort((k,Y)=>k.overflows[1]-Y.overflows[1])[0])==null?void 0:M.placement;if(!C)switch(h){case"bestFit":{var F;const k=(F=P.filter(Y=>{if(S){const $=Dr(Y.placement);return $===O||$==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter($=>$>0).reduce(($,D)=>$+D,0)]).sort((Y,$)=>Y[1]-$[1])[0])==null?void 0:F[0];k&&(C=k);break}case"initialPlacement":C=a;break}if(o!==C)return{reset:{placement:C}}}return{}}}};function Wp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Lp(e){return hD.some(t=>e[t]>=0)}const TD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:o="referenceHidden",...s}=Kr(e,t);switch(o){case"referenceHidden":{const i=await n.detectOverflow(t,{...s,elementContext:"reference"}),a=Wp(i,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Lp(a)}}}case"escaped":{const i=await n.detectOverflow(t,{...s,altBoundary:!0}),a=Wp(i,r.floating);return{data:{escapedOffsets:a,escaped:Lp(a)}}}default:return{}}}}},zp=new Set(["left","top"]);async function DD(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Jr(r),a=ao(r),c=Dr(r)==="y",u=zp.has(i)?-1:1,l=s&&c?-1:1,f=Kr(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),c?{x:h*l,y:d*u}:{x:d*u,y:h*l}}const AD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await DD(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},MD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:y=>{let{x:O,y:x}=y;return{x:O,y:x}}},...u}=Kr(e,t),l={x:r,y:n},f=await s.detectOverflow(t,u),d=Dr(Jr(o)),h=jc(d);let m=l[h],p=l[d];if(i){const y=h==="y"?"top":"left",O=h==="y"?"bottom":"right",x=m+f[y],w=m-f[O];m=Yc(x,m,w)}if(a){const y=d==="y"?"top":"left",O=d==="y"?"bottom":"right",x=p+f[y],w=p-f[O];p=Yc(x,p,w)}const g=c.fn({...t,[h]:m,[d]:p});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[h]:i,[d]:a}}}}}},PD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Kr(e,t),l={x:r,y:n},f=Dr(o),d=jc(f);let h=l[d],m=l[f];const p=Kr(a,t),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const x=d==="y"?"height":"width",w=s.reference[d]-s.floating[x]+g.mainAxis,_=s.reference[d]+s.reference[x]-g.mainAxis;h<w?h=w:h>_&&(h=_)}if(u){var y,O;const x=d==="y"?"width":"height",w=zp.has(Jr(o)),_=s.reference[f]-s.floating[x]+(w&&((y=i.offset)==null?void 0:y[f])||0)+(w?0:g.crossAxis),S=s.reference[f]+s.reference[x]+(w?0:((O=i.offset)==null?void 0:O[f])||0)-(w?g.crossAxis:0);m<_?m=_:m>S&&(m=S)}return{[d]:h,[f]:m}}}},ND=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...u}=Kr(e,t),l=await i.detectOverflow(t,u),f=Jr(o),d=ao(o),h=Dr(o)==="y",{width:m,height:p}=s.floating;let g,y;f==="top"||f==="bottom"?(g=f,y=d===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,g=d==="end"?"top":"bottom");const O=p-l.top-l.bottom,x=m-l.left-l.right,w=vn(p-l[g],O),_=vn(m-l[y],x),S=!t.middlewareData.shift;let I=w,v=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(v=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(I=O),S&&!d){const P=Gt(l.left,0),A=Gt(l.right,0),M=Gt(l.top,0),F=Gt(l.bottom,0);h?v=m-2*(P!==0||A!==0?P+A:Gt(l.left,l.right)):I=p-2*(M!==0||F!==0?M+F:Gt(l.top,l.bottom))}await c({...t,availableWidth:v,availableHeight:I});const E=await i.getDimensions(a.floating);return m!==E.width||p!==E.height?{reset:{rects:!0}}:{}}}};function bi(){return typeof window<"u"}function co(e){return $p(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ar(e){var t;return(t=($p(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $p(e){return bi()?e instanceof Node||e instanceof qt(e).Node:!1}function pr(e){return bi()?e instanceof Element||e instanceof qt(e).Element:!1}function Mr(e){return bi()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Up(e){return!bi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}const ID=new Set(["inline","contents"]);function Xo(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=mr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!ID.has(o)}const FD=new Set(["table","td","th"]);function RD(e){return FD.has(co(e))}const WD=[":popover-open",":modal"];function wi(e){return WD.some(t=>{try{return e.matches(t)}catch{return!1}})}const LD=["transform","translate","scale","rotate","perspective"],zD=["transform","translate","scale","rotate","perspective","filter"],$D=["paint","layout","strict","content"];function Zc(e){const t=Gc(),r=pr(e)?mr(e):e;return LD.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)||zD.some(n=>(r.willChange||"").includes(n))||$D.some(n=>(r.contain||"").includes(n))}function UD(e){let t=bn(e);for(;Mr(t)&&!lo(t);){if(Zc(t))return t;if(wi(t))return null;t=bn(t)}return null}function Gc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const YD=new Set(["html","body","#document"]);function lo(e){return YD.has(co(e))}function mr(e){return qt(e).getComputedStyle(e)}function _i(e){return pr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bn(e){if(co(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Up(e)&&e.host||Ar(e);return Up(t)?t.host:t}function Yp(e){const t=bn(e);return lo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mr(t)&&Xo(t)?t:Yp(t)}function Qo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Yp(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=qt(o);if(s){const a=qc(i);return t.concat(i,i.visualViewport||[],Xo(o)?o:[],a&&r?Qo(a):[])}return t.concat(o,Qo(o,[],r))}function qc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jp(e){const t=mr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Mr(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=mi(r)!==s||mi(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function Kc(e){return pr(e)?e:e.contextElement}function uo(e){const t=Kc(e);if(!Mr(t))return Tr(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=jp(t);let i=(s?mi(r.width):r.width)/n,a=(s?mi(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const jD=Tr(0);function Vp(e){const t=qt(e);return!Gc()||!t.visualViewport?jD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VD(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==qt(e)?!1:t}function Wn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Kc(e);let i=Tr(1);t&&(n?pr(n)&&(i=uo(n)):i=uo(e));const a=VD(s,r,n)?Vp(s):Tr(0);let c=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,l=o.width/i.x,f=o.height/i.y;if(s){const d=qt(s),h=n&&pr(n)?qt(n):n;let m=d,p=qc(m);for(;p&&n&&h!==m;){const g=uo(p),y=p.getBoundingClientRect(),O=mr(p),x=y.left+(p.clientLeft+parseFloat(O.paddingLeft))*g.x,w=y.top+(p.clientTop+parseFloat(O.paddingTop))*g.y;c*=g.x,u*=g.y,l*=g.x,f*=g.y,c+=x,u+=w,m=qt(p),p=qc(m)}}return vi({width:l,height:f,x:c,y:u})}function Si(e,t){const r=_i(e).scrollLeft;return t?t.left+r:Wn(Ar(e)).left+r}function Bp(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Si(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function BD(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=Ar(n),a=t?wi(t.floating):!1;if(n===i||a&&s)return r;let c={scrollLeft:0,scrollTop:0},u=Tr(1);const l=Tr(0),f=Mr(n);if((f||!f&&!s)&&((co(n)!=="body"||Xo(i))&&(c=_i(n)),Mr(n))){const h=Wn(n);u=uo(n),l.x=h.x+n.clientLeft,l.y=h.y+n.clientTop}const d=i&&!f&&!s?Bp(i,c):Tr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+l.x+d.x,y:r.y*u.y-c.scrollTop*u.y+l.y+d.y}}function HD(e){return Array.from(e.getClientRects())}function ZD(e){const t=Ar(e),r=_i(e),n=e.ownerDocument.body,o=Gt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Gt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Si(e);const a=-r.scrollTop;return mr(n).direction==="rtl"&&(i+=Gt(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Hp=25;function GD(e,t){const r=qt(e),n=Ar(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const l=Gc();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const u=Si(n);if(u<=0){const l=n.ownerDocument,f=l.body,d=getComputedStyle(f),h=l.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(n.clientWidth-f.clientWidth-h);m<=Hp&&(s-=m)}else u<=Hp&&(s+=u);return{width:s,height:i,x:a,y:c}}const qD=new Set(["absolute","fixed"]);function KD(e,t){const r=Wn(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=Mr(e)?uo(e):Tr(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,u=n*s.y;return{width:i,height:a,x:c,y:u}}function Zp(e,t,r){let n;if(t==="viewport")n=GD(e,r);else if(t==="document")n=ZD(Ar(e));else if(pr(t))n=KD(t,r);else{const o=Vp(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return vi(n)}function Gp(e,t){const r=bn(e);return r===t||!pr(r)||lo(r)?!1:mr(r).position==="fixed"||Gp(r,t)}function JD(e,t){const r=t.get(e);if(r)return r;let n=Qo(e,[],!1).filter(a=>pr(a)&&co(a)!=="body"),o=null;const s=mr(e).position==="fixed";let i=s?bn(e):e;for(;pr(i)&&!lo(i);){const a=mr(i),c=Zc(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&qD.has(o.position)||Xo(i)&&!c&&Gp(e,i))?n=n.filter(l=>l!==i):o=a,i=bn(i)}return t.set(e,n),n}function XD(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?wi(t)?[]:JD(t,this._c):[].concat(r),n],a=i[0],c=i.reduce((u,l)=>{const f=Zp(t,l,o);return u.top=Gt(f.top,u.top),u.right=vn(f.right,u.right),u.bottom=vn(f.bottom,u.bottom),u.left=Gt(f.left,u.left),u},Zp(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function QD(e){const{width:t,height:r}=jp(e);return{width:t,height:r}}function eA(e,t,r){const n=Mr(t),o=Ar(t),s=r==="fixed",i=Wn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Tr(0);function u(){c.x=Si(o)}if(n||!n&&!s)if((co(t)!=="body"||Xo(o))&&(a=_i(t)),n){const h=Wn(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else o&&u();s&&!n&&o&&u();const l=o&&!n&&!s?Bp(o,a):Tr(0),f=i.left+a.scrollLeft-c.x-l.x,d=i.top+a.scrollTop-c.y-l.y;return{x:f,y:d,width:i.width,height:i.height}}function Jc(e){return mr(e).position==="static"}function qp(e,t){if(!Mr(e)||mr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ar(e)===r&&(r=r.ownerDocument.body),r}function Kp(e,t){const r=qt(e);if(wi(e))return r;if(!Mr(e)){let o=bn(e);for(;o&&!lo(o);){if(pr(o)&&!Jc(o))return o;o=bn(o)}return r}let n=qp(e,t);for(;n&&RD(n)&&Jc(n);)n=qp(n,t);return n&&lo(n)&&Jc(n)&&!Zc(n)?r:n||UD(e)||r}const tA=async function(e){const t=this.getOffsetParent||Kp,r=this.getDimensions,n=await r(e.floating);return{reference:eA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function rA(e){return mr(e).direction==="rtl"}const nA={convertOffsetParentRelativeRectToViewportRelativeRect:BD,getDocumentElement:Ar,getClippingRect:XD,getOffsetParent:Kp,getElementRects:tA,getClientRects:HD,getDimensions:QD,getScale:uo,isElement:pr,isRTL:rA};function Jp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function oA(e,t){let r=null,n;const o=Ar(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:l,top:f,width:d,height:h}=u;if(a||t(),!d||!h)return;const m=gi(f),p=gi(o.clientWidth-(l+d)),g=gi(o.clientHeight-(f+h)),y=gi(l),x={rootMargin:-m+"px "+-p+"px "+-g+"px "+-y+"px",threshold:Gt(0,vn(1,c))||1};let w=!0;function _(S){const I=S[0].intersectionRatio;if(I!==c){if(!w)return i();I?i(!1,I):n=setTimeout(()=>{i(!1,1e-7)},1e3)}I===1&&!Jp(u,e.getBoundingClientRect())&&i(),w=!1}try{r=new IntersectionObserver(_,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(_,x)}r.observe(e)}return i(!0),s}function sA(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=Kc(e),l=o||s?[...u?Qo(u):[],...Qo(t)]:[];l.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const f=u&&a?oA(u,r):null;let d=-1,h=null;i&&(h=new ResizeObserver(y=>{let[O]=y;O&&O.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),r()}),u&&!c&&h.observe(u),h.observe(t));let m,p=c?Wn(e):null;c&&g();function g(){const y=Wn(e);p&&!Jp(p,y)&&r(),p=y,m=requestAnimationFrame(g)}return r(),()=>{var y;l.forEach(O=>{o&&O.removeEventListener("scroll",r),s&&O.removeEventListener("resize",r)}),f?.(),(y=h)==null||y.disconnect(),h=null,c&&cancelAnimationFrame(m)}}const iA=AD,aA=MD,cA=CD,lA=ND,uA=TD,Xp=OD,fA=PD,dA=(e,t,r)=>{const n=new Map,o={platform:nA,...r},s={...o.platform,_c:n};return ED(e,t,{...o,platform:s})};var hA=typeof document<"u",pA=function(){},ki=hA?U.useLayoutEffect:pA;function xi(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!xi(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!xi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Qp(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function em(e,t){const r=Qp(e);return Math.round(t*r)/r}function Xc(e){const t=b.useRef(e);return ki(()=>{t.current=e}),t}function mA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[l,f]=b.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=b.useState(n);xi(d,n)||h(n);const[m,p]=b.useState(null),[g,y]=b.useState(null),O=b.useCallback(Y=>{Y!==S.current&&(S.current=Y,p(Y))},[]),x=b.useCallback(Y=>{Y!==I.current&&(I.current=Y,y(Y))},[]),w=s||m,_=i||g,S=b.useRef(null),I=b.useRef(null),v=b.useRef(l),E=c!=null,P=Xc(c),A=Xc(o),M=Xc(u),F=b.useCallback(()=>{if(!S.current||!I.current)return;const Y={placement:t,strategy:r,middleware:d};A.current&&(Y.platform=A.current),dA(S.current,I.current,Y).then($=>{const D={...$,isPositioned:M.current!==!1};N.current&&!xi(v.current,D)&&(v.current=D,ms.flushSync(()=>{f(D)}))})},[d,t,r,A,M]);ki(()=>{u===!1&&v.current.isPositioned&&(v.current.isPositioned=!1,f(Y=>({...Y,isPositioned:!1})))},[u]);const N=b.useRef(!1);ki(()=>(N.current=!0,()=>{N.current=!1}),[]),ki(()=>{if(w&&(S.current=w),_&&(I.current=_),w&&_){if(P.current)return P.current(w,_,F);F()}},[w,_,F,P,E]);const W=b.useMemo(()=>({reference:S,floating:I,setReference:O,setFloating:x}),[O,x]),C=b.useMemo(()=>({reference:w,floating:_}),[w,_]),k=b.useMemo(()=>{const Y={position:r,left:0,top:0};if(!C.floating)return Y;const $=em(C.floating,l.x),D=em(C.floating,l.y);return a?{...Y,transform:"translate("+$+"px, "+D+"px)",...Qp(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:$,top:D}},[r,a,C.floating,l.x,l.y]);return b.useMemo(()=>({...l,update:F,refs:W,elements:C,floatingStyles:k}),[l,F,W,C,k])}const gA=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Xp({element:n.current,padding:o}).fn(r):{}:n?Xp({element:n,padding:o}).fn(r):{}}}},yA=(e,t)=>({...iA(e),options:[e,t]}),vA=(e,t)=>({...aA(e),options:[e,t]}),bA=(e,t)=>({...fA(e),options:[e,t]}),wA=(e,t)=>({...cA(e),options:[e,t]}),_A=(e,t)=>({...lA(e),options:[e,t]}),SA=(e,t)=>({...uA(e),options:[e,t]}),kA=(e,t)=>({...gA(e),options:[e,t]});var xA="Arrow",tm=b.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return T.jsx(Ne.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:T.jsx("polygon",{points:"0,0 30,0 15,10"})})});tm.displayName=xA;var EA=tm,Qc="Popper",[rm,Ei]=qr(Qc),[OA,nm]=rm(Qc),om=e=>{const{__scopePopper:t,children:r}=e,[n,o]=b.useState(null);return T.jsx(OA,{scope:t,anchor:n,onAnchorChange:o,children:r})};om.displayName=Qc;var sm="PopperAnchor",im=b.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=nm(sm,r),i=b.useRef(null),a=He(t,i),c=b.useRef(null);return b.useEffect(()=>{const u=c.current;c.current=n?.current||i.current,u!==c.current&&s.onAnchorChange(c.current)}),n?null:T.jsx(Ne.div,{...o,ref:a})});im.displayName=sm;var el="PopperContent",[CA,TA]=rm(el),am=b.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:l=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:m,...p}=e,g=nm(el,r),[y,O]=b.useState(null),x=He(t,q=>O(q)),[w,_]=b.useState(null),S=Pc(w),I=S?.width??0,v=S?.height??0,E=n+(s!=="center"?"-"+s:""),P=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},A=Array.isArray(u)?u:[u],M=A.length>0,F={padding:P,boundary:A.filter(AA),altBoundary:M},{refs:N,floatingStyles:W,placement:C,isPositioned:k,middlewareData:Y}=mA({strategy:"fixed",placement:E,whileElementsMounted:(...q)=>sA(...q,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[yA({mainAxis:o+v,alignmentAxis:i}),c&&vA({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?bA():void 0,...F}),c&&wA({...F}),_A({...F,apply:({elements:q,rects:oe,availableWidth:Q,availableHeight:ne})=>{const{width:le,height:K}=oe.reference,Se=q.floating.style;Se.setProperty("--radix-popper-available-width",`${Q}px`),Se.setProperty("--radix-popper-available-height",`${ne}px`),Se.setProperty("--radix-popper-anchor-width",`${le}px`),Se.setProperty("--radix-popper-anchor-height",`${K}px`)}}),w&&kA({element:w,padding:a}),MA({arrowWidth:I,arrowHeight:v}),d&&SA({strategy:"referenceHidden",...F})]}),[$,D]=um(C),V=hn(m);At(()=>{k&&V?.()},[k,V]);const Z=Y.arrow?.x,G=Y.arrow?.y,B=Y.arrow?.centerOffset!==0,[L,J]=b.useState();return At(()=>{y&&J(window.getComputedStyle(y).zIndex)},[y]),T.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:k?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:T.jsx(CA,{scope:r,placedSide:$,onArrowChange:_,arrowX:Z,arrowY:G,shouldHideArrow:B,children:T.jsx(Ne.div,{"data-side":$,"data-align":D,...p,ref:x,style:{...p.style,animation:k?void 0:"none"}})})})});am.displayName=el;var cm="PopperArrow",DA={top:"bottom",right:"left",bottom:"top",left:"right"},lm=b.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=TA(cm,n),i=DA[s.placedSide];return T.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:T.jsx(EA,{...o,ref:r,style:{...o.style,display:"block"}})})});lm.displayName=cm;function AA(e){return e!==null}var MA=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,l]=um(r),f={start:"0%",center:"50%",end:"100%"}[l],d=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+c/2;let m="",p="";return u==="bottom"?(m=i?f:`${d}px`,p=`${-c}px`):u==="top"?(m=i?f:`${d}px`,p=`${n.floating.height+c}px`):u==="right"?(m=`${-c}px`,p=i?f:`${h}px`):u==="left"&&(m=`${n.floating.width+c}px`,p=i?f:`${h}px`),{data:{x:m,y:p}}}});function um(e){const[t,r="center"]=e.split("-");return[t,r]}var fm=om,tl=im,dm=am,hm=lm,PA="Portal",Oi=b.forwardRef((e,t)=>{const{container:r,...n}=e,[o,s]=b.useState(!1);At(()=>s(!0),[]);const i=r||o&&globalThis?.document?.body;return i?Lu.createPortal(T.jsx(Ne.div,{...n,ref:t}),i):null});Oi.displayName=PA;function NA(e){const t=IA(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),c=a.find(RA);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function IA(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=LA(o),a=WA(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Nn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var FA=Symbol("radix.slottable");function RA(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===FA}function WA(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function LA(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var pm=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"}),zA="VisuallyHidden",$A=b.forwardRef((e,t)=>T.jsx(Ne.span,{...e,ref:t,style:{...pm,...e.style}}));$A.displayName=zA;var UA=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fo=new WeakMap,Ci=new WeakMap,Ti={},rl=0,mm=function(e){return e&&(e.host||mm(e.parentNode))},YA=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=mm(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})},jA=function(e,t,r,n){var o=YA(t,Array.isArray(e)?e:[e]);Ti[r]||(Ti[r]=new WeakMap);var s=Ti[r],i=[],a=new Set,c=new Set(o),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};o.forEach(u);var l=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))l(d);else try{var h=d.getAttribute(n),m=h!==null&&h!=="false",p=(fo.get(d)||0)+1,g=(s.get(d)||0)+1;fo.set(d,p),s.set(d,g),i.push(d),p===1&&m&&Ci.set(d,!0),g===1&&d.setAttribute(r,"true"),m||d.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",d,y)}})};return l(t),a.clear(),rl++,function(){i.forEach(function(f){var d=fo.get(f)-1,h=s.get(f)-1;fo.set(f,d),s.set(f,h),d||(Ci.has(f)||f.removeAttribute(n),Ci.delete(f)),h||f.removeAttribute(r)}),rl--,rl||(fo=new WeakMap,fo=new WeakMap,Ci=new WeakMap,Ti={})}},nl=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=UA(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),jA(n,o,r,"aria-hidden")):function(){return null}},Pr=function(){return Pr=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Pr.apply(this,arguments)};function gm(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function VA(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Di="right-scroll-bar-position",Ai="width-before-scroll-bar",BA="with-scroll-bars-hidden",HA="--removed-body-scroll-bar-size";function ol(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ZA(e,t){var r=U.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var GA=typeof window<"u"?b.useLayoutEffect:b.useEffect,ym=new WeakMap;function qA(e,t){var r=ZA(null,function(n){return e.forEach(function(o){return ol(o,n)})});return GA(function(){var n=ym.get(r);if(n){var o=new Set(n),s=new Set(e),i=r.current;o.forEach(function(a){s.has(a)||ol(a,null)}),s.forEach(function(a){o.has(a)||ol(a,i)})}ym.set(r,e)},[e]),r}function KA(e){return e}function JA(e,t){t===void 0&&(t=KA);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var i=t(s,n);return r.push(i),function(){r=r.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(n=!0;r.length;){var i=r;r=[],i.forEach(s)}r={push:function(a){return s(a)},filter:function(){return r}}},assignMedium:function(s){n=!0;var i=[];if(r.length){var a=r;r=[],a.forEach(s),i=r}var c=function(){var l=i;i=[],l.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(l){i.push(l),u()},filter:function(l){return i=i.filter(l),r}}}};return o}function XA(e){e===void 0&&(e={});var t=JA(null);return t.options=Pr({async:!0,ssr:!1},e),t}var vm=function(e){var t=e.sideCar,r=gm(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return b.createElement(n,Pr({},r))};vm.isSideCarExport=!0;function QA(e,t){return e.useMedium(t),vm}var bm=XA(),sl=function(){},Mi=b.forwardRef(function(e,t){var r=b.useRef(null),n=b.useState({onScrollCapture:sl,onWheelCapture:sl,onTouchMoveCapture:sl}),o=n[0],s=n[1],i=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,l=e.enabled,f=e.shards,d=e.sideCar,h=e.noRelative,m=e.noIsolation,p=e.inert,g=e.allowPinchZoom,y=e.as,O=y===void 0?"div":y,x=e.gapMode,w=gm(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=d,S=qA([r,t]),I=Pr(Pr({},w),o);return b.createElement(b.Fragment,null,l&&b.createElement(_,{sideCar:bm,removeScrollBar:u,shards:f,noRelative:h,noIsolation:m,inert:p,setCallbacks:s,allowPinchZoom:!!g,lockRef:r,gapMode:x}),i?b.cloneElement(b.Children.only(a),Pr(Pr({},I),{ref:S})):b.createElement(O,Pr({},I,{className:c,ref:S}),a))});Mi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Mi.classNames={fullWidth:Ai,zeroRight:Di};var eM=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function tM(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=eM();return t&&e.setAttribute("nonce",t),e}function rM(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nM(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var oM=function(){var e=0,t=null;return{add:function(r){e==0&&(t=tM())&&(rM(t,r),nM(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sM=function(){var e=oM();return function(t,r){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},wm=function(){var e=sM(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},iM={left:0,top:0,right:0,gap:0},il=function(e){return parseInt(e||"",10)||0},aM=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[il(r),il(n),il(o)]},cM=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return iM;var t=aM(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])}},lM=wm(),ho="data-scroll-locked",uM=function(e,t,r,n){var o=e.left,s=e.top,i=e.right,a=e.gap;return r===void 0&&(r="margin"),`
44
- .`.concat(BA,` {
42
+ `+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var id={};function ad(e,t){ce.deprecationHandler!=null&&ce.deprecationHandler(e,t),id[e]||(sd(t),id[e]=!0)}ce.suppressDeprecationWarnings=!1,ce.deprecationHandler=null;function xr(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function lS(e){var t,r;for(r in e)$e(e,r)&&(t=e[r],xr(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function La(e,t){var r=sn({},e),n;for(n in t)$e(t,n)&&(Dn(e[n])&&Dn(t[n])?(r[n]={},sn(r[n],e[n]),sn(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)$e(e,n)&&!$e(t,n)&&Dn(e[n])&&(r[n]=sn({},r[n]));return r}function za(e){e!=null&&this.set(e)}var $a;Object.keys?$a=Object.keys:$a=function(e){var t,r=[];for(t in e)$e(e,t)&&r.push(t);return r};var uS={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function fS(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return xr(n)?n.call(t,r):n}function Er(e,t,r){var n=""+Math.abs(e),o=t-n.length,s=e>=0;return(s?r?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}var Ua=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Is=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ya={},Xn={};function ge(e,t,r,n){var o=n;typeof n=="string"&&(o=function(){return this[n]()}),e&&(Xn[e]=o),t&&(Xn[t[0]]=function(){return Er(o.apply(this,arguments),t[1],t[2])}),r&&(Xn[r]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function dS(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function hS(e){var t=e.match(Ua),r,n;for(r=0,n=t.length;r<n;r++)Xn[t[r]]?t[r]=Xn[t[r]]:t[r]=dS(t[r]);return function(o){var s="",i;for(i=0;i<n;i++)s+=xr(t[i])?t[i].call(o,e):t[i];return s}}function Fs(e,t){return e.isValid()?(t=cd(t,e.localeData()),Ya[t]=Ya[t]||hS(t),Ya[t](e)):e.localeData().invalidDate()}function cd(e,t){var r=5;function n(o){return t.longDateFormat(o)||o}for(Is.lastIndex=0;r>=0&&Is.test(e);)e=e.replace(Is,n),Is.lastIndex=0,r-=1;return e}var pS={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function mS(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(Ua).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var gS="Invalid date";function yS(){return this._invalidDate}var vS="%d",bS=/\d{1,2}/;function wS(e){return this._ordinal.replace("%d",e)}var _S={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function SS(e,t,r,n){var o=this._relativeTime[r];return xr(o)?o(e,t,r,n):o.replace(/%d/i,e)}function kS(e,t){var r=this._relativeTime[e>0?"future":"past"];return xr(r)?r(t):r.replace(/%s/i,t)}var ld={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function nr(e){return typeof e=="string"?ld[e]||ld[e.toLowerCase()]:void 0}function ja(e){var t={},r,n;for(n in e)$e(e,n)&&(r=nr(n),r&&(t[r]=e[n]));return t}var xS={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ES(e){var t=[],r;for(r in e)$e(e,r)&&t.push({unit:r,priority:xS[r]});return t.sort(function(n,o){return n.priority-o.priority}),t}var ud=/\d/,Zt=/\d\d/,fd=/\d{3}/,Va=/\d{4}/,Rs=/[+-]?\d{6}/,et=/\d\d?/,dd=/\d\d\d\d?/,hd=/\d\d\d\d\d\d?/,Ws=/\d{1,3}/,Ba=/\d{1,4}/,Ls=/[+-]?\d{1,6}/,Qn=/\d+/,zs=/[+-]?\d+/,OS=/Z|[+-]\d\d:?\d\d/gi,$s=/Z|[+-]\d\d(?::?\d\d)?/gi,CS=/[+-]?\d+(\.\d{1,3})?/,Ro=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,eo=/^[1-9]\d?/,Ha=/^([1-9]\d|\d)/,Us;Us={};function fe(e,t,r){Us[e]=xr(t)?t:function(n,o){return n&&r?r:t}}function TS(e,t){return $e(Us,e)?Us[e](t._strict,t._locale):new RegExp(DS(e))}function DS(e){return $r(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,o,s){return r||n||o||s}))}function $r(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function or(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Fe(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=or(t)),r}var Za={};function qe(e,t){var r,n=t,o;for(typeof e=="string"&&(e=[e]),zr(t)&&(n=function(s,i){i[t]=Fe(s)}),o=e.length,r=0;r<o;r++)Za[e[r]]=n}function Wo(e,t){qe(e,function(r,n,o,s){o._w=o._w||{},t(r,o._w,o,s)})}function AS(e,t,r){t!=null&&$e(Za,e)&&Za[e](t,r._a,r,e)}function Ys(e){return e%4===0&&e%100!==0||e%400===0}var Tt=0,Ur=1,Or=2,St=3,fr=4,Yr=5,An=6,MS=7,PS=8;ge("Y",0,0,function(){var e=this.year();return e<=9999?Er(e,4):"+"+e}),ge(0,["YY",2],0,function(){return this.year()%100}),ge(0,["YYYY",4],0,"year"),ge(0,["YYYYY",5],0,"year"),ge(0,["YYYYYY",6,!0],0,"year"),fe("Y",zs),fe("YY",et,Zt),fe("YYYY",Ba,Va),fe("YYYYY",Ls,Rs),fe("YYYYYY",Ls,Rs),qe(["YYYYY","YYYYYY"],Tt),qe("YYYY",function(e,t){t[Tt]=e.length===2?ce.parseTwoDigitYear(e):Fe(e)}),qe("YY",function(e,t){t[Tt]=ce.parseTwoDigitYear(e)}),qe("Y",function(e,t){t[Tt]=parseInt(e,10)});function Lo(e){return Ys(e)?366:365}ce.parseTwoDigitYear=function(e){return Fe(e)+(Fe(e)>68?1900:2e3)};var pd=to("FullYear",!0);function NS(){return Ys(this.year())}function to(e,t){return function(r){return r!=null?(md(this,e,r),ce.updateOffset(this,t),this):zo(this,e)}}function zo(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function md(e,t,r){var n,o,s,i,a;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(o?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(o?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(o?n.setUTCHours(r):n.setHours(r));case"Date":return void(o?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}s=r,i=e.month(),a=e.date(),a=a===29&&i===1&&!Ys(s)?28:a,o?n.setUTCFullYear(s,i,a):n.setFullYear(s,i,a)}}function IS(e){return e=nr(e),xr(this[e])?this[e]():this}function FS(e,t){if(typeof e=="object"){e=ja(e);var r=ES(e),n,o=r.length;for(n=0;n<o;n++)this[r[n].unit](e[r[n].unit])}else if(e=nr(e),xr(this[e]))return this[e](t);return this}function RS(e,t){return(e%t+t)%t}var mt;Array.prototype.indexOf?mt=Array.prototype.indexOf:mt=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Ga(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=RS(t,12);return e+=(t-r)/12,r===1?Ys(e)?29:28:31-r%7%2}ge("M",["MM",2],"Mo",function(){return this.month()+1}),ge("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),ge("MMMM",0,0,function(e){return this.localeData().months(this,e)}),fe("M",et,eo),fe("MM",et,Zt),fe("MMM",function(e,t){return t.monthsShortRegex(e)}),fe("MMMM",function(e,t){return t.monthsRegex(e)}),qe(["M","MM"],function(e,t){t[Ur]=Fe(e)-1}),qe(["MMM","MMMM"],function(e,t,r,n){var o=r._locale.monthsParse(e,n,r._strict);o!=null?t[Ur]=o:Ce(r).invalidMonth=e});var WS="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),gd="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),yd=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,LS=Ro,zS=Ro;function $S(e,t){return e?lr(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||yd).test(t)?"format":"standalone"][e.month()]:lr(this._months)?this._months:this._months.standalone}function US(e,t){return e?lr(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[yd.test(t)?"format":"standalone"][e.month()]:lr(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function YS(e,t,r){var n,o,s,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=kr([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return r?t==="MMM"?(o=mt.call(this._shortMonthsParse,i),o!==-1?o:null):(o=mt.call(this._longMonthsParse,i),o!==-1?o:null):t==="MMM"?(o=mt.call(this._shortMonthsParse,i),o!==-1?o:(o=mt.call(this._longMonthsParse,i),o!==-1?o:null)):(o=mt.call(this._longMonthsParse,i),o!==-1?o:(o=mt.call(this._shortMonthsParse,i),o!==-1?o:null))}function jS(e,t,r){var n,o,s;if(this._monthsParseExact)return YS.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(o=kr([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(s="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[n]=new RegExp(s.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function vd(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Fe(t);else if(t=e.localeData().monthsParse(t),!zr(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,Ga(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function bd(e){return e!=null?(vd(this,e),ce.updateOffset(this,!0),this):zo(this,"Month")}function VS(){return Ga(this.year(),this.month())}function BS(e){return this._monthsParseExact?($e(this,"_monthsRegex")||wd.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):($e(this,"_monthsShortRegex")||(this._monthsShortRegex=LS),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function HS(e){return this._monthsParseExact?($e(this,"_monthsRegex")||wd.call(this),e?this._monthsStrictRegex:this._monthsRegex):($e(this,"_monthsRegex")||(this._monthsRegex=zS),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function wd(){function e(c,u){return u.length-c.length}var t=[],r=[],n=[],o,s,i,a;for(o=0;o<12;o++)s=kr([2e3,o]),i=$r(this.monthsShort(s,"")),a=$r(this.months(s,"")),t.push(i),r.push(a),n.push(a),n.push(i);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ZS(e,t,r,n,o,s,i){var a;return e<100&&e>=0?(a=new Date(e+400,t,r,n,o,s,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,r,n,o,s,i),a}function $o(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function js(e,t,r){var n=7+t-r,o=(7+$o(e,0,n).getUTCDay()-t)%7;return-o+n-1}function _d(e,t,r,n,o){var s=(7+r-n)%7,i=js(e,n,o),a=1+7*(t-1)+s+i,c,u;return a<=0?(c=e-1,u=Lo(c)+a):a>Lo(e)?(c=e+1,u=a-Lo(e)):(c=e,u=a),{year:c,dayOfYear:u}}function Uo(e,t,r){var n=js(e.year(),t,r),o=Math.floor((e.dayOfYear()-n-1)/7)+1,s,i;return o<1?(i=e.year()-1,s=o+jr(i,t,r)):o>jr(e.year(),t,r)?(s=o-jr(e.year(),t,r),i=e.year()+1):(i=e.year(),s=o),{week:s,year:i}}function jr(e,t,r){var n=js(e,t,r),o=js(e+1,t,r);return(Lo(e)-n+o)/7}ge("w",["ww",2],"wo","week"),ge("W",["WW",2],"Wo","isoWeek"),fe("w",et,eo),fe("ww",et,Zt),fe("W",et,eo),fe("WW",et,Zt),Wo(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=Fe(e)});function GS(e){return Uo(e,this._week.dow,this._week.doy).week}var qS={dow:0,doy:6};function KS(){return this._week.dow}function JS(){return this._week.doy}function XS(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function QS(e){var t=Uo(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}ge("d",0,"do","day"),ge("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),ge("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),ge("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),ge("e",0,0,"weekday"),ge("E",0,0,"isoWeekday"),fe("d",et),fe("e",et),fe("E",et),fe("dd",function(e,t){return t.weekdaysMinRegex(e)}),fe("ddd",function(e,t){return t.weekdaysShortRegex(e)}),fe("dddd",function(e,t){return t.weekdaysRegex(e)}),Wo(["dd","ddd","dddd"],function(e,t,r,n){var o=r._locale.weekdaysParse(e,n,r._strict);o!=null?t.d=o:Ce(r).invalidWeekday=e}),Wo(["d","e","E"],function(e,t,r,n){t[n]=Fe(e)});function ek(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function tk(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function qa(e,t){return e.slice(t,7).concat(e.slice(0,t))}var rk="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Sd="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),nk="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ok=Ro,sk=Ro,ik=Ro;function ak(e,t){var r=lr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?qa(r,this._week.dow):e?r[e.day()]:r}function ck(e){return e===!0?qa(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function lk(e){return e===!0?qa(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function uk(e,t,r){var n,o,s,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=kr([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return r?t==="dddd"?(o=mt.call(this._weekdaysParse,i),o!==-1?o:null):t==="ddd"?(o=mt.call(this._shortWeekdaysParse,i),o!==-1?o:null):(o=mt.call(this._minWeekdaysParse,i),o!==-1?o:null):t==="dddd"?(o=mt.call(this._weekdaysParse,i),o!==-1||(o=mt.call(this._shortWeekdaysParse,i),o!==-1)?o:(o=mt.call(this._minWeekdaysParse,i),o!==-1?o:null)):t==="ddd"?(o=mt.call(this._shortWeekdaysParse,i),o!==-1||(o=mt.call(this._weekdaysParse,i),o!==-1)?o:(o=mt.call(this._minWeekdaysParse,i),o!==-1?o:null)):(o=mt.call(this._minWeekdaysParse,i),o!==-1||(o=mt.call(this._weekdaysParse,i),o!==-1)?o:(o=mt.call(this._shortWeekdaysParse,i),o!==-1?o:null))}function fk(e,t,r){var n,o,s;if(this._weekdaysParseExact)return uk.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=kr([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(s="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(s.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function dk(e){if(!this.isValid())return e!=null?this:NaN;var t=zo(this,"Day");return e!=null?(e=ek(e,this.localeData()),this.add(e-t,"d")):t}function hk(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function pk(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=tk(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function mk(e){return this._weekdaysParseExact?($e(this,"_weekdaysRegex")||Ka.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):($e(this,"_weekdaysRegex")||(this._weekdaysRegex=ok),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function gk(e){return this._weekdaysParseExact?($e(this,"_weekdaysRegex")||Ka.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):($e(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=sk),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function yk(e){return this._weekdaysParseExact?($e(this,"_weekdaysRegex")||Ka.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):($e(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ik),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ka(){function e(l,f){return f.length-l.length}var t=[],r=[],n=[],o=[],s,i,a,c,u;for(s=0;s<7;s++)i=kr([2e3,1]).day(s),a=$r(this.weekdaysMin(i,"")),c=$r(this.weekdaysShort(i,"")),u=$r(this.weekdays(i,"")),t.push(a),r.push(c),n.push(u),o.push(a),o.push(c),o.push(u);t.sort(e),r.sort(e),n.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Ja(){return this.hours()%12||12}function vk(){return this.hours()||24}ge("H",["HH",2],0,"hour"),ge("h",["hh",2],0,Ja),ge("k",["kk",2],0,vk),ge("hmm",0,0,function(){return""+Ja.apply(this)+Er(this.minutes(),2)}),ge("hmmss",0,0,function(){return""+Ja.apply(this)+Er(this.minutes(),2)+Er(this.seconds(),2)}),ge("Hmm",0,0,function(){return""+this.hours()+Er(this.minutes(),2)}),ge("Hmmss",0,0,function(){return""+this.hours()+Er(this.minutes(),2)+Er(this.seconds(),2)});function kd(e,t){ge(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}kd("a",!0),kd("A",!1);function xd(e,t){return t._meridiemParse}fe("a",xd),fe("A",xd),fe("H",et,Ha),fe("h",et,eo),fe("k",et,eo),fe("HH",et,Zt),fe("hh",et,Zt),fe("kk",et,Zt),fe("hmm",dd),fe("hmmss",hd),fe("Hmm",dd),fe("Hmmss",hd),qe(["H","HH"],St),qe(["k","kk"],function(e,t,r){var n=Fe(e);t[St]=n===24?0:n}),qe(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),qe(["h","hh"],function(e,t,r){t[St]=Fe(e),Ce(r).bigHour=!0}),qe("hmm",function(e,t,r){var n=e.length-2;t[St]=Fe(e.substr(0,n)),t[fr]=Fe(e.substr(n)),Ce(r).bigHour=!0}),qe("hmmss",function(e,t,r){var n=e.length-4,o=e.length-2;t[St]=Fe(e.substr(0,n)),t[fr]=Fe(e.substr(n,2)),t[Yr]=Fe(e.substr(o)),Ce(r).bigHour=!0}),qe("Hmm",function(e,t,r){var n=e.length-2;t[St]=Fe(e.substr(0,n)),t[fr]=Fe(e.substr(n))}),qe("Hmmss",function(e,t,r){var n=e.length-4,o=e.length-2;t[St]=Fe(e.substr(0,n)),t[fr]=Fe(e.substr(n,2)),t[Yr]=Fe(e.substr(o))});function bk(e){return(e+"").toLowerCase().charAt(0)==="p"}var wk=/[ap]\.?m?\.?/i,_k=to("Hours",!0);function Sk(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var Ed={calendar:uS,longDateFormat:pS,invalidDate:gS,ordinal:vS,dayOfMonthOrdinalParse:bS,relativeTime:_S,months:WS,monthsShort:gd,week:qS,weekdays:rk,weekdaysMin:nk,weekdaysShort:Sd,meridiemParse:wk},at={},Yo={},jo;function kk(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function Od(e){return e&&e.toLowerCase().replace("_","-")}function xk(e){for(var t=0,r,n,o,s;t<e.length;){for(s=Od(e[t]).split("-"),r=s.length,n=Od(e[t+1]),n=n?n.split("-"):null;r>0;){if(o=Vs(s.slice(0,r).join("-")),o)return o;if(n&&n.length>=r&&kk(s,n)>=r-1)break;r--}t++}return jo}function Ek(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Vs(e){var t=null,r;if(at[e]===void 0&&typeof module<"u"&&module&&module.exports&&Ek(e))try{t=jo._abbr,r=require,r("./locale/"+e),an(t)}catch{at[e]=null}return at[e]}function an(e,t){var r;return e&&(Ut(t)?r=Vr(e):r=Xa(e,t),r?jo=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),jo._abbr}function Xa(e,t){if(t!==null){var r,n=Ed;if(t.abbr=e,at[e]!=null)ad("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=at[e]._config;else if(t.parentLocale!=null)if(at[t.parentLocale]!=null)n=at[t.parentLocale]._config;else if(r=Vs(t.parentLocale),r!=null)n=r._config;else return Yo[t.parentLocale]||(Yo[t.parentLocale]=[]),Yo[t.parentLocale].push({name:e,config:t}),null;return at[e]=new za(La(n,t)),Yo[e]&&Yo[e].forEach(function(o){Xa(o.name,o.config)}),an(e),at[e]}else return delete at[e],null}function Ok(e,t){if(t!=null){var r,n,o=Ed;at[e]!=null&&at[e].parentLocale!=null?at[e].set(La(at[e]._config,t)):(n=Vs(e),n!=null&&(o=n._config),t=La(o,t),n==null&&(t.abbr=e),r=new za(t),r.parentLocale=at[e],at[e]=r),an(e)}else at[e]!=null&&(at[e].parentLocale!=null?(at[e]=at[e].parentLocale,e===an()&&an(e)):at[e]!=null&&delete at[e]);return at[e]}function Vr(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return jo;if(!lr(e)){if(t=Vs(e),t)return t;e=[e]}return xk(e)}function Ck(){return $a(at)}function Qa(e){var t,r=e._a;return r&&Ce(e).overflow===-2&&(t=r[Ur]<0||r[Ur]>11?Ur:r[Or]<1||r[Or]>Ga(r[Tt],r[Ur])?Or:r[St]<0||r[St]>24||r[St]===24&&(r[fr]!==0||r[Yr]!==0||r[An]!==0)?St:r[fr]<0||r[fr]>59?fr:r[Yr]<0||r[Yr]>59?Yr:r[An]<0||r[An]>999?An:-1,Ce(e)._overflowDayOfYear&&(t<Tt||t>Or)&&(t=Or),Ce(e)._overflowWeeks&&t===-1&&(t=MS),Ce(e)._overflowWeekday&&t===-1&&(t=PS),Ce(e).overflow=t),e}var Tk=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Dk=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ak=/Z|[+-]\d\d(?::?\d\d)?/,Bs=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ec=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mk=/^\/?Date\((-?\d+)/i,Pk=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Nk={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Cd(e){var t,r,n=e._i,o=Tk.exec(n)||Dk.exec(n),s,i,a,c,u=Bs.length,l=ec.length;if(o){for(Ce(e).iso=!0,t=0,r=u;t<r;t++)if(Bs[t][1].exec(o[1])){i=Bs[t][0],s=Bs[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(o[3]){for(t=0,r=l;t<r;t++)if(ec[t][1].exec(o[3])){a=(o[2]||" ")+ec[t][0];break}if(a==null){e._isValid=!1;return}}if(!s&&a!=null){e._isValid=!1;return}if(o[4])if(Ak.exec(o[4]))c="Z";else{e._isValid=!1;return}e._f=i+(a||"")+(c||""),rc(e)}else e._isValid=!1}function Ik(e,t,r,n,o,s){var i=[Fk(e),gd.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(o,10)];return s&&i.push(parseInt(s,10)),i}function Fk(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Rk(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Wk(e,t,r){if(e){var n=Sd.indexOf(e),o=new Date(t[0],t[1],t[2]).getDay();if(n!==o)return Ce(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function Lk(e,t,r){if(e)return Nk[e];if(t)return 0;var n=parseInt(r,10),o=n%100,s=(n-o)/100;return s*60+o}function Td(e){var t=Pk.exec(Rk(e._i)),r;if(t){if(r=Ik(t[4],t[3],t[2],t[5],t[6],t[7]),!Wk(t[1],r,e))return;e._a=r,e._tzm=Lk(t[8],t[9],t[10]),e._d=$o.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Ce(e).rfc2822=!0}else e._isValid=!1}function zk(e){var t=Mk.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Cd(e),e._isValid===!1)delete e._isValid;else return;if(Td(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ce.createFromInputFallback(e)}ce.createFromInputFallback=rr("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function ro(e,t,r){return e??t??r}function $k(e){var t=new Date(ce.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function tc(e){var t,r,n=[],o,s,i;if(!e._d){for(o=$k(e),e._w&&e._a[Or]==null&&e._a[Ur]==null&&Uk(e),e._dayOfYear!=null&&(i=ro(e._a[Tt],o[Tt]),(e._dayOfYear>Lo(i)||e._dayOfYear===0)&&(Ce(e)._overflowDayOfYear=!0),r=$o(i,0,e._dayOfYear),e._a[Ur]=r.getUTCMonth(),e._a[Or]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=o[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[St]===24&&e._a[fr]===0&&e._a[Yr]===0&&e._a[An]===0&&(e._nextDay=!0,e._a[St]=0),e._d=(e._useUTC?$o:ZS).apply(null,n),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[St]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(Ce(e).weekdayMismatch=!0)}}function Uk(e){var t,r,n,o,s,i,a,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,i=4,r=ro(t.GG,e._a[Tt],Uo(tt(),1,4).year),n=ro(t.W,1),o=ro(t.E,1),(o<1||o>7)&&(c=!0)):(s=e._locale._week.dow,i=e._locale._week.doy,u=Uo(tt(),s,i),r=ro(t.gg,e._a[Tt],u.year),n=ro(t.w,u.week),t.d!=null?(o=t.d,(o<0||o>6)&&(c=!0)):t.e!=null?(o=t.e+s,(t.e<0||t.e>6)&&(c=!0)):o=s),n<1||n>jr(r,s,i)?Ce(e)._overflowWeeks=!0:c!=null?Ce(e)._overflowWeekday=!0:(a=_d(r,n,o,s,i),e._a[Tt]=a.year,e._dayOfYear=a.dayOfYear)}ce.ISO_8601=function(){},ce.RFC_2822=function(){};function rc(e){if(e._f===ce.ISO_8601){Cd(e);return}if(e._f===ce.RFC_2822){Td(e);return}e._a=[],Ce(e).empty=!0;var t=""+e._i,r,n,o,s,i,a=t.length,c=0,u,l;for(o=cd(e._f,e._locale).match(Ua)||[],l=o.length,r=0;r<l;r++)s=o[r],n=(t.match(TS(s,e))||[])[0],n&&(i=t.substr(0,t.indexOf(n)),i.length>0&&Ce(e).unusedInput.push(i),t=t.slice(t.indexOf(n)+n.length),c+=n.length),Xn[s]?(n?Ce(e).empty=!1:Ce(e).unusedTokens.push(s),AS(s,n,e)):e._strict&&!n&&Ce(e).unusedTokens.push(s);Ce(e).charsLeftOver=a-c,t.length>0&&Ce(e).unusedInput.push(t),e._a[St]<=12&&Ce(e).bigHour===!0&&e._a[St]>0&&(Ce(e).bigHour=void 0),Ce(e).parsedDateParts=e._a.slice(0),Ce(e).meridiem=e._meridiem,e._a[St]=Yk(e._locale,e._a[St],e._meridiem),u=Ce(e).era,u!==null&&(e._a[Tt]=e._locale.erasConvertYear(u,e._a[Tt])),tc(e),Qa(e)}function Yk(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function jk(e){var t,r,n,o,s,i,a=!1,c=e._f.length;if(c===0){Ce(e).invalidFormat=!0,e._d=new Date(NaN);return}for(o=0;o<c;o++)s=0,i=!1,t=Wa({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[o],rc(t),Fa(t)&&(i=!0),s+=Ce(t).charsLeftOver,s+=Ce(t).unusedTokens.length*10,Ce(t).score=s,a?s<n&&(n=s,r=t):(n==null||s<n||i)&&(n=s,r=t,i&&(a=!0));sn(e,r||t)}function Vk(e){if(!e._d){var t=ja(e._i),r=t.day===void 0?t.date:t.day;e._a=nd([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),tc(e)}}function Bk(e){var t=new Fo(Qa(Dd(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Dd(e){var t=e._i,r=e._f;return e._locale=e._locale||Vr(e._l),t===null||r===void 0&&t===""?Ns({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),ur(t)?new Fo(Qa(t)):(Io(t)?e._d=t:lr(r)?jk(e):r?rc(e):Hk(e),Fa(e)||(e._d=null),e))}function Hk(e){var t=e._i;Ut(t)?e._d=new Date(ce.now()):Io(t)?e._d=new Date(t.valueOf()):typeof t=="string"?zk(e):lr(t)?(e._a=nd(t.slice(0),function(r){return parseInt(r,10)}),tc(e)):Dn(t)?Vk(e):zr(t)?e._d=new Date(t):ce.createFromInputFallback(e)}function Ad(e,t,r,n,o){var s={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Dn(e)&&Na(e)||lr(e)&&e.length===0)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=r,s._i=e,s._f=t,s._strict=n,Bk(s)}function tt(e,t,r,n){return Ad(e,t,r,n,!1)}var Zk=rr("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Ns()}),Gk=rr("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=tt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Ns()});function Md(e,t){var r,n;if(t.length===1&&lr(t[0])&&(t=t[0]),!t.length)return tt();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function qk(){var e=[].slice.call(arguments,0);return Md("isBefore",e)}function Kk(){var e=[].slice.call(arguments,0);return Md("isAfter",e)}var Jk=function(){return Date.now?Date.now():+new Date},Vo=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Xk(e){var t,r=!1,n,o=Vo.length;for(t in e)if($e(e,t)&&!(mt.call(Vo,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<o;++n)if(e[Vo[n]]){if(r)return!1;parseFloat(e[Vo[n]])!==Fe(e[Vo[n]])&&(r=!0)}return!0}function Qk(){return this._isValid}function ex(){return dr(NaN)}function Hs(e){var t=ja(e),r=t.year||0,n=t.quarter||0,o=t.month||0,s=t.week||t.isoWeek||0,i=t.day||0,a=t.hour||0,c=t.minute||0,u=t.second||0,l=t.millisecond||0;this._isValid=Xk(t),this._milliseconds=+l+u*1e3+c*6e4+a*1e3*60*60,this._days=+i+s*7,this._months=+o+n*3+r*12,this._data={},this._locale=Vr(),this._bubble()}function Zs(e){return e instanceof Hs}function nc(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function tx(e,t,r){var n=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0,i;for(i=0;i<n;i++)Fe(e[i])!==Fe(t[i])&&s++;return s+o}function Pd(e,t){ge(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Er(~~(r/60),2)+t+Er(~~r%60,2)})}Pd("Z",":"),Pd("ZZ",""),fe("Z",$s),fe("ZZ",$s),qe(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=oc($s,e)});var rx=/([\+\-]|\d\d)/gi;function oc(e,t){var r=(t||"").match(e),n,o,s;return r===null?null:(n=r[r.length-1]||[],o=(n+"").match(rx)||["-",0,0],s=+(o[1]*60)+Fe(o[2]),s===0?0:o[0]==="+"?s:-s)}function sc(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(ur(e)||Io(e)?e.valueOf():tt(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),ce.updateOffset(r,!1),r):tt(e).local()}function ic(e){return-Math.round(e._d.getTimezoneOffset())}ce.updateOffset=function(){};function nx(e,t,r){var n=this._offset||0,o;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=oc($s,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(o=ic(this)),this._offset=e,this._isUTC=!0,o!=null&&this.add(o,"m"),n!==e&&(!t||this._changeInProgress?Rd(this,dr(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ce.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:ic(this)}function ox(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function sx(e){return this.utcOffset(0,e)}function ix(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(ic(this),"m")),this}function ax(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=oc(OS,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function cx(e){return this.isValid()?(e=e?tt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function lx(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ux(){if(!Ut(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Wa(e,this),e=Dd(e),e._a?(t=e._isUTC?kr(e._a):tt(e._a),this._isDSTShifted=this.isValid()&&tx(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function fx(){return this.isValid()?!this._isUTC:!1}function dx(){return this.isValid()?this._isUTC:!1}function Nd(){return this.isValid()?this._isUTC&&this._offset===0:!1}var hx=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,px=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function dr(e,t){var r=e,n=null,o,s,i;return Zs(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:zr(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=hx.exec(e))?(o=n[1]==="-"?-1:1,r={y:0,d:Fe(n[Or])*o,h:Fe(n[St])*o,m:Fe(n[fr])*o,s:Fe(n[Yr])*o,ms:Fe(nc(n[An]*1e3))*o}):(n=px.exec(e))?(o=n[1]==="-"?-1:1,r={y:Mn(n[2],o),M:Mn(n[3],o),w:Mn(n[4],o),d:Mn(n[5],o),h:Mn(n[6],o),m:Mn(n[7],o),s:Mn(n[8],o)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(i=mx(tt(r.from),tt(r.to)),r={},r.ms=i.milliseconds,r.M=i.months),s=new Hs(r),Zs(e)&&$e(e,"_locale")&&(s._locale=e._locale),Zs(e)&&$e(e,"_isValid")&&(s._isValid=e._isValid),s}dr.fn=Hs.prototype,dr.invalid=ex;function Mn(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Id(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function mx(e,t){var r;return e.isValid()&&t.isValid()?(t=sc(t,e),e.isBefore(t)?r=Id(e,t):(r=Id(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Fd(e,t){return function(r,n){var o,s;return n!==null&&!isNaN(+n)&&(ad(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=r,r=n,n=s),o=dr(r,n),Rd(this,o,e),this}}function Rd(e,t,r,n){var o=t._milliseconds,s=nc(t._days),i=nc(t._months);e.isValid()&&(n=n??!0,i&&vd(e,zo(e,"Month")+i*r),s&&md(e,"Date",zo(e,"Date")+s*r),o&&e._d.setTime(e._d.valueOf()+o*r),n&&ce.updateOffset(e,s||i))}var gx=Fd(1,"add"),yx=Fd(-1,"subtract");function Wd(e){return typeof e=="string"||e instanceof String}function vx(e){return ur(e)||Io(e)||Wd(e)||zr(e)||wx(e)||bx(e)||e===null||e===void 0}function bx(e){var t=Dn(e)&&!Na(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o,s,i=n.length;for(o=0;o<i;o+=1)s=n[o],r=r||$e(e,s);return t&&r}function wx(e){var t=lr(e),r=!1;return t&&(r=e.filter(function(n){return!zr(n)&&Wd(e)}).length===0),t&&r}function _x(e){var t=Dn(e)&&!Na(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],o,s;for(o=0;o<n.length;o+=1)s=n[o],r=r||$e(e,s);return t&&r}function Sx(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function kx(e,t){arguments.length===1&&(arguments[0]?vx(arguments[0])?(e=arguments[0],t=void 0):_x(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||tt(),n=sc(r,this).startOf("day"),o=ce.calendarFormat(this,n)||"sameElse",s=t&&(xr(t[o])?t[o].call(this,r):t[o]);return this.format(s||this.localeData().calendar(o,this,tt(r)))}function xx(){return new Fo(this)}function Ex(e,t){var r=ur(e)?e:tt(e);return this.isValid()&&r.isValid()?(t=nr(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function Ox(e,t){var r=ur(e)?e:tt(e);return this.isValid()&&r.isValid()?(t=nr(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function Cx(e,t,r,n){var o=ur(e)?e:tt(e),s=ur(t)?t:tt(t);return this.isValid()&&o.isValid()&&s.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(o,r):!this.isBefore(o,r))&&(n[1]===")"?this.isBefore(s,r):!this.isAfter(s,r))):!1}function Tx(e,t){var r=ur(e)?e:tt(e),n;return this.isValid()&&r.isValid()?(t=nr(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function Dx(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Ax(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Mx(e,t,r){var n,o,s;if(!this.isValid())return NaN;if(n=sc(e,this),!n.isValid())return NaN;switch(o=(n.utcOffset()-this.utcOffset())*6e4,t=nr(t),t){case"year":s=Gs(this,n)/12;break;case"month":s=Gs(this,n);break;case"quarter":s=Gs(this,n)/3;break;case"second":s=(this-n)/1e3;break;case"minute":s=(this-n)/6e4;break;case"hour":s=(this-n)/36e5;break;case"day":s=(this-n-o)/864e5;break;case"week":s=(this-n-o)/6048e5;break;default:s=this-n}return r?s:or(s)}function Gs(e,t){if(e.date()<t.date())return-Gs(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),o,s;return t-n<0?(o=e.clone().add(r-1,"months"),s=(t-n)/(n-o)):(o=e.clone().add(r+1,"months"),s=(t-n)/(o-n)),-(r+s)||0}ce.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",ce.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Px(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Nx(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?Fs(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):xr(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Fs(r,"Z")):Fs(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ix(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,o,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(r+n+o+s)}function Fx(e){e||(e=this.isUtc()?ce.defaultFormatUtc:ce.defaultFormat);var t=Fs(this,e);return this.localeData().postformat(t)}function Rx(e,t){return this.isValid()&&(ur(e)&&e.isValid()||tt(e).isValid())?dr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Wx(e){return this.from(tt(),e)}function Lx(e,t){return this.isValid()&&(ur(e)&&e.isValid()||tt(e).isValid())?dr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function zx(e){return this.to(tt(),e)}function Ld(e){var t;return e===void 0?this._locale._abbr:(t=Vr(e),t!=null&&(this._locale=t),this)}var zd=rr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function $d(){return this._locale}var qs=1e3,no=60*qs,Ks=60*no,Ud=(365*400+97)*24*Ks;function oo(e,t){return(e%t+t)%t}function Yd(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Ud:new Date(e,t,r).valueOf()}function jd(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Ud:Date.UTC(e,t,r)}function $x(e){var t,r;if(e=nr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?jd:Yd,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=oo(t+(this._isUTC?0:this.utcOffset()*no),Ks);break;case"minute":t=this._d.valueOf(),t-=oo(t,no);break;case"second":t=this._d.valueOf(),t-=oo(t,qs);break}return this._d.setTime(t),ce.updateOffset(this,!0),this}function Ux(e){var t,r;if(e=nr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?jd:Yd,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Ks-oo(t+(this._isUTC?0:this.utcOffset()*no),Ks)-1;break;case"minute":t=this._d.valueOf(),t+=no-oo(t,no)-1;break;case"second":t=this._d.valueOf(),t+=qs-oo(t,qs)-1;break}return this._d.setTime(t),ce.updateOffset(this,!0),this}function Yx(){return this._d.valueOf()-(this._offset||0)*6e4}function jx(){return Math.floor(this.valueOf()/1e3)}function Vx(){return new Date(this.valueOf())}function Bx(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Hx(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Zx(){return this.isValid()?this.toISOString():null}function Gx(){return Fa(this)}function qx(){return sn({},Ce(this))}function Kx(){return Ce(this).overflow}function Jx(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}ge("N",0,0,"eraAbbr"),ge("NN",0,0,"eraAbbr"),ge("NNN",0,0,"eraAbbr"),ge("NNNN",0,0,"eraName"),ge("NNNNN",0,0,"eraNarrow"),ge("y",["y",1],"yo","eraYear"),ge("y",["yy",2],0,"eraYear"),ge("y",["yyy",3],0,"eraYear"),ge("y",["yyyy",4],0,"eraYear"),fe("N",ac),fe("NN",ac),fe("NNN",ac),fe("NNNN",cE),fe("NNNNN",lE),qe(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var o=r._locale.erasParse(e,n,r._strict);o?Ce(r).era=o:Ce(r).invalidEra=e}),fe("y",Qn),fe("yy",Qn),fe("yyy",Qn),fe("yyyy",Qn),fe("yo",uE),qe(["y","yy","yyy","yyyy"],Tt),qe(["yo"],function(e,t,r,n){var o;r._locale._eraYearOrdinalRegex&&(o=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Tt]=r._locale.eraYearOrdinalParse(e,o):t[Tt]=parseInt(e,10)});function Xx(e,t){var r,n,o,s=this._eras||Vr("en")._eras;for(r=0,n=s.length;r<n;++r)switch(typeof s[r].since==="string"&&(o=ce(s[r].since).startOf("day"),s[r].since=o.valueOf()),typeof s[r].until){case"undefined":s[r].until=1/0;break;case"string":o=ce(s[r].until).startOf("day").valueOf(),s[r].until=o.valueOf();break}return s}function Qx(e,t,r){var n,o,s=this.eras(),i,a,c;for(e=e.toUpperCase(),n=0,o=s.length;n<o;++n)if(i=s[n].name.toUpperCase(),a=s[n].abbr.toUpperCase(),c=s[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(a===e)return s[n];break;case"NNNN":if(i===e)return s[n];break;case"NNNNN":if(c===e)return s[n];break}else if([i,a,c].indexOf(e)>=0)return s[n]}function eE(e,t){var r=e.since<=e.until?1:-1;return t===void 0?ce(e.since).year():ce(e.since).year()+(t-e.offset)*r}function tE(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function rE(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function nE(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function oE(){var e,t,r,n,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(r=o[e].since<=o[e].until?1:-1,n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until||o[e].until<=n&&n<=o[e].since)return(this.year()-ce(o[e].since).year())*r+o[e].offset;return this.year()}function sE(e){return $e(this,"_erasNameRegex")||cc.call(this),e?this._erasNameRegex:this._erasRegex}function iE(e){return $e(this,"_erasAbbrRegex")||cc.call(this),e?this._erasAbbrRegex:this._erasRegex}function aE(e){return $e(this,"_erasNarrowRegex")||cc.call(this),e?this._erasNarrowRegex:this._erasRegex}function ac(e,t){return t.erasAbbrRegex(e)}function cE(e,t){return t.erasNameRegex(e)}function lE(e,t){return t.erasNarrowRegex(e)}function uE(e,t){return t._eraYearOrdinalRegex||Qn}function cc(){var e=[],t=[],r=[],n=[],o,s,i,a,c,u=this.eras();for(o=0,s=u.length;o<s;++o)i=$r(u[o].name),a=$r(u[o].abbr),c=$r(u[o].narrow),t.push(i),e.push(a),r.push(c),n.push(i),n.push(a),n.push(c);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}ge(0,["gg",2],0,function(){return this.weekYear()%100}),ge(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Js(e,t){ge(0,[e,e.length],0,t)}Js("gggg","weekYear"),Js("ggggg","weekYear"),Js("GGGG","isoWeekYear"),Js("GGGGG","isoWeekYear"),fe("G",zs),fe("g",zs),fe("GG",et,Zt),fe("gg",et,Zt),fe("GGGG",Ba,Va),fe("gggg",Ba,Va),fe("GGGGG",Ls,Rs),fe("ggggg",Ls,Rs),Wo(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=Fe(e)}),Wo(["gg","GG"],function(e,t,r,n){t[n]=ce.parseTwoDigitYear(e)});function fE(e){return Vd.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function dE(e){return Vd.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function hE(){return jr(this.year(),1,4)}function pE(){return jr(this.isoWeekYear(),1,4)}function mE(){var e=this.localeData()._week;return jr(this.year(),e.dow,e.doy)}function gE(){var e=this.localeData()._week;return jr(this.weekYear(),e.dow,e.doy)}function Vd(e,t,r,n,o){var s;return e==null?Uo(this,n,o).year:(s=jr(e,n,o),t>s&&(t=s),yE.call(this,e,t,r,n,o))}function yE(e,t,r,n,o){var s=_d(e,t,r,n,o),i=$o(s.year,0,s.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}ge("Q",0,"Qo","quarter"),fe("Q",ud),qe("Q",function(e,t){t[Ur]=(Fe(e)-1)*3});function vE(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}ge("D",["DD",2],"Do","date"),fe("D",et,eo),fe("DD",et,Zt),fe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),qe(["D","DD"],Or),qe("Do",function(e,t){t[Or]=Fe(e.match(et)[0])});var Bd=to("Date",!0);ge("DDD",["DDDD",3],"DDDo","dayOfYear"),fe("DDD",Ws),fe("DDDD",fd),qe(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Fe(e)});function bE(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}ge("m",["mm",2],0,"minute"),fe("m",et,Ha),fe("mm",et,Zt),qe(["m","mm"],fr);var wE=to("Minutes",!1);ge("s",["ss",2],0,"second"),fe("s",et,Ha),fe("ss",et,Zt),qe(["s","ss"],Yr);var _E=to("Seconds",!1);ge("S",0,0,function(){return~~(this.millisecond()/100)}),ge(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),ge(0,["SSS",3],0,"millisecond"),ge(0,["SSSS",4],0,function(){return this.millisecond()*10}),ge(0,["SSSSS",5],0,function(){return this.millisecond()*100}),ge(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),ge(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),ge(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),ge(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),fe("S",Ws,ud),fe("SS",Ws,Zt),fe("SSS",Ws,fd);var cn,Hd;for(cn="SSSS";cn.length<=9;cn+="S")fe(cn,Qn);function SE(e,t){t[An]=Fe(("0."+e)*1e3)}for(cn="S";cn.length<=9;cn+="S")qe(cn,SE);Hd=to("Milliseconds",!1),ge("z",0,0,"zoneAbbr"),ge("zz",0,0,"zoneName");function kE(){return this._isUTC?"UTC":""}function xE(){return this._isUTC?"Coordinated Universal Time":""}var se=Fo.prototype;se.add=gx,se.calendar=kx,se.clone=xx,se.diff=Mx,se.endOf=Ux,se.format=Fx,se.from=Rx,se.fromNow=Wx,se.to=Lx,se.toNow=zx,se.get=IS,se.invalidAt=Kx,se.isAfter=Ex,se.isBefore=Ox,se.isBetween=Cx,se.isSame=Tx,se.isSameOrAfter=Dx,se.isSameOrBefore=Ax,se.isValid=Gx,se.lang=zd,se.locale=Ld,se.localeData=$d,se.max=Gk,se.min=Zk,se.parsingFlags=qx,se.set=FS,se.startOf=$x,se.subtract=yx,se.toArray=Bx,se.toObject=Hx,se.toDate=Vx,se.toISOString=Nx,se.inspect=Ix,typeof Symbol<"u"&&Symbol.for!=null&&(se[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),se.toJSON=Zx,se.toString=Px,se.unix=jx,se.valueOf=Yx,se.creationData=Jx,se.eraName=tE,se.eraNarrow=rE,se.eraAbbr=nE,se.eraYear=oE,se.year=pd,se.isLeapYear=NS,se.weekYear=fE,se.isoWeekYear=dE,se.quarter=se.quarters=vE,se.month=bd,se.daysInMonth=VS,se.week=se.weeks=XS,se.isoWeek=se.isoWeeks=QS,se.weeksInYear=mE,se.weeksInWeekYear=gE,se.isoWeeksInYear=hE,se.isoWeeksInISOWeekYear=pE,se.date=Bd,se.day=se.days=dk,se.weekday=hk,se.isoWeekday=pk,se.dayOfYear=bE,se.hour=se.hours=_k,se.minute=se.minutes=wE,se.second=se.seconds=_E,se.millisecond=se.milliseconds=Hd,se.utcOffset=nx,se.utc=sx,se.local=ix,se.parseZone=ax,se.hasAlignedHourOffset=cx,se.isDST=lx,se.isLocal=fx,se.isUtcOffset=dx,se.isUtc=Nd,se.isUTC=Nd,se.zoneAbbr=kE,se.zoneName=xE,se.dates=rr("dates accessor is deprecated. Use date instead.",Bd),se.months=rr("months accessor is deprecated. Use month instead",bd),se.years=rr("years accessor is deprecated. Use year instead",pd),se.zone=rr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",ox),se.isDSTShifted=rr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ux);function EE(e){return tt(e*1e3)}function OE(){return tt.apply(null,arguments).parseZone()}function Zd(e){return e}var Ue=za.prototype;Ue.calendar=fS,Ue.longDateFormat=mS,Ue.invalidDate=yS,Ue.ordinal=wS,Ue.preparse=Zd,Ue.postformat=Zd,Ue.relativeTime=SS,Ue.pastFuture=kS,Ue.set=lS,Ue.eras=Xx,Ue.erasParse=Qx,Ue.erasConvertYear=eE,Ue.erasAbbrRegex=iE,Ue.erasNameRegex=sE,Ue.erasNarrowRegex=aE,Ue.months=$S,Ue.monthsShort=US,Ue.monthsParse=jS,Ue.monthsRegex=HS,Ue.monthsShortRegex=BS,Ue.week=GS,Ue.firstDayOfYear=JS,Ue.firstDayOfWeek=KS,Ue.weekdays=ak,Ue.weekdaysMin=lk,Ue.weekdaysShort=ck,Ue.weekdaysParse=fk,Ue.weekdaysRegex=mk,Ue.weekdaysShortRegex=gk,Ue.weekdaysMinRegex=yk,Ue.isPM=bk,Ue.meridiem=Sk;function Xs(e,t,r,n){var o=Vr(),s=kr().set(n,t);return o[r](s,e)}function Gd(e,t,r){if(zr(e)&&(t=e,e=void 0),e=e||"",t!=null)return Xs(e,t,r,"month");var n,o=[];for(n=0;n<12;n++)o[n]=Xs(e,n,r,"month");return o}function lc(e,t,r,n){typeof e=="boolean"?(zr(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,zr(t)&&(r=t,t=void 0),t=t||"");var o=Vr(),s=e?o._week.dow:0,i,a=[];if(r!=null)return Xs(t,(r+s)%7,n,"day");for(i=0;i<7;i++)a[i]=Xs(t,(i+s)%7,n,"day");return a}function CE(e,t){return Gd(e,t,"months")}function TE(e,t){return Gd(e,t,"monthsShort")}function DE(e,t,r){return lc(e,t,r,"weekdays")}function AE(e,t,r){return lc(e,t,r,"weekdaysShort")}function ME(e,t,r){return lc(e,t,r,"weekdaysMin")}an("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=Fe(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}}),ce.lang=rr("moment.lang is deprecated. Use moment.locale instead.",an),ce.langData=rr("moment.langData is deprecated. Use moment.localeData instead.",Vr);var Br=Math.abs;function PE(){var e=this._data;return this._milliseconds=Br(this._milliseconds),this._days=Br(this._days),this._months=Br(this._months),e.milliseconds=Br(e.milliseconds),e.seconds=Br(e.seconds),e.minutes=Br(e.minutes),e.hours=Br(e.hours),e.months=Br(e.months),e.years=Br(e.years),this}function qd(e,t,r,n){var o=dr(t,r);return e._milliseconds+=n*o._milliseconds,e._days+=n*o._days,e._months+=n*o._months,e._bubble()}function NE(e,t){return qd(this,e,t,1)}function IE(e,t){return qd(this,e,t,-1)}function Kd(e){return e<0?Math.floor(e):Math.ceil(e)}function FE(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,o,s,i,a,c;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=Kd(uc(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,o=or(e/1e3),n.seconds=o%60,s=or(o/60),n.minutes=s%60,i=or(s/60),n.hours=i%24,t+=or(i/24),c=or(Jd(t)),r+=c,t-=Kd(uc(c)),a=or(r/12),r%=12,n.days=t,n.months=r,n.years=a,this}function Jd(e){return e*4800/146097}function uc(e){return e*146097/4800}function RE(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=nr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+Jd(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(uc(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function Hr(e){return function(){return this.as(e)}}var Xd=Hr("ms"),WE=Hr("s"),LE=Hr("m"),zE=Hr("h"),$E=Hr("d"),UE=Hr("w"),YE=Hr("M"),jE=Hr("Q"),VE=Hr("y"),BE=Xd;function HE(){return dr(this)}function ZE(e){return e=nr(e),this.isValid()?this[e+"s"]():NaN}function Pn(e){return function(){return this.isValid()?this._data[e]:NaN}}var GE=Pn("milliseconds"),qE=Pn("seconds"),KE=Pn("minutes"),JE=Pn("hours"),XE=Pn("days"),QE=Pn("months"),eO=Pn("years");function tO(){return or(this.days()/7)}var Zr=Math.round,so={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function rO(e,t,r,n,o){return o.relativeTime(t||1,!!r,e,n)}function nO(e,t,r,n){var o=dr(e).abs(),s=Zr(o.as("s")),i=Zr(o.as("m")),a=Zr(o.as("h")),c=Zr(o.as("d")),u=Zr(o.as("M")),l=Zr(o.as("w")),f=Zr(o.as("y")),d=s<=r.ss&&["s",s]||s<r.s&&["ss",s]||i<=1&&["m"]||i<r.m&&["mm",i]||a<=1&&["h"]||a<r.h&&["hh",a]||c<=1&&["d"]||c<r.d&&["dd",c];return r.w!=null&&(d=d||l<=1&&["w"]||l<r.w&&["ww",l]),d=d||u<=1&&["M"]||u<r.M&&["MM",u]||f<=1&&["y"]||["yy",f],d[2]=t,d[3]=+e>0,d[4]=n,rO.apply(null,d)}function oO(e){return e===void 0?Zr:typeof e=="function"?(Zr=e,!0):!1}function sO(e,t){return so[e]===void 0?!1:t===void 0?so[e]:(so[e]=t,e==="s"&&(so.ss=t-1),!0)}function iO(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=so,o,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},so,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),o=this.localeData(),s=nO(this,!r,n,o),r&&(s=o.pastFuture(+this,s)),o.postformat(s)}var fc=Math.abs;function io(e){return(e>0)-(e<0)||+e}function Qs(){if(!this.isValid())return this.localeData().invalidDate();var e=fc(this._milliseconds)/1e3,t=fc(this._days),r=fc(this._months),n,o,s,i,a=this.asSeconds(),c,u,l,f;return a?(n=or(e/60),o=or(n/60),e%=60,n%=60,s=or(r/12),r%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=io(this._months)!==io(a)?"-":"",l=io(this._days)!==io(a)?"-":"",f=io(this._milliseconds)!==io(a)?"-":"",c+"P"+(s?u+s+"Y":"")+(r?u+r+"M":"")+(t?l+t+"D":"")+(o||n||e?"T":"")+(o?f+o+"H":"")+(n?f+n+"M":"")+(e?f+i+"S":"")):"P0D"}var ze=Hs.prototype;ze.isValid=Qk,ze.abs=PE,ze.add=NE,ze.subtract=IE,ze.as=RE,ze.asMilliseconds=Xd,ze.asSeconds=WE,ze.asMinutes=LE,ze.asHours=zE,ze.asDays=$E,ze.asWeeks=UE,ze.asMonths=YE,ze.asQuarters=jE,ze.asYears=VE,ze.valueOf=BE,ze._bubble=FE,ze.clone=HE,ze.get=ZE,ze.milliseconds=GE,ze.seconds=qE,ze.minutes=KE,ze.hours=JE,ze.days=XE,ze.weeks=tO,ze.months=QE,ze.years=eO,ze.humanize=iO,ze.toISOString=Qs,ze.toString=Qs,ze.toJSON=Qs,ze.locale=Ld,ze.localeData=$d,ze.toIsoString=rr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qs),ze.lang=zd,ge("X",0,0,"unix"),ge("x",0,0,"valueOf"),fe("x",zs),fe("X",CS),qe("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}),qe("x",function(e,t,r){r._d=new Date(Fe(e))});ce.version="2.30.1",aS(tt),ce.fn=se,ce.min=qk,ce.max=Kk,ce.now=Jk,ce.utc=kr,ce.unix=EE,ce.months=CE,ce.isDate=Io,ce.locale=an,ce.invalid=Ns,ce.duration=dr,ce.isMoment=ur,ce.weekdays=DE,ce.parseZone=OE,ce.localeData=Vr,ce.isDuration=Zs,ce.monthsShort=TE,ce.weekdaysMin=ME,ce.defineLocale=Xa,ce.updateLocale=Ok,ce.locales=Ck,ce.weekdaysShort=AE,ce.normalizeUnits=nr,ce.relativeTimeRounding=oO,ce.relativeTimeThreshold=sO,ce.calendarFormat=Sx,ce.prototype=se,ce.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Qd=(e,t,r)=>{if(e&&"reportValidity"in e){const n=ae(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},dc=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Qd(n.ref,r,e):n&&n.refs&&n.refs.forEach(o=>Qd(o,r,e))}},eh=(e,t)=>{t.shouldUseNativeValidation&&dc(e,t);const r={};for(const n in e){const o=ae(t.fields,n),s=Object.assign(e[n]||{},{ref:o&&o.ref});if(aO(t.names||Object.keys(e),n)){const i=Object.assign({},ae(r,n));Ve(i,"root",s),Ve(r,n,i)}else Ve(r,n,s)}return r},aO=(e,t)=>{const r=th(t);return e.some(n=>th(n).match(`^${r}\\.\\d+`))};function th(e){return e.replace(/\]|\[/g,"")}function rh(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function cO(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,i=n.path.join(".");if(!r[i])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[i]={message:a.message,type:a.code}}else r[i]={message:s,type:o};if("unionErrors"in n&&n.unionErrors.forEach(function(l){return l.errors.forEach(function(f){return e.push(f)})}),t){var c=r[i].types,u=c&&c[n.code];r[i]=ba(i,t,r,o,u?[].concat(u,n.message):n.message)}e.shift()}return r}function lO(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,i=n.path.join(".");if(!r[i])if(n.code==="invalid_union"&&n.errors.length>0){var a=n.errors[0][0];r[i]={message:a.message,type:a.code}}else r[i]={message:s,type:o};if(n.code==="invalid_union"&&n.errors.forEach(function(l){return l.forEach(function(f){return e.push(f)})}),t){var c=r[i].types,u=c&&c[n.code];r[i]=ba(i,t,r,o,u?[].concat(u,n.message):n.message)}e.shift()}return r}function uO(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,o,s){try{return Promise.resolve(rh(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(i){return s.shouldUseNativeValidation&&dc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return Array.isArray(a?.issues)})(i))return{values:{},errors:eh(cO(i.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,o,s){try{return Promise.resolve(rh(function(){return Promise.resolve((r.mode==="sync"?zb:$b)(e,n,t)).then(function(i){return s.shouldUseNativeValidation&&dc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return a instanceof Da})(i))return{values:{},errors:eh(lO(i.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const{entries:nh,setPrototypeOf:oh,isFrozen:fO,getPrototypeOf:dO,getOwnPropertyDescriptor:hO}=Object;let{freeze:Wt,seal:sr,create:hc}=Object,{apply:pc,construct:mc}=typeof Reflect<"u"&&Reflect;Wt||(Wt=function(t){return t}),sr||(sr=function(t){return t}),pc||(pc=function(t,r){for(var n=arguments.length,o=new Array(n>2?n-2:0),s=2;s<n;s++)o[s-2]=arguments[s];return t.apply(r,o)}),mc||(mc=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return new t(...n)});const ei=zt(Array.prototype.forEach),pO=zt(Array.prototype.lastIndexOf),sh=zt(Array.prototype.pop),Bo=zt(Array.prototype.push),mO=zt(Array.prototype.splice),ti=zt(String.prototype.toLowerCase),gc=zt(String.prototype.toString),yc=zt(String.prototype.match),Ho=zt(String.prototype.replace),gO=zt(String.prototype.indexOf),yO=zt(String.prototype.trim),hr=zt(Object.prototype.hasOwnProperty),Lt=zt(RegExp.prototype.test),Zo=vO(TypeError);function zt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return pc(e,t,n)}}function vO(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mc(e,r)}}function Pe(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ti;oh&&oh(e,null);let n=t.length;for(;n--;){let o=t[n];if(typeof o=="string"){const s=r(o);s!==o&&(fO(t)||(t[n]=s),o=s)}e[o]=!0}return e}function bO(e){for(let t=0;t<e.length;t++)hr(e,t)||(e[t]=null);return e}function Cr(e){const t=hc(null);for(const[r,n]of nh(e))hr(e,r)&&(Array.isArray(n)?t[r]=bO(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=Cr(n):t[r]=n);return t}function Go(e,t){for(;e!==null;){const n=hO(e,t);if(n){if(n.get)return zt(n.get);if(typeof n.value=="function")return zt(n.value)}e=dO(e)}function r(){return null}return r}const ih=Wt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),vc=Wt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),bc=Wt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),wO=Wt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),wc=Wt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),_O=Wt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ah=Wt(["#text"]),ch=Wt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),_c=Wt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),lh=Wt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ri=Wt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),SO=sr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),kO=sr(/<%[\w\W]*|[\w\W]*%>/gm),xO=sr(/\$\{[\w\W]*/gm),EO=sr(/^data-[\-\w.\u00B7-\uFFFF]+$/),OO=sr(/^aria-[\-\w]+$/),uh=sr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),CO=sr(/^(?:\w+script|data):/i),TO=sr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fh=sr(/^html$/i),DO=sr(/^[a-z][.\w]*(-[.\w]+)+$/i);var dh=Object.freeze({__proto__:null,ARIA_ATTR:OO,ATTR_WHITESPACE:TO,CUSTOM_ELEMENT:DO,DATA_ATTR:EO,DOCTYPE_NAME:fh,ERB_EXPR:kO,IS_ALLOWED_URI:uh,IS_SCRIPT_OR_DATA:CO,MUSTACHE_EXPR:SO,TMPLIT_EXPR:xO});const qo={element:1,text:3,progressingInstruction:7,comment:8,document:9},AO=function(){return typeof window>"u"?null:window},MO=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(n=r.getAttribute(o));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},hh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ph(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:AO();const t=ye=>ph(ye);if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==qo.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const n=r,o=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:i,Node:a,Element:c,NodeFilter:u,NamedNodeMap:l=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:h}=e,m=c.prototype,p=Go(m,"cloneNode"),g=Go(m,"remove"),y=Go(m,"nextSibling"),O=Go(m,"childNodes"),x=Go(m,"parentNode");if(typeof i=="function"){const ye=r.createElement("template");ye.content&&ye.content.ownerDocument&&(r=ye.content.ownerDocument)}let w,_="";const{implementation:S,createNodeIterator:I,createDocumentFragment:v,getElementsByTagName:E}=r,{importNode:P}=n;let A=hh();t.isSupported=typeof nh=="function"&&typeof x=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:M,ERB_EXPR:F,TMPLIT_EXPR:N,DATA_ATTR:W,ARIA_ATTR:C,IS_SCRIPT_OR_DATA:k,ATTR_WHITESPACE:Y,CUSTOM_ELEMENT:$}=dh;let{IS_ALLOWED_URI:D}=dh,V=null;const Z=Pe({},[...ih,...vc,...bc,...wc,...ah]);let G=null;const B=Pe({},[...ch,..._c,...lh,...ri]);let L=Object.seal(hc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),J=null,q=null;const oe=Object.seal(hc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Q=!0,ne=!0,le=!1,K=!0,Se=!1,Ie=!0,ke=!1,Ge=!1,Re=!1,We=!1,rt=!1,nt=!1,R=!0,j=!1;const H="user-content-";let ee=!0,te=!1,re={},ue=null;const be=Pe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ee=null;const Le=Pe({},["audio","video","img","source","image","track"]);let ot=null;const Qe=Pe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xt="http://www.w3.org/1998/Math/MathML",gt="http://www.w3.org/2000/svg",dt="http://www.w3.org/1999/xhtml";let jt=dt,_r=!1,Sr=null;const _e=Pe({},[xt,gt,dt],gc);let De=Pe({},["mi","mo","mn","ms","mtext"]),ve=Pe({},["annotation-xml"]);const Oe=Pe({},["title","style","font","a","script"]);let Je=null;const xe=["application/xhtml+xml","text/html"],en="text/html";let ct=null,Pt=null;const Qt=r.createElement("form"),Eo=function(z){return z instanceof RegExp||z instanceof Function},Fu=function(){let z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Pt&&Pt===z)){if((!z||typeof z!="object")&&(z={}),z=Cr(z),Je=xe.indexOf(z.PARSER_MEDIA_TYPE)===-1?en:z.PARSER_MEDIA_TYPE,ct=Je==="application/xhtml+xml"?gc:ti,V=hr(z,"ALLOWED_TAGS")?Pe({},z.ALLOWED_TAGS,ct):Z,G=hr(z,"ALLOWED_ATTR")?Pe({},z.ALLOWED_ATTR,ct):B,Sr=hr(z,"ALLOWED_NAMESPACES")?Pe({},z.ALLOWED_NAMESPACES,gc):_e,ot=hr(z,"ADD_URI_SAFE_ATTR")?Pe(Cr(Qe),z.ADD_URI_SAFE_ATTR,ct):Qe,Ee=hr(z,"ADD_DATA_URI_TAGS")?Pe(Cr(Le),z.ADD_DATA_URI_TAGS,ct):Le,ue=hr(z,"FORBID_CONTENTS")?Pe({},z.FORBID_CONTENTS,ct):be,J=hr(z,"FORBID_TAGS")?Pe({},z.FORBID_TAGS,ct):Cr({}),q=hr(z,"FORBID_ATTR")?Pe({},z.FORBID_ATTR,ct):Cr({}),re=hr(z,"USE_PROFILES")?z.USE_PROFILES:!1,Q=z.ALLOW_ARIA_ATTR!==!1,ne=z.ALLOW_DATA_ATTR!==!1,le=z.ALLOW_UNKNOWN_PROTOCOLS||!1,K=z.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Se=z.SAFE_FOR_TEMPLATES||!1,Ie=z.SAFE_FOR_XML!==!1,ke=z.WHOLE_DOCUMENT||!1,We=z.RETURN_DOM||!1,rt=z.RETURN_DOM_FRAGMENT||!1,nt=z.RETURN_TRUSTED_TYPE||!1,Re=z.FORCE_BODY||!1,R=z.SANITIZE_DOM!==!1,j=z.SANITIZE_NAMED_PROPS||!1,ee=z.KEEP_CONTENT!==!1,te=z.IN_PLACE||!1,D=z.ALLOWED_URI_REGEXP||uh,jt=z.NAMESPACE||dt,De=z.MATHML_TEXT_INTEGRATION_POINTS||De,ve=z.HTML_INTEGRATION_POINTS||ve,L=z.CUSTOM_ELEMENT_HANDLING||{},z.CUSTOM_ELEMENT_HANDLING&&Eo(z.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(L.tagNameCheck=z.CUSTOM_ELEMENT_HANDLING.tagNameCheck),z.CUSTOM_ELEMENT_HANDLING&&Eo(z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(L.attributeNameCheck=z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),z.CUSTOM_ELEMENT_HANDLING&&typeof z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(L.allowCustomizedBuiltInElements=z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Se&&(ne=!1),rt&&(We=!0),re&&(V=Pe({},ah),G=[],re.html===!0&&(Pe(V,ih),Pe(G,ch)),re.svg===!0&&(Pe(V,vc),Pe(G,_c),Pe(G,ri)),re.svgFilters===!0&&(Pe(V,bc),Pe(G,_c),Pe(G,ri)),re.mathMl===!0&&(Pe(V,wc),Pe(G,lh),Pe(G,ri))),z.ADD_TAGS&&(typeof z.ADD_TAGS=="function"?oe.tagCheck=z.ADD_TAGS:(V===Z&&(V=Cr(V)),Pe(V,z.ADD_TAGS,ct))),z.ADD_ATTR&&(typeof z.ADD_ATTR=="function"?oe.attributeCheck=z.ADD_ATTR:(G===B&&(G=Cr(G)),Pe(G,z.ADD_ATTR,ct))),z.ADD_URI_SAFE_ATTR&&Pe(ot,z.ADD_URI_SAFE_ATTR,ct),z.FORBID_CONTENTS&&(ue===be&&(ue=Cr(ue)),Pe(ue,z.FORBID_CONTENTS,ct)),z.ADD_FORBID_CONTENTS&&(ue===be&&(ue=Cr(ue)),Pe(ue,z.ADD_FORBID_CONTENTS,ct)),ee&&(V["#text"]=!0),ke&&Pe(V,["html","head","body"]),V.table&&(Pe(V,["tbody"]),delete J.tbody),z.TRUSTED_TYPES_POLICY){if(typeof z.TRUSTED_TYPES_POLICY.createHTML!="function")throw Zo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof z.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Zo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=z.TRUSTED_TYPES_POLICY,_=w.createHTML("")}else w===void 0&&(w=MO(h,o)),w!==null&&typeof _=="string"&&(_=w.createHTML(""));Wt&&Wt(z),Pt=z}},Hv=Pe({},[...vc,...bc,...wO]),Zv=Pe({},[...wc,..._O]),xR=function(z){let ie=x(z);(!ie||!ie.tagName)&&(ie={namespaceURI:jt,tagName:"template"});const pe=ti(z.tagName),lt=ti(ie.tagName);return Sr[z.namespaceURI]?z.namespaceURI===gt?ie.namespaceURI===dt?pe==="svg":ie.namespaceURI===xt?pe==="svg"&&(lt==="annotation-xml"||De[lt]):!!Hv[pe]:z.namespaceURI===xt?ie.namespaceURI===dt?pe==="math":ie.namespaceURI===gt?pe==="math"&&ve[lt]:!!Zv[pe]:z.namespaceURI===dt?ie.namespaceURI===gt&&!ve[lt]||ie.namespaceURI===xt&&!De[lt]?!1:!Zv[pe]&&(Oe[pe]||!Hv[pe]):!!(Je==="application/xhtml+xml"&&Sr[z.namespaceURI]):!1},Wr=function(z){Bo(t.removed,{element:z});try{x(z).removeChild(z)}catch{g(z)}},Bn=function(z,ie){try{Bo(t.removed,{attribute:ie.getAttributeNode(z),from:ie})}catch{Bo(t.removed,{attribute:null,from:ie})}if(ie.removeAttribute(z),z==="is")if(We||rt)try{Wr(ie)}catch{}else try{ie.setAttribute(z,"")}catch{}},Gv=function(z){let ie=null,pe=null;if(Re)z="<remove></remove>"+z;else{const _t=yc(z,/^[\r\n\t ]+/);pe=_t&&_t[0]}Je==="application/xhtml+xml"&&jt===dt&&(z='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+z+"</body></html>");const lt=w?w.createHTML(z):z;if(jt===dt)try{ie=new d().parseFromString(lt,Je)}catch{}if(!ie||!ie.documentElement){ie=S.createDocument(jt,"template",null);try{ie.documentElement.innerHTML=_r?_:lt}catch{}}const Nt=ie.body||ie.documentElement;return z&&pe&&Nt.insertBefore(r.createTextNode(pe),Nt.childNodes[0]||null),jt===dt?E.call(ie,ke?"html":"body")[0]:ke?ie.documentElement:Nt},qv=function(z){return I.call(z.ownerDocument||z,z,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Ru=function(z){return z instanceof f&&(typeof z.nodeName!="string"||typeof z.textContent!="string"||typeof z.removeChild!="function"||!(z.attributes instanceof l)||typeof z.removeAttribute!="function"||typeof z.setAttribute!="function"||typeof z.namespaceURI!="string"||typeof z.insertBefore!="function"||typeof z.hasChildNodes!="function")},Kv=function(z){return typeof a=="function"&&z instanceof a};function tn(ye,z,ie){ei(ye,pe=>{pe.call(t,z,ie,Pt)})}const Jv=function(z){let ie=null;if(tn(A.beforeSanitizeElements,z,null),Ru(z))return Wr(z),!0;const pe=ct(z.nodeName);if(tn(A.uponSanitizeElement,z,{tagName:pe,allowedTags:V}),Ie&&z.hasChildNodes()&&!Kv(z.firstElementChild)&&Lt(/<[/\w!]/g,z.innerHTML)&&Lt(/<[/\w!]/g,z.textContent)||z.nodeType===qo.progressingInstruction||Ie&&z.nodeType===qo.comment&&Lt(/<[/\w]/g,z.data))return Wr(z),!0;if(!(oe.tagCheck instanceof Function&&oe.tagCheck(pe))&&(!V[pe]||J[pe])){if(!J[pe]&&Qv(pe)&&(L.tagNameCheck instanceof RegExp&&Lt(L.tagNameCheck,pe)||L.tagNameCheck instanceof Function&&L.tagNameCheck(pe)))return!1;if(ee&&!ue[pe]){const lt=x(z)||z.parentNode,Nt=O(z)||z.childNodes;if(Nt&&lt){const _t=Nt.length;for(let Vt=_t-1;Vt>=0;--Vt){const rn=p(Nt[Vt],!0);rn.__removalCount=(z.__removalCount||0)+1,lt.insertBefore(rn,y(z))}}}return Wr(z),!0}return z instanceof c&&!xR(z)||(pe==="noscript"||pe==="noembed"||pe==="noframes")&&Lt(/<\/no(script|embed|frames)/i,z.innerHTML)?(Wr(z),!0):(Se&&z.nodeType===qo.text&&(ie=z.textContent,ei([M,F,N],lt=>{ie=Ho(ie,lt," ")}),z.textContent!==ie&&(Bo(t.removed,{element:z.cloneNode()}),z.textContent=ie)),tn(A.afterSanitizeElements,z,null),!1)},Xv=function(z,ie,pe){if(R&&(ie==="id"||ie==="name")&&(pe in r||pe in Qt))return!1;if(!(ne&&!q[ie]&&Lt(W,ie))){if(!(Q&&Lt(C,ie))){if(!(oe.attributeCheck instanceof Function&&oe.attributeCheck(ie,z))){if(!G[ie]||q[ie]){if(!(Qv(z)&&(L.tagNameCheck instanceof RegExp&&Lt(L.tagNameCheck,z)||L.tagNameCheck instanceof Function&&L.tagNameCheck(z))&&(L.attributeNameCheck instanceof RegExp&&Lt(L.attributeNameCheck,ie)||L.attributeNameCheck instanceof Function&&L.attributeNameCheck(ie,z))||ie==="is"&&L.allowCustomizedBuiltInElements&&(L.tagNameCheck instanceof RegExp&&Lt(L.tagNameCheck,pe)||L.tagNameCheck instanceof Function&&L.tagNameCheck(pe))))return!1}else if(!ot[ie]){if(!Lt(D,Ho(pe,Y,""))){if(!((ie==="src"||ie==="xlink:href"||ie==="href")&&z!=="script"&&gO(pe,"data:")===0&&Ee[z])){if(!(le&&!Lt(k,Ho(pe,Y,"")))){if(pe)return!1}}}}}}}return!0},Qv=function(z){return z!=="annotation-xml"&&yc(z,$)},eb=function(z){tn(A.beforeSanitizeAttributes,z,null);const{attributes:ie}=z;if(!ie||Ru(z))return;const pe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let lt=ie.length;for(;lt--;){const Nt=ie[lt],{name:_t,namespaceURI:Vt,value:rn}=Nt,Oo=ct(_t),Wu=rn;let Ct=_t==="value"?Wu:yO(Wu);if(pe.attrName=Oo,pe.attrValue=Ct,pe.keepAttr=!0,pe.forceKeepAttr=void 0,tn(A.uponSanitizeAttribute,z,pe),Ct=pe.attrValue,j&&(Oo==="id"||Oo==="name")&&(Bn(_t,z),Ct=H+Ct),Ie&&Lt(/((--!?|])>)|<\/(style|title|textarea)/i,Ct)){Bn(_t,z);continue}if(Oo==="attributename"&&yc(Ct,"href")){Bn(_t,z);continue}if(pe.forceKeepAttr)continue;if(!pe.keepAttr){Bn(_t,z);continue}if(!K&&Lt(/\/>/i,Ct)){Bn(_t,z);continue}Se&&ei([M,F,N],rb=>{Ct=Ho(Ct,rb," ")});const tb=ct(z.nodeName);if(!Xv(tb,Oo,Ct)){Bn(_t,z);continue}if(w&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Vt)switch(h.getAttributeType(tb,Oo)){case"TrustedHTML":{Ct=w.createHTML(Ct);break}case"TrustedScriptURL":{Ct=w.createScriptURL(Ct);break}}if(Ct!==Wu)try{Vt?z.setAttributeNS(Vt,_t,Ct):z.setAttribute(_t,Ct),Ru(z)?Wr(z):sh(t.removed)}catch{Bn(_t,z)}}tn(A.afterSanitizeAttributes,z,null)},ER=function ye(z){let ie=null;const pe=qv(z);for(tn(A.beforeSanitizeShadowDOM,z,null);ie=pe.nextNode();)tn(A.uponSanitizeShadowNode,ie,null),Jv(ie),eb(ie),ie.content instanceof s&&ye(ie.content);tn(A.afterSanitizeShadowDOM,z,null)};return t.sanitize=function(ye){let z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=null,pe=null,lt=null,Nt=null;if(_r=!ye,_r&&(ye="<!-->"),typeof ye!="string"&&!Kv(ye))if(typeof ye.toString=="function"){if(ye=ye.toString(),typeof ye!="string")throw Zo("dirty is not a string, aborting")}else throw Zo("toString is not a function");if(!t.isSupported)return ye;if(Ge||Fu(z),t.removed=[],typeof ye=="string"&&(te=!1),te){if(ye.nodeName){const rn=ct(ye.nodeName);if(!V[rn]||J[rn])throw Zo("root node is forbidden and cannot be sanitized in-place")}}else if(ye instanceof a)ie=Gv("<!---->"),pe=ie.ownerDocument.importNode(ye,!0),pe.nodeType===qo.element&&pe.nodeName==="BODY"||pe.nodeName==="HTML"?ie=pe:ie.appendChild(pe);else{if(!We&&!Se&&!ke&&ye.indexOf("<")===-1)return w&&nt?w.createHTML(ye):ye;if(ie=Gv(ye),!ie)return We?null:nt?_:""}ie&&Re&&Wr(ie.firstChild);const _t=qv(te?ye:ie);for(;lt=_t.nextNode();)Jv(lt),eb(lt),lt.content instanceof s&&ER(lt.content);if(te)return ye;if(We){if(rt)for(Nt=v.call(ie.ownerDocument);ie.firstChild;)Nt.appendChild(ie.firstChild);else Nt=ie;return(G.shadowroot||G.shadowrootmode)&&(Nt=P.call(n,Nt,!0)),Nt}let Vt=ke?ie.outerHTML:ie.innerHTML;return ke&&V["!doctype"]&&ie.ownerDocument&&ie.ownerDocument.doctype&&ie.ownerDocument.doctype.name&&Lt(fh,ie.ownerDocument.doctype.name)&&(Vt="<!DOCTYPE "+ie.ownerDocument.doctype.name+`>
43
+ `+Vt),Se&&ei([M,F,N],rn=>{Vt=Ho(Vt,rn," ")}),w&&nt?w.createHTML(Vt):Vt},t.setConfig=function(){let ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fu(ye),Ge=!0},t.clearConfig=function(){Pt=null,Ge=!1},t.isValidAttribute=function(ye,z,ie){Pt||Fu({});const pe=ct(ye),lt=ct(z);return Xv(pe,lt,ie)},t.addHook=function(ye,z){typeof z=="function"&&Bo(A[ye],z)},t.removeHook=function(ye,z){if(z!==void 0){const ie=pO(A[ye],z);return ie===-1?void 0:mO(A[ye],ie,1)[0]}return sh(A[ye])},t.removeHooks=function(ye){A[ye]=[]},t.removeAllHooks=function(){A=hh()},t}var PO=ph();function mh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nn(...e){return t=>{let r=!1;const n=e.map(o=>{const s=mh(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():mh(e[o],null)}}}}function He(...e){return b.useCallback(Nn(...e),e)}var NO=Symbol.for("react.lazy"),ni=b[" use ".trim().toString()];function IO(e){return typeof e=="object"&&e!==null&&"then"in e}function gh(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===NO&&"_payload"in e&&IO(e._payload)}function yh(e){const t=FO(e),r=b.forwardRef((n,o)=>{let{children:s,...i}=n;gh(s)&&typeof ni=="function"&&(s=ni(s._payload));const a=b.Children.toArray(s),c=a.find(WO);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var vh=yh("Slot");function FO(e){const t=b.forwardRef((r,n)=>{let{children:o,...s}=r;if(gh(o)&&typeof ni=="function"&&(o=ni(o._payload)),b.isValidElement(o)){const i=zO(o),a=LO(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Nn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var RO=Symbol("radix.slottable");function WO(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===RO}function LO(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function zO(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function bh(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=bh(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function oi(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=bh(e))&&(n&&(n+=" "),n+=t);return n}const $O=(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},UO=(e,t)=>({classGroupId:e,validator:t}),wh=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),si="-",_h=[],YO="arbitrary..",jO=e=>{const t=BO(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return VO(i);const a=i.split(si),c=a[0]===""&&a.length>1?1:0;return Sh(a,c,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=n[i],u=r[i];return c?u?$O(u,c):c:u||_h}return r[i]||_h}}},Sh=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const u=Sh(e,t+1,s);if(u)return u}const i=r.validators;if(i===null)return;const a=t===0?e.join(si):e.slice(t).join(si),c=i.length;for(let u=0;u<c;u++){const l=i[u];if(l.validator(a))return l.classGroupId}},VO=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?YO+n:void 0})(),BO=e=>{const{theme:t,classGroups:r}=e;return HO(r,t)},HO=(e,t)=>{const r=wh();for(const n in e){const o=e[n];Sc(o,r,n,t)}return r},Sc=(e,t,r,n)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];ZO(i,t,r,n)}},ZO=(e,t,r,n)=>{if(typeof e=="string"){GO(e,t,r);return}if(typeof e=="function"){qO(e,t,r,n);return}KO(e,t,r,n)},GO=(e,t,r)=>{const n=e===""?t:kh(t,e);n.classGroupId=r},qO=(e,t,r,n)=>{if(JO(e)){Sc(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(UO(r,e))},KO=(e,t,r,n)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[a,c]=o[i];Sc(c,kh(t,a),r,n)}},kh=(e,t)=>{let r=e;const n=t.split(si),o=n.length;for(let s=0;s<o;s++){const i=n[s];let a=r.nextPart.get(i);a||(a=wh(),r.nextPart.set(i,a)),r=a}return r},JO=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,XO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(s,i)=>{r[s]=i,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let i=r[s];if(i!==void 0)return i;if((i=n[s])!==void 0)return o(s,i),i},set(s,i){s in r?r[s]=i:o(s,i)}}},kc="!",xh=":",QO=[],Eh=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),eC=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let i=0,a=0,c=0,u;const l=o.length;for(let p=0;p<l;p++){const g=o[p];if(i===0&&a===0){if(g===xh){s.push(o.slice(c,p)),c=p+1;continue}if(g==="/"){u=p;continue}}g==="["?i++:g==="]"?i--:g==="("?a++:g===")"&&a--}const f=s.length===0?o:o.slice(c);let d=f,h=!1;f.endsWith(kc)?(d=f.slice(0,-1),h=!0):f.startsWith(kc)&&(d=f.slice(1),h=!0);const m=u&&u>c?u-c:void 0;return Eh(s,h,d,m)};if(t){const o=t+xh,s=n;n=i=>i.startsWith(o)?s(i.slice(o.length)):Eh(QO,!1,i,void 0,!0)}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},tC=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let s=0;s<r.length;s++){const i=r[s],a=i[0]==="[",c=t.has(i);a||c?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(i)):o.push(i)}return o.length>0&&(o.sort(),n.push(...o)),n}},rC=e=>({cache:XO(e.cacheSize),parseClassName:eC(e),sortModifiers:tC(e),...jO(e)}),nC=/\s+/,oC=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(nC);let c="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}=r(l);if(f){c=l+(c.length>0?" "+c:c);continue}let g=!!p,y=n(g?m.substring(0,p):m);if(!y){if(!g){c=l+(c.length>0?" "+c:c);continue}if(y=n(m),!y){c=l+(c.length>0?" "+c:c);continue}g=!1}const O=d.length===0?"":d.length===1?d[0]:s(d).join(":"),x=h?O+kc:O,w=x+y;if(i.indexOf(w)>-1)continue;i.push(w);const _=o(y,g);for(let S=0;S<_.length;++S){const I=_[S];i.push(x+I)}c=l+(c.length>0?" "+c:c)}return c},sC=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Oh(r))&&(o&&(o+=" "),o+=n);return o},Oh=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Oh(e[n]))&&(r&&(r+=" "),r+=t);return r},iC=(e,...t)=>{let r,n,o,s;const i=c=>{const u=t.reduce((l,f)=>f(l),e());return r=rC(u),n=r.cache.get,o=r.cache.set,s=a,a(c)},a=c=>{const u=n(c);if(u)return u;const l=oC(c,r);return o(c,l),l};return s=i,(...c)=>s(sC(...c))},aC=[],kt=e=>{const t=r=>r[e]||aC;return t.isThemeGetter=!0,t},Ch=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Th=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,lC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uC=/\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$/,fC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ln=e=>cC.test(e),Me=e=>!!e&&!Number.isNaN(Number(e)),un=e=>!!e&&Number.isInteger(Number(e)),xc=e=>e.endsWith("%")&&Me(e.slice(0,-1)),Gr=e=>lC.test(e),Dh=()=>!0,pC=e=>uC.test(e)&&!fC.test(e),Ec=()=>!1,mC=e=>dC.test(e),gC=e=>hC.test(e),yC=e=>!de(e)&&!he(e),vC=e=>fn(e,Fh,Ec),de=e=>Ch.test(e),In=e=>fn(e,Rh,pC),Ah=e=>fn(e,OC,Me),bC=e=>fn(e,Lh,Dh),wC=e=>fn(e,Wh,Ec),Mh=e=>fn(e,Nh,Ec),_C=e=>fn(e,Ih,gC),ii=e=>fn(e,zh,mC),he=e=>Th.test(e),Ko=e=>Fn(e,Rh),SC=e=>Fn(e,Wh),Ph=e=>Fn(e,Nh),kC=e=>Fn(e,Fh),xC=e=>Fn(e,Ih),ai=e=>Fn(e,zh,!0),EC=e=>Fn(e,Lh,!0),fn=(e,t,r)=>{const n=Ch.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Fn=(e,t,r=!1)=>{const n=Th.exec(e);return n?n[1]?t(n[1]):r:!1},Nh=e=>e==="position"||e==="percentage",Ih=e=>e==="image"||e==="url",Fh=e=>e==="length"||e==="size"||e==="bg-size",Rh=e=>e==="length",OC=e=>e==="number",Wh=e=>e==="family-name",Lh=e=>e==="number"||e==="weight",zh=e=>e==="shadow",Oc=iC(()=>{const e=kt("color"),t=kt("font"),r=kt("text"),n=kt("font-weight"),o=kt("tracking"),s=kt("leading"),i=kt("breakpoint"),a=kt("container"),c=kt("spacing"),u=kt("radius"),l=kt("shadow"),f=kt("inset-shadow"),d=kt("text-shadow"),h=kt("drop-shadow"),m=kt("blur"),p=kt("perspective"),g=kt("aspect"),y=kt("ease"),O=kt("animate"),x=()=>["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"],_=()=>[...w(),he,de],S=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],v=()=>[he,de,c],E=()=>[ln,"full","auto",...v()],P=()=>[un,"none","subgrid",he,de],A=()=>["auto",{span:["full",un,he,de]},un,he,de],M=()=>[un,"auto",he,de],F=()=>["auto","min","max","fr",he,de],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],C=()=>["auto",...v()],k=()=>[ln,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...v()],Y=()=>[ln,"screen","full","dvw","lvw","svw","min","max","fit",...v()],$=()=>[ln,"screen","full","lh","dvh","lvh","svh","min","max","fit",...v()],D=()=>[e,he,de],V=()=>[...w(),Ph,Mh,{position:[he,de]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",kC,vC,{size:[he,de]}],B=()=>[xc,Ko,In],L=()=>["","none","full",u,he,de],J=()=>["",Me,Ko,In],q=()=>["solid","dashed","dotted","double"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[Me,xc,Ph,Mh],ne=()=>["","none",m,he,de],le=()=>["none",Me,he,de],K=()=>["none",Me,he,de],Se=()=>[Me,he,de],Ie=()=>[ln,"full",...v()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gr],breakpoint:[Gr],color:[Dh],container:[Gr],"drop-shadow":[Gr],ease:["in","out","in-out"],font:[yC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gr],shadow:[Gr],spacing:["px",Me],text:[Gr],"text-shadow":[Gr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ln,de,he,g]}],container:["container"],columns:[{columns:[Me,de,he,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{"inset-s":E(),start:E()}],end:[{"inset-e":E(),end:E()}],"inset-bs":[{"inset-bs":E()}],"inset-be":[{"inset-be":E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[un,"auto",he,de]}],basis:[{basis:[ln,"full","auto",a,...v()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Me,ln,"auto","initial","none",de]}],grow:[{grow:["",Me,he,de]}],shrink:[{shrink:["",Me,he,de]}],order:[{order:[un,"first","last","none",he,de]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:v()}],"gap-x":[{"gap-x":v()}],"gap-y":[{"gap-y":v()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:v()}],px:[{px:v()}],py:[{py:v()}],ps:[{ps:v()}],pe:[{pe:v()}],pbs:[{pbs:v()}],pbe:[{pbe:v()}],pt:[{pt:v()}],pr:[{pr:v()}],pb:[{pb:v()}],pl:[{pl:v()}],m:[{m:C()}],mx:[{mx:C()}],my:[{my:C()}],ms:[{ms:C()}],me:[{me:C()}],mbs:[{mbs:C()}],mbe:[{mbe:C()}],mt:[{mt:C()}],mr:[{mr:C()}],mb:[{mb:C()}],ml:[{ml:C()}],"space-x":[{"space-x":v()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":v()}],"space-y-reverse":["space-y-reverse"],size:[{size:k()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...$()]}],"min-block-size":[{"min-block":["auto",...$()]}],"max-block-size":[{"max-block":["none",...$()]}],w:[{w:[a,"screen",...k()]}],"min-w":[{"min-w":[a,"screen","none",...k()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...k()]}],h:[{h:["screen","lh",...k()]}],"min-h":[{"min-h":["screen","lh","none",...k()]}],"max-h":[{"max-h":["screen","lh",...k()]}],"font-size":[{text:["base",r,Ko,In]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,EC,bC]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xc,de]}],"font-family":[{font:[SC,wC,t]}],"font-features":[{"font-features":[de]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,he,de]}],"line-clamp":[{"line-clamp":[Me,"none",he,Ah]}],leading:[{leading:[s,...v()]}],"list-image":[{"list-image":["none",he,de]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,de]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:[Me,"from-font","auto",he,In]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Me,"auto",he,de]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,de]}],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",he,de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},un,he,de],radial:["",he,de],conic:[un,he,de]},xC,_C]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...q(),"hidden","none"]}],"divide-style":[{divide:[...q(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Me,he,de]}],"outline-w":[{outline:["",Me,Ko,In]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",l,ai,ii]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",f,ai,ii]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Me,In]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",d,ai,ii]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[Me,he,de]}],"mix-blend":[{"mix-blend":[...oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":oe()}],"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":[Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[he,de]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,de]}],filter:[{filter:["","none",he,de]}],blur:[{blur:ne()}],brightness:[{brightness:[Me,he,de]}],contrast:[{contrast:[Me,he,de]}],"drop-shadow":[{"drop-shadow":["","none",h,ai,ii]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",Me,he,de]}],"hue-rotate":[{"hue-rotate":[Me,he,de]}],invert:[{invert:["",Me,he,de]}],saturate:[{saturate:[Me,he,de]}],sepia:[{sepia:["",Me,he,de]}],"backdrop-filter":[{"backdrop-filter":["","none",he,de]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[Me,he,de]}],"backdrop-contrast":[{"backdrop-contrast":[Me,he,de]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Me,he,de]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Me,he,de]}],"backdrop-invert":[{"backdrop-invert":["",Me,he,de]}],"backdrop-opacity":[{"backdrop-opacity":[Me,he,de]}],"backdrop-saturate":[{"backdrop-saturate":[Me,he,de]}],"backdrop-sepia":[{"backdrop-sepia":["",Me,he,de]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":v()}],"border-spacing-x":[{"border-spacing-x":v()}],"border-spacing-y":[{"border-spacing-y":v()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,de]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Me,"initial",he,de]}],ease:[{ease:["linear","initial",y,he,de]}],delay:[{delay:[Me,he,de]}],animate:[{animate:["none",O,he,de]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,he,de]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:K()}],"scale-x":[{"scale-x":K()}],"scale-y":[{"scale-y":K()}],"scale-z":[{"scale-z":K()}],"scale-3d":["scale-3d"],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[he,de,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he,de]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mbs":[{"scroll-mbs":v()}],"scroll-mbe":[{"scroll-mbe":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pbs":[{"scroll-pbs":v()}],"scroll-pbe":[{"scroll-pbe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he,de]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Me,Ko,In,Ah]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Dt(...e){return Oc(oi(e))}var CC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],TC=CC.reduce((e,t)=>{const r=yh(`Primitive.${t}`),n=b.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(c,{...a,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),DC="Label",$h=b.forwardRef((e,t)=>T.jsx(TC.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));$h.displayName=DC;var AC=$h;function MC({className:e,...t}){return T.jsx(AC,{"data-slot":"label",className:Dt("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 PC=ub,Uh=b.createContext({}),NC=({...e})=>T.jsx(Uh.Provider,{value:{name:e.name},children:T.jsx(cb,{...e})}),ci=()=>{const e=b.useContext(Uh),t=b.useContext(Yh),{getFieldState:r}=lb(),n=Bu({name:e.name}),o=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...o}},Yh=b.createContext({});function Cc({className:e,...t}){const r=b.useId();return T.jsx(Yh.Provider,{value:{id:r},children:T.jsx("div",{"data-slot":"form-item",className:Dt("grid gap-2",e),...t})})}function Tc({className:e,...t}){const{error:r,formItemId:n}=ci();return T.jsx(MC,{"data-slot":"form-label","data-error":!!r,className:Dt("data-[error=true]:text-destructive",e),htmlFor:n,...t})}function li({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=ci();return T.jsx(vh,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function IC({className:e,...t}){const{formDescriptionId:r}=ci();return T.jsx("p",{"data-slot":"form-description",id:r,className:Dt("text-muted-foreground text-sm",e),...t})}function FC({className:e,...t}){const{error:r,formMessageId:n}=ci(),o=r?String(r?.message??""):t.children;return o?T.jsx("p",{"data-slot":"form-message",id:n,className:Dt("text-destructive text-sm",e),...t,children:o}):null}const jh=b.forwardRef(function({className:t,type:r,...n},o){return T.jsx("input",{ref:o,type:r,"data-slot":"input",className:Dt("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",t),...n})});function Vh(...e){return Oc(oi(e))}const RC=(e={})=>{const{field:t={},form:r={},question:n={},disabled:o=!1}=e;return T.jsx(jh,{...t,type:n.validation?.type==="email"?"email":n?.id?.includes("phone")?"tel":"text",placeholder:n.placeholder||"Your answer here...",className:Vh("bq-input",r.formState.errors[n.reference_id]?"border-destructive focus-visible:ring-destructive":""),disabled:o})};function WC({className:e,...t}){return T.jsx("textarea",{"data-slot":"textarea",className:Dt("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})}const LC=(e={})=>{const{field:t={},form:r={},question:n={},disabled:o=!1}=e;return T.jsx(WC,{...t,rows:4,placeholder:n.placeholder||"Your detailed answer...",className:Vh("bq-textarea",r.formState.errors[n.reference_id]?"border-destructive focus-visible:ring-destructive":""),disabled:o})};function Te(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function zC(e,t){const r=b.createContext(t),n=s=>{const{children:i,...a}=s,c=b.useMemo(()=>a,Object.values(a));return T.jsx(r.Provider,{value:c,children:i})};n.displayName=e+"Provider";function o(s){const i=b.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function qr(e,t=[]){let r=[];function n(s,i){const a=b.createContext(i),c=r.length;r=[...r,i];const u=f=>{const{scope:d,children:h,...m}=f,p=d?.[e]?.[c]||a,g=b.useMemo(()=>m,Object.values(m));return T.jsx(p.Provider,{value:g,children:h})};u.displayName=s+"Provider";function l(f,d){const h=d?.[e]?.[c]||a,m=b.useContext(h);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,l]}const o=()=>{const s=r.map(i=>b.createContext(i));return function(a){const c=a?.[e]||s;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[n,$C(o,...t)]}function $C(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=n.reduce((a,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...a,...f}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function UC(e){const t=YC(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),c=a.find(VC);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function YC(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=HC(o),a=BC(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Nn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jC=Symbol("radix.slottable");function VC(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jC}function BC(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function HC(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ZC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ne=ZC.reduce((e,t)=>{const r=UC(`Primitive.${t}`),n=b.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(c,{...a,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function GC(e,t){e&&ms.flushSync(()=>e.dispatchEvent(t))}function Bh(e){const t=qC(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),c=a.find(JC);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function qC(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=QC(o),a=XC(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Nn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var KC=Symbol("radix.slottable");function JC(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===KC}function XC(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function QC(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Hh(e){const t=e+"CollectionProvider",[r,n]=qr(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:g,children:y}=p,O=U.useRef(null),x=U.useRef(new Map).current;return T.jsx(o,{scope:g,itemMap:x,collectionRef:O,children:y})};i.displayName=t;const a=e+"CollectionSlot",c=Bh(a),u=U.forwardRef((p,g)=>{const{scope:y,children:O}=p,x=s(a,y),w=He(g,x.collectionRef);return T.jsx(c,{ref:w,children:O})});u.displayName=a;const l=e+"CollectionItemSlot",f="data-radix-collection-item",d=Bh(l),h=U.forwardRef((p,g)=>{const{scope:y,children:O,...x}=p,w=U.useRef(null),_=He(g,w),S=s(l,y);return U.useEffect(()=>(S.itemMap.set(w,{ref:w,...x}),()=>{S.itemMap.delete(w)})),T.jsx(d,{[f]:"",ref:_,children:O})});h.displayName=l;function m(p){const g=s(e+"CollectionConsumer",p);return U.useCallback(()=>{const O=g.collectionRef.current;if(!O)return[];const x=Array.from(O.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((S,I)=>x.indexOf(S.ref.current)-x.indexOf(I.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},m,n]}var At=globalThis?.document?b.useLayoutEffect:()=>{},eT=b[" useId ".trim().toString()]||(()=>{}),tT=0;function dn(e){const[t,r]=b.useState(eT());return At(()=>{r(n=>n??String(tT++))},[e]),e||(t?`radix-${t}`:"")}function hn(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...r)=>t.current?.(...r),[])}var rT=b[" useInsertionEffect ".trim().toString()]||At;function Rn({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,i]=nT({defaultProp:t,onChange:r}),a=e!==void 0,c=a?e:o;{const l=b.useRef(e!==void 0);b.useEffect(()=>{const f=l.current;f!==a&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=a},[a,n])}const u=b.useCallback(l=>{if(a){const f=oT(l)?l(e):l;f!==e&&i.current?.(f)}else s(l)},[a,e,s,i]);return[c,u]}function nT({defaultProp:e,onChange:t}){const[r,n]=b.useState(e),o=b.useRef(r),s=b.useRef(t);return rT(()=>{s.current=t},[t]),b.useEffect(()=>{o.current!==r&&(s.current?.(r),o.current=r)},[r,o]),[r,n,s]}function oT(e){return typeof e=="function"}var sT=b.createContext(void 0);function Dc(e){const t=b.useContext(sT);return e||t||"ltr"}var Ac="rovingFocusGroup.onEntryFocus",iT={bubbles:!1,cancelable:!0},Jo="RovingFocusGroup",[Mc,Zh,aT]=Hh(Jo),[cT,Gh]=qr(Jo,[aT]),[lT,uT]=cT(Jo),qh=b.forwardRef((e,t)=>T.jsx(Mc.Provider,{scope:e.__scopeRovingFocusGroup,children:T.jsx(Mc.Slot,{scope:e.__scopeRovingFocusGroup,children:T.jsx(fT,{...e,ref:t})})}));qh.displayName=Jo;var fT=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:l=!1,...f}=e,d=b.useRef(null),h=He(t,d),m=Dc(s),[p,g]=Rn({prop:i,defaultProp:a??null,onChange:c,caller:Jo}),[y,O]=b.useState(!1),x=hn(u),w=Zh(r),_=b.useRef(!1),[S,I]=b.useState(0);return b.useEffect(()=>{const v=d.current;if(v)return v.addEventListener(Ac,x),()=>v.removeEventListener(Ac,x)},[x]),T.jsx(lT,{scope:r,orientation:n,dir:m,loop:o,currentTabStopId:p,onItemFocus:b.useCallback(v=>g(v),[g]),onItemShiftTab:b.useCallback(()=>O(!0),[]),onFocusableItemAdd:b.useCallback(()=>I(v=>v+1),[]),onFocusableItemRemove:b.useCallback(()=>I(v=>v-1),[]),children:T.jsx(Ne.div,{tabIndex:y||S===0?-1:0,"data-orientation":n,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:Te(e.onMouseDown,()=>{_.current=!0}),onFocus:Te(e.onFocus,v=>{const E=!_.current;if(v.target===v.currentTarget&&E&&!y){const P=new CustomEvent(Ac,iT);if(v.currentTarget.dispatchEvent(P),!P.defaultPrevented){const A=w().filter(C=>C.focusable),M=A.find(C=>C.active),F=A.find(C=>C.id===p),W=[M,F,...A].filter(Boolean).map(C=>C.ref.current);Xh(W,l)}}_.current=!1}),onBlur:Te(e.onBlur,()=>O(!1))})})}),Kh="RovingFocusGroupItem",Jh=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,children:i,...a}=e,c=dn(),u=s||c,l=uT(Kh,r),f=l.currentTabStopId===u,d=Zh(r),{onFocusableItemAdd:h,onFocusableItemRemove:m,currentTabStopId:p}=l;return b.useEffect(()=>{if(n)return h(),()=>m()},[n,h,m]),T.jsx(Mc.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:T.jsx(Ne.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:Te(e.onMouseDown,g=>{n?l.onItemFocus(u):g.preventDefault()}),onFocus:Te(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:Te(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){l.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=pT(g,l.orientation,l.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=d().filter(w=>w.focusable).map(w=>w.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const w=x.indexOf(g.currentTarget);x=l.loop?mT(x,w+1):x.slice(w+1)}setTimeout(()=>Xh(x))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:p!=null}):i})})});Jh.displayName=Kh;var dT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function hT(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function pT(e,t,r){const n=hT(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return dT[n]}function Xh(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function mT(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var gT=qh,yT=Jh;function Pc(e){const[t,r]=b.useState(void 0);return At(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}function Nc(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function vT(e,t){return b.useReducer((r,n)=>t[r][n]??r,e)}var pn=e=>{const{present:t,children:r}=e,n=bT(t),o=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),s=He(n.ref,wT(o));return typeof r=="function"||n.isPresent?b.cloneElement(o,{ref:s}):null};pn.displayName="Presence";function bT(e){const[t,r]=b.useState(),n=b.useRef(null),o=b.useRef(e),s=b.useRef("none"),i=e?"mounted":"unmounted",[a,c]=vT(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=ui(n.current);s.current=a==="mounted"?u:"none"},[a]),At(()=>{const u=n.current,l=o.current;if(l!==e){const d=s.current,h=ui(u);e?c("MOUNT"):h==="none"||u?.display==="none"?c("UNMOUNT"):c(l&&d!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),At(()=>{if(t){let u;const l=t.ownerDocument.defaultView??window,f=h=>{const p=ui(n.current).includes(CSS.escape(h.animationName));if(h.target===t&&p&&(c("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},d=h=>{h.target===t&&(s.current=ui(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{l.clearTimeout(u),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function ui(e){return e?.animationName||"none"}function wT(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ic="Radio",[_T,Qh]=qr(Ic),[ST,kT]=_T(Ic),ep=b.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:s,disabled:i,value:a="on",onCheck:c,form:u,...l}=e,[f,d]=b.useState(null),h=He(t,g=>d(g)),m=b.useRef(!1),p=f?u||!!f.closest("form"):!0;return T.jsxs(ST,{scope:r,checked:o,disabled:i,children:[T.jsx(Ne.button,{type:"button",role:"radio","aria-checked":o,"data-state":op(o),"data-disabled":i?"":void 0,disabled:i,value:a,...l,ref:h,onClick:Te(e.onClick,g=>{o||c?.(),p&&(m.current=g.isPropagationStopped(),m.current||g.stopPropagation())})}),p&&T.jsx(np,{control:f,bubbles:!m.current,name:n,value:a,checked:o,required:s,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});ep.displayName=Ic;var tp="RadioIndicator",rp=b.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,s=kT(tp,r);return T.jsx(pn,{present:n||s.checked,children:T.jsx(Ne.span,{"data-state":op(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});rp.displayName=tp;var xT="RadioBubbleInput",np=b.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},s)=>{const i=b.useRef(null),a=He(i,s),c=Nc(r),u=Pc(t);return b.useEffect(()=>{const l=i.current;if(!l)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(c!==r&&h){const m=new Event("click",{bubbles:n});h.call(l,r),l.dispatchEvent(m)}},[c,r,n]),T.jsx(Ne.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:a,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});np.displayName=xT;function op(e){return e?"checked":"unchecked"}var ET=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],fi="RadioGroup",[OT]=qr(fi,[Gh,Qh]),sp=Gh(),ip=Qh(),[CT,TT]=OT(fi),ap=b.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:s,required:i=!1,disabled:a=!1,orientation:c,dir:u,loop:l=!0,onValueChange:f,...d}=e,h=sp(r),m=Dc(u),[p,g]=Rn({prop:s,defaultProp:o??null,onChange:f,caller:fi});return T.jsx(CT,{scope:r,name:n,required:i,disabled:a,value:p,onValueChange:g,children:T.jsx(gT,{asChild:!0,...h,orientation:c,dir:m,loop:l,children:T.jsx(Ne.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":a?"":void 0,dir:m,...d,ref:t})})})});ap.displayName=fi;var cp="RadioGroupItem",lp=b.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,s=TT(cp,r),i=s.disabled||n,a=sp(r),c=ip(r),u=b.useRef(null),l=He(t,u),f=s.value===o.value,d=b.useRef(!1);return b.useEffect(()=>{const h=p=>{ET.includes(p.key)&&(d.current=!0)},m=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)}},[]),T.jsx(yT,{asChild:!0,...a,focusable:!i,active:f,children:T.jsx(ep,{disabled:i,required:s.required,checked:f,...c,...o,name:s.name,ref:l,onCheck:()=>s.onValueChange(o.value),onKeyDown:Te(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Te(o.onFocus,()=>{d.current&&u.current?.click()})})})});lp.displayName=cp;var DT="RadioGroupIndicator",up=b.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=ip(r);return T.jsx(rp,{...o,...n,ref:t})});up.displayName=DT;var AT=ap,MT=lp,PT=up;const fp=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();const NT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const IT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase());const dp=e=>{const t=IT(e);return t.charAt(0).toUpperCase()+t.slice(1)};var FT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const RT=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const WT=U.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:i,...a},c)=>U.createElement("svg",{ref:c,...FT,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:fp("lucide",o),...!s&&!RT(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,l])=>U.createElement(u,l)),...Array.isArray(s)?s:[s]]));const mn=(e,t)=>{const r=U.forwardRef(({className:n,...o},s)=>U.createElement(WT,{ref:s,iconNode:t,className:fp(`lucide-${NT(dp(e))}`,`lucide-${e}`,n),...o}));return r.displayName=dp(e),r};const LT=mn("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const hp=mn("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Fc=mn("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const zT=mn("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const $T=mn("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const UT=mn("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const YT=mn("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const jT=mn("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function VT({className:e,...t}){return T.jsx(AT,{"data-slot":"radio-group",className:Dt("grid gap-3",e),...t})}function BT({className:e,...t}){return T.jsx(MT,{"data-slot":"radio-group-item",className:Dt("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:T.jsx(PT,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:T.jsx(YT,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}const HT=(e={})=>{const{field:t={},form:r={},question:n={},disabled:o=!1}=e;return T.jsx(VT,{onValueChange:t.onChange,value:t.value,className:`bq-radio-group space-y-1 ${r.formState.errors[n.reference_id]?"rounded-md border border-destructive p-3":""}`,children:(n.options||[]).map(s=>{const i=`${n.reference_id}-${s.value}`;return T.jsxs(Cc,{className:"flex items-center space-x-2 hover:bg-muted/50 rounded-md transition-colors",children:[T.jsx(li,{children:T.jsx(BT,{className:"bq-radio-item w-4 h-4 border focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",value:s.value,id:i,disabled:o})}),T.jsx(Tc,{htmlFor:i,className:"font-normal cursor-pointer",children:s.label})]},s.value)})})};var di="Checkbox",[ZT]=qr(di),[GT,Rc]=ZT(di);function qT(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:c,required:u,value:l="on",internal_do_not_use_render:f}=e,[d,h]=Rn({prop:r,defaultProp:o??!1,onChange:c,caller:di}),[m,p]=b.useState(null),[g,y]=b.useState(null),O=b.useRef(!1),x=m?!!i||!!m.closest("form"):!0,w={checked:d,disabled:s,setChecked:h,control:m,setControl:p,name:a,form:i,value:l,hasConsumerStoppedPropagationRef:O,required:u,defaultChecked:gn(o)?!1:o,isFormControl:x,bubbleInput:g,setBubbleInput:y};return T.jsx(GT,{scope:t,...w,children:KT(f)?f(w):n})}var pp="CheckboxTrigger",mp=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:s,value:i,disabled:a,checked:c,required:u,setControl:l,setChecked:f,hasConsumerStoppedPropagationRef:d,isFormControl:h,bubbleInput:m}=Rc(pp,e),p=He(o,l),g=b.useRef(c);return b.useEffect(()=>{const y=s?.form;if(y){const O=()=>f(g.current);return y.addEventListener("reset",O),()=>y.removeEventListener("reset",O)}},[s,f]),T.jsx(Ne.button,{type:"button",role:"checkbox","aria-checked":gn(c)?"mixed":c,"aria-required":u,"data-state":_p(c),"data-disabled":a?"":void 0,disabled:a,value:i,...n,ref:p,onKeyDown:Te(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Te(r,y=>{f(O=>gn(O)?!0:!O),m&&h&&(d.current=y.isPropagationStopped(),d.current||y.stopPropagation())})})});mp.displayName=pp;var gp=b.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:s,required:i,disabled:a,value:c,onCheckedChange:u,form:l,...f}=e;return T.jsx(qT,{__scopeCheckbox:r,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:u,name:n,form:l,value:c,internal_do_not_use_render:({isFormControl:d})=>T.jsxs(T.Fragment,{children:[T.jsx(mp,{...f,ref:t,__scopeCheckbox:r}),d&&T.jsx(wp,{__scopeCheckbox:r})]})})});gp.displayName=di;var yp="CheckboxIndicator",vp=b.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,s=Rc(yp,r);return T.jsx(pn,{present:n||gn(s.checked)||s.checked===!0,children:T.jsx(Ne.span,{"data-state":_p(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});vp.displayName=yp;var bp="CheckboxBubbleInput",wp=b.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:c,name:u,value:l,form:f,bubbleInput:d,setBubbleInput:h}=Rc(bp,e),m=He(r,h),p=Nc(s),g=Pc(n);b.useEffect(()=>{const O=d;if(!O)return;const x=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(x,"checked").set,S=!o.current;if(p!==s&&_){const I=new Event("click",{bubbles:S});O.indeterminate=gn(s),_.call(O,gn(s)?!1:s),O.dispatchEvent(I)}},[d,p,s,o]);const y=b.useRef(gn(s)?!1:s);return T.jsx(Ne.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:a,disabled:c,name:u,value:l,form:f,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});wp.displayName=bp;function KT(e){return typeof e=="function"}function gn(e){return e==="indeterminate"}function _p(e){return gn(e)?"indeterminate":e?"checked":"unchecked"}function JT({className:e,...t}){return T.jsx(gp,{"data-slot":"checkbox",className:Dt("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:T.jsx(vp,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:T.jsx(hp,{className:"size-3.5"})})})}const XT=(e={})=>{const{field:t={},question:r={},disabled:n=!1}=e,{options:o=[]}=r;return o.map((s,i)=>T.jsxs(Cc,{className:"flex items-center space-x-1 hover:bg-muted/50 rounded-md transition-colors",children:[T.jsx(li,{children:T.jsx(JT,{className:"bq-checkbox w-4 h-4 border border-input focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",checked:t.value?.includes(s.value),onCheckedChange:a=>a?t.onChange([...t.value||[],s.value]):t.onChange((t.value||[]).filter(c=>c!==s.value)),id:`${r.reference_id}-${s.value}`,disabled:n})}),T.jsx(Tc,{htmlFor:`${r.reference_id}-${s.value}`,className:"flex-1 font-normal cursor-pointer text-sm leading-relaxed",children:s.label})]},i))};function Sp(e,[t,r]){return Math.min(r,Math.max(t,e))}function QT(e,t=globalThis?.document){const r=hn(e);b.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var eD="DismissableLayer",Wc="dismissableLayer.update",tD="dismissableLayer.pointerDownOutside",rD="dismissableLayer.focusOutside",kp,xp=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hi=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,u=b.useContext(xp),[l,f]=b.useState(null),d=l?.ownerDocument??globalThis?.document,[,h]=b.useState({}),m=He(t,I=>f(I)),p=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(g),O=l?p.indexOf(l):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,w=O>=y,_=sD(I=>{const v=I.target,E=[...u.branches].some(P=>P.contains(v));!w||E||(o?.(I),i?.(I),I.defaultPrevented||a?.())},d),S=iD(I=>{const v=I.target;[...u.branches].some(P=>P.contains(v))||(s?.(I),i?.(I),I.defaultPrevented||a?.())},d);return QT(I=>{O===u.layers.size-1&&(n?.(I),!I.defaultPrevented&&a&&(I.preventDefault(),a()))},d),b.useEffect(()=>{if(l)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(kp=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(l)),u.layers.add(l),Ep(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=kp)}},[l,d,r,u]),b.useEffect(()=>()=>{l&&(u.layers.delete(l),u.layersWithOutsidePointerEventsDisabled.delete(l),Ep())},[l,u]),b.useEffect(()=>{const I=()=>h({});return document.addEventListener(Wc,I),()=>document.removeEventListener(Wc,I)},[]),T.jsx(Ne.div,{...c,ref:m,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:Te(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Te(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Te(e.onPointerDownCapture,_.onPointerDownCapture)})});hi.displayName=eD;var nD="DismissableLayerBranch",oD=b.forwardRef((e,t)=>{const r=b.useContext(xp),n=b.useRef(null),o=He(t,n);return b.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),T.jsx(Ne.div,{...e,ref:o})});oD.displayName=nD;function sD(e,t=globalThis?.document){const r=hn(e),n=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let c=function(){Op(tD,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function iD(e,t=globalThis?.document){const r=hn(e),n=b.useRef(!1);return b.useEffect(()=>{const o=s=>{s.target&&!n.current&&Op(rD,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Ep(){const e=new CustomEvent(Wc);document.dispatchEvent(e)}function Op(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?GC(o,s):o.dispatchEvent(s)}var Lc=0;function zc(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Cp()),document.body.insertAdjacentElement("beforeend",e[1]??Cp()),Lc++,()=>{Lc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Lc--}},[])}function Cp(){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 $c="focusScope.autoFocusOnMount",Uc="focusScope.autoFocusOnUnmount",Tp={bubbles:!1,cancelable:!0},aD="FocusScope",pi=b.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=b.useState(null),u=hn(o),l=hn(s),f=b.useRef(null),d=He(t,p=>c(p)),h=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(n){let p=function(x){if(h.paused||!a)return;const w=x.target;a.contains(w)?f.current=w:yn(f.current,{select:!0})},g=function(x){if(h.paused||!a)return;const w=x.relatedTarget;w!==null&&(a.contains(w)||yn(f.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const _ of x)_.removedNodes.length>0&&yn(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",g);const O=new MutationObserver(y);return a&&O.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",g),O.disconnect()}}},[n,a,h.paused]),b.useEffect(()=>{if(a){Mp.add(h);const p=document.activeElement;if(!a.contains(p)){const y=new CustomEvent($c,Tp);a.addEventListener($c,u),a.dispatchEvent(y),y.defaultPrevented||(cD(hD(Dp(a)),{select:!0}),document.activeElement===p&&yn(a))}return()=>{a.removeEventListener($c,u),setTimeout(()=>{const y=new CustomEvent(Uc,Tp);a.addEventListener(Uc,l),a.dispatchEvent(y),y.defaultPrevented||yn(p??document.body,{select:!0}),a.removeEventListener(Uc,l),Mp.remove(h)},0)}}},[a,u,l,h]);const m=b.useCallback(p=>{if(!r&&!n||h.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(g&&y){const O=p.currentTarget,[x,w]=lD(O);x&&w?!p.shiftKey&&y===w?(p.preventDefault(),r&&yn(x,{select:!0})):p.shiftKey&&y===x&&(p.preventDefault(),r&&yn(w,{select:!0})):y===O&&p.preventDefault()}},[r,n,h.paused]);return T.jsx(Ne.div,{tabIndex:-1,...i,ref:d,onKeyDown:m})});pi.displayName=aD;function cD(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(yn(n,{select:t}),document.activeElement!==r)return}function lD(e){const t=Dp(e),r=Ap(t,e),n=Ap(t.reverse(),e);return[r,n]}function Dp(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ap(e,t){for(const r of e)if(!uD(r,{upTo:t}))return r}function uD(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 fD(e){return e instanceof HTMLInputElement&&"select"in e}function yn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&fD(e)&&t&&e.select()}}var Mp=dD();function dD(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Pp(e,t),e.unshift(t)},remove(t){e=Pp(e,t),e[0]?.resume()}}}function Pp(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function hD(e){return e.filter(t=>t.tagName!=="A")}const pD=["top","right","bottom","left"],vn=Math.min,Gt=Math.max,mi=Math.round,gi=Math.floor,Tr=e=>({x:e,y:e}),mD={left:"right",right:"left",bottom:"top",top:"bottom"},gD={start:"end",end:"start"};function Yc(e,t,r){return Gt(e,vn(t,r))}function Kr(e,t){return typeof e=="function"?e(t):e}function Jr(e){return e.split("-")[0]}function ao(e){return e.split("-")[1]}function jc(e){return e==="x"?"y":"x"}function Vc(e){return e==="y"?"height":"width"}const yD=new Set(["top","bottom"]);function Dr(e){return yD.has(Jr(e))?"y":"x"}function Bc(e){return jc(Dr(e))}function vD(e,t,r){r===void 0&&(r=!1);const n=ao(e),o=Bc(e),s=Vc(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=yi(i)),[i,yi(i)]}function bD(e){const t=yi(e);return[Hc(e),t,Hc(t)]}function Hc(e){return e.replace(/start|end/g,t=>gD[t])}const Np=["left","right"],Ip=["right","left"],wD=["top","bottom"],_D=["bottom","top"];function SD(e,t,r){switch(e){case"top":case"bottom":return r?t?Ip:Np:t?Np:Ip;case"left":case"right":return t?wD:_D;default:return[]}}function kD(e,t,r,n){const o=ao(e);let s=SD(Jr(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Hc)))),s}function yi(e){return e.replace(/left|right|bottom|top/g,t=>mD[t])}function xD(e){return{top:0,right:0,bottom:0,left:0,...e}}function Fp(e){return typeof e!="number"?xD(e):{top:e,right:e,bottom:e,left:e}}function vi(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Rp(e,t,r){let{reference:n,floating:o}=e;const s=Dr(t),i=Bc(t),a=Vc(i),c=Jr(t),u=s==="y",l=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,d=n[a]/2-o[a]/2;let h;switch(c){case"top":h={x:l,y:n.y-o.height};break;case"bottom":h={x:l,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-o.width,y:f};break;default:h={x:n.x,y:n.y}}switch(ao(t)){case"start":h[i]-=d*(r&&u?-1:1);break;case"end":h[i]+=d*(r&&u?-1:1);break}return h}async function ED(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Kr(t,e),m=Fp(h),g=a[d?f==="floating"?"reference":"floating":f],y=vi(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(g)))==null||r?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:l,strategy:c})),O=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),w=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},_=vi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:O,offsetParent:x,strategy:c}):O);return{top:(y.top-_.top+m.top)/w.y,bottom:(_.bottom-y.bottom+m.bottom)/w.y,left:(y.left-_.left+m.left)/w.x,right:(_.right-y.right+m.right)/w.x}}const OD=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:i}=r,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=Rp(u,n,c),d=n,h={},m=0;for(let g=0;g<a.length;g++){var p;const{name:y,fn:O}=a[g],{x,y:w,data:_,reset:S}=await O({x:l,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:h,rects:u,platform:{...i,detectOverflow:(p=i.detectOverflow)!=null?p:ED},elements:{reference:e,floating:t}});l=x??l,f=w??f,h={...h,[y]:{...h[y],..._}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(u=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:l,y:f}=Rp(u,d,c)),g=-1)}return{x:l,y:f,placement:d,strategy:o,middlewareData:h}},CD=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:u,padding:l=0}=Kr(e,t)||{};if(u==null)return{};const f=Fp(l),d={x:r,y:n},h=Bc(o),m=Vc(h),p=await i.getDimensions(u),g=h==="y",y=g?"top":"left",O=g?"bottom":"right",x=g?"clientHeight":"clientWidth",w=s.reference[m]+s.reference[h]-d[h]-s.floating[m],_=d[h]-s.reference[h],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let I=S?S[x]:0;(!I||!await(i.isElement==null?void 0:i.isElement(S)))&&(I=a.floating[x]||s.floating[m]);const v=w/2-_/2,E=I/2-p[m]/2-1,P=vn(f[y],E),A=vn(f[O],E),M=P,F=I-p[m]-A,N=I/2-p[m]/2+v,W=Yc(M,N,F),C=!c.arrow&&ao(o)!=null&&N!==W&&s.reference[m]/2-(N<M?P:A)-p[m]/2<0,k=C?N<M?N-M:N-F:0;return{[h]:d[h]+k,data:{[h]:W,centerOffset:N-W-k,...C&&{alignmentOffset:k}},reset:C}}}),TD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...g}=Kr(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=Jr(o),O=Dr(a),x=Jr(a)===a,w=await(c.isRTL==null?void 0:c.isRTL(u.floating)),_=d||(x||!p?[yi(a)]:bD(a)),S=m!=="none";!d&&S&&_.push(...kD(a,p,m,w));const I=[a,..._],v=await c.detectOverflow(t,g),E=[];let P=((n=s.flip)==null?void 0:n.overflows)||[];if(l&&E.push(v[y]),f){const N=vD(o,i,w);E.push(v[N[0]],v[N[1]])}if(P=[...P,{placement:o,overflows:E}],!E.every(N=>N<=0)){var A,M;const N=(((A=s.flip)==null?void 0:A.index)||0)+1,W=I[N];if(W&&(!(f==="alignment"?O!==Dr(W):!1)||P.every(Y=>Dr(Y.placement)===O?Y.overflows[0]>0:!0)))return{data:{index:N,overflows:P},reset:{placement:W}};let C=(M=P.filter(k=>k.overflows[0]<=0).sort((k,Y)=>k.overflows[1]-Y.overflows[1])[0])==null?void 0:M.placement;if(!C)switch(h){case"bestFit":{var F;const k=(F=P.filter(Y=>{if(S){const $=Dr(Y.placement);return $===O||$==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter($=>$>0).reduce(($,D)=>$+D,0)]).sort((Y,$)=>Y[1]-$[1])[0])==null?void 0:F[0];k&&(C=k);break}case"initialPlacement":C=a;break}if(o!==C)return{reset:{placement:C}}}return{}}}};function Wp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Lp(e){return pD.some(t=>e[t]>=0)}const DD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:o="referenceHidden",...s}=Kr(e,t);switch(o){case"referenceHidden":{const i=await n.detectOverflow(t,{...s,elementContext:"reference"}),a=Wp(i,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Lp(a)}}}case"escaped":{const i=await n.detectOverflow(t,{...s,altBoundary:!0}),a=Wp(i,r.floating);return{data:{escapedOffsets:a,escaped:Lp(a)}}}default:return{}}}}},zp=new Set(["left","top"]);async function AD(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Jr(r),a=ao(r),c=Dr(r)==="y",u=zp.has(i)?-1:1,l=s&&c?-1:1,f=Kr(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),c?{x:h*l,y:d*u}:{x:d*u,y:h*l}}const MD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await AD(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},PD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:y=>{let{x:O,y:x}=y;return{x:O,y:x}}},...u}=Kr(e,t),l={x:r,y:n},f=await s.detectOverflow(t,u),d=Dr(Jr(o)),h=jc(d);let m=l[h],p=l[d];if(i){const y=h==="y"?"top":"left",O=h==="y"?"bottom":"right",x=m+f[y],w=m-f[O];m=Yc(x,m,w)}if(a){const y=d==="y"?"top":"left",O=d==="y"?"bottom":"right",x=p+f[y],w=p-f[O];p=Yc(x,p,w)}const g=c.fn({...t,[h]:m,[d]:p});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[h]:i,[d]:a}}}}}},ND=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Kr(e,t),l={x:r,y:n},f=Dr(o),d=jc(f);let h=l[d],m=l[f];const p=Kr(a,t),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const x=d==="y"?"height":"width",w=s.reference[d]-s.floating[x]+g.mainAxis,_=s.reference[d]+s.reference[x]-g.mainAxis;h<w?h=w:h>_&&(h=_)}if(u){var y,O;const x=d==="y"?"width":"height",w=zp.has(Jr(o)),_=s.reference[f]-s.floating[x]+(w&&((y=i.offset)==null?void 0:y[f])||0)+(w?0:g.crossAxis),S=s.reference[f]+s.reference[x]+(w?0:((O=i.offset)==null?void 0:O[f])||0)-(w?g.crossAxis:0);m<_?m=_:m>S&&(m=S)}return{[d]:h,[f]:m}}}},ID=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...u}=Kr(e,t),l=await i.detectOverflow(t,u),f=Jr(o),d=ao(o),h=Dr(o)==="y",{width:m,height:p}=s.floating;let g,y;f==="top"||f==="bottom"?(g=f,y=d===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,g=d==="end"?"top":"bottom");const O=p-l.top-l.bottom,x=m-l.left-l.right,w=vn(p-l[g],O),_=vn(m-l[y],x),S=!t.middlewareData.shift;let I=w,v=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(v=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(I=O),S&&!d){const P=Gt(l.left,0),A=Gt(l.right,0),M=Gt(l.top,0),F=Gt(l.bottom,0);h?v=m-2*(P!==0||A!==0?P+A:Gt(l.left,l.right)):I=p-2*(M!==0||F!==0?M+F:Gt(l.top,l.bottom))}await c({...t,availableWidth:v,availableHeight:I});const E=await i.getDimensions(a.floating);return m!==E.width||p!==E.height?{reset:{rects:!0}}:{}}}};function bi(){return typeof window<"u"}function co(e){return $p(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ar(e){var t;return(t=($p(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $p(e){return bi()?e instanceof Node||e instanceof qt(e).Node:!1}function pr(e){return bi()?e instanceof Element||e instanceof qt(e).Element:!1}function Mr(e){return bi()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Up(e){return!bi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}const FD=new Set(["inline","contents"]);function Xo(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=mr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!FD.has(o)}const RD=new Set(["table","td","th"]);function WD(e){return RD.has(co(e))}const LD=[":popover-open",":modal"];function wi(e){return LD.some(t=>{try{return e.matches(t)}catch{return!1}})}const zD=["transform","translate","scale","rotate","perspective"],$D=["transform","translate","scale","rotate","perspective","filter"],UD=["paint","layout","strict","content"];function Zc(e){const t=Gc(),r=pr(e)?mr(e):e;return zD.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)||$D.some(n=>(r.willChange||"").includes(n))||UD.some(n=>(r.contain||"").includes(n))}function YD(e){let t=bn(e);for(;Mr(t)&&!lo(t);){if(Zc(t))return t;if(wi(t))return null;t=bn(t)}return null}function Gc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const jD=new Set(["html","body","#document"]);function lo(e){return jD.has(co(e))}function mr(e){return qt(e).getComputedStyle(e)}function _i(e){return pr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bn(e){if(co(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Up(e)&&e.host||Ar(e);return Up(t)?t.host:t}function Yp(e){const t=bn(e);return lo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mr(t)&&Xo(t)?t:Yp(t)}function Qo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Yp(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=qt(o);if(s){const a=qc(i);return t.concat(i,i.visualViewport||[],Xo(o)?o:[],a&&r?Qo(a):[])}return t.concat(o,Qo(o,[],r))}function qc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jp(e){const t=mr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Mr(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=mi(r)!==s||mi(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function Kc(e){return pr(e)?e:e.contextElement}function uo(e){const t=Kc(e);if(!Mr(t))return Tr(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=jp(t);let i=(s?mi(r.width):r.width)/n,a=(s?mi(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const VD=Tr(0);function Vp(e){const t=qt(e);return!Gc()||!t.visualViewport?VD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function BD(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==qt(e)?!1:t}function Wn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Kc(e);let i=Tr(1);t&&(n?pr(n)&&(i=uo(n)):i=uo(e));const a=BD(s,r,n)?Vp(s):Tr(0);let c=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,l=o.width/i.x,f=o.height/i.y;if(s){const d=qt(s),h=n&&pr(n)?qt(n):n;let m=d,p=qc(m);for(;p&&n&&h!==m;){const g=uo(p),y=p.getBoundingClientRect(),O=mr(p),x=y.left+(p.clientLeft+parseFloat(O.paddingLeft))*g.x,w=y.top+(p.clientTop+parseFloat(O.paddingTop))*g.y;c*=g.x,u*=g.y,l*=g.x,f*=g.y,c+=x,u+=w,m=qt(p),p=qc(m)}}return vi({width:l,height:f,x:c,y:u})}function Si(e,t){const r=_i(e).scrollLeft;return t?t.left+r:Wn(Ar(e)).left+r}function Bp(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Si(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function HD(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=Ar(n),a=t?wi(t.floating):!1;if(n===i||a&&s)return r;let c={scrollLeft:0,scrollTop:0},u=Tr(1);const l=Tr(0),f=Mr(n);if((f||!f&&!s)&&((co(n)!=="body"||Xo(i))&&(c=_i(n)),Mr(n))){const h=Wn(n);u=uo(n),l.x=h.x+n.clientLeft,l.y=h.y+n.clientTop}const d=i&&!f&&!s?Bp(i,c):Tr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+l.x+d.x,y:r.y*u.y-c.scrollTop*u.y+l.y+d.y}}function ZD(e){return Array.from(e.getClientRects())}function GD(e){const t=Ar(e),r=_i(e),n=e.ownerDocument.body,o=Gt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Gt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Si(e);const a=-r.scrollTop;return mr(n).direction==="rtl"&&(i+=Gt(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Hp=25;function qD(e,t){const r=qt(e),n=Ar(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const l=Gc();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const u=Si(n);if(u<=0){const l=n.ownerDocument,f=l.body,d=getComputedStyle(f),h=l.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(n.clientWidth-f.clientWidth-h);m<=Hp&&(s-=m)}else u<=Hp&&(s+=u);return{width:s,height:i,x:a,y:c}}const KD=new Set(["absolute","fixed"]);function JD(e,t){const r=Wn(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=Mr(e)?uo(e):Tr(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,u=n*s.y;return{width:i,height:a,x:c,y:u}}function Zp(e,t,r){let n;if(t==="viewport")n=qD(e,r);else if(t==="document")n=GD(Ar(e));else if(pr(t))n=JD(t,r);else{const o=Vp(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return vi(n)}function Gp(e,t){const r=bn(e);return r===t||!pr(r)||lo(r)?!1:mr(r).position==="fixed"||Gp(r,t)}function XD(e,t){const r=t.get(e);if(r)return r;let n=Qo(e,[],!1).filter(a=>pr(a)&&co(a)!=="body"),o=null;const s=mr(e).position==="fixed";let i=s?bn(e):e;for(;pr(i)&&!lo(i);){const a=mr(i),c=Zc(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&KD.has(o.position)||Xo(i)&&!c&&Gp(e,i))?n=n.filter(l=>l!==i):o=a,i=bn(i)}return t.set(e,n),n}function QD(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?wi(t)?[]:XD(t,this._c):[].concat(r),n],a=i[0],c=i.reduce((u,l)=>{const f=Zp(t,l,o);return u.top=Gt(f.top,u.top),u.right=vn(f.right,u.right),u.bottom=vn(f.bottom,u.bottom),u.left=Gt(f.left,u.left),u},Zp(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function eA(e){const{width:t,height:r}=jp(e);return{width:t,height:r}}function tA(e,t,r){const n=Mr(t),o=Ar(t),s=r==="fixed",i=Wn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Tr(0);function u(){c.x=Si(o)}if(n||!n&&!s)if((co(t)!=="body"||Xo(o))&&(a=_i(t)),n){const h=Wn(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else o&&u();s&&!n&&o&&u();const l=o&&!n&&!s?Bp(o,a):Tr(0),f=i.left+a.scrollLeft-c.x-l.x,d=i.top+a.scrollTop-c.y-l.y;return{x:f,y:d,width:i.width,height:i.height}}function Jc(e){return mr(e).position==="static"}function qp(e,t){if(!Mr(e)||mr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ar(e)===r&&(r=r.ownerDocument.body),r}function Kp(e,t){const r=qt(e);if(wi(e))return r;if(!Mr(e)){let o=bn(e);for(;o&&!lo(o);){if(pr(o)&&!Jc(o))return o;o=bn(o)}return r}let n=qp(e,t);for(;n&&WD(n)&&Jc(n);)n=qp(n,t);return n&&lo(n)&&Jc(n)&&!Zc(n)?r:n||YD(e)||r}const rA=async function(e){const t=this.getOffsetParent||Kp,r=this.getDimensions,n=await r(e.floating);return{reference:tA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function nA(e){return mr(e).direction==="rtl"}const oA={convertOffsetParentRelativeRectToViewportRelativeRect:HD,getDocumentElement:Ar,getClippingRect:QD,getOffsetParent:Kp,getElementRects:rA,getClientRects:ZD,getDimensions:eA,getScale:uo,isElement:pr,isRTL:nA};function Jp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sA(e,t){let r=null,n;const o=Ar(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:l,top:f,width:d,height:h}=u;if(a||t(),!d||!h)return;const m=gi(f),p=gi(o.clientWidth-(l+d)),g=gi(o.clientHeight-(f+h)),y=gi(l),x={rootMargin:-m+"px "+-p+"px "+-g+"px "+-y+"px",threshold:Gt(0,vn(1,c))||1};let w=!0;function _(S){const I=S[0].intersectionRatio;if(I!==c){if(!w)return i();I?i(!1,I):n=setTimeout(()=>{i(!1,1e-7)},1e3)}I===1&&!Jp(u,e.getBoundingClientRect())&&i(),w=!1}try{r=new IntersectionObserver(_,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(_,x)}r.observe(e)}return i(!0),s}function iA(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=Kc(e),l=o||s?[...u?Qo(u):[],...Qo(t)]:[];l.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const f=u&&a?sA(u,r):null;let d=-1,h=null;i&&(h=new ResizeObserver(y=>{let[O]=y;O&&O.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),r()}),u&&!c&&h.observe(u),h.observe(t));let m,p=c?Wn(e):null;c&&g();function g(){const y=Wn(e);p&&!Jp(p,y)&&r(),p=y,m=requestAnimationFrame(g)}return r(),()=>{var y;l.forEach(O=>{o&&O.removeEventListener("scroll",r),s&&O.removeEventListener("resize",r)}),f?.(),(y=h)==null||y.disconnect(),h=null,c&&cancelAnimationFrame(m)}}const aA=MD,cA=PD,lA=TD,uA=ID,fA=DD,Xp=CD,dA=ND,hA=(e,t,r)=>{const n=new Map,o={platform:oA,...r},s={...o.platform,_c:n};return OD(e,t,{...o,platform:s})};var pA=typeof document<"u",mA=function(){},ki=pA?U.useLayoutEffect:mA;function xi(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!xi(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!xi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Qp(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function em(e,t){const r=Qp(e);return Math.round(t*r)/r}function Xc(e){const t=b.useRef(e);return ki(()=>{t.current=e}),t}function gA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[l,f]=b.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=b.useState(n);xi(d,n)||h(n);const[m,p]=b.useState(null),[g,y]=b.useState(null),O=b.useCallback(Y=>{Y!==S.current&&(S.current=Y,p(Y))},[]),x=b.useCallback(Y=>{Y!==I.current&&(I.current=Y,y(Y))},[]),w=s||m,_=i||g,S=b.useRef(null),I=b.useRef(null),v=b.useRef(l),E=c!=null,P=Xc(c),A=Xc(o),M=Xc(u),F=b.useCallback(()=>{if(!S.current||!I.current)return;const Y={placement:t,strategy:r,middleware:d};A.current&&(Y.platform=A.current),hA(S.current,I.current,Y).then($=>{const D={...$,isPositioned:M.current!==!1};N.current&&!xi(v.current,D)&&(v.current=D,ms.flushSync(()=>{f(D)}))})},[d,t,r,A,M]);ki(()=>{u===!1&&v.current.isPositioned&&(v.current.isPositioned=!1,f(Y=>({...Y,isPositioned:!1})))},[u]);const N=b.useRef(!1);ki(()=>(N.current=!0,()=>{N.current=!1}),[]),ki(()=>{if(w&&(S.current=w),_&&(I.current=_),w&&_){if(P.current)return P.current(w,_,F);F()}},[w,_,F,P,E]);const W=b.useMemo(()=>({reference:S,floating:I,setReference:O,setFloating:x}),[O,x]),C=b.useMemo(()=>({reference:w,floating:_}),[w,_]),k=b.useMemo(()=>{const Y={position:r,left:0,top:0};if(!C.floating)return Y;const $=em(C.floating,l.x),D=em(C.floating,l.y);return a?{...Y,transform:"translate("+$+"px, "+D+"px)",...Qp(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:$,top:D}},[r,a,C.floating,l.x,l.y]);return b.useMemo(()=>({...l,update:F,refs:W,elements:C,floatingStyles:k}),[l,F,W,C,k])}const yA=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Xp({element:n.current,padding:o}).fn(r):{}:n?Xp({element:n,padding:o}).fn(r):{}}}},vA=(e,t)=>({...aA(e),options:[e,t]}),bA=(e,t)=>({...cA(e),options:[e,t]}),wA=(e,t)=>({...dA(e),options:[e,t]}),_A=(e,t)=>({...lA(e),options:[e,t]}),SA=(e,t)=>({...uA(e),options:[e,t]}),kA=(e,t)=>({...fA(e),options:[e,t]}),xA=(e,t)=>({...yA(e),options:[e,t]});var EA="Arrow",tm=b.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return T.jsx(Ne.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:T.jsx("polygon",{points:"0,0 30,0 15,10"})})});tm.displayName=EA;var OA=tm,Qc="Popper",[rm,Ei]=qr(Qc),[CA,nm]=rm(Qc),om=e=>{const{__scopePopper:t,children:r}=e,[n,o]=b.useState(null);return T.jsx(CA,{scope:t,anchor:n,onAnchorChange:o,children:r})};om.displayName=Qc;var sm="PopperAnchor",im=b.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=nm(sm,r),i=b.useRef(null),a=He(t,i),c=b.useRef(null);return b.useEffect(()=>{const u=c.current;c.current=n?.current||i.current,u!==c.current&&s.onAnchorChange(c.current)}),n?null:T.jsx(Ne.div,{...o,ref:a})});im.displayName=sm;var el="PopperContent",[TA,DA]=rm(el),am=b.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:l=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:m,...p}=e,g=nm(el,r),[y,O]=b.useState(null),x=He(t,q=>O(q)),[w,_]=b.useState(null),S=Pc(w),I=S?.width??0,v=S?.height??0,E=n+(s!=="center"?"-"+s:""),P=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},A=Array.isArray(u)?u:[u],M=A.length>0,F={padding:P,boundary:A.filter(MA),altBoundary:M},{refs:N,floatingStyles:W,placement:C,isPositioned:k,middlewareData:Y}=gA({strategy:"fixed",placement:E,whileElementsMounted:(...q)=>iA(...q,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[vA({mainAxis:o+v,alignmentAxis:i}),c&&bA({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?wA():void 0,...F}),c&&_A({...F}),SA({...F,apply:({elements:q,rects:oe,availableWidth:Q,availableHeight:ne})=>{const{width:le,height:K}=oe.reference,Se=q.floating.style;Se.setProperty("--radix-popper-available-width",`${Q}px`),Se.setProperty("--radix-popper-available-height",`${ne}px`),Se.setProperty("--radix-popper-anchor-width",`${le}px`),Se.setProperty("--radix-popper-anchor-height",`${K}px`)}}),w&&xA({element:w,padding:a}),PA({arrowWidth:I,arrowHeight:v}),d&&kA({strategy:"referenceHidden",...F})]}),[$,D]=um(C),V=hn(m);At(()=>{k&&V?.()},[k,V]);const Z=Y.arrow?.x,G=Y.arrow?.y,B=Y.arrow?.centerOffset!==0,[L,J]=b.useState();return At(()=>{y&&J(window.getComputedStyle(y).zIndex)},[y]),T.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:k?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:T.jsx(TA,{scope:r,placedSide:$,onArrowChange:_,arrowX:Z,arrowY:G,shouldHideArrow:B,children:T.jsx(Ne.div,{"data-side":$,"data-align":D,...p,ref:x,style:{...p.style,animation:k?void 0:"none"}})})})});am.displayName=el;var cm="PopperArrow",AA={top:"bottom",right:"left",bottom:"top",left:"right"},lm=b.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=DA(cm,n),i=AA[s.placedSide];return T.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:T.jsx(OA,{...o,ref:r,style:{...o.style,display:"block"}})})});lm.displayName=cm;function MA(e){return e!==null}var PA=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,l]=um(r),f={start:"0%",center:"50%",end:"100%"}[l],d=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+c/2;let m="",p="";return u==="bottom"?(m=i?f:`${d}px`,p=`${-c}px`):u==="top"?(m=i?f:`${d}px`,p=`${n.floating.height+c}px`):u==="right"?(m=`${-c}px`,p=i?f:`${h}px`):u==="left"&&(m=`${n.floating.width+c}px`,p=i?f:`${h}px`),{data:{x:m,y:p}}}});function um(e){const[t,r="center"]=e.split("-");return[t,r]}var fm=om,tl=im,dm=am,hm=lm,NA="Portal",Oi=b.forwardRef((e,t)=>{const{container:r,...n}=e,[o,s]=b.useState(!1);At(()=>s(!0),[]);const i=r||o&&globalThis?.document?.body;return i?Lu.createPortal(T.jsx(Ne.div,{...n,ref:t}),i):null});Oi.displayName=NA;function IA(e){const t=FA(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),c=a.find(WA);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function FA(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=zA(o),a=LA(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Nn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var RA=Symbol("radix.slottable");function WA(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===RA}function LA(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function zA(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var pm=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"}),$A="VisuallyHidden",UA=b.forwardRef((e,t)=>T.jsx(Ne.span,{...e,ref:t,style:{...pm,...e.style}}));UA.displayName=$A;var YA=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fo=new WeakMap,Ci=new WeakMap,Ti={},rl=0,mm=function(e){return e&&(e.host||mm(e.parentNode))},jA=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=mm(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})},VA=function(e,t,r,n){var o=jA(t,Array.isArray(e)?e:[e]);Ti[r]||(Ti[r]=new WeakMap);var s=Ti[r],i=[],a=new Set,c=new Set(o),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};o.forEach(u);var l=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))l(d);else try{var h=d.getAttribute(n),m=h!==null&&h!=="false",p=(fo.get(d)||0)+1,g=(s.get(d)||0)+1;fo.set(d,p),s.set(d,g),i.push(d),p===1&&m&&Ci.set(d,!0),g===1&&d.setAttribute(r,"true"),m||d.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",d,y)}})};return l(t),a.clear(),rl++,function(){i.forEach(function(f){var d=fo.get(f)-1,h=s.get(f)-1;fo.set(f,d),s.set(f,h),d||(Ci.has(f)||f.removeAttribute(n),Ci.delete(f)),h||f.removeAttribute(r)}),rl--,rl||(fo=new WeakMap,fo=new WeakMap,Ci=new WeakMap,Ti={})}},nl=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=YA(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),VA(n,o,r,"aria-hidden")):function(){return null}},Pr=function(){return Pr=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Pr.apply(this,arguments)};function gm(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function BA(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Di="right-scroll-bar-position",Ai="width-before-scroll-bar",HA="with-scroll-bars-hidden",ZA="--removed-body-scroll-bar-size";function ol(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function GA(e,t){var r=U.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var qA=typeof window<"u"?b.useLayoutEffect:b.useEffect,ym=new WeakMap;function KA(e,t){var r=GA(null,function(n){return e.forEach(function(o){return ol(o,n)})});return qA(function(){var n=ym.get(r);if(n){var o=new Set(n),s=new Set(e),i=r.current;o.forEach(function(a){s.has(a)||ol(a,null)}),s.forEach(function(a){o.has(a)||ol(a,i)})}ym.set(r,e)},[e]),r}function JA(e){return e}function XA(e,t){t===void 0&&(t=JA);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var i=t(s,n);return r.push(i),function(){r=r.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(n=!0;r.length;){var i=r;r=[],i.forEach(s)}r={push:function(a){return s(a)},filter:function(){return r}}},assignMedium:function(s){n=!0;var i=[];if(r.length){var a=r;r=[],a.forEach(s),i=r}var c=function(){var l=i;i=[],l.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(l){i.push(l),u()},filter:function(l){return i=i.filter(l),r}}}};return o}function QA(e){e===void 0&&(e={});var t=XA(null);return t.options=Pr({async:!0,ssr:!1},e),t}var vm=function(e){var t=e.sideCar,r=gm(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return b.createElement(n,Pr({},r))};vm.isSideCarExport=!0;function eM(e,t){return e.useMedium(t),vm}var bm=QA(),sl=function(){},Mi=b.forwardRef(function(e,t){var r=b.useRef(null),n=b.useState({onScrollCapture:sl,onWheelCapture:sl,onTouchMoveCapture:sl}),o=n[0],s=n[1],i=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,l=e.enabled,f=e.shards,d=e.sideCar,h=e.noRelative,m=e.noIsolation,p=e.inert,g=e.allowPinchZoom,y=e.as,O=y===void 0?"div":y,x=e.gapMode,w=gm(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=d,S=KA([r,t]),I=Pr(Pr({},w),o);return b.createElement(b.Fragment,null,l&&b.createElement(_,{sideCar:bm,removeScrollBar:u,shards:f,noRelative:h,noIsolation:m,inert:p,setCallbacks:s,allowPinchZoom:!!g,lockRef:r,gapMode:x}),i?b.cloneElement(b.Children.only(a),Pr(Pr({},I),{ref:S})):b.createElement(O,Pr({},I,{className:c,ref:S}),a))});Mi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Mi.classNames={fullWidth:Ai,zeroRight:Di};var tM=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function rM(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=tM();return t&&e.setAttribute("nonce",t),e}function nM(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function oM(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var sM=function(){var e=0,t=null;return{add:function(r){e==0&&(t=rM())&&(nM(t,r),oM(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iM=function(){var e=sM();return function(t,r){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},wm=function(){var e=iM(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},aM={left:0,top:0,right:0,gap:0},il=function(e){return parseInt(e||"",10)||0},cM=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[il(r),il(n),il(o)]},lM=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return aM;var t=cM(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])}},uM=wm(),ho="data-scroll-locked",fM=function(e,t,r,n){var o=e.left,s=e.top,i=e.right,a=e.gap;return r===void 0&&(r="margin"),`
44
+ .`.concat(HA,` {
45
45
  overflow: hidden `).concat(n,`;
46
46
  padding-right: `).concat(a,"px ").concat(n,`;
47
47
  }
@@ -75,12 +75,12 @@ Arguments: `+Array.prototype.slice.call(n).join("")+`
75
75
  }
76
76
 
77
77
  body[`).concat(ho,`] {
78
- `).concat(HA,": ").concat(a,`px;
78
+ `).concat(ZA,": ").concat(a,`px;
79
79
  }
80
- `)},_m=function(){var e=parseInt(document.body.getAttribute(ho)||"0",10);return isFinite(e)?e:0},fM=function(){b.useEffect(function(){return document.body.setAttribute(ho,(_m()+1).toString()),function(){var e=_m()-1;e<=0?document.body.removeAttribute(ho):document.body.setAttribute(ho,e.toString())}},[])},dM=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;fM();var s=b.useMemo(function(){return cM(o)},[o]);return b.createElement(lM,{styles:uM(s,!t,o,r?"":"!important")})},al=!1;if(typeof window<"u")try{var Pi=Object.defineProperty({},"passive",{get:function(){return al=!0,!0}});window.addEventListener("test",Pi,Pi),window.removeEventListener("test",Pi,Pi)}catch{al=!1}var po=al?{passive:!1}:!1,hM=function(e){return e.tagName==="TEXTAREA"},Sm=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!hM(e)&&r[t]==="visible")},pM=function(e){return Sm(e,"overflowY")},mM=function(e){return Sm(e,"overflowX")},km=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=xm(e,n);if(o){var s=Em(e,n),i=s[1],a=s[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},gM=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},yM=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},xm=function(e,t){return e==="v"?pM(t):mM(t)},Em=function(e,t){return e==="v"?gM(t):yM(t)},vM=function(e,t){return e==="h"&&t==="rtl"?-1:1},bM=function(e,t,r,n,o){var s=vM(e,window.getComputedStyle(t).direction),i=s*n,a=r.target,c=t.contains(a),u=!1,l=i>0,f=0,d=0;do{if(!a)break;var h=Em(e,a),m=h[0],p=h[1],g=h[2],y=p-g-s*m;(m||y)&&xm(e,a)&&(f+=y,d+=m);var O=a.parentNode;a=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(l&&Math.abs(f)<1||!l&&Math.abs(d)<1)&&(u=!0),u},Ni=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Om=function(e){return[e.deltaX,e.deltaY]},Cm=function(e){return e&&"current"in e?e.current:e},wM=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_M=function(e){return`
80
+ `)},_m=function(){var e=parseInt(document.body.getAttribute(ho)||"0",10);return isFinite(e)?e:0},dM=function(){b.useEffect(function(){return document.body.setAttribute(ho,(_m()+1).toString()),function(){var e=_m()-1;e<=0?document.body.removeAttribute(ho):document.body.setAttribute(ho,e.toString())}},[])},hM=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;dM();var s=b.useMemo(function(){return lM(o)},[o]);return b.createElement(uM,{styles:fM(s,!t,o,r?"":"!important")})},al=!1;if(typeof window<"u")try{var Pi=Object.defineProperty({},"passive",{get:function(){return al=!0,!0}});window.addEventListener("test",Pi,Pi),window.removeEventListener("test",Pi,Pi)}catch{al=!1}var po=al?{passive:!1}:!1,pM=function(e){return e.tagName==="TEXTAREA"},Sm=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!pM(e)&&r[t]==="visible")},mM=function(e){return Sm(e,"overflowY")},gM=function(e){return Sm(e,"overflowX")},km=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=xm(e,n);if(o){var s=Em(e,n),i=s[1],a=s[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},yM=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},vM=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},xm=function(e,t){return e==="v"?mM(t):gM(t)},Em=function(e,t){return e==="v"?yM(t):vM(t)},bM=function(e,t){return e==="h"&&t==="rtl"?-1:1},wM=function(e,t,r,n,o){var s=bM(e,window.getComputedStyle(t).direction),i=s*n,a=r.target,c=t.contains(a),u=!1,l=i>0,f=0,d=0;do{if(!a)break;var h=Em(e,a),m=h[0],p=h[1],g=h[2],y=p-g-s*m;(m||y)&&xm(e,a)&&(f+=y,d+=m);var O=a.parentNode;a=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(l&&Math.abs(f)<1||!l&&Math.abs(d)<1)&&(u=!0),u},Ni=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Om=function(e){return[e.deltaX,e.deltaY]},Cm=function(e){return e&&"current"in e?e.current:e},_M=function(e,t){return e[0]===t[0]&&e[1]===t[1]},SM=function(e){return`
81
81
  .block-interactivity-`.concat(e,` {pointer-events: none;}
82
82
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
83
- `)},SM=0,mo=[];function kM(e){var t=b.useRef([]),r=b.useRef([0,0]),n=b.useRef(),o=b.useState(SM++)[0],s=b.useState(wm)[0],i=b.useRef(e);b.useEffect(function(){i.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=VA([e.lockRef.current],(e.shards||[]).map(Cm),!0).filter(Boolean);return p.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=b.useCallback(function(p,g){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!i.current.allowPinchZoom;var y=Ni(p),O=r.current,x="deltaX"in p?p.deltaX:O[0]-y[0],w="deltaY"in p?p.deltaY:O[1]-y[1],_,S=p.target,I=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in p&&I==="h"&&S.type==="range")return!1;var v=window.getSelection(),E=v&&v.anchorNode,P=E?E===S||E.contains(S):!1;if(P)return!1;var A=km(I,S);if(!A)return!0;if(A?_=I:(_=I==="v"?"h":"v",A=km(I,S)),!A)return!1;if(!n.current&&"changedTouches"in p&&(x||w)&&(n.current=_),!_)return!0;var M=n.current||_;return bM(M,g,p,M==="h"?x:w)},[]),c=b.useCallback(function(p){var g=p;if(!(!mo.length||mo[mo.length-1]!==s)){var y="deltaY"in g?Om(g):Ni(g),O=t.current.filter(function(_){return _.name===g.type&&(_.target===g.target||g.target===_.shadowParent)&&wM(_.delta,y)})[0];if(O&&O.should){g.cancelable&&g.preventDefault();return}if(!O){var x=(i.current.shards||[]).map(Cm).filter(Boolean).filter(function(_){return _.contains(g.target)}),w=x.length>0?a(g,x[0]):!i.current.noIsolation;w&&g.cancelable&&g.preventDefault()}}},[]),u=b.useCallback(function(p,g,y,O){var x={name:p,delta:g,target:y,should:O,shadowParent:xM(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(w){return w!==x})},1)},[]),l=b.useCallback(function(p){r.current=Ni(p),n.current=void 0},[]),f=b.useCallback(function(p){u(p.type,Om(p),p.target,a(p,e.lockRef.current))},[]),d=b.useCallback(function(p){u(p.type,Ni(p),p.target,a(p,e.lockRef.current))},[]);b.useEffect(function(){return mo.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,po),document.addEventListener("touchmove",c,po),document.addEventListener("touchstart",l,po),function(){mo=mo.filter(function(p){return p!==s}),document.removeEventListener("wheel",c,po),document.removeEventListener("touchmove",c,po),document.removeEventListener("touchstart",l,po)}},[]);var h=e.removeScrollBar,m=e.inert;return b.createElement(b.Fragment,null,m?b.createElement(s,{styles:_M(o)}):null,h?b.createElement(dM,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const EM=QA(bm,kM);var Ii=b.forwardRef(function(e,t){return b.createElement(Mi,Pr({},e,{ref:t,sideCar:EM}))});Ii.classNames=Mi.classNames;var OM=[" ","Enter","ArrowUp","ArrowDown"],CM=[" ","Enter"],Ln="Select",[Fi,Ri,TM]=Hh(Ln),[go]=qr(Ln,[TM,Ei]),Wi=Ei(),[DM,wn]=go(Ln),[AM,MM]=go(Ln),Tm=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:u,name:l,autoComplete:f,disabled:d,required:h,form:m}=e,p=Wi(t),[g,y]=b.useState(null),[O,x]=b.useState(null),[w,_]=b.useState(!1),S=Dc(u),[I,v]=Rn({prop:n,defaultProp:o??!1,onChange:s,caller:Ln}),[E,P]=Rn({prop:i,defaultProp:a,onChange:c,caller:Ln}),A=b.useRef(null),M=g?m||!!g.closest("form"):!0,[F,N]=b.useState(new Set),W=Array.from(F).map(C=>C.props.value).join(";");return T.jsx(fm,{...p,children:T.jsxs(DM,{required:h,scope:t,trigger:g,onTriggerChange:y,valueNode:O,onValueNodeChange:x,valueNodeHasChildren:w,onValueNodeHasChildrenChange:_,contentId:dn(),value:E,onValueChange:P,open:I,onOpenChange:v,dir:S,triggerPointerDownPosRef:A,disabled:d,children:[T.jsx(Fi.Provider,{scope:t,children:T.jsx(AM,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(C=>{N(k=>new Set(k).add(C))},[]),onNativeOptionRemove:b.useCallback(C=>{N(k=>{const Y=new Set(k);return Y.delete(C),Y})},[]),children:r})}),M?T.jsxs(Km,{"aria-hidden":!0,required:h,tabIndex:-1,name:l,autoComplete:f,value:E,onChange:C=>P(C.target.value),disabled:d,form:m,children:[E===void 0?T.jsx("option",{value:""}):null,Array.from(F)]},W):null]})})};Tm.displayName=Ln;var Dm="SelectTrigger",Am=b.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,s=Wi(r),i=wn(Dm,r),a=i.disabled||n,c=He(t,i.onTriggerChange),u=Ri(r),l=b.useRef("touch"),[f,d,h]=Xm(p=>{const g=u().filter(x=>!x.disabled),y=g.find(x=>x.value===i.value),O=Qm(g,p,y);O!==void 0&&i.onValueChange(O.value)}),m=p=>{a||(i.onOpenChange(!0),h()),p&&(i.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return T.jsx(tl,{asChild:!0,...s,children:T.jsx(Ne.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Jm(i.value)?"":void 0,...o,ref:c,onClick:Te(o.onClick,p=>{p.currentTarget.focus(),l.current!=="mouse"&&m(p)}),onPointerDown:Te(o.onPointerDown,p=>{l.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(m(p),p.preventDefault())}),onKeyDown:Te(o.onKeyDown,p=>{const g=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&d(p.key),!(g&&p.key===" ")&&OM.includes(p.key)&&(m(),p.preventDefault())})})})});Am.displayName=Dm;var Mm="SelectValue",Pm=b.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:s,placeholder:i="",...a}=e,c=wn(Mm,r),{onValueNodeHasChildrenChange:u}=c,l=s!==void 0,f=He(t,c.onValueNodeChange);return At(()=>{u(l)},[u,l]),T.jsx(Ne.span,{...a,ref:f,style:{pointerEvents:"none"},children:Jm(c.value)?T.jsx(T.Fragment,{children:i}):s})});Pm.displayName=Mm;var PM="SelectIcon",Nm=b.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return T.jsx(Ne.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});Nm.displayName=PM;var NM="SelectPortal",Im=e=>T.jsx(Oi,{asChild:!0,...e});Im.displayName=NM;var zn="SelectContent",Fm=b.forwardRef((e,t)=>{const r=wn(zn,e.__scopeSelect),[n,o]=b.useState();if(At(()=>{o(new DocumentFragment)},[]),!r.open){const s=n;return s?ms.createPortal(T.jsx(Rm,{scope:e.__scopeSelect,children:T.jsx(Fi.Slot,{scope:e.__scopeSelect,children:T.jsx("div",{children:e.children})})}),s):null}return T.jsx(Wm,{...e,ref:t})});Fm.displayName=zn;var gr=10,[Rm,_n]=go(zn),IM="SelectContentImpl",FM=NA("SelectContent.RemoveScroll"),Wm=b.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:u,alignOffset:l,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:g,...y}=e,O=wn(zn,r),[x,w]=b.useState(null),[_,S]=b.useState(null),I=He(t,q=>w(q)),[v,E]=b.useState(null),[P,A]=b.useState(null),M=Ri(r),[F,N]=b.useState(!1),W=b.useRef(!1);b.useEffect(()=>{if(x)return nl(x)},[x]),zc();const C=b.useCallback(q=>{const[oe,...Q]=M().map(K=>K.ref.current),[ne]=Q.slice(-1),le=document.activeElement;for(const K of q)if(K===le||(K?.scrollIntoView({block:"nearest"}),K===oe&&_&&(_.scrollTop=0),K===ne&&_&&(_.scrollTop=_.scrollHeight),K?.focus(),document.activeElement!==le))return},[M,_]),k=b.useCallback(()=>C([v,x]),[C,v,x]);b.useEffect(()=>{F&&k()},[F,k]);const{onOpenChange:Y,triggerPointerDownPosRef:$}=O;b.useEffect(()=>{if(x){let q={x:0,y:0};const oe=ne=>{q={x:Math.abs(Math.round(ne.pageX)-($.current?.x??0)),y:Math.abs(Math.round(ne.pageY)-($.current?.y??0))}},Q=ne=>{q.x<=10&&q.y<=10?ne.preventDefault():x.contains(ne.target)||Y(!1),document.removeEventListener("pointermove",oe),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",Q,{capture:!0})}}},[x,Y,$]),b.useEffect(()=>{const q=()=>Y(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[Y]);const[D,V]=Xm(q=>{const oe=M().filter(le=>!le.disabled),Q=oe.find(le=>le.ref.current===document.activeElement),ne=Qm(oe,q,Q);ne&&setTimeout(()=>ne.ref.current.focus())}),Z=b.useCallback((q,oe,Q)=>{const ne=!W.current&&!Q;(O.value!==void 0&&O.value===oe||ne)&&(E(q),ne&&(W.current=!0))},[O.value]),G=b.useCallback(()=>x?.focus(),[x]),B=b.useCallback((q,oe,Q)=>{const ne=!W.current&&!Q;(O.value!==void 0&&O.value===oe||ne)&&A(q)},[O.value]),L=n==="popper"?cl:Lm,J=L===cl?{side:a,sideOffset:c,align:u,alignOffset:l,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:g}:{};return T.jsx(Rm,{scope:r,content:x,viewport:_,onViewportChange:S,itemRefCallback:Z,selectedItem:v,onItemLeave:G,itemTextRefCallback:B,focusSelectedItem:k,selectedItemText:P,position:n,isPositioned:F,searchRef:D,children:T.jsx(Ii,{as:FM,allowPinchZoom:!0,children:T.jsx(pi,{asChild:!0,trapped:O.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:Te(o,q=>{O.trigger?.focus({preventScroll:!0}),q.preventDefault()}),children:T.jsx(hi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:T.jsx(L,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:q=>q.preventDefault(),...y,...J,onPlaced:()=>N(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Te(y.onKeyDown,q=>{const oe=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!oe&&q.key.length===1&&V(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let ne=M().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(q.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const le=q.target,K=ne.indexOf(le);ne=ne.slice(K+1)}setTimeout(()=>C(ne)),q.preventDefault()}})})})})})})});Wm.displayName=IM;var RM="SelectItemAlignedPosition",Lm=b.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,s=wn(zn,r),i=_n(zn,r),[a,c]=b.useState(null),[u,l]=b.useState(null),f=He(t,I=>l(I)),d=Ri(r),h=b.useRef(!1),m=b.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:y,focusSelectedItem:O}=i,x=b.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&p&&g&&y){const I=s.trigger.getBoundingClientRect(),v=u.getBoundingClientRect(),E=s.valueNode.getBoundingClientRect(),P=y.getBoundingClientRect();if(s.dir!=="rtl"){const le=P.left-v.left,K=E.left-le,Se=I.left-K,Ie=I.width+Se,ke=Math.max(Ie,v.width),Ge=window.innerWidth-gr,Re=Sp(K,[gr,Math.max(gr,Ge-ke)]);a.style.minWidth=Ie+"px",a.style.left=Re+"px"}else{const le=v.right-P.right,K=window.innerWidth-E.right-le,Se=window.innerWidth-I.right-K,Ie=I.width+Se,ke=Math.max(Ie,v.width),Ge=window.innerWidth-gr,Re=Sp(K,[gr,Math.max(gr,Ge-ke)]);a.style.minWidth=Ie+"px",a.style.right=Re+"px"}const A=d(),M=window.innerHeight-gr*2,F=p.scrollHeight,N=window.getComputedStyle(u),W=parseInt(N.borderTopWidth,10),C=parseInt(N.paddingTop,10),k=parseInt(N.borderBottomWidth,10),Y=parseInt(N.paddingBottom,10),$=W+C+F+Y+k,D=Math.min(g.offsetHeight*5,$),V=window.getComputedStyle(p),Z=parseInt(V.paddingTop,10),G=parseInt(V.paddingBottom,10),B=I.top+I.height/2-gr,L=M-B,J=g.offsetHeight/2,q=g.offsetTop+J,oe=W+C+q,Q=$-oe;if(oe<=B){const le=A.length>0&&g===A[A.length-1].ref.current;a.style.bottom="0px";const K=u.clientHeight-p.offsetTop-p.offsetHeight,Se=Math.max(L,J+(le?G:0)+K+k),Ie=oe+Se;a.style.height=Ie+"px"}else{const le=A.length>0&&g===A[0].ref.current;a.style.top="0px";const Se=Math.max(B,W+p.offsetTop+(le?Z:0)+J)+Q;a.style.height=Se+"px",p.scrollTop=oe-B+p.offsetTop}a.style.margin=`${gr}px 0`,a.style.minHeight=D+"px",a.style.maxHeight=M+"px",n?.(),requestAnimationFrame(()=>h.current=!0)}},[d,s.trigger,s.valueNode,a,u,p,g,y,s.dir,n]);At(()=>x(),[x]);const[w,_]=b.useState();At(()=>{u&&_(window.getComputedStyle(u).zIndex)},[u]);const S=b.useCallback(I=>{I&&m.current===!0&&(x(),O?.(),m.current=!1)},[x,O]);return T.jsx(LM,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:S,children:T.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:T.jsx(Ne.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Lm.displayName=RM;var WM="SelectPopperPosition",cl=b.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=gr,...s}=e,i=Wi(r);return T.jsx(dm,{...i,...s,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});cl.displayName=WM;var[LM,ll]=go(zn,{}),ul="SelectViewport",zm=b.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,s=_n(ul,r),i=ll(ul,r),a=He(t,s.onViewportChange),c=b.useRef(0);return T.jsxs(T.Fragment,{children:[T.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}),T.jsx(Fi.Slot,{scope:r,children:T.jsx(Ne.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Te(o.onScroll,u=>{const l=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=i;if(d?.current&&f){const h=Math.abs(c.current-l.scrollTop);if(h>0){const m=window.innerHeight-gr*2,p=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),y=Math.max(p,g);if(y<m){const O=y+h,x=Math.min(m,O),w=O-x;f.style.height=x+"px",f.style.bottom==="0px"&&(l.scrollTop=w>0?w:0,f.style.justifyContent="flex-end")}}}c.current=l.scrollTop})})})]})});zm.displayName=ul;var $m="SelectGroup",[zM,$M]=go($m),UM=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=dn();return T.jsx(zM,{scope:r,id:o,children:T.jsx(Ne.div,{role:"group","aria-labelledby":o,...n,ref:t})})});UM.displayName=$m;var Um="SelectLabel",YM=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=$M(Um,r);return T.jsx(Ne.div,{id:o.id,...n,ref:t})});YM.displayName=Um;var Li="SelectItem",[jM,Ym]=go(Li),jm=b.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:s,...i}=e,a=wn(Li,r),c=_n(Li,r),u=a.value===n,[l,f]=b.useState(s??""),[d,h]=b.useState(!1),m=He(t,O=>c.itemRefCallback?.(O,n,o)),p=dn(),g=b.useRef("touch"),y=()=>{o||(a.onValueChange(n),a.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 T.jsx(jM,{scope:r,value:n,disabled:o,textId:p,isSelected:u,onItemTextChange:b.useCallback(O=>{f(x=>x||(O?.textContent??"").trim())},[]),children:T.jsx(Fi.ItemSlot,{scope:r,value:n,disabled:o,textValue:l,children:T.jsx(Ne.div,{role:"option","aria-labelledby":p,"data-highlighted":d?"":void 0,"aria-selected":u&&d,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:m,onFocus:Te(i.onFocus,()=>h(!0)),onBlur:Te(i.onBlur,()=>h(!1)),onClick:Te(i.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:Te(i.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:Te(i.onPointerDown,O=>{g.current=O.pointerType}),onPointerMove:Te(i.onPointerMove,O=>{g.current=O.pointerType,o?c.onItemLeave?.():g.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Te(i.onPointerLeave,O=>{O.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Te(i.onKeyDown,O=>{c.searchRef?.current!==""&&O.key===" "||(CM.includes(O.key)&&y(),O.key===" "&&O.preventDefault())})})})})});jm.displayName=Li;var es="SelectItemText",Vm=b.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...s}=e,i=wn(es,r),a=_n(es,r),c=Ym(es,r),u=MM(es,r),[l,f]=b.useState(null),d=He(t,y=>f(y),c.onItemTextChange,y=>a.itemTextRefCallback?.(y,c.value,c.disabled)),h=l?.textContent,m=b.useMemo(()=>T.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return At(()=>(p(m),()=>g(m)),[p,g,m]),T.jsxs(T.Fragment,{children:[T.jsx(Ne.span,{id:c.textId,...s,ref:d}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ms.createPortal(s.children,i.valueNode):null]})});Vm.displayName=es;var Bm="SelectItemIndicator",Hm=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return Ym(Bm,r).isSelected?T.jsx(Ne.span,{"aria-hidden":!0,...n,ref:t}):null});Hm.displayName=Bm;var fl="SelectScrollUpButton",Zm=b.forwardRef((e,t)=>{const r=_n(fl,e.__scopeSelect),n=ll(fl,e.__scopeSelect),[o,s]=b.useState(!1),i=He(t,n.onScrollButtonChange);return At(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=c.scrollTop>0;s(u)};const c=r.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?T.jsx(qm,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});Zm.displayName=fl;var dl="SelectScrollDownButton",Gm=b.forwardRef((e,t)=>{const r=_n(dl,e.__scopeSelect),n=ll(dl,e.__scopeSelect),[o,s]=b.useState(!1),i=He(t,n.onScrollButtonChange);return At(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,l=Math.ceil(c.scrollTop)<u;s(l)};const c=r.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?T.jsx(qm,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});Gm.displayName=dl;var qm=b.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,s=_n("SelectScrollButton",r),i=b.useRef(null),a=Ri(r),c=b.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return b.useEffect(()=>()=>c(),[c]),At(()=>{a().find(l=>l.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),T.jsx(Ne.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Te(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:Te(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:Te(o.onPointerLeave,()=>{c()})})}),VM="SelectSeparator",BM=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return T.jsx(Ne.div,{"aria-hidden":!0,...n,ref:t})});BM.displayName=VM;var hl="SelectArrow",HM=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Wi(r),s=wn(hl,r),i=_n(hl,r);return s.open&&i.position==="popper"?T.jsx(hm,{...o,...n,ref:t}):null});HM.displayName=hl;var ZM="SelectBubbleInput",Km=b.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=b.useRef(null),s=He(n,o),i=Nc(t);return b.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,l=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&l){const f=new Event("change",{bubbles:!0});l.call(a,t),a.dispatchEvent(f)}},[i,t]),T.jsx(Ne.select,{...r,style:{...pm,...r.style},ref:s,defaultValue:t})});Km.displayName=ZM;function Jm(e){return e===""||e===void 0}function Xm(e){const t=hn(e),r=b.useRef(""),n=b.useRef(0),o=b.useCallback(i=>{const a=r.current+i;t(a),(function c(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))})(a)},[t]),s=b.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,s]}function Qm(e,t,r){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let i=GM(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==r));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}function GM(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var qM=Tm,KM=Am,JM=Pm,XM=Nm,QM=Im,eP=Fm,tP=zm,rP=jm,nP=Vm,oP=Hm,sP=Zm,iP=Gm;function aP({...e}){return T.jsx(qM,{"data-slot":"select",...e})}function cP({...e}){return T.jsx(JM,{"data-slot":"select-value",...e})}function lP({className:e,size:t="default",children:r,...n}){return T.jsxs(KM,{"data-slot":"select-trigger","data-size":t,className:Dt("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,T.jsx(XM,{asChild:!0,children:T.jsx(Fc,{className:"size-4 opacity-50"})})]})}function uP({className:e,children:t,position:r="popper",...n}){return T.jsx(QM,{children:T.jsxs(eP,{"data-slot":"select-content",className:Dt("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:[T.jsx(dP,{}),T.jsx(tP,{className:Dt("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),T.jsx(hP,{})]})})}function fP({className:e,children:t,...r}){return T.jsxs(rP,{"data-slot":"select-item",className:Dt("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:[T.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:T.jsx(oP,{children:T.jsx(hp,{className:"size-4"})})}),T.jsx(nP,{children:t})]})}function dP({className:e,...t}){return T.jsx(sP,{"data-slot":"select-scroll-up-button",className:Dt("flex cursor-default items-center justify-center py-1",e),...t,children:T.jsx($T,{className:"size-4"})})}function hP({className:e,...t}){return T.jsx(iP,{"data-slot":"select-scroll-down-button",className:Dt("flex cursor-default items-center justify-center py-1",e),...t,children:T.jsx(Fc,{className:"size-4"})})}const pP=(e={})=>{const{field:t={},form:r={},question:n={},disabled:o=!1}=e,{options:s=[]}=n;return T.jsxs(aP,{onValueChange:t.onChange,value:t.value,disabled:o,className:"bq-select",children:[T.jsx(li,{className:"w-full",children:T.jsx(lP,{className:"bq-select-trigger",children:T.jsx(cP,{placeholder:n.placeholder||"Please select"})})}),T.jsx(uP,{children:s.map((i,a)=>T.jsx(fP,{value:i.value,children:i.label},a))})]})},eg=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,tg=oi,mP=(e,t)=>r=>{var n;if(t?.variants==null)return tg(e,r?.class,r?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const l=r?.[u],f=s?.[u];if(l===null)return null;const d=eg(l)||eg(f);return o[u][d]}),a=r&&Object.entries(r).reduce((u,l)=>{let[f,d]=l;return d===void 0||(u[f]=d),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,l)=>{let{class:f,className:d,...h}=l;return Object.entries(h).every(m=>{let[p,g]=m;return Array.isArray(g)?g.includes({...s,...a}[p]):{...s,...a}[p]===g})?[...u,f,d]:u},[]);return tg(e,i,c,r?.class,r?.className)};function gP(e,t){return t.forEach((function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach((function(n){if(n!=="default"&&!(n in e)){var o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return r[n]}})}}))})),Object.freeze(e)}function rg(e,t){return new Promise((function(r,n){let o;return yP(e).then((function(s){try{return o=s,r(new Blob([t.slice(0,2),o,t.slice(2)],{type:"image/jpeg"}))}catch(i){return n(i)}}),n)}))}const yP=e=>new Promise(((t,r)=>{const n=new FileReader;n.addEventListener("load",(({target:{result:o}})=>{const s=new DataView(o);let i=0;if(s.getUint16(i)!==65496)return r("not a valid JPEG");for(i+=2;;){const a=s.getUint16(i);if(a===65498)break;const c=s.getUint16(i+2);if(a===65505&&s.getUint32(i+4)===1165519206){const u=i+10;let l;switch(s.getUint16(u)){case 18761:l=!0;break;case 19789:l=!1;break;default:return r("TIFF header contains invalid endian")}if(s.getUint16(u+2,l)!==42)return r("TIFF header contains invalid version");const f=s.getUint32(u+4,l),d=u+f+2+12*s.getUint16(u+f,l);for(let h=u+f+2;h<d;h+=12)if(s.getUint16(h,l)==274){if(s.getUint16(h+2,l)!==3)return r("Orientation data type is invalid");if(s.getUint32(h+4,l)!==1)return r("Orientation data count is invalid");s.setUint16(h+8,1,l);break}return t(o.slice(i,i+2+c))}i+=2+c}return t(new Blob)})),n.readAsArrayBuffer(e)}));var zi={},vP={get exports(){return zi},set exports(e){zi=e}};(function(e){var t,r,n={};vP.exports=n,n.parse=function(o,s){for(var i=n.bin.readUshort,a=n.bin.readUint,c=0,u={},l=new Uint8Array(o),f=l.length-4;a(l,f)!=101010256;)f--;c=f,c+=4;var d=i(l,c+=4);i(l,c+=2);var h=a(l,c+=2),m=a(l,c+=4);c+=4,c=m;for(var p=0;p<d;p++){a(l,c),c+=4,c+=4,c+=4,a(l,c+=4),h=a(l,c+=4);var g=a(l,c+=4),y=i(l,c+=4),O=i(l,c+2),x=i(l,c+4);c+=6;var w=a(l,c+=8);c+=4,c+=y+O+x,n._readLocal(l,w,u,h,g,s)}return u},n._readLocal=function(o,s,i,a,c,u){var l=n.bin.readUshort,f=n.bin.readUint;f(o,s),l(o,s+=4),l(o,s+=2);var d=l(o,s+=2);f(o,s+=2),f(o,s+=4),s+=4;var h=l(o,s+=8),m=l(o,s+=2);s+=2;var p=n.bin.readUTF8(o,s,h);if(s+=h,s+=m,u)i[p]={size:c,csize:a};else{var g=new Uint8Array(o.buffer,s);if(d==0)i[p]=new Uint8Array(g.buffer.slice(s,s+a));else{if(d!=8)throw"unknown compression method: "+d;var y=new Uint8Array(c);n.inflateRaw(g,y),i[p]=y}}},n.inflateRaw=function(o,s){return n.F.inflate(o,s)},n.inflate=function(o,s){return o[0],o[1],n.inflateRaw(new Uint8Array(o.buffer,o.byteOffset+2,o.length-6),s)},n.deflate=function(o,s){s==null&&(s={level:6});var i=0,a=new Uint8Array(50+Math.floor(1.1*o.length));a[i]=120,a[i+1]=156,i+=2,i=n.F.deflateRaw(o,a,i,s.level);var c=n.adler(o,0,o.length);return a[i+0]=c>>>24&255,a[i+1]=c>>>16&255,a[i+2]=c>>>8&255,a[i+3]=c>>>0&255,new Uint8Array(a.buffer,0,i+4)},n.deflateRaw=function(o,s){s==null&&(s={level:6});var i=new Uint8Array(50+Math.floor(1.1*o.length)),a=n.F.deflateRaw(o,i,a,s.level);return new Uint8Array(i.buffer,0,a)},n.encode=function(o,s){s==null&&(s=!1);var i=0,a=n.bin.writeUint,c=n.bin.writeUshort,u={};for(var l in o){var f=!n._noNeed(l)&&!s,d=o[l],h=n.crc.crc(d,0,d.length);u[l]={cpr:f,usize:d.length,crc:h,file:f?n.deflateRaw(d):d}}for(var l in u)i+=u[l].file.length+30+46+2*n.bin.sizeUTF8(l);i+=22;var m=new Uint8Array(i),p=0,g=[];for(var l in u){var y=u[l];g.push(p),p=n._writeHeader(m,p,l,y,0)}var O=0,x=p;for(var l in u)y=u[l],g.push(p),p=n._writeHeader(m,p,l,y,1,g[O++]);var w=p-x;return a(m,p,101010256),p+=4,c(m,p+=4,O),c(m,p+=2,O),a(m,p+=2,w),a(m,p+=4,x),p+=4,p+=2,m.buffer},n._noNeed=function(o){var s=o.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(s)!=-1},n._writeHeader=function(o,s,i,a,c,u){var l=n.bin.writeUint,f=n.bin.writeUshort,d=a.file;return l(o,s,c==0?67324752:33639248),s+=4,c==1&&(s+=2),f(o,s,20),f(o,s+=2,0),f(o,s+=2,a.cpr?8:0),l(o,s+=2,0),l(o,s+=4,a.crc),l(o,s+=4,d.length),l(o,s+=4,a.usize),f(o,s+=4,n.bin.sizeUTF8(i)),f(o,s+=2,0),s+=2,c==1&&(s+=2,s+=2,l(o,s+=6,u),s+=4),s+=n.bin.writeUTF8(o,s,i),c==0&&(o.set(d,s),s+=d.length),s},n.crc={table:(function(){for(var o=new Uint32Array(256),s=0;s<256;s++){for(var i=s,a=0;a<8;a++)1&i?i=3988292384^i>>>1:i>>>=1;o[s]=i}return o})(),update:function(o,s,i,a){for(var c=0;c<a;c++)o=n.crc.table[255&(o^s[i+c])]^o>>>8;return o},crc:function(o,s,i){return 4294967295^n.crc.update(4294967295,o,s,i)}},n.adler=function(o,s,i){for(var a=1,c=0,u=s,l=s+i;u<l;){for(var f=Math.min(u+5552,l);u<f;)c+=a+=o[u++];a%=65521,c%=65521}return c<<16|a},n.bin={readUshort:function(o,s){return o[s]|o[s+1]<<8},writeUshort:function(o,s,i){o[s]=255&i,o[s+1]=i>>8&255},readUint:function(o,s){return 16777216*o[s+3]+(o[s+2]<<16|o[s+1]<<8|o[s])},writeUint:function(o,s,i){o[s]=255&i,o[s+1]=i>>8&255,o[s+2]=i>>16&255,o[s+3]=i>>24&255},readASCII:function(o,s,i){for(var a="",c=0;c<i;c++)a+=String.fromCharCode(o[s+c]);return a},writeASCII:function(o,s,i){for(var a=0;a<i.length;a++)o[s+a]=i.charCodeAt(a)},pad:function(o){return o.length<2?"0"+o:o},readUTF8:function(o,s,i){for(var a,c="",u=0;u<i;u++)c+="%"+n.bin.pad(o[s+u].toString(16));try{a=decodeURIComponent(c)}catch{return n.bin.readASCII(o,s,i)}return a},writeUTF8:function(o,s,i){for(var a=i.length,c=0,u=0;u<a;u++){var l=i.charCodeAt(u);if((4294967168&l)==0)o[s+c]=l,c++;else if((4294965248&l)==0)o[s+c]=192|l>>6,o[s+c+1]=128|l>>0&63,c+=2;else if((4294901760&l)==0)o[s+c]=224|l>>12,o[s+c+1]=128|l>>6&63,o[s+c+2]=128|l>>0&63,c+=3;else{if((4292870144&l)!=0)throw"e";o[s+c]=240|l>>18,o[s+c+1]=128|l>>12&63,o[s+c+2]=128|l>>6&63,o[s+c+3]=128|l>>0&63,c+=4}}return c},sizeUTF8:function(o){for(var s=o.length,i=0,a=0;a<s;a++){var c=o.charCodeAt(a);if((4294967168&c)==0)i++;else if((4294965248&c)==0)i+=2;else if((4294901760&c)==0)i+=3;else{if((4292870144&c)!=0)throw"e";i+=4}}return i}},n.F={},n.F.deflateRaw=function(o,s,i,a){var c=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][a],u=n.F.U,l=n.F._goodIndex;n.F._hash;var f=n.F._putsE,d=0,h=i<<3,m=0,p=o.length;if(a==0){for(;d<p;)f(s,h,d+(A=Math.min(65535,p-d))==p?1:0),h=n.F._copyExact(o,d,A,s,h+8),d+=A;return h>>>3}var g=u.lits,y=u.strt,O=u.prev,x=0,w=0,_=0,S=0,I=0,v=0;for(p>2&&(y[v=n.F._hash(o,0)]=0),d=0;d<p;d++){if(I=v,d+1<p-2){v=n.F._hash(o,d+1);var E=d+1&32767;O[E]=y[v],y[v]=E}if(m<=d){(x>14e3||w>26697)&&p-d>100&&(m<d&&(g[x]=d-m,x+=2,m=d),h=n.F._writeBlock(d==p-1||m==p?1:0,g,x,S,o,_,d-_,s,h),x=w=S=0,_=d);var P=0;d<p-2&&(P=n.F._bestMatch(o,d,O,I,Math.min(c[2],p-d),c[3]));var A=P>>>16,M=65535&P;if(P!=0){M=65535&P;var F=l(A=P>>>16,u.of0);u.lhst[257+F]++;var N=l(M,u.df0);u.dhst[N]++,S+=u.exb[F]+u.dxb[N],g[x]=A<<23|d-m,g[x+1]=M<<16|F<<8|N,x+=2,m=d+A}else u.lhst[o[d]]++;w++}}for(_==d&&o.length!=0||(m<d&&(g[x]=d-m,x+=2,m=d),h=n.F._writeBlock(1,g,x,S,o,_,d-_,s,h),x=0,w=0,x=w=S=0,_=d);(7&h)!=0;)h++;return h>>>3},n.F._bestMatch=function(o,s,i,a,c,u){var l=32767&s,f=i[l],d=l-f+32768&32767;if(f==l||a!=n.F._hash(o,s-d))return 0;for(var h=0,m=0,p=Math.min(32767,s);d<=p&&--u!=0&&f!=l;){if(h==0||o[s+h]==o[s+h-d]){var g=n.F._howLong(o,s,d);if(g>h){if(m=d,(h=g)>=c)break;d+2<g&&(g=d+2);for(var y=0,O=0;O<g-2;O++){var x=s-d+O+32768&32767,w=x-i[x]+32768&32767;w>y&&(y=w,f=x)}}}d+=(l=f)-(f=i[l])+32768&32767}return h<<16|m},n.F._howLong=function(o,s,i){if(o[s]!=o[s-i]||o[s+1]!=o[s+1-i]||o[s+2]!=o[s+2-i])return 0;var a=s,c=Math.min(o.length,s+258);for(s+=3;s<c&&o[s]==o[s-i];)s++;return s-a},n.F._hash=function(o,s){return(o[s]<<8|o[s+1])+(o[s+2]<<4)&65535},n.saved=0,n.F._writeBlock=function(o,s,i,a,c,u,l,f,d){var h,m,p,g,y,O,x,w,_,S=n.F.U,I=n.F._putsF,v=n.F._putsE;S.lhst[256]++,m=(h=n.F.getTrees())[0],p=h[1],g=h[2],y=h[3],O=h[4],x=h[5],w=h[6],_=h[7];var E=32+((d+3&7)==0?0:8-(d+3&7))+(l<<3),P=a+n.F.contSize(S.fltree,S.lhst)+n.F.contSize(S.fdtree,S.dhst),A=a+n.F.contSize(S.ltree,S.lhst)+n.F.contSize(S.dtree,S.dhst);A+=14+3*x+n.F.contSize(S.itree,S.ihst)+(2*S.ihst[16]+3*S.ihst[17]+7*S.ihst[18]);for(var M=0;M<286;M++)S.lhst[M]=0;for(M=0;M<30;M++)S.dhst[M]=0;for(M=0;M<19;M++)S.ihst[M]=0;var F=E<P&&E<A?0:P<A?1:2;if(I(f,d,o),I(f,d+1,F),d+=3,F==0){for(;(7&d)!=0;)d++;d=n.F._copyExact(c,u,l,f,d)}else{var N,W;if(F==1&&(N=S.fltree,W=S.fdtree),F==2){n.F.makeCodes(S.ltree,m),n.F.revCodes(S.ltree,m),n.F.makeCodes(S.dtree,p),n.F.revCodes(S.dtree,p),n.F.makeCodes(S.itree,g),n.F.revCodes(S.itree,g),N=S.ltree,W=S.dtree,v(f,d,y-257),v(f,d+=5,O-1),v(f,d+=5,x-4),d+=4;for(var C=0;C<x;C++)v(f,d+3*C,S.itree[1+(S.ordr[C]<<1)]);d+=3*x,d=n.F._codeTiny(w,S.itree,f,d),d=n.F._codeTiny(_,S.itree,f,d)}for(var k=u,Y=0;Y<i;Y+=2){for(var $=s[Y],D=$>>>23,V=k+(8388607&$);k<V;)d=n.F._writeLit(c[k++],N,f,d);if(D!=0){var Z=s[Y+1],G=Z>>16,B=Z>>8&255,L=255&Z;v(f,d=n.F._writeLit(257+B,N,f,d),D-S.of0[B]),d+=S.exb[B],I(f,d=n.F._writeLit(L,W,f,d),G-S.df0[L]),d+=S.dxb[L],k+=D}}d=n.F._writeLit(256,N,f,d)}return d},n.F._copyExact=function(o,s,i,a,c){var u=c>>>3;return a[u]=i,a[u+1]=i>>>8,a[u+2]=255-a[u],a[u+3]=255-a[u+1],u+=4,a.set(new Uint8Array(o.buffer,s,i),u),c+(i+4<<3)},n.F.getTrees=function(){for(var o=n.F.U,s=n.F._hufTree(o.lhst,o.ltree,15),i=n.F._hufTree(o.dhst,o.dtree,15),a=[],c=n.F._lenCodes(o.ltree,a),u=[],l=n.F._lenCodes(o.dtree,u),f=0;f<a.length;f+=2)o.ihst[a[f]]++;for(f=0;f<u.length;f+=2)o.ihst[u[f]]++;for(var d=n.F._hufTree(o.ihst,o.itree,7),h=19;h>4&&o.itree[1+(o.ordr[h-1]<<1)]==0;)h--;return[s,i,d,c,l,h,a,u]},n.F.getSecond=function(o){for(var s=[],i=0;i<o.length;i+=2)s.push(o[i+1]);return s},n.F.nonZero=function(o){for(var s="",i=0;i<o.length;i+=2)o[i+1]!=0&&(s+=(i>>1)+",");return s},n.F.contSize=function(o,s){for(var i=0,a=0;a<s.length;a++)i+=s[a]*o[1+(a<<1)];return i},n.F._codeTiny=function(o,s,i,a){for(var c=0;c<o.length;c+=2){var u=o[c],l=o[c+1];a=n.F._writeLit(u,s,i,a);var f=u==16?2:u==17?3:7;u>15&&(n.F._putsE(i,a,l,f),a+=f)}return a},n.F._lenCodes=function(o,s){for(var i=o.length;i!=2&&o[i-1]==0;)i-=2;for(var a=0;a<i;a+=2){var c=o[a+1],u=a+3<i?o[a+3]:-1,l=a+5<i?o[a+5]:-1,f=a==0?-1:o[a-1];if(c==0&&u==c&&l==c){for(var d=a+5;d+2<i&&o[d+2]==c;)d+=2;(h=Math.min(d+1-a>>>1,138))<11?s.push(17,h-3):s.push(18,h-11),a+=2*h-2}else if(c==f&&u==c&&l==c){for(d=a+5;d+2<i&&o[d+2]==c;)d+=2;var h=Math.min(d+1-a>>>1,6);s.push(16,h-3),a+=2*h-2}else s.push(c,0)}return i>>>1},n.F._hufTree=function(o,s,i){var a=[],c=o.length,u=s.length,l=0;for(l=0;l<u;l+=2)s[l]=0,s[l+1]=0;for(l=0;l<c;l++)o[l]!=0&&a.push({lit:l,f:o[l]});var f=a.length,d=a.slice(0);if(f==0)return 0;if(f==1){var h=a[0].lit;return d=h==0?1:0,s[1+(h<<1)]=1,s[1+(d<<1)]=1,1}a.sort((function(w,_){return w.f-_.f}));var m=a[0],p=a[1],g=0,y=1,O=2;for(a[0]={lit:-1,f:m.f+p.f,l:m,r:p,d:0};y!=f-1;)m=g!=y&&(O==f||a[g].f<a[O].f)?a[g++]:a[O++],p=g!=y&&(O==f||a[g].f<a[O].f)?a[g++]:a[O++],a[y++]={lit:-1,f:m.f+p.f,l:m,r:p};var x=n.F.setDepth(a[y-1],0);for(x>i&&(n.F.restrictDepth(d,i,x),x=i),l=0;l<f;l++)s[1+(d[l].lit<<1)]=d[l].d;return x},n.F.setDepth=function(o,s){return o.lit!=-1?(o.d=s,s):Math.max(n.F.setDepth(o.l,s+1),n.F.setDepth(o.r,s+1))},n.F.restrictDepth=function(o,s,i){var a=0,c=1<<i-s,u=0;for(o.sort((function(f,d){return d.d==f.d?f.f-d.f:d.d-f.d})),a=0;a<o.length&&o[a].d>s;a++){var l=o[a].d;o[a].d=s,u+=c-(1<<i-l)}for(u>>>=i-s;u>0;)(l=o[a].d)<s?(o[a].d++,u-=1<<s-l-1):a++;for(;a>=0;a--)o[a].d==s&&u<0&&(o[a].d--,u++);u!=0&&console.log("debt left")},n.F._goodIndex=function(o,s){var i=0;return s[16|i]<=o&&(i|=16),s[8|i]<=o&&(i|=8),s[4|i]<=o&&(i|=4),s[2|i]<=o&&(i|=2),s[1|i]<=o&&(i|=1),i},n.F._writeLit=function(o,s,i,a){return n.F._putsF(i,a,s[o<<1]),a+s[1+(o<<1)]},n.F.inflate=function(o,s){var i=Uint8Array;if(o[0]==3&&o[1]==0)return s||new i(0);var a=n.F,c=a._bitsF,u=a._bitsE,l=a._decodeTiny,f=a.makeCodes,d=a.codes2map,h=a._get17,m=a.U,p=s==null;p&&(s=new i(o.length>>>2<<3));for(var g,y,O=0,x=0,w=0,_=0,S=0,I=0,v=0,E=0,P=0;O==0;)if(O=c(o,P,1),x=c(o,P+1,2),P+=3,x!=0){if(p&&(s=n.F._check(s,E+(1<<17))),x==1&&(g=m.flmap,y=m.fdmap,I=511,v=31),x==2){w=u(o,P,5)+257,_=u(o,P+5,5)+1,S=u(o,P+10,4)+4,P+=14;for(var A=0;A<38;A+=2)m.itree[A]=0,m.itree[A+1]=0;var M=1;for(A=0;A<S;A++){var F=u(o,P+3*A,3);m.itree[1+(m.ordr[A]<<1)]=F,F>M&&(M=F)}P+=3*S,f(m.itree,M),d(m.itree,M,m.imap),g=m.lmap,y=m.dmap,P=l(m.imap,(1<<M)-1,w+_,o,P,m.ttree);var N=a._copyOut(m.ttree,0,w,m.ltree);I=(1<<N)-1;var W=a._copyOut(m.ttree,w,_,m.dtree);v=(1<<W)-1,f(m.ltree,N),d(m.ltree,N,g),f(m.dtree,W),d(m.dtree,W,y)}for(;;){var C=g[h(o,P)&I];P+=15&C;var k=C>>>4;if(!(k>>>8))s[E++]=k;else{if(k==256)break;var Y=E+k-254;if(k>264){var $=m.ldef[k-257];Y=E+($>>>3)+u(o,P,7&$),P+=7&$}var D=y[h(o,P)&v];P+=15&D;var V=D>>>4,Z=m.ddef[V],G=(Z>>>4)+c(o,P,15&Z);for(P+=15&Z,p&&(s=n.F._check(s,E+(1<<17)));E<Y;)s[E]=s[E++-G],s[E]=s[E++-G],s[E]=s[E++-G],s[E]=s[E++-G];E=Y}}}else{(7&P)!=0&&(P+=8-(7&P));var B=4+(P>>>3),L=o[B-4]|o[B-3]<<8;p&&(s=n.F._check(s,E+L)),s.set(new i(o.buffer,o.byteOffset+B,L),E),P=B+L<<3,E+=L}return s.length==E?s:s.slice(0,E)},n.F._check=function(o,s){var i=o.length;if(s<=i)return o;var a=new Uint8Array(Math.max(i<<1,s));return a.set(o,0),a},n.F._decodeTiny=function(o,s,i,a,c,u){for(var l=n.F._bitsE,f=n.F._get17,d=0;d<i;){var h=o[f(a,c)&s];c+=15&h;var m=h>>>4;if(m<=15)u[d]=m,d++;else{var p=0,g=0;m==16?(g=3+l(a,c,2),c+=2,p=u[d-1]):m==17?(g=3+l(a,c,3),c+=3):m==18&&(g=11+l(a,c,7),c+=7);for(var y=d+g;d<y;)u[d]=p,d++}}return c},n.F._copyOut=function(o,s,i,a){for(var c=0,u=0,l=a.length>>>1;u<i;){var f=o[u+s];a[u<<1]=0,a[1+(u<<1)]=f,f>c&&(c=f),u++}for(;u<l;)a[u<<1]=0,a[1+(u<<1)]=0,u++;return c},n.F.makeCodes=function(o,s){for(var i,a,c,u,l=n.F.U,f=o.length,d=l.bl_count,h=0;h<=s;h++)d[h]=0;for(h=1;h<f;h+=2)d[o[h]]++;var m=l.next_code;for(i=0,d[0]=0,a=1;a<=s;a++)i=i+d[a-1]<<1,m[a]=i;for(c=0;c<f;c+=2)(u=o[c+1])!=0&&(o[c]=m[u],m[u]++)},n.F.codes2map=function(o,s,i){for(var a=o.length,c=n.F.U.rev15,u=0;u<a;u+=2)if(o[u+1]!=0)for(var l=u>>1,f=o[u+1],d=l<<4|f,h=s-f,m=o[u]<<h,p=m+(1<<h);m!=p;)i[c[m]>>>15-s]=d,m++},n.F.revCodes=function(o,s){for(var i=n.F.U.rev15,a=15-s,c=0;c<o.length;c+=2){var u=o[c]<<s-o[c+1];o[c]=i[u]>>>a}},n.F._putsE=function(o,s,i){i<<=7&s;var a=s>>>3;o[a]|=i,o[a+1]|=i>>>8},n.F._putsF=function(o,s,i){i<<=7&s;var a=s>>>3;o[a]|=i,o[a+1]|=i>>>8,o[a+2]|=i>>>16},n.F._bitsE=function(o,s,i){return(o[s>>>3]|o[1+(s>>>3)]<<8)>>>(7&s)&(1<<i)-1},n.F._bitsF=function(o,s,i){return(o[s>>>3]|o[1+(s>>>3)]<<8|o[2+(s>>>3)]<<16)>>>(7&s)&(1<<i)-1},n.F._get17=function(o,s){return(o[s>>>3]|o[1+(s>>>3)]<<8|o[2+(s>>>3)]<<16)>>>(7&s)},n.F._get25=function(o,s){return(o[s>>>3]|o[1+(s>>>3)]<<8|o[2+(s>>>3)]<<16|o[3+(s>>>3)]<<24)>>>(7&s)},n.F.U=(t=Uint16Array,r=Uint32Array,{next_code:new t(16),bl_count:new t(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new t(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new r(32),flmap:new t(512),fltree:[],fdmap:new t(32),fdtree:[],lmap:new t(32768),ltree:[],ttree:[],dmap:new t(32768),dtree:[],imap:new t(512),itree:[],rev15:new t(32768),lhst:new r(286),dhst:new r(30),ihst:new r(19),lits:new r(15e3),strt:new t(65536),prev:new t(32768)}),(function(){for(var o=n.F.U,s=0;s<32768;s++){var i=s;i=(4278255360&(i=(4042322160&(i=(3435973836&(i=(2863311530&i)>>>1|(1431655765&i)<<1))>>>2|(858993459&i)<<2))>>>4|(252645135&i)<<4))>>>8|(16711935&i)<<8,o.rev15[s]=(i>>>16|i<<16)>>>17}function a(c,u,l){for(;u--!=0;)c.push(0,l)}for(s=0;s<32;s++)o.ldef[s]=o.of0[s]<<3|o.exb[s],o.ddef[s]=o.df0[s]<<4|o.dxb[s];a(o.fltree,144,8),a(o.fltree,112,9),a(o.fltree,24,7),a(o.fltree,8,8),n.F.makeCodes(o.fltree,9),n.F.codes2map(o.fltree,9,o.flmap),n.F.revCodes(o.fltree,9),a(o.fdtree,32,5),n.F.makeCodes(o.fdtree,5),n.F.codes2map(o.fdtree,5,o.fdmap),n.F.revCodes(o.fdtree,5),a(o.itree,19,0),a(o.ltree,286,0),a(o.dtree,30,0),a(o.ttree,320,0)})()})();var bP=gP({__proto__:null,default:zi},[zi]);const yr=(function(){var e={nextZero(l,f){for(;l[f]!=0;)f++;return f},readUshort:(l,f)=>l[f]<<8|l[f+1],writeUshort(l,f,d){l[f]=d>>8&255,l[f+1]=255&d},readUint:(l,f)=>16777216*l[f]+(l[f+1]<<16|l[f+2]<<8|l[f+3]),writeUint(l,f,d){l[f]=d>>24&255,l[f+1]=d>>16&255,l[f+2]=d>>8&255,l[f+3]=255&d},readASCII(l,f,d){let h="";for(let m=0;m<d;m++)h+=String.fromCharCode(l[f+m]);return h},writeASCII(l,f,d){for(let h=0;h<d.length;h++)l[f+h]=d.charCodeAt(h)},readBytes(l,f,d){const h=[];for(let m=0;m<d;m++)h.push(l[f+m]);return h},pad:l=>l.length<2?`0${l}`:l,readUTF8(l,f,d){let h,m="";for(let p=0;p<d;p++)m+=`%${e.pad(l[f+p].toString(16))}`;try{h=decodeURIComponent(m)}catch{return e.readASCII(l,f,d)}return h}};function t(l,f,d,h){const m=f*d,p=s(h),g=Math.ceil(f*p/8),y=new Uint8Array(4*m),O=new Uint32Array(y.buffer),{ctype:x}=h,{depth:w}=h,_=e.readUshort;if(x==6){const $=m<<2;if(w==8)for(var S=0;S<$;S+=4)y[S]=l[S],y[S+1]=l[S+1],y[S+2]=l[S+2],y[S+3]=l[S+3];if(w==16)for(S=0;S<$;S++)y[S]=l[S<<1]}else if(x==2){const $=h.tabs.tRNS;if($==null){if(w==8)for(S=0;S<m;S++){var I=3*S;O[S]=255<<24|l[I+2]<<16|l[I+1]<<8|l[I]}if(w==16)for(S=0;S<m;S++)I=6*S,O[S]=255<<24|l[I+4]<<16|l[I+2]<<8|l[I]}else{var v=$[0];const D=$[1],V=$[2];if(w==8)for(S=0;S<m;S++){var E=S<<2;I=3*S,O[S]=255<<24|l[I+2]<<16|l[I+1]<<8|l[I],l[I]==v&&l[I+1]==D&&l[I+2]==V&&(y[E+3]=0)}if(w==16)for(S=0;S<m;S++)E=S<<2,I=6*S,O[S]=255<<24|l[I+4]<<16|l[I+2]<<8|l[I],_(l,I)==v&&_(l,I+2)==D&&_(l,I+4)==V&&(y[E+3]=0)}}else if(x==3){const $=h.tabs.PLTE,D=h.tabs.tRNS,V=D?D.length:0;if(w==1)for(var P=0;P<d;P++){var A=P*g,M=P*f;for(S=0;S<f;S++){E=M+S<<2;var F=3*(N=l[A+(S>>3)]>>7-((7&S)<<0)&1);y[E]=$[F],y[E+1]=$[F+1],y[E+2]=$[F+2],y[E+3]=N<V?D[N]:255}}if(w==2)for(P=0;P<d;P++)for(A=P*g,M=P*f,S=0;S<f;S++)E=M+S<<2,F=3*(N=l[A+(S>>2)]>>6-((3&S)<<1)&3),y[E]=$[F],y[E+1]=$[F+1],y[E+2]=$[F+2],y[E+3]=N<V?D[N]:255;if(w==4)for(P=0;P<d;P++)for(A=P*g,M=P*f,S=0;S<f;S++)E=M+S<<2,F=3*(N=l[A+(S>>1)]>>4-((1&S)<<2)&15),y[E]=$[F],y[E+1]=$[F+1],y[E+2]=$[F+2],y[E+3]=N<V?D[N]:255;if(w==8)for(S=0;S<m;S++){var N;E=S<<2,F=3*(N=l[S]),y[E]=$[F],y[E+1]=$[F+1],y[E+2]=$[F+2],y[E+3]=N<V?D[N]:255}}else if(x==4){if(w==8)for(S=0;S<m;S++){E=S<<2;var W=l[C=S<<1];y[E]=W,y[E+1]=W,y[E+2]=W,y[E+3]=l[C+1]}if(w==16)for(S=0;S<m;S++){var C;E=S<<2,W=l[C=S<<2],y[E]=W,y[E+1]=W,y[E+2]=W,y[E+3]=l[C+2]}}else if(x==0)for(v=h.tabs.tRNS?h.tabs.tRNS:-1,P=0;P<d;P++){const $=P*g,D=P*f;if(w==1)for(var k=0;k<f;k++){var Y=(W=255*(l[$+(k>>>3)]>>>7-(7&k)&1))==255*v?0:255;O[D+k]=Y<<24|W<<16|W<<8|W}else if(w==2)for(k=0;k<f;k++)Y=(W=85*(l[$+(k>>>2)]>>>6-((3&k)<<1)&3))==85*v?0:255,O[D+k]=Y<<24|W<<16|W<<8|W;else if(w==4)for(k=0;k<f;k++)Y=(W=17*(l[$+(k>>>1)]>>>4-((1&k)<<2)&15))==17*v?0:255,O[D+k]=Y<<24|W<<16|W<<8|W;else if(w==8)for(k=0;k<f;k++)Y=(W=l[$+k])==v?0:255,O[D+k]=Y<<24|W<<16|W<<8|W;else if(w==16)for(k=0;k<f;k++)W=l[$+(k<<1)],Y=_(l,$+(k<<1))==v?0:255,O[D+k]=Y<<24|W<<16|W<<8|W}return y}function r(l,f,d,h){const m=s(l),p=Math.ceil(d*m/8),g=new Uint8Array((p+1+l.interlace)*h);return f=l.tabs.CgBI?o(f,g):n(f,g),l.interlace==0?f=i(f,l,0,d,h):l.interlace==1&&(f=(function(O,x){const w=x.width,_=x.height,S=s(x),I=S>>3,v=Math.ceil(w*S/8),E=new Uint8Array(_*v);let P=0;const A=[0,0,4,0,2,0,1],M=[0,4,0,2,0,1,0],F=[8,8,8,4,4,2,2],N=[8,8,4,4,2,2,1];let W=0;for(;W<7;){const k=F[W],Y=N[W];let $=0,D=0,V=A[W];for(;V<_;)V+=k,D++;let Z=M[W];for(;Z<w;)Z+=Y,$++;const G=Math.ceil($*S/8);i(O,x,P,$,D);let B=0,L=A[W];for(;L<_;){let J=M[W],q=P+B*G<<3;for(;J<w;){var C;if(S==1&&(C=(C=O[q>>3])>>7-(7&q)&1,E[L*v+(J>>3)]|=C<<7-((7&J)<<0)),S==2&&(C=(C=O[q>>3])>>6-(7&q)&3,E[L*v+(J>>2)]|=C<<6-((3&J)<<1)),S==4&&(C=(C=O[q>>3])>>4-(7&q)&15,E[L*v+(J>>1)]|=C<<4-((1&J)<<2)),S>=8){const oe=L*v+J*I;for(let Q=0;Q<I;Q++)E[oe+Q]=O[(q>>3)+Q]}q+=S,J+=Y}B++,L+=k}$*D!=0&&(P+=D*(1+G)),W+=1}return E})(f,l)),f}function n(l,f){return o(new Uint8Array(l.buffer,2,l.length-6),f)}var o=(function(){const l={H:{}};return l.H.N=function(f,d){const h=Uint8Array;let m,p,g=0,y=0,O=0,x=0,w=0,_=0,S=0,I=0,v=0;if(f[0]==3&&f[1]==0)return d||new h(0);const E=l.H,P=E.b,A=E.e,M=E.R,F=E.n,N=E.A,W=E.Z,C=E.m,k=d==null;for(k&&(d=new h(f.length>>>2<<5));g==0;)if(g=P(f,v,1),y=P(f,v+1,2),v+=3,y!=0){if(k&&(d=l.H.W(d,I+(1<<17))),y==1&&(m=C.J,p=C.h,_=511,S=31),y==2){O=A(f,v,5)+257,x=A(f,v+5,5)+1,w=A(f,v+10,4)+4,v+=14;let $=1;for(var Y=0;Y<38;Y+=2)C.Q[Y]=0,C.Q[Y+1]=0;for(Y=0;Y<w;Y++){const Z=A(f,v+3*Y,3);C.Q[1+(C.X[Y]<<1)]=Z,Z>$&&($=Z)}v+=3*w,F(C.Q,$),N(C.Q,$,C.u),m=C.w,p=C.d,v=M(C.u,(1<<$)-1,O+x,f,v,C.v);const D=E.V(C.v,0,O,C.C);_=(1<<D)-1;const V=E.V(C.v,O,x,C.D);S=(1<<V)-1,F(C.C,D),N(C.C,D,m),F(C.D,V),N(C.D,V,p)}for(;;){const $=m[W(f,v)&_];v+=15&$;const D=$>>>4;if(!(D>>>8))d[I++]=D;else{if(D==256)break;{let V=I+D-254;if(D>264){const J=C.q[D-257];V=I+(J>>>3)+A(f,v,7&J),v+=7&J}const Z=p[W(f,v)&S];v+=15&Z;const G=Z>>>4,B=C.c[G],L=(B>>>4)+P(f,v,15&B);for(v+=15&B;I<V;)d[I]=d[I++-L],d[I]=d[I++-L],d[I]=d[I++-L],d[I]=d[I++-L];I=V}}}}else{(7&v)!=0&&(v+=8-(7&v));const $=4+(v>>>3),D=f[$-4]|f[$-3]<<8;k&&(d=l.H.W(d,I+D)),d.set(new h(f.buffer,f.byteOffset+$,D),I),v=$+D<<3,I+=D}return d.length==I?d:d.slice(0,I)},l.H.W=function(f,d){const h=f.length;if(d<=h)return f;const m=new Uint8Array(h<<1);return m.set(f,0),m},l.H.R=function(f,d,h,m,p,g){const y=l.H.e,O=l.H.Z;let x=0;for(;x<h;){const w=f[O(m,p)&d];p+=15&w;const _=w>>>4;if(_<=15)g[x]=_,x++;else{let S=0,I=0;_==16?(I=3+y(m,p,2),p+=2,S=g[x-1]):_==17?(I=3+y(m,p,3),p+=3):_==18&&(I=11+y(m,p,7),p+=7);const v=x+I;for(;x<v;)g[x]=S,x++}}return p},l.H.V=function(f,d,h,m){let p=0,g=0;const y=m.length>>>1;for(;g<h;){const O=f[g+d];m[g<<1]=0,m[1+(g<<1)]=O,O>p&&(p=O),g++}for(;g<y;)m[g<<1]=0,m[1+(g<<1)]=0,g++;return p},l.H.n=function(f,d){const h=l.H.m,m=f.length;let p,g,y,O;const x=h.j;for(var w=0;w<=d;w++)x[w]=0;for(w=1;w<m;w+=2)x[f[w]]++;const _=h.K;for(p=0,x[0]=0,g=1;g<=d;g++)p=p+x[g-1]<<1,_[g]=p;for(y=0;y<m;y+=2)O=f[y+1],O!=0&&(f[y]=_[O],_[O]++)},l.H.A=function(f,d,h){const m=f.length,p=l.H.m.r;for(let g=0;g<m;g+=2)if(f[g+1]!=0){const y=g>>1,O=f[g+1],x=y<<4|O,w=d-O;let _=f[g]<<w;const S=_+(1<<w);for(;_!=S;)h[p[_]>>>15-d]=x,_++}},l.H.l=function(f,d){const h=l.H.m.r,m=15-d;for(let p=0;p<f.length;p+=2){const g=f[p]<<d-f[p+1];f[p]=h[g]>>>m}},l.H.M=function(f,d,h){h<<=7&d;const m=d>>>3;f[m]|=h,f[m+1]|=h>>>8},l.H.I=function(f,d,h){h<<=7&d;const m=d>>>3;f[m]|=h,f[m+1]|=h>>>8,f[m+2]|=h>>>16},l.H.e=function(f,d,h){return(f[d>>>3]|f[1+(d>>>3)]<<8)>>>(7&d)&(1<<h)-1},l.H.b=function(f,d,h){return(f[d>>>3]|f[1+(d>>>3)]<<8|f[2+(d>>>3)]<<16)>>>(7&d)&(1<<h)-1},l.H.Z=function(f,d){return(f[d>>>3]|f[1+(d>>>3)]<<8|f[2+(d>>>3)]<<16)>>>(7&d)},l.H.i=function(f,d){return(f[d>>>3]|f[1+(d>>>3)]<<8|f[2+(d>>>3)]<<16|f[3+(d>>>3)]<<24)>>>(7&d)},l.H.m=(function(){const f=Uint16Array,d=Uint32Array;return{K:new f(16),j:new f(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new f(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new d(32),J:new f(512),_:[],h:new f(32),$:[],w:new f(32768),C:[],v:[],d:new f(32768),D:[],u:new f(512),Q:[],r:new f(32768),s:new d(286),Y:new d(30),a:new d(19),t:new d(15e3),k:new f(65536),g:new f(32768)}})(),(function(){const f=l.H.m;for(var d=0;d<32768;d++){let m=d;m=(2863311530&m)>>>1|(1431655765&m)<<1,m=(3435973836&m)>>>2|(858993459&m)<<2,m=(4042322160&m)>>>4|(252645135&m)<<4,m=(4278255360&m)>>>8|(16711935&m)<<8,f.r[d]=(m>>>16|m<<16)>>>17}function h(m,p,g){for(;p--!=0;)m.push(0,g)}for(d=0;d<32;d++)f.q[d]=f.S[d]<<3|f.T[d],f.c[d]=f.p[d]<<4|f.z[d];h(f._,144,8),h(f._,112,9),h(f._,24,7),h(f._,8,8),l.H.n(f._,9),l.H.A(f._,9,f.J),l.H.l(f._,9),h(f.$,32,5),l.H.n(f.$,5),l.H.A(f.$,5,f.h),l.H.l(f.$,5),h(f.Q,19,0),h(f.C,286,0),h(f.D,30,0),h(f.v,320,0)})(),l.H.N})();function s(l){return[1,null,3,1,2,null,4][l.ctype]*l.depth}function i(l,f,d,h,m){let p=s(f);const g=Math.ceil(h*p/8);let y,O;p=Math.ceil(p/8);let x=l[d],w=0;if(x>1&&(l[d]=[0,0,1][x-2]),x==3)for(w=p;w<g;w++)l[w+1]=l[w+1]+(l[w+1-p]>>>1)&255;for(let _=0;_<m;_++)if(y=d+_*g,O=y+_+1,x=l[O-1],w=0,x==0)for(;w<g;w++)l[y+w]=l[O+w];else if(x==1){for(;w<p;w++)l[y+w]=l[O+w];for(;w<g;w++)l[y+w]=l[O+w]+l[y+w-p]}else if(x==2)for(;w<g;w++)l[y+w]=l[O+w]+l[y+w-g];else if(x==3){for(;w<p;w++)l[y+w]=l[O+w]+(l[y+w-g]>>>1);for(;w<g;w++)l[y+w]=l[O+w]+(l[y+w-g]+l[y+w-p]>>>1)}else{for(;w<p;w++)l[y+w]=l[O+w]+a(0,l[y+w-g],0);for(;w<g;w++)l[y+w]=l[O+w]+a(l[y+w-p],l[y+w-g],l[y+w-p-g])}return l}function a(l,f,d){const h=l+f-d,m=h-l,p=h-f,g=h-d;return m*m<=p*p&&m*m<=g*g?l:p*p<=g*g?f:d}function c(l,f,d){d.width=e.readUint(l,f),f+=4,d.height=e.readUint(l,f),f+=4,d.depth=l[f],f++,d.ctype=l[f],f++,d.compress=l[f],f++,d.filter=l[f],f++,d.interlace=l[f],f++}function u(l,f,d,h,m,p,g,y,O){const x=Math.min(f,m),w=Math.min(d,p);let _=0,S=0;for(let W=0;W<w;W++)for(let C=0;C<x;C++)if(g>=0&&y>=0?(_=W*f+C<<2,S=(y+W)*m+g+C<<2):(_=(-y+W)*f-g+C<<2,S=W*m+C<<2),O==0)h[S]=l[_],h[S+1]=l[_+1],h[S+2]=l[_+2],h[S+3]=l[_+3];else if(O==1){var I=l[_+3]*.00392156862745098,v=l[_]*I,E=l[_+1]*I,P=l[_+2]*I,A=h[S+3]*(1/255),M=h[S]*A,F=h[S+1]*A,N=h[S+2]*A;const k=1-I,Y=I+A*k,$=Y==0?0:1/Y;h[S+3]=255*Y,h[S+0]=(v+M*k)*$,h[S+1]=(E+F*k)*$,h[S+2]=(P+N*k)*$}else if(O==2)I=l[_+3],v=l[_],E=l[_+1],P=l[_+2],A=h[S+3],M=h[S],F=h[S+1],N=h[S+2],I==A&&v==M&&E==F&&P==N?(h[S]=0,h[S+1]=0,h[S+2]=0,h[S+3]=0):(h[S]=v,h[S+1]=E,h[S+2]=P,h[S+3]=I);else if(O==3){if(I=l[_+3],v=l[_],E=l[_+1],P=l[_+2],A=h[S+3],M=h[S],F=h[S+1],N=h[S+2],I==A&&v==M&&E==F&&P==N)continue;if(I<220&&A>20)return!1}return!0}return{decode:function(f){const d=new Uint8Array(f);let h=8;const m=e,p=m.readUshort,g=m.readUint,y={tabs:{},frames:[]},O=new Uint8Array(d.length);let x,w=0,_=0;const S=[137,80,78,71,13,10,26,10];for(var I=0;I<8;I++)if(d[I]!=S[I])throw"The input is not a PNG file!";for(;h<d.length;){const W=m.readUint(d,h);h+=4;const C=m.readASCII(d,h,4);if(h+=4,C=="IHDR")c(d,h,y);else if(C=="iCCP"){for(var v=h;d[v]!=0;)v++;m.readASCII(d,h,v-h),d[v+1];const k=d.slice(v+2,h+W);let Y=null;try{Y=n(k)}catch{Y=o(k)}y.tabs[C]=Y}else if(C=="CgBI")y.tabs[C]=d.slice(h,h+4);else if(C=="IDAT"){for(I=0;I<W;I++)O[w+I]=d[h+I];w+=W}else if(C=="acTL")y.tabs[C]={num_frames:g(d,h),num_plays:g(d,h+4)},x=new Uint8Array(d.length);else if(C=="fcTL"){_!=0&&((N=y.frames[y.frames.length-1]).data=r(y,x.slice(0,_),N.rect.width,N.rect.height),_=0);const k={x:g(d,h+12),y:g(d,h+16),width:g(d,h+4),height:g(d,h+8)};let Y=p(d,h+22);Y=p(d,h+20)/(Y==0?100:Y);const $={rect:k,delay:Math.round(1e3*Y),dispose:d[h+24],blend:d[h+25]};y.frames.push($)}else if(C=="fdAT"){for(I=0;I<W-4;I++)x[_+I]=d[h+I+4];_+=W-4}else if(C=="pHYs")y.tabs[C]=[m.readUint(d,h),m.readUint(d,h+4),d[h+8]];else if(C=="cHRM")for(y.tabs[C]=[],I=0;I<8;I++)y.tabs[C].push(m.readUint(d,h+4*I));else if(C=="tEXt"||C=="zTXt"){y.tabs[C]==null&&(y.tabs[C]={});var E=m.nextZero(d,h),P=m.readASCII(d,h,E-h),A=h+W-E-1;if(C=="tEXt")F=m.readASCII(d,E+1,A);else{var M=n(d.slice(E+2,E+2+A));F=m.readUTF8(M,0,M.length)}y.tabs[C][P]=F}else if(C=="iTXt"){y.tabs[C]==null&&(y.tabs[C]={}),E=0,v=h,E=m.nextZero(d,v),P=m.readASCII(d,v,E-v);const k=d[v=E+1];var F;d[v+1],v+=2,E=m.nextZero(d,v),m.readASCII(d,v,E-v),v=E+1,E=m.nextZero(d,v),m.readUTF8(d,v,E-v),A=W-((v=E+1)-h),k==0?F=m.readUTF8(d,v,A):(M=n(d.slice(v,v+A)),F=m.readUTF8(M,0,M.length)),y.tabs[C][P]=F}else if(C=="PLTE")y.tabs[C]=m.readBytes(d,h,W);else if(C=="hIST"){const k=y.tabs.PLTE.length/3;for(y.tabs[C]=[],I=0;I<k;I++)y.tabs[C].push(p(d,h+2*I))}else if(C=="tRNS")y.ctype==3?y.tabs[C]=m.readBytes(d,h,W):y.ctype==0?y.tabs[C]=p(d,h):y.ctype==2&&(y.tabs[C]=[p(d,h),p(d,h+2),p(d,h+4)]);else if(C=="gAMA")y.tabs[C]=m.readUint(d,h)/1e5;else if(C=="sRGB")y.tabs[C]=d[h];else if(C=="bKGD")y.ctype==0||y.ctype==4?y.tabs[C]=[p(d,h)]:y.ctype==2||y.ctype==6?y.tabs[C]=[p(d,h),p(d,h+2),p(d,h+4)]:y.ctype==3&&(y.tabs[C]=d[h]);else if(C=="IEND")break;h+=W,m.readUint(d,h),h+=4}var N;return _!=0&&((N=y.frames[y.frames.length-1]).data=r(y,x.slice(0,_),N.rect.width,N.rect.height)),y.data=r(y,O,y.width,y.height),delete y.compress,delete y.interlace,delete y.filter,y},toRGBA8:function(f){const d=f.width,h=f.height;if(f.tabs.acTL==null)return[t(f.data,d,h,f).buffer];const m=[];f.frames[0].data==null&&(f.frames[0].data=f.data);const p=d*h*4,g=new Uint8Array(p),y=new Uint8Array(p),O=new Uint8Array(p);for(let w=0;w<f.frames.length;w++){const _=f.frames[w],S=_.rect.x,I=_.rect.y,v=_.rect.width,E=_.rect.height,P=t(_.data,v,E,f);if(w!=0)for(var x=0;x<p;x++)O[x]=g[x];if(_.blend==0?u(P,v,E,g,d,h,S,I,0):_.blend==1&&u(P,v,E,g,d,h,S,I,1),m.push(g.buffer.slice(0)),_.dispose!=0){if(_.dispose==1)u(y,v,E,g,d,h,S,I,0);else if(_.dispose==2)for(x=0;x<p;x++)g[x]=O[x]}}return m},_paeth:a,_copyTile:u,_bin:e}})();(function(){const{_copyTile:e}=yr,{_bin:t}=yr,r=yr._paeth;var n={table:(function(){const v=new Uint32Array(256);for(let E=0;E<256;E++){let P=E;for(let A=0;A<8;A++)1&P?P=3988292384^P>>>1:P>>>=1;v[E]=P}return v})(),update(v,E,P,A){for(let M=0;M<A;M++)v=n.table[255&(v^E[P+M])]^v>>>8;return v},crc:(v,E,P)=>4294967295^n.update(4294967295,v,E,P)};function o(v,E,P,A){E[P]+=v[0]*A>>4,E[P+1]+=v[1]*A>>4,E[P+2]+=v[2]*A>>4,E[P+3]+=v[3]*A>>4}function s(v){return Math.max(0,Math.min(255,v))}function i(v,E){const P=v[0]-E[0],A=v[1]-E[1],M=v[2]-E[2],F=v[3]-E[3];return P*P+A*A+M*M+F*F}function a(v,E,P,A,M,F,N){N==null&&(N=1);const W=A.length,C=[];for(var k=0;k<W;k++){const L=A[k];C.push([L>>>0&255,L>>>8&255,L>>>16&255,L>>>24&255])}for(k=0;k<W;k++){let L=4294967295;for(var Y=0,$=0;$<W;$++){var D=i(C[k],C[$]);$!=k&&D<L&&(L=D,Y=$)}}const V=new Uint32Array(M.buffer),Z=new Int16Array(E*P*4),G=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(k=0;k<G.length;k++)G[k]=255*((G[k]+.5)/16-.5);for(let L=0;L<P;L++)for(let J=0;J<E;J++){var B;k=4*(L*E+J),N!=2?B=[s(v[k]+Z[k]),s(v[k+1]+Z[k+1]),s(v[k+2]+Z[k+2]),s(v[k+3]+Z[k+3])]:(D=G[4*(3&L)+(3&J)],B=[s(v[k]+D),s(v[k+1]+D),s(v[k+2]+D),s(v[k+3]+D)]),Y=0;let q=16777215;for($=0;$<W;$++){const ne=i(B,C[$]);ne<q&&(q=ne,Y=$)}const oe=C[Y],Q=[B[0]-oe[0],B[1]-oe[1],B[2]-oe[2],B[3]-oe[3]];N==1&&(J!=E-1&&o(Q,Z,k+4,7),L!=P-1&&(J!=0&&o(Q,Z,k+4*E-4,3),o(Q,Z,k+4*E,5),J!=E-1&&o(Q,Z,k+4*E+4,1))),F[k>>2]=Y,V[k>>2]=A[Y]}}function c(v,E,P,A,M){M==null&&(M={});const{crc:F}=n,N=t.writeUint,W=t.writeUshort,C=t.writeASCII;let k=8;const Y=v.frames.length>1;let $,D=!1,V=33+(Y?20:0);if(M.sRGB!=null&&(V+=13),M.pHYs!=null&&(V+=21),M.iCCP!=null&&($=pako.deflate(M.iCCP),V+=21+$.length+4),v.ctype==3){for(var Z=v.plte.length,G=0;G<Z;G++)v.plte[G]>>>24!=255&&(D=!0);V+=8+3*Z+4+(D?8+1*Z+4:0)}for(var B=0;B<v.frames.length;B++)Y&&(V+=38),V+=(oe=v.frames[B]).cimg.length+12,B!=0&&(V+=4);V+=12;const L=new Uint8Array(V),J=[137,80,78,71,13,10,26,10];for(G=0;G<8;G++)L[G]=J[G];if(N(L,k,13),k+=4,C(L,k,"IHDR"),k+=4,N(L,k,E),k+=4,N(L,k,P),k+=4,L[k]=v.depth,k++,L[k]=v.ctype,k++,L[k]=0,k++,L[k]=0,k++,L[k]=0,k++,N(L,k,F(L,k-17,17)),k+=4,M.sRGB!=null&&(N(L,k,1),k+=4,C(L,k,"sRGB"),k+=4,L[k]=M.sRGB,k++,N(L,k,F(L,k-5,5)),k+=4),M.iCCP!=null){const Q=13+$.length;N(L,k,Q),k+=4,C(L,k,"iCCP"),k+=4,C(L,k,"ICC profile"),k+=11,k+=2,L.set($,k),k+=$.length,N(L,k,F(L,k-(Q+4),Q+4)),k+=4}if(M.pHYs!=null&&(N(L,k,9),k+=4,C(L,k,"pHYs"),k+=4,N(L,k,M.pHYs[0]),k+=4,N(L,k,M.pHYs[1]),k+=4,L[k]=M.pHYs[2],k++,N(L,k,F(L,k-13,13)),k+=4),Y&&(N(L,k,8),k+=4,C(L,k,"acTL"),k+=4,N(L,k,v.frames.length),k+=4,N(L,k,M.loop!=null?M.loop:0),k+=4,N(L,k,F(L,k-12,12)),k+=4),v.ctype==3){for(N(L,k,3*(Z=v.plte.length)),k+=4,C(L,k,"PLTE"),k+=4,G=0;G<Z;G++){const Q=3*G,ne=v.plte[G],le=255&ne,K=ne>>>8&255,Se=ne>>>16&255;L[k+Q+0]=le,L[k+Q+1]=K,L[k+Q+2]=Se}if(k+=3*Z,N(L,k,F(L,k-3*Z-4,3*Z+4)),k+=4,D){for(N(L,k,Z),k+=4,C(L,k,"tRNS"),k+=4,G=0;G<Z;G++)L[k+G]=v.plte[G]>>>24&255;k+=Z,N(L,k,F(L,k-Z-4,Z+4)),k+=4}}let q=0;for(B=0;B<v.frames.length;B++){var oe=v.frames[B];Y&&(N(L,k,26),k+=4,C(L,k,"fcTL"),k+=4,N(L,k,q++),k+=4,N(L,k,oe.rect.width),k+=4,N(L,k,oe.rect.height),k+=4,N(L,k,oe.rect.x),k+=4,N(L,k,oe.rect.y),k+=4,W(L,k,A[B]),k+=2,W(L,k,1e3),k+=2,L[k]=oe.dispose,k++,L[k]=oe.blend,k++,N(L,k,F(L,k-30,30)),k+=4);const Q=oe.cimg;N(L,k,(Z=Q.length)+(B==0?0:4)),k+=4;const ne=k;C(L,k,B==0?"IDAT":"fdAT"),k+=4,B!=0&&(N(L,k,q++),k+=4),L.set(Q,k),k+=Z,N(L,k,F(L,ne,k-ne)),k+=4}return N(L,k,0),k+=4,C(L,k,"IEND"),k+=4,N(L,k,F(L,k-4,4)),k+=4,L.buffer}function u(v,E,P){for(let A=0;A<v.frames.length;A++){const M=v.frames[A];M.rect.width;const F=M.rect.height,N=new Uint8Array(F*M.bpl+F);M.cimg=h(M.img,F,M.bpp,M.bpl,N,E,P)}}function l(v,E,P,A,M){const F=M[0],N=M[1],W=M[2],C=M[3],k=M[4],Y=M[5];let $=6,D=8,V=255;for(var Z=0;Z<v.length;Z++){const Ge=new Uint8Array(v[Z]);for(var G=Ge.length,B=0;B<G;B+=4)V&=Ge[B+3]}const L=V!=255,J=(function(Re,We,rt,nt,R,j){const H=[];for(var ee=0;ee<Re.length;ee++){const Le=new Uint8Array(Re[ee]),ot=new Uint32Array(Le.buffer);var te;let Qe=0,xt=0,gt=We,dt=rt,jt=nt?1:0;if(ee!=0){const _r=j||nt||ee==1||H[ee-2].dispose!=0?1:2;let Sr=0,_e=1e9;for(let De=0;De<_r;De++){var re=new Uint8Array(Re[ee-1-De]);const ve=new Uint32Array(Re[ee-1-De]);let Oe=We,Je=rt,xe=-1,en=-1;for(let Pt=0;Pt<rt;Pt++)for(let Qt=0;Qt<We;Qt++)ot[be=Pt*We+Qt]!=ve[be]&&(Qt<Oe&&(Oe=Qt),Qt>xe&&(xe=Qt),Pt<Je&&(Je=Pt),Pt>en&&(en=Pt));xe==-1&&(Oe=Je=xe=en=0),R&&((1&Oe)==1&&Oe--,(1&Je)==1&&Je--);const ct=(xe-Oe+1)*(en-Je+1);ct<_e&&(_e=ct,Sr=De,Qe=Oe,xt=Je,gt=xe-Oe+1,dt=en-Je+1)}re=new Uint8Array(Re[ee-1-Sr]),Sr==1&&(H[ee-1].dispose=2),te=new Uint8Array(gt*dt*4),e(re,We,rt,te,gt,dt,-Qe,-xt,0),jt=e(Le,We,rt,te,gt,dt,-Qe,-xt,3)?1:0,jt==1?d(Le,We,rt,te,{x:Qe,y:xt,width:gt,height:dt}):e(Le,We,rt,te,gt,dt,-Qe,-xt,0)}else te=Le.slice(0);H.push({rect:{x:Qe,y:xt,width:gt,height:dt},img:te,blend:jt,dispose:0})}if(nt)for(ee=0;ee<H.length;ee++){if((Ee=H[ee]).blend==1)continue;const Le=Ee.rect,ot=H[ee-1].rect,Qe=Math.min(Le.x,ot.x),xt=Math.min(Le.y,ot.y),gt={x:Qe,y:xt,width:Math.max(Le.x+Le.width,ot.x+ot.width)-Qe,height:Math.max(Le.y+Le.height,ot.y+ot.height)-xt};H[ee-1].dispose=1,ee-1!=0&&f(Re,We,rt,H,ee-1,gt,R),f(Re,We,rt,H,ee,gt,R)}let ue=0;if(Re.length!=1)for(var be=0;be<H.length;be++){var Ee;ue+=(Ee=H[be]).rect.width*Ee.rect.height}return H})(v,E,P,F,N,W),q={},oe=[],Q=[];if(A!=0){const Ge=[];for(B=0;B<J.length;B++)Ge.push(J[B].img.buffer);const Re=(function(R){let j=0;for(var H=0;H<R.length;H++)j+=R[H].byteLength;const ee=new Uint8Array(j);let te=0;for(H=0;H<R.length;H++){const re=new Uint8Array(R[H]),ue=re.length;for(let be=0;be<ue;be+=4){let Ee=re[be],Le=re[be+1],ot=re[be+2];const Qe=re[be+3];Qe==0&&(Ee=Le=ot=0),ee[te+be]=Ee,ee[te+be+1]=Le,ee[te+be+2]=ot,ee[te+be+3]=Qe}te+=ue}return ee.buffer})(Ge),We=p(Re,A);for(B=0;B<We.plte.length;B++)oe.push(We.plte[B].est.rgba);let rt=0;for(B=0;B<J.length;B++){const nt=(le=J[B]).img.length;var ne=new Uint8Array(We.inds.buffer,rt>>2,nt>>2);Q.push(ne);const R=new Uint8Array(We.abuf,rt,nt);Y&&a(le.img,le.rect.width,le.rect.height,oe,R,ne),le.img.set(R),rt+=nt}}else for(Z=0;Z<J.length;Z++){var le=J[Z];const Ge=new Uint32Array(le.img.buffer);var K=le.rect.width;for(G=Ge.length,ne=new Uint8Array(G),Q.push(ne),B=0;B<G;B++){const Re=Ge[B];if(B!=0&&Re==Ge[B-1])ne[B]=ne[B-1];else if(B>K&&Re==Ge[B-K])ne[B]=ne[B-K];else{let We=q[Re];if(We==null&&(q[Re]=We=oe.length,oe.push(Re),oe.length>=300))break;ne[B]=We}}}const Se=oe.length;for(Se<=256&&k==0&&(D=Se<=2?1:Se<=4?2:Se<=16?4:8,D=Math.max(D,C)),Z=0;Z<J.length;Z++){(le=J[Z]).rect.x,le.rect.y,K=le.rect.width;const Ge=le.rect.height;let Re=le.img;new Uint32Array(Re.buffer);let We=4*K,rt=4;if(Se<=256&&k==0){We=Math.ceil(D*K/8);var Ie=new Uint8Array(We*Ge);const nt=Q[Z];for(let R=0;R<Ge;R++){B=R*We;const j=R*K;if(D==8)for(var ke=0;ke<K;ke++)Ie[B+ke]=nt[j+ke];else if(D==4)for(ke=0;ke<K;ke++)Ie[B+(ke>>1)]|=nt[j+ke]<<4-4*(1&ke);else if(D==2)for(ke=0;ke<K;ke++)Ie[B+(ke>>2)]|=nt[j+ke]<<6-2*(3&ke);else if(D==1)for(ke=0;ke<K;ke++)Ie[B+(ke>>3)]|=nt[j+ke]<<7-1*(7&ke)}Re=Ie,$=3,rt=1}else if(L==0&&J.length==1){Ie=new Uint8Array(K*Ge*3);const nt=K*Ge;for(B=0;B<nt;B++){const R=3*B,j=4*B;Ie[R]=Re[j],Ie[R+1]=Re[j+1],Ie[R+2]=Re[j+2]}Re=Ie,$=2,rt=3,We=3*K}le.img=Re,le.bpl=We,le.bpp=rt}return{ctype:$,depth:D,plte:oe,frames:J}}function f(v,E,P,A,M,F,N){const W=Uint8Array,C=Uint32Array,k=new W(v[M-1]),Y=new C(v[M-1]),$=M+1<v.length?new W(v[M+1]):null,D=new W(v[M]),V=new C(D.buffer);let Z=E,G=P,B=-1,L=-1;for(let q=0;q<F.height;q++)for(let oe=0;oe<F.width;oe++){const Q=F.x+oe,ne=F.y+q,le=ne*E+Q,K=V[le];K==0||A[M-1].dispose==0&&Y[le]==K&&($==null||$[4*le+3]!=0)||(Q<Z&&(Z=Q),Q>B&&(B=Q),ne<G&&(G=ne),ne>L&&(L=ne))}B==-1&&(Z=G=B=L=0),N&&((1&Z)==1&&Z--,(1&G)==1&&G--),F={x:Z,y:G,width:B-Z+1,height:L-G+1};const J=A[M];J.rect=F,J.blend=1,J.img=new Uint8Array(F.width*F.height*4),A[M-1].dispose==0?(e(k,E,P,J.img,F.width,F.height,-F.x,-F.y,0),d(D,E,P,J.img,F)):e(D,E,P,J.img,F.width,F.height,-F.x,-F.y,0)}function d(v,E,P,A,M){e(v,E,P,A,M.width,M.height,-M.x,-M.y,2)}function h(v,E,P,A,M,F,N){const W=[];let C,k=[0,1,2,3,4];F!=-1?k=[F]:(E*A>5e5||P==1)&&(k=[0]),N&&(C={level:0});const Y=bP;for(var $=0;$<k.length;$++){for(let Z=0;Z<E;Z++)m(M,v,Z,A,P,k[$]);W.push(Y.deflate(M,C))}let D,V=1e9;for($=0;$<W.length;$++)W[$].length<V&&(D=$,V=W[$].length);return W[D]}function m(v,E,P,A,M,F){const N=P*A;let W=N+P;if(v[W]=F,W++,F==0)if(A<500)for(var C=0;C<A;C++)v[W+C]=E[N+C];else v.set(new Uint8Array(E.buffer,N,A),W);else if(F==1){for(C=0;C<M;C++)v[W+C]=E[N+C];for(C=M;C<A;C++)v[W+C]=E[N+C]-E[N+C-M]+256&255}else if(P==0){for(C=0;C<M;C++)v[W+C]=E[N+C];if(F==2)for(C=M;C<A;C++)v[W+C]=E[N+C];if(F==3)for(C=M;C<A;C++)v[W+C]=E[N+C]-(E[N+C-M]>>1)+256&255;if(F==4)for(C=M;C<A;C++)v[W+C]=E[N+C]-r(E[N+C-M],0,0)+256&255}else{if(F==2)for(C=0;C<A;C++)v[W+C]=E[N+C]+256-E[N+C-A]&255;if(F==3){for(C=0;C<M;C++)v[W+C]=E[N+C]+256-(E[N+C-A]>>1)&255;for(C=M;C<A;C++)v[W+C]=E[N+C]+256-(E[N+C-A]+E[N+C-M]>>1)&255}if(F==4){for(C=0;C<M;C++)v[W+C]=E[N+C]+256-r(0,E[N+C-A],0)&255;for(C=M;C<A;C++)v[W+C]=E[N+C]+256-r(E[N+C-M],E[N+C-A],E[N+C-M-A])&255}}}function p(v,E){const P=new Uint8Array(v),A=P.slice(0),M=new Uint32Array(A.buffer),F=g(A,E),N=F[0],W=F[1],C=P.length,k=new Uint8Array(C>>2);let Y;if(P.length<2e7)for(var $=0;$<C;$+=4)Y=y(N,D=P[$]*(1/255),V=P[$+1]*(1/255),Z=P[$+2]*(1/255),G=P[$+3]*(1/255)),k[$>>2]=Y.ind,M[$>>2]=Y.est.rgba;else for($=0;$<C;$+=4){var D=P[$]*.00392156862745098,V=P[$+1]*(1/255),Z=P[$+2]*(1/255),G=P[$+3]*(1/255);for(Y=N;Y.left;)Y=O(Y.est,D,V,Z,G)<=0?Y.left:Y.right;k[$>>2]=Y.ind,M[$>>2]=Y.est.rgba}return{abuf:A.buffer,inds:k,plte:W}}function g(v,E,P){P==null&&(P=1e-4);const A=new Uint32Array(v.buffer),M={i0:0,i1:v.length,bst:null,est:null,tdst:0,left:null,right:null};M.bst=_(v,M.i0,M.i1),M.est=S(M.bst);const F=[M];for(;F.length<E;){let W=0,C=0;for(var N=0;N<F.length;N++)F[N].est.L>W&&(W=F[N].est.L,C=N);if(W<P)break;const k=F[C],Y=x(v,A,k.i0,k.i1,k.est.e,k.est.eMq255);if(k.i0>=Y||k.i1<=Y){k.est.L=0;continue}const $={i0:k.i0,i1:Y,bst:null,est:null,tdst:0,left:null,right:null};$.bst=_(v,$.i0,$.i1),$.est=S($.bst);const D={i0:Y,i1:k.i1,bst:null,est:null,tdst:0,left:null,right:null};for(D.bst={R:[],m:[],N:k.bst.N-$.bst.N},N=0;N<16;N++)D.bst.R[N]=k.bst.R[N]-$.bst.R[N];for(N=0;N<4;N++)D.bst.m[N]=k.bst.m[N]-$.bst.m[N];D.est=S(D.bst),k.left=$,k.right=D,F[C]=$,F.push(D)}for(F.sort(((W,C)=>C.bst.N-W.bst.N)),N=0;N<F.length;N++)F[N].ind=N;return[M,F]}function y(v,E,P,A,M){if(v.left==null)return v.tdst=(function($,D,V,Z,G){const B=D-$[0],L=V-$[1],J=Z-$[2],q=G-$[3];return B*B+L*L+J*J+q*q})(v.est.q,E,P,A,M),v;const F=O(v.est,E,P,A,M);let N=v.left,W=v.right;F>0&&(N=v.right,W=v.left);const C=y(N,E,P,A,M);if(C.tdst<=F*F)return C;const k=y(W,E,P,A,M);return k.tdst<C.tdst?k:C}function O(v,E,P,A,M){const{e:F}=v;return F[0]*E+F[1]*P+F[2]*A+F[3]*M-v.eMq}function x(v,E,P,A,M,F){for(A-=4;P<A;){for(;w(v,P,M)<=F;)P+=4;for(;w(v,A,M)>F;)A-=4;if(P>=A)break;const N=E[P>>2];E[P>>2]=E[A>>2],E[A>>2]=N,P+=4,A-=4}for(;w(v,P,M)>F;)P-=4;return P+4}function w(v,E,P){return v[E]*P[0]+v[E+1]*P[1]+v[E+2]*P[2]+v[E+3]*P[3]}function _(v,E,P){const A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=[0,0,0,0],F=P-E>>2;for(let N=E;N<P;N+=4){const W=v[N]*.00392156862745098,C=v[N+1]*(1/255),k=v[N+2]*(1/255),Y=v[N+3]*(1/255);M[0]+=W,M[1]+=C,M[2]+=k,M[3]+=Y,A[0]+=W*W,A[1]+=W*C,A[2]+=W*k,A[3]+=W*Y,A[5]+=C*C,A[6]+=C*k,A[7]+=C*Y,A[10]+=k*k,A[11]+=k*Y,A[15]+=Y*Y}return A[4]=A[1],A[8]=A[2],A[9]=A[6],A[12]=A[3],A[13]=A[7],A[14]=A[11],{R:A,m:M,N:F}}function S(v){const{R:E}=v,{m:P}=v,{N:A}=v,M=P[0],F=P[1],N=P[2],W=P[3],C=A==0?0:1/A,k=[E[0]-M*M*C,E[1]-M*F*C,E[2]-M*N*C,E[3]-M*W*C,E[4]-F*M*C,E[5]-F*F*C,E[6]-F*N*C,E[7]-F*W*C,E[8]-N*M*C,E[9]-N*F*C,E[10]-N*N*C,E[11]-N*W*C,E[12]-W*M*C,E[13]-W*F*C,E[14]-W*N*C,E[15]-W*W*C],Y=k,$=I;let D=[Math.random(),Math.random(),Math.random(),Math.random()],V=0,Z=0;if(A!=0)for(let B=0;B<16&&(D=$.multVec(Y,D),Z=Math.sqrt($.dot(D,D)),D=$.sml(1/Z,D),!(B!=0&&Math.abs(Z-V)<1e-9));B++)V=Z;const G=[M*C,F*C,N*C,W*C];return{Cov:k,q:G,e:D,L:V,eMq255:$.dot($.sml(255,G),D),eMq:$.dot(D,G),rgba:(Math.round(255*G[3])<<24|Math.round(255*G[2])<<16|Math.round(255*G[1])<<8|Math.round(255*G[0])<<0)>>>0}}var I={multVec:(v,E)=>[v[0]*E[0]+v[1]*E[1]+v[2]*E[2]+v[3]*E[3],v[4]*E[0]+v[5]*E[1]+v[6]*E[2]+v[7]*E[3],v[8]*E[0]+v[9]*E[1]+v[10]*E[2]+v[11]*E[3],v[12]*E[0]+v[13]*E[1]+v[14]*E[2]+v[15]*E[3]],dot:(v,E)=>v[0]*E[0]+v[1]*E[1]+v[2]*E[2]+v[3]*E[3],sml:(v,E)=>[v*E[0],v*E[1],v*E[2],v*E[3]]};yr.encode=function(E,P,A,M,F,N,W){M==null&&(M=0),W==null&&(W=!1);const C=l(E,P,A,M,[!1,!1,!1,0,W,!1]);return u(C,-1),c(C,P,A,F,N)},yr.encodeLL=function(E,P,A,M,F,N,W,C){const k={ctype:0+(M==1?0:2)+(F==0?0:4),depth:N,frames:[]},Y=(M+F)*N,$=Y*P;for(let D=0;D<E.length;D++)k.frames.push({rect:{x:0,y:0,width:P,height:A},img:new Uint8Array(E[D]),blend:0,dispose:1,bpp:Math.ceil(Y/8),bpl:Math.ceil($/8)});return u(k,0,!0),c(k,P,A,W,C)},yr.encode.compress=l,yr.encode.dither=a,yr.quantize=p,yr.quantize.getKDtree=g,yr.quantize.getNearest=y})();const ng={toArrayBuffer(e,t){const r=e.width,n=e.height,o=r<<2,s=e.getContext("2d").getImageData(0,0,r,n),i=new Uint32Array(s.data.buffer),a=(32*r+31)/32<<2,c=a*n,u=122+c,l=new ArrayBuffer(u),f=new DataView(l),d=1<<20;let h,m,p,g,y=d,O=0,x=0,w=0;function _(v){f.setUint16(x,v,!0),x+=2}function S(v){f.setUint32(x,v,!0),x+=4}function I(v){x+=v}_(19778),S(u),I(4),S(122),S(108),S(r),S(-n>>>0),_(1),_(32),S(3),S(c),S(2835),S(2835),I(8),S(16711680),S(65280),S(255),S(4278190080),S(1466527264),(function v(){for(;O<n&&y>0;){for(g=122+O*a,h=0;h<o;)y--,m=i[w++],p=m>>>24,f.setUint32(g+h,m<<8|p),h+=4;O++}w<i.length?(y=d,setTimeout(v,ng._dly)):t(l)})()},toBlob(e,t){this.toArrayBuffer(e,(r=>{t(new Blob([r],{type:"image/bmp"}))}))},_dly:9};var Yt={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},wP={[Yt.CHROME]:16384,[Yt.FIREFOX]:11180,[Yt.DESKTOP_SAFARI]:16384,[Yt.IE]:8192,[Yt.IOS]:4096,[Yt.ETC]:8192};const pl=typeof window<"u",og=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,$i=pl&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),_P=(pl||og)&&($i&&$i.getOriginalSymbol(window,"File")||typeof File<"u"&&File),sg=(pl||og)&&($i&&$i.getOriginalSymbol(window,"FileReader")||typeof FileReader<"u"&&FileReader);function ml(e,t,r=Date.now()){return new Promise((n=>{const o=e.split(","),s=o[0].match(/:(.*?);/)[1],i=globalThis.atob(o[1]);let a=i.length;const c=new Uint8Array(a);for(;a--;)c[a]=i.charCodeAt(a);const u=new Blob([c],{type:s});u.name=t,u.lastModified=r,n(u)}))}function ig(e){return new Promise(((t,r)=>{const n=new sg;n.onload=()=>t(n.result),n.onerror=o=>r(o),n.readAsDataURL(e)}))}function ag(e){return new Promise(((t,r)=>{const n=new Image;n.onload=()=>t(n),n.onerror=o=>r(o),n.src=e}))}function $n(){if($n.cachedResult!==void 0)return $n.cachedResult;let e=Yt.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=Yt.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=Yt.IOS:/Safari/i.test(t)?e=Yt.DESKTOP_SAFARI:/Firefox/i.test(t)?e=Yt.FIREFOX:(/MSIE/i.test(t)||document.documentMode)&&(e=Yt.IE),$n.cachedResult=e,$n.cachedResult}function cg(e,t){const r=$n(),n=wP[r];let o=e,s=t,i=o*s;const a=o>s?s/o:o/s;for(;i>n*n;){const c=(n+o)/2,u=(n+s)/2;c<u?(s=u,o=u*a):(s=c*a,o=c),i=o*s}return{width:o,height:s}}function Ui(e,t){let r,n;try{if(r=new OffscreenCanvas(e,t),n=r.getContext("2d"),n===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{r=document.createElement("canvas"),n=r.getContext("2d")}return r.width=e,r.height=t,[r,n]}function lg(e,t){const{width:r,height:n}=cg(e.width,e.height),[o,s]=Ui(r,n);return t&&/jpe?g/.test(t)&&(s.fillStyle="white",s.fillRect(0,0,o.width,o.height)),s.drawImage(e,0,0,o.width,o.height),o}function Yi(){return Yi.cachedResult!==void 0||(Yi.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document<"u"&&"ontouchend"in document),Yi.cachedResult}function ji(e,t={}){return new Promise((function(r,n){let o,s;var i=function(){try{return s=lg(o,t.fileType||e.type),r([o,s])}catch(c){return n(c)}},a=function(c){try{var u=function(l){try{throw l}catch(f){return n(f)}};try{let l;return ig(e).then((function(f){try{return l=f,ag(l).then((function(d){try{return o=d,(function(){try{return i()}catch(h){return n(h)}})()}catch(h){return u(h)}}),u)}catch(d){return u(d)}}),u)}catch(l){u(l)}}catch(l){return n(l)}};try{if(Yi()||[Yt.DESKTOP_SAFARI,Yt.MOBILE_SAFARI].includes($n()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then((function(c){try{return o=c,i()}catch{return a()}}),a)}catch{a()}}))}function Vi(e,t,r,n,o=1){return new Promise((function(s,i){let a;if(t==="image/png"){let u,l,f;return u=e.getContext("2d"),{data:l}=u.getImageData(0,0,e.width,e.height),f=yr.encode([l.buffer],e.width,e.height,4096*o),a=new Blob([f],{type:t}),a.name=r,a.lastModified=n,c.call(this)}{let u=function(){return c.call(this)};if(t==="image/bmp")return new Promise((l=>ng.toBlob(e,l))).then((function(l){try{return a=l,a.name=r,a.lastModified=n,u.call(this)}catch(f){return i(f)}}).bind(this),i);{let l=function(){return u.call(this)};if(typeof OffscreenCanvas=="function"&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:o}).then((function(f){try{return a=f,a.name=r,a.lastModified=n,l.call(this)}catch(d){return i(d)}}).bind(this),i);{let f;return f=e.toDataURL(t,o),ml(f,r,n).then((function(d){try{return a=d,l.call(this)}catch(h){return i(h)}}).bind(this),i)}}}function c(){return s(a)}}))}function Nr(e){e.width=0,e.height=0}function yo(){return new Promise((function(e,t){let r,n,o,s;return yo.cachedResult!==void 0?e(yo.cachedResult):ml("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(i){try{return r=i,ji(r).then((function(a){try{return n=a[1],Vi(n,r.type,r.name,r.lastModified).then((function(c){try{return o=c,Nr(n),ji(o).then((function(u){try{return s=u[0],yo.cachedResult=s.width===1&&s.height===2,e(yo.cachedResult)}catch(l){return t(l)}}),t)}catch(u){return t(u)}}),t)}catch(c){return t(c)}}),t)}catch(a){return t(a)}}),t)}))}function ug(e){return new Promise(((t,r)=>{const n=new sg;n.onload=o=>{const s=new DataView(o.target.result);if(s.getUint16(0,!1)!=65496)return t(-2);const i=s.byteLength;let a=2;for(;a<i;){if(s.getUint16(a+2,!1)<=8)return t(-1);const c=s.getUint16(a,!1);if(a+=2,c==65505){if(s.getUint32(a+=2,!1)!=1165519206)return t(-1);const u=s.getUint16(a+=6,!1)==18761;a+=s.getUint32(a+4,u);const l=s.getUint16(a,u);a+=2;for(let f=0;f<l;f++)if(s.getUint16(a+12*f,u)==274)return t(s.getUint16(a+12*f+8,u))}else{if((65280&c)!=65280)break;a+=s.getUint16(a,!1)}}return t(-1)},n.onerror=o=>r(o),n.readAsArrayBuffer(e)}))}function fg(e,t){const{width:r}=e,{height:n}=e,{maxWidthOrHeight:o}=t;let s,i=e;return isFinite(o)&&(r>o||n>o)&&([i,s]=Ui(r,n),r>n?(i.width=o,i.height=n/r*o):(i.width=r/n*o,i.height=o),s.drawImage(e,0,0,i.width,i.height),Nr(e)),i}function dg(e,t){const{width:r}=e,{height:n}=e,[o,s]=Ui(r,n);switch(t>4&&t<9?(o.width=n,o.height=r):(o.width=r,o.height=n),t){case 2:s.transform(-1,0,0,1,r,0);break;case 3:s.transform(-1,0,0,-1,r,n);break;case 4:s.transform(1,0,0,-1,0,n);break;case 5:s.transform(0,1,1,0,0,0);break;case 6:s.transform(0,1,-1,0,n,0);break;case 7:s.transform(0,-1,-1,0,n,r);break;case 8:s.transform(0,-1,1,0,0,r)}return s.drawImage(e,0,0,r,n),Nr(e),o}function hg(e,t,r=0){return new Promise((function(n,o){let s,i,a,c,u,l,f,d,h,m,p,g,y,O,x,w,_,S,I,v;function E(A=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;s+=A,t.onProgress(Math.min(s,100))}function P(A){if(t.signal&&t.signal.aborted)throw t.signal.reason;s=Math.min(Math.max(A,s),100),t.onProgress(s)}return s=r,i=t.maxIteration||10,a=1024*t.maxSizeMB*1024,E(),ji(e,t).then((function(A){try{return[,c]=A,E(),u=fg(c,t),E(),new Promise((function(M,F){var N;if(!(N=t.exifOrientation))return ug(e).then((function(C){try{return N=C,W.call(this)}catch(k){return F(k)}}).bind(this),F);function W(){return M(N)}return W.call(this)})).then((function(M){try{return l=M,E(),yo().then((function(F){try{return f=F?u:dg(u,l),E(),d=t.initialQuality||1,h=t.fileType||e.type,Vi(f,h,e.name,e.lastModified,d).then((function(N){try{{let C=function(){if(i--&&(x>a||x>y)){let Y,$;return Y=v?.95*I.width:I.width,$=v?.95*I.height:I.height,[_,S]=Ui(Y,$),S.drawImage(I,0,0,Y,$),d*=h==="image/png"?.85:.95,Vi(_,h,e.name,e.lastModified,d).then((function(D){try{return w=D,Nr(I),I=_,x=w.size,P(Math.min(99,Math.floor((O-x)/(O-a)*100))),C}catch(V){return o(V)}}),o)}return[1]},k=function(){return Nr(I),Nr(_),Nr(u),Nr(f),Nr(c),P(100),n(w)};if(m=N,E(),p=m.size>a,g=m.size>e.size,!p&&!g)return P(100),n(m);var W;return y=e.size,O=m.size,x=O,I=f,v=!t.alwaysKeepResolution&&p,(W=(function(Y){for(;Y;){if(Y.then)return void Y.then(W,o);try{if(Y.pop){if(Y.length)return Y.pop()?k.call(this):Y;Y=C}else Y=Y.call(this)}catch($){return o($)}}}).bind(this))(C)}}catch(C){return o(C)}}).bind(this),o)}catch(N){return o(N)}}).bind(this),o)}catch(F){return o(F)}}).bind(this),o)}catch(M){return o(M)}}).bind(this),o)}))}const SP=`
83
+ `)},kM=0,mo=[];function xM(e){var t=b.useRef([]),r=b.useRef([0,0]),n=b.useRef(),o=b.useState(kM++)[0],s=b.useState(wm)[0],i=b.useRef(e);b.useEffect(function(){i.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=BA([e.lockRef.current],(e.shards||[]).map(Cm),!0).filter(Boolean);return p.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=b.useCallback(function(p,g){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!i.current.allowPinchZoom;var y=Ni(p),O=r.current,x="deltaX"in p?p.deltaX:O[0]-y[0],w="deltaY"in p?p.deltaY:O[1]-y[1],_,S=p.target,I=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in p&&I==="h"&&S.type==="range")return!1;var v=window.getSelection(),E=v&&v.anchorNode,P=E?E===S||E.contains(S):!1;if(P)return!1;var A=km(I,S);if(!A)return!0;if(A?_=I:(_=I==="v"?"h":"v",A=km(I,S)),!A)return!1;if(!n.current&&"changedTouches"in p&&(x||w)&&(n.current=_),!_)return!0;var M=n.current||_;return wM(M,g,p,M==="h"?x:w)},[]),c=b.useCallback(function(p){var g=p;if(!(!mo.length||mo[mo.length-1]!==s)){var y="deltaY"in g?Om(g):Ni(g),O=t.current.filter(function(_){return _.name===g.type&&(_.target===g.target||g.target===_.shadowParent)&&_M(_.delta,y)})[0];if(O&&O.should){g.cancelable&&g.preventDefault();return}if(!O){var x=(i.current.shards||[]).map(Cm).filter(Boolean).filter(function(_){return _.contains(g.target)}),w=x.length>0?a(g,x[0]):!i.current.noIsolation;w&&g.cancelable&&g.preventDefault()}}},[]),u=b.useCallback(function(p,g,y,O){var x={name:p,delta:g,target:y,should:O,shadowParent:EM(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(w){return w!==x})},1)},[]),l=b.useCallback(function(p){r.current=Ni(p),n.current=void 0},[]),f=b.useCallback(function(p){u(p.type,Om(p),p.target,a(p,e.lockRef.current))},[]),d=b.useCallback(function(p){u(p.type,Ni(p),p.target,a(p,e.lockRef.current))},[]);b.useEffect(function(){return mo.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,po),document.addEventListener("touchmove",c,po),document.addEventListener("touchstart",l,po),function(){mo=mo.filter(function(p){return p!==s}),document.removeEventListener("wheel",c,po),document.removeEventListener("touchmove",c,po),document.removeEventListener("touchstart",l,po)}},[]);var h=e.removeScrollBar,m=e.inert;return b.createElement(b.Fragment,null,m?b.createElement(s,{styles:SM(o)}):null,h?b.createElement(hM,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function EM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const OM=eM(bm,xM);var Ii=b.forwardRef(function(e,t){return b.createElement(Mi,Pr({},e,{ref:t,sideCar:OM}))});Ii.classNames=Mi.classNames;var CM=[" ","Enter","ArrowUp","ArrowDown"],TM=[" ","Enter"],Ln="Select",[Fi,Ri,DM]=Hh(Ln),[go]=qr(Ln,[DM,Ei]),Wi=Ei(),[AM,wn]=go(Ln),[MM,PM]=go(Ln),Tm=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:u,name:l,autoComplete:f,disabled:d,required:h,form:m}=e,p=Wi(t),[g,y]=b.useState(null),[O,x]=b.useState(null),[w,_]=b.useState(!1),S=Dc(u),[I,v]=Rn({prop:n,defaultProp:o??!1,onChange:s,caller:Ln}),[E,P]=Rn({prop:i,defaultProp:a,onChange:c,caller:Ln}),A=b.useRef(null),M=g?m||!!g.closest("form"):!0,[F,N]=b.useState(new Set),W=Array.from(F).map(C=>C.props.value).join(";");return T.jsx(fm,{...p,children:T.jsxs(AM,{required:h,scope:t,trigger:g,onTriggerChange:y,valueNode:O,onValueNodeChange:x,valueNodeHasChildren:w,onValueNodeHasChildrenChange:_,contentId:dn(),value:E,onValueChange:P,open:I,onOpenChange:v,dir:S,triggerPointerDownPosRef:A,disabled:d,children:[T.jsx(Fi.Provider,{scope:t,children:T.jsx(MM,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(C=>{N(k=>new Set(k).add(C))},[]),onNativeOptionRemove:b.useCallback(C=>{N(k=>{const Y=new Set(k);return Y.delete(C),Y})},[]),children:r})}),M?T.jsxs(Km,{"aria-hidden":!0,required:h,tabIndex:-1,name:l,autoComplete:f,value:E,onChange:C=>P(C.target.value),disabled:d,form:m,children:[E===void 0?T.jsx("option",{value:""}):null,Array.from(F)]},W):null]})})};Tm.displayName=Ln;var Dm="SelectTrigger",Am=b.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,s=Wi(r),i=wn(Dm,r),a=i.disabled||n,c=He(t,i.onTriggerChange),u=Ri(r),l=b.useRef("touch"),[f,d,h]=Xm(p=>{const g=u().filter(x=>!x.disabled),y=g.find(x=>x.value===i.value),O=Qm(g,p,y);O!==void 0&&i.onValueChange(O.value)}),m=p=>{a||(i.onOpenChange(!0),h()),p&&(i.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return T.jsx(tl,{asChild:!0,...s,children:T.jsx(Ne.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Jm(i.value)?"":void 0,...o,ref:c,onClick:Te(o.onClick,p=>{p.currentTarget.focus(),l.current!=="mouse"&&m(p)}),onPointerDown:Te(o.onPointerDown,p=>{l.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(m(p),p.preventDefault())}),onKeyDown:Te(o.onKeyDown,p=>{const g=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&d(p.key),!(g&&p.key===" ")&&CM.includes(p.key)&&(m(),p.preventDefault())})})})});Am.displayName=Dm;var Mm="SelectValue",Pm=b.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:s,placeholder:i="",...a}=e,c=wn(Mm,r),{onValueNodeHasChildrenChange:u}=c,l=s!==void 0,f=He(t,c.onValueNodeChange);return At(()=>{u(l)},[u,l]),T.jsx(Ne.span,{...a,ref:f,style:{pointerEvents:"none"},children:Jm(c.value)?T.jsx(T.Fragment,{children:i}):s})});Pm.displayName=Mm;var NM="SelectIcon",Nm=b.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return T.jsx(Ne.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});Nm.displayName=NM;var IM="SelectPortal",Im=e=>T.jsx(Oi,{asChild:!0,...e});Im.displayName=IM;var zn="SelectContent",Fm=b.forwardRef((e,t)=>{const r=wn(zn,e.__scopeSelect),[n,o]=b.useState();if(At(()=>{o(new DocumentFragment)},[]),!r.open){const s=n;return s?ms.createPortal(T.jsx(Rm,{scope:e.__scopeSelect,children:T.jsx(Fi.Slot,{scope:e.__scopeSelect,children:T.jsx("div",{children:e.children})})}),s):null}return T.jsx(Wm,{...e,ref:t})});Fm.displayName=zn;var gr=10,[Rm,_n]=go(zn),FM="SelectContentImpl",RM=IA("SelectContent.RemoveScroll"),Wm=b.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:u,alignOffset:l,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:g,...y}=e,O=wn(zn,r),[x,w]=b.useState(null),[_,S]=b.useState(null),I=He(t,q=>w(q)),[v,E]=b.useState(null),[P,A]=b.useState(null),M=Ri(r),[F,N]=b.useState(!1),W=b.useRef(!1);b.useEffect(()=>{if(x)return nl(x)},[x]),zc();const C=b.useCallback(q=>{const[oe,...Q]=M().map(K=>K.ref.current),[ne]=Q.slice(-1),le=document.activeElement;for(const K of q)if(K===le||(K?.scrollIntoView({block:"nearest"}),K===oe&&_&&(_.scrollTop=0),K===ne&&_&&(_.scrollTop=_.scrollHeight),K?.focus(),document.activeElement!==le))return},[M,_]),k=b.useCallback(()=>C([v,x]),[C,v,x]);b.useEffect(()=>{F&&k()},[F,k]);const{onOpenChange:Y,triggerPointerDownPosRef:$}=O;b.useEffect(()=>{if(x){let q={x:0,y:0};const oe=ne=>{q={x:Math.abs(Math.round(ne.pageX)-($.current?.x??0)),y:Math.abs(Math.round(ne.pageY)-($.current?.y??0))}},Q=ne=>{q.x<=10&&q.y<=10?ne.preventDefault():x.contains(ne.target)||Y(!1),document.removeEventListener("pointermove",oe),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",Q,{capture:!0})}}},[x,Y,$]),b.useEffect(()=>{const q=()=>Y(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[Y]);const[D,V]=Xm(q=>{const oe=M().filter(le=>!le.disabled),Q=oe.find(le=>le.ref.current===document.activeElement),ne=Qm(oe,q,Q);ne&&setTimeout(()=>ne.ref.current.focus())}),Z=b.useCallback((q,oe,Q)=>{const ne=!W.current&&!Q;(O.value!==void 0&&O.value===oe||ne)&&(E(q),ne&&(W.current=!0))},[O.value]),G=b.useCallback(()=>x?.focus(),[x]),B=b.useCallback((q,oe,Q)=>{const ne=!W.current&&!Q;(O.value!==void 0&&O.value===oe||ne)&&A(q)},[O.value]),L=n==="popper"?cl:Lm,J=L===cl?{side:a,sideOffset:c,align:u,alignOffset:l,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:g}:{};return T.jsx(Rm,{scope:r,content:x,viewport:_,onViewportChange:S,itemRefCallback:Z,selectedItem:v,onItemLeave:G,itemTextRefCallback:B,focusSelectedItem:k,selectedItemText:P,position:n,isPositioned:F,searchRef:D,children:T.jsx(Ii,{as:RM,allowPinchZoom:!0,children:T.jsx(pi,{asChild:!0,trapped:O.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:Te(o,q=>{O.trigger?.focus({preventScroll:!0}),q.preventDefault()}),children:T.jsx(hi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:T.jsx(L,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:q=>q.preventDefault(),...y,...J,onPlaced:()=>N(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Te(y.onKeyDown,q=>{const oe=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!oe&&q.key.length===1&&V(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let ne=M().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(q.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const le=q.target,K=ne.indexOf(le);ne=ne.slice(K+1)}setTimeout(()=>C(ne)),q.preventDefault()}})})})})})})});Wm.displayName=FM;var WM="SelectItemAlignedPosition",Lm=b.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,s=wn(zn,r),i=_n(zn,r),[a,c]=b.useState(null),[u,l]=b.useState(null),f=He(t,I=>l(I)),d=Ri(r),h=b.useRef(!1),m=b.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:y,focusSelectedItem:O}=i,x=b.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&p&&g&&y){const I=s.trigger.getBoundingClientRect(),v=u.getBoundingClientRect(),E=s.valueNode.getBoundingClientRect(),P=y.getBoundingClientRect();if(s.dir!=="rtl"){const le=P.left-v.left,K=E.left-le,Se=I.left-K,Ie=I.width+Se,ke=Math.max(Ie,v.width),Ge=window.innerWidth-gr,Re=Sp(K,[gr,Math.max(gr,Ge-ke)]);a.style.minWidth=Ie+"px",a.style.left=Re+"px"}else{const le=v.right-P.right,K=window.innerWidth-E.right-le,Se=window.innerWidth-I.right-K,Ie=I.width+Se,ke=Math.max(Ie,v.width),Ge=window.innerWidth-gr,Re=Sp(K,[gr,Math.max(gr,Ge-ke)]);a.style.minWidth=Ie+"px",a.style.right=Re+"px"}const A=d(),M=window.innerHeight-gr*2,F=p.scrollHeight,N=window.getComputedStyle(u),W=parseInt(N.borderTopWidth,10),C=parseInt(N.paddingTop,10),k=parseInt(N.borderBottomWidth,10),Y=parseInt(N.paddingBottom,10),$=W+C+F+Y+k,D=Math.min(g.offsetHeight*5,$),V=window.getComputedStyle(p),Z=parseInt(V.paddingTop,10),G=parseInt(V.paddingBottom,10),B=I.top+I.height/2-gr,L=M-B,J=g.offsetHeight/2,q=g.offsetTop+J,oe=W+C+q,Q=$-oe;if(oe<=B){const le=A.length>0&&g===A[A.length-1].ref.current;a.style.bottom="0px";const K=u.clientHeight-p.offsetTop-p.offsetHeight,Se=Math.max(L,J+(le?G:0)+K+k),Ie=oe+Se;a.style.height=Ie+"px"}else{const le=A.length>0&&g===A[0].ref.current;a.style.top="0px";const Se=Math.max(B,W+p.offsetTop+(le?Z:0)+J)+Q;a.style.height=Se+"px",p.scrollTop=oe-B+p.offsetTop}a.style.margin=`${gr}px 0`,a.style.minHeight=D+"px",a.style.maxHeight=M+"px",n?.(),requestAnimationFrame(()=>h.current=!0)}},[d,s.trigger,s.valueNode,a,u,p,g,y,s.dir,n]);At(()=>x(),[x]);const[w,_]=b.useState();At(()=>{u&&_(window.getComputedStyle(u).zIndex)},[u]);const S=b.useCallback(I=>{I&&m.current===!0&&(x(),O?.(),m.current=!1)},[x,O]);return T.jsx(zM,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:S,children:T.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:T.jsx(Ne.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Lm.displayName=WM;var LM="SelectPopperPosition",cl=b.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=gr,...s}=e,i=Wi(r);return T.jsx(dm,{...i,...s,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});cl.displayName=LM;var[zM,ll]=go(zn,{}),ul="SelectViewport",zm=b.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,s=_n(ul,r),i=ll(ul,r),a=He(t,s.onViewportChange),c=b.useRef(0);return T.jsxs(T.Fragment,{children:[T.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}),T.jsx(Fi.Slot,{scope:r,children:T.jsx(Ne.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Te(o.onScroll,u=>{const l=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=i;if(d?.current&&f){const h=Math.abs(c.current-l.scrollTop);if(h>0){const m=window.innerHeight-gr*2,p=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),y=Math.max(p,g);if(y<m){const O=y+h,x=Math.min(m,O),w=O-x;f.style.height=x+"px",f.style.bottom==="0px"&&(l.scrollTop=w>0?w:0,f.style.justifyContent="flex-end")}}}c.current=l.scrollTop})})})]})});zm.displayName=ul;var $m="SelectGroup",[$M,UM]=go($m),YM=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=dn();return T.jsx($M,{scope:r,id:o,children:T.jsx(Ne.div,{role:"group","aria-labelledby":o,...n,ref:t})})});YM.displayName=$m;var Um="SelectLabel",jM=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=UM(Um,r);return T.jsx(Ne.div,{id:o.id,...n,ref:t})});jM.displayName=Um;var Li="SelectItem",[VM,Ym]=go(Li),jm=b.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:s,...i}=e,a=wn(Li,r),c=_n(Li,r),u=a.value===n,[l,f]=b.useState(s??""),[d,h]=b.useState(!1),m=He(t,O=>c.itemRefCallback?.(O,n,o)),p=dn(),g=b.useRef("touch"),y=()=>{o||(a.onValueChange(n),a.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 T.jsx(VM,{scope:r,value:n,disabled:o,textId:p,isSelected:u,onItemTextChange:b.useCallback(O=>{f(x=>x||(O?.textContent??"").trim())},[]),children:T.jsx(Fi.ItemSlot,{scope:r,value:n,disabled:o,textValue:l,children:T.jsx(Ne.div,{role:"option","aria-labelledby":p,"data-highlighted":d?"":void 0,"aria-selected":u&&d,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:m,onFocus:Te(i.onFocus,()=>h(!0)),onBlur:Te(i.onBlur,()=>h(!1)),onClick:Te(i.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:Te(i.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:Te(i.onPointerDown,O=>{g.current=O.pointerType}),onPointerMove:Te(i.onPointerMove,O=>{g.current=O.pointerType,o?c.onItemLeave?.():g.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Te(i.onPointerLeave,O=>{O.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Te(i.onKeyDown,O=>{c.searchRef?.current!==""&&O.key===" "||(TM.includes(O.key)&&y(),O.key===" "&&O.preventDefault())})})})})});jm.displayName=Li;var es="SelectItemText",Vm=b.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...s}=e,i=wn(es,r),a=_n(es,r),c=Ym(es,r),u=PM(es,r),[l,f]=b.useState(null),d=He(t,y=>f(y),c.onItemTextChange,y=>a.itemTextRefCallback?.(y,c.value,c.disabled)),h=l?.textContent,m=b.useMemo(()=>T.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return At(()=>(p(m),()=>g(m)),[p,g,m]),T.jsxs(T.Fragment,{children:[T.jsx(Ne.span,{id:c.textId,...s,ref:d}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ms.createPortal(s.children,i.valueNode):null]})});Vm.displayName=es;var Bm="SelectItemIndicator",Hm=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return Ym(Bm,r).isSelected?T.jsx(Ne.span,{"aria-hidden":!0,...n,ref:t}):null});Hm.displayName=Bm;var fl="SelectScrollUpButton",Zm=b.forwardRef((e,t)=>{const r=_n(fl,e.__scopeSelect),n=ll(fl,e.__scopeSelect),[o,s]=b.useState(!1),i=He(t,n.onScrollButtonChange);return At(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=c.scrollTop>0;s(u)};const c=r.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?T.jsx(qm,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});Zm.displayName=fl;var dl="SelectScrollDownButton",Gm=b.forwardRef((e,t)=>{const r=_n(dl,e.__scopeSelect),n=ll(dl,e.__scopeSelect),[o,s]=b.useState(!1),i=He(t,n.onScrollButtonChange);return At(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,l=Math.ceil(c.scrollTop)<u;s(l)};const c=r.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?T.jsx(qm,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});Gm.displayName=dl;var qm=b.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,s=_n("SelectScrollButton",r),i=b.useRef(null),a=Ri(r),c=b.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return b.useEffect(()=>()=>c(),[c]),At(()=>{a().find(l=>l.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),T.jsx(Ne.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Te(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:Te(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:Te(o.onPointerLeave,()=>{c()})})}),BM="SelectSeparator",HM=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return T.jsx(Ne.div,{"aria-hidden":!0,...n,ref:t})});HM.displayName=BM;var hl="SelectArrow",ZM=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Wi(r),s=wn(hl,r),i=_n(hl,r);return s.open&&i.position==="popper"?T.jsx(hm,{...o,...n,ref:t}):null});ZM.displayName=hl;var GM="SelectBubbleInput",Km=b.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=b.useRef(null),s=He(n,o),i=Nc(t);return b.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,l=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&l){const f=new Event("change",{bubbles:!0});l.call(a,t),a.dispatchEvent(f)}},[i,t]),T.jsx(Ne.select,{...r,style:{...pm,...r.style},ref:s,defaultValue:t})});Km.displayName=GM;function Jm(e){return e===""||e===void 0}function Xm(e){const t=hn(e),r=b.useRef(""),n=b.useRef(0),o=b.useCallback(i=>{const a=r.current+i;t(a),(function c(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))})(a)},[t]),s=b.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,s]}function Qm(e,t,r){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let i=qM(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==r));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}function qM(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var KM=Tm,JM=Am,XM=Pm,QM=Nm,eP=Im,tP=Fm,rP=zm,nP=jm,oP=Vm,sP=Hm,iP=Zm,aP=Gm;function cP({...e}){return T.jsx(KM,{"data-slot":"select",...e})}function lP({...e}){return T.jsx(XM,{"data-slot":"select-value",...e})}function uP({className:e,size:t="default",children:r,...n}){return T.jsxs(JM,{"data-slot":"select-trigger","data-size":t,className:Dt("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,T.jsx(QM,{asChild:!0,children:T.jsx(Fc,{className:"size-4 opacity-50"})})]})}function fP({className:e,children:t,position:r="popper",...n}){return T.jsx(eP,{children:T.jsxs(tP,{"data-slot":"select-content",className:Dt("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:[T.jsx(hP,{}),T.jsx(rP,{className:Dt("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),T.jsx(pP,{})]})})}function dP({className:e,children:t,...r}){return T.jsxs(nP,{"data-slot":"select-item",className:Dt("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:[T.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:T.jsx(sP,{children:T.jsx(hp,{className:"size-4"})})}),T.jsx(oP,{children:t})]})}function hP({className:e,...t}){return T.jsx(iP,{"data-slot":"select-scroll-up-button",className:Dt("flex cursor-default items-center justify-center py-1",e),...t,children:T.jsx(UT,{className:"size-4"})})}function pP({className:e,...t}){return T.jsx(aP,{"data-slot":"select-scroll-down-button",className:Dt("flex cursor-default items-center justify-center py-1",e),...t,children:T.jsx(Fc,{className:"size-4"})})}const mP=(e={})=>{const{field:t={},form:r={},question:n={},disabled:o=!1}=e,{options:s=[]}=n;return T.jsxs(cP,{onValueChange:t.onChange,value:t.value,disabled:o,className:"bq-select",children:[T.jsx(li,{className:"w-full",children:T.jsx(uP,{className:"bq-select-trigger",children:T.jsx(lP,{placeholder:n.placeholder||"Please select"})})}),T.jsx(fP,{children:s.map((i,a)=>T.jsx(dP,{value:i.value,children:i.label},a))})]})},eg=6048e5,gP=864e5,tg=Symbol.for("constructDateFrom");function wt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&tg in e?e[tg](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ke(e,t){return wt(t||e,e)}function rg(e,t){return Ke(e,t?.in).getFullYear()}const ng=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,og=oi,yP=(e,t)=>r=>{var n;if(t?.variants==null)return og(e,r?.class,r?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const l=r?.[u],f=s?.[u];if(l===null)return null;const d=ng(l)||ng(f);return o[u][d]}),a=r&&Object.entries(r).reduce((u,l)=>{let[f,d]=l;return d===void 0||(u[f]=d),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,l)=>{let{class:f,className:d,...h}=l;return Object.entries(h).every(m=>{let[p,g]=m;return Array.isArray(g)?g.includes({...s,...a}[p]):{...s,...a}[p]===g})?[...u,f,d]:u},[]);return og(e,i,c,r?.class,r?.className)};function vP(e,t){return t.forEach((function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach((function(n){if(n!=="default"&&!(n in e)){var o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return r[n]}})}}))})),Object.freeze(e)}function sg(e,t){return new Promise((function(r,n){let o;return bP(e).then((function(s){try{return o=s,r(new Blob([t.slice(0,2),o,t.slice(2)],{type:"image/jpeg"}))}catch(i){return n(i)}}),n)}))}const bP=e=>new Promise(((t,r)=>{const n=new FileReader;n.addEventListener("load",(({target:{result:o}})=>{const s=new DataView(o);let i=0;if(s.getUint16(i)!==65496)return r("not a valid JPEG");for(i+=2;;){const a=s.getUint16(i);if(a===65498)break;const c=s.getUint16(i+2);if(a===65505&&s.getUint32(i+4)===1165519206){const u=i+10;let l;switch(s.getUint16(u)){case 18761:l=!0;break;case 19789:l=!1;break;default:return r("TIFF header contains invalid endian")}if(s.getUint16(u+2,l)!==42)return r("TIFF header contains invalid version");const f=s.getUint32(u+4,l),d=u+f+2+12*s.getUint16(u+f,l);for(let h=u+f+2;h<d;h+=12)if(s.getUint16(h,l)==274){if(s.getUint16(h+2,l)!==3)return r("Orientation data type is invalid");if(s.getUint32(h+4,l)!==1)return r("Orientation data count is invalid");s.setUint16(h+8,1,l);break}return t(o.slice(i,i+2+c))}i+=2+c}return t(new Blob)})),n.readAsArrayBuffer(e)}));var zi={},wP={get exports(){return zi},set exports(e){zi=e}};(function(e){var t,r,n={};wP.exports=n,n.parse=function(o,s){for(var i=n.bin.readUshort,a=n.bin.readUint,c=0,u={},l=new Uint8Array(o),f=l.length-4;a(l,f)!=101010256;)f--;c=f,c+=4;var d=i(l,c+=4);i(l,c+=2);var h=a(l,c+=2),m=a(l,c+=4);c+=4,c=m;for(var p=0;p<d;p++){a(l,c),c+=4,c+=4,c+=4,a(l,c+=4),h=a(l,c+=4);var g=a(l,c+=4),y=i(l,c+=4),O=i(l,c+2),x=i(l,c+4);c+=6;var w=a(l,c+=8);c+=4,c+=y+O+x,n._readLocal(l,w,u,h,g,s)}return u},n._readLocal=function(o,s,i,a,c,u){var l=n.bin.readUshort,f=n.bin.readUint;f(o,s),l(o,s+=4),l(o,s+=2);var d=l(o,s+=2);f(o,s+=2),f(o,s+=4),s+=4;var h=l(o,s+=8),m=l(o,s+=2);s+=2;var p=n.bin.readUTF8(o,s,h);if(s+=h,s+=m,u)i[p]={size:c,csize:a};else{var g=new Uint8Array(o.buffer,s);if(d==0)i[p]=new Uint8Array(g.buffer.slice(s,s+a));else{if(d!=8)throw"unknown compression method: "+d;var y=new Uint8Array(c);n.inflateRaw(g,y),i[p]=y}}},n.inflateRaw=function(o,s){return n.F.inflate(o,s)},n.inflate=function(o,s){return o[0],o[1],n.inflateRaw(new Uint8Array(o.buffer,o.byteOffset+2,o.length-6),s)},n.deflate=function(o,s){s==null&&(s={level:6});var i=0,a=new Uint8Array(50+Math.floor(1.1*o.length));a[i]=120,a[i+1]=156,i+=2,i=n.F.deflateRaw(o,a,i,s.level);var c=n.adler(o,0,o.length);return a[i+0]=c>>>24&255,a[i+1]=c>>>16&255,a[i+2]=c>>>8&255,a[i+3]=c>>>0&255,new Uint8Array(a.buffer,0,i+4)},n.deflateRaw=function(o,s){s==null&&(s={level:6});var i=new Uint8Array(50+Math.floor(1.1*o.length)),a=n.F.deflateRaw(o,i,a,s.level);return new Uint8Array(i.buffer,0,a)},n.encode=function(o,s){s==null&&(s=!1);var i=0,a=n.bin.writeUint,c=n.bin.writeUshort,u={};for(var l in o){var f=!n._noNeed(l)&&!s,d=o[l],h=n.crc.crc(d,0,d.length);u[l]={cpr:f,usize:d.length,crc:h,file:f?n.deflateRaw(d):d}}for(var l in u)i+=u[l].file.length+30+46+2*n.bin.sizeUTF8(l);i+=22;var m=new Uint8Array(i),p=0,g=[];for(var l in u){var y=u[l];g.push(p),p=n._writeHeader(m,p,l,y,0)}var O=0,x=p;for(var l in u)y=u[l],g.push(p),p=n._writeHeader(m,p,l,y,1,g[O++]);var w=p-x;return a(m,p,101010256),p+=4,c(m,p+=4,O),c(m,p+=2,O),a(m,p+=2,w),a(m,p+=4,x),p+=4,p+=2,m.buffer},n._noNeed=function(o){var s=o.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(s)!=-1},n._writeHeader=function(o,s,i,a,c,u){var l=n.bin.writeUint,f=n.bin.writeUshort,d=a.file;return l(o,s,c==0?67324752:33639248),s+=4,c==1&&(s+=2),f(o,s,20),f(o,s+=2,0),f(o,s+=2,a.cpr?8:0),l(o,s+=2,0),l(o,s+=4,a.crc),l(o,s+=4,d.length),l(o,s+=4,a.usize),f(o,s+=4,n.bin.sizeUTF8(i)),f(o,s+=2,0),s+=2,c==1&&(s+=2,s+=2,l(o,s+=6,u),s+=4),s+=n.bin.writeUTF8(o,s,i),c==0&&(o.set(d,s),s+=d.length),s},n.crc={table:(function(){for(var o=new Uint32Array(256),s=0;s<256;s++){for(var i=s,a=0;a<8;a++)1&i?i=3988292384^i>>>1:i>>>=1;o[s]=i}return o})(),update:function(o,s,i,a){for(var c=0;c<a;c++)o=n.crc.table[255&(o^s[i+c])]^o>>>8;return o},crc:function(o,s,i){return 4294967295^n.crc.update(4294967295,o,s,i)}},n.adler=function(o,s,i){for(var a=1,c=0,u=s,l=s+i;u<l;){for(var f=Math.min(u+5552,l);u<f;)c+=a+=o[u++];a%=65521,c%=65521}return c<<16|a},n.bin={readUshort:function(o,s){return o[s]|o[s+1]<<8},writeUshort:function(o,s,i){o[s]=255&i,o[s+1]=i>>8&255},readUint:function(o,s){return 16777216*o[s+3]+(o[s+2]<<16|o[s+1]<<8|o[s])},writeUint:function(o,s,i){o[s]=255&i,o[s+1]=i>>8&255,o[s+2]=i>>16&255,o[s+3]=i>>24&255},readASCII:function(o,s,i){for(var a="",c=0;c<i;c++)a+=String.fromCharCode(o[s+c]);return a},writeASCII:function(o,s,i){for(var a=0;a<i.length;a++)o[s+a]=i.charCodeAt(a)},pad:function(o){return o.length<2?"0"+o:o},readUTF8:function(o,s,i){for(var a,c="",u=0;u<i;u++)c+="%"+n.bin.pad(o[s+u].toString(16));try{a=decodeURIComponent(c)}catch{return n.bin.readASCII(o,s,i)}return a},writeUTF8:function(o,s,i){for(var a=i.length,c=0,u=0;u<a;u++){var l=i.charCodeAt(u);if((4294967168&l)==0)o[s+c]=l,c++;else if((4294965248&l)==0)o[s+c]=192|l>>6,o[s+c+1]=128|l>>0&63,c+=2;else if((4294901760&l)==0)o[s+c]=224|l>>12,o[s+c+1]=128|l>>6&63,o[s+c+2]=128|l>>0&63,c+=3;else{if((4292870144&l)!=0)throw"e";o[s+c]=240|l>>18,o[s+c+1]=128|l>>12&63,o[s+c+2]=128|l>>6&63,o[s+c+3]=128|l>>0&63,c+=4}}return c},sizeUTF8:function(o){for(var s=o.length,i=0,a=0;a<s;a++){var c=o.charCodeAt(a);if((4294967168&c)==0)i++;else if((4294965248&c)==0)i+=2;else if((4294901760&c)==0)i+=3;else{if((4292870144&c)!=0)throw"e";i+=4}}return i}},n.F={},n.F.deflateRaw=function(o,s,i,a){var c=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][a],u=n.F.U,l=n.F._goodIndex;n.F._hash;var f=n.F._putsE,d=0,h=i<<3,m=0,p=o.length;if(a==0){for(;d<p;)f(s,h,d+(A=Math.min(65535,p-d))==p?1:0),h=n.F._copyExact(o,d,A,s,h+8),d+=A;return h>>>3}var g=u.lits,y=u.strt,O=u.prev,x=0,w=0,_=0,S=0,I=0,v=0;for(p>2&&(y[v=n.F._hash(o,0)]=0),d=0;d<p;d++){if(I=v,d+1<p-2){v=n.F._hash(o,d+1);var E=d+1&32767;O[E]=y[v],y[v]=E}if(m<=d){(x>14e3||w>26697)&&p-d>100&&(m<d&&(g[x]=d-m,x+=2,m=d),h=n.F._writeBlock(d==p-1||m==p?1:0,g,x,S,o,_,d-_,s,h),x=w=S=0,_=d);var P=0;d<p-2&&(P=n.F._bestMatch(o,d,O,I,Math.min(c[2],p-d),c[3]));var A=P>>>16,M=65535&P;if(P!=0){M=65535&P;var F=l(A=P>>>16,u.of0);u.lhst[257+F]++;var N=l(M,u.df0);u.dhst[N]++,S+=u.exb[F]+u.dxb[N],g[x]=A<<23|d-m,g[x+1]=M<<16|F<<8|N,x+=2,m=d+A}else u.lhst[o[d]]++;w++}}for(_==d&&o.length!=0||(m<d&&(g[x]=d-m,x+=2,m=d),h=n.F._writeBlock(1,g,x,S,o,_,d-_,s,h),x=0,w=0,x=w=S=0,_=d);(7&h)!=0;)h++;return h>>>3},n.F._bestMatch=function(o,s,i,a,c,u){var l=32767&s,f=i[l],d=l-f+32768&32767;if(f==l||a!=n.F._hash(o,s-d))return 0;for(var h=0,m=0,p=Math.min(32767,s);d<=p&&--u!=0&&f!=l;){if(h==0||o[s+h]==o[s+h-d]){var g=n.F._howLong(o,s,d);if(g>h){if(m=d,(h=g)>=c)break;d+2<g&&(g=d+2);for(var y=0,O=0;O<g-2;O++){var x=s-d+O+32768&32767,w=x-i[x]+32768&32767;w>y&&(y=w,f=x)}}}d+=(l=f)-(f=i[l])+32768&32767}return h<<16|m},n.F._howLong=function(o,s,i){if(o[s]!=o[s-i]||o[s+1]!=o[s+1-i]||o[s+2]!=o[s+2-i])return 0;var a=s,c=Math.min(o.length,s+258);for(s+=3;s<c&&o[s]==o[s-i];)s++;return s-a},n.F._hash=function(o,s){return(o[s]<<8|o[s+1])+(o[s+2]<<4)&65535},n.saved=0,n.F._writeBlock=function(o,s,i,a,c,u,l,f,d){var h,m,p,g,y,O,x,w,_,S=n.F.U,I=n.F._putsF,v=n.F._putsE;S.lhst[256]++,m=(h=n.F.getTrees())[0],p=h[1],g=h[2],y=h[3],O=h[4],x=h[5],w=h[6],_=h[7];var E=32+((d+3&7)==0?0:8-(d+3&7))+(l<<3),P=a+n.F.contSize(S.fltree,S.lhst)+n.F.contSize(S.fdtree,S.dhst),A=a+n.F.contSize(S.ltree,S.lhst)+n.F.contSize(S.dtree,S.dhst);A+=14+3*x+n.F.contSize(S.itree,S.ihst)+(2*S.ihst[16]+3*S.ihst[17]+7*S.ihst[18]);for(var M=0;M<286;M++)S.lhst[M]=0;for(M=0;M<30;M++)S.dhst[M]=0;for(M=0;M<19;M++)S.ihst[M]=0;var F=E<P&&E<A?0:P<A?1:2;if(I(f,d,o),I(f,d+1,F),d+=3,F==0){for(;(7&d)!=0;)d++;d=n.F._copyExact(c,u,l,f,d)}else{var N,W;if(F==1&&(N=S.fltree,W=S.fdtree),F==2){n.F.makeCodes(S.ltree,m),n.F.revCodes(S.ltree,m),n.F.makeCodes(S.dtree,p),n.F.revCodes(S.dtree,p),n.F.makeCodes(S.itree,g),n.F.revCodes(S.itree,g),N=S.ltree,W=S.dtree,v(f,d,y-257),v(f,d+=5,O-1),v(f,d+=5,x-4),d+=4;for(var C=0;C<x;C++)v(f,d+3*C,S.itree[1+(S.ordr[C]<<1)]);d+=3*x,d=n.F._codeTiny(w,S.itree,f,d),d=n.F._codeTiny(_,S.itree,f,d)}for(var k=u,Y=0;Y<i;Y+=2){for(var $=s[Y],D=$>>>23,V=k+(8388607&$);k<V;)d=n.F._writeLit(c[k++],N,f,d);if(D!=0){var Z=s[Y+1],G=Z>>16,B=Z>>8&255,L=255&Z;v(f,d=n.F._writeLit(257+B,N,f,d),D-S.of0[B]),d+=S.exb[B],I(f,d=n.F._writeLit(L,W,f,d),G-S.df0[L]),d+=S.dxb[L],k+=D}}d=n.F._writeLit(256,N,f,d)}return d},n.F._copyExact=function(o,s,i,a,c){var u=c>>>3;return a[u]=i,a[u+1]=i>>>8,a[u+2]=255-a[u],a[u+3]=255-a[u+1],u+=4,a.set(new Uint8Array(o.buffer,s,i),u),c+(i+4<<3)},n.F.getTrees=function(){for(var o=n.F.U,s=n.F._hufTree(o.lhst,o.ltree,15),i=n.F._hufTree(o.dhst,o.dtree,15),a=[],c=n.F._lenCodes(o.ltree,a),u=[],l=n.F._lenCodes(o.dtree,u),f=0;f<a.length;f+=2)o.ihst[a[f]]++;for(f=0;f<u.length;f+=2)o.ihst[u[f]]++;for(var d=n.F._hufTree(o.ihst,o.itree,7),h=19;h>4&&o.itree[1+(o.ordr[h-1]<<1)]==0;)h--;return[s,i,d,c,l,h,a,u]},n.F.getSecond=function(o){for(var s=[],i=0;i<o.length;i+=2)s.push(o[i+1]);return s},n.F.nonZero=function(o){for(var s="",i=0;i<o.length;i+=2)o[i+1]!=0&&(s+=(i>>1)+",");return s},n.F.contSize=function(o,s){for(var i=0,a=0;a<s.length;a++)i+=s[a]*o[1+(a<<1)];return i},n.F._codeTiny=function(o,s,i,a){for(var c=0;c<o.length;c+=2){var u=o[c],l=o[c+1];a=n.F._writeLit(u,s,i,a);var f=u==16?2:u==17?3:7;u>15&&(n.F._putsE(i,a,l,f),a+=f)}return a},n.F._lenCodes=function(o,s){for(var i=o.length;i!=2&&o[i-1]==0;)i-=2;for(var a=0;a<i;a+=2){var c=o[a+1],u=a+3<i?o[a+3]:-1,l=a+5<i?o[a+5]:-1,f=a==0?-1:o[a-1];if(c==0&&u==c&&l==c){for(var d=a+5;d+2<i&&o[d+2]==c;)d+=2;(h=Math.min(d+1-a>>>1,138))<11?s.push(17,h-3):s.push(18,h-11),a+=2*h-2}else if(c==f&&u==c&&l==c){for(d=a+5;d+2<i&&o[d+2]==c;)d+=2;var h=Math.min(d+1-a>>>1,6);s.push(16,h-3),a+=2*h-2}else s.push(c,0)}return i>>>1},n.F._hufTree=function(o,s,i){var a=[],c=o.length,u=s.length,l=0;for(l=0;l<u;l+=2)s[l]=0,s[l+1]=0;for(l=0;l<c;l++)o[l]!=0&&a.push({lit:l,f:o[l]});var f=a.length,d=a.slice(0);if(f==0)return 0;if(f==1){var h=a[0].lit;return d=h==0?1:0,s[1+(h<<1)]=1,s[1+(d<<1)]=1,1}a.sort((function(w,_){return w.f-_.f}));var m=a[0],p=a[1],g=0,y=1,O=2;for(a[0]={lit:-1,f:m.f+p.f,l:m,r:p,d:0};y!=f-1;)m=g!=y&&(O==f||a[g].f<a[O].f)?a[g++]:a[O++],p=g!=y&&(O==f||a[g].f<a[O].f)?a[g++]:a[O++],a[y++]={lit:-1,f:m.f+p.f,l:m,r:p};var x=n.F.setDepth(a[y-1],0);for(x>i&&(n.F.restrictDepth(d,i,x),x=i),l=0;l<f;l++)s[1+(d[l].lit<<1)]=d[l].d;return x},n.F.setDepth=function(o,s){return o.lit!=-1?(o.d=s,s):Math.max(n.F.setDepth(o.l,s+1),n.F.setDepth(o.r,s+1))},n.F.restrictDepth=function(o,s,i){var a=0,c=1<<i-s,u=0;for(o.sort((function(f,d){return d.d==f.d?f.f-d.f:d.d-f.d})),a=0;a<o.length&&o[a].d>s;a++){var l=o[a].d;o[a].d=s,u+=c-(1<<i-l)}for(u>>>=i-s;u>0;)(l=o[a].d)<s?(o[a].d++,u-=1<<s-l-1):a++;for(;a>=0;a--)o[a].d==s&&u<0&&(o[a].d--,u++);u!=0&&console.log("debt left")},n.F._goodIndex=function(o,s){var i=0;return s[16|i]<=o&&(i|=16),s[8|i]<=o&&(i|=8),s[4|i]<=o&&(i|=4),s[2|i]<=o&&(i|=2),s[1|i]<=o&&(i|=1),i},n.F._writeLit=function(o,s,i,a){return n.F._putsF(i,a,s[o<<1]),a+s[1+(o<<1)]},n.F.inflate=function(o,s){var i=Uint8Array;if(o[0]==3&&o[1]==0)return s||new i(0);var a=n.F,c=a._bitsF,u=a._bitsE,l=a._decodeTiny,f=a.makeCodes,d=a.codes2map,h=a._get17,m=a.U,p=s==null;p&&(s=new i(o.length>>>2<<3));for(var g,y,O=0,x=0,w=0,_=0,S=0,I=0,v=0,E=0,P=0;O==0;)if(O=c(o,P,1),x=c(o,P+1,2),P+=3,x!=0){if(p&&(s=n.F._check(s,E+(1<<17))),x==1&&(g=m.flmap,y=m.fdmap,I=511,v=31),x==2){w=u(o,P,5)+257,_=u(o,P+5,5)+1,S=u(o,P+10,4)+4,P+=14;for(var A=0;A<38;A+=2)m.itree[A]=0,m.itree[A+1]=0;var M=1;for(A=0;A<S;A++){var F=u(o,P+3*A,3);m.itree[1+(m.ordr[A]<<1)]=F,F>M&&(M=F)}P+=3*S,f(m.itree,M),d(m.itree,M,m.imap),g=m.lmap,y=m.dmap,P=l(m.imap,(1<<M)-1,w+_,o,P,m.ttree);var N=a._copyOut(m.ttree,0,w,m.ltree);I=(1<<N)-1;var W=a._copyOut(m.ttree,w,_,m.dtree);v=(1<<W)-1,f(m.ltree,N),d(m.ltree,N,g),f(m.dtree,W),d(m.dtree,W,y)}for(;;){var C=g[h(o,P)&I];P+=15&C;var k=C>>>4;if(!(k>>>8))s[E++]=k;else{if(k==256)break;var Y=E+k-254;if(k>264){var $=m.ldef[k-257];Y=E+($>>>3)+u(o,P,7&$),P+=7&$}var D=y[h(o,P)&v];P+=15&D;var V=D>>>4,Z=m.ddef[V],G=(Z>>>4)+c(o,P,15&Z);for(P+=15&Z,p&&(s=n.F._check(s,E+(1<<17)));E<Y;)s[E]=s[E++-G],s[E]=s[E++-G],s[E]=s[E++-G],s[E]=s[E++-G];E=Y}}}else{(7&P)!=0&&(P+=8-(7&P));var B=4+(P>>>3),L=o[B-4]|o[B-3]<<8;p&&(s=n.F._check(s,E+L)),s.set(new i(o.buffer,o.byteOffset+B,L),E),P=B+L<<3,E+=L}return s.length==E?s:s.slice(0,E)},n.F._check=function(o,s){var i=o.length;if(s<=i)return o;var a=new Uint8Array(Math.max(i<<1,s));return a.set(o,0),a},n.F._decodeTiny=function(o,s,i,a,c,u){for(var l=n.F._bitsE,f=n.F._get17,d=0;d<i;){var h=o[f(a,c)&s];c+=15&h;var m=h>>>4;if(m<=15)u[d]=m,d++;else{var p=0,g=0;m==16?(g=3+l(a,c,2),c+=2,p=u[d-1]):m==17?(g=3+l(a,c,3),c+=3):m==18&&(g=11+l(a,c,7),c+=7);for(var y=d+g;d<y;)u[d]=p,d++}}return c},n.F._copyOut=function(o,s,i,a){for(var c=0,u=0,l=a.length>>>1;u<i;){var f=o[u+s];a[u<<1]=0,a[1+(u<<1)]=f,f>c&&(c=f),u++}for(;u<l;)a[u<<1]=0,a[1+(u<<1)]=0,u++;return c},n.F.makeCodes=function(o,s){for(var i,a,c,u,l=n.F.U,f=o.length,d=l.bl_count,h=0;h<=s;h++)d[h]=0;for(h=1;h<f;h+=2)d[o[h]]++;var m=l.next_code;for(i=0,d[0]=0,a=1;a<=s;a++)i=i+d[a-1]<<1,m[a]=i;for(c=0;c<f;c+=2)(u=o[c+1])!=0&&(o[c]=m[u],m[u]++)},n.F.codes2map=function(o,s,i){for(var a=o.length,c=n.F.U.rev15,u=0;u<a;u+=2)if(o[u+1]!=0)for(var l=u>>1,f=o[u+1],d=l<<4|f,h=s-f,m=o[u]<<h,p=m+(1<<h);m!=p;)i[c[m]>>>15-s]=d,m++},n.F.revCodes=function(o,s){for(var i=n.F.U.rev15,a=15-s,c=0;c<o.length;c+=2){var u=o[c]<<s-o[c+1];o[c]=i[u]>>>a}},n.F._putsE=function(o,s,i){i<<=7&s;var a=s>>>3;o[a]|=i,o[a+1]|=i>>>8},n.F._putsF=function(o,s,i){i<<=7&s;var a=s>>>3;o[a]|=i,o[a+1]|=i>>>8,o[a+2]|=i>>>16},n.F._bitsE=function(o,s,i){return(o[s>>>3]|o[1+(s>>>3)]<<8)>>>(7&s)&(1<<i)-1},n.F._bitsF=function(o,s,i){return(o[s>>>3]|o[1+(s>>>3)]<<8|o[2+(s>>>3)]<<16)>>>(7&s)&(1<<i)-1},n.F._get17=function(o,s){return(o[s>>>3]|o[1+(s>>>3)]<<8|o[2+(s>>>3)]<<16)>>>(7&s)},n.F._get25=function(o,s){return(o[s>>>3]|o[1+(s>>>3)]<<8|o[2+(s>>>3)]<<16|o[3+(s>>>3)]<<24)>>>(7&s)},n.F.U=(t=Uint16Array,r=Uint32Array,{next_code:new t(16),bl_count:new t(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new t(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new r(32),flmap:new t(512),fltree:[],fdmap:new t(32),fdtree:[],lmap:new t(32768),ltree:[],ttree:[],dmap:new t(32768),dtree:[],imap:new t(512),itree:[],rev15:new t(32768),lhst:new r(286),dhst:new r(30),ihst:new r(19),lits:new r(15e3),strt:new t(65536),prev:new t(32768)}),(function(){for(var o=n.F.U,s=0;s<32768;s++){var i=s;i=(4278255360&(i=(4042322160&(i=(3435973836&(i=(2863311530&i)>>>1|(1431655765&i)<<1))>>>2|(858993459&i)<<2))>>>4|(252645135&i)<<4))>>>8|(16711935&i)<<8,o.rev15[s]=(i>>>16|i<<16)>>>17}function a(c,u,l){for(;u--!=0;)c.push(0,l)}for(s=0;s<32;s++)o.ldef[s]=o.of0[s]<<3|o.exb[s],o.ddef[s]=o.df0[s]<<4|o.dxb[s];a(o.fltree,144,8),a(o.fltree,112,9),a(o.fltree,24,7),a(o.fltree,8,8),n.F.makeCodes(o.fltree,9),n.F.codes2map(o.fltree,9,o.flmap),n.F.revCodes(o.fltree,9),a(o.fdtree,32,5),n.F.makeCodes(o.fdtree,5),n.F.codes2map(o.fdtree,5,o.fdmap),n.F.revCodes(o.fdtree,5),a(o.itree,19,0),a(o.ltree,286,0),a(o.dtree,30,0),a(o.ttree,320,0)})()})();var _P=vP({__proto__:null,default:zi},[zi]);const yr=(function(){var e={nextZero(l,f){for(;l[f]!=0;)f++;return f},readUshort:(l,f)=>l[f]<<8|l[f+1],writeUshort(l,f,d){l[f]=d>>8&255,l[f+1]=255&d},readUint:(l,f)=>16777216*l[f]+(l[f+1]<<16|l[f+2]<<8|l[f+3]),writeUint(l,f,d){l[f]=d>>24&255,l[f+1]=d>>16&255,l[f+2]=d>>8&255,l[f+3]=255&d},readASCII(l,f,d){let h="";for(let m=0;m<d;m++)h+=String.fromCharCode(l[f+m]);return h},writeASCII(l,f,d){for(let h=0;h<d.length;h++)l[f+h]=d.charCodeAt(h)},readBytes(l,f,d){const h=[];for(let m=0;m<d;m++)h.push(l[f+m]);return h},pad:l=>l.length<2?`0${l}`:l,readUTF8(l,f,d){let h,m="";for(let p=0;p<d;p++)m+=`%${e.pad(l[f+p].toString(16))}`;try{h=decodeURIComponent(m)}catch{return e.readASCII(l,f,d)}return h}};function t(l,f,d,h){const m=f*d,p=s(h),g=Math.ceil(f*p/8),y=new Uint8Array(4*m),O=new Uint32Array(y.buffer),{ctype:x}=h,{depth:w}=h,_=e.readUshort;if(x==6){const $=m<<2;if(w==8)for(var S=0;S<$;S+=4)y[S]=l[S],y[S+1]=l[S+1],y[S+2]=l[S+2],y[S+3]=l[S+3];if(w==16)for(S=0;S<$;S++)y[S]=l[S<<1]}else if(x==2){const $=h.tabs.tRNS;if($==null){if(w==8)for(S=0;S<m;S++){var I=3*S;O[S]=255<<24|l[I+2]<<16|l[I+1]<<8|l[I]}if(w==16)for(S=0;S<m;S++)I=6*S,O[S]=255<<24|l[I+4]<<16|l[I+2]<<8|l[I]}else{var v=$[0];const D=$[1],V=$[2];if(w==8)for(S=0;S<m;S++){var E=S<<2;I=3*S,O[S]=255<<24|l[I+2]<<16|l[I+1]<<8|l[I],l[I]==v&&l[I+1]==D&&l[I+2]==V&&(y[E+3]=0)}if(w==16)for(S=0;S<m;S++)E=S<<2,I=6*S,O[S]=255<<24|l[I+4]<<16|l[I+2]<<8|l[I],_(l,I)==v&&_(l,I+2)==D&&_(l,I+4)==V&&(y[E+3]=0)}}else if(x==3){const $=h.tabs.PLTE,D=h.tabs.tRNS,V=D?D.length:0;if(w==1)for(var P=0;P<d;P++){var A=P*g,M=P*f;for(S=0;S<f;S++){E=M+S<<2;var F=3*(N=l[A+(S>>3)]>>7-((7&S)<<0)&1);y[E]=$[F],y[E+1]=$[F+1],y[E+2]=$[F+2],y[E+3]=N<V?D[N]:255}}if(w==2)for(P=0;P<d;P++)for(A=P*g,M=P*f,S=0;S<f;S++)E=M+S<<2,F=3*(N=l[A+(S>>2)]>>6-((3&S)<<1)&3),y[E]=$[F],y[E+1]=$[F+1],y[E+2]=$[F+2],y[E+3]=N<V?D[N]:255;if(w==4)for(P=0;P<d;P++)for(A=P*g,M=P*f,S=0;S<f;S++)E=M+S<<2,F=3*(N=l[A+(S>>1)]>>4-((1&S)<<2)&15),y[E]=$[F],y[E+1]=$[F+1],y[E+2]=$[F+2],y[E+3]=N<V?D[N]:255;if(w==8)for(S=0;S<m;S++){var N;E=S<<2,F=3*(N=l[S]),y[E]=$[F],y[E+1]=$[F+1],y[E+2]=$[F+2],y[E+3]=N<V?D[N]:255}}else if(x==4){if(w==8)for(S=0;S<m;S++){E=S<<2;var W=l[C=S<<1];y[E]=W,y[E+1]=W,y[E+2]=W,y[E+3]=l[C+1]}if(w==16)for(S=0;S<m;S++){var C;E=S<<2,W=l[C=S<<2],y[E]=W,y[E+1]=W,y[E+2]=W,y[E+3]=l[C+2]}}else if(x==0)for(v=h.tabs.tRNS?h.tabs.tRNS:-1,P=0;P<d;P++){const $=P*g,D=P*f;if(w==1)for(var k=0;k<f;k++){var Y=(W=255*(l[$+(k>>>3)]>>>7-(7&k)&1))==255*v?0:255;O[D+k]=Y<<24|W<<16|W<<8|W}else if(w==2)for(k=0;k<f;k++)Y=(W=85*(l[$+(k>>>2)]>>>6-((3&k)<<1)&3))==85*v?0:255,O[D+k]=Y<<24|W<<16|W<<8|W;else if(w==4)for(k=0;k<f;k++)Y=(W=17*(l[$+(k>>>1)]>>>4-((1&k)<<2)&15))==17*v?0:255,O[D+k]=Y<<24|W<<16|W<<8|W;else if(w==8)for(k=0;k<f;k++)Y=(W=l[$+k])==v?0:255,O[D+k]=Y<<24|W<<16|W<<8|W;else if(w==16)for(k=0;k<f;k++)W=l[$+(k<<1)],Y=_(l,$+(k<<1))==v?0:255,O[D+k]=Y<<24|W<<16|W<<8|W}return y}function r(l,f,d,h){const m=s(l),p=Math.ceil(d*m/8),g=new Uint8Array((p+1+l.interlace)*h);return f=l.tabs.CgBI?o(f,g):n(f,g),l.interlace==0?f=i(f,l,0,d,h):l.interlace==1&&(f=(function(O,x){const w=x.width,_=x.height,S=s(x),I=S>>3,v=Math.ceil(w*S/8),E=new Uint8Array(_*v);let P=0;const A=[0,0,4,0,2,0,1],M=[0,4,0,2,0,1,0],F=[8,8,8,4,4,2,2],N=[8,8,4,4,2,2,1];let W=0;for(;W<7;){const k=F[W],Y=N[W];let $=0,D=0,V=A[W];for(;V<_;)V+=k,D++;let Z=M[W];for(;Z<w;)Z+=Y,$++;const G=Math.ceil($*S/8);i(O,x,P,$,D);let B=0,L=A[W];for(;L<_;){let J=M[W],q=P+B*G<<3;for(;J<w;){var C;if(S==1&&(C=(C=O[q>>3])>>7-(7&q)&1,E[L*v+(J>>3)]|=C<<7-((7&J)<<0)),S==2&&(C=(C=O[q>>3])>>6-(7&q)&3,E[L*v+(J>>2)]|=C<<6-((3&J)<<1)),S==4&&(C=(C=O[q>>3])>>4-(7&q)&15,E[L*v+(J>>1)]|=C<<4-((1&J)<<2)),S>=8){const oe=L*v+J*I;for(let Q=0;Q<I;Q++)E[oe+Q]=O[(q>>3)+Q]}q+=S,J+=Y}B++,L+=k}$*D!=0&&(P+=D*(1+G)),W+=1}return E})(f,l)),f}function n(l,f){return o(new Uint8Array(l.buffer,2,l.length-6),f)}var o=(function(){const l={H:{}};return l.H.N=function(f,d){const h=Uint8Array;let m,p,g=0,y=0,O=0,x=0,w=0,_=0,S=0,I=0,v=0;if(f[0]==3&&f[1]==0)return d||new h(0);const E=l.H,P=E.b,A=E.e,M=E.R,F=E.n,N=E.A,W=E.Z,C=E.m,k=d==null;for(k&&(d=new h(f.length>>>2<<5));g==0;)if(g=P(f,v,1),y=P(f,v+1,2),v+=3,y!=0){if(k&&(d=l.H.W(d,I+(1<<17))),y==1&&(m=C.J,p=C.h,_=511,S=31),y==2){O=A(f,v,5)+257,x=A(f,v+5,5)+1,w=A(f,v+10,4)+4,v+=14;let $=1;for(var Y=0;Y<38;Y+=2)C.Q[Y]=0,C.Q[Y+1]=0;for(Y=0;Y<w;Y++){const Z=A(f,v+3*Y,3);C.Q[1+(C.X[Y]<<1)]=Z,Z>$&&($=Z)}v+=3*w,F(C.Q,$),N(C.Q,$,C.u),m=C.w,p=C.d,v=M(C.u,(1<<$)-1,O+x,f,v,C.v);const D=E.V(C.v,0,O,C.C);_=(1<<D)-1;const V=E.V(C.v,O,x,C.D);S=(1<<V)-1,F(C.C,D),N(C.C,D,m),F(C.D,V),N(C.D,V,p)}for(;;){const $=m[W(f,v)&_];v+=15&$;const D=$>>>4;if(!(D>>>8))d[I++]=D;else{if(D==256)break;{let V=I+D-254;if(D>264){const J=C.q[D-257];V=I+(J>>>3)+A(f,v,7&J),v+=7&J}const Z=p[W(f,v)&S];v+=15&Z;const G=Z>>>4,B=C.c[G],L=(B>>>4)+P(f,v,15&B);for(v+=15&B;I<V;)d[I]=d[I++-L],d[I]=d[I++-L],d[I]=d[I++-L],d[I]=d[I++-L];I=V}}}}else{(7&v)!=0&&(v+=8-(7&v));const $=4+(v>>>3),D=f[$-4]|f[$-3]<<8;k&&(d=l.H.W(d,I+D)),d.set(new h(f.buffer,f.byteOffset+$,D),I),v=$+D<<3,I+=D}return d.length==I?d:d.slice(0,I)},l.H.W=function(f,d){const h=f.length;if(d<=h)return f;const m=new Uint8Array(h<<1);return m.set(f,0),m},l.H.R=function(f,d,h,m,p,g){const y=l.H.e,O=l.H.Z;let x=0;for(;x<h;){const w=f[O(m,p)&d];p+=15&w;const _=w>>>4;if(_<=15)g[x]=_,x++;else{let S=0,I=0;_==16?(I=3+y(m,p,2),p+=2,S=g[x-1]):_==17?(I=3+y(m,p,3),p+=3):_==18&&(I=11+y(m,p,7),p+=7);const v=x+I;for(;x<v;)g[x]=S,x++}}return p},l.H.V=function(f,d,h,m){let p=0,g=0;const y=m.length>>>1;for(;g<h;){const O=f[g+d];m[g<<1]=0,m[1+(g<<1)]=O,O>p&&(p=O),g++}for(;g<y;)m[g<<1]=0,m[1+(g<<1)]=0,g++;return p},l.H.n=function(f,d){const h=l.H.m,m=f.length;let p,g,y,O;const x=h.j;for(var w=0;w<=d;w++)x[w]=0;for(w=1;w<m;w+=2)x[f[w]]++;const _=h.K;for(p=0,x[0]=0,g=1;g<=d;g++)p=p+x[g-1]<<1,_[g]=p;for(y=0;y<m;y+=2)O=f[y+1],O!=0&&(f[y]=_[O],_[O]++)},l.H.A=function(f,d,h){const m=f.length,p=l.H.m.r;for(let g=0;g<m;g+=2)if(f[g+1]!=0){const y=g>>1,O=f[g+1],x=y<<4|O,w=d-O;let _=f[g]<<w;const S=_+(1<<w);for(;_!=S;)h[p[_]>>>15-d]=x,_++}},l.H.l=function(f,d){const h=l.H.m.r,m=15-d;for(let p=0;p<f.length;p+=2){const g=f[p]<<d-f[p+1];f[p]=h[g]>>>m}},l.H.M=function(f,d,h){h<<=7&d;const m=d>>>3;f[m]|=h,f[m+1]|=h>>>8},l.H.I=function(f,d,h){h<<=7&d;const m=d>>>3;f[m]|=h,f[m+1]|=h>>>8,f[m+2]|=h>>>16},l.H.e=function(f,d,h){return(f[d>>>3]|f[1+(d>>>3)]<<8)>>>(7&d)&(1<<h)-1},l.H.b=function(f,d,h){return(f[d>>>3]|f[1+(d>>>3)]<<8|f[2+(d>>>3)]<<16)>>>(7&d)&(1<<h)-1},l.H.Z=function(f,d){return(f[d>>>3]|f[1+(d>>>3)]<<8|f[2+(d>>>3)]<<16)>>>(7&d)},l.H.i=function(f,d){return(f[d>>>3]|f[1+(d>>>3)]<<8|f[2+(d>>>3)]<<16|f[3+(d>>>3)]<<24)>>>(7&d)},l.H.m=(function(){const f=Uint16Array,d=Uint32Array;return{K:new f(16),j:new f(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new f(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new d(32),J:new f(512),_:[],h:new f(32),$:[],w:new f(32768),C:[],v:[],d:new f(32768),D:[],u:new f(512),Q:[],r:new f(32768),s:new d(286),Y:new d(30),a:new d(19),t:new d(15e3),k:new f(65536),g:new f(32768)}})(),(function(){const f=l.H.m;for(var d=0;d<32768;d++){let m=d;m=(2863311530&m)>>>1|(1431655765&m)<<1,m=(3435973836&m)>>>2|(858993459&m)<<2,m=(4042322160&m)>>>4|(252645135&m)<<4,m=(4278255360&m)>>>8|(16711935&m)<<8,f.r[d]=(m>>>16|m<<16)>>>17}function h(m,p,g){for(;p--!=0;)m.push(0,g)}for(d=0;d<32;d++)f.q[d]=f.S[d]<<3|f.T[d],f.c[d]=f.p[d]<<4|f.z[d];h(f._,144,8),h(f._,112,9),h(f._,24,7),h(f._,8,8),l.H.n(f._,9),l.H.A(f._,9,f.J),l.H.l(f._,9),h(f.$,32,5),l.H.n(f.$,5),l.H.A(f.$,5,f.h),l.H.l(f.$,5),h(f.Q,19,0),h(f.C,286,0),h(f.D,30,0),h(f.v,320,0)})(),l.H.N})();function s(l){return[1,null,3,1,2,null,4][l.ctype]*l.depth}function i(l,f,d,h,m){let p=s(f);const g=Math.ceil(h*p/8);let y,O;p=Math.ceil(p/8);let x=l[d],w=0;if(x>1&&(l[d]=[0,0,1][x-2]),x==3)for(w=p;w<g;w++)l[w+1]=l[w+1]+(l[w+1-p]>>>1)&255;for(let _=0;_<m;_++)if(y=d+_*g,O=y+_+1,x=l[O-1],w=0,x==0)for(;w<g;w++)l[y+w]=l[O+w];else if(x==1){for(;w<p;w++)l[y+w]=l[O+w];for(;w<g;w++)l[y+w]=l[O+w]+l[y+w-p]}else if(x==2)for(;w<g;w++)l[y+w]=l[O+w]+l[y+w-g];else if(x==3){for(;w<p;w++)l[y+w]=l[O+w]+(l[y+w-g]>>>1);for(;w<g;w++)l[y+w]=l[O+w]+(l[y+w-g]+l[y+w-p]>>>1)}else{for(;w<p;w++)l[y+w]=l[O+w]+a(0,l[y+w-g],0);for(;w<g;w++)l[y+w]=l[O+w]+a(l[y+w-p],l[y+w-g],l[y+w-p-g])}return l}function a(l,f,d){const h=l+f-d,m=h-l,p=h-f,g=h-d;return m*m<=p*p&&m*m<=g*g?l:p*p<=g*g?f:d}function c(l,f,d){d.width=e.readUint(l,f),f+=4,d.height=e.readUint(l,f),f+=4,d.depth=l[f],f++,d.ctype=l[f],f++,d.compress=l[f],f++,d.filter=l[f],f++,d.interlace=l[f],f++}function u(l,f,d,h,m,p,g,y,O){const x=Math.min(f,m),w=Math.min(d,p);let _=0,S=0;for(let W=0;W<w;W++)for(let C=0;C<x;C++)if(g>=0&&y>=0?(_=W*f+C<<2,S=(y+W)*m+g+C<<2):(_=(-y+W)*f-g+C<<2,S=W*m+C<<2),O==0)h[S]=l[_],h[S+1]=l[_+1],h[S+2]=l[_+2],h[S+3]=l[_+3];else if(O==1){var I=l[_+3]*.00392156862745098,v=l[_]*I,E=l[_+1]*I,P=l[_+2]*I,A=h[S+3]*(1/255),M=h[S]*A,F=h[S+1]*A,N=h[S+2]*A;const k=1-I,Y=I+A*k,$=Y==0?0:1/Y;h[S+3]=255*Y,h[S+0]=(v+M*k)*$,h[S+1]=(E+F*k)*$,h[S+2]=(P+N*k)*$}else if(O==2)I=l[_+3],v=l[_],E=l[_+1],P=l[_+2],A=h[S+3],M=h[S],F=h[S+1],N=h[S+2],I==A&&v==M&&E==F&&P==N?(h[S]=0,h[S+1]=0,h[S+2]=0,h[S+3]=0):(h[S]=v,h[S+1]=E,h[S+2]=P,h[S+3]=I);else if(O==3){if(I=l[_+3],v=l[_],E=l[_+1],P=l[_+2],A=h[S+3],M=h[S],F=h[S+1],N=h[S+2],I==A&&v==M&&E==F&&P==N)continue;if(I<220&&A>20)return!1}return!0}return{decode:function(f){const d=new Uint8Array(f);let h=8;const m=e,p=m.readUshort,g=m.readUint,y={tabs:{},frames:[]},O=new Uint8Array(d.length);let x,w=0,_=0;const S=[137,80,78,71,13,10,26,10];for(var I=0;I<8;I++)if(d[I]!=S[I])throw"The input is not a PNG file!";for(;h<d.length;){const W=m.readUint(d,h);h+=4;const C=m.readASCII(d,h,4);if(h+=4,C=="IHDR")c(d,h,y);else if(C=="iCCP"){for(var v=h;d[v]!=0;)v++;m.readASCII(d,h,v-h),d[v+1];const k=d.slice(v+2,h+W);let Y=null;try{Y=n(k)}catch{Y=o(k)}y.tabs[C]=Y}else if(C=="CgBI")y.tabs[C]=d.slice(h,h+4);else if(C=="IDAT"){for(I=0;I<W;I++)O[w+I]=d[h+I];w+=W}else if(C=="acTL")y.tabs[C]={num_frames:g(d,h),num_plays:g(d,h+4)},x=new Uint8Array(d.length);else if(C=="fcTL"){_!=0&&((N=y.frames[y.frames.length-1]).data=r(y,x.slice(0,_),N.rect.width,N.rect.height),_=0);const k={x:g(d,h+12),y:g(d,h+16),width:g(d,h+4),height:g(d,h+8)};let Y=p(d,h+22);Y=p(d,h+20)/(Y==0?100:Y);const $={rect:k,delay:Math.round(1e3*Y),dispose:d[h+24],blend:d[h+25]};y.frames.push($)}else if(C=="fdAT"){for(I=0;I<W-4;I++)x[_+I]=d[h+I+4];_+=W-4}else if(C=="pHYs")y.tabs[C]=[m.readUint(d,h),m.readUint(d,h+4),d[h+8]];else if(C=="cHRM")for(y.tabs[C]=[],I=0;I<8;I++)y.tabs[C].push(m.readUint(d,h+4*I));else if(C=="tEXt"||C=="zTXt"){y.tabs[C]==null&&(y.tabs[C]={});var E=m.nextZero(d,h),P=m.readASCII(d,h,E-h),A=h+W-E-1;if(C=="tEXt")F=m.readASCII(d,E+1,A);else{var M=n(d.slice(E+2,E+2+A));F=m.readUTF8(M,0,M.length)}y.tabs[C][P]=F}else if(C=="iTXt"){y.tabs[C]==null&&(y.tabs[C]={}),E=0,v=h,E=m.nextZero(d,v),P=m.readASCII(d,v,E-v);const k=d[v=E+1];var F;d[v+1],v+=2,E=m.nextZero(d,v),m.readASCII(d,v,E-v),v=E+1,E=m.nextZero(d,v),m.readUTF8(d,v,E-v),A=W-((v=E+1)-h),k==0?F=m.readUTF8(d,v,A):(M=n(d.slice(v,v+A)),F=m.readUTF8(M,0,M.length)),y.tabs[C][P]=F}else if(C=="PLTE")y.tabs[C]=m.readBytes(d,h,W);else if(C=="hIST"){const k=y.tabs.PLTE.length/3;for(y.tabs[C]=[],I=0;I<k;I++)y.tabs[C].push(p(d,h+2*I))}else if(C=="tRNS")y.ctype==3?y.tabs[C]=m.readBytes(d,h,W):y.ctype==0?y.tabs[C]=p(d,h):y.ctype==2&&(y.tabs[C]=[p(d,h),p(d,h+2),p(d,h+4)]);else if(C=="gAMA")y.tabs[C]=m.readUint(d,h)/1e5;else if(C=="sRGB")y.tabs[C]=d[h];else if(C=="bKGD")y.ctype==0||y.ctype==4?y.tabs[C]=[p(d,h)]:y.ctype==2||y.ctype==6?y.tabs[C]=[p(d,h),p(d,h+2),p(d,h+4)]:y.ctype==3&&(y.tabs[C]=d[h]);else if(C=="IEND")break;h+=W,m.readUint(d,h),h+=4}var N;return _!=0&&((N=y.frames[y.frames.length-1]).data=r(y,x.slice(0,_),N.rect.width,N.rect.height)),y.data=r(y,O,y.width,y.height),delete y.compress,delete y.interlace,delete y.filter,y},toRGBA8:function(f){const d=f.width,h=f.height;if(f.tabs.acTL==null)return[t(f.data,d,h,f).buffer];const m=[];f.frames[0].data==null&&(f.frames[0].data=f.data);const p=d*h*4,g=new Uint8Array(p),y=new Uint8Array(p),O=new Uint8Array(p);for(let w=0;w<f.frames.length;w++){const _=f.frames[w],S=_.rect.x,I=_.rect.y,v=_.rect.width,E=_.rect.height,P=t(_.data,v,E,f);if(w!=0)for(var x=0;x<p;x++)O[x]=g[x];if(_.blend==0?u(P,v,E,g,d,h,S,I,0):_.blend==1&&u(P,v,E,g,d,h,S,I,1),m.push(g.buffer.slice(0)),_.dispose!=0){if(_.dispose==1)u(y,v,E,g,d,h,S,I,0);else if(_.dispose==2)for(x=0;x<p;x++)g[x]=O[x]}}return m},_paeth:a,_copyTile:u,_bin:e}})();(function(){const{_copyTile:e}=yr,{_bin:t}=yr,r=yr._paeth;var n={table:(function(){const v=new Uint32Array(256);for(let E=0;E<256;E++){let P=E;for(let A=0;A<8;A++)1&P?P=3988292384^P>>>1:P>>>=1;v[E]=P}return v})(),update(v,E,P,A){for(let M=0;M<A;M++)v=n.table[255&(v^E[P+M])]^v>>>8;return v},crc:(v,E,P)=>4294967295^n.update(4294967295,v,E,P)};function o(v,E,P,A){E[P]+=v[0]*A>>4,E[P+1]+=v[1]*A>>4,E[P+2]+=v[2]*A>>4,E[P+3]+=v[3]*A>>4}function s(v){return Math.max(0,Math.min(255,v))}function i(v,E){const P=v[0]-E[0],A=v[1]-E[1],M=v[2]-E[2],F=v[3]-E[3];return P*P+A*A+M*M+F*F}function a(v,E,P,A,M,F,N){N==null&&(N=1);const W=A.length,C=[];for(var k=0;k<W;k++){const L=A[k];C.push([L>>>0&255,L>>>8&255,L>>>16&255,L>>>24&255])}for(k=0;k<W;k++){let L=4294967295;for(var Y=0,$=0;$<W;$++){var D=i(C[k],C[$]);$!=k&&D<L&&(L=D,Y=$)}}const V=new Uint32Array(M.buffer),Z=new Int16Array(E*P*4),G=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(k=0;k<G.length;k++)G[k]=255*((G[k]+.5)/16-.5);for(let L=0;L<P;L++)for(let J=0;J<E;J++){var B;k=4*(L*E+J),N!=2?B=[s(v[k]+Z[k]),s(v[k+1]+Z[k+1]),s(v[k+2]+Z[k+2]),s(v[k+3]+Z[k+3])]:(D=G[4*(3&L)+(3&J)],B=[s(v[k]+D),s(v[k+1]+D),s(v[k+2]+D),s(v[k+3]+D)]),Y=0;let q=16777215;for($=0;$<W;$++){const ne=i(B,C[$]);ne<q&&(q=ne,Y=$)}const oe=C[Y],Q=[B[0]-oe[0],B[1]-oe[1],B[2]-oe[2],B[3]-oe[3]];N==1&&(J!=E-1&&o(Q,Z,k+4,7),L!=P-1&&(J!=0&&o(Q,Z,k+4*E-4,3),o(Q,Z,k+4*E,5),J!=E-1&&o(Q,Z,k+4*E+4,1))),F[k>>2]=Y,V[k>>2]=A[Y]}}function c(v,E,P,A,M){M==null&&(M={});const{crc:F}=n,N=t.writeUint,W=t.writeUshort,C=t.writeASCII;let k=8;const Y=v.frames.length>1;let $,D=!1,V=33+(Y?20:0);if(M.sRGB!=null&&(V+=13),M.pHYs!=null&&(V+=21),M.iCCP!=null&&($=pako.deflate(M.iCCP),V+=21+$.length+4),v.ctype==3){for(var Z=v.plte.length,G=0;G<Z;G++)v.plte[G]>>>24!=255&&(D=!0);V+=8+3*Z+4+(D?8+1*Z+4:0)}for(var B=0;B<v.frames.length;B++)Y&&(V+=38),V+=(oe=v.frames[B]).cimg.length+12,B!=0&&(V+=4);V+=12;const L=new Uint8Array(V),J=[137,80,78,71,13,10,26,10];for(G=0;G<8;G++)L[G]=J[G];if(N(L,k,13),k+=4,C(L,k,"IHDR"),k+=4,N(L,k,E),k+=4,N(L,k,P),k+=4,L[k]=v.depth,k++,L[k]=v.ctype,k++,L[k]=0,k++,L[k]=0,k++,L[k]=0,k++,N(L,k,F(L,k-17,17)),k+=4,M.sRGB!=null&&(N(L,k,1),k+=4,C(L,k,"sRGB"),k+=4,L[k]=M.sRGB,k++,N(L,k,F(L,k-5,5)),k+=4),M.iCCP!=null){const Q=13+$.length;N(L,k,Q),k+=4,C(L,k,"iCCP"),k+=4,C(L,k,"ICC profile"),k+=11,k+=2,L.set($,k),k+=$.length,N(L,k,F(L,k-(Q+4),Q+4)),k+=4}if(M.pHYs!=null&&(N(L,k,9),k+=4,C(L,k,"pHYs"),k+=4,N(L,k,M.pHYs[0]),k+=4,N(L,k,M.pHYs[1]),k+=4,L[k]=M.pHYs[2],k++,N(L,k,F(L,k-13,13)),k+=4),Y&&(N(L,k,8),k+=4,C(L,k,"acTL"),k+=4,N(L,k,v.frames.length),k+=4,N(L,k,M.loop!=null?M.loop:0),k+=4,N(L,k,F(L,k-12,12)),k+=4),v.ctype==3){for(N(L,k,3*(Z=v.plte.length)),k+=4,C(L,k,"PLTE"),k+=4,G=0;G<Z;G++){const Q=3*G,ne=v.plte[G],le=255&ne,K=ne>>>8&255,Se=ne>>>16&255;L[k+Q+0]=le,L[k+Q+1]=K,L[k+Q+2]=Se}if(k+=3*Z,N(L,k,F(L,k-3*Z-4,3*Z+4)),k+=4,D){for(N(L,k,Z),k+=4,C(L,k,"tRNS"),k+=4,G=0;G<Z;G++)L[k+G]=v.plte[G]>>>24&255;k+=Z,N(L,k,F(L,k-Z-4,Z+4)),k+=4}}let q=0;for(B=0;B<v.frames.length;B++){var oe=v.frames[B];Y&&(N(L,k,26),k+=4,C(L,k,"fcTL"),k+=4,N(L,k,q++),k+=4,N(L,k,oe.rect.width),k+=4,N(L,k,oe.rect.height),k+=4,N(L,k,oe.rect.x),k+=4,N(L,k,oe.rect.y),k+=4,W(L,k,A[B]),k+=2,W(L,k,1e3),k+=2,L[k]=oe.dispose,k++,L[k]=oe.blend,k++,N(L,k,F(L,k-30,30)),k+=4);const Q=oe.cimg;N(L,k,(Z=Q.length)+(B==0?0:4)),k+=4;const ne=k;C(L,k,B==0?"IDAT":"fdAT"),k+=4,B!=0&&(N(L,k,q++),k+=4),L.set(Q,k),k+=Z,N(L,k,F(L,ne,k-ne)),k+=4}return N(L,k,0),k+=4,C(L,k,"IEND"),k+=4,N(L,k,F(L,k-4,4)),k+=4,L.buffer}function u(v,E,P){for(let A=0;A<v.frames.length;A++){const M=v.frames[A];M.rect.width;const F=M.rect.height,N=new Uint8Array(F*M.bpl+F);M.cimg=h(M.img,F,M.bpp,M.bpl,N,E,P)}}function l(v,E,P,A,M){const F=M[0],N=M[1],W=M[2],C=M[3],k=M[4],Y=M[5];let $=6,D=8,V=255;for(var Z=0;Z<v.length;Z++){const Ge=new Uint8Array(v[Z]);for(var G=Ge.length,B=0;B<G;B+=4)V&=Ge[B+3]}const L=V!=255,J=(function(Re,We,rt,nt,R,j){const H=[];for(var ee=0;ee<Re.length;ee++){const Le=new Uint8Array(Re[ee]),ot=new Uint32Array(Le.buffer);var te;let Qe=0,xt=0,gt=We,dt=rt,jt=nt?1:0;if(ee!=0){const _r=j||nt||ee==1||H[ee-2].dispose!=0?1:2;let Sr=0,_e=1e9;for(let De=0;De<_r;De++){var re=new Uint8Array(Re[ee-1-De]);const ve=new Uint32Array(Re[ee-1-De]);let Oe=We,Je=rt,xe=-1,en=-1;for(let Pt=0;Pt<rt;Pt++)for(let Qt=0;Qt<We;Qt++)ot[be=Pt*We+Qt]!=ve[be]&&(Qt<Oe&&(Oe=Qt),Qt>xe&&(xe=Qt),Pt<Je&&(Je=Pt),Pt>en&&(en=Pt));xe==-1&&(Oe=Je=xe=en=0),R&&((1&Oe)==1&&Oe--,(1&Je)==1&&Je--);const ct=(xe-Oe+1)*(en-Je+1);ct<_e&&(_e=ct,Sr=De,Qe=Oe,xt=Je,gt=xe-Oe+1,dt=en-Je+1)}re=new Uint8Array(Re[ee-1-Sr]),Sr==1&&(H[ee-1].dispose=2),te=new Uint8Array(gt*dt*4),e(re,We,rt,te,gt,dt,-Qe,-xt,0),jt=e(Le,We,rt,te,gt,dt,-Qe,-xt,3)?1:0,jt==1?d(Le,We,rt,te,{x:Qe,y:xt,width:gt,height:dt}):e(Le,We,rt,te,gt,dt,-Qe,-xt,0)}else te=Le.slice(0);H.push({rect:{x:Qe,y:xt,width:gt,height:dt},img:te,blend:jt,dispose:0})}if(nt)for(ee=0;ee<H.length;ee++){if((Ee=H[ee]).blend==1)continue;const Le=Ee.rect,ot=H[ee-1].rect,Qe=Math.min(Le.x,ot.x),xt=Math.min(Le.y,ot.y),gt={x:Qe,y:xt,width:Math.max(Le.x+Le.width,ot.x+ot.width)-Qe,height:Math.max(Le.y+Le.height,ot.y+ot.height)-xt};H[ee-1].dispose=1,ee-1!=0&&f(Re,We,rt,H,ee-1,gt,R),f(Re,We,rt,H,ee,gt,R)}let ue=0;if(Re.length!=1)for(var be=0;be<H.length;be++){var Ee;ue+=(Ee=H[be]).rect.width*Ee.rect.height}return H})(v,E,P,F,N,W),q={},oe=[],Q=[];if(A!=0){const Ge=[];for(B=0;B<J.length;B++)Ge.push(J[B].img.buffer);const Re=(function(R){let j=0;for(var H=0;H<R.length;H++)j+=R[H].byteLength;const ee=new Uint8Array(j);let te=0;for(H=0;H<R.length;H++){const re=new Uint8Array(R[H]),ue=re.length;for(let be=0;be<ue;be+=4){let Ee=re[be],Le=re[be+1],ot=re[be+2];const Qe=re[be+3];Qe==0&&(Ee=Le=ot=0),ee[te+be]=Ee,ee[te+be+1]=Le,ee[te+be+2]=ot,ee[te+be+3]=Qe}te+=ue}return ee.buffer})(Ge),We=p(Re,A);for(B=0;B<We.plte.length;B++)oe.push(We.plte[B].est.rgba);let rt=0;for(B=0;B<J.length;B++){const nt=(le=J[B]).img.length;var ne=new Uint8Array(We.inds.buffer,rt>>2,nt>>2);Q.push(ne);const R=new Uint8Array(We.abuf,rt,nt);Y&&a(le.img,le.rect.width,le.rect.height,oe,R,ne),le.img.set(R),rt+=nt}}else for(Z=0;Z<J.length;Z++){var le=J[Z];const Ge=new Uint32Array(le.img.buffer);var K=le.rect.width;for(G=Ge.length,ne=new Uint8Array(G),Q.push(ne),B=0;B<G;B++){const Re=Ge[B];if(B!=0&&Re==Ge[B-1])ne[B]=ne[B-1];else if(B>K&&Re==Ge[B-K])ne[B]=ne[B-K];else{let We=q[Re];if(We==null&&(q[Re]=We=oe.length,oe.push(Re),oe.length>=300))break;ne[B]=We}}}const Se=oe.length;for(Se<=256&&k==0&&(D=Se<=2?1:Se<=4?2:Se<=16?4:8,D=Math.max(D,C)),Z=0;Z<J.length;Z++){(le=J[Z]).rect.x,le.rect.y,K=le.rect.width;const Ge=le.rect.height;let Re=le.img;new Uint32Array(Re.buffer);let We=4*K,rt=4;if(Se<=256&&k==0){We=Math.ceil(D*K/8);var Ie=new Uint8Array(We*Ge);const nt=Q[Z];for(let R=0;R<Ge;R++){B=R*We;const j=R*K;if(D==8)for(var ke=0;ke<K;ke++)Ie[B+ke]=nt[j+ke];else if(D==4)for(ke=0;ke<K;ke++)Ie[B+(ke>>1)]|=nt[j+ke]<<4-4*(1&ke);else if(D==2)for(ke=0;ke<K;ke++)Ie[B+(ke>>2)]|=nt[j+ke]<<6-2*(3&ke);else if(D==1)for(ke=0;ke<K;ke++)Ie[B+(ke>>3)]|=nt[j+ke]<<7-1*(7&ke)}Re=Ie,$=3,rt=1}else if(L==0&&J.length==1){Ie=new Uint8Array(K*Ge*3);const nt=K*Ge;for(B=0;B<nt;B++){const R=3*B,j=4*B;Ie[R]=Re[j],Ie[R+1]=Re[j+1],Ie[R+2]=Re[j+2]}Re=Ie,$=2,rt=3,We=3*K}le.img=Re,le.bpl=We,le.bpp=rt}return{ctype:$,depth:D,plte:oe,frames:J}}function f(v,E,P,A,M,F,N){const W=Uint8Array,C=Uint32Array,k=new W(v[M-1]),Y=new C(v[M-1]),$=M+1<v.length?new W(v[M+1]):null,D=new W(v[M]),V=new C(D.buffer);let Z=E,G=P,B=-1,L=-1;for(let q=0;q<F.height;q++)for(let oe=0;oe<F.width;oe++){const Q=F.x+oe,ne=F.y+q,le=ne*E+Q,K=V[le];K==0||A[M-1].dispose==0&&Y[le]==K&&($==null||$[4*le+3]!=0)||(Q<Z&&(Z=Q),Q>B&&(B=Q),ne<G&&(G=ne),ne>L&&(L=ne))}B==-1&&(Z=G=B=L=0),N&&((1&Z)==1&&Z--,(1&G)==1&&G--),F={x:Z,y:G,width:B-Z+1,height:L-G+1};const J=A[M];J.rect=F,J.blend=1,J.img=new Uint8Array(F.width*F.height*4),A[M-1].dispose==0?(e(k,E,P,J.img,F.width,F.height,-F.x,-F.y,0),d(D,E,P,J.img,F)):e(D,E,P,J.img,F.width,F.height,-F.x,-F.y,0)}function d(v,E,P,A,M){e(v,E,P,A,M.width,M.height,-M.x,-M.y,2)}function h(v,E,P,A,M,F,N){const W=[];let C,k=[0,1,2,3,4];F!=-1?k=[F]:(E*A>5e5||P==1)&&(k=[0]),N&&(C={level:0});const Y=_P;for(var $=0;$<k.length;$++){for(let Z=0;Z<E;Z++)m(M,v,Z,A,P,k[$]);W.push(Y.deflate(M,C))}let D,V=1e9;for($=0;$<W.length;$++)W[$].length<V&&(D=$,V=W[$].length);return W[D]}function m(v,E,P,A,M,F){const N=P*A;let W=N+P;if(v[W]=F,W++,F==0)if(A<500)for(var C=0;C<A;C++)v[W+C]=E[N+C];else v.set(new Uint8Array(E.buffer,N,A),W);else if(F==1){for(C=0;C<M;C++)v[W+C]=E[N+C];for(C=M;C<A;C++)v[W+C]=E[N+C]-E[N+C-M]+256&255}else if(P==0){for(C=0;C<M;C++)v[W+C]=E[N+C];if(F==2)for(C=M;C<A;C++)v[W+C]=E[N+C];if(F==3)for(C=M;C<A;C++)v[W+C]=E[N+C]-(E[N+C-M]>>1)+256&255;if(F==4)for(C=M;C<A;C++)v[W+C]=E[N+C]-r(E[N+C-M],0,0)+256&255}else{if(F==2)for(C=0;C<A;C++)v[W+C]=E[N+C]+256-E[N+C-A]&255;if(F==3){for(C=0;C<M;C++)v[W+C]=E[N+C]+256-(E[N+C-A]>>1)&255;for(C=M;C<A;C++)v[W+C]=E[N+C]+256-(E[N+C-A]+E[N+C-M]>>1)&255}if(F==4){for(C=0;C<M;C++)v[W+C]=E[N+C]+256-r(0,E[N+C-A],0)&255;for(C=M;C<A;C++)v[W+C]=E[N+C]+256-r(E[N+C-M],E[N+C-A],E[N+C-M-A])&255}}}function p(v,E){const P=new Uint8Array(v),A=P.slice(0),M=new Uint32Array(A.buffer),F=g(A,E),N=F[0],W=F[1],C=P.length,k=new Uint8Array(C>>2);let Y;if(P.length<2e7)for(var $=0;$<C;$+=4)Y=y(N,D=P[$]*(1/255),V=P[$+1]*(1/255),Z=P[$+2]*(1/255),G=P[$+3]*(1/255)),k[$>>2]=Y.ind,M[$>>2]=Y.est.rgba;else for($=0;$<C;$+=4){var D=P[$]*.00392156862745098,V=P[$+1]*(1/255),Z=P[$+2]*(1/255),G=P[$+3]*(1/255);for(Y=N;Y.left;)Y=O(Y.est,D,V,Z,G)<=0?Y.left:Y.right;k[$>>2]=Y.ind,M[$>>2]=Y.est.rgba}return{abuf:A.buffer,inds:k,plte:W}}function g(v,E,P){P==null&&(P=1e-4);const A=new Uint32Array(v.buffer),M={i0:0,i1:v.length,bst:null,est:null,tdst:0,left:null,right:null};M.bst=_(v,M.i0,M.i1),M.est=S(M.bst);const F=[M];for(;F.length<E;){let W=0,C=0;for(var N=0;N<F.length;N++)F[N].est.L>W&&(W=F[N].est.L,C=N);if(W<P)break;const k=F[C],Y=x(v,A,k.i0,k.i1,k.est.e,k.est.eMq255);if(k.i0>=Y||k.i1<=Y){k.est.L=0;continue}const $={i0:k.i0,i1:Y,bst:null,est:null,tdst:0,left:null,right:null};$.bst=_(v,$.i0,$.i1),$.est=S($.bst);const D={i0:Y,i1:k.i1,bst:null,est:null,tdst:0,left:null,right:null};for(D.bst={R:[],m:[],N:k.bst.N-$.bst.N},N=0;N<16;N++)D.bst.R[N]=k.bst.R[N]-$.bst.R[N];for(N=0;N<4;N++)D.bst.m[N]=k.bst.m[N]-$.bst.m[N];D.est=S(D.bst),k.left=$,k.right=D,F[C]=$,F.push(D)}for(F.sort(((W,C)=>C.bst.N-W.bst.N)),N=0;N<F.length;N++)F[N].ind=N;return[M,F]}function y(v,E,P,A,M){if(v.left==null)return v.tdst=(function($,D,V,Z,G){const B=D-$[0],L=V-$[1],J=Z-$[2],q=G-$[3];return B*B+L*L+J*J+q*q})(v.est.q,E,P,A,M),v;const F=O(v.est,E,P,A,M);let N=v.left,W=v.right;F>0&&(N=v.right,W=v.left);const C=y(N,E,P,A,M);if(C.tdst<=F*F)return C;const k=y(W,E,P,A,M);return k.tdst<C.tdst?k:C}function O(v,E,P,A,M){const{e:F}=v;return F[0]*E+F[1]*P+F[2]*A+F[3]*M-v.eMq}function x(v,E,P,A,M,F){for(A-=4;P<A;){for(;w(v,P,M)<=F;)P+=4;for(;w(v,A,M)>F;)A-=4;if(P>=A)break;const N=E[P>>2];E[P>>2]=E[A>>2],E[A>>2]=N,P+=4,A-=4}for(;w(v,P,M)>F;)P-=4;return P+4}function w(v,E,P){return v[E]*P[0]+v[E+1]*P[1]+v[E+2]*P[2]+v[E+3]*P[3]}function _(v,E,P){const A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=[0,0,0,0],F=P-E>>2;for(let N=E;N<P;N+=4){const W=v[N]*.00392156862745098,C=v[N+1]*(1/255),k=v[N+2]*(1/255),Y=v[N+3]*(1/255);M[0]+=W,M[1]+=C,M[2]+=k,M[3]+=Y,A[0]+=W*W,A[1]+=W*C,A[2]+=W*k,A[3]+=W*Y,A[5]+=C*C,A[6]+=C*k,A[7]+=C*Y,A[10]+=k*k,A[11]+=k*Y,A[15]+=Y*Y}return A[4]=A[1],A[8]=A[2],A[9]=A[6],A[12]=A[3],A[13]=A[7],A[14]=A[11],{R:A,m:M,N:F}}function S(v){const{R:E}=v,{m:P}=v,{N:A}=v,M=P[0],F=P[1],N=P[2],W=P[3],C=A==0?0:1/A,k=[E[0]-M*M*C,E[1]-M*F*C,E[2]-M*N*C,E[3]-M*W*C,E[4]-F*M*C,E[5]-F*F*C,E[6]-F*N*C,E[7]-F*W*C,E[8]-N*M*C,E[9]-N*F*C,E[10]-N*N*C,E[11]-N*W*C,E[12]-W*M*C,E[13]-W*F*C,E[14]-W*N*C,E[15]-W*W*C],Y=k,$=I;let D=[Math.random(),Math.random(),Math.random(),Math.random()],V=0,Z=0;if(A!=0)for(let B=0;B<16&&(D=$.multVec(Y,D),Z=Math.sqrt($.dot(D,D)),D=$.sml(1/Z,D),!(B!=0&&Math.abs(Z-V)<1e-9));B++)V=Z;const G=[M*C,F*C,N*C,W*C];return{Cov:k,q:G,e:D,L:V,eMq255:$.dot($.sml(255,G),D),eMq:$.dot(D,G),rgba:(Math.round(255*G[3])<<24|Math.round(255*G[2])<<16|Math.round(255*G[1])<<8|Math.round(255*G[0])<<0)>>>0}}var I={multVec:(v,E)=>[v[0]*E[0]+v[1]*E[1]+v[2]*E[2]+v[3]*E[3],v[4]*E[0]+v[5]*E[1]+v[6]*E[2]+v[7]*E[3],v[8]*E[0]+v[9]*E[1]+v[10]*E[2]+v[11]*E[3],v[12]*E[0]+v[13]*E[1]+v[14]*E[2]+v[15]*E[3]],dot:(v,E)=>v[0]*E[0]+v[1]*E[1]+v[2]*E[2]+v[3]*E[3],sml:(v,E)=>[v*E[0],v*E[1],v*E[2],v*E[3]]};yr.encode=function(E,P,A,M,F,N,W){M==null&&(M=0),W==null&&(W=!1);const C=l(E,P,A,M,[!1,!1,!1,0,W,!1]);return u(C,-1),c(C,P,A,F,N)},yr.encodeLL=function(E,P,A,M,F,N,W,C){const k={ctype:0+(M==1?0:2)+(F==0?0:4),depth:N,frames:[]},Y=(M+F)*N,$=Y*P;for(let D=0;D<E.length;D++)k.frames.push({rect:{x:0,y:0,width:P,height:A},img:new Uint8Array(E[D]),blend:0,dispose:1,bpp:Math.ceil(Y/8),bpl:Math.ceil($/8)});return u(k,0,!0),c(k,P,A,W,C)},yr.encode.compress=l,yr.encode.dither=a,yr.quantize=p,yr.quantize.getKDtree=g,yr.quantize.getNearest=y})();const ig={toArrayBuffer(e,t){const r=e.width,n=e.height,o=r<<2,s=e.getContext("2d").getImageData(0,0,r,n),i=new Uint32Array(s.data.buffer),a=(32*r+31)/32<<2,c=a*n,u=122+c,l=new ArrayBuffer(u),f=new DataView(l),d=1<<20;let h,m,p,g,y=d,O=0,x=0,w=0;function _(v){f.setUint16(x,v,!0),x+=2}function S(v){f.setUint32(x,v,!0),x+=4}function I(v){x+=v}_(19778),S(u),I(4),S(122),S(108),S(r),S(-n>>>0),_(1),_(32),S(3),S(c),S(2835),S(2835),I(8),S(16711680),S(65280),S(255),S(4278190080),S(1466527264),(function v(){for(;O<n&&y>0;){for(g=122+O*a,h=0;h<o;)y--,m=i[w++],p=m>>>24,f.setUint32(g+h,m<<8|p),h+=4;O++}w<i.length?(y=d,setTimeout(v,ig._dly)):t(l)})()},toBlob(e,t){this.toArrayBuffer(e,(r=>{t(new Blob([r],{type:"image/bmp"}))}))},_dly:9};var Yt={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},SP={[Yt.CHROME]:16384,[Yt.FIREFOX]:11180,[Yt.DESKTOP_SAFARI]:16384,[Yt.IE]:8192,[Yt.IOS]:4096,[Yt.ETC]:8192};const pl=typeof window<"u",ag=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,$i=pl&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),kP=(pl||ag)&&($i&&$i.getOriginalSymbol(window,"File")||typeof File<"u"&&File),cg=(pl||ag)&&($i&&$i.getOriginalSymbol(window,"FileReader")||typeof FileReader<"u"&&FileReader);function ml(e,t,r=Date.now()){return new Promise((n=>{const o=e.split(","),s=o[0].match(/:(.*?);/)[1],i=globalThis.atob(o[1]);let a=i.length;const c=new Uint8Array(a);for(;a--;)c[a]=i.charCodeAt(a);const u=new Blob([c],{type:s});u.name=t,u.lastModified=r,n(u)}))}function lg(e){return new Promise(((t,r)=>{const n=new cg;n.onload=()=>t(n.result),n.onerror=o=>r(o),n.readAsDataURL(e)}))}function ug(e){return new Promise(((t,r)=>{const n=new Image;n.onload=()=>t(n),n.onerror=o=>r(o),n.src=e}))}function $n(){if($n.cachedResult!==void 0)return $n.cachedResult;let e=Yt.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=Yt.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=Yt.IOS:/Safari/i.test(t)?e=Yt.DESKTOP_SAFARI:/Firefox/i.test(t)?e=Yt.FIREFOX:(/MSIE/i.test(t)||document.documentMode)&&(e=Yt.IE),$n.cachedResult=e,$n.cachedResult}function fg(e,t){const r=$n(),n=SP[r];let o=e,s=t,i=o*s;const a=o>s?s/o:o/s;for(;i>n*n;){const c=(n+o)/2,u=(n+s)/2;c<u?(s=u,o=u*a):(s=c*a,o=c),i=o*s}return{width:o,height:s}}function Ui(e,t){let r,n;try{if(r=new OffscreenCanvas(e,t),n=r.getContext("2d"),n===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{r=document.createElement("canvas"),n=r.getContext("2d")}return r.width=e,r.height=t,[r,n]}function dg(e,t){const{width:r,height:n}=fg(e.width,e.height),[o,s]=Ui(r,n);return t&&/jpe?g/.test(t)&&(s.fillStyle="white",s.fillRect(0,0,o.width,o.height)),s.drawImage(e,0,0,o.width,o.height),o}function Yi(){return Yi.cachedResult!==void 0||(Yi.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document<"u"&&"ontouchend"in document),Yi.cachedResult}function ji(e,t={}){return new Promise((function(r,n){let o,s;var i=function(){try{return s=dg(o,t.fileType||e.type),r([o,s])}catch(c){return n(c)}},a=function(c){try{var u=function(l){try{throw l}catch(f){return n(f)}};try{let l;return lg(e).then((function(f){try{return l=f,ug(l).then((function(d){try{return o=d,(function(){try{return i()}catch(h){return n(h)}})()}catch(h){return u(h)}}),u)}catch(d){return u(d)}}),u)}catch(l){u(l)}}catch(l){return n(l)}};try{if(Yi()||[Yt.DESKTOP_SAFARI,Yt.MOBILE_SAFARI].includes($n()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then((function(c){try{return o=c,i()}catch{return a()}}),a)}catch{a()}}))}function Vi(e,t,r,n,o=1){return new Promise((function(s,i){let a;if(t==="image/png"){let u,l,f;return u=e.getContext("2d"),{data:l}=u.getImageData(0,0,e.width,e.height),f=yr.encode([l.buffer],e.width,e.height,4096*o),a=new Blob([f],{type:t}),a.name=r,a.lastModified=n,c.call(this)}{let u=function(){return c.call(this)};if(t==="image/bmp")return new Promise((l=>ig.toBlob(e,l))).then((function(l){try{return a=l,a.name=r,a.lastModified=n,u.call(this)}catch(f){return i(f)}}).bind(this),i);{let l=function(){return u.call(this)};if(typeof OffscreenCanvas=="function"&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:o}).then((function(f){try{return a=f,a.name=r,a.lastModified=n,l.call(this)}catch(d){return i(d)}}).bind(this),i);{let f;return f=e.toDataURL(t,o),ml(f,r,n).then((function(d){try{return a=d,l.call(this)}catch(h){return i(h)}}).bind(this),i)}}}function c(){return s(a)}}))}function Nr(e){e.width=0,e.height=0}function yo(){return new Promise((function(e,t){let r,n,o,s;return yo.cachedResult!==void 0?e(yo.cachedResult):ml("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(i){try{return r=i,ji(r).then((function(a){try{return n=a[1],Vi(n,r.type,r.name,r.lastModified).then((function(c){try{return o=c,Nr(n),ji(o).then((function(u){try{return s=u[0],yo.cachedResult=s.width===1&&s.height===2,e(yo.cachedResult)}catch(l){return t(l)}}),t)}catch(u){return t(u)}}),t)}catch(c){return t(c)}}),t)}catch(a){return t(a)}}),t)}))}function hg(e){return new Promise(((t,r)=>{const n=new cg;n.onload=o=>{const s=new DataView(o.target.result);if(s.getUint16(0,!1)!=65496)return t(-2);const i=s.byteLength;let a=2;for(;a<i;){if(s.getUint16(a+2,!1)<=8)return t(-1);const c=s.getUint16(a,!1);if(a+=2,c==65505){if(s.getUint32(a+=2,!1)!=1165519206)return t(-1);const u=s.getUint16(a+=6,!1)==18761;a+=s.getUint32(a+4,u);const l=s.getUint16(a,u);a+=2;for(let f=0;f<l;f++)if(s.getUint16(a+12*f,u)==274)return t(s.getUint16(a+12*f+8,u))}else{if((65280&c)!=65280)break;a+=s.getUint16(a,!1)}}return t(-1)},n.onerror=o=>r(o),n.readAsArrayBuffer(e)}))}function pg(e,t){const{width:r}=e,{height:n}=e,{maxWidthOrHeight:o}=t;let s,i=e;return isFinite(o)&&(r>o||n>o)&&([i,s]=Ui(r,n),r>n?(i.width=o,i.height=n/r*o):(i.width=r/n*o,i.height=o),s.drawImage(e,0,0,i.width,i.height),Nr(e)),i}function mg(e,t){const{width:r}=e,{height:n}=e,[o,s]=Ui(r,n);switch(t>4&&t<9?(o.width=n,o.height=r):(o.width=r,o.height=n),t){case 2:s.transform(-1,0,0,1,r,0);break;case 3:s.transform(-1,0,0,-1,r,n);break;case 4:s.transform(1,0,0,-1,0,n);break;case 5:s.transform(0,1,1,0,0,0);break;case 6:s.transform(0,1,-1,0,n,0);break;case 7:s.transform(0,-1,-1,0,n,r);break;case 8:s.transform(0,-1,1,0,0,r)}return s.drawImage(e,0,0,r,n),Nr(e),o}function gg(e,t,r=0){return new Promise((function(n,o){let s,i,a,c,u,l,f,d,h,m,p,g,y,O,x,w,_,S,I,v;function E(A=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;s+=A,t.onProgress(Math.min(s,100))}function P(A){if(t.signal&&t.signal.aborted)throw t.signal.reason;s=Math.min(Math.max(A,s),100),t.onProgress(s)}return s=r,i=t.maxIteration||10,a=1024*t.maxSizeMB*1024,E(),ji(e,t).then((function(A){try{return[,c]=A,E(),u=pg(c,t),E(),new Promise((function(M,F){var N;if(!(N=t.exifOrientation))return hg(e).then((function(C){try{return N=C,W.call(this)}catch(k){return F(k)}}).bind(this),F);function W(){return M(N)}return W.call(this)})).then((function(M){try{return l=M,E(),yo().then((function(F){try{return f=F?u:mg(u,l),E(),d=t.initialQuality||1,h=t.fileType||e.type,Vi(f,h,e.name,e.lastModified,d).then((function(N){try{{let C=function(){if(i--&&(x>a||x>y)){let Y,$;return Y=v?.95*I.width:I.width,$=v?.95*I.height:I.height,[_,S]=Ui(Y,$),S.drawImage(I,0,0,Y,$),d*=h==="image/png"?.85:.95,Vi(_,h,e.name,e.lastModified,d).then((function(D){try{return w=D,Nr(I),I=_,x=w.size,P(Math.min(99,Math.floor((O-x)/(O-a)*100))),C}catch(V){return o(V)}}),o)}return[1]},k=function(){return Nr(I),Nr(_),Nr(u),Nr(f),Nr(c),P(100),n(w)};if(m=N,E(),p=m.size>a,g=m.size>e.size,!p&&!g)return P(100),n(m);var W;return y=e.size,O=m.size,x=O,I=f,v=!t.alwaysKeepResolution&&p,(W=(function(Y){for(;Y;){if(Y.then)return void Y.then(W,o);try{if(Y.pop){if(Y.length)return Y.pop()?k.call(this):Y;Y=C}else Y=Y.call(this)}catch($){return o($)}}}).bind(this))(C)}}catch(C){return o(C)}}).bind(this),o)}catch(N){return o(N)}}).bind(this),o)}catch(F){return o(F)}}).bind(this),o)}catch(M){return o(M)}}).bind(this),o)}))}const xP=`
84
84
  let scriptImported = false
85
85
  self.addEventListener('message', async (e) => {
86
86
  const { file, id, imageCompressionLibUrl, options } = e.data
@@ -99,9 +99,9 @@ self.addEventListener('message', async (e) => {
99
99
  self.postMessage({ error: e.message + '\\n' + e.stack, id })
100
100
  }
101
101
  })
102
- `;let gl;function kP(e,t){return new Promise(((r,n)=>{gl||(gl=(function(i){const a=[];return a.push(i),URL.createObjectURL(new Blob(a))})(SP));const o=new Worker(gl);o.addEventListener("message",(function(i){if(t.signal&&t.signal.aborted)o.terminate();else if(i.data.progress===void 0){if(i.data.error)return n(new Error(i.data.error)),void o.terminate();r(i.data.file),o.terminate()}else t.onProgress(i.data.progress)})),o.addEventListener("error",n),t.signal&&t.signal.addEventListener("abort",(()=>{n(t.signal.reason),o.terminate()})),o.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function Ot(e,t){return new Promise((function(r,n){let o,s,i,a,c,u;if(o={...t},i=0,{onProgress:a}=o,o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,c=typeof o.useWebWorker!="boolean"||o.useWebWorker,delete o.useWebWorker,o.onProgress=h=>{i=h,typeof a=="function"&&a(i)},!(e instanceof Blob||e instanceof _P))return n(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return n(new Error("The file given is not an image"));if(u=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!c||typeof Worker!="function"||u)return hg(e,o).then((function(h){try{return s=h,d.call(this)}catch(m){return n(m)}}).bind(this),n);var l=(function(){try{return d.call(this)}catch(h){return n(h)}}).bind(this),f=function(h){try{return hg(e,o).then((function(m){try{return s=m,l()}catch(p){return n(p)}}),n)}catch(m){return n(m)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",kP(e,o).then((function(h){try{return s=h,l()}catch{return f()}}),f)}catch{f()}function d(){try{s.name=e.name,s.lastModified=e.lastModified}catch{}try{o.preserveExif&&e.type==="image/jpeg"&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(s=rg(e,s))}catch{}return r(s)}}))}Ot.getDataUrlFromFile=ig,Ot.getFilefromDataUrl=ml,Ot.loadImage=ag,Ot.drawImageInCanvas=lg,Ot.drawFileInCanvas=ji,Ot.canvasToFile=Vi,Ot.getExifOrientation=ug,Ot.handleMaxWidthOrHeight=fg,Ot.followExifOrientation=dg,Ot.cleanupCanvasMemory=Nr,Ot.isAutoOrientationInBrowser=yo,Ot.approximateBelowMaximumCanvasSizeOfBrowser=cg,Ot.copyExifWithoutOrientation=rg,Ot.getBrowserName=$n,Ot.version="2.0.2";function Ae(...e){return Oc(oi(e))}async function xP(e,t=.2,r=1920){try{const n=atob(e.split(",")[1]),o=e.split(",")[0].split(":")[1].split(";")[0],s=new ArrayBuffer(n.length),i=new Uint8Array(s);for(let l=0;l<n.length;l++)i[l]=n.charCodeAt(l);const a=new Blob([s],{type:o}),c=await Ot(a,{maxSizeMB:t,maxWidthOrHeight:r,useWebWorker:!0});return await Ot.getDataUrlFromFile(c)}catch(n){return console.error("Error compressing image:",n),e}}function yl({question:e,gid_to_ref:t,form_values:r}){const{show_if:n}=e;if(!n?.item_gid)return!0;const o=t[n.item_gid];if(!o)return!0;const s=r[o],i=n.values;return!Array.isArray(i)||i.length===0?!0:Array.isArray(s)?s.some(a=>i.includes(a)):i.includes(s)}function EP({questionnaire:e={}}){const{sections:t=[]}=e,r=[],n=t.map(o=>{const{items:s=[]}=o,i=s.map(a=>{const{reference_id:c=""}=a;return{...a,id:c,name:c}});return r.push(...i),{...o,items:i}});return{questionnaire:e,sections:n,questions:r}}const vl=mP("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),vo=b.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?vh:"button";return T.jsx(i,{className:Ae(vl({variant:t,size:r,className:e})),ref:s,...o})});vo.displayName="Button";function OP(e,t,r="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:r}).format(t).split(/\s/g).slice(2).join(" ")}const CP={},ts={};function Un(e,t){try{const n=(CP[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in ts?ts[n]:pg(n,n.split(":"))}catch{if(e in ts)return ts[e];const r=e?.match(TP);return r?pg(e,r.slice(1)):NaN}}const TP=/([+-]\d\d):?(\d\d)?/;function pg(e,t){const r=+(t[0]||0),n=+(t[1]||0),o=+(t[2]||0)/60;return ts[e]=r*60+n>0?r*60+n+o:r*60-n-o}class Ir extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Un(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),gg(this),bl(this)):this.setTime(Date.now())}static tz(t,...r){return r.length?new Ir(...r,t):new Ir(Date.now(),t)}withTimeZone(t){return new Ir(+this,t)}getTimezoneOffset(){const t=-Un(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),bl(this),+this}[Symbol.for("constructDateFrom")](t){return new Ir(+new Date(t),this.timeZone)}}const mg=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!mg.test(e))return;const t=e.replace(mg,"$1UTC");Ir.prototype[t]&&(e.startsWith("get")?Ir.prototype[e]=function(){return this.internal[t]()}:(Ir.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),DP(this),+this},Ir.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),bl(this),+this}))});function bl(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Un(e.timeZone,e)*60))}function DP(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),gg(e)}function gg(e){const t=Un(e.timeZone,e),r=t>0?Math.floor(t):Math.ceil(t),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),s=-new Date(+n).getTimezoneOffset(),i=o-s,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();i&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+i);const c=o-r;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);const u=new Date(+e);u.setUTCSeconds(0);const l=o>0?u.getSeconds():(u.getSeconds()-60)%60,f=Math.round(-(Un(e.timeZone,e)*60))%60;(f||l)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+f),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+f+l));const d=Un(e.timeZone,e),h=d>0?Math.floor(d):Math.ceil(d),p=-new Date(+e).getTimezoneOffset()-h,g=h!==r,y=p-c;if(g&&y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const O=Un(e.timeZone,e),x=O>0?Math.floor(O):Math.ceil(O),w=h-x;w&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+w),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+w))}}class Mt extends Ir{static tz(t,...r){return r.length?new Mt(...r,t):new Mt(Date.now(),t)}toISOString(){const[t,r,n]=this.tzComponents(),o=`${t}${r}:${n}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,r,n,o]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${n} ${r} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[r,n,o]=this.tzComponents();return`${t} GMT${r}${n}${o} (${OP(this.timeZone,this)})`}toLocaleString(t,r){return Date.prototype.toLocaleString.call(this,t,{...r,timeZone:r?.timeZone||this.timeZone})}toLocaleDateString(t,r){return Date.prototype.toLocaleDateString.call(this,t,{...r,timeZone:r?.timeZone||this.timeZone})}toLocaleTimeString(t,r){return Date.prototype.toLocaleTimeString.call(this,t,{...r,timeZone:r?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),r=t>0?"-":"+",n=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[r,n,o]}withTimeZone(t){return new Mt(+this,t)}[Symbol.for("constructDateFrom")](t){return new Mt(+new Date(t),this.timeZone)}}const yg=6048e5,AP=864e5,vg=Symbol.for("constructDateFrom");function wt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&vg in e?e[vg](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ke(e,t){return wt(t||e,e)}function bg(e,t,r){const n=Ke(e,r?.in);return isNaN(t)?wt(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function wg(e,t,r){const n=Ke(e,r?.in);if(isNaN(t))return wt(e,NaN);if(!t)return n;const o=n.getDate(),s=wt(e,n.getTime());s.setMonth(n.getMonth()+t+1,0);const i=s.getDate();return o>=i?s:(n.setFullYear(s.getFullYear(),s.getMonth(),o),n)}let MP={};function rs(){return MP}function bo(e,t){const r=rs(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Ke(e,t?.in),s=o.getDay(),i=(s<n?7:0)+s-n;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function ns(e,t){return bo(e,{...t,weekStartsOn:1})}function _g(e,t){const r=Ke(e,t?.in),n=r.getFullYear(),o=wt(r,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);const s=ns(o),i=wt(r,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const a=ns(i);return r.getTime()>=s.getTime()?n+1:r.getTime()>=a.getTime()?n:n-1}function Sg(e){const t=Ke(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function wo(e,...t){const r=wt.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function os(e,t){const r=Ke(e,t?.in);return r.setHours(0,0,0,0),r}function wl(e,t,r){const[n,o]=wo(r?.in,e,t),s=os(n),i=os(o),a=+s-Sg(s),c=+i-Sg(i);return Math.round((a-c)/AP)}function PP(e,t){const r=_g(e,t),n=wt(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),ns(n)}function NP(e,t,r){return bg(e,t*7,r)}function IP(e,t,r){return wg(e,t*12,r)}function FP(e,t){let r,n=t?.in;return e.forEach(o=>{!n&&typeof o=="object"&&(n=wt.bind(null,o));const s=Ke(o,n);(!r||r<s||isNaN(+s))&&(r=s)}),wt(n,r||NaN)}function RP(e,t){let r,n=t?.in;return e.forEach(o=>{!n&&typeof o=="object"&&(n=wt.bind(null,o));const s=Ke(o,n);(!r||r>s||isNaN(+s))&&(r=s)}),wt(n,r||NaN)}function WP(e,t,r){const[n,o]=wo(r?.in,e,t);return+os(n)==+os(o)}function kg(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function LP(e){return!(!kg(e)&&typeof e!="number"||isNaN(+Ke(e)))}function xg(e,t,r){const[n,o]=wo(r?.in,e,t),s=n.getFullYear()-o.getFullYear(),i=n.getMonth()-o.getMonth();return s*12+i}function zP(e,t){const r=Ke(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function Eg(e,t){const[r,n]=wo(e,t.start,t.end);return{start:r,end:n}}function $P(e,t){const{start:r,end:n}=Eg(t?.in,e);let o=+r>+n;const s=o?+r:+n,i=o?n:r;i.setHours(0,0,0,0),i.setDate(1);let a=1;const c=[];for(;+i<=s;)c.push(wt(r,i)),i.setMonth(i.getMonth()+a);return o?c.reverse():c}function UP(e,t){const r=Ke(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function YP(e,t){const r=Ke(e,t?.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}function Og(e,t){const r=Ke(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function jP(e,t){const{start:r,end:n}=Eg(t?.in,e);let o=+r>+n;const s=o?+r:+n,i=o?n:r;i.setHours(0,0,0,0),i.setMonth(0,1);let a=1;const c=[];for(;+i<=s;)c.push(wt(r,i)),i.setFullYear(i.getFullYear()+a);return o?c.reverse():c}function Cg(e,t){const r=rs(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Ke(e,t?.in),s=o.getDay(),i=(s<n?-7:0)+6-(s-n);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function VP(e,t){return Cg(e,{...t,weekStartsOn:1})}const BP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},HP=(e,t,r)=>{let n;const o=BP[e];return typeof o=="string"?n=o:t===1?n=o.one:n=o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function _l(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const ZP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},GP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},KP={date:_l({formats:ZP,defaultWidth:"full"}),time:_l({formats:GP,defaultWidth:"full"}),dateTime:_l({formats:qP,defaultWidth:"full"})},JP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},XP=(e,t,r,n)=>JP[e];function ss(e){return(t,r)=>{const n=r?.context?String(r.context):"standalone";let o;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const QP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},eN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},tN={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},rN={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},nN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},oN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},sN={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:ss({values:QP,defaultWidth:"wide"}),quarter:ss({values:eN,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ss({values:tN,defaultWidth:"wide"}),day:ss({values:rN,defaultWidth:"wide"}),dayPeriod:ss({values:nN,defaultWidth:"wide",formattingValues:oN,defaultFormattingWidth:"wide"})};function is(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?aN(a,f=>f.test(i)):iN(a,f=>f.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;const l=t.slice(i.length);return{value:u,rest:l}}}function iN(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function aN(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function cN(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const o=n[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=r.valueCallback?r.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const lN=/^(\d+)(th|st|nd|rd)?/i,uN=/\d+/i,fN={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},dN={any:[/^b/i,/^(a|c)/i]},hN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},pN={any:[/1/i,/2/i,/3/i,/4/i]},mN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},gN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},yN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},vN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},bN={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},wN={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_N={ordinalNumber:cN({matchPattern:lN,parsePattern:uN,valueCallback:e=>parseInt(e,10)}),era:is({matchPatterns:fN,defaultMatchWidth:"wide",parsePatterns:dN,defaultParseWidth:"any"}),quarter:is({matchPatterns:hN,defaultMatchWidth:"wide",parsePatterns:pN,defaultParseWidth:"any",valueCallback:e=>e+1}),month:is({matchPatterns:mN,defaultMatchWidth:"wide",parsePatterns:gN,defaultParseWidth:"any"}),day:is({matchPatterns:yN,defaultMatchWidth:"wide",parsePatterns:vN,defaultParseWidth:"any"}),dayPeriod:is({matchPatterns:bN,defaultMatchWidth:"any",parsePatterns:wN,defaultParseWidth:"any"})},_o={code:"en-US",formatDistance:HP,formatLong:KP,formatRelative:XP,localize:sN,match:_N,options:{weekStartsOn:0,firstWeekContainsDate:1}};function SN(e,t){const r=Ke(e,t?.in);return wl(r,Og(r))+1}function Sl(e,t){const r=Ke(e,t?.in),n=+ns(r)-+PP(r);return Math.round(n/yg)+1}function Tg(e,t){const r=Ke(e,t?.in),n=r.getFullYear(),o=rs(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=wt(t?.in||e,0);i.setFullYear(n+1,0,s),i.setHours(0,0,0,0);const a=bo(i,t),c=wt(t?.in||e,0);c.setFullYear(n,0,s),c.setHours(0,0,0,0);const u=bo(c,t);return+r>=+a?n+1:+r>=+u?n:n-1}function kN(e,t){const r=rs(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=Tg(e,t),s=wt(t?.in||e,0);return s.setFullYear(o,0,n),s.setHours(0,0,0,0),bo(s,t)}function kl(e,t){const r=Ke(e,t?.in),n=+bo(r,t)-+kN(r,t);return Math.round(n/yg)+1}function Ze(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const Sn={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Ze(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Ze(r+1,2)},d(e,t){return Ze(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Ze(e.getHours()%12||12,t.length)},H(e,t){return Ze(e.getHours(),t.length)},m(e,t){return Ze(e.getMinutes(),t.length)},s(e,t){return Ze(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),o=Math.trunc(n*Math.pow(10,r-3));return Ze(o,t.length)}},So={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Dg={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),o=n>0?n:1-n;return r.ordinalNumber(o,{unit:"year"})}return Sn.y(e,t)},Y:function(e,t,r,n){const o=Tg(e,n),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return Ze(i,2)}return t==="Yo"?r.ordinalNumber(s,{unit:"year"}):Ze(s,t.length)},R:function(e,t){const r=_g(e);return Ze(r,t.length)},u:function(e,t){const r=e.getFullYear();return Ze(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Ze(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Ze(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Sn.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Ze(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const o=kl(e,n);return t==="wo"?r.ordinalNumber(o,{unit:"week"}):Ze(o,t.length)},I:function(e,t,r){const n=Sl(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Ze(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Sn.d(e,t)},D:function(e,t,r){const n=SN(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Ze(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const o=e.getDay(),s=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ze(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const o=e.getDay(),s=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ze(s,t.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),o=n===0?7:n;switch(t){case"i":return String(o);case"ii":return Ze(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let o;switch(n===12?o=So.noon:n===0?o=So.midnight:o=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let o;switch(n>=17?o=So.evening:n>=12?o=So.afternoon:n>=4?o=So.morning:o=So.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Sn.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Sn.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Ze(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Ze(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Sn.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Sn.s(e,t)},S:function(e,t){return Sn.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Mg(n);case"XXXX":case"XX":return Yn(n);default:return Yn(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Mg(n);case"xxxx":case"xx":return Yn(n);default:return Yn(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ag(n,":");default:return"GMT"+Yn(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ag(n,":");default:return"GMT"+Yn(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return Ze(n,t.length)},T:function(e,t,r){return Ze(+e,t.length)}};function Ag(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),s=n%60;return s===0?r+String(o):r+String(o)+t+Ze(s,2)}function Mg(e,t){return e%60===0?(e>0?"-":"+")+Ze(Math.abs(e)/60,2):Yn(e,t)}function Yn(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Ze(Math.trunc(n/60),2),s=Ze(n%60,2);return r+o+t+s}const Pg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Ng=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},xN={p:Ng,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return Pg(e,t);let s;switch(n){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Pg(n,t)).replace("{{time}}",Ng(o,t))}},EN=/^D+$/,ON=/^Y+$/,CN=["D","DD","YY","YYYY"];function TN(e){return EN.test(e)}function DN(e){return ON.test(e)}function AN(e,t,r){const n=MN(e,t,r);if(console.warn(n),CN.includes(e))throw new RangeError(n)}function MN(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const PN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,NN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,IN=/^'([^]*?)'?$/,FN=/''/g,RN=/[a-zA-Z]/;function as(e,t,r){const n=rs(),o=r?.locale??n.locale??_o,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=Ke(e,r?.in);if(!LP(a))throw new RangeError("Invalid time value");let c=t.match(NN).map(l=>{const f=l[0];if(f==="p"||f==="P"){const d=xN[f];return d(l,o.formatLong)}return l}).join("").match(PN).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const f=l[0];if(f==="'")return{isToken:!1,value:WN(l)};if(Dg[f])return{isToken:!0,value:l};if(f.match(RN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:l}});o.localize.preprocessor&&(c=o.localize.preprocessor(a,c));const u={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return c.map(l=>{if(!l.isToken)return l.value;const f=l.value;(!r?.useAdditionalWeekYearTokens&&DN(f)||!r?.useAdditionalDayOfYearTokens&&TN(f))&&AN(f,t,String(e));const d=Dg[f[0]];return d(a,f,o.localize,u)}).join("")}function WN(e){const t=e.match(IN);return t?t[1].replace(FN,"'"):e}function LN(e,t){const r=Ke(e,t?.in),n=r.getFullYear(),o=r.getMonth(),s=wt(r,0);return s.setFullYear(n,o+1,0),s.setHours(0,0,0,0),s.getDate()}function zN(e,t){return Ke(e,t?.in).getMonth()}function $N(e,t){return Ke(e,t?.in).getFullYear()}function UN(e,t){return+Ke(e)>+Ke(t)}function YN(e,t){return+Ke(e)<+Ke(t)}function jN(e,t,r){const[n,o]=wo(r?.in,e,t);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}function VN(e,t,r){const[n,o]=wo(r?.in,e,t);return n.getFullYear()===o.getFullYear()}function BN(e,t,r){const n=Ke(e,r?.in),o=n.getFullYear(),s=n.getDate(),i=wt(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const a=LN(i);return n.setMonth(t,Math.min(s,a)),n}function HN(e,t,r){const n=Ke(e,r?.in);return isNaN(+n)?wt(e,NaN):(n.setFullYear(t),n)}const Ig=5,ZN=4;function GN(e,t){const r=t.startOfMonth(e),n=r.getDay()>0?r.getDay():7,o=t.addDays(e,-n+1),s=t.addDays(o,Ig*7-1);return t.getMonth(e)===t.getMonth(s)?Ig:ZN}function Fg(e,t){const r=t.startOfMonth(e),n=r.getDay();return n===1?r:n===0?t.addDays(r,-6):t.addDays(r,-1*(n-1))}function qN(e,t){const r=Fg(e,t),n=GN(e,t);return t.addDays(r,n*7-1)}const Rg={..._o,labels:{labelDayButton:(e,t,r,n)=>{let o;n&&typeof n.format=="function"?o=n.format.bind(n):o=(i,a)=>as(i,a,{locale:_o,...r});let s=o(e,"PPPP");return t.today&&(s=`Today, ${s}`),t.selected&&(s=`${s}, selected`),s},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,r)=>{let n;return r&&typeof r.format=="function"?n=r.format.bind(r):n=(o,s)=>as(o,s,{locale:_o,...t}),n(e,"LLLL yyyy")},labelGridcell:(e,t,r,n)=>{let o;n&&typeof n.format=="function"?o=n.format.bind(n):o=(i,a)=>as(i,a,{locale:_o,...r});let s=o(e,"PPPP");return t?.today&&(s=`Today, ${s}`),s},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,r)=>{let n;return r&&typeof r.format=="function"?n=r.format.bind(r):n=(o,s)=>as(o,s,{locale:_o,...t}),n(e,"cccc")}}};class Kt{constructor(t,r){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?Mt.tz(this.options.timeZone):new this.Date,this.newDate=(n,o,s)=>this.overrides?.newDate?this.overrides.newDate(n,o,s):this.options.timeZone?new Mt(n,o,s,this.options.timeZone):new Date(n,o,s),this.addDays=(n,o)=>this.overrides?.addDays?this.overrides.addDays(n,o):bg(n,o),this.addMonths=(n,o)=>this.overrides?.addMonths?this.overrides.addMonths(n,o):wg(n,o),this.addWeeks=(n,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(n,o):NP(n,o),this.addYears=(n,o)=>this.overrides?.addYears?this.overrides.addYears(n,o):IP(n,o),this.differenceInCalendarDays=(n,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,o):wl(n,o),this.differenceInCalendarMonths=(n,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,o):xg(n,o),this.eachMonthOfInterval=n=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):$P(n),this.eachYearOfInterval=n=>{const o=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(n):jP(n),s=new Set(o.map(a=>this.getYear(a)));if(s.size===o.length)return o;const i=[];return s.forEach(a=>{i.push(new Date(a,0,1))}),i},this.endOfBroadcastWeek=n=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):qN(n,this),this.endOfISOWeek=n=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(n):VP(n),this.endOfMonth=n=>this.overrides?.endOfMonth?this.overrides.endOfMonth(n):zP(n),this.endOfWeek=(n,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(n,o):Cg(n,this.options),this.endOfYear=n=>this.overrides?.endOfYear?this.overrides.endOfYear(n):YP(n),this.format=(n,o,s)=>{const i=this.overrides?.format?this.overrides.format(n,o,this.options):as(n,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=n=>this.overrides?.getISOWeek?this.overrides.getISOWeek(n):Sl(n),this.getMonth=(n,o)=>this.overrides?.getMonth?this.overrides.getMonth(n,this.options):zN(n,this.options),this.getYear=(n,o)=>this.overrides?.getYear?this.overrides.getYear(n,this.options):$N(n,this.options),this.getWeek=(n,o)=>this.overrides?.getWeek?this.overrides.getWeek(n,this.options):kl(n,this.options),this.isAfter=(n,o)=>this.overrides?.isAfter?this.overrides.isAfter(n,o):UN(n,o),this.isBefore=(n,o)=>this.overrides?.isBefore?this.overrides.isBefore(n,o):YN(n,o),this.isDate=n=>this.overrides?.isDate?this.overrides.isDate(n):kg(n),this.isSameDay=(n,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(n,o):WP(n,o),this.isSameMonth=(n,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(n,o):jN(n,o),this.isSameYear=(n,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(n,o):VN(n,o),this.max=n=>this.overrides?.max?this.overrides.max(n):FP(n),this.min=n=>this.overrides?.min?this.overrides.min(n):RP(n),this.setMonth=(n,o)=>this.overrides?.setMonth?this.overrides.setMonth(n,o):BN(n,o),this.setYear=(n,o)=>this.overrides?.setYear?this.overrides.setYear(n,o):HN(n,o),this.startOfBroadcastWeek=(n,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):Fg(n,this),this.startOfDay=n=>this.overrides?.startOfDay?this.overrides.startOfDay(n):os(n),this.startOfISOWeek=n=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(n):ns(n),this.startOfMonth=n=>this.overrides?.startOfMonth?this.overrides.startOfMonth(n):UP(n),this.startOfWeek=(n,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(n,this.options):bo(n,this.options),this.startOfYear=n=>this.overrides?.startOfYear?this.overrides.startOfYear(n):Og(n),this.options={locale:Rg,...t},this.overrides=r}getDigitMap(){const{numerals:t="latn"}=this.options,r=new Intl.NumberFormat("en-US",{numberingSystem:t}),n={};for(let o=0;o<10;o++)n[o.toString()]=r.format(o);return n}replaceDigits(t){const r=this.getDigitMap();return t.replace(/\d/g,n=>r[n]||n)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&Kt.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:r,timeZone:n,numerals:o}=this.options,s=r?.code;if(s&&Kt.yearFirstLocales.has(s))try{return new Intl.DateTimeFormat(s,{month:"long",year:"numeric",timeZone:n,numberingSystem:o}).format(t)}catch{}const i=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,i)}}Kt.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Fr=new Kt;class Wg{constructor(t,r,n=Fr){this.date=t,this.displayMonth=r,this.outside=!!(r&&!n.isSameMonth(t,r)),this.dateLib=n,this.isoDate=n.format(t,"yyyy-MM-dd"),this.displayMonthId=n.format(r,"yyyy-MM"),this.dateMonthId=n.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class KN{constructor(t,r){this.date=t,this.weeks=r}}class JN{constructor(t,r){this.days=r,this.weekNumber=t}}function XN(e){return U.createElement("button",{...e})}function QN(e){return U.createElement("span",{...e})}function e2(e){const{size:t=24,orientation:r="left",className:n}=e;return U.createElement("svg",{className:n,width:t,height:t,viewBox:"0 0 24 24"},r==="up"&&U.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),r==="down"&&U.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),r==="left"&&U.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),r==="right"&&U.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function t2(e){const{day:t,modifiers:r,...n}=e;return U.createElement("td",{...n})}function r2(e){const{day:t,modifiers:r,...n}=e,o=U.useRef(null);return U.useEffect(()=>{r.focused&&o.current?.focus()},[r.focused]),U.createElement("button",{ref:o,...n})}var me;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(me||(me={}));var ft;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(ft||(ft={}));var vr;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(vr||(vr={}));var Jt;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Jt||(Jt={}));function n2(e){const{options:t,className:r,components:n,classNames:o,...s}=e,i=[o[me.Dropdown],r].join(" "),a=t?.find(({value:c})=>c===s.value);return U.createElement("span",{"data-disabled":s.disabled,className:o[me.DropdownRoot]},U.createElement(n.Select,{className:i,...s},t?.map(({value:c,label:u,disabled:l})=>U.createElement(n.Option,{key:c,value:c,disabled:l},u))),U.createElement("span",{className:o[me.CaptionLabel],"aria-hidden":!0},a?.label,U.createElement(n.Chevron,{orientation:"down",size:18,className:o[me.Chevron]})))}function o2(e){return U.createElement("div",{...e})}function s2(e){return U.createElement("div",{...e})}function i2(e){const{calendarMonth:t,displayIndex:r,...n}=e;return U.createElement("div",{...n},e.children)}function a2(e){const{calendarMonth:t,displayIndex:r,...n}=e;return U.createElement("div",{...n})}function c2(e){return U.createElement("table",{...e})}function l2(e){return U.createElement("div",{...e})}const Lg=U.createContext(void 0);function cs(){const e=U.useContext(Lg);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function u2(e){const{components:t}=cs();return U.createElement(t.Dropdown,{...e})}function f2(e){const{onPreviousClick:t,onNextClick:r,previousMonth:n,nextMonth:o,...s}=e,{components:i,classNames:a,labels:{labelPrevious:c,labelNext:u}}=cs(),l=U.useCallback(d=>{o&&r?.(d)},[o,r]),f=U.useCallback(d=>{n&&t?.(d)},[n,t]);return U.createElement("nav",{...s},U.createElement(i.PreviousMonthButton,{type:"button",className:a[me.PreviousMonthButton],tabIndex:n?void 0:-1,"aria-disabled":n?void 0:!0,"aria-label":c(n),onClick:f},U.createElement(i.Chevron,{disabled:n?void 0:!0,className:a[me.Chevron],orientation:"left"})),U.createElement(i.NextMonthButton,{type:"button",className:a[me.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:l},U.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:a[me.Chevron]})))}function d2(e){const{components:t}=cs();return U.createElement(t.Button,{...e})}function h2(e){return U.createElement("option",{...e})}function p2(e){const{components:t}=cs();return U.createElement(t.Button,{...e})}function m2(e){const{rootRef:t,...r}=e;return U.createElement("div",{...r,ref:t})}function g2(e){return U.createElement("select",{...e})}function y2(e){const{week:t,...r}=e;return U.createElement("tr",{...r})}function v2(e){return U.createElement("th",{...e})}function b2(e){return U.createElement("thead",{"aria-hidden":!0},U.createElement("tr",{...e}))}function w2(e){const{week:t,...r}=e;return U.createElement("th",{...r})}function _2(e){return U.createElement("th",{...e})}function S2(e){return U.createElement("tbody",{...e})}function k2(e){const{components:t}=cs();return U.createElement(t.Dropdown,{...e})}const x2=Object.freeze(Object.defineProperty({__proto__:null,Button:XN,CaptionLabel:QN,Chevron:e2,Day:t2,DayButton:r2,Dropdown:n2,DropdownNav:o2,Footer:s2,Month:i2,MonthCaption:a2,MonthGrid:c2,Months:l2,MonthsDropdown:u2,Nav:f2,NextMonthButton:d2,Option:h2,PreviousMonthButton:p2,Root:m2,Select:g2,Week:y2,WeekNumber:w2,WeekNumberHeader:_2,Weekday:v2,Weekdays:b2,Weeks:S2,YearsDropdown:k2},Symbol.toStringTag,{value:"Module"}));function Xr(e,t,r=!1,n=Fr){let{from:o,to:s}=e;const{differenceInCalendarDays:i,isSameDay:a}=n;return o&&s?(i(s,o)<0&&([o,s]=[s,o]),i(t,o)>=(r?1:0)&&i(s,t)>=(r?1:0)):!r&&s?a(s,t):!r&&o?a(o,t):!1}function xl(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Bi(e){return!!(e&&typeof e=="object"&&"from"in e)}function El(e){return!!(e&&typeof e=="object"&&"after"in e)}function Ol(e){return!!(e&&typeof e=="object"&&"before"in e)}function zg(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function $g(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Qr(e,t,r=Fr){const n=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:s,isAfter:i}=r;return n.some(a=>{if(typeof a=="boolean")return a;if(r.isDate(a))return o(e,a);if($g(a,r))return a.some(c=>o(e,c));if(Bi(a))return Xr(a,e,!1,r);if(zg(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(xl(a)){const c=s(a.before,e),u=s(a.after,e),l=c>0,f=u<0;return i(a.before,a.after)?f&&l:l||f}return El(a)?s(e,a.after)>0:Ol(a)?s(a.before,e)>0:typeof a=="function"?a(e):!1})}function E2(e,t,r,n,o){const{disabled:s,hidden:i,modifiers:a,showOutsideDays:c,broadcastCalendar:u,today:l=o.today()}=t,{isSameDay:f,isSameMonth:d,startOfMonth:h,isBefore:m,endOfMonth:p,isAfter:g}=o,y=r&&h(r),O=n&&p(n),x={[ft.focused]:[],[ft.outside]:[],[ft.disabled]:[],[ft.hidden]:[],[ft.today]:[]},w={};for(const _ of e){const{date:S,displayMonth:I}=_,v=!!(I&&!d(S,I)),E=!!(y&&m(S,y)),P=!!(O&&g(S,O)),A=!!(s&&Qr(S,s,o)),M=!!(i&&Qr(S,i,o))||E||P||!u&&!c&&v||u&&c===!1&&v,F=f(S,l);v&&x.outside.push(_),A&&x.disabled.push(_),M&&x.hidden.push(_),F&&x.today.push(_),a&&Object.keys(a).forEach(N=>{const W=a?.[N];W&&Qr(S,W,o)&&(w[N]?w[N].push(_):w[N]=[_])})}return _=>{const S={[ft.focused]:!1,[ft.disabled]:!1,[ft.hidden]:!1,[ft.outside]:!1,[ft.today]:!1},I={};for(const v in x){const E=x[v];S[v]=E.some(P=>P===_)}for(const v in w)I[v]=w[v].some(E=>E===_);return{...S,...I}}}function O2(e,t,r={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[s])=>(r[s]?o.push(r[s]):t[ft[s]]?o.push(t[ft[s]]):t[vr[s]]&&o.push(t[vr[s]]),o),[t[me.Day]])}function C2(e){return{...x2,...e}}function T2(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([r,n])=>{r.startsWith("data-")&&(t[r]=n)}),t}function Cl(){const e={};for(const t in me)e[me[t]]=`rdp-${me[t]}`;for(const t in ft)e[ft[t]]=`rdp-${ft[t]}`;for(const t in vr)e[vr[t]]=`rdp-${vr[t]}`;for(const t in Jt)e[Jt[t]]=`rdp-${Jt[t]}`;return e}function Ug(e,t,r){return(r??new Kt(t)).formatMonthYear(e)}const D2=Ug;function A2(e,t,r){return(r??new Kt(t)).format(e,"d")}function M2(e,t=Fr){return t.format(e,"LLLL")}function P2(e,t,r){return(r??new Kt(t)).format(e,"cccccc")}function N2(e,t=Fr){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function I2(){return""}function Yg(e,t=Fr){return t.format(e,"yyyy")}const F2=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Ug,formatDay:A2,formatMonthCaption:D2,formatMonthDropdown:M2,formatWeekNumber:N2,formatWeekNumberHeader:I2,formatWeekdayName:P2,formatYearCaption:Yg,formatYearDropdown:Yg},Symbol.toStringTag,{value:"Module"}));function R2(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...F2,...e}}function Tl(e,t,r,n){let o=(n??new Kt(r)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const W2=Tl;function Dl(e,t,r){return(r??new Kt(t)).formatMonthYear(e)}const L2=Dl;function jg(e,t,r,n){let o=(n??new Kt(r)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function Vg(e){return"Choose the Month"}function Bg(){return""}const z2="Go to the Next Month";function Hg(e,t){return z2}function Zg(e){return"Go to the Previous Month"}function Gg(e,t,r){return(r??new Kt(t)).format(e,"cccc")}function qg(e,t){return`Week ${e}`}function Kg(e){return"Week Number"}function Jg(e){return"Choose the Year"}const $2=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:L2,labelDay:W2,labelDayButton:Tl,labelGrid:Dl,labelGridcell:jg,labelMonthDropdown:Vg,labelNav:Bg,labelNext:Hg,labelPrevious:Zg,labelWeekNumber:qg,labelWeekNumberHeader:Kg,labelWeekday:Gg,labelYearDropdown:Jg},Symbol.toStringTag,{value:"Module"})),br=(e,t,r)=>t||(r?typeof r=="function"?r:(...n)=>r:e);function U2(e,t){const r=t.locale?.labels??{};return{...$2,...e??{},labelDayButton:br(Tl,e?.labelDayButton,r.labelDayButton),labelMonthDropdown:br(Vg,e?.labelMonthDropdown,r.labelMonthDropdown),labelNext:br(Hg,e?.labelNext,r.labelNext),labelPrevious:br(Zg,e?.labelPrevious,r.labelPrevious),labelWeekNumber:br(qg,e?.labelWeekNumber,r.labelWeekNumber),labelYearDropdown:br(Jg,e?.labelYearDropdown,r.labelYearDropdown),labelGrid:br(Dl,e?.labelGrid,r.labelGrid),labelGridcell:br(jg,e?.labelGridcell,r.labelGridcell),labelNav:br(Bg,e?.labelNav,r.labelNav),labelWeekNumberHeader:br(Kg,e?.labelWeekNumberHeader,r.labelWeekNumberHeader),labelWeekday:br(Gg,e?.labelWeekday,r.labelWeekday)}}function Y2(e,t,r,n,o){const{startOfMonth:s,startOfYear:i,endOfYear:a,eachMonthOfInterval:c,getMonth:u}=o;return c({start:i(e),end:a(e)}).map(d=>{const h=n.formatMonthDropdown(d,o),m=u(d),p=t&&d<s(t)||r&&d>s(r)||!1;return{value:m,label:h,disabled:p}})}function j2(e,t={},r={}){let n={...t?.[me.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{n={...n,...r?.[o]}}),n}function V2(e,t,r,n){const o=n??e.today(),s=r?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),i=[];for(let a=0;a<7;a++){const c=e.addDays(s,a);i.push(c)}return i}function B2(e,t,r,n,o=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:i,eachYearOfInterval:a,getYear:c}=n,u=s(e),l=i(t),f=a({start:u,end:l});return o&&f.reverse(),f.map(d=>{const h=r.formatYearDropdown(d,n);return{value:c(d),label:h,disabled:!1}})}function H2(e,t={}){const{weekStartsOn:r,locale:n}=t,o=r??n?.options?.weekStartsOn??0,s=a=>{const c=typeof a=="number"||typeof a=="string"?new Date(a):a;return new Mt(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},i=a=>{const c=s(a);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>s(Mt.tz(e)),newDate:(a,c,u)=>new Mt(a,c,u,12,0,0,e),startOfDay:a=>s(a),startOfWeek:(a,c)=>{const u=s(a),l=c?.weekStartsOn??o,f=(u.getDay()-l+7)%7;return u.setDate(u.getDate()-f),u},startOfISOWeek:a=>{const c=s(a),u=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-u),c},startOfMonth:a=>{const c=s(a);return c.setDate(1),c},startOfYear:a=>{const c=s(a);return c.setMonth(0,1),c},endOfWeek:(a,c)=>{const u=s(a),d=(((c?.weekStartsOn??o)+6)%7-u.getDay()+7)%7;return u.setDate(u.getDate()+d),u},endOfISOWeek:a=>{const c=s(a),u=(7-c.getDay())%7;return c.setDate(c.getDate()+u),c},endOfMonth:a=>{const c=s(a);return c.setMonth(c.getMonth()+1,0),c},endOfYear:a=>{const c=s(a);return c.setMonth(11,31),c},eachMonthOfInterval:a=>{const c=s(a.start),u=s(a.end),l=[],f=new Mt(c.getFullYear(),c.getMonth(),1,12,0,0,e),d=u.getFullYear()*12+u.getMonth();for(;f.getFullYear()*12+f.getMonth()<=d;)l.push(new Mt(f,e)),f.setMonth(f.getMonth()+1,1);return l},addDays:(a,c)=>{const u=s(a);return u.setDate(u.getDate()+c),u},addWeeks:(a,c)=>{const u=s(a);return u.setDate(u.getDate()+c*7),u},addMonths:(a,c)=>{const u=s(a);return u.setMonth(u.getMonth()+c),u},addYears:(a,c)=>{const u=s(a);return u.setFullYear(u.getFullYear()+c),u},eachYearOfInterval:a=>{const c=s(a.start),u=s(a.end),l=[],f=new Mt(c.getFullYear(),0,1,12,0,0,e);for(;f.getFullYear()<=u.getFullYear();)l.push(new Mt(f,e)),f.setFullYear(f.getFullYear()+1,0,1);return l},getWeek:(a,c)=>{const u=i(a);return kl(u,{weekStartsOn:c?.weekStartsOn??o,firstWeekContainsDate:c?.firstWeekContainsDate??n?.options?.firstWeekContainsDate??1})},getISOWeek:a=>{const c=i(a);return Sl(c)},differenceInCalendarDays:(a,c)=>{const u=i(a),l=i(c);return wl(u,l)},differenceInCalendarMonths:(a,c)=>{const u=i(a),l=i(c);return xg(u,l)}}}const ls=e=>e instanceof HTMLElement?e:null,Al=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Z2=e=>ls(e.querySelector("[data-animated-month]")),Ml=e=>ls(e.querySelector("[data-animated-caption]")),Pl=e=>ls(e.querySelector("[data-animated-weeks]")),G2=e=>ls(e.querySelector("[data-animated-nav]")),q2=e=>ls(e.querySelector("[data-animated-weekdays]"));function K2(e,t,{classNames:r,months:n,focused:o,dateLib:s}){const i=U.useRef(null),a=U.useRef(n),c=U.useRef(!1);U.useLayoutEffect(()=>{const u=a.current;if(a.current=n,!t||!e.current||!(e.current instanceof HTMLElement)||n.length===0||u.length===0||n.length!==u.length)return;const l=s.isSameMonth(n[0].date,u[0].date),f=s.isAfter(n[0].date,u[0].date),d=f?r[Jt.caption_after_enter]:r[Jt.caption_before_enter],h=f?r[Jt.weeks_after_enter]:r[Jt.weeks_before_enter],m=i.current,p=e.current.cloneNode(!0);if(p instanceof HTMLElement?(Al(p).forEach(x=>{if(!(x instanceof HTMLElement))return;const w=Z2(x);w&&x.contains(w)&&x.removeChild(w);const _=Ml(x);_&&_.classList.remove(d);const S=Pl(x);S&&S.classList.remove(h)}),i.current=p):i.current=null,c.current||l||o)return;const g=m instanceof HTMLElement?Al(m):[],y=Al(e.current);if(y?.every(O=>O instanceof HTMLElement)&&g&&g.every(O=>O instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const O=G2(e.current);O&&(O.style.zIndex="1"),y.forEach((x,w)=>{const _=g[w];if(!_)return;x.style.position="relative",x.style.overflow="hidden";const S=Ml(x);S&&S.classList.add(d);const I=Pl(x);I&&I.classList.add(h);const v=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),O&&(O.style.zIndex=""),S&&S.classList.remove(d),I&&I.classList.remove(h),x.style.position="",x.style.overflow="",x.contains(_)&&x.removeChild(_)};_.style.pointerEvents="none",_.style.position="absolute",_.style.overflow="hidden",_.setAttribute("aria-hidden","true");const E=q2(_);E&&(E.style.opacity="0");const P=Ml(_);P&&(P.classList.add(f?r[Jt.caption_before_exit]:r[Jt.caption_after_exit]),P.addEventListener("animationend",v));const A=Pl(_);A&&A.classList.add(f?r[Jt.weeks_before_exit]:r[Jt.weeks_after_exit]),x.insertBefore(_,x.firstChild)})}})}function J2(e,t,r,n){const o=e[0],s=e[e.length-1],{ISOWeek:i,fixedWeeks:a,broadcastCalendar:c}=r??{},{addDays:u,differenceInCalendarDays:l,differenceInCalendarMonths:f,endOfBroadcastWeek:d,endOfISOWeek:h,endOfMonth:m,endOfWeek:p,isAfter:g,startOfBroadcastWeek:y,startOfISOWeek:O,startOfWeek:x}=n,w=c?y(o,n):i?O(o):x(o),_=c?d(s):i?h(m(s)):p(m(s)),S=t&&(c?d(t):i?h(t):p(t)),I=S&&g(_,S)?S:_,v=l(I,w),E=f(s,o)+1,P=[];for(let F=0;F<=v;F++){const N=u(w,F);P.push(N)}const M=(c?35:42)*E;if(a&&P.length<M){const F=M-P.length;for(let N=0;N<F;N++){const W=u(P[P.length-1],1);P.push(W)}}return P}function X2(e){const t=[];return e.reduce((r,n)=>{const o=n.weeks.reduce((s,i)=>s.concat(i.days.slice()),t.slice());return r.concat(o.slice())},t.slice())}function Q2(e,t,r,n){const{numberOfMonths:o=1}=r,s=[];for(let i=0;i<o;i++){const a=n.addMonths(e,i);if(t&&a>t)break;s.push(a)}return s}function Xg(e,t,r,n){const{month:o,defaultMonth:s,today:i=n.today(),numberOfMonths:a=1}=e;let c=o||s||i;const{differenceInCalendarMonths:u,addMonths:l,startOfMonth:f}=n;if(r&&u(r,c)<a-1){const d=-1*(a-1);c=l(r,d)}return t&&u(c,t)<0&&(c=t),f(c)}function eI(e,t,r,n){const{addDays:o,endOfBroadcastWeek:s,endOfISOWeek:i,endOfMonth:a,endOfWeek:c,getISOWeek:u,getWeek:l,startOfBroadcastWeek:f,startOfISOWeek:d,startOfWeek:h}=n,m=e.reduce((p,g)=>{const y=r.broadcastCalendar?f(g,n):r.ISOWeek?d(g):h(g),O=r.broadcastCalendar?s(g):r.ISOWeek?i(a(g)):c(a(g)),x=t.filter(I=>I>=y&&I<=O),w=r.broadcastCalendar?35:42;if(r.fixedWeeks&&x.length<w){const I=t.filter(v=>{const E=w-x.length;return v>O&&v<=o(O,E)});x.push(...I)}const _=x.reduce((I,v)=>{const E=r.ISOWeek?u(v):l(v),P=I.find(M=>M.weekNumber===E),A=new Wg(v,g,n);return P?P.days.push(A):I.push(new JN(E,[A])),I},[]),S=new KN(g,_);return p.push(S),p},[]);return r.reverseMonths?m.reverse():m}function tI(e,t){let{startMonth:r,endMonth:n}=e;const{startOfYear:o,startOfDay:s,startOfMonth:i,endOfMonth:a,addYears:c,endOfYear:u,newDate:l,today:f}=t,{fromYear:d,toYear:h,fromMonth:m,toMonth:p}=e;!r&&m&&(r=m),!r&&d&&(r=t.newDate(d,0,1)),!n&&p&&(n=p),!n&&h&&(n=l(h,11,31));const g=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return r?r=i(r):d?r=l(d,0,1):!r&&g&&(r=o(c(e.today??f(),-100))),n?n=a(n):h?n=l(h,11,31):!n&&g&&(n=u(e.today??f())),[r&&s(r),n&&s(n)]}function rI(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s=1}=r,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:c}=n,u=o?s:1,l=i(e);if(!t)return a(l,u);if(!(c(t,e)<s))return a(l,u)}function nI(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s}=r,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:c}=n,u=o?s??1:1,l=i(e);if(!t)return a(l,-u);if(!(c(l,t)<=0))return a(l,-u)}function oI(e){const t=[];return e.reduce((r,n)=>r.concat(n.weeks.slice()),t.slice())}function Hi(e,t){const[r,n]=U.useState(e);return[t===void 0?r:t,n]}function sI(e,t){const[r,n]=tI(e,t),{startOfMonth:o,endOfMonth:s}=t,i=Xg(e,r,n,t),[a,c]=Hi(i,e.month?i:void 0);U.useEffect(()=>{const w=Xg(e,r,n,t);c(w)},[e.timeZone]);const{months:u,weeks:l,days:f,previousMonth:d,nextMonth:h}=U.useMemo(()=>{const w=Q2(a,n,{numberOfMonths:e.numberOfMonths},t),_=J2(w,e.endMonth?s(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),S=eI(w,_,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),I=oI(S),v=X2(S),E=nI(a,r,e,t),P=rI(a,n,e,t);return{months:S,weeks:I,days:v,previousMonth:E,nextMonth:P}},[t,a.getTime(),n?.getTime(),r?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:p}=e,g=w=>l.some(_=>_.days.some(S=>S.isEqualTo(w))),y=w=>{if(m)return;let _=o(w);r&&_<o(r)&&(_=o(r)),n&&_>o(n)&&(_=o(n)),c(_),p?.(_)};return{months:u,weeks:l,days:f,navStart:r,navEnd:n,previousMonth:d,nextMonth:h,goToMonth:y,goToDay:w=>{g(w)||y(w.date)}}}var Rr;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Rr||(Rr={}));function Qg(e){return!e[ft.disabled]&&!e[ft.hidden]&&!e[ft.outside]}function iI(e,t,r,n){let o,s=-1;for(const i of e){const a=t(i);Qg(a)&&(a[ft.focused]&&s<Rr.FocusedModifier?(o=i,s=Rr.FocusedModifier):n?.isEqualTo(i)&&s<Rr.LastFocused?(o=i,s=Rr.LastFocused):r(i.date)&&s<Rr.Selected?(o=i,s=Rr.Selected):a[ft.today]&&s<Rr.Today&&(o=i,s=Rr.Today))}return o||(o=e.find(i=>Qg(t(i)))),o}function aI(e,t,r,n,o,s,i){const{ISOWeek:a,broadcastCalendar:c}=s,{addDays:u,addMonths:l,addWeeks:f,addYears:d,endOfBroadcastWeek:h,endOfISOWeek:m,endOfWeek:p,max:g,min:y,startOfBroadcastWeek:O,startOfISOWeek:x,startOfWeek:w}=i;let S={day:u,week:f,month:l,year:d,startOfWeek:I=>c?O(I,i):a?x(I):w(I),endOfWeek:I=>c?h(I):a?m(I):p(I)}[e](r,t==="after"?1:-1);return t==="before"&&n?S=g([n,S]):t==="after"&&o&&(S=y([o,S])),S}function ey(e,t,r,n,o,s,i,a=0){if(a>365)return;const c=aI(e,t,r.date,n,o,s,i),u=!!(s.disabled&&Qr(c,s.disabled,i)),l=!!(s.hidden&&Qr(c,s.hidden,i)),f=c,d=new Wg(c,f,i);return!u&&!l?d:ey(e,t,d,n,o,s,i,a+1)}function cI(e,t,r,n,o){const{autoFocus:s}=e,[i,a]=U.useState(),c=iI(t.days,r,n||(()=>!1),i),[u,l]=U.useState(s?c:void 0);return{isFocusTarget:p=>!!c?.isEqualTo(p),setFocused:l,focused:u,blur:()=>{a(u),l(void 0)},moveFocus:(p,g)=>{if(!u)return;const y=ey(p,g,u,t.navStart,t.navEnd,e,o);y&&(e.disableNavigation&&!t.days.some(x=>x.isEqualTo(y))||(t.goToDay(y),l(y)))}}}function lI(e,t){const{selected:r,required:n,onSelect:o}=e,[s,i]=Hi(r,o?r:void 0),a=o?r:s,{isSameDay:c}=t,u=h=>a?.some(m=>c(m,h))??!1,{min:l,max:f}=e;return{selected:a,select:(h,m,p)=>{let g=[...a??[]];if(u(h)){if(a?.length===l||n&&a?.length===1)return;g=a?.filter(y=>!c(y,h))}else a?.length===f?g=[h]:g=[...g,h];return o||i(g),o?.(g,h,m,p),g},isSelected:u}}function uI(e,t,r=0,n=0,o=!1,s=Fr){const{from:i,to:a}=t||{},{isSameDay:c,isAfter:u,isBefore:l}=s;let f;if(!i&&!a)f={from:e,to:r>0?void 0:e};else if(i&&!a)c(i,e)?r===0?f={from:i,to:e}:o?f={from:i,to:void 0}:f=void 0:l(e,i)?f={from:e,to:i}:f={from:i,to:e};else if(i&&a)if(c(i,e)&&c(a,e))o?f={from:i,to:a}:f=void 0;else if(c(i,e))f={from:i,to:r>0?void 0:e};else if(c(a,e))f={from:e,to:r>0?void 0:e};else if(l(e,i))f={from:e,to:a};else if(u(e,i))f={from:i,to:e};else if(u(e,a))f={from:i,to:e};else throw new Error("Invalid range");if(f?.from&&f?.to){const d=s.differenceInCalendarDays(f.to,f.from);n>0&&d>n?f={from:e,to:void 0}:r>1&&d<r&&(f={from:e,to:void 0})}return f}function fI(e,t,r=Fr){const n=Array.isArray(t)?t:[t];let o=e.from;const s=r.differenceInCalendarDays(e.to,e.from),i=Math.min(s,6);for(let a=0;a<=i;a++){if(n.includes(o.getDay()))return!0;o=r.addDays(o,1)}return!1}function ty(e,t,r=Fr){return Xr(e,t.from,!1,r)||Xr(e,t.to,!1,r)||Xr(t,e.from,!1,r)||Xr(t,e.to,!1,r)}function dI(e,t,r=Fr){const n=Array.isArray(t)?t:[t];if(n.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:r.isDate(a)?Xr(e,a,!1,r):$g(a,r)?a.some(c=>Xr(e,c,!1,r)):Bi(a)?a.from&&a.to?ty(e,{from:a.from,to:a.to},r):!1:zg(a)?fI(e,a.dayOfWeek,r):xl(a)?r.isAfter(a.before,a.after)?ty(e,{from:r.addDays(a.after,1),to:r.addDays(a.before,-1)},r):Qr(e.from,a,r)||Qr(e.to,a,r):El(a)||Ol(a)?Qr(e.from,a,r)||Qr(e.to,a,r):!1))return!0;const i=n.filter(a=>typeof a=="function");if(i.length){let a=e.from;const c=r.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(i.some(l=>l(a)))return!0;a=r.addDays(a,1)}}return!1}function hI(e,t){const{disabled:r,excludeDisabled:n,selected:o,required:s,onSelect:i}=e,[a,c]=Hi(o,i?o:void 0),u=i?o:a;return{selected:u,select:(d,h,m)=>{const{min:p,max:g}=e,y=d?uI(d,u,p,g,s,t):void 0;return n&&r&&y?.from&&y.to&&dI({from:y.from,to:y.to},r,t)&&(y.from=d,y.to=void 0),i||c(y),i?.(y,d,h,m),y},isSelected:d=>u&&Xr(u,d,!1,t)}}function pI(e,t){const{selected:r,required:n,onSelect:o}=e,[s,i]=Hi(r,o?r:void 0),a=o?r:s,{isSameDay:c}=t;return{selected:a,select:(f,d,h)=>{let m=f;return!n&&a&&a&&c(f,a)&&(m=void 0),o||i(m),o?.(m,f,d,h),m},isSelected:f=>a?c(a,f):!1}}function mI(e,t){const r=pI(e,t),n=lI(e,t),o=hI(e,t);switch(e.mode){case"single":return r;case"multiple":return n;case"range":return o;default:return}}function ir(e,t){return e instanceof Mt&&e.timeZone===t?e:new Mt(e,t)}function ko(e,t,r){return ir(e,t)}function ry(e,t,r){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?ko(e,t):Array.isArray(e)?e.map(n=>n instanceof Date?ko(n,t):n):Bi(e)?{...e,from:e.from?ir(e.from,t):e.from,to:e.to?ir(e.to,t):e.to}:xl(e)?{before:ko(e.before,t),after:ko(e.after,t)}:El(e)?{after:ko(e.after,t)}:Ol(e)?{before:ko(e.before,t)}:e}function Nl(e,t,r){return e&&(Array.isArray(e)?e.map(n=>ry(n,t)):ry(e,t))}function gI(e){let t=e;const r=t.timeZone;if(r&&(t={...e,timeZone:r},t.today&&(t.today=ir(t.today,r)),t.month&&(t.month=ir(t.month,r)),t.defaultMonth&&(t.defaultMonth=ir(t.defaultMonth,r)),t.startMonth&&(t.startMonth=ir(t.startMonth,r)),t.endMonth&&(t.endMonth=ir(t.endMonth,r)),t.mode==="single"&&t.selected?t.selected=ir(t.selected,r):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(_e=>ir(_e,r)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?ir(t.selected.from,r):t.selected.from,to:t.selected.to?ir(t.selected.to,r):t.selected.to}),t.disabled!==void 0&&(t.disabled=Nl(t.disabled,r)),t.hidden!==void 0&&(t.hidden=Nl(t.hidden,r)),t.modifiers)){const _e={};Object.keys(t.modifiers).forEach(De=>{_e[De]=Nl(t.modifiers?.[De],r)}),t.modifiers=_e}const{components:n,formatters:o,labels:s,dateLib:i,locale:a,classNames:c}=U.useMemo(()=>{const _e={...Rg,...t.locale},De=t.broadcastCalendar?1:t.weekStartsOn,ve=t.noonSafe&&t.timeZone?H2(t.timeZone,{weekStartsOn:De,locale:_e}):void 0,Oe=t.dateLib&&ve?{...ve,...t.dateLib}:t.dateLib??ve,Je=new Kt({locale:_e,weekStartsOn:De,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},Oe);return{dateLib:Je,components:C2(t.components),formatters:R2(t.formatters),labels:U2(t.labels,Je.options),locale:_e,classNames:{...Cl(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:i.today()});const{captionLayout:u,mode:l,navLayout:f,numberOfMonths:d=1,onDayBlur:h,onDayClick:m,onDayFocus:p,onDayKeyDown:g,onDayMouseEnter:y,onDayMouseLeave:O,onNextClick:x,onPrevClick:w,showWeekNumber:_,styles:S}=t,{formatCaption:I,formatDay:v,formatMonthDropdown:E,formatWeekNumber:P,formatWeekNumberHeader:A,formatWeekdayName:M,formatYearDropdown:F}=o,N=sI(t,i),{days:W,months:C,navStart:k,navEnd:Y,previousMonth:$,nextMonth:D,goToMonth:V}=N,Z=E2(W,t,k,Y,i),{isSelected:G,select:B,selected:L}=mI(t,i)??{},{blur:J,focused:q,isFocusTarget:oe,moveFocus:Q,setFocused:ne}=cI(t,N,Z,G??(()=>!1),i),{labelDayButton:le,labelGridcell:K,labelGrid:Se,labelMonthDropdown:Ie,labelNav:ke,labelPrevious:Ge,labelNext:Re,labelWeekday:We,labelWeekNumber:rt,labelWeekNumberHeader:nt,labelYearDropdown:R}=s,j=U.useMemo(()=>V2(i,t.ISOWeek,t.broadcastCalendar,t.today),[i,t.ISOWeek,t.broadcastCalendar,t.today]),H=l!==void 0||m!==void 0,ee=U.useCallback(()=>{$&&(V($),w?.($))},[$,V,w]),te=U.useCallback(()=>{D&&(V(D),x?.(D))},[V,D,x]),re=U.useCallback((_e,De)=>ve=>{ve.preventDefault(),ve.stopPropagation(),ne(_e),!De.disabled&&(B?.(_e.date,De,ve),m?.(_e.date,De,ve))},[B,m,ne]),ue=U.useCallback((_e,De)=>ve=>{ne(_e),p?.(_e.date,De,ve)},[p,ne]),be=U.useCallback((_e,De)=>ve=>{J(),h?.(_e.date,De,ve)},[J,h]),Ee=U.useCallback((_e,De)=>ve=>{const Oe={ArrowLeft:[ve.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[ve.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[ve.shiftKey?"year":"week","after"],ArrowUp:[ve.shiftKey?"year":"week","before"],PageUp:[ve.shiftKey?"year":"month","before"],PageDown:[ve.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Oe[ve.key]){ve.preventDefault(),ve.stopPropagation();const[Je,xe]=Oe[ve.key];Q(Je,xe)}g?.(_e.date,De,ve)},[Q,g,t.dir]),Le=U.useCallback((_e,De)=>ve=>{y?.(_e.date,De,ve)},[y]),ot=U.useCallback((_e,De)=>ve=>{O?.(_e.date,De,ve)},[O]),Qe=U.useCallback(_e=>De=>{const ve=Number(De.target.value),Oe=i.setMonth(i.startOfMonth(_e),ve);V(Oe)},[i,V]),xt=U.useCallback(_e=>De=>{const ve=Number(De.target.value),Oe=i.setYear(i.startOfMonth(_e),ve);V(Oe)},[i,V]),{className:gt,style:dt}=U.useMemo(()=>({className:[c[me.Root],t.className].filter(Boolean).join(" "),style:{...S?.[me.Root],...t.style}}),[c,t.className,t.style,S]),jt=T2(t),_r=U.useRef(null);K2(_r,!!t.animate,{classNames:c,months:C,focused:q,dateLib:i});const Sr={dayPickerProps:t,selected:L,select:B,isSelected:G,months:C,nextMonth:D,previousMonth:$,goToMonth:V,getModifiers:Z,components:n,classNames:c,styles:S,labels:s,formatters:o};return U.createElement(Lg.Provider,{value:Sr},U.createElement(n.Root,{rootRef:t.animate?_r:void 0,className:gt,style:dt,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...jt},U.createElement(n.Months,{className:c[me.Months],style:S?.[me.Months]},!t.hideNavigation&&!f&&U.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[me.Nav],style:S?.[me.Nav],"aria-label":ke(),onPreviousClick:ee,onNextClick:te,previousMonth:$,nextMonth:D}),C.map((_e,De)=>U.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:c[me.Month],style:S?.[me.Month],key:De,displayIndex:De,calendarMonth:_e},f==="around"&&!t.hideNavigation&&De===0&&U.createElement(n.PreviousMonthButton,{type:"button",className:c[me.PreviousMonthButton],tabIndex:$?void 0:-1,"aria-disabled":$?void 0:!0,"aria-label":Ge($),onClick:ee,"data-animated-button":t.animate?"true":void 0},U.createElement(n.Chevron,{disabled:$?void 0:!0,className:c[me.Chevron],orientation:t.dir==="rtl"?"right":"left"})),U.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:c[me.MonthCaption],style:S?.[me.MonthCaption],calendarMonth:_e,displayIndex:De},u?.startsWith("dropdown")?U.createElement(n.DropdownNav,{className:c[me.Dropdowns],style:S?.[me.Dropdowns]},(()=>{const ve=u==="dropdown"||u==="dropdown-months"?U.createElement(n.MonthsDropdown,{key:"month",className:c[me.MonthsDropdown],"aria-label":Ie(),classNames:c,components:n,disabled:!!t.disableNavigation,onChange:Qe(_e.date),options:Y2(_e.date,k,Y,o,i),style:S?.[me.Dropdown],value:i.getMonth(_e.date)}):U.createElement("span",{key:"month"},E(_e.date,i)),Oe=u==="dropdown"||u==="dropdown-years"?U.createElement(n.YearsDropdown,{key:"year",className:c[me.YearsDropdown],"aria-label":R(i.options),classNames:c,components:n,disabled:!!t.disableNavigation,onChange:xt(_e.date),options:B2(k,Y,o,i,!!t.reverseYears),style:S?.[me.Dropdown],value:i.getYear(_e.date)}):U.createElement("span",{key:"year"},F(_e.date,i));return i.getMonthYearOrder()==="year-first"?[Oe,ve]:[ve,Oe]})(),U.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},I(_e.date,i.options,i))):U.createElement(n.CaptionLabel,{className:c[me.CaptionLabel],role:"status","aria-live":"polite"},I(_e.date,i.options,i))),f==="around"&&!t.hideNavigation&&De===d-1&&U.createElement(n.NextMonthButton,{type:"button",className:c[me.NextMonthButton],tabIndex:D?void 0:-1,"aria-disabled":D?void 0:!0,"aria-label":Re(D),onClick:te,"data-animated-button":t.animate?"true":void 0},U.createElement(n.Chevron,{disabled:D?void 0:!0,className:c[me.Chevron],orientation:t.dir==="rtl"?"left":"right"})),De===d-1&&f==="after"&&!t.hideNavigation&&U.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[me.Nav],style:S?.[me.Nav],"aria-label":ke(),onPreviousClick:ee,onNextClick:te,previousMonth:$,nextMonth:D}),U.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":l==="multiple"||l==="range","aria-label":Se(_e.date,i.options,i)||void 0,className:c[me.MonthGrid],style:S?.[me.MonthGrid]},!t.hideWeekdays&&U.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:c[me.Weekdays],style:S?.[me.Weekdays]},_&&U.createElement(n.WeekNumberHeader,{"aria-label":nt(i.options),className:c[me.WeekNumberHeader],style:S?.[me.WeekNumberHeader],scope:"col"},A()),j.map(ve=>U.createElement(n.Weekday,{"aria-label":We(ve,i.options,i),className:c[me.Weekday],key:String(ve),style:S?.[me.Weekday],scope:"col"},M(ve,i.options,i)))),U.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:c[me.Weeks],style:S?.[me.Weeks]},_e.weeks.map(ve=>U.createElement(n.Week,{className:c[me.Week],key:ve.weekNumber,style:S?.[me.Week],week:ve},_&&U.createElement(n.WeekNumber,{week:ve,style:S?.[me.WeekNumber],"aria-label":rt(ve.weekNumber,{locale:a}),className:c[me.WeekNumber],scope:"row",role:"rowheader"},P(ve.weekNumber,i)),ve.days.map(Oe=>{const{date:Je}=Oe,xe=Z(Oe);if(xe[ft.focused]=!xe.hidden&&!!q?.isEqualTo(Oe),xe[vr.selected]=G?.(Je)||xe.selected,Bi(L)){const{from:Qt,to:Eo}=L;xe[vr.range_start]=!!(Qt&&Eo&&i.isSameDay(Je,Qt)),xe[vr.range_end]=!!(Qt&&Eo&&i.isSameDay(Je,Eo)),xe[vr.range_middle]=Xr(L,Je,!0,i)}const en=j2(xe,S,t.modifiersStyles),ct=O2(xe,c,t.modifiersClassNames),Pt=!H&&!xe.hidden?K(Je,xe,i.options,i):void 0;return U.createElement(n.Day,{key:`${Oe.isoDate}_${Oe.displayMonthId}`,day:Oe,modifiers:xe,className:ct.join(" "),style:en,role:"gridcell","aria-selected":xe.selected||void 0,"aria-label":Pt,"data-day":Oe.isoDate,"data-month":Oe.outside?Oe.dateMonthId:void 0,"data-selected":xe.selected||void 0,"data-disabled":xe.disabled||void 0,"data-hidden":xe.hidden||void 0,"data-outside":Oe.outside||void 0,"data-focused":xe.focused||void 0,"data-today":xe.today||void 0},!xe.hidden&&H?U.createElement(n.DayButton,{className:c[me.DayButton],style:S?.[me.DayButton],type:"button",day:Oe,modifiers:xe,disabled:!xe.focused&&xe.disabled||void 0,"aria-disabled":xe.focused&&xe.disabled||void 0,tabIndex:oe(Oe)?0:-1,"aria-label":le(Je,xe,i.options,i),onClick:re(Oe,xe),onBlur:be(Oe,xe),onFocus:ue(Oe,xe),onKeyDown:Ee(Oe,xe),onMouseEnter:Le(Oe,xe),onMouseLeave:ot(Oe,xe)},v(Je,i.options,i)):!xe.hidden&&v(Oe.date,i.options,i))})))))))),t.footer&&U.createElement(n.Footer,{className:c[me.Footer],style:S?.[me.Footer],role:"status","aria-live":"polite"},t.footer)))}function yI({className:e,classNames:t,showOutsideDays:r=!0,captionLayout:n="label",buttonVariant:o="ghost",formatters:s,components:i,...a}){const c=Cl();return T.jsx(gI,{showOutsideDays:r,className:Ae("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:n,formatters:{formatMonthDropdown:u=>u.toLocaleString("default",{month:"short"}),...s},classNames:{root:Ae("w-fit",c.root),months:Ae("relative flex flex-col gap-4 md:flex-row",c.months),month:Ae("flex w-full flex-col gap-4",c.month),nav:Ae("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",c.nav),button_previous:Ae(vl({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",c.button_previous),button_next:Ae(vl({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",c.button_next),month_caption:Ae("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",c.month_caption),dropdowns:Ae("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",c.dropdowns),dropdown_root:Ae("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",c.dropdown_root),dropdown:Ae("bg-popover absolute inset-0 opacity-0",c.dropdown),caption_label:Ae("select-none font-medium",n==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",c.caption_label),table:"w-full border-collapse",weekdays:Ae("flex",c.weekdays),weekday:Ae("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",c.weekday),week:Ae("mt-2 flex w-full",c.week),week_number_header:Ae("w-[--cell-size] select-none",c.week_number_header),week_number:Ae("text-muted-foreground select-none text-[0.8rem]",c.week_number),day:Ae("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",c.day),range_start:Ae("bg-accent rounded-l-md",c.range_start),range_middle:Ae("rounded-none",c.range_middle),range_end:Ae("bg-accent rounded-r-md",c.range_end),today:Ae("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",c.today),outside:Ae("text-muted-foreground aria-selected:text-muted-foreground",c.outside),disabled:Ae("text-muted-foreground opacity-50",c.disabled),hidden:Ae("invisible",c.hidden),...t},components:{Root:({className:u,rootRef:l,...f})=>T.jsx("div",{"data-slot":"calendar",ref:l,className:Ae(u),...f}),Chevron:({className:u,orientation:l,...f})=>l==="left"?T.jsx(LT,{className:Ae("size-4",u),...f}):l==="right"?T.jsx(zT,{className:Ae("size-4",u),...f}):T.jsx(Fc,{className:Ae("size-4",u),...f}),DayButton:vI,WeekNumber:({children:u,...l})=>T.jsx("td",{...l,children:T.jsx("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:u})}),...i},...a})}function vI({className:e,day:t,modifiers:r,...n}){const o=Cl(),s=b.useRef(null);return b.useEffect(()=>{r.focused&&s.current?.focus()},[r.focused]),T.jsx(vo,{ref:s,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:Ae("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",o.day,e),...n})}function bI(e){const t=wI(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),c=a.find(SI);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function wI(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=xI(o),a=kI(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Nn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _I=Symbol("radix.slottable");function SI(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_I}function kI(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function xI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Zi="Popover",[ny]=qr(Zi,[Ei]),us=Ei(),[EI,kn]=ny(Zi),oy=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=us(t),c=b.useRef(null),[u,l]=b.useState(!1),[f,d]=Rn({prop:n,defaultProp:o??!1,onChange:s,caller:Zi});return T.jsx(fm,{...a,children:T.jsx(EI,{scope:t,contentId:dn(),triggerRef:c,open:f,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:u,onCustomAnchorAdd:b.useCallback(()=>l(!0),[]),onCustomAnchorRemove:b.useCallback(()=>l(!1),[]),modal:i,children:r})})};oy.displayName=Zi;var sy="PopoverAnchor",OI=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=kn(sy,r),s=us(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return b.useEffect(()=>(i(),()=>a()),[i,a]),T.jsx(tl,{...s,...n,ref:t})});OI.displayName=sy;var iy="PopoverTrigger",ay=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=kn(iy,r),s=us(r),i=He(t,o.triggerRef),a=T.jsx(Ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":dy(o.open),...n,ref:i,onClick:Te(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:T.jsx(tl,{asChild:!0,...s,children:a})});ay.displayName=iy;var Il="PopoverPortal",[CI,TI]=ny(Il,{forceMount:void 0}),cy=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,s=kn(Il,t);return T.jsx(CI,{scope:t,forceMount:r,children:T.jsx(pn,{present:r||s.open,children:T.jsx(Oi,{asChild:!0,container:o,children:n})})})};cy.displayName=Il;var xo="PopoverContent",ly=b.forwardRef((e,t)=>{const r=TI(xo,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,s=kn(xo,e.__scopePopover);return T.jsx(pn,{present:n||s.open,children:s.modal?T.jsx(AI,{...o,ref:t}):T.jsx(MI,{...o,ref:t})})});ly.displayName=xo;var DI=bI("PopoverContent.RemoveScroll"),AI=b.forwardRef((e,t)=>{const r=kn(xo,e.__scopePopover),n=b.useRef(null),o=He(t,n),s=b.useRef(!1);return b.useEffect(()=>{const i=n.current;if(i)return nl(i)},[]),T.jsx(Ii,{as:DI,allowPinchZoom:!0,children:T.jsx(uy,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Te(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||r.triggerRef.current?.focus()}),onPointerDownOutside:Te(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,u=a.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:Te(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),MI=b.forwardRef((e,t)=>{const r=kn(xo,e.__scopePopover),n=b.useRef(!1),o=b.useRef(!1);return T.jsx(uy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(n.current||r.triggerRef.current?.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;r.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),uy=b.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:l,...f}=e,d=kn(xo,r),h=us(r);return zc(),T.jsx(pi,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:T.jsx(hi,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:l,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>d.onOpenChange(!1),children:T.jsx(dm,{"data-state":dy(d.open),role:"dialog",id:d.contentId,...h,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),fy="PopoverClose",PI=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=kn(fy,r);return T.jsx(Ne.button,{type:"button",...n,ref:t,onClick:Te(e.onClick,()=>o.onOpenChange(!1))})});PI.displayName=fy;var NI="PopoverArrow",II=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=us(r);return T.jsx(hm,{...o,...n,ref:t})});II.displayName=NI;function dy(e){return e?"open":"closed"}var FI=oy,RI=ay,WI=cy,hy=ly;const LI=FI,zI=RI,py=b.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>T.jsx(WI,{children:T.jsx(hy,{ref:o,align:t,sideOffset:r,className:Ae("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...n})}));py.displayName=hy.displayName;const $I=(e={})=>{const{field:t={},form:r={},question:n={},disabled:o=!1}=e,s=t.value||void 0,i=t.onChange,[a,c]=U.useState(!1),u=l=>{l&&(i(l),c(!1))};return T.jsxs(LI,{open:a,onOpenChange:c,children:[T.jsx(zI,{asChild:!0,children:T.jsx("div",{className:"block",children:T.jsxs(vo,{...t,type:"button",variant:"outline",className:Ae("bq-date-picker-button w-full justify-start text-left font-normal focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!t.value&&"text-muted-foreground",r.formState.errors[n.reference_id]&&"border-destructive"),disabled:o,children:[T.jsx(WT,{className:"mr-2 h-4 w-4"}),t.value?ce(t.value).format("DD/MM/YYYY"):T.jsx("span",{children:n.placeholder||"Pick a date"})]})})}),T.jsx(py,{className:"bq-date-picker-popover w-auto overflow-hidden p-0",align:"center",children:T.jsx(yI,{className:"w-56",mode:"single",selected:s,defaultMonth:s,captionLayout:"dropdown",onSelect:l=>{u(l),c(!1)}})})]})};function UI(e){const t=YI(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),c=a.find(VI);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function YI(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=HI(o),a=BI(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Nn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jI=Symbol("radix.slottable");function VI(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jI}function BI(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function HI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Gi="Dialog",[my]=qr(Gi),[ZI,wr]=my(Gi),gy=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=b.useRef(null),c=b.useRef(null),[u,l]=Rn({prop:n,defaultProp:o??!1,onChange:s,caller:Gi});return T.jsx(ZI,{scope:t,triggerRef:a,contentRef:c,contentId:dn(),titleId:dn(),descriptionId:dn(),open:u,onOpenChange:l,onOpenToggle:b.useCallback(()=>l(f=>!f),[l]),modal:i,children:r})};gy.displayName=Gi;var yy="DialogTrigger",vy=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=wr(yy,r),s=He(t,o.triggerRef);return T.jsx(Ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Wl(o.open),...n,ref:s,onClick:Te(e.onClick,o.onOpenToggle)})});vy.displayName=yy;var Fl="DialogPortal",[GI,by]=my(Fl,{forceMount:void 0}),wy=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,s=wr(Fl,t);return T.jsx(GI,{scope:t,forceMount:r,children:b.Children.map(n,i=>T.jsx(pn,{present:r||s.open,children:T.jsx(Oi,{asChild:!0,container:o,children:i})}))})};wy.displayName=Fl;var qi="DialogOverlay",_y=b.forwardRef((e,t)=>{const r=by(qi,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=wr(qi,e.__scopeDialog);return s.modal?T.jsx(pn,{present:n||s.open,children:T.jsx(KI,{...o,ref:t})}):null});_y.displayName=qi;var qI=UI("DialogOverlay.RemoveScroll"),KI=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=wr(qi,r);return T.jsx(Ii,{as:qI,allowPinchZoom:!0,shards:[o.contentRef],children:T.jsx(Ne.div,{"data-state":Wl(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),jn="DialogContent",Sy=b.forwardRef((e,t)=>{const r=by(jn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=wr(jn,e.__scopeDialog);return T.jsx(pn,{present:n||s.open,children:s.modal?T.jsx(JI,{...o,ref:t}):T.jsx(XI,{...o,ref:t})})});Sy.displayName=jn;var JI=b.forwardRef((e,t)=>{const r=wr(jn,e.__scopeDialog),n=b.useRef(null),o=He(t,r.contentRef,n);return b.useEffect(()=>{const s=n.current;if(s)return nl(s)},[]),T.jsx(ky,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Te(e.onCloseAutoFocus,s=>{s.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Te(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:Te(e.onFocusOutside,s=>s.preventDefault())})}),XI=b.forwardRef((e,t)=>{const r=wr(jn,e.__scopeDialog),n=b.useRef(!1),o=b.useRef(!1);return T.jsx(ky,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(n.current||r.triggerRef.current?.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;r.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),ky=b.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=wr(jn,r),c=b.useRef(null),u=He(t,c);return zc(),T.jsxs(T.Fragment,{children:[T.jsx(pi,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:T.jsx(hi,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Wl(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),T.jsxs(T.Fragment,{children:[T.jsx(QI,{titleId:a.titleId}),T.jsx(tF,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Rl="DialogTitle",xy=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=wr(Rl,r);return T.jsx(Ne.h2,{id:o.titleId,...n,ref:t})});xy.displayName=Rl;var Ey="DialogDescription",Oy=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=wr(Ey,r);return T.jsx(Ne.p,{id:o.descriptionId,...n,ref:t})});Oy.displayName=Ey;var Cy="DialogClose",Ty=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=wr(Cy,r);return T.jsx(Ne.button,{type:"button",...n,ref:t,onClick:Te(e.onClick,()=>o.onOpenChange(!1))})});Ty.displayName=Cy;function Wl(e){return e?"open":"closed"}var Dy="DialogTitleWarning",[zR,Ay]=LC(Dy,{contentName:jn,titleName:Rl,docsSlug:"dialog"}),QI=({titleId:e})=>{const t=Ay(Dy),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
102
+ `;let gl;function EP(e,t){return new Promise(((r,n)=>{gl||(gl=(function(i){const a=[];return a.push(i),URL.createObjectURL(new Blob(a))})(xP));const o=new Worker(gl);o.addEventListener("message",(function(i){if(t.signal&&t.signal.aborted)o.terminate();else if(i.data.progress===void 0){if(i.data.error)return n(new Error(i.data.error)),void o.terminate();r(i.data.file),o.terminate()}else t.onProgress(i.data.progress)})),o.addEventListener("error",n),t.signal&&t.signal.addEventListener("abort",(()=>{n(t.signal.reason),o.terminate()})),o.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function Ot(e,t){return new Promise((function(r,n){let o,s,i,a,c,u;if(o={...t},i=0,{onProgress:a}=o,o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,c=typeof o.useWebWorker!="boolean"||o.useWebWorker,delete o.useWebWorker,o.onProgress=h=>{i=h,typeof a=="function"&&a(i)},!(e instanceof Blob||e instanceof kP))return n(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return n(new Error("The file given is not an image"));if(u=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!c||typeof Worker!="function"||u)return gg(e,o).then((function(h){try{return s=h,d.call(this)}catch(m){return n(m)}}).bind(this),n);var l=(function(){try{return d.call(this)}catch(h){return n(h)}}).bind(this),f=function(h){try{return gg(e,o).then((function(m){try{return s=m,l()}catch(p){return n(p)}}),n)}catch(m){return n(m)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",EP(e,o).then((function(h){try{return s=h,l()}catch{return f()}}),f)}catch{f()}function d(){try{s.name=e.name,s.lastModified=e.lastModified}catch{}try{o.preserveExif&&e.type==="image/jpeg"&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(s=sg(e,s))}catch{}return r(s)}}))}Ot.getDataUrlFromFile=lg,Ot.getFilefromDataUrl=ml,Ot.loadImage=ug,Ot.drawImageInCanvas=dg,Ot.drawFileInCanvas=ji,Ot.canvasToFile=Vi,Ot.getExifOrientation=hg,Ot.handleMaxWidthOrHeight=pg,Ot.followExifOrientation=mg,Ot.cleanupCanvasMemory=Nr,Ot.isAutoOrientationInBrowser=yo,Ot.approximateBelowMaximumCanvasSizeOfBrowser=fg,Ot.copyExifWithoutOrientation=sg,Ot.getBrowserName=$n,Ot.version="2.0.2";function Ae(...e){return Oc(oi(e))}async function OP(e,t=.2,r=1920){try{const n=atob(e.split(",")[1]),o=e.split(",")[0].split(":")[1].split(";")[0],s=new ArrayBuffer(n.length),i=new Uint8Array(s);for(let l=0;l<n.length;l++)i[l]=n.charCodeAt(l);const a=new Blob([s],{type:o}),c=await Ot(a,{maxSizeMB:t,maxWidthOrHeight:r,useWebWorker:!0});return await Ot.getDataUrlFromFile(c)}catch(n){return console.error("Error compressing image:",n),e}}function yl({question:e,gid_to_ref:t,form_values:r}){const{show_if:n}=e;if(!n?.item_gid)return!0;const o=t[n.item_gid];if(!o)return!0;const s=r[o],i=n.values;return!Array.isArray(i)||i.length===0?!0:Array.isArray(s)?s.some(a=>i.includes(a)):i.includes(s)}function CP({questionnaire:e={}}){const{sections:t=[]}=e,r=[],n=t.map(o=>{const{items:s=[]}=o,i=s.map(a=>{const{reference_id:c=""}=a;return{...a,id:c,name:c}});return r.push(...i),{...o,items:i}});return{questionnaire:e,sections:n,questions:r}}const vl=yP("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),vo=b.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?vh:"button";return T.jsx(i,{className:Ae(vl({variant:t,size:r,className:e})),ref:s,...o})});vo.displayName="Button";function TP(e,t,r="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:r}).format(t).split(/\s/g).slice(2).join(" ")}const DP={},ts={};function Un(e,t){try{const n=(DP[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in ts?ts[n]:yg(n,n.split(":"))}catch{if(e in ts)return ts[e];const r=e?.match(AP);return r?yg(e,r.slice(1)):NaN}}const AP=/([+-]\d\d):?(\d\d)?/;function yg(e,t){const r=+(t[0]||0),n=+(t[1]||0),o=+(t[2]||0)/60;return ts[e]=r*60+n>0?r*60+n+o:r*60-n-o}class Ir extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Un(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),bg(this),bl(this)):this.setTime(Date.now())}static tz(t,...r){return r.length?new Ir(...r,t):new Ir(Date.now(),t)}withTimeZone(t){return new Ir(+this,t)}getTimezoneOffset(){const t=-Un(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),bl(this),+this}[Symbol.for("constructDateFrom")](t){return new Ir(+new Date(t),this.timeZone)}}const vg=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!vg.test(e))return;const t=e.replace(vg,"$1UTC");Ir.prototype[t]&&(e.startsWith("get")?Ir.prototype[e]=function(){return this.internal[t]()}:(Ir.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),MP(this),+this},Ir.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),bl(this),+this}))});function bl(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Un(e.timeZone,e)*60))}function MP(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),bg(e)}function bg(e){const t=Un(e.timeZone,e),r=t>0?Math.floor(t):Math.ceil(t),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),s=-new Date(+n).getTimezoneOffset(),i=o-s,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();i&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+i);const c=o-r;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);const u=new Date(+e);u.setUTCSeconds(0);const l=o>0?u.getSeconds():(u.getSeconds()-60)%60,f=Math.round(-(Un(e.timeZone,e)*60))%60;(f||l)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+f),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+f+l));const d=Un(e.timeZone,e),h=d>0?Math.floor(d):Math.ceil(d),p=-new Date(+e).getTimezoneOffset()-h,g=h!==r,y=p-c;if(g&&y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const O=Un(e.timeZone,e),x=O>0?Math.floor(O):Math.ceil(O),w=h-x;w&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+w),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+w))}}class Mt extends Ir{static tz(t,...r){return r.length?new Mt(...r,t):new Mt(Date.now(),t)}toISOString(){const[t,r,n]=this.tzComponents(),o=`${t}${r}:${n}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,r,n,o]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${n} ${r} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[r,n,o]=this.tzComponents();return`${t} GMT${r}${n}${o} (${TP(this.timeZone,this)})`}toLocaleString(t,r){return Date.prototype.toLocaleString.call(this,t,{...r,timeZone:r?.timeZone||this.timeZone})}toLocaleDateString(t,r){return Date.prototype.toLocaleDateString.call(this,t,{...r,timeZone:r?.timeZone||this.timeZone})}toLocaleTimeString(t,r){return Date.prototype.toLocaleTimeString.call(this,t,{...r,timeZone:r?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),r=t>0?"-":"+",n=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[r,n,o]}withTimeZone(t){return new Mt(+this,t)}[Symbol.for("constructDateFrom")](t){return new Mt(+new Date(t),this.timeZone)}}function wg(e,t,r){const n=Ke(e,r?.in);return isNaN(t)?wt(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function _g(e,t,r){const n=Ke(e,r?.in);if(isNaN(t))return wt(e,NaN);if(!t)return n;const o=n.getDate(),s=wt(e,n.getTime());s.setMonth(n.getMonth()+t+1,0);const i=s.getDate();return o>=i?s:(n.setFullYear(s.getFullYear(),s.getMonth(),o),n)}let PP={};function rs(){return PP}function bo(e,t){const r=rs(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Ke(e,t?.in),s=o.getDay(),i=(s<n?7:0)+s-n;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function ns(e,t){return bo(e,{...t,weekStartsOn:1})}function Sg(e,t){const r=Ke(e,t?.in),n=r.getFullYear(),o=wt(r,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);const s=ns(o),i=wt(r,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const a=ns(i);return r.getTime()>=s.getTime()?n+1:r.getTime()>=a.getTime()?n:n-1}function kg(e){const t=Ke(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function wo(e,...t){const r=wt.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function os(e,t){const r=Ke(e,t?.in);return r.setHours(0,0,0,0),r}function wl(e,t,r){const[n,o]=wo(r?.in,e,t),s=os(n),i=os(o),a=+s-kg(s),c=+i-kg(i);return Math.round((a-c)/gP)}function NP(e,t){const r=Sg(e,t),n=wt(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),ns(n)}function IP(e,t,r){return wg(e,t*7,r)}function FP(e,t,r){return _g(e,t*12,r)}function RP(e,t){let r,n=t?.in;return e.forEach(o=>{!n&&typeof o=="object"&&(n=wt.bind(null,o));const s=Ke(o,n);(!r||r<s||isNaN(+s))&&(r=s)}),wt(n,r||NaN)}function WP(e,t){let r,n=t?.in;return e.forEach(o=>{!n&&typeof o=="object"&&(n=wt.bind(null,o));const s=Ke(o,n);(!r||r>s||isNaN(+s))&&(r=s)}),wt(n,r||NaN)}function LP(e,t,r){const[n,o]=wo(r?.in,e,t);return+os(n)==+os(o)}function xg(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function zP(e){return!(!xg(e)&&typeof e!="number"||isNaN(+Ke(e)))}function Eg(e,t,r){const[n,o]=wo(r?.in,e,t),s=n.getFullYear()-o.getFullYear(),i=n.getMonth()-o.getMonth();return s*12+i}function $P(e,t){const r=Ke(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function Og(e,t){const[r,n]=wo(e,t.start,t.end);return{start:r,end:n}}function UP(e,t){const{start:r,end:n}=Og(t?.in,e);let o=+r>+n;const s=o?+r:+n,i=o?n:r;i.setHours(0,0,0,0),i.setDate(1);let a=1;const c=[];for(;+i<=s;)c.push(wt(r,i)),i.setMonth(i.getMonth()+a);return o?c.reverse():c}function YP(e,t){const r=Ke(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function jP(e,t){const r=Ke(e,t?.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}function Cg(e,t){const r=Ke(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function VP(e,t){const{start:r,end:n}=Og(t?.in,e);let o=+r>+n;const s=o?+r:+n,i=o?n:r;i.setHours(0,0,0,0),i.setMonth(0,1);let a=1;const c=[];for(;+i<=s;)c.push(wt(r,i)),i.setFullYear(i.getFullYear()+a);return o?c.reverse():c}function Tg(e,t){const r=rs(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Ke(e,t?.in),s=o.getDay(),i=(s<n?-7:0)+6-(s-n);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function BP(e,t){return Tg(e,{...t,weekStartsOn:1})}const HP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ZP=(e,t,r)=>{let n;const o=HP[e];return typeof o=="string"?n=o:t===1?n=o.one:n=o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function _l(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const GP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},qP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},KP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},JP={date:_l({formats:GP,defaultWidth:"full"}),time:_l({formats:qP,defaultWidth:"full"}),dateTime:_l({formats:KP,defaultWidth:"full"})},XP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},QP=(e,t,r,n)=>XP[e];function ss(e){return(t,r)=>{const n=r?.context?String(r.context):"standalone";let o;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const eN={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},tN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},rN={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},nN={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},oN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},sN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},iN={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:ss({values:eN,defaultWidth:"wide"}),quarter:ss({values:tN,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ss({values:rN,defaultWidth:"wide"}),day:ss({values:nN,defaultWidth:"wide"}),dayPeriod:ss({values:oN,defaultWidth:"wide",formattingValues:sN,defaultFormattingWidth:"wide"})};function is(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?cN(a,f=>f.test(i)):aN(a,f=>f.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;const l=t.slice(i.length);return{value:u,rest:l}}}function aN(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function cN(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function lN(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const o=n[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=r.valueCallback?r.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const uN=/^(\d+)(th|st|nd|rd)?/i,fN=/\d+/i,dN={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},hN={any:[/^b/i,/^(a|c)/i]},pN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},mN={any:[/1/i,/2/i,/3/i,/4/i]},gN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},yN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},vN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},bN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},wN={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},_N={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},SN={ordinalNumber:lN({matchPattern:uN,parsePattern:fN,valueCallback:e=>parseInt(e,10)}),era:is({matchPatterns:dN,defaultMatchWidth:"wide",parsePatterns:hN,defaultParseWidth:"any"}),quarter:is({matchPatterns:pN,defaultMatchWidth:"wide",parsePatterns:mN,defaultParseWidth:"any",valueCallback:e=>e+1}),month:is({matchPatterns:gN,defaultMatchWidth:"wide",parsePatterns:yN,defaultParseWidth:"any"}),day:is({matchPatterns:vN,defaultMatchWidth:"wide",parsePatterns:bN,defaultParseWidth:"any"}),dayPeriod:is({matchPatterns:wN,defaultMatchWidth:"any",parsePatterns:_N,defaultParseWidth:"any"})},_o={code:"en-US",formatDistance:ZP,formatLong:JP,formatRelative:QP,localize:iN,match:SN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function kN(e,t){const r=Ke(e,t?.in);return wl(r,Cg(r))+1}function Sl(e,t){const r=Ke(e,t?.in),n=+ns(r)-+NP(r);return Math.round(n/eg)+1}function Dg(e,t){const r=Ke(e,t?.in),n=r.getFullYear(),o=rs(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=wt(t?.in||e,0);i.setFullYear(n+1,0,s),i.setHours(0,0,0,0);const a=bo(i,t),c=wt(t?.in||e,0);c.setFullYear(n,0,s),c.setHours(0,0,0,0);const u=bo(c,t);return+r>=+a?n+1:+r>=+u?n:n-1}function xN(e,t){const r=rs(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=Dg(e,t),s=wt(t?.in||e,0);return s.setFullYear(o,0,n),s.setHours(0,0,0,0),bo(s,t)}function kl(e,t){const r=Ke(e,t?.in),n=+bo(r,t)-+xN(r,t);return Math.round(n/eg)+1}function Ze(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const Sn={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Ze(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Ze(r+1,2)},d(e,t){return Ze(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Ze(e.getHours()%12||12,t.length)},H(e,t){return Ze(e.getHours(),t.length)},m(e,t){return Ze(e.getMinutes(),t.length)},s(e,t){return Ze(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),o=Math.trunc(n*Math.pow(10,r-3));return Ze(o,t.length)}},So={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ag={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),o=n>0?n:1-n;return r.ordinalNumber(o,{unit:"year"})}return Sn.y(e,t)},Y:function(e,t,r,n){const o=Dg(e,n),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return Ze(i,2)}return t==="Yo"?r.ordinalNumber(s,{unit:"year"}):Ze(s,t.length)},R:function(e,t){const r=Sg(e);return Ze(r,t.length)},u:function(e,t){const r=e.getFullYear();return Ze(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Ze(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Ze(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Sn.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Ze(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const o=kl(e,n);return t==="wo"?r.ordinalNumber(o,{unit:"week"}):Ze(o,t.length)},I:function(e,t,r){const n=Sl(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Ze(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Sn.d(e,t)},D:function(e,t,r){const n=kN(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Ze(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const o=e.getDay(),s=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ze(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const o=e.getDay(),s=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ze(s,t.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),o=n===0?7:n;switch(t){case"i":return String(o);case"ii":return Ze(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let o;switch(n===12?o=So.noon:n===0?o=So.midnight:o=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let o;switch(n>=17?o=So.evening:n>=12?o=So.afternoon:n>=4?o=So.morning:o=So.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Sn.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Sn.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Ze(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Ze(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Sn.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Sn.s(e,t)},S:function(e,t){return Sn.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Pg(n);case"XXXX":case"XX":return Yn(n);default:return Yn(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Pg(n);case"xxxx":case"xx":return Yn(n);default:return Yn(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Mg(n,":");default:return"GMT"+Yn(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Mg(n,":");default:return"GMT"+Yn(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return Ze(n,t.length)},T:function(e,t,r){return Ze(+e,t.length)}};function Mg(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),s=n%60;return s===0?r+String(o):r+String(o)+t+Ze(s,2)}function Pg(e,t){return e%60===0?(e>0?"-":"+")+Ze(Math.abs(e)/60,2):Yn(e,t)}function Yn(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Ze(Math.trunc(n/60),2),s=Ze(n%60,2);return r+o+t+s}const Ng=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Ig=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},EN={p:Ig,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return Ng(e,t);let s;switch(n){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Ng(n,t)).replace("{{time}}",Ig(o,t))}},ON=/^D+$/,CN=/^Y+$/,TN=["D","DD","YY","YYYY"];function DN(e){return ON.test(e)}function AN(e){return CN.test(e)}function MN(e,t,r){const n=PN(e,t,r);if(console.warn(n),TN.includes(e))throw new RangeError(n)}function PN(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const NN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,IN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,FN=/^'([^]*?)'?$/,RN=/''/g,WN=/[a-zA-Z]/;function as(e,t,r){const n=rs(),o=r?.locale??n.locale??_o,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=Ke(e,r?.in);if(!zP(a))throw new RangeError("Invalid time value");let c=t.match(IN).map(l=>{const f=l[0];if(f==="p"||f==="P"){const d=EN[f];return d(l,o.formatLong)}return l}).join("").match(NN).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const f=l[0];if(f==="'")return{isToken:!1,value:LN(l)};if(Ag[f])return{isToken:!0,value:l};if(f.match(WN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:l}});o.localize.preprocessor&&(c=o.localize.preprocessor(a,c));const u={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return c.map(l=>{if(!l.isToken)return l.value;const f=l.value;(!r?.useAdditionalWeekYearTokens&&AN(f)||!r?.useAdditionalDayOfYearTokens&&DN(f))&&MN(f,t,String(e));const d=Ag[f[0]];return d(a,f,o.localize,u)}).join("")}function LN(e){const t=e.match(FN);return t?t[1].replace(RN,"'"):e}function zN(e,t){const r=Ke(e,t?.in),n=r.getFullYear(),o=r.getMonth(),s=wt(r,0);return s.setFullYear(n,o+1,0),s.setHours(0,0,0,0),s.getDate()}function $N(e,t){return Ke(e,t?.in).getMonth()}function UN(e,t){return+Ke(e)>+Ke(t)}function YN(e,t){return+Ke(e)<+Ke(t)}function jN(e,t,r){const[n,o]=wo(r?.in,e,t);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}function VN(e,t,r){const[n,o]=wo(r?.in,e,t);return n.getFullYear()===o.getFullYear()}function BN(e,t,r){const n=Ke(e,r?.in),o=n.getFullYear(),s=n.getDate(),i=wt(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const a=zN(i);return n.setMonth(t,Math.min(s,a)),n}function HN(e,t,r){const n=Ke(e,r?.in);return isNaN(+n)?wt(e,NaN):(n.setFullYear(t),n)}const Fg=5,ZN=4;function GN(e,t){const r=t.startOfMonth(e),n=r.getDay()>0?r.getDay():7,o=t.addDays(e,-n+1),s=t.addDays(o,Fg*7-1);return t.getMonth(e)===t.getMonth(s)?Fg:ZN}function Rg(e,t){const r=t.startOfMonth(e),n=r.getDay();return n===1?r:n===0?t.addDays(r,-6):t.addDays(r,-1*(n-1))}function qN(e,t){const r=Rg(e,t),n=GN(e,t);return t.addDays(r,n*7-1)}const Wg={..._o,labels:{labelDayButton:(e,t,r,n)=>{let o;n&&typeof n.format=="function"?o=n.format.bind(n):o=(i,a)=>as(i,a,{locale:_o,...r});let s=o(e,"PPPP");return t.today&&(s=`Today, ${s}`),t.selected&&(s=`${s}, selected`),s},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,r)=>{let n;return r&&typeof r.format=="function"?n=r.format.bind(r):n=(o,s)=>as(o,s,{locale:_o,...t}),n(e,"LLLL yyyy")},labelGridcell:(e,t,r,n)=>{let o;n&&typeof n.format=="function"?o=n.format.bind(n):o=(i,a)=>as(i,a,{locale:_o,...r});let s=o(e,"PPPP");return t?.today&&(s=`Today, ${s}`),s},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,r)=>{let n;return r&&typeof r.format=="function"?n=r.format.bind(r):n=(o,s)=>as(o,s,{locale:_o,...t}),n(e,"cccc")}}};class Kt{constructor(t,r){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?Mt.tz(this.options.timeZone):new this.Date,this.newDate=(n,o,s)=>this.overrides?.newDate?this.overrides.newDate(n,o,s):this.options.timeZone?new Mt(n,o,s,this.options.timeZone):new Date(n,o,s),this.addDays=(n,o)=>this.overrides?.addDays?this.overrides.addDays(n,o):wg(n,o),this.addMonths=(n,o)=>this.overrides?.addMonths?this.overrides.addMonths(n,o):_g(n,o),this.addWeeks=(n,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(n,o):IP(n,o),this.addYears=(n,o)=>this.overrides?.addYears?this.overrides.addYears(n,o):FP(n,o),this.differenceInCalendarDays=(n,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,o):wl(n,o),this.differenceInCalendarMonths=(n,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,o):Eg(n,o),this.eachMonthOfInterval=n=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):UP(n),this.eachYearOfInterval=n=>{const o=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(n):VP(n),s=new Set(o.map(a=>this.getYear(a)));if(s.size===o.length)return o;const i=[];return s.forEach(a=>{i.push(new Date(a,0,1))}),i},this.endOfBroadcastWeek=n=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):qN(n,this),this.endOfISOWeek=n=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(n):BP(n),this.endOfMonth=n=>this.overrides?.endOfMonth?this.overrides.endOfMonth(n):$P(n),this.endOfWeek=(n,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(n,o):Tg(n,this.options),this.endOfYear=n=>this.overrides?.endOfYear?this.overrides.endOfYear(n):jP(n),this.format=(n,o,s)=>{const i=this.overrides?.format?this.overrides.format(n,o,this.options):as(n,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=n=>this.overrides?.getISOWeek?this.overrides.getISOWeek(n):Sl(n),this.getMonth=(n,o)=>this.overrides?.getMonth?this.overrides.getMonth(n,this.options):$N(n,this.options),this.getYear=(n,o)=>this.overrides?.getYear?this.overrides.getYear(n,this.options):rg(n,this.options),this.getWeek=(n,o)=>this.overrides?.getWeek?this.overrides.getWeek(n,this.options):kl(n,this.options),this.isAfter=(n,o)=>this.overrides?.isAfter?this.overrides.isAfter(n,o):UN(n,o),this.isBefore=(n,o)=>this.overrides?.isBefore?this.overrides.isBefore(n,o):YN(n,o),this.isDate=n=>this.overrides?.isDate?this.overrides.isDate(n):xg(n),this.isSameDay=(n,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(n,o):LP(n,o),this.isSameMonth=(n,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(n,o):jN(n,o),this.isSameYear=(n,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(n,o):VN(n,o),this.max=n=>this.overrides?.max?this.overrides.max(n):RP(n),this.min=n=>this.overrides?.min?this.overrides.min(n):WP(n),this.setMonth=(n,o)=>this.overrides?.setMonth?this.overrides.setMonth(n,o):BN(n,o),this.setYear=(n,o)=>this.overrides?.setYear?this.overrides.setYear(n,o):HN(n,o),this.startOfBroadcastWeek=(n,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):Rg(n,this),this.startOfDay=n=>this.overrides?.startOfDay?this.overrides.startOfDay(n):os(n),this.startOfISOWeek=n=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(n):ns(n),this.startOfMonth=n=>this.overrides?.startOfMonth?this.overrides.startOfMonth(n):YP(n),this.startOfWeek=(n,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(n,this.options):bo(n,this.options),this.startOfYear=n=>this.overrides?.startOfYear?this.overrides.startOfYear(n):Cg(n),this.options={locale:Wg,...t},this.overrides=r}getDigitMap(){const{numerals:t="latn"}=this.options,r=new Intl.NumberFormat("en-US",{numberingSystem:t}),n={};for(let o=0;o<10;o++)n[o.toString()]=r.format(o);return n}replaceDigits(t){const r=this.getDigitMap();return t.replace(/\d/g,n=>r[n]||n)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&Kt.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:r,timeZone:n,numerals:o}=this.options,s=r?.code;if(s&&Kt.yearFirstLocales.has(s))try{return new Intl.DateTimeFormat(s,{month:"long",year:"numeric",timeZone:n,numberingSystem:o}).format(t)}catch{}const i=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,i)}}Kt.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Fr=new Kt;class Lg{constructor(t,r,n=Fr){this.date=t,this.displayMonth=r,this.outside=!!(r&&!n.isSameMonth(t,r)),this.dateLib=n,this.isoDate=n.format(t,"yyyy-MM-dd"),this.displayMonthId=n.format(r,"yyyy-MM"),this.dateMonthId=n.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class KN{constructor(t,r){this.date=t,this.weeks=r}}class JN{constructor(t,r){this.days=r,this.weekNumber=t}}function XN(e){return U.createElement("button",{...e})}function QN(e){return U.createElement("span",{...e})}function e2(e){const{size:t=24,orientation:r="left",className:n}=e;return U.createElement("svg",{className:n,width:t,height:t,viewBox:"0 0 24 24"},r==="up"&&U.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),r==="down"&&U.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),r==="left"&&U.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),r==="right"&&U.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function t2(e){const{day:t,modifiers:r,...n}=e;return U.createElement("td",{...n})}function r2(e){const{day:t,modifiers:r,...n}=e,o=U.useRef(null);return U.useEffect(()=>{r.focused&&o.current?.focus()},[r.focused]),U.createElement("button",{ref:o,...n})}var me;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(me||(me={}));var ft;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(ft||(ft={}));var vr;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(vr||(vr={}));var Jt;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Jt||(Jt={}));function n2(e){const{options:t,className:r,components:n,classNames:o,...s}=e,i=[o[me.Dropdown],r].join(" "),a=t?.find(({value:c})=>c===s.value);return U.createElement("span",{"data-disabled":s.disabled,className:o[me.DropdownRoot]},U.createElement(n.Select,{className:i,...s},t?.map(({value:c,label:u,disabled:l})=>U.createElement(n.Option,{key:c,value:c,disabled:l},u))),U.createElement("span",{className:o[me.CaptionLabel],"aria-hidden":!0},a?.label,U.createElement(n.Chevron,{orientation:"down",size:18,className:o[me.Chevron]})))}function o2(e){return U.createElement("div",{...e})}function s2(e){return U.createElement("div",{...e})}function i2(e){const{calendarMonth:t,displayIndex:r,...n}=e;return U.createElement("div",{...n},e.children)}function a2(e){const{calendarMonth:t,displayIndex:r,...n}=e;return U.createElement("div",{...n})}function c2(e){return U.createElement("table",{...e})}function l2(e){return U.createElement("div",{...e})}const zg=U.createContext(void 0);function cs(){const e=U.useContext(zg);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function u2(e){const{components:t}=cs();return U.createElement(t.Dropdown,{...e})}function f2(e){const{onPreviousClick:t,onNextClick:r,previousMonth:n,nextMonth:o,...s}=e,{components:i,classNames:a,labels:{labelPrevious:c,labelNext:u}}=cs(),l=U.useCallback(d=>{o&&r?.(d)},[o,r]),f=U.useCallback(d=>{n&&t?.(d)},[n,t]);return U.createElement("nav",{...s},U.createElement(i.PreviousMonthButton,{type:"button",className:a[me.PreviousMonthButton],tabIndex:n?void 0:-1,"aria-disabled":n?void 0:!0,"aria-label":c(n),onClick:f},U.createElement(i.Chevron,{disabled:n?void 0:!0,className:a[me.Chevron],orientation:"left"})),U.createElement(i.NextMonthButton,{type:"button",className:a[me.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:l},U.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:a[me.Chevron]})))}function d2(e){const{components:t}=cs();return U.createElement(t.Button,{...e})}function h2(e){return U.createElement("option",{...e})}function p2(e){const{components:t}=cs();return U.createElement(t.Button,{...e})}function m2(e){const{rootRef:t,...r}=e;return U.createElement("div",{...r,ref:t})}function g2(e){return U.createElement("select",{...e})}function y2(e){const{week:t,...r}=e;return U.createElement("tr",{...r})}function v2(e){return U.createElement("th",{...e})}function b2(e){return U.createElement("thead",{"aria-hidden":!0},U.createElement("tr",{...e}))}function w2(e){const{week:t,...r}=e;return U.createElement("th",{...r})}function _2(e){return U.createElement("th",{...e})}function S2(e){return U.createElement("tbody",{...e})}function k2(e){const{components:t}=cs();return U.createElement(t.Dropdown,{...e})}const x2=Object.freeze(Object.defineProperty({__proto__:null,Button:XN,CaptionLabel:QN,Chevron:e2,Day:t2,DayButton:r2,Dropdown:n2,DropdownNav:o2,Footer:s2,Month:i2,MonthCaption:a2,MonthGrid:c2,Months:l2,MonthsDropdown:u2,Nav:f2,NextMonthButton:d2,Option:h2,PreviousMonthButton:p2,Root:m2,Select:g2,Week:y2,WeekNumber:w2,WeekNumberHeader:_2,Weekday:v2,Weekdays:b2,Weeks:S2,YearsDropdown:k2},Symbol.toStringTag,{value:"Module"}));function Xr(e,t,r=!1,n=Fr){let{from:o,to:s}=e;const{differenceInCalendarDays:i,isSameDay:a}=n;return o&&s?(i(s,o)<0&&([o,s]=[s,o]),i(t,o)>=(r?1:0)&&i(s,t)>=(r?1:0)):!r&&s?a(s,t):!r&&o?a(o,t):!1}function xl(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Bi(e){return!!(e&&typeof e=="object"&&"from"in e)}function El(e){return!!(e&&typeof e=="object"&&"after"in e)}function Ol(e){return!!(e&&typeof e=="object"&&"before"in e)}function $g(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Ug(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Qr(e,t,r=Fr){const n=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:s,isAfter:i}=r;return n.some(a=>{if(typeof a=="boolean")return a;if(r.isDate(a))return o(e,a);if(Ug(a,r))return a.some(c=>o(e,c));if(Bi(a))return Xr(a,e,!1,r);if($g(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(xl(a)){const c=s(a.before,e),u=s(a.after,e),l=c>0,f=u<0;return i(a.before,a.after)?f&&l:l||f}return El(a)?s(e,a.after)>0:Ol(a)?s(a.before,e)>0:typeof a=="function"?a(e):!1})}function E2(e,t,r,n,o){const{disabled:s,hidden:i,modifiers:a,showOutsideDays:c,broadcastCalendar:u,today:l=o.today()}=t,{isSameDay:f,isSameMonth:d,startOfMonth:h,isBefore:m,endOfMonth:p,isAfter:g}=o,y=r&&h(r),O=n&&p(n),x={[ft.focused]:[],[ft.outside]:[],[ft.disabled]:[],[ft.hidden]:[],[ft.today]:[]},w={};for(const _ of e){const{date:S,displayMonth:I}=_,v=!!(I&&!d(S,I)),E=!!(y&&m(S,y)),P=!!(O&&g(S,O)),A=!!(s&&Qr(S,s,o)),M=!!(i&&Qr(S,i,o))||E||P||!u&&!c&&v||u&&c===!1&&v,F=f(S,l);v&&x.outside.push(_),A&&x.disabled.push(_),M&&x.hidden.push(_),F&&x.today.push(_),a&&Object.keys(a).forEach(N=>{const W=a?.[N];W&&Qr(S,W,o)&&(w[N]?w[N].push(_):w[N]=[_])})}return _=>{const S={[ft.focused]:!1,[ft.disabled]:!1,[ft.hidden]:!1,[ft.outside]:!1,[ft.today]:!1},I={};for(const v in x){const E=x[v];S[v]=E.some(P=>P===_)}for(const v in w)I[v]=w[v].some(E=>E===_);return{...S,...I}}}function O2(e,t,r={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[s])=>(r[s]?o.push(r[s]):t[ft[s]]?o.push(t[ft[s]]):t[vr[s]]&&o.push(t[vr[s]]),o),[t[me.Day]])}function C2(e){return{...x2,...e}}function T2(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([r,n])=>{r.startsWith("data-")&&(t[r]=n)}),t}function Cl(){const e={};for(const t in me)e[me[t]]=`rdp-${me[t]}`;for(const t in ft)e[ft[t]]=`rdp-${ft[t]}`;for(const t in vr)e[vr[t]]=`rdp-${vr[t]}`;for(const t in Jt)e[Jt[t]]=`rdp-${Jt[t]}`;return e}function Yg(e,t,r){return(r??new Kt(t)).formatMonthYear(e)}const D2=Yg;function A2(e,t,r){return(r??new Kt(t)).format(e,"d")}function M2(e,t=Fr){return t.format(e,"LLLL")}function P2(e,t,r){return(r??new Kt(t)).format(e,"cccccc")}function N2(e,t=Fr){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function I2(){return""}function jg(e,t=Fr){return t.format(e,"yyyy")}const F2=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Yg,formatDay:A2,formatMonthCaption:D2,formatMonthDropdown:M2,formatWeekNumber:N2,formatWeekNumberHeader:I2,formatWeekdayName:P2,formatYearCaption:jg,formatYearDropdown:jg},Symbol.toStringTag,{value:"Module"}));function R2(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...F2,...e}}function Tl(e,t,r,n){let o=(n??new Kt(r)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const W2=Tl;function Dl(e,t,r){return(r??new Kt(t)).formatMonthYear(e)}const L2=Dl;function Vg(e,t,r,n){let o=(n??new Kt(r)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function Bg(e){return"Choose the Month"}function Hg(){return""}const z2="Go to the Next Month";function Zg(e,t){return z2}function Gg(e){return"Go to the Previous Month"}function qg(e,t,r){return(r??new Kt(t)).format(e,"cccc")}function Kg(e,t){return`Week ${e}`}function Jg(e){return"Week Number"}function Xg(e){return"Choose the Year"}const $2=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:L2,labelDay:W2,labelDayButton:Tl,labelGrid:Dl,labelGridcell:Vg,labelMonthDropdown:Bg,labelNav:Hg,labelNext:Zg,labelPrevious:Gg,labelWeekNumber:Kg,labelWeekNumberHeader:Jg,labelWeekday:qg,labelYearDropdown:Xg},Symbol.toStringTag,{value:"Module"})),br=(e,t,r)=>t||(r?typeof r=="function"?r:(...n)=>r:e);function U2(e,t){const r=t.locale?.labels??{};return{...$2,...e??{},labelDayButton:br(Tl,e?.labelDayButton,r.labelDayButton),labelMonthDropdown:br(Bg,e?.labelMonthDropdown,r.labelMonthDropdown),labelNext:br(Zg,e?.labelNext,r.labelNext),labelPrevious:br(Gg,e?.labelPrevious,r.labelPrevious),labelWeekNumber:br(Kg,e?.labelWeekNumber,r.labelWeekNumber),labelYearDropdown:br(Xg,e?.labelYearDropdown,r.labelYearDropdown),labelGrid:br(Dl,e?.labelGrid,r.labelGrid),labelGridcell:br(Vg,e?.labelGridcell,r.labelGridcell),labelNav:br(Hg,e?.labelNav,r.labelNav),labelWeekNumberHeader:br(Jg,e?.labelWeekNumberHeader,r.labelWeekNumberHeader),labelWeekday:br(qg,e?.labelWeekday,r.labelWeekday)}}function Y2(e,t,r,n,o){const{startOfMonth:s,startOfYear:i,endOfYear:a,eachMonthOfInterval:c,getMonth:u}=o;return c({start:i(e),end:a(e)}).map(d=>{const h=n.formatMonthDropdown(d,o),m=u(d),p=t&&d<s(t)||r&&d>s(r)||!1;return{value:m,label:h,disabled:p}})}function j2(e,t={},r={}){let n={...t?.[me.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{n={...n,...r?.[o]}}),n}function V2(e,t,r,n){const o=n??e.today(),s=r?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),i=[];for(let a=0;a<7;a++){const c=e.addDays(s,a);i.push(c)}return i}function B2(e,t,r,n,o=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:i,eachYearOfInterval:a,getYear:c}=n,u=s(e),l=i(t),f=a({start:u,end:l});return o&&f.reverse(),f.map(d=>{const h=r.formatYearDropdown(d,n);return{value:c(d),label:h,disabled:!1}})}function H2(e,t={}){const{weekStartsOn:r,locale:n}=t,o=r??n?.options?.weekStartsOn??0,s=a=>{const c=typeof a=="number"||typeof a=="string"?new Date(a):a;return new Mt(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},i=a=>{const c=s(a);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>s(Mt.tz(e)),newDate:(a,c,u)=>new Mt(a,c,u,12,0,0,e),startOfDay:a=>s(a),startOfWeek:(a,c)=>{const u=s(a),l=c?.weekStartsOn??o,f=(u.getDay()-l+7)%7;return u.setDate(u.getDate()-f),u},startOfISOWeek:a=>{const c=s(a),u=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-u),c},startOfMonth:a=>{const c=s(a);return c.setDate(1),c},startOfYear:a=>{const c=s(a);return c.setMonth(0,1),c},endOfWeek:(a,c)=>{const u=s(a),d=(((c?.weekStartsOn??o)+6)%7-u.getDay()+7)%7;return u.setDate(u.getDate()+d),u},endOfISOWeek:a=>{const c=s(a),u=(7-c.getDay())%7;return c.setDate(c.getDate()+u),c},endOfMonth:a=>{const c=s(a);return c.setMonth(c.getMonth()+1,0),c},endOfYear:a=>{const c=s(a);return c.setMonth(11,31),c},eachMonthOfInterval:a=>{const c=s(a.start),u=s(a.end),l=[],f=new Mt(c.getFullYear(),c.getMonth(),1,12,0,0,e),d=u.getFullYear()*12+u.getMonth();for(;f.getFullYear()*12+f.getMonth()<=d;)l.push(new Mt(f,e)),f.setMonth(f.getMonth()+1,1);return l},addDays:(a,c)=>{const u=s(a);return u.setDate(u.getDate()+c),u},addWeeks:(a,c)=>{const u=s(a);return u.setDate(u.getDate()+c*7),u},addMonths:(a,c)=>{const u=s(a);return u.setMonth(u.getMonth()+c),u},addYears:(a,c)=>{const u=s(a);return u.setFullYear(u.getFullYear()+c),u},eachYearOfInterval:a=>{const c=s(a.start),u=s(a.end),l=[],f=new Mt(c.getFullYear(),0,1,12,0,0,e);for(;f.getFullYear()<=u.getFullYear();)l.push(new Mt(f,e)),f.setFullYear(f.getFullYear()+1,0,1);return l},getWeek:(a,c)=>{const u=i(a);return kl(u,{weekStartsOn:c?.weekStartsOn??o,firstWeekContainsDate:c?.firstWeekContainsDate??n?.options?.firstWeekContainsDate??1})},getISOWeek:a=>{const c=i(a);return Sl(c)},differenceInCalendarDays:(a,c)=>{const u=i(a),l=i(c);return wl(u,l)},differenceInCalendarMonths:(a,c)=>{const u=i(a),l=i(c);return Eg(u,l)}}}const ls=e=>e instanceof HTMLElement?e:null,Al=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Z2=e=>ls(e.querySelector("[data-animated-month]")),Ml=e=>ls(e.querySelector("[data-animated-caption]")),Pl=e=>ls(e.querySelector("[data-animated-weeks]")),G2=e=>ls(e.querySelector("[data-animated-nav]")),q2=e=>ls(e.querySelector("[data-animated-weekdays]"));function K2(e,t,{classNames:r,months:n,focused:o,dateLib:s}){const i=U.useRef(null),a=U.useRef(n),c=U.useRef(!1);U.useLayoutEffect(()=>{const u=a.current;if(a.current=n,!t||!e.current||!(e.current instanceof HTMLElement)||n.length===0||u.length===0||n.length!==u.length)return;const l=s.isSameMonth(n[0].date,u[0].date),f=s.isAfter(n[0].date,u[0].date),d=f?r[Jt.caption_after_enter]:r[Jt.caption_before_enter],h=f?r[Jt.weeks_after_enter]:r[Jt.weeks_before_enter],m=i.current,p=e.current.cloneNode(!0);if(p instanceof HTMLElement?(Al(p).forEach(x=>{if(!(x instanceof HTMLElement))return;const w=Z2(x);w&&x.contains(w)&&x.removeChild(w);const _=Ml(x);_&&_.classList.remove(d);const S=Pl(x);S&&S.classList.remove(h)}),i.current=p):i.current=null,c.current||l||o)return;const g=m instanceof HTMLElement?Al(m):[],y=Al(e.current);if(y?.every(O=>O instanceof HTMLElement)&&g&&g.every(O=>O instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const O=G2(e.current);O&&(O.style.zIndex="1"),y.forEach((x,w)=>{const _=g[w];if(!_)return;x.style.position="relative",x.style.overflow="hidden";const S=Ml(x);S&&S.classList.add(d);const I=Pl(x);I&&I.classList.add(h);const v=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),O&&(O.style.zIndex=""),S&&S.classList.remove(d),I&&I.classList.remove(h),x.style.position="",x.style.overflow="",x.contains(_)&&x.removeChild(_)};_.style.pointerEvents="none",_.style.position="absolute",_.style.overflow="hidden",_.setAttribute("aria-hidden","true");const E=q2(_);E&&(E.style.opacity="0");const P=Ml(_);P&&(P.classList.add(f?r[Jt.caption_before_exit]:r[Jt.caption_after_exit]),P.addEventListener("animationend",v));const A=Pl(_);A&&A.classList.add(f?r[Jt.weeks_before_exit]:r[Jt.weeks_after_exit]),x.insertBefore(_,x.firstChild)})}})}function J2(e,t,r,n){const o=e[0],s=e[e.length-1],{ISOWeek:i,fixedWeeks:a,broadcastCalendar:c}=r??{},{addDays:u,differenceInCalendarDays:l,differenceInCalendarMonths:f,endOfBroadcastWeek:d,endOfISOWeek:h,endOfMonth:m,endOfWeek:p,isAfter:g,startOfBroadcastWeek:y,startOfISOWeek:O,startOfWeek:x}=n,w=c?y(o,n):i?O(o):x(o),_=c?d(s):i?h(m(s)):p(m(s)),S=t&&(c?d(t):i?h(t):p(t)),I=S&&g(_,S)?S:_,v=l(I,w),E=f(s,o)+1,P=[];for(let F=0;F<=v;F++){const N=u(w,F);P.push(N)}const M=(c?35:42)*E;if(a&&P.length<M){const F=M-P.length;for(let N=0;N<F;N++){const W=u(P[P.length-1],1);P.push(W)}}return P}function X2(e){const t=[];return e.reduce((r,n)=>{const o=n.weeks.reduce((s,i)=>s.concat(i.days.slice()),t.slice());return r.concat(o.slice())},t.slice())}function Q2(e,t,r,n){const{numberOfMonths:o=1}=r,s=[];for(let i=0;i<o;i++){const a=n.addMonths(e,i);if(t&&a>t)break;s.push(a)}return s}function Qg(e,t,r,n){const{month:o,defaultMonth:s,today:i=n.today(),numberOfMonths:a=1}=e;let c=o||s||i;const{differenceInCalendarMonths:u,addMonths:l,startOfMonth:f}=n;if(r&&u(r,c)<a-1){const d=-1*(a-1);c=l(r,d)}return t&&u(c,t)<0&&(c=t),f(c)}function eI(e,t,r,n){const{addDays:o,endOfBroadcastWeek:s,endOfISOWeek:i,endOfMonth:a,endOfWeek:c,getISOWeek:u,getWeek:l,startOfBroadcastWeek:f,startOfISOWeek:d,startOfWeek:h}=n,m=e.reduce((p,g)=>{const y=r.broadcastCalendar?f(g,n):r.ISOWeek?d(g):h(g),O=r.broadcastCalendar?s(g):r.ISOWeek?i(a(g)):c(a(g)),x=t.filter(I=>I>=y&&I<=O),w=r.broadcastCalendar?35:42;if(r.fixedWeeks&&x.length<w){const I=t.filter(v=>{const E=w-x.length;return v>O&&v<=o(O,E)});x.push(...I)}const _=x.reduce((I,v)=>{const E=r.ISOWeek?u(v):l(v),P=I.find(M=>M.weekNumber===E),A=new Lg(v,g,n);return P?P.days.push(A):I.push(new JN(E,[A])),I},[]),S=new KN(g,_);return p.push(S),p},[]);return r.reverseMonths?m.reverse():m}function tI(e,t){let{startMonth:r,endMonth:n}=e;const{startOfYear:o,startOfDay:s,startOfMonth:i,endOfMonth:a,addYears:c,endOfYear:u,newDate:l,today:f}=t,{fromYear:d,toYear:h,fromMonth:m,toMonth:p}=e;!r&&m&&(r=m),!r&&d&&(r=t.newDate(d,0,1)),!n&&p&&(n=p),!n&&h&&(n=l(h,11,31));const g=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return r?r=i(r):d?r=l(d,0,1):!r&&g&&(r=o(c(e.today??f(),-100))),n?n=a(n):h?n=l(h,11,31):!n&&g&&(n=u(e.today??f())),[r&&s(r),n&&s(n)]}function rI(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s=1}=r,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:c}=n,u=o?s:1,l=i(e);if(!t)return a(l,u);if(!(c(t,e)<s))return a(l,u)}function nI(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s}=r,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:c}=n,u=o?s??1:1,l=i(e);if(!t)return a(l,-u);if(!(c(l,t)<=0))return a(l,-u)}function oI(e){const t=[];return e.reduce((r,n)=>r.concat(n.weeks.slice()),t.slice())}function Hi(e,t){const[r,n]=U.useState(e);return[t===void 0?r:t,n]}function sI(e,t){const[r,n]=tI(e,t),{startOfMonth:o,endOfMonth:s}=t,i=Qg(e,r,n,t),[a,c]=Hi(i,e.month?i:void 0);U.useEffect(()=>{const w=Qg(e,r,n,t);c(w)},[e.timeZone]);const{months:u,weeks:l,days:f,previousMonth:d,nextMonth:h}=U.useMemo(()=>{const w=Q2(a,n,{numberOfMonths:e.numberOfMonths},t),_=J2(w,e.endMonth?s(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),S=eI(w,_,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),I=oI(S),v=X2(S),E=nI(a,r,e,t),P=rI(a,n,e,t);return{months:S,weeks:I,days:v,previousMonth:E,nextMonth:P}},[t,a.getTime(),n?.getTime(),r?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:p}=e,g=w=>l.some(_=>_.days.some(S=>S.isEqualTo(w))),y=w=>{if(m)return;let _=o(w);r&&_<o(r)&&(_=o(r)),n&&_>o(n)&&(_=o(n)),c(_),p?.(_)};return{months:u,weeks:l,days:f,navStart:r,navEnd:n,previousMonth:d,nextMonth:h,goToMonth:y,goToDay:w=>{g(w)||y(w.date)}}}var Rr;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Rr||(Rr={}));function ey(e){return!e[ft.disabled]&&!e[ft.hidden]&&!e[ft.outside]}function iI(e,t,r,n){let o,s=-1;for(const i of e){const a=t(i);ey(a)&&(a[ft.focused]&&s<Rr.FocusedModifier?(o=i,s=Rr.FocusedModifier):n?.isEqualTo(i)&&s<Rr.LastFocused?(o=i,s=Rr.LastFocused):r(i.date)&&s<Rr.Selected?(o=i,s=Rr.Selected):a[ft.today]&&s<Rr.Today&&(o=i,s=Rr.Today))}return o||(o=e.find(i=>ey(t(i)))),o}function aI(e,t,r,n,o,s,i){const{ISOWeek:a,broadcastCalendar:c}=s,{addDays:u,addMonths:l,addWeeks:f,addYears:d,endOfBroadcastWeek:h,endOfISOWeek:m,endOfWeek:p,max:g,min:y,startOfBroadcastWeek:O,startOfISOWeek:x,startOfWeek:w}=i;let S={day:u,week:f,month:l,year:d,startOfWeek:I=>c?O(I,i):a?x(I):w(I),endOfWeek:I=>c?h(I):a?m(I):p(I)}[e](r,t==="after"?1:-1);return t==="before"&&n?S=g([n,S]):t==="after"&&o&&(S=y([o,S])),S}function ty(e,t,r,n,o,s,i,a=0){if(a>365)return;const c=aI(e,t,r.date,n,o,s,i),u=!!(s.disabled&&Qr(c,s.disabled,i)),l=!!(s.hidden&&Qr(c,s.hidden,i)),f=c,d=new Lg(c,f,i);return!u&&!l?d:ty(e,t,d,n,o,s,i,a+1)}function cI(e,t,r,n,o){const{autoFocus:s}=e,[i,a]=U.useState(),c=iI(t.days,r,n||(()=>!1),i),[u,l]=U.useState(s?c:void 0);return{isFocusTarget:p=>!!c?.isEqualTo(p),setFocused:l,focused:u,blur:()=>{a(u),l(void 0)},moveFocus:(p,g)=>{if(!u)return;const y=ty(p,g,u,t.navStart,t.navEnd,e,o);y&&(e.disableNavigation&&!t.days.some(x=>x.isEqualTo(y))||(t.goToDay(y),l(y)))}}}function lI(e,t){const{selected:r,required:n,onSelect:o}=e,[s,i]=Hi(r,o?r:void 0),a=o?r:s,{isSameDay:c}=t,u=h=>a?.some(m=>c(m,h))??!1,{min:l,max:f}=e;return{selected:a,select:(h,m,p)=>{let g=[...a??[]];if(u(h)){if(a?.length===l||n&&a?.length===1)return;g=a?.filter(y=>!c(y,h))}else a?.length===f?g=[h]:g=[...g,h];return o||i(g),o?.(g,h,m,p),g},isSelected:u}}function uI(e,t,r=0,n=0,o=!1,s=Fr){const{from:i,to:a}=t||{},{isSameDay:c,isAfter:u,isBefore:l}=s;let f;if(!i&&!a)f={from:e,to:r>0?void 0:e};else if(i&&!a)c(i,e)?r===0?f={from:i,to:e}:o?f={from:i,to:void 0}:f=void 0:l(e,i)?f={from:e,to:i}:f={from:i,to:e};else if(i&&a)if(c(i,e)&&c(a,e))o?f={from:i,to:a}:f=void 0;else if(c(i,e))f={from:i,to:r>0?void 0:e};else if(c(a,e))f={from:e,to:r>0?void 0:e};else if(l(e,i))f={from:e,to:a};else if(u(e,i))f={from:i,to:e};else if(u(e,a))f={from:i,to:e};else throw new Error("Invalid range");if(f?.from&&f?.to){const d=s.differenceInCalendarDays(f.to,f.from);n>0&&d>n?f={from:e,to:void 0}:r>1&&d<r&&(f={from:e,to:void 0})}return f}function fI(e,t,r=Fr){const n=Array.isArray(t)?t:[t];let o=e.from;const s=r.differenceInCalendarDays(e.to,e.from),i=Math.min(s,6);for(let a=0;a<=i;a++){if(n.includes(o.getDay()))return!0;o=r.addDays(o,1)}return!1}function ry(e,t,r=Fr){return Xr(e,t.from,!1,r)||Xr(e,t.to,!1,r)||Xr(t,e.from,!1,r)||Xr(t,e.to,!1,r)}function dI(e,t,r=Fr){const n=Array.isArray(t)?t:[t];if(n.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:r.isDate(a)?Xr(e,a,!1,r):Ug(a,r)?a.some(c=>Xr(e,c,!1,r)):Bi(a)?a.from&&a.to?ry(e,{from:a.from,to:a.to},r):!1:$g(a)?fI(e,a.dayOfWeek,r):xl(a)?r.isAfter(a.before,a.after)?ry(e,{from:r.addDays(a.after,1),to:r.addDays(a.before,-1)},r):Qr(e.from,a,r)||Qr(e.to,a,r):El(a)||Ol(a)?Qr(e.from,a,r)||Qr(e.to,a,r):!1))return!0;const i=n.filter(a=>typeof a=="function");if(i.length){let a=e.from;const c=r.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(i.some(l=>l(a)))return!0;a=r.addDays(a,1)}}return!1}function hI(e,t){const{disabled:r,excludeDisabled:n,selected:o,required:s,onSelect:i}=e,[a,c]=Hi(o,i?o:void 0),u=i?o:a;return{selected:u,select:(d,h,m)=>{const{min:p,max:g}=e,y=d?uI(d,u,p,g,s,t):void 0;return n&&r&&y?.from&&y.to&&dI({from:y.from,to:y.to},r,t)&&(y.from=d,y.to=void 0),i||c(y),i?.(y,d,h,m),y},isSelected:d=>u&&Xr(u,d,!1,t)}}function pI(e,t){const{selected:r,required:n,onSelect:o}=e,[s,i]=Hi(r,o?r:void 0),a=o?r:s,{isSameDay:c}=t;return{selected:a,select:(f,d,h)=>{let m=f;return!n&&a&&a&&c(f,a)&&(m=void 0),o||i(m),o?.(m,f,d,h),m},isSelected:f=>a?c(a,f):!1}}function mI(e,t){const r=pI(e,t),n=lI(e,t),o=hI(e,t);switch(e.mode){case"single":return r;case"multiple":return n;case"range":return o;default:return}}function ir(e,t){return e instanceof Mt&&e.timeZone===t?e:new Mt(e,t)}function ko(e,t,r){return ir(e,t)}function ny(e,t,r){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?ko(e,t):Array.isArray(e)?e.map(n=>n instanceof Date?ko(n,t):n):Bi(e)?{...e,from:e.from?ir(e.from,t):e.from,to:e.to?ir(e.to,t):e.to}:xl(e)?{before:ko(e.before,t),after:ko(e.after,t)}:El(e)?{after:ko(e.after,t)}:Ol(e)?{before:ko(e.before,t)}:e}function Nl(e,t,r){return e&&(Array.isArray(e)?e.map(n=>ny(n,t)):ny(e,t))}function gI(e){let t=e;const r=t.timeZone;if(r&&(t={...e,timeZone:r},t.today&&(t.today=ir(t.today,r)),t.month&&(t.month=ir(t.month,r)),t.defaultMonth&&(t.defaultMonth=ir(t.defaultMonth,r)),t.startMonth&&(t.startMonth=ir(t.startMonth,r)),t.endMonth&&(t.endMonth=ir(t.endMonth,r)),t.mode==="single"&&t.selected?t.selected=ir(t.selected,r):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(_e=>ir(_e,r)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?ir(t.selected.from,r):t.selected.from,to:t.selected.to?ir(t.selected.to,r):t.selected.to}),t.disabled!==void 0&&(t.disabled=Nl(t.disabled,r)),t.hidden!==void 0&&(t.hidden=Nl(t.hidden,r)),t.modifiers)){const _e={};Object.keys(t.modifiers).forEach(De=>{_e[De]=Nl(t.modifiers?.[De],r)}),t.modifiers=_e}const{components:n,formatters:o,labels:s,dateLib:i,locale:a,classNames:c}=U.useMemo(()=>{const _e={...Wg,...t.locale},De=t.broadcastCalendar?1:t.weekStartsOn,ve=t.noonSafe&&t.timeZone?H2(t.timeZone,{weekStartsOn:De,locale:_e}):void 0,Oe=t.dateLib&&ve?{...ve,...t.dateLib}:t.dateLib??ve,Je=new Kt({locale:_e,weekStartsOn:De,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},Oe);return{dateLib:Je,components:C2(t.components),formatters:R2(t.formatters),labels:U2(t.labels,Je.options),locale:_e,classNames:{...Cl(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:i.today()});const{captionLayout:u,mode:l,navLayout:f,numberOfMonths:d=1,onDayBlur:h,onDayClick:m,onDayFocus:p,onDayKeyDown:g,onDayMouseEnter:y,onDayMouseLeave:O,onNextClick:x,onPrevClick:w,showWeekNumber:_,styles:S}=t,{formatCaption:I,formatDay:v,formatMonthDropdown:E,formatWeekNumber:P,formatWeekNumberHeader:A,formatWeekdayName:M,formatYearDropdown:F}=o,N=sI(t,i),{days:W,months:C,navStart:k,navEnd:Y,previousMonth:$,nextMonth:D,goToMonth:V}=N,Z=E2(W,t,k,Y,i),{isSelected:G,select:B,selected:L}=mI(t,i)??{},{blur:J,focused:q,isFocusTarget:oe,moveFocus:Q,setFocused:ne}=cI(t,N,Z,G??(()=>!1),i),{labelDayButton:le,labelGridcell:K,labelGrid:Se,labelMonthDropdown:Ie,labelNav:ke,labelPrevious:Ge,labelNext:Re,labelWeekday:We,labelWeekNumber:rt,labelWeekNumberHeader:nt,labelYearDropdown:R}=s,j=U.useMemo(()=>V2(i,t.ISOWeek,t.broadcastCalendar,t.today),[i,t.ISOWeek,t.broadcastCalendar,t.today]),H=l!==void 0||m!==void 0,ee=U.useCallback(()=>{$&&(V($),w?.($))},[$,V,w]),te=U.useCallback(()=>{D&&(V(D),x?.(D))},[V,D,x]),re=U.useCallback((_e,De)=>ve=>{ve.preventDefault(),ve.stopPropagation(),ne(_e),!De.disabled&&(B?.(_e.date,De,ve),m?.(_e.date,De,ve))},[B,m,ne]),ue=U.useCallback((_e,De)=>ve=>{ne(_e),p?.(_e.date,De,ve)},[p,ne]),be=U.useCallback((_e,De)=>ve=>{J(),h?.(_e.date,De,ve)},[J,h]),Ee=U.useCallback((_e,De)=>ve=>{const Oe={ArrowLeft:[ve.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[ve.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[ve.shiftKey?"year":"week","after"],ArrowUp:[ve.shiftKey?"year":"week","before"],PageUp:[ve.shiftKey?"year":"month","before"],PageDown:[ve.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Oe[ve.key]){ve.preventDefault(),ve.stopPropagation();const[Je,xe]=Oe[ve.key];Q(Je,xe)}g?.(_e.date,De,ve)},[Q,g,t.dir]),Le=U.useCallback((_e,De)=>ve=>{y?.(_e.date,De,ve)},[y]),ot=U.useCallback((_e,De)=>ve=>{O?.(_e.date,De,ve)},[O]),Qe=U.useCallback(_e=>De=>{const ve=Number(De.target.value),Oe=i.setMonth(i.startOfMonth(_e),ve);V(Oe)},[i,V]),xt=U.useCallback(_e=>De=>{const ve=Number(De.target.value),Oe=i.setYear(i.startOfMonth(_e),ve);V(Oe)},[i,V]),{className:gt,style:dt}=U.useMemo(()=>({className:[c[me.Root],t.className].filter(Boolean).join(" "),style:{...S?.[me.Root],...t.style}}),[c,t.className,t.style,S]),jt=T2(t),_r=U.useRef(null);K2(_r,!!t.animate,{classNames:c,months:C,focused:q,dateLib:i});const Sr={dayPickerProps:t,selected:L,select:B,isSelected:G,months:C,nextMonth:D,previousMonth:$,goToMonth:V,getModifiers:Z,components:n,classNames:c,styles:S,labels:s,formatters:o};return U.createElement(zg.Provider,{value:Sr},U.createElement(n.Root,{rootRef:t.animate?_r:void 0,className:gt,style:dt,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...jt},U.createElement(n.Months,{className:c[me.Months],style:S?.[me.Months]},!t.hideNavigation&&!f&&U.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[me.Nav],style:S?.[me.Nav],"aria-label":ke(),onPreviousClick:ee,onNextClick:te,previousMonth:$,nextMonth:D}),C.map((_e,De)=>U.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:c[me.Month],style:S?.[me.Month],key:De,displayIndex:De,calendarMonth:_e},f==="around"&&!t.hideNavigation&&De===0&&U.createElement(n.PreviousMonthButton,{type:"button",className:c[me.PreviousMonthButton],tabIndex:$?void 0:-1,"aria-disabled":$?void 0:!0,"aria-label":Ge($),onClick:ee,"data-animated-button":t.animate?"true":void 0},U.createElement(n.Chevron,{disabled:$?void 0:!0,className:c[me.Chevron],orientation:t.dir==="rtl"?"right":"left"})),U.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:c[me.MonthCaption],style:S?.[me.MonthCaption],calendarMonth:_e,displayIndex:De},u?.startsWith("dropdown")?U.createElement(n.DropdownNav,{className:c[me.Dropdowns],style:S?.[me.Dropdowns]},(()=>{const ve=u==="dropdown"||u==="dropdown-months"?U.createElement(n.MonthsDropdown,{key:"month",className:c[me.MonthsDropdown],"aria-label":Ie(),classNames:c,components:n,disabled:!!t.disableNavigation,onChange:Qe(_e.date),options:Y2(_e.date,k,Y,o,i),style:S?.[me.Dropdown],value:i.getMonth(_e.date)}):U.createElement("span",{key:"month"},E(_e.date,i)),Oe=u==="dropdown"||u==="dropdown-years"?U.createElement(n.YearsDropdown,{key:"year",className:c[me.YearsDropdown],"aria-label":R(i.options),classNames:c,components:n,disabled:!!t.disableNavigation,onChange:xt(_e.date),options:B2(k,Y,o,i,!!t.reverseYears),style:S?.[me.Dropdown],value:i.getYear(_e.date)}):U.createElement("span",{key:"year"},F(_e.date,i));return i.getMonthYearOrder()==="year-first"?[Oe,ve]:[ve,Oe]})(),U.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},I(_e.date,i.options,i))):U.createElement(n.CaptionLabel,{className:c[me.CaptionLabel],role:"status","aria-live":"polite"},I(_e.date,i.options,i))),f==="around"&&!t.hideNavigation&&De===d-1&&U.createElement(n.NextMonthButton,{type:"button",className:c[me.NextMonthButton],tabIndex:D?void 0:-1,"aria-disabled":D?void 0:!0,"aria-label":Re(D),onClick:te,"data-animated-button":t.animate?"true":void 0},U.createElement(n.Chevron,{disabled:D?void 0:!0,className:c[me.Chevron],orientation:t.dir==="rtl"?"left":"right"})),De===d-1&&f==="after"&&!t.hideNavigation&&U.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[me.Nav],style:S?.[me.Nav],"aria-label":ke(),onPreviousClick:ee,onNextClick:te,previousMonth:$,nextMonth:D}),U.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":l==="multiple"||l==="range","aria-label":Se(_e.date,i.options,i)||void 0,className:c[me.MonthGrid],style:S?.[me.MonthGrid]},!t.hideWeekdays&&U.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:c[me.Weekdays],style:S?.[me.Weekdays]},_&&U.createElement(n.WeekNumberHeader,{"aria-label":nt(i.options),className:c[me.WeekNumberHeader],style:S?.[me.WeekNumberHeader],scope:"col"},A()),j.map(ve=>U.createElement(n.Weekday,{"aria-label":We(ve,i.options,i),className:c[me.Weekday],key:String(ve),style:S?.[me.Weekday],scope:"col"},M(ve,i.options,i)))),U.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:c[me.Weeks],style:S?.[me.Weeks]},_e.weeks.map(ve=>U.createElement(n.Week,{className:c[me.Week],key:ve.weekNumber,style:S?.[me.Week],week:ve},_&&U.createElement(n.WeekNumber,{week:ve,style:S?.[me.WeekNumber],"aria-label":rt(ve.weekNumber,{locale:a}),className:c[me.WeekNumber],scope:"row",role:"rowheader"},P(ve.weekNumber,i)),ve.days.map(Oe=>{const{date:Je}=Oe,xe=Z(Oe);if(xe[ft.focused]=!xe.hidden&&!!q?.isEqualTo(Oe),xe[vr.selected]=G?.(Je)||xe.selected,Bi(L)){const{from:Qt,to:Eo}=L;xe[vr.range_start]=!!(Qt&&Eo&&i.isSameDay(Je,Qt)),xe[vr.range_end]=!!(Qt&&Eo&&i.isSameDay(Je,Eo)),xe[vr.range_middle]=Xr(L,Je,!0,i)}const en=j2(xe,S,t.modifiersStyles),ct=O2(xe,c,t.modifiersClassNames),Pt=!H&&!xe.hidden?K(Je,xe,i.options,i):void 0;return U.createElement(n.Day,{key:`${Oe.isoDate}_${Oe.displayMonthId}`,day:Oe,modifiers:xe,className:ct.join(" "),style:en,role:"gridcell","aria-selected":xe.selected||void 0,"aria-label":Pt,"data-day":Oe.isoDate,"data-month":Oe.outside?Oe.dateMonthId:void 0,"data-selected":xe.selected||void 0,"data-disabled":xe.disabled||void 0,"data-hidden":xe.hidden||void 0,"data-outside":Oe.outside||void 0,"data-focused":xe.focused||void 0,"data-today":xe.today||void 0},!xe.hidden&&H?U.createElement(n.DayButton,{className:c[me.DayButton],style:S?.[me.DayButton],type:"button",day:Oe,modifiers:xe,disabled:!xe.focused&&xe.disabled||void 0,"aria-disabled":xe.focused&&xe.disabled||void 0,tabIndex:oe(Oe)?0:-1,"aria-label":le(Je,xe,i.options,i),onClick:re(Oe,xe),onBlur:be(Oe,xe),onFocus:ue(Oe,xe),onKeyDown:Ee(Oe,xe),onMouseEnter:Le(Oe,xe),onMouseLeave:ot(Oe,xe)},v(Je,i.options,i)):!xe.hidden&&v(Oe.date,i.options,i))})))))))),t.footer&&U.createElement(n.Footer,{className:c[me.Footer],style:S?.[me.Footer],role:"status","aria-live":"polite"},t.footer)))}function yI({className:e,classNames:t,showOutsideDays:r=!0,captionLayout:n="label",buttonVariant:o="ghost",formatters:s,components:i,...a}){const c=Cl();return T.jsx(gI,{showOutsideDays:r,className:Ae("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:n,formatters:{formatMonthDropdown:u=>u.toLocaleString("default",{month:"short"}),...s},classNames:{root:Ae("w-fit",c.root),months:Ae("relative flex flex-col gap-4 md:flex-row",c.months),month:Ae("flex w-full flex-col gap-4",c.month),nav:Ae("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",c.nav),button_previous:Ae(vl({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",c.button_previous),button_next:Ae(vl({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",c.button_next),month_caption:Ae("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",c.month_caption),dropdowns:Ae("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",c.dropdowns),dropdown_root:Ae("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",c.dropdown_root),dropdown:Ae("bg-popover absolute inset-0 opacity-0",c.dropdown),caption_label:Ae("select-none font-medium",n==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",c.caption_label),table:"w-full border-collapse",weekdays:Ae("flex",c.weekdays),weekday:Ae("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",c.weekday),week:Ae("mt-2 flex w-full",c.week),week_number_header:Ae("w-[--cell-size] select-none",c.week_number_header),week_number:Ae("text-muted-foreground select-none text-[0.8rem]",c.week_number),day:Ae("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",c.day),range_start:Ae("bg-accent rounded-l-md",c.range_start),range_middle:Ae("rounded-none",c.range_middle),range_end:Ae("bg-accent rounded-r-md",c.range_end),today:Ae("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",c.today),outside:Ae("text-muted-foreground aria-selected:text-muted-foreground",c.outside),disabled:Ae("text-muted-foreground opacity-50",c.disabled),hidden:Ae("invisible",c.hidden),...t},components:{Root:({className:u,rootRef:l,...f})=>T.jsx("div",{"data-slot":"calendar",ref:l,className:Ae(u),...f}),Chevron:({className:u,orientation:l,...f})=>l==="left"?T.jsx(zT,{className:Ae("size-4",u),...f}):l==="right"?T.jsx($T,{className:Ae("size-4",u),...f}):T.jsx(Fc,{className:Ae("size-4",u),...f}),DayButton:vI,WeekNumber:({children:u,...l})=>T.jsx("td",{...l,children:T.jsx("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:u})}),...i},...a})}function vI({className:e,day:t,modifiers:r,...n}){const o=Cl(),s=b.useRef(null);return b.useEffect(()=>{r.focused&&s.current?.focus()},[r.focused]),T.jsx(vo,{ref:s,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:Ae("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",o.day,e),...n})}function bI(e){const t=wI(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),c=a.find(SI);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function wI(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=xI(o),a=kI(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Nn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _I=Symbol("radix.slottable");function SI(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_I}function kI(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function xI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Zi="Popover",[oy]=qr(Zi,[Ei]),us=Ei(),[EI,kn]=oy(Zi),sy=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=us(t),c=b.useRef(null),[u,l]=b.useState(!1),[f,d]=Rn({prop:n,defaultProp:o??!1,onChange:s,caller:Zi});return T.jsx(fm,{...a,children:T.jsx(EI,{scope:t,contentId:dn(),triggerRef:c,open:f,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:u,onCustomAnchorAdd:b.useCallback(()=>l(!0),[]),onCustomAnchorRemove:b.useCallback(()=>l(!1),[]),modal:i,children:r})})};sy.displayName=Zi;var iy="PopoverAnchor",OI=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=kn(iy,r),s=us(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return b.useEffect(()=>(i(),()=>a()),[i,a]),T.jsx(tl,{...s,...n,ref:t})});OI.displayName=iy;var ay="PopoverTrigger",cy=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=kn(ay,r),s=us(r),i=He(t,o.triggerRef),a=T.jsx(Ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":hy(o.open),...n,ref:i,onClick:Te(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:T.jsx(tl,{asChild:!0,...s,children:a})});cy.displayName=ay;var Il="PopoverPortal",[CI,TI]=oy(Il,{forceMount:void 0}),ly=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,s=kn(Il,t);return T.jsx(CI,{scope:t,forceMount:r,children:T.jsx(pn,{present:r||s.open,children:T.jsx(Oi,{asChild:!0,container:o,children:n})})})};ly.displayName=Il;var xo="PopoverContent",uy=b.forwardRef((e,t)=>{const r=TI(xo,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,s=kn(xo,e.__scopePopover);return T.jsx(pn,{present:n||s.open,children:s.modal?T.jsx(AI,{...o,ref:t}):T.jsx(MI,{...o,ref:t})})});uy.displayName=xo;var DI=bI("PopoverContent.RemoveScroll"),AI=b.forwardRef((e,t)=>{const r=kn(xo,e.__scopePopover),n=b.useRef(null),o=He(t,n),s=b.useRef(!1);return b.useEffect(()=>{const i=n.current;if(i)return nl(i)},[]),T.jsx(Ii,{as:DI,allowPinchZoom:!0,children:T.jsx(fy,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Te(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||r.triggerRef.current?.focus()}),onPointerDownOutside:Te(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,u=a.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:Te(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),MI=b.forwardRef((e,t)=>{const r=kn(xo,e.__scopePopover),n=b.useRef(!1),o=b.useRef(!1);return T.jsx(fy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(n.current||r.triggerRef.current?.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;r.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),fy=b.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:l,...f}=e,d=kn(xo,r),h=us(r);return zc(),T.jsx(pi,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:T.jsx(hi,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:l,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>d.onOpenChange(!1),children:T.jsx(dm,{"data-state":hy(d.open),role:"dialog",id:d.contentId,...h,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),dy="PopoverClose",PI=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=kn(dy,r);return T.jsx(Ne.button,{type:"button",...n,ref:t,onClick:Te(e.onClick,()=>o.onOpenChange(!1))})});PI.displayName=dy;var NI="PopoverArrow",II=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=us(r);return T.jsx(hm,{...o,...n,ref:t})});II.displayName=NI;function hy(e){return e?"open":"closed"}var FI=sy,RI=cy,WI=ly,py=uy;const LI=FI,zI=RI,my=b.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>T.jsx(WI,{children:T.jsx(py,{ref:o,align:t,sideOffset:r,className:Ae("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...n})}));my.displayName=py.displayName;const $I=(e={})=>{const{field:t={},form:r={},question:n={},disabled:o=!1}=e,s=rg(new Date),i=s+(n.min_year_offset??-100),a=s+(n.max_year_offset??0),c=t.value||void 0,u=t.onChange,[l,f]=U.useState(!1),d=h=>{h&&(u(h),f(!1))};return T.jsxs(LI,{open:l,onOpenChange:f,children:[T.jsx(zI,{asChild:!0,children:T.jsx("div",{className:"block",children:T.jsxs(vo,{...t,type:"button",variant:"outline",className:Ae("bq-date-picker-button w-full justify-start text-left font-normal focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!t.value&&"text-muted-foreground",r.formState.errors[n.reference_id]&&"border-destructive"),disabled:o,children:[T.jsx(LT,{className:"mr-2 h-4 w-4"}),t.value?ce(t.value).format("DD/MM/YYYY"):T.jsx("span",{children:n.placeholder||"Pick a date"})]})})}),T.jsx(my,{className:"bq-date-picker-popover w-auto overflow-hidden p-0",align:"center",children:T.jsx(yI,{className:"w-56",mode:"single",selected:c,defaultMonth:c,captionLayout:"dropdown",startMonth:new Date(i,0),endMonth:new Date(a,11),onSelect:h=>{d(h),f(!1)}})})]})};function UI(e){const t=YI(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),c=a.find(VI);if(c){const u=c.props.children,l=a.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return T.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return T.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function YI(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=HI(o),a=BI(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Nn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jI=Symbol("radix.slottable");function VI(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jI}function BI(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function HI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Gi="Dialog",[gy]=qr(Gi),[ZI,wr]=gy(Gi),yy=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=b.useRef(null),c=b.useRef(null),[u,l]=Rn({prop:n,defaultProp:o??!1,onChange:s,caller:Gi});return T.jsx(ZI,{scope:t,triggerRef:a,contentRef:c,contentId:dn(),titleId:dn(),descriptionId:dn(),open:u,onOpenChange:l,onOpenToggle:b.useCallback(()=>l(f=>!f),[l]),modal:i,children:r})};yy.displayName=Gi;var vy="DialogTrigger",by=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=wr(vy,r),s=He(t,o.triggerRef);return T.jsx(Ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Wl(o.open),...n,ref:s,onClick:Te(e.onClick,o.onOpenToggle)})});by.displayName=vy;var Fl="DialogPortal",[GI,wy]=gy(Fl,{forceMount:void 0}),_y=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,s=wr(Fl,t);return T.jsx(GI,{scope:t,forceMount:r,children:b.Children.map(n,i=>T.jsx(pn,{present:r||s.open,children:T.jsx(Oi,{asChild:!0,container:o,children:i})}))})};_y.displayName=Fl;var qi="DialogOverlay",Sy=b.forwardRef((e,t)=>{const r=wy(qi,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=wr(qi,e.__scopeDialog);return s.modal?T.jsx(pn,{present:n||s.open,children:T.jsx(KI,{...o,ref:t})}):null});Sy.displayName=qi;var qI=UI("DialogOverlay.RemoveScroll"),KI=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=wr(qi,r);return T.jsx(Ii,{as:qI,allowPinchZoom:!0,shards:[o.contentRef],children:T.jsx(Ne.div,{"data-state":Wl(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),jn="DialogContent",ky=b.forwardRef((e,t)=>{const r=wy(jn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=wr(jn,e.__scopeDialog);return T.jsx(pn,{present:n||s.open,children:s.modal?T.jsx(JI,{...o,ref:t}):T.jsx(XI,{...o,ref:t})})});ky.displayName=jn;var JI=b.forwardRef((e,t)=>{const r=wr(jn,e.__scopeDialog),n=b.useRef(null),o=He(t,r.contentRef,n);return b.useEffect(()=>{const s=n.current;if(s)return nl(s)},[]),T.jsx(xy,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Te(e.onCloseAutoFocus,s=>{s.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Te(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:Te(e.onFocusOutside,s=>s.preventDefault())})}),XI=b.forwardRef((e,t)=>{const r=wr(jn,e.__scopeDialog),n=b.useRef(!1),o=b.useRef(!1);return T.jsx(xy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(n.current||r.triggerRef.current?.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;r.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),xy=b.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=wr(jn,r),c=b.useRef(null),u=He(t,c);return zc(),T.jsxs(T.Fragment,{children:[T.jsx(pi,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:T.jsx(hi,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Wl(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),T.jsxs(T.Fragment,{children:[T.jsx(QI,{titleId:a.titleId}),T.jsx(tF,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Rl="DialogTitle",Ey=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=wr(Rl,r);return T.jsx(Ne.h2,{id:o.titleId,...n,ref:t})});Ey.displayName=Rl;var Oy="DialogDescription",Cy=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=wr(Oy,r);return T.jsx(Ne.p,{id:o.descriptionId,...n,ref:t})});Cy.displayName=Oy;var Ty="DialogClose",Dy=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=wr(Ty,r);return T.jsx(Ne.button,{type:"button",...n,ref:t,onClick:Te(e.onClick,()=>o.onOpenChange(!1))})});Dy.displayName=Ty;function Wl(e){return e?"open":"closed"}var Ay="DialogTitleWarning",[zR,My]=zC(Ay,{contentName:jn,titleName:Rl,docsSlug:"dialog"}),QI=({titleId:e})=>{const t=My(Ay),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
103
103
 
104
104
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
105
105
 
106
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},eF="DialogDescriptionWarning",tF=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ay(eF).contentName}}.`;return b.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},rF=gy,nF=vy,oF=wy,My=_y,Py=Sy,Ny=xy,Iy=Oy,sF=Ty;const iF=rF,aF=nF,cF=oF,Fy=b.forwardRef(({className:e,...t},r)=>T.jsx(My,{ref:r,className:Ae("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Fy.displayName=My.displayName;const Ry=b.forwardRef(({className:e,children:t,...r},n)=>T.jsxs(cF,{children:[T.jsx(Fy,{}),T.jsxs(Py,{ref:n,className:Ae("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,T.jsxs(sF,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[T.jsx(YT,{className:"h-4 w-4"}),T.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ry.displayName=Py.displayName;const Wy=({className:e,...t})=>T.jsx("div",{className:Ae("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Wy.displayName="DialogHeader";const Ly=({className:e,...t})=>T.jsx("div",{className:Ae("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ly.displayName="DialogFooter";const zy=b.forwardRef(({className:e,...t},r)=>T.jsx(Ny,{ref:r,className:Ae("text-lg font-semibold leading-none tracking-tight",e),...t}));zy.displayName=Ny.displayName;const lF=b.forwardRef(({className:e,...t},r)=>T.jsx(Iy,{ref:r,className:Ae("text-sm text-muted-foreground",e),...t}));lF.displayName=Iy.displayName;function Ll(){return Ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ll.apply(null,arguments)}function uF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function fF(e,t){if(e==null)return{};var r,n,o=uF(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function zl(e){"@babel/helpers - typeof";return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zl(e)}function dF(e,t,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function hF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $l(e,t){return $l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},$l(e,t)}function pF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$l(e,t)}function Ki(e){return Ki=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ki(e)}function $y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($y=function(){return!!e})()}function mF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gF(e,t){if(t&&(zl(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mF(e)}function yF(e){var t=$y();return function(){var r,n=Ki(e);if(t){var o=Ki(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gF(this,r)}}var Ji=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ul(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xi={exports:{}},Qi={exports:{}},Ye={};var Uy;function vF(){if(Uy)return Ye;Uy=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function x(_){if(typeof _=="object"&&_!==null){var S=_.$$typeof;switch(S){case t:switch(_=_.type,_){case c:case u:case n:case s:case o:case f:return _;default:switch(_=_&&_.$$typeof,_){case a:case l:case m:case h:case i:return _;default:return S}}case r:return S}}}function w(_){return x(_)===u}return Ye.AsyncMode=c,Ye.ConcurrentMode=u,Ye.ContextConsumer=a,Ye.ContextProvider=i,Ye.Element=t,Ye.ForwardRef=l,Ye.Fragment=n,Ye.Lazy=m,Ye.Memo=h,Ye.Portal=r,Ye.Profiler=s,Ye.StrictMode=o,Ye.Suspense=f,Ye.isAsyncMode=function(_){return w(_)||x(_)===c},Ye.isConcurrentMode=w,Ye.isContextConsumer=function(_){return x(_)===a},Ye.isContextProvider=function(_){return x(_)===i},Ye.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},Ye.isForwardRef=function(_){return x(_)===l},Ye.isFragment=function(_){return x(_)===n},Ye.isLazy=function(_){return x(_)===m},Ye.isMemo=function(_){return x(_)===h},Ye.isPortal=function(_){return x(_)===r},Ye.isProfiler=function(_){return x(_)===s},Ye.isStrictMode=function(_){return x(_)===o},Ye.isSuspense=function(_){return x(_)===f},Ye.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===u||_===s||_===o||_===f||_===d||typeof _=="object"&&_!==null&&(_.$$typeof===m||_.$$typeof===h||_.$$typeof===i||_.$$typeof===a||_.$$typeof===l||_.$$typeof===g||_.$$typeof===y||_.$$typeof===O||_.$$typeof===p)},Ye.typeOf=x,Ye}var je={};var Yy;function bF(){return Yy||(Yy=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function x(K){return typeof K=="string"||typeof K=="function"||K===n||K===u||K===s||K===o||K===f||K===d||typeof K=="object"&&K!==null&&(K.$$typeof===m||K.$$typeof===h||K.$$typeof===i||K.$$typeof===a||K.$$typeof===l||K.$$typeof===g||K.$$typeof===y||K.$$typeof===O||K.$$typeof===p)}function w(K){if(typeof K=="object"&&K!==null){var Se=K.$$typeof;switch(Se){case t:var Ie=K.type;switch(Ie){case c:case u:case n:case s:case o:case f:return Ie;default:var ke=Ie&&Ie.$$typeof;switch(ke){case a:case l:case m:case h:case i:return ke;default:return Se}}case r:return Se}}}var _=c,S=u,I=a,v=i,E=t,P=l,A=n,M=m,F=h,N=r,W=s,C=o,k=f,Y=!1;function $(K){return Y||(Y=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(K)||w(K)===c}function D(K){return w(K)===u}function V(K){return w(K)===a}function Z(K){return w(K)===i}function G(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function B(K){return w(K)===l}function L(K){return w(K)===n}function J(K){return w(K)===m}function q(K){return w(K)===h}function oe(K){return w(K)===r}function Q(K){return w(K)===s}function ne(K){return w(K)===o}function le(K){return w(K)===f}je.AsyncMode=_,je.ConcurrentMode=S,je.ContextConsumer=I,je.ContextProvider=v,je.Element=E,je.ForwardRef=P,je.Fragment=A,je.Lazy=M,je.Memo=F,je.Portal=N,je.Profiler=W,je.StrictMode=C,je.Suspense=k,je.isAsyncMode=$,je.isConcurrentMode=D,je.isContextConsumer=V,je.isContextProvider=Z,je.isElement=G,je.isForwardRef=B,je.isFragment=L,je.isLazy=J,je.isMemo=q,je.isPortal=oe,je.isProfiler=Q,je.isStrictMode=ne,je.isSuspense=le,je.isValidElementType=x,je.typeOf=w})()),je}var jy;function Vy(){return jy||(jy=1,process.env.NODE_ENV==="production"?Qi.exports=vF():Qi.exports=bF()),Qi.exports}var Yl,By;function wF(){if(By)return Yl;By=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(l){return i[l]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(l){u[l]=l}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Yl=o()?Object.assign:function(s,i){for(var a,c=n(s),u,l=1;l<arguments.length;l++){a=Object(arguments[l]);for(var f in a)t.call(a,f)&&(c[f]=a[f]);if(e){u=e(a);for(var d=0;d<u.length;d++)r.call(a,u[d])&&(c[u[d]]=a[u[d]])}}return c},Yl}var jl,Hy;function Vl(){if(Hy)return jl;Hy=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return jl=e,jl}var Bl,Zy;function Gy(){return Zy||(Zy=1,Bl=Function.call.bind(Object.prototype.hasOwnProperty)),Bl}var Hl,qy;function _F(){if(qy)return Hl;qy=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Vl(),r={},n=Gy();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,u){if(process.env.NODE_ENV!=="production"){for(var l in s)if(n(s,l)){var f;try{if(typeof s[l]!="function"){var d=Error((c||"React class")+": "+a+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=s[l](i,l,c,a,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var h=u?u():"";e("Failed "+a+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Hl=o,Hl}var Zl,Ky;function SF(){if(Ky)return Zl;Ky=1;var e=Vy(),t=wF(),r=Vl(),n=Gy(),o=_F(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return Zl=function(a,c){var u=typeof Symbol=="function"&&Symbol.iterator,l="@@iterator";function f(D){var V=D&&(u&&D[u]||D[l]);if(typeof V=="function")return V}var d="<<anonymous>>",h={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:O(),arrayOf:x,element:w(),elementType:_(),instanceOf:S,node:P(),objectOf:v,oneOf:I,oneOfType:E,shape:M,exact:F};function m(D,V){return D===V?D!==0||1/D===1/V:D!==D&&V!==V}function p(D,V){this.message=D,this.data=V&&typeof V=="object"?V:{},this.stack=""}p.prototype=Error.prototype;function g(D){if(process.env.NODE_ENV!=="production")var V={},Z=0;function G(L,J,q,oe,Q,ne,le){if(oe=oe||d,ne=ne||q,le!==r){if(c){var K=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw K.name="Invariant Violation",K}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Se=oe+":"+q;!V[Se]&&Z<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ne+"` prop on `"+oe+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),V[Se]=!0,Z++)}}return J[q]==null?L?J[q]===null?new p("The "+Q+" `"+ne+"` is marked as required "+("in `"+oe+"`, but its value is `null`.")):new p("The "+Q+" `"+ne+"` is marked as required in "+("`"+oe+"`, but its value is `undefined`.")):null:D(J,q,oe,Q,ne)}var B=G.bind(null,!1);return B.isRequired=G.bind(null,!0),B}function y(D){function V(Z,G,B,L,J,q){var oe=Z[G],Q=C(oe);if(Q!==D){var ne=k(oe);return new p("Invalid "+L+" `"+J+"` of type "+("`"+ne+"` supplied to `"+B+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return g(V)}function O(){return g(i)}function x(D){function V(Z,G,B,L,J){if(typeof D!="function")return new p("Property `"+J+"` of component `"+B+"` has invalid PropType notation inside arrayOf.");var q=Z[G];if(!Array.isArray(q)){var oe=C(q);return new p("Invalid "+L+" `"+J+"` of type "+("`"+oe+"` supplied to `"+B+"`, expected an array."))}for(var Q=0;Q<q.length;Q++){var ne=D(q,Q,B,L,J+"["+Q+"]",r);if(ne instanceof Error)return ne}return null}return g(V)}function w(){function D(V,Z,G,B,L){var J=V[Z];if(!a(J)){var q=C(J);return new p("Invalid "+B+" `"+L+"` of type "+("`"+q+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return g(D)}function _(){function D(V,Z,G,B,L){var J=V[Z];if(!e.isValidElementType(J)){var q=C(J);return new p("Invalid "+B+" `"+L+"` of type "+("`"+q+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return g(D)}function S(D){function V(Z,G,B,L,J){if(!(Z[G]instanceof D)){var q=D.name||d,oe=$(Z[G]);return new p("Invalid "+L+" `"+J+"` of type "+("`"+oe+"` supplied to `"+B+"`, expected ")+("instance of `"+q+"`."))}return null}return g(V)}function I(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function V(Z,G,B,L,J){for(var q=Z[G],oe=0;oe<D.length;oe++)if(m(q,D[oe]))return null;var Q=JSON.stringify(D,function(le,K){var Se=k(K);return Se==="symbol"?String(K):K});return new p("Invalid "+L+" `"+J+"` of value `"+String(q)+"` "+("supplied to `"+B+"`, expected one of "+Q+"."))}return g(V)}function v(D){function V(Z,G,B,L,J){if(typeof D!="function")return new p("Property `"+J+"` of component `"+B+"` has invalid PropType notation inside objectOf.");var q=Z[G],oe=C(q);if(oe!=="object")return new p("Invalid "+L+" `"+J+"` of type "+("`"+oe+"` supplied to `"+B+"`, expected an object."));for(var Q in q)if(n(q,Q)){var ne=D(q,Q,B,L,J+"."+Q,r);if(ne instanceof Error)return ne}return null}return g(V)}function E(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var V=0;V<D.length;V++){var Z=D[V];if(typeof Z!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Y(Z)+" at index "+V+"."),i}function G(B,L,J,q,oe){for(var Q=[],ne=0;ne<D.length;ne++){var le=D[ne],K=le(B,L,J,q,oe,r);if(K==null)return null;K.data&&n(K.data,"expectedType")&&Q.push(K.data.expectedType)}var Se=Q.length>0?", expected one of type ["+Q.join(", ")+"]":"";return new p("Invalid "+q+" `"+oe+"` supplied to "+("`"+J+"`"+Se+"."))}return g(G)}function P(){function D(V,Z,G,B,L){return N(V[Z])?null:new p("Invalid "+B+" `"+L+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return g(D)}function A(D,V,Z,G,B){return new p((D||"React class")+": "+V+" type `"+Z+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function M(D){function V(Z,G,B,L,J){var q=Z[G],oe=C(q);if(oe!=="object")return new p("Invalid "+L+" `"+J+"` of type `"+oe+"` "+("supplied to `"+B+"`, expected `object`."));for(var Q in D){var ne=D[Q];if(typeof ne!="function")return A(B,L,J,Q,k(ne));var le=ne(q,Q,B,L,J+"."+Q,r);if(le)return le}return null}return g(V)}function F(D){function V(Z,G,B,L,J){var q=Z[G],oe=C(q);if(oe!=="object")return new p("Invalid "+L+" `"+J+"` of type `"+oe+"` "+("supplied to `"+B+"`, expected `object`."));var Q=t({},Z[G],D);for(var ne in Q){var le=D[ne];if(n(D,ne)&&typeof le!="function")return A(B,L,J,ne,k(le));if(!le)return new p("Invalid "+L+" `"+J+"` key `"+ne+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(Z[G],null," ")+`
107
- Valid keys: `+JSON.stringify(Object.keys(D),null," "));var K=le(q,ne,B,L,J+"."+ne,r);if(K)return K}return null}return g(V)}function N(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(N);if(D===null||a(D))return!0;var V=f(D);if(V){var Z=V.call(D),G;if(V!==D.entries){for(;!(G=Z.next()).done;)if(!N(G.value))return!1}else for(;!(G=Z.next()).done;){var B=G.value;if(B&&!N(B[1]))return!1}}else return!1;return!0;default:return!1}}function W(D,V){return D==="symbol"?!0:V?V["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&V instanceof Symbol:!1}function C(D){var V=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":W(V,D)?"symbol":V}function k(D){if(typeof D>"u"||D===null)return""+D;var V=C(D);if(V==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return V}function Y(D){var V=k(D);switch(V){case"array":case"object":return"an "+V;case"boolean":case"date":case"regexp":return"a "+V;default:return V}}function $(D){return!D.constructor||!D.constructor.name?d:D.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Zl}var Gl,Jy;function kF(){if(Jy)return Gl;Jy=1;var e=Vl();function t(){}function r(){}return r.resetWarningCache=t,Gl=function(){function n(i,a,c,u,l,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}n.isRequired=n;function o(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},Gl}var Xy;function xF(){if(Xy)return Xi.exports;if(Xy=1,process.env.NODE_ENV!=="production"){var e=Vy(),t=!0;Xi.exports=SF()(e.isElement,t)}else Xi.exports=kF()();return Xi.exports}var EF=xF();const Xt=Ul(EF);function Vn(e,t,r){this.x=e,this.y=t,this.time=r||new Date().getTime()}Vn.prototype.velocityFrom=function(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):1},Vn.prototype.distanceTo=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},Vn.prototype.equals=function(e){return this.x===e.x&&this.y===e.y&&this.time===e.time};function ql(e,t,r,n){this.startPoint=e,this.control1=t,this.control2=r,this.endPoint=n}ql.prototype.length=function(){for(var e=10,t=0,r=void 0,n=void 0,o=0;o<=e;o+=1){var s=o/e,i=this._point(s,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),a=this._point(s,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(o>0){var c=i-r,u=a-n;t+=Math.sqrt(c*c+u*u)}r=i,n=a}return t},ql.prototype._point=function(e,t,r,n,o){return t*(1-e)*(1-e)*(1-e)+3*r*(1-e)*(1-e)*e+3*n*(1-e)*e*e+o*e*e*e};function OF(e,t,r){var n,o,s,i=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:Date.now(),i=null,s=e.apply(n,o),i||(n=o=null)};return function(){var u=Date.now();!a&&r.leading===!1&&(a=u);var l=t-(u-a);return n=this,o=arguments,l<=0||l>t?(i&&(clearTimeout(i),i=null),a=u,s=e.apply(n,o),i||(n=o=null)):!i&&r.trailing!==!1&&(i=setTimeout(c,l)),s}}function Xe(e,t){var r=this,n=t||{};this.velocityFilterWeight=n.velocityFilterWeight||.7,this.minWidth=n.minWidth||.5,this.maxWidth=n.maxWidth||2.5,this.throttle="throttle"in n?n.throttle:16,this.minDistance="minDistance"in n?n.minDistance:5,this.throttle?this._strokeMoveUpdate=OF(Xe.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=Xe.prototype._strokeUpdate,this.dotSize=n.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=n.penColor||"black",this.backgroundColor=n.backgroundColor||"rgba(0,0,0,0)",this.onBegin=n.onBegin,this.onEnd=n.onEnd,this._canvas=e,this._ctx=e.getContext("2d"),this.clear(),this._handleMouseDown=function(o){o.which===1&&(r._mouseButtonDown=!0,r._strokeBegin(o))},this._handleMouseMove=function(o){r._mouseButtonDown&&r._strokeMoveUpdate(o)},this._handleMouseUp=function(o){o.which===1&&r._mouseButtonDown&&(r._mouseButtonDown=!1,r._strokeEnd(o))},this._handleTouchStart=function(o){if(o.targetTouches.length===1){var s=o.changedTouches[0];r._strokeBegin(s)}},this._handleTouchMove=function(o){o.preventDefault();var s=o.targetTouches[0];r._strokeMoveUpdate(s)},this._handleTouchEnd=function(o){var s=o.target===r._canvas;s&&(o.preventDefault(),r._strokeEnd(o))},this.on()}Xe.prototype.clear=function(){var e=this._ctx,t=this._canvas;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(),this._isEmpty=!0},Xe.prototype.fromDataURL=function(e){var t=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new Image,o=r.ratio||window.devicePixelRatio||1,s=r.width||this._canvas.width/o,i=r.height||this._canvas.height/o;this._reset(),n.src=e,n.onload=function(){t._ctx.drawImage(n,0,0,s,i)},this._isEmpty=!1},Xe.prototype.toDataURL=function(e){var t;switch(e){case"image/svg+xml":return this._toSVG();default:for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return(t=this._canvas).toDataURL.apply(t,[e].concat(n))}},Xe.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},Xe.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),document.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},Xe.prototype.isEmpty=function(){return this._isEmpty},Xe.prototype._strokeBegin=function(e){this._data.push([]),this._reset(),this._strokeUpdate(e),typeof this.onBegin=="function"&&this.onBegin(e)},Xe.prototype._strokeUpdate=function(e){var t=e.clientX,r=e.clientY,n=this._createPoint(t,r),o=this._data[this._data.length-1],s=o&&o[o.length-1],i=s&&n.distanceTo(s)<this.minDistance;if(!(s&&i)){var a=this._addPoint(n),c=a.curve,u=a.widths;c&&u&&this._drawCurve(c,u.start,u.end),this._data[this._data.length-1].push({x:n.x,y:n.y,time:n.time,color:this.penColor})}},Xe.prototype._strokeEnd=function(e){var t=this.points.length>2,r=this.points[0];if(!t&&r&&this._drawDot(r),r){var n=this._data[this._data.length-1],o=n[n.length-1];r.equals(o)||n.push({x:r.x,y:r.y,time:r.time,color:this.penColor})}typeof this.onEnd=="function"&&this.onEnd(e)},Xe.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)},Xe.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},Xe.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor},Xe.prototype._createPoint=function(e,t,r){var n=this._canvas.getBoundingClientRect();return new Vn(e-n.left,t-n.top,r||new Date().getTime())},Xe.prototype._addPoint=function(e){var t=this.points,r=void 0;if(t.push(e),t.length>2){t.length===3&&t.unshift(t[0]),r=this._calculateCurveControlPoints(t[0],t[1],t[2]);var n=r.c2;r=this._calculateCurveControlPoints(t[1],t[2],t[3]);var o=r.c1,s=new ql(t[1],n,o,t[2]),i=this._calculateCurveWidths(s);return t.shift(),{curve:s,widths:i}}return{}},Xe.prototype._calculateCurveControlPoints=function(e,t,r){var n=e.x-t.x,o=e.y-t.y,s=t.x-r.x,i=t.y-r.y,a={x:(e.x+t.x)/2,y:(e.y+t.y)/2},c={x:(t.x+r.x)/2,y:(t.y+r.y)/2},u=Math.sqrt(n*n+o*o),l=Math.sqrt(s*s+i*i),f=a.x-c.x,d=a.y-c.y,h=l/(u+l),m={x:c.x+f*h,y:c.y+d*h},p=t.x-m.x,g=t.y-m.y;return{c1:new Vn(a.x+p,a.y+g),c2:new Vn(c.x+p,c.y+g)}},Xe.prototype._calculateCurveWidths=function(e){var t=e.startPoint,r=e.endPoint,n={start:null,end:null},o=this.velocityFilterWeight*r.velocityFrom(t)+(1-this.velocityFilterWeight)*this._lastVelocity,s=this._strokeWidth(o);return n.start=this._lastWidth,n.end=s,this._lastVelocity=o,this._lastWidth=s,n},Xe.prototype._strokeWidth=function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)},Xe.prototype._drawPoint=function(e,t,r){var n=this._ctx;n.moveTo(e,t),n.arc(e,t,r,0,2*Math.PI,!1),this._isEmpty=!1},Xe.prototype._drawCurve=function(e,t,r){var n=this._ctx,o=r-t,s=Math.floor(e.length());n.beginPath();for(var i=0;i<s;i+=1){var a=i/s,c=a*a,u=c*a,l=1-a,f=l*l,d=f*l,h=d*e.startPoint.x;h+=3*f*a*e.control1.x,h+=3*l*c*e.control2.x,h+=u*e.endPoint.x;var m=d*e.startPoint.y;m+=3*f*a*e.control1.y,m+=3*l*c*e.control2.y,m+=u*e.endPoint.y;var p=t+u*o;this._drawPoint(h,m,p)}n.closePath(),n.fill()},Xe.prototype._drawDot=function(e){var t=this._ctx,r=typeof this.dotSize=="function"?this.dotSize():this.dotSize;t.beginPath(),this._drawPoint(e.x,e.y,r),t.closePath(),t.fill()},Xe.prototype._fromData=function(e,t,r){for(var n=0;n<e.length;n+=1){var o=e[n];if(o.length>1)for(var s=0;s<o.length;s+=1){var i=o[s],a=new Vn(i.x,i.y,i.time),c=i.color;if(s===0)this.penColor=c,this._reset(),this._addPoint(a);else if(s!==o.length-1){var u=this._addPoint(a),l=u.curve,f=u.widths;l&&f&&t(l,f,c)}}else{this._reset();var d=o[0];r(d)}}},Xe.prototype._toSVG=function(){var e=this,t=this._data,r=this._canvas,n=Math.max(window.devicePixelRatio||1,1),o=0,s=0,i=r.width/n,a=r.height/n,c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttributeNS(null,"width",r.width),c.setAttributeNS(null,"height",r.height),this._fromData(t,function(y,O,x){var w=document.createElement("path");if(!isNaN(y.control1.x)&&!isNaN(y.control1.y)&&!isNaN(y.control2.x)&&!isNaN(y.control2.y)){var _="M "+y.startPoint.x.toFixed(3)+","+y.startPoint.y.toFixed(3)+" "+("C "+y.control1.x.toFixed(3)+","+y.control1.y.toFixed(3)+" ")+(y.control2.x.toFixed(3)+","+y.control2.y.toFixed(3)+" ")+(y.endPoint.x.toFixed(3)+","+y.endPoint.y.toFixed(3));w.setAttribute("d",_),w.setAttribute("stroke-width",(O.end*2.25).toFixed(3)),w.setAttribute("stroke",x),w.setAttribute("fill","none"),w.setAttribute("stroke-linecap","round"),c.appendChild(w)}},function(y){var O=document.createElement("circle"),x=typeof e.dotSize=="function"?e.dotSize():e.dotSize;O.setAttribute("r",x),O.setAttribute("cx",y.x),O.setAttribute("cy",y.y),O.setAttribute("fill",y.color),c.appendChild(O)});var u="data:image/svg+xml;base64,",l='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'+(' viewBox="'+o+" "+s+" "+i+" "+a+'"')+(' width="'+i+'"')+(' height="'+a+'"')+">",f=c.innerHTML;if(f===void 0){var d=document.createElement("dummy"),h=c.childNodes;d.innerHTML="";for(var m=0;m<h.length;m+=1)d.appendChild(h[m].cloneNode(!0));f=d.innerHTML}var p="</svg>",g=l+f+p;return u+btoa(g)},Xe.prototype.fromData=function(e){var t=this;this.clear(),this._fromData(e,function(r,n){return t._drawCurve(r,n.start,n.end)},function(r){return t._drawDot(r)}),this._data=e},Xe.prototype.toData=function(){return this._data};var ea={exports:{}},CF=ea.exports,Qy;function TF(){return Qy||(Qy=1,(function(e,t){(function(r,n){e.exports=n()})(CF,function(){return(function(r){function n(s){if(o[s])return o[s].exports;var i=o[s]={exports:{},id:s,loaded:!1};return r[s].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var o={};return n.m=r,n.c=o,n.p="",n(0)})([function(r,n){function o(u){var l=u.getContext("2d"),f=u.width,d=u.height,h=l.getImageData(0,0,f,d).data,m=a(!0,f,d,h),p=a(!1,f,d,h),g=c(!0,f,d,h),y=c(!1,f,d,h),O=y-g+1,x=p-m+1,w=l.getImageData(g,m,O,x);return u.width=O,u.height=x,l.clearRect(0,0,O,x),l.putImageData(w,0,0),u}function s(u,l,f,d){return{red:d[4*(f*l+u)],green:d[4*(f*l+u)+1],blue:d[4*(f*l+u)+2],alpha:d[4*(f*l+u)+3]}}function i(u,l,f,d){return s(u,l,f,d).alpha}function a(u,l,f,d){for(var h=u?1:-1,m=u?0:f-1,p=m;u?p<f:p>-1;p+=h)for(var g=0;g<l;g++)if(i(g,p,l,d))return p;return null}function c(u,l,f,d){for(var h=u?1:-1,m=u?0:l-1,p=m;u?p<l:p>-1;p+=h)for(var g=0;g<f;g++)if(i(p,g,l,d))return p;return null}Object.defineProperty(n,"__esModule",{value:!0}),n.default=o}])})})(ea)),ea.exports}var DF=TF();const AF=Ul(DF);var MF=["canvasProps","clearOnResize"],ta=(function(e){pF(r,e);var t=yF(r);function r(){var n;hF(this,r);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return n=t.call.apply(t,[this].concat(s)),n.staticThis=n.constructor,n._sigPad=null,n._canvas=null,n.setRef=function(a){n._canvas=a,n._canvas===null&&(n._sigPad=null)},n._excludeOurProps=function(){var a=n.props;a.canvasProps,a.clearOnResize;var c=fF(a,MF);return c},n.componentDidMount=function(){var a=n.getCanvas();n._sigPad=new Xe(a,n._excludeOurProps()),n._resizeCanvas(),n.on()},n.componentWillUnmount=function(){n.off()},n.componentDidUpdate=function(){Object.assign(n._sigPad,n._excludeOurProps())},n.getCanvas=function(){if(n._canvas===null)throw n.staticThis.refNullError;return n._canvas},n.getTrimmedCanvas=function(){var a=n.getCanvas(),c=document.createElement("canvas");return c.width=a.width,c.height=a.height,c.getContext("2d").drawImage(a,0,0),AF(c)},n.getSignaturePad=function(){if(n._sigPad===null)throw n.staticThis.refNullError;return n._sigPad},n._checkClearOnResize=function(){n.props.clearOnResize&&n._resizeCanvas()},n._resizeCanvas=function(){var a,c,u=(a=n.props.canvasProps)!==null&&a!==void 0?a:{},l=u.width,f=u.height;if(!(typeof l<"u"&&typeof f<"u")){var d=n.getCanvas(),h=Math.max((c=window.devicePixelRatio)!==null&&c!==void 0?c:1,1);typeof l>"u"&&(d.width=d.offsetWidth*h),typeof f>"u"&&(d.height=d.offsetHeight*h),d.getContext("2d").scale(h,h),n.clear()}},n.render=function(){var a=n.props.canvasProps;return U.createElement("canvas",Ll({ref:n.setRef},a))},n.on=function(){return window.addEventListener("resize",n._checkClearOnResize),n.getSignaturePad().on()},n.off=function(){return window.removeEventListener("resize",n._checkClearOnResize),n.getSignaturePad().off()},n.clear=function(){return n.getSignaturePad().clear()},n.isEmpty=function(){return n.getSignaturePad().isEmpty()},n.fromDataURL=function(a,c){return n.getSignaturePad().fromDataURL(a,c)},n.toDataURL=function(a,c){return n.getSignaturePad().toDataURL(a,c)},n.fromData=function(a){return n.getSignaturePad().fromData(a)},n.toData=function(){return n.getSignaturePad().toData()},n}return dF(r)})(U.Component);ta.propTypes={velocityFilterWeight:Xt.number,minWidth:Xt.number,maxWidth:Xt.number,minDistance:Xt.number,dotSize:Xt.oneOfType([Xt.number,Xt.func]),penColor:Xt.string,throttle:Xt.number,onEnd:Xt.func,onBegin:Xt.func,canvasProps:Xt.object,clearOnResize:Xt.bool},ta.defaultProps={clearOnResize:!0},ta.refNullError=new Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");const PF=(e={})=>{const{field:t={},form:r={},question:n={},disabled:o=!1}=e,s=U.useRef({}),[i,a]=U.useState(!1);return T.jsxs("div",{children:[T.jsxs(iF,{open:i,onOpenChange:a,children:[T.jsx(aF,{asChild:!0,children:T.jsx(vo,{...t,type:"button",variant:"outline",disabled:o,className:Ae("bq-signature-button w-full border focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!t.value&&"text-muted-foreground",r.formState.errors[n.reference_id]&&"border-destructive"),children:"Click here to sign"})}),T.jsxs(Ry,{className:"bq-signature-dialog sm:max-w-md",children:[T.jsx(Wy,{children:T.jsx(zy,{children:"Sign here"})}),T.jsx("div",{className:"bq-signature-pad border",children:T.jsx(ta,{ref:s,penColor:"black",canvasProps:{width:400,height:200,className:"sigCanvas"}})}),T.jsxs(Ly,{children:[T.jsx(vo,{type:"button",variant:"secondary",onClick:()=>{s.current.clear()},children:"Clear"}),T.jsx(vo,{type:"button",onClick:async()=>{if(s.current.toData().length>0){const c=s.current.getTrimmedCanvas().toDataURL("image/png"),u=await xP(c);t.onChange(u)}else t.onChange("");a(!1)},children:"Save"})]})]})]}),t.value&&T.jsx("img",{className:"border rounded p-2 mt-2",src:t.value})]})};function NF(e,t){e.src=t}const IF=e=>{var t,r,n,o="The Google Maps JavaScript API",s="google",i="importLibrary",a="__ib__",c=document,u=window,l=u[s]||(u[s]={}),f=l.maps||(l.maps={}),d=new Set,h=new URLSearchParams,m=()=>t||(t=new Promise(async(p,g)=>{await(r=c.createElement("script")),h.set("libraries",[...d]+"");for(n in e)h.set(n.replace(/[A-Z]/g,y=>"_"+y[0].toLowerCase()),e[n]);h.set("callback",s+".maps."+a),NF(r,"https://maps.googleapis.com/maps/api/js?"+h),f[a]=p,r.onerror=()=>t=g(Error(o+" could not load.")),r.nonce=c.querySelector("script[nonce]")?.nonce||"",c.head.append(r)}));f[i]?console.warn(o+" only loads once. Ignoring:",e):f[i]=(p,...g)=>d.add(p)&&m().then(()=>f[i](p,...g))},FF=e=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`,RF=e=>`The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(e)}) will be ignored.`,WF="No options were set before calling importLibrary. Make sure to configure the loader using setOptions().",LF="There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.",ev=process.env.NODE_ENV!=="production",Kl=ev?e=>{console.warn(`[@googlemaps/js-api-loader] ${e}`)}:()=>{},zF=ev?e=>{console.info(`[@googlemaps/js-api-loader] ${e}`)}:()=>{},$F=process.env.NODE_ENV!=="production";let Jl=!1;function UF(e){if(Jl){Kl(FF(e));return}jF(e),Jl=!0}async function YF(e){if(Jl||Kl(WF),!window?.google?.maps?.importLibrary)throw new Error("google.maps.importLibrary is not installed.");return await google.maps.importLibrary(e)}function jF(e){const t=!!window.google?.maps?.importLibrary;t?zF(RF(e)):$F&&document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]')&&Kl(LF),t||IF(e)}const VF=(e={})=>{const{field:t={},form:r={},question:n={},disabled:o=!1}=e,s=U.useRef(null),i=U.useRef(null),a=U.useRef(t.onChange),{address_config:c}=n,u=c?.google_api_key;U.useEffect(()=>{a.current=t.onChange},[t.onChange]);const l=U.useCallback(f=>{s.current=f,typeof t.ref=="function"?t.ref(f):t.ref&&(t.ref.current=f)},[t.ref]);return U.useEffect(()=>{if(!u||!s.current)return;let f=!1;return UF({key:u,v:"weekly"}),YF("places").then(d=>{if(f||!s.current)return;const h={fields:["formatted_address","place_id"]},m=c?.countries;m&&m.length>0&&(h.componentRestrictions={country:m}),i.current&&(typeof google<"u"&&google.maps?.event&&google.maps.event.clearInstanceListeners(i.current),i.current=null);const p=new d.Autocomplete(s.current,h);p.addListener("place_changed",()=>{const g=p.getPlace();g?.formatted_address&&(a.current(g.formatted_address),s.current&&(s.current.value=g.formatted_address))}),i.current=p}).catch(d=>{f||console.warn("AddressQuestion: Failed to load Google Places",d)}),()=>{f=!0,typeof google<"u"&&google.maps?.event&&(i.current&&google.maps.event.clearInstanceListeners(i.current),s.current&&google.maps.event.clearInstanceListeners(s.current)),i.current=null,document.querySelectorAll(".pac-container").forEach(d=>d.remove())}},[u,s.current]),T.jsx(jh,{ref:l,type:"text",name:t.name,value:t.value||"",onChange:f=>t.onChange(f.target.value),onBlur:t.onBlur,placeholder:n.placeholder||"Start typing your address...",className:r.formState.errors[n.id]?"bq-address border-destructive focus-visible:ring-destructive":"bq-address",disabled:o})},ra="DATE_PICKER",na="INPUT",oa="TEXTAREA",sa="RADIO",Xl="CHECKBOX",ia="SELECT",fs="SIGNATURE",BF="CONTENT",aa="ADDRESS",HF=(e={})=>{const{field:t={},form:r={},question:n={},index:o=0,disabled:s=!1}=e;if(n.type===BF){const l=MO.sanitize(n.content);return T.jsx("div",{dangerouslySetInnerHTML:{__html:l}})}const{with_label:i}=la(),a={field:t,form:r,question:n,disabled:s};let c=null;switch(n.type){case na:c=T.jsx(FC,{...a});break;case oa:c=T.jsx(WC,{...a});break;case sa:c=T.jsx(BT,{...a});break;case Xl:c=T.jsx(JT,{...a});break;case ia:c=T.jsx(pP,{...a});break;case ra:c=T.jsx($I,{...a});break;case fs:c=T.jsx(PF,{...a});break;case aa:c=T.jsx(VF,{...a});break;default:c=null}const u=`question-${n.reference_id}`;return T.jsxs(Cc,{id:u,children:[i&&T.jsx(Tc,{className:"leading-normal",children:T.jsxs("div",{children:[T.jsxs("div",{className:"block",children:[n.label,n.is_required&&T.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),n.sub_label&&T.jsx("div",{className:"mb-1 text-muted-foreground",children:n.sub_label})]})}),n.description&&T.jsx(NC,{children:n.description}),T.jsx(li,{children:c}),T.jsx(IC,{className:"bq-form-message"})]})};function ZF({section:e,form:t,questions:r=[]}){const{with_section_title:n}=la(),o=U.useMemo(()=>{const i={};return r.forEach(a=>{a.g_id&&(i[a.g_id]=a.id)}),i},[r]),s=Hu({control:t.control});return T.jsxs("div",{className:"bq-section space-y-6",children:[n&&T.jsx("h2",{className:"bq-section-title text-xl font-semibold",children:e.title}),e.items?.map(i=>{const a=i.reference_id;return yl({question:i,gid_to_ref:o,form_values:s})?T.jsx(PC,{control:t.control,name:a,shouldUnregister:!!i?.show_if?.item_gid,render:({field:c})=>T.jsx(HF,{field:c,form:t,question:i})},a):null})]})}var Ql,tv;function rv(){if(tv)return Ql;tv=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,o=typeof n=="function"&&n.prototype||e;return r===o}return Ql=t,Ql}var eu,nv;function GF(){if(nv)return eu;nv=1;function e(t,r){return function(n){return t(r(n))}}return eu=e,eu}var tu,ov;function qF(){if(ov)return tu;ov=1;var e=GF(),t=e(Object.keys,Object);return tu=t,tu}var ru,sv;function KF(){if(sv)return ru;sv=1;var e=rv(),t=qF(),r=Object.prototype,n=r.hasOwnProperty;function o(s){if(!e(s))return t(s);var i=[];for(var a in Object(s))n.call(s,a)&&a!="constructor"&&i.push(a);return i}return ru=o,ru}var nu,iv;function av(){if(iv)return nu;iv=1;var e=typeof Ji=="object"&&Ji&&Ji.Object===Object&&Ji;return nu=e,nu}var ou,cv;function xn(){if(cv)return ou;cv=1;var e=av(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return ou=r,ou}var su,lv;function uv(){if(lv)return su;lv=1;var e=xn(),t=e.Symbol;return su=t,su}var iu,fv;function JF(){if(fv)return iu;fv=1;var e=uv(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function s(i){var a=r.call(i,o),c=i[o];try{i[o]=void 0;var u=!0}catch{}var l=n.call(i);return u&&(a?i[o]=c:delete i[o]),l}return iu=s,iu}var au,dv;function XF(){if(dv)return au;dv=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return au=r,au}var cu,hv;function ca(){if(hv)return cu;hv=1;var e=uv(),t=JF(),r=XF(),n="[object Null]",o="[object Undefined]",s=e?e.toStringTag:void 0;function i(a){return a==null?a===void 0?o:n:s&&s in Object(a)?t(a):r(a)}return cu=i,cu}var lu,pv;function mv(){if(pv)return lu;pv=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return lu=e,lu}var uu,gv;function yv(){if(gv)return uu;gv=1;var e=ca(),t=mv(),r="[object AsyncFunction]",n="[object Function]",o="[object GeneratorFunction]",s="[object Proxy]";function i(a){if(!t(a))return!1;var c=e(a);return c==n||c==o||c==r||c==s}return uu=i,uu}var fu,vv;function QF(){if(vv)return fu;vv=1;var e=xn(),t=e["__core-js_shared__"];return fu=t,fu}var du,bv;function eR(){if(bv)return du;bv=1;var e=QF(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return du=r,du}var hu,wv;function _v(){if(wv)return hu;wv=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return hu=r,hu}var pu,Sv;function tR(){if(Sv)return pu;Sv=1;var e=yv(),t=eR(),r=mv(),n=_v(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,i=Function.prototype,a=Object.prototype,c=i.toString,u=a.hasOwnProperty,l=RegExp("^"+c.call(u).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(d){if(!r(d)||t(d))return!1;var h=e(d)?l:s;return h.test(n(d))}return pu=f,pu}var mu,kv;function rR(){if(kv)return mu;kv=1;function e(t,r){return t?.[r]}return mu=e,mu}var gu,xv;function ds(){if(xv)return gu;xv=1;var e=tR(),t=rR();function r(n,o){var s=t(n,o);return e(s)?s:void 0}return gu=r,gu}var yu,Ev;function nR(){if(Ev)return yu;Ev=1;var e=ds(),t=xn(),r=e(t,"DataView");return yu=r,yu}var vu,Ov;function oR(){if(Ov)return vu;Ov=1;var e=ds(),t=xn(),r=e(t,"Map");return vu=r,vu}var bu,Cv;function sR(){if(Cv)return bu;Cv=1;var e=ds(),t=xn(),r=e(t,"Promise");return bu=r,bu}var wu,Tv;function iR(){if(Tv)return wu;Tv=1;var e=ds(),t=xn(),r=e(t,"Set");return wu=r,wu}var _u,Dv;function aR(){if(Dv)return _u;Dv=1;var e=ds(),t=xn(),r=e(t,"WeakMap");return _u=r,_u}var Su,Av;function cR(){if(Av)return Su;Av=1;var e=nR(),t=oR(),r=sR(),n=iR(),o=aR(),s=ca(),i=_v(),a="[object Map]",c="[object Object]",u="[object Promise]",l="[object Set]",f="[object WeakMap]",d="[object DataView]",h=i(e),m=i(t),p=i(r),g=i(n),y=i(o),O=s;return(e&&O(new e(new ArrayBuffer(1)))!=d||t&&O(new t)!=a||r&&O(r.resolve())!=u||n&&O(new n)!=l||o&&O(new o)!=f)&&(O=function(x){var w=s(x),_=w==c?x.constructor:void 0,S=_?i(_):"";if(S)switch(S){case h:return d;case m:return a;case p:return u;case g:return l;case y:return f}return w}),Su=O,Su}var ku,Mv;function xu(){if(Mv)return ku;Mv=1;function e(t){return t!=null&&typeof t=="object"}return ku=e,ku}var Eu,Pv;function lR(){if(Pv)return Eu;Pv=1;var e=ca(),t=xu(),r="[object Arguments]";function n(o){return t(o)&&e(o)==r}return Eu=n,Eu}var Ou,Nv;function uR(){if(Nv)return Ou;Nv=1;var e=lR(),t=xu(),r=Object.prototype,n=r.hasOwnProperty,o=r.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(i){return t(i)&&n.call(i,"callee")&&!o.call(i,"callee")};return Ou=s,Ou}var Cu,Iv;function fR(){if(Iv)return Cu;Iv=1;var e=Array.isArray;return Cu=e,Cu}var Tu,Fv;function Rv(){if(Fv)return Tu;Fv=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Tu=t,Tu}var Du,Wv;function dR(){if(Wv)return Du;Wv=1;var e=yv(),t=Rv();function r(n){return n!=null&&t(n.length)&&!e(n)}return Du=r,Du}var hs={exports:{}},Au,Lv;function hR(){if(Lv)return Au;Lv=1;function e(){return!1}return Au=e,Au}hs.exports;var zv;function pR(){return zv||(zv=1,(function(e,t){var r=xn(),n=hR(),o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===o,a=i?r.Buffer:void 0,c=a?a.isBuffer:void 0,u=c||n;e.exports=u})(hs,hs.exports)),hs.exports}var Mu,$v;function mR(){if($v)return Mu;$v=1;var e=ca(),t=Rv(),r=xu(),n="[object Arguments]",o="[object Array]",s="[object Boolean]",i="[object Date]",a="[object Error]",c="[object Function]",u="[object Map]",l="[object Number]",f="[object Object]",d="[object RegExp]",h="[object Set]",m="[object String]",p="[object WeakMap]",g="[object ArrayBuffer]",y="[object DataView]",O="[object Float32Array]",x="[object Float64Array]",w="[object Int8Array]",_="[object Int16Array]",S="[object Int32Array]",I="[object Uint8Array]",v="[object Uint8ClampedArray]",E="[object Uint16Array]",P="[object Uint32Array]",A={};A[O]=A[x]=A[w]=A[_]=A[S]=A[I]=A[v]=A[E]=A[P]=!0,A[n]=A[o]=A[g]=A[s]=A[y]=A[i]=A[a]=A[c]=A[u]=A[l]=A[f]=A[d]=A[h]=A[m]=A[p]=!1;function M(F){return r(F)&&t(F.length)&&!!A[e(F)]}return Mu=M,Mu}var Pu,Uv;function gR(){if(Uv)return Pu;Uv=1;function e(t){return function(r){return t(r)}}return Pu=e,Pu}var ps={exports:{}};ps.exports;var Yv;function yR(){return Yv||(Yv=1,(function(e,t){var r=av(),n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===n,i=s&&r.process,a=(function(){try{var c=o&&o.require&&o.require("util").types;return c||i&&i.binding&&i.binding("util")}catch{}})();e.exports=a})(ps,ps.exports)),ps.exports}var Nu,jv;function vR(){if(jv)return Nu;jv=1;var e=mR(),t=gR(),r=yR(),n=r&&r.isTypedArray,o=n?t(n):e;return Nu=o,Nu}var Iu,Vv;function bR(){if(Vv)return Iu;Vv=1;var e=KF(),t=cR(),r=uR(),n=fR(),o=dR(),s=pR(),i=rv(),a=vR(),c="[object Map]",u="[object Set]",l=Object.prototype,f=l.hasOwnProperty;function d(h){if(h==null)return!0;if(o(h)&&(n(h)||typeof h=="string"||typeof h.splice=="function"||s(h)||a(h)||r(h)))return!h.length;var m=t(h);if(m==c||m==u)return!h.size;if(i(h))return!e(h).length;for(var p in h)if(f.call(h,p))return!1;return!0}return Iu=d,Iu}var wR=bR();const _R=Ul(wR),SR=({questions:e=[],prefilled_answers:t=new Map}={})=>{const r={},n={};return e.forEach((o={})=>{let s;const i=t instanceof Map?t.get(o.id):t[o.id];switch(o.type){case na:case oa:case fs:case sa:case ia:case aa:if(s=Hf(),n[o.id]="",i&&i.is_previously_submitted_answer&&!o.allow_prefill)break;i&&i.value&&i.value.length>0&&(n[o.id]=i.value[0]||"");break;case ra:if(s=sS().refine(a=>a instanceof Date&&!isNaN(a),{message:"Invalid date format."}),n[o.id]=void 0,i&&i.is_previously_submitted_answer&&!o.allow_prefill)break;if(i&&i.value&&i.value.length>0&&o.date_format&&ce(i.value[0],o.date_format).isValid()){const a=ce(i.value[0],o.date_format);n[o.id]=a.toDate()}break;case Xl:if(s=qf(Hf()),n[o.id]=[],i&&i.is_previously_submitted_answer&&!o.allow_prefill)break;i&&i.value&&i.value.length>0&&(n[o.id]=i.value||[]);break;default:console.warn(`Unknown question type: ${o.type} for question ID: ${o.id}`),s=C1(),n[o.id]=""}o.is_required&&([na,oa,fs,sa,ia,aa].includes(o.type)?s=s.min(1,{message:o.type===fs?"Please sign here":"This field is required"}):o.type===ra?s=s.refine(a=>a!=null,{message:"Please select a date"}):o.type===Xl&&(s=s.min(1,{message:"Please make at least one selection"}))),_R(o.validation)||(o.validation.type==="email"&&(s=s.email({message:"Invalid email address."})),o.validation.min_length&&(s=s.min(o.validation.min_length,{message:`Please enter at least ${o.validation.min_length} characters`})),o.validation.max_length&&(s=s.max(o.validation.max_length,{message:`Please enter no more than ${o.validation.max_length} characters`}))),o.is_required||([na,oa,fs,sa,ia,aa].includes(o.type)?s=s.or($1("")).optional():s=s.optional()),r[o.id]=s}),{schema:Kf(r),default_values:n}},kR=({data:e,onSubmit:t,renderFooter:r})=>{const{sections:n=[],questions:o=[]}=EP({questionnaire:e}),{form_config:{defaultValues:s={},...i}={}}=la(),{schema:a,default_values:c}=U.useMemo(()=>!o||o.length===0?{schema:Kf({}),default_values:{}}:SR({questions:o}),[o]),u=U.useMemo(()=>({...c,...s}),[c,s]),l=U.useMemo(()=>{const m={};return o.forEach(p=>{p.g_id&&(m[p.g_id]=p.id)}),m},[o]),f=U.useMemo(()=>{const m=lO(a);return async(p,g,y)=>{const O=await m(p,g,y);if(!O.errors||Object.keys(O.errors).length===0)return O;const x=Object.fromEntries(Object.entries(O.errors).filter(([w])=>{const _=o.find(S=>S.id===w);return _?yl({question:_,gid_to_ref:l,form_values:p}):!0}));return{...O,errors:x}}},[a,o,l]),d=xb({resolver:f,defaultValues:u,values:u,resetOptions:{keepDirtyValues:!0},mode:"onChange",...i}),h=()=>{if(d.trigger(),t){const m=d.getValues(),p=o.filter(g=>yl({question:g,gid_to_ref:l,form_values:m})).map(g=>{let y=m[g.id];return g.type===ra&&y instanceof Date&&(y=ce(y).format(g.date_format||"DD-MM-YYYY")),{reference_id:g.id,value:Array.isArray(y)?y:[y],section_gid:g.section_gid,item_gid:g.g_id}});t(p)}};return T.jsx(MC,{...d,children:T.jsxs("form",{className:"bq-form-container space-y-4",onSubmit:d.handleSubmit(h),children:[n?.map(m=>T.jsx(ZF,{section:m,form:d,questions:o},m.g_id)),r&&r({form:d})]})})};return({data:e,onSubmit:t,config:r,renderFooter:n})=>T.jsx(nb,{config:r,children:T.jsx(kR,{data:e,onSubmit:t,renderFooter:n})})}));
106
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},eF="DialogDescriptionWarning",tF=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${My(eF).contentName}}.`;return b.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},rF=yy,nF=by,oF=_y,Py=Sy,Ny=ky,Iy=Ey,Fy=Cy,sF=Dy;const iF=rF,aF=nF,cF=oF,Ry=b.forwardRef(({className:e,...t},r)=>T.jsx(Py,{ref:r,className:Ae("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Ry.displayName=Py.displayName;const Wy=b.forwardRef(({className:e,children:t,...r},n)=>T.jsxs(cF,{children:[T.jsx(Ry,{}),T.jsxs(Ny,{ref:n,className:Ae("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,T.jsxs(sF,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[T.jsx(jT,{className:"h-4 w-4"}),T.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Wy.displayName=Ny.displayName;const Ly=({className:e,...t})=>T.jsx("div",{className:Ae("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ly.displayName="DialogHeader";const zy=({className:e,...t})=>T.jsx("div",{className:Ae("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});zy.displayName="DialogFooter";const $y=b.forwardRef(({className:e,...t},r)=>T.jsx(Iy,{ref:r,className:Ae("text-lg font-semibold leading-none tracking-tight",e),...t}));$y.displayName=Iy.displayName;const lF=b.forwardRef(({className:e,...t},r)=>T.jsx(Fy,{ref:r,className:Ae("text-sm text-muted-foreground",e),...t}));lF.displayName=Fy.displayName;function Ll(){return Ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ll.apply(null,arguments)}function uF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function fF(e,t){if(e==null)return{};var r,n,o=uF(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function zl(e){"@babel/helpers - typeof";return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zl(e)}function dF(e,t,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function hF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $l(e,t){return $l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},$l(e,t)}function pF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$l(e,t)}function Ki(e){return Ki=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ki(e)}function Uy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Uy=function(){return!!e})()}function mF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gF(e,t){if(t&&(zl(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mF(e)}function yF(e){var t=Uy();return function(){var r,n=Ki(e);if(t){var o=Ki(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gF(this,r)}}var Ji=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ul(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xi={exports:{}},Qi={exports:{}},Ye={};var Yy;function vF(){if(Yy)return Ye;Yy=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function x(_){if(typeof _=="object"&&_!==null){var S=_.$$typeof;switch(S){case t:switch(_=_.type,_){case c:case u:case n:case s:case o:case f:return _;default:switch(_=_&&_.$$typeof,_){case a:case l:case m:case h:case i:return _;default:return S}}case r:return S}}}function w(_){return x(_)===u}return Ye.AsyncMode=c,Ye.ConcurrentMode=u,Ye.ContextConsumer=a,Ye.ContextProvider=i,Ye.Element=t,Ye.ForwardRef=l,Ye.Fragment=n,Ye.Lazy=m,Ye.Memo=h,Ye.Portal=r,Ye.Profiler=s,Ye.StrictMode=o,Ye.Suspense=f,Ye.isAsyncMode=function(_){return w(_)||x(_)===c},Ye.isConcurrentMode=w,Ye.isContextConsumer=function(_){return x(_)===a},Ye.isContextProvider=function(_){return x(_)===i},Ye.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},Ye.isForwardRef=function(_){return x(_)===l},Ye.isFragment=function(_){return x(_)===n},Ye.isLazy=function(_){return x(_)===m},Ye.isMemo=function(_){return x(_)===h},Ye.isPortal=function(_){return x(_)===r},Ye.isProfiler=function(_){return x(_)===s},Ye.isStrictMode=function(_){return x(_)===o},Ye.isSuspense=function(_){return x(_)===f},Ye.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===u||_===s||_===o||_===f||_===d||typeof _=="object"&&_!==null&&(_.$$typeof===m||_.$$typeof===h||_.$$typeof===i||_.$$typeof===a||_.$$typeof===l||_.$$typeof===g||_.$$typeof===y||_.$$typeof===O||_.$$typeof===p)},Ye.typeOf=x,Ye}var je={};var jy;function bF(){return jy||(jy=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function x(K){return typeof K=="string"||typeof K=="function"||K===n||K===u||K===s||K===o||K===f||K===d||typeof K=="object"&&K!==null&&(K.$$typeof===m||K.$$typeof===h||K.$$typeof===i||K.$$typeof===a||K.$$typeof===l||K.$$typeof===g||K.$$typeof===y||K.$$typeof===O||K.$$typeof===p)}function w(K){if(typeof K=="object"&&K!==null){var Se=K.$$typeof;switch(Se){case t:var Ie=K.type;switch(Ie){case c:case u:case n:case s:case o:case f:return Ie;default:var ke=Ie&&Ie.$$typeof;switch(ke){case a:case l:case m:case h:case i:return ke;default:return Se}}case r:return Se}}}var _=c,S=u,I=a,v=i,E=t,P=l,A=n,M=m,F=h,N=r,W=s,C=o,k=f,Y=!1;function $(K){return Y||(Y=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(K)||w(K)===c}function D(K){return w(K)===u}function V(K){return w(K)===a}function Z(K){return w(K)===i}function G(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function B(K){return w(K)===l}function L(K){return w(K)===n}function J(K){return w(K)===m}function q(K){return w(K)===h}function oe(K){return w(K)===r}function Q(K){return w(K)===s}function ne(K){return w(K)===o}function le(K){return w(K)===f}je.AsyncMode=_,je.ConcurrentMode=S,je.ContextConsumer=I,je.ContextProvider=v,je.Element=E,je.ForwardRef=P,je.Fragment=A,je.Lazy=M,je.Memo=F,je.Portal=N,je.Profiler=W,je.StrictMode=C,je.Suspense=k,je.isAsyncMode=$,je.isConcurrentMode=D,je.isContextConsumer=V,je.isContextProvider=Z,je.isElement=G,je.isForwardRef=B,je.isFragment=L,je.isLazy=J,je.isMemo=q,je.isPortal=oe,je.isProfiler=Q,je.isStrictMode=ne,je.isSuspense=le,je.isValidElementType=x,je.typeOf=w})()),je}var Vy;function By(){return Vy||(Vy=1,process.env.NODE_ENV==="production"?Qi.exports=vF():Qi.exports=bF()),Qi.exports}var Yl,Hy;function wF(){if(Hy)return Yl;Hy=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(l){return i[l]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(l){u[l]=l}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Yl=o()?Object.assign:function(s,i){for(var a,c=n(s),u,l=1;l<arguments.length;l++){a=Object(arguments[l]);for(var f in a)t.call(a,f)&&(c[f]=a[f]);if(e){u=e(a);for(var d=0;d<u.length;d++)r.call(a,u[d])&&(c[u[d]]=a[u[d]])}}return c},Yl}var jl,Zy;function Vl(){if(Zy)return jl;Zy=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return jl=e,jl}var Bl,Gy;function qy(){return Gy||(Gy=1,Bl=Function.call.bind(Object.prototype.hasOwnProperty)),Bl}var Hl,Ky;function _F(){if(Ky)return Hl;Ky=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Vl(),r={},n=qy();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,u){if(process.env.NODE_ENV!=="production"){for(var l in s)if(n(s,l)){var f;try{if(typeof s[l]!="function"){var d=Error((c||"React class")+": "+a+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=s[l](i,l,c,a,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var h=u?u():"";e("Failed "+a+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Hl=o,Hl}var Zl,Jy;function SF(){if(Jy)return Zl;Jy=1;var e=By(),t=wF(),r=Vl(),n=qy(),o=_F(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return Zl=function(a,c){var u=typeof Symbol=="function"&&Symbol.iterator,l="@@iterator";function f(D){var V=D&&(u&&D[u]||D[l]);if(typeof V=="function")return V}var d="<<anonymous>>",h={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:O(),arrayOf:x,element:w(),elementType:_(),instanceOf:S,node:P(),objectOf:v,oneOf:I,oneOfType:E,shape:M,exact:F};function m(D,V){return D===V?D!==0||1/D===1/V:D!==D&&V!==V}function p(D,V){this.message=D,this.data=V&&typeof V=="object"?V:{},this.stack=""}p.prototype=Error.prototype;function g(D){if(process.env.NODE_ENV!=="production")var V={},Z=0;function G(L,J,q,oe,Q,ne,le){if(oe=oe||d,ne=ne||q,le!==r){if(c){var K=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw K.name="Invariant Violation",K}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Se=oe+":"+q;!V[Se]&&Z<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ne+"` prop on `"+oe+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),V[Se]=!0,Z++)}}return J[q]==null?L?J[q]===null?new p("The "+Q+" `"+ne+"` is marked as required "+("in `"+oe+"`, but its value is `null`.")):new p("The "+Q+" `"+ne+"` is marked as required in "+("`"+oe+"`, but its value is `undefined`.")):null:D(J,q,oe,Q,ne)}var B=G.bind(null,!1);return B.isRequired=G.bind(null,!0),B}function y(D){function V(Z,G,B,L,J,q){var oe=Z[G],Q=C(oe);if(Q!==D){var ne=k(oe);return new p("Invalid "+L+" `"+J+"` of type "+("`"+ne+"` supplied to `"+B+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return g(V)}function O(){return g(i)}function x(D){function V(Z,G,B,L,J){if(typeof D!="function")return new p("Property `"+J+"` of component `"+B+"` has invalid PropType notation inside arrayOf.");var q=Z[G];if(!Array.isArray(q)){var oe=C(q);return new p("Invalid "+L+" `"+J+"` of type "+("`"+oe+"` supplied to `"+B+"`, expected an array."))}for(var Q=0;Q<q.length;Q++){var ne=D(q,Q,B,L,J+"["+Q+"]",r);if(ne instanceof Error)return ne}return null}return g(V)}function w(){function D(V,Z,G,B,L){var J=V[Z];if(!a(J)){var q=C(J);return new p("Invalid "+B+" `"+L+"` of type "+("`"+q+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return g(D)}function _(){function D(V,Z,G,B,L){var J=V[Z];if(!e.isValidElementType(J)){var q=C(J);return new p("Invalid "+B+" `"+L+"` of type "+("`"+q+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return g(D)}function S(D){function V(Z,G,B,L,J){if(!(Z[G]instanceof D)){var q=D.name||d,oe=$(Z[G]);return new p("Invalid "+L+" `"+J+"` of type "+("`"+oe+"` supplied to `"+B+"`, expected ")+("instance of `"+q+"`."))}return null}return g(V)}function I(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function V(Z,G,B,L,J){for(var q=Z[G],oe=0;oe<D.length;oe++)if(m(q,D[oe]))return null;var Q=JSON.stringify(D,function(le,K){var Se=k(K);return Se==="symbol"?String(K):K});return new p("Invalid "+L+" `"+J+"` of value `"+String(q)+"` "+("supplied to `"+B+"`, expected one of "+Q+"."))}return g(V)}function v(D){function V(Z,G,B,L,J){if(typeof D!="function")return new p("Property `"+J+"` of component `"+B+"` has invalid PropType notation inside objectOf.");var q=Z[G],oe=C(q);if(oe!=="object")return new p("Invalid "+L+" `"+J+"` of type "+("`"+oe+"` supplied to `"+B+"`, expected an object."));for(var Q in q)if(n(q,Q)){var ne=D(q,Q,B,L,J+"."+Q,r);if(ne instanceof Error)return ne}return null}return g(V)}function E(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var V=0;V<D.length;V++){var Z=D[V];if(typeof Z!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Y(Z)+" at index "+V+"."),i}function G(B,L,J,q,oe){for(var Q=[],ne=0;ne<D.length;ne++){var le=D[ne],K=le(B,L,J,q,oe,r);if(K==null)return null;K.data&&n(K.data,"expectedType")&&Q.push(K.data.expectedType)}var Se=Q.length>0?", expected one of type ["+Q.join(", ")+"]":"";return new p("Invalid "+q+" `"+oe+"` supplied to "+("`"+J+"`"+Se+"."))}return g(G)}function P(){function D(V,Z,G,B,L){return N(V[Z])?null:new p("Invalid "+B+" `"+L+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return g(D)}function A(D,V,Z,G,B){return new p((D||"React class")+": "+V+" type `"+Z+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function M(D){function V(Z,G,B,L,J){var q=Z[G],oe=C(q);if(oe!=="object")return new p("Invalid "+L+" `"+J+"` of type `"+oe+"` "+("supplied to `"+B+"`, expected `object`."));for(var Q in D){var ne=D[Q];if(typeof ne!="function")return A(B,L,J,Q,k(ne));var le=ne(q,Q,B,L,J+"."+Q,r);if(le)return le}return null}return g(V)}function F(D){function V(Z,G,B,L,J){var q=Z[G],oe=C(q);if(oe!=="object")return new p("Invalid "+L+" `"+J+"` of type `"+oe+"` "+("supplied to `"+B+"`, expected `object`."));var Q=t({},Z[G],D);for(var ne in Q){var le=D[ne];if(n(D,ne)&&typeof le!="function")return A(B,L,J,ne,k(le));if(!le)return new p("Invalid "+L+" `"+J+"` key `"+ne+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(Z[G],null," ")+`
107
+ Valid keys: `+JSON.stringify(Object.keys(D),null," "));var K=le(q,ne,B,L,J+"."+ne,r);if(K)return K}return null}return g(V)}function N(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(N);if(D===null||a(D))return!0;var V=f(D);if(V){var Z=V.call(D),G;if(V!==D.entries){for(;!(G=Z.next()).done;)if(!N(G.value))return!1}else for(;!(G=Z.next()).done;){var B=G.value;if(B&&!N(B[1]))return!1}}else return!1;return!0;default:return!1}}function W(D,V){return D==="symbol"?!0:V?V["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&V instanceof Symbol:!1}function C(D){var V=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":W(V,D)?"symbol":V}function k(D){if(typeof D>"u"||D===null)return""+D;var V=C(D);if(V==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return V}function Y(D){var V=k(D);switch(V){case"array":case"object":return"an "+V;case"boolean":case"date":case"regexp":return"a "+V;default:return V}}function $(D){return!D.constructor||!D.constructor.name?d:D.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Zl}var Gl,Xy;function kF(){if(Xy)return Gl;Xy=1;var e=Vl();function t(){}function r(){}return r.resetWarningCache=t,Gl=function(){function n(i,a,c,u,l,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}n.isRequired=n;function o(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},Gl}var Qy;function xF(){if(Qy)return Xi.exports;if(Qy=1,process.env.NODE_ENV!=="production"){var e=By(),t=!0;Xi.exports=SF()(e.isElement,t)}else Xi.exports=kF()();return Xi.exports}var EF=xF();const Xt=Ul(EF);function Vn(e,t,r){this.x=e,this.y=t,this.time=r||new Date().getTime()}Vn.prototype.velocityFrom=function(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):1},Vn.prototype.distanceTo=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},Vn.prototype.equals=function(e){return this.x===e.x&&this.y===e.y&&this.time===e.time};function ql(e,t,r,n){this.startPoint=e,this.control1=t,this.control2=r,this.endPoint=n}ql.prototype.length=function(){for(var e=10,t=0,r=void 0,n=void 0,o=0;o<=e;o+=1){var s=o/e,i=this._point(s,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),a=this._point(s,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(o>0){var c=i-r,u=a-n;t+=Math.sqrt(c*c+u*u)}r=i,n=a}return t},ql.prototype._point=function(e,t,r,n,o){return t*(1-e)*(1-e)*(1-e)+3*r*(1-e)*(1-e)*e+3*n*(1-e)*e*e+o*e*e*e};function OF(e,t,r){var n,o,s,i=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:Date.now(),i=null,s=e.apply(n,o),i||(n=o=null)};return function(){var u=Date.now();!a&&r.leading===!1&&(a=u);var l=t-(u-a);return n=this,o=arguments,l<=0||l>t?(i&&(clearTimeout(i),i=null),a=u,s=e.apply(n,o),i||(n=o=null)):!i&&r.trailing!==!1&&(i=setTimeout(c,l)),s}}function Xe(e,t){var r=this,n=t||{};this.velocityFilterWeight=n.velocityFilterWeight||.7,this.minWidth=n.minWidth||.5,this.maxWidth=n.maxWidth||2.5,this.throttle="throttle"in n?n.throttle:16,this.minDistance="minDistance"in n?n.minDistance:5,this.throttle?this._strokeMoveUpdate=OF(Xe.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=Xe.prototype._strokeUpdate,this.dotSize=n.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=n.penColor||"black",this.backgroundColor=n.backgroundColor||"rgba(0,0,0,0)",this.onBegin=n.onBegin,this.onEnd=n.onEnd,this._canvas=e,this._ctx=e.getContext("2d"),this.clear(),this._handleMouseDown=function(o){o.which===1&&(r._mouseButtonDown=!0,r._strokeBegin(o))},this._handleMouseMove=function(o){r._mouseButtonDown&&r._strokeMoveUpdate(o)},this._handleMouseUp=function(o){o.which===1&&r._mouseButtonDown&&(r._mouseButtonDown=!1,r._strokeEnd(o))},this._handleTouchStart=function(o){if(o.targetTouches.length===1){var s=o.changedTouches[0];r._strokeBegin(s)}},this._handleTouchMove=function(o){o.preventDefault();var s=o.targetTouches[0];r._strokeMoveUpdate(s)},this._handleTouchEnd=function(o){var s=o.target===r._canvas;s&&(o.preventDefault(),r._strokeEnd(o))},this.on()}Xe.prototype.clear=function(){var e=this._ctx,t=this._canvas;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(),this._isEmpty=!0},Xe.prototype.fromDataURL=function(e){var t=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new Image,o=r.ratio||window.devicePixelRatio||1,s=r.width||this._canvas.width/o,i=r.height||this._canvas.height/o;this._reset(),n.src=e,n.onload=function(){t._ctx.drawImage(n,0,0,s,i)},this._isEmpty=!1},Xe.prototype.toDataURL=function(e){var t;switch(e){case"image/svg+xml":return this._toSVG();default:for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return(t=this._canvas).toDataURL.apply(t,[e].concat(n))}},Xe.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},Xe.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),document.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},Xe.prototype.isEmpty=function(){return this._isEmpty},Xe.prototype._strokeBegin=function(e){this._data.push([]),this._reset(),this._strokeUpdate(e),typeof this.onBegin=="function"&&this.onBegin(e)},Xe.prototype._strokeUpdate=function(e){var t=e.clientX,r=e.clientY,n=this._createPoint(t,r),o=this._data[this._data.length-1],s=o&&o[o.length-1],i=s&&n.distanceTo(s)<this.minDistance;if(!(s&&i)){var a=this._addPoint(n),c=a.curve,u=a.widths;c&&u&&this._drawCurve(c,u.start,u.end),this._data[this._data.length-1].push({x:n.x,y:n.y,time:n.time,color:this.penColor})}},Xe.prototype._strokeEnd=function(e){var t=this.points.length>2,r=this.points[0];if(!t&&r&&this._drawDot(r),r){var n=this._data[this._data.length-1],o=n[n.length-1];r.equals(o)||n.push({x:r.x,y:r.y,time:r.time,color:this.penColor})}typeof this.onEnd=="function"&&this.onEnd(e)},Xe.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)},Xe.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},Xe.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor},Xe.prototype._createPoint=function(e,t,r){var n=this._canvas.getBoundingClientRect();return new Vn(e-n.left,t-n.top,r||new Date().getTime())},Xe.prototype._addPoint=function(e){var t=this.points,r=void 0;if(t.push(e),t.length>2){t.length===3&&t.unshift(t[0]),r=this._calculateCurveControlPoints(t[0],t[1],t[2]);var n=r.c2;r=this._calculateCurveControlPoints(t[1],t[2],t[3]);var o=r.c1,s=new ql(t[1],n,o,t[2]),i=this._calculateCurveWidths(s);return t.shift(),{curve:s,widths:i}}return{}},Xe.prototype._calculateCurveControlPoints=function(e,t,r){var n=e.x-t.x,o=e.y-t.y,s=t.x-r.x,i=t.y-r.y,a={x:(e.x+t.x)/2,y:(e.y+t.y)/2},c={x:(t.x+r.x)/2,y:(t.y+r.y)/2},u=Math.sqrt(n*n+o*o),l=Math.sqrt(s*s+i*i),f=a.x-c.x,d=a.y-c.y,h=l/(u+l),m={x:c.x+f*h,y:c.y+d*h},p=t.x-m.x,g=t.y-m.y;return{c1:new Vn(a.x+p,a.y+g),c2:new Vn(c.x+p,c.y+g)}},Xe.prototype._calculateCurveWidths=function(e){var t=e.startPoint,r=e.endPoint,n={start:null,end:null},o=this.velocityFilterWeight*r.velocityFrom(t)+(1-this.velocityFilterWeight)*this._lastVelocity,s=this._strokeWidth(o);return n.start=this._lastWidth,n.end=s,this._lastVelocity=o,this._lastWidth=s,n},Xe.prototype._strokeWidth=function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)},Xe.prototype._drawPoint=function(e,t,r){var n=this._ctx;n.moveTo(e,t),n.arc(e,t,r,0,2*Math.PI,!1),this._isEmpty=!1},Xe.prototype._drawCurve=function(e,t,r){var n=this._ctx,o=r-t,s=Math.floor(e.length());n.beginPath();for(var i=0;i<s;i+=1){var a=i/s,c=a*a,u=c*a,l=1-a,f=l*l,d=f*l,h=d*e.startPoint.x;h+=3*f*a*e.control1.x,h+=3*l*c*e.control2.x,h+=u*e.endPoint.x;var m=d*e.startPoint.y;m+=3*f*a*e.control1.y,m+=3*l*c*e.control2.y,m+=u*e.endPoint.y;var p=t+u*o;this._drawPoint(h,m,p)}n.closePath(),n.fill()},Xe.prototype._drawDot=function(e){var t=this._ctx,r=typeof this.dotSize=="function"?this.dotSize():this.dotSize;t.beginPath(),this._drawPoint(e.x,e.y,r),t.closePath(),t.fill()},Xe.prototype._fromData=function(e,t,r){for(var n=0;n<e.length;n+=1){var o=e[n];if(o.length>1)for(var s=0;s<o.length;s+=1){var i=o[s],a=new Vn(i.x,i.y,i.time),c=i.color;if(s===0)this.penColor=c,this._reset(),this._addPoint(a);else if(s!==o.length-1){var u=this._addPoint(a),l=u.curve,f=u.widths;l&&f&&t(l,f,c)}}else{this._reset();var d=o[0];r(d)}}},Xe.prototype._toSVG=function(){var e=this,t=this._data,r=this._canvas,n=Math.max(window.devicePixelRatio||1,1),o=0,s=0,i=r.width/n,a=r.height/n,c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttributeNS(null,"width",r.width),c.setAttributeNS(null,"height",r.height),this._fromData(t,function(y,O,x){var w=document.createElement("path");if(!isNaN(y.control1.x)&&!isNaN(y.control1.y)&&!isNaN(y.control2.x)&&!isNaN(y.control2.y)){var _="M "+y.startPoint.x.toFixed(3)+","+y.startPoint.y.toFixed(3)+" "+("C "+y.control1.x.toFixed(3)+","+y.control1.y.toFixed(3)+" ")+(y.control2.x.toFixed(3)+","+y.control2.y.toFixed(3)+" ")+(y.endPoint.x.toFixed(3)+","+y.endPoint.y.toFixed(3));w.setAttribute("d",_),w.setAttribute("stroke-width",(O.end*2.25).toFixed(3)),w.setAttribute("stroke",x),w.setAttribute("fill","none"),w.setAttribute("stroke-linecap","round"),c.appendChild(w)}},function(y){var O=document.createElement("circle"),x=typeof e.dotSize=="function"?e.dotSize():e.dotSize;O.setAttribute("r",x),O.setAttribute("cx",y.x),O.setAttribute("cy",y.y),O.setAttribute("fill",y.color),c.appendChild(O)});var u="data:image/svg+xml;base64,",l='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'+(' viewBox="'+o+" "+s+" "+i+" "+a+'"')+(' width="'+i+'"')+(' height="'+a+'"')+">",f=c.innerHTML;if(f===void 0){var d=document.createElement("dummy"),h=c.childNodes;d.innerHTML="";for(var m=0;m<h.length;m+=1)d.appendChild(h[m].cloneNode(!0));f=d.innerHTML}var p="</svg>",g=l+f+p;return u+btoa(g)},Xe.prototype.fromData=function(e){var t=this;this.clear(),this._fromData(e,function(r,n){return t._drawCurve(r,n.start,n.end)},function(r){return t._drawDot(r)}),this._data=e},Xe.prototype.toData=function(){return this._data};var ea={exports:{}},CF=ea.exports,ev;function TF(){return ev||(ev=1,(function(e,t){(function(r,n){e.exports=n()})(CF,function(){return(function(r){function n(s){if(o[s])return o[s].exports;var i=o[s]={exports:{},id:s,loaded:!1};return r[s].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var o={};return n.m=r,n.c=o,n.p="",n(0)})([function(r,n){function o(u){var l=u.getContext("2d"),f=u.width,d=u.height,h=l.getImageData(0,0,f,d).data,m=a(!0,f,d,h),p=a(!1,f,d,h),g=c(!0,f,d,h),y=c(!1,f,d,h),O=y-g+1,x=p-m+1,w=l.getImageData(g,m,O,x);return u.width=O,u.height=x,l.clearRect(0,0,O,x),l.putImageData(w,0,0),u}function s(u,l,f,d){return{red:d[4*(f*l+u)],green:d[4*(f*l+u)+1],blue:d[4*(f*l+u)+2],alpha:d[4*(f*l+u)+3]}}function i(u,l,f,d){return s(u,l,f,d).alpha}function a(u,l,f,d){for(var h=u?1:-1,m=u?0:f-1,p=m;u?p<f:p>-1;p+=h)for(var g=0;g<l;g++)if(i(g,p,l,d))return p;return null}function c(u,l,f,d){for(var h=u?1:-1,m=u?0:l-1,p=m;u?p<l:p>-1;p+=h)for(var g=0;g<f;g++)if(i(p,g,l,d))return p;return null}Object.defineProperty(n,"__esModule",{value:!0}),n.default=o}])})})(ea)),ea.exports}var DF=TF();const AF=Ul(DF);var MF=["canvasProps","clearOnResize"],ta=(function(e){pF(r,e);var t=yF(r);function r(){var n;hF(this,r);for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return n=t.call.apply(t,[this].concat(s)),n.staticThis=n.constructor,n._sigPad=null,n._canvas=null,n.setRef=function(a){n._canvas=a,n._canvas===null&&(n._sigPad=null)},n._excludeOurProps=function(){var a=n.props;a.canvasProps,a.clearOnResize;var c=fF(a,MF);return c},n.componentDidMount=function(){var a=n.getCanvas();n._sigPad=new Xe(a,n._excludeOurProps()),n._resizeCanvas(),n.on()},n.componentWillUnmount=function(){n.off()},n.componentDidUpdate=function(){Object.assign(n._sigPad,n._excludeOurProps())},n.getCanvas=function(){if(n._canvas===null)throw n.staticThis.refNullError;return n._canvas},n.getTrimmedCanvas=function(){var a=n.getCanvas(),c=document.createElement("canvas");return c.width=a.width,c.height=a.height,c.getContext("2d").drawImage(a,0,0),AF(c)},n.getSignaturePad=function(){if(n._sigPad===null)throw n.staticThis.refNullError;return n._sigPad},n._checkClearOnResize=function(){n.props.clearOnResize&&n._resizeCanvas()},n._resizeCanvas=function(){var a,c,u=(a=n.props.canvasProps)!==null&&a!==void 0?a:{},l=u.width,f=u.height;if(!(typeof l<"u"&&typeof f<"u")){var d=n.getCanvas(),h=Math.max((c=window.devicePixelRatio)!==null&&c!==void 0?c:1,1);typeof l>"u"&&(d.width=d.offsetWidth*h),typeof f>"u"&&(d.height=d.offsetHeight*h),d.getContext("2d").scale(h,h),n.clear()}},n.render=function(){var a=n.props.canvasProps;return U.createElement("canvas",Ll({ref:n.setRef},a))},n.on=function(){return window.addEventListener("resize",n._checkClearOnResize),n.getSignaturePad().on()},n.off=function(){return window.removeEventListener("resize",n._checkClearOnResize),n.getSignaturePad().off()},n.clear=function(){return n.getSignaturePad().clear()},n.isEmpty=function(){return n.getSignaturePad().isEmpty()},n.fromDataURL=function(a,c){return n.getSignaturePad().fromDataURL(a,c)},n.toDataURL=function(a,c){return n.getSignaturePad().toDataURL(a,c)},n.fromData=function(a){return n.getSignaturePad().fromData(a)},n.toData=function(){return n.getSignaturePad().toData()},n}return dF(r)})(U.Component);ta.propTypes={velocityFilterWeight:Xt.number,minWidth:Xt.number,maxWidth:Xt.number,minDistance:Xt.number,dotSize:Xt.oneOfType([Xt.number,Xt.func]),penColor:Xt.string,throttle:Xt.number,onEnd:Xt.func,onBegin:Xt.func,canvasProps:Xt.object,clearOnResize:Xt.bool},ta.defaultProps={clearOnResize:!0},ta.refNullError=new Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");const PF=(e={})=>{const{field:t={},form:r={},question:n={},disabled:o=!1}=e,s=U.useRef({}),[i,a]=U.useState(!1);return T.jsxs("div",{children:[T.jsxs(iF,{open:i,onOpenChange:a,children:[T.jsx(aF,{asChild:!0,children:T.jsx(vo,{...t,type:"button",variant:"outline",disabled:o,className:Ae("bq-signature-button w-full border focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!t.value&&"text-muted-foreground",r.formState.errors[n.reference_id]&&"border-destructive"),children:"Click here to sign"})}),T.jsxs(Wy,{className:"bq-signature-dialog sm:max-w-md",children:[T.jsx(Ly,{children:T.jsx($y,{children:"Sign here"})}),T.jsx("div",{className:"bq-signature-pad border",children:T.jsx(ta,{ref:s,penColor:"black",canvasProps:{width:400,height:200,className:"sigCanvas"}})}),T.jsxs(zy,{children:[T.jsx(vo,{type:"button",variant:"secondary",onClick:()=>{s.current.clear()},children:"Clear"}),T.jsx(vo,{type:"button",onClick:async()=>{if(s.current.toData().length>0){const c=s.current.getTrimmedCanvas().toDataURL("image/png"),u=await OP(c);t.onChange(u)}else t.onChange("");a(!1)},children:"Save"})]})]})]}),t.value&&T.jsx("img",{className:"border rounded p-2 mt-2",src:t.value})]})};function NF(e,t){e.src=t}const IF=e=>{var t,r,n,o="The Google Maps JavaScript API",s="google",i="importLibrary",a="__ib__",c=document,u=window,l=u[s]||(u[s]={}),f=l.maps||(l.maps={}),d=new Set,h=new URLSearchParams,m=()=>t||(t=new Promise(async(p,g)=>{await(r=c.createElement("script")),h.set("libraries",[...d]+"");for(n in e)h.set(n.replace(/[A-Z]/g,y=>"_"+y[0].toLowerCase()),e[n]);h.set("callback",s+".maps."+a),NF(r,"https://maps.googleapis.com/maps/api/js?"+h),f[a]=p,r.onerror=()=>t=g(Error(o+" could not load.")),r.nonce=c.querySelector("script[nonce]")?.nonce||"",c.head.append(r)}));f[i]?console.warn(o+" only loads once. Ignoring:",e):f[i]=(p,...g)=>d.add(p)&&m().then(()=>f[i](p,...g))},FF=e=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`,RF=e=>`The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(e)}) will be ignored.`,WF="No options were set before calling importLibrary. Make sure to configure the loader using setOptions().",LF="There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.",tv=process.env.NODE_ENV!=="production",Kl=tv?e=>{console.warn(`[@googlemaps/js-api-loader] ${e}`)}:()=>{},zF=tv?e=>{console.info(`[@googlemaps/js-api-loader] ${e}`)}:()=>{},$F=process.env.NODE_ENV!=="production";let Jl=!1;function UF(e){if(Jl){Kl(FF(e));return}jF(e),Jl=!0}async function YF(e){if(Jl||Kl(WF),!window?.google?.maps?.importLibrary)throw new Error("google.maps.importLibrary is not installed.");return await google.maps.importLibrary(e)}function jF(e){const t=!!window.google?.maps?.importLibrary;t?zF(RF(e)):$F&&document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]')&&Kl(LF),t||IF(e)}const VF=(e={})=>{const{field:t={},form:r={},question:n={},disabled:o=!1}=e,s=U.useRef(null),i=U.useRef(null),a=U.useRef(t.onChange),{address_config:c}=n,u=c?.google_api_key;U.useEffect(()=>{a.current=t.onChange},[t.onChange]);const l=U.useCallback(f=>{s.current=f,typeof t.ref=="function"?t.ref(f):t.ref&&(t.ref.current=f)},[t.ref]);return U.useEffect(()=>{if(!u||!s.current)return;let f=!1;return UF({key:u,v:"weekly"}),YF("places").then(d=>{if(f||!s.current)return;const h={fields:["formatted_address","place_id"]},m=c?.countries;m&&m.length>0&&(h.componentRestrictions={country:m}),i.current&&(typeof google<"u"&&google.maps?.event&&google.maps.event.clearInstanceListeners(i.current),i.current=null);const p=new d.Autocomplete(s.current,h);p.addListener("place_changed",()=>{const g=p.getPlace();g?.formatted_address&&(a.current(g.formatted_address),s.current&&(s.current.value=g.formatted_address))}),i.current=p}).catch(d=>{f||console.warn("AddressQuestion: Failed to load Google Places",d)}),()=>{f=!0,typeof google<"u"&&google.maps?.event&&(i.current&&google.maps.event.clearInstanceListeners(i.current),s.current&&google.maps.event.clearInstanceListeners(s.current)),i.current=null,document.querySelectorAll(".pac-container").forEach(d=>d.remove())}},[u,s.current]),T.jsx(jh,{ref:l,type:"text",name:t.name,value:t.value||"",onChange:f=>t.onChange(f.target.value),onBlur:t.onBlur,placeholder:n.placeholder||"Start typing your address...",className:r.formState.errors[n.id]?"bq-address border-destructive focus-visible:ring-destructive":"bq-address",disabled:o})},ra="DATE_PICKER",na="INPUT",oa="TEXTAREA",sa="RADIO",Xl="CHECKBOX",ia="SELECT",fs="SIGNATURE",BF="CONTENT",aa="ADDRESS",HF=(e={})=>{const{field:t={},form:r={},question:n={},index:o=0,disabled:s=!1}=e;if(n.type===BF){const l=PO.sanitize(n.content);return T.jsx("div",{dangerouslySetInnerHTML:{__html:l}})}const{with_label:i}=la(),a={field:t,form:r,question:n,disabled:s};let c=null;switch(n.type){case na:c=T.jsx(RC,{...a});break;case oa:c=T.jsx(LC,{...a});break;case sa:c=T.jsx(HT,{...a});break;case Xl:c=T.jsx(XT,{...a});break;case ia:c=T.jsx(mP,{...a});break;case ra:c=T.jsx($I,{...a});break;case fs:c=T.jsx(PF,{...a});break;case aa:c=T.jsx(VF,{...a});break;default:c=null}const u=`question-${n.reference_id}`;return T.jsxs(Cc,{id:u,children:[i&&T.jsx(Tc,{className:"leading-normal",children:T.jsxs("div",{children:[T.jsxs("div",{className:"block",children:[n.label,n.is_required&&T.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),n.sub_label&&T.jsx("div",{className:"mb-1 text-muted-foreground",children:n.sub_label})]})}),n.description&&T.jsx(IC,{children:n.description}),T.jsx(li,{children:c}),T.jsx(FC,{className:"bq-form-message"})]})};function ZF({section:e,form:t,questions:r=[]}){const{with_section_title:n}=la(),o=U.useMemo(()=>{const i={};return r.forEach(a=>{a.g_id&&(i[a.g_id]=a.id)}),i},[r]),s=Hu({control:t.control});return T.jsxs("div",{className:"bq-section space-y-6",children:[n&&T.jsx("h2",{className:"bq-section-title text-xl font-semibold",children:e.title}),e.items?.map(i=>{const a=i.reference_id;return yl({question:i,gid_to_ref:o,form_values:s})?T.jsx(NC,{control:t.control,name:a,shouldUnregister:!!i?.show_if?.item_gid,render:({field:c})=>T.jsx(HF,{field:c,form:t,question:i})},a):null})]})}var Ql,rv;function nv(){if(rv)return Ql;rv=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,o=typeof n=="function"&&n.prototype||e;return r===o}return Ql=t,Ql}var eu,ov;function GF(){if(ov)return eu;ov=1;function e(t,r){return function(n){return t(r(n))}}return eu=e,eu}var tu,sv;function qF(){if(sv)return tu;sv=1;var e=GF(),t=e(Object.keys,Object);return tu=t,tu}var ru,iv;function KF(){if(iv)return ru;iv=1;var e=nv(),t=qF(),r=Object.prototype,n=r.hasOwnProperty;function o(s){if(!e(s))return t(s);var i=[];for(var a in Object(s))n.call(s,a)&&a!="constructor"&&i.push(a);return i}return ru=o,ru}var nu,av;function cv(){if(av)return nu;av=1;var e=typeof Ji=="object"&&Ji&&Ji.Object===Object&&Ji;return nu=e,nu}var ou,lv;function xn(){if(lv)return ou;lv=1;var e=cv(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return ou=r,ou}var su,uv;function fv(){if(uv)return su;uv=1;var e=xn(),t=e.Symbol;return su=t,su}var iu,dv;function JF(){if(dv)return iu;dv=1;var e=fv(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function s(i){var a=r.call(i,o),c=i[o];try{i[o]=void 0;var u=!0}catch{}var l=n.call(i);return u&&(a?i[o]=c:delete i[o]),l}return iu=s,iu}var au,hv;function XF(){if(hv)return au;hv=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return au=r,au}var cu,pv;function ca(){if(pv)return cu;pv=1;var e=fv(),t=JF(),r=XF(),n="[object Null]",o="[object Undefined]",s=e?e.toStringTag:void 0;function i(a){return a==null?a===void 0?o:n:s&&s in Object(a)?t(a):r(a)}return cu=i,cu}var lu,mv;function gv(){if(mv)return lu;mv=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return lu=e,lu}var uu,yv;function vv(){if(yv)return uu;yv=1;var e=ca(),t=gv(),r="[object AsyncFunction]",n="[object Function]",o="[object GeneratorFunction]",s="[object Proxy]";function i(a){if(!t(a))return!1;var c=e(a);return c==n||c==o||c==r||c==s}return uu=i,uu}var fu,bv;function QF(){if(bv)return fu;bv=1;var e=xn(),t=e["__core-js_shared__"];return fu=t,fu}var du,wv;function eR(){if(wv)return du;wv=1;var e=QF(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return du=r,du}var hu,_v;function Sv(){if(_v)return hu;_v=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return hu=r,hu}var pu,kv;function tR(){if(kv)return pu;kv=1;var e=vv(),t=eR(),r=gv(),n=Sv(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,i=Function.prototype,a=Object.prototype,c=i.toString,u=a.hasOwnProperty,l=RegExp("^"+c.call(u).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(d){if(!r(d)||t(d))return!1;var h=e(d)?l:s;return h.test(n(d))}return pu=f,pu}var mu,xv;function rR(){if(xv)return mu;xv=1;function e(t,r){return t?.[r]}return mu=e,mu}var gu,Ev;function ds(){if(Ev)return gu;Ev=1;var e=tR(),t=rR();function r(n,o){var s=t(n,o);return e(s)?s:void 0}return gu=r,gu}var yu,Ov;function nR(){if(Ov)return yu;Ov=1;var e=ds(),t=xn(),r=e(t,"DataView");return yu=r,yu}var vu,Cv;function oR(){if(Cv)return vu;Cv=1;var e=ds(),t=xn(),r=e(t,"Map");return vu=r,vu}var bu,Tv;function sR(){if(Tv)return bu;Tv=1;var e=ds(),t=xn(),r=e(t,"Promise");return bu=r,bu}var wu,Dv;function iR(){if(Dv)return wu;Dv=1;var e=ds(),t=xn(),r=e(t,"Set");return wu=r,wu}var _u,Av;function aR(){if(Av)return _u;Av=1;var e=ds(),t=xn(),r=e(t,"WeakMap");return _u=r,_u}var Su,Mv;function cR(){if(Mv)return Su;Mv=1;var e=nR(),t=oR(),r=sR(),n=iR(),o=aR(),s=ca(),i=Sv(),a="[object Map]",c="[object Object]",u="[object Promise]",l="[object Set]",f="[object WeakMap]",d="[object DataView]",h=i(e),m=i(t),p=i(r),g=i(n),y=i(o),O=s;return(e&&O(new e(new ArrayBuffer(1)))!=d||t&&O(new t)!=a||r&&O(r.resolve())!=u||n&&O(new n)!=l||o&&O(new o)!=f)&&(O=function(x){var w=s(x),_=w==c?x.constructor:void 0,S=_?i(_):"";if(S)switch(S){case h:return d;case m:return a;case p:return u;case g:return l;case y:return f}return w}),Su=O,Su}var ku,Pv;function xu(){if(Pv)return ku;Pv=1;function e(t){return t!=null&&typeof t=="object"}return ku=e,ku}var Eu,Nv;function lR(){if(Nv)return Eu;Nv=1;var e=ca(),t=xu(),r="[object Arguments]";function n(o){return t(o)&&e(o)==r}return Eu=n,Eu}var Ou,Iv;function uR(){if(Iv)return Ou;Iv=1;var e=lR(),t=xu(),r=Object.prototype,n=r.hasOwnProperty,o=r.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(i){return t(i)&&n.call(i,"callee")&&!o.call(i,"callee")};return Ou=s,Ou}var Cu,Fv;function fR(){if(Fv)return Cu;Fv=1;var e=Array.isArray;return Cu=e,Cu}var Tu,Rv;function Wv(){if(Rv)return Tu;Rv=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Tu=t,Tu}var Du,Lv;function dR(){if(Lv)return Du;Lv=1;var e=vv(),t=Wv();function r(n){return n!=null&&t(n.length)&&!e(n)}return Du=r,Du}var hs={exports:{}},Au,zv;function hR(){if(zv)return Au;zv=1;function e(){return!1}return Au=e,Au}hs.exports;var $v;function pR(){return $v||($v=1,(function(e,t){var r=xn(),n=hR(),o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===o,a=i?r.Buffer:void 0,c=a?a.isBuffer:void 0,u=c||n;e.exports=u})(hs,hs.exports)),hs.exports}var Mu,Uv;function mR(){if(Uv)return Mu;Uv=1;var e=ca(),t=Wv(),r=xu(),n="[object Arguments]",o="[object Array]",s="[object Boolean]",i="[object Date]",a="[object Error]",c="[object Function]",u="[object Map]",l="[object Number]",f="[object Object]",d="[object RegExp]",h="[object Set]",m="[object String]",p="[object WeakMap]",g="[object ArrayBuffer]",y="[object DataView]",O="[object Float32Array]",x="[object Float64Array]",w="[object Int8Array]",_="[object Int16Array]",S="[object Int32Array]",I="[object Uint8Array]",v="[object Uint8ClampedArray]",E="[object Uint16Array]",P="[object Uint32Array]",A={};A[O]=A[x]=A[w]=A[_]=A[S]=A[I]=A[v]=A[E]=A[P]=!0,A[n]=A[o]=A[g]=A[s]=A[y]=A[i]=A[a]=A[c]=A[u]=A[l]=A[f]=A[d]=A[h]=A[m]=A[p]=!1;function M(F){return r(F)&&t(F.length)&&!!A[e(F)]}return Mu=M,Mu}var Pu,Yv;function gR(){if(Yv)return Pu;Yv=1;function e(t){return function(r){return t(r)}}return Pu=e,Pu}var ps={exports:{}};ps.exports;var jv;function yR(){return jv||(jv=1,(function(e,t){var r=cv(),n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===n,i=s&&r.process,a=(function(){try{var c=o&&o.require&&o.require("util").types;return c||i&&i.binding&&i.binding("util")}catch{}})();e.exports=a})(ps,ps.exports)),ps.exports}var Nu,Vv;function vR(){if(Vv)return Nu;Vv=1;var e=mR(),t=gR(),r=yR(),n=r&&r.isTypedArray,o=n?t(n):e;return Nu=o,Nu}var Iu,Bv;function bR(){if(Bv)return Iu;Bv=1;var e=KF(),t=cR(),r=uR(),n=fR(),o=dR(),s=pR(),i=nv(),a=vR(),c="[object Map]",u="[object Set]",l=Object.prototype,f=l.hasOwnProperty;function d(h){if(h==null)return!0;if(o(h)&&(n(h)||typeof h=="string"||typeof h.splice=="function"||s(h)||a(h)||r(h)))return!h.length;var m=t(h);if(m==c||m==u)return!h.size;if(i(h))return!e(h).length;for(var p in h)if(f.call(h,p))return!1;return!0}return Iu=d,Iu}var wR=bR();const _R=Ul(wR),SR=({questions:e=[],prefilled_answers:t=new Map}={})=>{const r={},n={};return e.forEach((o={})=>{let s;const i=t instanceof Map?t.get(o.id):t[o.id];switch(o.type){case na:case oa:case fs:case sa:case ia:case aa:if(s=Hf(),n[o.id]="",i&&i.is_previously_submitted_answer&&!o.allow_prefill)break;i&&i.value&&i.value.length>0&&(n[o.id]=i.value[0]||"");break;case ra:if(s=iS().refine(a=>a instanceof Date&&!isNaN(a),{message:"Invalid date format."}),n[o.id]=void 0,i&&i.is_previously_submitted_answer&&!o.allow_prefill)break;if(i&&i.value&&i.value.length>0&&o.date_format&&ce(i.value[0],o.date_format).isValid()){const a=ce(i.value[0],o.date_format);n[o.id]=a.toDate()}break;case Xl:if(s=qf(Hf()),n[o.id]=[],i&&i.is_previously_submitted_answer&&!o.allow_prefill)break;i&&i.value&&i.value.length>0&&(n[o.id]=i.value||[]);break;default:console.warn(`Unknown question type: ${o.type} for question ID: ${o.id}`),s=T1(),n[o.id]=""}o.is_required&&([na,oa,fs,sa,ia,aa].includes(o.type)?s=s.min(1,{message:o.type===fs?"Please sign here":"This field is required"}):o.type===ra?s=s.refine(a=>a!=null,{message:"Please select a date"}):o.type===Xl&&(s=s.min(1,{message:"Please make at least one selection"}))),_R(o.validation)||(o.validation.type==="email"&&(s=s.email({message:"Invalid email address."})),o.validation.min_length&&(s=s.min(o.validation.min_length,{message:`Please enter at least ${o.validation.min_length} characters`})),o.validation.max_length&&(s=s.max(o.validation.max_length,{message:`Please enter no more than ${o.validation.max_length} characters`}))),o.is_required||([na,oa,fs,sa,ia,aa].includes(o.type)?s=s.or(U1("")).optional():s=s.optional()),r[o.id]=s}),{schema:Kf(r),default_values:n}},kR=({data:e,onSubmit:t,renderFooter:r})=>{const{sections:n=[],questions:o=[]}=CP({questionnaire:e}),{form_config:{defaultValues:s={},...i}={}}=la(),{schema:a,default_values:c}=U.useMemo(()=>!o||o.length===0?{schema:Kf({}),default_values:{}}:SR({questions:o}),[o]),u=U.useMemo(()=>({...c,...s}),[c,s]),l=U.useMemo(()=>{const m={};return o.forEach(p=>{p.g_id&&(m[p.g_id]=p.id)}),m},[o]),f=U.useMemo(()=>{const m=uO(a);return async(p,g,y)=>{const O=await m(p,g,y);if(!O.errors||Object.keys(O.errors).length===0)return O;const x=Object.fromEntries(Object.entries(O.errors).filter(([w])=>{const _=o.find(S=>S.id===w);return _?yl({question:_,gid_to_ref:l,form_values:p}):!0}));return{...O,errors:x}}},[a,o,l]),d=Eb({resolver:f,defaultValues:u,values:u,resetOptions:{keepDirtyValues:!0},mode:"onChange",...i}),h=()=>{if(d.trigger(),t){const m=d.getValues(),p=o.filter(g=>yl({question:g,gid_to_ref:l,form_values:m})).map(g=>{let y=m[g.id];return g.type===ra&&y instanceof Date&&(y=ce(y).format(g.date_format||"DD-MM-YYYY")),{reference_id:g.id,value:Array.isArray(y)?y:[y],section_gid:g.section_gid,item_gid:g.g_id}});t(p)}};return T.jsx(PC,{...d,children:T.jsxs("form",{className:"bq-form-container space-y-4",onSubmit:d.handleSubmit(h),children:[n?.map(m=>T.jsx(ZF,{section:m,form:d,questions:o},m.g_id)),r&&r({form:d})]})})};return({data:e,onSubmit:t,config:r,renderFooter:n})=>T.jsx(ob,{config:r,children:T.jsx(kR,{data:e,onSubmit:t,renderFooter:n})})}));