@dartcom/ui-kit 10.1.19 → 10.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import r,{useLayoutEffect as i,useEffect as s,useRef as o,useMemo as a,useCallback as l,useState as u,createContext as c,memo as h,useReducer as d,useContext as f,use as p,forwardRef as g,createElement as m,cloneElement as _,Component as y,isValidElement as v}from"react";import{Typography as b,Box as x,List as w,ListItem as A,Slide as E,Tooltip as S,IconButton as T,Dialog as k,DialogTitle as O,DialogContent as R,DialogContentText as C,DialogActions as P,Button as M,styled as N,TextField as I,Autocomplete as D,useTheme as F,Accordion as z,AccordionSummary as L,AccordionDetails as j,Tab as V,CircularProgress as U}from"@mui/material";import B from"@mui/icons-material/Delete";import G from"@mui/icons-material/Edit";import $ from"@mui/material/IconButton";import q from"@mui/icons-material/CloudUpload";import H from"@mui/icons-material/Moving";import W from"@mui/material/Checkbox";import Z from"@mui/material/FormControlLabel";import{styled as K,createTheme as X,ThemeProvider as Y}from"@mui/material/styles";import Q from"@mui/material/Typography";import{unstable_batchedUpdates as J,createPortal as ee}from"react-dom";import te from"axios";import{LocalizationProvider as ne}from"@mui/x-date-pickers";import{AdapterDateFns as re}from"@mui/x-date-pickers/AdapterDateFns";import ie from"@mui/icons-material/ArrowDownward";import{DateField as se}from"@mui/x-date-pickers/DateField";import{TabContext as oe,TabList as ae,TabPanel as le}from"@mui/lab";import ue from"@mui/material/Box";import ce from"@mui/material/Modal";const he=({text:t="Нет данных"})=>e(b,{variant:"body2",sx:{textAlign:"center",color:"var(--gray-light-color)"},children:t});function de({items:r,columnsCount:i=1,getContent:s,title:o,getKey:a,onClick:l,sx:u,isShowNoData:c=!0}){const h=0===r.length;return t(x,{sx:{display:"grid",gridTemplateColumns:"1fr",gap:"15px",...u?.root},children:[o?e(b,{variant:"h6",noWrap:!0,sx:{textAlign:"center",fontWeight:700,...u?.title},children:o}):null,h?e(n.Fragment,{children:c?e(he,{}):null}):e(w,{sx:{display:"grid",gridTemplateColumns:`repeat(${i}, 1fr)`,gap:"15px",...u?.list},disablePadding:!0,children:r.map((t,n)=>e(A,{onClick:()=>l?.(t,n),sx:{...u?.item},disablePadding:!0,children:s(t,n)},a(t,n)))})]})}const fe=n.forwardRef(function(t,n){return e(E,{direction:"up",ref:n,...t})}),pe=({notification:r,onDelete:i})=>{const s=n.useId(),[o,a]=n.useState(!1),l=()=>{a(!1)};return t(n.Fragment,{children:[r?e(S,{title:r.title,children:e(T,{onClick:e=>{e.stopPropagation(),a(!0)},children:e(B,{fontSize:"small",color:"error"})})}):e(T,{onClick:e=>{e.stopPropagation(),i()},children:e(B,{fontSize:"small",color:"error"})}),r?t(k,{slots:{transition:fe},open:o,onClose:l,children:[e(O,{id:`${s}-dialog-title`,children:r.title}),e(R,{children:e(C,{id:`${s}-dialog-text`,children:r.description})}),t(P,{children:[e(M,{variant:"contained",color:"error",sx:{textTransform:"none"},onClick:l,children:"Отмена"}),e(M,{variant:"contained",sx:{textTransform:"none"},onClick:()=>{i(),l()},children:"Подтвердить"})]})]}):null]})},ge=t=>{const r=n.useId();return e(T,{id:r,...t,children:e(G,{fontSize:"small",color:"primary"})})},me=t=>{const{children:n,variant:r="contained",loading:i,icon:s,sx:o,...a}=t;return s?e($,{...a,loading:i,children:s}):e(M,{sx:{whiteSpace:"nowrap",padding:"5px 15px",textTransform:"none",...o},loading:i,loadingPosition:"start",variant:r,...a,children:n})},_e=N("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),ye=({children:n,accept:r,onFilesLoad:i,...s})=>t(me,{...s,component:"label",variant:"contained",startIcon:e(q,{}),children:[n,e(_e,{type:"file",accept:r,onChange:e=>{const{target:{files:t}}=e;t&&i({event:e,files:t})},multiple:!0})]}),ve=({title:t,...r})=>{const i=n.useId();return t?e(S,{title:t,children:e(T,{id:i,...r,children:e(H,{fontSize:"medium",color:"primary"})})}):e(T,{id:i,...r,children:e(H,{fontSize:"medium",color:"primary"})})};var be=e=>"checkbox"===e.type,xe=e=>e instanceof Date,we=e=>null==e;const Ae=e=>"object"==typeof e;var Ee=e=>!we(e)&&!Array.isArray(e)&&Ae(e)&&!xe(e),Se=e=>Ee(e)&&e.target?be(e.target)?e.target.checked:e.target.value:e,Te=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),ke="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function Oe(e){if(e instanceof Date)return new Date(e);const t="undefined"!=typeof FileList&&e instanceof FileList;if(ke&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!(n||Ee(e)&&(e=>{const t=e.constructor&&e.constructor.prototype;return Ee(t)&&t.hasOwnProperty("isPrototypeOf")})(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=Oe(e[t]));return r}var Re=e=>/^\w*$/.test(e),Ce=e=>void 0===e,Pe=e=>Array.isArray(e)?e.filter(Boolean):[],Me=e=>Pe(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ne=(e,t,n)=>{if(!t||!Ee(e))return n;const r=(Re(t)?[t]:Me(t)).reduce((e,t)=>we(e)?e:e[t],e);return Ce(r)||r===e?Ce(e[t])?n:e[t]:r},Ie=e=>"boolean"==typeof e,De=e=>"function"==typeof e,Fe=(e,t,n)=>{let r=-1;const i=Re(t)?[t]:Me(t),s=i.length,o=s-1;for(;++r<s;){const t=i[r];let s=n;if(r!==o){const n=e[t];s=Ee(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=s,e=e[t]}};const ze="blur",Le="focusout",je="change",Ve="onBlur",Ue="onChange",Be="onSubmit",Ge="onTouched",$e="all",qe="max",He="min",We="maxLength",Ze="minLength",Ke="pattern",Xe="required",Ye="validate",Qe=r.createContext(null);Qe.displayName="HookFormContext";const Je=()=>r.useContext(Qe),et=e=>{const{children:t,...n}=e;return r.createElement(Qe.Provider,{value:n},t)};var tt=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const i=s;return t._proxyFormState[i]!==$e&&(t._proxyFormState[i]=!r||$e),n&&(n[i]=!0),e[i]}});return i};const nt="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;var rt=e=>"string"==typeof e,it=(e,t,n,r,i)=>rt(e)?(r&&t.watch.add(e),Ne(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),Ne(n,e))):(r&&(t.watchAll=!0),n),st=e=>we(e)||!Ae(e);function ot(e,t,n=new WeakSet){if(st(e)||st(t))return Object.is(e,t);if(xe(e)&&xe(t))return e.getTime()===t.getTime();const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of r){const r=e[s];if(!i.includes(s))return!1;if("ref"!==s){const e=t[s];if(xe(r)&&xe(e)||Ee(r)&&Ee(e)||Array.isArray(r)&&Array.isArray(e)?!ot(r,e,n):!Object.is(r,e))return!1}}return!0}function at(e){const t=Je(),{name:n,disabled:i,control:s=t.control,shouldUnregister:o,defaultValue:a,exact:l=!0}=e,u=Te(s._names.array,n),c=r.useMemo(()=>Ne(s._formValues,n,Ne(s._defaultValues,n,a)),[s,n,a]),h=function(e){const t=Je(),{control:n=t.control,name:i,defaultValue:s,disabled:o,exact:a,compute:l}=e||{},u=r.useRef(s),c=r.useRef(l),h=r.useRef(void 0),d=r.useRef(n),f=r.useRef(i);c.current=l;const[p,g]=r.useState(()=>{const e=n._getWatch(i,u.current);return c.current?c.current(e):e}),m=r.useCallback(e=>{const t=it(i,n._names,e||n._formValues,!1,u.current);return c.current?c.current(t):t},[n._formValues,n._names,i]),_=r.useCallback(e=>{if(!o){const t=it(i,n._names,e||n._formValues,!1,u.current);if(c.current){const e=c.current(t);ot(e,h.current)||(g(e),h.current=e)}else g(t)}},[n._formValues,n._names,o,i]);nt(()=>(d.current===n&&ot(f.current,i)||(d.current=n,f.current=i,_()),n._subscribe({name:i,formState:{values:!0},exact:a,callback:e=>{_(e.values)}})),[n,a,i,_]),r.useEffect(()=>n._removeUnmounted());const y=d.current!==n,v=f.current,b=r.useMemo(()=>{if(o)return null;const e=!y&&!ot(v,i);return y||e?m():null},[o,y,i,v,m]);return null!==b?b:p}({control:s,name:n,defaultValue:c,exact:l}),d=function(e){const t=Je(),{control:n=t.control,disabled:i,name:s,exact:o}=e||{},[a,l]=r.useState(n._formState),u=r.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return nt(()=>n._subscribe({name:s,formState:u.current,exact:o,callback:e=>{!i&&l({...n._formState,...e})}}),[s,i,o]),r.useEffect(()=>{u.current.isValid&&n._setValid(!0)},[n]),r.useMemo(()=>tt(a,n,u.current,!1),[a,n])}({control:s,name:n,exact:l}),f=r.useRef(e),p=r.useRef(void 0),g=r.useRef(s.register(n,{...e.rules,value:h,...Ie(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const m=r.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ne(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ne(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ne(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ne(d.validatingFields,n)},error:{enumerable:!0,get:()=>Ne(d.errors,n)}}),[d,n]),_=r.useCallback(e=>g.current.onChange({target:{value:Se(e),name:n},type:je}),[n]),y=r.useCallback(()=>g.current.onBlur({target:{value:Ne(s._formValues,n),name:n},type:ze}),[n,s._formValues]),v=r.useCallback(e=>{const t=Ne(s._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>De(e.focus)&&e.focus(),select:()=>De(e.select)&&e.select(),setCustomValidity:t=>De(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>De(e.reportValidity)&&e.reportValidity()})},[s._fields,n]),b=r.useMemo(()=>({name:n,value:h,...Ie(i)||d.disabled?{disabled:d.disabled||i}:{},onChange:_,onBlur:y,ref:v}),[n,i,d.disabled,_,y,v,h]);return r.useEffect(()=>{const e=s._options.shouldUnregister||o,t=p.current;t&&t!==n&&!u&&s.unregister(t),s.register(n,{...f.current.rules,...Ie(f.current.disabled)?{disabled:f.current.disabled}:{}});const r=(e,t)=>{const n=Ne(s._fields,e);n&&n._f&&(n._f.mount=t)};if(r(n,!0),e){const e=Oe(Ne(s._options.defaultValues,n,f.current.defaultValue));Fe(s._defaultValues,n,e),Ce(Ne(s._formValues,n))&&Fe(s._formValues,n,e)}return!u&&s.register(n),p.current=n,()=>{(u?e&&!s._state.action:e)?s.unregister(n):r(n,!1)}},[n,s,u,o]),r.useEffect(()=>{s._setDisabledField({disabled:i,name:n})},[i,n,s]),r.useMemo(()=>({field:b,formState:d,fieldState:m}),[b,d,m])}const lt=e=>e.render(at(e));var ut=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},ct=e=>Array.isArray(e)?e:[e],ht=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function dt(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r],s=t[r];if(i&&Ee(i)&&s){const e=dt(i,s);Ee(e)&&(n[r]=e)}else e[r]&&(n[r]=s)}return n}var ft=e=>Ee(e)&&!Object.keys(e).length,pt=e=>"file"===e.type,gt=e=>{if(!ke)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},mt=e=>"select-multiple"===e.type,_t=e=>"radio"===e.type,yt=e=>gt(e)&&e.isConnected;function vt(e,t){const n=Array.isArray(t)?t:Re(t)?[t]:Me(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ce(e)?r++:e[t[r++]];return e}(e,n),i=n.length-1,s=n[i];return r&&delete r[s],0!==i&&(Ee(r)&&ft(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ce(e[t]))return!1;return!0}(r))&&vt(e,n.slice(0,-1)),e}function bt(e){return Array.isArray(e)||Ee(e)&&!(e=>{for(const t in e)if(De(e[t]))return!0;return!1})(e)}function xt(e,t={}){for(const n in e){const r=e[n];bt(r)?(t[n]=Array.isArray(r)?[]:{},xt(r,t[n])):Ce(r)||(t[n]=!0)}return t}function wt(e,t,n){n||(n=xt(t));for(const r in e){const i=e[r];if(bt(i))Ce(t)||st(n[r])?n[r]=xt(i,Array.isArray(i)?[]:{}):wt(i,we(t)?{}:t[r],n[r]);else{const e=t[r];n[r]=!ot(i,e)}}return n}const At={value:!1,isValid:!1},Et={value:!0,isValid:!0};var St=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ce(e[0].attributes.value)?Ce(e[0].value)||""===e[0].value?Et:{value:e[0].value,isValid:!0}:Et:At}return At},Tt=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ce(e)?e:t?""===e?NaN:e?+e:e:n&&rt(e)?new Date(e):r?r(e):e;const kt={isValid:!1,value:null};var Ot=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,kt):kt;function Rt(e){const t=e.ref;return pt(t)?t.files:_t(t)?Ot(e.refs).value:mt(t)?[...t.selectedOptions].map(({value:e})=>e):be(t)?St(e.refs).value:Tt(Ce(t.value)?e.ref.value:t.value,e)}var Ct=e=>e instanceof RegExp,Pt=e=>Ce(e)?e:Ct(e)?e.source:Ee(e)?Ct(e.value)?e.value.source:e.value:e,Mt=e=>({isOnSubmit:!e||e===Be,isOnBlur:e===Ve,isOnChange:e===Ue,isOnAll:e===$e,isOnTouch:e===Ge});const Nt="AsyncFunction";var It=e=>!!e&&!!e.validate&&!!(De(e.validate)&&e.validate.constructor.name===Nt||Ee(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===Nt)),Dt=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const Ft=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const n=Ne(e,i);if(n){const{_f:e,...s}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(Ft(s,t))break}else if(Ee(s)&&Ft(s,t))break}}};function zt(e,t,n){const r=Ne(e,n);if(r||Re(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),s=Ne(t,r),o=Ne(e,r);if(s&&!Array.isArray(s)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};if(o&&o.root&&o.root.type)return{name:`${r}.root`,error:o.root};i.pop()}return{name:n}}var Lt=(e,t,n)=>{const r=ct(Ne(e,n));return Fe(r,"root",t[n]),Fe(e,n,r),e};function jt(e,t,n="validate"){if(rt(e)||Array.isArray(e)&&e.every(rt)||Ie(e)&&!e)return{type:n,message:rt(e)?e:"",ref:t}}var Vt=e=>Ee(e)&&!Ct(e)?e:{value:e,message:""},Ut=async(e,t,n,r,i,s)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:c,min:h,max:d,pattern:f,validate:p,name:g,valueAsNumber:m,mount:_}=e._f,y=Ne(n,g);if(!_||t.has(g))return{};const v=a?a[0]:o,b=e=>{i&&v.reportValidity&&(v.setCustomValidity(Ie(e)?"":e||""),v.reportValidity())},x={},w=_t(o),A=be(o),E=w||A,S=(m||pt(o))&&Ce(o.value)&&Ce(y)||gt(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,T=ut.bind(null,g,r,x),k=(e,t,n,r=We,i=Ze)=>{const s=e?t:n;x[g]={type:e?r:i,message:s,ref:o,...T(e?r:i,s)}};if(s?!Array.isArray(y)||!y.length:l&&(!E&&(S||we(y))||Ie(y)&&!y||A&&!St(a).isValid||w&&!Ot(a).isValid)){const{value:e,message:t}=rt(l)?{value:!!l,message:l}:Vt(l);if(e&&(x[g]={type:Xe,message:t,ref:v,...T(Xe,t)},!r))return b(t),x}if(!(S||we(h)&&we(d))){let e,t;const n=Vt(d),i=Vt(h);if(we(y)||isNaN(y)){const r=o.valueAsDate||new Date(y),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;rt(n.value)&&y&&(e=a?s(y)>s(n.value):l?y>n.value:r>new Date(n.value)),rt(i.value)&&y&&(t=a?s(y)<s(i.value):l?y<i.value:r<new Date(i.value))}else{const r=o.valueAsNumber||(y?+y:y);we(n.value)||(e=r>n.value),we(i.value)||(t=r<i.value)}if((e||t)&&(k(!!e,n.message,i.message,qe,He),!r))return b(x[g].message),x}if((u||c)&&!S&&(rt(y)||s&&Array.isArray(y))){const e=Vt(u),t=Vt(c),n=!we(e.value)&&y.length>+e.value,i=!we(t.value)&&y.length<+t.value;if((n||i)&&(k(n,e.message,t.message),!r))return b(x[g].message),x}if(f&&!S&&rt(y)){const{value:e,message:t}=Vt(f);if(Ct(e)&&!y.match(e)&&(x[g]={type:Ke,message:t,ref:o,...T(Ke,t)},!r))return b(t),x}if(p)if(De(p)){const e=jt(await p(y,n),v);if(e&&(x[g]={...e,...T(Ye,e.message)},!r))return b(e.message),x}else if(Ee(p)){let e={};for(const t in p){if(!ft(e)&&!r)break;const i=jt(await p[t](y,n),v,t);i&&(e={...i,...T(t,i.message)},b(i.message),r&&(x[g]=e))}if(!ft(e)&&(x[g]={ref:v,...e},!r))return x}return b(!0),x};const Bt={mode:Be,reValidateMode:Ue,shouldFocusError:!0};function Gt(e={}){let t,n={...Bt,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:De(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},s=(Ee(n.defaultValues)||Ee(n.values))&&Oe(n.defaultValues||n.values)||{},o=n.shouldUnregister?{}:Oe(s),a={action:!1,mount:!1,watch:!1,keepIsValid:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...c};let d={...h};const f={array:ht(),state:ht()},p=n.criteriaMode===$e,g=async e=>{if(!a.keepIsValid&&!n.disabled&&(h.isValid||d.isValid||e)){let e;n.resolver?(e=ft((await b()).errors),m()):e=await x(i,!0),e!==r.isValid&&f.state.next({isValid:e})}},m=(e,t)=>{!n.disabled&&(h.isValidating||h.validatingFields||d.isValidating||d.validatingFields)&&((e||Array.from(l.mount)).forEach(e=>{e&&(t?Fe(r.validatingFields,e,t):vt(r.validatingFields,e))}),f.state.next({validatingFields:r.validatingFields,isValidating:!ft(r.validatingFields)}))},_=(e,t,n,r)=>{const l=Ne(i,e);if(l){const i=Ne(o,e,Ce(n)?Ne(s,e):n);Ce(i)||r&&r.defaultChecked||t?Fe(o,e,t?i:Rt(l._f)):E(e,i),a.mount&&!a.action&&g()}},y=(e,t,i,o,a)=>{let l=!1,u=!1;const c={name:e};if(!n.disabled){if(!i||o){(h.isDirty||d.isDirty)&&(u=r.isDirty,r.isDirty=c.isDirty=w(),l=u!==c.isDirty);const n=ot(Ne(s,e),t);u=!!Ne(r.dirtyFields,e),n?vt(r.dirtyFields,e):Fe(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,l=l||(h.dirtyFields||d.dirtyFields)&&u!==!n}if(i){const t=Ne(r.touchedFields,e);t||(Fe(r.touchedFields,e,i),c.touchedFields=r.touchedFields,l=l||(h.touchedFields||d.touchedFields)&&t!==i)}l&&a&&f.state.next(c)}return l?c:{}},v=(e,i,s,o)=>{const a=Ne(r.errors,e),l=(h.isValid||d.isValid)&&Ie(i)&&r.isValid!==i;var c;if(n.delayError&&s?(c=()=>((e,t)=>{Fe(r.errors,e,t),f.state.next({errors:r.errors})})(e,s),t=e=>{clearTimeout(u),u=setTimeout(c,e)},t(n.delayError)):(clearTimeout(u),t=null,s?Fe(r.errors,e,s):vt(r.errors,e)),(s?!ot(a,s):a)||!ft(o)||l){const t={...o,...l&&Ie(i)?{isValid:i}:{},errors:r.errors,name:e};r={...r,...t},f.state.next(t)}},b=async e=>{m(e,!0);const t=await n.resolver(o,n.context,((e,t,n,r)=>{const i={};for(const n of e){const e=Ne(t,n);e&&Fe(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}})(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation));return t},x=async(e,t,i={valid:!0})=>{for(const s in e){const a=e[s];if(a){const{_f:e,...s}=a;if(e){const s=l.array.has(e.name),u=a._f&&It(a._f);u&&h.validatingFields&&m([e.name],!0);const c=await Ut(a,l.disabled,o,p,n.shouldUseNativeValidation&&!t,s);if(u&&h.validatingFields&&m([e.name]),c[e.name]&&(i.valid=!1,t))break;!t&&(Ne(c,e.name)?s?Lt(r.errors,c,e.name):Fe(r.errors,e.name,c[e.name]):vt(r.errors,e.name))}!ft(s)&&await x(s,t,i)}}return i.valid},w=(e,t)=>!n.disabled&&(e&&t&&Fe(o,e,t),!ot(C(),s)),A=(e,t,n)=>it(e,l,{...a.mount?o:Ce(t)?s:rt(e)?{[e]:t}:t},n,t),E=(e,t,n={})=>{const r=Ne(i,e);let s=t;if(r){const n=r._f;n&&(!n.disabled&&Fe(o,e,Tt(t,n)),s=gt(n.ref)&&we(t)?"":t,mt(n.ref)?[...n.ref.options].forEach(e=>e.selected=s.includes(e.value)):n.refs?be(n.ref)?n.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(s)?e.checked=!!s.find(t=>t===e.value):e.checked=s===e.value||!!s)}):n.refs.forEach(e=>e.checked=e.value===s):pt(n.ref)?n.ref.value="":(n.ref.value=s,n.ref.type||f.state.next({name:e,values:Oe(o)})))}(n.shouldDirty||n.shouldTouch)&&y(e,s,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&R(e)},S=(e,t,n)=>{for(const r in t){if(!t.hasOwnProperty(r))return;const s=t[r],o=e+"."+r,a=Ne(i,o);(l.array.has(e)||Ee(s)||a&&!a._f)&&!xe(s)?S(o,s,n):E(o,s,n)}},T=(e,t,n={})=>{const u=Ne(i,e),c=l.array.has(e),p=Oe(t);Fe(o,e,p),c?(f.array.next({name:e,values:Oe(o)}),(h.isDirty||h.dirtyFields||d.isDirty||d.dirtyFields)&&n.shouldDirty&&f.state.next({name:e,dirtyFields:wt(s,o),isDirty:w(e,p)})):!u||u._f||we(p)?E(e,p,n):S(e,p,n),Dt(e,l)&&f.state.next({...r,name:e}),f.state.next({name:a.mount?e:void 0,values:Oe(o)})},k=async e=>{a.mount=!0;const s=e.target;let u=s.name,c=!0;const _=Ne(i,u),w=e=>{c=Number.isNaN(e)||xe(e)&&isNaN(e.getTime())||ot(e,Ne(o,u,e))},A=Mt(n.mode),E=Mt(n.reValidateMode);if(_){let a,T;const k=s.type?Rt(_._f):Se(e),O=e.type===ze||e.type===Le,C=!((S=_._f).mount&&(S.required||S.min||S.max||S.maxLength||S.minLength||S.pattern||S.validate)||n.resolver||Ne(r.errors,u)||_._f.deps)||((e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e))(O,Ne(r.touchedFields,u),r.isSubmitted,E,A),P=Dt(u,l,O);Fe(o,u,k),O?s&&s.readOnly||(_._f.onBlur&&_._f.onBlur(e),t&&t(0)):_._f.onChange&&_._f.onChange(e);const M=y(u,k,O),N=!ft(M)||P;if(!O&&f.state.next({name:u,type:e.type,values:Oe(o)}),C)return(h.isValid||d.isValid)&&("onBlur"===n.mode?O&&g():O||g()),N&&f.state.next({name:u,...P?{}:M});if(!O&&P&&f.state.next({...r}),n.resolver){const{errors:e}=await b([u]);if(m([u]),w(k),c){const t=zt(r.errors,i,u),n=zt(e,i,t.name||u);a=n.error,u=n.name,T=ft(e)}}else m([u],!0),a=(await Ut(_,l.disabled,o,p,n.shouldUseNativeValidation))[u],m([u]),w(k),c&&(a?T=!1:(h.isValid||d.isValid)&&(T=await x(i,!0)));c&&(_._f.deps&&(!Array.isArray(_._f.deps)||_._f.deps.length>0)&&R(_._f.deps),v(u,T,a,M))}var S},O=(e,t)=>{if(Ne(r.errors,t)&&e.focus)return e.focus(),1},R=async(e,t={})=>{let s,o;const a=ct(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(m(e),e)for(const n of e){const e=Ne(t,n);e?Fe(r.errors,n,e):vt(r.errors,n)}else r.errors=t;return t})(Ce(e)?e:a);s=ft(t),o=e?!a.some(e=>Ne(t,e)):s}else e?(o=(await Promise.all(a.map(async e=>{const t=Ne(i,e);return await x(t&&t._f?{[e]:t}:t)}))).every(Boolean),(o||r.isValid)&&g()):o=s=await x(i);return f.state.next({...!rt(e)||(h.isValid||d.isValid)&&s!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:s}:{},errors:r.errors}),t.shouldFocus&&!o&&Ft(i,O,e?a:l.mount),o},C=(e,t)=>{let n={...a.mount?o:s};return t&&(n=dt(t.dirtyFields?r.dirtyFields:r.touchedFields,n)),Ce(e)?n:rt(e)?Ne(n,e):e.map(e=>Ne(n,e))},P=(e,t)=>({invalid:!!Ne((t||r).errors,e),isDirty:!!Ne((t||r).dirtyFields,e),error:Ne((t||r).errors,e),isValidating:!!Ne(r.validatingFields,e),isTouched:!!Ne((t||r).touchedFields,e)}),M=(e,t,n)=>{const s=(Ne(i,e,{_f:{}})._f||{}).ref,o=Ne(r.errors,e)||{},{ref:a,message:l,type:u,...c}=o;Fe(r.errors,e,{...c,...t,ref:s}),f.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&s&&s.focus&&s.focus()},N=e=>f.state.subscribe({next:t=>{var n,i,a;n=e.name,i=t.name,a=e.exact,n&&i&&n!==i&&!ct(n).some(e=>e&&(a?e===i:e.startsWith(i)||i.startsWith(e)))||!((e,t,n,r)=>{n(e);const{name:i,...s}=e;return ft(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(e=>t[e]===(!r||$e))})(t,e.formState||h,U,e.reRenderRoot)||e.callback({values:{...o},...r,...t,defaultValues:s})}}).unsubscribe,I=(e,t={})=>{for(const a of e?ct(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(vt(i,a),vt(o,a)),!t.keepError&&vt(r.errors,a),!t.keepDirty&&vt(r.dirtyFields,a),!t.keepTouched&&vt(r.touchedFields,a),!t.keepIsValidating&&vt(r.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&vt(s,a);f.state.next({values:Oe(o)}),f.state.next({...r,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&g()},D=({disabled:e,name:t})=>{(Ie(e)&&a.mount||e||l.disabled.has(t))&&(e?l.disabled.add(t):l.disabled.delete(t))},F=(e,t={})=>{let r=Ne(i,e);const o=Ie(t.disabled)||Ie(n.disabled);return Fe(i,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),r?D({disabled:Ie(t.disabled)?t.disabled:n.disabled,name:e}):_(e,!0,t.value),{...o?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:Pt(t.min),max:Pt(t.max),minLength:Pt(t.minLength),maxLength:Pt(t.maxLength),pattern:Pt(t.pattern)}:{},name:e,onChange:k,onBlur:k,ref:o=>{if(o){F(e,t),r=Ne(i,e);const n=Ce(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=(e=>_t(e)||be(e))(n),l=r._f.refs||[];if(a?l.find(e=>e===n):n===r._f.ref)return;Fe(i,e,{_f:{...r._f,...a?{refs:[...l.filter(yt),n,...Array.isArray(Ne(s,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),_(e,!1,void 0,n)}else r=Ne(i,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!Te(l.array,e)||!a.action)&&l.unMount.add(e)}}},z=()=>n.shouldFocusError&&Ft(i,O,l.mount),L=(e,t)=>async s=>{let a;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let u=Oe(o);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await b();m(),r.errors=e,u=Oe(t)}else await x(i);if(l.disabled.size)for(const e of l.disabled)vt(u,e);if(vt(r.errors,"root"),ft(r.errors)){f.state.next({errors:{}});try{await e(u,s)}catch(e){a=e}}else t&&await t({...r.errors},s),z(),setTimeout(z);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ft(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},j=(e,t={})=>{const u=e?Oe(e):s,c=Oe(u),d=ft(e),p=d?s:c;if(t.keepDefaultValues||(s=u),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(wt(s,o))]);for(const t of Array.from(e))Ne(r.dirtyFields,t)?Fe(p,t,Ne(o,t)):T(t,Ne(p,t))}else{if(ke&&Ce(e))for(const e of l.mount){const t=Ne(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(gt(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)T(e,Ne(p,e));else i={}}o=n.shouldUnregister?t.keepDefaultValues?Oe(s):{}:Oe(p),f.array.next({values:{...p}}),f.state.next({values:{...p}})}l={mount:t.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!h.isValid||!!t.keepIsValid||!!t.keepDirtyValues||!n.shouldUnregister&&!ft(p),a.watch=!!n.shouldUnregister,a.keepIsValid=!!t.keepIsValid,a.action=!1,t.keepErrors||(r.errors={}),f.state.next({submitCount:t.keepSubmitCount?r.submitCount:0,isDirty:!d&&(t.keepDirty?r.isDirty:!(!t.keepDefaultValues||ot(e,s))),isSubmitted:!!t.keepIsSubmitted&&r.isSubmitted,dirtyFields:d?{}:t.keepDirtyValues?t.keepDefaultValues&&o?wt(s,o):r.dirtyFields:t.keepDefaultValues&&e?wt(s,e):t.keepDirty?r.dirtyFields:{},touchedFields:t.keepTouched?r.touchedFields:{},errors:t.keepErrors?r.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1,defaultValues:s})},V=(e,t)=>j(De(e)?e(o):e,{...n.resetOptions,...t}),U=e=>{r={...r,...e}},B={control:{register:F,unregister:I,getFieldState:P,handleSubmit:L,setError:M,_subscribe:N,_runSchema:b,_updateIsValidating:m,_focusError:z,_getWatch:A,_getDirty:w,_setValid:g,_setFieldArray:(e,t=[],l,u,c=!0,p=!0)=>{if(u&&l&&!n.disabled){if(a.action=!0,p&&Array.isArray(Ne(i,e))){const t=l(Ne(i,e),u.argA,u.argB);c&&Fe(i,e,t)}if(p&&Array.isArray(Ne(r.errors,e))){const t=l(Ne(r.errors,e),u.argA,u.argB);c&&Fe(r.errors,e,t),((e,t)=>{!Pe(Ne(e,t)).length&&vt(e,t)})(r.errors,e)}if((h.touchedFields||d.touchedFields)&&p&&Array.isArray(Ne(r.touchedFields,e))){const t=l(Ne(r.touchedFields,e),u.argA,u.argB);c&&Fe(r.touchedFields,e,t)}(h.dirtyFields||d.dirtyFields)&&(r.dirtyFields=wt(s,o)),f.state.next({name:e,isDirty:w(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Fe(o,e,t)},_setDisabledField:D,_setErrors:e=>{r.errors=e,f.state.next({errors:r.errors,isValid:!1})},_getFieldArray:e=>Pe(Ne(a.mount?o:s,e,n.shouldUnregister?Ne(s,e,[]):[])),_reset:j,_resetDefaultValues:()=>De(n.defaultValues)&&n.defaultValues().then(e=>{V(e,n.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of l.unMount){const t=Ne(i,e);t&&(t._f.refs?t._f.refs.every(e=>!yt(e)):!yt(t._f.ref))&&I(e)}l.unMount=new Set},_disableForm:e=>{Ie(e)&&(f.state.next({disabled:e}),Ft(i,(t,n)=>{const r=Ne(i,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach(t=>{t.disabled=r._f.disabled||e}))},0,!1))},_subjects:f,_proxyFormState:h,get _fields(){return i},get _formValues(){return o},get _state(){return a},set _state(e){a=e},get _defaultValues(){return s},get _names(){return l},set _names(e){l=e},get _formState(){return r},get _options(){return n},set _options(e){n={...n,...e}}},subscribe:e=>(a.mount=!0,d={...d,...e.formState},N({...e,formState:{...c,...e.formState}})),trigger:R,register:F,handleSubmit:L,watch:(e,t)=>De(e)?f.state.subscribe({next:n=>"values"in n&&e(A(void 0,t),n)}):A(e,t,!0),setValue:T,getValues:C,reset:V,resetField:(e,t={})=>{Ne(i,e)&&(Ce(t.defaultValue)?T(e,Oe(Ne(s,e))):(T(e,t.defaultValue),Fe(s,e,Oe(t.defaultValue))),t.keepTouched||vt(r.touchedFields,e),t.keepDirty||(vt(r.dirtyFields,e),r.isDirty=t.defaultValue?w(e,Oe(Ne(s,e))):w()),t.keepError||(vt(r.errors,e),h.isValid&&g()),f.state.next({...r}))},clearErrors:e=>{e&&ct(e).forEach(e=>vt(r.errors,e)),f.state.next({errors:e?r.errors:{}})},unregister:I,setError:M,setFocus:(e,t={})=>{const n=Ne(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&De(e.select)&&e.select()})}},getFieldState:P};return{...B,formControl:B}}var $t=()=>{if("undefined"!=typeof crypto&&crypto.randomUUID)return crypto.randomUUID();const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)})},qt=(e,t,n={})=>n.shouldFocus||Ce(n.shouldFocus)?n.focusName||`${e}.${Ce(n.focusIndex)?t:n.focusIndex}.`:"",Ht=(e,t)=>[...e,...ct(t)],Wt=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Zt(e,t,n){return[...e.slice(0,t),...ct(n),...e.slice(t)]}var Kt=(e,t,n)=>Array.isArray(e)?(Ce(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],Xt=(e,t)=>[...ct(t),...ct(e)];var Yt=(e,t)=>Ce(t)?[]:function(e,t){let n=0;const r=[...e];for(const e of t)r.splice(e-n,1),n++;return Pe(r).length?r:[]}(e,ct(t).sort((e,t)=>e-t)),Qt=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},Jt=(e,t,n)=>(e[t]=n,e);function en(e){const t=Je(),{control:n=t.control,name:i,keyName:s="id",shouldUnregister:o,rules:a}=e,[l,u]=r.useState(n._getFieldArray(i)),c=r.useRef(n._getFieldArray(i).map($t)),h=r.useRef(!1);n._names.array.add(i),r.useMemo(()=>a&&l.length>=0&&n.register(i,a),[n,i,l.length,a]),nt(()=>n._subjects.array.subscribe({next:({values:e,name:t})=>{if(t===i||!t){const t=Ne(e,i);Array.isArray(t)&&(u(t),c.current=t.map($t))}}}).unsubscribe,[n,i]);const d=r.useCallback(e=>{h.current=!0,n._setFieldArray(i,e)},[n,i]);return r.useEffect(()=>{if(n._state.action=!1,Dt(i,n._names)&&n._subjects.state.next({...n._formState}),h.current&&(!Mt(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!Mt(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([i]).then(e=>{n._updateIsValidating([i]);const t=Ne(e.errors,i),r=Ne(n._formState.errors,i);(r?!t&&r.type||t&&(r.type!==t.type||r.message!==t.message):t&&t.type)&&(t?Fe(n._formState.errors,i,t):vt(n._formState.errors,i),n._subjects.state.next({errors:n._formState.errors}))});else{const e=Ne(n._fields,i);!e||!e._f||Mt(n._options.reValidateMode).isOnSubmit&&Mt(n._options.mode).isOnSubmit||Ut(e,n._names.disabled,n._formValues,n._options.criteriaMode===$e,n._options.shouldUseNativeValidation,!0).then(e=>!ft(e)&&n._subjects.state.next({errors:Lt(n._formState.errors,e,i)}))}n._subjects.state.next({name:i,values:Oe(n._formValues)}),n._names.focus&&Ft(n._fields,(e,t)=>{if(n._names.focus&&t.startsWith(n._names.focus)&&e.focus)return e.focus(),1}),n._names.focus="",n._setValid(),h.current=!1},[l,i,n]),r.useEffect(()=>(!Ne(n._formValues,i)&&n._setFieldArray(i),()=>{n._options.shouldUnregister||o?n.unregister(i):((e,t)=>{const r=Ne(n._fields,e);r&&r._f&&(r._f.mount=t)})(i,!1)}),[i,n,s,o]),{swap:r.useCallback((e,t)=>{const r=n._getFieldArray(i);Qt(r,e,t),Qt(c.current,e,t),d(r),u(r),n._setFieldArray(i,r,Qt,{argA:e,argB:t},!1)},[d,i,n]),move:r.useCallback((e,t)=>{const r=n._getFieldArray(i);Kt(r,e,t),Kt(c.current,e,t),d(r),u(r),n._setFieldArray(i,r,Kt,{argA:e,argB:t},!1)},[d,i,n]),prepend:r.useCallback((e,t)=>{const r=ct(Oe(e)),s=Xt(n._getFieldArray(i),r);n._names.focus=qt(i,0,t),c.current=Xt(c.current,r.map($t)),d(s),u(s),n._setFieldArray(i,s,Xt,{argA:Wt(e)})},[d,i,n]),append:r.useCallback((e,t)=>{const r=ct(Oe(e)),s=Ht(n._getFieldArray(i),r);n._names.focus=qt(i,s.length-1,t),c.current=Ht(c.current,r.map($t)),d(s),u(s),n._setFieldArray(i,s,Ht,{argA:Wt(e)})},[d,i,n]),remove:r.useCallback(e=>{const t=Yt(n._getFieldArray(i),e);c.current=Yt(c.current,e),d(t),u(t),!Array.isArray(Ne(n._fields,i))&&Fe(n._fields,i,void 0),n._setFieldArray(i,t,Yt,{argA:e})},[d,i,n]),insert:r.useCallback((e,t,r)=>{const s=ct(Oe(t)),o=Zt(n._getFieldArray(i),e,s);n._names.focus=qt(i,e,r),c.current=Zt(c.current,e,s.map($t)),d(o),u(o),n._setFieldArray(i,o,Zt,{argA:e,argB:Wt(t)})},[d,i,n]),update:r.useCallback((e,t)=>{const r=Oe(t),s=Jt(n._getFieldArray(i),e,r);c.current=[...s].map((t,n)=>t&&n!==e?c.current[n]:$t()),d(s),u([...s]),n._setFieldArray(i,s,Jt,{argA:e,argB:r},!0,!1)},[d,i,n]),replace:r.useCallback(e=>{const t=ct(Oe(e));c.current=t.map($t),d([...t]),u([...t]),n._setFieldArray(i,[...t],e=>e,{},!0,!1)},[d,i,n]),fields:r.useMemo(()=>l.map((e,t)=>({...e,[s]:c.current[t]||$t()})),[l,s])}}function tn(e={}){const t=r.useRef(void 0),n=r.useRef(void 0),[i,s]=r.useState({isDirty:!1,isValidating:!1,isLoading:De(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:De(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!De(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:n,...r}=Gt(e);t.current={...r,formState:i}}const o=t.current.control;return o._options=e,nt(()=>{const e=o._subscribe({formState:o._proxyFormState,callback:()=>s({...o._formState}),reRenderRoot:!0});return s(e=>({...e,isReady:!0})),o._formState.isReady=!0,e},[o]),r.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),r.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),r.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),r.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),r.useEffect(()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==i.isDirty&&o._subjects.state.next({isDirty:e})}},[o,i.isDirty]),r.useEffect(()=>{var t;e.values&&!ot(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),(null===(t=o._options.resetOptions)||void 0===t?void 0:t.keepIsValid)||o._setValid(),n.current=e.values,s(e=>({...e}))):o._resetDefaultValues()},[o,e.values]),r.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=tt(i,o),t.current}const nn=({sx:t,...n})=>e(Q,{variant:"body1",sx:{color:"var(--color-white)",cursor:"default",...t},...n}),rn=K(W)({padding:0,marginRight:"5px",marginLeft:"10px","& .MuiSvgIcon-root":{color:"var(--color-orange-medium)"}});function sn({label:t,name:r,...i}){const s=n.useId(),{control:o,setValue:a,watch:l}=Je(),u=l(r),c=`${s}-${r}-${String(u)}`;return e(lt,{control:o,name:r,render:({field:n})=>{const{value:r,name:s}=n;return t?e(Z,{color:"white",control:e(rn,{...i,checked:r,onChange:(e,t)=>{a(s,t,{shouldValidate:!0})}}),label:e(nn,{children:t})}):e(rn,{...i,checked:r,onChange:(e,t)=>{a(s,t,{shouldValidate:!0})}})}},c)}function on({form:t,sx:n={},onSubmit:r,children:i}){const{handleSubmit:s}=t;return e(et,{...t,children:e(x,{component:"form",sx:{display:"grid",gap:"15px",...n},onSubmit:s(r),children:i})})}const an=()=>Je(),ln=t=>e(I,{size:"small",...t});function un({name:t,items:r,label:i,sx:s,getLabel:o,getValue:a,getKey:l}){const{watch:u,resetField:c,setValue:h}=Je(),d=u(t),f=n.useId(),p=r.find(e=>a(e)===d)??null;return e(D,{value:p,options:r,id:f,getOptionLabel:e=>o(e),getOptionKey:e=>l(e),sx:{minWidth:150,...s},size:"small",onChange:(e,n)=>{n?h(t,a(n)):c(t)},renderInput:t=>e(ln,{...t,label:i})})}function cn(t){const{name:r,type:i}=t,s=n.useId(),{control:o}=Je();return e(lt,{name:r,control:o,render:({field:n})=>e(ln,{id:s,size:"small",...t,...n,onChange:e=>{const{target:t}=e,{value:r}=t;if("number"===i)""===r?n.onChange():n.onChange(Number(r));else n.onChange(e)}})})}const hn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function dn(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function fn(e){return"nodeType"in e}function pn(e){var t,n;return e?dn(e)?e:fn(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function gn(e){const{Document:t}=pn(e);return e instanceof t}function mn(e){return!dn(e)&&e instanceof pn(e).HTMLElement}function _n(e){return e instanceof pn(e).SVGElement}function yn(e){return e?dn(e)?e.document:fn(e)?gn(e)?e:mn(e)||_n(e)?e.ownerDocument:document:document:document}const vn=hn?i:s;function bn(e){const t=o(e);return vn(()=>{t.current=e}),l(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function xn(e,t){void 0===t&&(t=[e]);const n=o(e);return vn(()=>{n.current!==e&&(n.current=e)},t),n}function wn(e,t){const n=o();return a(()=>{const t=e(n.current);return n.current=t,t},[...t])}function An(e){const t=bn(e),n=o(null),r=l(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,r]}function En(e){const t=o();return s(()=>{t.current=e},[e]),t.current}let Sn={};function Tn(e,t){return a(()=>{if(t)return t;const n=null==Sn[e]?0:Sn[e]+1;return Sn[e]=n,e+"-"+n},[e,t])}function kn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[n,i]of r){const r=t[n];null!=r&&(t[n]=r+e*i)}return t},{...t})}}const On=kn(1),Rn=kn(-1);function Cn(e){if(!e)return!1;const{KeyboardEvent:t}=pn(e.target);return t&&e instanceof t}function Pn(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=pn(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const Mn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Mn.Translate.toString(e),Mn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Nn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function In(e){return e.matches(Nn)?e:e.querySelector(Nn)}const Dn={display:"none"};function Fn(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:Dn},n)}function zn(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;return r.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":i,"aria-atomic":!0},n)}const Ln=c(null);const jn={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},Vn={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Un(e){let{announcements:t=Vn,container:n,hiddenTextDescribedById:i,screenReaderInstructions:o=jn}=e;const{announce:c,announcement:h}=function(){const[e,t]=u("");return{announce:l(e=>{null!=e&&t(e)},[]),announcement:e}}(),d=Tn("DndLiveRegion"),[p,g]=u(!1);if(s(()=>{g(!0)},[]),function(e){const t=f(Ln);s(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(a(()=>({onDragStart(e){let{active:n}=e;c(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&c(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;c(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;c(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;c(t.onDragCancel({active:n,over:r}))}}),[c,t])),!p)return null;const m=r.createElement(r.Fragment,null,r.createElement(Fn,{id:i,value:o.draggable}),r.createElement(zn,{id:d,announcement:h}));return n?ee(m,n):m}var Bn;function Gn(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Bn||(Bn={}));const $n=Object.freeze({x:0,y:0});function qn(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Hn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Wn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Zn(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Kn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=Zn(t,t.left,t.top),s=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=qn(Zn(r),i);s.push({id:t,data:{droppableContainer:e,value:n}})}}return s.sort(Hn)};function Xn(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),o=i-r,a=s-n;if(r<i&&n<s){const n=t.width*t.height,r=e.width*e.height,i=o*a;return Number((i/(n+r-i)).toFixed(4))}return 0}const Yn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const e of r){const{id:r}=e,s=n.get(r);if(s){const n=Xn(s,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(Wn)};function Qn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:$n}function Jn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const er=Jn(1);const tr={ignoreTransform:!1};function nr(e,t){void 0===t&&(t=tr);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=pn(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:i,scaleY:s,x:o,y:a}=r,l=e.left-o-(1-i)*parseFloat(n),u=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?e.width/i:e.width,h=s?e.height/s:e.height;return{width:c,height:h,top:u,right:l+c,bottom:u+h,left:l}}(n,t,r))}const{top:r,left:i,width:s,height:o,bottom:a,right:l}=n;return{top:r,left:i,width:s,height:o,bottom:a,right:l}}function rr(e){return nr(e,{ignoreTransform:!0})}function ir(e,t){const n=[];return e?function r(i){if(null!=t&&n.length>=t)return n;if(!i)return n;if(gn(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!mn(i)||_n(i))return n;if(n.includes(i))return n;const s=pn(e).getComputedStyle(i);return i!==e&&function(e,t){void 0===t&&(t=pn(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(i,s)&&n.push(i),function(e,t){return void 0===t&&(t=pn(e).getComputedStyle(e)),"fixed"===t.position}(i,s)?n:r(i.parentNode)}(e):n}function sr(e){const[t]=ir(e,1);return null!=t?t:null}function or(e){return hn&&e?dn(e)?e:fn(e)?gn(e)||e===yn(e).scrollingElement?window:mn(e)?e:null:null:null}function ar(e){return dn(e)?e.scrollX:e.scrollLeft}function lr(e){return dn(e)?e.scrollY:e.scrollTop}function ur(e){return{x:ar(e),y:lr(e)}}var cr;function hr(e){return!(!hn||!e)&&e===document.scrollingElement}function dr(e){const t={x:0,y:0},n=hr(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(cr||(cr={}));const fr={x:.2,y:.2};function pr(e,t,n,r,i){let{top:s,left:o,right:a,bottom:l}=n;void 0===r&&(r=10),void 0===i&&(i=fr);const{isTop:u,isBottom:c,isLeft:h,isRight:d}=dr(e),f={x:0,y:0},p={x:0,y:0},g=t.height*i.y,m=t.width*i.x;return!u&&s<=t.top+g?(f.y=cr.Backward,p.y=r*Math.abs((t.top+g-s)/g)):!c&&l>=t.bottom-g&&(f.y=cr.Forward,p.y=r*Math.abs((t.bottom-g-l)/g)),!d&&a>=t.right-m?(f.x=cr.Forward,p.x=r*Math.abs((t.right-m-a)/m)):!h&&o<=t.left+m&&(f.x=cr.Backward,p.x=r*Math.abs((t.left+m-o)/m)),{direction:f,speed:p}}function gr(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function mr(e){return e.reduce((e,t)=>On(e,ur(t)),$n)}const _r=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+ar(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+lr(t),0)}]];class yr{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=ir(t),r=mr(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,i]of _r)for(const s of t)Object.defineProperty(this,s,{get:()=>{const t=i(n),o=r[e]-t;return this.rect[s]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class vr{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function br(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var xr,wr;function Ar(e){e.preventDefault()}function Er(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(xr||(xr={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(wr||(wr={}));const Sr={start:[wr.Space,wr.Enter],cancel:[wr.Esc],end:[wr.Space,wr.Enter,wr.Tab]},Tr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case wr.Right:return{...n,x:n.x+25};case wr.Left:return{...n,x:n.x-25};case wr.Down:return{...n,y:n.y+25};case wr.Up:return{...n,y:n.y-25}}};class kr{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new vr(yn(t)),this.windowListeners=new vr(pn(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(xr.Resize,this.handleCancel),this.windowListeners.add(xr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(xr.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=nr),!e)return;const{top:n,left:r,bottom:i,right:s}=t(e);sr(e)&&(i<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t($n)}handleKeyDown(e){if(Cn(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:i=Sr,coordinateGetter:s=Tr,scrollBehavior:o="smooth"}=r,{code:a}=e;if(i.end.includes(a))return void this.handleEnd(e);if(i.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:l}=n.current,u=l?{x:l.left,y:l.top}:$n;this.referenceCoordinates||(this.referenceCoordinates=u);const c=s(e,{active:t,context:n.current,currentCoordinates:u});if(c){const t=Rn(c,u),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(const n of i){const i=e.code,{isTop:s,isRight:a,isLeft:l,isBottom:u,maxScroll:h,minScroll:d}=dr(n),f=gr(n),p={x:Math.min(i===wr.Right?f.right-f.width/2:f.right,Math.max(i===wr.Right?f.left:f.left+f.width/2,c.x)),y:Math.min(i===wr.Down?f.bottom-f.height/2:f.bottom,Math.max(i===wr.Down?f.top:f.top+f.height/2,c.y))},g=i===wr.Right&&!a||i===wr.Left&&!l,m=i===wr.Down&&!u||i===wr.Up&&!s;if(g&&p.x!==c.x){const e=n.scrollLeft+t.x,s=i===wr.Right&&e<=h.x||i===wr.Left&&e>=d.x;if(s&&!t.y)return void n.scrollTo({left:e,behavior:o});r.x=s?n.scrollLeft-e:i===wr.Right?n.scrollLeft-h.x:n.scrollLeft-d.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(m&&p.y!==c.y){const e=n.scrollTop+t.y,s=i===wr.Down&&e<=h.y||i===wr.Up&&e>=d.y;if(s&&!t.x)return void n.scrollTo({top:e,behavior:o});r.y=s?n.scrollTop-e:i===wr.Down?n.scrollTop-h.y:n.scrollTop-d.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,On(Rn(c,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function Or(e){return Boolean(e&&"distance"in e)}function Rr(e){return Boolean(e&&"delay"in e)}kr.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Sr,onActivation:i}=t,{active:s}=n;const{code:o}=e.nativeEvent;if(r.start.includes(o)){const t=s.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==i||i({event:e.nativeEvent}),!0)}return!1}}];class Cr{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=pn(e);return e instanceof t?e:yn(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:s}=i;this.props=e,this.events=t,this.document=yn(s),this.documentListeners=new vr(this.document),this.listeners=new vr(n),this.windowListeners=new vr(pn(s)),this.initialCoordinates=null!=(r=Pn(i))?r:$n,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(xr.Resize,this.handleCancel),this.windowListeners.add(xr.DragStart,Ar),this.windowListeners.add(xr.VisibilityChange,this.handleCancel),this.windowListeners.add(xr.ContextMenu,Ar),this.documentListeners.add(xr.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Rr(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(Or(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(xr.Click,Er,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(xr.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:s,options:{activationConstraint:o}}=i;if(!r)return;const a=null!=(t=Pn(e))?t:$n,l=Rn(r,a);if(!n&&o){if(Or(o)){if(null!=o.tolerance&&br(l,o.tolerance))return this.handleCancel();if(br(l,o.distance))return this.handleStart()}return Rr(o)&&br(l,o.tolerance)?this.handleCancel():void this.handlePending(o,l)}e.cancelable&&e.preventDefault(),s(a)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===wr.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Pr={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Mr extends Cr{constructor(e){const{event:t}=e,n=yn(t.target);super(e,Pr,n)}}Mr.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const Nr={move:{name:"mousemove"},end:{name:"mouseup"}};var Ir;!function(e){e[e.RightClick=2]="RightClick"}(Ir||(Ir={}));(class extends Cr{constructor(e){super(e,Nr,yn(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Ir.RightClick&&(null==r||r({event:n}),!0)}}];const Dr={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var Fr,zr;function Lr(e){let{acceleration:t,activator:n=Fr.Pointer,canScroll:r,draggingRect:i,enabled:u,interval:c=5,order:h=zr.TreeOrder,pointerCoordinates:d,scrollableAncestors:f,scrollableAncestorRects:p,delta:g,threshold:m}=e;const _=function(e){let{delta:t,disabled:n}=e;const r=En(t);return wn(e=>{if(n||!r||!e)return jr;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[cr.Backward]:e.x[cr.Backward]||-1===i.x,[cr.Forward]:e.x[cr.Forward]||1===i.x},y:{[cr.Backward]:e.y[cr.Backward]||-1===i.y,[cr.Forward]:e.y[cr.Forward]||1===i.y}}},[n,t,r])}({delta:g,disabled:!u}),[y,v]=function(){const e=o(null);return[l((t,n)=>{e.current=setInterval(t,n)},[]),l(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),b=o({x:0,y:0}),x=o({x:0,y:0}),w=a(()=>{switch(n){case Fr.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Fr.DraggableRect:return i}},[n,i,d]),A=o(null),E=l(()=>{const e=A.current;if(!e)return;const t=b.current.x*x.current.x,n=b.current.y*x.current.y;e.scrollBy(t,n)},[]),S=a(()=>h===zr.TreeOrder?[...f].reverse():f,[h,f]);s(()=>{if(u&&f.length&&w){for(const e of S){if(!1===(null==r?void 0:r(e)))continue;const n=f.indexOf(e),i=p[n];if(!i)continue;const{direction:s,speed:o}=pr(e,i,w,t,m);for(const e of["x","y"])_[e][s[e]]||(o[e]=0,s[e]=0);if(o.x>0||o.y>0)return v(),A.current=e,y(E,c),b.current=o,void(x.current=s)}b.current={x:0,y:0},x.current={x:0,y:0},v()}else v()},[t,E,r,v,u,c,JSON.stringify(w),JSON.stringify(_),y,f,S,p,JSON.stringify(m)])}(class extends Cr{constructor(e){super(e,Dr)}static setup(){return window.addEventListener(Dr.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Dr.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return!(i.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Fr||(Fr={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(zr||(zr={}));const jr={x:{[cr.Backward]:!1,[cr.Forward]:!1},y:{[cr.Backward]:!1,[cr.Forward]:!1}};var Vr,Ur;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Vr||(Vr={})),function(e){e.Optimized="optimized"}(Ur||(Ur={}));const Br=new Map;function Gr(e,t){return wn(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function $r(e){let{callback:t,disabled:n}=e;const r=bn(t),i=a(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)},[n]);return s(()=>()=>null==i?void 0:i.disconnect(),[i]),i}function qr(e){return new yr(nr(e),e)}function Hr(e,t,n){void 0===t&&(t=qr);const[r,i]=u(null);function o(){i(r=>{if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=r?r:n)?i:null;const s=t(e);return JSON.stringify(r)===JSON.stringify(s)?r:s})}const l=function(e){let{callback:t,disabled:n}=e;const r=bn(t),i=a(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)},[r,n]);return s(()=>()=>null==i?void 0:i.disconnect(),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),c=$r({callback:o});return vn(()=>{o(),e?(null==c||c.observe(e),null==l||l.observe(document.body,{childList:!0,subtree:!0})):(null==c||c.disconnect(),null==l||l.disconnect())},[e]),r}const Wr=[];function Zr(e,t){void 0===t&&(t=[]);const n=o(null);return s(()=>{n.current=null},t),s(()=>{const t=e!==$n;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?Rn(e,n.current):$n}function Kr(e){return a(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const Xr=[];function Yr(e){let{measure:t}=e;const[n,r]=u(null),i=l(e=>{for(const{target:n}of e)if(mn(n)){r(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t]),s=$r({callback:i}),o=l(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return mn(t)?t:e}(e);null==s||s.disconnect(),n&&(null==s||s.observe(n)),r(n?t(n):null)},[t,s]),[c,h]=An(o);return a(()=>({nodeRef:c,rect:n,setRef:h}),[n,c,h])}const Qr=[{sensor:Mr,options:{}},{sensor:kr,options:{}}],Jr={current:{}},ei={draggable:{measure:rr},droppable:{measure:rr,strategy:Vr.WhileDragging,frequency:Ur.Optimized},dragOverlay:{measure:nr}};class ti extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const ni={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ti,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Gn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ei,measureDroppableContainers:Gn,windowRect:null,measuringScheduled:!1},ri=c({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Gn,draggableNodes:new Map,over:null,measureDroppableContainers:Gn}),ii=c(ni);function si(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ti}}}function oi(e,t){switch(t.type){case Bn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Bn.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Bn.DragEnd:case Bn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Bn.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new ti(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Bn.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const o=new ti(e.droppable.containers);return o.set(n,{...s,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case Bn.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const s=new ti(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function ai(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=f(ri),o=En(r),a=En(null==n?void 0:n.id);return s(()=>{if(!t&&!r&&o&&null!=a){if(!Cn(o))return;if(document.activeElement===o.target)return;const e=i.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=In(e);if(t){t.focus();break}}})}},[r,t,i,a,o]),null}const li=c({...$n,scaleX:1,scaleY:1});var ui;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(ui||(ui={}));const ci=h(function(e){var t,n,i,c;let{id:h,accessibility:f,autoScroll:p=!0,children:g,sensors:m=Qr,collisionDetection:_=Yn,measuring:y,modifiers:v,...b}=e;const x=d(oi,void 0,si),[w,A]=x,[E,S]=function(){const[e]=u(()=>new Set),t=l(t=>(e.add(t),()=>e.delete(t)),[e]);return[l(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[T,k]=u(ui.Uninitialized),O=T===ui.Initialized,{draggable:{active:R,nodes:C,translate:P},droppable:{containers:M}}=w,N=null!=R?C.get(R):null,I=o({initial:null,translated:null}),D=a(()=>{var e;return null!=R?{id:R,data:null!=(e=null==N?void 0:N.data)?e:Jr,rect:I}:null},[R,N]),F=o(null),[z,L]=u(null),[j,V]=u(null),U=xn(b,Object.values(b)),B=Tn("DndDescribedBy",h),G=a(()=>M.getEnabled(),[M]),$=a(()=>({draggable:{...ei.draggable,...null==q?void 0:q.draggable},droppable:{...ei.droppable,...null==q?void 0:q.droppable},dragOverlay:{...ei.dragOverlay,...null==q?void 0:q.dragOverlay}}),[null==(q=y)?void 0:q.draggable,null==q?void 0:q.droppable,null==q?void 0:q.dragOverlay]);var q;const{droppableRects:H,measureDroppableContainers:W,measuringScheduled:Z}=function(e,t){let{dragging:n,dependencies:r,config:i}=t;const[a,c]=u(null),{frequency:h,measure:d,strategy:f}=i,p=o(e),g=function(){switch(f){case Vr.Always:return!1;case Vr.BeforeDragging:return n;default:return!n}}(),m=xn(g),_=l(function(e){void 0===e&&(e=[]),m.current||c(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[m]),y=o(null),v=wn(t=>{if(g&&!n)return Br;if(!t||t===Br||p.current!==e||null!=a){const t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new yr(d(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,g,d]);return s(()=>{p.current=e},[e]),s(()=>{g||_()},[n,g]),s(()=>{a&&a.length>0&&c(null)},[JSON.stringify(a)]),s(()=>{g||"number"!=typeof h||null!==y.current||(y.current=setTimeout(()=>{_(),y.current=null},h))},[h,g,_,...r]),{droppableRects:v,measureDroppableContainers:_,measuringScheduled:null!=a}}(G,{dragging:O,dependencies:[P.x,P.y],config:$.droppable}),K=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return wn(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(C,R),X=a(()=>j?Pn(j):null,[j]),Y=function(){const e=!1===(null==z?void 0:z.autoScrollEnabled),t="object"==typeof p?!1===p.enabled:!1===p,n=O&&!e&&!t;if("object"==typeof p)return{...p,enabled:n};return{enabled:n}}(),Q=function(e,t){return Gr(e,t)}(K,$.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const s=o(!1),{x:a,y:l}="boolean"==typeof i?{x:i,y:i}:i;vn(()=>{if(!a&&!l||!t)return void(s.current=!1);if(s.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const i=Qn(n(e),r);if(a||(i.x=0),l||(i.y=0),s.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){const t=sr(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,a,l,r,n])}({activeNode:null!=R?C.get(R):null,config:Y.layoutShiftCompensation,initialRect:Q,measure:$.draggable.measure});const ee=Hr(K,$.draggable.measure,Q),te=Hr(K?K.parentElement:null),ne=o({activatorEvent:null,active:null,activeNode:K,collisionRect:null,collisions:null,droppableRects:H,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),re=M.getNodeFor(null==(t=ne.current.over)?void 0:t.id),ie=Yr({measure:$.dragOverlay.measure}),se=null!=(n=ie.nodeRef.current)?n:K,oe=O?null!=(i=ie.rect)?i:ee:null,ae=Boolean(ie.nodeRef.current&&ie.rect),le=Qn(ue=ae?null:ee,Gr(ue));var ue;const ce=Kr(se?pn(se):null),he=function(e){const t=o(e),n=wn(n=>e?n&&n!==Wr&&e&&t.current&&e.parentNode===t.current.parentNode?n:ir(e):Wr,[e]);return s(()=>{t.current=e},[e]),n}(O?null!=re?re:K:null),de=function(e,t){void 0===t&&(t=nr);const[n]=e,r=Kr(n?pn(n):null),[i,s]=u(Xr);function o(){s(()=>e.length?e.map(e=>hr(e)?r:new yr(t(e),e)):Xr)}const a=$r({callback:o});return vn(()=>{null==a||a.disconnect(),o(),e.forEach(e=>null==a?void 0:a.observe(e))},[e]),i}(he),fe=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}(v,{transform:{x:P.x-le.x,y:P.y-le.y,scaleX:1,scaleY:1},activatorEvent:j,active:D,activeNodeRect:ee,containerNodeRect:te,draggingNodeRect:oe,over:ne.current.over,overlayNodeRect:ie.rect,scrollableAncestors:he,scrollableAncestorRects:de,windowRect:ce}),pe=X?On(X,P):null,ge=function(e){const[t,n]=u(null),r=o(e),i=l(e=>{const t=or(e.target);t&&n(e=>e?(e.set(t,ur(t)),new Map(e)):null)},[]);return s(()=>{const t=r.current;if(e!==t){s(t);const o=e.map(e=>{const t=or(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,ur(t)]):null}).filter(e=>null!=e);n(o.length?new Map(o):null),r.current=e}return()=>{s(e),s(t)};function s(e){e.forEach(e=>{const t=or(e);null==t||t.removeEventListener("scroll",i)})}},[i,e]),a(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>On(e,t),$n):mr(e):$n,[e,t])}(he),me=Zr(ge),_e=Zr(ge,[ee]),ye=On(fe,me),ve=oe?er(oe,fe):null,be=D&&ve?_({active:D,collisionRect:ve,droppableRects:H,droppableContainers:G,pointerCoordinates:pe}):null,xe=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}(be,"id"),[we,Ae]=u(null),Ee=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ae?fe:On(fe,_e),null!=(c=null==we?void 0:we.rect)?c:null,ee),Se=o(null),Te=l((e,t)=>{let{sensor:n,options:r}=t;if(null==F.current)return;const i=C.get(F.current);if(!i)return;const s=e.nativeEvent,o=new n({active:F.current,activeNode:i,event:s,options:r,context:ne,onAbort(e){if(!C.get(e))return;const{onDragAbort:t}=U.current,n={id:e};null==t||t(n),E({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!C.get(e))return;const{onDragPending:i}=U.current,s={id:e,constraint:t,initialCoordinates:n,offset:r};null==i||i(s),E({type:"onDragPending",event:s})},onStart(e){const t=F.current;if(null==t)return;const n=C.get(t);if(!n)return;const{onDragStart:r}=U.current,i={activatorEvent:s,active:{id:t,data:n.data,rect:I}};J(()=>{null==r||r(i),k(ui.Initializing),A({type:Bn.DragStart,initialCoordinates:e,active:t}),E({type:"onDragStart",event:i}),L(Se.current),V(s)})},onMove(e){A({type:Bn.DragMove,coordinates:e})},onEnd:a(Bn.DragEnd),onCancel:a(Bn.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ne.current;let o=null;if(t&&i){const{cancelDrop:a}=U.current;if(o={activatorEvent:s,active:t,collisions:n,delta:i,over:r},e===Bn.DragEnd&&"function"==typeof a){await Promise.resolve(a(o))&&(e=Bn.DragCancel)}}F.current=null,J(()=>{A({type:e}),k(ui.Uninitialized),Ae(null),L(null),V(null),Se.current=null;const t=e===Bn.DragEnd?"onDragEnd":"onDragCancel";if(o){const e=U.current[t];null==e||e(o),E({type:t,event:o})}})}}Se.current=o},[C]),ke=l((e,t)=>(n,r)=>{const i=n.nativeEvent,s=C.get(r);if(null!==F.current||!s||i.dndKit||i.defaultPrevented)return;const o={active:s};!0===e(n,t.options,o)&&(i.dndKit={capturedBy:t.sensor},F.current=r,Te(n,t))},[C,Te]),Oe=function(e,t){return a(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(m,ke);!function(e){s(()=>{if(!hn)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(m),vn(()=>{ee&&T===ui.Initializing&&k(ui.Initialized)},[ee,T]),s(()=>{const{onDragMove:e}=U.current,{active:t,activatorEvent:n,collisions:r,over:i}=ne.current;if(!t||!n)return;const s={active:t,activatorEvent:n,collisions:r,delta:{x:ye.x,y:ye.y},over:i};J(()=>{null==e||e(s),E({type:"onDragMove",event:s})})},[ye.x,ye.y]),s(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ne.current;if(!e||null==F.current||!t||!i)return;const{onDragOver:s}=U.current,o=r.get(xe),a=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:a};J(()=>{Ae(a),null==s||s(l),E({type:"onDragOver",event:l})})},[xe]),vn(()=>{ne.current={activatorEvent:j,active:D,activeNode:K,collisionRect:ve,collisions:be,droppableRects:H,draggableNodes:C,draggingNode:se,draggingNodeRect:oe,droppableContainers:M,over:we,scrollableAncestors:he,scrollAdjustedTranslate:ye},I.current={initial:oe,translated:ve}},[D,K,be,ve,C,se,oe,H,M,we,he,ye]),Lr({...Y,delta:P,draggingRect:ve,pointerCoordinates:pe,scrollableAncestors:he,scrollableAncestorRects:de});const Re=a(()=>({active:D,activeNode:K,activeNodeRect:ee,activatorEvent:j,collisions:be,containerNodeRect:te,dragOverlay:ie,draggableNodes:C,droppableContainers:M,droppableRects:H,over:we,measureDroppableContainers:W,scrollableAncestors:he,scrollableAncestorRects:de,measuringConfiguration:$,measuringScheduled:Z,windowRect:ce}),[D,K,ee,j,be,te,ie,C,M,H,we,W,he,de,$,Z,ce]),Ce=a(()=>({activatorEvent:j,activators:Oe,active:D,activeNodeRect:ee,ariaDescribedById:{draggable:B},dispatch:A,draggableNodes:C,over:we,measureDroppableContainers:W}),[j,Oe,D,ee,A,B,C,we,W]);return r.createElement(Ln.Provider,{value:S},r.createElement(ri.Provider,{value:Ce},r.createElement(ii.Provider,{value:Re},r.createElement(li.Provider,{value:Ee},g)),r.createElement(ai,{disabled:!1===(null==f?void 0:f.restoreFocus)})),r.createElement(Un,{...f,hiddenTextDescribedById:B}))}),hi=c(null),di="button";function fi(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const s=Tn("Draggable"),{activators:o,activatorEvent:l,active:u,activeNodeRect:c,ariaDescribedById:h,draggableNodes:d,over:p}=f(ri),{role:g=di,roleDescription:m="draggable",tabIndex:_=0}=null!=i?i:{},y=(null==u?void 0:u.id)===t,v=f(y?li:hi),[b,x]=An(),[w,A]=An(),E=function(e,t){return a(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}(o,t),S=xn(n);vn(()=>(d.set(t,{id:t,key:s,node:b,activatorNode:w,data:S}),()=>{const e=d.get(t);e&&e.key===s&&d.delete(t)}),[d,t]);return{active:u,activatorEvent:l,activeNodeRect:c,attributes:a(()=>({role:g,tabIndex:_,"aria-disabled":r,"aria-pressed":!(!y||g!==di)||void 0,"aria-roledescription":m,"aria-describedby":h.draggable}),[r,g,_,y,m,h.draggable]),isDragging:y,listeners:r?void 0:E,node:b,over:p,setNodeRef:x,setActivatorNodeRef:A,transform:v}}const pi={timeout:25};function gi(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function mi(e,t){return e.reduce((e,n,r)=>{const i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function _i(e){return null!==e&&e>=0}const yi=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const s=gi(t,r,n),o=t[i],a=s[i];return a&&o?{x:a.left-o.left,y:a.top-o.top,scaleX:a.width/o.width,scaleY:a.height/o.height}:null},vi={scaleX:1,scaleY:1},bi=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:s,overIndex:o}=e;const a=null!=(t=s[n])?t:r;if(!a)return null;if(i===n){const e=s[o];return e?{x:0,y:n<o?e.top+e.height-(a.top+a.height):e.top-a.top,...vi}:null}const l=function(e,t,n){const r=e[t],i=e[t-1],s=e[t+1];if(!r)return 0;if(n<t)return i?r.top-(i.top+i.height):s?s.top-(r.top+r.height):0;return s?s.top-(r.top+r.height):i?r.top-(i.top+i.height):0}(s,i,n);return i>n&&i<=o?{x:0,y:-a.height-l,...vi}:i<n&&i>=o?{x:0,y:a.height+l,...vi}:{x:0,y:0,...vi}};const xi="Sortable",wi=r.createContext({activeIndex:-1,containerId:xi,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:yi,disabled:{draggable:!1,droppable:!1}});function Ai(e){let{children:t,id:n,items:i,strategy:l=yi,disabled:u=!1}=e;const{active:c,dragOverlay:h,droppableRects:d,over:p,measureDroppableContainers:g}=f(ii),m=Tn(xi,n),_=Boolean(null!==h.rect),y=a(()=>i.map(e=>"object"==typeof e&&"id"in e?e.id:e),[i]),v=null!=c,b=c?y.indexOf(c.id):-1,x=p?y.indexOf(p.id):-1,w=o(y),A=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(y,w.current),E=-1!==x&&-1===b||A,S=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);vn(()=>{A&&v&&g(y)},[A,y,v,g]),s(()=>{w.current=y},[y]);const T=a(()=>({activeIndex:b,containerId:m,disabled:S,disableTransforms:E,items:y,overIndex:x,useDragOverlay:_,sortedRects:mi(y,d),strategy:l}),[b,m,S.draggable,S.droppable,E,y,x,d,_,l]);return r.createElement(wi.Provider,{value:T},t)}const Ei=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return gi(n,r,i).indexOf(t)},Si=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:s,newIndex:o,previousItems:a,previousContainerId:l,transition:u}=e;return!(!u||!r)&&((a===s||i!==o)&&(!!n||o!==i&&t===l))},Ti={duration:200,easing:"ease"},ki="transform",Oi=Mn.Transition.toString({property:ki,duration:0,easing:"linear"}),Ri={roleDescription:"sortable"};function Ci(e){let{animateLayoutChanges:t=Si,attributes:n,disabled:r,data:i,getNewIndex:c=Ei,id:h,strategy:d,resizeObserverConfig:p,transition:g=Ti}=e;const{items:m,containerId:_,activeIndex:y,disabled:v,disableTransforms:b,sortedRects:x,overIndex:w,useDragOverlay:A,strategy:E}=f(wi),S=function(e,t){var n,r;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,v),T=m.indexOf(h),k=a(()=>({sortable:{containerId:_,index:T,items:m},...i}),[_,i,T,m]),O=a(()=>m.slice(m.indexOf(h)),[m,h]),{rect:R,node:C,isOver:P,setNodeRef:M}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const a=Tn("Droppable"),{active:u,dispatch:c,over:h,measureDroppableContainers:d}=f(ri),p=o({disabled:n}),g=o(!1),m=o(null),_=o(null),{disabled:y,updateMeasurementsFor:v,timeout:b}={...pi,...i},x=xn(null!=v?v:r),w=$r({callback:l(()=>{g.current?(null!=_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{d(Array.isArray(x.current)?x.current:[x.current]),_.current=null},b)):g.current=!0},[b]),disabled:y||!u}),A=l((e,t)=>{w&&(t&&(w.unobserve(t),g.current=!1),e&&w.observe(e))},[w]),[E,S]=An(A),T=xn(t);return s(()=>{w&&E.current&&(w.disconnect(),g.current=!1,w.observe(E.current))},[E,w]),s(()=>(c({type:Bn.RegisterDroppable,element:{id:r,key:a,disabled:n,node:E,rect:m,data:T}}),()=>c({type:Bn.UnregisterDroppable,key:a,id:r})),[r]),s(()=>{n!==p.current.disabled&&(c({type:Bn.SetDroppableDisabled,id:r,key:a,disabled:n}),p.current.disabled=n)},[r,a,n,c]),{active:u,rect:m,isOver:(null==h?void 0:h.id)===r,node:E,over:h,setNodeRef:S}}({id:h,data:k,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...p}}),{active:N,activatorEvent:I,activeNodeRect:D,attributes:F,setNodeRef:z,listeners:L,isDragging:j,over:V,setActivatorNodeRef:U,transform:B}=fi({id:h,data:k,attributes:{...Ri,...n},disabled:S.draggable}),G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a(()=>e=>{t.forEach(t=>t(e))},t)}(M,z),$=Boolean(N),q=$&&!b&&_i(y)&&_i(w),H=!A&&j,W=H&&q?B:null,Z=q?null!=W?W:(null!=d?d:E)({rects:x,activeNodeRect:D,activeIndex:y,overIndex:w,index:T}):null,K=_i(y)&&_i(w)?c({id:h,items:m,activeIndex:y,overIndex:w}):T,X=null==N?void 0:N.id,Y=o({activeId:X,items:m,newIndex:K,containerId:_}),Q=m!==Y.current.items,J=t({active:N,containerId:_,isDragging:j,isSorting:$,id:h,index:T,items:m,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:g,wasDragging:null!=Y.current.activeId}),ee=function(e){let{disabled:t,index:n,node:r,rect:i}=e;const[a,l]=u(null),c=o(n);return vn(()=>{if(!t&&n!==c.current&&r.current){const e=i.current;if(e){const t=nr(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&l(n)}}n!==c.current&&(c.current=n)},[t,n,r,i]),s(()=>{a&&l(null)},[a]),a}({disabled:!J,index:T,node:C,rect:R});return s(()=>{$&&Y.current.newIndex!==K&&(Y.current.newIndex=K),_!==Y.current.containerId&&(Y.current.containerId=_),m!==Y.current.items&&(Y.current.items=m)},[$,K,_,m]),s(()=>{if(X===Y.current.activeId)return;if(null!=X&&null==Y.current.activeId)return void(Y.current.activeId=X);const e=setTimeout(()=>{Y.current.activeId=X},50);return()=>clearTimeout(e)},[X]),{active:N,activeIndex:y,attributes:F,data:k,rect:R,index:T,newIndex:K,items:m,isOver:P,isSorting:$,isDragging:j,listeners:L,node:C,overIndex:w,over:V,setNodeRef:G,setActivatorNodeRef:U,setDroppableNodeRef:M,setDraggableNodeRef:z,transform:null!=ee?ee:Z,transition:function(){if(ee||Q&&Y.current.newIndex===T)return Oi;if(H&&!Cn(I)||!g)return;if($||J)return Mn.Transition.toString({...g,property:ki});return}()}}wr.Down,wr.Right,wr.Up,wr.Left;const Pi=({id:t,sx:n,children:r})=>{const{isDragging:i}=fi({id:t}),{attributes:s,listeners:o,setNodeRef:a,transform:l,transition:u}=Ci({id:t,strategy:bi,transition:{duration:300,easing:"cubic-bezier(0.25, 1, 0.5, 1)"}}),c={...n?.default,...i?n?.dragging:{},transform:Mn.Translate.toString(l),transition:u,cursor:"pointer"};return e(x,{ref:a,style:c,...o,...s,children:r})};function Mi({items:t,getItem:n,getId:r,onDragEnd:i,sx:s,title:o,draggableSx:l}){const u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a(()=>[...t].filter(e=>null!=e),[...t])}(a(()=>({sensor:c,options:null!=h?h:{}}),[c=Mr,h={activationConstraint:{distance:8}}]));var c,h;return e(ci,{sensors:u,collisionDetection:Kn,onDragEnd:e=>{const{active:n,over:s}=e,o=t.findIndex(e=>r(e)===n.id),a=t.findIndex(e=>r(e)===s?.id),l=gi(t,o,a);i(l)},children:e(Ai,{items:t.map(r),strategy:bi,children:e(de,{items:t,sx:s,title:o,getKey:r,getContent:(t,i)=>{const s=r(t);return e(Pi,{id:s,sx:l,children:n(t,i)},s)}})})})}const Ni=c(null);function Ii(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Di(){return function(){const e=p(Ni);if(null==e)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}().map}var Fi,zi;var Li=(zi||(zi=1,Fi=function(){const e=["a","b","c","d","e","f","0","1","2","3","4","5","6","7","8","9"];let t=[];for(let n=0;n<36;n++)t[n]=8===n||13===n||18===n||23===n?"-":e[Math.ceil(Math.random()*e.length-1)];return t.join("")}),Fi),ji=Ii(Li);function Vi(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Vi(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ui(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Vi(e))&&(r&&(r+=" "),r+=t);return r}let Bi={data:""},Gi=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,$i=/\/\*[^]*?\*\/| +/g,qi=/\n+/g,Hi=(e,t)=>{let n="",r="",i="";for(let s in e){let o=e[s];"@"==s[0]?"i"==s[1]?n=s+" "+o+";":r+="f"==s[1]?Hi(o,s):s+"{"+Hi(o,"k"==s[1]?"":t)+"}":"object"==typeof o?r+=Hi(o,t?t.replace(/([^,])+/g,e=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):s):null!=o&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Hi.p?Hi.p(s,o):s+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Wi={},Zi=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+Zi(e[n]);return t}return e},Ki=(e,t,n,r,i)=>{let s=Zi(e),o=Wi[s]||(Wi[s]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(s));if(!Wi[o]){let t=s!==e?e:(e=>{let t,n,r=[{}];for(;t=Gi.exec(e.replace($i,""));)t[4]?r.shift():t[3]?(n=t[3].replace(qi," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(qi," ").trim();return r[0]})(e);Wi[o]=Hi(i?{["@keyframes "+o]:t}:t,n?"":"."+o)}let a=n&&Wi.g?Wi.g:null;return n&&(Wi.g=Wi[o]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(Wi[o],t,r,a),o};function Xi(e){let t=this||{},n=e.call?e(t.p):e;return Ki(n.unshift?n.raw?((e,t,n)=>e.reduce((e,r,i)=>{let s=t[i];if(s&&s.call){let e=s(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;s=t?"."+t:e&&"object"==typeof e?e.props?"":Hi(e,""):!1===e?"":e}return e+r+(null==s?"":s)},""))(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Bi})(t.target),t.g,t.o,t.k)}function Yi(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function Qi(){return Qi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qi.apply(this,arguments)}function Ji(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function es(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function ts(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Xi.bind({g:1}),Xi.bind({k:1});var ns=function(){return""},rs=r.createContext({enqueueSnackbar:ns,closeSnackbar:ns}),is="@media (max-width:599.95px)",ss="@media (min-width:600px)",os=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},as=function(e){return""+os(e.vertical)+os(e.horizontal)},ls=function(e){return!!e||0===e},us="unmounted",cs="exited",hs="entering",ds="entered",fs="exiting",ps=function(e){function t(t){var n;n=e.call(this,t)||this;var r,i=t.appear;return n.appearStatus=null,t.in?i?(r=cs,n.appearStatus=hs):r=ds:r=t.unmountOnExit||t.mountOnEnter?us:cs,n.state={status:r},n.nextCallback=null,n}Ji(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===us?{status:cs}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==hs&&n!==ds&&(t=hs):n!==hs&&n!==ds||(t=fs)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===hs?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===cs&&this.setState({status:us})},n.performEnter=function(e){var t=this,n=this.props.enter,r=e,i=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,r),this.safeSetState({status:hs},function(){t.props.onEntering&&t.props.onEntering(t.node,r),t.onTransitionEnd(i.enter,function(){t.safeSetState({status:ds},function(){t.props.onEntered&&t.props.onEntered(t.node,r)})})})):this.safeSetState({status:ds},function(){t.props.onEntered&&t.props.onEntered(t.node,r)})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:fs},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:cs},function(){e.props.onExited&&e.props.onExited(e.node)})})})):this.safeSetState({status:cs},function(){e.props.onExited&&e.props.onExited(e.node)})},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;this.node&&!n?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===us)return null;var t=this.props;return(0,t.children)(e,es(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},Yi(t,[{key:"node",get:function(){var e,t=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!t)throw new Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(r.Component);function gs(){}function ms(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function _s(e,t){return a(function(){return null==e&&null==t?null:function(n){ms(e,n),ms(t,n)}},[e,t])}function ys(e){var t=e.timeout,n=e.style,r=void 0===n?{}:n,i=e.mode;return{duration:"object"==typeof t?t[i]||0:t,easing:r.transitionTimingFunction,delay:r.transitionDelay}}ps.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:gs,onEntering:gs,onEntered:gs,onExit:gs,onExiting:gs,onExited:gs};var vs="cubic-bezier(0.4, 0, 0.2, 1)",bs="cubic-bezier(0.0, 0, 0.2, 1)",xs="cubic-bezier(0.4, 0, 0.6, 1)",ws=function(e){e.scrollTop=e.scrollTop},As=function(e){return Math.round(e)+"ms"};function Es(e,t){void 0===e&&(e=["all"]);var n=t||{},r=n.duration,i=void 0===r?300:r,s=n.easing,o=void 0===s?vs:s,a=n.delay,l=void 0===a?0:a;return(Array.isArray(e)?e:[e]).map(function(e){var t="string"==typeof i?i:As(i),n="string"==typeof l?l:As(l);return e+" "+t+" "+o+" "+n}).join(",")}function Ss(e){var t=function(e){return e&&e.ownerDocument||document}(e);return t.defaultView||window}function Ts(e,t){if(t){var n=function(e,t){var n,r=t.getBoundingClientRect(),i=Ss(t);if(t.fakeTransform)n=t.fakeTransform;else{var s=i.getComputedStyle(t);n=s.getPropertyValue("-webkit-transform")||s.getPropertyValue("transform")}var o=0,a=0;if(n&&"none"!==n&&"string"==typeof n){var l=n.split("(")[1].split(")")[0].split(",");o=parseInt(l[4],10),a=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(i.innerWidth+o-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-o)+"px)";case"up":return"translateY("+(i.innerHeight+a-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-a)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var ks=g(function(e,t){var n=e.children,r=e.direction,i=void 0===r?"down":r,a=e.in,u=e.style,c=e.timeout,h=void 0===c?0:c,d=e.onEnter,f=e.onEntered,p=e.onExit,g=e.onExited,y=es(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),v=o(null),b=_s(n.ref,v),x=_s(b,t),w=l(function(){v.current&&Ts(i,v.current)},[i]);return s(function(){if(!a&&"down"!==i&&"right"!==i){var e=function(e,t){var n;function r(){for(var r=this,i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];clearTimeout(n),n=setTimeout(function(){e.apply(r,s)},t)}return void 0===t&&(t=166),r.clear=function(){clearTimeout(n)},r}(function(){v.current&&Ts(i,v.current)}),t=Ss(v.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}},[i,a]),s(function(){a||w()},[a,w]),m(ps,Object.assign({appear:!0,nodeRef:v,onEnter:function(e,t){Ts(i,e),ws(e),d&&d(e,t)},onEntered:f,onEntering:function(e){var t=(null==u?void 0:u.transitionTimingFunction)||bs,n=ys({timeout:h,mode:"enter",style:Qi({},u,{transitionTimingFunction:t})});e.style.webkitTransition=Es("-webkit-transform",n),e.style.transition=Es("transform",n),e.style.webkitTransform="none",e.style.transform="none"},onExit:function(e){var t=(null==u?void 0:u.transitionTimingFunction)||xs,n=ys({timeout:h,mode:"exit",style:Qi({},u,{transitionTimingFunction:t})});e.style.webkitTransition=Es("-webkit-transform",n),e.style.transition=Es("transform",n),Ts(i,e),p&&p(e)},onExited:function(e){e.style.webkitTransition="",e.style.transition="",g&&g(e)},in:a,timeout:h},y),function(e,t){return _(n,Qi({ref:x,style:Qi({visibility:"exited"!==e||a?void 0:"hidden"},u,{},n.props.style)},t))})});ks.displayName="Slide";var Os=function(e){return r.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},Rs=function(){return r.createElement(Os,null,r.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},Cs=function(){return r.createElement(Os,null,r.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},Ps=function(){return r.createElement(Os,null,r.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},Ms=function(){return r.createElement(Os,null,r.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},Ns={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:r.createElement(Rs,null),warning:r.createElement(Cs,null),error:r.createElement(Ps,null),info:r.createElement(Ms,null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:ks,transitionDuration:{enter:225,exit:195}},Is=function(e,t){return function(n,r){return void 0===r&&(r=!1),r?Qi({},Ns[n],{},t[n],{},e[n]):"autoHideDuration"===n?(i=e.autoHideDuration,s=t.autoHideDuration,(o=function(e){return"number"==typeof e||null===e})(i)?i:o(s)?s:Ns.autoHideDuration):"transitionDuration"===n?function(e,t){var n=function(e,t){return t.some(function(t){return typeof e===t})};return n(e,["string","number"])?e:n(e,["object"])?Qi({},Ns.transitionDuration,{},n(t,["object"])&&t,{},e):n(t,["string","number"])?t:n(t,["object"])?Qi({},Ns.transitionDuration,{},t):Ns.transitionDuration}(e.transitionDuration,t.transitionDuration):e[n]||t[n]||Ns[n];var i,s,o}};function Ds(e){return Object.entries(e).reduce(function(e,t){var n,r=t[0],i=t[1];return Qi({},e,((n={})[r]=Xi(i),n))},{})}var Fs="notistack-SnackbarContainer",zs="notistack-Snackbar",Ls="notistack-CollapseWrapper",js="notistack-MuiContent",Vs=function(e){return"notistack-MuiContent-"+e},Us=Ds({root:{height:0},entered:{height:"auto"}}),Bs="0px",Gs=g(function(e,t){var n=e.children,r=e.in,i=e.onExited,s=o(null),a=o(null),l=_s(t,a),u=function(){return s.current?s.current.clientHeight:0};return m(ps,{in:r,unmountOnExit:!0,onEnter:function(e){e.style.height=Bs},onEntered:function(e){e.style.height="auto"},onEntering:function(e){var t=u(),n=ys({timeout:175,mode:"enter"}),r=n.duration,i=n.easing;e.style.transitionDuration="string"==typeof r?r:r+"ms",e.style.height=t+"px",e.style.transitionTimingFunction=i||""},onExit:function(e){e.style.height=u()+"px"},onExited:i,onExiting:function(e){ws(e);var t=ys({timeout:175,mode:"exit"}),n=t.duration,r=t.easing;e.style.transitionDuration="string"==typeof n?n:n+"ms",e.style.height=Bs,e.style.transitionTimingFunction=r||""},nodeRef:a,timeout:175},function(e,t){return m("div",Object.assign({ref:l,className:Ui(Us.root,"entered"===e&&Us.entered),style:Qi({pointerEvents:"all",overflow:"hidden",minHeight:Bs,transition:Es("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!r&&{visibility:"hidden"})},t),m("div",{ref:s,className:Ls,style:{display:"flex",width:"100%"}},n))})});Gs.displayName="Collapse";var $s={right:"left",left:"right",bottom:"up",top:"down"},qs=function(e){return"anchorOrigin"+as(e)},Hs=function(){};function Ws(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];var o=[].concat(i);t&&-1===o.indexOf(t)&&o.push(t),e.apply(this,o),n.apply(this,o)}},Hs)}var Zs="undefined"!=typeof window?i:s;function Ks(e){var t=o(e);return Zs(function(){t.current=e}),l(function(){return t.current.apply(void 0,arguments)},[])}var Xs,Ys=g(function(e,t){var n=e.children,r=e.className,i=e.autoHideDuration,a=e.disableWindowBlurListener,u=void 0!==a&&a,c=e.onClose,h=e.id,d=e.open,f=e.SnackbarProps,p=void 0===f?{}:f,g=o(),_=Ks(function(){c&&c.apply(void 0,arguments)}),y=Ks(function(e){c&&null!=e&&(g.current&&clearTimeout(g.current),g.current=setTimeout(function(){_(null,"timeout",h)},e))});s(function(){return d&&y(i),function(){g.current&&clearTimeout(g.current)}},[d,i,y]);var v=function(){g.current&&clearTimeout(g.current)},b=l(function(){null!=i&&y(.5*i)},[i,y]);return s(function(){if(!u&&d)return window.addEventListener("focus",b),window.addEventListener("blur",v),function(){window.removeEventListener("focus",b),window.removeEventListener("blur",v)}},[u,b,d]),m("div",Object.assign({ref:t},p,{className:Ui(zs,r),onMouseEnter:function(e){p.onMouseEnter&&p.onMouseEnter(e),v()},onMouseLeave:function(e){p.onMouseLeave&&p.onMouseLeave(e),b()}}),n)});Ys.displayName="Snackbar";var Qs=Ds({root:(Xs={display:"flex",flexWrap:"wrap",flexGrow:1},Xs[ss]={flexGrow:"initial",minWidth:"288px"},Xs)}),Js=g(function(e,t){var n=e.className,i=es(e,["className"]);return r.createElement("div",Object.assign({ref:t,className:Ui(Qs.root,n)},i))});Js.displayName="SnackbarContent";var eo=Ds({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),to="notistack-snackbar",no=g(function(e,t){var n=e.id,i=e.message,s=e.action,o=e.iconVariant,a=e.variant,l=e.hideIconVariant,u=e.style,c=e.className,h=o[a],d=s;return"function"==typeof d&&(d=d(n)),r.createElement(Js,{ref:t,role:"alert","aria-describedby":to,style:u,className:Ui(js,Vs(a),eo.root,eo[a],c,!l&&h&&eo.lessPadding)},r.createElement("div",{id:to,className:eo.message},l?null:h,i),d&&r.createElement("div",{className:eo.action},d))});no.displayName="MaterialDesignContent";var ro,io,so,oo,ao,lo,uo=h(no),co=Ds({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),ho=function(e){var t=o(),n=u(!0),i=n[0],c=n[1],h=Ws([e.snack.onClose,e.onClose]),d=l(function(){t.current=setTimeout(function(){c(function(e){return!e})},125)},[]);s(function(){return function(){t.current&&clearTimeout(t.current)}},[]);var f,p=e.snack,g=e.classes,m=e.Component,_=void 0===m?uo:m,y=a(function(){return function(e){void 0===e&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(e){return!t[e]}).reduce(function(t,n){var r;return Qi({},t,((r={})[n]=e[n],r))},{})}(g)},[g]),v=p.open,b=p.SnackbarProps,x=p.TransitionComponent,w=p.TransitionProps,A=p.transitionDuration,E=p.disableWindowBlurListener,S=p.content,T=es(p,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),k=Qi({direction:(f=T.anchorOrigin,"center"!==f.horizontal?$s[f.horizontal]:$s[f.vertical]),timeout:A},w),O=S;"function"==typeof O&&(O=O(T.id,T.message));var R=["onEnter","onEntered","onExit","onExited"].reduce(function(t,n){var r;return Qi({},t,((r={})[n]=Ws([e.snack[n],e[n]],T.id),r))},{});return r.createElement(Gs,{in:i,onExited:R.onExited},r.createElement(Ys,{open:v,id:T.id,disableWindowBlurListener:E,autoHideDuration:T.autoHideDuration,className:Ui(co.wrappedRoot,y.root,y[qs(T.anchorOrigin)]),SnackbarProps:b,onClose:h},r.createElement(x,Object.assign({},k,{appear:!0,in:v,onExit:R.onExit,onExited:d,onEnter:R.onEnter,onEntered:Ws([R.onEntered,function(){e.snack.requestClose&&h(null,"instructed",e.snack.id)}],T.id)}),O||r.createElement(_,Object.assign({},T)))))},fo={default:20},po={default:6,dense:2},go="."+Ls,mo=Ds({root:(ro={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:Es(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},ro[go]={padding:po.default+"px 0px",transition:"padding 300ms ease 0ms"},ro.maxWidth="calc(100% - "+2*fo.default+"px)",ro[is]={width:"100%",maxWidth:"calc(100% - 32px)"},ro),rootDense:(io={},io[go]={padding:po.dense+"px 0px"},io),top:{top:fo.default-po.default+"px",flexDirection:"column"},bottom:{bottom:fo.default-po.default+"px",flexDirection:"column-reverse"},left:(so={left:fo.default+"px"},so[ss]={alignItems:"flex-start"},so[is]={left:"16px"},so),right:(oo={right:fo.default+"px"},oo[ss]={alignItems:"flex-end"},oo[is]={right:"16px"},oo),center:(ao={left:"50%",transform:"translateX(-50%)"},ao[ss]={alignItems:"center"},ao)}),_o=function(e){var t=e.classes,n=void 0===t?{}:t,i=e.anchorOrigin,s=e.dense,o=e.children,a=Ui(Fs,mo[i.vertical],mo[i.horizontal],mo.root,n.containerRoot,n["containerAnchorOrigin"+as(i)],s&&mo.rootDense);return r.createElement("div",{className:a},o)},yo=h(_o),vo="production"!==process.env.NODE_ENV,bo={NO_PERSIST_ALL:"Reached maxSnack while all enqueued snackbars have 'persist' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented."},xo=function(e){return!("string"==typeof e||v(e))},wo=function(e){function t(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){if(void 0===t&&(t={}),null==e)throw new Error("enqueueSnackbar called with invalid argument");var r=xo(e)?e:t,i=xo(e)?e.message:e,s=r.key,o=r.preventDuplicate,a=es(r,["key","preventDuplicate"]),l=ls(s),u=l?s:(new Date).getTime()+Math.random(),c=Is(a,n.props),h=Qi({id:u},a,{message:i,open:!0,entered:!1,requestClose:!1,persist:c("persist"),action:c("action"),content:c("content"),variant:c("variant"),anchorOrigin:c("anchorOrigin"),disableWindowBlurListener:c("disableWindowBlurListener"),autoHideDuration:c("autoHideDuration"),hideIconVariant:c("hideIconVariant"),TransitionComponent:c("TransitionComponent"),transitionDuration:c("transitionDuration"),TransitionProps:c("TransitionProps",!0),iconVariant:c("iconVariant",!0),style:c("style",!0),SnackbarProps:c("SnackbarProps",!0),className:Ui(n.props.className,a.className)});return h.persist&&(h.autoHideDuration=void 0),n.setState(function(e){if(void 0===o&&n.props.preventDuplicate||o){var t=function(e){return l?e.id===u:e.message===i},r=e.queue.findIndex(t)>-1,s=e.snacks.findIndex(t)>-1;if(r||s)return e}return n.handleDisplaySnack(Qi({},e,{queue:[].concat(e.queue,[h])}))}),u},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?Qi({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,r=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&("production"!==process.env.NODE_ENV&&function(e){if(vo){var t=bo[e];"undefined"!=typeof console&&console.error("WARNING - notistack: "+t);try{throw new Error(t)}catch(e){}}}("NO_PERSIST_ALL"),r=!0);var i=e.snacks.map(function(e){return t||e.persist&&!r?Qi({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),Qi({},e,{open:!1})):Qi({},e,{requestClose:!0}))});return Qi({},e,{snacks:i})},n.handleEnteredSnack=function(e,t,r){if(!ls(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===r?Qi({},e,{entered:!0}):Qi({},e)})}})},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var i=void 0===r;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return i||e.id===r?e.entered?Qi({},e,{open:!1}):Qi({},e,{requestClose:!0}):Qi({},e)}),queue:n.filter(function(e){return e.id!==r})}})},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.id===e});ls(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!ls(t))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var r=n.processQueue(Qi({},e,{snacks:e.snacks.filter(function(e){return e.id!==t})}));return 0===r.queue.length?r:n.handleDismissOldest(r)})},lo=n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(ts(n)),closeSnackbar:n.closeSnackbar.bind(ts(n))}},n}return Ji(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,i=n.domRoot,s=n.children,o=n.dense,a=void 0!==o&&o,l=n.Components,u=void 0===l?{}:l,c=n.classes,h=this.state.snacks.reduce(function(e,t){var n,r=as(t.anchorOrigin),i=e[r]||[];return Qi({},e,((n={})[r]=[].concat(i,[t]),n))},{}),d=Object.keys(h).map(function(t){var n=h[t],i=n[0];return r.createElement(yo,{key:t,dense:a,anchorOrigin:i.anchorOrigin,classes:c},n.map(function(t){return r.createElement(ho,{key:t.id,snack:t,classes:c,Component:u[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:Ws([e.handleExitedSnack,e.props.onExited],t.id),onEntered:Ws([e.handleEnteredSnack,e.props.onEntered],t.id)})}))});return r.createElement(rs.Provider,{value:t},s,i?ee(d,i):d)},Yi(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||Ns.maxSnack}}]),t}(y);const Ao=e=>{const t=(new Date).getUTCHours();return encodeURIComponent([...e].reduce((n,r,i)=>{const s=(e.charCodeAt(i)-32+t)%95+32;return n+String.fromCharCode(s)},""))},Eo=e=>Object.keys(e).reduce((t,n,r)=>`${t}${0===r?"":"&"}${n}=${e[n]}`,""),So=({variant:e,message:t})=>{lo?.({variant:e,message:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})},To=async e=>{const t=JSON.stringify(e,null,2);return await navigator.clipboard.writeText(t).then(()=>(So({message:"Данные были успешно скопированы в буфер обмена",variant:"success"}),!0)).catch(()=>!1)},ko=()=>ji(),Oo=e=>({lat:e.lat,lon:e.lat});var Ro="production"!==process.env.NODE_ENV?{0:"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",1:function(e,t){return"Cannot apply '"+e+"' to '"+t.toString()+"': Field not found."},5:"'keys()' can only be used on observable objects, arrays, sets and maps",6:"'values()' can only be used on observable objects, arrays, sets and maps",7:"'entries()' can only be used on observable objects, arrays and maps",8:"'set()' can only be used on observable objects, arrays and maps",9:"'remove()' can only be used on observable objects, arrays and maps",10:"'has()' can only be used on observable objects, arrays and maps",11:"'get()' can only be used on observable objects, arrays and maps",12:"Invalid annotation",13:"Dynamic observable objects cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",14:"Intercept handlers should return nothing or a change object",15:"Observable arrays cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",16:"Modification exception: the internal structure of an observable array was changed.",17:function(e,t){return"[mobx.array] Index out of bounds, "+e+" is larger than "+t},18:"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js",19:function(e){return"Cannot initialize from classes that inherit from Map: "+e.constructor.name},20:function(e){return"Cannot initialize map from "+e},21:function(e){return"Cannot convert to map from '"+e+"'"},22:"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js",23:"It is not possible to get index atoms from arrays",24:function(e){return"Cannot obtain administration from "+e},25:function(e,t){return"the entry '"+e+"' does not exist in the observable map '"+t+"'"},26:"please specify a property",27:function(e,t){return"no observable property '"+e.toString()+"' found on the observable object '"+t+"'"},28:function(e){return"Cannot obtain atom from "+e},29:"Expecting some object",30:"invalid action stack. did you forget to finish an action?",31:"missing option for computed: get",32:function(e,t){return"Cycle detected in computation "+e+": "+t},33:function(e){return"The setter of computed value '"+e+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"},34:function(e){return"[ComputedValue '"+e+"'] It is not possible to assign a new value to a computed value."},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:"isolateGlobalState should be called before MobX is running any reactions",37:function(e){return"[mobx] `observableArray."+e+"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()."+e+"()` instead"},38:"'ownKeys()' can only be used on observable objects",39:"'defineProperty()' can only be used on observable objects"}:{};function Co(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("production"!==process.env.NODE_ENV){var i="string"==typeof e?e:Ro[e];throw"function"==typeof i&&(i=i.apply(null,n)),new Error("[MobX] "+i)}throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var Po={};function Mo(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:Po}var No=Object.assign,Io=Object.getOwnPropertyDescriptor,Do=Object.defineProperty,Fo=Object.prototype,zo=[];Object.freeze(zo);var Lo={};Object.freeze(Lo);var jo="undefined"!=typeof Proxy,Vo=Object.toString();function Uo(){jo||Co("production"!==process.env.NODE_ENV?"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`":"Proxy not available")}function Bo(e){"production"!==process.env.NODE_ENV&&ql.verifyProxies&&Co("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to "+e)}function Go(){return++ql.mobxGuid}function $o(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var qo=function(){};function Ho(e){return"function"==typeof e}function Wo(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function Zo(e){return null!==e&&"object"==typeof e}function Ko(e){if(!Zo(e))return!1;var t=Object.getPrototypeOf(e);if(null==t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n.toString()===Vo}function Xo(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function Yo(e,t,n){Do(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Qo(e,t,n){Do(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Jo(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return Zo(e)&&!0===e[n]}}function ea(e){return null!=e&&"[object Map]"===Object.prototype.toString.call(e)}function ta(e){return null!=e&&"[object Set]"===Object.prototype.toString.call(e)}var na=void 0!==Object.getOwnPropertySymbols;var ra="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:na?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function ia(e){return"string"==typeof e?e:"symbol"==typeof e?e.toString():new String(e).toString()}function sa(e){return null===e?null:"object"==typeof e?""+e:e}function oa(e,t){return Fo.hasOwnProperty.call(e,t)}var aa=Object.getOwnPropertyDescriptors||function(e){var t={};return ra(e).forEach(function(n){t[n]=Io(e,n)}),t};function la(e,t){return!!(e&t)}function ua(e,t,n){return n?e|=t:e&=~t,e}function ca(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ha(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ma(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function da(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ca(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ca(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fa.apply(null,arguments)}function pa(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ga(e,t)}function ga(e,t){return ga=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ga(e,t)}function ma(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}var _a=Symbol("mobx-stored-annotations");function ya(e){return Object.assign(function(t,n){if(ba(n))return e.decorate_20223_(t,n);va(t,n,e)},e)}function va(e,t,n){(oa(e,_a)||Yo(e,_a,fa({},e[_a])),"production"!==process.env.NODE_ENV&&Ca(n)&&!oa(e[_a],t))&&Co("'"+(e.constructor.name+".prototype."+t.toString())+"' is decorated with 'override', but no such decorated member was found on prototype.");!function(e,t,n){if("production"!==process.env.NODE_ENV&&!Ca(t)&&oa(e[_a],n)){var r=e.constructor.name+".prototype."+n.toString(),i=e[_a][n].annotationType_;Co("Cannot apply '@"+t.annotationType_+"' to '"+r+"':\nThe field is already decorated with '@"+i+"'.\nRe-decorating fields is not allowed.\nUse '@override' decorator for methods overridden by subclass.")}}(e,n,t),Ca(n)||(e[_a][t]=n)}function ba(e){return"object"==typeof e&&"string"==typeof e.kind}function xa(e,t){"production"===process.env.NODE_ENV||t.includes(e.kind)||Co("The decorator applied to '"+String(e.name)+"' cannot be used on a "+e.kind+" element")}var wa=Symbol("mobx administration"),Aa=function(){function e(e){void 0===e&&(e="production"!==process.env.NODE_ENV?"Atom@"+Go():"Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=kl.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.reportObserved=function(){return Yl(this)},t.reportChanged=function(){Kl(),Ql(this),Xl()},t.toString=function(){return this.name_},ha(e,[{key:"isBeingObserved",get:function(){return la(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=ua(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return la(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=ua(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return la(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=ua(this.flags_,e.diffValueMask_,1===t)}}])}();Aa.isBeingObservedMask_=1,Aa.isPendingUnobservationMask_=2,Aa.diffValueMask_=4;var Ea=Jo("Atom",Aa);function Sa(e,t,n){void 0===t&&(t=qo),void 0===n&&(n=qo);var r,i=new Aa(e);return t!==qo&&Tu(Au,i,t,r),n!==qo&&Su(i,n),i}var Ta={structural:function(e,t){return qc(e,t)},default:function(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t}};function ka(e,t,n){return ju(e)?e:Array.isArray(e)?fl.array(e,{name:n}):Ko(e)?fl.object(e,void 0,{name:n}):ea(e)?fl.map(e,{name:n}):ta(e)?fl.set(e,{name:n}):"function"!=typeof e||xu(e)||Lu(e)?e:Xo(e)?Fu(e):bu(n,e)}function Oa(e){return e}var Ra="override";function Ca(e){return e.annotationType_===Ra}function Pa(e,t){return{annotationType_:e,options_:t,make_:Ma,extend_:Na,decorate_20223_:Ia}}function Ma(e,t,n,r){var i;if(null!=(i=this.options_)&&i.bound)return null===this.extend_(e,t,n,!1)?0:1;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(xu(n.value))return 1;var s=Da(e,this,t,n,!1);return Do(r,t,s),2}function Na(e,t,n,r){var i=Da(e,this,t,n);return e.defineProperty_(t,i,r)}function Ia(e,t){"production"!==process.env.NODE_ENV&&xa(t,["method","field"]);var n,r=t.kind,i=t.name,s=t.addInitializer,o=this,a=function(e){var t,n,r,s;return wl(null!=(t=null==(n=o.options_)?void 0:n.name)?t:i.toString(),e,null!=(r=null==(s=o.options_)?void 0:s.autoAction)&&r)};return"field"==r?function(e){var t,n=e;return xu(n)||(n=a(n)),null!=(t=o.options_)&&t.bound&&((n=n.bind(this)).isMobxAction=!0),n}:"method"==r?(xu(e)||(e=a(e)),null!=(n=this.options_)&&n.bound&&s(function(){var e=this,t=e[i].bind(e);t.isMobxAction=!0,e[i]=t}),e):void Co("Cannot apply '"+o.annotationType_+"' to '"+String(i)+"' (kind: "+r+"):\n'"+o.annotationType_+"' can only be used on properties with a function value.")}function Da(e,t,n,r,i){var s,o,a,l,u,c,h;void 0===i&&(i=ql.safeDescriptors),function(e,t,n,r){var i=t.annotationType_,s=r.value;"production"===process.env.NODE_ENV||Ho(s)||Co("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' can only be used on properties with a function value.")}(e,t,n,r);var d,f=r.value;null!=(s=t.options_)&&s.bound&&(f=f.bind(null!=(d=e.proxy_)?d:e.target_));return{value:wl(null!=(o=null==(a=t.options_)?void 0:a.name)?o:n.toString(),f,null!=(l=null==(u=t.options_)?void 0:u.autoAction)&&l,null!=(c=t.options_)&&c.bound?null!=(h=e.proxy_)?h:e.target_:void 0),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function Fa(e,t){return{annotationType_:e,options_:t,make_:za,extend_:La,decorate_20223_:ja}}function za(e,t,n,r){var i;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(null!=(i=this.options_)&&i.bound&&(!oa(e.target_,t)||!Lu(e.target_[t]))&&null===this.extend_(e,t,n,!1))return 0;if(Lu(n.value))return 1;var s=Va(e,this,t,n,!1,!1);return Do(r,t,s),2}function La(e,t,n,r){var i,s=Va(e,this,t,n,null==(i=this.options_)?void 0:i.bound);return e.defineProperty_(t,s,r)}function ja(e,t){var n;"production"!==process.env.NODE_ENV&&xa(t,["method"]);var r=t.name,i=t.addInitializer;return Lu(e)||(e=Fu(e)),null!=(n=this.options_)&&n.bound&&i(function(){var e=this,t=e[r].bind(e);t.isMobXFlow=!0,e[r]=t}),e}function Va(e,t,n,r,i,s){void 0===s&&(s=ql.safeDescriptors),function(e,t,n,r){var i=t.annotationType_,s=r.value;"production"===process.env.NODE_ENV||Ho(s)||Co("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' can only be used on properties with a generator function value.")}(e,t,n,r);var o,a=r.value;(Lu(a)||(a=Fu(a)),i)&&((a=a.bind(null!=(o=e.proxy_)?o:e.target_)).isMobXFlow=!0);return{value:a,configurable:!s||e.isPlainObject_,enumerable:!1,writable:!s}}function Ua(e,t){return{annotationType_:e,options_:t,make_:Ba,extend_:Ga,decorate_20223_:$a}}function Ba(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function Ga(e,t,n,r){return function(e,t,n,r){var i=t.annotationType_,s=r.get;"production"===process.env.NODE_ENV||s||Co("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' can only be used on getter(+setter) properties.")}(e,this,t,n),e.defineComputedProperty_(t,fa({},this.options_,{get:n.get,set:n.set}),r)}function $a(e,t){"production"!==process.env.NODE_ENV&&xa(t,["getter"]);var n=this,r=t.name;return(0,t.addInitializer)(function(){var t=wc(this)[wa],i=fa({},n.options_,{get:e,context:this});i.name||(i.name="production"!==process.env.NODE_ENV?t.name_+"."+r.toString():"ObservableObject."+r.toString()),t.values_.set(r,new Tl(i))}),function(){return this[wa].getObservablePropValue_(r)}}function qa(e,t){return{annotationType_:e,options_:t,make_:Ha,extend_:Wa,decorate_20223_:Za}}function Ha(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function Wa(e,t,n,r){var i,s;return function(e,t,n,r){var i=t.annotationType_;"production"===process.env.NODE_ENV||"value"in r||Co("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' cannot be used on getter/setter properties")}(e,this,t,n),e.defineObservableProperty_(t,n.value,null!=(i=null==(s=this.options_)?void 0:s.enhancer)?i:ka,r)}function Za(e,t){if("production"!==process.env.NODE_ENV){if("field"===t.kind)throw Co("Please use `@observable accessor "+String(t.name)+"` instead of `@observable "+String(t.name)+"`");xa(t,["accessor"])}var n=this,r=t.kind,i=t.name,s=new WeakSet;function o(e,t){var r,o,a=wc(e)[wa],l=new Sl(t,null!=(r=null==(o=n.options_)?void 0:o.enhancer)?r:ka,"production"!==process.env.NODE_ENV?a.name_+"."+i.toString():"ObservableObject."+i.toString(),!1);a.values_.set(i,l),s.add(e)}if("accessor"==r)return{get:function(){return s.has(this)||o(this,e.get.call(this)),this[wa].getObservablePropValue_(i)},set:function(e){return s.has(this)||o(this,e),this[wa].setObservablePropValue_(i,e)},init:function(e){return s.has(this)||o(this,e),e}}}var Ka="true",Xa=Ya();function Ya(e){return{annotationType_:Ka,options_:e,make_:Qa,extend_:Ja,decorate_20223_:el}}function Qa(e,t,n,r){var i,s,o,a;if(n.get)return _l.make_(e,t,n,r);if(n.set){var l=xu(n.set)?n.set:wl(t.toString(),n.set);return r===e.target_?null===e.defineProperty_(t,{configurable:!ql.safeDescriptors||e.isPlainObject_,set:l})?0:2:(Do(r,t,{configurable:!0,set:l}),2)}if(r!==e.target_&&"function"==typeof n.value)return Xo(n.value)?(null!=(a=this.options_)&&a.autoBind?Fu.bound:Fu).make_(e,t,n,r):(null!=(o=this.options_)&&o.autoBind?bu.bound:bu).make_(e,t,n,r);var u,c=!1===(null==(i=this.options_)?void 0:i.deep)?fl.ref:fl;"function"==typeof n.value&&null!=(s=this.options_)&&s.autoBind&&(n.value=n.value.bind(null!=(u=e.proxy_)?u:e.target_));return c.make_(e,t,n,r)}function Ja(e,t,n,r){var i,s,o;if(n.get)return _l.extend_(e,t,n,r);if(n.set)return e.defineProperty_(t,{configurable:!ql.safeDescriptors||e.isPlainObject_,set:wl(t.toString(),n.set)},r);"function"==typeof n.value&&null!=(i=this.options_)&&i.autoBind&&(n.value=n.value.bind(null!=(o=e.proxy_)?o:e.target_));return(!1===(null==(s=this.options_)?void 0:s.deep)?fl.ref:fl).extend_(e,t,n,r)}function el(e,t){Co("'"+this.annotationType_+"' cannot be used as a decorator")}var tl={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function nl(e){return e||tl}Object.freeze(tl);var rl=qa("observable"),il=qa("observable.ref",{enhancer:Oa}),sl=qa("observable.shallow",{enhancer:function(e,t,n){return null==e||Sc(e)||lc(e)||fc(e)||_c(e)?e:Array.isArray(e)?fl.array(e,{name:n,deep:!1}):Ko(e)?fl.object(e,void 0,{name:n,deep:!1}):ea(e)?fl.map(e,{name:n,deep:!1}):ta(e)?fl.set(e,{name:n,deep:!1}):void("production"!==process.env.NODE_ENV&&Co("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets"))}}),ol=qa("observable.struct",{enhancer:function(e,t){return"production"!==process.env.NODE_ENV&&ju(e)&&Co("observable.struct should not be used with observable values"),qc(e,t)?t:e}}),al=ya(rl);function ll(e){return!0===e.deep?ka:!1===e.deep?Oa:(t=e.defaultDecorator)&&null!=(n=null==(r=t.options_)?void 0:r.enhancer)?n:ka;var t,n,r}function ul(e,t,n){return ba(t)?rl.decorate_20223_(e,t):Wo(t)?void va(e,t,rl):ju(e)?e:Ko(e)?fl.object(e,t,n):Array.isArray(e)?fl.array(e,t):ea(e)?fl.map(e,t):ta(e)?fl.set(e,t):"object"==typeof e&&null!==e?e:fl.box(e,t)}No(ul,al);var cl,hl,dl={box:function(e,t){var n=nl(t);return new Sl(e,ll(n),n.name,!0,n.equals)},array:function(e,t){var n=nl(t);return(!1===ql.useProxies||!1===n.proxy?Lc:tc)(e,ll(n),n.name)},map:function(e,t){var n=nl(t);return new dc(e,ll(n),n.name)},set:function(e,t){var n=nl(t);return new mc(e,ll(n),n.name)},object:function(e,t,n){return Bc(function(){return Ru(!1===ql.useProxies||!1===(null==n?void 0:n.proxy)?wc({},n):function(e,t){var n,r;return Uo(),e=wc(e,t),null!=(r=(n=e[wa]).proxy_)?r:n.proxy_=new Proxy(e,Bu)}({},n),e,t)})},ref:ya(il),shallow:ya(sl),deep:al,struct:ya(ol)},fl=No(ul,dl),pl="computed",gl=Ua(pl),ml=Ua("computed.struct",{equals:Ta.structural}),_l=function(e,t){if(ba(t))return gl.decorate_20223_(e,t);if(Wo(t))return va(e,t,gl);if(Ko(e))return ya(Ua(pl,e));"production"!==process.env.NODE_ENV&&(Ho(e)||Co("First argument to `computed` should be an expression."),Ho(t)&&Co("A setter as second argument is no longer supported, use `{ set: fn }` option instead"));var n=Ko(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new Tl(n)};Object.assign(_l,gl),_l.struct=ya(ml);var yl=0,vl=1,bl=null!=(cl=null==(hl=Io(function(){},"name"))?void 0:hl.configurable)&&cl,xl={value:"action",configurable:!0,writable:!1,enumerable:!1};function wl(e,t,n,r){function i(){return function(e,t,n,r,i){var s=function(e,t,n,r){var i="production"!==process.env.NODE_ENV&&au()&&!!e,s=0;if("production"!==process.env.NODE_ENV&&i){s=Date.now();var o=r?Array.from(r):zo;uu({type:du,name:e,object:n,arguments:o})}var a=ql.trackingDerivation,l=!t||!a;Kl();var u=ql.allowStateChanges;l&&(zl(),u=Al(!0));var c=jl(!0),h={runAsAction_:l,prevDerivation_:a,prevAllowStateChanges_:u,prevAllowStateReads_:c,notifySpy_:i,startTime_:s,actionId_:vl++,parentActionId_:yl};return yl=h.actionId_,h}(e,t,r,i);try{return n.apply(r,i)}catch(e){throw s.error_=e,e}finally{!function(e){yl!==e.actionId_&&Co(30);yl=e.parentActionId_,void 0!==e.error_&&(ql.suppressReactionErrors=!0);El(e.prevAllowStateChanges_),Vl(e.prevAllowStateReads_),Xl(),e.runAsAction_&&Ll(e.prevDerivation_);"production"!==process.env.NODE_ENV&&e.notifySpy_&&hu({time:Date.now()-e.startTime_});ql.suppressReactionErrors=!1}(s)}}(e,n,t,r||this,arguments)}return void 0===n&&(n=!1),"production"!==process.env.NODE_ENV&&(Ho(t)||Co("`action` can only be invoked on functions"),"string"==typeof e&&e||Co("actions should have valid names, got: '"+e+"'")),i.isMobxAction=!0,i.toString=function(){return t.toString()},bl&&(xl.value=e,Do(i,"name",xl)),i}function Al(e){var t=ql.allowStateChanges;return ql.allowStateChanges=e,t}function El(e){ql.allowStateChanges=e}var Sl=function(e){function t(t,n,r,i,s){var o,a;(void 0===r&&(r="production"!==process.env.NODE_ENV?"ObservableValue@"+Go():"ObservableValue"),void 0===i&&(i=!0),void 0===s&&(s=Ta.default),(o=e.call(this,r)||this).enhancer=void 0,o.name_=void 0,o.equals=void 0,o.hasUnreportedChange_=!1,o.interceptors_=void 0,o.changeListeners_=void 0,o.value_=void 0,o.dehancer=void 0,o.enhancer=n,o.name_=r,o.equals=s,o.value_=n(t,void 0,r),"production"!==process.env.NODE_ENV&&i&&au())&&lu({type:"create",object:o,observableKind:"value",debugObjectName:o.name_,newValue:""+(null==(a=o.value_)?void 0:a.toString())});return o}pa(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){var t=this.value_;if((e=this.prepareNewValue_(e))!==ql.UNCHANGED){var n=au();"production"!==process.env.NODE_ENV&&n&&uu({type:Qu,object:this,observableKind:"value",debugObjectName:this.name_,newValue:e,oldValue:t}),this.setNewValue_(e),"production"!==process.env.NODE_ENV&&n&&hu()}},n.prepareNewValue_=function(e){if(Nl(this),Gu(this)){var t=qu(this,{object:this,type:Qu,newValue:e});if(!t)return ql.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?ql.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),Hu(this)&&Zu(this,{type:Qu,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return $u(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:Qu,newValue:this.value_,oldValue:void 0}),Wu(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return sa(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},t}(Aa),Tl=function(){function e(e){this.dependenciesState_=kl.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=kl.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Cl(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Ol.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||Co(31),this.derivation=e.get,this.name_=e.name||("production"!==process.env.NODE_ENV?"ComputedValue@"+Go():"ComputedValue"),e.set&&(this.setter_=wl("production"!==process.env.NODE_ENV?this.name_+"-setter":"ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?Ta.structural:Ta.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==kl.UP_TO_DATE_)return;e.lowestObserverState_=kl.POSSIBLY_STALE_,e.observers_.forEach(function(e){e.dependenciesState_===kl.UP_TO_DATE_&&(e.dependenciesState_=kl.POSSIBLY_STALE_,e.onBecomeStale_())})}(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.get=function(){if(this.isComputing&&Co(32,this.name_,this.derivation),0!==ql.inBatch||0!==this.observers_.size||this.keepAlive_){if(Yl(this),Ml(this)){var e=ql.trackingContext;this.keepAlive_&&!e&&(ql.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===kl.STALE_)return;e.lowestObserverState_=kl.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===kl.POSSIBLY_STALE_?(t.dependenciesState_=kl.STALE_,"production"!==process.env.NODE_ENV&&t.isTracing_!==Ol.NONE&&Jl(t,e)):t.dependenciesState_===kl.UP_TO_DATE_&&(e.lowestObserverState_=kl.UP_TO_DATE_)})}(this),ql.trackingContext=e}}else Ml(this)&&(this.warnAboutUntrackedRead_(),Kl(),this.value_=this.computeValue_(!1),Xl());var t=this.value_;if(Pl(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter&&Co(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter=!1}}else Co(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===kl.NOT_TRACKING_,n=this.computeValue_(!0),r=t||Pl(e)||Pl(n)||!this.equals_(e,n);return r&&(this.value_=n,"production"!==process.env.NODE_ENV&&au()&&lu({observableKind:"computed",debugObjectName:this.name_,object:this.scope_,type:"update",oldValue:e,newValue:n})),r},t.computeValue_=function(e){this.isComputing=!0;var t,n=Al(!1);if(e)t=Il(this,this.derivation,this.scope_);else if(!0===ql.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new Cl(e)}return El(n),this.isComputing=!1,t},t.suspend_=function(){this.keepAlive_||(Dl(this),this.value_=void 0,"production"!==process.env.NODE_ENV&&this.isTracing_!==Ol.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' was suspended and it will recompute on the next access."))},t.observe_=function(e,t){var n=this,r=!0,i=void 0;return function(e,t){var n,r,i,s;void 0===t&&(t=Lo);"production"!==process.env.NODE_ENV&&(Ho(e)||Co("Autorun expects a function as first argument"),xu(e)&&Co("Autorun does not accept actions since actions are untrackable"));var o,a=null!=(n=null==(r=t)?void 0:r.name)?n:"production"!==process.env.NODE_ENV?e.name||"Autorun@"+Go():"Autorun";if(t.scheduler||t.delay){var l=function(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:wu}(t),u=!1;o=new tu(a,function(){u||(u=!0,l(function(){u=!1,o.isDisposed||o.track(c)}))},t.onError,t.requiresObservable)}else o=new tu(a,function(){this.track(c)},t.onError,t.requiresObservable);function c(){e(o)}null!=(i=t)&&null!=(i=i.signal)&&i.aborted||o.schedule_();return o.getDisposer_(null==(s=t)?void 0:s.signal)}(function(){var s=n.get();if(!r||t){var o=zl();e({observableKind:"computed",debugObjectName:n.name_,type:Qu,object:n,newValue:s,oldValue:i}),Ll(o)}r=!1,i=s})},t.warnAboutUntrackedRead_=function(){"production"!==process.env.NODE_ENV&&(this.isTracing_!==Ol.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute."),("boolean"==typeof this.requiresReaction_?this.requiresReaction_:ql.computedRequiresReaction)&&console.warn("[mobx] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute."))},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return sa(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},ha(e,[{key:"isComputing",get:function(){return la(this.flags_,e.isComputingMask_)},set:function(t){this.flags_=ua(this.flags_,e.isComputingMask_,t)}},{key:"isRunningSetter",get:function(){return la(this.flags_,e.isRunningSetterMask_)},set:function(t){this.flags_=ua(this.flags_,e.isRunningSetterMask_,t)}},{key:"isBeingObserved",get:function(){return la(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=ua(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return la(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=ua(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return la(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=ua(this.flags_,e.diffValueMask_,1===t)}}])}();Tl.isComputingMask_=1,Tl.isRunningSetterMask_=2,Tl.isBeingObservedMask_=4,Tl.isPendingUnobservationMask_=8,Tl.diffValueMask_=16;var kl,Ol,Rl=Jo("ComputedValue",Tl);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(kl||(kl={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Ol||(Ol={}));var Cl=function(e){this.cause=void 0,this.cause=e};function Pl(e){return e instanceof Cl}function Ml(e){switch(e.dependenciesState_){case kl.UP_TO_DATE_:return!1;case kl.NOT_TRACKING_:case kl.STALE_:return!0;case kl.POSSIBLY_STALE_:for(var t=jl(!0),n=zl(),r=e.observing_,i=r.length,s=0;s<i;s++){var o=r[s];if(Rl(o)){if(ql.disableErrorBoundaries)o.get();else try{o.get()}catch(e){return Ll(n),Vl(t),!0}if(e.dependenciesState_===kl.STALE_)return Ll(n),Vl(t),!0}}return Ul(e),Ll(n),Vl(t),!1}}function Nl(e){if("production"!==process.env.NODE_ENV){var t=e.observers_.size>0;ql.allowStateChanges||!t&&"always"!==ql.enforceActions||console.warn("[MobX] "+(ql.enforceActions?"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ":"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ")+e.name_)}}function Il(e,t,n){var r=jl(!0);Ul(e),e.newObserving_=new Array(0===e.runId_?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++ql.runId;var i,s=ql.trackingDerivation;if(ql.trackingDerivation=e,ql.inBatch++,!0===ql.disableErrorBoundaries)i=t.call(n);else try{i=t.call(n)}catch(e){i=new Cl(e)}return ql.inBatch--,ql.trackingDerivation=s,function(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=kl.UP_TO_DATE_,i=0,s=e.unboundDepsCount_,o=0;o<s;o++){var a=n[o];0===a.diffValue&&(a.diffValue=1,i!==o&&(n[i]=a),i++),a.dependenciesState_>r&&(r=a.dependenciesState_)}n.length=i,e.newObserving_=null,s=t.length;for(;s--;){var l=t[s];0===l.diffValue&&Wl(l,e),l.diffValue=0}for(;i--;){var u=n[i];1===u.diffValue&&(u.diffValue=0,Hl(u,e))}r!==kl.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(e),function(e){if("production"===process.env.NODE_ENV)return;if(0!==e.observing_.length)return;("boolean"==typeof e.requiresObservable_?e.requiresObservable_:ql.reactionRequiresObservable)&&console.warn("[mobx] Derivation '"+e.name_+"' is created/updated without reading any observable value.")}(e),Vl(r),i}function Dl(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)Wl(t[n],e);e.dependenciesState_=kl.NOT_TRACKING_}function Fl(e){var t=zl();try{return e()}finally{Ll(t)}}function zl(){var e=ql.trackingDerivation;return ql.trackingDerivation=null,e}function Ll(e){ql.trackingDerivation=e}function jl(e){var t=ql.allowStateReads;return ql.allowStateReads=e,t}function Vl(e){ql.allowStateReads=e}function Ul(e){if(e.dependenciesState_!==kl.UP_TO_DATE_){e.dependenciesState_=kl.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=kl.UP_TO_DATE_}}var Bl=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},Gl=!0,$l=!1,ql=function(){var e=Mo();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Gl=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new Bl).version&&(Gl=!1),Gl?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Bl):(setTimeout(function(){$l||Co(35)},1),new Bl)}();function Hl(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function Wl(e,t){e.observers_.delete(t),0===e.observers_.size&&Zl(e)}function Zl(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,ql.pendingUnobservations.push(e))}function Kl(){ql.inBatch++}function Xl(){if(0===--ql.inBatch){iu();for(var e=ql.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers_.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof Tl&&n.suspend_())}ql.pendingUnobservations=[]}}function Yl(e){!function(e){"production"!==process.env.NODE_ENV&&!ql.allowStateReads&&ql.observableRequiresReaction&&console.warn("[mobx] Observable '"+e.name_+"' being read outside a reactive context.")}(e);var t=ql.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&ql.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(0===e.observers_.size&&ql.inBatch>0&&Zl(e),!1)}function Ql(e){e.lowestObserverState_!==kl.STALE_&&(e.lowestObserverState_=kl.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===kl.UP_TO_DATE_&&("production"!==process.env.NODE_ENV&&t.isTracing_!==Ol.NONE&&Jl(t,e),t.onBecomeStale_()),t.dependenciesState_=kl.STALE_}))}function Jl(e,t){if(console.log("[mobx.trace] '"+e.name_+"' is invalidated due to a change in: '"+t.name_+"'"),e.isTracing_===Ol.BREAK){var n=[];eu(Cu(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name_+"'\n\nYou are entering this break point because derivation '"+e.name_+"' is being traced and '"+t.name_+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof Tl?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}function eu(e,t,n){t.length>=1e3?t.push("(and many more)"):(t.push(""+"\t".repeat(n-1)+e.name),e.dependencies&&e.dependencies.forEach(function(e){return eu(e,t,n+1)}))}var tu=function(){function e(e,t,n,r){void 0===e&&(e="production"!==process.env.NODE_ENV?"Reaction@"+Go():"Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=kl.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=Ol.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,ql.pendingReactions.push(this),iu())},t.runReaction_=function(){if(!this.isDisposed){Kl(),this.isScheduled=!1;var e=ql.trackingContext;if(ql.trackingContext=this,Ml(this)){this.isTrackPending=!0;try{this.onInvalidate_(),"production"!==process.env.NODE_ENV&&this.isTrackPending&&au()&&lu({name:this.name_,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation_(e)}}ql.trackingContext=e,Xl()}},t.track=function(e){if(!this.isDisposed){Kl();var t,n=au();"production"!==process.env.NODE_ENV&&n&&(t=Date.now(),uu({name:this.name_,type:"reaction"})),this.isRunning=!0;var r=ql.trackingContext;ql.trackingContext=this;var i=Il(this,e,void 0);ql.trackingContext=r,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Dl(this),Pl(i)&&this.reportExceptionInDerivation_(i.cause),"production"!==process.env.NODE_ENV&&n&&hu({time:Date.now()-t}),Xl()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(ql.disableErrorBoundaries)throw e;var n="production"!==process.env.NODE_ENV?"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'":"[mobx] uncaught error in '"+this+"'";ql.suppressReactionErrors?"production"!==process.env.NODE_ENV&&console.warn("[mobx] (error in reaction '"+this.name_+"' suppressed, fix error of causing action below)"):console.error(n,e),"production"!==process.env.NODE_ENV&&au()&&lu({type:"error",name:this.name_,message:n,error:""+e}),ql.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(Kl(),Dl(this),Xl()))},t.getDisposer_=function(e){var t=this,n=function n(){t.dispose(),null==e||null==e.removeEventListener||e.removeEventListener("abort",n)};return null==e||null==e.addEventListener||e.addEventListener("abort",n),n[wa]=this,"dispose"in Symbol&&"symbol"==typeof Symbol.dispose&&(n[Symbol.dispose]=n),n},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),function(){if("production"===process.env.NODE_ENV)return;for(var e=!1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"boolean"==typeof n[n.length-1]&&(e=n.pop());var i=function(e){switch(e.length){case 0:return ql.trackingDerivation;case 1:return jc(e[0]);case 2:return jc(e[0],e[1])}}(n);if(!i)return Co("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");i.isTracing_===Ol.NONE&&console.log("[mobx.trace] '"+i.name_+"' tracing enabled");i.isTracing_=e?Ol.BREAK:Ol.LOG}(this,e)},ha(e,[{key:"isDisposed",get:function(){return la(this.flags_,e.isDisposedMask_)},set:function(t){this.flags_=ua(this.flags_,e.isDisposedMask_,t)}},{key:"isScheduled",get:function(){return la(this.flags_,e.isScheduledMask_)},set:function(t){this.flags_=ua(this.flags_,e.isScheduledMask_,t)}},{key:"isTrackPending",get:function(){return la(this.flags_,e.isTrackPendingMask_)},set:function(t){this.flags_=ua(this.flags_,e.isTrackPendingMask_,t)}},{key:"isRunning",get:function(){return la(this.flags_,e.isRunningMask_)},set:function(t){this.flags_=ua(this.flags_,e.isRunningMask_,t)}},{key:"diffValue",get:function(){return la(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=ua(this.flags_,e.diffValueMask_,1===t)}}])}();tu.isDisposedMask_=1,tu.isScheduledMask_=2,tu.isTrackPendingMask_=4,tu.isRunningMask_=8,tu.diffValueMask_=16;var nu=100,ru=function(e){return e()};function iu(){ql.inBatch>0||ql.isRunningReactions||ru(su)}function su(){ql.isRunningReactions=!0;for(var e=ql.pendingReactions,t=0;e.length>0;){++t===nu&&(console.error("production"!==process.env.NODE_ENV?"Reaction doesn't converge to a stable state after "+nu+" iterations. Probably there is a cycle in the reactive function: "+e[0]:"[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}ql.isRunningReactions=!1}var ou=Jo("Reaction",tu);function au(){return"production"!==process.env.NODE_ENV&&!!ql.spyListeners.length}function lu(e){if("production"!==process.env.NODE_ENV&&ql.spyListeners.length)for(var t=ql.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function uu(e){"production"!==process.env.NODE_ENV&&lu(fa({},e,{spyReportStart:!0}))}var cu={type:"report-end",spyReportEnd:!0};function hu(e){"production"!==process.env.NODE_ENV&&lu(e?fa({},e,{type:"report-end",spyReportEnd:!0}):cu)}var du="action",fu="autoAction",pu=Pa(du),gu=Pa("action.bound",{bound:!0}),mu=Pa(fu,{autoAction:!0}),_u=Pa("autoAction.bound",{autoAction:!0,bound:!0});function yu(e){return function(t,n){return Ho(t)?wl(t.name||"<unnamed action>",t,e):Ho(n)?wl(t,n,e):ba(n)?(e?mu:pu).decorate_20223_(t,n):Wo(n)?va(t,n,e?mu:pu):Wo(t)?ya(Pa(e?fu:du,{name:t,autoAction:e})):void("production"!==process.env.NODE_ENV&&Co("Invalid arguments for `action`"))}}var vu=yu(!1);Object.assign(vu,pu);var bu=yu(!0);function xu(e){return Ho(e)&&!0===e.isMobxAction}Object.assign(bu,mu),vu.bound=ya(gu),bu.bound=ya(_u);var wu=function(e){return e()};var Au="onBO",Eu="onBUO";function Su(e,t,n){return Tu(Eu,e,t,n)}function Tu(e,t,n,r){var i=jc(t),s=Ho(r)?r:n,o=e+"L";return i[o]?i[o].add(s):i[o]=new Set([s]),function(){var e=i[o];e&&(e.delete(s),0===e.size&&delete i[o])}}var ku="always";function Ou(e){!0===e.isolateGlobalState&&function(){if((ql.pendingReactions.length||ql.inBatch||ql.isRunningReactions)&&Co(36),$l=!0,Gl){var e=Mo();0===--e.__mobxInstanceCount&&(e.__mobxGlobals=void 0),ql=new Bl}}();var t,n,r=e.useProxies,i=e.enforceActions;if(void 0!==r&&(ql.useProxies=r===ku||"never"!==r&&"undefined"!=typeof Proxy),"ifavailable"===r&&(ql.verifyProxies=!0),void 0!==i){var s=i===ku?ku:"observed"===i;ql.enforceActions=s,ql.allowStateChanges=!0!==s&&s!==ku}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(t){t in e&&(ql[t]=!!e[t])}),ql.allowStateReads=!ql.observableRequiresReaction,"production"!==process.env.NODE_ENV&&!0===ql.disableErrorBoundaries&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),e.reactionScheduler&&(t=e.reactionScheduler,n=ru,ru=function(e){return t(function(){return n(e)})})}function Ru(e,t,n,r){"production"!==process.env.NODE_ENV&&(arguments.length>4&&Co("'extendObservable' expected 2-4 arguments"),"object"!=typeof e&&Co("'extendObservable' expects an object as first argument"),fc(e)&&Co("'extendObservable' should not be used on maps, use map.merge instead"),Ko(t)||Co("'extendObservable' only accepts plain objects as second argument"),(ju(t)||ju(n))&&Co("Extending an object with another observable (object) is not supported"));var i=aa(t);return Bc(function(){var t=wc(e,r)[wa];ra(i).forEach(function(e){t.extend_(e,i[e],!n||(!(e in n)||n[e]))})}),e}function Cu(e,t){return Pu(jc(e,t))}function Pu(e){var t,n={name:e.name_};return e.observing_&&e.observing_.length>0&&(n.dependencies=(t=e.observing_,Array.from(new Set(t))).map(Pu)),n}var Mu=0;function Nu(){this.message="FLOW_CANCELLED"}Nu.prototype=Object.create(Error.prototype);var Iu=Fa("flow"),Du=Fa("flow.bound",{bound:!0}),Fu=Object.assign(function(e,t){if(ba(t))return Iu.decorate_20223_(e,t);if(Wo(t))return va(e,t,Iu);"production"!==process.env.NODE_ENV&&1!==arguments.length&&Co("Flow expects single argument with generator function");var n=e,r=n.name||"<unnamed flow>",i=function(){var e,t=arguments,i=++Mu,s=vu(r+" - runid: "+i+" - init",n).apply(this,t),o=void 0,a=new Promise(function(t,n){var a=0;function l(e){var t;o=void 0;try{t=vu(r+" - runid: "+i+" - yield "+a++,s.next).call(s,e)}catch(e){return n(e)}c(t)}function u(e){var t;o=void 0;try{t=vu(r+" - runid: "+i+" - yield "+a++,s.throw).call(s,e)}catch(e){return n(e)}c(t)}function c(e){if(!Ho(null==e?void 0:e.then))return e.done?t(e.value):(o=Promise.resolve(e.value)).then(l,u);e.then(c,n)}e=n,l(void 0)});return a.cancel=vu(r+" - runid: "+i+" - cancel",function(){try{o&&zu(o);var t=s.return(void 0),n=Promise.resolve(t.value);n.then(qo,qo),zu(n),e(new Nu)}catch(t){e(t)}}),a};return i.isMobXFlow=!0,i},Iu);function zu(e){Ho(e.cancel)&&e.cancel()}function Lu(e){return!0===(null==e?void 0:e.isMobXFlow)}function ju(e){return"production"!==process.env.NODE_ENV&&1!==arguments.length&&Co("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"),function(e){return!!e&&(Sc(e)||!!e[wa]||Ea(e)||ou(e)||Rl(e))}(e)}function Vu(e,t){void 0===t&&(t=void 0),Kl();try{return e.apply(t)}finally{Xl()}}function Uu(e){return e[wa]}Fu.bound=ya(Du);var Bu={has:function(e,t){return"production"!==process.env.NODE_ENV&&ql.trackingDerivation&&Bo("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."),Uu(e).has_(t)},get:function(e,t){return Uu(e).get_(t)},set:function(e,t,n){var r;return!!Wo(t)&&("production"===process.env.NODE_ENV||Uu(e).values_.has(t)||Bo("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."),null==(r=Uu(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){var n;return"production"!==process.env.NODE_ENV&&Bo("delete properties from an observable object. Use 'remove' from 'mobx' instead."),!!Wo(t)&&(null==(n=Uu(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var r;return"production"!==process.env.NODE_ENV&&Bo("define property on an observable object. Use 'defineProperty' from 'mobx' instead."),null==(r=Uu(e).defineProperty_(t,n))||r},ownKeys:function(e){return"production"!==process.env.NODE_ENV&&ql.trackingDerivation&&Bo("iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead."),Uu(e).ownKeys_()},preventExtensions:function(e){Co(13)}};function Gu(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function $u(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),$o(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function qu(e,t){var n=zl();try{for(var r=[].concat(e.interceptors_||[]),i=0,s=r.length;i<s&&((t=r[i](t))&&!t.type&&Co(14),t);i++);return t}finally{Ll(n)}}function Hu(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function Wu(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),$o(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Zu(e,t){var n=zl(),r=e.changeListeners_;if(r){for(var i=0,s=(r=r.slice()).length;i<s;i++)r[i](t);Ll(n)}}var Ku=Symbol("mobx-keys");function Xu(e,t,n){return"production"!==process.env.NODE_ENV&&(Ko(e)||Ko(Object.getPrototypeOf(e))||Co("'makeAutoObservable' can only be used for classes that don't have a superclass"),Sc(e)&&Co("makeAutoObservable can only be used on objects not already made observable")),Ko(e)?Ru(e,e,t,n):(Bc(function(){var r=wc(e,n)[wa];if(!e[Ku]){var i=Object.getPrototypeOf(e),s=new Set([].concat(ra(e),ra(i)));s.delete("constructor"),s.delete(wa),Yo(i,Ku,s)}e[Ku].forEach(function(e){return r.make_(e,!t||(!(e in t)||t[e]))})}),e)}var Yu="splice",Qu="update",Ju={get:function(e,t){var n=e[wa];return t===wa?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?oa(nc,t)?nc[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var r=e[wa];return"length"===t&&r.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){Co(15)}},ec=function(){function e(e,t,n,r){void 0===e&&(e="production"!==process.env.NODE_ENV?"ObservableArray@"+Go():"ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new Aa(e),this.enhancer_=function(n,r){return t(n,r,"production"!==process.env.NODE_ENV?e+"[..]":"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return $u(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Wu(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||isNaN(e)||e<0)&&Co("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&Co(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&zc(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;Nl(this.atom_);var i=this.values_.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:null==t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=zo),Gu(this)){var s=qu(this,{object:this.proxy_,type:Yu,index:e,removedCount:t,added:n});if(!s)return zo;t=s.removedCount,n=s.added}if(n=0===n.length?n:n.map(function(e){return r.enhancer_(e,void 0)}),this.legacyMode_||"production"!==process.env.NODE_ENV){var o=n.length-t;this.updateArrayLength_(i,o)}var a=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,a),this.dehanceValues_(a)},t.spliceItemsIntoValues_=function(e,t,n){var r;if(n.length<1e4)return(r=this.values_).splice.apply(r,[e,t].concat(n));var i=this.values_.slice(e,e+t),s=this.values_.slice(e+t);this.values_.length+=n.length-t;for(var o=0;o<n.length;o++)this.values_[e+o]=n[o];for(var a=0;a<s.length;a++)this.values_[e+n.length+a]=s[a];return i},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&au(),i=Hu(this),s=i||r?{observableKind:"array",object:this.proxy_,type:Qu,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;"production"!==process.env.NODE_ENV&&r&&uu(s),this.atom_.reportChanged(),i&&Zu(this,s),"production"!==process.env.NODE_ENV&&r&&hu()},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&au(),i=Hu(this),s=i||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Yu,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;"production"!==process.env.NODE_ENV&&r&&uu(s),this.atom_.reportChanged(),i&&Zu(this,s),"production"!==process.env.NODE_ENV&&r&&hu()},t.get_=function(e){if(!(this.legacyMode_&&e>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("production"!==process.env.NODE_ENV?"[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX":"[mobx] Out of bounds read: "+e)},t.set_=function(e,t){var n=this.values_;if(this.legacyMode_&&e>n.length&&Co(17,e,n.length),e<n.length){Nl(this.atom_);var r=n[e];if(Gu(this)){var i=qu(this,{type:Qu,object:this.proxy_,index:e,newValue:t});if(!i)return;t=i.newValue}(t=this.enhancer_(t,r))!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else{for(var s=new Array(e+1-n.length),o=0;o<s.length-1;o++)s[o]=void 0;s[s.length-1]=t,this.spliceWithArray_(n.length,0,s)}},e}();function tc(e,t,n,r){return void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableArray@"+Go():"ObservableArray"),void 0===r&&(r=!1),Uo(),Bc(function(){var i=new ec(n,t,r,!1);Qo(i.values_,wa,i);var s=new Proxy(i.values_,Ju);return i.proxy_=s,e&&e.length&&i.spliceWithArray_(0,0,e),s})}var nc={clear:function(){return this.splice(0)},replace:function(e){var t=this[wa];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var s=this[wa];switch(arguments.length){case 0:return[];case 1:return s.spliceWithArray_(e);case 2:return s.spliceWithArray_(e,t)}return s.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){return this[wa].spliceWithArray_(e,t,n)},push:function(){for(var e=this[wa],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[wa].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[wa],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return ql.trackingDerivation&&Co(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){ql.trackingDerivation&&Co(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[wa],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function rc(e,t){"function"==typeof Array.prototype[e]&&(nc[e]=t(e))}function ic(e){return function(){var t=this[wa];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function sc(e){return function(t,n){var r=this,i=this[wa];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e](function(e,i){return t.call(n,e,i,r)})}}function oc(e){return function(){var t=this,n=this[wa];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){return i(e,n,r,t)},r[e].apply(r,arguments)}}rc("at",ic),rc("concat",ic),rc("flat",ic),rc("includes",ic),rc("indexOf",ic),rc("join",ic),rc("lastIndexOf",ic),rc("slice",ic),rc("toString",ic),rc("toLocaleString",ic),rc("toSorted",ic),rc("toSpliced",ic),rc("with",ic),rc("every",sc),rc("filter",sc),rc("find",sc),rc("findIndex",sc),rc("findLast",sc),rc("findLastIndex",sc),rc("flatMap",sc),rc("forEach",sc),rc("map",sc),rc("some",sc),rc("toReversed",sc),rc("reduce",oc),rc("reduceRight",oc);var ac=Jo("ObservableArrayAdministration",ec);function lc(e){return Zo(e)&&ac(e[wa])}var uc={},cc="add",hc="delete",dc=function(){function e(e,t,n){var r=this;void 0===t&&(t=ka),void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableMap@"+Go():"ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[wa]=uc,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,Ho(Map)||Co(18),Bc(function(){r.keysAtom_=Sa("production"!==process.env.NODE_ENV?r.name_+".keys()":"ObservableMap.keys()"),r.data_=new Map,r.hasMap_=new Map,e&&r.merge(e)})}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!ql.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new Sl(this.has_(e),Oa,"production"!==process.env.NODE_ENV?this.name_+"."+ia(e)+"?":"ObservableMap.key?",!1);this.hasMap_.set(e,r),Su(r,function(){return t.hasMap_.delete(e)})}return n.get()},t.set=function(e,t){var n=this.has_(e);if(Gu(this)){var r=qu(this,{type:n?Qu:cc,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((Nl(this.keysAtom_),Gu(this))&&!qu(this,{type:hc,object:this,name:e}))return!1;if(this.has_(e)){var n=au(),r=Hu(this),i=r||n?{observableKind:"map",debugObjectName:this.name_,type:hc,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return"production"!==process.env.NODE_ENV&&n&&uu(i),Vu(function(){var n;t.keysAtom_.reportChanged(),null==(n=t.hasMap_.get(e))||n.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),r&&Zu(this,i),"production"!==process.env.NODE_ENV&&n&&hu(),!0}return!1},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==ql.UNCHANGED){var r=au(),i=Hu(this),s=i||r?{observableKind:"map",debugObjectName:this.name_,type:Qu,object:this,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&uu(s),n.setNewValue_(t),i&&Zu(this,s),"production"!==process.env.NODE_ENV&&r&&hu()}},t.addValue_=function(e,t){var n=this;Nl(this.keysAtom_),Vu(function(){var r,i=new Sl(t,n.enhancer_,"production"!==process.env.NODE_ENV?n.name_+"."+ia(e):"ObservableMap.key",!1);n.data_.set(e,i),t=i.value_,null==(r=n.hasMap_.get(e))||r.setNewValue_(!0),n.keysAtom_.reportChanged()});var r=au(),i=Hu(this),s=i||r?{observableKind:"map",debugObjectName:this.name_,type:cc,object:this,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&uu(s),i&&Zu(this,s),"production"!==process.env.NODE_ENV&&r&&hu()},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return pc({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},t.entries=function(){var e=this,t=this.keys();return pc({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(e,t){for(var n,r=da(this);!(n=r()).done;){var i=n.value,s=i[0],o=i[1];e.call(t,o,s,this)}},t.merge=function(e){var t=this;return fc(e)&&(e=new Map(e)),Vu(function(){var n,r,i;Ko(e)?function(e){var t=Object.keys(e);if(!na)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter(function(t){return Fo.propertyIsEnumerable.call(e,t)})):t}(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)}):ea(e)?(n=e,r=Object.getPrototypeOf(n),i=Object.getPrototypeOf(r),null!==Object.getPrototypeOf(i)&&Co(19,e),e.forEach(function(e,n){return t.set(n,e)})):null!=e&&Co(20,e)}),this},t.clear=function(){var e=this;Vu(function(){Fl(function(){for(var t,n=da(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.replace=function(e){var t=this;return Vu(function(){for(var n,r=function(e){if(ea(e)||fc(e))return e;if(Array.isArray(e))return new Map(e);if(Ko(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return Co(21,e)}(e),i=new Map,s=!1,o=da(t.data_.keys());!(n=o()).done;){var a=n.value;if(!r.has(a))if(t.delete(a))s=!0;else{var l=t.data_.get(a);i.set(a,l)}}for(var u,c=da(r.entries());!(u=c()).done;){var h=u.value,d=h[0],f=h[1],p=t.data_.has(d);if(t.set(d,f),t.data_.has(d)){var g=t.data_.get(d);i.set(d,g),p||(s=!0)}}if(!s)if(t.data_.size!==i.size)t.keysAtom_.reportChanged();else for(var m=t.data_.keys(),_=i.keys(),y=m.next(),v=_.next();!y.done;){if(y.value!==v.value){t.keysAtom_.reportChanged();break}y=m.next(),v=_.next()}t.data_=i}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Co("`observe` doesn't support fireImmediately=true in combination with maps."),Wu(this,e)},t.intercept_=function(e){return $u(this,e)},ha(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),fc=Jo("ObservableMap",dc);function pc(e){return e[Symbol.toStringTag]="MapIterator",Kc(e)}var gc={},mc=function(){function e(e,t,n){var r=this;void 0===t&&(t=ka),void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableSet@"+Go():"ObservableSet"),this.name_=void 0,this[wa]=gc,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,Ho(Set)||Co(22),this.enhancer_=function(e,r){return t(e,r,n)},Bc(function(){r.atom_=Sa(r.name_),e&&r.replace(e)})}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;Vu(function(){Fl(function(){for(var t,n=da(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.forEach=function(e,t){for(var n,r=da(this);!(n=r()).done;){var i=n.value;e.call(t,i,i,this)}},t.add=function(e){var t=this;if(Nl(this.atom_),Gu(this)){var n=qu(this,{type:cc,object:this,newValue:e});if(!n)return this;e=n.newValue}if(!this.has(e)){Vu(function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var r="production"!==process.env.NODE_ENV&&au(),i=Hu(this),s=i||r?{observableKind:"set",debugObjectName:this.name_,type:cc,object:this,newValue:e}:null;r&&"production"!==process.env.NODE_ENV&&uu(s),i&&Zu(this,s),r&&"production"!==process.env.NODE_ENV&&hu()}return this},t.delete=function(e){var t=this;if(Gu(this)&&!qu(this,{type:hc,object:this,oldValue:e}))return!1;if(this.has(e)){var n="production"!==process.env.NODE_ENV&&au(),r=Hu(this),i=r||n?{observableKind:"set",debugObjectName:this.name_,type:hc,object:this,oldValue:e}:null;return n&&"production"!==process.env.NODE_ENV&&uu(i),Vu(function(){t.atom_.reportChanged(),t.data_.delete(e)}),r&&Zu(this,i),n&&"production"!==process.env.NODE_ENV&&hu(),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=this.values();return yc({next:function(){var t=e.next(),n=t.value,r=t.done;return r?{value:void 0,done:r}:{value:[n,n],done:r}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=this.data_.values();return yc({next:function(){var n=t.next(),r=n.value,i=n.done;return i?{value:void 0,done:i}:{value:e.dehanceValue_(r),done:i}}})},t.intersection=function(e){return ta(e)&&!_c(e)?e.intersection(this):new Set(this).intersection(e)},t.union=function(e){return ta(e)&&!_c(e)?e.union(this):new Set(this).union(e)},t.difference=function(e){return new Set(this).difference(e)},t.symmetricDifference=function(e){return ta(e)&&!_c(e)?e.symmetricDifference(this):new Set(this).symmetricDifference(e)},t.isSubsetOf=function(e){return new Set(this).isSubsetOf(e)},t.isSupersetOf=function(e){return new Set(this).isSupersetOf(e)},t.isDisjointFrom=function(e){return ta(e)&&!_c(e)?e.isDisjointFrom(this):new Set(this).isDisjointFrom(e)},t.replace=function(e){var t=this;return _c(e)&&(e=new Set(e)),Vu(function(){Array.isArray(e)||ta(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&Co("Cannot initialize set from "+e)}),this},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Co("`observe` doesn't support fireImmediately=true in combination with sets."),Wu(this,e)},t.intercept_=function(e){return $u(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Symbol.iterator]=function(){return this.values()},ha(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),_c=Jo("ObservableSet",mc);function yc(e){return e[Symbol.toStringTag]="SetIterator",Kc(e)}var vc=Object.create(null),bc="remove",xc=function(){function e(e,t,n,r){void 0===t&&(t=new Map),void 0===r&&(r=Xa),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.keysAtom_=new Aa("production"!==process.env.NODE_ENV?this.name_+".keys":"ObservableObject.keys"),this.isPlainObject_=Ko(this.target_),"production"===process.env.NODE_ENV||Yc(this.defaultAnnotation_)||Co("defaultAnnotation must be valid annotation"),"production"!==process.env.NODE_ENV&&(this.appliedAnnotations_={})}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof Tl)return n.set(t),!0;if(Gu(this)){var r=qu(this,{type:Qu,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==ql.UNCHANGED){var i=Hu(this),s="production"!==process.env.NODE_ENV&&au(),o=i||s?{type:Qu,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&s&&uu(o),n.setNewValue_(t),i&&Zu(this,o),"production"!==process.env.NODE_ENV&&s&&hu()}return!0},t.get_=function(e){return ql.trackingDerivation&&!oa(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),oa(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!ql.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Sl(e in this.target_,Oa,"production"!==process.env.NODE_ENV?this.name_+"."+ia(e)+"?":"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(!0===t&&(t=this.defaultAnnotation_),!1!==t){if(kc(this,t,e),!(e in this.target_)){var n;if(null!=(n=this.target_[_a])&&n[e])return;Co(1,t.annotationType_,this.name_+"."+e.toString())}for(var r=this.target_;r&&r!==Fo;){var i=Io(r,e);if(i){var s=t.make_(this,e,i,r);if(0===s)return;if(1===s)break}r=Object.getPrototypeOf(r)}Tc(this,t,e)}},t.extend_=function(e,t,n,r){if(void 0===r&&(r=!1),!0===n&&(n=this.defaultAnnotation_),!1===n)return this.defineProperty_(e,t,r);kc(this,n,e);var i=n.extend_(this,e,t,r);return i&&Tc(this,n,e),i},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1),Nl(this.keysAtom_);try{Kl();var r=this.delete_(e);if(!r)return r;if(Gu(this)){var i=qu(this,{object:this.proxy_||this.target_,name:e,type:cc,newValue:t.value});if(!i)return null;var s=i.newValue;t.value!==s&&(t=fa({},t,{value:s}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else Do(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{Xl()}return!0},t.defineObservableProperty_=function(e,t,n,r){void 0===r&&(r=!1),Nl(this.keysAtom_);try{Kl();var i=this.delete_(e);if(!i)return i;if(Gu(this)){var s=qu(this,{object:this.proxy_||this.target_,name:e,type:cc,newValue:t});if(!s)return null;t=s.newValue}var o=Ec(e),a={configurable:!ql.safeDescriptors||this.isPlainObject_,enumerable:!0,get:o.get,set:o.set};if(r){if(!Reflect.defineProperty(this.target_,e,a))return!1}else Do(this.target_,e,a);var l=new Sl(t,n,"production"!==process.env.NODE_ENV?this.name_+"."+e.toString():"ObservableObject.key",!1);this.values_.set(e,l),this.notifyPropertyAddition_(e,l.value_)}finally{Xl()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1),Nl(this.keysAtom_);try{Kl();var r=this.delete_(e);if(!r)return r;if(Gu(this))if(!qu(this,{object:this.proxy_||this.target_,name:e,type:cc,newValue:void 0}))return null;t.name||(t.name="production"!==process.env.NODE_ENV?this.name_+"."+e.toString():"ObservableObject.key"),t.context=this.proxy_||this.target_;var i=Ec(e),s={configurable:!ql.safeDescriptors||this.isPlainObject_,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,s))return!1}else Do(this.target_,e,s);this.values_.set(e,new Tl(t)),this.notifyPropertyAddition_(e,void 0)}finally{Xl()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),Nl(this.keysAtom_),!oa(this.target_,e))return!0;if(Gu(this)&&!qu(this,{object:this.proxy_||this.target_,name:e,type:bc}))return null;try{var n;Kl();var r,i=Hu(this),s="production"!==process.env.NODE_ENV&&au(),o=this.values_.get(e),a=void 0;if(!o&&(i||s))a=null==(r=Io(this.target_,e))?void 0:r.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if("production"!==process.env.NODE_ENV&&delete this.appliedAnnotations_[e],o&&(this.values_.delete(e),o instanceof Sl&&(a=o.value_),Ql(o)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(e in this.target_),i||s){var l={type:bc,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:a,name:e};"production"!==process.env.NODE_ENV&&s&&uu(l),i&&Zu(this,l),"production"!==process.env.NODE_ENV&&s&&hu()}}finally{Xl()}return!0},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Co("`observe` doesn't support the fire immediately property for observable objects."),Wu(this,e)},t.intercept_=function(e){return $u(this,e)},t.notifyPropertyAddition_=function(e,t){var n,r=Hu(this),i="production"!==process.env.NODE_ENV&&au();if(r||i){var s=r||i?{type:cc,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&uu(s),r&&Zu(this,s),"production"!==process.env.NODE_ENV&&i&&hu()}null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),ra(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function wc(e,t){var n;if("production"!==process.env.NODE_ENV&&t&&Sc(e)&&Co("Options can't be provided for already observable objects."),oa(e,wa))return"production"===process.env.NODE_ENV||Vc(e)instanceof xc||Co("Cannot convert '"+Uc(e)+"' into observable object:\nThe target is already observable of different type.\nExtending builtins is not supported."),e;"production"===process.env.NODE_ENV||Object.isExtensible(e)||Co("Cannot make the designated object observable; it is not extensible");var r=null!=(n=null==t?void 0:t.name)?n:"production"!==process.env.NODE_ENV?(Ko(e)?"ObservableObject":e.constructor.name)+"@"+Go():"ObservableObject",i=new xc(e,new Map,String(r),function(e){var t;return e?null!=(t=e.defaultDecorator)?t:Ya(e):void 0}(t));return Yo(e,wa,i),e}var Ac=Jo("ObservableObjectAdministration",xc);function Ec(e){return vc[e]||(vc[e]={get:function(){return this[wa].getObservablePropValue_(e)},set:function(t){return this[wa].setObservablePropValue_(e,t)}})}function Sc(e){return!!Zo(e)&&Ac(e[wa])}function Tc(e,t,n){var r;"production"!==process.env.NODE_ENV&&(e.appliedAnnotations_[n]=t),null==(r=e.target_[_a])||delete r[n]}function kc(e,t,n){if("production"===process.env.NODE_ENV||Yc(t)||Co("Cannot annotate '"+e.name_+"."+n.toString()+"': Invalid annotation."),"production"!==process.env.NODE_ENV&&!Ca(t)&&oa(e.appliedAnnotations_,n)){var r=e.name_+"."+n.toString(),i=e.appliedAnnotations_[n].annotationType_;Co("Cannot apply '"+t.annotationType_+"' to '"+r+"':\nThe field is already annotated with '"+i+"'.\nRe-annotating fields is not allowed.\nUse 'override' annotation for methods overridden by subclass.")}}var Oc,Rc,Cc=Dc(0),Pc=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,!1===e}(),Mc=0,Nc=function(){};Oc=Nc,Rc=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Oc.prototype,Rc):void 0!==Oc.prototype.__proto__?Oc.prototype.__proto__=Rc:Oc.prototype=Rc;var Ic=function(e){function t(t,n,r,i){var s;return void 0===r&&(r="production"!==process.env.NODE_ENV?"ObservableArray@"+Go():"ObservableArray"),void 0===i&&(i=!1),s=e.call(this)||this,Bc(function(){var e=new ec(r,n,i,!0);e.proxy_=s,Qo(s,wa,e),t&&t.length&&s.spliceWithArray(0,0,t),Pc&&Object.defineProperty(s,"0",Cc)}),s}pa(t,e);var n=t.prototype;return n.concat=function(){this[wa].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map(function(e){return lc(e)?e.slice():e}))},n[Symbol.iterator]=function(){var e=this,t=0;return Kc({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},ha(t,[{key:"length",get:function(){return this[wa].getArrayLength_()},set:function(e){this[wa].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(Nc);function Dc(e){return{enumerable:!1,configurable:!0,get:function(){return this[wa].get_(e)},set:function(t){this[wa].set_(e,t)}}}function Fc(e){Do(Ic.prototype,""+e,Dc(e))}function zc(e){if(e>Mc){for(var t=Mc;t<e+100;t++)Fc(t);Mc=e}}function Lc(e,t,n){return new Ic(e,t,n)}function jc(e,t){if("object"==typeof e&&null!==e){if(lc(e))return void 0!==t&&Co(23),e[wa].atom_;if(_c(e))return e.atom_;if(fc(e)){if(void 0===t)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||Co(25,t,Uc(e)),n}if(Sc(e)){if(!t)return Co(26);var r=e[wa].values_.get(t);return r||Co(27,t,Uc(e)),r}if(Ea(e)||Rl(e)||ou(e))return e}else if(Ho(e)&&ou(e[wa]))return e[wa];Co(28)}function Vc(e,t){return e||Co(29),Ea(e)||Rl(e)||ou(e)||fc(e)||_c(e)?e:e[wa]?e[wa]:void Co(24,e)}function Uc(e,t){var n;if(void 0!==t)n=jc(e,t);else{if(xu(e))return e.name;n=Sc(e)||fc(e)||_c(e)?Vc(e):jc(e)}return n.name_}function Bc(e){var t=zl(),n=Al(!0);Kl();try{return e()}finally{Xl(),El(n),Ll(t)}}Object.entries(nc).forEach(function(e){var t=e[0],n=e[1];"concat"!==t&&Yo(Ic.prototype,t,n)}),zc(1e3);var Gc,$c=Fo.toString;function qc(e,t,n){return void 0===n&&(n=-1),Hc(e,t,n)}function Hc(e,t,n,r,i){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var s=typeof e;if("function"!==s&&"object"!==s&&"object"!=typeof t)return!1;var o=$c.call(e);if(o!==$c.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0===+e?1/+e==1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++}e=Wc(e),t=Wc(t);var a="[object Array]"===o;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var l=e.constructor,u=t.constructor;if(l!==u&&!(Ho(l)&&l instanceof l&&Ho(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),i=i||[];for(var c=(r=r||[]).length;c--;)if(r[c]===e)return i[c]===t;if(r.push(e),i.push(t),a){if((c=e.length)!==t.length)return!1;for(;c--;)if(!Hc(e[c],t[c],n-1,r,i))return!1}else{var h=Object.keys(e),d=h.length;if(Object.keys(t).length!==d)return!1;for(var f=0;f<d;f++){var p=h[f];if(!oa(t,p)||!Hc(e[p],t[p],n-1,r,i))return!1}}return r.pop(),i.pop(),!0}function Wc(e){return lc(e)?e.slice():ea(e)||fc(e)||ta(e)||_c(e)?Array.from(e.entries()):e}var Zc=(null==(Gc=Mo().Iterator)?void 0:Gc.prototype)||{};function Kc(e){return e[Symbol.iterator]=Xc,Object.assign(Object.create(Zc),e)}function Xc(){return this}function Yc(e){return e instanceof Object&&"string"==typeof e.annotationType_&&Ho(e.make_)&&Ho(e.extend_)}["Symbol","Map","Set"].forEach(function(e){void 0===Mo()[e]&&Co("MobX requires global '"+e+"' to be available or polyfilled")}),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return"production"===process.env.NODE_ENV?(console.warn("[mobx.spy] Is a no-op in production builds"),function(){}):(ql.spyListeners.push(e),$o(function(){ql.spyListeners=ql.spyListeners.filter(function(t){return t!==e})}))},extras:{getDebugName:Uc},$mobx:wa});class Qc{constructor(){Xu(this)}_visible=fl.map();getIsVisible(e){return this._visible.get(e)??!1}_setVisible({name:e,value:t}){this._visible.set(e,t)}openModal(e){this._setVisible({name:e,value:!0})}closeModal(e){this._setVisible({name:e,value:!1})}closeAllModals(){this._visible.clear()}}const Jc=new Qc;class eh{constructor(){Xu(this)}_isUnauthorized=!1;get isUnauthorized(){return this._isUnauthorized}set isUnauthorized(e){this._isUnauthorized=e}}const th=new eh;class nh{authStore=th;modalStore=Jc}const rh=new nh,ih=n.createContext(rh),sh=({children:t})=>e(ih.Provider,{value:rh,children:t});class oh{client;constructor(e){this.client=te.create({baseURL:e,timeout:1e4,headers:{"Content-Type":"application/json"}}),this.setupInterceptors()}setupInterceptors(){this.client.interceptors.request.use(e=>(rh.authStore.isUnauthorized=!1,e),e=>(So({message:e.message,variant:"error"}),Promise.reject(e))),this.client.interceptors.response.use(e=>e,e=>(So({message:e.message,variant:"error"}),401===e.status&&(rh.authStore.isUnauthorized=!0),Promise.reject(e)))}async get({url:e,config:t}){return(await this.client.get(e,t)).data}async post({url:e,body:t,config:n}){return(await this.client.post(e,t,n)).data}async put({url:e,body:t,config:n}){return(await this.client.put(e,t,n)).data}async patch({url:e,body:t,config:n}){return(await this.client.patch(e,t,n)).data}async delete({url:e,config:t}){return(await this.client.delete(e,t)).data}}const ah=e=>new oh(e);class lh{configOptions;_apiService;get apiService(){return this._apiService}static _instance=null;static get instance(){if(!lh._instance)throw new Error("Dartcom Config не инициализирован с приватным ключом. Вызовите Config.initialize(...) первым, чтобы иметь возможность пользоваться компонентами нашей библиотеки");return lh._instance}static initialize(e){lh._instance||(lh._instance=new lh(e))}static deactivate(){this._instance=null}constructor(e){this.configOptions=e,this._apiKey=e.apiKey,this._apiService=ah(e.backendUrl),this._getCheckKeyData().then(t=>{if(t){const{valid:n}=t;e.onCheck?.(t),this._isValidApiKey=n}})}_apiKey="";get apiKey(){return this._apiKey}_isValidApiKey=!1;get isValidApiKey(){return this._isValidApiKey}async _getCheckKeyData(){const e=await this._apiService.get({url:"check_tile_token",config:{params:{tile_token:this._apiKey}}}).then(e=>e).catch(e=>{const{response:t,message:n}=e;if(this.configOptions.onError?.(e),t){const{data:{detail:e}}=t;return e}return{reason:n,valid:!1}});return e}}const uh={valid:"18c38ab326d12f428e90be50a5141fc8949de497df7f7e0c1796d58e99d006f3",dateExpired:"8cbc5e15e61e649daf57c3a08422ae372c101afb4759036a3864a9fa588ef717",off:"b1520018920b33a4c1f8100c4f3bb3eb93661db829faa99c9cd75537f6300ba9",invalid:"abcdefghijklmnopqrstuvwxyz0123456789"};const ch=new class{constructor(){}log({message:e,context:t,meta:n}){console.log(t,e,n)}warn({message:e,context:t,meta:n}){console.warn(t,e,n)}error({message:e,context:t,meta:n}){console.error(t,e,n)}};var hh,dh;!function(e){e.GET="GET",e.DELETE="DELETE",e.PUT="PUT",e.POST="POST"}(hh||(hh={})),function(e){e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e.TOP_LEFT="top-left"}(dh||(dh={}));const fh="https://dalganmap.ru/api";var ph,gh;!function(e){e.ONE_WAY='"OneWay"',e.POINT_ADDRESS='"PointAddress"',e.BUILDING_AREA='"MapBuildingECArea"',e.BUILTUP_AREA='"MapAdminBuiltupArea"',e.ADMIN_AREA='"MapAdminArea"',e.OCEAN_AREA='"MapOceanArea"',e.OCEAN_AREA_LABEL='"MapOceanAreaLabel"',e.FACILITY_AREA='"MapFacilityArea"',e.FACILITY_AREA_LABEL='"MapFacilityAreaLabel"',e.LANDUSE_AREA='"MapLanduseArea"',e.LANDUSE_AREA_LABEL='"MapLanduseAreaLabel"',e.NATURE_FIELD='"MapNatureField"',e.NATURE_FOREST='"MapNatureForest"',e.LINK='"Link"',e.RAILROAD_LINK='"MapRailroadLink"',e.WATER_LINK='"MapWaterLink"',e.WATER_AREA='"MapWaterArea"',e.WATER_AREA_LABEL='"MapWaterAreaLabel"',e.WATER_LAKE_LABEL='"MapWaterLakeLabel"',e.POI='"POI"',e.CITY_POI='"CityPOI"',e.CONDITIONS='"Conditions"',e.ROAD_POLY='"RoadPoly"',e.PARKING_LINE='"ParkingLine"',e.LINE_MARKING_LINE='"LaneMarkingLine"',e.LINE_MARKING_POLY='"LaneMarkingPoly"',e.TRAFFIC_SIGN='"TrafficSign"',e.TRAFFIC_SIGNAL='"TrafficSignal"',e.CAMERA='"Camera"',e.PILLAR='"Pillar"'}(ph||(ph={})),function(e){e.TILE="tile",e.NATURE_TILE="nature_tile",e.MSK="msk"}(gh||(gh={}));const mh=256,_h="https://dalganmap.ru/api-image/images",yh={[gh.TILE]:`${fh}/tiles/get_tile/{z}/{x}/{y}.mvt`,[gh.NATURE_TILE]:`${fh}/tiles/get_nature_tile/{z}/{x}/{y}.mvt`,[gh.MSK]:"http://89.108.118.23:3070/tiles/get_tile/{z}/{x}/{y}.mvt"},vh=e=>{const t=[],n={source:e,layer:ph.ROAD_POLY},r={id:ko(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'Road';\n\n return isFilter;\n }",draw:{polygons:{color:"#BABCC2"}}},i={id:ko(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'Tram';\n\n return isFilter;\n }",draw:{polygons:{color:"#ADA8A8"}}},s={id:ko(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'Curb';\n\n return isFilter;\n }",draw:{polygons:{color:"#D2D9E6"}}},o={id:ko(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'Bridge';\n\n return isFilter;\n }",draw:{polygons:{color:"#E1DFDD"}}};return t.push(r,i,s,o),t},bh=e=>{const t=[],n={source:e,layer:ph.LINE_MARKING_POLY},r={id:ko(),data:n,filter:"function() {\n const { poly_number } = feature;\n\n const isFilter = poly_number === '1.14.1';\n\n return isFilter;\n }",draw:{styles:{zebra_crossing:{attributes:{a_angle:"function() {\n return feature.angle;\n }"}}}}},i={id:ko(),data:n,filter:"function() {\n const { poly_number } = feature;\n\n const isFilter = poly_number === '1.18';\n\n return isFilter;\n }",draw:{polygons:{color:"white"}}};return t.push(i,r),t},xh=e=>{const t=[],n={source:e,layer:ph.LINE_MARKING_LINE},r="white",i=.5,s={id:ko(),data:n,sublayers:{1.1:{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.1';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i}}},1.5:{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.5';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,dash:[4,10]}}},1.6:{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.6';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,dash:[5,5]}}},"1.16.1":{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.16.1';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i}}},1.7:{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.7';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,dash:[4,10]}}},"1.7-blue":{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.7blue';\n\n return isFilter;\n }",draw:{lines:{color:"blue",width:i,dash:[4,10]}}},"1.14.3":{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.14.3';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,dash:[3,8]}}},1.12:{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.12';\n\n return isFilter;\n }",draw:{lines:{color:r,width:1.5}}},"1.17.1":{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.17.1';\n\n return isFilter;\n }",draw:{lines:{color:"yellow",width:i}}},1.26:{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.26';\n\n return isFilter;\n }",draw:{lines:{color:"yellow",width:i}}}}},o={"1.3-left":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.3';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,offset:-.5}}},"1.3-right":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.3';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,offset:i}}},"1.11r-left":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11r';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,offset:-.5}}},"1.11r-right":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11r';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,offset:i,dash:[5,5]}}},"1.11l-left":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11l';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,offset:-.5,dash:[5,5]}}},"1.11l-right":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11l';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,offset:i}}},"1.25-left":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.25';\n\n return isFilter;\n }",draw:{lines:{color:r,width:1,offset:-.5,dash:[1,1],dash_background_color:[0,0,0,0]}}},"1.25-right":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.25';\n\n return isFilter;\n }",draw:{lines:{color:"rgba(0,0,0,0)",width:1,offset:.5,dash:[1,1],dash_background_color:[1,1,1]}}}};return t.push(s,...Object.values(o)),t},wh=e=>{const t=[],n={source:e,layer:ph.PARKING_LINE},r={id:ko(),data:n,draw:{lines:{color:"white",width:1}}};return t.push(r),t},Ah={tsodd_id:0,dit_id:0},Eh=["future_maintanance_date","placement_date","rapair_performed_date","verification_date","warranty_expr_date"],Sh={future_maintanance_date:new Date,placement_date:new Date,rapair_performed_date:new Date,verification_date:new Date,warranty_expr_date:new Date},Th={future_maintanance_date:(new Date).toISOString(),placement_date:(new Date).toISOString(),rapair_performed_date:(new Date).toISOString(),verification_date:(new Date).toISOString(),warranty_expr_date:(new Date).toISOString()};var kh;!function(e){e.ACTIVE="Действующий",e.INACTIVE="Недействующий",e.TEMPORARY="Временный"}(kh||(kh={}));const Oh=Object.values(kh).map(e=>({label:e,value:e})),Rh={traffic_signal_id:"",traffic_sign_id:"",camera_id:"",dit_id:"",dop_id:"",tsodd_id:"",pillar_id:"",dops:"",signal_model:"Модель",comment:"Комментарий",direction:"Направление",status:"Статус",traffic_sign_number:"Номер знака",traffic_sign_title:"Название знака",traffic_sign_value:"Значение",traffic_sign_type:"Тип знака",lat:"Широта",lon:"Долгота",future_maintanance_date:"Дата следующего обслуживания",placement_date:"Дата установки",rapair_performed_date:"Дата последнего ремонта",verification_date:"Дата поверки",warranty_expr_date:"Дата окончания гарантии",dop_sign_number:"Номер знака",dop_sign_text:"Текст на табличке",dop_sign_title:"Название знака",camera_model:"Модель",fixing_type:"Тип"},Ch="dd.MM.yyyy";var Ph,Mh;var Nh,Ih,Dh=function(){if(Mh)return Ph;function e(e){this._maxSize=e,this.clear()}Mh=1,e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(e){return this._values[e]},e.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,s=/^\s*(['"]?)(.*?)(\1)\s*$/,o=new e(512),a=new e(512),l=new e(512);function u(e){return o.get(e)||o.set(e,c(e).map(function(e){return e.replace(s,"$2")}))}function c(e){return e.match(t)||[""]}function h(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function d(e){return!h(e)&&(function(e){return e.match(r)&&!e.match(n)}(e)||function(e){return i.test(e)}(e))}return Ph={Cache:e,split:c,normalizePath:u,setter:function(e){var t=u(e);return a.get(e)||a.set(e,function(e,n){for(var r=0,i=t.length,s=e;r<i-1;){var o=t[r];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;s=s[t[r++]]}s[t[r]]=n})},getter:function(e,t){var n=u(e);return l.get(e)||l.set(e,function(e){for(var r=0,i=n.length;r<i;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(h(t)||n.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,i,s,o,a=e.length;for(i=0;i<a;i++)(r=e[i])&&(d(r)&&(r='"'+r+'"'),s=!(o=h(r))&&/^\d+$/.test(r),t.call(n,r,o,s,i,e))}(Array.isArray(e)?e:c(e),t,n)}},Ph}();var Fh,zh=function(){if(Ih)return Nh;Ih=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=t=>t.match(e)||[],n=e=>e[0].toUpperCase()+e.slice(1),r=(e,n)=>t(e).join(n).toLowerCase(),i=e=>t(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,"");return Nh={words:t,upperFirst:n,camelCase:i,pascalCase:e=>n(i(e)),snakeCase:e=>r(e,"_"),kebabCase:e=>r(e,"-"),sentenceCase:e=>n(r(e," ")),titleCase:e=>t(e).map(n).join(" ")}}(),Lh={exports:{}};var jh=function(){if(Fh)return Lh.exports;function e(e,t){var n=e.length,r=new Array(n),i={},s=n,o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!a.has(e[0])||!a.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(e,t,s){if(s.has(e)){var u;try{u=", node was:"+JSON.stringify(e)}catch(e){u=""}throw new Error("Cyclic dependency"+u)}if(!a.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var c=o.get(e)||new Set;if(t=(c=Array.from(c)).length){s.add(e);do{var h=c[--t];l(h,a.get(h),s)}while(t);s.delete(e)}r[--n]=e}}}return Fh=1,Lh.exports=function(t){return e(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(t),t)},Lh.exports.array=e,Lh.exports}(),Vh=Ii(jh);const Uh=Object.prototype.toString,Bh=Error.prototype.toString,Gh=RegExp.prototype.toString,$h="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",qh=/^Symbol\((.*)\)(.*)$/;function Hh(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return $h.call(e).replace(qh,"Symbol($1)");const r=Uh.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+Bh.call(e)+"]":"RegExp"===r?Gh.call(e):null}function Wh(e,t){let n=Hh(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=Hh(this[e],t);return null!==r?r:n},2)}function Zh(e){return null==e?[]:[].concat(e)}let Kh,Xh,Yh,Qh=/\$\{\s*(\w+)\s*\}/g;Kh=Symbol.toStringTag;class Jh{constructor(e,t,n,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Kh]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],Zh(e).forEach(e=>{if(ed.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Xh=Symbol.hasInstance,Yh=Symbol.toStringTag;class ed extends Error{static formatError(e,t){const n=t.label||t.path||"this";return t=Object.assign({},t,{path:n,originalPath:t.path}),"string"==typeof e?e.replace(Qh,(e,n)=>Wh(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r,i){const s=new Jh(e,t,n,r);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Yh]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ed)}static[Xh](e){return Jh[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let td={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=null!=r&&r!==n?` (cast from the value \`${Wh(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${Wh(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Wh(n,!0)}\``+i}},nd={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},rd={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},id={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},sd={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},od={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},ad={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Wh(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Wh(n,!0)}\``}return ed.formatError(td.notType,e)}};Object.assign(Object.create(null),{mixed:td,string:nd,number:rd,date:id,object:sd,array:od,boolean:{isValue:"${path} field must be ${value}"},tuple:ad});const ld=e=>e&&e.__isYupSchema__;class ud{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,s="function"==typeof n?n:(...e)=>e.every(e=>e===n);return new ud(e,(e,t)=>{var n;let o=s(...e)?r:i;return null!=(n=null==o?void 0:o(t))?n:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn(n,e,t);if(void 0===r||r===e)return e;if(!ld(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}const cd="$",hd=".";class dd{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===cd,this.isValue=this.key[0]===hd,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?cd:this.isValue?hd:"";this.path=this.key.slice(n.length),this.getter=this.path&&Dh.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}dd.prototype.__isYupRef=!0;const fd=e=>null==e;function pd(e){function t({value:t,path:n="",options:r,originalValue:i,schema:s},o,a){const{name:l,test:u,params:c,message:h,skipAbsent:d}=e;let{parent:f,context:p,abortEarly:g=s.spec.abortEarly,disableStackTrace:m=s.spec.disableStackTrace}=r;const _={value:t,parent:f,context:p};function y(e={}){const r=gd(Object.assign({value:t,originalValue:i,label:s.spec.label,path:e.path||n,spec:s.spec,disableStackTrace:e.disableStackTrace||m},c,e.params),_),o=new ed(ed.formatError(e.message||h,r),t,r.path,e.type||l,r.disableStackTrace);return o.params=r,o}const v=g?o:a;let b={path:n,parent:f,type:l,from:r.from,createError:y,resolve:e=>md(e,_),options:r,originalValue:i,schema:s};const x=e=>{ed.isError(e)?v(e):e?a(null):v(y())},w=e=>{ed.isError(e)?v(e):o(e)};if(d&&fd(t))return x(!0);let A;try{var E;if(A=u.call(b,t,b),"function"==typeof(null==(E=A)?void 0:E.then)){if(r.sync)throw new Error(`Validation test of type: "${b.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(A).then(x,w)}}catch(e){return void w(e)}x(A)}return t.OPTIONS=e,t}function gd(e,t){if(!e)return e;for(const n of Object.keys(e))e[n]=md(e[n],t);return e}function md(e,t){return dd.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function _d(e,t,n,r=n){let i,s,o;return t?(Dh.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a,h="tuple"===(e=e.resolve({context:r,parent:i,value:n})).type,d=u?parseInt(c,10):0;if(e.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[d],e=h?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[c],e=e.fields[c]}s=c,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class yd extends Set{describe(){const e=[];for(const t of this.values())e.push(dd.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new yd(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function vd(e,t=new Map){if(ld(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=vd(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,vd(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(vd(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=vd(i,t)}return n}function bd(e){if(null==e||!e.length)return;const t=[];let n="",r=!1,i=!1;for(let s=0;s<e.length;s++){const o=e[s];"["!==o||i?"]"!==o||i?'"'!==o?"."!==o||r||i?n+=o:n&&(t.push(n),n=""):i=!i:(n&&(/^\d+$/.test(n)?t.push(n):t.push(n.replace(/^"|"$/g,"")),n=""),r=!1):(n&&(t.push(...n.split(".").filter(Boolean)),n=""),r=!0)}return n&&t.push(...n.split(".").filter(Boolean)),t}function xd(e,t){var n;if((null==(n=e.inner)||!n.length)&&e.errors.length)return function(e,t){const n=t?`${t}.${e.path}`:e.path;return e.errors.map(e=>({message:e,path:bd(n)}))}(e,t);const r=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>xd(e,r))}class wd{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new yd,this._blacklist=new yd,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(td.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=vd(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=Object.assign({},t.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,r,i;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(i=e.disableStackTrace)?i:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({},t,{value:e})),r="ignore-optionality"===t.assert,i=n._cast(e,t);if(!1!==t.assert&&!n.isType(i)){if(r&&fd(i))return i;let s=Wh(e),o=Wh(i);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${s} \n`+(o!==s?`result of cast: ${o}`:""))}return i}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((n,r)=>r.call(this,n,e,this,t),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,r){let{path:i,originalValue:s=e,strict:o=this.spec.strict}=t,a=e;o||(a=this._cast(a,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:i,value:a,originalValue:s,options:t,tests:l},n,e=>{if(e.length)return r(e,a);this.runTests({path:i,value:a,originalValue:s,options:t,tests:this.tests},n,r)})}runTests(e,t,n){let r=!1,{tests:i,value:s,originalValue:o,path:a,options:l}=e,u=e=>{r||(r=!0,t(e,s))},c=e=>{r||(r=!0,n(e,s))},h=i.length,d=[];if(!h)return c([]);let f={value:s,originalValue:o,path:a,options:l,schema:this};for(let e=0;e<i.length;e++){(0,i[e])(f,u,function(e){e&&(Array.isArray(e)?d.push(...e):d.push(e)),--h<=0&&c(d)})}}asNestedTest({key:e,index:t,parent:n,parentPath:r,originalParent:i,options:s}){const o=null!=e?e:t;if(null==o)throw TypeError("Must include `key` or `index` for nested validations");const a="number"==typeof o;let l=n[o];const u=Object.assign({},s,{strict:!0,parent:n,value:l,originalValue:i[o],key:void 0,[a?"index":"key"]:o,path:a||o.includes(".")?`${r||""}[${a?o:`"${o}"`}]`:(r?`${r}.`:"")+e});return(e,t,n)=>this.resolve(u)._validate(l,u,t,n)}validate(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),i=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return new Promise((n,s)=>r._validate(e,t,(e,t)=>{ed.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new ed(e,t,void 0,void 0,i)):n(t)}))}validateSync(e,t){var n;let r,i=this.resolve(Object.assign({},t,{value:e})),s=null!=(n=null==t?void 0:t.disableStackTrace)?n:i.spec.disableStackTrace;return i._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw ed.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new ed(t,e,void 0,void 0,s);r=n}),r}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(ed.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(ed.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):vd(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=pd({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=pd({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=td.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=td.notNull){return this.nullability(!1,e)}required(e=td.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=td.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=pd(t),i=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(i)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0}),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=Zh(e).map(e=>new dd(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new ud(r,t):ud.fromOptions(r,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=pd({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=td.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=pd({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=td.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=pd({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:r,optional:i,nullable:s}=t.spec,o={meta:r,label:n,optional:i,nullable:s,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.filter((e,t,n)=>n.findIndex(t=>t.OPTIONS.name===e.OPTIONS.name)===t).map(t=>{const n=t.OPTIONS.params&&e?gd(Object.assign({},t.OPTIONS.params),e):t.OPTIONS.params;return{name:t.OPTIONS.name,params:n}})};return o}get"~standard"(){const e=this,t={version:1,vendor:"yup",async validate(t){try{return{value:await e.validate(t,{abortEarly:!1})}}catch(e){if(e instanceof ed)return{issues:xd(e)};throw e}}};return t}}wd.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])wd.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=_d(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])wd.prototype[e]=wd.prototype.oneOf;for(const e of["not","nope"])wd.prototype[e]=wd.prototype.notOneOf;const Ad=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Ed(e){var t,n;const r=Ad.exec(e);return r?{year:Sd(r[1]),month:Sd(r[2],1)-1,day:Sd(r[3],1),hour:Sd(r[4]),minute:Sd(r[5]),second:Sd(r[6]),millisecond:r[7]?Sd(r[7].substring(0,3)):0,precision:null!=(t=null==(n=r[7])?void 0:n.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Sd(r[10]),minuteOffset:Sd(r[11])}:null}function Sd(e,t=0){return Number(e)||t}let Td=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,kd=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Od=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Rd=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),Cd=e=>fd(e)||e===e.trim(),Pd={}.toString();function Md(){return new Nd}class Nd extends wd{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce||this.isType(e))return e;if(Array.isArray(e))return e;const n=null!=e&&e.toString?e.toString():e;return n===Pd?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||td.required,name:"required",skipAbsent:!0,test:e=>!!e.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e))}length(e,t=nd.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=nd.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=nd.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,r,i=!1;return t&&("object"==typeof t?({excludeEmptyString:i=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||nd.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&i||-1!==t.search(e)})}email(e=nd.email){return this.matches(Td,{name:"email",message:e,excludeEmptyString:!0})}url(e=nd.url){return this.matches(kd,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=nd.uuid){return this.matches(Od,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:n}=e):r=e),this.matches(Rd,{name:"datetime",message:r||nd.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||nd.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=Ed(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:r||nd.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=Ed(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=nd.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:Cd})}lowercase(e=nd.lowercase){return this.transform(e=>fd(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>fd(e)||e===e.toLowerCase()})}uppercase(e=nd.uppercase){return this.transform(e=>fd(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>fd(e)||e===e.toUpperCase()})}}Md.prototype=Nd.prototype;function Id(){return new Dd}class Dd extends wd{constructor(){super({type:"number",check:e=>(e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!(e=>e!=+e)(e))}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce)return e;let n=e;if("string"==typeof n){if(n=n.replace(/\s/g,""),""===n)return NaN;n=+n}return this.isType(n)||null===n?n:parseFloat(n)})})}min(e,t=rd.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t>=this.resolve(e)}})}max(e,t=rd.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t<=this.resolve(e)}})}lessThan(e,t=rd.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(t){return t<this.resolve(e)}})}moreThan(e,t=rd.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(e=rd.positive){return this.moreThan(0,e)}negative(e=rd.negative){return this.lessThan(0,e)}integer(e=rd.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(e=>fd(e)?e:0|e)}round(e){var t;let n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>fd(t)?t:Math[e](t))}}Id.prototype=Dd.prototype;let Fd=new Date("");function zd(){return new Ld}class Ld extends wd{constructor(){super({type:"date",check(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),this.withMutation(()=>{this.transform((e,t)=>!this.spec.coerce||this.isType(e)||null===e?e:(e=function(e){const t=Ed(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?Ld.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(dd.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=id.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=id.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function jd(e,t){let n=1/0;return e.some((e,r)=>{var i;if(null!=(i=t.path)&&i.includes(e))return n=r,!0}),n}function Vd(e){return(t,n)=>jd(e,t)-jd(e,n)}Ld.INVALID_DATE=Fd,zd.prototype=Ld.prototype,zd.INVALID_DATE=Fd;const Ud=(e,t,n)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return n.isType(r)?r:e};function Bd(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Bd(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=Bd(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Bd)}):"optional"in e?e.optional():e}let Gd=e=>"[object Object]"===Object.prototype.toString.call(e);function $d(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const qd=Vd([]);function Hd(e){return new Wd(e)}class Wd extends wd{constructor(e){super({type:"object",check:e=>Gd(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=qd,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let i=this.fields,s=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(r).filter(e=>!this._nodes.includes(e))),a={},l=Object.assign({},t,{parent:a,__validating:t.__validating||!1}),u=!1;for(const e of o){let n=i[e],o=e in r,c=r[e];if(n){let i;l.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:c,context:t.context,parent:a});let s=n instanceof wd?n.spec:void 0,o=null==s?void 0:s.strict;if(null!=s&&s.strip){u=u||e in r;continue}i=t.__validating&&o?c:n.cast(c,l),void 0!==i&&(a[e]=i)}else o&&!s&&(a[e]=c);o===e in a&&a[e]===c||(u=!0)}return u?a:r}_validate(e,t={},n,r){let{from:i=[],originalValue:s=e,recursive:o=this.spec.recursive}=t;t.from=[{schema:this,value:s},...i],t.__validating=!0,t.originalValue=s,super._validate(e,t,n,(e,i)=>{if(!o||!Gd(i))return void r(e,i);s=s||i;let a=[];for(let e of this._nodes){let n=this.fields[e];n&&!dd.isRef(n)&&a.push(n.asNestedTest({options:t,key:e,parent:i,parentPath:t.path,originalParent:s}))}this.runTests({tests:a,value:i,originalValue:s,options:t},n,t=>{r(t.sort(this._sortErrors).concat(e),i)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];n[e]=void 0===r?t:r}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(n=>{var r;const i=this.fields[n];let s=e;null!=(r=s)&&r.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),t[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([e,t])=>`${e}-${t}`));function s(e,t){let s=Dh.split(e)[0];r.add(s),i.has(`${t}-${s}`)||n.push([t,s])}for(const t of Object.keys(e)){let n=e[t];r.add(t),dd.isRef(n)&&n.isSibling?s(n.path,t):ld(n)&&"deps"in n&&n.deps.forEach(e=>s(e,t))}return Vh.array(Array.from(r),n).reverse()}(e,t),n._sortErrors=Vd(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),r)})}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return Bd(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let r=Dh.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return((e,t)=>{const n=[...Dh.normalizePath(t)];if(1===n.length)return n[0]in e;let r=n.pop(),i=Dh.getter(Dh.join(n),!0)(e);return!(!i||!(r in i))})(i,e)&&(s=Object.assign({},i),n||delete s[e],s[t]=r(i)),s})}json(){return this.transform(Ud)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||sd.exact,test(e){if(null==e)return!0;const t=$d(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=sd.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=$d(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=sd.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const n={};for(const r of Object.keys(t))n[e(r)]=t[r];return n})}camelCase(){return this.transformKeys(zh.camelCase)}snakeCase(){return this.transformKeys(zh.snakeCase)}constantCase(){return this.transformKeys(e=>zh.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[i,s]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[i]})),n.fields[i]=s.describe(t)}return n}}function Zd(e){return new Kd(e)}Hd.prototype=Wd.prototype;class Kd extends wd{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1;const i=n.map((e,i)=>{const s=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${i}]`,parent:n,originalValue:e,value:e,index:i}));return s!==e&&(r=!0),s});return r?i:n}_validate(e,t={},n,r){var i;let s=this.innerType,o=null!=(i=t.recursive)?i:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,n,(i,a)=>{var l;if(!o||!s||!this._typeCheck(a))return void r(i,a);let u=new Array(a.length);for(let n=0;n<a.length;n++){var c;u[n]=s.asNestedTest({options:t,index:n,parent:a,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:a,tests:u,originalValue:null!=(l=t.originalValue)?l:e,options:t},n,e=>r(e.concat(i),a))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(Ud)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!ld(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Wh(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=od.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return t=t||od.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return t=t||od.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);if(t.innerType){var r;let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=t.innerType.describe(i)}return n}}Zd.prototype=Kd.prototype;const Xd={future_maintanance_date:zd().required(),placement_date:zd().required(),rapair_performed_date:zd().required(),verification_date:zd().required(),warranty_expr_date:zd().required()},Yd={lat:Id().required(),lon:Id().required()},Qd=N(x)(()=>{const{spacing:e}=F();return{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:e(2)}}),Jd=N(x)(()=>{const{spacing:e}=F();return{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:e(2),justifyItems:"flex-start"}});var ef={global:{links:{getIsConstruction:"function (feature) {\n const { construction } = feature;\n\n return construction;\n}\n",getIsFunctionalClass:"function (feature) {\n const { functional_class, access_id } = feature;\n\n return functional_class === 5 && access_id === 32;\n}\n",getIsLowMobility:"function (feature) {\n const { functional_class, low_mobility } = feature;\n\n return functional_class === 5 && low_mobility === 1;\n}\n"}},cameras:{camera1:{type:"perspective",vanishing_point:[0,-500]}},textures:{arrow:{url:"https://dalganmap.ru/api-image/images/arrow-20.png",sprites:{base:[0,0,20,20]}},"traffic-signal":{url:"https://dalganmap.ru/api-image/images/conditions/traffic-signal.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},pedestrian_crossing:{url:"https://dalganmap.ru/api-image/images/conditions/pedestrian_crossing.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},physical:{url:"https://dalganmap.ru/api-image/images/conditions/physical.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},gate:{url:"https://dalganmap.ru/api-image/images/conditions/gate.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_3578:{url:"https://dalganmap.ru/api-image/images/POI/3578.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5813:{url:"https://dalganmap.ru/api-image/images/POI/5813.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5541:{url:"https://dalganmap.ru/api-image/images/POI/5541.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5540:{url:"https://dalganmap.ru/api-image/images/POI/5540.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9530(Mail)":{url:"https://dalganmap.ru/api-image/images/POI/mail.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9530(Delivery)":{url:"https://dalganmap.ru/api-image/images/POI/delivery.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5400:{url:"https://dalganmap.ru/api-image/images/POI/5400.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_6000:{url:"https://dalganmap.ru/api-image/images/POI/6000.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9565:{url:"https://dalganmap.ru/api-image/images/POI/9565.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9583:{url:"https://dalganmap.ru/api-image/images/POI/9583.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_8060:{url:"https://dalganmap.ru/api-image/images/POI/8060.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5511:{url:"https://dalganmap.ru/api-image/images/POI/5511.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5512:{url:"https://dalganmap.ru/api-image/images/POI/5512.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5800:{url:"https://dalganmap.ru/api-image/images/POI/5800.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5999:{url:"https://dalganmap.ru/api-image/images/POI/5999.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7011:{url:"https://dalganmap.ru/api-image/images/POI/7011.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7389:{url:"https://dalganmap.ru/api-image/images/POI/7389.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7832:{url:"https://dalganmap.ru/api-image/images/POI/7832.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7929:{url:"https://dalganmap.ru/api-image/images/POI/7929.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7990:{url:"https://dalganmap.ru/api-image/images/POI/7990.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7999:{url:"https://dalganmap.ru/api-image/images/POI/7999.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_8410:{url:"https://dalganmap.ru/api-image/images/POI/8410.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9517:{url:"https://dalganmap.ru/api-image/images/POI/9517.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9718:{url:"https://dalganmap.ru/api-image/images/POI/9718.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(mosque)":{url:"https://dalganmap.ru/api-image/images/POI/9992_mosque.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(church)":{url:"https://dalganmap.ru/api-image/images/POI/9992_church.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(temple)":{url:"https://dalganmap.ru/api-image/images/POI/9992_temple.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(davidStar)":{url:"https://dalganmap.ru/api-image/images/POI/9992_davidStar.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(mortar)":{url:"https://dalganmap.ru/api-image/images/POI/9992_mortar.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_4100(metro)":{url:"https://dalganmap.ru/api-image/images/POI/4100_metro.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_4100(diameter)":{url:"https://dalganmap.ru/api-image/images/POI/4100_diameter.png",filtering:"mipmap",sprites:{base:[0,0,41,15]}},POI_4013:{url:"https://dalganmap.ru/api-image/images/POI/4013.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}}},layers:null,styles:{buildings:{base:"polygons",shaders:{blocks:{color:"color.rgb;\n"}}}},lights:{light1:{type:"directional",direction:[.1,.5,-1],diffuse:.7,ambient:.5}},sources:null};const tf=e=>{const t=[],n={source:e,layer:ph.BUILTUP_AREA},r={id:ko(),data:n,draw:{polygons:{color:"#CFC8C8"}}};return t.push(r),t},nf=e=>{const t=[],n={source:e,layer:ph.POINT_ADDRESS,minzoom:15},r={id:ko(),data:n,draw:{text:{text_source:"address",font:{fill:"black",size:"12px"}}}};return t.push(r),t},rf=()=>{const{enqueueSnackbar:e}=f(rs);return({variant:t,message:n})=>{e({variant:t,message:n,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})}},sf=()=>{const e=rf();return t=>{const{response:n}=t;if(n){const{data:t}=n;if(t){const{detail:n}=t;n&&n.forEach(t=>{e({variant:"error",message:t})})}}}};var of=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},af={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},lf=new class{#e=af;#t=!1;setTimeoutProvider(e){"production"!==process.env.NODE_ENV&&this.#t&&e!==this.#e&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#e,provider:e}),this.#e=e,"production"!==process.env.NODE_ENV&&(this.#t=!1)}setTimeout(e,t){return"production"!==process.env.NODE_ENV&&(this.#t=!0),this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return"production"!==process.env.NODE_ENV&&(this.#t=!0),this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};var uf="undefined"==typeof window||"Deno"in globalThis;function cf(){}function hf(e){return"number"==typeof e&&e>=0&&e!==1/0}function df(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ff(e,t){return"function"==typeof e?e(t):e}function pf(e,t){return"function"==typeof e?e(t):e}function gf(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o)if(r){if(t.queryHash!==_f(o,t.options))return!1}else if(!vf(t.queryKey,o))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&((!i||i===t.state.fetchStatus)&&!(s&&!s(t)))}function mf(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(yf(t.options.mutationKey)!==yf(s))return!1}else if(!vf(t.options.mutationKey,s))return!1}return(!r||t.state.status===r)&&!(i&&!i(t))}function _f(e,t){return(t?.queryKeyHashFn||yf)(e)}function yf(e){return JSON.stringify(e,(e,t)=>Ef(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function vf(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(n=>vf(e[n],t[n])))}var bf=Object.prototype.hasOwnProperty;function xf(e,t){if(e===t)return e;const n=Af(e)&&Af(t);if(!(n||Ef(e)&&Ef(t)))return t;const r=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),s=i.length,o=n?new Array(s):{};let a=0;for(let l=0;l<s;l++){const s=n?l:i[l],u=e[s],c=t[s];if(u===c){o[s]=u,(n?l<r:bf.call(e,s))&&a++;continue}if(null===u||null===c||"object"!=typeof u||"object"!=typeof c){o[s]=c;continue}const h=xf(u,c);o[s]=h,h===u&&a++}return r===s&&a===r?e:o}function wf(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Af(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ef(e){if(!Sf(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!Sf(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function Sf(e){return"[object Object]"===Object.prototype.toString.call(e)}function Tf(e,t,n){if("function"==typeof n.structuralSharing)return n.structuralSharing(e,t);if(!1!==n.structuralSharing){if("production"!==process.env.NODE_ENV)try{return xf(e,t)}catch(e){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`),e}return xf(e,t)}return t}function kf(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Of(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Rf=Symbol();function Cf(e,t){return"production"!==process.env.NODE_ENV&&e.queryFn===Rf&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==Rf?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function Pf(e,t){return"function"==typeof e?e(...t):!!e}var Mf=new class extends of{#n;#r;#i;constructor(){super(),this.#i=e=>{if(!uf&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#r||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(e){this.#i=e,this.#r?.(),this.#r=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#n!==e&&(this.#n=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#n?this.#n:"hidden"!==globalThis.document?.visibilityState}};function Nf(){let e,t;const n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}var If=function(e){setTimeout(e,0)};var Df=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=If;const s=r=>{t?e.push(r):i(()=>{n(r)})};return{batch:s=>{let o;t++;try{o=s()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})})()}return o},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}(),Ff=new class extends of{#s=!0;#r;#i;constructor(){super(),this.#i=e=>{if(!uf&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#r||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(e){this.#i=e,this.#r?.(),this.#r=e(this.setOnline.bind(this))}setOnline(e){this.#s!==e&&(this.#s=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#s}};function zf(e){return Math.min(1e3*2**e,3e4)}function Lf(e){return"online"!==(e??"online")||Ff.isOnline()}var jf=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Vf(e){let t,n=!1,r=0;const i=Nf(),s=()=>"pending"!==i.status,o=()=>Mf.isFocused()&&("always"===e.networkMode||Ff.isOnline())&&e.canRun(),a=()=>Lf(e.networkMode)&&e.canRun(),l=e=>{s()||(t?.(),i.resolve(e))},u=e=>{s()||(t?.(),i.reject(e))},c=()=>new Promise(n=>{t=e=>{(s()||o())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,s()||e.onContinue?.()}),h=()=>{if(s())return;let t;const i=0===r?e.initialPromise:void 0;try{t=i??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(l).catch(t=>{if(s())return;const i=e.retry??(uf?0:3),a=e.retryDelay??zf,l="function"==typeof a?a(r,t):a,d=!0===i||"number"==typeof i&&r<i||"function"==typeof i&&i(r,t);!n&&d?(r++,e.onFail?.(r,t),function(e){return new Promise(t=>{lf.setTimeout(t,e)})}(l).then(()=>o()?void 0:c()).then(()=>{n?u(t):h()})):u(t)})};return{promise:i,status:()=>i.status,cancel:t=>{if(!s()){const n=new jf(t);u(n),e.onCancel?.(n)}},continue:()=>(t?.(),i),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:a,start:()=>(a()?h():c().then(h),i)}}var Uf=class{#o;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hf(this.gcTime)&&(this.#o=lf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(uf?1/0:3e5))}clearGcTimeout(){this.#o&&(lf.clearTimeout(this.#o),this.#o=void 0)}},Bf=class extends Uf{#a;#l;#u;#c;#h;#d;#f;constructor(e){super(),this.#f=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#u=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#a=qf(this.options),this.state=e.state??this.#a,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#h?.promise}setOptions(e){if(this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=qf(this.options);void 0!==e.data&&(this.setState($f(e.data,e.dataUpdatedAt)),this.#a=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(e,t){const n=Tf(this.state.data,e,this.options);return this.#p({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#p({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#h?.promise;return this.#h?.cancel(e),t?t.then(cf).catch(cf):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#a)}isActive(){return this.observers.some(e=>!1!==pf(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===ff(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!df(this.state.dataUpdatedAt,e))}onFocus(){const e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}onOnline(){const e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#h&&(this.#f?this.#h.cancel({revert:!0}):this.#h.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#h?.status())if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#h)return this.#h.continueRetry(),this.#h.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}"production"!==process.env.NODE_ENV&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,n.signal)})},i=()=>{const e=Cf(this.options,t),n=(()=>{const e={client:this.#c,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#f=!1,this.options.persister?this.options.persister(e,n,this):e(n)},s=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(s,this),this.#l=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===s.fetchOptions?.meta||this.#p({type:"fetch",meta:s.fetchOptions?.meta}),this.#h=Vf({initialPromise:t?.initialPromise,fn:s.fetchFn,onCancel:e=>{e instanceof jf&&e.revert&&this.setState({...this.#l,fetchStatus:"idle"}),n.abort()},onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const e=await this.#h.start();if(void 0===e)throw"production"!==process.env.NODE_ENV&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#u.config.onSuccess?.(e,this),this.#u.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof jf){if(e.silent)return this.#h.promise;if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#p({type:"error",error:e}),this.#u.config.onError?.(e,this),this.#u.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#p(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...Gf(t.data,this.options),fetchMeta:e.meta??null};case"success":const n={...t,...$f(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#l=e.manual?n:void 0,n;case"error":const r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),Df.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:e})})}};function Gf(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Lf(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function $f(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function qf(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Hf=class extends of{constructor(e,t){super(),this.options=t,this.#c=e,this.#g=null,this.#m=Nf(),this.bindMethods(),this.setOptions(t)}#c;#_=void 0;#y=void 0;#v=void 0;#b;#x;#m;#g;#w;#A;#E;#S;#T;#k;#O=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#_.addObserver(this),Wf(this.#_,this.options)?this.#R():this.updateResult(),this.#C())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Zf(this.#_,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Zf(this.#_,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#P(),this.#M(),this.#_.removeObserver(this)}setOptions(e){const t=this.options,n=this.#_;if(this.options=this.#c.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof pf(this.options.enabled,this.#_))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#N(),this.#_.setOptions(this.options),t._defaulted&&!wf(this.options,t)&&this.#c.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#_,observer:this});const r=this.hasListeners();r&&Kf(this.#_,n,this.options,t)&&this.#R(),this.updateResult(),!r||this.#_===n&&pf(this.options.enabled,this.#_)===pf(t.enabled,this.#_)&&ff(this.options.staleTime,this.#_)===ff(t.staleTime,this.#_)||this.#I();const i=this.#D();!r||this.#_===n&&pf(this.options.enabled,this.#_)===pf(t.enabled,this.#_)&&i===this.#k||this.#F(i)}getOptimisticResult(e){const t=this.#c.getQueryCache().build(this.#c,e),n=this.createResult(t,e);return function(e,t){if(!wf(e.getCurrentResult(),t))return!0;return!1}(this,n)&&(this.#v=n,this.#x=this.options,this.#b=this.#_.state),n}getCurrentResult(){return this.#v}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),"promise"===n&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#m.status||this.#m.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,n))})}trackProp(e){this.#O.add(e)}getCurrentQuery(){return this.#_}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#c.defaultQueryOptions(e),n=this.#c.getQueryCache().build(this.#c,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#R({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#v))}#R(e){this.#N();let t=this.#_.fetch(this.options,e);return e?.throwOnError||(t=t.catch(cf)),t}#I(){this.#P();const e=ff(this.options.staleTime,this.#_);if(uf||this.#v.isStale||!hf(e))return;const t=df(this.#v.dataUpdatedAt,e)+1;this.#S=lf.setTimeout(()=>{this.#v.isStale||this.updateResult()},t)}#D(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#_):this.options.refetchInterval)??!1}#F(e){this.#M(),this.#k=e,!uf&&!1!==pf(this.options.enabled,this.#_)&&hf(this.#k)&&0!==this.#k&&(this.#T=lf.setInterval(()=>{(this.options.refetchIntervalInBackground||Mf.isFocused())&&this.#R()},this.#k))}#C(){this.#I(),this.#F(this.#D())}#P(){this.#S&&(lf.clearTimeout(this.#S),this.#S=void 0)}#M(){this.#T&&(lf.clearInterval(this.#T),this.#T=void 0)}createResult(e,t){const n=this.#_,r=this.options,i=this.#v,s=this.#b,o=this.#x,a=e!==n?e.state:this.#y,{state:l}=e;let u,c={...l},h=!1;if(t._optimisticResults){const i=this.hasListeners(),s=!i&&Wf(e,t),o=i&&Kf(e,n,t,r);(s||o)&&(c={...c,...Gf(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(c.fetchStatus="idle")}let{error:d,errorUpdatedAt:f,status:p}=c;u=c.data;let g=!1;if(void 0!==t.placeholderData&&void 0===u&&"pending"===p){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,g=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#E?.state.data,this.#E):t.placeholderData,void 0!==e&&(p="success",u=Tf(i?.data,e,t),h=!0)}if(t.select&&void 0!==u&&!g)if(i&&u===s?.data&&t.select===this.#w)u=this.#A;else try{this.#w=t.select,u=t.select(u),u=Tf(i?.data,u,t),this.#A=u,this.#g=null}catch(e){this.#g=e}this.#g&&(d=this.#g,u=this.#A,f=Date.now(),p="error");const m="fetching"===c.fetchStatus,_="pending"===p,y="error"===p,v=_&&m,b=void 0!==u,x={status:p,fetchStatus:c.fetchStatus,isPending:_,isSuccess:"success"===p,isError:y,isInitialLoading:v,isLoading:v,data:u,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>a.dataUpdateCount||c.errorUpdateCount>a.errorUpdateCount,isFetching:m,isRefetching:m&&!_,isLoadingError:y&&!b,isPaused:"paused"===c.fetchStatus,isPlaceholderData:h,isRefetchError:y&&b,isStale:Xf(e,t),refetch:this.refetch,promise:this.#m,isEnabled:!1!==pf(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===x.status?e.reject(x.error):void 0!==x.data&&e.resolve(x.data)},r=()=>{const e=this.#m=x.promise=Nf();t(e)},i=this.#m;switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":"error"!==x.status&&x.data===i.value||r();break;case"rejected":"error"===x.status&&x.error===i.reason||r()}}return x}updateResult(){const e=this.#v,t=this.createResult(this.#_,this.options);if(this.#b=this.#_.state,this.#x=this.options,void 0!==this.#b.data&&(this.#E=this.#_),wf(t,e))return;this.#v=t;this.#z({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!this.#O.size)return!0;const r=new Set(n??this.#O);return this.options.throwOnError&&r.add("error"),Object.keys(this.#v).some(t=>{const n=t;return this.#v[n]!==e[n]&&r.has(n)})})()})}#N(){const e=this.#c.getQueryCache().build(this.#c,this.options);if(e===this.#_)return;const t=this.#_;this.#_=e,this.#y=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#C()}#z(e){Df.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#v)}),this.#c.getQueryCache().notify({query:this.#_,type:"observerResultsUpdated"})})}};function Wf(e,t){return function(e,t){return!1!==pf(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&Zf(e,t,t.refetchOnMount)}function Zf(e,t,n){if(!1!==pf(t.enabled,e)&&"static"!==ff(t.staleTime,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&Xf(e,t)}return!1}function Kf(e,t,n,r){return(e!==t||!1===pf(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&Xf(e,n)}function Xf(e,t){return!1!==pf(t.enabled,e)&&e.isStaleByTime(ff(t.staleTime,e))}function Yf(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let n=!1;const u=Cf(t.options,t.fetchOptions),c=async(e,r,i)=>{if(n)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);const s=(()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?"backward":"forward",meta:t.options.meta};return(e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",()=>{n=!0}),t.signal)})})(e),e})(),o=await u(s),{maxPages:a}=t.options,l=i?Of:kf;return{pages:l(e.pages,o,a),pageParams:l(e.pageParams,r,a)}};if(i&&s.length){const e="backward"===i,t={pages:s,pageParams:o},n=(e?Jf:Qf)(r,t);a=await c(t,n,e)}else{const t=e??s.length;do{const e=0===l?o[0]??r.initialPageParam:Qf(r,a);if(l>0&&null==e)break;a=await c(a,e),l++}while(l<t)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function Qf(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Jf(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var ep=class extends Uf{#c;#L;#j;#h;constructor(e){super(),this.#c=e.client,this.mutationId=e.mutationId,this.#j=e.mutationCache,this.#L=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#L.includes(e)||(this.#L.push(e),this.clearGcTimeout(),this.#j.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#L=this.#L.filter(t=>t!==e),this.scheduleGc(),this.#j.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#L.length||("pending"===this.state.status?this.scheduleGc():this.#j.remove(this))}continue(){return this.#h?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#p({type:"continue"})},n={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#h=Vf({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#j.canRun(this)});const r="pending"===this.state.status,i=!this.#h.canStart();try{if(r)t();else{this.#p({type:"pending",variables:e,isPaused:i}),await(this.#j.config.onMutate?.(e,this,n));const t=await(this.options.onMutate?.(e,n));t!==this.state.context&&this.#p({type:"pending",context:t,variables:e,isPaused:i})}const s=await this.#h.start();return await(this.#j.config.onSuccess?.(s,e,this.state.context,this,n)),await(this.options.onSuccess?.(s,e,this.state.context,n)),await(this.#j.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n)),await(this.options.onSettled?.(s,null,e,this.state.context,n)),this.#p({type:"success",data:s}),s}catch(t){try{throw await(this.#j.config.onError?.(t,e,this.state.context,this,n)),await(this.options.onError?.(t,e,this.state.context,n)),await(this.#j.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)),await(this.options.onSettled?.(void 0,t,e,this.state.context,n)),t}finally{this.#p({type:"error",error:t})}}finally{this.#j.runNext(this)}}#p(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),Df.batch(()=>{this.#L.forEach(t=>{t.onMutationUpdate(e)}),this.#j.notify({mutation:this,type:"updated",action:e})})}};var tp=class extends of{constructor(e={}){super(),this.config=e,this.#V=new Set,this.#U=new Map,this.#B=0}#V;#U;#B;build(e,t,n){const r=new ep({client:e,mutationCache:this,mutationId:++this.#B,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#V.add(e);const t=np(e);if("string"==typeof t){const n=this.#U.get(t);n?n.push(e):this.#U.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#V.delete(e)){const t=np(e);if("string"==typeof t){const n=this.#U.get(t);if(n)if(n.length>1){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#U.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=np(e);if("string"==typeof t){const n=this.#U.get(t),r=n?.find(e=>"pending"===e.state.status);return!r||r===e}return!0}runNext(e){const t=np(e);if("string"==typeof t){const n=this.#U.get(t)?.find(t=>t!==e&&t.state.isPaused);return n?.continue()??Promise.resolve()}return Promise.resolve()}clear(){Df.batch(()=>{this.#V.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#V.clear(),this.#U.clear()})}getAll(){return Array.from(this.#V)}find(e){const t={exact:!0,...e};return this.getAll().find(e=>mf(t,e))}findAll(e={}){return this.getAll().filter(t=>mf(e,t))}notify(e){Df.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return Df.batch(()=>Promise.all(e.map(e=>e.continue().catch(cf))))}};function np(e){return e.options.scope?.id}var rp=class extends of{#c;#v=void 0;#G;#$;constructor(e,t){super(),this.#c=e,this.setOptions(t),this.bindMethods(),this.#q()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#c.defaultMutationOptions(e),wf(this.options,t)||this.#c.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#G,observer:this}),t?.mutationKey&&this.options.mutationKey&&yf(t.mutationKey)!==yf(this.options.mutationKey)?this.reset():"pending"===this.#G?.state.status&&this.#G.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#G?.removeObserver(this)}onMutationUpdate(e){this.#q(),this.#z(e)}getCurrentResult(){return this.#v}reset(){this.#G?.removeObserver(this),this.#G=void 0,this.#q(),this.#z()}mutate(e,t){return this.#$=t,this.#G?.removeObserver(this),this.#G=this.#c.getMutationCache().build(this.#c,this.options),this.#G.addObserver(this),this.#G.execute(e)}#q(){const e=this.#G?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#v={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#z(e){Df.batch(()=>{if(this.#$&&this.hasListeners()){const t=this.#v.variables,n=this.#v.context,r={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};"success"===e?.type?(this.#$.onSuccess?.(e.data,t,n,r),this.#$.onSettled?.(e.data,null,t,n,r)):"error"===e?.type&&(this.#$.onError?.(e.error,t,n,r),this.#$.onSettled?.(void 0,e.error,t,n,r))}this.listeners.forEach(e=>{e(this.#v)})})}},ip=class extends of{constructor(e={}){super(),this.config=e,this.#H=new Map}#H;build(e,t,n){const r=t.queryKey,i=t.queryHash??_f(r,t);let s=this.get(i);return s||(s=new Bf({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#H.has(e.queryHash)||(this.#H.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#H.get(e.queryHash);t&&(e.destroy(),t===e&&this.#H.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Df.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#H.get(e)}getAll(){return[...this.#H.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(e=>gf(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>gf(e,t)):t}notify(e){Df.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Df.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Df.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},sp=n.createContext(void 0),op=e=>{const t=n.useContext(sp);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ap=({client:t,children:r})=>(n.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),e(sp.Provider,{value:t,children:r})),lp=n.createContext(!1);lp.Provider;var up=n.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),cp=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function hp(e,t,r){if("production"!==process.env.NODE_ENV&&("object"!=typeof e||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const i=n.useContext(lp),s=n.useContext(up),o=op(),a=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(a),"production"!==process.env.NODE_ENV&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=i?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,n=e=>"static"===e?e:Math.max(e??t,t),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>n(r(...e)):n(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(a),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(a,s),(e=>{n.useEffect(()=>{e.clearReset()},[e])})(s);const l=!o.getQueryCache().get(a.queryHash),[u]=n.useState(()=>new t(o,a)),c=u.getOptimisticResult(a),h=!i&&!1!==e.subscribed;if(n.useSyncExternalStore(n.useCallback(e=>{const t=h?u.subscribe(Df.batchCalls(e)):cf;return u.updateResult(),t},[u,h]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),n.useEffect(()=>{u.setOptions(a)},[a,u]),((e,t)=>e?.suspense&&t.isPending)(a,c))throw cp(a,u,s);if((({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&void 0===e.data||Pf(n,[e.error,r])))({result:c,errorResetBoundary:s,throwOnError:a.throwOnError,query:o.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw c.error;if(o.getDefaultOptions().queries?._experimental_afterQuery?.(a,c),a.experimental_prefetchInRender&&!uf&&((e,t)=>e.isLoading&&e.isFetching&&!t)(c,i)){const e=l?cp(a,u,s):o.getQueryCache().get(a.queryHash)?.promise;e?.catch(cf).finally(()=>{u.updateResult()})}return a.notifyOnChangeProps?c:u.trackResult(c)}function dp(e,t){const r=op(),[i]=n.useState(()=>new rp(r,e));n.useEffect(()=>{i.setOptions(e)},[i,e]);const s=n.useSyncExternalStore(n.useCallback(e=>i.subscribe(Df.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=n.useCallback((e,t)=>{i.mutate(e,t).catch(cf)},[i]);if(s.error&&Pf(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}const fp=()=>dp({mutationKey:["sign-in-mutation"],mutationFn:async({body:{username:e,password:t}})=>{const n=Eo({username:e,password:Ao(t)});return await lh.instance.apiService.post({url:"token",body:n,config:{headers:{"Content-Type":"application/x-www-form-urlencoded"}}})}});if(!u)throw new Error("mobx-react-lite requires React with Hooks support");if(!function(e,t,n){return Bc(function(){var r=wc(e,n)[wa];"production"!==process.env.NODE_ENV&&t&&e[_a]&&Co("makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported."),null!=t||(t=function(e){return oa(e,_a)||Yo(e,_a,fa({},e[_a])),e[_a]}(e)),ra(t).forEach(function(e){return r.make_(e,t[e])})}),e})throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function pp(e){e()}function gp(e){return Cu(e)}var mp,_p=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=1e4),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var n=Date.now();t.registrations.forEach(function(r,i){n-r.registeredAt>=e&&(t.finalize(r.value),t.registrations.delete(i))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),e}(),yp=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:_p)(function(e){var t;null===(t=e.reaction)||void 0===t||t.dispose(),e.reaction=null}),vp={exports:{}},bp={};var xp,wp,Ap={};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import r,{useLayoutEffect as i,useEffect as s,useRef as o,useMemo as a,useCallback as l,useState as u,createContext as c,memo as h,useReducer as d,useContext as f,use as p,forwardRef as g,createElement as m,cloneElement as _,Component as y,isValidElement as v}from"react";import{Typography as b,Box as x,List as w,ListItem as A,Slide as E,Tooltip as S,IconButton as T,Dialog as k,DialogTitle as O,DialogContent as R,DialogContentText as C,DialogActions as P,Button as M,styled as N,TextField as I,Autocomplete as D,useTheme as F,Accordion as z,AccordionSummary as L,AccordionDetails as j,Tab as V,CircularProgress as U}from"@mui/material";import B from"@mui/icons-material/Delete";import G from"@mui/icons-material/Edit";import $ from"@mui/material/IconButton";import q from"@mui/icons-material/CloudUpload";import H from"@mui/icons-material/Moving";import W from"@mui/material/Checkbox";import Z from"@mui/material/FormControlLabel";import{styled as K,createTheme as X,ThemeProvider as Y}from"@mui/material/styles";import Q from"@mui/material/Typography";import{unstable_batchedUpdates as J,createPortal as ee}from"react-dom";import te from"axios";import{LocalizationProvider as ne}from"@mui/x-date-pickers";import{AdapterDateFns as re}from"@mui/x-date-pickers/AdapterDateFns";import ie from"@mui/icons-material/ArrowDownward";import{DateField as se}from"@mui/x-date-pickers/DateField";import{TabContext as oe,TabList as ae,TabPanel as le}from"@mui/lab";import ue from"@mui/material/Box";import ce from"@mui/material/Modal";const he=({text:t="Нет данных"})=>e(b,{variant:"body2",sx:{textAlign:"center",color:"var(--gray-light-color)"},children:t});function de({items:r,columnsCount:i=1,getContent:s,title:o,getKey:a,onClick:l,sx:u,isShowNoData:c=!0}){const h=0===r.length;return t(x,{sx:{display:"grid",gridTemplateColumns:"1fr",gap:"15px",...u?.root},children:[o?e(b,{variant:"h6",noWrap:!0,sx:{textAlign:"center",fontWeight:700,...u?.title},children:o}):null,h?e(n.Fragment,{children:c?e(he,{}):null}):e(w,{sx:{display:"grid",gridTemplateColumns:`repeat(${i}, 1fr)`,gap:"15px",...u?.list},disablePadding:!0,children:r.map((t,n)=>e(A,{onClick:()=>l?.(t,n),sx:{...u?.item},disablePadding:!0,children:s(t,n)},a(t,n)))})]})}const fe=n.forwardRef(function(t,n){return e(E,{direction:"up",ref:n,...t})}),pe=({notification:r,onDelete:i})=>{const s=n.useId(),[o,a]=n.useState(!1),l=()=>{a(!1)};return t(n.Fragment,{children:[r?e(S,{title:r.title,children:e(T,{onClick:e=>{e.stopPropagation(),a(!0)},children:e(B,{fontSize:"small",color:"error"})})}):e(T,{onClick:e=>{e.stopPropagation(),i()},children:e(B,{fontSize:"small",color:"error"})}),r?t(k,{slots:{transition:fe},open:o,onClose:l,children:[e(O,{id:`${s}-dialog-title`,children:r.title}),e(R,{children:e(C,{id:`${s}-dialog-text`,children:r.description})}),t(P,{children:[e(M,{variant:"contained",color:"error",sx:{textTransform:"none"},onClick:l,children:"Отмена"}),e(M,{variant:"contained",sx:{textTransform:"none"},onClick:()=>{i(),l()},children:"Подтвердить"})]})]}):null]})},ge=t=>{const r=n.useId();return e(T,{id:r,...t,children:e(G,{fontSize:"small",color:"primary"})})},me=t=>{const{children:n,variant:r="contained",loading:i,icon:s,sx:o,...a}=t;return s?e($,{...a,loading:i,children:s}):e(M,{sx:{whiteSpace:"nowrap",padding:"5px 15px",textTransform:"none",...o},loading:i,loadingPosition:"start",variant:r,...a,children:n})},_e=N("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),ye=({children:n,accept:r,onFilesLoad:i,...s})=>t(me,{...s,component:"label",variant:"contained",startIcon:e(q,{}),children:[n,e(_e,{type:"file",accept:r,onChange:e=>{const{target:{files:t}}=e;t&&i({event:e,files:t})},multiple:!0})]}),ve=({title:t,...r})=>{const i=n.useId();return t?e(S,{title:t,children:e(T,{id:i,...r,children:e(H,{fontSize:"medium",color:"primary"})})}):e(T,{id:i,...r,children:e(H,{fontSize:"medium",color:"primary"})})};var be=e=>"checkbox"===e.type,xe=e=>e instanceof Date,we=e=>null==e;const Ae=e=>"object"==typeof e;var Ee=e=>!we(e)&&!Array.isArray(e)&&Ae(e)&&!xe(e),Se=e=>Ee(e)&&e.target?be(e.target)?e.target.checked:e.target.value:e,Te=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),ke="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function Oe(e){if(e instanceof Date)return new Date(e);const t="undefined"!=typeof FileList&&e instanceof FileList;if(ke&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!(n||Ee(e)&&(e=>{const t=e.constructor&&e.constructor.prototype;return Ee(t)&&t.hasOwnProperty("isPrototypeOf")})(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=Oe(e[t]));return r}var Re=e=>/^\w*$/.test(e),Ce=e=>void 0===e,Pe=e=>Array.isArray(e)?e.filter(Boolean):[],Me=e=>Pe(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ne=(e,t,n)=>{if(!t||!Ee(e))return n;const r=(Re(t)?[t]:Me(t)).reduce((e,t)=>we(e)?e:e[t],e);return Ce(r)||r===e?Ce(e[t])?n:e[t]:r},Ie=e=>"boolean"==typeof e,De=e=>"function"==typeof e,Fe=(e,t,n)=>{let r=-1;const i=Re(t)?[t]:Me(t),s=i.length,o=s-1;for(;++r<s;){const t=i[r];let s=n;if(r!==o){const n=e[t];s=Ee(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=s,e=e[t]}};const ze="blur",Le="focusout",je="change",Ve="onBlur",Ue="onChange",Be="onSubmit",Ge="onTouched",$e="all",qe="max",He="min",We="maxLength",Ze="minLength",Ke="pattern",Xe="required",Ye="validate",Qe=r.createContext(null);Qe.displayName="HookFormContext";const Je=()=>r.useContext(Qe),et=e=>{const{children:t,...n}=e;return r.createElement(Qe.Provider,{value:n},t)};var tt=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const i=s;return t._proxyFormState[i]!==$e&&(t._proxyFormState[i]=!r||$e),n&&(n[i]=!0),e[i]}});return i};const nt="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;var rt=e=>"string"==typeof e,it=(e,t,n,r,i)=>rt(e)?(r&&t.watch.add(e),Ne(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),Ne(n,e))):(r&&(t.watchAll=!0),n),st=e=>we(e)||!Ae(e);function ot(e,t,n=new WeakSet){if(st(e)||st(t))return Object.is(e,t);if(xe(e)&&xe(t))return e.getTime()===t.getTime();const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of r){const r=e[s];if(!i.includes(s))return!1;if("ref"!==s){const e=t[s];if(xe(r)&&xe(e)||Ee(r)&&Ee(e)||Array.isArray(r)&&Array.isArray(e)?!ot(r,e,n):!Object.is(r,e))return!1}}return!0}function at(e){const t=Je(),{name:n,disabled:i,control:s=t.control,shouldUnregister:o,defaultValue:a,exact:l=!0}=e,u=Te(s._names.array,n),c=r.useMemo(()=>Ne(s._formValues,n,Ne(s._defaultValues,n,a)),[s,n,a]),h=function(e){const t=Je(),{control:n=t.control,name:i,defaultValue:s,disabled:o,exact:a,compute:l}=e||{},u=r.useRef(s),c=r.useRef(l),h=r.useRef(void 0),d=r.useRef(n),f=r.useRef(i);c.current=l;const[p,g]=r.useState(()=>{const e=n._getWatch(i,u.current);return c.current?c.current(e):e}),m=r.useCallback(e=>{const t=it(i,n._names,e||n._formValues,!1,u.current);return c.current?c.current(t):t},[n._formValues,n._names,i]),_=r.useCallback(e=>{if(!o){const t=it(i,n._names,e||n._formValues,!1,u.current);if(c.current){const e=c.current(t);ot(e,h.current)||(g(e),h.current=e)}else g(t)}},[n._formValues,n._names,o,i]);nt(()=>(d.current===n&&ot(f.current,i)||(d.current=n,f.current=i,_()),n._subscribe({name:i,formState:{values:!0},exact:a,callback:e=>{_(e.values)}})),[n,a,i,_]),r.useEffect(()=>n._removeUnmounted());const y=d.current!==n,v=f.current,b=r.useMemo(()=>{if(o)return null;const e=!y&&!ot(v,i);return y||e?m():null},[o,y,i,v,m]);return null!==b?b:p}({control:s,name:n,defaultValue:c,exact:l}),d=function(e){const t=Je(),{control:n=t.control,disabled:i,name:s,exact:o}=e||{},[a,l]=r.useState(n._formState),u=r.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return nt(()=>n._subscribe({name:s,formState:u.current,exact:o,callback:e=>{!i&&l({...n._formState,...e})}}),[s,i,o]),r.useEffect(()=>{u.current.isValid&&n._setValid(!0)},[n]),r.useMemo(()=>tt(a,n,u.current,!1),[a,n])}({control:s,name:n,exact:l}),f=r.useRef(e),p=r.useRef(void 0),g=r.useRef(s.register(n,{...e.rules,value:h,...Ie(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const m=r.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ne(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ne(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ne(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ne(d.validatingFields,n)},error:{enumerable:!0,get:()=>Ne(d.errors,n)}}),[d,n]),_=r.useCallback(e=>g.current.onChange({target:{value:Se(e),name:n},type:je}),[n]),y=r.useCallback(()=>g.current.onBlur({target:{value:Ne(s._formValues,n),name:n},type:ze}),[n,s._formValues]),v=r.useCallback(e=>{const t=Ne(s._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>De(e.focus)&&e.focus(),select:()=>De(e.select)&&e.select(),setCustomValidity:t=>De(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>De(e.reportValidity)&&e.reportValidity()})},[s._fields,n]),b=r.useMemo(()=>({name:n,value:h,...Ie(i)||d.disabled?{disabled:d.disabled||i}:{},onChange:_,onBlur:y,ref:v}),[n,i,d.disabled,_,y,v,h]);return r.useEffect(()=>{const e=s._options.shouldUnregister||o,t=p.current;t&&t!==n&&!u&&s.unregister(t),s.register(n,{...f.current.rules,...Ie(f.current.disabled)?{disabled:f.current.disabled}:{}});const r=(e,t)=>{const n=Ne(s._fields,e);n&&n._f&&(n._f.mount=t)};if(r(n,!0),e){const e=Oe(Ne(s._options.defaultValues,n,f.current.defaultValue));Fe(s._defaultValues,n,e),Ce(Ne(s._formValues,n))&&Fe(s._formValues,n,e)}return!u&&s.register(n),p.current=n,()=>{(u?e&&!s._state.action:e)?s.unregister(n):r(n,!1)}},[n,s,u,o]),r.useEffect(()=>{s._setDisabledField({disabled:i,name:n})},[i,n,s]),r.useMemo(()=>({field:b,formState:d,fieldState:m}),[b,d,m])}const lt=e=>e.render(at(e));var ut=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},ct=e=>Array.isArray(e)?e:[e],ht=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function dt(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r],s=t[r];if(i&&Ee(i)&&s){const e=dt(i,s);Ee(e)&&(n[r]=e)}else e[r]&&(n[r]=s)}return n}var ft=e=>Ee(e)&&!Object.keys(e).length,pt=e=>"file"===e.type,gt=e=>{if(!ke)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},mt=e=>"select-multiple"===e.type,_t=e=>"radio"===e.type,yt=e=>gt(e)&&e.isConnected;function vt(e,t){const n=Array.isArray(t)?t:Re(t)?[t]:Me(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ce(e)?r++:e[t[r++]];return e}(e,n),i=n.length-1,s=n[i];return r&&delete r[s],0!==i&&(Ee(r)&&ft(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ce(e[t]))return!1;return!0}(r))&&vt(e,n.slice(0,-1)),e}function bt(e){return Array.isArray(e)||Ee(e)&&!(e=>{for(const t in e)if(De(e[t]))return!0;return!1})(e)}function xt(e,t={}){for(const n in e){const r=e[n];bt(r)?(t[n]=Array.isArray(r)?[]:{},xt(r,t[n])):Ce(r)||(t[n]=!0)}return t}function wt(e,t,n){n||(n=xt(t));for(const r in e){const i=e[r];if(bt(i))Ce(t)||st(n[r])?n[r]=xt(i,Array.isArray(i)?[]:{}):wt(i,we(t)?{}:t[r],n[r]);else{const e=t[r];n[r]=!ot(i,e)}}return n}const At={value:!1,isValid:!1},Et={value:!0,isValid:!0};var St=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ce(e[0].attributes.value)?Ce(e[0].value)||""===e[0].value?Et:{value:e[0].value,isValid:!0}:Et:At}return At},Tt=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ce(e)?e:t?""===e?NaN:e?+e:e:n&&rt(e)?new Date(e):r?r(e):e;const kt={isValid:!1,value:null};var Ot=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,kt):kt;function Rt(e){const t=e.ref;return pt(t)?t.files:_t(t)?Ot(e.refs).value:mt(t)?[...t.selectedOptions].map(({value:e})=>e):be(t)?St(e.refs).value:Tt(Ce(t.value)?e.ref.value:t.value,e)}var Ct=e=>e instanceof RegExp,Pt=e=>Ce(e)?e:Ct(e)?e.source:Ee(e)?Ct(e.value)?e.value.source:e.value:e,Mt=e=>({isOnSubmit:!e||e===Be,isOnBlur:e===Ve,isOnChange:e===Ue,isOnAll:e===$e,isOnTouch:e===Ge});const Nt="AsyncFunction";var It=e=>!!e&&!!e.validate&&!!(De(e.validate)&&e.validate.constructor.name===Nt||Ee(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===Nt)),Dt=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const Ft=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const n=Ne(e,i);if(n){const{_f:e,...s}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(Ft(s,t))break}else if(Ee(s)&&Ft(s,t))break}}};function zt(e,t,n){const r=Ne(e,n);if(r||Re(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),s=Ne(t,r),o=Ne(e,r);if(s&&!Array.isArray(s)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};if(o&&o.root&&o.root.type)return{name:`${r}.root`,error:o.root};i.pop()}return{name:n}}var Lt=(e,t,n)=>{const r=ct(Ne(e,n));return Fe(r,"root",t[n]),Fe(e,n,r),e};function jt(e,t,n="validate"){if(rt(e)||Array.isArray(e)&&e.every(rt)||Ie(e)&&!e)return{type:n,message:rt(e)?e:"",ref:t}}var Vt=e=>Ee(e)&&!Ct(e)?e:{value:e,message:""},Ut=async(e,t,n,r,i,s)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:c,min:h,max:d,pattern:f,validate:p,name:g,valueAsNumber:m,mount:_}=e._f,y=Ne(n,g);if(!_||t.has(g))return{};const v=a?a[0]:o,b=e=>{i&&v.reportValidity&&(v.setCustomValidity(Ie(e)?"":e||""),v.reportValidity())},x={},w=_t(o),A=be(o),E=w||A,S=(m||pt(o))&&Ce(o.value)&&Ce(y)||gt(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,T=ut.bind(null,g,r,x),k=(e,t,n,r=We,i=Ze)=>{const s=e?t:n;x[g]={type:e?r:i,message:s,ref:o,...T(e?r:i,s)}};if(s?!Array.isArray(y)||!y.length:l&&(!E&&(S||we(y))||Ie(y)&&!y||A&&!St(a).isValid||w&&!Ot(a).isValid)){const{value:e,message:t}=rt(l)?{value:!!l,message:l}:Vt(l);if(e&&(x[g]={type:Xe,message:t,ref:v,...T(Xe,t)},!r))return b(t),x}if(!(S||we(h)&&we(d))){let e,t;const n=Vt(d),i=Vt(h);if(we(y)||isNaN(y)){const r=o.valueAsDate||new Date(y),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;rt(n.value)&&y&&(e=a?s(y)>s(n.value):l?y>n.value:r>new Date(n.value)),rt(i.value)&&y&&(t=a?s(y)<s(i.value):l?y<i.value:r<new Date(i.value))}else{const r=o.valueAsNumber||(y?+y:y);we(n.value)||(e=r>n.value),we(i.value)||(t=r<i.value)}if((e||t)&&(k(!!e,n.message,i.message,qe,He),!r))return b(x[g].message),x}if((u||c)&&!S&&(rt(y)||s&&Array.isArray(y))){const e=Vt(u),t=Vt(c),n=!we(e.value)&&y.length>+e.value,i=!we(t.value)&&y.length<+t.value;if((n||i)&&(k(n,e.message,t.message),!r))return b(x[g].message),x}if(f&&!S&&rt(y)){const{value:e,message:t}=Vt(f);if(Ct(e)&&!y.match(e)&&(x[g]={type:Ke,message:t,ref:o,...T(Ke,t)},!r))return b(t),x}if(p)if(De(p)){const e=jt(await p(y,n),v);if(e&&(x[g]={...e,...T(Ye,e.message)},!r))return b(e.message),x}else if(Ee(p)){let e={};for(const t in p){if(!ft(e)&&!r)break;const i=jt(await p[t](y,n),v,t);i&&(e={...i,...T(t,i.message)},b(i.message),r&&(x[g]=e))}if(!ft(e)&&(x[g]={ref:v,...e},!r))return x}return b(!0),x};const Bt={mode:Be,reValidateMode:Ue,shouldFocusError:!0};function Gt(e={}){let t,n={...Bt,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:De(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},s=(Ee(n.defaultValues)||Ee(n.values))&&Oe(n.defaultValues||n.values)||{},o=n.shouldUnregister?{}:Oe(s),a={action:!1,mount:!1,watch:!1,keepIsValid:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...c};let d={...h};const f={array:ht(),state:ht()},p=n.criteriaMode===$e,g=async e=>{if(!a.keepIsValid&&!n.disabled&&(h.isValid||d.isValid||e)){let e;n.resolver?(e=ft((await b()).errors),m()):e=await x(i,!0),e!==r.isValid&&f.state.next({isValid:e})}},m=(e,t)=>{!n.disabled&&(h.isValidating||h.validatingFields||d.isValidating||d.validatingFields)&&((e||Array.from(l.mount)).forEach(e=>{e&&(t?Fe(r.validatingFields,e,t):vt(r.validatingFields,e))}),f.state.next({validatingFields:r.validatingFields,isValidating:!ft(r.validatingFields)}))},_=(e,t,n,r)=>{const l=Ne(i,e);if(l){const i=Ne(o,e,Ce(n)?Ne(s,e):n);Ce(i)||r&&r.defaultChecked||t?Fe(o,e,t?i:Rt(l._f)):E(e,i),a.mount&&!a.action&&g()}},y=(e,t,i,o,a)=>{let l=!1,u=!1;const c={name:e};if(!n.disabled){if(!i||o){(h.isDirty||d.isDirty)&&(u=r.isDirty,r.isDirty=c.isDirty=w(),l=u!==c.isDirty);const n=ot(Ne(s,e),t);u=!!Ne(r.dirtyFields,e),n?vt(r.dirtyFields,e):Fe(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,l=l||(h.dirtyFields||d.dirtyFields)&&u!==!n}if(i){const t=Ne(r.touchedFields,e);t||(Fe(r.touchedFields,e,i),c.touchedFields=r.touchedFields,l=l||(h.touchedFields||d.touchedFields)&&t!==i)}l&&a&&f.state.next(c)}return l?c:{}},v=(e,i,s,o)=>{const a=Ne(r.errors,e),l=(h.isValid||d.isValid)&&Ie(i)&&r.isValid!==i;var c;if(n.delayError&&s?(c=()=>((e,t)=>{Fe(r.errors,e,t),f.state.next({errors:r.errors})})(e,s),t=e=>{clearTimeout(u),u=setTimeout(c,e)},t(n.delayError)):(clearTimeout(u),t=null,s?Fe(r.errors,e,s):vt(r.errors,e)),(s?!ot(a,s):a)||!ft(o)||l){const t={...o,...l&&Ie(i)?{isValid:i}:{},errors:r.errors,name:e};r={...r,...t},f.state.next(t)}},b=async e=>{m(e,!0);const t=await n.resolver(o,n.context,((e,t,n,r)=>{const i={};for(const n of e){const e=Ne(t,n);e&&Fe(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}})(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation));return t},x=async(e,t,i={valid:!0})=>{for(const s in e){const a=e[s];if(a){const{_f:e,...s}=a;if(e){const s=l.array.has(e.name),u=a._f&&It(a._f);u&&h.validatingFields&&m([e.name],!0);const c=await Ut(a,l.disabled,o,p,n.shouldUseNativeValidation&&!t,s);if(u&&h.validatingFields&&m([e.name]),c[e.name]&&(i.valid=!1,t))break;!t&&(Ne(c,e.name)?s?Lt(r.errors,c,e.name):Fe(r.errors,e.name,c[e.name]):vt(r.errors,e.name))}!ft(s)&&await x(s,t,i)}}return i.valid},w=(e,t)=>!n.disabled&&(e&&t&&Fe(o,e,t),!ot(C(),s)),A=(e,t,n)=>it(e,l,{...a.mount?o:Ce(t)?s:rt(e)?{[e]:t}:t},n,t),E=(e,t,n={})=>{const r=Ne(i,e);let s=t;if(r){const n=r._f;n&&(!n.disabled&&Fe(o,e,Tt(t,n)),s=gt(n.ref)&&we(t)?"":t,mt(n.ref)?[...n.ref.options].forEach(e=>e.selected=s.includes(e.value)):n.refs?be(n.ref)?n.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(s)?e.checked=!!s.find(t=>t===e.value):e.checked=s===e.value||!!s)}):n.refs.forEach(e=>e.checked=e.value===s):pt(n.ref)?n.ref.value="":(n.ref.value=s,n.ref.type||f.state.next({name:e,values:Oe(o)})))}(n.shouldDirty||n.shouldTouch)&&y(e,s,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&R(e)},S=(e,t,n)=>{for(const r in t){if(!t.hasOwnProperty(r))return;const s=t[r],o=e+"."+r,a=Ne(i,o);(l.array.has(e)||Ee(s)||a&&!a._f)&&!xe(s)?S(o,s,n):E(o,s,n)}},T=(e,t,n={})=>{const u=Ne(i,e),c=l.array.has(e),p=Oe(t);Fe(o,e,p),c?(f.array.next({name:e,values:Oe(o)}),(h.isDirty||h.dirtyFields||d.isDirty||d.dirtyFields)&&n.shouldDirty&&f.state.next({name:e,dirtyFields:wt(s,o),isDirty:w(e,p)})):!u||u._f||we(p)?E(e,p,n):S(e,p,n),Dt(e,l)&&f.state.next({...r,name:e}),f.state.next({name:a.mount?e:void 0,values:Oe(o)})},k=async e=>{a.mount=!0;const s=e.target;let u=s.name,c=!0;const _=Ne(i,u),w=e=>{c=Number.isNaN(e)||xe(e)&&isNaN(e.getTime())||ot(e,Ne(o,u,e))},A=Mt(n.mode),E=Mt(n.reValidateMode);if(_){let a,T;const k=s.type?Rt(_._f):Se(e),O=e.type===ze||e.type===Le,C=!((S=_._f).mount&&(S.required||S.min||S.max||S.maxLength||S.minLength||S.pattern||S.validate)||n.resolver||Ne(r.errors,u)||_._f.deps)||((e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e))(O,Ne(r.touchedFields,u),r.isSubmitted,E,A),P=Dt(u,l,O);Fe(o,u,k),O?s&&s.readOnly||(_._f.onBlur&&_._f.onBlur(e),t&&t(0)):_._f.onChange&&_._f.onChange(e);const M=y(u,k,O),N=!ft(M)||P;if(!O&&f.state.next({name:u,type:e.type,values:Oe(o)}),C)return(h.isValid||d.isValid)&&("onBlur"===n.mode?O&&g():O||g()),N&&f.state.next({name:u,...P?{}:M});if(!O&&P&&f.state.next({...r}),n.resolver){const{errors:e}=await b([u]);if(m([u]),w(k),c){const t=zt(r.errors,i,u),n=zt(e,i,t.name||u);a=n.error,u=n.name,T=ft(e)}}else m([u],!0),a=(await Ut(_,l.disabled,o,p,n.shouldUseNativeValidation))[u],m([u]),w(k),c&&(a?T=!1:(h.isValid||d.isValid)&&(T=await x(i,!0)));c&&(_._f.deps&&(!Array.isArray(_._f.deps)||_._f.deps.length>0)&&R(_._f.deps),v(u,T,a,M))}var S},O=(e,t)=>{if(Ne(r.errors,t)&&e.focus)return e.focus(),1},R=async(e,t={})=>{let s,o;const a=ct(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(m(e),e)for(const n of e){const e=Ne(t,n);e?Fe(r.errors,n,e):vt(r.errors,n)}else r.errors=t;return t})(Ce(e)?e:a);s=ft(t),o=e?!a.some(e=>Ne(t,e)):s}else e?(o=(await Promise.all(a.map(async e=>{const t=Ne(i,e);return await x(t&&t._f?{[e]:t}:t)}))).every(Boolean),(o||r.isValid)&&g()):o=s=await x(i);return f.state.next({...!rt(e)||(h.isValid||d.isValid)&&s!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:s}:{},errors:r.errors}),t.shouldFocus&&!o&&Ft(i,O,e?a:l.mount),o},C=(e,t)=>{let n={...a.mount?o:s};return t&&(n=dt(t.dirtyFields?r.dirtyFields:r.touchedFields,n)),Ce(e)?n:rt(e)?Ne(n,e):e.map(e=>Ne(n,e))},P=(e,t)=>({invalid:!!Ne((t||r).errors,e),isDirty:!!Ne((t||r).dirtyFields,e),error:Ne((t||r).errors,e),isValidating:!!Ne(r.validatingFields,e),isTouched:!!Ne((t||r).touchedFields,e)}),M=(e,t,n)=>{const s=(Ne(i,e,{_f:{}})._f||{}).ref,o=Ne(r.errors,e)||{},{ref:a,message:l,type:u,...c}=o;Fe(r.errors,e,{...c,...t,ref:s}),f.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&s&&s.focus&&s.focus()},N=e=>f.state.subscribe({next:t=>{var n,i,a;n=e.name,i=t.name,a=e.exact,n&&i&&n!==i&&!ct(n).some(e=>e&&(a?e===i:e.startsWith(i)||i.startsWith(e)))||!((e,t,n,r)=>{n(e);const{name:i,...s}=e;return ft(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(e=>t[e]===(!r||$e))})(t,e.formState||h,U,e.reRenderRoot)||e.callback({values:{...o},...r,...t,defaultValues:s})}}).unsubscribe,I=(e,t={})=>{for(const a of e?ct(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(vt(i,a),vt(o,a)),!t.keepError&&vt(r.errors,a),!t.keepDirty&&vt(r.dirtyFields,a),!t.keepTouched&&vt(r.touchedFields,a),!t.keepIsValidating&&vt(r.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&vt(s,a);f.state.next({values:Oe(o)}),f.state.next({...r,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&g()},D=({disabled:e,name:t})=>{(Ie(e)&&a.mount||e||l.disabled.has(t))&&(e?l.disabled.add(t):l.disabled.delete(t))},F=(e,t={})=>{let r=Ne(i,e);const o=Ie(t.disabled)||Ie(n.disabled);return Fe(i,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),r?D({disabled:Ie(t.disabled)?t.disabled:n.disabled,name:e}):_(e,!0,t.value),{...o?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:Pt(t.min),max:Pt(t.max),minLength:Pt(t.minLength),maxLength:Pt(t.maxLength),pattern:Pt(t.pattern)}:{},name:e,onChange:k,onBlur:k,ref:o=>{if(o){F(e,t),r=Ne(i,e);const n=Ce(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=(e=>_t(e)||be(e))(n),l=r._f.refs||[];if(a?l.find(e=>e===n):n===r._f.ref)return;Fe(i,e,{_f:{...r._f,...a?{refs:[...l.filter(yt),n,...Array.isArray(Ne(s,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),_(e,!1,void 0,n)}else r=Ne(i,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!Te(l.array,e)||!a.action)&&l.unMount.add(e)}}},z=()=>n.shouldFocusError&&Ft(i,O,l.mount),L=(e,t)=>async s=>{let a;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let u=Oe(o);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await b();m(),r.errors=e,u=Oe(t)}else await x(i);if(l.disabled.size)for(const e of l.disabled)vt(u,e);if(vt(r.errors,"root"),ft(r.errors)){f.state.next({errors:{}});try{await e(u,s)}catch(e){a=e}}else t&&await t({...r.errors},s),z(),setTimeout(z);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ft(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},j=(e,t={})=>{const u=e?Oe(e):s,c=Oe(u),d=ft(e),p=d?s:c;if(t.keepDefaultValues||(s=u),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(wt(s,o))]);for(const t of Array.from(e))Ne(r.dirtyFields,t)?Fe(p,t,Ne(o,t)):T(t,Ne(p,t))}else{if(ke&&Ce(e))for(const e of l.mount){const t=Ne(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(gt(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)T(e,Ne(p,e));else i={}}o=n.shouldUnregister?t.keepDefaultValues?Oe(s):{}:Oe(p),f.array.next({values:{...p}}),f.state.next({values:{...p}})}l={mount:t.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!h.isValid||!!t.keepIsValid||!!t.keepDirtyValues||!n.shouldUnregister&&!ft(p),a.watch=!!n.shouldUnregister,a.keepIsValid=!!t.keepIsValid,a.action=!1,t.keepErrors||(r.errors={}),f.state.next({submitCount:t.keepSubmitCount?r.submitCount:0,isDirty:!d&&(t.keepDirty?r.isDirty:!(!t.keepDefaultValues||ot(e,s))),isSubmitted:!!t.keepIsSubmitted&&r.isSubmitted,dirtyFields:d?{}:t.keepDirtyValues?t.keepDefaultValues&&o?wt(s,o):r.dirtyFields:t.keepDefaultValues&&e?wt(s,e):t.keepDirty?r.dirtyFields:{},touchedFields:t.keepTouched?r.touchedFields:{},errors:t.keepErrors?r.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1,defaultValues:s})},V=(e,t)=>j(De(e)?e(o):e,{...n.resetOptions,...t}),U=e=>{r={...r,...e}},B={control:{register:F,unregister:I,getFieldState:P,handleSubmit:L,setError:M,_subscribe:N,_runSchema:b,_updateIsValidating:m,_focusError:z,_getWatch:A,_getDirty:w,_setValid:g,_setFieldArray:(e,t=[],l,u,c=!0,p=!0)=>{if(u&&l&&!n.disabled){if(a.action=!0,p&&Array.isArray(Ne(i,e))){const t=l(Ne(i,e),u.argA,u.argB);c&&Fe(i,e,t)}if(p&&Array.isArray(Ne(r.errors,e))){const t=l(Ne(r.errors,e),u.argA,u.argB);c&&Fe(r.errors,e,t),((e,t)=>{!Pe(Ne(e,t)).length&&vt(e,t)})(r.errors,e)}if((h.touchedFields||d.touchedFields)&&p&&Array.isArray(Ne(r.touchedFields,e))){const t=l(Ne(r.touchedFields,e),u.argA,u.argB);c&&Fe(r.touchedFields,e,t)}(h.dirtyFields||d.dirtyFields)&&(r.dirtyFields=wt(s,o)),f.state.next({name:e,isDirty:w(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Fe(o,e,t)},_setDisabledField:D,_setErrors:e=>{r.errors=e,f.state.next({errors:r.errors,isValid:!1})},_getFieldArray:e=>Pe(Ne(a.mount?o:s,e,n.shouldUnregister?Ne(s,e,[]):[])),_reset:j,_resetDefaultValues:()=>De(n.defaultValues)&&n.defaultValues().then(e=>{V(e,n.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of l.unMount){const t=Ne(i,e);t&&(t._f.refs?t._f.refs.every(e=>!yt(e)):!yt(t._f.ref))&&I(e)}l.unMount=new Set},_disableForm:e=>{Ie(e)&&(f.state.next({disabled:e}),Ft(i,(t,n)=>{const r=Ne(i,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach(t=>{t.disabled=r._f.disabled||e}))},0,!1))},_subjects:f,_proxyFormState:h,get _fields(){return i},get _formValues(){return o},get _state(){return a},set _state(e){a=e},get _defaultValues(){return s},get _names(){return l},set _names(e){l=e},get _formState(){return r},get _options(){return n},set _options(e){n={...n,...e}}},subscribe:e=>(a.mount=!0,d={...d,...e.formState},N({...e,formState:{...c,...e.formState}})),trigger:R,register:F,handleSubmit:L,watch:(e,t)=>De(e)?f.state.subscribe({next:n=>"values"in n&&e(A(void 0,t),n)}):A(e,t,!0),setValue:T,getValues:C,reset:V,resetField:(e,t={})=>{Ne(i,e)&&(Ce(t.defaultValue)?T(e,Oe(Ne(s,e))):(T(e,t.defaultValue),Fe(s,e,Oe(t.defaultValue))),t.keepTouched||vt(r.touchedFields,e),t.keepDirty||(vt(r.dirtyFields,e),r.isDirty=t.defaultValue?w(e,Oe(Ne(s,e))):w()),t.keepError||(vt(r.errors,e),h.isValid&&g()),f.state.next({...r}))},clearErrors:e=>{e&&ct(e).forEach(e=>vt(r.errors,e)),f.state.next({errors:e?r.errors:{}})},unregister:I,setError:M,setFocus:(e,t={})=>{const n=Ne(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&De(e.select)&&e.select()})}},getFieldState:P};return{...B,formControl:B}}var $t=()=>{if("undefined"!=typeof crypto&&crypto.randomUUID)return crypto.randomUUID();const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)})},qt=(e,t,n={})=>n.shouldFocus||Ce(n.shouldFocus)?n.focusName||`${e}.${Ce(n.focusIndex)?t:n.focusIndex}.`:"",Ht=(e,t)=>[...e,...ct(t)],Wt=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Zt(e,t,n){return[...e.slice(0,t),...ct(n),...e.slice(t)]}var Kt=(e,t,n)=>Array.isArray(e)?(Ce(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],Xt=(e,t)=>[...ct(t),...ct(e)];var Yt=(e,t)=>Ce(t)?[]:function(e,t){let n=0;const r=[...e];for(const e of t)r.splice(e-n,1),n++;return Pe(r).length?r:[]}(e,ct(t).sort((e,t)=>e-t)),Qt=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},Jt=(e,t,n)=>(e[t]=n,e);function en(e){const t=Je(),{control:n=t.control,name:i,keyName:s="id",shouldUnregister:o,rules:a}=e,[l,u]=r.useState(n._getFieldArray(i)),c=r.useRef(n._getFieldArray(i).map($t)),h=r.useRef(!1);n._names.array.add(i),r.useMemo(()=>a&&l.length>=0&&n.register(i,a),[n,i,l.length,a]),nt(()=>n._subjects.array.subscribe({next:({values:e,name:t})=>{if(t===i||!t){const t=Ne(e,i);Array.isArray(t)&&(u(t),c.current=t.map($t))}}}).unsubscribe,[n,i]);const d=r.useCallback(e=>{h.current=!0,n._setFieldArray(i,e)},[n,i]);return r.useEffect(()=>{if(n._state.action=!1,Dt(i,n._names)&&n._subjects.state.next({...n._formState}),h.current&&(!Mt(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!Mt(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([i]).then(e=>{n._updateIsValidating([i]);const t=Ne(e.errors,i),r=Ne(n._formState.errors,i);(r?!t&&r.type||t&&(r.type!==t.type||r.message!==t.message):t&&t.type)&&(t?Fe(n._formState.errors,i,t):vt(n._formState.errors,i),n._subjects.state.next({errors:n._formState.errors}))});else{const e=Ne(n._fields,i);!e||!e._f||Mt(n._options.reValidateMode).isOnSubmit&&Mt(n._options.mode).isOnSubmit||Ut(e,n._names.disabled,n._formValues,n._options.criteriaMode===$e,n._options.shouldUseNativeValidation,!0).then(e=>!ft(e)&&n._subjects.state.next({errors:Lt(n._formState.errors,e,i)}))}n._subjects.state.next({name:i,values:Oe(n._formValues)}),n._names.focus&&Ft(n._fields,(e,t)=>{if(n._names.focus&&t.startsWith(n._names.focus)&&e.focus)return e.focus(),1}),n._names.focus="",n._setValid(),h.current=!1},[l,i,n]),r.useEffect(()=>(!Ne(n._formValues,i)&&n._setFieldArray(i),()=>{n._options.shouldUnregister||o?n.unregister(i):((e,t)=>{const r=Ne(n._fields,e);r&&r._f&&(r._f.mount=t)})(i,!1)}),[i,n,s,o]),{swap:r.useCallback((e,t)=>{const r=n._getFieldArray(i);Qt(r,e,t),Qt(c.current,e,t),d(r),u(r),n._setFieldArray(i,r,Qt,{argA:e,argB:t},!1)},[d,i,n]),move:r.useCallback((e,t)=>{const r=n._getFieldArray(i);Kt(r,e,t),Kt(c.current,e,t),d(r),u(r),n._setFieldArray(i,r,Kt,{argA:e,argB:t},!1)},[d,i,n]),prepend:r.useCallback((e,t)=>{const r=ct(Oe(e)),s=Xt(n._getFieldArray(i),r);n._names.focus=qt(i,0,t),c.current=Xt(c.current,r.map($t)),d(s),u(s),n._setFieldArray(i,s,Xt,{argA:Wt(e)})},[d,i,n]),append:r.useCallback((e,t)=>{const r=ct(Oe(e)),s=Ht(n._getFieldArray(i),r);n._names.focus=qt(i,s.length-1,t),c.current=Ht(c.current,r.map($t)),d(s),u(s),n._setFieldArray(i,s,Ht,{argA:Wt(e)})},[d,i,n]),remove:r.useCallback(e=>{const t=Yt(n._getFieldArray(i),e);c.current=Yt(c.current,e),d(t),u(t),!Array.isArray(Ne(n._fields,i))&&Fe(n._fields,i,void 0),n._setFieldArray(i,t,Yt,{argA:e})},[d,i,n]),insert:r.useCallback((e,t,r)=>{const s=ct(Oe(t)),o=Zt(n._getFieldArray(i),e,s);n._names.focus=qt(i,e,r),c.current=Zt(c.current,e,s.map($t)),d(o),u(o),n._setFieldArray(i,o,Zt,{argA:e,argB:Wt(t)})},[d,i,n]),update:r.useCallback((e,t)=>{const r=Oe(t),s=Jt(n._getFieldArray(i),e,r);c.current=[...s].map((t,n)=>t&&n!==e?c.current[n]:$t()),d(s),u([...s]),n._setFieldArray(i,s,Jt,{argA:e,argB:r},!0,!1)},[d,i,n]),replace:r.useCallback(e=>{const t=ct(Oe(e));c.current=t.map($t),d([...t]),u([...t]),n._setFieldArray(i,[...t],e=>e,{},!0,!1)},[d,i,n]),fields:r.useMemo(()=>l.map((e,t)=>({...e,[s]:c.current[t]||$t()})),[l,s])}}function tn(e={}){const t=r.useRef(void 0),n=r.useRef(void 0),[i,s]=r.useState({isDirty:!1,isValidating:!1,isLoading:De(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:De(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!De(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:n,...r}=Gt(e);t.current={...r,formState:i}}const o=t.current.control;return o._options=e,nt(()=>{const e=o._subscribe({formState:o._proxyFormState,callback:()=>s({...o._formState}),reRenderRoot:!0});return s(e=>({...e,isReady:!0})),o._formState.isReady=!0,e},[o]),r.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),r.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),r.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),r.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),r.useEffect(()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==i.isDirty&&o._subjects.state.next({isDirty:e})}},[o,i.isDirty]),r.useEffect(()=>{var t;e.values&&!ot(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),(null===(t=o._options.resetOptions)||void 0===t?void 0:t.keepIsValid)||o._setValid(),n.current=e.values,s(e=>({...e}))):o._resetDefaultValues()},[o,e.values]),r.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=tt(i,o),t.current}const nn=({sx:t,...n})=>e(Q,{variant:"body1",sx:{color:"var(--color-white)",cursor:"default",...t},...n}),rn=K(W)({padding:0,marginRight:"5px",marginLeft:"10px","& .MuiSvgIcon-root":{color:"var(--color-orange-medium)"}});function sn({label:t,name:r,...i}){const s=n.useId(),{control:o,setValue:a,watch:l}=Je(),u=l(r),c=`${s}-${r}-${String(u)}`;return e(lt,{control:o,name:r,render:({field:n})=>{const{value:r,name:s}=n;return t?e(Z,{color:"white",control:e(rn,{...i,checked:r,onChange:(e,t)=>{a(s,t,{shouldValidate:!0})}}),label:e(nn,{children:t})}):e(rn,{...i,checked:r,onChange:(e,t)=>{a(s,t,{shouldValidate:!0})}})}},c)}function on({form:t,sx:n={},onSubmit:r,children:i}){const{handleSubmit:s}=t;return e(et,{...t,children:e(x,{component:"form",sx:{display:"grid",gap:"15px",...n},onSubmit:s(r),children:i})})}const an=()=>Je(),ln=t=>e(I,{size:"small",...t});function un({name:t,items:r,label:i,sx:s,getLabel:o,getValue:a,getKey:l}){const{watch:u,resetField:c,setValue:h}=Je(),d=u(t),f=n.useId(),p=r.find(e=>a(e)===d)??null;return e(D,{value:p,options:r,id:f,getOptionLabel:e=>o(e),getOptionKey:e=>l(e),sx:{minWidth:150,...s},size:"small",onChange:(e,n)=>{n?h(t,a(n)):c(t)},renderInput:t=>e(ln,{...t,label:i})})}function cn(t){const{name:r,type:i}=t,s=n.useId(),{control:o}=Je();return e(lt,{name:r,control:o,render:({field:n})=>e(ln,{id:s,size:"small",...t,...n,onChange:e=>{const{target:t}=e,{value:r}=t;if("number"===i)""===r?n.onChange():n.onChange(Number(r));else n.onChange(e)}})})}const hn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function dn(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function fn(e){return"nodeType"in e}function pn(e){var t,n;return e?dn(e)?e:fn(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function gn(e){const{Document:t}=pn(e);return e instanceof t}function mn(e){return!dn(e)&&e instanceof pn(e).HTMLElement}function _n(e){return e instanceof pn(e).SVGElement}function yn(e){return e?dn(e)?e.document:fn(e)?gn(e)?e:mn(e)||_n(e)?e.ownerDocument:document:document:document}const vn=hn?i:s;function bn(e){const t=o(e);return vn(()=>{t.current=e}),l(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function xn(e,t){void 0===t&&(t=[e]);const n=o(e);return vn(()=>{n.current!==e&&(n.current=e)},t),n}function wn(e,t){const n=o();return a(()=>{const t=e(n.current);return n.current=t,t},[...t])}function An(e){const t=bn(e),n=o(null),r=l(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,r]}function En(e){const t=o();return s(()=>{t.current=e},[e]),t.current}let Sn={};function Tn(e,t){return a(()=>{if(t)return t;const n=null==Sn[e]?0:Sn[e]+1;return Sn[e]=n,e+"-"+n},[e,t])}function kn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[n,i]of r){const r=t[n];null!=r&&(t[n]=r+e*i)}return t},{...t})}}const On=kn(1),Rn=kn(-1);function Cn(e){if(!e)return!1;const{KeyboardEvent:t}=pn(e.target);return t&&e instanceof t}function Pn(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=pn(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const Mn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Mn.Translate.toString(e),Mn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Nn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function In(e){return e.matches(Nn)?e:e.querySelector(Nn)}const Dn={display:"none"};function Fn(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:Dn},n)}function zn(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;return r.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":i,"aria-atomic":!0},n)}const Ln=c(null);const jn={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},Vn={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Un(e){let{announcements:t=Vn,container:n,hiddenTextDescribedById:i,screenReaderInstructions:o=jn}=e;const{announce:c,announcement:h}=function(){const[e,t]=u("");return{announce:l(e=>{null!=e&&t(e)},[]),announcement:e}}(),d=Tn("DndLiveRegion"),[p,g]=u(!1);if(s(()=>{g(!0)},[]),function(e){const t=f(Ln);s(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(a(()=>({onDragStart(e){let{active:n}=e;c(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&c(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;c(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;c(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;c(t.onDragCancel({active:n,over:r}))}}),[c,t])),!p)return null;const m=r.createElement(r.Fragment,null,r.createElement(Fn,{id:i,value:o.draggable}),r.createElement(zn,{id:d,announcement:h}));return n?ee(m,n):m}var Bn;function Gn(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Bn||(Bn={}));const $n=Object.freeze({x:0,y:0});function qn(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Hn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Wn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Zn(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Kn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=Zn(t,t.left,t.top),s=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=qn(Zn(r),i);s.push({id:t,data:{droppableContainer:e,value:n}})}}return s.sort(Hn)};function Xn(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),o=i-r,a=s-n;if(r<i&&n<s){const n=t.width*t.height,r=e.width*e.height,i=o*a;return Number((i/(n+r-i)).toFixed(4))}return 0}const Yn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const e of r){const{id:r}=e,s=n.get(r);if(s){const n=Xn(s,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(Wn)};function Qn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:$n}function Jn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const er=Jn(1);const tr={ignoreTransform:!1};function nr(e,t){void 0===t&&(t=tr);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=pn(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:i,scaleY:s,x:o,y:a}=r,l=e.left-o-(1-i)*parseFloat(n),u=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?e.width/i:e.width,h=s?e.height/s:e.height;return{width:c,height:h,top:u,right:l+c,bottom:u+h,left:l}}(n,t,r))}const{top:r,left:i,width:s,height:o,bottom:a,right:l}=n;return{top:r,left:i,width:s,height:o,bottom:a,right:l}}function rr(e){return nr(e,{ignoreTransform:!0})}function ir(e,t){const n=[];return e?function r(i){if(null!=t&&n.length>=t)return n;if(!i)return n;if(gn(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!mn(i)||_n(i))return n;if(n.includes(i))return n;const s=pn(e).getComputedStyle(i);return i!==e&&function(e,t){void 0===t&&(t=pn(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(i,s)&&n.push(i),function(e,t){return void 0===t&&(t=pn(e).getComputedStyle(e)),"fixed"===t.position}(i,s)?n:r(i.parentNode)}(e):n}function sr(e){const[t]=ir(e,1);return null!=t?t:null}function or(e){return hn&&e?dn(e)?e:fn(e)?gn(e)||e===yn(e).scrollingElement?window:mn(e)?e:null:null:null}function ar(e){return dn(e)?e.scrollX:e.scrollLeft}function lr(e){return dn(e)?e.scrollY:e.scrollTop}function ur(e){return{x:ar(e),y:lr(e)}}var cr;function hr(e){return!(!hn||!e)&&e===document.scrollingElement}function dr(e){const t={x:0,y:0},n=hr(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(cr||(cr={}));const fr={x:.2,y:.2};function pr(e,t,n,r,i){let{top:s,left:o,right:a,bottom:l}=n;void 0===r&&(r=10),void 0===i&&(i=fr);const{isTop:u,isBottom:c,isLeft:h,isRight:d}=dr(e),f={x:0,y:0},p={x:0,y:0},g=t.height*i.y,m=t.width*i.x;return!u&&s<=t.top+g?(f.y=cr.Backward,p.y=r*Math.abs((t.top+g-s)/g)):!c&&l>=t.bottom-g&&(f.y=cr.Forward,p.y=r*Math.abs((t.bottom-g-l)/g)),!d&&a>=t.right-m?(f.x=cr.Forward,p.x=r*Math.abs((t.right-m-a)/m)):!h&&o<=t.left+m&&(f.x=cr.Backward,p.x=r*Math.abs((t.left+m-o)/m)),{direction:f,speed:p}}function gr(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function mr(e){return e.reduce((e,t)=>On(e,ur(t)),$n)}const _r=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+ar(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+lr(t),0)}]];class yr{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=ir(t),r=mr(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,i]of _r)for(const s of t)Object.defineProperty(this,s,{get:()=>{const t=i(n),o=r[e]-t;return this.rect[s]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class vr{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function br(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var xr,wr;function Ar(e){e.preventDefault()}function Er(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(xr||(xr={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(wr||(wr={}));const Sr={start:[wr.Space,wr.Enter],cancel:[wr.Esc],end:[wr.Space,wr.Enter,wr.Tab]},Tr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case wr.Right:return{...n,x:n.x+25};case wr.Left:return{...n,x:n.x-25};case wr.Down:return{...n,y:n.y+25};case wr.Up:return{...n,y:n.y-25}}};class kr{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new vr(yn(t)),this.windowListeners=new vr(pn(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(xr.Resize,this.handleCancel),this.windowListeners.add(xr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(xr.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=nr),!e)return;const{top:n,left:r,bottom:i,right:s}=t(e);sr(e)&&(i<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t($n)}handleKeyDown(e){if(Cn(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:i=Sr,coordinateGetter:s=Tr,scrollBehavior:o="smooth"}=r,{code:a}=e;if(i.end.includes(a))return void this.handleEnd(e);if(i.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:l}=n.current,u=l?{x:l.left,y:l.top}:$n;this.referenceCoordinates||(this.referenceCoordinates=u);const c=s(e,{active:t,context:n.current,currentCoordinates:u});if(c){const t=Rn(c,u),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(const n of i){const i=e.code,{isTop:s,isRight:a,isLeft:l,isBottom:u,maxScroll:h,minScroll:d}=dr(n),f=gr(n),p={x:Math.min(i===wr.Right?f.right-f.width/2:f.right,Math.max(i===wr.Right?f.left:f.left+f.width/2,c.x)),y:Math.min(i===wr.Down?f.bottom-f.height/2:f.bottom,Math.max(i===wr.Down?f.top:f.top+f.height/2,c.y))},g=i===wr.Right&&!a||i===wr.Left&&!l,m=i===wr.Down&&!u||i===wr.Up&&!s;if(g&&p.x!==c.x){const e=n.scrollLeft+t.x,s=i===wr.Right&&e<=h.x||i===wr.Left&&e>=d.x;if(s&&!t.y)return void n.scrollTo({left:e,behavior:o});r.x=s?n.scrollLeft-e:i===wr.Right?n.scrollLeft-h.x:n.scrollLeft-d.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(m&&p.y!==c.y){const e=n.scrollTop+t.y,s=i===wr.Down&&e<=h.y||i===wr.Up&&e>=d.y;if(s&&!t.x)return void n.scrollTo({top:e,behavior:o});r.y=s?n.scrollTop-e:i===wr.Down?n.scrollTop-h.y:n.scrollTop-d.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,On(Rn(c,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function Or(e){return Boolean(e&&"distance"in e)}function Rr(e){return Boolean(e&&"delay"in e)}kr.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Sr,onActivation:i}=t,{active:s}=n;const{code:o}=e.nativeEvent;if(r.start.includes(o)){const t=s.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==i||i({event:e.nativeEvent}),!0)}return!1}}];class Cr{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=pn(e);return e instanceof t?e:yn(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:s}=i;this.props=e,this.events=t,this.document=yn(s),this.documentListeners=new vr(this.document),this.listeners=new vr(n),this.windowListeners=new vr(pn(s)),this.initialCoordinates=null!=(r=Pn(i))?r:$n,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(xr.Resize,this.handleCancel),this.windowListeners.add(xr.DragStart,Ar),this.windowListeners.add(xr.VisibilityChange,this.handleCancel),this.windowListeners.add(xr.ContextMenu,Ar),this.documentListeners.add(xr.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Rr(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(Or(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(xr.Click,Er,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(xr.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:s,options:{activationConstraint:o}}=i;if(!r)return;const a=null!=(t=Pn(e))?t:$n,l=Rn(r,a);if(!n&&o){if(Or(o)){if(null!=o.tolerance&&br(l,o.tolerance))return this.handleCancel();if(br(l,o.distance))return this.handleStart()}return Rr(o)&&br(l,o.tolerance)?this.handleCancel():void this.handlePending(o,l)}e.cancelable&&e.preventDefault(),s(a)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===wr.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Pr={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Mr extends Cr{constructor(e){const{event:t}=e,n=yn(t.target);super(e,Pr,n)}}Mr.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const Nr={move:{name:"mousemove"},end:{name:"mouseup"}};var Ir;!function(e){e[e.RightClick=2]="RightClick"}(Ir||(Ir={}));(class extends Cr{constructor(e){super(e,Nr,yn(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Ir.RightClick&&(null==r||r({event:n}),!0)}}];const Dr={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var Fr,zr;function Lr(e){let{acceleration:t,activator:n=Fr.Pointer,canScroll:r,draggingRect:i,enabled:u,interval:c=5,order:h=zr.TreeOrder,pointerCoordinates:d,scrollableAncestors:f,scrollableAncestorRects:p,delta:g,threshold:m}=e;const _=function(e){let{delta:t,disabled:n}=e;const r=En(t);return wn(e=>{if(n||!r||!e)return jr;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[cr.Backward]:e.x[cr.Backward]||-1===i.x,[cr.Forward]:e.x[cr.Forward]||1===i.x},y:{[cr.Backward]:e.y[cr.Backward]||-1===i.y,[cr.Forward]:e.y[cr.Forward]||1===i.y}}},[n,t,r])}({delta:g,disabled:!u}),[y,v]=function(){const e=o(null);return[l((t,n)=>{e.current=setInterval(t,n)},[]),l(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),b=o({x:0,y:0}),x=o({x:0,y:0}),w=a(()=>{switch(n){case Fr.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Fr.DraggableRect:return i}},[n,i,d]),A=o(null),E=l(()=>{const e=A.current;if(!e)return;const t=b.current.x*x.current.x,n=b.current.y*x.current.y;e.scrollBy(t,n)},[]),S=a(()=>h===zr.TreeOrder?[...f].reverse():f,[h,f]);s(()=>{if(u&&f.length&&w){for(const e of S){if(!1===(null==r?void 0:r(e)))continue;const n=f.indexOf(e),i=p[n];if(!i)continue;const{direction:s,speed:o}=pr(e,i,w,t,m);for(const e of["x","y"])_[e][s[e]]||(o[e]=0,s[e]=0);if(o.x>0||o.y>0)return v(),A.current=e,y(E,c),b.current=o,void(x.current=s)}b.current={x:0,y:0},x.current={x:0,y:0},v()}else v()},[t,E,r,v,u,c,JSON.stringify(w),JSON.stringify(_),y,f,S,p,JSON.stringify(m)])}(class extends Cr{constructor(e){super(e,Dr)}static setup(){return window.addEventListener(Dr.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Dr.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return!(i.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Fr||(Fr={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(zr||(zr={}));const jr={x:{[cr.Backward]:!1,[cr.Forward]:!1},y:{[cr.Backward]:!1,[cr.Forward]:!1}};var Vr,Ur;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Vr||(Vr={})),function(e){e.Optimized="optimized"}(Ur||(Ur={}));const Br=new Map;function Gr(e,t){return wn(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function $r(e){let{callback:t,disabled:n}=e;const r=bn(t),i=a(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)},[n]);return s(()=>()=>null==i?void 0:i.disconnect(),[i]),i}function qr(e){return new yr(nr(e),e)}function Hr(e,t,n){void 0===t&&(t=qr);const[r,i]=u(null);function o(){i(r=>{if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=r?r:n)?i:null;const s=t(e);return JSON.stringify(r)===JSON.stringify(s)?r:s})}const l=function(e){let{callback:t,disabled:n}=e;const r=bn(t),i=a(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)},[r,n]);return s(()=>()=>null==i?void 0:i.disconnect(),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),c=$r({callback:o});return vn(()=>{o(),e?(null==c||c.observe(e),null==l||l.observe(document.body,{childList:!0,subtree:!0})):(null==c||c.disconnect(),null==l||l.disconnect())},[e]),r}const Wr=[];function Zr(e,t){void 0===t&&(t=[]);const n=o(null);return s(()=>{n.current=null},t),s(()=>{const t=e!==$n;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?Rn(e,n.current):$n}function Kr(e){return a(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const Xr=[];function Yr(e){let{measure:t}=e;const[n,r]=u(null),i=l(e=>{for(const{target:n}of e)if(mn(n)){r(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t]),s=$r({callback:i}),o=l(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return mn(t)?t:e}(e);null==s||s.disconnect(),n&&(null==s||s.observe(n)),r(n?t(n):null)},[t,s]),[c,h]=An(o);return a(()=>({nodeRef:c,rect:n,setRef:h}),[n,c,h])}const Qr=[{sensor:Mr,options:{}},{sensor:kr,options:{}}],Jr={current:{}},ei={draggable:{measure:rr},droppable:{measure:rr,strategy:Vr.WhileDragging,frequency:Ur.Optimized},dragOverlay:{measure:nr}};class ti extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const ni={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ti,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Gn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ei,measureDroppableContainers:Gn,windowRect:null,measuringScheduled:!1},ri=c({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Gn,draggableNodes:new Map,over:null,measureDroppableContainers:Gn}),ii=c(ni);function si(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ti}}}function oi(e,t){switch(t.type){case Bn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Bn.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Bn.DragEnd:case Bn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Bn.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new ti(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Bn.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const o=new ti(e.droppable.containers);return o.set(n,{...s,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case Bn.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const s=new ti(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function ai(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=f(ri),o=En(r),a=En(null==n?void 0:n.id);return s(()=>{if(!t&&!r&&o&&null!=a){if(!Cn(o))return;if(document.activeElement===o.target)return;const e=i.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=In(e);if(t){t.focus();break}}})}},[r,t,i,a,o]),null}const li=c({...$n,scaleX:1,scaleY:1});var ui;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(ui||(ui={}));const ci=h(function(e){var t,n,i,c;let{id:h,accessibility:f,autoScroll:p=!0,children:g,sensors:m=Qr,collisionDetection:_=Yn,measuring:y,modifiers:v,...b}=e;const x=d(oi,void 0,si),[w,A]=x,[E,S]=function(){const[e]=u(()=>new Set),t=l(t=>(e.add(t),()=>e.delete(t)),[e]);return[l(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[T,k]=u(ui.Uninitialized),O=T===ui.Initialized,{draggable:{active:R,nodes:C,translate:P},droppable:{containers:M}}=w,N=null!=R?C.get(R):null,I=o({initial:null,translated:null}),D=a(()=>{var e;return null!=R?{id:R,data:null!=(e=null==N?void 0:N.data)?e:Jr,rect:I}:null},[R,N]),F=o(null),[z,L]=u(null),[j,V]=u(null),U=xn(b,Object.values(b)),B=Tn("DndDescribedBy",h),G=a(()=>M.getEnabled(),[M]),$=a(()=>({draggable:{...ei.draggable,...null==q?void 0:q.draggable},droppable:{...ei.droppable,...null==q?void 0:q.droppable},dragOverlay:{...ei.dragOverlay,...null==q?void 0:q.dragOverlay}}),[null==(q=y)?void 0:q.draggable,null==q?void 0:q.droppable,null==q?void 0:q.dragOverlay]);var q;const{droppableRects:H,measureDroppableContainers:W,measuringScheduled:Z}=function(e,t){let{dragging:n,dependencies:r,config:i}=t;const[a,c]=u(null),{frequency:h,measure:d,strategy:f}=i,p=o(e),g=function(){switch(f){case Vr.Always:return!1;case Vr.BeforeDragging:return n;default:return!n}}(),m=xn(g),_=l(function(e){void 0===e&&(e=[]),m.current||c(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[m]),y=o(null),v=wn(t=>{if(g&&!n)return Br;if(!t||t===Br||p.current!==e||null!=a){const t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new yr(d(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,g,d]);return s(()=>{p.current=e},[e]),s(()=>{g||_()},[n,g]),s(()=>{a&&a.length>0&&c(null)},[JSON.stringify(a)]),s(()=>{g||"number"!=typeof h||null!==y.current||(y.current=setTimeout(()=>{_(),y.current=null},h))},[h,g,_,...r]),{droppableRects:v,measureDroppableContainers:_,measuringScheduled:null!=a}}(G,{dragging:O,dependencies:[P.x,P.y],config:$.droppable}),K=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return wn(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(C,R),X=a(()=>j?Pn(j):null,[j]),Y=function(){const e=!1===(null==z?void 0:z.autoScrollEnabled),t="object"==typeof p?!1===p.enabled:!1===p,n=O&&!e&&!t;if("object"==typeof p)return{...p,enabled:n};return{enabled:n}}(),Q=function(e,t){return Gr(e,t)}(K,$.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const s=o(!1),{x:a,y:l}="boolean"==typeof i?{x:i,y:i}:i;vn(()=>{if(!a&&!l||!t)return void(s.current=!1);if(s.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const i=Qn(n(e),r);if(a||(i.x=0),l||(i.y=0),s.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){const t=sr(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,a,l,r,n])}({activeNode:null!=R?C.get(R):null,config:Y.layoutShiftCompensation,initialRect:Q,measure:$.draggable.measure});const ee=Hr(K,$.draggable.measure,Q),te=Hr(K?K.parentElement:null),ne=o({activatorEvent:null,active:null,activeNode:K,collisionRect:null,collisions:null,droppableRects:H,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),re=M.getNodeFor(null==(t=ne.current.over)?void 0:t.id),ie=Yr({measure:$.dragOverlay.measure}),se=null!=(n=ie.nodeRef.current)?n:K,oe=O?null!=(i=ie.rect)?i:ee:null,ae=Boolean(ie.nodeRef.current&&ie.rect),le=Qn(ue=ae?null:ee,Gr(ue));var ue;const ce=Kr(se?pn(se):null),he=function(e){const t=o(e),n=wn(n=>e?n&&n!==Wr&&e&&t.current&&e.parentNode===t.current.parentNode?n:ir(e):Wr,[e]);return s(()=>{t.current=e},[e]),n}(O?null!=re?re:K:null),de=function(e,t){void 0===t&&(t=nr);const[n]=e,r=Kr(n?pn(n):null),[i,s]=u(Xr);function o(){s(()=>e.length?e.map(e=>hr(e)?r:new yr(t(e),e)):Xr)}const a=$r({callback:o});return vn(()=>{null==a||a.disconnect(),o(),e.forEach(e=>null==a?void 0:a.observe(e))},[e]),i}(he),fe=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}(v,{transform:{x:P.x-le.x,y:P.y-le.y,scaleX:1,scaleY:1},activatorEvent:j,active:D,activeNodeRect:ee,containerNodeRect:te,draggingNodeRect:oe,over:ne.current.over,overlayNodeRect:ie.rect,scrollableAncestors:he,scrollableAncestorRects:de,windowRect:ce}),pe=X?On(X,P):null,ge=function(e){const[t,n]=u(null),r=o(e),i=l(e=>{const t=or(e.target);t&&n(e=>e?(e.set(t,ur(t)),new Map(e)):null)},[]);return s(()=>{const t=r.current;if(e!==t){s(t);const o=e.map(e=>{const t=or(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,ur(t)]):null}).filter(e=>null!=e);n(o.length?new Map(o):null),r.current=e}return()=>{s(e),s(t)};function s(e){e.forEach(e=>{const t=or(e);null==t||t.removeEventListener("scroll",i)})}},[i,e]),a(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>On(e,t),$n):mr(e):$n,[e,t])}(he),me=Zr(ge),_e=Zr(ge,[ee]),ye=On(fe,me),ve=oe?er(oe,fe):null,be=D&&ve?_({active:D,collisionRect:ve,droppableRects:H,droppableContainers:G,pointerCoordinates:pe}):null,xe=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}(be,"id"),[we,Ae]=u(null),Ee=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ae?fe:On(fe,_e),null!=(c=null==we?void 0:we.rect)?c:null,ee),Se=o(null),Te=l((e,t)=>{let{sensor:n,options:r}=t;if(null==F.current)return;const i=C.get(F.current);if(!i)return;const s=e.nativeEvent,o=new n({active:F.current,activeNode:i,event:s,options:r,context:ne,onAbort(e){if(!C.get(e))return;const{onDragAbort:t}=U.current,n={id:e};null==t||t(n),E({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!C.get(e))return;const{onDragPending:i}=U.current,s={id:e,constraint:t,initialCoordinates:n,offset:r};null==i||i(s),E({type:"onDragPending",event:s})},onStart(e){const t=F.current;if(null==t)return;const n=C.get(t);if(!n)return;const{onDragStart:r}=U.current,i={activatorEvent:s,active:{id:t,data:n.data,rect:I}};J(()=>{null==r||r(i),k(ui.Initializing),A({type:Bn.DragStart,initialCoordinates:e,active:t}),E({type:"onDragStart",event:i}),L(Se.current),V(s)})},onMove(e){A({type:Bn.DragMove,coordinates:e})},onEnd:a(Bn.DragEnd),onCancel:a(Bn.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ne.current;let o=null;if(t&&i){const{cancelDrop:a}=U.current;if(o={activatorEvent:s,active:t,collisions:n,delta:i,over:r},e===Bn.DragEnd&&"function"==typeof a){await Promise.resolve(a(o))&&(e=Bn.DragCancel)}}F.current=null,J(()=>{A({type:e}),k(ui.Uninitialized),Ae(null),L(null),V(null),Se.current=null;const t=e===Bn.DragEnd?"onDragEnd":"onDragCancel";if(o){const e=U.current[t];null==e||e(o),E({type:t,event:o})}})}}Se.current=o},[C]),ke=l((e,t)=>(n,r)=>{const i=n.nativeEvent,s=C.get(r);if(null!==F.current||!s||i.dndKit||i.defaultPrevented)return;const o={active:s};!0===e(n,t.options,o)&&(i.dndKit={capturedBy:t.sensor},F.current=r,Te(n,t))},[C,Te]),Oe=function(e,t){return a(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(m,ke);!function(e){s(()=>{if(!hn)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(m),vn(()=>{ee&&T===ui.Initializing&&k(ui.Initialized)},[ee,T]),s(()=>{const{onDragMove:e}=U.current,{active:t,activatorEvent:n,collisions:r,over:i}=ne.current;if(!t||!n)return;const s={active:t,activatorEvent:n,collisions:r,delta:{x:ye.x,y:ye.y},over:i};J(()=>{null==e||e(s),E({type:"onDragMove",event:s})})},[ye.x,ye.y]),s(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ne.current;if(!e||null==F.current||!t||!i)return;const{onDragOver:s}=U.current,o=r.get(xe),a=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:a};J(()=>{Ae(a),null==s||s(l),E({type:"onDragOver",event:l})})},[xe]),vn(()=>{ne.current={activatorEvent:j,active:D,activeNode:K,collisionRect:ve,collisions:be,droppableRects:H,draggableNodes:C,draggingNode:se,draggingNodeRect:oe,droppableContainers:M,over:we,scrollableAncestors:he,scrollAdjustedTranslate:ye},I.current={initial:oe,translated:ve}},[D,K,be,ve,C,se,oe,H,M,we,he,ye]),Lr({...Y,delta:P,draggingRect:ve,pointerCoordinates:pe,scrollableAncestors:he,scrollableAncestorRects:de});const Re=a(()=>({active:D,activeNode:K,activeNodeRect:ee,activatorEvent:j,collisions:be,containerNodeRect:te,dragOverlay:ie,draggableNodes:C,droppableContainers:M,droppableRects:H,over:we,measureDroppableContainers:W,scrollableAncestors:he,scrollableAncestorRects:de,measuringConfiguration:$,measuringScheduled:Z,windowRect:ce}),[D,K,ee,j,be,te,ie,C,M,H,we,W,he,de,$,Z,ce]),Ce=a(()=>({activatorEvent:j,activators:Oe,active:D,activeNodeRect:ee,ariaDescribedById:{draggable:B},dispatch:A,draggableNodes:C,over:we,measureDroppableContainers:W}),[j,Oe,D,ee,A,B,C,we,W]);return r.createElement(Ln.Provider,{value:S},r.createElement(ri.Provider,{value:Ce},r.createElement(ii.Provider,{value:Re},r.createElement(li.Provider,{value:Ee},g)),r.createElement(ai,{disabled:!1===(null==f?void 0:f.restoreFocus)})),r.createElement(Un,{...f,hiddenTextDescribedById:B}))}),hi=c(null),di="button";function fi(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const s=Tn("Draggable"),{activators:o,activatorEvent:l,active:u,activeNodeRect:c,ariaDescribedById:h,draggableNodes:d,over:p}=f(ri),{role:g=di,roleDescription:m="draggable",tabIndex:_=0}=null!=i?i:{},y=(null==u?void 0:u.id)===t,v=f(y?li:hi),[b,x]=An(),[w,A]=An(),E=function(e,t){return a(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}(o,t),S=xn(n);vn(()=>(d.set(t,{id:t,key:s,node:b,activatorNode:w,data:S}),()=>{const e=d.get(t);e&&e.key===s&&d.delete(t)}),[d,t]);return{active:u,activatorEvent:l,activeNodeRect:c,attributes:a(()=>({role:g,tabIndex:_,"aria-disabled":r,"aria-pressed":!(!y||g!==di)||void 0,"aria-roledescription":m,"aria-describedby":h.draggable}),[r,g,_,y,m,h.draggable]),isDragging:y,listeners:r?void 0:E,node:b,over:p,setNodeRef:x,setActivatorNodeRef:A,transform:v}}const pi={timeout:25};function gi(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function mi(e,t){return e.reduce((e,n,r)=>{const i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function _i(e){return null!==e&&e>=0}const yi=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const s=gi(t,r,n),o=t[i],a=s[i];return a&&o?{x:a.left-o.left,y:a.top-o.top,scaleX:a.width/o.width,scaleY:a.height/o.height}:null},vi={scaleX:1,scaleY:1},bi=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:s,overIndex:o}=e;const a=null!=(t=s[n])?t:r;if(!a)return null;if(i===n){const e=s[o];return e?{x:0,y:n<o?e.top+e.height-(a.top+a.height):e.top-a.top,...vi}:null}const l=function(e,t,n){const r=e[t],i=e[t-1],s=e[t+1];if(!r)return 0;if(n<t)return i?r.top-(i.top+i.height):s?s.top-(r.top+r.height):0;return s?s.top-(r.top+r.height):i?r.top-(i.top+i.height):0}(s,i,n);return i>n&&i<=o?{x:0,y:-a.height-l,...vi}:i<n&&i>=o?{x:0,y:a.height+l,...vi}:{x:0,y:0,...vi}};const xi="Sortable",wi=r.createContext({activeIndex:-1,containerId:xi,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:yi,disabled:{draggable:!1,droppable:!1}});function Ai(e){let{children:t,id:n,items:i,strategy:l=yi,disabled:u=!1}=e;const{active:c,dragOverlay:h,droppableRects:d,over:p,measureDroppableContainers:g}=f(ii),m=Tn(xi,n),_=Boolean(null!==h.rect),y=a(()=>i.map(e=>"object"==typeof e&&"id"in e?e.id:e),[i]),v=null!=c,b=c?y.indexOf(c.id):-1,x=p?y.indexOf(p.id):-1,w=o(y),A=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(y,w.current),E=-1!==x&&-1===b||A,S=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);vn(()=>{A&&v&&g(y)},[A,y,v,g]),s(()=>{w.current=y},[y]);const T=a(()=>({activeIndex:b,containerId:m,disabled:S,disableTransforms:E,items:y,overIndex:x,useDragOverlay:_,sortedRects:mi(y,d),strategy:l}),[b,m,S.draggable,S.droppable,E,y,x,d,_,l]);return r.createElement(wi.Provider,{value:T},t)}const Ei=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return gi(n,r,i).indexOf(t)},Si=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:s,newIndex:o,previousItems:a,previousContainerId:l,transition:u}=e;return!(!u||!r)&&((a===s||i!==o)&&(!!n||o!==i&&t===l))},Ti={duration:200,easing:"ease"},ki="transform",Oi=Mn.Transition.toString({property:ki,duration:0,easing:"linear"}),Ri={roleDescription:"sortable"};function Ci(e){let{animateLayoutChanges:t=Si,attributes:n,disabled:r,data:i,getNewIndex:c=Ei,id:h,strategy:d,resizeObserverConfig:p,transition:g=Ti}=e;const{items:m,containerId:_,activeIndex:y,disabled:v,disableTransforms:b,sortedRects:x,overIndex:w,useDragOverlay:A,strategy:E}=f(wi),S=function(e,t){var n,r;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,v),T=m.indexOf(h),k=a(()=>({sortable:{containerId:_,index:T,items:m},...i}),[_,i,T,m]),O=a(()=>m.slice(m.indexOf(h)),[m,h]),{rect:R,node:C,isOver:P,setNodeRef:M}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const a=Tn("Droppable"),{active:u,dispatch:c,over:h,measureDroppableContainers:d}=f(ri),p=o({disabled:n}),g=o(!1),m=o(null),_=o(null),{disabled:y,updateMeasurementsFor:v,timeout:b}={...pi,...i},x=xn(null!=v?v:r),w=$r({callback:l(()=>{g.current?(null!=_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{d(Array.isArray(x.current)?x.current:[x.current]),_.current=null},b)):g.current=!0},[b]),disabled:y||!u}),A=l((e,t)=>{w&&(t&&(w.unobserve(t),g.current=!1),e&&w.observe(e))},[w]),[E,S]=An(A),T=xn(t);return s(()=>{w&&E.current&&(w.disconnect(),g.current=!1,w.observe(E.current))},[E,w]),s(()=>(c({type:Bn.RegisterDroppable,element:{id:r,key:a,disabled:n,node:E,rect:m,data:T}}),()=>c({type:Bn.UnregisterDroppable,key:a,id:r})),[r]),s(()=>{n!==p.current.disabled&&(c({type:Bn.SetDroppableDisabled,id:r,key:a,disabled:n}),p.current.disabled=n)},[r,a,n,c]),{active:u,rect:m,isOver:(null==h?void 0:h.id)===r,node:E,over:h,setNodeRef:S}}({id:h,data:k,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...p}}),{active:N,activatorEvent:I,activeNodeRect:D,attributes:F,setNodeRef:z,listeners:L,isDragging:j,over:V,setActivatorNodeRef:U,transform:B}=fi({id:h,data:k,attributes:{...Ri,...n},disabled:S.draggable}),G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a(()=>e=>{t.forEach(t=>t(e))},t)}(M,z),$=Boolean(N),q=$&&!b&&_i(y)&&_i(w),H=!A&&j,W=H&&q?B:null,Z=q?null!=W?W:(null!=d?d:E)({rects:x,activeNodeRect:D,activeIndex:y,overIndex:w,index:T}):null,K=_i(y)&&_i(w)?c({id:h,items:m,activeIndex:y,overIndex:w}):T,X=null==N?void 0:N.id,Y=o({activeId:X,items:m,newIndex:K,containerId:_}),Q=m!==Y.current.items,J=t({active:N,containerId:_,isDragging:j,isSorting:$,id:h,index:T,items:m,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:g,wasDragging:null!=Y.current.activeId}),ee=function(e){let{disabled:t,index:n,node:r,rect:i}=e;const[a,l]=u(null),c=o(n);return vn(()=>{if(!t&&n!==c.current&&r.current){const e=i.current;if(e){const t=nr(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&l(n)}}n!==c.current&&(c.current=n)},[t,n,r,i]),s(()=>{a&&l(null)},[a]),a}({disabled:!J,index:T,node:C,rect:R});return s(()=>{$&&Y.current.newIndex!==K&&(Y.current.newIndex=K),_!==Y.current.containerId&&(Y.current.containerId=_),m!==Y.current.items&&(Y.current.items=m)},[$,K,_,m]),s(()=>{if(X===Y.current.activeId)return;if(null!=X&&null==Y.current.activeId)return void(Y.current.activeId=X);const e=setTimeout(()=>{Y.current.activeId=X},50);return()=>clearTimeout(e)},[X]),{active:N,activeIndex:y,attributes:F,data:k,rect:R,index:T,newIndex:K,items:m,isOver:P,isSorting:$,isDragging:j,listeners:L,node:C,overIndex:w,over:V,setNodeRef:G,setActivatorNodeRef:U,setDroppableNodeRef:M,setDraggableNodeRef:z,transform:null!=ee?ee:Z,transition:function(){if(ee||Q&&Y.current.newIndex===T)return Oi;if(H&&!Cn(I)||!g)return;if($||J)return Mn.Transition.toString({...g,property:ki});return}()}}wr.Down,wr.Right,wr.Up,wr.Left;const Pi=({id:t,sx:n,children:r})=>{const{isDragging:i}=fi({id:t}),{attributes:s,listeners:o,setNodeRef:a,transform:l,transition:u}=Ci({id:t,strategy:bi,transition:{duration:300,easing:"cubic-bezier(0.25, 1, 0.5, 1)"}}),c={...n?.default,...i?n?.dragging:{},transform:Mn.Translate.toString(l),transition:u,cursor:"pointer"};return e(x,{ref:a,style:c,...o,...s,children:r})};function Mi({items:t,getItem:n,getId:r,onDragEnd:i,sx:s,title:o,draggableSx:l}){const u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a(()=>[...t].filter(e=>null!=e),[...t])}(a(()=>({sensor:c,options:null!=h?h:{}}),[c=Mr,h={activationConstraint:{distance:8}}]));var c,h;return e(ci,{sensors:u,collisionDetection:Kn,onDragEnd:e=>{const{active:n,over:s}=e,o=t.findIndex(e=>r(e)===n.id),a=t.findIndex(e=>r(e)===s?.id),l=gi(t,o,a);i(l)},children:e(Ai,{items:t.map(r),strategy:bi,children:e(de,{items:t,sx:s,title:o,getKey:r,getContent:(t,i)=>{const s=r(t);return e(Pi,{id:s,sx:l,children:n(t,i)},s)}})})})}const Ni=c(null);function Ii(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Di(){return function(){const e=p(Ni);if(null==e)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}().map}var Fi,zi;var Li=(zi||(zi=1,Fi=function(){const e=["a","b","c","d","e","f","0","1","2","3","4","5","6","7","8","9"];let t=[];for(let n=0;n<36;n++)t[n]=8===n||13===n||18===n||23===n?"-":e[Math.ceil(Math.random()*e.length-1)];return t.join("")}),Fi),ji=Ii(Li);function Vi(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Vi(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ui(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Vi(e))&&(r&&(r+=" "),r+=t);return r}let Bi={data:""},Gi=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,$i=/\/\*[^]*?\*\/| +/g,qi=/\n+/g,Hi=(e,t)=>{let n="",r="",i="";for(let s in e){let o=e[s];"@"==s[0]?"i"==s[1]?n=s+" "+o+";":r+="f"==s[1]?Hi(o,s):s+"{"+Hi(o,"k"==s[1]?"":t)+"}":"object"==typeof o?r+=Hi(o,t?t.replace(/([^,])+/g,e=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):s):null!=o&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Hi.p?Hi.p(s,o):s+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Wi={},Zi=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+Zi(e[n]);return t}return e},Ki=(e,t,n,r,i)=>{let s=Zi(e),o=Wi[s]||(Wi[s]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(s));if(!Wi[o]){let t=s!==e?e:(e=>{let t,n,r=[{}];for(;t=Gi.exec(e.replace($i,""));)t[4]?r.shift():t[3]?(n=t[3].replace(qi," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(qi," ").trim();return r[0]})(e);Wi[o]=Hi(i?{["@keyframes "+o]:t}:t,n?"":"."+o)}let a=n&&Wi.g?Wi.g:null;return n&&(Wi.g=Wi[o]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(Wi[o],t,r,a),o};function Xi(e){let t=this||{},n=e.call?e(t.p):e;return Ki(n.unshift?n.raw?((e,t,n)=>e.reduce((e,r,i)=>{let s=t[i];if(s&&s.call){let e=s(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;s=t?"."+t:e&&"object"==typeof e?e.props?"":Hi(e,""):!1===e?"":e}return e+r+(null==s?"":s)},""))(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Bi})(t.target),t.g,t.o,t.k)}function Yi(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function Qi(){return Qi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qi.apply(this,arguments)}function Ji(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function es(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function ts(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Xi.bind({g:1}),Xi.bind({k:1});var ns=function(){return""},rs=r.createContext({enqueueSnackbar:ns,closeSnackbar:ns}),is="@media (max-width:599.95px)",ss="@media (min-width:600px)",os=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},as=function(e){return""+os(e.vertical)+os(e.horizontal)},ls=function(e){return!!e||0===e},us="unmounted",cs="exited",hs="entering",ds="entered",fs="exiting",ps=function(e){function t(t){var n;n=e.call(this,t)||this;var r,i=t.appear;return n.appearStatus=null,t.in?i?(r=cs,n.appearStatus=hs):r=ds:r=t.unmountOnExit||t.mountOnEnter?us:cs,n.state={status:r},n.nextCallback=null,n}Ji(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===us?{status:cs}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==hs&&n!==ds&&(t=hs):n!==hs&&n!==ds||(t=fs)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===hs?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===cs&&this.setState({status:us})},n.performEnter=function(e){var t=this,n=this.props.enter,r=e,i=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,r),this.safeSetState({status:hs},function(){t.props.onEntering&&t.props.onEntering(t.node,r),t.onTransitionEnd(i.enter,function(){t.safeSetState({status:ds},function(){t.props.onEntered&&t.props.onEntered(t.node,r)})})})):this.safeSetState({status:ds},function(){t.props.onEntered&&t.props.onEntered(t.node,r)})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:fs},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:cs},function(){e.props.onExited&&e.props.onExited(e.node)})})})):this.safeSetState({status:cs},function(){e.props.onExited&&e.props.onExited(e.node)})},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;this.node&&!n?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===us)return null;var t=this.props;return(0,t.children)(e,es(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},Yi(t,[{key:"node",get:function(){var e,t=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!t)throw new Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(r.Component);function gs(){}function ms(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function _s(e,t){return a(function(){return null==e&&null==t?null:function(n){ms(e,n),ms(t,n)}},[e,t])}function ys(e){var t=e.timeout,n=e.style,r=void 0===n?{}:n,i=e.mode;return{duration:"object"==typeof t?t[i]||0:t,easing:r.transitionTimingFunction,delay:r.transitionDelay}}ps.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:gs,onEntering:gs,onEntered:gs,onExit:gs,onExiting:gs,onExited:gs};var vs="cubic-bezier(0.4, 0, 0.2, 1)",bs="cubic-bezier(0.0, 0, 0.2, 1)",xs="cubic-bezier(0.4, 0, 0.6, 1)",ws=function(e){e.scrollTop=e.scrollTop},As=function(e){return Math.round(e)+"ms"};function Es(e,t){void 0===e&&(e=["all"]);var n=t||{},r=n.duration,i=void 0===r?300:r,s=n.easing,o=void 0===s?vs:s,a=n.delay,l=void 0===a?0:a;return(Array.isArray(e)?e:[e]).map(function(e){var t="string"==typeof i?i:As(i),n="string"==typeof l?l:As(l);return e+" "+t+" "+o+" "+n}).join(",")}function Ss(e){var t=function(e){return e&&e.ownerDocument||document}(e);return t.defaultView||window}function Ts(e,t){if(t){var n=function(e,t){var n,r=t.getBoundingClientRect(),i=Ss(t);if(t.fakeTransform)n=t.fakeTransform;else{var s=i.getComputedStyle(t);n=s.getPropertyValue("-webkit-transform")||s.getPropertyValue("transform")}var o=0,a=0;if(n&&"none"!==n&&"string"==typeof n){var l=n.split("(")[1].split(")")[0].split(",");o=parseInt(l[4],10),a=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(i.innerWidth+o-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-o)+"px)";case"up":return"translateY("+(i.innerHeight+a-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-a)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var ks=g(function(e,t){var n=e.children,r=e.direction,i=void 0===r?"down":r,a=e.in,u=e.style,c=e.timeout,h=void 0===c?0:c,d=e.onEnter,f=e.onEntered,p=e.onExit,g=e.onExited,y=es(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),v=o(null),b=_s(n.ref,v),x=_s(b,t),w=l(function(){v.current&&Ts(i,v.current)},[i]);return s(function(){if(!a&&"down"!==i&&"right"!==i){var e=function(e,t){var n;function r(){for(var r=this,i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];clearTimeout(n),n=setTimeout(function(){e.apply(r,s)},t)}return void 0===t&&(t=166),r.clear=function(){clearTimeout(n)},r}(function(){v.current&&Ts(i,v.current)}),t=Ss(v.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}},[i,a]),s(function(){a||w()},[a,w]),m(ps,Object.assign({appear:!0,nodeRef:v,onEnter:function(e,t){Ts(i,e),ws(e),d&&d(e,t)},onEntered:f,onEntering:function(e){var t=(null==u?void 0:u.transitionTimingFunction)||bs,n=ys({timeout:h,mode:"enter",style:Qi({},u,{transitionTimingFunction:t})});e.style.webkitTransition=Es("-webkit-transform",n),e.style.transition=Es("transform",n),e.style.webkitTransform="none",e.style.transform="none"},onExit:function(e){var t=(null==u?void 0:u.transitionTimingFunction)||xs,n=ys({timeout:h,mode:"exit",style:Qi({},u,{transitionTimingFunction:t})});e.style.webkitTransition=Es("-webkit-transform",n),e.style.transition=Es("transform",n),Ts(i,e),p&&p(e)},onExited:function(e){e.style.webkitTransition="",e.style.transition="",g&&g(e)},in:a,timeout:h},y),function(e,t){return _(n,Qi({ref:x,style:Qi({visibility:"exited"!==e||a?void 0:"hidden"},u,{},n.props.style)},t))})});ks.displayName="Slide";var Os=function(e){return r.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},Rs=function(){return r.createElement(Os,null,r.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},Cs=function(){return r.createElement(Os,null,r.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},Ps=function(){return r.createElement(Os,null,r.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},Ms=function(){return r.createElement(Os,null,r.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},Ns={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:r.createElement(Rs,null),warning:r.createElement(Cs,null),error:r.createElement(Ps,null),info:r.createElement(Ms,null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:ks,transitionDuration:{enter:225,exit:195}},Is=function(e,t){return function(n,r){return void 0===r&&(r=!1),r?Qi({},Ns[n],{},t[n],{},e[n]):"autoHideDuration"===n?(i=e.autoHideDuration,s=t.autoHideDuration,(o=function(e){return"number"==typeof e||null===e})(i)?i:o(s)?s:Ns.autoHideDuration):"transitionDuration"===n?function(e,t){var n=function(e,t){return t.some(function(t){return typeof e===t})};return n(e,["string","number"])?e:n(e,["object"])?Qi({},Ns.transitionDuration,{},n(t,["object"])&&t,{},e):n(t,["string","number"])?t:n(t,["object"])?Qi({},Ns.transitionDuration,{},t):Ns.transitionDuration}(e.transitionDuration,t.transitionDuration):e[n]||t[n]||Ns[n];var i,s,o}};function Ds(e){return Object.entries(e).reduce(function(e,t){var n,r=t[0],i=t[1];return Qi({},e,((n={})[r]=Xi(i),n))},{})}var Fs="notistack-SnackbarContainer",zs="notistack-Snackbar",Ls="notistack-CollapseWrapper",js="notistack-MuiContent",Vs=function(e){return"notistack-MuiContent-"+e},Us=Ds({root:{height:0},entered:{height:"auto"}}),Bs="0px",Gs=g(function(e,t){var n=e.children,r=e.in,i=e.onExited,s=o(null),a=o(null),l=_s(t,a),u=function(){return s.current?s.current.clientHeight:0};return m(ps,{in:r,unmountOnExit:!0,onEnter:function(e){e.style.height=Bs},onEntered:function(e){e.style.height="auto"},onEntering:function(e){var t=u(),n=ys({timeout:175,mode:"enter"}),r=n.duration,i=n.easing;e.style.transitionDuration="string"==typeof r?r:r+"ms",e.style.height=t+"px",e.style.transitionTimingFunction=i||""},onExit:function(e){e.style.height=u()+"px"},onExited:i,onExiting:function(e){ws(e);var t=ys({timeout:175,mode:"exit"}),n=t.duration,r=t.easing;e.style.transitionDuration="string"==typeof n?n:n+"ms",e.style.height=Bs,e.style.transitionTimingFunction=r||""},nodeRef:a,timeout:175},function(e,t){return m("div",Object.assign({ref:l,className:Ui(Us.root,"entered"===e&&Us.entered),style:Qi({pointerEvents:"all",overflow:"hidden",minHeight:Bs,transition:Es("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!r&&{visibility:"hidden"})},t),m("div",{ref:s,className:Ls,style:{display:"flex",width:"100%"}},n))})});Gs.displayName="Collapse";var $s={right:"left",left:"right",bottom:"up",top:"down"},qs=function(e){return"anchorOrigin"+as(e)},Hs=function(){};function Ws(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];var o=[].concat(i);t&&-1===o.indexOf(t)&&o.push(t),e.apply(this,o),n.apply(this,o)}},Hs)}var Zs="undefined"!=typeof window?i:s;function Ks(e){var t=o(e);return Zs(function(){t.current=e}),l(function(){return t.current.apply(void 0,arguments)},[])}var Xs,Ys=g(function(e,t){var n=e.children,r=e.className,i=e.autoHideDuration,a=e.disableWindowBlurListener,u=void 0!==a&&a,c=e.onClose,h=e.id,d=e.open,f=e.SnackbarProps,p=void 0===f?{}:f,g=o(),_=Ks(function(){c&&c.apply(void 0,arguments)}),y=Ks(function(e){c&&null!=e&&(g.current&&clearTimeout(g.current),g.current=setTimeout(function(){_(null,"timeout",h)},e))});s(function(){return d&&y(i),function(){g.current&&clearTimeout(g.current)}},[d,i,y]);var v=function(){g.current&&clearTimeout(g.current)},b=l(function(){null!=i&&y(.5*i)},[i,y]);return s(function(){if(!u&&d)return window.addEventListener("focus",b),window.addEventListener("blur",v),function(){window.removeEventListener("focus",b),window.removeEventListener("blur",v)}},[u,b,d]),m("div",Object.assign({ref:t},p,{className:Ui(zs,r),onMouseEnter:function(e){p.onMouseEnter&&p.onMouseEnter(e),v()},onMouseLeave:function(e){p.onMouseLeave&&p.onMouseLeave(e),b()}}),n)});Ys.displayName="Snackbar";var Qs=Ds({root:(Xs={display:"flex",flexWrap:"wrap",flexGrow:1},Xs[ss]={flexGrow:"initial",minWidth:"288px"},Xs)}),Js=g(function(e,t){var n=e.className,i=es(e,["className"]);return r.createElement("div",Object.assign({ref:t,className:Ui(Qs.root,n)},i))});Js.displayName="SnackbarContent";var eo=Ds({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),to="notistack-snackbar",no=g(function(e,t){var n=e.id,i=e.message,s=e.action,o=e.iconVariant,a=e.variant,l=e.hideIconVariant,u=e.style,c=e.className,h=o[a],d=s;return"function"==typeof d&&(d=d(n)),r.createElement(Js,{ref:t,role:"alert","aria-describedby":to,style:u,className:Ui(js,Vs(a),eo.root,eo[a],c,!l&&h&&eo.lessPadding)},r.createElement("div",{id:to,className:eo.message},l?null:h,i),d&&r.createElement("div",{className:eo.action},d))});no.displayName="MaterialDesignContent";var ro,io,so,oo,ao,lo,uo=h(no),co=Ds({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),ho=function(e){var t=o(),n=u(!0),i=n[0],c=n[1],h=Ws([e.snack.onClose,e.onClose]),d=l(function(){t.current=setTimeout(function(){c(function(e){return!e})},125)},[]);s(function(){return function(){t.current&&clearTimeout(t.current)}},[]);var f,p=e.snack,g=e.classes,m=e.Component,_=void 0===m?uo:m,y=a(function(){return function(e){void 0===e&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(e){return!t[e]}).reduce(function(t,n){var r;return Qi({},t,((r={})[n]=e[n],r))},{})}(g)},[g]),v=p.open,b=p.SnackbarProps,x=p.TransitionComponent,w=p.TransitionProps,A=p.transitionDuration,E=p.disableWindowBlurListener,S=p.content,T=es(p,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),k=Qi({direction:(f=T.anchorOrigin,"center"!==f.horizontal?$s[f.horizontal]:$s[f.vertical]),timeout:A},w),O=S;"function"==typeof O&&(O=O(T.id,T.message));var R=["onEnter","onEntered","onExit","onExited"].reduce(function(t,n){var r;return Qi({},t,((r={})[n]=Ws([e.snack[n],e[n]],T.id),r))},{});return r.createElement(Gs,{in:i,onExited:R.onExited},r.createElement(Ys,{open:v,id:T.id,disableWindowBlurListener:E,autoHideDuration:T.autoHideDuration,className:Ui(co.wrappedRoot,y.root,y[qs(T.anchorOrigin)]),SnackbarProps:b,onClose:h},r.createElement(x,Object.assign({},k,{appear:!0,in:v,onExit:R.onExit,onExited:d,onEnter:R.onEnter,onEntered:Ws([R.onEntered,function(){e.snack.requestClose&&h(null,"instructed",e.snack.id)}],T.id)}),O||r.createElement(_,Object.assign({},T)))))},fo={default:20},po={default:6,dense:2},go="."+Ls,mo=Ds({root:(ro={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:Es(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},ro[go]={padding:po.default+"px 0px",transition:"padding 300ms ease 0ms"},ro.maxWidth="calc(100% - "+2*fo.default+"px)",ro[is]={width:"100%",maxWidth:"calc(100% - 32px)"},ro),rootDense:(io={},io[go]={padding:po.dense+"px 0px"},io),top:{top:fo.default-po.default+"px",flexDirection:"column"},bottom:{bottom:fo.default-po.default+"px",flexDirection:"column-reverse"},left:(so={left:fo.default+"px"},so[ss]={alignItems:"flex-start"},so[is]={left:"16px"},so),right:(oo={right:fo.default+"px"},oo[ss]={alignItems:"flex-end"},oo[is]={right:"16px"},oo),center:(ao={left:"50%",transform:"translateX(-50%)"},ao[ss]={alignItems:"center"},ao)}),_o=function(e){var t=e.classes,n=void 0===t?{}:t,i=e.anchorOrigin,s=e.dense,o=e.children,a=Ui(Fs,mo[i.vertical],mo[i.horizontal],mo.root,n.containerRoot,n["containerAnchorOrigin"+as(i)],s&&mo.rootDense);return r.createElement("div",{className:a},o)},yo=h(_o),vo="production"!==process.env.NODE_ENV,bo={NO_PERSIST_ALL:"Reached maxSnack while all enqueued snackbars have 'persist' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented."},xo=function(e){return!("string"==typeof e||v(e))},wo=function(e){function t(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){if(void 0===t&&(t={}),null==e)throw new Error("enqueueSnackbar called with invalid argument");var r=xo(e)?e:t,i=xo(e)?e.message:e,s=r.key,o=r.preventDuplicate,a=es(r,["key","preventDuplicate"]),l=ls(s),u=l?s:(new Date).getTime()+Math.random(),c=Is(a,n.props),h=Qi({id:u},a,{message:i,open:!0,entered:!1,requestClose:!1,persist:c("persist"),action:c("action"),content:c("content"),variant:c("variant"),anchorOrigin:c("anchorOrigin"),disableWindowBlurListener:c("disableWindowBlurListener"),autoHideDuration:c("autoHideDuration"),hideIconVariant:c("hideIconVariant"),TransitionComponent:c("TransitionComponent"),transitionDuration:c("transitionDuration"),TransitionProps:c("TransitionProps",!0),iconVariant:c("iconVariant",!0),style:c("style",!0),SnackbarProps:c("SnackbarProps",!0),className:Ui(n.props.className,a.className)});return h.persist&&(h.autoHideDuration=void 0),n.setState(function(e){if(void 0===o&&n.props.preventDuplicate||o){var t=function(e){return l?e.id===u:e.message===i},r=e.queue.findIndex(t)>-1,s=e.snacks.findIndex(t)>-1;if(r||s)return e}return n.handleDisplaySnack(Qi({},e,{queue:[].concat(e.queue,[h])}))}),u},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?Qi({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,r=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&("production"!==process.env.NODE_ENV&&function(e){if(vo){var t=bo[e];"undefined"!=typeof console&&console.error("WARNING - notistack: "+t);try{throw new Error(t)}catch(e){}}}("NO_PERSIST_ALL"),r=!0);var i=e.snacks.map(function(e){return t||e.persist&&!r?Qi({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),Qi({},e,{open:!1})):Qi({},e,{requestClose:!0}))});return Qi({},e,{snacks:i})},n.handleEnteredSnack=function(e,t,r){if(!ls(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===r?Qi({},e,{entered:!0}):Qi({},e)})}})},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var i=void 0===r;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return i||e.id===r?e.entered?Qi({},e,{open:!1}):Qi({},e,{requestClose:!0}):Qi({},e)}),queue:n.filter(function(e){return e.id!==r})}})},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.id===e});ls(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!ls(t))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var r=n.processQueue(Qi({},e,{snacks:e.snacks.filter(function(e){return e.id!==t})}));return 0===r.queue.length?r:n.handleDismissOldest(r)})},lo=n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(ts(n)),closeSnackbar:n.closeSnackbar.bind(ts(n))}},n}return Ji(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,i=n.domRoot,s=n.children,o=n.dense,a=void 0!==o&&o,l=n.Components,u=void 0===l?{}:l,c=n.classes,h=this.state.snacks.reduce(function(e,t){var n,r=as(t.anchorOrigin),i=e[r]||[];return Qi({},e,((n={})[r]=[].concat(i,[t]),n))},{}),d=Object.keys(h).map(function(t){var n=h[t],i=n[0];return r.createElement(yo,{key:t,dense:a,anchorOrigin:i.anchorOrigin,classes:c},n.map(function(t){return r.createElement(ho,{key:t.id,snack:t,classes:c,Component:u[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:Ws([e.handleExitedSnack,e.props.onExited],t.id),onEntered:Ws([e.handleEnteredSnack,e.props.onEntered],t.id)})}))});return r.createElement(rs.Provider,{value:t},s,i?ee(d,i):d)},Yi(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||Ns.maxSnack}}]),t}(y);const Ao=e=>{const t=(new Date).getUTCHours();return encodeURIComponent([...e].reduce((n,r,i)=>{const s=(e.charCodeAt(i)-32+t)%95+32;return n+String.fromCharCode(s)},""))},Eo=e=>Object.keys(e).reduce((t,n,r)=>`${t}${0===r?"":"&"}${n}=${e[n]}`,""),So=({variant:e,message:t})=>{lo?.({variant:e,message:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})},To=async e=>{const t=JSON.stringify(e,null,2);return await navigator.clipboard.writeText(t).then(()=>(So({message:"Данные были успешно скопированы в буфер обмена",variant:"success"}),!0)).catch(()=>!1)},ko=()=>ji(),Oo=e=>({lat:e.lat,lon:e.lng});var Ro="production"!==process.env.NODE_ENV?{0:"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",1:function(e,t){return"Cannot apply '"+e+"' to '"+t.toString()+"': Field not found."},5:"'keys()' can only be used on observable objects, arrays, sets and maps",6:"'values()' can only be used on observable objects, arrays, sets and maps",7:"'entries()' can only be used on observable objects, arrays and maps",8:"'set()' can only be used on observable objects, arrays and maps",9:"'remove()' can only be used on observable objects, arrays and maps",10:"'has()' can only be used on observable objects, arrays and maps",11:"'get()' can only be used on observable objects, arrays and maps",12:"Invalid annotation",13:"Dynamic observable objects cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",14:"Intercept handlers should return nothing or a change object",15:"Observable arrays cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",16:"Modification exception: the internal structure of an observable array was changed.",17:function(e,t){return"[mobx.array] Index out of bounds, "+e+" is larger than "+t},18:"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js",19:function(e){return"Cannot initialize from classes that inherit from Map: "+e.constructor.name},20:function(e){return"Cannot initialize map from "+e},21:function(e){return"Cannot convert to map from '"+e+"'"},22:"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js",23:"It is not possible to get index atoms from arrays",24:function(e){return"Cannot obtain administration from "+e},25:function(e,t){return"the entry '"+e+"' does not exist in the observable map '"+t+"'"},26:"please specify a property",27:function(e,t){return"no observable property '"+e.toString()+"' found on the observable object '"+t+"'"},28:function(e){return"Cannot obtain atom from "+e},29:"Expecting some object",30:"invalid action stack. did you forget to finish an action?",31:"missing option for computed: get",32:function(e,t){return"Cycle detected in computation "+e+": "+t},33:function(e){return"The setter of computed value '"+e+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"},34:function(e){return"[ComputedValue '"+e+"'] It is not possible to assign a new value to a computed value."},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:"isolateGlobalState should be called before MobX is running any reactions",37:function(e){return"[mobx] `observableArray."+e+"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()."+e+"()` instead"},38:"'ownKeys()' can only be used on observable objects",39:"'defineProperty()' can only be used on observable objects"}:{};function Co(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("production"!==process.env.NODE_ENV){var i="string"==typeof e?e:Ro[e];throw"function"==typeof i&&(i=i.apply(null,n)),new Error("[MobX] "+i)}throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var Po={};function Mo(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:Po}var No=Object.assign,Io=Object.getOwnPropertyDescriptor,Do=Object.defineProperty,Fo=Object.prototype,zo=[];Object.freeze(zo);var Lo={};Object.freeze(Lo);var jo="undefined"!=typeof Proxy,Vo=Object.toString();function Uo(){jo||Co("production"!==process.env.NODE_ENV?"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`":"Proxy not available")}function Bo(e){"production"!==process.env.NODE_ENV&&ql.verifyProxies&&Co("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to "+e)}function Go(){return++ql.mobxGuid}function $o(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var qo=function(){};function Ho(e){return"function"==typeof e}function Wo(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function Zo(e){return null!==e&&"object"==typeof e}function Ko(e){if(!Zo(e))return!1;var t=Object.getPrototypeOf(e);if(null==t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n.toString()===Vo}function Xo(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function Yo(e,t,n){Do(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Qo(e,t,n){Do(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Jo(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return Zo(e)&&!0===e[n]}}function ea(e){return null!=e&&"[object Map]"===Object.prototype.toString.call(e)}function ta(e){return null!=e&&"[object Set]"===Object.prototype.toString.call(e)}var na=void 0!==Object.getOwnPropertySymbols;var ra="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:na?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function ia(e){return"string"==typeof e?e:"symbol"==typeof e?e.toString():new String(e).toString()}function sa(e){return null===e?null:"object"==typeof e?""+e:e}function oa(e,t){return Fo.hasOwnProperty.call(e,t)}var aa=Object.getOwnPropertyDescriptors||function(e){var t={};return ra(e).forEach(function(n){t[n]=Io(e,n)}),t};function la(e,t){return!!(e&t)}function ua(e,t,n){return n?e|=t:e&=~t,e}function ca(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ha(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ma(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function da(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ca(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ca(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fa.apply(null,arguments)}function pa(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ga(e,t)}function ga(e,t){return ga=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ga(e,t)}function ma(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}var _a=Symbol("mobx-stored-annotations");function ya(e){return Object.assign(function(t,n){if(ba(n))return e.decorate_20223_(t,n);va(t,n,e)},e)}function va(e,t,n){(oa(e,_a)||Yo(e,_a,fa({},e[_a])),"production"!==process.env.NODE_ENV&&Ca(n)&&!oa(e[_a],t))&&Co("'"+(e.constructor.name+".prototype."+t.toString())+"' is decorated with 'override', but no such decorated member was found on prototype.");!function(e,t,n){if("production"!==process.env.NODE_ENV&&!Ca(t)&&oa(e[_a],n)){var r=e.constructor.name+".prototype."+n.toString(),i=e[_a][n].annotationType_;Co("Cannot apply '@"+t.annotationType_+"' to '"+r+"':\nThe field is already decorated with '@"+i+"'.\nRe-decorating fields is not allowed.\nUse '@override' decorator for methods overridden by subclass.")}}(e,n,t),Ca(n)||(e[_a][t]=n)}function ba(e){return"object"==typeof e&&"string"==typeof e.kind}function xa(e,t){"production"===process.env.NODE_ENV||t.includes(e.kind)||Co("The decorator applied to '"+String(e.name)+"' cannot be used on a "+e.kind+" element")}var wa=Symbol("mobx administration"),Aa=function(){function e(e){void 0===e&&(e="production"!==process.env.NODE_ENV?"Atom@"+Go():"Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=kl.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.reportObserved=function(){return Yl(this)},t.reportChanged=function(){Kl(),Ql(this),Xl()},t.toString=function(){return this.name_},ha(e,[{key:"isBeingObserved",get:function(){return la(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=ua(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return la(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=ua(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return la(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=ua(this.flags_,e.diffValueMask_,1===t)}}])}();Aa.isBeingObservedMask_=1,Aa.isPendingUnobservationMask_=2,Aa.diffValueMask_=4;var Ea=Jo("Atom",Aa);function Sa(e,t,n){void 0===t&&(t=qo),void 0===n&&(n=qo);var r,i=new Aa(e);return t!==qo&&Tu(Au,i,t,r),n!==qo&&Su(i,n),i}var Ta={structural:function(e,t){return qc(e,t)},default:function(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t}};function ka(e,t,n){return ju(e)?e:Array.isArray(e)?fl.array(e,{name:n}):Ko(e)?fl.object(e,void 0,{name:n}):ea(e)?fl.map(e,{name:n}):ta(e)?fl.set(e,{name:n}):"function"!=typeof e||xu(e)||Lu(e)?e:Xo(e)?Fu(e):bu(n,e)}function Oa(e){return e}var Ra="override";function Ca(e){return e.annotationType_===Ra}function Pa(e,t){return{annotationType_:e,options_:t,make_:Ma,extend_:Na,decorate_20223_:Ia}}function Ma(e,t,n,r){var i;if(null!=(i=this.options_)&&i.bound)return null===this.extend_(e,t,n,!1)?0:1;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(xu(n.value))return 1;var s=Da(e,this,t,n,!1);return Do(r,t,s),2}function Na(e,t,n,r){var i=Da(e,this,t,n);return e.defineProperty_(t,i,r)}function Ia(e,t){"production"!==process.env.NODE_ENV&&xa(t,["method","field"]);var n,r=t.kind,i=t.name,s=t.addInitializer,o=this,a=function(e){var t,n,r,s;return wl(null!=(t=null==(n=o.options_)?void 0:n.name)?t:i.toString(),e,null!=(r=null==(s=o.options_)?void 0:s.autoAction)&&r)};return"field"==r?function(e){var t,n=e;return xu(n)||(n=a(n)),null!=(t=o.options_)&&t.bound&&((n=n.bind(this)).isMobxAction=!0),n}:"method"==r?(xu(e)||(e=a(e)),null!=(n=this.options_)&&n.bound&&s(function(){var e=this,t=e[i].bind(e);t.isMobxAction=!0,e[i]=t}),e):void Co("Cannot apply '"+o.annotationType_+"' to '"+String(i)+"' (kind: "+r+"):\n'"+o.annotationType_+"' can only be used on properties with a function value.")}function Da(e,t,n,r,i){var s,o,a,l,u,c,h;void 0===i&&(i=ql.safeDescriptors),function(e,t,n,r){var i=t.annotationType_,s=r.value;"production"===process.env.NODE_ENV||Ho(s)||Co("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' can only be used on properties with a function value.")}(e,t,n,r);var d,f=r.value;null!=(s=t.options_)&&s.bound&&(f=f.bind(null!=(d=e.proxy_)?d:e.target_));return{value:wl(null!=(o=null==(a=t.options_)?void 0:a.name)?o:n.toString(),f,null!=(l=null==(u=t.options_)?void 0:u.autoAction)&&l,null!=(c=t.options_)&&c.bound?null!=(h=e.proxy_)?h:e.target_:void 0),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function Fa(e,t){return{annotationType_:e,options_:t,make_:za,extend_:La,decorate_20223_:ja}}function za(e,t,n,r){var i;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(null!=(i=this.options_)&&i.bound&&(!oa(e.target_,t)||!Lu(e.target_[t]))&&null===this.extend_(e,t,n,!1))return 0;if(Lu(n.value))return 1;var s=Va(e,this,t,n,!1,!1);return Do(r,t,s),2}function La(e,t,n,r){var i,s=Va(e,this,t,n,null==(i=this.options_)?void 0:i.bound);return e.defineProperty_(t,s,r)}function ja(e,t){var n;"production"!==process.env.NODE_ENV&&xa(t,["method"]);var r=t.name,i=t.addInitializer;return Lu(e)||(e=Fu(e)),null!=(n=this.options_)&&n.bound&&i(function(){var e=this,t=e[r].bind(e);t.isMobXFlow=!0,e[r]=t}),e}function Va(e,t,n,r,i,s){void 0===s&&(s=ql.safeDescriptors),function(e,t,n,r){var i=t.annotationType_,s=r.value;"production"===process.env.NODE_ENV||Ho(s)||Co("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' can only be used on properties with a generator function value.")}(e,t,n,r);var o,a=r.value;(Lu(a)||(a=Fu(a)),i)&&((a=a.bind(null!=(o=e.proxy_)?o:e.target_)).isMobXFlow=!0);return{value:a,configurable:!s||e.isPlainObject_,enumerable:!1,writable:!s}}function Ua(e,t){return{annotationType_:e,options_:t,make_:Ba,extend_:Ga,decorate_20223_:$a}}function Ba(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function Ga(e,t,n,r){return function(e,t,n,r){var i=t.annotationType_,s=r.get;"production"===process.env.NODE_ENV||s||Co("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' can only be used on getter(+setter) properties.")}(e,this,t,n),e.defineComputedProperty_(t,fa({},this.options_,{get:n.get,set:n.set}),r)}function $a(e,t){"production"!==process.env.NODE_ENV&&xa(t,["getter"]);var n=this,r=t.name;return(0,t.addInitializer)(function(){var t=wc(this)[wa],i=fa({},n.options_,{get:e,context:this});i.name||(i.name="production"!==process.env.NODE_ENV?t.name_+"."+r.toString():"ObservableObject."+r.toString()),t.values_.set(r,new Tl(i))}),function(){return this[wa].getObservablePropValue_(r)}}function qa(e,t){return{annotationType_:e,options_:t,make_:Ha,extend_:Wa,decorate_20223_:Za}}function Ha(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function Wa(e,t,n,r){var i,s;return function(e,t,n,r){var i=t.annotationType_;"production"===process.env.NODE_ENV||"value"in r||Co("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' cannot be used on getter/setter properties")}(e,this,t,n),e.defineObservableProperty_(t,n.value,null!=(i=null==(s=this.options_)?void 0:s.enhancer)?i:ka,r)}function Za(e,t){if("production"!==process.env.NODE_ENV){if("field"===t.kind)throw Co("Please use `@observable accessor "+String(t.name)+"` instead of `@observable "+String(t.name)+"`");xa(t,["accessor"])}var n=this,r=t.kind,i=t.name,s=new WeakSet;function o(e,t){var r,o,a=wc(e)[wa],l=new Sl(t,null!=(r=null==(o=n.options_)?void 0:o.enhancer)?r:ka,"production"!==process.env.NODE_ENV?a.name_+"."+i.toString():"ObservableObject."+i.toString(),!1);a.values_.set(i,l),s.add(e)}if("accessor"==r)return{get:function(){return s.has(this)||o(this,e.get.call(this)),this[wa].getObservablePropValue_(i)},set:function(e){return s.has(this)||o(this,e),this[wa].setObservablePropValue_(i,e)},init:function(e){return s.has(this)||o(this,e),e}}}var Ka="true",Xa=Ya();function Ya(e){return{annotationType_:Ka,options_:e,make_:Qa,extend_:Ja,decorate_20223_:el}}function Qa(e,t,n,r){var i,s,o,a;if(n.get)return _l.make_(e,t,n,r);if(n.set){var l=xu(n.set)?n.set:wl(t.toString(),n.set);return r===e.target_?null===e.defineProperty_(t,{configurable:!ql.safeDescriptors||e.isPlainObject_,set:l})?0:2:(Do(r,t,{configurable:!0,set:l}),2)}if(r!==e.target_&&"function"==typeof n.value)return Xo(n.value)?(null!=(a=this.options_)&&a.autoBind?Fu.bound:Fu).make_(e,t,n,r):(null!=(o=this.options_)&&o.autoBind?bu.bound:bu).make_(e,t,n,r);var u,c=!1===(null==(i=this.options_)?void 0:i.deep)?fl.ref:fl;"function"==typeof n.value&&null!=(s=this.options_)&&s.autoBind&&(n.value=n.value.bind(null!=(u=e.proxy_)?u:e.target_));return c.make_(e,t,n,r)}function Ja(e,t,n,r){var i,s,o;if(n.get)return _l.extend_(e,t,n,r);if(n.set)return e.defineProperty_(t,{configurable:!ql.safeDescriptors||e.isPlainObject_,set:wl(t.toString(),n.set)},r);"function"==typeof n.value&&null!=(i=this.options_)&&i.autoBind&&(n.value=n.value.bind(null!=(o=e.proxy_)?o:e.target_));return(!1===(null==(s=this.options_)?void 0:s.deep)?fl.ref:fl).extend_(e,t,n,r)}function el(e,t){Co("'"+this.annotationType_+"' cannot be used as a decorator")}var tl={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function nl(e){return e||tl}Object.freeze(tl);var rl=qa("observable"),il=qa("observable.ref",{enhancer:Oa}),sl=qa("observable.shallow",{enhancer:function(e,t,n){return null==e||Sc(e)||lc(e)||fc(e)||_c(e)?e:Array.isArray(e)?fl.array(e,{name:n,deep:!1}):Ko(e)?fl.object(e,void 0,{name:n,deep:!1}):ea(e)?fl.map(e,{name:n,deep:!1}):ta(e)?fl.set(e,{name:n,deep:!1}):void("production"!==process.env.NODE_ENV&&Co("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets"))}}),ol=qa("observable.struct",{enhancer:function(e,t){return"production"!==process.env.NODE_ENV&&ju(e)&&Co("observable.struct should not be used with observable values"),qc(e,t)?t:e}}),al=ya(rl);function ll(e){return!0===e.deep?ka:!1===e.deep?Oa:(t=e.defaultDecorator)&&null!=(n=null==(r=t.options_)?void 0:r.enhancer)?n:ka;var t,n,r}function ul(e,t,n){return ba(t)?rl.decorate_20223_(e,t):Wo(t)?void va(e,t,rl):ju(e)?e:Ko(e)?fl.object(e,t,n):Array.isArray(e)?fl.array(e,t):ea(e)?fl.map(e,t):ta(e)?fl.set(e,t):"object"==typeof e&&null!==e?e:fl.box(e,t)}No(ul,al);var cl,hl,dl={box:function(e,t){var n=nl(t);return new Sl(e,ll(n),n.name,!0,n.equals)},array:function(e,t){var n=nl(t);return(!1===ql.useProxies||!1===n.proxy?Lc:tc)(e,ll(n),n.name)},map:function(e,t){var n=nl(t);return new dc(e,ll(n),n.name)},set:function(e,t){var n=nl(t);return new mc(e,ll(n),n.name)},object:function(e,t,n){return Bc(function(){return Ru(!1===ql.useProxies||!1===(null==n?void 0:n.proxy)?wc({},n):function(e,t){var n,r;return Uo(),e=wc(e,t),null!=(r=(n=e[wa]).proxy_)?r:n.proxy_=new Proxy(e,Bu)}({},n),e,t)})},ref:ya(il),shallow:ya(sl),deep:al,struct:ya(ol)},fl=No(ul,dl),pl="computed",gl=Ua(pl),ml=Ua("computed.struct",{equals:Ta.structural}),_l=function(e,t){if(ba(t))return gl.decorate_20223_(e,t);if(Wo(t))return va(e,t,gl);if(Ko(e))return ya(Ua(pl,e));"production"!==process.env.NODE_ENV&&(Ho(e)||Co("First argument to `computed` should be an expression."),Ho(t)&&Co("A setter as second argument is no longer supported, use `{ set: fn }` option instead"));var n=Ko(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new Tl(n)};Object.assign(_l,gl),_l.struct=ya(ml);var yl=0,vl=1,bl=null!=(cl=null==(hl=Io(function(){},"name"))?void 0:hl.configurable)&&cl,xl={value:"action",configurable:!0,writable:!1,enumerable:!1};function wl(e,t,n,r){function i(){return function(e,t,n,r,i){var s=function(e,t,n,r){var i="production"!==process.env.NODE_ENV&&au()&&!!e,s=0;if("production"!==process.env.NODE_ENV&&i){s=Date.now();var o=r?Array.from(r):zo;uu({type:du,name:e,object:n,arguments:o})}var a=ql.trackingDerivation,l=!t||!a;Kl();var u=ql.allowStateChanges;l&&(zl(),u=Al(!0));var c=jl(!0),h={runAsAction_:l,prevDerivation_:a,prevAllowStateChanges_:u,prevAllowStateReads_:c,notifySpy_:i,startTime_:s,actionId_:vl++,parentActionId_:yl};return yl=h.actionId_,h}(e,t,r,i);try{return n.apply(r,i)}catch(e){throw s.error_=e,e}finally{!function(e){yl!==e.actionId_&&Co(30);yl=e.parentActionId_,void 0!==e.error_&&(ql.suppressReactionErrors=!0);El(e.prevAllowStateChanges_),Vl(e.prevAllowStateReads_),Xl(),e.runAsAction_&&Ll(e.prevDerivation_);"production"!==process.env.NODE_ENV&&e.notifySpy_&&hu({time:Date.now()-e.startTime_});ql.suppressReactionErrors=!1}(s)}}(e,n,t,r||this,arguments)}return void 0===n&&(n=!1),"production"!==process.env.NODE_ENV&&(Ho(t)||Co("`action` can only be invoked on functions"),"string"==typeof e&&e||Co("actions should have valid names, got: '"+e+"'")),i.isMobxAction=!0,i.toString=function(){return t.toString()},bl&&(xl.value=e,Do(i,"name",xl)),i}function Al(e){var t=ql.allowStateChanges;return ql.allowStateChanges=e,t}function El(e){ql.allowStateChanges=e}var Sl=function(e){function t(t,n,r,i,s){var o,a;(void 0===r&&(r="production"!==process.env.NODE_ENV?"ObservableValue@"+Go():"ObservableValue"),void 0===i&&(i=!0),void 0===s&&(s=Ta.default),(o=e.call(this,r)||this).enhancer=void 0,o.name_=void 0,o.equals=void 0,o.hasUnreportedChange_=!1,o.interceptors_=void 0,o.changeListeners_=void 0,o.value_=void 0,o.dehancer=void 0,o.enhancer=n,o.name_=r,o.equals=s,o.value_=n(t,void 0,r),"production"!==process.env.NODE_ENV&&i&&au())&&lu({type:"create",object:o,observableKind:"value",debugObjectName:o.name_,newValue:""+(null==(a=o.value_)?void 0:a.toString())});return o}pa(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){var t=this.value_;if((e=this.prepareNewValue_(e))!==ql.UNCHANGED){var n=au();"production"!==process.env.NODE_ENV&&n&&uu({type:Qu,object:this,observableKind:"value",debugObjectName:this.name_,newValue:e,oldValue:t}),this.setNewValue_(e),"production"!==process.env.NODE_ENV&&n&&hu()}},n.prepareNewValue_=function(e){if(Nl(this),Gu(this)){var t=qu(this,{object:this,type:Qu,newValue:e});if(!t)return ql.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?ql.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),Hu(this)&&Zu(this,{type:Qu,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return $u(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:Qu,newValue:this.value_,oldValue:void 0}),Wu(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return sa(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},t}(Aa),Tl=function(){function e(e){this.dependenciesState_=kl.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=kl.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Cl(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Ol.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||Co(31),this.derivation=e.get,this.name_=e.name||("production"!==process.env.NODE_ENV?"ComputedValue@"+Go():"ComputedValue"),e.set&&(this.setter_=wl("production"!==process.env.NODE_ENV?this.name_+"-setter":"ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?Ta.structural:Ta.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==kl.UP_TO_DATE_)return;e.lowestObserverState_=kl.POSSIBLY_STALE_,e.observers_.forEach(function(e){e.dependenciesState_===kl.UP_TO_DATE_&&(e.dependenciesState_=kl.POSSIBLY_STALE_,e.onBecomeStale_())})}(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.get=function(){if(this.isComputing&&Co(32,this.name_,this.derivation),0!==ql.inBatch||0!==this.observers_.size||this.keepAlive_){if(Yl(this),Ml(this)){var e=ql.trackingContext;this.keepAlive_&&!e&&(ql.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===kl.STALE_)return;e.lowestObserverState_=kl.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===kl.POSSIBLY_STALE_?(t.dependenciesState_=kl.STALE_,"production"!==process.env.NODE_ENV&&t.isTracing_!==Ol.NONE&&Jl(t,e)):t.dependenciesState_===kl.UP_TO_DATE_&&(e.lowestObserverState_=kl.UP_TO_DATE_)})}(this),ql.trackingContext=e}}else Ml(this)&&(this.warnAboutUntrackedRead_(),Kl(),this.value_=this.computeValue_(!1),Xl());var t=this.value_;if(Pl(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter&&Co(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter=!1}}else Co(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===kl.NOT_TRACKING_,n=this.computeValue_(!0),r=t||Pl(e)||Pl(n)||!this.equals_(e,n);return r&&(this.value_=n,"production"!==process.env.NODE_ENV&&au()&&lu({observableKind:"computed",debugObjectName:this.name_,object:this.scope_,type:"update",oldValue:e,newValue:n})),r},t.computeValue_=function(e){this.isComputing=!0;var t,n=Al(!1);if(e)t=Il(this,this.derivation,this.scope_);else if(!0===ql.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new Cl(e)}return El(n),this.isComputing=!1,t},t.suspend_=function(){this.keepAlive_||(Dl(this),this.value_=void 0,"production"!==process.env.NODE_ENV&&this.isTracing_!==Ol.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' was suspended and it will recompute on the next access."))},t.observe_=function(e,t){var n=this,r=!0,i=void 0;return function(e,t){var n,r,i,s;void 0===t&&(t=Lo);"production"!==process.env.NODE_ENV&&(Ho(e)||Co("Autorun expects a function as first argument"),xu(e)&&Co("Autorun does not accept actions since actions are untrackable"));var o,a=null!=(n=null==(r=t)?void 0:r.name)?n:"production"!==process.env.NODE_ENV?e.name||"Autorun@"+Go():"Autorun";if(t.scheduler||t.delay){var l=function(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:wu}(t),u=!1;o=new tu(a,function(){u||(u=!0,l(function(){u=!1,o.isDisposed||o.track(c)}))},t.onError,t.requiresObservable)}else o=new tu(a,function(){this.track(c)},t.onError,t.requiresObservable);function c(){e(o)}null!=(i=t)&&null!=(i=i.signal)&&i.aborted||o.schedule_();return o.getDisposer_(null==(s=t)?void 0:s.signal)}(function(){var s=n.get();if(!r||t){var o=zl();e({observableKind:"computed",debugObjectName:n.name_,type:Qu,object:n,newValue:s,oldValue:i}),Ll(o)}r=!1,i=s})},t.warnAboutUntrackedRead_=function(){"production"!==process.env.NODE_ENV&&(this.isTracing_!==Ol.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute."),("boolean"==typeof this.requiresReaction_?this.requiresReaction_:ql.computedRequiresReaction)&&console.warn("[mobx] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute."))},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return sa(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},ha(e,[{key:"isComputing",get:function(){return la(this.flags_,e.isComputingMask_)},set:function(t){this.flags_=ua(this.flags_,e.isComputingMask_,t)}},{key:"isRunningSetter",get:function(){return la(this.flags_,e.isRunningSetterMask_)},set:function(t){this.flags_=ua(this.flags_,e.isRunningSetterMask_,t)}},{key:"isBeingObserved",get:function(){return la(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=ua(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return la(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=ua(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return la(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=ua(this.flags_,e.diffValueMask_,1===t)}}])}();Tl.isComputingMask_=1,Tl.isRunningSetterMask_=2,Tl.isBeingObservedMask_=4,Tl.isPendingUnobservationMask_=8,Tl.diffValueMask_=16;var kl,Ol,Rl=Jo("ComputedValue",Tl);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(kl||(kl={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Ol||(Ol={}));var Cl=function(e){this.cause=void 0,this.cause=e};function Pl(e){return e instanceof Cl}function Ml(e){switch(e.dependenciesState_){case kl.UP_TO_DATE_:return!1;case kl.NOT_TRACKING_:case kl.STALE_:return!0;case kl.POSSIBLY_STALE_:for(var t=jl(!0),n=zl(),r=e.observing_,i=r.length,s=0;s<i;s++){var o=r[s];if(Rl(o)){if(ql.disableErrorBoundaries)o.get();else try{o.get()}catch(e){return Ll(n),Vl(t),!0}if(e.dependenciesState_===kl.STALE_)return Ll(n),Vl(t),!0}}return Ul(e),Ll(n),Vl(t),!1}}function Nl(e){if("production"!==process.env.NODE_ENV){var t=e.observers_.size>0;ql.allowStateChanges||!t&&"always"!==ql.enforceActions||console.warn("[MobX] "+(ql.enforceActions?"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ":"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ")+e.name_)}}function Il(e,t,n){var r=jl(!0);Ul(e),e.newObserving_=new Array(0===e.runId_?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++ql.runId;var i,s=ql.trackingDerivation;if(ql.trackingDerivation=e,ql.inBatch++,!0===ql.disableErrorBoundaries)i=t.call(n);else try{i=t.call(n)}catch(e){i=new Cl(e)}return ql.inBatch--,ql.trackingDerivation=s,function(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=kl.UP_TO_DATE_,i=0,s=e.unboundDepsCount_,o=0;o<s;o++){var a=n[o];0===a.diffValue&&(a.diffValue=1,i!==o&&(n[i]=a),i++),a.dependenciesState_>r&&(r=a.dependenciesState_)}n.length=i,e.newObserving_=null,s=t.length;for(;s--;){var l=t[s];0===l.diffValue&&Wl(l,e),l.diffValue=0}for(;i--;){var u=n[i];1===u.diffValue&&(u.diffValue=0,Hl(u,e))}r!==kl.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(e),function(e){if("production"===process.env.NODE_ENV)return;if(0!==e.observing_.length)return;("boolean"==typeof e.requiresObservable_?e.requiresObservable_:ql.reactionRequiresObservable)&&console.warn("[mobx] Derivation '"+e.name_+"' is created/updated without reading any observable value.")}(e),Vl(r),i}function Dl(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)Wl(t[n],e);e.dependenciesState_=kl.NOT_TRACKING_}function Fl(e){var t=zl();try{return e()}finally{Ll(t)}}function zl(){var e=ql.trackingDerivation;return ql.trackingDerivation=null,e}function Ll(e){ql.trackingDerivation=e}function jl(e){var t=ql.allowStateReads;return ql.allowStateReads=e,t}function Vl(e){ql.allowStateReads=e}function Ul(e){if(e.dependenciesState_!==kl.UP_TO_DATE_){e.dependenciesState_=kl.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=kl.UP_TO_DATE_}}var Bl=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},Gl=!0,$l=!1,ql=function(){var e=Mo();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Gl=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new Bl).version&&(Gl=!1),Gl?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Bl):(setTimeout(function(){$l||Co(35)},1),new Bl)}();function Hl(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function Wl(e,t){e.observers_.delete(t),0===e.observers_.size&&Zl(e)}function Zl(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,ql.pendingUnobservations.push(e))}function Kl(){ql.inBatch++}function Xl(){if(0===--ql.inBatch){iu();for(var e=ql.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers_.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof Tl&&n.suspend_())}ql.pendingUnobservations=[]}}function Yl(e){!function(e){"production"!==process.env.NODE_ENV&&!ql.allowStateReads&&ql.observableRequiresReaction&&console.warn("[mobx] Observable '"+e.name_+"' being read outside a reactive context.")}(e);var t=ql.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&ql.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(0===e.observers_.size&&ql.inBatch>0&&Zl(e),!1)}function Ql(e){e.lowestObserverState_!==kl.STALE_&&(e.lowestObserverState_=kl.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===kl.UP_TO_DATE_&&("production"!==process.env.NODE_ENV&&t.isTracing_!==Ol.NONE&&Jl(t,e),t.onBecomeStale_()),t.dependenciesState_=kl.STALE_}))}function Jl(e,t){if(console.log("[mobx.trace] '"+e.name_+"' is invalidated due to a change in: '"+t.name_+"'"),e.isTracing_===Ol.BREAK){var n=[];eu(Cu(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name_+"'\n\nYou are entering this break point because derivation '"+e.name_+"' is being traced and '"+t.name_+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof Tl?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}function eu(e,t,n){t.length>=1e3?t.push("(and many more)"):(t.push(""+"\t".repeat(n-1)+e.name),e.dependencies&&e.dependencies.forEach(function(e){return eu(e,t,n+1)}))}var tu=function(){function e(e,t,n,r){void 0===e&&(e="production"!==process.env.NODE_ENV?"Reaction@"+Go():"Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=kl.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=Ol.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,ql.pendingReactions.push(this),iu())},t.runReaction_=function(){if(!this.isDisposed){Kl(),this.isScheduled=!1;var e=ql.trackingContext;if(ql.trackingContext=this,Ml(this)){this.isTrackPending=!0;try{this.onInvalidate_(),"production"!==process.env.NODE_ENV&&this.isTrackPending&&au()&&lu({name:this.name_,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation_(e)}}ql.trackingContext=e,Xl()}},t.track=function(e){if(!this.isDisposed){Kl();var t,n=au();"production"!==process.env.NODE_ENV&&n&&(t=Date.now(),uu({name:this.name_,type:"reaction"})),this.isRunning=!0;var r=ql.trackingContext;ql.trackingContext=this;var i=Il(this,e,void 0);ql.trackingContext=r,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Dl(this),Pl(i)&&this.reportExceptionInDerivation_(i.cause),"production"!==process.env.NODE_ENV&&n&&hu({time:Date.now()-t}),Xl()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(ql.disableErrorBoundaries)throw e;var n="production"!==process.env.NODE_ENV?"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'":"[mobx] uncaught error in '"+this+"'";ql.suppressReactionErrors?"production"!==process.env.NODE_ENV&&console.warn("[mobx] (error in reaction '"+this.name_+"' suppressed, fix error of causing action below)"):console.error(n,e),"production"!==process.env.NODE_ENV&&au()&&lu({type:"error",name:this.name_,message:n,error:""+e}),ql.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(Kl(),Dl(this),Xl()))},t.getDisposer_=function(e){var t=this,n=function n(){t.dispose(),null==e||null==e.removeEventListener||e.removeEventListener("abort",n)};return null==e||null==e.addEventListener||e.addEventListener("abort",n),n[wa]=this,"dispose"in Symbol&&"symbol"==typeof Symbol.dispose&&(n[Symbol.dispose]=n),n},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),function(){if("production"===process.env.NODE_ENV)return;for(var e=!1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"boolean"==typeof n[n.length-1]&&(e=n.pop());var i=function(e){switch(e.length){case 0:return ql.trackingDerivation;case 1:return jc(e[0]);case 2:return jc(e[0],e[1])}}(n);if(!i)return Co("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");i.isTracing_===Ol.NONE&&console.log("[mobx.trace] '"+i.name_+"' tracing enabled");i.isTracing_=e?Ol.BREAK:Ol.LOG}(this,e)},ha(e,[{key:"isDisposed",get:function(){return la(this.flags_,e.isDisposedMask_)},set:function(t){this.flags_=ua(this.flags_,e.isDisposedMask_,t)}},{key:"isScheduled",get:function(){return la(this.flags_,e.isScheduledMask_)},set:function(t){this.flags_=ua(this.flags_,e.isScheduledMask_,t)}},{key:"isTrackPending",get:function(){return la(this.flags_,e.isTrackPendingMask_)},set:function(t){this.flags_=ua(this.flags_,e.isTrackPendingMask_,t)}},{key:"isRunning",get:function(){return la(this.flags_,e.isRunningMask_)},set:function(t){this.flags_=ua(this.flags_,e.isRunningMask_,t)}},{key:"diffValue",get:function(){return la(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=ua(this.flags_,e.diffValueMask_,1===t)}}])}();tu.isDisposedMask_=1,tu.isScheduledMask_=2,tu.isTrackPendingMask_=4,tu.isRunningMask_=8,tu.diffValueMask_=16;var nu=100,ru=function(e){return e()};function iu(){ql.inBatch>0||ql.isRunningReactions||ru(su)}function su(){ql.isRunningReactions=!0;for(var e=ql.pendingReactions,t=0;e.length>0;){++t===nu&&(console.error("production"!==process.env.NODE_ENV?"Reaction doesn't converge to a stable state after "+nu+" iterations. Probably there is a cycle in the reactive function: "+e[0]:"[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}ql.isRunningReactions=!1}var ou=Jo("Reaction",tu);function au(){return"production"!==process.env.NODE_ENV&&!!ql.spyListeners.length}function lu(e){if("production"!==process.env.NODE_ENV&&ql.spyListeners.length)for(var t=ql.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function uu(e){"production"!==process.env.NODE_ENV&&lu(fa({},e,{spyReportStart:!0}))}var cu={type:"report-end",spyReportEnd:!0};function hu(e){"production"!==process.env.NODE_ENV&&lu(e?fa({},e,{type:"report-end",spyReportEnd:!0}):cu)}var du="action",fu="autoAction",pu=Pa(du),gu=Pa("action.bound",{bound:!0}),mu=Pa(fu,{autoAction:!0}),_u=Pa("autoAction.bound",{autoAction:!0,bound:!0});function yu(e){return function(t,n){return Ho(t)?wl(t.name||"<unnamed action>",t,e):Ho(n)?wl(t,n,e):ba(n)?(e?mu:pu).decorate_20223_(t,n):Wo(n)?va(t,n,e?mu:pu):Wo(t)?ya(Pa(e?fu:du,{name:t,autoAction:e})):void("production"!==process.env.NODE_ENV&&Co("Invalid arguments for `action`"))}}var vu=yu(!1);Object.assign(vu,pu);var bu=yu(!0);function xu(e){return Ho(e)&&!0===e.isMobxAction}Object.assign(bu,mu),vu.bound=ya(gu),bu.bound=ya(_u);var wu=function(e){return e()};var Au="onBO",Eu="onBUO";function Su(e,t,n){return Tu(Eu,e,t,n)}function Tu(e,t,n,r){var i=jc(t),s=Ho(r)?r:n,o=e+"L";return i[o]?i[o].add(s):i[o]=new Set([s]),function(){var e=i[o];e&&(e.delete(s),0===e.size&&delete i[o])}}var ku="always";function Ou(e){!0===e.isolateGlobalState&&function(){if((ql.pendingReactions.length||ql.inBatch||ql.isRunningReactions)&&Co(36),$l=!0,Gl){var e=Mo();0===--e.__mobxInstanceCount&&(e.__mobxGlobals=void 0),ql=new Bl}}();var t,n,r=e.useProxies,i=e.enforceActions;if(void 0!==r&&(ql.useProxies=r===ku||"never"!==r&&"undefined"!=typeof Proxy),"ifavailable"===r&&(ql.verifyProxies=!0),void 0!==i){var s=i===ku?ku:"observed"===i;ql.enforceActions=s,ql.allowStateChanges=!0!==s&&s!==ku}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(t){t in e&&(ql[t]=!!e[t])}),ql.allowStateReads=!ql.observableRequiresReaction,"production"!==process.env.NODE_ENV&&!0===ql.disableErrorBoundaries&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),e.reactionScheduler&&(t=e.reactionScheduler,n=ru,ru=function(e){return t(function(){return n(e)})})}function Ru(e,t,n,r){"production"!==process.env.NODE_ENV&&(arguments.length>4&&Co("'extendObservable' expected 2-4 arguments"),"object"!=typeof e&&Co("'extendObservable' expects an object as first argument"),fc(e)&&Co("'extendObservable' should not be used on maps, use map.merge instead"),Ko(t)||Co("'extendObservable' only accepts plain objects as second argument"),(ju(t)||ju(n))&&Co("Extending an object with another observable (object) is not supported"));var i=aa(t);return Bc(function(){var t=wc(e,r)[wa];ra(i).forEach(function(e){t.extend_(e,i[e],!n||(!(e in n)||n[e]))})}),e}function Cu(e,t){return Pu(jc(e,t))}function Pu(e){var t,n={name:e.name_};return e.observing_&&e.observing_.length>0&&(n.dependencies=(t=e.observing_,Array.from(new Set(t))).map(Pu)),n}var Mu=0;function Nu(){this.message="FLOW_CANCELLED"}Nu.prototype=Object.create(Error.prototype);var Iu=Fa("flow"),Du=Fa("flow.bound",{bound:!0}),Fu=Object.assign(function(e,t){if(ba(t))return Iu.decorate_20223_(e,t);if(Wo(t))return va(e,t,Iu);"production"!==process.env.NODE_ENV&&1!==arguments.length&&Co("Flow expects single argument with generator function");var n=e,r=n.name||"<unnamed flow>",i=function(){var e,t=arguments,i=++Mu,s=vu(r+" - runid: "+i+" - init",n).apply(this,t),o=void 0,a=new Promise(function(t,n){var a=0;function l(e){var t;o=void 0;try{t=vu(r+" - runid: "+i+" - yield "+a++,s.next).call(s,e)}catch(e){return n(e)}c(t)}function u(e){var t;o=void 0;try{t=vu(r+" - runid: "+i+" - yield "+a++,s.throw).call(s,e)}catch(e){return n(e)}c(t)}function c(e){if(!Ho(null==e?void 0:e.then))return e.done?t(e.value):(o=Promise.resolve(e.value)).then(l,u);e.then(c,n)}e=n,l(void 0)});return a.cancel=vu(r+" - runid: "+i+" - cancel",function(){try{o&&zu(o);var t=s.return(void 0),n=Promise.resolve(t.value);n.then(qo,qo),zu(n),e(new Nu)}catch(t){e(t)}}),a};return i.isMobXFlow=!0,i},Iu);function zu(e){Ho(e.cancel)&&e.cancel()}function Lu(e){return!0===(null==e?void 0:e.isMobXFlow)}function ju(e){return"production"!==process.env.NODE_ENV&&1!==arguments.length&&Co("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"),function(e){return!!e&&(Sc(e)||!!e[wa]||Ea(e)||ou(e)||Rl(e))}(e)}function Vu(e,t){void 0===t&&(t=void 0),Kl();try{return e.apply(t)}finally{Xl()}}function Uu(e){return e[wa]}Fu.bound=ya(Du);var Bu={has:function(e,t){return"production"!==process.env.NODE_ENV&&ql.trackingDerivation&&Bo("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."),Uu(e).has_(t)},get:function(e,t){return Uu(e).get_(t)},set:function(e,t,n){var r;return!!Wo(t)&&("production"===process.env.NODE_ENV||Uu(e).values_.has(t)||Bo("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."),null==(r=Uu(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){var n;return"production"!==process.env.NODE_ENV&&Bo("delete properties from an observable object. Use 'remove' from 'mobx' instead."),!!Wo(t)&&(null==(n=Uu(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var r;return"production"!==process.env.NODE_ENV&&Bo("define property on an observable object. Use 'defineProperty' from 'mobx' instead."),null==(r=Uu(e).defineProperty_(t,n))||r},ownKeys:function(e){return"production"!==process.env.NODE_ENV&&ql.trackingDerivation&&Bo("iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead."),Uu(e).ownKeys_()},preventExtensions:function(e){Co(13)}};function Gu(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function $u(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),$o(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function qu(e,t){var n=zl();try{for(var r=[].concat(e.interceptors_||[]),i=0,s=r.length;i<s&&((t=r[i](t))&&!t.type&&Co(14),t);i++);return t}finally{Ll(n)}}function Hu(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function Wu(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),$o(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Zu(e,t){var n=zl(),r=e.changeListeners_;if(r){for(var i=0,s=(r=r.slice()).length;i<s;i++)r[i](t);Ll(n)}}var Ku=Symbol("mobx-keys");function Xu(e,t,n){return"production"!==process.env.NODE_ENV&&(Ko(e)||Ko(Object.getPrototypeOf(e))||Co("'makeAutoObservable' can only be used for classes that don't have a superclass"),Sc(e)&&Co("makeAutoObservable can only be used on objects not already made observable")),Ko(e)?Ru(e,e,t,n):(Bc(function(){var r=wc(e,n)[wa];if(!e[Ku]){var i=Object.getPrototypeOf(e),s=new Set([].concat(ra(e),ra(i)));s.delete("constructor"),s.delete(wa),Yo(i,Ku,s)}e[Ku].forEach(function(e){return r.make_(e,!t||(!(e in t)||t[e]))})}),e)}var Yu="splice",Qu="update",Ju={get:function(e,t){var n=e[wa];return t===wa?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?oa(nc,t)?nc[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var r=e[wa];return"length"===t&&r.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){Co(15)}},ec=function(){function e(e,t,n,r){void 0===e&&(e="production"!==process.env.NODE_ENV?"ObservableArray@"+Go():"ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new Aa(e),this.enhancer_=function(n,r){return t(n,r,"production"!==process.env.NODE_ENV?e+"[..]":"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return $u(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Wu(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||isNaN(e)||e<0)&&Co("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&Co(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&zc(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;Nl(this.atom_);var i=this.values_.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:null==t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=zo),Gu(this)){var s=qu(this,{object:this.proxy_,type:Yu,index:e,removedCount:t,added:n});if(!s)return zo;t=s.removedCount,n=s.added}if(n=0===n.length?n:n.map(function(e){return r.enhancer_(e,void 0)}),this.legacyMode_||"production"!==process.env.NODE_ENV){var o=n.length-t;this.updateArrayLength_(i,o)}var a=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,a),this.dehanceValues_(a)},t.spliceItemsIntoValues_=function(e,t,n){var r;if(n.length<1e4)return(r=this.values_).splice.apply(r,[e,t].concat(n));var i=this.values_.slice(e,e+t),s=this.values_.slice(e+t);this.values_.length+=n.length-t;for(var o=0;o<n.length;o++)this.values_[e+o]=n[o];for(var a=0;a<s.length;a++)this.values_[e+n.length+a]=s[a];return i},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&au(),i=Hu(this),s=i||r?{observableKind:"array",object:this.proxy_,type:Qu,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;"production"!==process.env.NODE_ENV&&r&&uu(s),this.atom_.reportChanged(),i&&Zu(this,s),"production"!==process.env.NODE_ENV&&r&&hu()},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&au(),i=Hu(this),s=i||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Yu,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;"production"!==process.env.NODE_ENV&&r&&uu(s),this.atom_.reportChanged(),i&&Zu(this,s),"production"!==process.env.NODE_ENV&&r&&hu()},t.get_=function(e){if(!(this.legacyMode_&&e>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("production"!==process.env.NODE_ENV?"[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX":"[mobx] Out of bounds read: "+e)},t.set_=function(e,t){var n=this.values_;if(this.legacyMode_&&e>n.length&&Co(17,e,n.length),e<n.length){Nl(this.atom_);var r=n[e];if(Gu(this)){var i=qu(this,{type:Qu,object:this.proxy_,index:e,newValue:t});if(!i)return;t=i.newValue}(t=this.enhancer_(t,r))!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else{for(var s=new Array(e+1-n.length),o=0;o<s.length-1;o++)s[o]=void 0;s[s.length-1]=t,this.spliceWithArray_(n.length,0,s)}},e}();function tc(e,t,n,r){return void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableArray@"+Go():"ObservableArray"),void 0===r&&(r=!1),Uo(),Bc(function(){var i=new ec(n,t,r,!1);Qo(i.values_,wa,i);var s=new Proxy(i.values_,Ju);return i.proxy_=s,e&&e.length&&i.spliceWithArray_(0,0,e),s})}var nc={clear:function(){return this.splice(0)},replace:function(e){var t=this[wa];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var s=this[wa];switch(arguments.length){case 0:return[];case 1:return s.spliceWithArray_(e);case 2:return s.spliceWithArray_(e,t)}return s.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){return this[wa].spliceWithArray_(e,t,n)},push:function(){for(var e=this[wa],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[wa].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[wa],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return ql.trackingDerivation&&Co(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){ql.trackingDerivation&&Co(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[wa],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function rc(e,t){"function"==typeof Array.prototype[e]&&(nc[e]=t(e))}function ic(e){return function(){var t=this[wa];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function sc(e){return function(t,n){var r=this,i=this[wa];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e](function(e,i){return t.call(n,e,i,r)})}}function oc(e){return function(){var t=this,n=this[wa];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){return i(e,n,r,t)},r[e].apply(r,arguments)}}rc("at",ic),rc("concat",ic),rc("flat",ic),rc("includes",ic),rc("indexOf",ic),rc("join",ic),rc("lastIndexOf",ic),rc("slice",ic),rc("toString",ic),rc("toLocaleString",ic),rc("toSorted",ic),rc("toSpliced",ic),rc("with",ic),rc("every",sc),rc("filter",sc),rc("find",sc),rc("findIndex",sc),rc("findLast",sc),rc("findLastIndex",sc),rc("flatMap",sc),rc("forEach",sc),rc("map",sc),rc("some",sc),rc("toReversed",sc),rc("reduce",oc),rc("reduceRight",oc);var ac=Jo("ObservableArrayAdministration",ec);function lc(e){return Zo(e)&&ac(e[wa])}var uc={},cc="add",hc="delete",dc=function(){function e(e,t,n){var r=this;void 0===t&&(t=ka),void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableMap@"+Go():"ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[wa]=uc,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,Ho(Map)||Co(18),Bc(function(){r.keysAtom_=Sa("production"!==process.env.NODE_ENV?r.name_+".keys()":"ObservableMap.keys()"),r.data_=new Map,r.hasMap_=new Map,e&&r.merge(e)})}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!ql.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new Sl(this.has_(e),Oa,"production"!==process.env.NODE_ENV?this.name_+"."+ia(e)+"?":"ObservableMap.key?",!1);this.hasMap_.set(e,r),Su(r,function(){return t.hasMap_.delete(e)})}return n.get()},t.set=function(e,t){var n=this.has_(e);if(Gu(this)){var r=qu(this,{type:n?Qu:cc,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((Nl(this.keysAtom_),Gu(this))&&!qu(this,{type:hc,object:this,name:e}))return!1;if(this.has_(e)){var n=au(),r=Hu(this),i=r||n?{observableKind:"map",debugObjectName:this.name_,type:hc,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return"production"!==process.env.NODE_ENV&&n&&uu(i),Vu(function(){var n;t.keysAtom_.reportChanged(),null==(n=t.hasMap_.get(e))||n.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),r&&Zu(this,i),"production"!==process.env.NODE_ENV&&n&&hu(),!0}return!1},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==ql.UNCHANGED){var r=au(),i=Hu(this),s=i||r?{observableKind:"map",debugObjectName:this.name_,type:Qu,object:this,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&uu(s),n.setNewValue_(t),i&&Zu(this,s),"production"!==process.env.NODE_ENV&&r&&hu()}},t.addValue_=function(e,t){var n=this;Nl(this.keysAtom_),Vu(function(){var r,i=new Sl(t,n.enhancer_,"production"!==process.env.NODE_ENV?n.name_+"."+ia(e):"ObservableMap.key",!1);n.data_.set(e,i),t=i.value_,null==(r=n.hasMap_.get(e))||r.setNewValue_(!0),n.keysAtom_.reportChanged()});var r=au(),i=Hu(this),s=i||r?{observableKind:"map",debugObjectName:this.name_,type:cc,object:this,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&uu(s),i&&Zu(this,s),"production"!==process.env.NODE_ENV&&r&&hu()},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return pc({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},t.entries=function(){var e=this,t=this.keys();return pc({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(e,t){for(var n,r=da(this);!(n=r()).done;){var i=n.value,s=i[0],o=i[1];e.call(t,o,s,this)}},t.merge=function(e){var t=this;return fc(e)&&(e=new Map(e)),Vu(function(){var n,r,i;Ko(e)?function(e){var t=Object.keys(e);if(!na)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter(function(t){return Fo.propertyIsEnumerable.call(e,t)})):t}(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)}):ea(e)?(n=e,r=Object.getPrototypeOf(n),i=Object.getPrototypeOf(r),null!==Object.getPrototypeOf(i)&&Co(19,e),e.forEach(function(e,n){return t.set(n,e)})):null!=e&&Co(20,e)}),this},t.clear=function(){var e=this;Vu(function(){Fl(function(){for(var t,n=da(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.replace=function(e){var t=this;return Vu(function(){for(var n,r=function(e){if(ea(e)||fc(e))return e;if(Array.isArray(e))return new Map(e);if(Ko(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return Co(21,e)}(e),i=new Map,s=!1,o=da(t.data_.keys());!(n=o()).done;){var a=n.value;if(!r.has(a))if(t.delete(a))s=!0;else{var l=t.data_.get(a);i.set(a,l)}}for(var u,c=da(r.entries());!(u=c()).done;){var h=u.value,d=h[0],f=h[1],p=t.data_.has(d);if(t.set(d,f),t.data_.has(d)){var g=t.data_.get(d);i.set(d,g),p||(s=!0)}}if(!s)if(t.data_.size!==i.size)t.keysAtom_.reportChanged();else for(var m=t.data_.keys(),_=i.keys(),y=m.next(),v=_.next();!y.done;){if(y.value!==v.value){t.keysAtom_.reportChanged();break}y=m.next(),v=_.next()}t.data_=i}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Co("`observe` doesn't support fireImmediately=true in combination with maps."),Wu(this,e)},t.intercept_=function(e){return $u(this,e)},ha(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),fc=Jo("ObservableMap",dc);function pc(e){return e[Symbol.toStringTag]="MapIterator",Kc(e)}var gc={},mc=function(){function e(e,t,n){var r=this;void 0===t&&(t=ka),void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableSet@"+Go():"ObservableSet"),this.name_=void 0,this[wa]=gc,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,Ho(Set)||Co(22),this.enhancer_=function(e,r){return t(e,r,n)},Bc(function(){r.atom_=Sa(r.name_),e&&r.replace(e)})}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;Vu(function(){Fl(function(){for(var t,n=da(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.forEach=function(e,t){for(var n,r=da(this);!(n=r()).done;){var i=n.value;e.call(t,i,i,this)}},t.add=function(e){var t=this;if(Nl(this.atom_),Gu(this)){var n=qu(this,{type:cc,object:this,newValue:e});if(!n)return this;e=n.newValue}if(!this.has(e)){Vu(function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var r="production"!==process.env.NODE_ENV&&au(),i=Hu(this),s=i||r?{observableKind:"set",debugObjectName:this.name_,type:cc,object:this,newValue:e}:null;r&&"production"!==process.env.NODE_ENV&&uu(s),i&&Zu(this,s),r&&"production"!==process.env.NODE_ENV&&hu()}return this},t.delete=function(e){var t=this;if(Gu(this)&&!qu(this,{type:hc,object:this,oldValue:e}))return!1;if(this.has(e)){var n="production"!==process.env.NODE_ENV&&au(),r=Hu(this),i=r||n?{observableKind:"set",debugObjectName:this.name_,type:hc,object:this,oldValue:e}:null;return n&&"production"!==process.env.NODE_ENV&&uu(i),Vu(function(){t.atom_.reportChanged(),t.data_.delete(e)}),r&&Zu(this,i),n&&"production"!==process.env.NODE_ENV&&hu(),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=this.values();return yc({next:function(){var t=e.next(),n=t.value,r=t.done;return r?{value:void 0,done:r}:{value:[n,n],done:r}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=this.data_.values();return yc({next:function(){var n=t.next(),r=n.value,i=n.done;return i?{value:void 0,done:i}:{value:e.dehanceValue_(r),done:i}}})},t.intersection=function(e){return ta(e)&&!_c(e)?e.intersection(this):new Set(this).intersection(e)},t.union=function(e){return ta(e)&&!_c(e)?e.union(this):new Set(this).union(e)},t.difference=function(e){return new Set(this).difference(e)},t.symmetricDifference=function(e){return ta(e)&&!_c(e)?e.symmetricDifference(this):new Set(this).symmetricDifference(e)},t.isSubsetOf=function(e){return new Set(this).isSubsetOf(e)},t.isSupersetOf=function(e){return new Set(this).isSupersetOf(e)},t.isDisjointFrom=function(e){return ta(e)&&!_c(e)?e.isDisjointFrom(this):new Set(this).isDisjointFrom(e)},t.replace=function(e){var t=this;return _c(e)&&(e=new Set(e)),Vu(function(){Array.isArray(e)||ta(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&Co("Cannot initialize set from "+e)}),this},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Co("`observe` doesn't support fireImmediately=true in combination with sets."),Wu(this,e)},t.intercept_=function(e){return $u(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Symbol.iterator]=function(){return this.values()},ha(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),_c=Jo("ObservableSet",mc);function yc(e){return e[Symbol.toStringTag]="SetIterator",Kc(e)}var vc=Object.create(null),bc="remove",xc=function(){function e(e,t,n,r){void 0===t&&(t=new Map),void 0===r&&(r=Xa),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.keysAtom_=new Aa("production"!==process.env.NODE_ENV?this.name_+".keys":"ObservableObject.keys"),this.isPlainObject_=Ko(this.target_),"production"===process.env.NODE_ENV||Yc(this.defaultAnnotation_)||Co("defaultAnnotation must be valid annotation"),"production"!==process.env.NODE_ENV&&(this.appliedAnnotations_={})}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof Tl)return n.set(t),!0;if(Gu(this)){var r=qu(this,{type:Qu,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==ql.UNCHANGED){var i=Hu(this),s="production"!==process.env.NODE_ENV&&au(),o=i||s?{type:Qu,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&s&&uu(o),n.setNewValue_(t),i&&Zu(this,o),"production"!==process.env.NODE_ENV&&s&&hu()}return!0},t.get_=function(e){return ql.trackingDerivation&&!oa(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),oa(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!ql.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Sl(e in this.target_,Oa,"production"!==process.env.NODE_ENV?this.name_+"."+ia(e)+"?":"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(!0===t&&(t=this.defaultAnnotation_),!1!==t){if(kc(this,t,e),!(e in this.target_)){var n;if(null!=(n=this.target_[_a])&&n[e])return;Co(1,t.annotationType_,this.name_+"."+e.toString())}for(var r=this.target_;r&&r!==Fo;){var i=Io(r,e);if(i){var s=t.make_(this,e,i,r);if(0===s)return;if(1===s)break}r=Object.getPrototypeOf(r)}Tc(this,t,e)}},t.extend_=function(e,t,n,r){if(void 0===r&&(r=!1),!0===n&&(n=this.defaultAnnotation_),!1===n)return this.defineProperty_(e,t,r);kc(this,n,e);var i=n.extend_(this,e,t,r);return i&&Tc(this,n,e),i},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1),Nl(this.keysAtom_);try{Kl();var r=this.delete_(e);if(!r)return r;if(Gu(this)){var i=qu(this,{object:this.proxy_||this.target_,name:e,type:cc,newValue:t.value});if(!i)return null;var s=i.newValue;t.value!==s&&(t=fa({},t,{value:s}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else Do(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{Xl()}return!0},t.defineObservableProperty_=function(e,t,n,r){void 0===r&&(r=!1),Nl(this.keysAtom_);try{Kl();var i=this.delete_(e);if(!i)return i;if(Gu(this)){var s=qu(this,{object:this.proxy_||this.target_,name:e,type:cc,newValue:t});if(!s)return null;t=s.newValue}var o=Ec(e),a={configurable:!ql.safeDescriptors||this.isPlainObject_,enumerable:!0,get:o.get,set:o.set};if(r){if(!Reflect.defineProperty(this.target_,e,a))return!1}else Do(this.target_,e,a);var l=new Sl(t,n,"production"!==process.env.NODE_ENV?this.name_+"."+e.toString():"ObservableObject.key",!1);this.values_.set(e,l),this.notifyPropertyAddition_(e,l.value_)}finally{Xl()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1),Nl(this.keysAtom_);try{Kl();var r=this.delete_(e);if(!r)return r;if(Gu(this))if(!qu(this,{object:this.proxy_||this.target_,name:e,type:cc,newValue:void 0}))return null;t.name||(t.name="production"!==process.env.NODE_ENV?this.name_+"."+e.toString():"ObservableObject.key"),t.context=this.proxy_||this.target_;var i=Ec(e),s={configurable:!ql.safeDescriptors||this.isPlainObject_,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,s))return!1}else Do(this.target_,e,s);this.values_.set(e,new Tl(t)),this.notifyPropertyAddition_(e,void 0)}finally{Xl()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),Nl(this.keysAtom_),!oa(this.target_,e))return!0;if(Gu(this)&&!qu(this,{object:this.proxy_||this.target_,name:e,type:bc}))return null;try{var n;Kl();var r,i=Hu(this),s="production"!==process.env.NODE_ENV&&au(),o=this.values_.get(e),a=void 0;if(!o&&(i||s))a=null==(r=Io(this.target_,e))?void 0:r.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if("production"!==process.env.NODE_ENV&&delete this.appliedAnnotations_[e],o&&(this.values_.delete(e),o instanceof Sl&&(a=o.value_),Ql(o)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(e in this.target_),i||s){var l={type:bc,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:a,name:e};"production"!==process.env.NODE_ENV&&s&&uu(l),i&&Zu(this,l),"production"!==process.env.NODE_ENV&&s&&hu()}}finally{Xl()}return!0},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Co("`observe` doesn't support the fire immediately property for observable objects."),Wu(this,e)},t.intercept_=function(e){return $u(this,e)},t.notifyPropertyAddition_=function(e,t){var n,r=Hu(this),i="production"!==process.env.NODE_ENV&&au();if(r||i){var s=r||i?{type:cc,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&uu(s),r&&Zu(this,s),"production"!==process.env.NODE_ENV&&i&&hu()}null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),ra(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function wc(e,t){var n;if("production"!==process.env.NODE_ENV&&t&&Sc(e)&&Co("Options can't be provided for already observable objects."),oa(e,wa))return"production"===process.env.NODE_ENV||Vc(e)instanceof xc||Co("Cannot convert '"+Uc(e)+"' into observable object:\nThe target is already observable of different type.\nExtending builtins is not supported."),e;"production"===process.env.NODE_ENV||Object.isExtensible(e)||Co("Cannot make the designated object observable; it is not extensible");var r=null!=(n=null==t?void 0:t.name)?n:"production"!==process.env.NODE_ENV?(Ko(e)?"ObservableObject":e.constructor.name)+"@"+Go():"ObservableObject",i=new xc(e,new Map,String(r),function(e){var t;return e?null!=(t=e.defaultDecorator)?t:Ya(e):void 0}(t));return Yo(e,wa,i),e}var Ac=Jo("ObservableObjectAdministration",xc);function Ec(e){return vc[e]||(vc[e]={get:function(){return this[wa].getObservablePropValue_(e)},set:function(t){return this[wa].setObservablePropValue_(e,t)}})}function Sc(e){return!!Zo(e)&&Ac(e[wa])}function Tc(e,t,n){var r;"production"!==process.env.NODE_ENV&&(e.appliedAnnotations_[n]=t),null==(r=e.target_[_a])||delete r[n]}function kc(e,t,n){if("production"===process.env.NODE_ENV||Yc(t)||Co("Cannot annotate '"+e.name_+"."+n.toString()+"': Invalid annotation."),"production"!==process.env.NODE_ENV&&!Ca(t)&&oa(e.appliedAnnotations_,n)){var r=e.name_+"."+n.toString(),i=e.appliedAnnotations_[n].annotationType_;Co("Cannot apply '"+t.annotationType_+"' to '"+r+"':\nThe field is already annotated with '"+i+"'.\nRe-annotating fields is not allowed.\nUse 'override' annotation for methods overridden by subclass.")}}var Oc,Rc,Cc=Dc(0),Pc=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,!1===e}(),Mc=0,Nc=function(){};Oc=Nc,Rc=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Oc.prototype,Rc):void 0!==Oc.prototype.__proto__?Oc.prototype.__proto__=Rc:Oc.prototype=Rc;var Ic=function(e){function t(t,n,r,i){var s;return void 0===r&&(r="production"!==process.env.NODE_ENV?"ObservableArray@"+Go():"ObservableArray"),void 0===i&&(i=!1),s=e.call(this)||this,Bc(function(){var e=new ec(r,n,i,!0);e.proxy_=s,Qo(s,wa,e),t&&t.length&&s.spliceWithArray(0,0,t),Pc&&Object.defineProperty(s,"0",Cc)}),s}pa(t,e);var n=t.prototype;return n.concat=function(){this[wa].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map(function(e){return lc(e)?e.slice():e}))},n[Symbol.iterator]=function(){var e=this,t=0;return Kc({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},ha(t,[{key:"length",get:function(){return this[wa].getArrayLength_()},set:function(e){this[wa].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(Nc);function Dc(e){return{enumerable:!1,configurable:!0,get:function(){return this[wa].get_(e)},set:function(t){this[wa].set_(e,t)}}}function Fc(e){Do(Ic.prototype,""+e,Dc(e))}function zc(e){if(e>Mc){for(var t=Mc;t<e+100;t++)Fc(t);Mc=e}}function Lc(e,t,n){return new Ic(e,t,n)}function jc(e,t){if("object"==typeof e&&null!==e){if(lc(e))return void 0!==t&&Co(23),e[wa].atom_;if(_c(e))return e.atom_;if(fc(e)){if(void 0===t)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||Co(25,t,Uc(e)),n}if(Sc(e)){if(!t)return Co(26);var r=e[wa].values_.get(t);return r||Co(27,t,Uc(e)),r}if(Ea(e)||Rl(e)||ou(e))return e}else if(Ho(e)&&ou(e[wa]))return e[wa];Co(28)}function Vc(e,t){return e||Co(29),Ea(e)||Rl(e)||ou(e)||fc(e)||_c(e)?e:e[wa]?e[wa]:void Co(24,e)}function Uc(e,t){var n;if(void 0!==t)n=jc(e,t);else{if(xu(e))return e.name;n=Sc(e)||fc(e)||_c(e)?Vc(e):jc(e)}return n.name_}function Bc(e){var t=zl(),n=Al(!0);Kl();try{return e()}finally{Xl(),El(n),Ll(t)}}Object.entries(nc).forEach(function(e){var t=e[0],n=e[1];"concat"!==t&&Yo(Ic.prototype,t,n)}),zc(1e3);var Gc,$c=Fo.toString;function qc(e,t,n){return void 0===n&&(n=-1),Hc(e,t,n)}function Hc(e,t,n,r,i){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var s=typeof e;if("function"!==s&&"object"!==s&&"object"!=typeof t)return!1;var o=$c.call(e);if(o!==$c.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0===+e?1/+e==1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++}e=Wc(e),t=Wc(t);var a="[object Array]"===o;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var l=e.constructor,u=t.constructor;if(l!==u&&!(Ho(l)&&l instanceof l&&Ho(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),i=i||[];for(var c=(r=r||[]).length;c--;)if(r[c]===e)return i[c]===t;if(r.push(e),i.push(t),a){if((c=e.length)!==t.length)return!1;for(;c--;)if(!Hc(e[c],t[c],n-1,r,i))return!1}else{var h=Object.keys(e),d=h.length;if(Object.keys(t).length!==d)return!1;for(var f=0;f<d;f++){var p=h[f];if(!oa(t,p)||!Hc(e[p],t[p],n-1,r,i))return!1}}return r.pop(),i.pop(),!0}function Wc(e){return lc(e)?e.slice():ea(e)||fc(e)||ta(e)||_c(e)?Array.from(e.entries()):e}var Zc=(null==(Gc=Mo().Iterator)?void 0:Gc.prototype)||{};function Kc(e){return e[Symbol.iterator]=Xc,Object.assign(Object.create(Zc),e)}function Xc(){return this}function Yc(e){return e instanceof Object&&"string"==typeof e.annotationType_&&Ho(e.make_)&&Ho(e.extend_)}["Symbol","Map","Set"].forEach(function(e){void 0===Mo()[e]&&Co("MobX requires global '"+e+"' to be available or polyfilled")}),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return"production"===process.env.NODE_ENV?(console.warn("[mobx.spy] Is a no-op in production builds"),function(){}):(ql.spyListeners.push(e),$o(function(){ql.spyListeners=ql.spyListeners.filter(function(t){return t!==e})}))},extras:{getDebugName:Uc},$mobx:wa});class Qc{constructor(){Xu(this)}_visible=fl.map();getIsVisible(e){return this._visible.get(e)??!1}_setVisible({name:e,value:t}){this._visible.set(e,t)}openModal(e){this._setVisible({name:e,value:!0})}closeModal(e){this._setVisible({name:e,value:!1})}closeAllModals(){this._visible.clear()}}const Jc=new Qc;class eh{constructor(){Xu(this)}_isUnauthorized=!1;get isUnauthorized(){return this._isUnauthorized}set isUnauthorized(e){this._isUnauthorized=e}}const th=new eh;class nh{authStore=th;modalStore=Jc}const rh=new nh,ih=n.createContext(rh),sh=({children:t})=>e(ih.Provider,{value:rh,children:t});class oh{client;constructor(e){this.client=te.create({baseURL:e,timeout:1e4,headers:{"Content-Type":"application/json"}}),this.setupInterceptors()}setupInterceptors(){this.client.interceptors.request.use(e=>(rh.authStore.isUnauthorized=!1,e),e=>(So({message:e.message,variant:"error"}),Promise.reject(e))),this.client.interceptors.response.use(e=>e,e=>(So({message:e.message,variant:"error"}),401===e.status&&(rh.authStore.isUnauthorized=!0),Promise.reject(e)))}async get({url:e,config:t}){return(await this.client.get(e,t)).data}async post({url:e,body:t,config:n}){return(await this.client.post(e,t,n)).data}async put({url:e,body:t,config:n}){return(await this.client.put(e,t,n)).data}async patch({url:e,body:t,config:n}){return(await this.client.patch(e,t,n)).data}async delete({url:e,config:t}){return(await this.client.delete(e,t)).data}}const ah=e=>new oh(e);class lh{configOptions;_apiService;get apiService(){return this._apiService}static _instance=null;static get instance(){if(!lh._instance)throw new Error("Dartcom Config не инициализирован с приватным ключом. Вызовите Config.initialize(...) первым, чтобы иметь возможность пользоваться компонентами нашей библиотеки");return lh._instance}static initialize(e){lh._instance||(lh._instance=new lh(e))}static deactivate(){this._instance=null}constructor(e){this.configOptions=e,this._apiKey=e.apiKey,this._apiService=ah(e.backendUrl),this._getCheckKeyData().then(t=>{if(t){const{valid:n}=t;e.onCheck?.(t),this._isValidApiKey=n}})}_apiKey="";get apiKey(){return this._apiKey}_isValidApiKey=!1;get isValidApiKey(){return this._isValidApiKey}async _getCheckKeyData(){const e=await this._apiService.get({url:"check_tile_token",config:{params:{tile_token:this._apiKey}}}).then(e=>e).catch(e=>{const{response:t,message:n}=e;if(this.configOptions.onError?.(e),t){const{data:{detail:e}}=t;return e}return{reason:n,valid:!1}});return e}}const uh={valid:"18c38ab326d12f428e90be50a5141fc8949de497df7f7e0c1796d58e99d006f3",dateExpired:"8cbc5e15e61e649daf57c3a08422ae372c101afb4759036a3864a9fa588ef717",off:"b1520018920b33a4c1f8100c4f3bb3eb93661db829faa99c9cd75537f6300ba9",invalid:"abcdefghijklmnopqrstuvwxyz0123456789"};const ch=new class{constructor(){}log({message:e,context:t,meta:n}){console.log(t,e,n)}warn({message:e,context:t,meta:n}){console.warn(t,e,n)}error({message:e,context:t,meta:n}){console.error(t,e,n)}};var hh,dh;!function(e){e.GET="GET",e.DELETE="DELETE",e.PUT="PUT",e.POST="POST"}(hh||(hh={})),function(e){e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e.TOP_LEFT="top-left"}(dh||(dh={}));const fh="https://dalganmap.ru/api";var ph,gh;!function(e){e.ONE_WAY='"OneWay"',e.POINT_ADDRESS='"PointAddress"',e.BUILDING_AREA='"MapBuildingECArea"',e.BUILTUP_AREA='"MapAdminBuiltupArea"',e.ADMIN_AREA='"MapAdminArea"',e.OCEAN_AREA='"MapOceanArea"',e.OCEAN_AREA_LABEL='"MapOceanAreaLabel"',e.FACILITY_AREA='"MapFacilityArea"',e.FACILITY_AREA_LABEL='"MapFacilityAreaLabel"',e.LANDUSE_AREA='"MapLanduseArea"',e.LANDUSE_AREA_LABEL='"MapLanduseAreaLabel"',e.NATURE_FIELD='"MapNatureField"',e.NATURE_FOREST='"MapNatureForest"',e.LINK='"Link"',e.RAILROAD_LINK='"MapRailroadLink"',e.WATER_LINK='"MapWaterLink"',e.WATER_AREA='"MapWaterArea"',e.WATER_AREA_LABEL='"MapWaterAreaLabel"',e.WATER_LAKE_LABEL='"MapWaterLakeLabel"',e.POI='"POI"',e.CITY_POI='"CityPOI"',e.CONDITIONS='"Conditions"',e.ROAD_POLY='"RoadPoly"',e.PARKING_LINE='"ParkingLine"',e.LINE_MARKING_LINE='"LaneMarkingLine"',e.LINE_MARKING_POLY='"LaneMarkingPoly"',e.TRAFFIC_SIGN='"TrafficSign"',e.TRAFFIC_SIGNAL='"TrafficSignal"',e.CAMERA='"Camera"',e.PILLAR='"Pillar"'}(ph||(ph={})),function(e){e.TILE="tile",e.NATURE_TILE="nature_tile",e.MSK="msk"}(gh||(gh={}));const mh=256,_h="https://dalganmap.ru/api-image/images",yh={[gh.TILE]:`${fh}/tiles/get_tile/{z}/{x}/{y}.mvt`,[gh.NATURE_TILE]:`${fh}/tiles/get_nature_tile/{z}/{x}/{y}.mvt`,[gh.MSK]:"http://89.108.118.23:3070/tiles/get_tile/{z}/{x}/{y}.mvt"},vh=e=>{const t=[],n={source:e,layer:ph.ROAD_POLY},r={id:ko(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'Road';\n\n return isFilter;\n }",draw:{polygons:{color:"#BABCC2"}}},i={id:ko(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'Tram';\n\n return isFilter;\n }",draw:{polygons:{color:"#ADA8A8"}}},s={id:ko(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'Curb';\n\n return isFilter;\n }",draw:{polygons:{color:"#D2D9E6"}}},o={id:ko(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'Bridge';\n\n return isFilter;\n }",draw:{polygons:{color:"#E1DFDD"}}};return t.push(r,i,s,o),t},bh=e=>{const t=[],n={source:e,layer:ph.LINE_MARKING_POLY},r={id:ko(),data:n,filter:"function() {\n const { poly_number } = feature;\n\n const isFilter = poly_number === '1.14.1';\n\n return isFilter;\n }",draw:{styles:{zebra_crossing:{attributes:{a_angle:"function() {\n return feature.angle;\n }"}}}}},i={id:ko(),data:n,filter:"function() {\n const { poly_number } = feature;\n\n const isFilter = poly_number === '1.18';\n\n return isFilter;\n }",draw:{polygons:{color:"white"}}};return t.push(i,r),t},xh=e=>{const t=[],n={source:e,layer:ph.LINE_MARKING_LINE},r="white",i=.5,s={id:ko(),data:n,sublayers:{1.1:{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.1';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i}}},1.5:{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.5';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,dash:[4,10]}}},1.6:{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.6';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,dash:[5,5]}}},"1.16.1":{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.16.1';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i}}},1.7:{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.7';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,dash:[4,10]}}},"1.7-blue":{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.7blue';\n\n return isFilter;\n }",draw:{lines:{color:"blue",width:i,dash:[4,10]}}},"1.14.3":{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.14.3';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,dash:[3,8]}}},1.12:{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.12';\n\n return isFilter;\n }",draw:{lines:{color:r,width:1.5}}},"1.17.1":{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.17.1';\n\n return isFilter;\n }",draw:{lines:{color:"yellow",width:i}}},1.26:{filter:"function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.26';\n\n return isFilter;\n }",draw:{lines:{color:"yellow",width:i}}}}},o={"1.3-left":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.3';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,offset:-.5}}},"1.3-right":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.3';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,offset:i}}},"1.11r-left":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11r';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,offset:-.5}}},"1.11r-right":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11r';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,offset:i,dash:[5,5]}}},"1.11l-left":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11l';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,offset:-.5,dash:[5,5]}}},"1.11l-right":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11l';\n\n return isFilter;\n }",draw:{lines:{color:r,width:i,offset:i}}},"1.25-left":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.25';\n\n return isFilter;\n }",draw:{lines:{color:r,width:1,offset:-.5,dash:[1,1],dash_background_color:[0,0,0,0]}}},"1.25-right":{id:ko(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.25';\n\n return isFilter;\n }",draw:{lines:{color:"rgba(0,0,0,0)",width:1,offset:.5,dash:[1,1],dash_background_color:[1,1,1]}}}};return t.push(s,...Object.values(o)),t},wh=e=>{const t=[],n={source:e,layer:ph.PARKING_LINE},r={id:ko(),data:n,draw:{lines:{color:"white",width:1}}};return t.push(r),t},Ah={tsodd_id:0,dit_id:0},Eh=["future_maintanance_date","placement_date","rapair_performed_date","verification_date","warranty_expr_date"],Sh={future_maintanance_date:new Date,placement_date:new Date,rapair_performed_date:new Date,verification_date:new Date,warranty_expr_date:new Date},Th={future_maintanance_date:(new Date).toISOString(),placement_date:(new Date).toISOString(),rapair_performed_date:(new Date).toISOString(),verification_date:(new Date).toISOString(),warranty_expr_date:(new Date).toISOString()};var kh;!function(e){e.ACTIVE="Действующий",e.INACTIVE="Недействующий",e.TEMPORARY="Временный"}(kh||(kh={}));const Oh=Object.values(kh).map(e=>({label:e,value:e})),Rh={traffic_signal_id:"",traffic_sign_id:"",camera_id:"",dit_id:"",dop_id:"",tsodd_id:"",pillar_id:"",dops:"",signal_model:"Модель",comment:"Комментарий",direction:"Направление",status:"Статус",traffic_sign_number:"Номер знака",traffic_sign_title:"Название знака",traffic_sign_value:"Значение",traffic_sign_type:"Тип знака",lat:"Широта",lon:"Долгота",future_maintanance_date:"Дата следующего обслуживания",placement_date:"Дата установки",rapair_performed_date:"Дата последнего ремонта",verification_date:"Дата поверки",warranty_expr_date:"Дата окончания гарантии",dop_sign_number:"Номер знака",dop_sign_text:"Текст на табличке",dop_sign_title:"Название знака",camera_model:"Модель",fixing_type:"Тип"},Ch="dd.MM.yyyy";var Ph,Mh;var Nh,Ih,Dh=function(){if(Mh)return Ph;function e(e){this._maxSize=e,this.clear()}Mh=1,e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(e){return this._values[e]},e.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,s=/^\s*(['"]?)(.*?)(\1)\s*$/,o=new e(512),a=new e(512),l=new e(512);function u(e){return o.get(e)||o.set(e,c(e).map(function(e){return e.replace(s,"$2")}))}function c(e){return e.match(t)||[""]}function h(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function d(e){return!h(e)&&(function(e){return e.match(r)&&!e.match(n)}(e)||function(e){return i.test(e)}(e))}return Ph={Cache:e,split:c,normalizePath:u,setter:function(e){var t=u(e);return a.get(e)||a.set(e,function(e,n){for(var r=0,i=t.length,s=e;r<i-1;){var o=t[r];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;s=s[t[r++]]}s[t[r]]=n})},getter:function(e,t){var n=u(e);return l.get(e)||l.set(e,function(e){for(var r=0,i=n.length;r<i;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(h(t)||n.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,i,s,o,a=e.length;for(i=0;i<a;i++)(r=e[i])&&(d(r)&&(r='"'+r+'"'),s=!(o=h(r))&&/^\d+$/.test(r),t.call(n,r,o,s,i,e))}(Array.isArray(e)?e:c(e),t,n)}},Ph}();var Fh,zh=function(){if(Ih)return Nh;Ih=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=t=>t.match(e)||[],n=e=>e[0].toUpperCase()+e.slice(1),r=(e,n)=>t(e).join(n).toLowerCase(),i=e=>t(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,"");return Nh={words:t,upperFirst:n,camelCase:i,pascalCase:e=>n(i(e)),snakeCase:e=>r(e,"_"),kebabCase:e=>r(e,"-"),sentenceCase:e=>n(r(e," ")),titleCase:e=>t(e).map(n).join(" ")}}(),Lh={exports:{}};var jh=function(){if(Fh)return Lh.exports;function e(e,t){var n=e.length,r=new Array(n),i={},s=n,o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!a.has(e[0])||!a.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(e,t,s){if(s.has(e)){var u;try{u=", node was:"+JSON.stringify(e)}catch(e){u=""}throw new Error("Cyclic dependency"+u)}if(!a.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var c=o.get(e)||new Set;if(t=(c=Array.from(c)).length){s.add(e);do{var h=c[--t];l(h,a.get(h),s)}while(t);s.delete(e)}r[--n]=e}}}return Fh=1,Lh.exports=function(t){return e(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(t),t)},Lh.exports.array=e,Lh.exports}(),Vh=Ii(jh);const Uh=Object.prototype.toString,Bh=Error.prototype.toString,Gh=RegExp.prototype.toString,$h="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",qh=/^Symbol\((.*)\)(.*)$/;function Hh(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return $h.call(e).replace(qh,"Symbol($1)");const r=Uh.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+Bh.call(e)+"]":"RegExp"===r?Gh.call(e):null}function Wh(e,t){let n=Hh(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=Hh(this[e],t);return null!==r?r:n},2)}function Zh(e){return null==e?[]:[].concat(e)}let Kh,Xh,Yh,Qh=/\$\{\s*(\w+)\s*\}/g;Kh=Symbol.toStringTag;class Jh{constructor(e,t,n,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Kh]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],Zh(e).forEach(e=>{if(ed.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Xh=Symbol.hasInstance,Yh=Symbol.toStringTag;class ed extends Error{static formatError(e,t){const n=t.label||t.path||"this";return t=Object.assign({},t,{path:n,originalPath:t.path}),"string"==typeof e?e.replace(Qh,(e,n)=>Wh(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r,i){const s=new Jh(e,t,n,r);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Yh]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ed)}static[Xh](e){return Jh[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let td={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=null!=r&&r!==n?` (cast from the value \`${Wh(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${Wh(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Wh(n,!0)}\``+i}},nd={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},rd={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},id={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},sd={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},od={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},ad={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Wh(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Wh(n,!0)}\``}return ed.formatError(td.notType,e)}};Object.assign(Object.create(null),{mixed:td,string:nd,number:rd,date:id,object:sd,array:od,boolean:{isValue:"${path} field must be ${value}"},tuple:ad});const ld=e=>e&&e.__isYupSchema__;class ud{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,s="function"==typeof n?n:(...e)=>e.every(e=>e===n);return new ud(e,(e,t)=>{var n;let o=s(...e)?r:i;return null!=(n=null==o?void 0:o(t))?n:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn(n,e,t);if(void 0===r||r===e)return e;if(!ld(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}const cd="$",hd=".";class dd{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===cd,this.isValue=this.key[0]===hd,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?cd:this.isValue?hd:"";this.path=this.key.slice(n.length),this.getter=this.path&&Dh.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}dd.prototype.__isYupRef=!0;const fd=e=>null==e;function pd(e){function t({value:t,path:n="",options:r,originalValue:i,schema:s},o,a){const{name:l,test:u,params:c,message:h,skipAbsent:d}=e;let{parent:f,context:p,abortEarly:g=s.spec.abortEarly,disableStackTrace:m=s.spec.disableStackTrace}=r;const _={value:t,parent:f,context:p};function y(e={}){const r=gd(Object.assign({value:t,originalValue:i,label:s.spec.label,path:e.path||n,spec:s.spec,disableStackTrace:e.disableStackTrace||m},c,e.params),_),o=new ed(ed.formatError(e.message||h,r),t,r.path,e.type||l,r.disableStackTrace);return o.params=r,o}const v=g?o:a;let b={path:n,parent:f,type:l,from:r.from,createError:y,resolve:e=>md(e,_),options:r,originalValue:i,schema:s};const x=e=>{ed.isError(e)?v(e):e?a(null):v(y())},w=e=>{ed.isError(e)?v(e):o(e)};if(d&&fd(t))return x(!0);let A;try{var E;if(A=u.call(b,t,b),"function"==typeof(null==(E=A)?void 0:E.then)){if(r.sync)throw new Error(`Validation test of type: "${b.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(A).then(x,w)}}catch(e){return void w(e)}x(A)}return t.OPTIONS=e,t}function gd(e,t){if(!e)return e;for(const n of Object.keys(e))e[n]=md(e[n],t);return e}function md(e,t){return dd.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function _d(e,t,n,r=n){let i,s,o;return t?(Dh.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a,h="tuple"===(e=e.resolve({context:r,parent:i,value:n})).type,d=u?parseInt(c,10):0;if(e.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[d],e=h?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[c],e=e.fields[c]}s=c,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class yd extends Set{describe(){const e=[];for(const t of this.values())e.push(dd.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new yd(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function vd(e,t=new Map){if(ld(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=vd(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,vd(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(vd(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=vd(i,t)}return n}function bd(e){if(null==e||!e.length)return;const t=[];let n="",r=!1,i=!1;for(let s=0;s<e.length;s++){const o=e[s];"["!==o||i?"]"!==o||i?'"'!==o?"."!==o||r||i?n+=o:n&&(t.push(n),n=""):i=!i:(n&&(/^\d+$/.test(n)?t.push(n):t.push(n.replace(/^"|"$/g,"")),n=""),r=!1):(n&&(t.push(...n.split(".").filter(Boolean)),n=""),r=!0)}return n&&t.push(...n.split(".").filter(Boolean)),t}function xd(e,t){var n;if((null==(n=e.inner)||!n.length)&&e.errors.length)return function(e,t){const n=t?`${t}.${e.path}`:e.path;return e.errors.map(e=>({message:e,path:bd(n)}))}(e,t);const r=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>xd(e,r))}class wd{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new yd,this._blacklist=new yd,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(td.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=vd(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=Object.assign({},t.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,r,i;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(i=e.disableStackTrace)?i:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({},t,{value:e})),r="ignore-optionality"===t.assert,i=n._cast(e,t);if(!1!==t.assert&&!n.isType(i)){if(r&&fd(i))return i;let s=Wh(e),o=Wh(i);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${s} \n`+(o!==s?`result of cast: ${o}`:""))}return i}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((n,r)=>r.call(this,n,e,this,t),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,r){let{path:i,originalValue:s=e,strict:o=this.spec.strict}=t,a=e;o||(a=this._cast(a,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:i,value:a,originalValue:s,options:t,tests:l},n,e=>{if(e.length)return r(e,a);this.runTests({path:i,value:a,originalValue:s,options:t,tests:this.tests},n,r)})}runTests(e,t,n){let r=!1,{tests:i,value:s,originalValue:o,path:a,options:l}=e,u=e=>{r||(r=!0,t(e,s))},c=e=>{r||(r=!0,n(e,s))},h=i.length,d=[];if(!h)return c([]);let f={value:s,originalValue:o,path:a,options:l,schema:this};for(let e=0;e<i.length;e++){(0,i[e])(f,u,function(e){e&&(Array.isArray(e)?d.push(...e):d.push(e)),--h<=0&&c(d)})}}asNestedTest({key:e,index:t,parent:n,parentPath:r,originalParent:i,options:s}){const o=null!=e?e:t;if(null==o)throw TypeError("Must include `key` or `index` for nested validations");const a="number"==typeof o;let l=n[o];const u=Object.assign({},s,{strict:!0,parent:n,value:l,originalValue:i[o],key:void 0,[a?"index":"key"]:o,path:a||o.includes(".")?`${r||""}[${a?o:`"${o}"`}]`:(r?`${r}.`:"")+e});return(e,t,n)=>this.resolve(u)._validate(l,u,t,n)}validate(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),i=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return new Promise((n,s)=>r._validate(e,t,(e,t)=>{ed.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new ed(e,t,void 0,void 0,i)):n(t)}))}validateSync(e,t){var n;let r,i=this.resolve(Object.assign({},t,{value:e})),s=null!=(n=null==t?void 0:t.disableStackTrace)?n:i.spec.disableStackTrace;return i._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw ed.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new ed(t,e,void 0,void 0,s);r=n}),r}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(ed.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(ed.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):vd(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=pd({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=pd({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=td.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=td.notNull){return this.nullability(!1,e)}required(e=td.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=td.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=pd(t),i=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(i)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0}),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=Zh(e).map(e=>new dd(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new ud(r,t):ud.fromOptions(r,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=pd({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=td.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=pd({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=td.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=pd({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:r,optional:i,nullable:s}=t.spec,o={meta:r,label:n,optional:i,nullable:s,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.filter((e,t,n)=>n.findIndex(t=>t.OPTIONS.name===e.OPTIONS.name)===t).map(t=>{const n=t.OPTIONS.params&&e?gd(Object.assign({},t.OPTIONS.params),e):t.OPTIONS.params;return{name:t.OPTIONS.name,params:n}})};return o}get"~standard"(){const e=this,t={version:1,vendor:"yup",async validate(t){try{return{value:await e.validate(t,{abortEarly:!1})}}catch(e){if(e instanceof ed)return{issues:xd(e)};throw e}}};return t}}wd.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])wd.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=_d(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])wd.prototype[e]=wd.prototype.oneOf;for(const e of["not","nope"])wd.prototype[e]=wd.prototype.notOneOf;const Ad=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Ed(e){var t,n;const r=Ad.exec(e);return r?{year:Sd(r[1]),month:Sd(r[2],1)-1,day:Sd(r[3],1),hour:Sd(r[4]),minute:Sd(r[5]),second:Sd(r[6]),millisecond:r[7]?Sd(r[7].substring(0,3)):0,precision:null!=(t=null==(n=r[7])?void 0:n.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Sd(r[10]),minuteOffset:Sd(r[11])}:null}function Sd(e,t=0){return Number(e)||t}let Td=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,kd=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Od=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Rd=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),Cd=e=>fd(e)||e===e.trim(),Pd={}.toString();function Md(){return new Nd}class Nd extends wd{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce||this.isType(e))return e;if(Array.isArray(e))return e;const n=null!=e&&e.toString?e.toString():e;return n===Pd?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||td.required,name:"required",skipAbsent:!0,test:e=>!!e.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e))}length(e,t=nd.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=nd.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=nd.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,r,i=!1;return t&&("object"==typeof t?({excludeEmptyString:i=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||nd.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&i||-1!==t.search(e)})}email(e=nd.email){return this.matches(Td,{name:"email",message:e,excludeEmptyString:!0})}url(e=nd.url){return this.matches(kd,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=nd.uuid){return this.matches(Od,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:n}=e):r=e),this.matches(Rd,{name:"datetime",message:r||nd.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||nd.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=Ed(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:r||nd.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=Ed(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=nd.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:Cd})}lowercase(e=nd.lowercase){return this.transform(e=>fd(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>fd(e)||e===e.toLowerCase()})}uppercase(e=nd.uppercase){return this.transform(e=>fd(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>fd(e)||e===e.toUpperCase()})}}Md.prototype=Nd.prototype;function Id(){return new Dd}class Dd extends wd{constructor(){super({type:"number",check:e=>(e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!(e=>e!=+e)(e))}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce)return e;let n=e;if("string"==typeof n){if(n=n.replace(/\s/g,""),""===n)return NaN;n=+n}return this.isType(n)||null===n?n:parseFloat(n)})})}min(e,t=rd.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t>=this.resolve(e)}})}max(e,t=rd.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t<=this.resolve(e)}})}lessThan(e,t=rd.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(t){return t<this.resolve(e)}})}moreThan(e,t=rd.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(e=rd.positive){return this.moreThan(0,e)}negative(e=rd.negative){return this.lessThan(0,e)}integer(e=rd.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(e=>fd(e)?e:0|e)}round(e){var t;let n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>fd(t)?t:Math[e](t))}}Id.prototype=Dd.prototype;let Fd=new Date("");function zd(){return new Ld}class Ld extends wd{constructor(){super({type:"date",check(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),this.withMutation(()=>{this.transform((e,t)=>!this.spec.coerce||this.isType(e)||null===e?e:(e=function(e){const t=Ed(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?Ld.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(dd.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=id.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=id.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function jd(e,t){let n=1/0;return e.some((e,r)=>{var i;if(null!=(i=t.path)&&i.includes(e))return n=r,!0}),n}function Vd(e){return(t,n)=>jd(e,t)-jd(e,n)}Ld.INVALID_DATE=Fd,zd.prototype=Ld.prototype,zd.INVALID_DATE=Fd;const Ud=(e,t,n)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return n.isType(r)?r:e};function Bd(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Bd(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=Bd(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Bd)}):"optional"in e?e.optional():e}let Gd=e=>"[object Object]"===Object.prototype.toString.call(e);function $d(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const qd=Vd([]);function Hd(e){return new Wd(e)}class Wd extends wd{constructor(e){super({type:"object",check:e=>Gd(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=qd,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let i=this.fields,s=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(r).filter(e=>!this._nodes.includes(e))),a={},l=Object.assign({},t,{parent:a,__validating:t.__validating||!1}),u=!1;for(const e of o){let n=i[e],o=e in r,c=r[e];if(n){let i;l.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:c,context:t.context,parent:a});let s=n instanceof wd?n.spec:void 0,o=null==s?void 0:s.strict;if(null!=s&&s.strip){u=u||e in r;continue}i=t.__validating&&o?c:n.cast(c,l),void 0!==i&&(a[e]=i)}else o&&!s&&(a[e]=c);o===e in a&&a[e]===c||(u=!0)}return u?a:r}_validate(e,t={},n,r){let{from:i=[],originalValue:s=e,recursive:o=this.spec.recursive}=t;t.from=[{schema:this,value:s},...i],t.__validating=!0,t.originalValue=s,super._validate(e,t,n,(e,i)=>{if(!o||!Gd(i))return void r(e,i);s=s||i;let a=[];for(let e of this._nodes){let n=this.fields[e];n&&!dd.isRef(n)&&a.push(n.asNestedTest({options:t,key:e,parent:i,parentPath:t.path,originalParent:s}))}this.runTests({tests:a,value:i,originalValue:s,options:t},n,t=>{r(t.sort(this._sortErrors).concat(e),i)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];n[e]=void 0===r?t:r}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(n=>{var r;const i=this.fields[n];let s=e;null!=(r=s)&&r.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),t[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([e,t])=>`${e}-${t}`));function s(e,t){let s=Dh.split(e)[0];r.add(s),i.has(`${t}-${s}`)||n.push([t,s])}for(const t of Object.keys(e)){let n=e[t];r.add(t),dd.isRef(n)&&n.isSibling?s(n.path,t):ld(n)&&"deps"in n&&n.deps.forEach(e=>s(e,t))}return Vh.array(Array.from(r),n).reverse()}(e,t),n._sortErrors=Vd(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),r)})}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return Bd(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let r=Dh.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return((e,t)=>{const n=[...Dh.normalizePath(t)];if(1===n.length)return n[0]in e;let r=n.pop(),i=Dh.getter(Dh.join(n),!0)(e);return!(!i||!(r in i))})(i,e)&&(s=Object.assign({},i),n||delete s[e],s[t]=r(i)),s})}json(){return this.transform(Ud)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||sd.exact,test(e){if(null==e)return!0;const t=$d(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=sd.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=$d(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=sd.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const n={};for(const r of Object.keys(t))n[e(r)]=t[r];return n})}camelCase(){return this.transformKeys(zh.camelCase)}snakeCase(){return this.transformKeys(zh.snakeCase)}constantCase(){return this.transformKeys(e=>zh.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[i,s]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[i]})),n.fields[i]=s.describe(t)}return n}}function Zd(e){return new Kd(e)}Hd.prototype=Wd.prototype;class Kd extends wd{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1;const i=n.map((e,i)=>{const s=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${i}]`,parent:n,originalValue:e,value:e,index:i}));return s!==e&&(r=!0),s});return r?i:n}_validate(e,t={},n,r){var i;let s=this.innerType,o=null!=(i=t.recursive)?i:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,n,(i,a)=>{var l;if(!o||!s||!this._typeCheck(a))return void r(i,a);let u=new Array(a.length);for(let n=0;n<a.length;n++){var c;u[n]=s.asNestedTest({options:t,index:n,parent:a,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:a,tests:u,originalValue:null!=(l=t.originalValue)?l:e,options:t},n,e=>r(e.concat(i),a))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(Ud)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!ld(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Wh(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=od.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return t=t||od.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return t=t||od.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);if(t.innerType){var r;let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=t.innerType.describe(i)}return n}}Zd.prototype=Kd.prototype;const Xd={future_maintanance_date:zd().required(),placement_date:zd().required(),rapair_performed_date:zd().required(),verification_date:zd().required(),warranty_expr_date:zd().required()},Yd={lat:Id().required(),lon:Id().required()},Qd=N(x)(()=>{const{spacing:e}=F();return{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:e(2)}}),Jd=N(x)(()=>{const{spacing:e}=F();return{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:e(2),justifyItems:"flex-start"}});var ef={global:{links:{getIsConstruction:"function (feature) {\n const { construction } = feature;\n\n return construction;\n}\n",getIsFunctionalClass:"function (feature) {\n const { functional_class, access_id } = feature;\n\n return functional_class === 5 && access_id === 32;\n}\n",getIsLowMobility:"function (feature) {\n const { functional_class, low_mobility } = feature;\n\n return functional_class === 5 && low_mobility === 1;\n}\n"}},cameras:{camera1:{type:"perspective",vanishing_point:[0,-500]}},textures:{arrow:{url:"https://dalganmap.ru/api-image/images/arrow-20.png",sprites:{base:[0,0,20,20]}},"traffic-signal":{url:"https://dalganmap.ru/api-image/images/conditions/traffic-signal.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},pedestrian_crossing:{url:"https://dalganmap.ru/api-image/images/conditions/pedestrian_crossing.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},physical:{url:"https://dalganmap.ru/api-image/images/conditions/physical.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},gate:{url:"https://dalganmap.ru/api-image/images/conditions/gate.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_3578:{url:"https://dalganmap.ru/api-image/images/POI/3578.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5813:{url:"https://dalganmap.ru/api-image/images/POI/5813.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5541:{url:"https://dalganmap.ru/api-image/images/POI/5541.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5540:{url:"https://dalganmap.ru/api-image/images/POI/5540.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9530(Mail)":{url:"https://dalganmap.ru/api-image/images/POI/mail.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9530(Delivery)":{url:"https://dalganmap.ru/api-image/images/POI/delivery.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5400:{url:"https://dalganmap.ru/api-image/images/POI/5400.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_6000:{url:"https://dalganmap.ru/api-image/images/POI/6000.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9565:{url:"https://dalganmap.ru/api-image/images/POI/9565.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9583:{url:"https://dalganmap.ru/api-image/images/POI/9583.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_8060:{url:"https://dalganmap.ru/api-image/images/POI/8060.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5511:{url:"https://dalganmap.ru/api-image/images/POI/5511.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5512:{url:"https://dalganmap.ru/api-image/images/POI/5512.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5800:{url:"https://dalganmap.ru/api-image/images/POI/5800.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5999:{url:"https://dalganmap.ru/api-image/images/POI/5999.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7011:{url:"https://dalganmap.ru/api-image/images/POI/7011.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7389:{url:"https://dalganmap.ru/api-image/images/POI/7389.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7832:{url:"https://dalganmap.ru/api-image/images/POI/7832.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7929:{url:"https://dalganmap.ru/api-image/images/POI/7929.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7990:{url:"https://dalganmap.ru/api-image/images/POI/7990.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7999:{url:"https://dalganmap.ru/api-image/images/POI/7999.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_8410:{url:"https://dalganmap.ru/api-image/images/POI/8410.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9517:{url:"https://dalganmap.ru/api-image/images/POI/9517.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9718:{url:"https://dalganmap.ru/api-image/images/POI/9718.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(mosque)":{url:"https://dalganmap.ru/api-image/images/POI/9992_mosque.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(church)":{url:"https://dalganmap.ru/api-image/images/POI/9992_church.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(temple)":{url:"https://dalganmap.ru/api-image/images/POI/9992_temple.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(davidStar)":{url:"https://dalganmap.ru/api-image/images/POI/9992_davidStar.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(mortar)":{url:"https://dalganmap.ru/api-image/images/POI/9992_mortar.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_4100(metro)":{url:"https://dalganmap.ru/api-image/images/POI/4100_metro.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_4100(diameter)":{url:"https://dalganmap.ru/api-image/images/POI/4100_diameter.png",filtering:"mipmap",sprites:{base:[0,0,41,15]}},POI_4013:{url:"https://dalganmap.ru/api-image/images/POI/4013.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}}},layers:null,styles:{buildings:{base:"polygons",shaders:{blocks:{color:"color.rgb;\n"}}}},lights:{light1:{type:"directional",direction:[.1,.5,-1],diffuse:.7,ambient:.5}},sources:null};const tf=e=>{const t=[],n={source:e,layer:ph.BUILTUP_AREA},r={id:ko(),data:n,draw:{polygons:{color:"#CFC8C8"}}};return t.push(r),t},nf=e=>{const t=[],n={source:e,layer:ph.POINT_ADDRESS,minzoom:15},r={id:ko(),data:n,draw:{text:{text_source:"address",font:{fill:"black",size:"12px"}}}};return t.push(r),t},rf=()=>{const{enqueueSnackbar:e}=f(rs);return({variant:t,message:n})=>{e({variant:t,message:n,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})}},sf=()=>{const e=rf();return t=>{const{response:n}=t;if(n){const{data:t}=n;if(t){const{detail:n}=t;n&&n.forEach(t=>{e({variant:"error",message:t})})}}}};var of=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},af={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},lf=new class{#e=af;#t=!1;setTimeoutProvider(e){"production"!==process.env.NODE_ENV&&this.#t&&e!==this.#e&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#e,provider:e}),this.#e=e,"production"!==process.env.NODE_ENV&&(this.#t=!1)}setTimeout(e,t){return"production"!==process.env.NODE_ENV&&(this.#t=!0),this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return"production"!==process.env.NODE_ENV&&(this.#t=!0),this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};var uf="undefined"==typeof window||"Deno"in globalThis;function cf(){}function hf(e){return"number"==typeof e&&e>=0&&e!==1/0}function df(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ff(e,t){return"function"==typeof e?e(t):e}function pf(e,t){return"function"==typeof e?e(t):e}function gf(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o)if(r){if(t.queryHash!==_f(o,t.options))return!1}else if(!vf(t.queryKey,o))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&((!i||i===t.state.fetchStatus)&&!(s&&!s(t)))}function mf(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(yf(t.options.mutationKey)!==yf(s))return!1}else if(!vf(t.options.mutationKey,s))return!1}return(!r||t.state.status===r)&&!(i&&!i(t))}function _f(e,t){return(t?.queryKeyHashFn||yf)(e)}function yf(e){return JSON.stringify(e,(e,t)=>Ef(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function vf(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(n=>vf(e[n],t[n])))}var bf=Object.prototype.hasOwnProperty;function xf(e,t){if(e===t)return e;const n=Af(e)&&Af(t);if(!(n||Ef(e)&&Ef(t)))return t;const r=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),s=i.length,o=n?new Array(s):{};let a=0;for(let l=0;l<s;l++){const s=n?l:i[l],u=e[s],c=t[s];if(u===c){o[s]=u,(n?l<r:bf.call(e,s))&&a++;continue}if(null===u||null===c||"object"!=typeof u||"object"!=typeof c){o[s]=c;continue}const h=xf(u,c);o[s]=h,h===u&&a++}return r===s&&a===r?e:o}function wf(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Af(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ef(e){if(!Sf(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!Sf(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function Sf(e){return"[object Object]"===Object.prototype.toString.call(e)}function Tf(e,t,n){if("function"==typeof n.structuralSharing)return n.structuralSharing(e,t);if(!1!==n.structuralSharing){if("production"!==process.env.NODE_ENV)try{return xf(e,t)}catch(e){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`),e}return xf(e,t)}return t}function kf(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Of(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Rf=Symbol();function Cf(e,t){return"production"!==process.env.NODE_ENV&&e.queryFn===Rf&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==Rf?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function Pf(e,t){return"function"==typeof e?e(...t):!!e}var Mf=new class extends of{#n;#r;#i;constructor(){super(),this.#i=e=>{if(!uf&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#r||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(e){this.#i=e,this.#r?.(),this.#r=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#n!==e&&(this.#n=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#n?this.#n:"hidden"!==globalThis.document?.visibilityState}};function Nf(){let e,t;const n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}var If=function(e){setTimeout(e,0)};var Df=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=If;const s=r=>{t?e.push(r):i(()=>{n(r)})};return{batch:s=>{let o;t++;try{o=s()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})})()}return o},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}(),Ff=new class extends of{#s=!0;#r;#i;constructor(){super(),this.#i=e=>{if(!uf&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#r||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(e){this.#i=e,this.#r?.(),this.#r=e(this.setOnline.bind(this))}setOnline(e){this.#s!==e&&(this.#s=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#s}};function zf(e){return Math.min(1e3*2**e,3e4)}function Lf(e){return"online"!==(e??"online")||Ff.isOnline()}var jf=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Vf(e){let t,n=!1,r=0;const i=Nf(),s=()=>"pending"!==i.status,o=()=>Mf.isFocused()&&("always"===e.networkMode||Ff.isOnline())&&e.canRun(),a=()=>Lf(e.networkMode)&&e.canRun(),l=e=>{s()||(t?.(),i.resolve(e))},u=e=>{s()||(t?.(),i.reject(e))},c=()=>new Promise(n=>{t=e=>{(s()||o())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,s()||e.onContinue?.()}),h=()=>{if(s())return;let t;const i=0===r?e.initialPromise:void 0;try{t=i??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(l).catch(t=>{if(s())return;const i=e.retry??(uf?0:3),a=e.retryDelay??zf,l="function"==typeof a?a(r,t):a,d=!0===i||"number"==typeof i&&r<i||"function"==typeof i&&i(r,t);!n&&d?(r++,e.onFail?.(r,t),function(e){return new Promise(t=>{lf.setTimeout(t,e)})}(l).then(()=>o()?void 0:c()).then(()=>{n?u(t):h()})):u(t)})};return{promise:i,status:()=>i.status,cancel:t=>{if(!s()){const n=new jf(t);u(n),e.onCancel?.(n)}},continue:()=>(t?.(),i),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:a,start:()=>(a()?h():c().then(h),i)}}var Uf=class{#o;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hf(this.gcTime)&&(this.#o=lf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(uf?1/0:3e5))}clearGcTimeout(){this.#o&&(lf.clearTimeout(this.#o),this.#o=void 0)}},Bf=class extends Uf{#a;#l;#u;#c;#h;#d;#f;constructor(e){super(),this.#f=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#u=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#a=qf(this.options),this.state=e.state??this.#a,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#h?.promise}setOptions(e){if(this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=qf(this.options);void 0!==e.data&&(this.setState($f(e.data,e.dataUpdatedAt)),this.#a=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(e,t){const n=Tf(this.state.data,e,this.options);return this.#p({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#p({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#h?.promise;return this.#h?.cancel(e),t?t.then(cf).catch(cf):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#a)}isActive(){return this.observers.some(e=>!1!==pf(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===ff(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!df(this.state.dataUpdatedAt,e))}onFocus(){const e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}onOnline(){const e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#h&&(this.#f?this.#h.cancel({revert:!0}):this.#h.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#h?.status())if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#h)return this.#h.continueRetry(),this.#h.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}"production"!==process.env.NODE_ENV&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,n.signal)})},i=()=>{const e=Cf(this.options,t),n=(()=>{const e={client:this.#c,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#f=!1,this.options.persister?this.options.persister(e,n,this):e(n)},s=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(s,this),this.#l=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===s.fetchOptions?.meta||this.#p({type:"fetch",meta:s.fetchOptions?.meta}),this.#h=Vf({initialPromise:t?.initialPromise,fn:s.fetchFn,onCancel:e=>{e instanceof jf&&e.revert&&this.setState({...this.#l,fetchStatus:"idle"}),n.abort()},onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const e=await this.#h.start();if(void 0===e)throw"production"!==process.env.NODE_ENV&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#u.config.onSuccess?.(e,this),this.#u.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof jf){if(e.silent)return this.#h.promise;if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#p({type:"error",error:e}),this.#u.config.onError?.(e,this),this.#u.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#p(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...Gf(t.data,this.options),fetchMeta:e.meta??null};case"success":const n={...t,...$f(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#l=e.manual?n:void 0,n;case"error":const r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),Df.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:e})})}};function Gf(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Lf(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function $f(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function qf(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Hf=class extends of{constructor(e,t){super(),this.options=t,this.#c=e,this.#g=null,this.#m=Nf(),this.bindMethods(),this.setOptions(t)}#c;#_=void 0;#y=void 0;#v=void 0;#b;#x;#m;#g;#w;#A;#E;#S;#T;#k;#O=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#_.addObserver(this),Wf(this.#_,this.options)?this.#R():this.updateResult(),this.#C())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Zf(this.#_,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Zf(this.#_,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#P(),this.#M(),this.#_.removeObserver(this)}setOptions(e){const t=this.options,n=this.#_;if(this.options=this.#c.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof pf(this.options.enabled,this.#_))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#N(),this.#_.setOptions(this.options),t._defaulted&&!wf(this.options,t)&&this.#c.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#_,observer:this});const r=this.hasListeners();r&&Kf(this.#_,n,this.options,t)&&this.#R(),this.updateResult(),!r||this.#_===n&&pf(this.options.enabled,this.#_)===pf(t.enabled,this.#_)&&ff(this.options.staleTime,this.#_)===ff(t.staleTime,this.#_)||this.#I();const i=this.#D();!r||this.#_===n&&pf(this.options.enabled,this.#_)===pf(t.enabled,this.#_)&&i===this.#k||this.#F(i)}getOptimisticResult(e){const t=this.#c.getQueryCache().build(this.#c,e),n=this.createResult(t,e);return function(e,t){if(!wf(e.getCurrentResult(),t))return!0;return!1}(this,n)&&(this.#v=n,this.#x=this.options,this.#b=this.#_.state),n}getCurrentResult(){return this.#v}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),"promise"===n&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#m.status||this.#m.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,n))})}trackProp(e){this.#O.add(e)}getCurrentQuery(){return this.#_}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#c.defaultQueryOptions(e),n=this.#c.getQueryCache().build(this.#c,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#R({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#v))}#R(e){this.#N();let t=this.#_.fetch(this.options,e);return e?.throwOnError||(t=t.catch(cf)),t}#I(){this.#P();const e=ff(this.options.staleTime,this.#_);if(uf||this.#v.isStale||!hf(e))return;const t=df(this.#v.dataUpdatedAt,e)+1;this.#S=lf.setTimeout(()=>{this.#v.isStale||this.updateResult()},t)}#D(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#_):this.options.refetchInterval)??!1}#F(e){this.#M(),this.#k=e,!uf&&!1!==pf(this.options.enabled,this.#_)&&hf(this.#k)&&0!==this.#k&&(this.#T=lf.setInterval(()=>{(this.options.refetchIntervalInBackground||Mf.isFocused())&&this.#R()},this.#k))}#C(){this.#I(),this.#F(this.#D())}#P(){this.#S&&(lf.clearTimeout(this.#S),this.#S=void 0)}#M(){this.#T&&(lf.clearInterval(this.#T),this.#T=void 0)}createResult(e,t){const n=this.#_,r=this.options,i=this.#v,s=this.#b,o=this.#x,a=e!==n?e.state:this.#y,{state:l}=e;let u,c={...l},h=!1;if(t._optimisticResults){const i=this.hasListeners(),s=!i&&Wf(e,t),o=i&&Kf(e,n,t,r);(s||o)&&(c={...c,...Gf(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(c.fetchStatus="idle")}let{error:d,errorUpdatedAt:f,status:p}=c;u=c.data;let g=!1;if(void 0!==t.placeholderData&&void 0===u&&"pending"===p){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,g=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#E?.state.data,this.#E):t.placeholderData,void 0!==e&&(p="success",u=Tf(i?.data,e,t),h=!0)}if(t.select&&void 0!==u&&!g)if(i&&u===s?.data&&t.select===this.#w)u=this.#A;else try{this.#w=t.select,u=t.select(u),u=Tf(i?.data,u,t),this.#A=u,this.#g=null}catch(e){this.#g=e}this.#g&&(d=this.#g,u=this.#A,f=Date.now(),p="error");const m="fetching"===c.fetchStatus,_="pending"===p,y="error"===p,v=_&&m,b=void 0!==u,x={status:p,fetchStatus:c.fetchStatus,isPending:_,isSuccess:"success"===p,isError:y,isInitialLoading:v,isLoading:v,data:u,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>a.dataUpdateCount||c.errorUpdateCount>a.errorUpdateCount,isFetching:m,isRefetching:m&&!_,isLoadingError:y&&!b,isPaused:"paused"===c.fetchStatus,isPlaceholderData:h,isRefetchError:y&&b,isStale:Xf(e,t),refetch:this.refetch,promise:this.#m,isEnabled:!1!==pf(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===x.status?e.reject(x.error):void 0!==x.data&&e.resolve(x.data)},r=()=>{const e=this.#m=x.promise=Nf();t(e)},i=this.#m;switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":"error"!==x.status&&x.data===i.value||r();break;case"rejected":"error"===x.status&&x.error===i.reason||r()}}return x}updateResult(){const e=this.#v,t=this.createResult(this.#_,this.options);if(this.#b=this.#_.state,this.#x=this.options,void 0!==this.#b.data&&(this.#E=this.#_),wf(t,e))return;this.#v=t;this.#z({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!this.#O.size)return!0;const r=new Set(n??this.#O);return this.options.throwOnError&&r.add("error"),Object.keys(this.#v).some(t=>{const n=t;return this.#v[n]!==e[n]&&r.has(n)})})()})}#N(){const e=this.#c.getQueryCache().build(this.#c,this.options);if(e===this.#_)return;const t=this.#_;this.#_=e,this.#y=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#C()}#z(e){Df.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#v)}),this.#c.getQueryCache().notify({query:this.#_,type:"observerResultsUpdated"})})}};function Wf(e,t){return function(e,t){return!1!==pf(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&Zf(e,t,t.refetchOnMount)}function Zf(e,t,n){if(!1!==pf(t.enabled,e)&&"static"!==ff(t.staleTime,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&Xf(e,t)}return!1}function Kf(e,t,n,r){return(e!==t||!1===pf(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&Xf(e,n)}function Xf(e,t){return!1!==pf(t.enabled,e)&&e.isStaleByTime(ff(t.staleTime,e))}function Yf(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let n=!1;const u=Cf(t.options,t.fetchOptions),c=async(e,r,i)=>{if(n)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);const s=(()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?"backward":"forward",meta:t.options.meta};return(e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",()=>{n=!0}),t.signal)})})(e),e})(),o=await u(s),{maxPages:a}=t.options,l=i?Of:kf;return{pages:l(e.pages,o,a),pageParams:l(e.pageParams,r,a)}};if(i&&s.length){const e="backward"===i,t={pages:s,pageParams:o},n=(e?Jf:Qf)(r,t);a=await c(t,n,e)}else{const t=e??s.length;do{const e=0===l?o[0]??r.initialPageParam:Qf(r,a);if(l>0&&null==e)break;a=await c(a,e),l++}while(l<t)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function Qf(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Jf(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var ep=class extends Uf{#c;#L;#j;#h;constructor(e){super(),this.#c=e.client,this.mutationId=e.mutationId,this.#j=e.mutationCache,this.#L=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#L.includes(e)||(this.#L.push(e),this.clearGcTimeout(),this.#j.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#L=this.#L.filter(t=>t!==e),this.scheduleGc(),this.#j.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#L.length||("pending"===this.state.status?this.scheduleGc():this.#j.remove(this))}continue(){return this.#h?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#p({type:"continue"})},n={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#h=Vf({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#j.canRun(this)});const r="pending"===this.state.status,i=!this.#h.canStart();try{if(r)t();else{this.#p({type:"pending",variables:e,isPaused:i}),await(this.#j.config.onMutate?.(e,this,n));const t=await(this.options.onMutate?.(e,n));t!==this.state.context&&this.#p({type:"pending",context:t,variables:e,isPaused:i})}const s=await this.#h.start();return await(this.#j.config.onSuccess?.(s,e,this.state.context,this,n)),await(this.options.onSuccess?.(s,e,this.state.context,n)),await(this.#j.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n)),await(this.options.onSettled?.(s,null,e,this.state.context,n)),this.#p({type:"success",data:s}),s}catch(t){try{throw await(this.#j.config.onError?.(t,e,this.state.context,this,n)),await(this.options.onError?.(t,e,this.state.context,n)),await(this.#j.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)),await(this.options.onSettled?.(void 0,t,e,this.state.context,n)),t}finally{this.#p({type:"error",error:t})}}finally{this.#j.runNext(this)}}#p(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),Df.batch(()=>{this.#L.forEach(t=>{t.onMutationUpdate(e)}),this.#j.notify({mutation:this,type:"updated",action:e})})}};var tp=class extends of{constructor(e={}){super(),this.config=e,this.#V=new Set,this.#U=new Map,this.#B=0}#V;#U;#B;build(e,t,n){const r=new ep({client:e,mutationCache:this,mutationId:++this.#B,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#V.add(e);const t=np(e);if("string"==typeof t){const n=this.#U.get(t);n?n.push(e):this.#U.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#V.delete(e)){const t=np(e);if("string"==typeof t){const n=this.#U.get(t);if(n)if(n.length>1){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#U.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=np(e);if("string"==typeof t){const n=this.#U.get(t),r=n?.find(e=>"pending"===e.state.status);return!r||r===e}return!0}runNext(e){const t=np(e);if("string"==typeof t){const n=this.#U.get(t)?.find(t=>t!==e&&t.state.isPaused);return n?.continue()??Promise.resolve()}return Promise.resolve()}clear(){Df.batch(()=>{this.#V.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#V.clear(),this.#U.clear()})}getAll(){return Array.from(this.#V)}find(e){const t={exact:!0,...e};return this.getAll().find(e=>mf(t,e))}findAll(e={}){return this.getAll().filter(t=>mf(e,t))}notify(e){Df.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return Df.batch(()=>Promise.all(e.map(e=>e.continue().catch(cf))))}};function np(e){return e.options.scope?.id}var rp=class extends of{#c;#v=void 0;#G;#$;constructor(e,t){super(),this.#c=e,this.setOptions(t),this.bindMethods(),this.#q()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#c.defaultMutationOptions(e),wf(this.options,t)||this.#c.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#G,observer:this}),t?.mutationKey&&this.options.mutationKey&&yf(t.mutationKey)!==yf(this.options.mutationKey)?this.reset():"pending"===this.#G?.state.status&&this.#G.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#G?.removeObserver(this)}onMutationUpdate(e){this.#q(),this.#z(e)}getCurrentResult(){return this.#v}reset(){this.#G?.removeObserver(this),this.#G=void 0,this.#q(),this.#z()}mutate(e,t){return this.#$=t,this.#G?.removeObserver(this),this.#G=this.#c.getMutationCache().build(this.#c,this.options),this.#G.addObserver(this),this.#G.execute(e)}#q(){const e=this.#G?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#v={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#z(e){Df.batch(()=>{if(this.#$&&this.hasListeners()){const t=this.#v.variables,n=this.#v.context,r={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};"success"===e?.type?(this.#$.onSuccess?.(e.data,t,n,r),this.#$.onSettled?.(e.data,null,t,n,r)):"error"===e?.type&&(this.#$.onError?.(e.error,t,n,r),this.#$.onSettled?.(void 0,e.error,t,n,r))}this.listeners.forEach(e=>{e(this.#v)})})}},ip=class extends of{constructor(e={}){super(),this.config=e,this.#H=new Map}#H;build(e,t,n){const r=t.queryKey,i=t.queryHash??_f(r,t);let s=this.get(i);return s||(s=new Bf({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#H.has(e.queryHash)||(this.#H.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#H.get(e.queryHash);t&&(e.destroy(),t===e&&this.#H.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Df.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#H.get(e)}getAll(){return[...this.#H.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(e=>gf(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>gf(e,t)):t}notify(e){Df.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Df.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Df.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},sp=n.createContext(void 0),op=e=>{const t=n.useContext(sp);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ap=({client:t,children:r})=>(n.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),e(sp.Provider,{value:t,children:r})),lp=n.createContext(!1);lp.Provider;var up=n.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),cp=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function hp(e,t,r){if("production"!==process.env.NODE_ENV&&("object"!=typeof e||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const i=n.useContext(lp),s=n.useContext(up),o=op(),a=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(a),"production"!==process.env.NODE_ENV&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=i?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,n=e=>"static"===e?e:Math.max(e??t,t),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>n(r(...e)):n(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(a),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(a,s),(e=>{n.useEffect(()=>{e.clearReset()},[e])})(s);const l=!o.getQueryCache().get(a.queryHash),[u]=n.useState(()=>new t(o,a)),c=u.getOptimisticResult(a),h=!i&&!1!==e.subscribed;if(n.useSyncExternalStore(n.useCallback(e=>{const t=h?u.subscribe(Df.batchCalls(e)):cf;return u.updateResult(),t},[u,h]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),n.useEffect(()=>{u.setOptions(a)},[a,u]),((e,t)=>e?.suspense&&t.isPending)(a,c))throw cp(a,u,s);if((({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&void 0===e.data||Pf(n,[e.error,r])))({result:c,errorResetBoundary:s,throwOnError:a.throwOnError,query:o.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw c.error;if(o.getDefaultOptions().queries?._experimental_afterQuery?.(a,c),a.experimental_prefetchInRender&&!uf&&((e,t)=>e.isLoading&&e.isFetching&&!t)(c,i)){const e=l?cp(a,u,s):o.getQueryCache().get(a.queryHash)?.promise;e?.catch(cf).finally(()=>{u.updateResult()})}return a.notifyOnChangeProps?c:u.trackResult(c)}function dp(e,t){const r=op(),[i]=n.useState(()=>new rp(r,e));n.useEffect(()=>{i.setOptions(e)},[i,e]);const s=n.useSyncExternalStore(n.useCallback(e=>i.subscribe(Df.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=n.useCallback((e,t)=>{i.mutate(e,t).catch(cf)},[i]);if(s.error&&Pf(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}const fp=()=>dp({mutationKey:["sign-in-mutation"],mutationFn:async({body:{username:e,password:t}})=>{const n=Eo({username:e,password:Ao(t)});return await lh.instance.apiService.post({url:"token",body:n,config:{headers:{"Content-Type":"application/x-www-form-urlencoded"}}})}});if(!u)throw new Error("mobx-react-lite requires React with Hooks support");if(!function(e,t,n){return Bc(function(){var r=wc(e,n)[wa];"production"!==process.env.NODE_ENV&&t&&e[_a]&&Co("makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported."),null!=t||(t=function(e){return oa(e,_a)||Yo(e,_a,fa({},e[_a])),e[_a]}(e)),ra(t).forEach(function(e){return r.make_(e,t[e])})}),e})throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function pp(e){e()}function gp(e){return Cu(e)}var mp,_p=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=1e4),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var n=Date.now();t.registrations.forEach(function(r,i){n-r.registeredAt>=e&&(t.finalize(r.value),t.registrations.delete(i))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),e}(),yp=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:_p)(function(e){var t;null===(t=e.reaction)||void 0===t||t.dispose(),e.reaction=null}),vp={exports:{}},bp={};var xp,wp,Ap={};
2
2
  /**
3
3
  * @license React
4
4
  * use-sync-external-store-shim.development.js