@dartcom/ui-kit 10.4.2 → 10.4.4

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.
Files changed (41) hide show
  1. package/dist/components/copy-text/styles.d.ts.map +1 -1
  2. package/dist/index.cjs +1 -0
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.esm.js +1 -1
  7. package/dist/index.esm.js.map +1 -1
  8. package/dist/shared/index.d.ts +1 -0
  9. package/dist/shared/index.d.ts.map +1 -1
  10. package/dist/shared/styles/index.d.ts +2 -0
  11. package/dist/shared/styles/index.d.ts.map +1 -0
  12. package/dist/styles.css +1 -0
  13. package/package.json +2 -1
  14. package/dist/components/form/input/input.d.ts +0 -4
  15. package/dist/components/form/input/input.d.ts.map +0 -1
  16. package/dist/components/layers/leaflet/lib/hooks/index.d.ts +0 -2
  17. package/dist/components/layers/leaflet/lib/hooks/index.d.ts.map +0 -1
  18. package/dist/components/layers/leaflet/lib/hooks/useGetLeafletLayer.d.ts +0 -37
  19. package/dist/components/layers/leaflet/lib/hooks/useGetLeafletLayer.d.ts.map +0 -1
  20. package/dist/components/layers/map-container/index.d.ts +0 -3
  21. package/dist/components/layers/map-container/index.d.ts.map +0 -1
  22. package/dist/components/layers/map-container/lib/hooks/index.d.ts +0 -3
  23. package/dist/components/layers/map-container/lib/hooks/index.d.ts.map +0 -1
  24. package/dist/components/layers/map-container/lib/hooks/useMap.d.ts +0 -2
  25. package/dist/components/layers/map-container/lib/hooks/useMap.d.ts.map +0 -1
  26. package/dist/components/layers/map-container/lib/hooks/useMapEvents.d.ts +0 -3
  27. package/dist/components/layers/map-container/lib/hooks/useMapEvents.d.ts.map +0 -1
  28. package/dist/components/layers/map-container/lib/index.d.ts +0 -3
  29. package/dist/components/layers/map-container/lib/index.d.ts.map +0 -1
  30. package/dist/components/layers/map-container/lib/types.d.ts +0 -5
  31. package/dist/components/layers/map-container/lib/types.d.ts.map +0 -1
  32. package/dist/components/layers/map-container/map-container.d.ts +0 -9
  33. package/dist/components/layers/map-container/map-container.d.ts.map +0 -1
  34. package/dist/components/layers/map-container/types.d.ts +0 -3
  35. package/dist/components/layers/map-container/types.d.ts.map +0 -1
  36. package/dist/index.css +0 -1
  37. package/dist/index.esm.css +0 -1
  38. package/dist/lib/hooks/useLogout.d.ts +0 -4
  39. package/dist/lib/hooks/useLogout.d.ts.map +0 -1
  40. package/dist/library/leaflet-textpath.d.ts +0 -1
  41. package/dist/library/leaflet-textpath.d.ts.map +0 -1
package/dist/index.esm.js CHANGED
@@ -11,7 +11,7 @@ import{useTheme as e,useMediaQuery as t,CircularProgress as n,Typography as i,Bo
11
11
  *
12
12
  * This source code is licensed under the MIT license found in the
13
13
  * LICENSE file in the root directory of this source tree.
14
- */var Lu,Nu,Du=(Mu||(Mu=1,"production"===process.env.NODE_ENV?Ou.exports=function(){if(Tu)return Pu;Tu=1;var e=S,t="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,r=e.useLayoutEffect,s=e.useDebugValue;function o(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!t(e,i)}catch(e){return!0}}var a="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var a=t(),l=n({inst:{value:a,getSnapshot:t}}),u=l[0].inst,c=l[1];return r(function(){u.value=a,u.getSnapshot=t,o(u)&&c({inst:u})},[e,a,t]),i(function(){return o(u)&&c({inst:u}),e(function(){o(u)&&c({inst:u})})},[e]),s(a),a};return Pu.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:a,Pu}():Ou.exports=(Cu||(Cu=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!n(e,i)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=t.useState,r=t.useEffect,s=t.useLayoutEffect,o=t.useDebugValue,a=!1,l=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(u,c){a||void 0===t.startTransition||(a=!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(!l){var d=c();n(h,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}var f=(d=i({inst:{value:h,getSnapshot:c}}))[0].inst,p=d[1];return s(function(){f.value=h,f.getSnapshot=c,e(f)&&p({inst:f})},[u,h,c]),r(function(){return e(f)&&p({inst:f}),u(function(){e(f)&&p({inst:f})})},[u]),o(h),h};Ru.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ru)),Ou.exports);function zu(e){e.reaction=new $r("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),null===(t=e.onStoreChange)||void 0===t||t.call(e)})}var Iu=!0,Fu="function"==typeof Symbol&&Symbol.for,ju=null!==(Nu=null===(Lu=Object.getOwnPropertyDescriptor(function(){},"name"))||void 0===Lu?void 0:Lu.configurable)&&void 0!==Nu&&Nu,Bu=Fu?Symbol.for("react.forward_ref"):"function"==typeof k&&k(function(e){return null}).$$typeof,Uu=Fu?Symbol.for("react.memo"):"function"==typeof j&&j(function(e){return null}).$$typeof;function Vu(e,t){if(process.env.NODE_ENV,Uu&&e.$$typeof===Uu)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 n=!1,i=e,r=e.displayName||e.name;if(Bu&&e.$$typeof===Bu&&(n=!0,"function"!=typeof(i=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var s,o,a=function(e,t){return function(e,t){void 0===t&&(t="observed");var n=S.useRef(null);if(!n.current){var i={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(e){return ku.unregister(i),i.onStoreChange=e,i.reaction||(zu(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 r,s,o=n.current;if(o.reaction||(zu(o),ku.register(n,o,o)),S.useDebugValue(o.reaction,Au),Du.useSyncExternalStore(o.subscribe,o.getSnapshot,o.getSnapshot),o.reaction.track(function(){try{r=e()}catch(e){s=e}}),s)throw s;return r}(function(){return i(e,t)},r)};return a.displayName=e.displayName,ju&&Object.defineProperty(a,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(a.contextTypes=e.contextTypes,"production"!==process.env.NODE_ENV&&Iu&&(Iu=!1,console.warn("[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release."))),n&&(a=k(a)),a=j(a),s=e,o=a,Object.keys(s).forEach(function(e){Gu[e]||Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(s,e))}),"production"!==process.env.NODE_ENV&&Object.defineProperty(a,"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`."))}}),a}var Gu={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};process.env.NODE_ENV,function(e){e||(e=Eu,"production"!==process.env.NODE_ENV&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),vs({reactionScheduler:e})}(W),ku.finalizeAllImmediately;var $u=Vu(({onUnauthorized:e,children:t})=>(T.useEffect(()=>{nl.isUnauthorized&&e()},[nl.isUnauthorized]),H(T.Fragment,{children:t})));function Zu(e,t){if(void 0!==e.one&&1===t)return e.one;const n=t%10,i=t%100;return 1===n&&11!==i?e.singularNominative.replace("{{count}}",String(t)):n>=2&&n<=4&&(i<10||i>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function qu(e){return(t,n)=>n?.addSuffix?n.comparison&&n.comparison>0?e.future?Zu(e.future,t):"через "+Zu(e.regular,t):e.past?Zu(e.past,t):Zu(e.regular,t)+" назад":Zu(e.regular,t)}const Wu={lessThanXSeconds:qu({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:qu({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:qu({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:qu({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:qu({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:qu({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:qu({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:qu({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:qu({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:qu({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:qu({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:qu({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:qu({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:qu({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:qu({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})},Hu={date:aa({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:aa({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:aa({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},Yu=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function Ku(e){const t=Yu[e];return 2===e?"'во "+t+" в' p":"'в "+t+" в' p"}const Xu={lastWeek:(e,t,n)=>{const i=e.getDay();return Za(e,t,n)?Ku(i):function(e){const t=Yu[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"}}(i)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:(e,t,n)=>{const i=e.getDay();return Za(e,t,n)?Ku(i):function(e){const t=Yu[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"}}(i)},other:"P"},Qu={ordinalNumber:(e,t)=>{const n=Number(e),i=t?.unit;let r;return r="date"===i?"-е":"week"===i||"minute"===i||"second"===i?"-я":"-й",n+r},era:ca({values:{narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},defaultWidth:"wide"}),quarter:ca({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:ca({values:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},defaultWidth:"wide",formattingValues:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},defaultFormattingWidth:"wide"}),day:ca({values:{narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},defaultWidth:"wide"}),dayPeriod:ca({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"})},Ju={ordinalNumber:fa({matchPattern:/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:da({matchPatterns:{narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:da({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:da({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:da({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:da({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"})},ec={code:"ru",formatDistance:(e,t,n)=>Wu[e](t,n),formatLong:Hu,formatRelative:(e,t,n,i)=>{const r=Xu[e];return"function"==typeof r?r(t,n,i):r},localize:Qu,match:Ju,options:{weekStartsOn:1,firstWeekContainsDate:1}},tc=e=>H(X,{...e,dateAdapter:Q,adapterLocale:ec}),nc=e=>H(n,{...e}),ic=({children:e,configOptions:t})=>{const[n,r]=T.useState(null),[s,o]=T.useState("");return T.useEffect(()=>(cl.initialize({...t,onCheck:e=>{const{valid:n,reason:i}=e;o(i),r(n),t.onCheck?.(e)}}),()=>{cl.deactivate()}),[t]),null===n?H(nc,{color:"primary"}):n?H(T.Fragment,{children:e}):H(i,{color:"error",children:s})},rc=({children:e})=>{const[t,n]=T.useState(!1);return T.useEffect(()=>{(async()=>{try{await Promise.resolve().then(function(){return Fx}),await Promise.resolve().then(function(){return Bx}),await Promise.resolve().then(function(){return $x}),await Promise.resolve().then(function(){return Wx}),await Promise.resolve().then(function(){return ew}),await Promise.resolve().then(function(){return iw}),n(!0)}catch{n(!1)}})()},[]),t?H(T.Fragment,{children:e}):null},sc=new class{#W;#j;#d;#H;#Y;#K;#X;#Q;constructor(e={}){this.#W=e.queryCache||new uu,this.#j=e.mutationCache||new ou,this.#d=e.defaultOptions||{},this.#H=new Map,this.#Y=new Map,this.#K=0}mount(){this.#K++,1===this.#K&&(this.#X=Il.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#W.onFocus())}),this.#Q=Ul.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#W.onOnline())}))}unmount(){this.#K--,0===this.#K&&(this.#X?.(),this.#X=void 0,this.#Q?.(),this.#Q=void 0)}isFetching(e){return this.#W.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.#W.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#W.build(this,t),i=n.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(yl(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#W.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),r=this.#W.get(i.queryHash),s=r?.state.data,o=function(e,t){return"function"==typeof e?e(t):e}(t,s);if(void 0!==o)return this.#W.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Bl.batch(()=>this.#W.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#W.get(t.queryHash)?.state}removeQueries(e){const t=this.#W;Bl.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const n=this.#W;return Bl.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Bl.batch(()=>this.#W.findAll(e).map(e=>e.cancel(n)));return Promise.all(i).then(ml).catch(ml)}invalidateQueries(e,t={}){return Bl.batch(()=>(this.#W.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 n={...t,cancelRefetch:t.cancelRefetch??!0},i=Bl.batch(()=>this.#W.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(ml)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(i).then(ml)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=this.#W.build(this,t);return n.isStaleByTime(yl(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ml).catch(ml)}fetchInfiniteQuery(e){return e.behavior=nu(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ml).catch(ml)}ensureInfiniteQueryData(e){return e.behavior=nu(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ul.isOnline()?this.#j.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#W}getMutationCache(){return this.#j}getDefaultOptions(){return this.#d}setDefaultOptions(e){this.#d=e}setQueryDefaults(e,t){this.#H.set(El(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#H.values()],n={};return t.forEach(t=>{Al(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#Y.set(El(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#Y.values()],n={};return t.forEach(t=>{Al(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#d.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=wl(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===Nl&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#d.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#W.clear(),this.#j.clear()}},oc=e=>H(du,{...e,client:sc}),ac=({children:e,themeOptions:t})=>{const n=J(t);return H(ee,{theme:n,children:e})},lc=({children:e,configOptions:t,themeOptions:n})=>H(un,{children:H(oc,{children:H(ll,{children:H(ac,{themeOptions:n,children:H(tc,{children:H(rc,{children:H(ic,{configOptions:t,children:e})})})})})})}),uc=()=>gu({mutationKey:["logout-mutation"],mutationFn:async e=>await cl.instance.apiService.post({url:"logout"}),onError:xu(),onSuccess:()=>{sc.invalidateQueries({queryKey:["user"]})}});var cc,hc,dc,fc;!function(e){e.GET="GET",e.DELETE="DELETE",e.PUT="PUT",e.POST="POST"}(cc||(cc={})),function(e){e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e.TOP_LEFT="top-left"}(hc||(hc={}));var pc,mc,_c=function(){if(fc)return dc;function e(e){this._maxSize=e,this.clear()}fc=1,e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(e){return this._values[e]},e.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,i=/^\d/,r=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/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(i)&&!e.match(n)}(e)||function(e){return r.test(e)}(e))}return dc={Cache:e,split:c,normalizePath:u,setter:function(e){var t=u(e);return a.get(e)||a.set(e,function(e,n){for(var i=0,r=t.length,s=e;i<r-1;){var o=t[i];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;s=s[t[i++]]}s[t[i]]=n})},getter:function(e,t){var n=u(e);return l.get(e)||l.set(e,function(e){for(var i=0,r=n.length;i<r;){if(null==e&&t)return;e=e[n[i++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(h(t)||n.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var i,r,s,o,a=e.length;for(r=0;r<a;r++)(i=e[r])&&(d(i)&&(i='"'+i+'"'),s=!(o=h(i))&&/^\d+$/.test(i),t.call(n,i,o,s,r,e))}(Array.isArray(e)?e:c(e),t,n)}},dc}();var gc,yc=function(){if(mc)return pc;mc=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=t=>t.match(e)||[],n=e=>e[0].toUpperCase()+e.slice(1),i=(e,n)=>t(e).join(n).toLowerCase(),r=e=>t(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,"");return pc={words:t,upperFirst:n,camelCase:r,pascalCase:e=>n(r(e)),snakeCase:e=>i(e,"_"),kebabCase:e=>i(e,"-"),sentenceCase:e=>n(i(e," ")),titleCase:e=>t(e).map(n).join(" ")}}(),vc={exports:{}};var bc=function(){if(gc)return vc.exports;function e(e,t){var n=e.length,i=new Array(n),r={},s=n,o=function(e){for(var t=new Map,n=0,i=e.length;n<i;n++){var r=e[n];t.has(r[0])||t.set(r[0],new Set),t.has(r[1])||t.set(r[1],new Set),t.get(r[0]).add(r[1])}return t}(t),a=function(e){for(var t=new Map,n=0,i=e.length;n<i;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!a.has(e[0])||!a.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)r[s]||l(e[s],s,new Set);return i;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(!r[t]){r[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)}i[--n]=e}}}return gc=1,vc.exports=function(t){return e(function(e){for(var t=new Set,n=0,i=e.length;n<i;n++){var r=e[n];t.add(r[0]),t.add(r[1])}return Array.from(t)}(t),t)},vc.exports.array=e,vc.exports}(),xc=Ee(bc);const wc=Object.prototype.toString,Ec=Error.prototype.toString,Ac=RegExp.prototype.toString,Tc="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",Sc=/^Symbol\((.*)\)(.*)$/;function kc(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return Tc.call(e).replace(Sc,"Symbol($1)");const i=wc.call(e).slice(8,-1);return"Date"===i?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===i||e instanceof Error?"["+Ec.call(e)+"]":"RegExp"===i?Ac.call(e):null}function Oc(e,t){let n=kc(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let i=kc(this[e],t);return null!==i?i:n},2)}function Pc(e){return null==e?[]:[].concat(e)}let Cc,Mc,Rc,Lc=/\$\{\s*(\w+)\s*\}/g;Cc=Symbol.toStringTag;class Nc{constructor(e,t,n,i){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[Cc]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=i,this.errors=[],this.inner=[],Pc(e).forEach(e=>{if(Dc.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]}}Mc=Symbol.hasInstance,Rc=Symbol.toStringTag;class Dc extends Error{static formatError(e,t){const n=t.label||t.path||"this";return t=Object.assign({},t,{path:n,originalPath:t.path}),"string"==typeof e?e.replace(Lc,(e,n)=>Oc(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,i,r){const s=new Nc(e,t,n,i);if(r)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Rc]="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,Dc)}static[Mc](e){return Nc[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let zc={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:i})=>{const r=null!=i&&i!==n?` (cast from the value \`${Oc(i,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${Oc(n,!0)}\``+r:`${e} must match the configured type. The validated value was: \`${Oc(n,!0)}\``+r}},Ic={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"},Fc={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"},jc={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Bc={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Uc={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"},Vc={notType:e=>{const{path:t,value:n,spec:i}=e,r=i.types.length;if(Array.isArray(n)){if(n.length<r)return`${t} tuple value has too few items, expected a length of ${r} but got ${n.length} for value: \`${Oc(n,!0)}\``;if(n.length>r)return`${t} tuple value has too many items, expected a length of ${r} but got ${n.length} for value: \`${Oc(n,!0)}\``}return Dc.formatError(zc.notType,e)}};Object.assign(Object.create(null),{mixed:zc,string:Ic,number:Fc,date:jc,object:Bc,array:Uc,boolean:{isValue:"${path} field must be ${value}"},tuple:Vc});const Gc=e=>e&&e.__isYupSchema__;class $c{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:r}=t,s="function"==typeof n?n:(...e)=>e.every(e=>e===n);return new $c(e,(e,t)=>{var n;let o=s(...e)?i:r;return null!=(n=null==o?void 0:o(t))?n:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),i=this.fn(n,e,t);if(void 0===i||i===e)return e;if(!Gc(i))throw new TypeError("conditions must return a schema object");return i.resolve(t)}}const Zc="$",qc=".";class Wc{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]===Zc,this.isValue=this.key[0]===qc,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Zc:this.isValue?qc:"";this.path=this.key.slice(n.length),this.getter=this.path&&_c.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let i=this.isContext?n:this.isValue?e:t;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}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}}Wc.prototype.__isYupRef=!0;const Hc=e=>null==e;function Yc(e){function t({value:t,path:n="",options:i,originalValue:r,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:_=s.spec.disableStackTrace}=i;const g={value:t,parent:f,context:p};function y(e={}){const i=Kc(Object.assign({value:t,originalValue:r,label:s.spec.label,path:e.path||n,spec:s.spec,disableStackTrace:e.disableStackTrace||_},c,e.params),g),o=new Dc(Dc.formatError(e.message||h,i),t,i.path,e.type||l,i.disableStackTrace);return o.params=i,o}const v=m?o:a;let b={path:n,parent:f,type:l,from:i.from,createError:y,resolve:e=>Xc(e,g),options:i,originalValue:r,schema:s};const x=e=>{Dc.isError(e)?v(e):e?a(null):v(y())},w=e=>{Dc.isError(e)?v(e):o(e)};if(d&&Hc(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(i.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 Kc(e,t){if(!e)return e;for(const n of Object.keys(e))e[n]=Xc(e[n],t);return e}function Xc(e,t){return Wc.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function Qc(e,t,n,i=n){let r,s,o;return t?(_c.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a,h="tuple"===(e=e.resolve({context:i,parent:r,value:n})).type,d=u?parseInt(c,10):0;if(e.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);r=n,n=n&&n[d],e=h?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);r=n,n=n&&n[c],e=e.fields[c]}s=c,o=l?"["+a+"]":"."+a}),{schema:e,parent:r,parentPath:s}):{parent:r,parentPath:t,schema:e}}class Jc extends Set{describe(){const e=[];for(const t of this.values())e.push(Wc.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new Jc(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function eh(e,t=new Map){if(Gc(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let i=0;i<e.length;i++)n[i]=eh(e[i],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[i,r]of e.entries())n.set(i,eh(r,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const i of e)n.add(eh(i,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[i,r]of Object.entries(e))n[i]=eh(r,t)}return n}function th(e){if(null==e||!e.length)return;const t=[];let n="",i=!1,r=!1;for(let s=0;s<e.length;s++){const o=e[s];"["!==o||r?"]"!==o||r?'"'!==o?"."!==o||i||r?n+=o:n&&(t.push(n),n=""):r=!r:(n&&(/^\d+$/.test(n)?t.push(n):t.push(n.replace(/^"|"$/g,"")),n=""),i=!1):(n&&(t.push(...n.split(".").filter(Boolean)),n=""),i=!0)}return n&&t.push(...n.split(".").filter(Boolean)),t}function nh(e,t){var n;if((null==(n=e.inner)||!n.length)&&e.errors.length)return function(e,t){const n=t?`${t}.${e.path}`:e.path;return e.errors.map(e=>({message:e,path:th(n)}))}(e,t);const i=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>nh(e,i))}class ih{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 Jc,this._blacklist=new Jc,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(zc.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=eh(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const i=Object.assign({},t.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,i,r;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(i=e.recursive)?i:this.spec.recursive,disableStackTrace:null!=(r=e.disableStackTrace)?r:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({},t,{value:e})),i="ignore-optionality"===t.assert,r=n._cast(e,t);if(!1!==t.assert&&!n.isType(r)){if(i&&Hc(r))return r;let s=Oc(e),o=Oc(r);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${s} \n`+(o!==s?`result of cast: ${o}`:""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((n,i)=>i.call(this,n,e,this,t),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,i){let{path:r,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:r,value:a,originalValue:s,options:t,tests:l},n,e=>{if(e.length)return i(e,a);this.runTests({path:r,value:a,originalValue:s,options:t,tests:this.tests},n,i)})}runTests(e,t,n){let i=!1,{tests:r,value:s,originalValue:o,path:a,options:l}=e,u=e=>{i||(i=!0,t(e,s))},c=e=>{i||(i=!0,n(e,s))},h=r.length,d=[];if(!h)return c([]);let f={value:s,originalValue:o,path:a,options:l,schema:this};for(let e=0;e<r.length;e++){(0,r[e])(f,u,function(e){e&&(Array.isArray(e)?d.push(...e):d.push(e)),--h<=0&&c(d)})}}asNestedTest({key:e,index:t,parent:n,parentPath:i,originalParent:r,options:s}){const o=null!=e?e:t;if(null==o)throw TypeError("Must include `key` or `index` for nested validations");const a="number"==typeof o;let l=n[o];const u=Object.assign({},s,{strict:!0,parent:n,value:l,originalValue:r[o],key:void 0,[a?"index":"key"]:o,path:a||o.includes(".")?`${i||""}[${a?o:`"${o}"`}]`:(i?`${i}.`:"")+e});return(e,t,n)=>this.resolve(u)._validate(l,u,t,n)}validate(e,t){var n;let i=this.resolve(Object.assign({},t,{value:e})),r=null!=(n=null==t?void 0:t.disableStackTrace)?n:i.spec.disableStackTrace;return new Promise((n,s)=>i._validate(e,t,(e,t)=>{Dc.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new Dc(e,t,void 0,void 0,r)):n(t)}))}validateSync(e,t){var n;let i,r=this.resolve(Object.assign({},t,{value:e})),s=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return r._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw Dc.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new Dc(t,e,void 0,void 0,s);i=n}),i}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(Dc.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(Dc.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):eh(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=Yc({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=Yc({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=zc.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=zc.notNull){return this.nullability(!1,e)}required(e=zc.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=zc.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),i=Yc(t),r=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(r)return!1;if(e.OPTIONS.test===i.OPTIONS.test)return!1}return!0}),n.tests.push(i),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),i=Pc(e).map(e=>new Wc(e));return i.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new $c(i,t):$c.fromOptions(i,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=Yc({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=zc.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=Yc({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=zc.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=Yc({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:i,optional:r,nullable:s}=t.spec,o={meta:i,label:n,optional:r,nullable:s,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.filter((e,t,n)=>n.findIndex(t=>t.OPTIONS.name===e.OPTIONS.name)===t).map(t=>{const n=t.OPTIONS.params&&e?Kc(Object.assign({},t.OPTIONS.params),e):t.OPTIONS.params;return{name:t.OPTIONS.name,params:n}})};return o}get"~standard"(){const e=this,t={version:1,vendor:"yup",async validate(t){try{return{value:await e.validate(t,{abortEarly:!1})}}catch(e){if(e instanceof Dc)return{issues:nh(e)};throw e}}};return t}}ih.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])ih.prototype[`${e}At`]=function(t,n,i={}){const{parent:r,parentPath:s,schema:o}=Qc(this,t,n,i.context);return o[e](r&&r[s],Object.assign({},i,{parent:r,path:t}))};for(const e of["equals","is"])ih.prototype[e]=ih.prototype.oneOf;for(const e of["not","nope"])ih.prototype[e]=ih.prototype.notOneOf;const rh=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function sh(e){var t,n;const i=rh.exec(e);return i?{year:oh(i[1]),month:oh(i[2],1)-1,day:oh(i[3],1),hour:oh(i[4]),minute:oh(i[5]),second:oh(i[6]),millisecond:i[7]?oh(i[7].substring(0,3)):0,precision:null!=(t=null==(n=i[7])?void 0:n.length)?t:void 0,z:i[8]||void 0,plusMinus:i[9]||void 0,hourOffset:oh(i[10]),minuteOffset:oh(i[11])}:null}function oh(e,t=0){return Number(e)||t}let ah=/^[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])?)*$/,lh=/^((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,uh=/^(?:[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,ch=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),hh=e=>Hc(e)||e===e.trim(),dh={}.toString();function fh(){return new ph}class ph extends ih{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce||this.isType(e))return e;if(Array.isArray(e))return e;const n=null!=e&&e.toString?e.toString():e;return n===dh?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||zc.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=Ic.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=Ic.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=Ic.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,i,r=!1;return t&&("object"==typeof t?({excludeEmptyString:r=!1,message:n,name:i}=t):n=t),this.test({name:i||"matches",message:n||Ic.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&r||-1!==t.search(e)})}email(e=Ic.email){return this.matches(ah,{name:"email",message:e,excludeEmptyString:!0})}url(e=Ic.url){return this.matches(lh,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Ic.uuid){return this.matches(uh,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,i="";return e&&("object"==typeof e?({message:i="",allowOffset:t=!1,precision:n}=e):i=e),this.matches(ch,{name:"datetime",message:i||Ic.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:i||Ic.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=sh(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:i||Ic.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=sh(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=Ic.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:hh})}lowercase(e=Ic.lowercase){return this.transform(e=>Hc(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Hc(e)||e===e.toLowerCase()})}uppercase(e=Ic.uppercase){return this.transform(e=>Hc(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Hc(e)||e===e.toUpperCase()})}}fh.prototype=ph.prototype;function mh(){return new _h}class _h extends ih{constructor(){super({type:"number",check:e=>(e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!(e=>e!=+e)(e))}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce)return e;let n=e;if("string"==typeof n){if(n=n.replace(/\s/g,""),""===n)return NaN;n=+n}return this.isType(n)||null===n?n:parseFloat(n)})})}min(e,t=Fc.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=Fc.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=Fc.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=Fc.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(e=Fc.positive){return this.moreThan(0,e)}negative(e=Fc.negative){return this.lessThan(0,e)}integer(e=Fc.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(e=>Hc(e)?e:0|e)}round(e){var t;let n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>Hc(t)?t:Math[e](t))}}mh.prototype=_h.prototype;let gh=new Date("");function yh(){return new vh}class vh extends ih{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=sh(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?vh.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(Wc.isRef(e))n=e;else{let i=this.cast(e);if(!this._typeCheck(i))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(e,t=jc.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=jc.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function bh(e,t){let n=1/0;return e.some((e,i)=>{var r;if(null!=(r=t.path)&&r.includes(e))return n=i,!0}),n}function xh(e){return(t,n)=>bh(e,t)-bh(e,n)}vh.INVALID_DATE=gh,yh.prototype=vh.prototype,yh.INVALID_DATE=gh;const wh=(e,t,n)=>{if("string"!=typeof e)return e;let i=e;try{i=JSON.parse(e)}catch(e){}return n.isType(i)?i:e};function Eh(e){if("fields"in e){const t={};for(const[n,i]of Object.entries(e.fields))t[n]=Eh(i);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=Eh(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Eh)}):"optional"in e?e.optional():e}let Ah=e=>"[object Object]"===Object.prototype.toString.call(e);function Th(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const Sh=xh([]);function kh(e){return new Oh(e)}class Oh extends ih{constructor(e){super({type:"object",check:e=>Ah(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=Sh,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let i=super._cast(e,t);if(void 0===i)return this.getDefault(t);if(!this._typeCheck(i))return i;let r=this.fields,s=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(i).filter(e=>!this._nodes.includes(e))),a={},l=Object.assign({},t,{parent:a,__validating:t.__validating||!1}),u=!1;for(const e of o){let n=r[e],o=e in i,c=i[e];if(n){let r;l.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:c,context:t.context,parent:a});let s=n instanceof ih?n.spec:void 0,o=null==s?void 0:s.strict;if(null!=s&&s.strip){u=u||e in i;continue}r=t.__validating&&o?c:n.cast(c,l),void 0!==r&&(a[e]=r)}else o&&!s&&(a[e]=c);o===e in a&&a[e]===c||(u=!0)}return u?a:i}_validate(e,t={},n,i){let{from:r=[],originalValue:s=e,recursive:o=this.spec.recursive}=t;t.from=[{schema:this,value:s},...r],t.__validating=!0,t.originalValue=s,super._validate(e,t,n,(e,r)=>{if(!o||!Ah(r))return void i(e,r);s=s||r;let a=[];for(let e of this._nodes){let n=this.fields[e];n&&!Wc.isRef(n)&&a.push(n.asNestedTest({options:t,key:e,parent:r,parentPath:t.path,originalParent:s}))}this.runTests({tests:a,value:r,originalValue:s,options:t},n,t=>{i(t.sort(this._sortErrors).concat(e),r)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const i=n[e];n[e]=void 0===i?t:i}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(n=>{var i;const r=this.fields[n];let s=e;null!=(i=s)&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),t[n]=r&&"getDefault"in r?r.getDefault(s):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],i=new Set,r=new Set(t.map(([e,t])=>`${e}-${t}`));function s(e,t){let s=_c.split(e)[0];i.add(s),r.has(`${t}-${s}`)||n.push([t,s])}for(const t of Object.keys(e)){let n=e[t];i.add(t),Wc.isRef(n)&&n.isSibling?s(n.path,t):Gc(n)&&"deps"in n&&n.deps.forEach(e=>s(e,t))}return xc.array(Array.from(i),n).reverse()}(e,t),n._sortErrors=xh(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),i=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),i)})}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return Eh(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let i=_c.getter(e,!0);return this.transform(r=>{if(!r)return r;let s=r;return((e,t)=>{const n=[..._c.normalizePath(t)];if(1===n.length)return n[0]in e;let i=n.pop(),r=_c.getter(_c.join(n),!0)(e);return!(!r||!(i in r))})(r,e)&&(s=Object.assign({},r),n||delete s[e],s[t]=i(r)),s})}json(){return this.transform(wh)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Bc.exact,test(e){if(null==e)return!0;const t=Th(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Bc.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=Th(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=Bc.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const n={};for(const i of Object.keys(t))n[e(i)]=t[i];return n})}camelCase(){return this.transformKeys(yc.camelCase)}snakeCase(){return this.transformKeys(yc.snakeCase)}constantCase(){return this.transformKeys(e=>yc.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[r,s]of Object.entries(t.fields)){var i;let t=e;null!=(i=t)&&i.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[r]})),n.fields[r]=s.describe(t)}return n}}function Ph(e){return new Ch(e)}kh.prototype=Oh.prototype;class Ch extends ih{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let i=!1;const r=n.map((e,r)=>{const s=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${r}]`,parent:n,originalValue:e,value:e,index:r}));return s!==e&&(i=!0),s});return i?r:n}_validate(e,t={},n,i){var r;let s=this.innerType,o=null!=(r=t.recursive)?r:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,n,(r,a)=>{var l;if(!o||!s||!this._typeCheck(a))return void i(r,a);let u=new Array(a.length);for(let n=0;n<a.length;n++){var c;u[n]=s.asNestedTest({options:t,index:n,parent:a,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:a,tests:u,originalValue:null!=(l=t.originalValue)?l:e,options:t},n,e=>i(e.concat(r),a))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(wh)}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(!Gc(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Oc(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=Uc.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||Uc.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||Uc.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,i)=>!e(t,n,i):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);if(t.innerType){var i;let r=e;null!=(i=r)&&i.value&&(r=Object.assign({},r,{parent:r.value,value:r.value[0]})),n.innerType=t.innerType.describe(r)}return n}}Ph.prototype=Ch.prototype;const Mh="Данное поле обязательно для заполнения",Rh=()=>fh(),Lh=(e=Mh)=>Rh().required(e),Nh=mh(),Dh=Nh.required(Mh),zh=Ph(),Ih=yh(),Fh=Ih.required(Mh),jh=({items:e,onOpen:t,defaultValue:n=null})=>{const[i,l]=T.useState(n),u=T.useCallback(()=>{l(null)},[]);T.useEffect(()=>{n&&l(n)},[n]);const c=T.useId();return H(r,{id:c,children:e.map(({value:e,summary:n,getDetails:r})=>{const h=`${c}-accordion-${e}`;return Y(s,{expanded:e===i,children:[H(o,{expandIcon:H(ne,{}),onClick:()=>{l(n=>n===e?null:(t?.(e),e))},"aria-controls":`${h}-content`,id:`${h}-header`,children:n}),H(a,{children:r({onClose:u})})]},h)})})},Bh=e=>{const{children:t,variant:n="contained",loading:i,icon:r,sx:s,...o}=e;return r?H(ie,{...o,loading:i,children:r}):H(l,{sx:{whiteSpace:"nowrap",padding:"5px 15px",textTransform:"none",...s},loading:i,loadingPosition:"start",variant:n,...o,children:t})},Uh={reset:le,edit:oe,move:ae,save:ue,delete:se,clear:re},Vh=u(c)(()=>({padding:0})),Gh=({title:e,iconProps:t,...n})=>{const i=T.useId(),r=Uh[t.name],s=t.color??"primary";return e?H(h,{title:e,children:H(Vh,{id:i,...n,onClick:e=>{e.stopPropagation(),n.onClick?.(e)},children:H(r,{fontSize:"medium",color:s})})}):H(Vh,{id:i,...n,onClick:e=>{e.stopPropagation(),n.onClick?.(e)},children:H(r,{fontSize:"medium",color:s})})},$h=T.forwardRef(function(e,t){return H(d,{direction:"up",ref:t,...e})}),Zh=({notification:e,onDelete:t,disabled:n=!1,...i})=>{const r=T.useId(),[s,o]=T.useState(!1),a=()=>{o(!1)},u=T.useMemo(()=>({name:"delete",color:n?"disabled":"error"}),[n]);return Y(T.Fragment,{children:[e?H(h,{title:e.title,children:H(Gh,{...i,iconProps:u,onClick:()=>{o(!0)},disabled:n})}):H(Gh,{...i,iconProps:u,onClick:t,disabled:n}),e?Y(f,{slots:{transition:$h},open:s,onClose:a,children:[H(p,{id:`${r}-dialog-title`,children:e.title}),H(m,{children:H(_,{id:`${r}-dialog-text`,children:e.description})}),Y(g,{children:[H(l,{variant:"contained",color:"error",sx:{textTransform:"none"},onClick:a,children:"Отмена"}),H(l,{variant:"contained",sx:{textTransform:"none"},onClick:()=>{t(),a()},children:"Подтвердить"})]})]}):null]})},qh=u("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),Wh=({children:e,accept:t,onFilesLoad:n,...i})=>Y(Bh,{...i,component:"label",variant:"contained",startIcon:H(ce,{}),children:[e,H(qh,{type:"file",accept:t,onChange:e=>{const{target:{files:t}}=e;t&&n({event:e,files:t})},multiple:!0})]});var Hh=Vu(({name:e,title:t,description:n,onSuccess:i,onOpen:r,onClose:s,theme:o="info",agreeButton:a,disagreeButton:l,content:u})=>{const c=T.useId(),h=T.useId(),d=T.useId(),v=Zo.getIsOpen(e),b=()=>{Zo.close(e)};return T.useEffect(()=>{v?r?.():s?.()},[v]),Y(f,{id:c,open:v,onClose:b,"aria-labelledby":h,"aria-describedby":d,children:[H(p,{id:h,sx:({palette:e})=>({background:e[o].main,color:e[o].contrastText}),children:t}),H(y,{}),Y(m,{sx:({spacing:e})=>({display:"grid",gap:e(2)}),children:[H(_,{id:d,children:n}),u?Y(T.Fragment,{children:[H(y,{}),u]}):null]}),H(y,{}),Y(g,{children:[H(Bh,{color:"error",onClick:b,disabled:l?.disabled,children:l?.text??"Закрыть"}),H(Bh,{color:"success",onClick:()=>{i(),b()},disabled:a?.disabled,children:a?.text??"Подтвердить"})]})]})});const Yh=({children:e,sx:t,...n})=>H(r,{...n,sx:e=>{const{spacing:n,breakpoints:i}=e;return{p:n(2),borderRadius:"12px",boxShadow:"\n 0 1px 2px rgba(0, 0, 0, 0.08),\n 0 2px 4px rgba(0, 0, 0, 0.08),\n 0 4px 8px rgba(0, 0, 0, 0.08),\n 0 8px 16px rgba(0, 0, 0, 0.08),\n 0 16px 32px rgba(0, 0, 0, 0.08)\n ",maxHeight:"80vh",maxWidth:"80vw",overflowX:"auto",[i.down("sm")]:{maxWidth:"100%",maxHeight:"100%"},...t?.(e)}},children:e});var Kh=e=>"checkbox"===e.type,Xh=e=>e instanceof Date,Qh=e=>null==e;const Jh=e=>"object"==typeof e;var ed=e=>!Qh(e)&&!Array.isArray(e)&&Jh(e)&&!Xh(e),td=e=>ed(e)&&e.target?Kh(e.target)?e.target.checked:e.target.value:e,nd=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),id="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function rd(e){if(e instanceof Date)return new Date(e);const t="undefined"!=typeof FileList&&e instanceof FileList;if(id&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!(n||ed(e)&&(e=>{const t=e.constructor&&e.constructor.prototype;return ed(t)&&t.hasOwnProperty("isPrototypeOf")})(e)))return e;const i=n?[]:Object.create(Object.getPrototypeOf(e));for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=rd(e[t]));return i}var sd=e=>/^\w*$/.test(e),od=e=>void 0===e,ad=e=>Array.isArray(e)?e.filter(Boolean):[],ld=e=>ad(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ud=(e,t,n)=>{if(!t||!ed(e))return n;const i=(sd(t)?[t]:ld(t)).reduce((e,t)=>Qh(e)?e:e[t],e);return od(i)||i===e?od(e[t])?n:e[t]:i},cd=e=>"boolean"==typeof e,hd=e=>"function"==typeof e,dd=(e,t,n)=>{let i=-1;const r=sd(t)?[t]:ld(t),s=r.length,o=s-1;for(;++i<s;){const t=r[i];let s=n;if(i!==o){const n=e[t];s=ed(n)||Array.isArray(n)?n:isNaN(+r[i+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=s,e=e[t]}};const fd="blur",pd="focusout",md="change",_d="onBlur",gd="onChange",yd="onSubmit",vd="onTouched",bd="all",xd="max",wd="min",Ed="maxLength",Ad="minLength",Td="pattern",Sd="required",kd="validate",Od=S.createContext(null);Od.displayName="HookFormControlContext";const Pd=()=>S.useContext(Od);var Cd=(e,t,n,i=!0)=>{const r={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(r,s,{get:()=>{const r=s;return t._proxyFormState[r]!==bd&&(t._proxyFormState[r]=!i||bd),n&&(n[r]=!0),e[r]}});return r};const Md="undefined"!=typeof window?S.useLayoutEffect:S.useEffect;var Rd=e=>"string"==typeof e,Ld=(e,t,n,i,r)=>Rd(e)?(i&&t.watch.add(e),ud(n,e,r)):Array.isArray(e)?e.map(e=>(i&&t.watch.add(e),ud(n,e))):(i&&(t.watchAll=!0),n),Nd=e=>Qh(e)||!Jh(e);function Dd(e,t,n=new WeakSet){if(Nd(e)||Nd(t))return Object.is(e,t);if(Xh(e)&&Xh(t))return Object.is(e.getTime(),t.getTime());const i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of i){const i=e[s];if(!r.includes(s))return!1;if("ref"!==s){const e=t[s];if(Xh(i)&&Xh(e)||ed(i)&&ed(e)||Array.isArray(i)&&Array.isArray(e)?!Dd(i,e,n):!Object.is(i,e))return!1}}return!0}function zd(e){const t=Pd(),{name:n,disabled:i,control:r=t,shouldUnregister:s,defaultValue:o,exact:a=!0}=e,l=nd(r._names.array,n),u=S.useMemo(()=>ud(r._formValues,n,ud(r._defaultValues,n,o)),[r,n,o]),c=function(e){const t=Pd(),{control:n=t,name:i,defaultValue:r,disabled:s,exact:o,compute:a}=e||{},l=S.useRef(r),u=S.useRef(a),c=S.useRef(void 0),h=S.useRef(n),d=S.useRef(i);u.current=a;const[f,p]=S.useState(()=>{const e=n._getWatch(i,l.current);return u.current?u.current(e):e}),m=S.useCallback(e=>{const t=Ld(i,n._names,e||n._formValues,!1,l.current);return u.current?u.current(t):t},[n._formValues,n._names,i]),_=S.useCallback(e=>{if(!s){const t=Ld(i,n._names,e||n._formValues,!1,l.current);if(u.current){const e=u.current(t);Dd(e,c.current)||(p(e),c.current=e)}else p(t)}},[n._formValues,n._names,s,i]);Md(()=>(h.current===n&&Dd(d.current,i)||(h.current=n,d.current=i,_()),n._subscribe({name:i,formState:{values:!0},exact:o,callback:e=>{_(e.values)}})),[n,o,i,_]),S.useEffect(()=>n._removeUnmounted());const g=h.current!==n,y=d.current,v=S.useMemo(()=>{if(s)return null;const e=!g&&!Dd(y,i);return g||e?m():null},[s,g,i,y,m]);return null!==v?v:f}({control:r,name:n,defaultValue:u,exact:a}),h=function(e){const t=Pd(),{control:n=t,disabled:i,name:r,exact:s}=e||{},[o,a]=S.useState(n._formState),l=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Md(()=>n._subscribe({name:r,formState:l.current,exact:s,callback:e=>{!i&&a({...n._formState,...e})}}),[r,i,s]),S.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),S.useMemo(()=>Cd(o,n,l.current,!1),[o,n])}({control:r,name:n,exact:a}),d=S.useRef(e),f=S.useRef(void 0),p=S.useRef(r.register(n,{...e.rules,value:c,...cd(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;const m=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ud(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!ud(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!ud(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!ud(h.validatingFields,n)},error:{enumerable:!0,get:()=>ud(h.errors,n)}}),[h,n]),_=S.useCallback(e=>p.current.onChange({target:{value:td(e),name:n},type:md}),[n]),g=S.useCallback(()=>p.current.onBlur({target:{value:ud(r._formValues,n),name:n},type:fd}),[n,r._formValues]),y=S.useCallback(e=>{const t=ud(r._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>hd(e.focus)&&e.focus(),select:()=>hd(e.select)&&e.select(),setCustomValidity:t=>hd(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>hd(e.reportValidity)&&e.reportValidity()})},[r._fields,n]),v=S.useMemo(()=>({name:n,value:c,...cd(i)||h.disabled?{disabled:h.disabled||i}:{},onChange:_,onBlur:g,ref:y}),[n,i,h.disabled,_,g,y,c]);return S.useEffect(()=>{const e=r._options.shouldUnregister||s,t=f.current;t&&t!==n&&!l&&r.unregister(t),r.register(n,{...d.current.rules,...cd(d.current.disabled)?{disabled:d.current.disabled}:{}});const i=(e,t)=>{const n=ud(r._fields,e);n&&n._f&&(n._f.mount=t)};if(i(n,!0),e){const e=rd(ud(r._options.defaultValues,n,d.current.defaultValue));dd(r._defaultValues,n,e),od(ud(r._formValues,n))&&dd(r._formValues,n,e)}return!l&&r.register(n),f.current=n,()=>{(l?e&&!r._state.action:e)?r.unregister(n):i(n,!1)}},[n,r,l,s]),S.useEffect(()=>{r._setDisabledField({disabled:i,name:n})},[i,n,r]),S.useMemo(()=>({field:v,formState:h,fieldState:m}),[v,h,m])}const Id=e=>e.render(zd(e)),Fd=S.createContext(null);Fd.displayName="HookFormContext";const jd=()=>S.useContext(Fd),Bd=e=>{const{children:t,watch:n,getValues:i,getFieldState:r,setError:s,clearErrors:o,setValue:a,trigger:l,formState:u,resetField:c,reset:h,handleSubmit:d,unregister:f,control:p,register:m,setFocus:_,subscribe:g}=e;return S.createElement(Fd.Provider,{value:S.useMemo(()=>({watch:n,getValues:i,getFieldState:r,setError:s,clearErrors:o,setValue:a,trigger:l,formState:u,resetField:c,reset:h,handleSubmit:d,unregister:f,control:p,register:m,setFocus:_,subscribe:g}),[o,p,u,r,i,d,m,h,c,s,_,a,g,l,f,n])},S.createElement(Od.Provider,{value:p},t))};var Ud=(e,t,n,i,r)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[i]:r||!0}}:{},Vd=e=>Array.isArray(e)?e:[e],Gd=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function $d(e,t){const n={};for(const i in e)if(e.hasOwnProperty(i)){const r=e[i],s=t[i];if(r&&ed(r)&&s){const e=$d(r,s);ed(e)&&(n[i]=e)}else e[i]&&(n[i]=s)}return n}var Zd=e=>ed(e)&&!Object.keys(e).length,qd=e=>"file"===e.type,Wd=e=>{if(!id)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Hd=e=>"select-multiple"===e.type,Yd=e=>"radio"===e.type,Kd=e=>Wd(e)&&e.isConnected;function Xd(e,t){const n=Array.isArray(t)?t:sd(t)?[t]:ld(t),i=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let i=0;for(;i<n;)e=od(e)?i++:e[t[i++]];return e}(e,n),r=n.length-1,s=n[r];return i&&delete i[s],0!==r&&(ed(i)&&Zd(i)||Array.isArray(i)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!od(e[t]))return!1;return!0}(i))&&Xd(e,n.slice(0,-1)),e}function Qd(e){return Array.isArray(e)||ed(e)&&!(e=>{for(const t in e)if(hd(e[t]))return!0;return!1})(e)}function Jd(e,t={}){for(const n in e){const i=e[n];Qd(i)?(t[n]=Array.isArray(i)?[]:{},Jd(i,t[n])):od(i)||(t[n]=!0)}return t}function ef(e,t,n){n||(n=Jd(t));for(const i in e){const r=e[i];if(Qd(r))od(t)||Nd(n[i])?n[i]=Jd(r,Array.isArray(r)?[]:{}):ef(r,Qh(t)?{}:t[i],n[i]);else{const e=t[i];n[i]=!Dd(r,e)}}return n}const tf={value:!1,isValid:!1},nf={value:!0,isValid:!0};var rf=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&&!od(e[0].attributes.value)?od(e[0].value)||""===e[0].value?nf:{value:e[0].value,isValid:!0}:nf:tf}return tf},sf=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:i})=>od(e)?e:t?""===e?NaN:e?+e:e:n&&Rd(e)?new Date(e):i?i(e):e;const of={isValid:!1,value:null};var af=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,of):of;function lf(e){const t=e.ref;return qd(t)?t.files:Yd(t)?af(e.refs).value:Hd(t)?[...t.selectedOptions].map(({value:e})=>e):Kh(t)?rf(e.refs).value:sf(od(t.value)?e.ref.value:t.value,e)}var uf=e=>e instanceof RegExp,cf=e=>od(e)?e:uf(e)?e.source:ed(e)?uf(e.value)?e.value.source:e.value:e,hf=e=>({isOnSubmit:!e||e===yd,isOnBlur:e===_d,isOnChange:e===gd,isOnAll:e===bd,isOnTouch:e===vd});const df="AsyncFunction";var ff=e=>!!e&&!!e.validate&&!!(hd(e.validate)&&e.validate.constructor.name===df||ed(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===df)),pf=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const mf=(e,t,n,i)=>{for(const r of n||Object.keys(e)){const n=ud(e,r);if(n){const{_f:e,...s}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],r)&&!i)return!0;if(e.ref&&t(e.ref,e.name)&&!i)return!0;if(mf(s,t))break}else if(ed(s)&&mf(s,t))break}}};function _f(e,t,n){const i=ud(e,n);if(i||sd(n))return{error:i,name:n};const r=n.split(".");for(;r.length;){const i=r.join("."),s=ud(t,i),o=ud(e,i);if(s&&!Array.isArray(s)&&n!==i)return{name:n};if(o&&o.type)return{name:i,error:o};if(o&&o.root&&o.root.type)return{name:`${i}.root`,error:o.root};r.pop()}return{name:n}}var gf=(e,t,n)=>{const i=Vd(ud(e,n));return dd(i,"root",t[n]),dd(e,n,i),e};function yf(e,t,n="validate"){if(Rd(e)||Array.isArray(e)&&e.every(Rd)||cd(e)&&!e)return{type:n,message:Rd(e)?e:"",ref:t}}var vf=e=>ed(e)&&!uf(e)?e:{value:e,message:""},bf=async(e,t,n,i,r,s)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:c,min:h,max:d,pattern:f,validate:p,name:m,valueAsNumber:_,mount:g}=e._f,y=ud(n,m);if(!g||t.has(m))return{};const v=a?a[0]:o,b=e=>{r&&v.reportValidity&&(v.setCustomValidity(cd(e)?"":e||""),v.reportValidity())},x={},w=Yd(o),E=Kh(o),A=w||E,T=(_||qd(o))&&od(o.value)&&od(y)||Wd(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,S=Ud.bind(null,m,i,x),k=(e,t,n,i=Ed,r=Ad)=>{const s=e?t:n;x[m]={type:e?i:r,message:s,ref:o,...S(e?i:r,s)}};if(s?!Array.isArray(y)||!y.length:l&&(!A&&(T||Qh(y))||cd(y)&&!y||E&&!rf(a).isValid||w&&!af(a).isValid)){const{value:e,message:t}=Rd(l)?{value:!!l,message:l}:vf(l);if(e&&(x[m]={type:Sd,message:t,ref:v,...S(Sd,t)},!i))return b(t),x}if(!(T||Qh(h)&&Qh(d))){let e,t;const n=vf(d),r=vf(h);if(Qh(y)||isNaN(y)){const i=o.valueAsDate||new Date(y),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;Rd(n.value)&&y&&(e=a?s(y)>s(n.value):l?y>n.value:i>new Date(n.value)),Rd(r.value)&&y&&(t=a?s(y)<s(r.value):l?y<r.value:i<new Date(r.value))}else{const i=o.valueAsNumber||(y?+y:y);Qh(n.value)||(e=i>n.value),Qh(r.value)||(t=i<r.value)}if((e||t)&&(k(!!e,n.message,r.message,xd,wd),!i))return b(x[m].message),x}if((u||c)&&!T&&(Rd(y)||s&&Array.isArray(y))){const e=vf(u),t=vf(c),n=!Qh(e.value)&&y.length>+e.value,r=!Qh(t.value)&&y.length<+t.value;if((n||r)&&(k(n,e.message,t.message),!i))return b(x[m].message),x}if(f&&!T&&Rd(y)){const{value:e,message:t}=vf(f);if(uf(e)&&!y.match(e)&&(x[m]={type:Td,message:t,ref:o,...S(Td,t)},!i))return b(t),x}if(p)if(hd(p)){const e=yf(await p(y,n),v);if(e&&(x[m]={...e,...S(kd,e.message)},!i))return b(e.message),x}else if(ed(p)){let e={};for(const t in p){if(!Zd(e)&&!i)break;const r=yf(await p[t](y,n),v,t);r&&(e={...r,...S(t,r.message)},b(r.message),i&&(x[m]=e))}if(!Zd(e)&&(x[m]={ref:v,...e},!i))return x}return b(!0),x};const xf={mode:yd,reValidateMode:gd,shouldFocusError:!0};function wf(e={}){let t,n={...xf,...e},i={submitCount:0,isDirty:!1,isReady:!1,isLoading:hd(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},r={},s=(ed(n.defaultValues)||ed(n.values))&&rd(n.defaultValues||n.values)||{},o=n.shouldUnregister?{}:rd(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:Gd(),state:Gd()},p=n.criteriaMode===bd,m=async e=>{if(!a.keepIsValid&&!n.disabled&&(h.isValid||d.isValid||e)){let e;n.resolver?(e=Zd((await b()).errors),_()):e=await x(r,!0),e!==i.isValid&&f.state.next({isValid:e})}},_=(e,t)=>{!n.disabled&&(h.isValidating||h.validatingFields||d.isValidating||d.validatingFields)&&((e||Array.from(l.mount)).forEach(e=>{e&&(t?dd(i.validatingFields,e,t):Xd(i.validatingFields,e))}),f.state.next({validatingFields:i.validatingFields,isValidating:!Zd(i.validatingFields)}))},g=(e,t,n,i)=>{const l=ud(r,e);if(l){const r=ud(o,e,od(n)?ud(s,e):n);od(r)||i&&i.defaultChecked||t?dd(o,e,t?r:lf(l._f)):A(e,r),a.mount&&!a.action&&m()}},y=(e,t,r,o,a)=>{let l=!1,u=!1;const c={name:e};if(!n.disabled){if(!r||o){(h.isDirty||d.isDirty)&&(u=i.isDirty,i.isDirty=c.isDirty=w(),l=u!==c.isDirty);const n=Dd(ud(s,e),t);u=!!ud(i.dirtyFields,e),n?Xd(i.dirtyFields,e):dd(i.dirtyFields,e,!0),c.dirtyFields=i.dirtyFields,l=l||(h.dirtyFields||d.dirtyFields)&&u!==!n}if(r){const t=ud(i.touchedFields,e);t||(dd(i.touchedFields,e,r),c.touchedFields=i.touchedFields,l=l||(h.touchedFields||d.touchedFields)&&t!==r)}l&&a&&f.state.next(c)}return l?c:{}},v=(e,r,s,o)=>{const a=ud(i.errors,e),l=(h.isValid||d.isValid)&&cd(r)&&i.isValid!==r;var c;if(n.delayError&&s?(c=()=>((e,t)=>{dd(i.errors,e,t),f.state.next({errors:i.errors})})(e,s),t=e=>{clearTimeout(u),u=setTimeout(c,e)},t(n.delayError)):(clearTimeout(u),t=null,s?dd(i.errors,e,s):Xd(i.errors,e)),(s?!Dd(a,s):a)||!Zd(o)||l){const t={...o,...l&&cd(r)?{isValid:r}:{},errors:i.errors,name:e};i={...i,...t},f.state.next(t)}},b=async e=>{_(e,!0);const t=await n.resolver(o,n.context,((e,t,n,i)=>{const r={};for(const n of e){const e=ud(t,n);e&&dd(r,n,e._f)}return{criteriaMode:n,names:[...e],fields:r,shouldUseNativeValidation:i}})(e||l.mount,r,n.criteriaMode,n.shouldUseNativeValidation));return t},x=async(t,r,s={valid:!0})=>{for(const a in t){const u=t[a];if(u){const{_f:t,...a}=u;if(t){const a=l.array.has(t.name),c=u._f&&ff(u._f);c&&h.validatingFields&&_([t.name],!0);const d=await bf(u,l.disabled,o,p,n.shouldUseNativeValidation&&!r,a);if(c&&h.validatingFields&&_([t.name]),d[t.name]&&(s.valid=!1,r||e.shouldUseNativeValidation))break;!r&&(ud(d,t.name)?a?gf(i.errors,d,t.name):dd(i.errors,t.name,d[t.name]):Xd(i.errors,t.name))}!Zd(a)&&await x(a,r,s)}}return s.valid},w=(e,t)=>!n.disabled&&(e&&t&&dd(o,e,t),!Dd(C(),s)),E=(e,t,n)=>Ld(e,l,{...a.mount?o:od(t)?s:Rd(e)?{[e]:t}:t},n,t),A=(e,t,n={})=>{const i=ud(r,e);let s=t;if(i){const n=i._f;n&&(!n.disabled&&dd(o,e,sf(t,n)),s=Wd(n.ref)&&Qh(t)?"":t,Hd(n.ref)?[...n.ref.options].forEach(e=>e.selected=s.includes(e.value)):n.refs?Kh(n.ref)?n.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(s)?e.checked=!!s.find(t=>t===e.value):e.checked=s===e.value||!!s)}):n.refs.forEach(e=>e.checked=e.value===s):qd(n.ref)?n.ref.value="":(n.ref.value=s,n.ref.type||f.state.next({name:e,values:rd(o)})))}(n.shouldDirty||n.shouldTouch)&&y(e,s,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&P(e)},T=(e,t,n)=>{for(const i in t){if(!t.hasOwnProperty(i))return;const s=t[i],o=e+"."+i,a=ud(r,o);(l.array.has(e)||ed(s)||a&&!a._f)&&!Xh(s)?T(o,s,n):A(o,s,n)}},S=(e,t,n={})=>{const u=ud(r,e),c=l.array.has(e),p=rd(t);dd(o,e,p),c?(f.array.next({name:e,values:rd(o)}),(h.isDirty||h.dirtyFields||d.isDirty||d.dirtyFields)&&n.shouldDirty&&f.state.next({name:e,dirtyFields:ef(s,o),isDirty:w(e,p)})):!u||u._f||Qh(p)?A(e,p,n):T(e,p,n),pf(e,l)?f.state.next({...i,name:e,values:rd(o)}):f.state.next({name:a.mount?e:void 0,values:rd(o)})},k=async e=>{a.mount=!0;const s=e.target;let u=s.name,c=!0;const g=ud(r,u),w=e=>{c=Number.isNaN(e)||Xh(e)&&isNaN(e.getTime())||Dd(e,ud(o,u,e))},E=hf(n.mode),A=hf(n.reValidateMode);if(g){let a,S;const k=s.type?lf(g._f):td(e),O=e.type===fd||e.type===pd,C=!((T=g._f).mount&&(T.required||T.min||T.max||T.maxLength||T.minLength||T.pattern||T.validate)||n.resolver||ud(i.errors,u)||g._f.deps)||((e,t,n,i,r)=>!r.isOnAll&&(!n&&r.isOnTouch?!(t||e):(n?i.isOnBlur:r.isOnBlur)?!e:!(n?i.isOnChange:r.isOnChange)||e))(O,ud(i.touchedFields,u),i.isSubmitted,A,E),M=pf(u,l,O);dd(o,u,k),O?s&&s.readOnly||(g._f.onBlur&&g._f.onBlur(e),t&&t(0)):g._f.onChange&&g._f.onChange(e);const R=y(u,k,O),L=!Zd(R)||M;if(!O&&f.state.next({name:u,type:e.type,values:rd(o)}),C)return(h.isValid||d.isValid)&&("onBlur"===n.mode?O&&m():O||m()),L&&f.state.next({name:u,...M?{}:R});if(!O&&M&&f.state.next({...i}),n.resolver){const{errors:e}=await b([u]);if(_([u]),w(k),c){const t=_f(i.errors,r,u),n=_f(e,r,t.name||u);a=n.error,u=n.name,S=Zd(e)}}else _([u],!0),a=(await bf(g,l.disabled,o,p,n.shouldUseNativeValidation))[u],_([u]),w(k),c&&(a?S=!1:(h.isValid||d.isValid)&&(S=await x(r,!0)));c&&(g._f.deps&&(!Array.isArray(g._f.deps)||g._f.deps.length>0)&&P(g._f.deps),v(u,S,a,R))}var T},O=(e,t)=>{if(ud(i.errors,t)&&e.focus)return e.focus(),1},P=async(e,t={})=>{let s,o;const a=Vd(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(_(e),e)for(const n of e){const e=ud(t,n);e?dd(i.errors,n,e):Xd(i.errors,n)}else i.errors=t;return t})(od(e)?e:a);s=Zd(t),o=e?!a.some(e=>ud(t,e)):s}else e?(o=(await Promise.all(a.map(async e=>{const t=ud(r,e);return await x(t&&t._f?{[e]:t}:t)}))).every(Boolean),(o||i.isValid)&&m()):o=s=await x(r);return f.state.next({...!Rd(e)||(h.isValid||d.isValid)&&s!==i.isValid?{}:{name:e},...n.resolver||!e?{isValid:s}:{},errors:i.errors}),t.shouldFocus&&!o&&mf(r,O,e?a:l.mount),o},C=(e,t)=>{let n={...a.mount?o:s};return t&&(n=$d(t.dirtyFields?i.dirtyFields:i.touchedFields,n)),od(e)?n:Rd(e)?ud(n,e):e.map(e=>ud(n,e))},M=(e,t)=>({invalid:!!ud((t||i).errors,e),isDirty:!!ud((t||i).dirtyFields,e),error:ud((t||i).errors,e),isValidating:!!ud(i.validatingFields,e),isTouched:!!ud((t||i).touchedFields,e)}),R=(e,t,n)=>{const s=(ud(r,e,{_f:{}})._f||{}).ref,o=ud(i.errors,e)||{},{ref:a,message:l,type:u,...c}=o;dd(i.errors,e,{...c,...t,ref:s}),f.state.next({name:e,errors:i.errors,isValid:!1}),n&&n.shouldFocus&&s&&s.focus&&s.focus()},L=e=>f.state.subscribe({next:t=>{var n,r,a;n=e.name,r=t.name,a=e.exact,n&&r&&n!==r&&!Vd(n).some(e=>e&&(a?e===r:e.startsWith(r)||r.startsWith(e)))||!((e,t,n,i)=>{n(e);const{name:r,...s}=e;return Zd(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(e=>t[e]===(!i||bd))})(t,e.formState||h,U,e.reRenderRoot)||e.callback({values:{...o},...i,...t,defaultValues:s})}}).unsubscribe,N=(e,t={})=>{for(const a of e?Vd(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(Xd(r,a),Xd(o,a)),!t.keepError&&Xd(i.errors,a),!t.keepDirty&&Xd(i.dirtyFields,a),!t.keepTouched&&Xd(i.touchedFields,a),!t.keepIsValidating&&Xd(i.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&Xd(s,a);f.state.next({values:rd(o)}),f.state.next({...i,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&m()},D=({disabled:e,name:t})=>{if(cd(e)&&a.mount||e||l.disabled.has(t)){const n=l.disabled.has(t)!==!!e;e?l.disabled.add(t):l.disabled.delete(t),n&&a.mount&&!a.action&&m()}},z=(e,t={})=>{let i=ud(r,e);const o=cd(t.disabled)||cd(n.disabled);return dd(r,e,{...i||{},_f:{...i&&i._f?i._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),i?D({disabled:cd(t.disabled)?t.disabled:n.disabled,name:e}):g(e,!0,t.value),{...o?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:cf(t.min),max:cf(t.max),minLength:cf(t.minLength),maxLength:cf(t.maxLength),pattern:cf(t.pattern)}:{},name:e,onChange:k,onBlur:k,ref:o=>{if(o){z(e,t),i=ud(r,e);const n=od(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=(e=>Yd(e)||Kh(e))(n),l=i._f.refs||[];if(a?l.find(e=>e===n):n===i._f.ref)return;dd(r,e,{_f:{...i._f,...a?{refs:[...l.filter(Kd),n,...Array.isArray(ud(s,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),g(e,!1,void 0,n)}else i=ud(r,e,{}),i._f&&(i._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!nd(l.array,e)||!a.action)&&l.unMount.add(e)}}},I=()=>n.shouldFocusError&&mf(r,O,l.mount),F=(e,t)=>async s=>{let a;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let u=rd(o);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await b();_(),i.errors=e,u=rd(t)}else await x(r);if(l.disabled.size)for(const e of l.disabled)Xd(u,e);if(Xd(i.errors,"root"),Zd(i.errors)){f.state.next({errors:{}});try{await e(u,s)}catch(e){a=e}}else t&&await t({...i.errors},s),I(),setTimeout(I);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Zd(i.errors)&&!a,submitCount:i.submitCount+1,errors:i.errors}),a)throw a},j=(e,t={})=>{const u=e?rd(e):s,c=rd(u),d=Zd(e),p=d?s:c;if(t.keepDefaultValues||(s=u),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(ef(s,o))]);for(const t of Array.from(e)){const e=ud(i.dirtyFields,t),n=ud(o,t),r=ud(p,t);e&&!od(n)?dd(p,t,n):e||od(r)||S(t,r)}}else{if(id&&od(e))for(const e of l.mount){const t=ud(r,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Wd(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)S(e,ud(p,e));else r={}}o=n.shouldUnregister?t.keepDefaultValues?rd(s):{}:rd(p),f.array.next({values:{...p}}),f.state.next({values:{...p}})}l={mount:t.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!h.isValid||!!t.keepIsValid||!!t.keepDirtyValues||!n.shouldUnregister&&!Zd(p),a.watch=!!n.shouldUnregister,a.keepIsValid=!!t.keepIsValid,a.action=!1,t.keepErrors||(i.errors={}),f.state.next({submitCount:t.keepSubmitCount?i.submitCount:0,isDirty:!d&&(t.keepDirty?i.isDirty:!(!t.keepDefaultValues||Dd(e,s))),isSubmitted:!!t.keepIsSubmitted&&i.isSubmitted,dirtyFields:d?{}:t.keepDirtyValues?t.keepDefaultValues&&o?ef(s,o):i.dirtyFields:t.keepDefaultValues&&e?ef(s,e):t.keepDirty?i.dirtyFields:{},touchedFields:t.keepTouched?i.touchedFields:{},errors:t.keepErrors?i.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&i.isSubmitSuccessful,isSubmitting:!1,defaultValues:s})},B=(e,t)=>j(hd(e)?e(o):e,{...n.resetOptions,...t}),U=e=>{i={...i,...e}},V={control:{register:z,unregister:N,getFieldState:M,handleSubmit:F,setError:R,_subscribe:L,_runSchema:b,_updateIsValidating:_,_focusError:I,_getWatch:E,_getDirty:w,_setValid:m,_setFieldArray:(e,t=[],l,u,c=!0,p=!0)=>{if(u&&l&&!n.disabled){if(a.action=!0,p&&Array.isArray(ud(r,e))){const t=l(ud(r,e),u.argA,u.argB);c&&dd(r,e,t)}if(p&&Array.isArray(ud(i.errors,e))){const t=l(ud(i.errors,e),u.argA,u.argB);c&&dd(i.errors,e,t),((e,t)=>{!ad(ud(e,t)).length&&Xd(e,t)})(i.errors,e)}if((h.touchedFields||d.touchedFields)&&p&&Array.isArray(ud(i.touchedFields,e))){const t=l(ud(i.touchedFields,e),u.argA,u.argB);c&&dd(i.touchedFields,e,t)}(h.dirtyFields||d.dirtyFields)&&(i.dirtyFields=ef(s,o)),f.state.next({name:e,isDirty:w(e,t),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else dd(o,e,t)},_setDisabledField:D,_setErrors:e=>{i.errors=e,f.state.next({errors:i.errors,isValid:!1})},_getFieldArray:e=>ad(ud(a.mount?o:s,e,n.shouldUnregister?ud(s,e,[]):[])),_reset:j,_resetDefaultValues:()=>hd(n.defaultValues)&&n.defaultValues().then(e=>{B(e,n.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of l.unMount){const t=ud(r,e);t&&(t._f.refs?t._f.refs.every(e=>!Kd(e)):!Kd(t._f.ref))&&N(e)}l.unMount=new Set},_disableForm:e=>{cd(e)&&(f.state.next({disabled:e}),mf(r,(t,n)=>{const i=ud(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},_subjects:f,_proxyFormState:h,get _fields(){return r},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 i},get _options(){return n},set _options(e){n={...n,...e}}},subscribe:e=>(a.mount=!0,d={...d,...e.formState},L({...e,formState:{...c,...e.formState}})),trigger:P,register:z,handleSubmit:F,watch:(e,t)=>hd(e)?f.state.subscribe({next:n=>"values"in n&&e(E(void 0,t),n)}):E(e,t,!0),setValue:S,getValues:C,reset:B,resetField:(e,t={})=>{ud(r,e)&&(od(t.defaultValue)?S(e,rd(ud(s,e))):(S(e,t.defaultValue),dd(s,e,rd(t.defaultValue))),t.keepTouched||Xd(i.touchedFields,e),t.keepDirty||(Xd(i.dirtyFields,e),i.isDirty=t.defaultValue?w(e,rd(ud(s,e))):w()),t.keepError||(Xd(i.errors,e),h.isValid&&m()),f.state.next({...i}))},clearErrors:e=>{e&&Vd(e).forEach(e=>Xd(i.errors,e)),f.state.next({errors:e?i.errors:{}})},unregister:N,setError:R,setFocus:(e,t={})=>{const n=ud(r,e),i=n&&n._f;if(i){const e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&hd(e.select)&&e.select()})}},getFieldState:M};return{...V,formControl:V}}const Ef=u(i)(()=>({color:"var(--color-white)",cursor:"default"})),Af=({sx:e,...t})=>H(Ef,{variant:"body1",sx:e,...t}),Tf=te(he)({padding:0,marginRight:"5px",marginLeft:"10px","& .MuiSvgIcon-root":{color:"var(--color-orange-medium)"}});function Sf({label:e,name:t,...n}){const i=T.useId(),{control:r,setValue:s,watch:o}=jd(),a=o(t),l=`${i}-${t}-${String(a)}`;return H(Id,{control:r,name:t,render:({field:t})=>{const{value:i,name:r}=t;return e?H(de,{color:"white",control:H(Tf,{...n,checked:i,onChange:(e,t)=>{s(r,t,{shouldValidate:!0})}}),label:H(Af,{children:e})}):H(Tf,{...n,checked:i,onChange:(e,t)=>{s(r,t,{shouldValidate:!0})}})}},l)}function kf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Of,Pf,Cf,Mf;var Rf=function(){if(Mf)return Cf;Mf=1;var e=(Pf||(Pf=1,Of=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],i=0;i<e.rangeCount;i++)n.push(e.getRangeAt(i));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}),Of),t={"text/plain":"Text","text/html":"Url",default:"Text"};return Cf=function(n,i){var r,s,o,a,l,u,c=!1;i||(i={}),r=i.debug||!1;try{if(o=e(),a=document.createRange(),l=document.getSelection(),(u=document.createElement("span")).textContent=n,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(e){if(e.stopPropagation(),i.format)if(e.preventDefault(),typeof e.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var s=t[i.format]||t.default;window.clipboardData.setData(s,n)}else e.clipboardData.clearData(),e.clipboardData.setData(i.format,n);i.onCopy&&(e.preventDefault(),i.onCopy(e.clipboardData))}),document.body.appendChild(u),a.selectNodeContents(u),l.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(e){r&&console.error("unable to copy using execCommand: ",e),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(i.format||"text",n),i.onCopy&&i.onCopy(window.clipboardData),c=!0}catch(e){r&&console.error("unable to copy using clipboardData: ",e),r&&console.error("falling back to prompt"),s=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in i?i.message:"Copy to clipboard: #{key}, Enter"),window.prompt(s,n)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(a):l.removeAllRanges()),u&&document.body.removeChild(u),o()}return c},Cf}();const Lf=kf(Rf),Nf=({text:e,onCopy:t,options:n,children:i,...r})=>{const s=T.useCallback(r=>{const s=T.Children.only(i),o=Lf(e,n);t&&t(e,o),s.props.onClick&&"function"==typeof s.props.onClick&&s.props.onClick(r)},[e,t,n,i]),o=T.Children.only(i);return T.cloneElement(o,{onClick:s,...r})},Df=u(Af)(()=>({cursor:"pointer"})),zf=({value:e,label:t,onCopySuccess:n,onCopyError:i,...r})=>{const s=String(e);return H(Nf,{text:s,onCopy:(e,t)=>{t?(dn({message:"Значение успешно скопировано",variant:"success"}),n?.()):(dn({message:"При копировании значения возникла ошибка",variant:"error"}),i?.())},children:H(Df,{...r,children:t})})};var If=function(e){var t=e.as,n=e.errors,i=e.name,r=e.message,s=e.render,o=function(e,t){if(null==e)return{};var n,i,r={},s=Object.keys(e);for(i=0;i<s.length;i++)t.indexOf(n=s[i])>=0||(r[n]=e[n]);return r}(e,["as","errors","name","message","render"]),a=jd(),l=ud(n||a.formState.errors,i);if(!l)return null;var u=l.message,c=l.types,h=Object.assign({},o,{children:u||r});return T.isValidElement(t)?T.cloneElement(t,h):s?s({message:u||r,messages:c}):T.createElement(t||T.Fragment,h)};function Ff({name:t}){const{palette:n}=e(),{formState:{errors:i}}=jd();return H(If,{errors:i,name:t,render:({message:e})=>H(Af,{variant:"body2",style:{color:n.error.main},children:e})})}function jf({form:e,sx:t={},onSubmit:n,children:i}){const{handleSubmit:s}=e;return H(Bd,{...e,children:H(r,{component:"form",sx:{display:"grid",gap:"15px",...t},onSubmit:s(n),children:i})})}const Bf=()=>jd(),Uf=e=>H(v,{size:"small",...e});function Vf({name:e,...t}){const{control:n}=jd(),i=T.useId();return H(Id,{control:n,name:e,render:({field:n})=>Y(r,{sx:({spacing:e})=>({display:"grid",width:"100%",gap:e(1)}),children:[H(fe,{...t,...n,id:i,slots:{field:Uf}}),H(Ff,{name:e})]})})}const Gf=({text:e="Нет данных"})=>H(i,{variant:"body2",sx:{textAlign:"center",color:"var(--gray-light-color)"},children:e});function $f({items:e,columnsCount:t=1,getContent:n,title:s,getKey:o,onClick:a,onClear:l,sx:u,isShowNoData:c=!0}){const h=T.useMemo(()=>e.length>0,[e.length]),d=T.useMemo(()=>Boolean(l)&&h,[l,h]);return Y(r,{sx:({spacing:e,breakpoints:t})=>({display:"grid",gridTemplateColumns:"1fr",gap:e(2),...u?.root,[t.down("sm")]:{gap:e(1)}}),children:[s||l?Y(r,{sx:({spacing:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:e(1)}),children:[s?H(i,{variant:"h6",noWrap:!0,sx:{textAlign:"center",fontWeight:700,...u?.title},children:s}):null,d?H(Gh,{iconProps:{name:"clear",color:"warning"},onClick:l}):null]}):null,h?H(b,{sx:({spacing:e,breakpoints:n})=>({display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:e(2),...u?.list,[n.down("sm")]:{gap:e(1)}}),disablePadding:!0,children:e.map((e,t)=>H(x,{onClick:()=>a?.(e,t),sx:()=>({...u?.item}),disablePadding:!0,children:n(e,t)},o(e,t)))}):H(T.Fragment,{children:c?H(Gf,{}):null})]})}const Zf="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function qf(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function Wf(e){return"nodeType"in e}function Hf(e){var t,n;return e?qf(e)?e:Wf(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function Yf(e){const{Document:t}=Hf(e);return e instanceof t}function Kf(e){return!qf(e)&&e instanceof Hf(e).HTMLElement}function Xf(e){return e instanceof Hf(e).SVGElement}function Qf(e){return e?qf(e)?e.document:Wf(e)?Yf(e)?e:Kf(e)||Xf(e)?e.ownerDocument:document:document:document}const Jf=Zf?D:C;function ep(e){const t=O(e);return Jf(()=>{t.current=e}),P(function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return null==t.current?void 0:t.current(...n)},[])}function tp(e,t){void 0===t&&(t=[e]);const n=O(e);return Jf(()=>{n.current!==e&&(n.current=e)},t),n}function np(e,t){const n=O();return N(()=>{const t=e(n.current);return n.current=t,t},[...t])}function ip(e){const t=ep(e),n=O(null),i=P(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,i]}function rp(e){const t=O();return C(()=>{t.current=e},[e]),t.current}let sp={};function op(e,t){return N(()=>{if(t)return t;const n=null==sp[e]?0:sp[e]+1;return sp[e]=n,e+"-"+n},[e,t])}function ap(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce((t,n)=>{const i=Object.entries(n);for(const[n,r]of i){const i=t[n];null!=i&&(t[n]=i+e*r)}return t},{...t})}}const lp=ap(1),up=ap(-1);function cp(e){if(!e)return!1;const{KeyboardEvent:t}=Hf(e.target);return t&&e instanceof t}function hp(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=Hf(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const dp=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[dp.Translate.toString(e),dp.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),fp="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function pp(e){return e.matches(fp)?e:e.querySelector(fp)}const mp={display:"none"};function _p(e){let{id:t,value:n}=e;return S.createElement("div",{id:t,style:mp},n)}function gp(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;return S.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":i,"aria-atomic":!0},n)}const yp=U(null);const vp={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 "},bp={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function xp(e){let{announcements:t=bp,container:n,hiddenTextDescribedById:i,screenReaderInstructions:r=vp}=e;const{announce:s,announcement:o}=function(){const[e,t]=B("");return{announce:P(e=>{null!=e&&t(e)},[]),announcement:e}}(),a=op("DndLiveRegion"),[l,u]=B(!1);if(C(()=>{u(!0)},[]),function(e){const t=I(yp);C(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(N(()=>({onDragStart(e){let{active:n}=e;s(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:i}=e;t.onDragMove&&s(t.onDragMove({active:n,over:i}))},onDragOver(e){let{active:n,over:i}=e;s(t.onDragOver({active:n,over:i}))},onDragEnd(e){let{active:n,over:i}=e;s(t.onDragEnd({active:n,over:i}))},onDragCancel(e){let{active:n,over:i}=e;s(t.onDragCancel({active:n,over:i}))}}),[s,t])),!l)return null;const c=S.createElement(S.Fragment,null,S.createElement(_p,{id:i,value:r.draggable}),S.createElement(gp,{id:a,announcement:o}));return n?q(c,n):c}var wp;function Ep(){}!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"}(wp||(wp={}));const Ap=Object.freeze({x:0,y:0});function Tp(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Sp(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function kp(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function Op(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Pp=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const r=Op(t,t.left,t.top),s=[];for(const e of i){const{id:t}=e,i=n.get(t);if(i){const n=Tp(Op(i),r);s.push({id:t,data:{droppableContainer:e,value:n}})}}return s.sort(Sp)};function Cp(e,t){const n=Math.max(t.top,e.top),i=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),o=r-i,a=s-n;if(i<r&&n<s){const n=t.width*t.height,i=e.width*e.height,r=o*a;return Number((r/(n+i-r)).toFixed(4))}return 0}const Mp=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const r=[];for(const e of i){const{id:i}=e,s=n.get(i);if(s){const n=Cp(s,t);n>0&&r.push({id:i,data:{droppableContainer:e,value:n}})}}return r.sort(kp)};function Rp(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ap}function Lp(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const Np=Lp(1);const Dp={ignoreTransform:!1};function zp(e,t){void 0===t&&(t=Dp);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:i}=Hf(e).getComputedStyle(e);t&&(n=function(e,t,n){const i=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(!i)return e;const{scaleX:r,scaleY:s,x:o,y:a}=i,l=e.left-o-(1-r)*parseFloat(n),u=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width/r:e.width,h=s?e.height/s:e.height;return{width:c,height:h,top:u,right:l+c,bottom:u+h,left:l}}(n,t,i))}const{top:i,left:r,width:s,height:o,bottom:a,right:l}=n;return{top:i,left:r,width:s,height:o,bottom:a,right:l}}function Ip(e){return zp(e,{ignoreTransform:!0})}function Fp(e,t){const n=[];return e?function i(r){if(null!=t&&n.length>=t)return n;if(!r)return n;if(Yf(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!Kf(r)||Xf(r))return n;if(n.includes(r))return n;const s=Hf(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=Hf(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const i=t[e];return"string"==typeof i&&n.test(i)})}(r,s)&&n.push(r),function(e,t){return void 0===t&&(t=Hf(e).getComputedStyle(e)),"fixed"===t.position}(r,s)?n:i(r.parentNode)}(e):n}function jp(e){const[t]=Fp(e,1);return null!=t?t:null}function Bp(e){return Zf&&e?qf(e)?e:Wf(e)?Yf(e)||e===Qf(e).scrollingElement?window:Kf(e)?e:null:null:null}function Up(e){return qf(e)?e.scrollX:e.scrollLeft}function Vp(e){return qf(e)?e.scrollY:e.scrollTop}function Gp(e){return{x:Up(e),y:Vp(e)}}var $p;function Zp(e){return!(!Zf||!e)&&e===document.scrollingElement}function qp(e){const t={x:0,y:0},n=Zp(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=i.y,isRight:e.scrollLeft>=i.x,maxScroll:i,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}($p||($p={}));const Wp={x:.2,y:.2};function Hp(e,t,n,i,r){let{top:s,left:o,right:a,bottom:l}=n;void 0===i&&(i=10),void 0===r&&(r=Wp);const{isTop:u,isBottom:c,isLeft:h,isRight:d}=qp(e),f={x:0,y:0},p={x:0,y:0},m=t.height*r.y,_=t.width*r.x;return!u&&s<=t.top+m?(f.y=$p.Backward,p.y=i*Math.abs((t.top+m-s)/m)):!c&&l>=t.bottom-m&&(f.y=$p.Forward,p.y=i*Math.abs((t.bottom-m-l)/m)),!d&&a>=t.right-_?(f.x=$p.Forward,p.x=i*Math.abs((t.right-_-a)/_)):!h&&o<=t.left+_&&(f.x=$p.Backward,p.x=i*Math.abs((t.left+_-o)/_)),{direction:f,speed:p}}function Yp(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:i,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:i,bottom:r,width:e.clientWidth,height:e.clientHeight}}function Kp(e){return e.reduce((e,t)=>lp(e,Gp(t)),Ap)}const Xp=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Up(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Vp(t),0)}]];class Qp{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Fp(t),i=Kp(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of Xp)for(const s of t)Object.defineProperty(this,s,{get:()=>{const t=r(n),o=i[e]-t;return this.rect[s]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Jp{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var i;null==(i=this.target)||i.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function em(e,t){const n=Math.abs(e.x),i=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+i**2)>t:"x"in t&&"y"in t?n>t.x&&i>t.y:"x"in t?n>t.x:"y"in t&&i>t.y}var tm,nm;function im(e){e.preventDefault()}function rm(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"}(tm||(tm={})),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"}(nm||(nm={}));const sm={start:[nm.Space,nm.Enter],cancel:[nm.Esc],end:[nm.Space,nm.Enter,nm.Tab]},om=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case nm.Right:return{...n,x:n.x+25};case nm.Left:return{...n,x:n.x-25};case nm.Down:return{...n,y:n.y+25};case nm.Up:return{...n,y:n.y-25}}};class am{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 Jp(Qf(t)),this.windowListeners=new Jp(Hf(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(tm.Resize,this.handleCancel),this.windowListeners.add(tm.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(tm.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=zp),!e)return;const{top:n,left:i,bottom:r,right:s}=t(e);jp(e)&&(r<=0||s<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Ap)}handleKeyDown(e){if(cp(e)){const{active:t,context:n,options:i}=this.props,{keyboardCodes:r=sm,coordinateGetter:s=om,scrollBehavior:o="smooth"}=i,{code:a}=e;if(r.end.includes(a))return void this.handleEnd(e);if(r.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:l}=n.current,u=l?{x:l.left,y:l.top}:Ap;this.referenceCoordinates||(this.referenceCoordinates=u);const c=s(e,{active:t,context:n.current,currentCoordinates:u});if(c){const t=up(c,u),i={x:0,y:0},{scrollableAncestors:r}=n.current;for(const n of r){const r=e.code,{isTop:s,isRight:a,isLeft:l,isBottom:u,maxScroll:h,minScroll:d}=qp(n),f=Yp(n),p={x:Math.min(r===nm.Right?f.right-f.width/2:f.right,Math.max(r===nm.Right?f.left:f.left+f.width/2,c.x)),y:Math.min(r===nm.Down?f.bottom-f.height/2:f.bottom,Math.max(r===nm.Down?f.top:f.top+f.height/2,c.y))},m=r===nm.Right&&!a||r===nm.Left&&!l,_=r===nm.Down&&!u||r===nm.Up&&!s;if(m&&p.x!==c.x){const e=n.scrollLeft+t.x,s=r===nm.Right&&e<=h.x||r===nm.Left&&e>=d.x;if(s&&!t.y)return void n.scrollTo({left:e,behavior:o});i.x=s?n.scrollLeft-e:r===nm.Right?n.scrollLeft-h.x:n.scrollLeft-d.x,i.x&&n.scrollBy({left:-i.x,behavior:o});break}if(_&&p.y!==c.y){const e=n.scrollTop+t.y,s=r===nm.Down&&e<=h.y||r===nm.Up&&e>=d.y;if(s&&!t.x)return void n.scrollTo({top:e,behavior:o});i.y=s?n.scrollTop-e:r===nm.Down?n.scrollTop-h.y:n.scrollTop-d.y,i.y&&n.scrollBy({top:-i.y,behavior:o});break}}this.handleMove(e,lp(up(c,this.referenceCoordinates),i))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function lm(e){return Boolean(e&&"distance"in e)}function um(e){return Boolean(e&&"delay"in e)}am.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=sm,onActivation:r}=t,{active:s}=n;const{code:o}=e.nativeEvent;if(i.start.includes(o)){const t=s.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==r||r({event:e.nativeEvent}),!0)}return!1}}];class cm{constructor(e,t,n){var i;void 0===n&&(n=function(e){const{EventTarget:t}=Hf(e);return e instanceof t?e:Qf(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:r}=e,{target:s}=r;this.props=e,this.events=t,this.document=Qf(s),this.documentListeners=new Jp(this.document),this.listeners=new Jp(n),this.windowListeners=new Jp(Hf(s)),this.initialCoordinates=null!=(i=hp(r))?i:Ap,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(tm.Resize,this.handleCancel),this.windowListeners.add(tm.DragStart,im),this.windowListeners.add(tm.VisibilityChange,this.handleCancel),this.windowListeners.add(tm.ContextMenu,im),this.documentListeners.add(tm.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(um(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(lm(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:i}=this.props;i(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(tm.Click,rm,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(tm.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:i,props:r}=this,{onMove:s,options:{activationConstraint:o}}=r;if(!i)return;const a=null!=(t=hp(e))?t:Ap,l=up(i,a);if(!n&&o){if(lm(o)){if(null!=o.tolerance&&em(l,o.tolerance))return this.handleCancel();if(em(l,o.distance))return this.handleStart()}return um(o)&&em(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===nm.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const hm={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class dm extends cm{constructor(e){const{event:t}=e,n=Qf(t.target);super(e,hm,n)}}dm.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return!(!n.isPrimary||0!==n.button)&&(null==i||i({event:n}),!0)}}];const fm={move:{name:"mousemove"},end:{name:"mouseup"}};var pm;!function(e){e[e.RightClick=2]="RightClick"}(pm||(pm={}));(class extends cm{constructor(e){super(e,fm,Qf(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==pm.RightClick&&(null==i||i({event:n}),!0)}}];const mm={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var _m,gm;function ym(e){let{acceleration:t,activator:n=_m.Pointer,canScroll:i,draggingRect:r,enabled:s,interval:o=5,order:a=gm.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:c,delta:h,threshold:d}=e;const f=function(e){let{delta:t,disabled:n}=e;const i=rp(t);return np(e=>{if(n||!i||!e)return vm;const r={x:Math.sign(t.x-i.x),y:Math.sign(t.y-i.y)};return{x:{[$p.Backward]:e.x[$p.Backward]||-1===r.x,[$p.Forward]:e.x[$p.Forward]||1===r.x},y:{[$p.Backward]:e.y[$p.Backward]||-1===r.y,[$p.Forward]:e.y[$p.Forward]||1===r.y}}},[n,t,i])}({delta:h,disabled:!s}),[p,m]=function(){const e=O(null);return[P((t,n)=>{e.current=setInterval(t,n)},[]),P(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),_=O({x:0,y:0}),g=O({x:0,y:0}),y=N(()=>{switch(n){case _m.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case _m.DraggableRect:return r}},[n,r,l]),v=O(null),b=P(()=>{const e=v.current;if(!e)return;const t=_.current.x*g.current.x,n=_.current.y*g.current.y;e.scrollBy(t,n)},[]),x=N(()=>a===gm.TreeOrder?[...u].reverse():u,[a,u]);C(()=>{if(s&&u.length&&y){for(const e of x){if(!1===(null==i?void 0:i(e)))continue;const n=u.indexOf(e),r=c[n];if(!r)continue;const{direction:s,speed:a}=Hp(e,r,y,t,d);for(const e of["x","y"])f[e][s[e]]||(a[e]=0,s[e]=0);if(a.x>0||a.y>0)return m(),v.current=e,p(b,o),_.current=a,void(g.current=s)}_.current={x:0,y:0},g.current={x:0,y:0},m()}else m()},[t,b,i,m,s,o,JSON.stringify(y),JSON.stringify(f),p,u,x,c,JSON.stringify(d)])}(class extends cm{constructor(e){super(e,mm)}static setup(){return window.addEventListener(mm.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(mm.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;const{touches:r}=n;return!(r.length>1)&&(null==i||i({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(_m||(_m={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(gm||(gm={}));const vm={x:{[$p.Backward]:!1,[$p.Forward]:!1},y:{[$p.Backward]:!1,[$p.Forward]:!1}};var bm,xm;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(bm||(bm={})),function(e){e.Optimized="optimized"}(xm||(xm={}));const wm=new Map;function Em(e,t){return np(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Am(e){let{callback:t,disabled:n}=e;const i=ep(t),r=N(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)},[n]);return C(()=>()=>null==r?void 0:r.disconnect(),[r]),r}function Tm(e){return new Qp(zp(e),e)}function Sm(e,t,n){void 0===t&&(t=Tm);const[i,r]=B(null);function s(){r(i=>{if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=null!=i?i:n)?r:null;const s=t(e);return JSON.stringify(i)===JSON.stringify(s)?i:s})}const o=function(e){let{callback:t,disabled:n}=e;const i=ep(t),r=N(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)},[i,n]);return C(()=>()=>null==r?void 0:r.disconnect(),[r]),r}({callback(t){if(e)for(const n of t){const{type:t,target:i}=n;if("childList"===t&&i instanceof HTMLElement&&i.contains(e)){s();break}}}}),a=Am({callback:s});return Jf(()=>{s(),e?(null==a||a.observe(e),null==o||o.observe(document.body,{childList:!0,subtree:!0})):(null==a||a.disconnect(),null==o||o.disconnect())},[e]),i}const km=[];function Om(e,t){void 0===t&&(t=[]);const n=O(null);return C(()=>{n.current=null},t),C(()=>{const t=e!==Ap;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?up(e,n.current):Ap}function Pm(e){return N(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const Cm=[];function Mm(e){let{measure:t}=e;const[n,i]=B(null),r=P(e=>{for(const{target:n}of e)if(Kf(n)){i(e=>{const i=t(n);return e?{...e,width:i.width,height:i.height}:i});break}},[t]),s=Am({callback:r}),o=P(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Kf(t)?t:e}(e);null==s||s.disconnect(),n&&(null==s||s.observe(n)),i(n?t(n):null)},[t,s]),[a,l]=ip(o);return N(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const Rm=[{sensor:dm,options:{}},{sensor:am,options:{}}],Lm={current:{}},Nm={draggable:{measure:Ip},droppable:{measure:Ip,strategy:bm.WhileDragging,frequency:xm.Optimized},dragOverlay:{measure:zp}};class Dm extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const zm={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Dm,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ep},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Nm,measureDroppableContainers:Ep,windowRect:null,measuringScheduled:!1},Im=U({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ep,draggableNodes:new Map,over:null,measureDroppableContainers:Ep}),Fm=U(zm);function jm(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Dm}}}function Bm(e,t){switch(t.type){case wp.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case wp.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 wp.DragEnd:case wp.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case wp.RegisterDroppable:{const{element:n}=t,{id:i}=n,r=new Dm(e.droppable.containers);return r.set(i,n),{...e,droppable:{...e.droppable,containers:r}}}case wp.SetDroppableDisabled:{const{id:n,key:i,disabled:r}=t,s=e.droppable.containers.get(n);if(!s||i!==s.key)return e;const o=new Dm(e.droppable.containers);return o.set(n,{...s,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case wp.UnregisterDroppable:{const{id:n,key:i}=t,r=e.droppable.containers.get(n);if(!r||i!==r.key)return e;const s=new Dm(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function Um(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:r}=I(Im),s=rp(i),o=rp(null==n?void 0:n.id);return C(()=>{if(!t&&!i&&s&&null!=o){if(!cp(s))return;if(document.activeElement===s.target)return;const e=r.get(o);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=pp(e);if(t){t.focus();break}}})}},[i,t,r,o,s]),null}const Vm=U({...Ap,scaleX:1,scaleY:1});var Gm;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Gm||(Gm={}));const $m=j(function(e){var t,n,i,r;let{id:s,accessibility:o,autoScroll:a=!0,children:l,sensors:u=Rm,collisionDetection:c=Mp,measuring:h,modifiers:d,...f}=e;const p=V(Bm,void 0,jm),[m,_]=p,[g,y]=function(){const[e]=B(()=>new Set),t=P(t=>(e.add(t),()=>e.delete(t)),[e]);return[P(t=>{let{type:n,event:i}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,i)})},[e]),t]}(),[v,b]=B(Gm.Uninitialized),x=v===Gm.Initialized,{draggable:{active:w,nodes:E,translate:A},droppable:{containers:T}}=m,k=null!=w?E.get(w):null,M=O({initial:null,translated:null}),R=N(()=>{var e;return null!=w?{id:w,data:null!=(e=null==k?void 0:k.data)?e:Lm,rect:M}:null},[w,k]),L=O(null),[D,z]=B(null),[I,F]=B(null),j=tp(f,Object.values(f)),U=op("DndDescribedBy",s),G=N(()=>T.getEnabled(),[T]),$=N(()=>({draggable:{...Nm.draggable,...null==Z?void 0:Z.draggable},droppable:{...Nm.droppable,...null==Z?void 0:Z.droppable},dragOverlay:{...Nm.dragOverlay,...null==Z?void 0:Z.dragOverlay}}),[null==(Z=h)?void 0:Z.draggable,null==Z?void 0:Z.droppable,null==Z?void 0:Z.dragOverlay]);var Z;const{droppableRects:q,measureDroppableContainers:H,measuringScheduled:Y}=function(e,t){let{dragging:n,dependencies:i,config:r}=t;const[s,o]=B(null),{frequency:a,measure:l,strategy:u}=r,c=O(e),h=function(){switch(u){case bm.Always:return!1;case bm.BeforeDragging:return n;default:return!n}}(),d=tp(h),f=P(function(e){void 0===e&&(e=[]),d.current||o(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[d]),p=O(null),m=np(t=>{if(h&&!n)return wm;if(!t||t===wm||c.current!==e||null!=s){const t=new Map;for(let n of e){if(!n)continue;if(s&&s.length>0&&!s.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,i=e?new Qp(l(e),e):null;n.rect.current=i,i&&t.set(n.id,i)}return t}return t},[e,s,n,h,l]);return C(()=>{c.current=e},[e]),C(()=>{h||f()},[n,h]),C(()=>{s&&s.length>0&&o(null)},[JSON.stringify(s)]),C(()=>{h||"number"!=typeof a||null!==p.current||(p.current=setTimeout(()=>{f(),p.current=null},a))},[a,h,f,...i]),{droppableRects:m,measureDroppableContainers:f,measuringScheduled:null!=s}}(G,{dragging:x,dependencies:[A.x,A.y],config:$.droppable}),K=function(e,t){const n=null!=t?e.get(t):void 0,i=n?n.node.current:null;return np(e=>{var n;return null==t?null:null!=(n=null!=i?i:e)?n:null},[i,t])}(E,w),X=N(()=>I?hp(I):null,[I]),Q=function(){const e=!1===(null==D?void 0:D.autoScrollEnabled),t="object"==typeof a?!1===a.enabled:!1===a,n=x&&!e&&!t;if("object"==typeof a)return{...a,enabled:n};return{enabled:n}}(),J=function(e,t){return Em(e,t)}(K,$.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:i,config:r=!0}=e;const s=O(!1),{x:o,y:a}="boolean"==typeof r?{x:r,y:r}:r;Jf(()=>{if(!o&&!a||!t)return void(s.current=!1);if(s.current||!i)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=Rp(n(e),i);if(o||(r.x=0),a||(r.y=0),s.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=jp(e);t&&t.scrollBy({top:r.y,left:r.x})}},[t,o,a,i,n])}({activeNode:null!=w?E.get(w):null,config:Q.layoutShiftCompensation,initialRect:J,measure:$.draggable.measure});const ee=Sm(K,$.draggable.measure,J),te=Sm(K?K.parentElement:null),ne=O({activatorEvent:null,active:null,activeNode:K,collisionRect:null,collisions:null,droppableRects:q,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ie=T.getNodeFor(null==(t=ne.current.over)?void 0:t.id),re=Mm({measure:$.dragOverlay.measure}),se=null!=(n=re.nodeRef.current)?n:K,oe=x?null!=(i=re.rect)?i:ee:null,ae=Boolean(re.nodeRef.current&&re.rect),le=Rp(ue=ae?null:ee,Em(ue));var ue;const ce=Pm(se?Hf(se):null),he=function(e){const t=O(e),n=np(n=>e?n&&n!==km&&e&&t.current&&e.parentNode===t.current.parentNode?n:Fp(e):km,[e]);return C(()=>{t.current=e},[e]),n}(x?null!=ie?ie:K:null),de=function(e,t){void 0===t&&(t=zp);const[n]=e,i=Pm(n?Hf(n):null),[r,s]=B(Cm);function o(){s(()=>e.length?e.map(e=>Zp(e)?i:new Qp(t(e),e)):Cm)}const a=Am({callback:o});return Jf(()=>{null==a||a.disconnect(),o(),e.forEach(e=>null==a?void 0:a.observe(e))},[e]),r}(he),fe=function(e,t){let{transform:n,...i}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...i}),n):n}(d,{transform:{x:A.x-le.x,y:A.y-le.y,scaleX:1,scaleY:1},activatorEvent:I,active:R,activeNodeRect:ee,containerNodeRect:te,draggingNodeRect:oe,over:ne.current.over,overlayNodeRect:re.rect,scrollableAncestors:he,scrollableAncestorRects:de,windowRect:ce}),pe=X?lp(X,A):null,me=function(e){const[t,n]=B(null),i=O(e),r=P(e=>{const t=Bp(e.target);t&&n(e=>e?(e.set(t,Gp(t)),new Map(e)):null)},[]);return C(()=>{const t=i.current;if(e!==t){s(t);const o=e.map(e=>{const t=Bp(e);return t?(t.addEventListener("scroll",r,{passive:!0}),[t,Gp(t)]):null}).filter(e=>null!=e);n(o.length?new Map(o):null),i.current=e}return()=>{s(e),s(t)};function s(e){e.forEach(e=>{const t=Bp(e);null==t||t.removeEventListener("scroll",r)})}},[r,e]),N(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>lp(e,t),Ap):Kp(e):Ap,[e,t])}(he),_e=Om(me),ge=Om(me,[ee]),ye=lp(fe,_e),ve=oe?Np(oe,fe):null,be=R&&ve?c({active:R,collisionRect:ve,droppableRects:q,droppableContainers:G,pointerCoordinates:pe}):null,xe=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}(be,"id"),[we,Ee]=B(null),Ae=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ae?fe:lp(fe,ge),null!=(r=null==we?void 0:we.rect)?r:null,ee),Te=O(null),Se=P((e,t)=>{let{sensor:n,options:i}=t;if(null==L.current)return;const r=E.get(L.current);if(!r)return;const s=e.nativeEvent,o=new n({active:L.current,activeNode:r,event:s,options:i,context:ne,onAbort(e){if(!E.get(e))return;const{onDragAbort:t}=j.current,n={id:e};null==t||t(n),g({type:"onDragAbort",event:n})},onPending(e,t,n,i){if(!E.get(e))return;const{onDragPending:r}=j.current,s={id:e,constraint:t,initialCoordinates:n,offset:i};null==r||r(s),g({type:"onDragPending",event:s})},onStart(e){const t=L.current;if(null==t)return;const n=E.get(t);if(!n)return;const{onDragStart:i}=j.current,r={activatorEvent:s,active:{id:t,data:n.data,rect:M}};W(()=>{null==i||i(r),b(Gm.Initializing),_({type:wp.DragStart,initialCoordinates:e,active:t}),g({type:"onDragStart",event:r}),z(Te.current),F(s)})},onMove(e){_({type:wp.DragMove,coordinates:e})},onEnd:a(wp.DragEnd),onCancel:a(wp.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:i,scrollAdjustedTranslate:r}=ne.current;let o=null;if(t&&r){const{cancelDrop:a}=j.current;if(o={activatorEvent:s,active:t,collisions:n,delta:r,over:i},e===wp.DragEnd&&"function"==typeof a){await Promise.resolve(a(o))&&(e=wp.DragCancel)}}L.current=null,W(()=>{_({type:e}),b(Gm.Uninitialized),Ee(null),z(null),F(null),Te.current=null;const t=e===wp.DragEnd?"onDragEnd":"onDragCancel";if(o){const e=j.current[t];null==e||e(o),g({type:t,event:o})}})}}Te.current=o},[E]),ke=P((e,t)=>(n,i)=>{const r=n.nativeEvent,s=E.get(i);if(null!==L.current||!s||r.dndKit||r.defaultPrevented)return;const o={active:s};!0===e(n,t.options,o)&&(r.dndKit={capturedBy:t.sensor},L.current=i,Se(n,t))},[E,Se]),Oe=function(e,t){return N(()=>e.reduce((e,n)=>{const{sensor:i}=n;return[...e,...i.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(u,ke);!function(e){C(()=>{if(!Zf)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}))}(u),Jf(()=>{ee&&v===Gm.Initializing&&b(Gm.Initialized)},[ee,v]),C(()=>{const{onDragMove:e}=j.current,{active:t,activatorEvent:n,collisions:i,over:r}=ne.current;if(!t||!n)return;const s={active:t,activatorEvent:n,collisions:i,delta:{x:ye.x,y:ye.y},over:r};W(()=>{null==e||e(s),g({type:"onDragMove",event:s})})},[ye.x,ye.y]),C(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:i,scrollAdjustedTranslate:r}=ne.current;if(!e||null==L.current||!t||!r)return;const{onDragOver:s}=j.current,o=i.get(xe),a=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:r.x,y:r.y},over:a};W(()=>{Ee(a),null==s||s(l),g({type:"onDragOver",event:l})})},[xe]),Jf(()=>{ne.current={activatorEvent:I,active:R,activeNode:K,collisionRect:ve,collisions:be,droppableRects:q,draggableNodes:E,draggingNode:se,draggingNodeRect:oe,droppableContainers:T,over:we,scrollableAncestors:he,scrollAdjustedTranslate:ye},M.current={initial:oe,translated:ve}},[R,K,be,ve,E,se,oe,q,T,we,he,ye]),ym({...Q,delta:A,draggingRect:ve,pointerCoordinates:pe,scrollableAncestors:he,scrollableAncestorRects:de});const Pe=N(()=>({active:R,activeNode:K,activeNodeRect:ee,activatorEvent:I,collisions:be,containerNodeRect:te,dragOverlay:re,draggableNodes:E,droppableContainers:T,droppableRects:q,over:we,measureDroppableContainers:H,scrollableAncestors:he,scrollableAncestorRects:de,measuringConfiguration:$,measuringScheduled:Y,windowRect:ce}),[R,K,ee,I,be,te,re,E,T,q,we,H,he,de,$,Y,ce]),Ce=N(()=>({activatorEvent:I,activators:Oe,active:R,activeNodeRect:ee,ariaDescribedById:{draggable:U},dispatch:_,draggableNodes:E,over:we,measureDroppableContainers:H}),[I,Oe,R,ee,_,U,E,we,H]);return S.createElement(yp.Provider,{value:y},S.createElement(Im.Provider,{value:Ce},S.createElement(Fm.Provider,{value:Pe},S.createElement(Vm.Provider,{value:Ae},l)),S.createElement(Um,{disabled:!1===(null==o?void 0:o.restoreFocus)})),S.createElement(xp,{...o,hiddenTextDescribedById:U}))}),Zm=U(null),qm="button";function Wm(e){let{id:t,data:n,disabled:i=!1,attributes:r}=e;const s=op("Draggable"),{activators:o,activatorEvent:a,active:l,activeNodeRect:u,ariaDescribedById:c,draggableNodes:h,over:d}=I(Im),{role:f=qm,roleDescription:p="draggable",tabIndex:m=0}=null!=r?r:{},_=(null==l?void 0:l.id)===t,g=I(_?Vm:Zm),[y,v]=ip(),[b,x]=ip(),w=function(e,t){return N(()=>e.reduce((e,n)=>{let{eventName:i,handler:r}=n;return e[i]=e=>{r(e,t)},e},{}),[e,t])}(o,t),E=tp(n);Jf(()=>(h.set(t,{id:t,key:s,node:y,activatorNode:b,data:E}),()=>{const e=h.get(t);e&&e.key===s&&h.delete(t)}),[h,t]);return{active:l,activatorEvent:a,activeNodeRect:u,attributes:N(()=>({role:f,tabIndex:m,"aria-disabled":i,"aria-pressed":!(!_||f!==qm)||void 0,"aria-roledescription":p,"aria-describedby":c.draggable}),[i,f,m,_,p,c.draggable]),isDragging:_,listeners:i?void 0:w,node:y,over:d,setNodeRef:v,setActivatorNodeRef:x,transform:g}}const Hm={timeout:25};function Ym(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function Km(e,t){return e.reduce((e,n,i)=>{const r=t.get(n);return r&&(e[i]=r),e},Array(e.length))}function Xm(e){return null!==e&&e>=0}const Qm=e=>{let{rects:t,activeIndex:n,overIndex:i,index:r}=e;const s=Ym(t,i,n),o=t[r],a=s[r];return a&&o?{x:a.left-o.left,y:a.top-o.top,scaleX:a.width/o.width,scaleY:a.height/o.height}:null},Jm={scaleX:1,scaleY:1},e_=e=>{var t;let{activeIndex:n,activeNodeRect:i,index:r,rects:s,overIndex:o}=e;const a=null!=(t=s[n])?t:i;if(!a)return null;if(r===n){const e=s[o];return e?{x:0,y:n<o?e.top+e.height-(a.top+a.height):e.top-a.top,...Jm}:null}const l=function(e,t,n){const i=e[t],r=e[t-1],s=e[t+1];if(!i)return 0;if(n<t)return r?i.top-(r.top+r.height):s?s.top-(i.top+i.height):0;return s?s.top-(i.top+i.height):r?i.top-(r.top+r.height):0}(s,r,n);return r>n&&r<=o?{x:0,y:-a.height-l,...Jm}:r<n&&r>=o?{x:0,y:a.height+l,...Jm}:{x:0,y:0,...Jm}};const t_="Sortable",n_=S.createContext({activeIndex:-1,containerId:t_,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Qm,disabled:{draggable:!1,droppable:!1}});function i_(e){let{children:t,id:n,items:i,strategy:r=Qm,disabled:s=!1}=e;const{active:o,dragOverlay:a,droppableRects:l,over:u,measureDroppableContainers:c}=I(Fm),h=op(t_,n),d=Boolean(null!==a.rect),f=N(()=>i.map(e=>"object"==typeof e&&"id"in e?e.id:e),[i]),p=null!=o,m=o?f.indexOf(o.id):-1,_=u?f.indexOf(u.id):-1,g=O(f),y=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(f,g.current),v=-1!==_&&-1===m||y,b=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(s);Jf(()=>{y&&p&&c(f)},[y,f,p,c]),C(()=>{g.current=f},[f]);const x=N(()=>({activeIndex:m,containerId:h,disabled:b,disableTransforms:v,items:f,overIndex:_,useDragOverlay:d,sortedRects:Km(f,l),strategy:r}),[m,h,b.draggable,b.droppable,v,f,_,l,d,r]);return S.createElement(n_.Provider,{value:x},t)}const r_=e=>{let{id:t,items:n,activeIndex:i,overIndex:r}=e;return Ym(n,i,r).indexOf(t)},s_=e=>{let{containerId:t,isSorting:n,wasDragging:i,index:r,items:s,newIndex:o,previousItems:a,previousContainerId:l,transition:u}=e;return!(!u||!i)&&((a===s||r!==o)&&(!!n||o!==r&&t===l))},o_={duration:200,easing:"ease"},a_="transform",l_=dp.Transition.toString({property:a_,duration:0,easing:"linear"}),u_={roleDescription:"sortable"};function c_(e){let{animateLayoutChanges:t=s_,attributes:n,disabled:i,data:r,getNewIndex:s=r_,id:o,strategy:a,resizeObserverConfig:l,transition:u=o_}=e;const{items:c,containerId:h,activeIndex:d,disabled:f,disableTransforms:p,sortedRects:m,overIndex:_,useDragOverlay:g,strategy:y}=I(n_),v=function(e,t){var n,i;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(i=null==e?void 0:e.droppable)?i:t.droppable}}(i,f),b=c.indexOf(o),x=N(()=>({sortable:{containerId:h,index:b,items:c},...r}),[h,r,b,c]),w=N(()=>c.slice(c.indexOf(o)),[c,o]),{rect:E,node:A,isOver:T,setNodeRef:S}=function(e){let{data:t,disabled:n=!1,id:i,resizeObserverConfig:r}=e;const s=op("Droppable"),{active:o,dispatch:a,over:l,measureDroppableContainers:u}=I(Im),c=O({disabled:n}),h=O(!1),d=O(null),f=O(null),{disabled:p,updateMeasurementsFor:m,timeout:_}={...Hm,...r},g=tp(null!=m?m:i),y=Am({callback:P(()=>{h.current?(null!=f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{u(Array.isArray(g.current)?g.current:[g.current]),f.current=null},_)):h.current=!0},[_]),disabled:p||!o}),v=P((e,t)=>{y&&(t&&(y.unobserve(t),h.current=!1),e&&y.observe(e))},[y]),[b,x]=ip(v),w=tp(t);return C(()=>{y&&b.current&&(y.disconnect(),h.current=!1,y.observe(b.current))},[b,y]),C(()=>(a({type:wp.RegisterDroppable,element:{id:i,key:s,disabled:n,node:b,rect:d,data:w}}),()=>a({type:wp.UnregisterDroppable,key:s,id:i})),[i]),C(()=>{n!==c.current.disabled&&(a({type:wp.SetDroppableDisabled,id:i,key:s,disabled:n}),c.current.disabled=n)},[i,s,n,a]),{active:o,rect:d,isOver:(null==l?void 0:l.id)===i,node:b,over:l,setNodeRef:x}}({id:o,data:x,disabled:v.droppable,resizeObserverConfig:{updateMeasurementsFor:w,...l}}),{active:k,activatorEvent:M,activeNodeRect:R,attributes:L,setNodeRef:D,listeners:z,isDragging:F,over:j,setActivatorNodeRef:U,transform:V}=Wm({id:o,data:x,attributes:{...u_,...n},disabled:v.draggable}),G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(()=>e=>{t.forEach(t=>t(e))},t)}(S,D),$=Boolean(k),Z=$&&!p&&Xm(d)&&Xm(_),q=!g&&F,W=q&&Z?V:null,H=Z?null!=W?W:(null!=a?a:y)({rects:m,activeNodeRect:R,activeIndex:d,overIndex:_,index:b}):null,Y=Xm(d)&&Xm(_)?s({id:o,items:c,activeIndex:d,overIndex:_}):b,K=null==k?void 0:k.id,X=O({activeId:K,items:c,newIndex:Y,containerId:h}),Q=c!==X.current.items,J=t({active:k,containerId:h,isDragging:F,isSorting:$,id:o,index:b,items:c,newIndex:X.current.newIndex,previousItems:X.current.items,previousContainerId:X.current.containerId,transition:u,wasDragging:null!=X.current.activeId}),ee=function(e){let{disabled:t,index:n,node:i,rect:r}=e;const[s,o]=B(null),a=O(n);return Jf(()=>{if(!t&&n!==a.current&&i.current){const e=r.current;if(e){const t=zp(i.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==a.current&&(a.current=n)},[t,n,i,r]),C(()=>{s&&o(null)},[s]),s}({disabled:!J,index:b,node:A,rect:E});return C(()=>{$&&X.current.newIndex!==Y&&(X.current.newIndex=Y),h!==X.current.containerId&&(X.current.containerId=h),c!==X.current.items&&(X.current.items=c)},[$,Y,h,c]),C(()=>{if(K===X.current.activeId)return;if(null!=K&&null==X.current.activeId)return void(X.current.activeId=K);const e=setTimeout(()=>{X.current.activeId=K},50);return()=>clearTimeout(e)},[K]),{active:k,activeIndex:d,attributes:L,data:x,rect:E,index:b,newIndex:Y,items:c,isOver:T,isSorting:$,isDragging:F,listeners:z,node:A,overIndex:_,over:j,setNodeRef:G,setActivatorNodeRef:U,setDroppableNodeRef:S,setDraggableNodeRef:D,transform:null!=ee?ee:H,transition:function(){if(ee||Q&&X.current.newIndex===b)return l_;if(q&&!cp(M)||!u)return;if($||J)return dp.Transition.toString({...u,property:a_});return}()}}nm.Down,nm.Right,nm.Up,nm.Left;const h_=({id:e,sx:t,children:n})=>{const{isDragging:i}=Wm({id:e}),{attributes:s,listeners:o,setNodeRef:a,transform:l,transition:u}=c_({id:e,strategy:e_,transition:{duration:300,easing:"cubic-bezier(0.25, 1, 0.5, 1)"}}),c={...t?.default,...i?t?.dragging:{},transform:dp.Translate.toString(l),transition:u,cursor:"pointer"};return H(r,{ref:a,style:c,...o,...s,children:n})};function d_({items:e,getItem:t,getId:n,onDragEnd:i,sx:r,title:s,draggableSx:o}){const a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(()=>[...t].filter(e=>null!=e),[...t])}(N(()=>({sensor:l,options:null!=u?u:{}}),[l=dm,u={activationConstraint:{distance:8}}]));var l,u;return H($m,{sensors:a,collisionDetection:Pp,onDragEnd:t=>{const{active:r,over:s}=t,o=e.findIndex(e=>n(e)===r.id),a=e.findIndex(e=>n(e)===s?.id),l=Ym(e,o,a);i(l)},children:H(i_,{items:e.map(n),strategy:e_,children:H($f,{items:e,sx:r,title:s,getKey:n,getContent:(e,i)=>{const r=n(e);return H(h_,{id:r,sx:o,children:t(e,i)},r)}})})})}var f_,p_={exports:{}},m_={},__={exports:{}},g_={exports:{}},y_={};var v_,b_,x_,w_,E_,A_,T_,S_,k_,O_,P_,C_,M_,R_,L_,N_={};
14
+ */var Lu,Nu,Du=(Mu||(Mu=1,"production"===process.env.NODE_ENV?Ou.exports=function(){if(Tu)return Pu;Tu=1;var e=S,t="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,r=e.useLayoutEffect,s=e.useDebugValue;function o(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!t(e,i)}catch(e){return!0}}var a="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var a=t(),l=n({inst:{value:a,getSnapshot:t}}),u=l[0].inst,c=l[1];return r(function(){u.value=a,u.getSnapshot=t,o(u)&&c({inst:u})},[e,a,t]),i(function(){return o(u)&&c({inst:u}),e(function(){o(u)&&c({inst:u})})},[e]),s(a),a};return Pu.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:a,Pu}():Ou.exports=(Cu||(Cu=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!n(e,i)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=t.useState,r=t.useEffect,s=t.useLayoutEffect,o=t.useDebugValue,a=!1,l=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(u,c){a||void 0===t.startTransition||(a=!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(!l){var d=c();n(h,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}var f=(d=i({inst:{value:h,getSnapshot:c}}))[0].inst,p=d[1];return s(function(){f.value=h,f.getSnapshot=c,e(f)&&p({inst:f})},[u,h,c]),r(function(){return e(f)&&p({inst:f}),u(function(){e(f)&&p({inst:f})})},[u]),o(h),h};Ru.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ru)),Ou.exports);function zu(e){e.reaction=new $r("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),null===(t=e.onStoreChange)||void 0===t||t.call(e)})}var Iu=!0,Fu="function"==typeof Symbol&&Symbol.for,ju=null!==(Nu=null===(Lu=Object.getOwnPropertyDescriptor(function(){},"name"))||void 0===Lu?void 0:Lu.configurable)&&void 0!==Nu&&Nu,Bu=Fu?Symbol.for("react.forward_ref"):"function"==typeof k&&k(function(e){return null}).$$typeof,Uu=Fu?Symbol.for("react.memo"):"function"==typeof j&&j(function(e){return null}).$$typeof;function Vu(e,t){if(process.env.NODE_ENV,Uu&&e.$$typeof===Uu)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 n=!1,i=e,r=e.displayName||e.name;if(Bu&&e.$$typeof===Bu&&(n=!0,"function"!=typeof(i=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var s,o,a=function(e,t){return function(e,t){void 0===t&&(t="observed");var n=S.useRef(null);if(!n.current){var i={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(e){return ku.unregister(i),i.onStoreChange=e,i.reaction||(zu(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 r,s,o=n.current;if(o.reaction||(zu(o),ku.register(n,o,o)),S.useDebugValue(o.reaction,Au),Du.useSyncExternalStore(o.subscribe,o.getSnapshot,o.getSnapshot),o.reaction.track(function(){try{r=e()}catch(e){s=e}}),s)throw s;return r}(function(){return i(e,t)},r)};return a.displayName=e.displayName,ju&&Object.defineProperty(a,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(a.contextTypes=e.contextTypes,"production"!==process.env.NODE_ENV&&Iu&&(Iu=!1,console.warn("[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release."))),n&&(a=k(a)),a=j(a),s=e,o=a,Object.keys(s).forEach(function(e){Gu[e]||Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(s,e))}),"production"!==process.env.NODE_ENV&&Object.defineProperty(a,"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`."))}}),a}var Gu={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};process.env.NODE_ENV,function(e){e||(e=Eu,"production"!==process.env.NODE_ENV&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),vs({reactionScheduler:e})}(W),ku.finalizeAllImmediately;var $u=Vu(({onUnauthorized:e,children:t})=>(T.useEffect(()=>{nl.isUnauthorized&&e()},[nl.isUnauthorized]),H(T.Fragment,{children:t})));function Zu(e,t){if(void 0!==e.one&&1===t)return e.one;const n=t%10,i=t%100;return 1===n&&11!==i?e.singularNominative.replace("{{count}}",String(t)):n>=2&&n<=4&&(i<10||i>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function qu(e){return(t,n)=>n?.addSuffix?n.comparison&&n.comparison>0?e.future?Zu(e.future,t):"через "+Zu(e.regular,t):e.past?Zu(e.past,t):Zu(e.regular,t)+" назад":Zu(e.regular,t)}const Wu={lessThanXSeconds:qu({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:qu({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:qu({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:qu({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:qu({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:qu({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:qu({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:qu({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:qu({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:qu({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:qu({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:qu({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:qu({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:qu({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:qu({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})},Hu={date:aa({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:aa({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:aa({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},Yu=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function Ku(e){const t=Yu[e];return 2===e?"'во "+t+" в' p":"'в "+t+" в' p"}const Xu={lastWeek:(e,t,n)=>{const i=e.getDay();return Za(e,t,n)?Ku(i):function(e){const t=Yu[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"}}(i)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:(e,t,n)=>{const i=e.getDay();return Za(e,t,n)?Ku(i):function(e){const t=Yu[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"}}(i)},other:"P"},Qu={ordinalNumber:(e,t)=>{const n=Number(e),i=t?.unit;let r;return r="date"===i?"-е":"week"===i||"minute"===i||"second"===i?"-я":"-й",n+r},era:ca({values:{narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},defaultWidth:"wide"}),quarter:ca({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:ca({values:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},defaultWidth:"wide",formattingValues:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},defaultFormattingWidth:"wide"}),day:ca({values:{narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},defaultWidth:"wide"}),dayPeriod:ca({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"})},Ju={ordinalNumber:fa({matchPattern:/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:da({matchPatterns:{narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:da({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:da({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:da({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:da({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"})},ec={code:"ru",formatDistance:(e,t,n)=>Wu[e](t,n),formatLong:Hu,formatRelative:(e,t,n,i)=>{const r=Xu[e];return"function"==typeof r?r(t,n,i):r},localize:Qu,match:Ju,options:{weekStartsOn:1,firstWeekContainsDate:1}},tc=e=>H(X,{...e,dateAdapter:Q,adapterLocale:ec}),nc=e=>H(n,{...e}),ic=({children:e,configOptions:t})=>{const[n,r]=T.useState(null),[s,o]=T.useState("");return T.useEffect(()=>(cl.initialize({...t,onCheck:e=>{const{valid:n,reason:i}=e;o(i),r(n),t.onCheck?.(e)}}),()=>{cl.deactivate()}),[t]),null===n?H(nc,{color:"primary"}):n?H(T.Fragment,{children:e}):H(i,{color:"error",children:s})},rc=({children:e})=>{const[t,n]=T.useState(!1);return T.useEffect(()=>{(async()=>{try{await Promise.resolve().then(function(){return Fx}),await Promise.resolve().then(function(){return Bx}),await Promise.resolve().then(function(){return $x}),await Promise.resolve().then(function(){return Wx}),await Promise.resolve().then(function(){return ew}),await Promise.resolve().then(function(){return iw}),n(!0)}catch{n(!1)}})()},[]),t?H(T.Fragment,{children:e}):null},sc=new class{#W;#j;#d;#H;#Y;#K;#X;#Q;constructor(e={}){this.#W=e.queryCache||new uu,this.#j=e.mutationCache||new ou,this.#d=e.defaultOptions||{},this.#H=new Map,this.#Y=new Map,this.#K=0}mount(){this.#K++,1===this.#K&&(this.#X=Il.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#W.onFocus())}),this.#Q=Ul.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#W.onOnline())}))}unmount(){this.#K--,0===this.#K&&(this.#X?.(),this.#X=void 0,this.#Q?.(),this.#Q=void 0)}isFetching(e){return this.#W.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.#W.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#W.build(this,t),i=n.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(yl(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#W.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),r=this.#W.get(i.queryHash),s=r?.state.data,o=function(e,t){return"function"==typeof e?e(t):e}(t,s);if(void 0!==o)return this.#W.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Bl.batch(()=>this.#W.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#W.get(t.queryHash)?.state}removeQueries(e){const t=this.#W;Bl.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const n=this.#W;return Bl.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Bl.batch(()=>this.#W.findAll(e).map(e=>e.cancel(n)));return Promise.all(i).then(ml).catch(ml)}invalidateQueries(e,t={}){return Bl.batch(()=>(this.#W.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 n={...t,cancelRefetch:t.cancelRefetch??!0},i=Bl.batch(()=>this.#W.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(ml)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(i).then(ml)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=this.#W.build(this,t);return n.isStaleByTime(yl(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ml).catch(ml)}fetchInfiniteQuery(e){return e.behavior=nu(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ml).catch(ml)}ensureInfiniteQueryData(e){return e.behavior=nu(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ul.isOnline()?this.#j.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#W}getMutationCache(){return this.#j}getDefaultOptions(){return this.#d}setDefaultOptions(e){this.#d=e}setQueryDefaults(e,t){this.#H.set(El(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#H.values()],n={};return t.forEach(t=>{Al(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#Y.set(El(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#Y.values()],n={};return t.forEach(t=>{Al(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#d.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=wl(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===Nl&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#d.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#W.clear(),this.#j.clear()}},oc=e=>H(du,{...e,client:sc}),ac=({children:e,themeOptions:t})=>{const n=J(t);return H(ee,{theme:n,children:e})},lc=({children:e,configOptions:t,themeOptions:n})=>H(un,{children:H(oc,{children:H(ll,{children:H(ac,{themeOptions:n,children:H(tc,{children:H(rc,{children:H(ic,{configOptions:t,children:e})})})})})})}),uc=()=>gu({mutationKey:["logout-mutation"],mutationFn:async e=>await cl.instance.apiService.post({url:"logout"}),onError:xu(),onSuccess:()=>{sc.invalidateQueries({queryKey:["user"]})}});var cc,hc,dc,fc;!function(e){e.GET="GET",e.DELETE="DELETE",e.PUT="PUT",e.POST="POST"}(cc||(cc={})),function(e){e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e.TOP_LEFT="top-left"}(hc||(hc={}));var pc,mc,_c=function(){if(fc)return dc;function e(e){this._maxSize=e,this.clear()}fc=1,e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(e){return this._values[e]},e.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,i=/^\d/,r=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/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(i)&&!e.match(n)}(e)||function(e){return r.test(e)}(e))}return dc={Cache:e,split:c,normalizePath:u,setter:function(e){var t=u(e);return a.get(e)||a.set(e,function(e,n){for(var i=0,r=t.length,s=e;i<r-1;){var o=t[i];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;s=s[t[i++]]}s[t[i]]=n})},getter:function(e,t){var n=u(e);return l.get(e)||l.set(e,function(e){for(var i=0,r=n.length;i<r;){if(null==e&&t)return;e=e[n[i++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(h(t)||n.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var i,r,s,o,a=e.length;for(r=0;r<a;r++)(i=e[r])&&(d(i)&&(i='"'+i+'"'),s=!(o=h(i))&&/^\d+$/.test(i),t.call(n,i,o,s,r,e))}(Array.isArray(e)?e:c(e),t,n)}},dc}();var gc,yc=function(){if(mc)return pc;mc=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=t=>t.match(e)||[],n=e=>e[0].toUpperCase()+e.slice(1),i=(e,n)=>t(e).join(n).toLowerCase(),r=e=>t(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,"");return pc={words:t,upperFirst:n,camelCase:r,pascalCase:e=>n(r(e)),snakeCase:e=>i(e,"_"),kebabCase:e=>i(e,"-"),sentenceCase:e=>n(i(e," ")),titleCase:e=>t(e).map(n).join(" ")}}(),vc={exports:{}};var bc=function(){if(gc)return vc.exports;function e(e,t){var n=e.length,i=new Array(n),r={},s=n,o=function(e){for(var t=new Map,n=0,i=e.length;n<i;n++){var r=e[n];t.has(r[0])||t.set(r[0],new Set),t.has(r[1])||t.set(r[1],new Set),t.get(r[0]).add(r[1])}return t}(t),a=function(e){for(var t=new Map,n=0,i=e.length;n<i;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!a.has(e[0])||!a.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)r[s]||l(e[s],s,new Set);return i;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(!r[t]){r[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)}i[--n]=e}}}return gc=1,vc.exports=function(t){return e(function(e){for(var t=new Set,n=0,i=e.length;n<i;n++){var r=e[n];t.add(r[0]),t.add(r[1])}return Array.from(t)}(t),t)},vc.exports.array=e,vc.exports}(),xc=Ee(bc);const wc=Object.prototype.toString,Ec=Error.prototype.toString,Ac=RegExp.prototype.toString,Tc="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",Sc=/^Symbol\((.*)\)(.*)$/;function kc(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return Tc.call(e).replace(Sc,"Symbol($1)");const i=wc.call(e).slice(8,-1);return"Date"===i?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===i||e instanceof Error?"["+Ec.call(e)+"]":"RegExp"===i?Ac.call(e):null}function Oc(e,t){let n=kc(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let i=kc(this[e],t);return null!==i?i:n},2)}function Pc(e){return null==e?[]:[].concat(e)}let Cc,Mc,Rc,Lc=/\$\{\s*(\w+)\s*\}/g;Cc=Symbol.toStringTag;class Nc{constructor(e,t,n,i){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[Cc]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=i,this.errors=[],this.inner=[],Pc(e).forEach(e=>{if(Dc.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]}}Mc=Symbol.hasInstance,Rc=Symbol.toStringTag;class Dc extends Error{static formatError(e,t){const n=t.label||t.path||"this";return t=Object.assign({},t,{path:n,originalPath:t.path}),"string"==typeof e?e.replace(Lc,(e,n)=>Oc(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,i,r){const s=new Nc(e,t,n,i);if(r)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Rc]="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,Dc)}static[Mc](e){return Nc[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let zc={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:i})=>{const r=null!=i&&i!==n?` (cast from the value \`${Oc(i,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${Oc(n,!0)}\``+r:`${e} must match the configured type. The validated value was: \`${Oc(n,!0)}\``+r}},Ic={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"},Fc={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"},jc={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Bc={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Uc={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"},Vc={notType:e=>{const{path:t,value:n,spec:i}=e,r=i.types.length;if(Array.isArray(n)){if(n.length<r)return`${t} tuple value has too few items, expected a length of ${r} but got ${n.length} for value: \`${Oc(n,!0)}\``;if(n.length>r)return`${t} tuple value has too many items, expected a length of ${r} but got ${n.length} for value: \`${Oc(n,!0)}\``}return Dc.formatError(zc.notType,e)}};Object.assign(Object.create(null),{mixed:zc,string:Ic,number:Fc,date:jc,object:Bc,array:Uc,boolean:{isValue:"${path} field must be ${value}"},tuple:Vc});const Gc=e=>e&&e.__isYupSchema__;class $c{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:r}=t,s="function"==typeof n?n:(...e)=>e.every(e=>e===n);return new $c(e,(e,t)=>{var n;let o=s(...e)?i:r;return null!=(n=null==o?void 0:o(t))?n:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),i=this.fn(n,e,t);if(void 0===i||i===e)return e;if(!Gc(i))throw new TypeError("conditions must return a schema object");return i.resolve(t)}}const Zc="$",qc=".";class Wc{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]===Zc,this.isValue=this.key[0]===qc,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Zc:this.isValue?qc:"";this.path=this.key.slice(n.length),this.getter=this.path&&_c.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let i=this.isContext?n:this.isValue?e:t;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}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}}Wc.prototype.__isYupRef=!0;const Hc=e=>null==e;function Yc(e){function t({value:t,path:n="",options:i,originalValue:r,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:_=s.spec.disableStackTrace}=i;const g={value:t,parent:f,context:p};function y(e={}){const i=Kc(Object.assign({value:t,originalValue:r,label:s.spec.label,path:e.path||n,spec:s.spec,disableStackTrace:e.disableStackTrace||_},c,e.params),g),o=new Dc(Dc.formatError(e.message||h,i),t,i.path,e.type||l,i.disableStackTrace);return o.params=i,o}const v=m?o:a;let b={path:n,parent:f,type:l,from:i.from,createError:y,resolve:e=>Xc(e,g),options:i,originalValue:r,schema:s};const x=e=>{Dc.isError(e)?v(e):e?a(null):v(y())},w=e=>{Dc.isError(e)?v(e):o(e)};if(d&&Hc(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(i.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 Kc(e,t){if(!e)return e;for(const n of Object.keys(e))e[n]=Xc(e[n],t);return e}function Xc(e,t){return Wc.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function Qc(e,t,n,i=n){let r,s,o;return t?(_c.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a,h="tuple"===(e=e.resolve({context:i,parent:r,value:n})).type,d=u?parseInt(c,10):0;if(e.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);r=n,n=n&&n[d],e=h?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);r=n,n=n&&n[c],e=e.fields[c]}s=c,o=l?"["+a+"]":"."+a}),{schema:e,parent:r,parentPath:s}):{parent:r,parentPath:t,schema:e}}class Jc extends Set{describe(){const e=[];for(const t of this.values())e.push(Wc.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new Jc(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function eh(e,t=new Map){if(Gc(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let i=0;i<e.length;i++)n[i]=eh(e[i],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[i,r]of e.entries())n.set(i,eh(r,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const i of e)n.add(eh(i,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[i,r]of Object.entries(e))n[i]=eh(r,t)}return n}function th(e){if(null==e||!e.length)return;const t=[];let n="",i=!1,r=!1;for(let s=0;s<e.length;s++){const o=e[s];"["!==o||r?"]"!==o||r?'"'!==o?"."!==o||i||r?n+=o:n&&(t.push(n),n=""):r=!r:(n&&(/^\d+$/.test(n)?t.push(n):t.push(n.replace(/^"|"$/g,"")),n=""),i=!1):(n&&(t.push(...n.split(".").filter(Boolean)),n=""),i=!0)}return n&&t.push(...n.split(".").filter(Boolean)),t}function nh(e,t){var n;if((null==(n=e.inner)||!n.length)&&e.errors.length)return function(e,t){const n=t?`${t}.${e.path}`:e.path;return e.errors.map(e=>({message:e,path:th(n)}))}(e,t);const i=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>nh(e,i))}class ih{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 Jc,this._blacklist=new Jc,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(zc.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=eh(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const i=Object.assign({},t.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,i,r;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(i=e.recursive)?i:this.spec.recursive,disableStackTrace:null!=(r=e.disableStackTrace)?r:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({},t,{value:e})),i="ignore-optionality"===t.assert,r=n._cast(e,t);if(!1!==t.assert&&!n.isType(r)){if(i&&Hc(r))return r;let s=Oc(e),o=Oc(r);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${s} \n`+(o!==s?`result of cast: ${o}`:""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((n,i)=>i.call(this,n,e,this,t),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,i){let{path:r,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:r,value:a,originalValue:s,options:t,tests:l},n,e=>{if(e.length)return i(e,a);this.runTests({path:r,value:a,originalValue:s,options:t,tests:this.tests},n,i)})}runTests(e,t,n){let i=!1,{tests:r,value:s,originalValue:o,path:a,options:l}=e,u=e=>{i||(i=!0,t(e,s))},c=e=>{i||(i=!0,n(e,s))},h=r.length,d=[];if(!h)return c([]);let f={value:s,originalValue:o,path:a,options:l,schema:this};for(let e=0;e<r.length;e++){(0,r[e])(f,u,function(e){e&&(Array.isArray(e)?d.push(...e):d.push(e)),--h<=0&&c(d)})}}asNestedTest({key:e,index:t,parent:n,parentPath:i,originalParent:r,options:s}){const o=null!=e?e:t;if(null==o)throw TypeError("Must include `key` or `index` for nested validations");const a="number"==typeof o;let l=n[o];const u=Object.assign({},s,{strict:!0,parent:n,value:l,originalValue:r[o],key:void 0,[a?"index":"key"]:o,path:a||o.includes(".")?`${i||""}[${a?o:`"${o}"`}]`:(i?`${i}.`:"")+e});return(e,t,n)=>this.resolve(u)._validate(l,u,t,n)}validate(e,t){var n;let i=this.resolve(Object.assign({},t,{value:e})),r=null!=(n=null==t?void 0:t.disableStackTrace)?n:i.spec.disableStackTrace;return new Promise((n,s)=>i._validate(e,t,(e,t)=>{Dc.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new Dc(e,t,void 0,void 0,r)):n(t)}))}validateSync(e,t){var n;let i,r=this.resolve(Object.assign({},t,{value:e})),s=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return r._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw Dc.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new Dc(t,e,void 0,void 0,s);i=n}),i}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(Dc.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(Dc.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):eh(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=Yc({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=Yc({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=zc.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=zc.notNull){return this.nullability(!1,e)}required(e=zc.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=zc.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),i=Yc(t),r=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(r)return!1;if(e.OPTIONS.test===i.OPTIONS.test)return!1}return!0}),n.tests.push(i),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),i=Pc(e).map(e=>new Wc(e));return i.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new $c(i,t):$c.fromOptions(i,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=Yc({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=zc.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=Yc({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=zc.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=Yc({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:i,optional:r,nullable:s}=t.spec,o={meta:i,label:n,optional:r,nullable:s,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.filter((e,t,n)=>n.findIndex(t=>t.OPTIONS.name===e.OPTIONS.name)===t).map(t=>{const n=t.OPTIONS.params&&e?Kc(Object.assign({},t.OPTIONS.params),e):t.OPTIONS.params;return{name:t.OPTIONS.name,params:n}})};return o}get"~standard"(){const e=this,t={version:1,vendor:"yup",async validate(t){try{return{value:await e.validate(t,{abortEarly:!1})}}catch(e){if(e instanceof Dc)return{issues:nh(e)};throw e}}};return t}}ih.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])ih.prototype[`${e}At`]=function(t,n,i={}){const{parent:r,parentPath:s,schema:o}=Qc(this,t,n,i.context);return o[e](r&&r[s],Object.assign({},i,{parent:r,path:t}))};for(const e of["equals","is"])ih.prototype[e]=ih.prototype.oneOf;for(const e of["not","nope"])ih.prototype[e]=ih.prototype.notOneOf;const rh=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function sh(e){var t,n;const i=rh.exec(e);return i?{year:oh(i[1]),month:oh(i[2],1)-1,day:oh(i[3],1),hour:oh(i[4]),minute:oh(i[5]),second:oh(i[6]),millisecond:i[7]?oh(i[7].substring(0,3)):0,precision:null!=(t=null==(n=i[7])?void 0:n.length)?t:void 0,z:i[8]||void 0,plusMinus:i[9]||void 0,hourOffset:oh(i[10]),minuteOffset:oh(i[11])}:null}function oh(e,t=0){return Number(e)||t}let ah=/^[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])?)*$/,lh=/^((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,uh=/^(?:[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,ch=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),hh=e=>Hc(e)||e===e.trim(),dh={}.toString();function fh(){return new ph}class ph extends ih{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce||this.isType(e))return e;if(Array.isArray(e))return e;const n=null!=e&&e.toString?e.toString():e;return n===dh?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||zc.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=Ic.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=Ic.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=Ic.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,i,r=!1;return t&&("object"==typeof t?({excludeEmptyString:r=!1,message:n,name:i}=t):n=t),this.test({name:i||"matches",message:n||Ic.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&r||-1!==t.search(e)})}email(e=Ic.email){return this.matches(ah,{name:"email",message:e,excludeEmptyString:!0})}url(e=Ic.url){return this.matches(lh,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Ic.uuid){return this.matches(uh,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,i="";return e&&("object"==typeof e?({message:i="",allowOffset:t=!1,precision:n}=e):i=e),this.matches(ch,{name:"datetime",message:i||Ic.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:i||Ic.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=sh(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:i||Ic.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=sh(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=Ic.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:hh})}lowercase(e=Ic.lowercase){return this.transform(e=>Hc(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Hc(e)||e===e.toLowerCase()})}uppercase(e=Ic.uppercase){return this.transform(e=>Hc(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Hc(e)||e===e.toUpperCase()})}}fh.prototype=ph.prototype;function mh(){return new _h}class _h extends ih{constructor(){super({type:"number",check:e=>(e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!(e=>e!=+e)(e))}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce)return e;let n=e;if("string"==typeof n){if(n=n.replace(/\s/g,""),""===n)return NaN;n=+n}return this.isType(n)||null===n?n:parseFloat(n)})})}min(e,t=Fc.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=Fc.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=Fc.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=Fc.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(e=Fc.positive){return this.moreThan(0,e)}negative(e=Fc.negative){return this.lessThan(0,e)}integer(e=Fc.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(e=>Hc(e)?e:0|e)}round(e){var t;let n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>Hc(t)?t:Math[e](t))}}mh.prototype=_h.prototype;let gh=new Date("");function yh(){return new vh}class vh extends ih{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=sh(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?vh.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(Wc.isRef(e))n=e;else{let i=this.cast(e);if(!this._typeCheck(i))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(e,t=jc.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=jc.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function bh(e,t){let n=1/0;return e.some((e,i)=>{var r;if(null!=(r=t.path)&&r.includes(e))return n=i,!0}),n}function xh(e){return(t,n)=>bh(e,t)-bh(e,n)}vh.INVALID_DATE=gh,yh.prototype=vh.prototype,yh.INVALID_DATE=gh;const wh=(e,t,n)=>{if("string"!=typeof e)return e;let i=e;try{i=JSON.parse(e)}catch(e){}return n.isType(i)?i:e};function Eh(e){if("fields"in e){const t={};for(const[n,i]of Object.entries(e.fields))t[n]=Eh(i);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=Eh(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Eh)}):"optional"in e?e.optional():e}let Ah=e=>"[object Object]"===Object.prototype.toString.call(e);function Th(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const Sh=xh([]);function kh(e){return new Oh(e)}class Oh extends ih{constructor(e){super({type:"object",check:e=>Ah(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=Sh,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let i=super._cast(e,t);if(void 0===i)return this.getDefault(t);if(!this._typeCheck(i))return i;let r=this.fields,s=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(i).filter(e=>!this._nodes.includes(e))),a={},l=Object.assign({},t,{parent:a,__validating:t.__validating||!1}),u=!1;for(const e of o){let n=r[e],o=e in i,c=i[e];if(n){let r;l.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:c,context:t.context,parent:a});let s=n instanceof ih?n.spec:void 0,o=null==s?void 0:s.strict;if(null!=s&&s.strip){u=u||e in i;continue}r=t.__validating&&o?c:n.cast(c,l),void 0!==r&&(a[e]=r)}else o&&!s&&(a[e]=c);o===e in a&&a[e]===c||(u=!0)}return u?a:i}_validate(e,t={},n,i){let{from:r=[],originalValue:s=e,recursive:o=this.spec.recursive}=t;t.from=[{schema:this,value:s},...r],t.__validating=!0,t.originalValue=s,super._validate(e,t,n,(e,r)=>{if(!o||!Ah(r))return void i(e,r);s=s||r;let a=[];for(let e of this._nodes){let n=this.fields[e];n&&!Wc.isRef(n)&&a.push(n.asNestedTest({options:t,key:e,parent:r,parentPath:t.path,originalParent:s}))}this.runTests({tests:a,value:r,originalValue:s,options:t},n,t=>{i(t.sort(this._sortErrors).concat(e),r)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const i=n[e];n[e]=void 0===i?t:i}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(n=>{var i;const r=this.fields[n];let s=e;null!=(i=s)&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),t[n]=r&&"getDefault"in r?r.getDefault(s):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],i=new Set,r=new Set(t.map(([e,t])=>`${e}-${t}`));function s(e,t){let s=_c.split(e)[0];i.add(s),r.has(`${t}-${s}`)||n.push([t,s])}for(const t of Object.keys(e)){let n=e[t];i.add(t),Wc.isRef(n)&&n.isSibling?s(n.path,t):Gc(n)&&"deps"in n&&n.deps.forEach(e=>s(e,t))}return xc.array(Array.from(i),n).reverse()}(e,t),n._sortErrors=xh(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),i=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),i)})}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return Eh(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let i=_c.getter(e,!0);return this.transform(r=>{if(!r)return r;let s=r;return((e,t)=>{const n=[..._c.normalizePath(t)];if(1===n.length)return n[0]in e;let i=n.pop(),r=_c.getter(_c.join(n),!0)(e);return!(!r||!(i in r))})(r,e)&&(s=Object.assign({},r),n||delete s[e],s[t]=i(r)),s})}json(){return this.transform(wh)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Bc.exact,test(e){if(null==e)return!0;const t=Th(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Bc.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=Th(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=Bc.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const n={};for(const i of Object.keys(t))n[e(i)]=t[i];return n})}camelCase(){return this.transformKeys(yc.camelCase)}snakeCase(){return this.transformKeys(yc.snakeCase)}constantCase(){return this.transformKeys(e=>yc.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[r,s]of Object.entries(t.fields)){var i;let t=e;null!=(i=t)&&i.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[r]})),n.fields[r]=s.describe(t)}return n}}function Ph(e){return new Ch(e)}kh.prototype=Oh.prototype;class Ch extends ih{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let i=!1;const r=n.map((e,r)=>{const s=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${r}]`,parent:n,originalValue:e,value:e,index:r}));return s!==e&&(i=!0),s});return i?r:n}_validate(e,t={},n,i){var r;let s=this.innerType,o=null!=(r=t.recursive)?r:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,n,(r,a)=>{var l;if(!o||!s||!this._typeCheck(a))return void i(r,a);let u=new Array(a.length);for(let n=0;n<a.length;n++){var c;u[n]=s.asNestedTest({options:t,index:n,parent:a,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:a,tests:u,originalValue:null!=(l=t.originalValue)?l:e,options:t},n,e=>i(e.concat(r),a))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(wh)}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(!Gc(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Oc(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=Uc.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||Uc.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||Uc.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,i)=>!e(t,n,i):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);if(t.innerType){var i;let r=e;null!=(i=r)&&i.value&&(r=Object.assign({},r,{parent:r.value,value:r.value[0]})),n.innerType=t.innerType.describe(r)}return n}}Ph.prototype=Ch.prototype;const Mh="Данное поле обязательно для заполнения",Rh=()=>fh(),Lh=(e=Mh)=>Rh().required(e),Nh=mh(),Dh=Nh.required(Mh),zh=Ph(),Ih=yh(),Fh=Ih.required(Mh),jh=({items:e,onOpen:t,defaultValue:n=null})=>{const[i,l]=T.useState(n),u=T.useCallback(()=>{l(null)},[]);T.useEffect(()=>{n&&l(n)},[n]);const c=T.useId();return H(r,{id:c,children:e.map(({value:e,summary:n,getDetails:r})=>{const h=`${c}-accordion-${e}`;return Y(s,{expanded:e===i,children:[H(o,{expandIcon:H(ne,{}),onClick:()=>{l(n=>n===e?null:(t?.(e),e))},"aria-controls":`${h}-content`,id:`${h}-header`,children:n}),H(a,{children:r({onClose:u})})]},h)})})},Bh=e=>{const{children:t,variant:n="contained",loading:i,icon:r,sx:s,...o}=e;return r?H(ie,{...o,loading:i,children:r}):H(l,{sx:{whiteSpace:"nowrap",padding:"5px 15px",textTransform:"none",...s},loading:i,loadingPosition:"start",variant:n,...o,children:t})},Uh={reset:le,edit:oe,move:ae,save:ue,delete:se,clear:re},Vh=u(c)(()=>({padding:0})),Gh=({title:e,iconProps:t,...n})=>{const i=T.useId(),r=Uh[t.name],s=t.color??"primary";return e?H(h,{title:e,children:H(Vh,{id:i,...n,onClick:e=>{e.stopPropagation(),n.onClick?.(e)},children:H(r,{fontSize:"medium",color:s})})}):H(Vh,{id:i,...n,onClick:e=>{e.stopPropagation(),n.onClick?.(e)},children:H(r,{fontSize:"medium",color:s})})},$h=T.forwardRef(function(e,t){return H(d,{direction:"up",ref:t,...e})}),Zh=({notification:e,onDelete:t,disabled:n=!1,...i})=>{const r=T.useId(),[s,o]=T.useState(!1),a=()=>{o(!1)},u=T.useMemo(()=>({name:"delete",color:n?"disabled":"error"}),[n]);return Y(T.Fragment,{children:[e?H(h,{title:e.title,children:H(Gh,{...i,iconProps:u,onClick:()=>{o(!0)},disabled:n})}):H(Gh,{...i,iconProps:u,onClick:t,disabled:n}),e?Y(f,{slots:{transition:$h},open:s,onClose:a,children:[H(p,{id:`${r}-dialog-title`,children:e.title}),H(m,{children:H(_,{id:`${r}-dialog-text`,children:e.description})}),Y(g,{children:[H(l,{variant:"contained",color:"error",sx:{textTransform:"none"},onClick:a,children:"Отмена"}),H(l,{variant:"contained",sx:{textTransform:"none"},onClick:()=>{t(),a()},children:"Подтвердить"})]})]}):null]})},qh=u("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),Wh=({children:e,accept:t,onFilesLoad:n,...i})=>Y(Bh,{...i,component:"label",variant:"contained",startIcon:H(ce,{}),children:[e,H(qh,{type:"file",accept:t,onChange:e=>{const{target:{files:t}}=e;t&&n({event:e,files:t})},multiple:!0})]});var Hh=Vu(({name:e,title:t,description:n,onSuccess:i,onOpen:r,onClose:s,theme:o="info",agreeButton:a,disagreeButton:l,content:u})=>{const c=T.useId(),h=T.useId(),d=T.useId(),v=Zo.getIsOpen(e),b=()=>{Zo.close(e)};return T.useEffect(()=>{v?r?.():s?.()},[v]),Y(f,{id:c,open:v,onClose:b,"aria-labelledby":h,"aria-describedby":d,children:[H(p,{id:h,sx:({palette:e})=>({background:e[o].main,color:e[o].contrastText}),children:t}),H(y,{}),Y(m,{sx:({spacing:e})=>({display:"grid",gap:e(2)}),children:[H(_,{id:d,children:n}),u?Y(T.Fragment,{children:[H(y,{}),u]}):null]}),H(y,{}),Y(g,{children:[H(Bh,{color:"error",onClick:b,disabled:l?.disabled,children:l?.text??"Закрыть"}),H(Bh,{color:"success",onClick:()=>{i(),b()},disabled:a?.disabled,children:a?.text??"Подтвердить"})]})]})});const Yh=({children:e,sx:t,...n})=>H(r,{...n,sx:e=>{const{spacing:n,breakpoints:i}=e;return{p:n(2),borderRadius:"12px",boxShadow:"\n 0 1px 2px rgba(0, 0, 0, 0.08),\n 0 2px 4px rgba(0, 0, 0, 0.08),\n 0 4px 8px rgba(0, 0, 0, 0.08),\n 0 8px 16px rgba(0, 0, 0, 0.08),\n 0 16px 32px rgba(0, 0, 0, 0.08)\n ",maxHeight:"80vh",maxWidth:"80vw",overflowX:"auto",[i.down("sm")]:{maxWidth:"100%",maxHeight:"100%"},...t?.(e)}},children:e});var Kh=e=>"checkbox"===e.type,Xh=e=>e instanceof Date,Qh=e=>null==e;const Jh=e=>"object"==typeof e;var ed=e=>!Qh(e)&&!Array.isArray(e)&&Jh(e)&&!Xh(e),td=e=>ed(e)&&e.target?Kh(e.target)?e.target.checked:e.target.value:e,nd=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),id="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function rd(e){if(e instanceof Date)return new Date(e);const t="undefined"!=typeof FileList&&e instanceof FileList;if(id&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!(n||ed(e)&&(e=>{const t=e.constructor&&e.constructor.prototype;return ed(t)&&t.hasOwnProperty("isPrototypeOf")})(e)))return e;const i=n?[]:Object.create(Object.getPrototypeOf(e));for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=rd(e[t]));return i}var sd=e=>/^\w*$/.test(e),od=e=>void 0===e,ad=e=>Array.isArray(e)?e.filter(Boolean):[],ld=e=>ad(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ud=(e,t,n)=>{if(!t||!ed(e))return n;const i=(sd(t)?[t]:ld(t)).reduce((e,t)=>Qh(e)?e:e[t],e);return od(i)||i===e?od(e[t])?n:e[t]:i},cd=e=>"boolean"==typeof e,hd=e=>"function"==typeof e,dd=(e,t,n)=>{let i=-1;const r=sd(t)?[t]:ld(t),s=r.length,o=s-1;for(;++i<s;){const t=r[i];let s=n;if(i!==o){const n=e[t];s=ed(n)||Array.isArray(n)?n:isNaN(+r[i+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=s,e=e[t]}};const fd="blur",pd="focusout",md="change",_d="onBlur",gd="onChange",yd="onSubmit",vd="onTouched",bd="all",xd="max",wd="min",Ed="maxLength",Ad="minLength",Td="pattern",Sd="required",kd="validate",Od=S.createContext(null);Od.displayName="HookFormControlContext";const Pd=()=>S.useContext(Od);var Cd=(e,t,n,i=!0)=>{const r={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(r,s,{get:()=>{const r=s;return t._proxyFormState[r]!==bd&&(t._proxyFormState[r]=!i||bd),n&&(n[r]=!0),e[r]}});return r};const Md="undefined"!=typeof window?S.useLayoutEffect:S.useEffect;var Rd=e=>"string"==typeof e,Ld=(e,t,n,i,r)=>Rd(e)?(i&&t.watch.add(e),ud(n,e,r)):Array.isArray(e)?e.map(e=>(i&&t.watch.add(e),ud(n,e))):(i&&(t.watchAll=!0),n),Nd=e=>Qh(e)||!Jh(e);function Dd(e,t,n=new WeakSet){if(Nd(e)||Nd(t))return Object.is(e,t);if(Xh(e)&&Xh(t))return Object.is(e.getTime(),t.getTime());const i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of i){const i=e[s];if(!r.includes(s))return!1;if("ref"!==s){const e=t[s];if(Xh(i)&&Xh(e)||ed(i)&&ed(e)||Array.isArray(i)&&Array.isArray(e)?!Dd(i,e,n):!Object.is(i,e))return!1}}return!0}function zd(e){const t=Pd(),{name:n,disabled:i,control:r=t,shouldUnregister:s,defaultValue:o,exact:a=!0}=e,l=nd(r._names.array,n),u=S.useMemo(()=>ud(r._formValues,n,ud(r._defaultValues,n,o)),[r,n,o]),c=function(e){const t=Pd(),{control:n=t,name:i,defaultValue:r,disabled:s,exact:o,compute:a}=e||{},l=S.useRef(r),u=S.useRef(a),c=S.useRef(void 0),h=S.useRef(n),d=S.useRef(i);u.current=a;const[f,p]=S.useState(()=>{const e=n._getWatch(i,l.current);return u.current?u.current(e):e}),m=S.useCallback(e=>{const t=Ld(i,n._names,e||n._formValues,!1,l.current);return u.current?u.current(t):t},[n._formValues,n._names,i]),_=S.useCallback(e=>{if(!s){const t=Ld(i,n._names,e||n._formValues,!1,l.current);if(u.current){const e=u.current(t);Dd(e,c.current)||(p(e),c.current=e)}else p(t)}},[n._formValues,n._names,s,i]);Md(()=>(h.current===n&&Dd(d.current,i)||(h.current=n,d.current=i,_()),n._subscribe({name:i,formState:{values:!0},exact:o,callback:e=>{_(e.values)}})),[n,o,i,_]),S.useEffect(()=>n._removeUnmounted());const g=h.current!==n,y=d.current,v=S.useMemo(()=>{if(s)return null;const e=!g&&!Dd(y,i);return g||e?m():null},[s,g,i,y,m]);return null!==v?v:f}({control:r,name:n,defaultValue:u,exact:a}),h=function(e){const t=Pd(),{control:n=t,disabled:i,name:r,exact:s}=e||{},[o,a]=S.useState(n._formState),l=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Md(()=>n._subscribe({name:r,formState:l.current,exact:s,callback:e=>{!i&&a({...n._formState,...e})}}),[r,i,s]),S.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),S.useMemo(()=>Cd(o,n,l.current,!1),[o,n])}({control:r,name:n,exact:a}),d=S.useRef(e),f=S.useRef(void 0),p=S.useRef(r.register(n,{...e.rules,value:c,...cd(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;const m=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ud(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!ud(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!ud(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!ud(h.validatingFields,n)},error:{enumerable:!0,get:()=>ud(h.errors,n)}}),[h,n]),_=S.useCallback(e=>p.current.onChange({target:{value:td(e),name:n},type:md}),[n]),g=S.useCallback(()=>p.current.onBlur({target:{value:ud(r._formValues,n),name:n},type:fd}),[n,r._formValues]),y=S.useCallback(e=>{const t=ud(r._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>hd(e.focus)&&e.focus(),select:()=>hd(e.select)&&e.select(),setCustomValidity:t=>hd(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>hd(e.reportValidity)&&e.reportValidity()})},[r._fields,n]),v=S.useMemo(()=>({name:n,value:c,...cd(i)||h.disabled?{disabled:h.disabled||i}:{},onChange:_,onBlur:g,ref:y}),[n,i,h.disabled,_,g,y,c]);return S.useEffect(()=>{const e=r._options.shouldUnregister||s,t=f.current;t&&t!==n&&!l&&r.unregister(t),r.register(n,{...d.current.rules,...cd(d.current.disabled)?{disabled:d.current.disabled}:{}});const i=(e,t)=>{const n=ud(r._fields,e);n&&n._f&&(n._f.mount=t)};if(i(n,!0),e){const e=rd(ud(r._options.defaultValues,n,d.current.defaultValue));dd(r._defaultValues,n,e),od(ud(r._formValues,n))&&dd(r._formValues,n,e)}return!l&&r.register(n),f.current=n,()=>{(l?e&&!r._state.action:e)?r.unregister(n):i(n,!1)}},[n,r,l,s]),S.useEffect(()=>{r._setDisabledField({disabled:i,name:n})},[i,n,r]),S.useMemo(()=>({field:v,formState:h,fieldState:m}),[v,h,m])}const Id=e=>e.render(zd(e)),Fd=S.createContext(null);Fd.displayName="HookFormContext";const jd=()=>S.useContext(Fd),Bd=e=>{const{children:t,watch:n,getValues:i,getFieldState:r,setError:s,clearErrors:o,setValue:a,trigger:l,formState:u,resetField:c,reset:h,handleSubmit:d,unregister:f,control:p,register:m,setFocus:_,subscribe:g}=e;return S.createElement(Fd.Provider,{value:S.useMemo(()=>({watch:n,getValues:i,getFieldState:r,setError:s,clearErrors:o,setValue:a,trigger:l,formState:u,resetField:c,reset:h,handleSubmit:d,unregister:f,control:p,register:m,setFocus:_,subscribe:g}),[o,p,u,r,i,d,m,h,c,s,_,a,g,l,f,n])},S.createElement(Od.Provider,{value:p},t))};var Ud=(e,t,n,i,r)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[i]:r||!0}}:{},Vd=e=>Array.isArray(e)?e:[e],Gd=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function $d(e,t){const n={};for(const i in e)if(e.hasOwnProperty(i)){const r=e[i],s=t[i];if(r&&ed(r)&&s){const e=$d(r,s);ed(e)&&(n[i]=e)}else e[i]&&(n[i]=s)}return n}var Zd=e=>ed(e)&&!Object.keys(e).length,qd=e=>"file"===e.type,Wd=e=>{if(!id)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Hd=e=>"select-multiple"===e.type,Yd=e=>"radio"===e.type,Kd=e=>Wd(e)&&e.isConnected;function Xd(e,t){const n=Array.isArray(t)?t:sd(t)?[t]:ld(t),i=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let i=0;for(;i<n;)e=od(e)?i++:e[t[i++]];return e}(e,n),r=n.length-1,s=n[r];return i&&delete i[s],0!==r&&(ed(i)&&Zd(i)||Array.isArray(i)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!od(e[t]))return!1;return!0}(i))&&Xd(e,n.slice(0,-1)),e}function Qd(e){return Array.isArray(e)||ed(e)&&!(e=>{for(const t in e)if(hd(e[t]))return!0;return!1})(e)}function Jd(e,t={}){for(const n in e){const i=e[n];Qd(i)?(t[n]=Array.isArray(i)?[]:{},Jd(i,t[n])):od(i)||(t[n]=!0)}return t}function ef(e,t,n){n||(n=Jd(t));for(const i in e){const r=e[i];if(Qd(r))od(t)||Nd(n[i])?n[i]=Jd(r,Array.isArray(r)?[]:{}):ef(r,Qh(t)?{}:t[i],n[i]);else{const e=t[i];n[i]=!Dd(r,e)}}return n}const tf={value:!1,isValid:!1},nf={value:!0,isValid:!0};var rf=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&&!od(e[0].attributes.value)?od(e[0].value)||""===e[0].value?nf:{value:e[0].value,isValid:!0}:nf:tf}return tf},sf=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:i})=>od(e)?e:t?""===e?NaN:e?+e:e:n&&Rd(e)?new Date(e):i?i(e):e;const of={isValid:!1,value:null};var af=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,of):of;function lf(e){const t=e.ref;return qd(t)?t.files:Yd(t)?af(e.refs).value:Hd(t)?[...t.selectedOptions].map(({value:e})=>e):Kh(t)?rf(e.refs).value:sf(od(t.value)?e.ref.value:t.value,e)}var uf=e=>e instanceof RegExp,cf=e=>od(e)?e:uf(e)?e.source:ed(e)?uf(e.value)?e.value.source:e.value:e,hf=e=>({isOnSubmit:!e||e===yd,isOnBlur:e===_d,isOnChange:e===gd,isOnAll:e===bd,isOnTouch:e===vd});const df="AsyncFunction";var ff=e=>!!e&&!!e.validate&&!!(hd(e.validate)&&e.validate.constructor.name===df||ed(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===df)),pf=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const mf=(e,t,n,i)=>{for(const r of n||Object.keys(e)){const n=ud(e,r);if(n){const{_f:e,...s}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],r)&&!i)return!0;if(e.ref&&t(e.ref,e.name)&&!i)return!0;if(mf(s,t))break}else if(ed(s)&&mf(s,t))break}}};function _f(e,t,n){const i=ud(e,n);if(i||sd(n))return{error:i,name:n};const r=n.split(".");for(;r.length;){const i=r.join("."),s=ud(t,i),o=ud(e,i);if(s&&!Array.isArray(s)&&n!==i)return{name:n};if(o&&o.type)return{name:i,error:o};if(o&&o.root&&o.root.type)return{name:`${i}.root`,error:o.root};r.pop()}return{name:n}}var gf=(e,t,n)=>{const i=Vd(ud(e,n));return dd(i,"root",t[n]),dd(e,n,i),e};function yf(e,t,n="validate"){if(Rd(e)||Array.isArray(e)&&e.every(Rd)||cd(e)&&!e)return{type:n,message:Rd(e)?e:"",ref:t}}var vf=e=>ed(e)&&!uf(e)?e:{value:e,message:""},bf=async(e,t,n,i,r,s)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:c,min:h,max:d,pattern:f,validate:p,name:m,valueAsNumber:_,mount:g}=e._f,y=ud(n,m);if(!g||t.has(m))return{};const v=a?a[0]:o,b=e=>{r&&v.reportValidity&&(v.setCustomValidity(cd(e)?"":e||""),v.reportValidity())},x={},w=Yd(o),E=Kh(o),A=w||E,T=(_||qd(o))&&od(o.value)&&od(y)||Wd(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,S=Ud.bind(null,m,i,x),k=(e,t,n,i=Ed,r=Ad)=>{const s=e?t:n;x[m]={type:e?i:r,message:s,ref:o,...S(e?i:r,s)}};if(s?!Array.isArray(y)||!y.length:l&&(!A&&(T||Qh(y))||cd(y)&&!y||E&&!rf(a).isValid||w&&!af(a).isValid)){const{value:e,message:t}=Rd(l)?{value:!!l,message:l}:vf(l);if(e&&(x[m]={type:Sd,message:t,ref:v,...S(Sd,t)},!i))return b(t),x}if(!(T||Qh(h)&&Qh(d))){let e,t;const n=vf(d),r=vf(h);if(Qh(y)||isNaN(y)){const i=o.valueAsDate||new Date(y),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;Rd(n.value)&&y&&(e=a?s(y)>s(n.value):l?y>n.value:i>new Date(n.value)),Rd(r.value)&&y&&(t=a?s(y)<s(r.value):l?y<r.value:i<new Date(r.value))}else{const i=o.valueAsNumber||(y?+y:y);Qh(n.value)||(e=i>n.value),Qh(r.value)||(t=i<r.value)}if((e||t)&&(k(!!e,n.message,r.message,xd,wd),!i))return b(x[m].message),x}if((u||c)&&!T&&(Rd(y)||s&&Array.isArray(y))){const e=vf(u),t=vf(c),n=!Qh(e.value)&&y.length>+e.value,r=!Qh(t.value)&&y.length<+t.value;if((n||r)&&(k(n,e.message,t.message),!i))return b(x[m].message),x}if(f&&!T&&Rd(y)){const{value:e,message:t}=vf(f);if(uf(e)&&!y.match(e)&&(x[m]={type:Td,message:t,ref:o,...S(Td,t)},!i))return b(t),x}if(p)if(hd(p)){const e=yf(await p(y,n),v);if(e&&(x[m]={...e,...S(kd,e.message)},!i))return b(e.message),x}else if(ed(p)){let e={};for(const t in p){if(!Zd(e)&&!i)break;const r=yf(await p[t](y,n),v,t);r&&(e={...r,...S(t,r.message)},b(r.message),i&&(x[m]=e))}if(!Zd(e)&&(x[m]={ref:v,...e},!i))return x}return b(!0),x};const xf={mode:yd,reValidateMode:gd,shouldFocusError:!0};function wf(e={}){let t,n={...xf,...e},i={submitCount:0,isDirty:!1,isReady:!1,isLoading:hd(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},r={},s=(ed(n.defaultValues)||ed(n.values))&&rd(n.defaultValues||n.values)||{},o=n.shouldUnregister?{}:rd(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:Gd(),state:Gd()},p=n.criteriaMode===bd,m=async e=>{if(!a.keepIsValid&&!n.disabled&&(h.isValid||d.isValid||e)){let e;n.resolver?(e=Zd((await b()).errors),_()):e=await x(r,!0),e!==i.isValid&&f.state.next({isValid:e})}},_=(e,t)=>{!n.disabled&&(h.isValidating||h.validatingFields||d.isValidating||d.validatingFields)&&((e||Array.from(l.mount)).forEach(e=>{e&&(t?dd(i.validatingFields,e,t):Xd(i.validatingFields,e))}),f.state.next({validatingFields:i.validatingFields,isValidating:!Zd(i.validatingFields)}))},g=(e,t,n,i)=>{const l=ud(r,e);if(l){const r=ud(o,e,od(n)?ud(s,e):n);od(r)||i&&i.defaultChecked||t?dd(o,e,t?r:lf(l._f)):A(e,r),a.mount&&!a.action&&m()}},y=(e,t,r,o,a)=>{let l=!1,u=!1;const c={name:e};if(!n.disabled){if(!r||o){(h.isDirty||d.isDirty)&&(u=i.isDirty,i.isDirty=c.isDirty=w(),l=u!==c.isDirty);const n=Dd(ud(s,e),t);u=!!ud(i.dirtyFields,e),n?Xd(i.dirtyFields,e):dd(i.dirtyFields,e,!0),c.dirtyFields=i.dirtyFields,l=l||(h.dirtyFields||d.dirtyFields)&&u!==!n}if(r){const t=ud(i.touchedFields,e);t||(dd(i.touchedFields,e,r),c.touchedFields=i.touchedFields,l=l||(h.touchedFields||d.touchedFields)&&t!==r)}l&&a&&f.state.next(c)}return l?c:{}},v=(e,r,s,o)=>{const a=ud(i.errors,e),l=(h.isValid||d.isValid)&&cd(r)&&i.isValid!==r;var c;if(n.delayError&&s?(c=()=>((e,t)=>{dd(i.errors,e,t),f.state.next({errors:i.errors})})(e,s),t=e=>{clearTimeout(u),u=setTimeout(c,e)},t(n.delayError)):(clearTimeout(u),t=null,s?dd(i.errors,e,s):Xd(i.errors,e)),(s?!Dd(a,s):a)||!Zd(o)||l){const t={...o,...l&&cd(r)?{isValid:r}:{},errors:i.errors,name:e};i={...i,...t},f.state.next(t)}},b=async e=>{_(e,!0);const t=await n.resolver(o,n.context,((e,t,n,i)=>{const r={};for(const n of e){const e=ud(t,n);e&&dd(r,n,e._f)}return{criteriaMode:n,names:[...e],fields:r,shouldUseNativeValidation:i}})(e||l.mount,r,n.criteriaMode,n.shouldUseNativeValidation));return t},x=async(t,r,s={valid:!0})=>{for(const a in t){const u=t[a];if(u){const{_f:t,...a}=u;if(t){const a=l.array.has(t.name),c=u._f&&ff(u._f);c&&h.validatingFields&&_([t.name],!0);const d=await bf(u,l.disabled,o,p,n.shouldUseNativeValidation&&!r,a);if(c&&h.validatingFields&&_([t.name]),d[t.name]&&(s.valid=!1,r||e.shouldUseNativeValidation))break;!r&&(ud(d,t.name)?a?gf(i.errors,d,t.name):dd(i.errors,t.name,d[t.name]):Xd(i.errors,t.name))}!Zd(a)&&await x(a,r,s)}}return s.valid},w=(e,t)=>!n.disabled&&(e&&t&&dd(o,e,t),!Dd(C(),s)),E=(e,t,n)=>Ld(e,l,{...a.mount?o:od(t)?s:Rd(e)?{[e]:t}:t},n,t),A=(e,t,n={})=>{const i=ud(r,e);let s=t;if(i){const n=i._f;n&&(!n.disabled&&dd(o,e,sf(t,n)),s=Wd(n.ref)&&Qh(t)?"":t,Hd(n.ref)?[...n.ref.options].forEach(e=>e.selected=s.includes(e.value)):n.refs?Kh(n.ref)?n.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(s)?e.checked=!!s.find(t=>t===e.value):e.checked=s===e.value||!!s)}):n.refs.forEach(e=>e.checked=e.value===s):qd(n.ref)?n.ref.value="":(n.ref.value=s,n.ref.type||f.state.next({name:e,values:rd(o)})))}(n.shouldDirty||n.shouldTouch)&&y(e,s,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&P(e)},T=(e,t,n)=>{for(const i in t){if(!t.hasOwnProperty(i))return;const s=t[i],o=e+"."+i,a=ud(r,o);(l.array.has(e)||ed(s)||a&&!a._f)&&!Xh(s)?T(o,s,n):A(o,s,n)}},S=(e,t,n={})=>{const u=ud(r,e),c=l.array.has(e),p=rd(t);dd(o,e,p),c?(f.array.next({name:e,values:rd(o)}),(h.isDirty||h.dirtyFields||d.isDirty||d.dirtyFields)&&n.shouldDirty&&f.state.next({name:e,dirtyFields:ef(s,o),isDirty:w(e,p)})):!u||u._f||Qh(p)?A(e,p,n):T(e,p,n),pf(e,l)?f.state.next({...i,name:e,values:rd(o)}):f.state.next({name:a.mount?e:void 0,values:rd(o)})},k=async e=>{a.mount=!0;const s=e.target;let u=s.name,c=!0;const g=ud(r,u),w=e=>{c=Number.isNaN(e)||Xh(e)&&isNaN(e.getTime())||Dd(e,ud(o,u,e))},E=hf(n.mode),A=hf(n.reValidateMode);if(g){let a,S;const k=s.type?lf(g._f):td(e),O=e.type===fd||e.type===pd,C=!((T=g._f).mount&&(T.required||T.min||T.max||T.maxLength||T.minLength||T.pattern||T.validate)||n.resolver||ud(i.errors,u)||g._f.deps)||((e,t,n,i,r)=>!r.isOnAll&&(!n&&r.isOnTouch?!(t||e):(n?i.isOnBlur:r.isOnBlur)?!e:!(n?i.isOnChange:r.isOnChange)||e))(O,ud(i.touchedFields,u),i.isSubmitted,A,E),M=pf(u,l,O);dd(o,u,k),O?s&&s.readOnly||(g._f.onBlur&&g._f.onBlur(e),t&&t(0)):g._f.onChange&&g._f.onChange(e);const R=y(u,k,O),L=!Zd(R)||M;if(!O&&f.state.next({name:u,type:e.type,values:rd(o)}),C)return(h.isValid||d.isValid)&&("onBlur"===n.mode?O&&m():O||m()),L&&f.state.next({name:u,...M?{}:R});if(!O&&M&&f.state.next({...i}),n.resolver){const{errors:e}=await b([u]);if(_([u]),w(k),c){const t=_f(i.errors,r,u),n=_f(e,r,t.name||u);a=n.error,u=n.name,S=Zd(e)}}else _([u],!0),a=(await bf(g,l.disabled,o,p,n.shouldUseNativeValidation))[u],_([u]),w(k),c&&(a?S=!1:(h.isValid||d.isValid)&&(S=await x(r,!0)));c&&(g._f.deps&&(!Array.isArray(g._f.deps)||g._f.deps.length>0)&&P(g._f.deps),v(u,S,a,R))}var T},O=(e,t)=>{if(ud(i.errors,t)&&e.focus)return e.focus(),1},P=async(e,t={})=>{let s,o;const a=Vd(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(_(e),e)for(const n of e){const e=ud(t,n);e?dd(i.errors,n,e):Xd(i.errors,n)}else i.errors=t;return t})(od(e)?e:a);s=Zd(t),o=e?!a.some(e=>ud(t,e)):s}else e?(o=(await Promise.all(a.map(async e=>{const t=ud(r,e);return await x(t&&t._f?{[e]:t}:t)}))).every(Boolean),(o||i.isValid)&&m()):o=s=await x(r);return f.state.next({...!Rd(e)||(h.isValid||d.isValid)&&s!==i.isValid?{}:{name:e},...n.resolver||!e?{isValid:s}:{},errors:i.errors}),t.shouldFocus&&!o&&mf(r,O,e?a:l.mount),o},C=(e,t)=>{let n={...a.mount?o:s};return t&&(n=$d(t.dirtyFields?i.dirtyFields:i.touchedFields,n)),od(e)?n:Rd(e)?ud(n,e):e.map(e=>ud(n,e))},M=(e,t)=>({invalid:!!ud((t||i).errors,e),isDirty:!!ud((t||i).dirtyFields,e),error:ud((t||i).errors,e),isValidating:!!ud(i.validatingFields,e),isTouched:!!ud((t||i).touchedFields,e)}),R=(e,t,n)=>{const s=(ud(r,e,{_f:{}})._f||{}).ref,o=ud(i.errors,e)||{},{ref:a,message:l,type:u,...c}=o;dd(i.errors,e,{...c,...t,ref:s}),f.state.next({name:e,errors:i.errors,isValid:!1}),n&&n.shouldFocus&&s&&s.focus&&s.focus()},L=e=>f.state.subscribe({next:t=>{var n,r,a;n=e.name,r=t.name,a=e.exact,n&&r&&n!==r&&!Vd(n).some(e=>e&&(a?e===r:e.startsWith(r)||r.startsWith(e)))||!((e,t,n,i)=>{n(e);const{name:r,...s}=e;return Zd(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(e=>t[e]===(!i||bd))})(t,e.formState||h,U,e.reRenderRoot)||e.callback({values:{...o},...i,...t,defaultValues:s})}}).unsubscribe,N=(e,t={})=>{for(const a of e?Vd(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(Xd(r,a),Xd(o,a)),!t.keepError&&Xd(i.errors,a),!t.keepDirty&&Xd(i.dirtyFields,a),!t.keepTouched&&Xd(i.touchedFields,a),!t.keepIsValidating&&Xd(i.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&Xd(s,a);f.state.next({values:rd(o)}),f.state.next({...i,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&m()},D=({disabled:e,name:t})=>{if(cd(e)&&a.mount||e||l.disabled.has(t)){const n=l.disabled.has(t)!==!!e;e?l.disabled.add(t):l.disabled.delete(t),n&&a.mount&&!a.action&&m()}},z=(e,t={})=>{let i=ud(r,e);const o=cd(t.disabled)||cd(n.disabled);return dd(r,e,{...i||{},_f:{...i&&i._f?i._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),i?D({disabled:cd(t.disabled)?t.disabled:n.disabled,name:e}):g(e,!0,t.value),{...o?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:cf(t.min),max:cf(t.max),minLength:cf(t.minLength),maxLength:cf(t.maxLength),pattern:cf(t.pattern)}:{},name:e,onChange:k,onBlur:k,ref:o=>{if(o){z(e,t),i=ud(r,e);const n=od(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=(e=>Yd(e)||Kh(e))(n),l=i._f.refs||[];if(a?l.find(e=>e===n):n===i._f.ref)return;dd(r,e,{_f:{...i._f,...a?{refs:[...l.filter(Kd),n,...Array.isArray(ud(s,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),g(e,!1,void 0,n)}else i=ud(r,e,{}),i._f&&(i._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!nd(l.array,e)||!a.action)&&l.unMount.add(e)}}},I=()=>n.shouldFocusError&&mf(r,O,l.mount),F=(e,t)=>async s=>{let a;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let u=rd(o);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await b();_(),i.errors=e,u=rd(t)}else await x(r);if(l.disabled.size)for(const e of l.disabled)Xd(u,e);if(Xd(i.errors,"root"),Zd(i.errors)){f.state.next({errors:{}});try{await e(u,s)}catch(e){a=e}}else t&&await t({...i.errors},s),I(),setTimeout(I);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Zd(i.errors)&&!a,submitCount:i.submitCount+1,errors:i.errors}),a)throw a},j=(e,t={})=>{const u=e?rd(e):s,c=rd(u),d=Zd(e),p=d?s:c;if(t.keepDefaultValues||(s=u),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(ef(s,o))]);for(const t of Array.from(e)){const e=ud(i.dirtyFields,t),n=ud(o,t),r=ud(p,t);e&&!od(n)?dd(p,t,n):e||od(r)||S(t,r)}}else{if(id&&od(e))for(const e of l.mount){const t=ud(r,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Wd(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)S(e,ud(p,e));else r={}}o=n.shouldUnregister?t.keepDefaultValues?rd(s):{}:rd(p),f.array.next({values:{...p}}),f.state.next({values:{...p}})}l={mount:t.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!h.isValid||!!t.keepIsValid||!!t.keepDirtyValues||!n.shouldUnregister&&!Zd(p),a.watch=!!n.shouldUnregister,a.keepIsValid=!!t.keepIsValid,a.action=!1,t.keepErrors||(i.errors={}),f.state.next({submitCount:t.keepSubmitCount?i.submitCount:0,isDirty:!d&&(t.keepDirty?i.isDirty:!(!t.keepDefaultValues||Dd(e,s))),isSubmitted:!!t.keepIsSubmitted&&i.isSubmitted,dirtyFields:d?{}:t.keepDirtyValues?t.keepDefaultValues&&o?ef(s,o):i.dirtyFields:t.keepDefaultValues&&e?ef(s,e):t.keepDirty?i.dirtyFields:{},touchedFields:t.keepTouched?i.touchedFields:{},errors:t.keepErrors?i.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&i.isSubmitSuccessful,isSubmitting:!1,defaultValues:s})},B=(e,t)=>j(hd(e)?e(o):e,{...n.resetOptions,...t}),U=e=>{i={...i,...e}},V={control:{register:z,unregister:N,getFieldState:M,handleSubmit:F,setError:R,_subscribe:L,_runSchema:b,_updateIsValidating:_,_focusError:I,_getWatch:E,_getDirty:w,_setValid:m,_setFieldArray:(e,t=[],l,u,c=!0,p=!0)=>{if(u&&l&&!n.disabled){if(a.action=!0,p&&Array.isArray(ud(r,e))){const t=l(ud(r,e),u.argA,u.argB);c&&dd(r,e,t)}if(p&&Array.isArray(ud(i.errors,e))){const t=l(ud(i.errors,e),u.argA,u.argB);c&&dd(i.errors,e,t),((e,t)=>{!ad(ud(e,t)).length&&Xd(e,t)})(i.errors,e)}if((h.touchedFields||d.touchedFields)&&p&&Array.isArray(ud(i.touchedFields,e))){const t=l(ud(i.touchedFields,e),u.argA,u.argB);c&&dd(i.touchedFields,e,t)}(h.dirtyFields||d.dirtyFields)&&(i.dirtyFields=ef(s,o)),f.state.next({name:e,isDirty:w(e,t),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else dd(o,e,t)},_setDisabledField:D,_setErrors:e=>{i.errors=e,f.state.next({errors:i.errors,isValid:!1})},_getFieldArray:e=>ad(ud(a.mount?o:s,e,n.shouldUnregister?ud(s,e,[]):[])),_reset:j,_resetDefaultValues:()=>hd(n.defaultValues)&&n.defaultValues().then(e=>{B(e,n.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of l.unMount){const t=ud(r,e);t&&(t._f.refs?t._f.refs.every(e=>!Kd(e)):!Kd(t._f.ref))&&N(e)}l.unMount=new Set},_disableForm:e=>{cd(e)&&(f.state.next({disabled:e}),mf(r,(t,n)=>{const i=ud(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},_subjects:f,_proxyFormState:h,get _fields(){return r},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 i},get _options(){return n},set _options(e){n={...n,...e}}},subscribe:e=>(a.mount=!0,d={...d,...e.formState},L({...e,formState:{...c,...e.formState}})),trigger:P,register:z,handleSubmit:F,watch:(e,t)=>hd(e)?f.state.subscribe({next:n=>"values"in n&&e(E(void 0,t),n)}):E(e,t,!0),setValue:S,getValues:C,reset:B,resetField:(e,t={})=>{ud(r,e)&&(od(t.defaultValue)?S(e,rd(ud(s,e))):(S(e,t.defaultValue),dd(s,e,rd(t.defaultValue))),t.keepTouched||Xd(i.touchedFields,e),t.keepDirty||(Xd(i.dirtyFields,e),i.isDirty=t.defaultValue?w(e,rd(ud(s,e))):w()),t.keepError||(Xd(i.errors,e),h.isValid&&m()),f.state.next({...i}))},clearErrors:e=>{e&&Vd(e).forEach(e=>Xd(i.errors,e)),f.state.next({errors:e?i.errors:{}})},unregister:N,setError:R,setFocus:(e,t={})=>{const n=ud(r,e),i=n&&n._f;if(i){const e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&hd(e.select)&&e.select()})}},getFieldState:M};return{...V,formControl:V}}const Ef=u(i)(()=>({color:"var(--color-white)",cursor:"default"})),Af=({sx:e,...t})=>H(Ef,{variant:"body1",sx:e,...t}),Tf=te(he)({padding:0,marginRight:"5px",marginLeft:"10px","& .MuiSvgIcon-root":{color:"var(--color-orange-medium)"}});function Sf({label:e,name:t,...n}){const i=T.useId(),{control:r,setValue:s,watch:o}=jd(),a=o(t),l=`${i}-${t}-${String(a)}`;return H(Id,{control:r,name:t,render:({field:t})=>{const{value:i,name:r}=t;return e?H(de,{color:"white",control:H(Tf,{...n,checked:i,onChange:(e,t)=>{s(r,t,{shouldValidate:!0})}}),label:H(Af,{children:e})}):H(Tf,{...n,checked:i,onChange:(e,t)=>{s(r,t,{shouldValidate:!0})}})}},l)}function kf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Of,Pf,Cf,Mf;var Rf=function(){if(Mf)return Cf;Mf=1;var e=(Pf||(Pf=1,Of=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],i=0;i<e.rangeCount;i++)n.push(e.getRangeAt(i));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}),Of),t={"text/plain":"Text","text/html":"Url",default:"Text"};return Cf=function(n,i){var r,s,o,a,l,u,c=!1;i||(i={}),r=i.debug||!1;try{if(o=e(),a=document.createRange(),l=document.getSelection(),(u=document.createElement("span")).textContent=n,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(e){if(e.stopPropagation(),i.format)if(e.preventDefault(),typeof e.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var s=t[i.format]||t.default;window.clipboardData.setData(s,n)}else e.clipboardData.clearData(),e.clipboardData.setData(i.format,n);i.onCopy&&(e.preventDefault(),i.onCopy(e.clipboardData))}),document.body.appendChild(u),a.selectNodeContents(u),l.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(e){r&&console.error("unable to copy using execCommand: ",e),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(i.format||"text",n),i.onCopy&&i.onCopy(window.clipboardData),c=!0}catch(e){r&&console.error("unable to copy using clipboardData: ",e),r&&console.error("falling back to prompt"),s=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in i?i.message:"Copy to clipboard: #{key}, Enter"),window.prompt(s,n)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(a):l.removeAllRanges()),u&&document.body.removeChild(u),o()}return c},Cf}();const Lf=kf(Rf),Nf=({text:e,onCopy:t,options:n,children:i,...r})=>{const s=T.useCallback(r=>{const s=T.Children.only(i),o=Lf(e,n);t&&t(e,o),s.props.onClick&&"function"==typeof s.props.onClick&&s.props.onClick(r)},[e,t,n,i]),o=T.Children.only(i);return T.cloneElement(o,{onClick:s,...r})},Df=u(Af)(()=>({whiteSpace:"nowrap",cursor:"pointer"})),zf=({value:e,label:t,onCopySuccess:n,onCopyError:i,...r})=>{const s=String(e);return H(Nf,{text:s,onCopy:(e,t)=>{t?(dn({message:"Значение успешно скопировано",variant:"success"}),n?.()):(dn({message:"При копировании значения возникла ошибка",variant:"error"}),i?.())},children:H(Df,{...r,children:t})})};var If=function(e){var t=e.as,n=e.errors,i=e.name,r=e.message,s=e.render,o=function(e,t){if(null==e)return{};var n,i,r={},s=Object.keys(e);for(i=0;i<s.length;i++)t.indexOf(n=s[i])>=0||(r[n]=e[n]);return r}(e,["as","errors","name","message","render"]),a=jd(),l=ud(n||a.formState.errors,i);if(!l)return null;var u=l.message,c=l.types,h=Object.assign({},o,{children:u||r});return T.isValidElement(t)?T.cloneElement(t,h):s?s({message:u||r,messages:c}):T.createElement(t||T.Fragment,h)};function Ff({name:t}){const{palette:n}=e(),{formState:{errors:i}}=jd();return H(If,{errors:i,name:t,render:({message:e})=>H(Af,{variant:"body2",style:{color:n.error.main},children:e})})}function jf({form:e,sx:t={},onSubmit:n,children:i}){const{handleSubmit:s}=e;return H(Bd,{...e,children:H(r,{component:"form",sx:{display:"grid",gap:"15px",...t},onSubmit:s(n),children:i})})}const Bf=()=>jd(),Uf=e=>H(v,{size:"small",...e});function Vf({name:e,...t}){const{control:n}=jd(),i=T.useId();return H(Id,{control:n,name:e,render:({field:n})=>Y(r,{sx:({spacing:e})=>({display:"grid",width:"100%",gap:e(1)}),children:[H(fe,{...t,...n,id:i,slots:{field:Uf}}),H(Ff,{name:e})]})})}const Gf=({text:e="Нет данных"})=>H(i,{variant:"body2",sx:{textAlign:"center",color:"var(--gray-light-color)"},children:e});function $f({items:e,columnsCount:t=1,getContent:n,title:s,getKey:o,onClick:a,onClear:l,sx:u,isShowNoData:c=!0}){const h=T.useMemo(()=>e.length>0,[e.length]),d=T.useMemo(()=>Boolean(l)&&h,[l,h]);return Y(r,{sx:({spacing:e,breakpoints:t})=>({display:"grid",gridTemplateColumns:"1fr",gap:e(2),...u?.root,[t.down("sm")]:{gap:e(1)}}),children:[s||l?Y(r,{sx:({spacing:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:e(1)}),children:[s?H(i,{variant:"h6",noWrap:!0,sx:{textAlign:"center",fontWeight:700,...u?.title},children:s}):null,d?H(Gh,{iconProps:{name:"clear",color:"warning"},onClick:l}):null]}):null,h?H(b,{sx:({spacing:e,breakpoints:n})=>({display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:e(2),...u?.list,[n.down("sm")]:{gap:e(1)}}),disablePadding:!0,children:e.map((e,t)=>H(x,{onClick:()=>a?.(e,t),sx:()=>({...u?.item}),disablePadding:!0,children:n(e,t)},o(e,t)))}):H(T.Fragment,{children:c?H(Gf,{}):null})]})}const Zf="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function qf(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function Wf(e){return"nodeType"in e}function Hf(e){var t,n;return e?qf(e)?e:Wf(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function Yf(e){const{Document:t}=Hf(e);return e instanceof t}function Kf(e){return!qf(e)&&e instanceof Hf(e).HTMLElement}function Xf(e){return e instanceof Hf(e).SVGElement}function Qf(e){return e?qf(e)?e.document:Wf(e)?Yf(e)?e:Kf(e)||Xf(e)?e.ownerDocument:document:document:document}const Jf=Zf?D:C;function ep(e){const t=O(e);return Jf(()=>{t.current=e}),P(function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return null==t.current?void 0:t.current(...n)},[])}function tp(e,t){void 0===t&&(t=[e]);const n=O(e);return Jf(()=>{n.current!==e&&(n.current=e)},t),n}function np(e,t){const n=O();return N(()=>{const t=e(n.current);return n.current=t,t},[...t])}function ip(e){const t=ep(e),n=O(null),i=P(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,i]}function rp(e){const t=O();return C(()=>{t.current=e},[e]),t.current}let sp={};function op(e,t){return N(()=>{if(t)return t;const n=null==sp[e]?0:sp[e]+1;return sp[e]=n,e+"-"+n},[e,t])}function ap(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce((t,n)=>{const i=Object.entries(n);for(const[n,r]of i){const i=t[n];null!=i&&(t[n]=i+e*r)}return t},{...t})}}const lp=ap(1),up=ap(-1);function cp(e){if(!e)return!1;const{KeyboardEvent:t}=Hf(e.target);return t&&e instanceof t}function hp(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=Hf(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const dp=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[dp.Translate.toString(e),dp.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),fp="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function pp(e){return e.matches(fp)?e:e.querySelector(fp)}const mp={display:"none"};function _p(e){let{id:t,value:n}=e;return S.createElement("div",{id:t,style:mp},n)}function gp(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;return S.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":i,"aria-atomic":!0},n)}const yp=U(null);const vp={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 "},bp={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function xp(e){let{announcements:t=bp,container:n,hiddenTextDescribedById:i,screenReaderInstructions:r=vp}=e;const{announce:s,announcement:o}=function(){const[e,t]=B("");return{announce:P(e=>{null!=e&&t(e)},[]),announcement:e}}(),a=op("DndLiveRegion"),[l,u]=B(!1);if(C(()=>{u(!0)},[]),function(e){const t=I(yp);C(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(N(()=>({onDragStart(e){let{active:n}=e;s(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:i}=e;t.onDragMove&&s(t.onDragMove({active:n,over:i}))},onDragOver(e){let{active:n,over:i}=e;s(t.onDragOver({active:n,over:i}))},onDragEnd(e){let{active:n,over:i}=e;s(t.onDragEnd({active:n,over:i}))},onDragCancel(e){let{active:n,over:i}=e;s(t.onDragCancel({active:n,over:i}))}}),[s,t])),!l)return null;const c=S.createElement(S.Fragment,null,S.createElement(_p,{id:i,value:r.draggable}),S.createElement(gp,{id:a,announcement:o}));return n?q(c,n):c}var wp;function Ep(){}!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"}(wp||(wp={}));const Ap=Object.freeze({x:0,y:0});function Tp(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Sp(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function kp(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function Op(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Pp=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const r=Op(t,t.left,t.top),s=[];for(const e of i){const{id:t}=e,i=n.get(t);if(i){const n=Tp(Op(i),r);s.push({id:t,data:{droppableContainer:e,value:n}})}}return s.sort(Sp)};function Cp(e,t){const n=Math.max(t.top,e.top),i=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),o=r-i,a=s-n;if(i<r&&n<s){const n=t.width*t.height,i=e.width*e.height,r=o*a;return Number((r/(n+i-r)).toFixed(4))}return 0}const Mp=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const r=[];for(const e of i){const{id:i}=e,s=n.get(i);if(s){const n=Cp(s,t);n>0&&r.push({id:i,data:{droppableContainer:e,value:n}})}}return r.sort(kp)};function Rp(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ap}function Lp(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const Np=Lp(1);const Dp={ignoreTransform:!1};function zp(e,t){void 0===t&&(t=Dp);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:i}=Hf(e).getComputedStyle(e);t&&(n=function(e,t,n){const i=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(!i)return e;const{scaleX:r,scaleY:s,x:o,y:a}=i,l=e.left-o-(1-r)*parseFloat(n),u=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width/r:e.width,h=s?e.height/s:e.height;return{width:c,height:h,top:u,right:l+c,bottom:u+h,left:l}}(n,t,i))}const{top:i,left:r,width:s,height:o,bottom:a,right:l}=n;return{top:i,left:r,width:s,height:o,bottom:a,right:l}}function Ip(e){return zp(e,{ignoreTransform:!0})}function Fp(e,t){const n=[];return e?function i(r){if(null!=t&&n.length>=t)return n;if(!r)return n;if(Yf(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!Kf(r)||Xf(r))return n;if(n.includes(r))return n;const s=Hf(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=Hf(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const i=t[e];return"string"==typeof i&&n.test(i)})}(r,s)&&n.push(r),function(e,t){return void 0===t&&(t=Hf(e).getComputedStyle(e)),"fixed"===t.position}(r,s)?n:i(r.parentNode)}(e):n}function jp(e){const[t]=Fp(e,1);return null!=t?t:null}function Bp(e){return Zf&&e?qf(e)?e:Wf(e)?Yf(e)||e===Qf(e).scrollingElement?window:Kf(e)?e:null:null:null}function Up(e){return qf(e)?e.scrollX:e.scrollLeft}function Vp(e){return qf(e)?e.scrollY:e.scrollTop}function Gp(e){return{x:Up(e),y:Vp(e)}}var $p;function Zp(e){return!(!Zf||!e)&&e===document.scrollingElement}function qp(e){const t={x:0,y:0},n=Zp(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=i.y,isRight:e.scrollLeft>=i.x,maxScroll:i,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}($p||($p={}));const Wp={x:.2,y:.2};function Hp(e,t,n,i,r){let{top:s,left:o,right:a,bottom:l}=n;void 0===i&&(i=10),void 0===r&&(r=Wp);const{isTop:u,isBottom:c,isLeft:h,isRight:d}=qp(e),f={x:0,y:0},p={x:0,y:0},m=t.height*r.y,_=t.width*r.x;return!u&&s<=t.top+m?(f.y=$p.Backward,p.y=i*Math.abs((t.top+m-s)/m)):!c&&l>=t.bottom-m&&(f.y=$p.Forward,p.y=i*Math.abs((t.bottom-m-l)/m)),!d&&a>=t.right-_?(f.x=$p.Forward,p.x=i*Math.abs((t.right-_-a)/_)):!h&&o<=t.left+_&&(f.x=$p.Backward,p.x=i*Math.abs((t.left+_-o)/_)),{direction:f,speed:p}}function Yp(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:i,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:i,bottom:r,width:e.clientWidth,height:e.clientHeight}}function Kp(e){return e.reduce((e,t)=>lp(e,Gp(t)),Ap)}const Xp=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Up(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Vp(t),0)}]];class Qp{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Fp(t),i=Kp(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of Xp)for(const s of t)Object.defineProperty(this,s,{get:()=>{const t=r(n),o=i[e]-t;return this.rect[s]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Jp{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var i;null==(i=this.target)||i.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function em(e,t){const n=Math.abs(e.x),i=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+i**2)>t:"x"in t&&"y"in t?n>t.x&&i>t.y:"x"in t?n>t.x:"y"in t&&i>t.y}var tm,nm;function im(e){e.preventDefault()}function rm(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"}(tm||(tm={})),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"}(nm||(nm={}));const sm={start:[nm.Space,nm.Enter],cancel:[nm.Esc],end:[nm.Space,nm.Enter,nm.Tab]},om=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case nm.Right:return{...n,x:n.x+25};case nm.Left:return{...n,x:n.x-25};case nm.Down:return{...n,y:n.y+25};case nm.Up:return{...n,y:n.y-25}}};class am{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 Jp(Qf(t)),this.windowListeners=new Jp(Hf(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(tm.Resize,this.handleCancel),this.windowListeners.add(tm.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(tm.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=zp),!e)return;const{top:n,left:i,bottom:r,right:s}=t(e);jp(e)&&(r<=0||s<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Ap)}handleKeyDown(e){if(cp(e)){const{active:t,context:n,options:i}=this.props,{keyboardCodes:r=sm,coordinateGetter:s=om,scrollBehavior:o="smooth"}=i,{code:a}=e;if(r.end.includes(a))return void this.handleEnd(e);if(r.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:l}=n.current,u=l?{x:l.left,y:l.top}:Ap;this.referenceCoordinates||(this.referenceCoordinates=u);const c=s(e,{active:t,context:n.current,currentCoordinates:u});if(c){const t=up(c,u),i={x:0,y:0},{scrollableAncestors:r}=n.current;for(const n of r){const r=e.code,{isTop:s,isRight:a,isLeft:l,isBottom:u,maxScroll:h,minScroll:d}=qp(n),f=Yp(n),p={x:Math.min(r===nm.Right?f.right-f.width/2:f.right,Math.max(r===nm.Right?f.left:f.left+f.width/2,c.x)),y:Math.min(r===nm.Down?f.bottom-f.height/2:f.bottom,Math.max(r===nm.Down?f.top:f.top+f.height/2,c.y))},m=r===nm.Right&&!a||r===nm.Left&&!l,_=r===nm.Down&&!u||r===nm.Up&&!s;if(m&&p.x!==c.x){const e=n.scrollLeft+t.x,s=r===nm.Right&&e<=h.x||r===nm.Left&&e>=d.x;if(s&&!t.y)return void n.scrollTo({left:e,behavior:o});i.x=s?n.scrollLeft-e:r===nm.Right?n.scrollLeft-h.x:n.scrollLeft-d.x,i.x&&n.scrollBy({left:-i.x,behavior:o});break}if(_&&p.y!==c.y){const e=n.scrollTop+t.y,s=r===nm.Down&&e<=h.y||r===nm.Up&&e>=d.y;if(s&&!t.x)return void n.scrollTo({top:e,behavior:o});i.y=s?n.scrollTop-e:r===nm.Down?n.scrollTop-h.y:n.scrollTop-d.y,i.y&&n.scrollBy({top:-i.y,behavior:o});break}}this.handleMove(e,lp(up(c,this.referenceCoordinates),i))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function lm(e){return Boolean(e&&"distance"in e)}function um(e){return Boolean(e&&"delay"in e)}am.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=sm,onActivation:r}=t,{active:s}=n;const{code:o}=e.nativeEvent;if(i.start.includes(o)){const t=s.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==r||r({event:e.nativeEvent}),!0)}return!1}}];class cm{constructor(e,t,n){var i;void 0===n&&(n=function(e){const{EventTarget:t}=Hf(e);return e instanceof t?e:Qf(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:r}=e,{target:s}=r;this.props=e,this.events=t,this.document=Qf(s),this.documentListeners=new Jp(this.document),this.listeners=new Jp(n),this.windowListeners=new Jp(Hf(s)),this.initialCoordinates=null!=(i=hp(r))?i:Ap,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(tm.Resize,this.handleCancel),this.windowListeners.add(tm.DragStart,im),this.windowListeners.add(tm.VisibilityChange,this.handleCancel),this.windowListeners.add(tm.ContextMenu,im),this.documentListeners.add(tm.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(um(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(lm(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:i}=this.props;i(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(tm.Click,rm,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(tm.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:i,props:r}=this,{onMove:s,options:{activationConstraint:o}}=r;if(!i)return;const a=null!=(t=hp(e))?t:Ap,l=up(i,a);if(!n&&o){if(lm(o)){if(null!=o.tolerance&&em(l,o.tolerance))return this.handleCancel();if(em(l,o.distance))return this.handleStart()}return um(o)&&em(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===nm.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const hm={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class dm extends cm{constructor(e){const{event:t}=e,n=Qf(t.target);super(e,hm,n)}}dm.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return!(!n.isPrimary||0!==n.button)&&(null==i||i({event:n}),!0)}}];const fm={move:{name:"mousemove"},end:{name:"mouseup"}};var pm;!function(e){e[e.RightClick=2]="RightClick"}(pm||(pm={}));(class extends cm{constructor(e){super(e,fm,Qf(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==pm.RightClick&&(null==i||i({event:n}),!0)}}];const mm={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var _m,gm;function ym(e){let{acceleration:t,activator:n=_m.Pointer,canScroll:i,draggingRect:r,enabled:s,interval:o=5,order:a=gm.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:c,delta:h,threshold:d}=e;const f=function(e){let{delta:t,disabled:n}=e;const i=rp(t);return np(e=>{if(n||!i||!e)return vm;const r={x:Math.sign(t.x-i.x),y:Math.sign(t.y-i.y)};return{x:{[$p.Backward]:e.x[$p.Backward]||-1===r.x,[$p.Forward]:e.x[$p.Forward]||1===r.x},y:{[$p.Backward]:e.y[$p.Backward]||-1===r.y,[$p.Forward]:e.y[$p.Forward]||1===r.y}}},[n,t,i])}({delta:h,disabled:!s}),[p,m]=function(){const e=O(null);return[P((t,n)=>{e.current=setInterval(t,n)},[]),P(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),_=O({x:0,y:0}),g=O({x:0,y:0}),y=N(()=>{switch(n){case _m.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case _m.DraggableRect:return r}},[n,r,l]),v=O(null),b=P(()=>{const e=v.current;if(!e)return;const t=_.current.x*g.current.x,n=_.current.y*g.current.y;e.scrollBy(t,n)},[]),x=N(()=>a===gm.TreeOrder?[...u].reverse():u,[a,u]);C(()=>{if(s&&u.length&&y){for(const e of x){if(!1===(null==i?void 0:i(e)))continue;const n=u.indexOf(e),r=c[n];if(!r)continue;const{direction:s,speed:a}=Hp(e,r,y,t,d);for(const e of["x","y"])f[e][s[e]]||(a[e]=0,s[e]=0);if(a.x>0||a.y>0)return m(),v.current=e,p(b,o),_.current=a,void(g.current=s)}_.current={x:0,y:0},g.current={x:0,y:0},m()}else m()},[t,b,i,m,s,o,JSON.stringify(y),JSON.stringify(f),p,u,x,c,JSON.stringify(d)])}(class extends cm{constructor(e){super(e,mm)}static setup(){return window.addEventListener(mm.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(mm.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;const{touches:r}=n;return!(r.length>1)&&(null==i||i({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(_m||(_m={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(gm||(gm={}));const vm={x:{[$p.Backward]:!1,[$p.Forward]:!1},y:{[$p.Backward]:!1,[$p.Forward]:!1}};var bm,xm;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(bm||(bm={})),function(e){e.Optimized="optimized"}(xm||(xm={}));const wm=new Map;function Em(e,t){return np(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Am(e){let{callback:t,disabled:n}=e;const i=ep(t),r=N(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)},[n]);return C(()=>()=>null==r?void 0:r.disconnect(),[r]),r}function Tm(e){return new Qp(zp(e),e)}function Sm(e,t,n){void 0===t&&(t=Tm);const[i,r]=B(null);function s(){r(i=>{if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=null!=i?i:n)?r:null;const s=t(e);return JSON.stringify(i)===JSON.stringify(s)?i:s})}const o=function(e){let{callback:t,disabled:n}=e;const i=ep(t),r=N(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)},[i,n]);return C(()=>()=>null==r?void 0:r.disconnect(),[r]),r}({callback(t){if(e)for(const n of t){const{type:t,target:i}=n;if("childList"===t&&i instanceof HTMLElement&&i.contains(e)){s();break}}}}),a=Am({callback:s});return Jf(()=>{s(),e?(null==a||a.observe(e),null==o||o.observe(document.body,{childList:!0,subtree:!0})):(null==a||a.disconnect(),null==o||o.disconnect())},[e]),i}const km=[];function Om(e,t){void 0===t&&(t=[]);const n=O(null);return C(()=>{n.current=null},t),C(()=>{const t=e!==Ap;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?up(e,n.current):Ap}function Pm(e){return N(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const Cm=[];function Mm(e){let{measure:t}=e;const[n,i]=B(null),r=P(e=>{for(const{target:n}of e)if(Kf(n)){i(e=>{const i=t(n);return e?{...e,width:i.width,height:i.height}:i});break}},[t]),s=Am({callback:r}),o=P(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Kf(t)?t:e}(e);null==s||s.disconnect(),n&&(null==s||s.observe(n)),i(n?t(n):null)},[t,s]),[a,l]=ip(o);return N(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const Rm=[{sensor:dm,options:{}},{sensor:am,options:{}}],Lm={current:{}},Nm={draggable:{measure:Ip},droppable:{measure:Ip,strategy:bm.WhileDragging,frequency:xm.Optimized},dragOverlay:{measure:zp}};class Dm extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const zm={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Dm,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ep},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Nm,measureDroppableContainers:Ep,windowRect:null,measuringScheduled:!1},Im=U({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ep,draggableNodes:new Map,over:null,measureDroppableContainers:Ep}),Fm=U(zm);function jm(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Dm}}}function Bm(e,t){switch(t.type){case wp.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case wp.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 wp.DragEnd:case wp.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case wp.RegisterDroppable:{const{element:n}=t,{id:i}=n,r=new Dm(e.droppable.containers);return r.set(i,n),{...e,droppable:{...e.droppable,containers:r}}}case wp.SetDroppableDisabled:{const{id:n,key:i,disabled:r}=t,s=e.droppable.containers.get(n);if(!s||i!==s.key)return e;const o=new Dm(e.droppable.containers);return o.set(n,{...s,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case wp.UnregisterDroppable:{const{id:n,key:i}=t,r=e.droppable.containers.get(n);if(!r||i!==r.key)return e;const s=new Dm(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function Um(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:r}=I(Im),s=rp(i),o=rp(null==n?void 0:n.id);return C(()=>{if(!t&&!i&&s&&null!=o){if(!cp(s))return;if(document.activeElement===s.target)return;const e=r.get(o);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=pp(e);if(t){t.focus();break}}})}},[i,t,r,o,s]),null}const Vm=U({...Ap,scaleX:1,scaleY:1});var Gm;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Gm||(Gm={}));const $m=j(function(e){var t,n,i,r;let{id:s,accessibility:o,autoScroll:a=!0,children:l,sensors:u=Rm,collisionDetection:c=Mp,measuring:h,modifiers:d,...f}=e;const p=V(Bm,void 0,jm),[m,_]=p,[g,y]=function(){const[e]=B(()=>new Set),t=P(t=>(e.add(t),()=>e.delete(t)),[e]);return[P(t=>{let{type:n,event:i}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,i)})},[e]),t]}(),[v,b]=B(Gm.Uninitialized),x=v===Gm.Initialized,{draggable:{active:w,nodes:E,translate:A},droppable:{containers:T}}=m,k=null!=w?E.get(w):null,M=O({initial:null,translated:null}),R=N(()=>{var e;return null!=w?{id:w,data:null!=(e=null==k?void 0:k.data)?e:Lm,rect:M}:null},[w,k]),L=O(null),[D,z]=B(null),[I,F]=B(null),j=tp(f,Object.values(f)),U=op("DndDescribedBy",s),G=N(()=>T.getEnabled(),[T]),$=N(()=>({draggable:{...Nm.draggable,...null==Z?void 0:Z.draggable},droppable:{...Nm.droppable,...null==Z?void 0:Z.droppable},dragOverlay:{...Nm.dragOverlay,...null==Z?void 0:Z.dragOverlay}}),[null==(Z=h)?void 0:Z.draggable,null==Z?void 0:Z.droppable,null==Z?void 0:Z.dragOverlay]);var Z;const{droppableRects:q,measureDroppableContainers:H,measuringScheduled:Y}=function(e,t){let{dragging:n,dependencies:i,config:r}=t;const[s,o]=B(null),{frequency:a,measure:l,strategy:u}=r,c=O(e),h=function(){switch(u){case bm.Always:return!1;case bm.BeforeDragging:return n;default:return!n}}(),d=tp(h),f=P(function(e){void 0===e&&(e=[]),d.current||o(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[d]),p=O(null),m=np(t=>{if(h&&!n)return wm;if(!t||t===wm||c.current!==e||null!=s){const t=new Map;for(let n of e){if(!n)continue;if(s&&s.length>0&&!s.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,i=e?new Qp(l(e),e):null;n.rect.current=i,i&&t.set(n.id,i)}return t}return t},[e,s,n,h,l]);return C(()=>{c.current=e},[e]),C(()=>{h||f()},[n,h]),C(()=>{s&&s.length>0&&o(null)},[JSON.stringify(s)]),C(()=>{h||"number"!=typeof a||null!==p.current||(p.current=setTimeout(()=>{f(),p.current=null},a))},[a,h,f,...i]),{droppableRects:m,measureDroppableContainers:f,measuringScheduled:null!=s}}(G,{dragging:x,dependencies:[A.x,A.y],config:$.droppable}),K=function(e,t){const n=null!=t?e.get(t):void 0,i=n?n.node.current:null;return np(e=>{var n;return null==t?null:null!=(n=null!=i?i:e)?n:null},[i,t])}(E,w),X=N(()=>I?hp(I):null,[I]),Q=function(){const e=!1===(null==D?void 0:D.autoScrollEnabled),t="object"==typeof a?!1===a.enabled:!1===a,n=x&&!e&&!t;if("object"==typeof a)return{...a,enabled:n};return{enabled:n}}(),J=function(e,t){return Em(e,t)}(K,$.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:i,config:r=!0}=e;const s=O(!1),{x:o,y:a}="boolean"==typeof r?{x:r,y:r}:r;Jf(()=>{if(!o&&!a||!t)return void(s.current=!1);if(s.current||!i)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=Rp(n(e),i);if(o||(r.x=0),a||(r.y=0),s.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=jp(e);t&&t.scrollBy({top:r.y,left:r.x})}},[t,o,a,i,n])}({activeNode:null!=w?E.get(w):null,config:Q.layoutShiftCompensation,initialRect:J,measure:$.draggable.measure});const ee=Sm(K,$.draggable.measure,J),te=Sm(K?K.parentElement:null),ne=O({activatorEvent:null,active:null,activeNode:K,collisionRect:null,collisions:null,droppableRects:q,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ie=T.getNodeFor(null==(t=ne.current.over)?void 0:t.id),re=Mm({measure:$.dragOverlay.measure}),se=null!=(n=re.nodeRef.current)?n:K,oe=x?null!=(i=re.rect)?i:ee:null,ae=Boolean(re.nodeRef.current&&re.rect),le=Rp(ue=ae?null:ee,Em(ue));var ue;const ce=Pm(se?Hf(se):null),he=function(e){const t=O(e),n=np(n=>e?n&&n!==km&&e&&t.current&&e.parentNode===t.current.parentNode?n:Fp(e):km,[e]);return C(()=>{t.current=e},[e]),n}(x?null!=ie?ie:K:null),de=function(e,t){void 0===t&&(t=zp);const[n]=e,i=Pm(n?Hf(n):null),[r,s]=B(Cm);function o(){s(()=>e.length?e.map(e=>Zp(e)?i:new Qp(t(e),e)):Cm)}const a=Am({callback:o});return Jf(()=>{null==a||a.disconnect(),o(),e.forEach(e=>null==a?void 0:a.observe(e))},[e]),r}(he),fe=function(e,t){let{transform:n,...i}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...i}),n):n}(d,{transform:{x:A.x-le.x,y:A.y-le.y,scaleX:1,scaleY:1},activatorEvent:I,active:R,activeNodeRect:ee,containerNodeRect:te,draggingNodeRect:oe,over:ne.current.over,overlayNodeRect:re.rect,scrollableAncestors:he,scrollableAncestorRects:de,windowRect:ce}),pe=X?lp(X,A):null,me=function(e){const[t,n]=B(null),i=O(e),r=P(e=>{const t=Bp(e.target);t&&n(e=>e?(e.set(t,Gp(t)),new Map(e)):null)},[]);return C(()=>{const t=i.current;if(e!==t){s(t);const o=e.map(e=>{const t=Bp(e);return t?(t.addEventListener("scroll",r,{passive:!0}),[t,Gp(t)]):null}).filter(e=>null!=e);n(o.length?new Map(o):null),i.current=e}return()=>{s(e),s(t)};function s(e){e.forEach(e=>{const t=Bp(e);null==t||t.removeEventListener("scroll",r)})}},[r,e]),N(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>lp(e,t),Ap):Kp(e):Ap,[e,t])}(he),_e=Om(me),ge=Om(me,[ee]),ye=lp(fe,_e),ve=oe?Np(oe,fe):null,be=R&&ve?c({active:R,collisionRect:ve,droppableRects:q,droppableContainers:G,pointerCoordinates:pe}):null,xe=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}(be,"id"),[we,Ee]=B(null),Ae=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ae?fe:lp(fe,ge),null!=(r=null==we?void 0:we.rect)?r:null,ee),Te=O(null),Se=P((e,t)=>{let{sensor:n,options:i}=t;if(null==L.current)return;const r=E.get(L.current);if(!r)return;const s=e.nativeEvent,o=new n({active:L.current,activeNode:r,event:s,options:i,context:ne,onAbort(e){if(!E.get(e))return;const{onDragAbort:t}=j.current,n={id:e};null==t||t(n),g({type:"onDragAbort",event:n})},onPending(e,t,n,i){if(!E.get(e))return;const{onDragPending:r}=j.current,s={id:e,constraint:t,initialCoordinates:n,offset:i};null==r||r(s),g({type:"onDragPending",event:s})},onStart(e){const t=L.current;if(null==t)return;const n=E.get(t);if(!n)return;const{onDragStart:i}=j.current,r={activatorEvent:s,active:{id:t,data:n.data,rect:M}};W(()=>{null==i||i(r),b(Gm.Initializing),_({type:wp.DragStart,initialCoordinates:e,active:t}),g({type:"onDragStart",event:r}),z(Te.current),F(s)})},onMove(e){_({type:wp.DragMove,coordinates:e})},onEnd:a(wp.DragEnd),onCancel:a(wp.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:i,scrollAdjustedTranslate:r}=ne.current;let o=null;if(t&&r){const{cancelDrop:a}=j.current;if(o={activatorEvent:s,active:t,collisions:n,delta:r,over:i},e===wp.DragEnd&&"function"==typeof a){await Promise.resolve(a(o))&&(e=wp.DragCancel)}}L.current=null,W(()=>{_({type:e}),b(Gm.Uninitialized),Ee(null),z(null),F(null),Te.current=null;const t=e===wp.DragEnd?"onDragEnd":"onDragCancel";if(o){const e=j.current[t];null==e||e(o),g({type:t,event:o})}})}}Te.current=o},[E]),ke=P((e,t)=>(n,i)=>{const r=n.nativeEvent,s=E.get(i);if(null!==L.current||!s||r.dndKit||r.defaultPrevented)return;const o={active:s};!0===e(n,t.options,o)&&(r.dndKit={capturedBy:t.sensor},L.current=i,Se(n,t))},[E,Se]),Oe=function(e,t){return N(()=>e.reduce((e,n)=>{const{sensor:i}=n;return[...e,...i.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(u,ke);!function(e){C(()=>{if(!Zf)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}))}(u),Jf(()=>{ee&&v===Gm.Initializing&&b(Gm.Initialized)},[ee,v]),C(()=>{const{onDragMove:e}=j.current,{active:t,activatorEvent:n,collisions:i,over:r}=ne.current;if(!t||!n)return;const s={active:t,activatorEvent:n,collisions:i,delta:{x:ye.x,y:ye.y},over:r};W(()=>{null==e||e(s),g({type:"onDragMove",event:s})})},[ye.x,ye.y]),C(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:i,scrollAdjustedTranslate:r}=ne.current;if(!e||null==L.current||!t||!r)return;const{onDragOver:s}=j.current,o=i.get(xe),a=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:r.x,y:r.y},over:a};W(()=>{Ee(a),null==s||s(l),g({type:"onDragOver",event:l})})},[xe]),Jf(()=>{ne.current={activatorEvent:I,active:R,activeNode:K,collisionRect:ve,collisions:be,droppableRects:q,draggableNodes:E,draggingNode:se,draggingNodeRect:oe,droppableContainers:T,over:we,scrollableAncestors:he,scrollAdjustedTranslate:ye},M.current={initial:oe,translated:ve}},[R,K,be,ve,E,se,oe,q,T,we,he,ye]),ym({...Q,delta:A,draggingRect:ve,pointerCoordinates:pe,scrollableAncestors:he,scrollableAncestorRects:de});const Pe=N(()=>({active:R,activeNode:K,activeNodeRect:ee,activatorEvent:I,collisions:be,containerNodeRect:te,dragOverlay:re,draggableNodes:E,droppableContainers:T,droppableRects:q,over:we,measureDroppableContainers:H,scrollableAncestors:he,scrollableAncestorRects:de,measuringConfiguration:$,measuringScheduled:Y,windowRect:ce}),[R,K,ee,I,be,te,re,E,T,q,we,H,he,de,$,Y,ce]),Ce=N(()=>({activatorEvent:I,activators:Oe,active:R,activeNodeRect:ee,ariaDescribedById:{draggable:U},dispatch:_,draggableNodes:E,over:we,measureDroppableContainers:H}),[I,Oe,R,ee,_,U,E,we,H]);return S.createElement(yp.Provider,{value:y},S.createElement(Im.Provider,{value:Ce},S.createElement(Fm.Provider,{value:Pe},S.createElement(Vm.Provider,{value:Ae},l)),S.createElement(Um,{disabled:!1===(null==o?void 0:o.restoreFocus)})),S.createElement(xp,{...o,hiddenTextDescribedById:U}))}),Zm=U(null),qm="button";function Wm(e){let{id:t,data:n,disabled:i=!1,attributes:r}=e;const s=op("Draggable"),{activators:o,activatorEvent:a,active:l,activeNodeRect:u,ariaDescribedById:c,draggableNodes:h,over:d}=I(Im),{role:f=qm,roleDescription:p="draggable",tabIndex:m=0}=null!=r?r:{},_=(null==l?void 0:l.id)===t,g=I(_?Vm:Zm),[y,v]=ip(),[b,x]=ip(),w=function(e,t){return N(()=>e.reduce((e,n)=>{let{eventName:i,handler:r}=n;return e[i]=e=>{r(e,t)},e},{}),[e,t])}(o,t),E=tp(n);Jf(()=>(h.set(t,{id:t,key:s,node:y,activatorNode:b,data:E}),()=>{const e=h.get(t);e&&e.key===s&&h.delete(t)}),[h,t]);return{active:l,activatorEvent:a,activeNodeRect:u,attributes:N(()=>({role:f,tabIndex:m,"aria-disabled":i,"aria-pressed":!(!_||f!==qm)||void 0,"aria-roledescription":p,"aria-describedby":c.draggable}),[i,f,m,_,p,c.draggable]),isDragging:_,listeners:i?void 0:w,node:y,over:d,setNodeRef:v,setActivatorNodeRef:x,transform:g}}const Hm={timeout:25};function Ym(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function Km(e,t){return e.reduce((e,n,i)=>{const r=t.get(n);return r&&(e[i]=r),e},Array(e.length))}function Xm(e){return null!==e&&e>=0}const Qm=e=>{let{rects:t,activeIndex:n,overIndex:i,index:r}=e;const s=Ym(t,i,n),o=t[r],a=s[r];return a&&o?{x:a.left-o.left,y:a.top-o.top,scaleX:a.width/o.width,scaleY:a.height/o.height}:null},Jm={scaleX:1,scaleY:1},e_=e=>{var t;let{activeIndex:n,activeNodeRect:i,index:r,rects:s,overIndex:o}=e;const a=null!=(t=s[n])?t:i;if(!a)return null;if(r===n){const e=s[o];return e?{x:0,y:n<o?e.top+e.height-(a.top+a.height):e.top-a.top,...Jm}:null}const l=function(e,t,n){const i=e[t],r=e[t-1],s=e[t+1];if(!i)return 0;if(n<t)return r?i.top-(r.top+r.height):s?s.top-(i.top+i.height):0;return s?s.top-(i.top+i.height):r?i.top-(r.top+r.height):0}(s,r,n);return r>n&&r<=o?{x:0,y:-a.height-l,...Jm}:r<n&&r>=o?{x:0,y:a.height+l,...Jm}:{x:0,y:0,...Jm}};const t_="Sortable",n_=S.createContext({activeIndex:-1,containerId:t_,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Qm,disabled:{draggable:!1,droppable:!1}});function i_(e){let{children:t,id:n,items:i,strategy:r=Qm,disabled:s=!1}=e;const{active:o,dragOverlay:a,droppableRects:l,over:u,measureDroppableContainers:c}=I(Fm),h=op(t_,n),d=Boolean(null!==a.rect),f=N(()=>i.map(e=>"object"==typeof e&&"id"in e?e.id:e),[i]),p=null!=o,m=o?f.indexOf(o.id):-1,_=u?f.indexOf(u.id):-1,g=O(f),y=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(f,g.current),v=-1!==_&&-1===m||y,b=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(s);Jf(()=>{y&&p&&c(f)},[y,f,p,c]),C(()=>{g.current=f},[f]);const x=N(()=>({activeIndex:m,containerId:h,disabled:b,disableTransforms:v,items:f,overIndex:_,useDragOverlay:d,sortedRects:Km(f,l),strategy:r}),[m,h,b.draggable,b.droppable,v,f,_,l,d,r]);return S.createElement(n_.Provider,{value:x},t)}const r_=e=>{let{id:t,items:n,activeIndex:i,overIndex:r}=e;return Ym(n,i,r).indexOf(t)},s_=e=>{let{containerId:t,isSorting:n,wasDragging:i,index:r,items:s,newIndex:o,previousItems:a,previousContainerId:l,transition:u}=e;return!(!u||!i)&&((a===s||r!==o)&&(!!n||o!==r&&t===l))},o_={duration:200,easing:"ease"},a_="transform",l_=dp.Transition.toString({property:a_,duration:0,easing:"linear"}),u_={roleDescription:"sortable"};function c_(e){let{animateLayoutChanges:t=s_,attributes:n,disabled:i,data:r,getNewIndex:s=r_,id:o,strategy:a,resizeObserverConfig:l,transition:u=o_}=e;const{items:c,containerId:h,activeIndex:d,disabled:f,disableTransforms:p,sortedRects:m,overIndex:_,useDragOverlay:g,strategy:y}=I(n_),v=function(e,t){var n,i;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(i=null==e?void 0:e.droppable)?i:t.droppable}}(i,f),b=c.indexOf(o),x=N(()=>({sortable:{containerId:h,index:b,items:c},...r}),[h,r,b,c]),w=N(()=>c.slice(c.indexOf(o)),[c,o]),{rect:E,node:A,isOver:T,setNodeRef:S}=function(e){let{data:t,disabled:n=!1,id:i,resizeObserverConfig:r}=e;const s=op("Droppable"),{active:o,dispatch:a,over:l,measureDroppableContainers:u}=I(Im),c=O({disabled:n}),h=O(!1),d=O(null),f=O(null),{disabled:p,updateMeasurementsFor:m,timeout:_}={...Hm,...r},g=tp(null!=m?m:i),y=Am({callback:P(()=>{h.current?(null!=f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{u(Array.isArray(g.current)?g.current:[g.current]),f.current=null},_)):h.current=!0},[_]),disabled:p||!o}),v=P((e,t)=>{y&&(t&&(y.unobserve(t),h.current=!1),e&&y.observe(e))},[y]),[b,x]=ip(v),w=tp(t);return C(()=>{y&&b.current&&(y.disconnect(),h.current=!1,y.observe(b.current))},[b,y]),C(()=>(a({type:wp.RegisterDroppable,element:{id:i,key:s,disabled:n,node:b,rect:d,data:w}}),()=>a({type:wp.UnregisterDroppable,key:s,id:i})),[i]),C(()=>{n!==c.current.disabled&&(a({type:wp.SetDroppableDisabled,id:i,key:s,disabled:n}),c.current.disabled=n)},[i,s,n,a]),{active:o,rect:d,isOver:(null==l?void 0:l.id)===i,node:b,over:l,setNodeRef:x}}({id:o,data:x,disabled:v.droppable,resizeObserverConfig:{updateMeasurementsFor:w,...l}}),{active:k,activatorEvent:M,activeNodeRect:R,attributes:L,setNodeRef:D,listeners:z,isDragging:F,over:j,setActivatorNodeRef:U,transform:V}=Wm({id:o,data:x,attributes:{...u_,...n},disabled:v.draggable}),G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(()=>e=>{t.forEach(t=>t(e))},t)}(S,D),$=Boolean(k),Z=$&&!p&&Xm(d)&&Xm(_),q=!g&&F,W=q&&Z?V:null,H=Z?null!=W?W:(null!=a?a:y)({rects:m,activeNodeRect:R,activeIndex:d,overIndex:_,index:b}):null,Y=Xm(d)&&Xm(_)?s({id:o,items:c,activeIndex:d,overIndex:_}):b,K=null==k?void 0:k.id,X=O({activeId:K,items:c,newIndex:Y,containerId:h}),Q=c!==X.current.items,J=t({active:k,containerId:h,isDragging:F,isSorting:$,id:o,index:b,items:c,newIndex:X.current.newIndex,previousItems:X.current.items,previousContainerId:X.current.containerId,transition:u,wasDragging:null!=X.current.activeId}),ee=function(e){let{disabled:t,index:n,node:i,rect:r}=e;const[s,o]=B(null),a=O(n);return Jf(()=>{if(!t&&n!==a.current&&i.current){const e=r.current;if(e){const t=zp(i.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==a.current&&(a.current=n)},[t,n,i,r]),C(()=>{s&&o(null)},[s]),s}({disabled:!J,index:b,node:A,rect:E});return C(()=>{$&&X.current.newIndex!==Y&&(X.current.newIndex=Y),h!==X.current.containerId&&(X.current.containerId=h),c!==X.current.items&&(X.current.items=c)},[$,Y,h,c]),C(()=>{if(K===X.current.activeId)return;if(null!=K&&null==X.current.activeId)return void(X.current.activeId=K);const e=setTimeout(()=>{X.current.activeId=K},50);return()=>clearTimeout(e)},[K]),{active:k,activeIndex:d,attributes:L,data:x,rect:E,index:b,newIndex:Y,items:c,isOver:T,isSorting:$,isDragging:F,listeners:z,node:A,overIndex:_,over:j,setNodeRef:G,setActivatorNodeRef:U,setDroppableNodeRef:S,setDraggableNodeRef:D,transform:null!=ee?ee:H,transition:function(){if(ee||Q&&X.current.newIndex===b)return l_;if(q&&!cp(M)||!u)return;if($||J)return dp.Transition.toString({...u,property:a_});return}()}}nm.Down,nm.Right,nm.Up,nm.Left;const h_=({id:e,sx:t,children:n})=>{const{isDragging:i}=Wm({id:e}),{attributes:s,listeners:o,setNodeRef:a,transform:l,transition:u}=c_({id:e,strategy:e_,transition:{duration:300,easing:"cubic-bezier(0.25, 1, 0.5, 1)"}}),c={...t?.default,...i?t?.dragging:{},transform:dp.Translate.toString(l),transition:u,cursor:"pointer"};return H(r,{ref:a,style:c,...o,...s,children:n})};function d_({items:e,getItem:t,getId:n,onDragEnd:i,sx:r,title:s,draggableSx:o}){const a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(()=>[...t].filter(e=>null!=e),[...t])}(N(()=>({sensor:l,options:null!=u?u:{}}),[l=dm,u={activationConstraint:{distance:8}}]));var l,u;return H($m,{sensors:a,collisionDetection:Pp,onDragEnd:t=>{const{active:r,over:s}=t,o=e.findIndex(e=>n(e)===r.id),a=e.findIndex(e=>n(e)===s?.id),l=Ym(e,o,a);i(l)},children:H(i_,{items:e.map(n),strategy:e_,children:H($f,{items:e,sx:r,title:s,getKey:n,getContent:(e,i)=>{const r=n(e);return H(h_,{id:r,sx:o,children:t(e,i)},r)}})})})}var f_,p_={exports:{}},m_={},__={exports:{}},g_={exports:{}},y_={};var v_,b_,x_,w_,E_,A_,T_,S_,k_,O_,P_,C_,M_,R_,L_,N_={};
15
15
  /** @license React v16.13.1
16
16
  * react-is.development.js
17
17
  *