@dartcom/ui-kit 10.2.11 → 10.2.13

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
@@ -7,7 +7,7 @@ import*as e from"react";import t,{forwardRef as r,useRef as n,useCallback as i,u
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */var pl,ml,gl=(dl||(dl=1,"production"===process.env.NODE_ENV?ul.exports=function(){if(ol)return cl;ol=1;var e=t,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),l=n({inst:{value:r,getSnapshot:t}}),u=l[0].inst,c=l[1];return s(function(){u.value=r,u.getSnapshot=t,a(u)&&c({inst:u})},[e,r,t]),i(function(){return a(u)&&c({inst:u}),e(function(){a(u)&&c({inst:u})})},[e]),o(r),r};return cl.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:l,cl}():ul.exports=(hl||(hl=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,o=r.useLayoutEffect,a=r.useDebugValue,l=!1,u=!1,c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(t,c){l||void 0===r.startTransition||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=c();if(!u){var d=c();n(h,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),u=!0)}var f=(d=i({inst:{value:h,getSnapshot:c}}))[0].inst,p=d[1];return o(function(){f.value=h,f.getSnapshot=c,e(f)&&p({inst:f})},[t,h,c]),s(function(){return e(f)&&p({inst:f}),t(function(){e(f)&&p({inst:f})})},[t]),a(h),h};fl.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),fl)),ul.exports);function _l(e){e.reaction=new ji("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),null===(t=e.onStoreChange)||void 0===t||t.call(e)})}var yl=!0,vl="function"==typeof Symbol&&Symbol.for,bl=null!==(ml=null===(pl=Object.getOwnPropertyDescriptor(function(){},"name"))||void 0===pl?void 0:pl.configurable)&&void 0!==ml&&ml,xl=vl?Symbol.for("react.forward_ref"):"function"==typeof r&&r(function(e){return null}).$$typeof,wl=vl?Symbol.for("react.memo"):"function"==typeof h&&h(function(e){return null}).$$typeof;function El(e,n){if(process.env.NODE_ENV,wl&&e.$$typeof===wl)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var i=!1,s=e,o=e.displayName||e.name;if(xl&&e.$$typeof===xl&&(i=!0,"function"!=typeof(s=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a,l,u=function(e,r){return function(e,r){void 0===r&&(r="observed");var n=t.useRef(null);if(!n.current){var i={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:r,subscribe:function(e){return ll.unregister(i),i.onStoreChange=e,i.reaction||(_l(i),i.stateVersion=Symbol()),function(){var e;i.onStoreChange=null,null===(e=i.reaction)||void 0===e||e.dispose(),i.reaction=null}},getSnapshot:function(){return i.stateVersion}};n.current=i}var s,o,a=n.current;if(a.reaction||(_l(a),ll.register(n,a,a)),t.useDebugValue(a.reaction,sl),gl.useSyncExternalStore(a.subscribe,a.getSnapshot,a.getSnapshot),a.reaction.track(function(){try{s=e()}catch(e){o=e}}),o)throw o;return s}(function(){return s(e,r)},o)};return u.displayName=e.displayName,bl&&Object.defineProperty(u,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(u.contextTypes=e.contextTypes,"production"!==process.env.NODE_ENV&&yl&&(yl=!1,console.warn("[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release."))),i&&(u=r(u)),u=h(u),a=e,l=u,Object.keys(a).forEach(function(e){Al[e]||Object.defineProperty(l,e,Object.getOwnPropertyDescriptor(a,e))}),"production"!==process.env.NODE_ENV&&Object.defineProperty(u,"contextTypes",{set:function(){var e,t;throw new Error("[mobx-react-lite] `".concat(this.displayName||(null===(e=this.type)||void 0===e?void 0:e.displayName)||(null===(t=this.type)||void 0===t?void 0:t.name)||"Component",".contextTypes` must be set before applying `observer`."))}}),u}var Al={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};process.env.NODE_ENV,function(e){e||(e=il,"production"!==process.env.NODE_ENV&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),ds({reactionScheduler:e})}(b),ll.finalizeAllImmediately;var Sl=El(({onUnauthorized:t,children:r})=>(e.useEffect(()=>{Uo.isUnauthorized&&t()},[Uo.isUnauthorized]),x(e.Fragment,{children:r})));function Tl(e,t){if(void 0!==e.one&&1===t)return e.one;const r=t%10,n=t%100;return 1===r&&11!==n?e.singularNominative.replace("{{count}}",String(t)):r>=2&&r<=4&&(n<10||n>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function kl(e){return(t,r)=>r?.addSuffix?r.comparison&&r.comparison>0?e.future?Tl(e.future,t):"через "+Tl(e.regular,t):e.past?Tl(e.past,t):Tl(e.regular,t)+" назад":Tl(e.regular,t)}const Ol={lessThanXSeconds:kl({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:kl({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду назад",singularGenitive:"{{count}} секунды назад",pluralGenitive:"{{count}} секунд назад"},future:{singularNominative:"через {{count}} секунду",singularGenitive:"через {{count}} секунды",pluralGenitive:"через {{count}} секунд"}}),halfAMinute:(e,t)=>t?.addSuffix?t.comparison&&t.comparison>0?"через полминуты":"полминуты назад":"полминуты",lessThanXMinutes:kl({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:kl({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:kl({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:kl({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:kl({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:kl({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:kl({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:kl({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:kl({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:kl({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:kl({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:kl({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:kl({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})};function Rl(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const Cl={date:Rl({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:Rl({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Rl({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},Nl=Symbol.for("constructDateFrom");function Pl(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Nl in e?e[Nl](t):e instanceof Date?new e.constructor(t):new Date(t)}let Ml={};function Dl(e,t){const r=Ml,n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=(s=e,o=t?.in,Pl(o||s,s));var s,o;const a=i.getDay(),l=(a<n?7:0)+a-n;return i.setDate(i.getDate()-l),i.setHours(0,0,0,0),i}function zl(e,t,r){const[n,i]=function(e,...t){const r=Pl.bind(null,e||t.find(e=>"object"==typeof e));return t.map(r)}(r?.in,e,t);return+Dl(n,r)===+Dl(i,r)}const Il=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function Fl(e){const t=Il[e];return 2===e?"'во "+t+" в' p":"'в "+t+" в' p"}const Ll={lastWeek:(e,t,r)=>{const n=e.getDay();return zl(e,t,r)?Fl(n):function(e){const t=Il[e];switch(e){case 0:return"'в прошлое "+t+" в' p";case 1:case 2:case 4:return"'в прошлый "+t+" в' p";case 3:case 5:case 6:return"'в прошлую "+t+" в' p"}}(n)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:(e,t,r)=>{const n=e.getDay();return zl(e,t,r)?Fl(n):function(e){const t=Il[e];switch(e){case 0:return"'в следующее "+t+" в' p";case 1:case 2:case 4:return"'в следующий "+t+" в' p";case 3:case 5:case 6:return"'в следующую "+t+" в' p"}}(n)},other:"P"};function jl(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=r?.width?String(r.width):t;n=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=r?.width?String(r.width):e.defaultWidth;n=e.values[i]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}const Ul={ordinalNumber:(e,t)=>{const r=Number(e),n=t?.unit;let i;return i="date"===n?"-е":"week"===n||"minute"===n||"second"===n?"-я":"-й",r+i},era:jl({values:{narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},defaultWidth:"wide"}),quarter:jl({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:jl({values:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},defaultWidth:"wide",formattingValues:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},defaultFormattingWidth:"wide"}),day:jl({values:{narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},defaultWidth:"wide"}),dayPeriod:jl({values:{narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утро",afternoon:"день",evening:"вечер",night:"ночь"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утра",afternoon:"дня",evening:"вечера",night:"ночи"}},defaultFormattingWidth:"wide"})};function Vl(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],a=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(a,e=>e.test(o)):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(a,e=>e.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;return{value:u,rest:t.slice(o.length)}}}const Bl={ordinalNumber:($l={matchPattern:/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const r=e.match($l.matchPattern);if(!r)return null;const n=r[0],i=e.match($l.parsePattern);if(!i)return null;let s=$l.valueCallback?$l.valueCallback(i[0]):i[0];return s=t.valueCallback?t.valueCallback(s):s,{value:s,rest:e.slice(n.length)}}),era:Vl({matchPatterns:{narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:Vl({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Vl({matchPatterns:{narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},defaultParseWidth:"any"}),day:Vl({matchPatterns:{narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:Vl({matchPatterns:{narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})};var $l;const Gl={code:"ru",formatDistance:(e,t,r)=>Ol[e](t,r),formatLong:Cl,formatRelative:(e,t,r,n)=>{const i=Ll[e];return"function"==typeof i?i(t,r,n):i},localize:Ul,match:Bl,options:{weekStartsOn:1,firstWeekContainsDate:1}},ql=e=>x(A,{...e,dateAdapter:S,adapterLocale:Gl}),Wl=({color:e="inherit"})=>x(T,{color:e}),Hl=({children:t,configOptions:r})=>{const[n,i]=e.useState(null),[s,o]=e.useState("");return e.useEffect(()=>(Zo.initialize({...r,onCheck:e=>{const{valid:t,reason:n}=e;o(n),i(t),r.onCheck?.(e)}}),()=>{Zo.deactivate()}),[r]),null===n?x(Wl,{color:"primary"}):n?x(e.Fragment,{children:t}):x(k,{color:"error",children:s})},Yl=new class{#H;#j;#d;#Y;#Z;#X;#K;#Q;constructor(e={}){this.#H=e.queryCache||new Ya,this.#j=e.mutationCache||new qa,this.#d=e.defaultOptions||{},this.#Y=new Map,this.#Z=new Map,this.#X=0}mount(){this.#X++,1===this.#X&&(this.#K=wa.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#H.onFocus())}),this.#Q=Ta.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#H.onOnline())}))}unmount(){this.#X--,0===this.#X&&(this.#K?.(),this.#K=void 0,this.#Q?.(),this.#Q=void 0)}isFetching(e){return this.#H.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#j.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#H.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#H.build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(na(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#H.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=this.#H.get(n.queryHash),s=i?.state.data,o=function(e,t){return"function"==typeof e?e(t):e}(t,s);if(void 0!==o)return this.#H.build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Sa.batch(()=>this.#H.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#H.get(t.queryHash)?.state}removeQueries(e){const t=this.#H;Sa.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const r=this.#H;return Sa.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Sa.batch(()=>this.#H.findAll(e).map(e=>e.cancel(r)));return Promise.all(n).then(ea).catch(ea)}invalidateQueries(e,t={}){return Sa.batch(()=>(this.#H.findAll(e).forEach(e=>{e.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Sa.batch(()=>this.#H.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(ea)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(n).then(ea)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const r=this.#H.build(this,t);return r.isStaleByTime(na(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ea).catch(ea)}fetchInfiniteQuery(e){return e.behavior=Va(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ea).catch(ea)}ensureInfiniteQueryData(e){return e.behavior=Va(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ta.isOnline()?this.#j.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#H}getMutationCache(){return this.#j}getDefaultOptions(){return this.#d}setDefaultOptions(e){this.#d=e}setQueryDefaults(e,t){this.#Y.set(la(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#Y.values()],r={};return t.forEach(t=>{ua(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#Z.set(la(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#Z.values()],r={};return t.forEach(t=>{ua(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#d.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=aa(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===va&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#d.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#H.clear(),this.#j.clear()}},Zl=e=>x(Ka,{...e,client:Yl}),Xl=({children:e,themeOptions:t})=>{const r=X(t);return x(K,{theme:r,children:e})},Kl=({children:e,configOptions:t,themeOptions:r})=>x(ir,{children:x(Zl,{children:x(Wo,{children:x(Xl,{themeOptions:r,children:x(ql,{children:x(Hl,{configOptions:t,children:e})})})})})}),Ql=()=>{const{enqueueSnackbar:e}=c(Ue);return({variant:t,message:r})=>{e({variant:t,message:r,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})}},Jl=()=>{const e=Ql();return t=>{const{response:r}=t;if(r){const{data:t}=r;if(t){const{detail:r}=t;r&&r.forEach(t=>{e({variant:"error",message:t})})}}}},eu=()=>rl({mutationKey:["logout-mutation"],mutationFn:async e=>await Zo.instance.apiService.post({url:"logout"}),onError:Jl(),onSuccess:()=>{Yl.invalidateQueries({queryKey:["user"]})}}),tu=()=>rl({mutationKey:["sign-in-mutation"],mutationFn:async({body:{username:e,password:t}})=>{const r=or({username:e,password:sr(t)});return await Zo.instance.apiService.post({url:"token",body:r,config:{headers:{"Content-Type":"application/x-www-form-urlencoded"}}})}});var ru,nu,iu,su;!function(e){e.GET="GET",e.DELETE="DELETE",e.PUT="PUT",e.POST="POST"}(ru||(ru={})),function(e){e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e.TOP_LEFT="top-left"}(nu||(nu={}));var ou,au,lu=function(){if(su)return iu;function e(e){this._maxSize=e,this.clear()}su=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,r=/^\d+$/,n=/^\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(n)&&!e.match(r)}(e)||function(e){return i.test(e)}(e))}return iu={Cache:e,split:c,normalizePath:u,setter:function(e){var t=u(e);return a.get(e)||a.set(e,function(e,r){for(var n=0,i=t.length,s=e;n<i-1;){var o=t[n];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;s=s[t[n++]]}s[t[n]]=r})},getter:function(e,t){var r=u(e);return l.get(e)||l.set(e,function(e){for(var n=0,i=r.length;n<i;){if(null==e&&t)return;e=e[r[n++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(h(t)||r.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,r){!function(e,t,r){var n,i,s,o,a=e.length;for(i=0;i<a;i++)(n=e[i])&&(d(n)&&(n='"'+n+'"'),s=!(o=h(n))&&/^\d+$/.test(n),t.call(r,n,o,s,i,e))}(Array.isArray(e)?e:c(e),t,r)}},iu}();var uu,cu=function(){if(au)return ou;au=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)||[],r=e=>e[0].toUpperCase()+e.slice(1),n=(e,r)=>t(e).join(r).toLowerCase(),i=e=>t(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,"");return ou={words:t,upperFirst:r,camelCase:i,pascalCase:e=>r(i(e)),snakeCase:e=>n(e,"_"),kebabCase:e=>n(e,"-"),sentenceCase:e=>r(n(e," ")),titleCase:e=>t(e).map(r).join(" ")}}(),hu={exports:{}};var du=function(){if(uu)return hu.exports;function e(e,t){var r=e.length,n=new Array(r),i={},s=r,o=function(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var i=e[r];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,r=0,n=e.length;r<n;r++)t.set(e[r],r);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 n;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)}n[--r]=e}}}return uu=1,hu.exports=function(t){return e(function(e){for(var t=new Set,r=0,n=e.length;r<n;r++){var i=e[r];t.add(i[0]),t.add(i[1])}return Array.from(t)}(t),t)},hu.exports.array=e,hu.exports}(),fu=ye(du);const pu=Object.prototype.toString,mu=Error.prototype.toString,gu=RegExp.prototype.toString,_u="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",yu=/^Symbol\((.*)\)(.*)$/;function vu(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const r=typeof e;if("number"===r)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===r)return t?`"${e}"`:e;if("function"===r)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===r)return _u.call(e).replace(yu,"Symbol($1)");const n=pu.call(e).slice(8,-1);return"Date"===n?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===n||e instanceof Error?"["+mu.call(e)+"]":"RegExp"===n?gu.call(e):null}function bu(e,t){let r=vu(e,t);return null!==r?r:JSON.stringify(e,function(e,r){let n=vu(this[e],t);return null!==n?n:r},2)}function xu(e){return null==e?[]:[].concat(e)}let wu,Eu,Au,Su=/\$\{\s*(\w+)\s*\}/g;wu=Symbol.toStringTag;class Tu{constructor(e,t,r,n){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[wu]="Error",this.name="ValidationError",this.value=t,this.path=r,this.type=n,this.errors=[],this.inner=[],xu(e).forEach(e=>{if(ku.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]}}Eu=Symbol.hasInstance,Au=Symbol.toStringTag;class ku extends Error{static formatError(e,t){const r=t.label||t.path||"this";return t=Object.assign({},t,{path:r,originalPath:t.path}),"string"==typeof e?e.replace(Su,(e,r)=>bu(t[r])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,r,n,i){const s=new Tu(e,t,r,n);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[Au]="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,ku)}static[Eu](e){return Tu[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Ou={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:r,originalValue:n})=>{const i=null!=n&&n!==r?` (cast from the value \`${bu(n,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${bu(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${bu(r,!0)}\``+i}},Ru={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"},Cu={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"},Nu={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Pu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Mu={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"},Du={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${bu(r,!0)}\``;if(r.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${bu(r,!0)}\``}return ku.formatError(Ou.notType,e)}};Object.assign(Object.create(null),{mixed:Ou,string:Ru,number:Cu,date:Nu,object:Pu,array:Mu,boolean:{isValue:"${path} field must be ${value}"},tuple:Du});const zu=e=>e&&e.__isYupSchema__;class Iu{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:n,otherwise:i}=t,s="function"==typeof r?r:(...e)=>e.every(e=>e===r);return new Iu(e,(e,t)=>{var r;let o=s(...e)?n:i;return null!=(r=null==o?void 0:o(t))?r:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let r=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),n=this.fn(r,e,t);if(void 0===n||n===e)return e;if(!zu(n))throw new TypeError("conditions must return a schema object");return n.resolve(t)}}const Fu="$",Lu=".";class ju{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]===Fu,this.isValue=this.key[0]===Lu,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Fu:this.isValue?Lu:"";this.path=this.key.slice(r.length),this.getter=this.path&&lu.getter(this.path,!0),this.map=t.map}getValue(e,t,r){let n=this.isContext?r:this.isValue?e:t;return this.getter&&(n=this.getter(n||{})),this.map&&(n=this.map(n)),n}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}}ju.prototype.__isYupRef=!0;const Uu=e=>null==e;function Vu(e){function t({value:t,path:r="",options:n,originalValue:i,schema:s},o,a){const{name:l,test:u,params:c,message:h,skipAbsent:d}=e;let{parent:f,context:p,abortEarly:m=s.spec.abortEarly,disableStackTrace:g=s.spec.disableStackTrace}=n;const _={value:t,parent:f,context:p};function y(e={}){const n=Bu(Object.assign({value:t,originalValue:i,label:s.spec.label,path:e.path||r,spec:s.spec,disableStackTrace:e.disableStackTrace||g},c,e.params),_),o=new ku(ku.formatError(e.message||h,n),t,n.path,e.type||l,n.disableStackTrace);return o.params=n,o}const v=m?o:a;let b={path:r,parent:f,type:l,from:n.from,createError:y,resolve:e=>$u(e,_),options:n,originalValue:i,schema:s};const x=e=>{ku.isError(e)?v(e):e?a(null):v(y())},w=e=>{ku.isError(e)?v(e):o(e)};if(d&&Uu(t))return x(!0);let E;try{var A;if(E=u.call(b,t,b),"function"==typeof(null==(A=E)?void 0:A.then)){if(n.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(E).then(x,w)}}catch(e){return void w(e)}x(E)}return t.OPTIONS=e,t}function Bu(e,t){if(!e)return e;for(const r of Object.keys(e))e[r]=$u(e[r],t);return e}function $u(e,t){return ju.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function Gu(e,t,r,n=r){let i,s,o;return t?(lu.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a,h="tuple"===(e=e.resolve({context:n,parent:i,value:r})).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(r&&d>=r.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=r,r=r&&r[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=r,r=r&&r[c],e=e.fields[c]}s=c,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class qu extends Set{describe(){const e=[];for(const t of this.values())e.push(ju.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const r of this.values())t.push(e(r));return t}clone(){return new qu(this.values())}merge(e,t){const r=this.clone();return e.forEach(e=>r.add(e)),t.forEach(e=>r.delete(e)),r}}function Wu(e,t=new Map){if(zu(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Wu(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,i]of e.entries())r.set(n,Wu(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Wu(n,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=Wu(i,t)}return r}function Hu(e){if(null==e||!e.length)return;const t=[];let r="",n=!1,i=!1;for(let s=0;s<e.length;s++){const o=e[s];"["!==o||i?"]"!==o||i?'"'!==o?"."!==o||n||i?r+=o:r&&(t.push(r),r=""):i=!i:(r&&(/^\d+$/.test(r)?t.push(r):t.push(r.replace(/^"|"$/g,"")),r=""),n=!1):(r&&(t.push(...r.split(".").filter(Boolean)),r=""),n=!0)}return r&&t.push(...r.split(".").filter(Boolean)),t}function Yu(e,t){var r;if((null==(r=e.inner)||!r.length)&&e.errors.length)return function(e,t){const r=t?`${t}.${e.path}`:e.path;return e.errors.map(e=>({message:e,path:Hu(r)}))}(e,t);const n=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>Yu(e,n))}class Zu{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 qu,this._blacklist=new qu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ou.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=Wu(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 r=e(this);return this._mutate=t,r}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,r=e.clone();const n=Object.assign({},t.spec,r.spec);return r.spec=n,r.internalTests=Object.assign({},t.internalTests,r.internalTests),r._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),r._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),r.tests=t.tests,r.exclusiveTests=t.exclusiveTests,r.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),r.transforms=[...t.transforms,...r.transforms],r}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 r=t.conditions;t=t.clone(),t.conditions=[],t=r.reduce((t,r)=>r.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,r,n,i;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(r=e.abortEarly)?r:this.spec.abortEarly,recursive:null!=(n=e.recursive)?n:this.spec.recursive,disableStackTrace:null!=(i=e.disableStackTrace)?i:this.spec.disableStackTrace})}cast(e,t={}){let r=this.resolve(Object.assign({},t,{value:e})),n="ignore-optionality"===t.assert,i=r._cast(e,t);if(!1!==t.assert&&!r.isType(i)){if(n&&Uu(i))return i;let s=bu(e),o=bu(i);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". \n\nattempted value: ${s} \n`+(o!==s?`result of cast: ${o}`:""))}return i}_cast(e,t){let r=void 0===e?e:this.transforms.reduce((r,n)=>n.call(this,r,e,this,t),e);return void 0===r&&(r=this.getDefault(t)),r}_validate(e,t={},r,n){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},r,e=>{if(e.length)return n(e,a);this.runTests({path:i,value:a,originalValue:s,options:t,tests:this.tests},r,n)})}runTests(e,t,r){let n=!1,{tests:i,value:s,originalValue:o,path:a,options:l}=e,u=e=>{n||(n=!0,t(e,s))},c=e=>{n||(n=!0,r(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:r,parentPath:n,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=r[o];const u=Object.assign({},s,{strict:!0,parent:r,value:l,originalValue:i[o],key:void 0,[a?"index":"key"]:o,path:a||o.includes(".")?`${n||""}[${a?o:`"${o}"`}]`:(n?`${n}.`:"")+e});return(e,t,r)=>this.resolve(u)._validate(l,u,t,r)}validate(e,t){var r;let n=this.resolve(Object.assign({},t,{value:e})),i=null!=(r=null==t?void 0:t.disableStackTrace)?r:n.spec.disableStackTrace;return new Promise((r,s)=>n._validate(e,t,(e,t)=>{ku.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new ku(e,t,void 0,void 0,i)):r(t)}))}validateSync(e,t){var r;let n,i=this.resolve(Object.assign({},t,{value:e})),s=null!=(r=null==t?void 0:t.disableStackTrace)?r:i.spec.disableStackTrace;return i._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw ku.isError(e)&&(e.value=t),e},(t,r)=>{if(t.length)throw new ku(t,e,void 0,void 0,s);n=r}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(ku.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(ku.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):Wu(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 r=this.clone({nullable:e});return r.internalTests.nullable=Vu({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),r}optionality(e,t){const r=this.clone({optional:e});return r.internalTests.optionality=Vu({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),r}optional(){return this.optionality(!0)}defined(e=Ou.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Ou.notNull){return this.nullability(!1,e)}required(e=Ou.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=Ou.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let r=this.clone(),n=Vu(t),i=t.exclusive||t.name&&!0===r.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(r.exclusiveTests[t.name]=!!t.exclusive),r.tests=r.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(i)return!1;if(e.OPTIONS.test===n.OPTIONS.test)return!1}return!0}),r.tests.push(n),r}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let r=this.clone(),n=xu(e).map(e=>new ju(e));return n.forEach(e=>{e.isSibling&&r.deps.push(e.key)}),r.conditions.push("function"==typeof t?new Iu(n,t):Iu.fromOptions(n,t)),r}typeError(e){let t=this.clone();return t.internalTests.typeError=Vu({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=Ou.oneOf){let r=this.clone();return e.forEach(e=>{r._whitelist.add(e),r._blacklist.delete(e)}),r.internalTests.whiteList=Vu({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,r=t.resolveAll(this.resolve);return!!r.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:r}})}}),r}notOneOf(e,t=Ou.notOneOf){let r=this.clone();return e.forEach(e=>{r._blacklist.add(e),r._whitelist.delete(e)}),r.internalTests.blacklist=Vu({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,r=t.resolveAll(this.resolve);return!r.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:r}})}}),r}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:r,meta:n,optional:i,nullable:s}=t.spec,o={meta:n,label:r,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,r)=>r.findIndex(t=>t.OPTIONS.name===e.OPTIONS.name)===t).map(t=>{const r=t.OPTIONS.params&&e?Bu(Object.assign({},t.OPTIONS.params),e):t.OPTIONS.params;return{name:t.OPTIONS.name,params:r}})};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 ku)return{issues:Yu(e)};throw e}}};return t}}Zu.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Zu.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:s,schema:o}=Gu(this,t,r,n.context);return o[e](i&&i[s],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])Zu.prototype[e]=Zu.prototype.oneOf;for(const e of["not","nope"])Zu.prototype[e]=Zu.prototype.notOneOf;const Xu=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Ku(e){var t,r;const n=Xu.exec(e);return n?{year:Qu(n[1]),month:Qu(n[2],1)-1,day:Qu(n[3],1),hour:Qu(n[4]),minute:Qu(n[5]),second:Qu(n[6]),millisecond:n[7]?Qu(n[7].substring(0,3)):0,precision:null!=(t=null==(r=n[7])?void 0:r.length)?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:Qu(n[10]),minuteOffset:Qu(n[11])}:null}function Qu(e,t=0){return Number(e)||t}let Ju=/^[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])?)*$/,ec=/^((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,tc=/^(?:[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,rc=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),nc=e=>Uu(e)||e===e.trim(),ic={}.toString();function sc(){return new oc}class oc extends Zu{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 r=null!=e&&e.toString?e.toString():e;return r===ic?e:r})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||Ou.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=Ru.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=Ru.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=Ru.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 r,n,i=!1;return t&&("object"==typeof t?({excludeEmptyString:i=!1,message:r,name:n}=t):r=t),this.test({name:n||"matches",message:r||Ru.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&i||-1!==t.search(e)})}email(e=Ru.email){return this.matches(Ju,{name:"email",message:e,excludeEmptyString:!0})}url(e=Ru.url){return this.matches(ec,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Ru.uuid){return this.matches(tc,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,r,n="";return e&&("object"==typeof e?({message:n="",allowOffset:t=!1,precision:r}=e):n=e),this.matches(rc,{name:"datetime",message:n||Ru.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Ru.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const r=Ku(e);return!!r&&!!r.z}}).test({name:"datetime_precision",message:n||Ru.datetime_precision,params:{precision:r},skipAbsent:!0,test:e=>{if(!e||null==r)return!0;const t=Ku(e);return!!t&&t.precision===r}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=Ru.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:nc})}lowercase(e=Ru.lowercase){return this.transform(e=>Uu(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Uu(e)||e===e.toLowerCase()})}uppercase(e=Ru.uppercase){return this.transform(e=>Uu(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Uu(e)||e===e.toUpperCase()})}}sc.prototype=oc.prototype;function ac(){return new lc}class lc extends Zu{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 r=e;if("string"==typeof r){if(r=r.replace(/\s/g,""),""===r)return NaN;r=+r}return this.isType(r)||null===r?r:parseFloat(r)})})}min(e,t=Cu.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=Cu.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=Cu.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=Cu.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(e=Cu.positive){return this.moreThan(0,e)}negative(e=Cu.negative){return this.lessThan(0,e)}integer(e=Cu.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(e=>Uu(e)?e:0|e)}round(e){var t;let r=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===r.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(t=>Uu(t)?t:Math[e](t))}}ac.prototype=lc.prototype;let uc=new Date("");function cc(){return new hc}class hc extends Zu{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=Ku(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 r=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(r=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}(e),isNaN(e)?hc.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let r;if(ju.isRef(e))r=e;else{let n=this.cast(e);if(!this._typeCheck(n))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);r=n}return r}min(e,t=Nu.min){let r=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(r)}})}max(e,t=Nu.max){let r=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(r)}})}}function dc(e,t){let r=1/0;return e.some((e,n)=>{var i;if(null!=(i=t.path)&&i.includes(e))return r=n,!0}),r}function fc(e){return(t,r)=>dc(e,t)-dc(e,r)}hc.INVALID_DATE=uc,cc.prototype=hc.prototype,cc.INVALID_DATE=uc;const pc=(e,t,r)=>{if("string"!=typeof e)return e;let n=e;try{n=JSON.parse(e)}catch(e){}return r.isType(n)?n:e};function mc(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=mc(n);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=mc(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(mc)}):"optional"in e?e.optional():e}let gc=e=>"[object Object]"===Object.prototype.toString.call(e);function _c(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===r.indexOf(e))}const yc=fc([]);function vc(e){return new bc(e)}class bc extends Zu{constructor(e){super({type:"object",check:e=>gc(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=yc,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var r;let n=super._cast(e,t);if(void 0===n)return this.getDefault(t);if(!this._typeCheck(n))return n;let i=this.fields,s=null!=(r=t.stripUnknown)?r:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(n).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 r=i[e],o=e in n,c=n[e];if(r){let i;l.path=(t.path?`${t.path}.`:"")+e,r=r.resolve({value:c,context:t.context,parent:a});let s=r instanceof Zu?r.spec:void 0,o=null==s?void 0:s.strict;if(null!=s&&s.strip){u=u||e in n;continue}i=t.__validating&&o?c:r.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:n}_validate(e,t={},r,n){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,r,(e,i)=>{if(!o||!gc(i))return void n(e,i);s=s||i;let a=[];for(let e of this._nodes){let r=this.fields[e];r&&!ju.isRef(r)&&a.push(r.asNestedTest({options:t,key:e,parent:i,parentPath:t.path,originalParent:s}))}this.runTests({tests:a,value:i,originalValue:s,options:t},r,t=>{n(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),r=t.fields;for(let[e,t]of Object.entries(this.fields)){const n=r[e];r[e]=void 0===n?t:n}return t.withMutation(t=>t.setFields(r,[...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(r=>{var n;const i=this.fields[r];let s=e;null!=(n=s)&&n.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),t[r]=i&&"getDefault"in i?i.getDefault(s):void 0}),t}setFields(e,t){let r=this.clone();return r.fields=e,r._nodes=function(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([e,t])=>`${e}-${t}`));function s(e,t){let s=lu.split(e)[0];n.add(s),i.has(`${t}-${s}`)||r.push([t,s])}for(const t of Object.keys(e)){let r=e[t];n.add(t),ju.isRef(r)&&r.isSibling?s(r.path,t):zu(r)&&"deps"in r&&r.deps.forEach(e=>s(e,t))}return fu.array(Array.from(n),r).reverse()}(e,t),r._sortErrors=fc(Object.keys(e)),t&&(r._excludedEdges=t),r}shape(e,t=[]){return this.clone().withMutation(r=>{let n=r._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),n=[...r._excludedEdges,...t]),r.setFields(Object.assign(r.fields,e),n)})}partial(){const e={};for(const[t,r]of Object.entries(this.fields))e[t]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(e)}deepPartial(){return mc(this)}pick(e){const t={};for(const r of e)this.fields[r]&&(t[r]=this.fields[r]);return this.setFields(t,this._excludedEdges.filter(([t,r])=>e.includes(t)&&e.includes(r)))}omit(e){const t=[];for(const r of Object.keys(this.fields))e.includes(r)||t.push(r);return this.pick(t)}from(e,t,r){let n=lu.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return((e,t)=>{const r=[...lu.normalizePath(t)];if(1===r.length)return r[0]in e;let n=r.pop(),i=lu.getter(lu.join(r),!0)(e);return!(!i||!(n in i))})(i,e)&&(s=Object.assign({},i),r||delete s[e],s[t]=n(i)),s})}json(){return this.transform(pc)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Pu.exact,test(e){if(null==e)return!0;const t=_c(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Pu.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const r=_c(this.schema,t);return!e||0===r.length||this.createError({params:{unknown:r.join(", ")}})}});return r.spec.noUnknown=e,r}unknown(e=!0,t=Pu.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const r={};for(const n of Object.keys(t))r[e(n)]=t[n];return r})}camelCase(){return this.transformKeys(cu.camelCase)}snakeCase(){return this.transformKeys(cu.snakeCase)}constantCase(){return this.transformKeys(e=>cu.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),r=super.describe(e);r.fields={};for(const[i,s]of Object.entries(t.fields)){var n;let t=e;null!=(n=t)&&n.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[i]})),r.fields[i]=s.describe(t)}return r}}function xc(e){return new wc(e)}vc.prototype=bc.prototype;class wc extends Zu{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const r=super._cast(e,t);if(!this._typeCheck(r)||!this.innerType)return r;let n=!1;const i=r.map((e,i)=>{const s=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${i}]`,parent:r,originalValue:e,value:e,index:i}));return s!==e&&(n=!0),s});return n?i:r}_validate(e,t={},r,n){var i;let s=this.innerType,o=null!=(i=t.recursive)?i:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,r,(i,a)=>{var l;if(!o||!s||!this._typeCheck(a))return void n(i,a);let u=new Array(a.length);for(let r=0;r<a.length;r++){var c;u[r]=s.asNestedTest({options:t,index:r,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},r,e=>n(e.concat(i),a))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(pc)}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(!zu(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+bu(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=Mu.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||Mu.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||Mu.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,r,n)=>!e(t,r,n):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(e){const t=(e?this.resolve(e):this).clone(),r=super.describe(e);if(t.innerType){var n;let i=e;null!=(n=i)&&n.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),r.innerType=t.innerType.describe(i)}return r}}xc.prototype=wc.prototype;const Ec="Данное поле обязательно для заполнения",Ac=()=>sc(),Sc=(e=Ec)=>Ac().required(e),Tc=ac(),kc=Tc.required(Ec),Oc=xc(),Rc=cc(),Cc=Rc.required(Ec),Nc="https://dalganmap.ru/api",Pc=({items:t,onOpen:r,defaultValue:n=null})=>{const[i,s]=e.useState(n),o=e.useCallback(()=>{s(null)},[]);e.useEffect(()=>{n&&s(n)},[n]);const a=e.useId();return x(O,{id:a,children:t.map(({value:e,summary:t,getDetails:n})=>{const l=`${a}-accordion-${e}`;return w(R,{expanded:e===i,children:[x(C,{expandIcon:x(J,{}),onClick:()=>{s(t=>t===e?null:(r?.(e),e))},"aria-controls":`${l}-content`,id:`${l}-header`,children:t}),x(N,{children:n({onClose:o})})]},l)})})},Mc=e=>{const{children:t,variant:r="contained",loading:n,icon:i,sx:s,...o}=e;return i?x(ee,{...o,loading:n,children:i}):x(P,{sx:{whiteSpace:"nowrap",padding:"5px 15px",textTransform:"none",...s},loading:n,loadingPosition:"start",variant:r,...o,children:t})},Dc={reset:ie,edit:re,move:ne,save:se,delete:te},zc=({title:t,iconProps:r,...n})=>{const i=e.useId(),s=Dc[r.name],o=r.color??"primary";return t?x(M,{title:t,children:x(D,{id:i,...n,onClick:e=>{e.stopPropagation(),n.onClick?.(e)},children:x(s,{fontSize:"medium",color:o})})}):x(D,{id:i,...n,onClick:e=>{e.stopPropagation(),n.onClick?.(e)},children:x(s,{fontSize:"medium",color:o})})},Ic=e.forwardRef(function(e,t){return x(z,{direction:"up",ref:t,...e})}),Fc=({notification:t,onDelete:r})=>{const n=e.useId(),[i,s]=e.useState(!1),o=()=>{s(!1)};return w(e.Fragment,{children:[t?x(M,{title:t.title,children:x(zc,{iconProps:{name:"delete",color:"error"},onClick:()=>{s(!0)}})}):x(zc,{iconProps:{name:"delete",color:"error"},onClick:r}),t?w(I,{slots:{transition:Ic},open:i,onClose:o,children:[x(F,{id:`${n}-dialog-title`,children:t.title}),x(L,{children:x(j,{id:`${n}-dialog-text`,children:t.description})}),w(U,{children:[x(P,{variant:"contained",color:"error",sx:{textTransform:"none"},onClick:o,children:"Отмена"}),x(P,{variant:"contained",sx:{textTransform:"none"},onClick:()=>{r(),o()},children:"Подтвердить"})]})]}):null]})},Lc=V("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),jc=({children:e,accept:t,onFilesLoad:r,...n})=>w(Mc,{...n,component:"label",variant:"contained",startIcon:x(oe,{}),children:[e,x(Lc,{type:"file",accept:t,onChange:e=>{const{target:{files:t}}=e;t&&r({event:e,files:t})},multiple:!0})]});var Uc=El(({name:t,title:r,description:n,onSuccess:i,onOpen:s,onClose:o,theme:a="info",agreeButton:l,disagreeButton:u,content:c})=>{const h=e.useId(),d=e.useId(),f=e.useId(),p=Lo.getIsOpen(t),m=()=>{Lo.close(t)};return e.useEffect(()=>{p?s?.():o?.()},[p]),w(I,{id:h,open:p,onClose:m,"aria-labelledby":d,"aria-describedby":f,children:[x(F,{id:d,sx:({palette:e})=>({background:e[a].main,color:e[a].contrastText}),children:r}),x(B,{}),w(L,{sx:({spacing:e})=>({display:"grid",gap:e(2)}),children:[x(j,{id:f,children:n}),c?w(e.Fragment,{children:[x(B,{}),c]}):null]}),x(B,{}),w(U,{children:[x(Mc,{color:"error",onClick:m,disabled:u?.disabled,children:u?.text??"Закрыть"}),x(Mc,{color:"success",onClick:()=>{i(),m()},disabled:l?.disabled,children:l?.text??"Подтвердить"})]})]})});const Vc=({children:e,sx:t,...r})=>x(O,{...r,sx:e=>{const{spacing:r}=e;return{px:r(2),py:r(2),borderRadius:"10px",boxShadow:"0px 8px 24px 0px rgba(0,0,0,0.3)",maxHeight:"85vh",maxWidth:"85vw",overflowX:"auto",...t?.(e)}},children:e});var Bc=e=>"checkbox"===e.type,$c=e=>e instanceof Date,Gc=e=>null==e;const qc=e=>"object"==typeof e;var Wc=e=>!Gc(e)&&!Array.isArray(e)&&qc(e)&&!$c(e),Hc=e=>Wc(e)&&e.target?Bc(e.target)?e.target.checked:e.target.value:e,Yc=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),Zc="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function Xc(e){if(e instanceof Date)return new Date(e);const t="undefined"!=typeof FileList&&e instanceof FileList;if(Zc&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!(r||Wc(e)&&(e=>{const t=e.constructor&&e.constructor.prototype;return Wc(t)&&t.hasOwnProperty("isPrototypeOf")})(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=Xc(e[t]));return n}var Kc=e=>/^\w*$/.test(e),Qc=e=>void 0===e,Jc=e=>Array.isArray(e)?e.filter(Boolean):[],eh=e=>Jc(e.replace(/["|']|\]/g,"").split(/\.|\[/)),th=(e,t,r)=>{if(!t||!Wc(e))return r;const n=(Kc(t)?[t]:eh(t)).reduce((e,t)=>Gc(e)?e:e[t],e);return Qc(n)||n===e?Qc(e[t])?r:e[t]:n},rh=e=>"boolean"==typeof e,nh=e=>"function"==typeof e,ih=(e,t,r)=>{let n=-1;const i=Kc(t)?[t]:eh(t),s=i.length,o=s-1;for(;++n<s;){const t=i[n];let s=r;if(n!==o){const r=e[t];s=Wc(r)||Array.isArray(r)?r:isNaN(+i[n+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=s,e=e[t]}};const sh="blur",oh="focusout",ah="change",lh="onBlur",uh="onChange",ch="onSubmit",hh="onTouched",dh="all",fh="max",ph="min",mh="maxLength",gh="minLength",_h="pattern",yh="required",vh="validate",bh=t.createContext(null);bh.displayName="HookFormContext";const xh=()=>t.useContext(bh),wh=e=>{const{children:r,...n}=e;return t.createElement(bh.Provider,{value:n},r)};var Eh=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const i=s;return t._proxyFormState[i]!==dh&&(t._proxyFormState[i]=!n||dh),r&&(r[i]=!0),e[i]}});return i};const Ah="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;var Sh=e=>"string"==typeof e,Th=(e,t,r,n,i)=>Sh(e)?(n&&t.watch.add(e),th(r,e,i)):Array.isArray(e)?e.map(e=>(n&&t.watch.add(e),th(r,e))):(n&&(t.watchAll=!0),r),kh=e=>Gc(e)||!qc(e);function Oh(e,t,r=new WeakSet){if(kh(e)||kh(t))return Object.is(e,t);if($c(e)&&$c(t))return e.getTime()===t.getTime();const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const n=e[s];if(!i.includes(s))return!1;if("ref"!==s){const e=t[s];if($c(n)&&$c(e)||Wc(n)&&Wc(e)||Array.isArray(n)&&Array.isArray(e)?!Oh(n,e,r):!Object.is(n,e))return!1}}return!0}function Rh(e){const r=xh(),{name:n,disabled:i,control:s=r.control,shouldUnregister:o,defaultValue:a,exact:l=!0}=e,u=Yc(s._names.array,n),c=t.useMemo(()=>th(s._formValues,n,th(s._defaultValues,n,a)),[s,n,a]),h=function(e){const r=xh(),{control:n=r.control,name:i,defaultValue:s,disabled:o,exact:a,compute:l}=e||{},u=t.useRef(s),c=t.useRef(l),h=t.useRef(void 0),d=t.useRef(n),f=t.useRef(i);c.current=l;const[p,m]=t.useState(()=>{const e=n._getWatch(i,u.current);return c.current?c.current(e):e}),g=t.useCallback(e=>{const t=Th(i,n._names,e||n._formValues,!1,u.current);return c.current?c.current(t):t},[n._formValues,n._names,i]),_=t.useCallback(e=>{if(!o){const t=Th(i,n._names,e||n._formValues,!1,u.current);if(c.current){const e=c.current(t);Oh(e,h.current)||(m(e),h.current=e)}else m(t)}},[n._formValues,n._names,o,i]);Ah(()=>(d.current===n&&Oh(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,_]),t.useEffect(()=>n._removeUnmounted());const y=d.current!==n,v=f.current,b=t.useMemo(()=>{if(o)return null;const e=!y&&!Oh(v,i);return y||e?g():null},[o,y,i,v,g]);return null!==b?b:p}({control:s,name:n,defaultValue:c,exact:l}),d=function(e){const r=xh(),{control:n=r.control,disabled:i,name:s,exact:o}=e||{},[a,l]=t.useState(n._formState),u=t.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ah(()=>n._subscribe({name:s,formState:u.current,exact:o,callback:e=>{!i&&l({...n._formState,...e})}}),[s,i,o]),t.useEffect(()=>{u.current.isValid&&n._setValid(!0)},[n]),t.useMemo(()=>Eh(a,n,u.current,!1),[a,n])}({control:s,name:n,exact:l}),f=t.useRef(e),p=t.useRef(void 0),m=t.useRef(s.register(n,{...e.rules,value:h,...rh(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const g=t.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!th(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!th(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!th(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!th(d.validatingFields,n)},error:{enumerable:!0,get:()=>th(d.errors,n)}}),[d,n]),_=t.useCallback(e=>m.current.onChange({target:{value:Hc(e),name:n},type:ah}),[n]),y=t.useCallback(()=>m.current.onBlur({target:{value:th(s._formValues,n),name:n},type:sh}),[n,s._formValues]),v=t.useCallback(e=>{const t=th(s._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>nh(e.focus)&&e.focus(),select:()=>nh(e.select)&&e.select(),setCustomValidity:t=>nh(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>nh(e.reportValidity)&&e.reportValidity()})},[s._fields,n]),b=t.useMemo(()=>({name:n,value:h,...rh(i)||d.disabled?{disabled:d.disabled||i}:{},onChange:_,onBlur:y,ref:v}),[n,i,d.disabled,_,y,v,h]);return t.useEffect(()=>{const e=s._options.shouldUnregister||o,t=p.current;t&&t!==n&&!u&&s.unregister(t),s.register(n,{...f.current.rules,...rh(f.current.disabled)?{disabled:f.current.disabled}:{}});const r=(e,t)=>{const r=th(s._fields,e);r&&r._f&&(r._f.mount=t)};if(r(n,!0),e){const e=Xc(th(s._options.defaultValues,n,f.current.defaultValue));ih(s._defaultValues,n,e),Qc(th(s._formValues,n))&&ih(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]),t.useEffect(()=>{s._setDisabledField({disabled:i,name:n})},[i,n,s]),t.useMemo(()=>({field:b,formState:d,fieldState:g}),[b,d,g])}const Ch=e=>e.render(Rh(e));var Nh=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},Ph=e=>Array.isArray(e)?e:[e],Mh=()=>{let e=[];return{get observers(){return e},next:t=>{for(const r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function Dh(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],s=t[n];if(i&&Wc(i)&&s){const e=Dh(i,s);Wc(e)&&(r[n]=e)}else e[n]&&(r[n]=s)}return r}var zh=e=>Wc(e)&&!Object.keys(e).length,Ih=e=>"file"===e.type,Fh=e=>{if(!Zc)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Lh=e=>"select-multiple"===e.type,jh=e=>"radio"===e.type,Uh=e=>Fh(e)&&e.isConnected;function Vh(e,t){const r=Array.isArray(t)?t:Kc(t)?[t]:eh(t),n=1===r.length?e:function(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Qc(e)?n++:e[t[n++]];return e}(e,r),i=r.length-1,s=r[i];return n&&delete n[s],0!==i&&(Wc(n)&&zh(n)||Array.isArray(n)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!Qc(e[t]))return!1;return!0}(n))&&Vh(e,r.slice(0,-1)),e}function Bh(e){return Array.isArray(e)||Wc(e)&&!(e=>{for(const t in e)if(nh(e[t]))return!0;return!1})(e)}function $h(e,t={}){for(const r in e){const n=e[r];Bh(n)?(t[r]=Array.isArray(n)?[]:{},$h(n,t[r])):Qc(n)||(t[r]=!0)}return t}function Gh(e,t,r){r||(r=$h(t));for(const n in e){const i=e[n];if(Bh(i))Qc(t)||kh(r[n])?r[n]=$h(i,Array.isArray(i)?[]:{}):Gh(i,Gc(t)?{}:t[n],r[n]);else{const e=t[n];r[n]=!Oh(i,e)}}return r}const qh={value:!1,isValid:!1},Wh={value:!0,isValid:!0};var Hh=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&&!Qc(e[0].attributes.value)?Qc(e[0].value)||""===e[0].value?Wh:{value:e[0].value,isValid:!0}:Wh:qh}return qh},Yh=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Qc(e)?e:t?""===e?NaN:e?+e:e:r&&Sh(e)?new Date(e):n?n(e):e;const Zh={isValid:!1,value:null};var Xh=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,Zh):Zh;function Kh(e){const t=e.ref;return Ih(t)?t.files:jh(t)?Xh(e.refs).value:Lh(t)?[...t.selectedOptions].map(({value:e})=>e):Bc(t)?Hh(e.refs).value:Yh(Qc(t.value)?e.ref.value:t.value,e)}var Qh=e=>e instanceof RegExp,Jh=e=>Qc(e)?e:Qh(e)?e.source:Wc(e)?Qh(e.value)?e.value.source:e.value:e,ed=e=>({isOnSubmit:!e||e===ch,isOnBlur:e===lh,isOnChange:e===uh,isOnAll:e===dh,isOnTouch:e===hh});const td="AsyncFunction";var rd=e=>!!e&&!!e.validate&&!!(nh(e.validate)&&e.validate.constructor.name===td||Wc(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===td)),nd=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const id=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const r=th(e,i);if(r){const{_f:e,...s}=r;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!n)return!0;if(e.ref&&t(e.ref,e.name)&&!n)return!0;if(id(s,t))break}else if(Wc(s)&&id(s,t))break}}};function sd(e,t,r){const n=th(e,r);if(n||Kc(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const n=i.join("."),s=th(t,n),o=th(e,n);if(s&&!Array.isArray(s)&&r!==n)return{name:r};if(o&&o.type)return{name:n,error:o};if(o&&o.root&&o.root.type)return{name:`${n}.root`,error:o.root};i.pop()}return{name:r}}var od=(e,t,r)=>{const n=Ph(th(e,r));return ih(n,"root",t[r]),ih(e,r,n),e};function ad(e,t,r="validate"){if(Sh(e)||Array.isArray(e)&&e.every(Sh)||rh(e)&&!e)return{type:r,message:Sh(e)?e:"",ref:t}}var ld=e=>Wc(e)&&!Qh(e)?e:{value:e,message:""},ud=async(e,t,r,n,i,s)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:c,min:h,max:d,pattern:f,validate:p,name:m,valueAsNumber:g,mount:_}=e._f,y=th(r,m);if(!_||t.has(m))return{};const v=a?a[0]:o,b=e=>{i&&v.reportValidity&&(v.setCustomValidity(rh(e)?"":e||""),v.reportValidity())},x={},w=jh(o),E=Bc(o),A=w||E,S=(g||Ih(o))&&Qc(o.value)&&Qc(y)||Fh(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,T=Nh.bind(null,m,n,x),k=(e,t,r,n=mh,i=gh)=>{const s=e?t:r;x[m]={type:e?n:i,message:s,ref:o,...T(e?n:i,s)}};if(s?!Array.isArray(y)||!y.length:l&&(!A&&(S||Gc(y))||rh(y)&&!y||E&&!Hh(a).isValid||w&&!Xh(a).isValid)){const{value:e,message:t}=Sh(l)?{value:!!l,message:l}:ld(l);if(e&&(x[m]={type:yh,message:t,ref:v,...T(yh,t)},!n))return b(t),x}if(!(S||Gc(h)&&Gc(d))){let e,t;const r=ld(d),i=ld(h);if(Gc(y)||isNaN(y)){const n=o.valueAsDate||new Date(y),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;Sh(r.value)&&y&&(e=a?s(y)>s(r.value):l?y>r.value:n>new Date(r.value)),Sh(i.value)&&y&&(t=a?s(y)<s(i.value):l?y<i.value:n<new Date(i.value))}else{const n=o.valueAsNumber||(y?+y:y);Gc(r.value)||(e=n>r.value),Gc(i.value)||(t=n<i.value)}if((e||t)&&(k(!!e,r.message,i.message,fh,ph),!n))return b(x[m].message),x}if((u||c)&&!S&&(Sh(y)||s&&Array.isArray(y))){const e=ld(u),t=ld(c),r=!Gc(e.value)&&y.length>+e.value,i=!Gc(t.value)&&y.length<+t.value;if((r||i)&&(k(r,e.message,t.message),!n))return b(x[m].message),x}if(f&&!S&&Sh(y)){const{value:e,message:t}=ld(f);if(Qh(e)&&!y.match(e)&&(x[m]={type:_h,message:t,ref:o,...T(_h,t)},!n))return b(t),x}if(p)if(nh(p)){const e=ad(await p(y,r),v);if(e&&(x[m]={...e,...T(vh,e.message)},!n))return b(e.message),x}else if(Wc(p)){let e={};for(const t in p){if(!zh(e)&&!n)break;const i=ad(await p[t](y,r),v,t);i&&(e={...i,...T(t,i.message)},b(i.message),n&&(x[m]=e))}if(!zh(e)&&(x[m]={ref:v,...e},!n))return x}return b(!0),x};const cd={mode:ch,reValidateMode:uh,shouldFocusError:!0};function hd(e={}){let t,r={...cd,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:nh(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},i={},s=(Wc(r.defaultValues)||Wc(r.values))&&Xc(r.defaultValues||r.values)||{},o=r.shouldUnregister?{}:Xc(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:Mh(),state:Mh()},p=r.criteriaMode===dh,m=async e=>{if(!a.keepIsValid&&!r.disabled&&(h.isValid||d.isValid||e)){let e;r.resolver?(e=zh((await b()).errors),g()):e=await x(i,!0),e!==n.isValid&&f.state.next({isValid:e})}},g=(e,t)=>{!r.disabled&&(h.isValidating||h.validatingFields||d.isValidating||d.validatingFields)&&((e||Array.from(l.mount)).forEach(e=>{e&&(t?ih(n.validatingFields,e,t):Vh(n.validatingFields,e))}),f.state.next({validatingFields:n.validatingFields,isValidating:!zh(n.validatingFields)}))},_=(e,t,r,n)=>{const l=th(i,e);if(l){const i=th(o,e,Qc(r)?th(s,e):r);Qc(i)||n&&n.defaultChecked||t?ih(o,e,t?i:Kh(l._f)):A(e,i),a.mount&&!a.action&&m()}},y=(e,t,i,o,a)=>{let l=!1,u=!1;const c={name:e};if(!r.disabled){if(!i||o){(h.isDirty||d.isDirty)&&(u=n.isDirty,n.isDirty=c.isDirty=w(),l=u!==c.isDirty);const r=Oh(th(s,e),t);u=!!th(n.dirtyFields,e),r?Vh(n.dirtyFields,e):ih(n.dirtyFields,e,!0),c.dirtyFields=n.dirtyFields,l=l||(h.dirtyFields||d.dirtyFields)&&u!==!r}if(i){const t=th(n.touchedFields,e);t||(ih(n.touchedFields,e,i),c.touchedFields=n.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=th(n.errors,e),l=(h.isValid||d.isValid)&&rh(i)&&n.isValid!==i;var c;if(r.delayError&&s?(c=()=>((e,t)=>{ih(n.errors,e,t),f.state.next({errors:n.errors})})(e,s),t=e=>{clearTimeout(u),u=setTimeout(c,e)},t(r.delayError)):(clearTimeout(u),t=null,s?ih(n.errors,e,s):Vh(n.errors,e)),(s?!Oh(a,s):a)||!zh(o)||l){const t={...o,...l&&rh(i)?{isValid:i}:{},errors:n.errors,name:e};n={...n,...t},f.state.next(t)}},b=async e=>{g(e,!0);const t=await r.resolver(o,r.context,((e,t,r,n)=>{const i={};for(const r of e){const e=th(t,r);e&&ih(i,r,e._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}})(e||l.mount,i,r.criteriaMode,r.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&&rd(a._f);u&&h.validatingFields&&g([e.name],!0);const c=await ud(a,l.disabled,o,p,r.shouldUseNativeValidation&&!t,s);if(u&&h.validatingFields&&g([e.name]),c[e.name]&&(i.valid=!1,t))break;!t&&(th(c,e.name)?s?od(n.errors,c,e.name):ih(n.errors,e.name,c[e.name]):Vh(n.errors,e.name))}!zh(s)&&await x(s,t,i)}}return i.valid},w=(e,t)=>!r.disabled&&(e&&t&&ih(o,e,t),!Oh(C(),s)),E=(e,t,r)=>Th(e,l,{...a.mount?o:Qc(t)?s:Sh(e)?{[e]:t}:t},r,t),A=(e,t,r={})=>{const n=th(i,e);let s=t;if(n){const r=n._f;r&&(!r.disabled&&ih(o,e,Yh(t,r)),s=Fh(r.ref)&&Gc(t)?"":t,Lh(r.ref)?[...r.ref.options].forEach(e=>e.selected=s.includes(e.value)):r.refs?Bc(r.ref)?r.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(s)?e.checked=!!s.find(t=>t===e.value):e.checked=s===e.value||!!s)}):r.refs.forEach(e=>e.checked=e.value===s):Ih(r.ref)?r.ref.value="":(r.ref.value=s,r.ref.type||f.state.next({name:e,values:Xc(o)})))}(r.shouldDirty||r.shouldTouch)&&y(e,s,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&R(e)},S=(e,t,r)=>{for(const n in t){if(!t.hasOwnProperty(n))return;const s=t[n],o=e+"."+n,a=th(i,o);(l.array.has(e)||Wc(s)||a&&!a._f)&&!$c(s)?S(o,s,r):A(o,s,r)}},T=(e,t,r={})=>{const u=th(i,e),c=l.array.has(e),p=Xc(t);ih(o,e,p),c?(f.array.next({name:e,values:Xc(o)}),(h.isDirty||h.dirtyFields||d.isDirty||d.dirtyFields)&&r.shouldDirty&&f.state.next({name:e,dirtyFields:Gh(s,o),isDirty:w(e,p)})):!u||u._f||Gc(p)?A(e,p,r):S(e,p,r),nd(e,l)&&f.state.next({...n,name:e}),f.state.next({name:a.mount?e:void 0,values:Xc(o)})},k=async e=>{a.mount=!0;const s=e.target;let u=s.name,c=!0;const _=th(i,u),w=e=>{c=Number.isNaN(e)||$c(e)&&isNaN(e.getTime())||Oh(e,th(o,u,e))},E=ed(r.mode),A=ed(r.reValidateMode);if(_){let a,T;const k=s.type?Kh(_._f):Hc(e),O=e.type===sh||e.type===oh,C=!((S=_._f).mount&&(S.required||S.min||S.max||S.maxLength||S.minLength||S.pattern||S.validate)||r.resolver||th(n.errors,u)||_._f.deps)||((e,t,r,n,i)=>!i.isOnAll&&(!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:!(r?n.isOnChange:i.isOnChange)||e))(O,th(n.touchedFields,u),n.isSubmitted,A,E),N=nd(u,l,O);ih(o,u,k),O?s&&s.readOnly||(_._f.onBlur&&_._f.onBlur(e),t&&t(0)):_._f.onChange&&_._f.onChange(e);const P=y(u,k,O),M=!zh(P)||N;if(!O&&f.state.next({name:u,type:e.type,values:Xc(o)}),C)return(h.isValid||d.isValid)&&("onBlur"===r.mode?O&&m():O||m()),M&&f.state.next({name:u,...N?{}:P});if(!O&&N&&f.state.next({...n}),r.resolver){const{errors:e}=await b([u]);if(g([u]),w(k),c){const t=sd(n.errors,i,u),r=sd(e,i,t.name||u);a=r.error,u=r.name,T=zh(e)}}else g([u],!0),a=(await ud(_,l.disabled,o,p,r.shouldUseNativeValidation))[u],g([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,P))}var S},O=(e,t)=>{if(th(n.errors,t)&&e.focus)return e.focus(),1},R=async(e,t={})=>{let s,o;const a=Ph(e);if(r.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(g(e),e)for(const r of e){const e=th(t,r);e?ih(n.errors,r,e):Vh(n.errors,r)}else n.errors=t;return t})(Qc(e)?e:a);s=zh(t),o=e?!a.some(e=>th(t,e)):s}else e?(o=(await Promise.all(a.map(async e=>{const t=th(i,e);return await x(t&&t._f?{[e]:t}:t)}))).every(Boolean),(o||n.isValid)&&m()):o=s=await x(i);return f.state.next({...!Sh(e)||(h.isValid||d.isValid)&&s!==n.isValid?{}:{name:e},...r.resolver||!e?{isValid:s}:{},errors:n.errors}),t.shouldFocus&&!o&&id(i,O,e?a:l.mount),o},C=(e,t)=>{let r={...a.mount?o:s};return t&&(r=Dh(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),Qc(e)?r:Sh(e)?th(r,e):e.map(e=>th(r,e))},N=(e,t)=>({invalid:!!th((t||n).errors,e),isDirty:!!th((t||n).dirtyFields,e),error:th((t||n).errors,e),isValidating:!!th(n.validatingFields,e),isTouched:!!th((t||n).touchedFields,e)}),P=(e,t,r)=>{const s=(th(i,e,{_f:{}})._f||{}).ref,o=th(n.errors,e)||{},{ref:a,message:l,type:u,...c}=o;ih(n.errors,e,{...c,...t,ref:s}),f.state.next({name:e,errors:n.errors,isValid:!1}),r&&r.shouldFocus&&s&&s.focus&&s.focus()},M=e=>f.state.subscribe({next:t=>{var r,i,a;r=e.name,i=t.name,a=e.exact,r&&i&&r!==i&&!Ph(r).some(e=>e&&(a?e===i:e.startsWith(i)||i.startsWith(e)))||!((e,t,r,n)=>{r(e);const{name:i,...s}=e;return zh(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(e=>t[e]===(!n||dh))})(t,e.formState||h,V,e.reRenderRoot)||e.callback({values:{...o},...n,...t,defaultValues:s})}}).unsubscribe,D=(e,t={})=>{for(const a of e?Ph(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(Vh(i,a),Vh(o,a)),!t.keepError&&Vh(n.errors,a),!t.keepDirty&&Vh(n.dirtyFields,a),!t.keepTouched&&Vh(n.touchedFields,a),!t.keepIsValidating&&Vh(n.validatingFields,a),!r.shouldUnregister&&!t.keepDefaultValue&&Vh(s,a);f.state.next({values:Xc(o)}),f.state.next({...n,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&m()},z=({disabled:e,name:t})=>{(rh(e)&&a.mount||e||l.disabled.has(t))&&(e?l.disabled.add(t):l.disabled.delete(t))},I=(e,t={})=>{let n=th(i,e);const o=rh(t.disabled)||rh(r.disabled);return ih(i,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),n?z({disabled:rh(t.disabled)?t.disabled:r.disabled,name:e}):_(e,!0,t.value),{...o?{disabled:t.disabled||r.disabled}:{},...r.progressive?{required:!!t.required,min:Jh(t.min),max:Jh(t.max),minLength:Jh(t.minLength),maxLength:Jh(t.maxLength),pattern:Jh(t.pattern)}:{},name:e,onChange:k,onBlur:k,ref:o=>{if(o){I(e,t),n=th(i,e);const r=Qc(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=(e=>jh(e)||Bc(e))(r),l=n._f.refs||[];if(a?l.find(e=>e===r):r===n._f.ref)return;ih(i,e,{_f:{...n._f,...a?{refs:[...l.filter(Uh),r,...Array.isArray(th(s,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),_(e,!1,void 0,r)}else n=th(i,e,{}),n._f&&(n._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(!Yc(l.array,e)||!a.action)&&l.unMount.add(e)}}},F=()=>r.shouldFocusError&&id(i,O,l.mount),L=(e,t)=>async s=>{let a;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let u=Xc(o);if(f.state.next({isSubmitting:!0}),r.resolver){const{errors:e,values:t}=await b();g(),n.errors=e,u=Xc(t)}else await x(i);if(l.disabled.size)for(const e of l.disabled)Vh(u,e);if(Vh(n.errors,"root"),zh(n.errors)){f.state.next({errors:{}});try{await e(u,s)}catch(e){a=e}}else t&&await t({...n.errors},s),F(),setTimeout(F);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:zh(n.errors)&&!a,submitCount:n.submitCount+1,errors:n.errors}),a)throw a},j=(e,t={})=>{const u=e?Xc(e):s,c=Xc(u),d=zh(e),p=d?s:c;if(t.keepDefaultValues||(s=u),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(Gh(s,o))]);for(const t of Array.from(e))th(n.dirtyFields,t)?ih(p,t,th(o,t)):T(t,th(p,t))}else{if(Zc&&Qc(e))for(const e of l.mount){const t=th(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Fh(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)T(e,th(p,e));else i={}}o=r.shouldUnregister?t.keepDefaultValues?Xc(s):{}:Xc(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||!r.shouldUnregister&&!zh(p),a.watch=!!r.shouldUnregister,a.keepIsValid=!!t.keepIsValid,a.action=!1,t.keepErrors||(n.errors={}),f.state.next({submitCount:t.keepSubmitCount?n.submitCount:0,isDirty:!d&&(t.keepDirty?n.isDirty:!(!t.keepDefaultValues||Oh(e,s))),isSubmitted:!!t.keepIsSubmitted&&n.isSubmitted,dirtyFields:d?{}:t.keepDirtyValues?t.keepDefaultValues&&o?Gh(s,o):n.dirtyFields:t.keepDefaultValues&&e?Gh(s,e):t.keepDirty?n.dirtyFields:{},touchedFields:t.keepTouched?n.touchedFields:{},errors:t.keepErrors?n.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&n.isSubmitSuccessful,isSubmitting:!1,defaultValues:s})},U=(e,t)=>j(nh(e)?e(o):e,{...r.resetOptions,...t}),V=e=>{n={...n,...e}},B={control:{register:I,unregister:D,getFieldState:N,handleSubmit:L,setError:P,_subscribe:M,_runSchema:b,_updateIsValidating:g,_focusError:F,_getWatch:E,_getDirty:w,_setValid:m,_setFieldArray:(e,t=[],l,u,c=!0,p=!0)=>{if(u&&l&&!r.disabled){if(a.action=!0,p&&Array.isArray(th(i,e))){const t=l(th(i,e),u.argA,u.argB);c&&ih(i,e,t)}if(p&&Array.isArray(th(n.errors,e))){const t=l(th(n.errors,e),u.argA,u.argB);c&&ih(n.errors,e,t),((e,t)=>{!Jc(th(e,t)).length&&Vh(e,t)})(n.errors,e)}if((h.touchedFields||d.touchedFields)&&p&&Array.isArray(th(n.touchedFields,e))){const t=l(th(n.touchedFields,e),u.argA,u.argB);c&&ih(n.touchedFields,e,t)}(h.dirtyFields||d.dirtyFields)&&(n.dirtyFields=Gh(s,o)),f.state.next({name:e,isDirty:w(e,t),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ih(o,e,t)},_setDisabledField:z,_setErrors:e=>{n.errors=e,f.state.next({errors:n.errors,isValid:!1})},_getFieldArray:e=>Jc(th(a.mount?o:s,e,r.shouldUnregister?th(s,e,[]):[])),_reset:j,_resetDefaultValues:()=>nh(r.defaultValues)&&r.defaultValues().then(e=>{U(e,r.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of l.unMount){const t=th(i,e);t&&(t._f.refs?t._f.refs.every(e=>!Uh(e)):!Uh(t._f.ref))&&D(e)}l.unMount=new Set},_disableForm:e=>{rh(e)&&(f.state.next({disabled:e}),id(i,(t,r)=>{const n=th(i,r);n&&(t.disabled=n._f.disabled||e,Array.isArray(n._f.refs)&&n._f.refs.forEach(t=>{t.disabled=n._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 n},get _options(){return r},set _options(e){r={...r,...e}}},subscribe:e=>(a.mount=!0,d={...d,...e.formState},M({...e,formState:{...c,...e.formState}})),trigger:R,register:I,handleSubmit:L,watch:(e,t)=>nh(e)?f.state.subscribe({next:r=>"values"in r&&e(E(void 0,t),r)}):E(e,t,!0),setValue:T,getValues:C,reset:U,resetField:(e,t={})=>{th(i,e)&&(Qc(t.defaultValue)?T(e,Xc(th(s,e))):(T(e,t.defaultValue),ih(s,e,Xc(t.defaultValue))),t.keepTouched||Vh(n.touchedFields,e),t.keepDirty||(Vh(n.dirtyFields,e),n.isDirty=t.defaultValue?w(e,Xc(th(s,e))):w()),t.keepError||(Vh(n.errors,e),h.isValid&&m()),f.state.next({...n}))},clearErrors:e=>{e&&Ph(e).forEach(e=>Vh(n.errors,e)),f.state.next({errors:e?n.errors:{}})},unregister:D,setError:P,setFocus:(e,t={})=>{const r=th(i,e),n=r&&r._f;if(n){const e=n.refs?n.refs[0]:n.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&nh(e.select)&&e.select()})}},getFieldState:N};return{...B,formControl:B}}const dd=({sx:e,...t})=>x(ue,{variant:"body1",sx:{color:"var(--color-white)",cursor:"default",...e},...t}),fd=Q(ae)({padding:0,marginRight:"5px",marginLeft:"10px","& .MuiSvgIcon-root":{color:"var(--color-orange-medium)"}});function pd({label:t,name:r,...n}){const i=e.useId(),{control:s,setValue:o,watch:a}=xh(),l=a(r),u=`${i}-${r}-${String(l)}`;return x(Ch,{control:s,name:r,render:({field:e})=>{const{value:r,name:i}=e;return t?x(le,{color:"white",control:x(fd,{...n,checked:r,onChange:(e,t)=>{o(i,t,{shouldValidate:!0})}}),label:x(dd,{children:t})}):x(fd,{...n,checked:r,onChange:(e,t)=>{o(i,t,{shouldValidate:!0})}})}},u)}var md=function(t){var r=t.as,n=t.errors,i=t.name,s=t.message,o=t.render,a=function(e,t){if(null==e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n<s.length;n++)t.indexOf(r=s[n])>=0||(i[r]=e[r]);return i}(t,["as","errors","name","message","render"]),l=xh(),u=th(n||l.formState.errors,i);if(!u)return null;var c=u.message,h=u.types,d=Object.assign({},a,{children:c||s});return e.isValidElement(r)?e.cloneElement(r,d):o?o({message:c||s,messages:h}):e.createElement(r||e.Fragment,d)};function gd({name:e}){const{palette:t}=$(),{formState:{errors:r}}=xh();return x(md,{errors:r,name:e,render:({message:e})=>x(dd,{variant:"body2",style:{color:t.error.main},children:e})})}function _d({form:e,sx:t={},onSubmit:r,children:n}){const{handleSubmit:i}=e;return x(wh,{...e,children:x(O,{component:"form",sx:{display:"grid",gap:"15px",...t},onSubmit:i(r),children:n})})}const yd=()=>xh(),vd=e=>x(G,{size:"small",...e});function bd({name:t,...r}){const{control:n}=xh(),i=e.useId();return x(Ch,{control:n,name:t,render:({field:e})=>w(O,{sx:({spacing:e})=>({display:"grid",width:"100%",gap:e(1)}),children:[x(ce,{...r,...e,id:i,slots:{field:vd}}),x(gd,{name:t})]})})}const xd=({text:e="Нет данных"})=>x(k,{variant:"body2",sx:{textAlign:"center",color:"var(--gray-light-color)"},children:e});function wd({items:t,columnsCount:r=1,getContent:n,title:i,getKey:s,onClick:o,sx:a,isShowNoData:l=!0}){const u=0===t.length;return w(O,{sx:{display:"grid",gridTemplateColumns:"1fr",gap:"15px",...a?.root},children:[i?x(k,{variant:"h6",noWrap:!0,sx:{textAlign:"center",fontWeight:700,...a?.title},children:i}):null,u?x(e.Fragment,{children:l?x(xd,{}):null}):x(q,{sx:{display:"grid",gridTemplateColumns:`repeat(${r}, 1fr)`,gap:"15px",...a?.list},disablePadding:!0,children:t.map((e,t)=>x(W,{onClick:()=>o?.(e,t),sx:{...a?.item},disablePadding:!0,children:n(e,t)},s(e,t)))})]})}const Ed="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Ad(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function Sd(e){return"nodeType"in e}function Td(e){var t,r;return e?Ad(e)?e:Sd(e)&&null!=(t=null==(r=e.ownerDocument)?void 0:r.defaultView)?t:window:window}function kd(e){const{Document:t}=Td(e);return e instanceof t}function Od(e){return!Ad(e)&&e instanceof Td(e).HTMLElement}function Rd(e){return e instanceof Td(e).SVGElement}function Cd(e){return e?Ad(e)?e.document:Sd(e)?kd(e)?e:Od(e)||Rd(e)?e.ownerDocument:document:document:document}const Nd=Ed?u:s;function Pd(e){const t=n(e);return Nd(()=>{t.current=e}),i(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return null==t.current?void 0:t.current(...r)},[])}function Md(e,t){void 0===t&&(t=[e]);const r=n(e);return Nd(()=>{r.current!==e&&(r.current=e)},t),r}function Dd(e,t){const r=n();return l(()=>{const t=e(r.current);return r.current=t,t},[...t])}function zd(e){const t=Pd(e),r=n(null),s=i(e=>{e!==r.current&&(null==t||t(e,r.current)),r.current=e},[]);return[r,s]}function Id(e){const t=n();return s(()=>{t.current=e},[e]),t.current}let Fd={};function Ld(e,t){return l(()=>{if(t)return t;const r=null==Fd[e]?0:Fd[e]+1;return Fd[e]=r,e+"-"+r},[e,t])}function jd(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((t,r)=>{const n=Object.entries(r);for(const[r,i]of n){const n=t[r];null!=n&&(t[r]=n+e*i)}return t},{...t})}}const Ud=jd(1),Vd=jd(-1);function Bd(e){if(!e)return!1;const{KeyboardEvent:t}=Td(e.target);return t&&e instanceof t}function $d(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=Td(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const Gd=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[Gd.Translate.toString(e),Gd.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),qd="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Wd(e){return e.matches(qd)?e:e.querySelector(qd)}const Hd={display:"none"};function Yd(e){let{id:r,value:n}=e;return t.createElement("div",{id:r,style:Hd},n)}function Zd(e){let{id:r,announcement:n,ariaLiveType:i="assertive"}=e;return t.createElement("div",{id:r,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 Xd=m(null);const Kd={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 "},Qd={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Jd(e){let{announcements:r=Qd,container:n,hiddenTextDescribedById:o,screenReaderInstructions:a=Kd}=e;const{announce:u,announcement:h}=function(){const[e,t]=p("");return{announce:i(e=>{null!=e&&t(e)},[]),announcement:e}}(),d=Ld("DndLiveRegion"),[f,m]=p(!1);if(s(()=>{m(!0)},[]),function(e){const t=c(Xd);s(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(l(()=>({onDragStart(e){let{active:t}=e;u(r.onDragStart({active:t}))},onDragMove(e){let{active:t,over:n}=e;r.onDragMove&&u(r.onDragMove({active:t,over:n}))},onDragOver(e){let{active:t,over:n}=e;u(r.onDragOver({active:t,over:n}))},onDragEnd(e){let{active:t,over:n}=e;u(r.onDragEnd({active:t,over:n}))},onDragCancel(e){let{active:t,over:n}=e;u(r.onDragCancel({active:t,over:n}))}}),[u,r])),!f)return null;const g=t.createElement(t.Fragment,null,t.createElement(Yd,{id:o,value:a.draggable}),t.createElement(Zd,{id:d,announcement:h}));return n?v(g,n):g}var ef;function tf(){}!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"}(ef||(ef={}));const rf=Object.freeze({x:0,y:0});function nf(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function sf(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function of(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function af(e,t,r){return void 0===t&&(t=e.left),void 0===r&&(r=e.top),{x:t+.5*e.width,y:r+.5*e.height}}const lf=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=af(t,t.left,t.top),s=[];for(const e of n){const{id:t}=e,n=r.get(t);if(n){const r=nf(af(n),i);s.push({id:t,data:{droppableContainer:e,value:r}})}}return s.sort(sf)};function uf(e,t){const r=Math.max(t.top,e.top),n=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-n,a=s-r;if(n<i&&r<s){const r=t.width*t.height,n=e.width*e.height,i=o*a;return Number((i/(r+n-i)).toFixed(4))}return 0}const cf=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const e of n){const{id:n}=e,s=r.get(n);if(s){const r=uf(s,t);r>0&&i.push({id:n,data:{droppableContainer:e,value:r}})}}return i.sort(of)};function hf(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:rf}function df(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((t,r)=>({...t,top:t.top+e*r.y,bottom:t.bottom+e*r.y,left:t.left+e*r.x,right:t.right+e*r.x}),{...t})}}const ff=df(1);const pf={ignoreTransform:!1};function mf(e,t){void 0===t&&(t=pf);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:n}=Td(e).getComputedStyle(e);t&&(r=function(e,t,r){const n=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(!n)return e;const{scaleX:i,scaleY:s,x:o,y:a}=n,l=e.left-o-(1-i)*parseFloat(r),u=e.top-a-(1-s)*parseFloat(r.slice(r.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}}(r,t,n))}const{top:n,left:i,width:s,height:o,bottom:a,right:l}=r;return{top:n,left:i,width:s,height:o,bottom:a,right:l}}function gf(e){return mf(e,{ignoreTransform:!0})}function _f(e,t){const r=[];return e?function n(i){if(null!=t&&r.length>=t)return r;if(!i)return r;if(kd(i)&&null!=i.scrollingElement&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!Od(i)||Rd(i))return r;if(r.includes(i))return r;const s=Td(e).getComputedStyle(i);return i!==e&&function(e,t){void 0===t&&(t=Td(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const n=t[e];return"string"==typeof n&&r.test(n)})}(i,s)&&r.push(i),function(e,t){return void 0===t&&(t=Td(e).getComputedStyle(e)),"fixed"===t.position}(i,s)?r:n(i.parentNode)}(e):r}function yf(e){const[t]=_f(e,1);return null!=t?t:null}function vf(e){return Ed&&e?Ad(e)?e:Sd(e)?kd(e)||e===Cd(e).scrollingElement?window:Od(e)?e:null:null:null}function bf(e){return Ad(e)?e.scrollX:e.scrollLeft}function xf(e){return Ad(e)?e.scrollY:e.scrollTop}function wf(e){return{x:bf(e),y:xf(e)}}var Ef;function Af(e){return!(!Ed||!e)&&e===document.scrollingElement}function Sf(e){const t={x:0,y:0},r=Af(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=n.y,isRight:e.scrollLeft>=n.x,maxScroll:n,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(Ef||(Ef={}));const Tf={x:.2,y:.2};function kf(e,t,r,n,i){let{top:s,left:o,right:a,bottom:l}=r;void 0===n&&(n=10),void 0===i&&(i=Tf);const{isTop:u,isBottom:c,isLeft:h,isRight:d}=Sf(e),f={x:0,y:0},p={x:0,y:0},m=t.height*i.y,g=t.width*i.x;return!u&&s<=t.top+m?(f.y=Ef.Backward,p.y=n*Math.abs((t.top+m-s)/m)):!c&&l>=t.bottom-m&&(f.y=Ef.Forward,p.y=n*Math.abs((t.bottom-m-l)/m)),!d&&a>=t.right-g?(f.x=Ef.Forward,p.x=n*Math.abs((t.right-g-a)/g)):!h&&o<=t.left+g&&(f.x=Ef.Backward,p.x=n*Math.abs((t.left+g-o)/g)),{direction:f,speed:p}}function Of(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:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Rf(e){return e.reduce((e,t)=>Ud(e,wf(t)),rf)}const Cf=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+bf(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+xf(t),0)}]];class Nf{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 r=_f(t),n=Rf(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,i]of Cf)for(const s of t)Object.defineProperty(this,s,{get:()=>{const t=i(r),o=n[e]-t;return this.rect[s]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Pf{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,r){var n;null==(n=this.target)||n.addEventListener(e,t,r),this.listeners.push([e,t,r])}}function Mf(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return"number"==typeof t?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t&&n>t.y}var Df,zf;function If(e){e.preventDefault()}function Ff(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"}(Df||(Df={})),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"}(zf||(zf={}));const Lf={start:[zf.Space,zf.Enter],cancel:[zf.Esc],end:[zf.Space,zf.Enter,zf.Tab]},jf=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case zf.Right:return{...r,x:r.x+25};case zf.Left:return{...r,x:r.x-25};case zf.Down:return{...r,y:r.y+25};case zf.Up:return{...r,y:r.y-25}}};class Uf{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 Pf(Cd(t)),this.windowListeners=new Pf(Td(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Df.Resize,this.handleCancel),this.windowListeners.add(Df.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Df.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,r=e.node.current;r&&function(e,t){if(void 0===t&&(t=mf),!e)return;const{top:r,left:n,bottom:i,right:s}=t(e);yf(e)&&(i<=0||s<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(r),t(rf)}handleKeyDown(e){if(Bd(e)){const{active:t,context:r,options:n}=this.props,{keyboardCodes:i=Lf,coordinateGetter:s=jf,scrollBehavior:o="smooth"}=n,{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}=r.current,u=l?{x:l.left,y:l.top}:rf;this.referenceCoordinates||(this.referenceCoordinates=u);const c=s(e,{active:t,context:r.current,currentCoordinates:u});if(c){const t=Vd(c,u),n={x:0,y:0},{scrollableAncestors:i}=r.current;for(const r of i){const i=e.code,{isTop:s,isRight:a,isLeft:l,isBottom:u,maxScroll:h,minScroll:d}=Sf(r),f=Of(r),p={x:Math.min(i===zf.Right?f.right-f.width/2:f.right,Math.max(i===zf.Right?f.left:f.left+f.width/2,c.x)),y:Math.min(i===zf.Down?f.bottom-f.height/2:f.bottom,Math.max(i===zf.Down?f.top:f.top+f.height/2,c.y))},m=i===zf.Right&&!a||i===zf.Left&&!l,g=i===zf.Down&&!u||i===zf.Up&&!s;if(m&&p.x!==c.x){const e=r.scrollLeft+t.x,s=i===zf.Right&&e<=h.x||i===zf.Left&&e>=d.x;if(s&&!t.y)return void r.scrollTo({left:e,behavior:o});n.x=s?r.scrollLeft-e:i===zf.Right?r.scrollLeft-h.x:r.scrollLeft-d.x,n.x&&r.scrollBy({left:-n.x,behavior:o});break}if(g&&p.y!==c.y){const e=r.scrollTop+t.y,s=i===zf.Down&&e<=h.y||i===zf.Up&&e>=d.y;if(s&&!t.x)return void r.scrollTo({top:e,behavior:o});n.y=s?r.scrollTop-e:i===zf.Down?r.scrollTop-h.y:r.scrollTop-d.y,n.y&&r.scrollBy({top:-n.y,behavior:o});break}}this.handleMove(e,Ud(Vd(c,this.referenceCoordinates),n))}}}handleMove(e,t){const{onMove:r}=this.props;e.preventDefault(),r(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 Vf(e){return Boolean(e&&"distance"in e)}function Bf(e){return Boolean(e&&"delay"in e)}Uf.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=Lf,onActivation:i}=t,{active:s}=r;const{code:o}=e.nativeEvent;if(n.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 $f{constructor(e,t,r){var n;void 0===r&&(r=function(e){const{EventTarget:t}=Td(e);return e instanceof t?e:Cd(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=Cd(s),this.documentListeners=new Pf(this.document),this.listeners=new Pf(r),this.windowListeners=new Pf(Td(s)),this.initialCoordinates=null!=(n=$d(i))?n:rf,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:r}}}=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(Df.Resize,this.handleCancel),this.windowListeners.add(Df.DragStart,If),this.windowListeners.add(Df.VisibilityChange,this.handleCancel),this.windowListeners.add(Df.ContextMenu,If),this.documentListeners.add(Df.Keydown,this.handleKeydown),t){if(null!=r&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Bf(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(Vf(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:r,onPending:n}=this.props;n(r,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Df.Click,Ff,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Df.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:r,initialCoordinates:n,props:i}=this,{onMove:s,options:{activationConstraint:o}}=i;if(!n)return;const a=null!=(t=$d(e))?t:rf,l=Vd(n,a);if(!r&&o){if(Vf(o)){if(null!=o.tolerance&&Mf(l,o.tolerance))return this.handleCancel();if(Mf(l,o.distance))return this.handleStart()}return Bf(o)&&Mf(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===zf.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Gf={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class qf extends $f{constructor(e){const{event:t}=e,r=Cd(t.target);super(e,Gf,r)}}qf.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!(!r.isPrimary||0!==r.button)&&(null==n||n({event:r}),!0)}}];const Wf={move:{name:"mousemove"},end:{name:"mouseup"}};var Hf;!function(e){e[e.RightClick=2]="RightClick"}(Hf||(Hf={}));(class extends $f{constructor(e){super(e,Wf,Cd(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button!==Hf.RightClick&&(null==n||n({event:r}),!0)}}];const Yf={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var Zf,Xf;function Kf(e){let{acceleration:t,activator:r=Zf.Pointer,canScroll:o,draggingRect:a,enabled:u,interval:c=5,order:h=Xf.TreeOrder,pointerCoordinates:d,scrollableAncestors:f,scrollableAncestorRects:p,delta:m,threshold:g}=e;const _=function(e){let{delta:t,disabled:r}=e;const n=Id(t);return Dd(e=>{if(r||!n||!e)return Qf;const i={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[Ef.Backward]:e.x[Ef.Backward]||-1===i.x,[Ef.Forward]:e.x[Ef.Forward]||1===i.x},y:{[Ef.Backward]:e.y[Ef.Backward]||-1===i.y,[Ef.Forward]:e.y[Ef.Forward]||1===i.y}}},[r,t,n])}({delta:m,disabled:!u}),[y,v]=function(){const e=n(null);return[i((t,r)=>{e.current=setInterval(t,r)},[]),i(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),b=n({x:0,y:0}),x=n({x:0,y:0}),w=l(()=>{switch(r){case Zf.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Zf.DraggableRect:return a}},[r,a,d]),E=n(null),A=i(()=>{const e=E.current;if(!e)return;const t=b.current.x*x.current.x,r=b.current.y*x.current.y;e.scrollBy(t,r)},[]),S=l(()=>h===Xf.TreeOrder?[...f].reverse():f,[h,f]);s(()=>{if(u&&f.length&&w){for(const e of S){if(!1===(null==o?void 0:o(e)))continue;const r=f.indexOf(e),n=p[r];if(!n)continue;const{direction:i,speed:s}=kf(e,n,w,t,g);for(const e of["x","y"])_[e][i[e]]||(s[e]=0,i[e]=0);if(s.x>0||s.y>0)return v(),E.current=e,y(A,c),b.current=s,void(x.current=i)}b.current={x:0,y:0},x.current={x:0,y:0},v()}else v()},[t,A,o,v,u,c,JSON.stringify(w),JSON.stringify(_),y,f,S,p,JSON.stringify(g)])}(class extends $f{constructor(e){super(e,Yf)}static setup(){return window.addEventListener(Yf.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Yf.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:i}=r;return!(i.length>1)&&(null==n||n({event:r}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Zf||(Zf={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Xf||(Xf={}));const Qf={x:{[Ef.Backward]:!1,[Ef.Forward]:!1},y:{[Ef.Backward]:!1,[Ef.Forward]:!1}};var Jf,ep;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Jf||(Jf={})),function(e){e.Optimized="optimized"}(ep||(ep={}));const tp=new Map;function rp(e,t){return Dd(r=>e?r||("function"==typeof t?t(e):e):null,[t,e])}function np(e){let{callback:t,disabled:r}=e;const n=Pd(t),i=l(()=>{if(r||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(n)},[r]);return s(()=>()=>null==i?void 0:i.disconnect(),[i]),i}function ip(e){return new Nf(mf(e),e)}function sp(e,t,r){void 0===t&&(t=ip);const[n,i]=p(null);function o(){i(n=>{if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=n?n:r)?i:null;const s=t(e);return JSON.stringify(n)===JSON.stringify(s)?n:s})}const a=function(e){let{callback:t,disabled:r}=e;const n=Pd(t),i=l(()=>{if(r||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(n)},[n,r]);return s(()=>()=>null==i?void 0:i.disconnect(),[i]),i}({callback(t){if(e)for(const r of t){const{type:t,target:n}=r;if("childList"===t&&n instanceof HTMLElement&&n.contains(e)){o();break}}}}),u=np({callback:o});return Nd(()=>{o(),e?(null==u||u.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==u||u.disconnect(),null==a||a.disconnect())},[e]),n}const op=[];function ap(e,t){void 0===t&&(t=[]);const r=n(null);return s(()=>{r.current=null},t),s(()=>{const t=e!==rf;t&&!r.current&&(r.current=e),!t&&r.current&&(r.current=null)},[e]),r.current?Vd(e,r.current):rf}function lp(e){return l(()=>e?function(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}(e):null,[e])}const up=[];function cp(e){let{measure:t}=e;const[r,n]=p(null),s=i(e=>{for(const{target:r}of e)if(Od(r)){n(e=>{const n=t(r);return e?{...e,width:n.width,height:n.height}:n});break}},[t]),o=np({callback:s}),a=i(e=>{const r=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Od(t)?t:e}(e);null==o||o.disconnect(),r&&(null==o||o.observe(r)),n(r?t(r):null)},[t,o]),[u,c]=zd(a);return l(()=>({nodeRef:u,rect:r,setRef:c}),[r,u,c])}const hp=[{sensor:qf,options:{}},{sensor:Uf,options:{}}],dp={current:{}},fp={draggable:{measure:gf},droppable:{measure:gf,strategy:Jf.WhileDragging,frequency:ep.Optimized},dragOverlay:{measure:mf}};class pp 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,r;return null!=(t=null==(r=this.get(e))?void 0:r.node.current)?t:void 0}}const mp={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new pp,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:tf},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:fp,measureDroppableContainers:tf,windowRect:null,measuringScheduled:!1},gp=m({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:tf,draggableNodes:new Map,over:null,measureDroppableContainers:tf}),_p=m(mp);function yp(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new pp}}}function vp(e,t){switch(t.type){case ef.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ef.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 ef.DragEnd:case ef.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ef.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new pp(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case ef.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,s=e.droppable.containers.get(r);if(!s||n!==s.key)return e;const o=new pp(e.droppable.containers);return o.set(r,{...s,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case ef.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const s=new pp(e.droppable.containers);return s.delete(r),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function bp(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=c(gp),o=Id(n),a=Id(null==r?void 0:r.id);return s(()=>{if(!t&&!n&&o&&null!=a){if(!Bd(o))return;if(document.activeElement===o.target)return;const e=i.get(a);if(!e)return;const{activatorNode:t,node:r}=e;if(!t.current&&!r.current)return;requestAnimationFrame(()=>{for(const e of[t.current,r.current]){if(!e)continue;const t=Wd(e);if(t){t.focus();break}}})}},[n,t,i,a,o]),null}const xp=m({...rf,scaleX:1,scaleY:1});var wp;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(wp||(wp={}));const Ep=h(function(e){var r,o,a,u;let{id:c,accessibility:h,autoScroll:d=!0,children:f,sensors:m=hp,collisionDetection:_=cf,measuring:y,modifiers:v,...x}=e;const w=g(vp,void 0,yp),[E,A]=w,[S,T]=function(){const[e]=p(()=>new Set),t=i(t=>(e.add(t),()=>e.delete(t)),[e]);return[i(t=>{let{type:r,event:n}=t;e.forEach(e=>{var t;return null==(t=e[r])?void 0:t.call(e,n)})},[e]),t]}(),[k,O]=p(wp.Uninitialized),R=k===wp.Initialized,{draggable:{active:C,nodes:N,translate:P},droppable:{containers:M}}=E,D=null!=C?N.get(C):null,z=n({initial:null,translated:null}),I=l(()=>{var e;return null!=C?{id:C,data:null!=(e=null==D?void 0:D.data)?e:dp,rect:z}:null},[C,D]),F=n(null),[L,j]=p(null),[U,V]=p(null),B=Md(x,Object.values(x)),$=Ld("DndDescribedBy",c),G=l(()=>M.getEnabled(),[M]),q=l(()=>({draggable:{...fp.draggable,...null==W?void 0:W.draggable},droppable:{...fp.droppable,...null==W?void 0:W.droppable},dragOverlay:{...fp.dragOverlay,...null==W?void 0:W.dragOverlay}}),[null==(W=y)?void 0:W.draggable,null==W?void 0:W.droppable,null==W?void 0:W.dragOverlay]);var W;const{droppableRects:H,measureDroppableContainers:Y,measuringScheduled:Z}=function(e,t){let{dragging:r,dependencies:o,config:a}=t;const[l,u]=p(null),{frequency:c,measure:h,strategy:d}=a,f=n(e),m=function(){switch(d){case Jf.Always:return!1;case Jf.BeforeDragging:return r;default:return!r}}(),g=Md(m),_=i(function(e){void 0===e&&(e=[]),g.current||u(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[g]),y=n(null),v=Dd(t=>{if(m&&!r)return tp;if(!t||t===tp||f.current!==e||null!=l){const t=new Map;for(let r of e){if(!r)continue;if(l&&l.length>0&&!l.includes(r.id)&&r.rect.current){t.set(r.id,r.rect.current);continue}const e=r.node.current,n=e?new Nf(h(e),e):null;r.rect.current=n,n&&t.set(r.id,n)}return t}return t},[e,l,r,m,h]);return s(()=>{f.current=e},[e]),s(()=>{m||_()},[r,m]),s(()=>{l&&l.length>0&&u(null)},[JSON.stringify(l)]),s(()=>{m||"number"!=typeof c||null!==y.current||(y.current=setTimeout(()=>{_(),y.current=null},c))},[c,m,_,...o]),{droppableRects:v,measureDroppableContainers:_,measuringScheduled:null!=l}}(G,{dragging:R,dependencies:[P.x,P.y],config:q.droppable}),X=function(e,t){const r=null!=t?e.get(t):void 0,n=r?r.node.current:null;return Dd(e=>{var r;return null==t?null:null!=(r=null!=n?n:e)?r:null},[n,t])}(N,C),K=l(()=>U?$d(U):null,[U]),Q=function(){const e=!1===(null==L?void 0:L.autoScrollEnabled),t="object"==typeof d?!1===d.enabled:!1===d,r=R&&!e&&!t;if("object"==typeof d)return{...d,enabled:r};return{enabled:r}}(),J=function(e,t){return rp(e,t)}(X,q.draggable.measure);!function(e){let{activeNode:t,measure:r,initialRect:i,config:s=!0}=e;const o=n(!1),{x:a,y:l}="boolean"==typeof s?{x:s,y:s}:s;Nd(()=>{if(!a&&!l||!t)return void(o.current=!1);if(o.current||!i)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const n=hf(r(e),i);if(a||(n.x=0),l||(n.y=0),o.current=!0,Math.abs(n.x)>0||Math.abs(n.y)>0){const t=yf(e);t&&t.scrollBy({top:n.y,left:n.x})}},[t,a,l,i,r])}({activeNode:null!=C?N.get(C):null,config:Q.layoutShiftCompensation,initialRect:J,measure:q.draggable.measure});const ee=sp(X,q.draggable.measure,J),te=sp(X?X.parentElement:null),re=n({activatorEvent:null,active:null,activeNode:X,collisionRect:null,collisions:null,droppableRects:H,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=M.getNodeFor(null==(r=re.current.over)?void 0:r.id),ie=cp({measure:q.dragOverlay.measure}),se=null!=(o=ie.nodeRef.current)?o:X,oe=R?null!=(a=ie.rect)?a:ee:null,ae=Boolean(ie.nodeRef.current&&ie.rect),le=hf(ue=ae?null:ee,rp(ue));var ue;const ce=lp(se?Td(se):null),he=function(e){const t=n(e),r=Dd(r=>e?r&&r!==op&&e&&t.current&&e.parentNode===t.current.parentNode?r:_f(e):op,[e]);return s(()=>{t.current=e},[e]),r}(R?null!=ne?ne:X:null),de=function(e,t){void 0===t&&(t=mf);const[r]=e,n=lp(r?Td(r):null),[i,s]=p(up);function o(){s(()=>e.length?e.map(e=>Af(e)?n:new Nf(t(e),e)):up)}const a=np({callback:o});return Nd(()=>{null==a||a.disconnect(),o(),e.forEach(e=>null==a?void 0:a.observe(e))},[e]),i}(he),fe=function(e,t){let{transform:r,...n}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...n}),r):r}(v,{transform:{x:P.x-le.x,y:P.y-le.y,scaleX:1,scaleY:1},activatorEvent:U,active:I,activeNodeRect:ee,containerNodeRect:te,draggingNodeRect:oe,over:re.current.over,overlayNodeRect:ie.rect,scrollableAncestors:he,scrollableAncestorRects:de,windowRect:ce}),pe=K?Ud(K,P):null,me=function(e){const[t,r]=p(null),o=n(e),a=i(e=>{const t=vf(e.target);t&&r(e=>e?(e.set(t,wf(t)),new Map(e)):null)},[]);return s(()=>{const t=o.current;if(e!==t){n(t);const i=e.map(e=>{const t=vf(e);return t?(t.addEventListener("scroll",a,{passive:!0}),[t,wf(t)]):null}).filter(e=>null!=e);r(i.length?new Map(i):null),o.current=e}return()=>{n(e),n(t)};function n(e){e.forEach(e=>{const t=vf(e);null==t||t.removeEventListener("scroll",a)})}},[a,e]),l(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>Ud(e,t),rf):Rf(e):rf,[e,t])}(he),ge=ap(me),_e=ap(me,[ee]),ye=Ud(fe,ge),ve=oe?ff(oe,fe):null,be=I&&ve?_({active:I,collisionRect:ve,droppableRects:H,droppableContainers:G,pointerCoordinates:pe}):null,xe=function(e,t){if(!e||0===e.length)return null;const[r]=e;return r[t]}(be,"id"),[we,Ee]=p(null),Ae=function(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}(ae?fe:Ud(fe,_e),null!=(u=null==we?void 0:we.rect)?u:null,ee),Se=n(null),Te=i((e,t)=>{let{sensor:r,options:n}=t;if(null==F.current)return;const i=N.get(F.current);if(!i)return;const s=e.nativeEvent,o=new r({active:F.current,activeNode:i,event:s,options:n,context:re,onAbort(e){if(!N.get(e))return;const{onDragAbort:t}=B.current,r={id:e};null==t||t(r),S({type:"onDragAbort",event:r})},onPending(e,t,r,n){if(!N.get(e))return;const{onDragPending:i}=B.current,s={id:e,constraint:t,initialCoordinates:r,offset:n};null==i||i(s),S({type:"onDragPending",event:s})},onStart(e){const t=F.current;if(null==t)return;const r=N.get(t);if(!r)return;const{onDragStart:n}=B.current,i={activatorEvent:s,active:{id:t,data:r.data,rect:z}};b(()=>{null==n||n(i),O(wp.Initializing),A({type:ef.DragStart,initialCoordinates:e,active:t}),S({type:"onDragStart",event:i}),j(Se.current),V(s)})},onMove(e){A({type:ef.DragMove,coordinates:e})},onEnd:a(ef.DragEnd),onCancel:a(ef.DragCancel)});function a(e){return async function(){const{active:t,collisions:r,over:n,scrollAdjustedTranslate:i}=re.current;let o=null;if(t&&i){const{cancelDrop:a}=B.current;if(o={activatorEvent:s,active:t,collisions:r,delta:i,over:n},e===ef.DragEnd&&"function"==typeof a){await Promise.resolve(a(o))&&(e=ef.DragCancel)}}F.current=null,b(()=>{A({type:e}),O(wp.Uninitialized),Ee(null),j(null),V(null),Se.current=null;const t=e===ef.DragEnd?"onDragEnd":"onDragCancel";if(o){const e=B.current[t];null==e||e(o),S({type:t,event:o})}})}}Se.current=o},[N]),ke=i((e,t)=>(r,n)=>{const i=r.nativeEvent,s=N.get(n);if(null!==F.current||!s||i.dndKit||i.defaultPrevented)return;const o={active:s};!0===e(r,t.options,o)&&(i.dndKit={capturedBy:t.sensor},F.current=n,Te(r,t))},[N,Te]),Oe=function(e,t){return l(()=>e.reduce((e,r)=>{const{sensor:n}=r;return[...e,...n.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,r)}))]},[]),[e,t])}(m,ke);!function(e){s(()=>{if(!Ed)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),Nd(()=>{ee&&k===wp.Initializing&&O(wp.Initialized)},[ee,k]),s(()=>{const{onDragMove:e}=B.current,{active:t,activatorEvent:r,collisions:n,over:i}=re.current;if(!t||!r)return;const s={active:t,activatorEvent:r,collisions:n,delta:{x:ye.x,y:ye.y},over:i};b(()=>{null==e||e(s),S({type:"onDragMove",event:s})})},[ye.x,ye.y]),s(()=>{const{active:e,activatorEvent:t,collisions:r,droppableContainers:n,scrollAdjustedTranslate:i}=re.current;if(!e||null==F.current||!t||!i)return;const{onDragOver:s}=B.current,o=n.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:r,delta:{x:i.x,y:i.y},over:a};b(()=>{Ee(a),null==s||s(l),S({type:"onDragOver",event:l})})},[xe]),Nd(()=>{re.current={activatorEvent:U,active:I,activeNode:X,collisionRect:ve,collisions:be,droppableRects:H,draggableNodes:N,draggingNode:se,draggingNodeRect:oe,droppableContainers:M,over:we,scrollableAncestors:he,scrollAdjustedTranslate:ye},z.current={initial:oe,translated:ve}},[I,X,be,ve,N,se,oe,H,M,we,he,ye]),Kf({...Q,delta:P,draggingRect:ve,pointerCoordinates:pe,scrollableAncestors:he,scrollableAncestorRects:de});const Re=l(()=>({active:I,activeNode:X,activeNodeRect:ee,activatorEvent:U,collisions:be,containerNodeRect:te,dragOverlay:ie,draggableNodes:N,droppableContainers:M,droppableRects:H,over:we,measureDroppableContainers:Y,scrollableAncestors:he,scrollableAncestorRects:de,measuringConfiguration:q,measuringScheduled:Z,windowRect:ce}),[I,X,ee,U,be,te,ie,N,M,H,we,Y,he,de,q,Z,ce]),Ce=l(()=>({activatorEvent:U,activators:Oe,active:I,activeNodeRect:ee,ariaDescribedById:{draggable:$},dispatch:A,draggableNodes:N,over:we,measureDroppableContainers:Y}),[U,Oe,I,ee,A,$,N,we,Y]);return t.createElement(Xd.Provider,{value:T},t.createElement(gp.Provider,{value:Ce},t.createElement(_p.Provider,{value:Re},t.createElement(xp.Provider,{value:Ae},f)),t.createElement(bp,{disabled:!1===(null==h?void 0:h.restoreFocus)})),t.createElement(Jd,{...h,hiddenTextDescribedById:$}))}),Ap=m(null),Sp="button";function Tp(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const s=Ld("Draggable"),{activators:o,activatorEvent:a,active:u,activeNodeRect:h,ariaDescribedById:d,draggableNodes:f,over:p}=c(gp),{role:m=Sp,roleDescription:g="draggable",tabIndex:_=0}=null!=i?i:{},y=(null==u?void 0:u.id)===t,v=c(y?xp:Ap),[b,x]=zd(),[w,E]=zd(),A=function(e,t){return l(()=>e.reduce((e,r)=>{let{eventName:n,handler:i}=r;return e[n]=e=>{i(e,t)},e},{}),[e,t])}(o,t),S=Md(r);Nd(()=>(f.set(t,{id:t,key:s,node:b,activatorNode:w,data:S}),()=>{const e=f.get(t);e&&e.key===s&&f.delete(t)}),[f,t]);return{active:u,activatorEvent:a,activeNodeRect:h,attributes:l(()=>({role:m,tabIndex:_,"aria-disabled":n,"aria-pressed":!(!y||m!==Sp)||void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[n,m,_,y,g,d.draggable]),isDragging:y,listeners:n?void 0:A,node:b,over:p,setNodeRef:x,setActivatorNodeRef:E,transform:v}}const kp={timeout:25};function Op(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function Rp(e,t){return e.reduce((e,r,n)=>{const i=t.get(r);return i&&(e[n]=i),e},Array(e.length))}function Cp(e){return null!==e&&e>=0}const Np=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e;const s=Op(t,n,r),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},Pp={scaleX:1,scaleY:1},Mp=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:i,rects:s,overIndex:o}=e;const a=null!=(t=s[r])?t:n;if(!a)return null;if(i===r){const e=s[o];return e?{x:0,y:r<o?e.top+e.height-(a.top+a.height):e.top-a.top,...Pp}:null}const l=function(e,t,r){const n=e[t],i=e[t-1],s=e[t+1];if(!n)return 0;if(r<t)return i?n.top-(i.top+i.height):s?s.top-(n.top+n.height):0;return s?s.top-(n.top+n.height):i?n.top-(i.top+i.height):0}(s,i,r);return i>r&&i<=o?{x:0,y:-a.height-l,...Pp}:i<r&&i>=o?{x:0,y:a.height+l,...Pp}:{x:0,y:0,...Pp}};const Dp="Sortable",zp=t.createContext({activeIndex:-1,containerId:Dp,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Np,disabled:{draggable:!1,droppable:!1}});function Ip(e){let{children:r,id:i,items:o,strategy:a=Np,disabled:u=!1}=e;const{active:h,dragOverlay:d,droppableRects:f,over:p,measureDroppableContainers:m}=c(_p),g=Ld(Dp,i),_=Boolean(null!==d.rect),y=l(()=>o.map(e=>"object"==typeof e&&"id"in e?e.id:e),[o]),v=null!=h,b=h?y.indexOf(h.id):-1,x=p?y.indexOf(p.id):-1,w=n(y),E=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(y,w.current),A=-1!==x&&-1===b||E,S=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);Nd(()=>{E&&v&&m(y)},[E,y,v,m]),s(()=>{w.current=y},[y]);const T=l(()=>({activeIndex:b,containerId:g,disabled:S,disableTransforms:A,items:y,overIndex:x,useDragOverlay:_,sortedRects:Rp(y,f),strategy:a}),[b,g,S.draggable,S.droppable,A,y,x,f,_,a]);return t.createElement(zp.Provider,{value:T},r)}const Fp=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return Op(r,n,i).indexOf(t)},Lp=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:i,items:s,newIndex:o,previousItems:a,previousContainerId:l,transition:u}=e;return!(!u||!n)&&((a===s||i!==o)&&(!!r||o!==i&&t===l))},jp={duration:200,easing:"ease"},Up="transform",Vp=Gd.Transition.toString({property:Up,duration:0,easing:"linear"}),Bp={roleDescription:"sortable"};function $p(e){let{animateLayoutChanges:t=Lp,attributes:r,disabled:o,data:a,getNewIndex:u=Fp,id:h,strategy:d,resizeObserverConfig:f,transition:m=jp}=e;const{items:g,containerId:_,activeIndex:y,disabled:v,disableTransforms:b,sortedRects:x,overIndex:w,useDragOverlay:E,strategy:A}=c(zp),S=function(e,t){var r,n;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(r=null==e?void 0:e.draggable)?r:t.draggable,droppable:null!=(n=null==e?void 0:e.droppable)?n:t.droppable}}(o,v),T=g.indexOf(h),k=l(()=>({sortable:{containerId:_,index:T,items:g},...a}),[_,a,T,g]),O=l(()=>g.slice(g.indexOf(h)),[g,h]),{rect:R,node:C,isOver:N,setNodeRef:P}=function(e){let{data:t,disabled:r=!1,id:o,resizeObserverConfig:a}=e;const l=Ld("Droppable"),{active:u,dispatch:h,over:d,measureDroppableContainers:f}=c(gp),p=n({disabled:r}),m=n(!1),g=n(null),_=n(null),{disabled:y,updateMeasurementsFor:v,timeout:b}={...kp,...a},x=Md(null!=v?v:o),w=np({callback:i(()=>{m.current?(null!=_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{f(Array.isArray(x.current)?x.current:[x.current]),_.current=null},b)):m.current=!0},[b]),disabled:y||!u}),E=i((e,t)=>{w&&(t&&(w.unobserve(t),m.current=!1),e&&w.observe(e))},[w]),[A,S]=zd(E),T=Md(t);return s(()=>{w&&A.current&&(w.disconnect(),m.current=!1,w.observe(A.current))},[A,w]),s(()=>(h({type:ef.RegisterDroppable,element:{id:o,key:l,disabled:r,node:A,rect:g,data:T}}),()=>h({type:ef.UnregisterDroppable,key:l,id:o})),[o]),s(()=>{r!==p.current.disabled&&(h({type:ef.SetDroppableDisabled,id:o,key:l,disabled:r}),p.current.disabled=r)},[o,l,r,h]),{active:u,rect:g,isOver:(null==d?void 0:d.id)===o,node:A,over:d,setNodeRef:S}}({id:h,data:k,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...f}}),{active:M,activatorEvent:D,activeNodeRect:z,attributes:I,setNodeRef:F,listeners:L,isDragging:j,over:U,setActivatorNodeRef:V,transform:B}=Tp({id:h,data:k,attributes:{...Bp,...r},disabled:S.draggable}),$=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return l(()=>e=>{t.forEach(t=>t(e))},t)}(P,F),G=Boolean(M),q=G&&!b&&Cp(y)&&Cp(w),W=!E&&j,H=W&&q?B:null,Y=q?null!=H?H:(null!=d?d:A)({rects:x,activeNodeRect:z,activeIndex:y,overIndex:w,index:T}):null,Z=Cp(y)&&Cp(w)?u({id:h,items:g,activeIndex:y,overIndex:w}):T,X=null==M?void 0:M.id,K=n({activeId:X,items:g,newIndex:Z,containerId:_}),Q=g!==K.current.items,J=t({active:M,containerId:_,isDragging:j,isSorting:G,id:h,index:T,items:g,newIndex:K.current.newIndex,previousItems:K.current.items,previousContainerId:K.current.containerId,transition:m,wasDragging:null!=K.current.activeId}),ee=function(e){let{disabled:t,index:r,node:i,rect:o}=e;const[a,l]=p(null),u=n(r);return Nd(()=>{if(!t&&r!==u.current&&i.current){const e=o.current;if(e){const t=mf(i.current,{ignoreTransform:!0}),r={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(r.x||r.y)&&l(r)}}r!==u.current&&(u.current=r)},[t,r,i,o]),s(()=>{a&&l(null)},[a]),a}({disabled:!J,index:T,node:C,rect:R});return s(()=>{G&&K.current.newIndex!==Z&&(K.current.newIndex=Z),_!==K.current.containerId&&(K.current.containerId=_),g!==K.current.items&&(K.current.items=g)},[G,Z,_,g]),s(()=>{if(X===K.current.activeId)return;if(null!=X&&null==K.current.activeId)return void(K.current.activeId=X);const e=setTimeout(()=>{K.current.activeId=X},50);return()=>clearTimeout(e)},[X]),{active:M,activeIndex:y,attributes:I,data:k,rect:R,index:T,newIndex:Z,items:g,isOver:N,isSorting:G,isDragging:j,listeners:L,node:C,overIndex:w,over:U,setNodeRef:$,setActivatorNodeRef:V,setDroppableNodeRef:P,setDraggableNodeRef:F,transform:null!=ee?ee:Y,transition:function(){if(ee||Q&&K.current.newIndex===T)return Vp;if(W&&!Bd(D)||!m)return;if(G||J)return Gd.Transition.toString({...m,property:Up});return}()}}zf.Down,zf.Right,zf.Up,zf.Left;const Gp=({id:e,sx:t,children:r})=>{const{isDragging:n}=Tp({id:e}),{attributes:i,listeners:s,setNodeRef:o,transform:a,transition:l}=$p({id:e,strategy:Mp,transition:{duration:300,easing:"cubic-bezier(0.25, 1, 0.5, 1)"}}),u={...t?.default,...n?t?.dragging:{},transform:Gd.Translate.toString(a),transition:l,cursor:"pointer"};return x(O,{ref:o,style:u,...s,...i,children:r})};function qp({items:e,getItem:t,getId:r,onDragEnd:n,sx:i,title:s,draggableSx:o}){const a=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return l(()=>[...t].filter(e=>null!=e),[...t])}(l(()=>({sensor:u,options:null!=c?c:{}}),[u=qf,c={activationConstraint:{distance:8}}]));var u,c;return x(Ep,{sensors:a,collisionDetection:lf,onDragEnd:t=>{const{active:i,over:s}=t,o=e.findIndex(e=>r(e)===i.id),a=e.findIndex(e=>r(e)===s?.id),l=Op(e,o,a);n(l)},children:x(Ip,{items:e.map(r),strategy:Mp,children:x(wd,{items:e,sx:i,title:s,getKey:r,getContent:(e,n)=>{const i=r(e);return x(Gp,{id:i,sx:o,children:t(e,n)},i)}})})})}var Wp,Hp={exports:{}},Yp={},Zp={exports:{}},Xp={exports:{}},Kp={};var Qp,Jp,em,tm,rm,nm,im,sm,om,am,lm,um,cm,hm,dm,fm={};
10
+ */var pl,ml,gl=(dl||(dl=1,"production"===process.env.NODE_ENV?ul.exports=function(){if(ol)return cl;ol=1;var e=t,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),l=n({inst:{value:r,getSnapshot:t}}),u=l[0].inst,c=l[1];return s(function(){u.value=r,u.getSnapshot=t,a(u)&&c({inst:u})},[e,r,t]),i(function(){return a(u)&&c({inst:u}),e(function(){a(u)&&c({inst:u})})},[e]),o(r),r};return cl.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:l,cl}():ul.exports=(hl||(hl=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,o=r.useLayoutEffect,a=r.useDebugValue,l=!1,u=!1,c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(t,c){l||void 0===r.startTransition||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=c();if(!u){var d=c();n(h,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),u=!0)}var f=(d=i({inst:{value:h,getSnapshot:c}}))[0].inst,p=d[1];return o(function(){f.value=h,f.getSnapshot=c,e(f)&&p({inst:f})},[t,h,c]),s(function(){return e(f)&&p({inst:f}),t(function(){e(f)&&p({inst:f})})},[t]),a(h),h};fl.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),fl)),ul.exports);function _l(e){e.reaction=new ji("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),null===(t=e.onStoreChange)||void 0===t||t.call(e)})}var yl=!0,vl="function"==typeof Symbol&&Symbol.for,bl=null!==(ml=null===(pl=Object.getOwnPropertyDescriptor(function(){},"name"))||void 0===pl?void 0:pl.configurable)&&void 0!==ml&&ml,xl=vl?Symbol.for("react.forward_ref"):"function"==typeof r&&r(function(e){return null}).$$typeof,wl=vl?Symbol.for("react.memo"):"function"==typeof h&&h(function(e){return null}).$$typeof;function El(e,n){if(process.env.NODE_ENV,wl&&e.$$typeof===wl)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var i=!1,s=e,o=e.displayName||e.name;if(xl&&e.$$typeof===xl&&(i=!0,"function"!=typeof(s=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a,l,u=function(e,r){return function(e,r){void 0===r&&(r="observed");var n=t.useRef(null);if(!n.current){var i={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:r,subscribe:function(e){return ll.unregister(i),i.onStoreChange=e,i.reaction||(_l(i),i.stateVersion=Symbol()),function(){var e;i.onStoreChange=null,null===(e=i.reaction)||void 0===e||e.dispose(),i.reaction=null}},getSnapshot:function(){return i.stateVersion}};n.current=i}var s,o,a=n.current;if(a.reaction||(_l(a),ll.register(n,a,a)),t.useDebugValue(a.reaction,sl),gl.useSyncExternalStore(a.subscribe,a.getSnapshot,a.getSnapshot),a.reaction.track(function(){try{s=e()}catch(e){o=e}}),o)throw o;return s}(function(){return s(e,r)},o)};return u.displayName=e.displayName,bl&&Object.defineProperty(u,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(u.contextTypes=e.contextTypes,"production"!==process.env.NODE_ENV&&yl&&(yl=!1,console.warn("[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release."))),i&&(u=r(u)),u=h(u),a=e,l=u,Object.keys(a).forEach(function(e){Al[e]||Object.defineProperty(l,e,Object.getOwnPropertyDescriptor(a,e))}),"production"!==process.env.NODE_ENV&&Object.defineProperty(u,"contextTypes",{set:function(){var e,t;throw new Error("[mobx-react-lite] `".concat(this.displayName||(null===(e=this.type)||void 0===e?void 0:e.displayName)||(null===(t=this.type)||void 0===t?void 0:t.name)||"Component",".contextTypes` must be set before applying `observer`."))}}),u}var Al={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};process.env.NODE_ENV,function(e){e||(e=il,"production"!==process.env.NODE_ENV&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),ds({reactionScheduler:e})}(b),ll.finalizeAllImmediately;var Sl=El(({onUnauthorized:t,children:r})=>(e.useEffect(()=>{Uo.isUnauthorized&&t()},[Uo.isUnauthorized]),x(e.Fragment,{children:r})));function Tl(e,t){if(void 0!==e.one&&1===t)return e.one;const r=t%10,n=t%100;return 1===r&&11!==n?e.singularNominative.replace("{{count}}",String(t)):r>=2&&r<=4&&(n<10||n>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function kl(e){return(t,r)=>r?.addSuffix?r.comparison&&r.comparison>0?e.future?Tl(e.future,t):"через "+Tl(e.regular,t):e.past?Tl(e.past,t):Tl(e.regular,t)+" назад":Tl(e.regular,t)}const Ol={lessThanXSeconds:kl({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:kl({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду назад",singularGenitive:"{{count}} секунды назад",pluralGenitive:"{{count}} секунд назад"},future:{singularNominative:"через {{count}} секунду",singularGenitive:"через {{count}} секунды",pluralGenitive:"через {{count}} секунд"}}),halfAMinute:(e,t)=>t?.addSuffix?t.comparison&&t.comparison>0?"через полминуты":"полминуты назад":"полминуты",lessThanXMinutes:kl({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:kl({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:kl({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:kl({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:kl({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:kl({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:kl({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:kl({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:kl({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:kl({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:kl({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:kl({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:kl({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})};function Rl(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const Cl={date:Rl({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:Rl({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Rl({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},Nl=Symbol.for("constructDateFrom");function Pl(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Nl in e?e[Nl](t):e instanceof Date?new e.constructor(t):new Date(t)}let Ml={};function Dl(e,t){const r=Ml,n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=(s=e,o=t?.in,Pl(o||s,s));var s,o;const a=i.getDay(),l=(a<n?7:0)+a-n;return i.setDate(i.getDate()-l),i.setHours(0,0,0,0),i}function zl(e,t,r){const[n,i]=function(e,...t){const r=Pl.bind(null,e||t.find(e=>"object"==typeof e));return t.map(r)}(r?.in,e,t);return+Dl(n,r)===+Dl(i,r)}const Il=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function Fl(e){const t=Il[e];return 2===e?"'во "+t+" в' p":"'в "+t+" в' p"}const Ll={lastWeek:(e,t,r)=>{const n=e.getDay();return zl(e,t,r)?Fl(n):function(e){const t=Il[e];switch(e){case 0:return"'в прошлое "+t+" в' p";case 1:case 2:case 4:return"'в прошлый "+t+" в' p";case 3:case 5:case 6:return"'в прошлую "+t+" в' p"}}(n)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:(e,t,r)=>{const n=e.getDay();return zl(e,t,r)?Fl(n):function(e){const t=Il[e];switch(e){case 0:return"'в следующее "+t+" в' p";case 1:case 2:case 4:return"'в следующий "+t+" в' p";case 3:case 5:case 6:return"'в следующую "+t+" в' p"}}(n)},other:"P"};function jl(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=r?.width?String(r.width):t;n=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=r?.width?String(r.width):e.defaultWidth;n=e.values[i]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}const Ul={ordinalNumber:(e,t)=>{const r=Number(e),n=t?.unit;let i;return i="date"===n?"-е":"week"===n||"minute"===n||"second"===n?"-я":"-й",r+i},era:jl({values:{narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},defaultWidth:"wide"}),quarter:jl({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:jl({values:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},defaultWidth:"wide",formattingValues:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},defaultFormattingWidth:"wide"}),day:jl({values:{narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},defaultWidth:"wide"}),dayPeriod:jl({values:{narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утро",afternoon:"день",evening:"вечер",night:"ночь"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утра",afternoon:"дня",evening:"вечера",night:"ночи"}},defaultFormattingWidth:"wide"})};function Vl(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],a=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(a,e=>e.test(o)):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(a,e=>e.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;return{value:u,rest:t.slice(o.length)}}}const Bl={ordinalNumber:($l={matchPattern:/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const r=e.match($l.matchPattern);if(!r)return null;const n=r[0],i=e.match($l.parsePattern);if(!i)return null;let s=$l.valueCallback?$l.valueCallback(i[0]):i[0];return s=t.valueCallback?t.valueCallback(s):s,{value:s,rest:e.slice(n.length)}}),era:Vl({matchPatterns:{narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:Vl({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Vl({matchPatterns:{narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},defaultParseWidth:"any"}),day:Vl({matchPatterns:{narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:Vl({matchPatterns:{narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})};var $l;const Gl={code:"ru",formatDistance:(e,t,r)=>Ol[e](t,r),formatLong:Cl,formatRelative:(e,t,r,n)=>{const i=Ll[e];return"function"==typeof i?i(t,r,n):i},localize:Ul,match:Bl,options:{weekStartsOn:1,firstWeekContainsDate:1}},ql=e=>x(A,{...e,dateAdapter:S,adapterLocale:Gl}),Wl=({color:e="inherit"})=>x(T,{color:e}),Hl=({children:t,configOptions:r})=>{const[n,i]=e.useState(null),[s,o]=e.useState("");return e.useEffect(()=>(Zo.initialize({...r,onCheck:e=>{const{valid:t,reason:n}=e;o(n),i(t),r.onCheck?.(e)}}),()=>{Zo.deactivate()}),[r]),null===n?x(Wl,{color:"primary"}):n?x(e.Fragment,{children:t}):x(k,{color:"error",children:s})},Yl=new class{#H;#j;#d;#Y;#Z;#X;#K;#Q;constructor(e={}){this.#H=e.queryCache||new Ya,this.#j=e.mutationCache||new qa,this.#d=e.defaultOptions||{},this.#Y=new Map,this.#Z=new Map,this.#X=0}mount(){this.#X++,1===this.#X&&(this.#K=wa.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#H.onFocus())}),this.#Q=Ta.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#H.onOnline())}))}unmount(){this.#X--,0===this.#X&&(this.#K?.(),this.#K=void 0,this.#Q?.(),this.#Q=void 0)}isFetching(e){return this.#H.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#j.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#H.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#H.build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(na(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#H.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=this.#H.get(n.queryHash),s=i?.state.data,o=function(e,t){return"function"==typeof e?e(t):e}(t,s);if(void 0!==o)return this.#H.build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Sa.batch(()=>this.#H.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#H.get(t.queryHash)?.state}removeQueries(e){const t=this.#H;Sa.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const r=this.#H;return Sa.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Sa.batch(()=>this.#H.findAll(e).map(e=>e.cancel(r)));return Promise.all(n).then(ea).catch(ea)}invalidateQueries(e,t={}){return Sa.batch(()=>(this.#H.findAll(e).forEach(e=>{e.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Sa.batch(()=>this.#H.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(ea)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(n).then(ea)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const r=this.#H.build(this,t);return r.isStaleByTime(na(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ea).catch(ea)}fetchInfiniteQuery(e){return e.behavior=Va(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ea).catch(ea)}ensureInfiniteQueryData(e){return e.behavior=Va(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ta.isOnline()?this.#j.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#H}getMutationCache(){return this.#j}getDefaultOptions(){return this.#d}setDefaultOptions(e){this.#d=e}setQueryDefaults(e,t){this.#Y.set(la(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#Y.values()],r={};return t.forEach(t=>{ua(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#Z.set(la(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#Z.values()],r={};return t.forEach(t=>{ua(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#d.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=aa(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===va&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#d.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#H.clear(),this.#j.clear()}},Zl=e=>x(Ka,{...e,client:Yl}),Xl=({children:e,themeOptions:t})=>{const r=X(t);return x(K,{theme:r,children:e})},Kl=({children:e,configOptions:t,themeOptions:r})=>x(ir,{children:x(Zl,{children:x(Wo,{children:x(Xl,{themeOptions:r,children:x(ql,{children:x(Hl,{configOptions:t,children:e})})})})})}),Ql=()=>{const{enqueueSnackbar:e}=c(Ue);return({variant:t,message:r})=>{e({variant:t,message:r,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})}},Jl=()=>{const e=Ql();return t=>{const{response:r}=t;if(r){const{data:t}=r;if(t){const{detail:r}=t;r&&r.forEach(t=>{e({variant:"error",message:t})})}}}},eu=()=>rl({mutationKey:["logout-mutation"],mutationFn:async e=>await Zo.instance.apiService.post({url:"logout"}),onError:Jl(),onSuccess:()=>{Yl.invalidateQueries({queryKey:["user"]})}}),tu=()=>rl({mutationKey:["sign-in-mutation"],mutationFn:async({body:{username:e,password:t}})=>{const r=or({username:e,password:sr(t)});return await Zo.instance.apiService.post({url:"token",body:r,config:{headers:{"Content-Type":"application/x-www-form-urlencoded"}}})}});var ru,nu,iu,su;!function(e){e.GET="GET",e.DELETE="DELETE",e.PUT="PUT",e.POST="POST"}(ru||(ru={})),function(e){e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e.TOP_LEFT="top-left"}(nu||(nu={}));var ou,au,lu=function(){if(su)return iu;function e(e){this._maxSize=e,this.clear()}su=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,r=/^\d+$/,n=/^\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(n)&&!e.match(r)}(e)||function(e){return i.test(e)}(e))}return iu={Cache:e,split:c,normalizePath:u,setter:function(e){var t=u(e);return a.get(e)||a.set(e,function(e,r){for(var n=0,i=t.length,s=e;n<i-1;){var o=t[n];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;s=s[t[n++]]}s[t[n]]=r})},getter:function(e,t){var r=u(e);return l.get(e)||l.set(e,function(e){for(var n=0,i=r.length;n<i;){if(null==e&&t)return;e=e[r[n++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(h(t)||r.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,r){!function(e,t,r){var n,i,s,o,a=e.length;for(i=0;i<a;i++)(n=e[i])&&(d(n)&&(n='"'+n+'"'),s=!(o=h(n))&&/^\d+$/.test(n),t.call(r,n,o,s,i,e))}(Array.isArray(e)?e:c(e),t,r)}},iu}();var uu,cu=function(){if(au)return ou;au=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)||[],r=e=>e[0].toUpperCase()+e.slice(1),n=(e,r)=>t(e).join(r).toLowerCase(),i=e=>t(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,"");return ou={words:t,upperFirst:r,camelCase:i,pascalCase:e=>r(i(e)),snakeCase:e=>n(e,"_"),kebabCase:e=>n(e,"-"),sentenceCase:e=>r(n(e," ")),titleCase:e=>t(e).map(r).join(" ")}}(),hu={exports:{}};var du=function(){if(uu)return hu.exports;function e(e,t){var r=e.length,n=new Array(r),i={},s=r,o=function(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var i=e[r];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,r=0,n=e.length;r<n;r++)t.set(e[r],r);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 n;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)}n[--r]=e}}}return uu=1,hu.exports=function(t){return e(function(e){for(var t=new Set,r=0,n=e.length;r<n;r++){var i=e[r];t.add(i[0]),t.add(i[1])}return Array.from(t)}(t),t)},hu.exports.array=e,hu.exports}(),fu=ye(du);const pu=Object.prototype.toString,mu=Error.prototype.toString,gu=RegExp.prototype.toString,_u="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",yu=/^Symbol\((.*)\)(.*)$/;function vu(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const r=typeof e;if("number"===r)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===r)return t?`"${e}"`:e;if("function"===r)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===r)return _u.call(e).replace(yu,"Symbol($1)");const n=pu.call(e).slice(8,-1);return"Date"===n?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===n||e instanceof Error?"["+mu.call(e)+"]":"RegExp"===n?gu.call(e):null}function bu(e,t){let r=vu(e,t);return null!==r?r:JSON.stringify(e,function(e,r){let n=vu(this[e],t);return null!==n?n:r},2)}function xu(e){return null==e?[]:[].concat(e)}let wu,Eu,Au,Su=/\$\{\s*(\w+)\s*\}/g;wu=Symbol.toStringTag;class Tu{constructor(e,t,r,n){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[wu]="Error",this.name="ValidationError",this.value=t,this.path=r,this.type=n,this.errors=[],this.inner=[],xu(e).forEach(e=>{if(ku.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]}}Eu=Symbol.hasInstance,Au=Symbol.toStringTag;class ku extends Error{static formatError(e,t){const r=t.label||t.path||"this";return t=Object.assign({},t,{path:r,originalPath:t.path}),"string"==typeof e?e.replace(Su,(e,r)=>bu(t[r])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,r,n,i){const s=new Tu(e,t,r,n);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[Au]="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,ku)}static[Eu](e){return Tu[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Ou={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:r,originalValue:n})=>{const i=null!=n&&n!==r?` (cast from the value \`${bu(n,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${bu(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${bu(r,!0)}\``+i}},Ru={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"},Cu={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"},Nu={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Pu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Mu={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"},Du={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${bu(r,!0)}\``;if(r.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${bu(r,!0)}\``}return ku.formatError(Ou.notType,e)}};Object.assign(Object.create(null),{mixed:Ou,string:Ru,number:Cu,date:Nu,object:Pu,array:Mu,boolean:{isValue:"${path} field must be ${value}"},tuple:Du});const zu=e=>e&&e.__isYupSchema__;class Iu{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:n,otherwise:i}=t,s="function"==typeof r?r:(...e)=>e.every(e=>e===r);return new Iu(e,(e,t)=>{var r;let o=s(...e)?n:i;return null!=(r=null==o?void 0:o(t))?r:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let r=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),n=this.fn(r,e,t);if(void 0===n||n===e)return e;if(!zu(n))throw new TypeError("conditions must return a schema object");return n.resolve(t)}}const Fu="$",Lu=".";class ju{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]===Fu,this.isValue=this.key[0]===Lu,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Fu:this.isValue?Lu:"";this.path=this.key.slice(r.length),this.getter=this.path&&lu.getter(this.path,!0),this.map=t.map}getValue(e,t,r){let n=this.isContext?r:this.isValue?e:t;return this.getter&&(n=this.getter(n||{})),this.map&&(n=this.map(n)),n}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}}ju.prototype.__isYupRef=!0;const Uu=e=>null==e;function Vu(e){function t({value:t,path:r="",options:n,originalValue:i,schema:s},o,a){const{name:l,test:u,params:c,message:h,skipAbsent:d}=e;let{parent:f,context:p,abortEarly:m=s.spec.abortEarly,disableStackTrace:g=s.spec.disableStackTrace}=n;const _={value:t,parent:f,context:p};function y(e={}){const n=Bu(Object.assign({value:t,originalValue:i,label:s.spec.label,path:e.path||r,spec:s.spec,disableStackTrace:e.disableStackTrace||g},c,e.params),_),o=new ku(ku.formatError(e.message||h,n),t,n.path,e.type||l,n.disableStackTrace);return o.params=n,o}const v=m?o:a;let b={path:r,parent:f,type:l,from:n.from,createError:y,resolve:e=>$u(e,_),options:n,originalValue:i,schema:s};const x=e=>{ku.isError(e)?v(e):e?a(null):v(y())},w=e=>{ku.isError(e)?v(e):o(e)};if(d&&Uu(t))return x(!0);let E;try{var A;if(E=u.call(b,t,b),"function"==typeof(null==(A=E)?void 0:A.then)){if(n.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(E).then(x,w)}}catch(e){return void w(e)}x(E)}return t.OPTIONS=e,t}function Bu(e,t){if(!e)return e;for(const r of Object.keys(e))e[r]=$u(e[r],t);return e}function $u(e,t){return ju.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function Gu(e,t,r,n=r){let i,s,o;return t?(lu.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a,h="tuple"===(e=e.resolve({context:n,parent:i,value:r})).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(r&&d>=r.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=r,r=r&&r[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=r,r=r&&r[c],e=e.fields[c]}s=c,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class qu extends Set{describe(){const e=[];for(const t of this.values())e.push(ju.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const r of this.values())t.push(e(r));return t}clone(){return new qu(this.values())}merge(e,t){const r=this.clone();return e.forEach(e=>r.add(e)),t.forEach(e=>r.delete(e)),r}}function Wu(e,t=new Map){if(zu(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Wu(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,i]of e.entries())r.set(n,Wu(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Wu(n,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=Wu(i,t)}return r}function Hu(e){if(null==e||!e.length)return;const t=[];let r="",n=!1,i=!1;for(let s=0;s<e.length;s++){const o=e[s];"["!==o||i?"]"!==o||i?'"'!==o?"."!==o||n||i?r+=o:r&&(t.push(r),r=""):i=!i:(r&&(/^\d+$/.test(r)?t.push(r):t.push(r.replace(/^"|"$/g,"")),r=""),n=!1):(r&&(t.push(...r.split(".").filter(Boolean)),r=""),n=!0)}return r&&t.push(...r.split(".").filter(Boolean)),t}function Yu(e,t){var r;if((null==(r=e.inner)||!r.length)&&e.errors.length)return function(e,t){const r=t?`${t}.${e.path}`:e.path;return e.errors.map(e=>({message:e,path:Hu(r)}))}(e,t);const n=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>Yu(e,n))}class Zu{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 qu,this._blacklist=new qu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ou.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=Wu(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 r=e(this);return this._mutate=t,r}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,r=e.clone();const n=Object.assign({},t.spec,r.spec);return r.spec=n,r.internalTests=Object.assign({},t.internalTests,r.internalTests),r._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),r._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),r.tests=t.tests,r.exclusiveTests=t.exclusiveTests,r.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),r.transforms=[...t.transforms,...r.transforms],r}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 r=t.conditions;t=t.clone(),t.conditions=[],t=r.reduce((t,r)=>r.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,r,n,i;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(r=e.abortEarly)?r:this.spec.abortEarly,recursive:null!=(n=e.recursive)?n:this.spec.recursive,disableStackTrace:null!=(i=e.disableStackTrace)?i:this.spec.disableStackTrace})}cast(e,t={}){let r=this.resolve(Object.assign({},t,{value:e})),n="ignore-optionality"===t.assert,i=r._cast(e,t);if(!1!==t.assert&&!r.isType(i)){if(n&&Uu(i))return i;let s=bu(e),o=bu(i);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". \n\nattempted value: ${s} \n`+(o!==s?`result of cast: ${o}`:""))}return i}_cast(e,t){let r=void 0===e?e:this.transforms.reduce((r,n)=>n.call(this,r,e,this,t),e);return void 0===r&&(r=this.getDefault(t)),r}_validate(e,t={},r,n){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},r,e=>{if(e.length)return n(e,a);this.runTests({path:i,value:a,originalValue:s,options:t,tests:this.tests},r,n)})}runTests(e,t,r){let n=!1,{tests:i,value:s,originalValue:o,path:a,options:l}=e,u=e=>{n||(n=!0,t(e,s))},c=e=>{n||(n=!0,r(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:r,parentPath:n,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=r[o];const u=Object.assign({},s,{strict:!0,parent:r,value:l,originalValue:i[o],key:void 0,[a?"index":"key"]:o,path:a||o.includes(".")?`${n||""}[${a?o:`"${o}"`}]`:(n?`${n}.`:"")+e});return(e,t,r)=>this.resolve(u)._validate(l,u,t,r)}validate(e,t){var r;let n=this.resolve(Object.assign({},t,{value:e})),i=null!=(r=null==t?void 0:t.disableStackTrace)?r:n.spec.disableStackTrace;return new Promise((r,s)=>n._validate(e,t,(e,t)=>{ku.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new ku(e,t,void 0,void 0,i)):r(t)}))}validateSync(e,t){var r;let n,i=this.resolve(Object.assign({},t,{value:e})),s=null!=(r=null==t?void 0:t.disableStackTrace)?r:i.spec.disableStackTrace;return i._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw ku.isError(e)&&(e.value=t),e},(t,r)=>{if(t.length)throw new ku(t,e,void 0,void 0,s);n=r}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(ku.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(ku.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):Wu(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 r=this.clone({nullable:e});return r.internalTests.nullable=Vu({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),r}optionality(e,t){const r=this.clone({optional:e});return r.internalTests.optionality=Vu({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),r}optional(){return this.optionality(!0)}defined(e=Ou.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Ou.notNull){return this.nullability(!1,e)}required(e=Ou.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=Ou.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let r=this.clone(),n=Vu(t),i=t.exclusive||t.name&&!0===r.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(r.exclusiveTests[t.name]=!!t.exclusive),r.tests=r.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(i)return!1;if(e.OPTIONS.test===n.OPTIONS.test)return!1}return!0}),r.tests.push(n),r}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let r=this.clone(),n=xu(e).map(e=>new ju(e));return n.forEach(e=>{e.isSibling&&r.deps.push(e.key)}),r.conditions.push("function"==typeof t?new Iu(n,t):Iu.fromOptions(n,t)),r}typeError(e){let t=this.clone();return t.internalTests.typeError=Vu({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=Ou.oneOf){let r=this.clone();return e.forEach(e=>{r._whitelist.add(e),r._blacklist.delete(e)}),r.internalTests.whiteList=Vu({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,r=t.resolveAll(this.resolve);return!!r.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:r}})}}),r}notOneOf(e,t=Ou.notOneOf){let r=this.clone();return e.forEach(e=>{r._blacklist.add(e),r._whitelist.delete(e)}),r.internalTests.blacklist=Vu({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,r=t.resolveAll(this.resolve);return!r.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:r}})}}),r}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:r,meta:n,optional:i,nullable:s}=t.spec,o={meta:n,label:r,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,r)=>r.findIndex(t=>t.OPTIONS.name===e.OPTIONS.name)===t).map(t=>{const r=t.OPTIONS.params&&e?Bu(Object.assign({},t.OPTIONS.params),e):t.OPTIONS.params;return{name:t.OPTIONS.name,params:r}})};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 ku)return{issues:Yu(e)};throw e}}};return t}}Zu.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Zu.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:s,schema:o}=Gu(this,t,r,n.context);return o[e](i&&i[s],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])Zu.prototype[e]=Zu.prototype.oneOf;for(const e of["not","nope"])Zu.prototype[e]=Zu.prototype.notOneOf;const Xu=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Ku(e){var t,r;const n=Xu.exec(e);return n?{year:Qu(n[1]),month:Qu(n[2],1)-1,day:Qu(n[3],1),hour:Qu(n[4]),minute:Qu(n[5]),second:Qu(n[6]),millisecond:n[7]?Qu(n[7].substring(0,3)):0,precision:null!=(t=null==(r=n[7])?void 0:r.length)?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:Qu(n[10]),minuteOffset:Qu(n[11])}:null}function Qu(e,t=0){return Number(e)||t}let Ju=/^[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])?)*$/,ec=/^((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,tc=/^(?:[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,rc=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),nc=e=>Uu(e)||e===e.trim(),ic={}.toString();function sc(){return new oc}class oc extends Zu{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 r=null!=e&&e.toString?e.toString():e;return r===ic?e:r})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||Ou.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=Ru.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=Ru.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=Ru.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 r,n,i=!1;return t&&("object"==typeof t?({excludeEmptyString:i=!1,message:r,name:n}=t):r=t),this.test({name:n||"matches",message:r||Ru.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&i||-1!==t.search(e)})}email(e=Ru.email){return this.matches(Ju,{name:"email",message:e,excludeEmptyString:!0})}url(e=Ru.url){return this.matches(ec,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Ru.uuid){return this.matches(tc,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,r,n="";return e&&("object"==typeof e?({message:n="",allowOffset:t=!1,precision:r}=e):n=e),this.matches(rc,{name:"datetime",message:n||Ru.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Ru.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const r=Ku(e);return!!r&&!!r.z}}).test({name:"datetime_precision",message:n||Ru.datetime_precision,params:{precision:r},skipAbsent:!0,test:e=>{if(!e||null==r)return!0;const t=Ku(e);return!!t&&t.precision===r}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=Ru.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:nc})}lowercase(e=Ru.lowercase){return this.transform(e=>Uu(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Uu(e)||e===e.toLowerCase()})}uppercase(e=Ru.uppercase){return this.transform(e=>Uu(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Uu(e)||e===e.toUpperCase()})}}sc.prototype=oc.prototype;function ac(){return new lc}class lc extends Zu{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 r=e;if("string"==typeof r){if(r=r.replace(/\s/g,""),""===r)return NaN;r=+r}return this.isType(r)||null===r?r:parseFloat(r)})})}min(e,t=Cu.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=Cu.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=Cu.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=Cu.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(e=Cu.positive){return this.moreThan(0,e)}negative(e=Cu.negative){return this.lessThan(0,e)}integer(e=Cu.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(e=>Uu(e)?e:0|e)}round(e){var t;let r=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===r.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(t=>Uu(t)?t:Math[e](t))}}ac.prototype=lc.prototype;let uc=new Date("");function cc(){return new hc}class hc extends Zu{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=Ku(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 r=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(r=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}(e),isNaN(e)?hc.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let r;if(ju.isRef(e))r=e;else{let n=this.cast(e);if(!this._typeCheck(n))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);r=n}return r}min(e,t=Nu.min){let r=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(r)}})}max(e,t=Nu.max){let r=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(r)}})}}function dc(e,t){let r=1/0;return e.some((e,n)=>{var i;if(null!=(i=t.path)&&i.includes(e))return r=n,!0}),r}function fc(e){return(t,r)=>dc(e,t)-dc(e,r)}hc.INVALID_DATE=uc,cc.prototype=hc.prototype,cc.INVALID_DATE=uc;const pc=(e,t,r)=>{if("string"!=typeof e)return e;let n=e;try{n=JSON.parse(e)}catch(e){}return r.isType(n)?n:e};function mc(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=mc(n);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=mc(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(mc)}):"optional"in e?e.optional():e}let gc=e=>"[object Object]"===Object.prototype.toString.call(e);function _c(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===r.indexOf(e))}const yc=fc([]);function vc(e){return new bc(e)}class bc extends Zu{constructor(e){super({type:"object",check:e=>gc(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=yc,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var r;let n=super._cast(e,t);if(void 0===n)return this.getDefault(t);if(!this._typeCheck(n))return n;let i=this.fields,s=null!=(r=t.stripUnknown)?r:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(n).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 r=i[e],o=e in n,c=n[e];if(r){let i;l.path=(t.path?`${t.path}.`:"")+e,r=r.resolve({value:c,context:t.context,parent:a});let s=r instanceof Zu?r.spec:void 0,o=null==s?void 0:s.strict;if(null!=s&&s.strip){u=u||e in n;continue}i=t.__validating&&o?c:r.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:n}_validate(e,t={},r,n){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,r,(e,i)=>{if(!o||!gc(i))return void n(e,i);s=s||i;let a=[];for(let e of this._nodes){let r=this.fields[e];r&&!ju.isRef(r)&&a.push(r.asNestedTest({options:t,key:e,parent:i,parentPath:t.path,originalParent:s}))}this.runTests({tests:a,value:i,originalValue:s,options:t},r,t=>{n(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),r=t.fields;for(let[e,t]of Object.entries(this.fields)){const n=r[e];r[e]=void 0===n?t:n}return t.withMutation(t=>t.setFields(r,[...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(r=>{var n;const i=this.fields[r];let s=e;null!=(n=s)&&n.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),t[r]=i&&"getDefault"in i?i.getDefault(s):void 0}),t}setFields(e,t){let r=this.clone();return r.fields=e,r._nodes=function(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([e,t])=>`${e}-${t}`));function s(e,t){let s=lu.split(e)[0];n.add(s),i.has(`${t}-${s}`)||r.push([t,s])}for(const t of Object.keys(e)){let r=e[t];n.add(t),ju.isRef(r)&&r.isSibling?s(r.path,t):zu(r)&&"deps"in r&&r.deps.forEach(e=>s(e,t))}return fu.array(Array.from(n),r).reverse()}(e,t),r._sortErrors=fc(Object.keys(e)),t&&(r._excludedEdges=t),r}shape(e,t=[]){return this.clone().withMutation(r=>{let n=r._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),n=[...r._excludedEdges,...t]),r.setFields(Object.assign(r.fields,e),n)})}partial(){const e={};for(const[t,r]of Object.entries(this.fields))e[t]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(e)}deepPartial(){return mc(this)}pick(e){const t={};for(const r of e)this.fields[r]&&(t[r]=this.fields[r]);return this.setFields(t,this._excludedEdges.filter(([t,r])=>e.includes(t)&&e.includes(r)))}omit(e){const t=[];for(const r of Object.keys(this.fields))e.includes(r)||t.push(r);return this.pick(t)}from(e,t,r){let n=lu.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return((e,t)=>{const r=[...lu.normalizePath(t)];if(1===r.length)return r[0]in e;let n=r.pop(),i=lu.getter(lu.join(r),!0)(e);return!(!i||!(n in i))})(i,e)&&(s=Object.assign({},i),r||delete s[e],s[t]=n(i)),s})}json(){return this.transform(pc)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Pu.exact,test(e){if(null==e)return!0;const t=_c(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Pu.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const r=_c(this.schema,t);return!e||0===r.length||this.createError({params:{unknown:r.join(", ")}})}});return r.spec.noUnknown=e,r}unknown(e=!0,t=Pu.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const r={};for(const n of Object.keys(t))r[e(n)]=t[n];return r})}camelCase(){return this.transformKeys(cu.camelCase)}snakeCase(){return this.transformKeys(cu.snakeCase)}constantCase(){return this.transformKeys(e=>cu.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),r=super.describe(e);r.fields={};for(const[i,s]of Object.entries(t.fields)){var n;let t=e;null!=(n=t)&&n.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[i]})),r.fields[i]=s.describe(t)}return r}}function xc(e){return new wc(e)}vc.prototype=bc.prototype;class wc extends Zu{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const r=super._cast(e,t);if(!this._typeCheck(r)||!this.innerType)return r;let n=!1;const i=r.map((e,i)=>{const s=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${i}]`,parent:r,originalValue:e,value:e,index:i}));return s!==e&&(n=!0),s});return n?i:r}_validate(e,t={},r,n){var i;let s=this.innerType,o=null!=(i=t.recursive)?i:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,r,(i,a)=>{var l;if(!o||!s||!this._typeCheck(a))return void n(i,a);let u=new Array(a.length);for(let r=0;r<a.length;r++){var c;u[r]=s.asNestedTest({options:t,index:r,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},r,e=>n(e.concat(i),a))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(pc)}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(!zu(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+bu(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=Mu.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||Mu.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||Mu.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,r,n)=>!e(t,r,n):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(e){const t=(e?this.resolve(e):this).clone(),r=super.describe(e);if(t.innerType){var n;let i=e;null!=(n=i)&&n.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),r.innerType=t.innerType.describe(i)}return r}}xc.prototype=wc.prototype;const Ec="Данное поле обязательно для заполнения",Ac=()=>sc(),Sc=(e=Ec)=>Ac().required(e),Tc=ac(),kc=Tc.required(Ec),Oc=xc(),Rc=cc(),Cc=Rc.required(Ec),Nc="https://dalganmap.ru/api",Pc=({items:t,onOpen:r,defaultValue:n=null})=>{const[i,s]=e.useState(n),o=e.useCallback(()=>{s(null)},[]);e.useEffect(()=>{n&&s(n)},[n]);const a=e.useId();return x(O,{id:a,children:t.map(({value:e,summary:t,getDetails:n})=>{const l=`${a}-accordion-${e}`;return w(R,{expanded:e===i,children:[x(C,{expandIcon:x(J,{}),onClick:()=>{s(t=>t===e?null:(r?.(e),e))},"aria-controls":`${l}-content`,id:`${l}-header`,children:t}),x(N,{children:n({onClose:o})})]},l)})})},Mc=e=>{const{children:t,variant:r="contained",loading:n,icon:i,sx:s,...o}=e;return i?x(ee,{...o,loading:n,children:i}):x(P,{sx:{whiteSpace:"nowrap",padding:"5px 15px",textTransform:"none",...s},loading:n,loadingPosition:"start",variant:r,...o,children:t})},Dc={reset:ie,edit:re,move:ne,save:se,delete:te},zc=({title:t,iconProps:r,...n})=>{const i=e.useId(),s=Dc[r.name],o=r.color??"primary";return t?x(M,{title:t,children:x(D,{id:i,...n,onClick:e=>{e.stopPropagation(),n.onClick?.(e)},children:x(s,{fontSize:"medium",color:o})})}):x(D,{id:i,...n,onClick:e=>{e.stopPropagation(),n.onClick?.(e)},children:x(s,{fontSize:"medium",color:o})})},Ic=e.forwardRef(function(e,t){return x(z,{direction:"up",ref:t,...e})}),Fc=({notification:t,onDelete:r,disabled:n=!1,...i})=>{const s=e.useId(),[o,a]=e.useState(!1),l=()=>{a(!1)},u=e.useMemo(()=>({name:"delete",color:n?"disabled":"error"}),[n]);return w(e.Fragment,{children:[t?x(M,{title:t.title,children:x(zc,{...i,iconProps:u,onClick:()=>{a(!0)},disabled:n})}):x(zc,{...i,iconProps:u,onClick:r,disabled:n}),t?w(I,{slots:{transition:Ic},open:o,onClose:l,children:[x(F,{id:`${s}-dialog-title`,children:t.title}),x(L,{children:x(j,{id:`${s}-dialog-text`,children:t.description})}),w(U,{children:[x(P,{variant:"contained",color:"error",sx:{textTransform:"none"},onClick:l,children:"Отмена"}),x(P,{variant:"contained",sx:{textTransform:"none"},onClick:()=>{r(),l()},children:"Подтвердить"})]})]}):null]})},Lc=V("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),jc=({children:e,accept:t,onFilesLoad:r,...n})=>w(Mc,{...n,component:"label",variant:"contained",startIcon:x(oe,{}),children:[e,x(Lc,{type:"file",accept:t,onChange:e=>{const{target:{files:t}}=e;t&&r({event:e,files:t})},multiple:!0})]});var Uc=El(({name:t,title:r,description:n,onSuccess:i,onOpen:s,onClose:o,theme:a="info",agreeButton:l,disagreeButton:u,content:c})=>{const h=e.useId(),d=e.useId(),f=e.useId(),p=Lo.getIsOpen(t),m=()=>{Lo.close(t)};return e.useEffect(()=>{p?s?.():o?.()},[p]),w(I,{id:h,open:p,onClose:m,"aria-labelledby":d,"aria-describedby":f,children:[x(F,{id:d,sx:({palette:e})=>({background:e[a].main,color:e[a].contrastText}),children:r}),x(B,{}),w(L,{sx:({spacing:e})=>({display:"grid",gap:e(2)}),children:[x(j,{id:f,children:n}),c?w(e.Fragment,{children:[x(B,{}),c]}):null]}),x(B,{}),w(U,{children:[x(Mc,{color:"error",onClick:m,disabled:u?.disabled,children:u?.text??"Закрыть"}),x(Mc,{color:"success",onClick:()=>{i(),m()},disabled:l?.disabled,children:l?.text??"Подтвердить"})]})]})});const Vc=({children:e,sx:t,...r})=>x(O,{...r,sx:e=>{const{spacing:r}=e;return{px:r(2),py:r(2),borderRadius:"10px",boxShadow:"0px 8px 24px 0px rgba(0,0,0,0.3)",maxHeight:"85vh",maxWidth:"85vw",overflowX:"auto",...t?.(e)}},children:e});var Bc=e=>"checkbox"===e.type,$c=e=>e instanceof Date,Gc=e=>null==e;const qc=e=>"object"==typeof e;var Wc=e=>!Gc(e)&&!Array.isArray(e)&&qc(e)&&!$c(e),Hc=e=>Wc(e)&&e.target?Bc(e.target)?e.target.checked:e.target.value:e,Yc=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),Zc="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function Xc(e){if(e instanceof Date)return new Date(e);const t="undefined"!=typeof FileList&&e instanceof FileList;if(Zc&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!(r||Wc(e)&&(e=>{const t=e.constructor&&e.constructor.prototype;return Wc(t)&&t.hasOwnProperty("isPrototypeOf")})(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=Xc(e[t]));return n}var Kc=e=>/^\w*$/.test(e),Qc=e=>void 0===e,Jc=e=>Array.isArray(e)?e.filter(Boolean):[],eh=e=>Jc(e.replace(/["|']|\]/g,"").split(/\.|\[/)),th=(e,t,r)=>{if(!t||!Wc(e))return r;const n=(Kc(t)?[t]:eh(t)).reduce((e,t)=>Gc(e)?e:e[t],e);return Qc(n)||n===e?Qc(e[t])?r:e[t]:n},rh=e=>"boolean"==typeof e,nh=e=>"function"==typeof e,ih=(e,t,r)=>{let n=-1;const i=Kc(t)?[t]:eh(t),s=i.length,o=s-1;for(;++n<s;){const t=i[n];let s=r;if(n!==o){const r=e[t];s=Wc(r)||Array.isArray(r)?r:isNaN(+i[n+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=s,e=e[t]}};const sh="blur",oh="focusout",ah="change",lh="onBlur",uh="onChange",ch="onSubmit",hh="onTouched",dh="all",fh="max",ph="min",mh="maxLength",gh="minLength",_h="pattern",yh="required",vh="validate",bh=t.createContext(null);bh.displayName="HookFormContext";const xh=()=>t.useContext(bh),wh=e=>{const{children:r,...n}=e;return t.createElement(bh.Provider,{value:n},r)};var Eh=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const i=s;return t._proxyFormState[i]!==dh&&(t._proxyFormState[i]=!n||dh),r&&(r[i]=!0),e[i]}});return i};const Ah="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;var Sh=e=>"string"==typeof e,Th=(e,t,r,n,i)=>Sh(e)?(n&&t.watch.add(e),th(r,e,i)):Array.isArray(e)?e.map(e=>(n&&t.watch.add(e),th(r,e))):(n&&(t.watchAll=!0),r),kh=e=>Gc(e)||!qc(e);function Oh(e,t,r=new WeakSet){if(kh(e)||kh(t))return Object.is(e,t);if($c(e)&&$c(t))return e.getTime()===t.getTime();const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const n=e[s];if(!i.includes(s))return!1;if("ref"!==s){const e=t[s];if($c(n)&&$c(e)||Wc(n)&&Wc(e)||Array.isArray(n)&&Array.isArray(e)?!Oh(n,e,r):!Object.is(n,e))return!1}}return!0}function Rh(e){const r=xh(),{name:n,disabled:i,control:s=r.control,shouldUnregister:o,defaultValue:a,exact:l=!0}=e,u=Yc(s._names.array,n),c=t.useMemo(()=>th(s._formValues,n,th(s._defaultValues,n,a)),[s,n,a]),h=function(e){const r=xh(),{control:n=r.control,name:i,defaultValue:s,disabled:o,exact:a,compute:l}=e||{},u=t.useRef(s),c=t.useRef(l),h=t.useRef(void 0),d=t.useRef(n),f=t.useRef(i);c.current=l;const[p,m]=t.useState(()=>{const e=n._getWatch(i,u.current);return c.current?c.current(e):e}),g=t.useCallback(e=>{const t=Th(i,n._names,e||n._formValues,!1,u.current);return c.current?c.current(t):t},[n._formValues,n._names,i]),_=t.useCallback(e=>{if(!o){const t=Th(i,n._names,e||n._formValues,!1,u.current);if(c.current){const e=c.current(t);Oh(e,h.current)||(m(e),h.current=e)}else m(t)}},[n._formValues,n._names,o,i]);Ah(()=>(d.current===n&&Oh(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,_]),t.useEffect(()=>n._removeUnmounted());const y=d.current!==n,v=f.current,b=t.useMemo(()=>{if(o)return null;const e=!y&&!Oh(v,i);return y||e?g():null},[o,y,i,v,g]);return null!==b?b:p}({control:s,name:n,defaultValue:c,exact:l}),d=function(e){const r=xh(),{control:n=r.control,disabled:i,name:s,exact:o}=e||{},[a,l]=t.useState(n._formState),u=t.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ah(()=>n._subscribe({name:s,formState:u.current,exact:o,callback:e=>{!i&&l({...n._formState,...e})}}),[s,i,o]),t.useEffect(()=>{u.current.isValid&&n._setValid(!0)},[n]),t.useMemo(()=>Eh(a,n,u.current,!1),[a,n])}({control:s,name:n,exact:l}),f=t.useRef(e),p=t.useRef(void 0),m=t.useRef(s.register(n,{...e.rules,value:h,...rh(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const g=t.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!th(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!th(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!th(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!th(d.validatingFields,n)},error:{enumerable:!0,get:()=>th(d.errors,n)}}),[d,n]),_=t.useCallback(e=>m.current.onChange({target:{value:Hc(e),name:n},type:ah}),[n]),y=t.useCallback(()=>m.current.onBlur({target:{value:th(s._formValues,n),name:n},type:sh}),[n,s._formValues]),v=t.useCallback(e=>{const t=th(s._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>nh(e.focus)&&e.focus(),select:()=>nh(e.select)&&e.select(),setCustomValidity:t=>nh(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>nh(e.reportValidity)&&e.reportValidity()})},[s._fields,n]),b=t.useMemo(()=>({name:n,value:h,...rh(i)||d.disabled?{disabled:d.disabled||i}:{},onChange:_,onBlur:y,ref:v}),[n,i,d.disabled,_,y,v,h]);return t.useEffect(()=>{const e=s._options.shouldUnregister||o,t=p.current;t&&t!==n&&!u&&s.unregister(t),s.register(n,{...f.current.rules,...rh(f.current.disabled)?{disabled:f.current.disabled}:{}});const r=(e,t)=>{const r=th(s._fields,e);r&&r._f&&(r._f.mount=t)};if(r(n,!0),e){const e=Xc(th(s._options.defaultValues,n,f.current.defaultValue));ih(s._defaultValues,n,e),Qc(th(s._formValues,n))&&ih(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]),t.useEffect(()=>{s._setDisabledField({disabled:i,name:n})},[i,n,s]),t.useMemo(()=>({field:b,formState:d,fieldState:g}),[b,d,g])}const Ch=e=>e.render(Rh(e));var Nh=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},Ph=e=>Array.isArray(e)?e:[e],Mh=()=>{let e=[];return{get observers(){return e},next:t=>{for(const r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function Dh(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],s=t[n];if(i&&Wc(i)&&s){const e=Dh(i,s);Wc(e)&&(r[n]=e)}else e[n]&&(r[n]=s)}return r}var zh=e=>Wc(e)&&!Object.keys(e).length,Ih=e=>"file"===e.type,Fh=e=>{if(!Zc)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Lh=e=>"select-multiple"===e.type,jh=e=>"radio"===e.type,Uh=e=>Fh(e)&&e.isConnected;function Vh(e,t){const r=Array.isArray(t)?t:Kc(t)?[t]:eh(t),n=1===r.length?e:function(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Qc(e)?n++:e[t[n++]];return e}(e,r),i=r.length-1,s=r[i];return n&&delete n[s],0!==i&&(Wc(n)&&zh(n)||Array.isArray(n)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!Qc(e[t]))return!1;return!0}(n))&&Vh(e,r.slice(0,-1)),e}function Bh(e){return Array.isArray(e)||Wc(e)&&!(e=>{for(const t in e)if(nh(e[t]))return!0;return!1})(e)}function $h(e,t={}){for(const r in e){const n=e[r];Bh(n)?(t[r]=Array.isArray(n)?[]:{},$h(n,t[r])):Qc(n)||(t[r]=!0)}return t}function Gh(e,t,r){r||(r=$h(t));for(const n in e){const i=e[n];if(Bh(i))Qc(t)||kh(r[n])?r[n]=$h(i,Array.isArray(i)?[]:{}):Gh(i,Gc(t)?{}:t[n],r[n]);else{const e=t[n];r[n]=!Oh(i,e)}}return r}const qh={value:!1,isValid:!1},Wh={value:!0,isValid:!0};var Hh=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&&!Qc(e[0].attributes.value)?Qc(e[0].value)||""===e[0].value?Wh:{value:e[0].value,isValid:!0}:Wh:qh}return qh},Yh=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Qc(e)?e:t?""===e?NaN:e?+e:e:r&&Sh(e)?new Date(e):n?n(e):e;const Zh={isValid:!1,value:null};var Xh=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,Zh):Zh;function Kh(e){const t=e.ref;return Ih(t)?t.files:jh(t)?Xh(e.refs).value:Lh(t)?[...t.selectedOptions].map(({value:e})=>e):Bc(t)?Hh(e.refs).value:Yh(Qc(t.value)?e.ref.value:t.value,e)}var Qh=e=>e instanceof RegExp,Jh=e=>Qc(e)?e:Qh(e)?e.source:Wc(e)?Qh(e.value)?e.value.source:e.value:e,ed=e=>({isOnSubmit:!e||e===ch,isOnBlur:e===lh,isOnChange:e===uh,isOnAll:e===dh,isOnTouch:e===hh});const td="AsyncFunction";var rd=e=>!!e&&!!e.validate&&!!(nh(e.validate)&&e.validate.constructor.name===td||Wc(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===td)),nd=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const id=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const r=th(e,i);if(r){const{_f:e,...s}=r;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!n)return!0;if(e.ref&&t(e.ref,e.name)&&!n)return!0;if(id(s,t))break}else if(Wc(s)&&id(s,t))break}}};function sd(e,t,r){const n=th(e,r);if(n||Kc(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const n=i.join("."),s=th(t,n),o=th(e,n);if(s&&!Array.isArray(s)&&r!==n)return{name:r};if(o&&o.type)return{name:n,error:o};if(o&&o.root&&o.root.type)return{name:`${n}.root`,error:o.root};i.pop()}return{name:r}}var od=(e,t,r)=>{const n=Ph(th(e,r));return ih(n,"root",t[r]),ih(e,r,n),e};function ad(e,t,r="validate"){if(Sh(e)||Array.isArray(e)&&e.every(Sh)||rh(e)&&!e)return{type:r,message:Sh(e)?e:"",ref:t}}var ld=e=>Wc(e)&&!Qh(e)?e:{value:e,message:""},ud=async(e,t,r,n,i,s)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:c,min:h,max:d,pattern:f,validate:p,name:m,valueAsNumber:g,mount:_}=e._f,y=th(r,m);if(!_||t.has(m))return{};const v=a?a[0]:o,b=e=>{i&&v.reportValidity&&(v.setCustomValidity(rh(e)?"":e||""),v.reportValidity())},x={},w=jh(o),E=Bc(o),A=w||E,S=(g||Ih(o))&&Qc(o.value)&&Qc(y)||Fh(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,T=Nh.bind(null,m,n,x),k=(e,t,r,n=mh,i=gh)=>{const s=e?t:r;x[m]={type:e?n:i,message:s,ref:o,...T(e?n:i,s)}};if(s?!Array.isArray(y)||!y.length:l&&(!A&&(S||Gc(y))||rh(y)&&!y||E&&!Hh(a).isValid||w&&!Xh(a).isValid)){const{value:e,message:t}=Sh(l)?{value:!!l,message:l}:ld(l);if(e&&(x[m]={type:yh,message:t,ref:v,...T(yh,t)},!n))return b(t),x}if(!(S||Gc(h)&&Gc(d))){let e,t;const r=ld(d),i=ld(h);if(Gc(y)||isNaN(y)){const n=o.valueAsDate||new Date(y),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;Sh(r.value)&&y&&(e=a?s(y)>s(r.value):l?y>r.value:n>new Date(r.value)),Sh(i.value)&&y&&(t=a?s(y)<s(i.value):l?y<i.value:n<new Date(i.value))}else{const n=o.valueAsNumber||(y?+y:y);Gc(r.value)||(e=n>r.value),Gc(i.value)||(t=n<i.value)}if((e||t)&&(k(!!e,r.message,i.message,fh,ph),!n))return b(x[m].message),x}if((u||c)&&!S&&(Sh(y)||s&&Array.isArray(y))){const e=ld(u),t=ld(c),r=!Gc(e.value)&&y.length>+e.value,i=!Gc(t.value)&&y.length<+t.value;if((r||i)&&(k(r,e.message,t.message),!n))return b(x[m].message),x}if(f&&!S&&Sh(y)){const{value:e,message:t}=ld(f);if(Qh(e)&&!y.match(e)&&(x[m]={type:_h,message:t,ref:o,...T(_h,t)},!n))return b(t),x}if(p)if(nh(p)){const e=ad(await p(y,r),v);if(e&&(x[m]={...e,...T(vh,e.message)},!n))return b(e.message),x}else if(Wc(p)){let e={};for(const t in p){if(!zh(e)&&!n)break;const i=ad(await p[t](y,r),v,t);i&&(e={...i,...T(t,i.message)},b(i.message),n&&(x[m]=e))}if(!zh(e)&&(x[m]={ref:v,...e},!n))return x}return b(!0),x};const cd={mode:ch,reValidateMode:uh,shouldFocusError:!0};function hd(e={}){let t,r={...cd,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:nh(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},i={},s=(Wc(r.defaultValues)||Wc(r.values))&&Xc(r.defaultValues||r.values)||{},o=r.shouldUnregister?{}:Xc(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:Mh(),state:Mh()},p=r.criteriaMode===dh,m=async e=>{if(!a.keepIsValid&&!r.disabled&&(h.isValid||d.isValid||e)){let e;r.resolver?(e=zh((await b()).errors),g()):e=await x(i,!0),e!==n.isValid&&f.state.next({isValid:e})}},g=(e,t)=>{!r.disabled&&(h.isValidating||h.validatingFields||d.isValidating||d.validatingFields)&&((e||Array.from(l.mount)).forEach(e=>{e&&(t?ih(n.validatingFields,e,t):Vh(n.validatingFields,e))}),f.state.next({validatingFields:n.validatingFields,isValidating:!zh(n.validatingFields)}))},_=(e,t,r,n)=>{const l=th(i,e);if(l){const i=th(o,e,Qc(r)?th(s,e):r);Qc(i)||n&&n.defaultChecked||t?ih(o,e,t?i:Kh(l._f)):A(e,i),a.mount&&!a.action&&m()}},y=(e,t,i,o,a)=>{let l=!1,u=!1;const c={name:e};if(!r.disabled){if(!i||o){(h.isDirty||d.isDirty)&&(u=n.isDirty,n.isDirty=c.isDirty=w(),l=u!==c.isDirty);const r=Oh(th(s,e),t);u=!!th(n.dirtyFields,e),r?Vh(n.dirtyFields,e):ih(n.dirtyFields,e,!0),c.dirtyFields=n.dirtyFields,l=l||(h.dirtyFields||d.dirtyFields)&&u!==!r}if(i){const t=th(n.touchedFields,e);t||(ih(n.touchedFields,e,i),c.touchedFields=n.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=th(n.errors,e),l=(h.isValid||d.isValid)&&rh(i)&&n.isValid!==i;var c;if(r.delayError&&s?(c=()=>((e,t)=>{ih(n.errors,e,t),f.state.next({errors:n.errors})})(e,s),t=e=>{clearTimeout(u),u=setTimeout(c,e)},t(r.delayError)):(clearTimeout(u),t=null,s?ih(n.errors,e,s):Vh(n.errors,e)),(s?!Oh(a,s):a)||!zh(o)||l){const t={...o,...l&&rh(i)?{isValid:i}:{},errors:n.errors,name:e};n={...n,...t},f.state.next(t)}},b=async e=>{g(e,!0);const t=await r.resolver(o,r.context,((e,t,r,n)=>{const i={};for(const r of e){const e=th(t,r);e&&ih(i,r,e._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}})(e||l.mount,i,r.criteriaMode,r.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&&rd(a._f);u&&h.validatingFields&&g([e.name],!0);const c=await ud(a,l.disabled,o,p,r.shouldUseNativeValidation&&!t,s);if(u&&h.validatingFields&&g([e.name]),c[e.name]&&(i.valid=!1,t))break;!t&&(th(c,e.name)?s?od(n.errors,c,e.name):ih(n.errors,e.name,c[e.name]):Vh(n.errors,e.name))}!zh(s)&&await x(s,t,i)}}return i.valid},w=(e,t)=>!r.disabled&&(e&&t&&ih(o,e,t),!Oh(C(),s)),E=(e,t,r)=>Th(e,l,{...a.mount?o:Qc(t)?s:Sh(e)?{[e]:t}:t},r,t),A=(e,t,r={})=>{const n=th(i,e);let s=t;if(n){const r=n._f;r&&(!r.disabled&&ih(o,e,Yh(t,r)),s=Fh(r.ref)&&Gc(t)?"":t,Lh(r.ref)?[...r.ref.options].forEach(e=>e.selected=s.includes(e.value)):r.refs?Bc(r.ref)?r.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(s)?e.checked=!!s.find(t=>t===e.value):e.checked=s===e.value||!!s)}):r.refs.forEach(e=>e.checked=e.value===s):Ih(r.ref)?r.ref.value="":(r.ref.value=s,r.ref.type||f.state.next({name:e,values:Xc(o)})))}(r.shouldDirty||r.shouldTouch)&&y(e,s,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&R(e)},S=(e,t,r)=>{for(const n in t){if(!t.hasOwnProperty(n))return;const s=t[n],o=e+"."+n,a=th(i,o);(l.array.has(e)||Wc(s)||a&&!a._f)&&!$c(s)?S(o,s,r):A(o,s,r)}},T=(e,t,r={})=>{const u=th(i,e),c=l.array.has(e),p=Xc(t);ih(o,e,p),c?(f.array.next({name:e,values:Xc(o)}),(h.isDirty||h.dirtyFields||d.isDirty||d.dirtyFields)&&r.shouldDirty&&f.state.next({name:e,dirtyFields:Gh(s,o),isDirty:w(e,p)})):!u||u._f||Gc(p)?A(e,p,r):S(e,p,r),nd(e,l)&&f.state.next({...n,name:e}),f.state.next({name:a.mount?e:void 0,values:Xc(o)})},k=async e=>{a.mount=!0;const s=e.target;let u=s.name,c=!0;const _=th(i,u),w=e=>{c=Number.isNaN(e)||$c(e)&&isNaN(e.getTime())||Oh(e,th(o,u,e))},E=ed(r.mode),A=ed(r.reValidateMode);if(_){let a,T;const k=s.type?Kh(_._f):Hc(e),O=e.type===sh||e.type===oh,C=!((S=_._f).mount&&(S.required||S.min||S.max||S.maxLength||S.minLength||S.pattern||S.validate)||r.resolver||th(n.errors,u)||_._f.deps)||((e,t,r,n,i)=>!i.isOnAll&&(!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:!(r?n.isOnChange:i.isOnChange)||e))(O,th(n.touchedFields,u),n.isSubmitted,A,E),N=nd(u,l,O);ih(o,u,k),O?s&&s.readOnly||(_._f.onBlur&&_._f.onBlur(e),t&&t(0)):_._f.onChange&&_._f.onChange(e);const P=y(u,k,O),M=!zh(P)||N;if(!O&&f.state.next({name:u,type:e.type,values:Xc(o)}),C)return(h.isValid||d.isValid)&&("onBlur"===r.mode?O&&m():O||m()),M&&f.state.next({name:u,...N?{}:P});if(!O&&N&&f.state.next({...n}),r.resolver){const{errors:e}=await b([u]);if(g([u]),w(k),c){const t=sd(n.errors,i,u),r=sd(e,i,t.name||u);a=r.error,u=r.name,T=zh(e)}}else g([u],!0),a=(await ud(_,l.disabled,o,p,r.shouldUseNativeValidation))[u],g([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,P))}var S},O=(e,t)=>{if(th(n.errors,t)&&e.focus)return e.focus(),1},R=async(e,t={})=>{let s,o;const a=Ph(e);if(r.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(g(e),e)for(const r of e){const e=th(t,r);e?ih(n.errors,r,e):Vh(n.errors,r)}else n.errors=t;return t})(Qc(e)?e:a);s=zh(t),o=e?!a.some(e=>th(t,e)):s}else e?(o=(await Promise.all(a.map(async e=>{const t=th(i,e);return await x(t&&t._f?{[e]:t}:t)}))).every(Boolean),(o||n.isValid)&&m()):o=s=await x(i);return f.state.next({...!Sh(e)||(h.isValid||d.isValid)&&s!==n.isValid?{}:{name:e},...r.resolver||!e?{isValid:s}:{},errors:n.errors}),t.shouldFocus&&!o&&id(i,O,e?a:l.mount),o},C=(e,t)=>{let r={...a.mount?o:s};return t&&(r=Dh(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),Qc(e)?r:Sh(e)?th(r,e):e.map(e=>th(r,e))},N=(e,t)=>({invalid:!!th((t||n).errors,e),isDirty:!!th((t||n).dirtyFields,e),error:th((t||n).errors,e),isValidating:!!th(n.validatingFields,e),isTouched:!!th((t||n).touchedFields,e)}),P=(e,t,r)=>{const s=(th(i,e,{_f:{}})._f||{}).ref,o=th(n.errors,e)||{},{ref:a,message:l,type:u,...c}=o;ih(n.errors,e,{...c,...t,ref:s}),f.state.next({name:e,errors:n.errors,isValid:!1}),r&&r.shouldFocus&&s&&s.focus&&s.focus()},M=e=>f.state.subscribe({next:t=>{var r,i,a;r=e.name,i=t.name,a=e.exact,r&&i&&r!==i&&!Ph(r).some(e=>e&&(a?e===i:e.startsWith(i)||i.startsWith(e)))||!((e,t,r,n)=>{r(e);const{name:i,...s}=e;return zh(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(e=>t[e]===(!n||dh))})(t,e.formState||h,V,e.reRenderRoot)||e.callback({values:{...o},...n,...t,defaultValues:s})}}).unsubscribe,D=(e,t={})=>{for(const a of e?Ph(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(Vh(i,a),Vh(o,a)),!t.keepError&&Vh(n.errors,a),!t.keepDirty&&Vh(n.dirtyFields,a),!t.keepTouched&&Vh(n.touchedFields,a),!t.keepIsValidating&&Vh(n.validatingFields,a),!r.shouldUnregister&&!t.keepDefaultValue&&Vh(s,a);f.state.next({values:Xc(o)}),f.state.next({...n,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&m()},z=({disabled:e,name:t})=>{(rh(e)&&a.mount||e||l.disabled.has(t))&&(e?l.disabled.add(t):l.disabled.delete(t))},I=(e,t={})=>{let n=th(i,e);const o=rh(t.disabled)||rh(r.disabled);return ih(i,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),n?z({disabled:rh(t.disabled)?t.disabled:r.disabled,name:e}):_(e,!0,t.value),{...o?{disabled:t.disabled||r.disabled}:{},...r.progressive?{required:!!t.required,min:Jh(t.min),max:Jh(t.max),minLength:Jh(t.minLength),maxLength:Jh(t.maxLength),pattern:Jh(t.pattern)}:{},name:e,onChange:k,onBlur:k,ref:o=>{if(o){I(e,t),n=th(i,e);const r=Qc(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=(e=>jh(e)||Bc(e))(r),l=n._f.refs||[];if(a?l.find(e=>e===r):r===n._f.ref)return;ih(i,e,{_f:{...n._f,...a?{refs:[...l.filter(Uh),r,...Array.isArray(th(s,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),_(e,!1,void 0,r)}else n=th(i,e,{}),n._f&&(n._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(!Yc(l.array,e)||!a.action)&&l.unMount.add(e)}}},F=()=>r.shouldFocusError&&id(i,O,l.mount),L=(e,t)=>async s=>{let a;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let u=Xc(o);if(f.state.next({isSubmitting:!0}),r.resolver){const{errors:e,values:t}=await b();g(),n.errors=e,u=Xc(t)}else await x(i);if(l.disabled.size)for(const e of l.disabled)Vh(u,e);if(Vh(n.errors,"root"),zh(n.errors)){f.state.next({errors:{}});try{await e(u,s)}catch(e){a=e}}else t&&await t({...n.errors},s),F(),setTimeout(F);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:zh(n.errors)&&!a,submitCount:n.submitCount+1,errors:n.errors}),a)throw a},j=(e,t={})=>{const u=e?Xc(e):s,c=Xc(u),d=zh(e),p=d?s:c;if(t.keepDefaultValues||(s=u),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(Gh(s,o))]);for(const t of Array.from(e))th(n.dirtyFields,t)?ih(p,t,th(o,t)):T(t,th(p,t))}else{if(Zc&&Qc(e))for(const e of l.mount){const t=th(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Fh(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)T(e,th(p,e));else i={}}o=r.shouldUnregister?t.keepDefaultValues?Xc(s):{}:Xc(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||!r.shouldUnregister&&!zh(p),a.watch=!!r.shouldUnregister,a.keepIsValid=!!t.keepIsValid,a.action=!1,t.keepErrors||(n.errors={}),f.state.next({submitCount:t.keepSubmitCount?n.submitCount:0,isDirty:!d&&(t.keepDirty?n.isDirty:!(!t.keepDefaultValues||Oh(e,s))),isSubmitted:!!t.keepIsSubmitted&&n.isSubmitted,dirtyFields:d?{}:t.keepDirtyValues?t.keepDefaultValues&&o?Gh(s,o):n.dirtyFields:t.keepDefaultValues&&e?Gh(s,e):t.keepDirty?n.dirtyFields:{},touchedFields:t.keepTouched?n.touchedFields:{},errors:t.keepErrors?n.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&n.isSubmitSuccessful,isSubmitting:!1,defaultValues:s})},U=(e,t)=>j(nh(e)?e(o):e,{...r.resetOptions,...t}),V=e=>{n={...n,...e}},B={control:{register:I,unregister:D,getFieldState:N,handleSubmit:L,setError:P,_subscribe:M,_runSchema:b,_updateIsValidating:g,_focusError:F,_getWatch:E,_getDirty:w,_setValid:m,_setFieldArray:(e,t=[],l,u,c=!0,p=!0)=>{if(u&&l&&!r.disabled){if(a.action=!0,p&&Array.isArray(th(i,e))){const t=l(th(i,e),u.argA,u.argB);c&&ih(i,e,t)}if(p&&Array.isArray(th(n.errors,e))){const t=l(th(n.errors,e),u.argA,u.argB);c&&ih(n.errors,e,t),((e,t)=>{!Jc(th(e,t)).length&&Vh(e,t)})(n.errors,e)}if((h.touchedFields||d.touchedFields)&&p&&Array.isArray(th(n.touchedFields,e))){const t=l(th(n.touchedFields,e),u.argA,u.argB);c&&ih(n.touchedFields,e,t)}(h.dirtyFields||d.dirtyFields)&&(n.dirtyFields=Gh(s,o)),f.state.next({name:e,isDirty:w(e,t),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ih(o,e,t)},_setDisabledField:z,_setErrors:e=>{n.errors=e,f.state.next({errors:n.errors,isValid:!1})},_getFieldArray:e=>Jc(th(a.mount?o:s,e,r.shouldUnregister?th(s,e,[]):[])),_reset:j,_resetDefaultValues:()=>nh(r.defaultValues)&&r.defaultValues().then(e=>{U(e,r.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of l.unMount){const t=th(i,e);t&&(t._f.refs?t._f.refs.every(e=>!Uh(e)):!Uh(t._f.ref))&&D(e)}l.unMount=new Set},_disableForm:e=>{rh(e)&&(f.state.next({disabled:e}),id(i,(t,r)=>{const n=th(i,r);n&&(t.disabled=n._f.disabled||e,Array.isArray(n._f.refs)&&n._f.refs.forEach(t=>{t.disabled=n._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 n},get _options(){return r},set _options(e){r={...r,...e}}},subscribe:e=>(a.mount=!0,d={...d,...e.formState},M({...e,formState:{...c,...e.formState}})),trigger:R,register:I,handleSubmit:L,watch:(e,t)=>nh(e)?f.state.subscribe({next:r=>"values"in r&&e(E(void 0,t),r)}):E(e,t,!0),setValue:T,getValues:C,reset:U,resetField:(e,t={})=>{th(i,e)&&(Qc(t.defaultValue)?T(e,Xc(th(s,e))):(T(e,t.defaultValue),ih(s,e,Xc(t.defaultValue))),t.keepTouched||Vh(n.touchedFields,e),t.keepDirty||(Vh(n.dirtyFields,e),n.isDirty=t.defaultValue?w(e,Xc(th(s,e))):w()),t.keepError||(Vh(n.errors,e),h.isValid&&m()),f.state.next({...n}))},clearErrors:e=>{e&&Ph(e).forEach(e=>Vh(n.errors,e)),f.state.next({errors:e?n.errors:{}})},unregister:D,setError:P,setFocus:(e,t={})=>{const r=th(i,e),n=r&&r._f;if(n){const e=n.refs?n.refs[0]:n.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&nh(e.select)&&e.select()})}},getFieldState:N};return{...B,formControl:B}}const dd=({sx:e,...t})=>x(ue,{variant:"body1",sx:{color:"var(--color-white)",cursor:"default",...e},...t}),fd=Q(ae)({padding:0,marginRight:"5px",marginLeft:"10px","& .MuiSvgIcon-root":{color:"var(--color-orange-medium)"}});function pd({label:t,name:r,...n}){const i=e.useId(),{control:s,setValue:o,watch:a}=xh(),l=a(r),u=`${i}-${r}-${String(l)}`;return x(Ch,{control:s,name:r,render:({field:e})=>{const{value:r,name:i}=e;return t?x(le,{color:"white",control:x(fd,{...n,checked:r,onChange:(e,t)=>{o(i,t,{shouldValidate:!0})}}),label:x(dd,{children:t})}):x(fd,{...n,checked:r,onChange:(e,t)=>{o(i,t,{shouldValidate:!0})}})}},u)}var md=function(t){var r=t.as,n=t.errors,i=t.name,s=t.message,o=t.render,a=function(e,t){if(null==e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n<s.length;n++)t.indexOf(r=s[n])>=0||(i[r]=e[r]);return i}(t,["as","errors","name","message","render"]),l=xh(),u=th(n||l.formState.errors,i);if(!u)return null;var c=u.message,h=u.types,d=Object.assign({},a,{children:c||s});return e.isValidElement(r)?e.cloneElement(r,d):o?o({message:c||s,messages:h}):e.createElement(r||e.Fragment,d)};function gd({name:e}){const{palette:t}=$(),{formState:{errors:r}}=xh();return x(md,{errors:r,name:e,render:({message:e})=>x(dd,{variant:"body2",style:{color:t.error.main},children:e})})}function _d({form:e,sx:t={},onSubmit:r,children:n}){const{handleSubmit:i}=e;return x(wh,{...e,children:x(O,{component:"form",sx:{display:"grid",gap:"15px",...t},onSubmit:i(r),children:n})})}const yd=()=>xh(),vd=e=>x(G,{size:"small",...e});function bd({name:t,...r}){const{control:n}=xh(),i=e.useId();return x(Ch,{control:n,name:t,render:({field:e})=>w(O,{sx:({spacing:e})=>({display:"grid",width:"100%",gap:e(1)}),children:[x(ce,{...r,...e,id:i,slots:{field:vd}}),x(gd,{name:t})]})})}const xd=({text:e="Нет данных"})=>x(k,{variant:"body2",sx:{textAlign:"center",color:"var(--gray-light-color)"},children:e});function wd({items:t,columnsCount:r=1,getContent:n,title:i,getKey:s,onClick:o,sx:a,isShowNoData:l=!0}){const u=0===t.length;return w(O,{sx:{display:"grid",gridTemplateColumns:"1fr",gap:"15px",...a?.root},children:[i?x(k,{variant:"h6",noWrap:!0,sx:{textAlign:"center",fontWeight:700,...a?.title},children:i}):null,u?x(e.Fragment,{children:l?x(xd,{}):null}):x(q,{sx:{display:"grid",gridTemplateColumns:`repeat(${r}, 1fr)`,gap:"15px",...a?.list},disablePadding:!0,children:t.map((e,t)=>x(W,{onClick:()=>o?.(e,t),sx:{...a?.item},disablePadding:!0,children:n(e,t)},s(e,t)))})]})}const Ed="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Ad(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function Sd(e){return"nodeType"in e}function Td(e){var t,r;return e?Ad(e)?e:Sd(e)&&null!=(t=null==(r=e.ownerDocument)?void 0:r.defaultView)?t:window:window}function kd(e){const{Document:t}=Td(e);return e instanceof t}function Od(e){return!Ad(e)&&e instanceof Td(e).HTMLElement}function Rd(e){return e instanceof Td(e).SVGElement}function Cd(e){return e?Ad(e)?e.document:Sd(e)?kd(e)?e:Od(e)||Rd(e)?e.ownerDocument:document:document:document}const Nd=Ed?u:s;function Pd(e){const t=n(e);return Nd(()=>{t.current=e}),i(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return null==t.current?void 0:t.current(...r)},[])}function Md(e,t){void 0===t&&(t=[e]);const r=n(e);return Nd(()=>{r.current!==e&&(r.current=e)},t),r}function Dd(e,t){const r=n();return l(()=>{const t=e(r.current);return r.current=t,t},[...t])}function zd(e){const t=Pd(e),r=n(null),s=i(e=>{e!==r.current&&(null==t||t(e,r.current)),r.current=e},[]);return[r,s]}function Id(e){const t=n();return s(()=>{t.current=e},[e]),t.current}let Fd={};function Ld(e,t){return l(()=>{if(t)return t;const r=null==Fd[e]?0:Fd[e]+1;return Fd[e]=r,e+"-"+r},[e,t])}function jd(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((t,r)=>{const n=Object.entries(r);for(const[r,i]of n){const n=t[r];null!=n&&(t[r]=n+e*i)}return t},{...t})}}const Ud=jd(1),Vd=jd(-1);function Bd(e){if(!e)return!1;const{KeyboardEvent:t}=Td(e.target);return t&&e instanceof t}function $d(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=Td(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const Gd=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[Gd.Translate.toString(e),Gd.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),qd="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Wd(e){return e.matches(qd)?e:e.querySelector(qd)}const Hd={display:"none"};function Yd(e){let{id:r,value:n}=e;return t.createElement("div",{id:r,style:Hd},n)}function Zd(e){let{id:r,announcement:n,ariaLiveType:i="assertive"}=e;return t.createElement("div",{id:r,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 Xd=m(null);const Kd={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 "},Qd={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Jd(e){let{announcements:r=Qd,container:n,hiddenTextDescribedById:o,screenReaderInstructions:a=Kd}=e;const{announce:u,announcement:h}=function(){const[e,t]=p("");return{announce:i(e=>{null!=e&&t(e)},[]),announcement:e}}(),d=Ld("DndLiveRegion"),[f,m]=p(!1);if(s(()=>{m(!0)},[]),function(e){const t=c(Xd);s(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(l(()=>({onDragStart(e){let{active:t}=e;u(r.onDragStart({active:t}))},onDragMove(e){let{active:t,over:n}=e;r.onDragMove&&u(r.onDragMove({active:t,over:n}))},onDragOver(e){let{active:t,over:n}=e;u(r.onDragOver({active:t,over:n}))},onDragEnd(e){let{active:t,over:n}=e;u(r.onDragEnd({active:t,over:n}))},onDragCancel(e){let{active:t,over:n}=e;u(r.onDragCancel({active:t,over:n}))}}),[u,r])),!f)return null;const g=t.createElement(t.Fragment,null,t.createElement(Yd,{id:o,value:a.draggable}),t.createElement(Zd,{id:d,announcement:h}));return n?v(g,n):g}var ef;function tf(){}!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"}(ef||(ef={}));const rf=Object.freeze({x:0,y:0});function nf(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function sf(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function of(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function af(e,t,r){return void 0===t&&(t=e.left),void 0===r&&(r=e.top),{x:t+.5*e.width,y:r+.5*e.height}}const lf=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=af(t,t.left,t.top),s=[];for(const e of n){const{id:t}=e,n=r.get(t);if(n){const r=nf(af(n),i);s.push({id:t,data:{droppableContainer:e,value:r}})}}return s.sort(sf)};function uf(e,t){const r=Math.max(t.top,e.top),n=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-n,a=s-r;if(n<i&&r<s){const r=t.width*t.height,n=e.width*e.height,i=o*a;return Number((i/(r+n-i)).toFixed(4))}return 0}const cf=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const e of n){const{id:n}=e,s=r.get(n);if(s){const r=uf(s,t);r>0&&i.push({id:n,data:{droppableContainer:e,value:r}})}}return i.sort(of)};function hf(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:rf}function df(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((t,r)=>({...t,top:t.top+e*r.y,bottom:t.bottom+e*r.y,left:t.left+e*r.x,right:t.right+e*r.x}),{...t})}}const ff=df(1);const pf={ignoreTransform:!1};function mf(e,t){void 0===t&&(t=pf);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:n}=Td(e).getComputedStyle(e);t&&(r=function(e,t,r){const n=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(!n)return e;const{scaleX:i,scaleY:s,x:o,y:a}=n,l=e.left-o-(1-i)*parseFloat(r),u=e.top-a-(1-s)*parseFloat(r.slice(r.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}}(r,t,n))}const{top:n,left:i,width:s,height:o,bottom:a,right:l}=r;return{top:n,left:i,width:s,height:o,bottom:a,right:l}}function gf(e){return mf(e,{ignoreTransform:!0})}function _f(e,t){const r=[];return e?function n(i){if(null!=t&&r.length>=t)return r;if(!i)return r;if(kd(i)&&null!=i.scrollingElement&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!Od(i)||Rd(i))return r;if(r.includes(i))return r;const s=Td(e).getComputedStyle(i);return i!==e&&function(e,t){void 0===t&&(t=Td(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const n=t[e];return"string"==typeof n&&r.test(n)})}(i,s)&&r.push(i),function(e,t){return void 0===t&&(t=Td(e).getComputedStyle(e)),"fixed"===t.position}(i,s)?r:n(i.parentNode)}(e):r}function yf(e){const[t]=_f(e,1);return null!=t?t:null}function vf(e){return Ed&&e?Ad(e)?e:Sd(e)?kd(e)||e===Cd(e).scrollingElement?window:Od(e)?e:null:null:null}function bf(e){return Ad(e)?e.scrollX:e.scrollLeft}function xf(e){return Ad(e)?e.scrollY:e.scrollTop}function wf(e){return{x:bf(e),y:xf(e)}}var Ef;function Af(e){return!(!Ed||!e)&&e===document.scrollingElement}function Sf(e){const t={x:0,y:0},r=Af(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=n.y,isRight:e.scrollLeft>=n.x,maxScroll:n,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(Ef||(Ef={}));const Tf={x:.2,y:.2};function kf(e,t,r,n,i){let{top:s,left:o,right:a,bottom:l}=r;void 0===n&&(n=10),void 0===i&&(i=Tf);const{isTop:u,isBottom:c,isLeft:h,isRight:d}=Sf(e),f={x:0,y:0},p={x:0,y:0},m=t.height*i.y,g=t.width*i.x;return!u&&s<=t.top+m?(f.y=Ef.Backward,p.y=n*Math.abs((t.top+m-s)/m)):!c&&l>=t.bottom-m&&(f.y=Ef.Forward,p.y=n*Math.abs((t.bottom-m-l)/m)),!d&&a>=t.right-g?(f.x=Ef.Forward,p.x=n*Math.abs((t.right-g-a)/g)):!h&&o<=t.left+g&&(f.x=Ef.Backward,p.x=n*Math.abs((t.left+g-o)/g)),{direction:f,speed:p}}function Of(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:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Rf(e){return e.reduce((e,t)=>Ud(e,wf(t)),rf)}const Cf=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+bf(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+xf(t),0)}]];class Nf{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 r=_f(t),n=Rf(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,i]of Cf)for(const s of t)Object.defineProperty(this,s,{get:()=>{const t=i(r),o=n[e]-t;return this.rect[s]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Pf{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,r){var n;null==(n=this.target)||n.addEventListener(e,t,r),this.listeners.push([e,t,r])}}function Mf(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return"number"==typeof t?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t&&n>t.y}var Df,zf;function If(e){e.preventDefault()}function Ff(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"}(Df||(Df={})),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"}(zf||(zf={}));const Lf={start:[zf.Space,zf.Enter],cancel:[zf.Esc],end:[zf.Space,zf.Enter,zf.Tab]},jf=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case zf.Right:return{...r,x:r.x+25};case zf.Left:return{...r,x:r.x-25};case zf.Down:return{...r,y:r.y+25};case zf.Up:return{...r,y:r.y-25}}};class Uf{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 Pf(Cd(t)),this.windowListeners=new Pf(Td(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Df.Resize,this.handleCancel),this.windowListeners.add(Df.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Df.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,r=e.node.current;r&&function(e,t){if(void 0===t&&(t=mf),!e)return;const{top:r,left:n,bottom:i,right:s}=t(e);yf(e)&&(i<=0||s<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(r),t(rf)}handleKeyDown(e){if(Bd(e)){const{active:t,context:r,options:n}=this.props,{keyboardCodes:i=Lf,coordinateGetter:s=jf,scrollBehavior:o="smooth"}=n,{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}=r.current,u=l?{x:l.left,y:l.top}:rf;this.referenceCoordinates||(this.referenceCoordinates=u);const c=s(e,{active:t,context:r.current,currentCoordinates:u});if(c){const t=Vd(c,u),n={x:0,y:0},{scrollableAncestors:i}=r.current;for(const r of i){const i=e.code,{isTop:s,isRight:a,isLeft:l,isBottom:u,maxScroll:h,minScroll:d}=Sf(r),f=Of(r),p={x:Math.min(i===zf.Right?f.right-f.width/2:f.right,Math.max(i===zf.Right?f.left:f.left+f.width/2,c.x)),y:Math.min(i===zf.Down?f.bottom-f.height/2:f.bottom,Math.max(i===zf.Down?f.top:f.top+f.height/2,c.y))},m=i===zf.Right&&!a||i===zf.Left&&!l,g=i===zf.Down&&!u||i===zf.Up&&!s;if(m&&p.x!==c.x){const e=r.scrollLeft+t.x,s=i===zf.Right&&e<=h.x||i===zf.Left&&e>=d.x;if(s&&!t.y)return void r.scrollTo({left:e,behavior:o});n.x=s?r.scrollLeft-e:i===zf.Right?r.scrollLeft-h.x:r.scrollLeft-d.x,n.x&&r.scrollBy({left:-n.x,behavior:o});break}if(g&&p.y!==c.y){const e=r.scrollTop+t.y,s=i===zf.Down&&e<=h.y||i===zf.Up&&e>=d.y;if(s&&!t.x)return void r.scrollTo({top:e,behavior:o});n.y=s?r.scrollTop-e:i===zf.Down?r.scrollTop-h.y:r.scrollTop-d.y,n.y&&r.scrollBy({top:-n.y,behavior:o});break}}this.handleMove(e,Ud(Vd(c,this.referenceCoordinates),n))}}}handleMove(e,t){const{onMove:r}=this.props;e.preventDefault(),r(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 Vf(e){return Boolean(e&&"distance"in e)}function Bf(e){return Boolean(e&&"delay"in e)}Uf.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=Lf,onActivation:i}=t,{active:s}=r;const{code:o}=e.nativeEvent;if(n.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 $f{constructor(e,t,r){var n;void 0===r&&(r=function(e){const{EventTarget:t}=Td(e);return e instanceof t?e:Cd(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=Cd(s),this.documentListeners=new Pf(this.document),this.listeners=new Pf(r),this.windowListeners=new Pf(Td(s)),this.initialCoordinates=null!=(n=$d(i))?n:rf,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:r}}}=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(Df.Resize,this.handleCancel),this.windowListeners.add(Df.DragStart,If),this.windowListeners.add(Df.VisibilityChange,this.handleCancel),this.windowListeners.add(Df.ContextMenu,If),this.documentListeners.add(Df.Keydown,this.handleKeydown),t){if(null!=r&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Bf(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(Vf(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:r,onPending:n}=this.props;n(r,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Df.Click,Ff,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Df.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:r,initialCoordinates:n,props:i}=this,{onMove:s,options:{activationConstraint:o}}=i;if(!n)return;const a=null!=(t=$d(e))?t:rf,l=Vd(n,a);if(!r&&o){if(Vf(o)){if(null!=o.tolerance&&Mf(l,o.tolerance))return this.handleCancel();if(Mf(l,o.distance))return this.handleStart()}return Bf(o)&&Mf(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===zf.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Gf={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class qf extends $f{constructor(e){const{event:t}=e,r=Cd(t.target);super(e,Gf,r)}}qf.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!(!r.isPrimary||0!==r.button)&&(null==n||n({event:r}),!0)}}];const Wf={move:{name:"mousemove"},end:{name:"mouseup"}};var Hf;!function(e){e[e.RightClick=2]="RightClick"}(Hf||(Hf={}));(class extends $f{constructor(e){super(e,Wf,Cd(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button!==Hf.RightClick&&(null==n||n({event:r}),!0)}}];const Yf={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var Zf,Xf;function Kf(e){let{acceleration:t,activator:r=Zf.Pointer,canScroll:o,draggingRect:a,enabled:u,interval:c=5,order:h=Xf.TreeOrder,pointerCoordinates:d,scrollableAncestors:f,scrollableAncestorRects:p,delta:m,threshold:g}=e;const _=function(e){let{delta:t,disabled:r}=e;const n=Id(t);return Dd(e=>{if(r||!n||!e)return Qf;const i={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[Ef.Backward]:e.x[Ef.Backward]||-1===i.x,[Ef.Forward]:e.x[Ef.Forward]||1===i.x},y:{[Ef.Backward]:e.y[Ef.Backward]||-1===i.y,[Ef.Forward]:e.y[Ef.Forward]||1===i.y}}},[r,t,n])}({delta:m,disabled:!u}),[y,v]=function(){const e=n(null);return[i((t,r)=>{e.current=setInterval(t,r)},[]),i(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),b=n({x:0,y:0}),x=n({x:0,y:0}),w=l(()=>{switch(r){case Zf.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Zf.DraggableRect:return a}},[r,a,d]),E=n(null),A=i(()=>{const e=E.current;if(!e)return;const t=b.current.x*x.current.x,r=b.current.y*x.current.y;e.scrollBy(t,r)},[]),S=l(()=>h===Xf.TreeOrder?[...f].reverse():f,[h,f]);s(()=>{if(u&&f.length&&w){for(const e of S){if(!1===(null==o?void 0:o(e)))continue;const r=f.indexOf(e),n=p[r];if(!n)continue;const{direction:i,speed:s}=kf(e,n,w,t,g);for(const e of["x","y"])_[e][i[e]]||(s[e]=0,i[e]=0);if(s.x>0||s.y>0)return v(),E.current=e,y(A,c),b.current=s,void(x.current=i)}b.current={x:0,y:0},x.current={x:0,y:0},v()}else v()},[t,A,o,v,u,c,JSON.stringify(w),JSON.stringify(_),y,f,S,p,JSON.stringify(g)])}(class extends $f{constructor(e){super(e,Yf)}static setup(){return window.addEventListener(Yf.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Yf.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:i}=r;return!(i.length>1)&&(null==n||n({event:r}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Zf||(Zf={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Xf||(Xf={}));const Qf={x:{[Ef.Backward]:!1,[Ef.Forward]:!1},y:{[Ef.Backward]:!1,[Ef.Forward]:!1}};var Jf,ep;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Jf||(Jf={})),function(e){e.Optimized="optimized"}(ep||(ep={}));const tp=new Map;function rp(e,t){return Dd(r=>e?r||("function"==typeof t?t(e):e):null,[t,e])}function np(e){let{callback:t,disabled:r}=e;const n=Pd(t),i=l(()=>{if(r||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(n)},[r]);return s(()=>()=>null==i?void 0:i.disconnect(),[i]),i}function ip(e){return new Nf(mf(e),e)}function sp(e,t,r){void 0===t&&(t=ip);const[n,i]=p(null);function o(){i(n=>{if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=n?n:r)?i:null;const s=t(e);return JSON.stringify(n)===JSON.stringify(s)?n:s})}const a=function(e){let{callback:t,disabled:r}=e;const n=Pd(t),i=l(()=>{if(r||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(n)},[n,r]);return s(()=>()=>null==i?void 0:i.disconnect(),[i]),i}({callback(t){if(e)for(const r of t){const{type:t,target:n}=r;if("childList"===t&&n instanceof HTMLElement&&n.contains(e)){o();break}}}}),u=np({callback:o});return Nd(()=>{o(),e?(null==u||u.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==u||u.disconnect(),null==a||a.disconnect())},[e]),n}const op=[];function ap(e,t){void 0===t&&(t=[]);const r=n(null);return s(()=>{r.current=null},t),s(()=>{const t=e!==rf;t&&!r.current&&(r.current=e),!t&&r.current&&(r.current=null)},[e]),r.current?Vd(e,r.current):rf}function lp(e){return l(()=>e?function(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}(e):null,[e])}const up=[];function cp(e){let{measure:t}=e;const[r,n]=p(null),s=i(e=>{for(const{target:r}of e)if(Od(r)){n(e=>{const n=t(r);return e?{...e,width:n.width,height:n.height}:n});break}},[t]),o=np({callback:s}),a=i(e=>{const r=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Od(t)?t:e}(e);null==o||o.disconnect(),r&&(null==o||o.observe(r)),n(r?t(r):null)},[t,o]),[u,c]=zd(a);return l(()=>({nodeRef:u,rect:r,setRef:c}),[r,u,c])}const hp=[{sensor:qf,options:{}},{sensor:Uf,options:{}}],dp={current:{}},fp={draggable:{measure:gf},droppable:{measure:gf,strategy:Jf.WhileDragging,frequency:ep.Optimized},dragOverlay:{measure:mf}};class pp 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,r;return null!=(t=null==(r=this.get(e))?void 0:r.node.current)?t:void 0}}const mp={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new pp,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:tf},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:fp,measureDroppableContainers:tf,windowRect:null,measuringScheduled:!1},gp=m({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:tf,draggableNodes:new Map,over:null,measureDroppableContainers:tf}),_p=m(mp);function yp(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new pp}}}function vp(e,t){switch(t.type){case ef.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ef.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 ef.DragEnd:case ef.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ef.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new pp(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case ef.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,s=e.droppable.containers.get(r);if(!s||n!==s.key)return e;const o=new pp(e.droppable.containers);return o.set(r,{...s,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case ef.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const s=new pp(e.droppable.containers);return s.delete(r),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function bp(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=c(gp),o=Id(n),a=Id(null==r?void 0:r.id);return s(()=>{if(!t&&!n&&o&&null!=a){if(!Bd(o))return;if(document.activeElement===o.target)return;const e=i.get(a);if(!e)return;const{activatorNode:t,node:r}=e;if(!t.current&&!r.current)return;requestAnimationFrame(()=>{for(const e of[t.current,r.current]){if(!e)continue;const t=Wd(e);if(t){t.focus();break}}})}},[n,t,i,a,o]),null}const xp=m({...rf,scaleX:1,scaleY:1});var wp;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(wp||(wp={}));const Ep=h(function(e){var r,o,a,u;let{id:c,accessibility:h,autoScroll:d=!0,children:f,sensors:m=hp,collisionDetection:_=cf,measuring:y,modifiers:v,...x}=e;const w=g(vp,void 0,yp),[E,A]=w,[S,T]=function(){const[e]=p(()=>new Set),t=i(t=>(e.add(t),()=>e.delete(t)),[e]);return[i(t=>{let{type:r,event:n}=t;e.forEach(e=>{var t;return null==(t=e[r])?void 0:t.call(e,n)})},[e]),t]}(),[k,O]=p(wp.Uninitialized),R=k===wp.Initialized,{draggable:{active:C,nodes:N,translate:P},droppable:{containers:M}}=E,D=null!=C?N.get(C):null,z=n({initial:null,translated:null}),I=l(()=>{var e;return null!=C?{id:C,data:null!=(e=null==D?void 0:D.data)?e:dp,rect:z}:null},[C,D]),F=n(null),[L,j]=p(null),[U,V]=p(null),B=Md(x,Object.values(x)),$=Ld("DndDescribedBy",c),G=l(()=>M.getEnabled(),[M]),q=l(()=>({draggable:{...fp.draggable,...null==W?void 0:W.draggable},droppable:{...fp.droppable,...null==W?void 0:W.droppable},dragOverlay:{...fp.dragOverlay,...null==W?void 0:W.dragOverlay}}),[null==(W=y)?void 0:W.draggable,null==W?void 0:W.droppable,null==W?void 0:W.dragOverlay]);var W;const{droppableRects:H,measureDroppableContainers:Y,measuringScheduled:Z}=function(e,t){let{dragging:r,dependencies:o,config:a}=t;const[l,u]=p(null),{frequency:c,measure:h,strategy:d}=a,f=n(e),m=function(){switch(d){case Jf.Always:return!1;case Jf.BeforeDragging:return r;default:return!r}}(),g=Md(m),_=i(function(e){void 0===e&&(e=[]),g.current||u(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[g]),y=n(null),v=Dd(t=>{if(m&&!r)return tp;if(!t||t===tp||f.current!==e||null!=l){const t=new Map;for(let r of e){if(!r)continue;if(l&&l.length>0&&!l.includes(r.id)&&r.rect.current){t.set(r.id,r.rect.current);continue}const e=r.node.current,n=e?new Nf(h(e),e):null;r.rect.current=n,n&&t.set(r.id,n)}return t}return t},[e,l,r,m,h]);return s(()=>{f.current=e},[e]),s(()=>{m||_()},[r,m]),s(()=>{l&&l.length>0&&u(null)},[JSON.stringify(l)]),s(()=>{m||"number"!=typeof c||null!==y.current||(y.current=setTimeout(()=>{_(),y.current=null},c))},[c,m,_,...o]),{droppableRects:v,measureDroppableContainers:_,measuringScheduled:null!=l}}(G,{dragging:R,dependencies:[P.x,P.y],config:q.droppable}),X=function(e,t){const r=null!=t?e.get(t):void 0,n=r?r.node.current:null;return Dd(e=>{var r;return null==t?null:null!=(r=null!=n?n:e)?r:null},[n,t])}(N,C),K=l(()=>U?$d(U):null,[U]),Q=function(){const e=!1===(null==L?void 0:L.autoScrollEnabled),t="object"==typeof d?!1===d.enabled:!1===d,r=R&&!e&&!t;if("object"==typeof d)return{...d,enabled:r};return{enabled:r}}(),J=function(e,t){return rp(e,t)}(X,q.draggable.measure);!function(e){let{activeNode:t,measure:r,initialRect:i,config:s=!0}=e;const o=n(!1),{x:a,y:l}="boolean"==typeof s?{x:s,y:s}:s;Nd(()=>{if(!a&&!l||!t)return void(o.current=!1);if(o.current||!i)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const n=hf(r(e),i);if(a||(n.x=0),l||(n.y=0),o.current=!0,Math.abs(n.x)>0||Math.abs(n.y)>0){const t=yf(e);t&&t.scrollBy({top:n.y,left:n.x})}},[t,a,l,i,r])}({activeNode:null!=C?N.get(C):null,config:Q.layoutShiftCompensation,initialRect:J,measure:q.draggable.measure});const ee=sp(X,q.draggable.measure,J),te=sp(X?X.parentElement:null),re=n({activatorEvent:null,active:null,activeNode:X,collisionRect:null,collisions:null,droppableRects:H,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=M.getNodeFor(null==(r=re.current.over)?void 0:r.id),ie=cp({measure:q.dragOverlay.measure}),se=null!=(o=ie.nodeRef.current)?o:X,oe=R?null!=(a=ie.rect)?a:ee:null,ae=Boolean(ie.nodeRef.current&&ie.rect),le=hf(ue=ae?null:ee,rp(ue));var ue;const ce=lp(se?Td(se):null),he=function(e){const t=n(e),r=Dd(r=>e?r&&r!==op&&e&&t.current&&e.parentNode===t.current.parentNode?r:_f(e):op,[e]);return s(()=>{t.current=e},[e]),r}(R?null!=ne?ne:X:null),de=function(e,t){void 0===t&&(t=mf);const[r]=e,n=lp(r?Td(r):null),[i,s]=p(up);function o(){s(()=>e.length?e.map(e=>Af(e)?n:new Nf(t(e),e)):up)}const a=np({callback:o});return Nd(()=>{null==a||a.disconnect(),o(),e.forEach(e=>null==a?void 0:a.observe(e))},[e]),i}(he),fe=function(e,t){let{transform:r,...n}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...n}),r):r}(v,{transform:{x:P.x-le.x,y:P.y-le.y,scaleX:1,scaleY:1},activatorEvent:U,active:I,activeNodeRect:ee,containerNodeRect:te,draggingNodeRect:oe,over:re.current.over,overlayNodeRect:ie.rect,scrollableAncestors:he,scrollableAncestorRects:de,windowRect:ce}),pe=K?Ud(K,P):null,me=function(e){const[t,r]=p(null),o=n(e),a=i(e=>{const t=vf(e.target);t&&r(e=>e?(e.set(t,wf(t)),new Map(e)):null)},[]);return s(()=>{const t=o.current;if(e!==t){n(t);const i=e.map(e=>{const t=vf(e);return t?(t.addEventListener("scroll",a,{passive:!0}),[t,wf(t)]):null}).filter(e=>null!=e);r(i.length?new Map(i):null),o.current=e}return()=>{n(e),n(t)};function n(e){e.forEach(e=>{const t=vf(e);null==t||t.removeEventListener("scroll",a)})}},[a,e]),l(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>Ud(e,t),rf):Rf(e):rf,[e,t])}(he),ge=ap(me),_e=ap(me,[ee]),ye=Ud(fe,ge),ve=oe?ff(oe,fe):null,be=I&&ve?_({active:I,collisionRect:ve,droppableRects:H,droppableContainers:G,pointerCoordinates:pe}):null,xe=function(e,t){if(!e||0===e.length)return null;const[r]=e;return r[t]}(be,"id"),[we,Ee]=p(null),Ae=function(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}(ae?fe:Ud(fe,_e),null!=(u=null==we?void 0:we.rect)?u:null,ee),Se=n(null),Te=i((e,t)=>{let{sensor:r,options:n}=t;if(null==F.current)return;const i=N.get(F.current);if(!i)return;const s=e.nativeEvent,o=new r({active:F.current,activeNode:i,event:s,options:n,context:re,onAbort(e){if(!N.get(e))return;const{onDragAbort:t}=B.current,r={id:e};null==t||t(r),S({type:"onDragAbort",event:r})},onPending(e,t,r,n){if(!N.get(e))return;const{onDragPending:i}=B.current,s={id:e,constraint:t,initialCoordinates:r,offset:n};null==i||i(s),S({type:"onDragPending",event:s})},onStart(e){const t=F.current;if(null==t)return;const r=N.get(t);if(!r)return;const{onDragStart:n}=B.current,i={activatorEvent:s,active:{id:t,data:r.data,rect:z}};b(()=>{null==n||n(i),O(wp.Initializing),A({type:ef.DragStart,initialCoordinates:e,active:t}),S({type:"onDragStart",event:i}),j(Se.current),V(s)})},onMove(e){A({type:ef.DragMove,coordinates:e})},onEnd:a(ef.DragEnd),onCancel:a(ef.DragCancel)});function a(e){return async function(){const{active:t,collisions:r,over:n,scrollAdjustedTranslate:i}=re.current;let o=null;if(t&&i){const{cancelDrop:a}=B.current;if(o={activatorEvent:s,active:t,collisions:r,delta:i,over:n},e===ef.DragEnd&&"function"==typeof a){await Promise.resolve(a(o))&&(e=ef.DragCancel)}}F.current=null,b(()=>{A({type:e}),O(wp.Uninitialized),Ee(null),j(null),V(null),Se.current=null;const t=e===ef.DragEnd?"onDragEnd":"onDragCancel";if(o){const e=B.current[t];null==e||e(o),S({type:t,event:o})}})}}Se.current=o},[N]),ke=i((e,t)=>(r,n)=>{const i=r.nativeEvent,s=N.get(n);if(null!==F.current||!s||i.dndKit||i.defaultPrevented)return;const o={active:s};!0===e(r,t.options,o)&&(i.dndKit={capturedBy:t.sensor},F.current=n,Te(r,t))},[N,Te]),Oe=function(e,t){return l(()=>e.reduce((e,r)=>{const{sensor:n}=r;return[...e,...n.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,r)}))]},[]),[e,t])}(m,ke);!function(e){s(()=>{if(!Ed)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),Nd(()=>{ee&&k===wp.Initializing&&O(wp.Initialized)},[ee,k]),s(()=>{const{onDragMove:e}=B.current,{active:t,activatorEvent:r,collisions:n,over:i}=re.current;if(!t||!r)return;const s={active:t,activatorEvent:r,collisions:n,delta:{x:ye.x,y:ye.y},over:i};b(()=>{null==e||e(s),S({type:"onDragMove",event:s})})},[ye.x,ye.y]),s(()=>{const{active:e,activatorEvent:t,collisions:r,droppableContainers:n,scrollAdjustedTranslate:i}=re.current;if(!e||null==F.current||!t||!i)return;const{onDragOver:s}=B.current,o=n.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:r,delta:{x:i.x,y:i.y},over:a};b(()=>{Ee(a),null==s||s(l),S({type:"onDragOver",event:l})})},[xe]),Nd(()=>{re.current={activatorEvent:U,active:I,activeNode:X,collisionRect:ve,collisions:be,droppableRects:H,draggableNodes:N,draggingNode:se,draggingNodeRect:oe,droppableContainers:M,over:we,scrollableAncestors:he,scrollAdjustedTranslate:ye},z.current={initial:oe,translated:ve}},[I,X,be,ve,N,se,oe,H,M,we,he,ye]),Kf({...Q,delta:P,draggingRect:ve,pointerCoordinates:pe,scrollableAncestors:he,scrollableAncestorRects:de});const Re=l(()=>({active:I,activeNode:X,activeNodeRect:ee,activatorEvent:U,collisions:be,containerNodeRect:te,dragOverlay:ie,draggableNodes:N,droppableContainers:M,droppableRects:H,over:we,measureDroppableContainers:Y,scrollableAncestors:he,scrollableAncestorRects:de,measuringConfiguration:q,measuringScheduled:Z,windowRect:ce}),[I,X,ee,U,be,te,ie,N,M,H,we,Y,he,de,q,Z,ce]),Ce=l(()=>({activatorEvent:U,activators:Oe,active:I,activeNodeRect:ee,ariaDescribedById:{draggable:$},dispatch:A,draggableNodes:N,over:we,measureDroppableContainers:Y}),[U,Oe,I,ee,A,$,N,we,Y]);return t.createElement(Xd.Provider,{value:T},t.createElement(gp.Provider,{value:Ce},t.createElement(_p.Provider,{value:Re},t.createElement(xp.Provider,{value:Ae},f)),t.createElement(bp,{disabled:!1===(null==h?void 0:h.restoreFocus)})),t.createElement(Jd,{...h,hiddenTextDescribedById:$}))}),Ap=m(null),Sp="button";function Tp(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const s=Ld("Draggable"),{activators:o,activatorEvent:a,active:u,activeNodeRect:h,ariaDescribedById:d,draggableNodes:f,over:p}=c(gp),{role:m=Sp,roleDescription:g="draggable",tabIndex:_=0}=null!=i?i:{},y=(null==u?void 0:u.id)===t,v=c(y?xp:Ap),[b,x]=zd(),[w,E]=zd(),A=function(e,t){return l(()=>e.reduce((e,r)=>{let{eventName:n,handler:i}=r;return e[n]=e=>{i(e,t)},e},{}),[e,t])}(o,t),S=Md(r);Nd(()=>(f.set(t,{id:t,key:s,node:b,activatorNode:w,data:S}),()=>{const e=f.get(t);e&&e.key===s&&f.delete(t)}),[f,t]);return{active:u,activatorEvent:a,activeNodeRect:h,attributes:l(()=>({role:m,tabIndex:_,"aria-disabled":n,"aria-pressed":!(!y||m!==Sp)||void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[n,m,_,y,g,d.draggable]),isDragging:y,listeners:n?void 0:A,node:b,over:p,setNodeRef:x,setActivatorNodeRef:E,transform:v}}const kp={timeout:25};function Op(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function Rp(e,t){return e.reduce((e,r,n)=>{const i=t.get(r);return i&&(e[n]=i),e},Array(e.length))}function Cp(e){return null!==e&&e>=0}const Np=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e;const s=Op(t,n,r),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},Pp={scaleX:1,scaleY:1},Mp=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:i,rects:s,overIndex:o}=e;const a=null!=(t=s[r])?t:n;if(!a)return null;if(i===r){const e=s[o];return e?{x:0,y:r<o?e.top+e.height-(a.top+a.height):e.top-a.top,...Pp}:null}const l=function(e,t,r){const n=e[t],i=e[t-1],s=e[t+1];if(!n)return 0;if(r<t)return i?n.top-(i.top+i.height):s?s.top-(n.top+n.height):0;return s?s.top-(n.top+n.height):i?n.top-(i.top+i.height):0}(s,i,r);return i>r&&i<=o?{x:0,y:-a.height-l,...Pp}:i<r&&i>=o?{x:0,y:a.height+l,...Pp}:{x:0,y:0,...Pp}};const Dp="Sortable",zp=t.createContext({activeIndex:-1,containerId:Dp,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Np,disabled:{draggable:!1,droppable:!1}});function Ip(e){let{children:r,id:i,items:o,strategy:a=Np,disabled:u=!1}=e;const{active:h,dragOverlay:d,droppableRects:f,over:p,measureDroppableContainers:m}=c(_p),g=Ld(Dp,i),_=Boolean(null!==d.rect),y=l(()=>o.map(e=>"object"==typeof e&&"id"in e?e.id:e),[o]),v=null!=h,b=h?y.indexOf(h.id):-1,x=p?y.indexOf(p.id):-1,w=n(y),E=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(y,w.current),A=-1!==x&&-1===b||E,S=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);Nd(()=>{E&&v&&m(y)},[E,y,v,m]),s(()=>{w.current=y},[y]);const T=l(()=>({activeIndex:b,containerId:g,disabled:S,disableTransforms:A,items:y,overIndex:x,useDragOverlay:_,sortedRects:Rp(y,f),strategy:a}),[b,g,S.draggable,S.droppable,A,y,x,f,_,a]);return t.createElement(zp.Provider,{value:T},r)}const Fp=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return Op(r,n,i).indexOf(t)},Lp=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:i,items:s,newIndex:o,previousItems:a,previousContainerId:l,transition:u}=e;return!(!u||!n)&&((a===s||i!==o)&&(!!r||o!==i&&t===l))},jp={duration:200,easing:"ease"},Up="transform",Vp=Gd.Transition.toString({property:Up,duration:0,easing:"linear"}),Bp={roleDescription:"sortable"};function $p(e){let{animateLayoutChanges:t=Lp,attributes:r,disabled:o,data:a,getNewIndex:u=Fp,id:h,strategy:d,resizeObserverConfig:f,transition:m=jp}=e;const{items:g,containerId:_,activeIndex:y,disabled:v,disableTransforms:b,sortedRects:x,overIndex:w,useDragOverlay:E,strategy:A}=c(zp),S=function(e,t){var r,n;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(r=null==e?void 0:e.draggable)?r:t.draggable,droppable:null!=(n=null==e?void 0:e.droppable)?n:t.droppable}}(o,v),T=g.indexOf(h),k=l(()=>({sortable:{containerId:_,index:T,items:g},...a}),[_,a,T,g]),O=l(()=>g.slice(g.indexOf(h)),[g,h]),{rect:R,node:C,isOver:N,setNodeRef:P}=function(e){let{data:t,disabled:r=!1,id:o,resizeObserverConfig:a}=e;const l=Ld("Droppable"),{active:u,dispatch:h,over:d,measureDroppableContainers:f}=c(gp),p=n({disabled:r}),m=n(!1),g=n(null),_=n(null),{disabled:y,updateMeasurementsFor:v,timeout:b}={...kp,...a},x=Md(null!=v?v:o),w=np({callback:i(()=>{m.current?(null!=_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{f(Array.isArray(x.current)?x.current:[x.current]),_.current=null},b)):m.current=!0},[b]),disabled:y||!u}),E=i((e,t)=>{w&&(t&&(w.unobserve(t),m.current=!1),e&&w.observe(e))},[w]),[A,S]=zd(E),T=Md(t);return s(()=>{w&&A.current&&(w.disconnect(),m.current=!1,w.observe(A.current))},[A,w]),s(()=>(h({type:ef.RegisterDroppable,element:{id:o,key:l,disabled:r,node:A,rect:g,data:T}}),()=>h({type:ef.UnregisterDroppable,key:l,id:o})),[o]),s(()=>{r!==p.current.disabled&&(h({type:ef.SetDroppableDisabled,id:o,key:l,disabled:r}),p.current.disabled=r)},[o,l,r,h]),{active:u,rect:g,isOver:(null==d?void 0:d.id)===o,node:A,over:d,setNodeRef:S}}({id:h,data:k,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...f}}),{active:M,activatorEvent:D,activeNodeRect:z,attributes:I,setNodeRef:F,listeners:L,isDragging:j,over:U,setActivatorNodeRef:V,transform:B}=Tp({id:h,data:k,attributes:{...Bp,...r},disabled:S.draggable}),$=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return l(()=>e=>{t.forEach(t=>t(e))},t)}(P,F),G=Boolean(M),q=G&&!b&&Cp(y)&&Cp(w),W=!E&&j,H=W&&q?B:null,Y=q?null!=H?H:(null!=d?d:A)({rects:x,activeNodeRect:z,activeIndex:y,overIndex:w,index:T}):null,Z=Cp(y)&&Cp(w)?u({id:h,items:g,activeIndex:y,overIndex:w}):T,X=null==M?void 0:M.id,K=n({activeId:X,items:g,newIndex:Z,containerId:_}),Q=g!==K.current.items,J=t({active:M,containerId:_,isDragging:j,isSorting:G,id:h,index:T,items:g,newIndex:K.current.newIndex,previousItems:K.current.items,previousContainerId:K.current.containerId,transition:m,wasDragging:null!=K.current.activeId}),ee=function(e){let{disabled:t,index:r,node:i,rect:o}=e;const[a,l]=p(null),u=n(r);return Nd(()=>{if(!t&&r!==u.current&&i.current){const e=o.current;if(e){const t=mf(i.current,{ignoreTransform:!0}),r={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(r.x||r.y)&&l(r)}}r!==u.current&&(u.current=r)},[t,r,i,o]),s(()=>{a&&l(null)},[a]),a}({disabled:!J,index:T,node:C,rect:R});return s(()=>{G&&K.current.newIndex!==Z&&(K.current.newIndex=Z),_!==K.current.containerId&&(K.current.containerId=_),g!==K.current.items&&(K.current.items=g)},[G,Z,_,g]),s(()=>{if(X===K.current.activeId)return;if(null!=X&&null==K.current.activeId)return void(K.current.activeId=X);const e=setTimeout(()=>{K.current.activeId=X},50);return()=>clearTimeout(e)},[X]),{active:M,activeIndex:y,attributes:I,data:k,rect:R,index:T,newIndex:Z,items:g,isOver:N,isSorting:G,isDragging:j,listeners:L,node:C,overIndex:w,over:U,setNodeRef:$,setActivatorNodeRef:V,setDroppableNodeRef:P,setDraggableNodeRef:F,transform:null!=ee?ee:Y,transition:function(){if(ee||Q&&K.current.newIndex===T)return Vp;if(W&&!Bd(D)||!m)return;if(G||J)return Gd.Transition.toString({...m,property:Up});return}()}}zf.Down,zf.Right,zf.Up,zf.Left;const Gp=({id:e,sx:t,children:r})=>{const{isDragging:n}=Tp({id:e}),{attributes:i,listeners:s,setNodeRef:o,transform:a,transition:l}=$p({id:e,strategy:Mp,transition:{duration:300,easing:"cubic-bezier(0.25, 1, 0.5, 1)"}}),u={...t?.default,...n?t?.dragging:{},transform:Gd.Translate.toString(a),transition:l,cursor:"pointer"};return x(O,{ref:o,style:u,...s,...i,children:r})};function qp({items:e,getItem:t,getId:r,onDragEnd:n,sx:i,title:s,draggableSx:o}){const a=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return l(()=>[...t].filter(e=>null!=e),[...t])}(l(()=>({sensor:u,options:null!=c?c:{}}),[u=qf,c={activationConstraint:{distance:8}}]));var u,c;return x(Ep,{sensors:a,collisionDetection:lf,onDragEnd:t=>{const{active:i,over:s}=t,o=e.findIndex(e=>r(e)===i.id),a=e.findIndex(e=>r(e)===s?.id),l=Op(e,o,a);n(l)},children:x(Ip,{items:e.map(r),strategy:Mp,children:x(wd,{items:e,sx:i,title:s,getKey:r,getContent:(e,n)=>{const i=r(e);return x(Gp,{id:i,sx:o,children:t(e,n)},i)}})})})}var Wp,Hp={exports:{}},Yp={},Zp={exports:{}},Xp={exports:{}},Kp={};var Qp,Jp,em,tm,rm,nm,im,sm,om,am,lm,um,cm,hm,dm,fm={};
11
11
  /** @license React v16.13.1
12
12
  * react-is.development.js
13
13
  *