@foris/avocado-not-front 1.4.0 → 1.4.1

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.
@@ -646,34 +646,34 @@ clipRule="evenodd"
646
646
  Released under the MIT License.
647
647
  */var W0=function(t,e){return W0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},W0(t,e)};function hn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");W0(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var We=function(){return We=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},We.apply(this,arguments)};function ji(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var IF=function(t){var e=t.showTimeSelectOnly,n=e===void 0?!1:e,r=t.showTime,i=r===void 0?!1:r,o=t.className,a=t.children,s=n?"Choose Time":"Choose Date".concat(i?" and Time":"");return k.createElement("div",{className:o,role:"dialog","aria-label":s,"aria-modal":"true"},a)},de;(function(t){t.ArrowUp="ArrowUp",t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.PageUp="PageUp",t.PageDown="PageDown",t.Home="Home",t.End="End",t.Enter="Enter",t.Space=" ",t.Tab="Tab",t.Escape="Escape",t.Backspace="Backspace",t.X="x"})(de||(de={}));function K9(){var t=typeof window<"u"?window:globalThis;return t}var Jc=12,jF=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;function ct(t){if(t==null)return new Date;var e=typeof t=="string"?mV(t):Oe(t);return Mo(e)?e:new Date}function NF(t,e,n,r,i){var o,a=null,s=xl(n)||xl(tu()),l=!0;if(Array.isArray(e))return e.forEach(function(u){var f=L0(t,u,new Date,{locale:s,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});r&&(l=Mo(f,i)&&t===Ct(f,u,n)),Mo(f,i)&&l&&(a=f)}),a;if(a=L0(t,e,new Date,{locale:s,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0}),r)l=Mo(a)&&t===Ct(a,e,n);else if(!Mo(a)){var c=((o=e.match(jF))!==null&&o!==void 0?o:[]).map(function(u){var f=u[0];if(f==="p"||f==="P"){var d=Ld[f];return s?d(u,s.formatLong):f}return u}).join("");t.length>0&&(a=L0(t,c.slice(0,t.length),new Date,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})),Mo(a)||(a=new Date(t))}return Mo(a)&&l?a:null}function Mo(t,e){return Id(t)&&!hs(t,e??new Date("1/1/1800"))}function Ct(t,e,n){if(n==="en")return O9(t,e,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var r=n?xl(n):void 0;return n&&!r&&console.warn('A locale object was not found for the provided string ["'.concat(n,'"].')),!r&&tu()&&xl(tu())&&(r=xl(tu())),O9(t,e,{locale:r,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function zr(t,e){var n=e.dateFormat,r=e.locale,i=Array.isArray(n)&&n.length>0?n[0]:n;return t&&Ct(t,i,r)||""}function RF(t,e,n){if(!t)return"";var r=zr(t,n),i=e?zr(e,n):"";return"".concat(r," - ").concat(i)}function BF(t,e){if(!(t!=null&&t.length))return"";var n=t[0]?zr(t[0],e):"";if(t.length===1)return n;if(t.length===2&&t[1]){var r=zr(t[1],e);return"".concat(n,", ").concat(r)}var i=t.length-1;return"".concat(n," (+").concat(i,")")}function U0(t,e){var n=e.hour,r=n===void 0?0:n,i=e.minute,o=i===void 0?0:i,a=e.second,s=a===void 0?0:a;return Nd(Rd(Bd(t,s),o),r)}function ZF(t){return E0(t)}function zF(t,e){return Ct(t,"ddd",e)}function Kd(t){return cs(t)}function va(t,e,n){var r=xl(e||tu());return Po(t,{locale:r,weekStartsOn:n})}function ba(t){return P9(t)}function eu(t){return $d(t)}function J9(t){return Q0(t)}function e4(){return cs(ct())}function t4(t){return o9(t)}function XF(t){return bz(t)}function Ni(t,e){return t&&e?yX(t,e):!t&&!e}function qn(t,e){return t&&e?gX(t,e):!t&&!e}function Jd(t,e){return t&&e?OX(t,e):!t&&!e}function Ve(t,e){return t&&e?mX(t,e):!t&&!e}function ms(t,e){return t&&e?pX(t,e):!t&&!e}function eh(t,e,n){var r,i=cs(e),o=o9(n);try{r=Wc(t,{start:i,end:o})}catch{r=!1}return r}function tu(){var t=K9();return t.__localeId__}function xl(t){if(typeof t=="string"){var e=K9();return e.__localeData__?e.__localeData__[t]:void 0}else return t}function VF(t,e,n){return e(Ct(t,"EEEE",n))}function FF(t,e){return Ct(t,"EEEEEE",e)}function YF(t,e){return Ct(t,"EEE",e)}function H0(t,e){return Ct(pr(ct(),t),"LLLL",e)}function n4(t,e){return Ct(pr(ct(),t),"LLL",e)}function qF(t,e){return Ct(ml(ct(),t),"QQQ",e)}function wa(t,e){var n=e===void 0?{}:e,r=n.minDate,i=n.maxDate,o=n.excludeDates,a=n.excludeDateIntervals,s=n.includeDates,l=n.includeDateIntervals,c=n.filterDate;return nu(t,{minDate:r,maxDate:i})||o&&o.some(function(u){var f;return u instanceof Date?Ve(t,u):Ve(t,(f=u.date)!==null&&f!==void 0?f:new Date)})||a&&a.some(function(u){var f=u.start,d=u.end;return Wc(t,{start:f,end:d})})||s&&!s.some(function(u){return Ve(t,u)})||l&&!l.some(function(u){var f=u.start,d=u.end;return Wc(t,{start:f,end:d})})||c&&!c(ct(t))||!1}function G0(t,e){var n=e===void 0?{}:e,r=n.excludeDates,i=n.excludeDateIntervals;return i&&i.length>0?i.some(function(o){var a=o.start,s=o.end;return Wc(t,{start:a,end:s})}):r&&r.some(function(o){var a;return o instanceof Date?Ve(t,o):Ve(t,(a=o.date)!==null&&a!==void 0?a:new Date)})||!1}function r4(t,e){var n=e===void 0?{}:e,r=n.minDate,i=n.maxDate,o=n.excludeDates,a=n.includeDates,s=n.filterDate;return nu(t,{minDate:r?P9(r):void 0,maxDate:i?yz(i):void 0})||(o==null?void 0:o.some(function(l){return qn(t,l instanceof Date?l:l.date)}))||a&&!a.some(function(l){return qn(t,l)})||s&&!s(ct(t))||!1}function K0(t,e,n,r){var i=Be(t),o=Yn(t),a=Be(e),s=Yn(e),l=Be(r);return i===a&&i===l?o<=n&&n<=s:i<a?l===i&&o<=n||l===a&&s>=n||l<a&&l>i:!1}function WF(t,e){var n=e===void 0?{}:e,r=n.minDate,i=n.maxDate,o=n.excludeDates,a=n.includeDates;return nu(t,{minDate:r,maxDate:i})||o&&o.some(function(s){return qn(s instanceof Date?s:s.date,t)})||a&&!a.some(function(s){return qn(s,t)})||!1}function J0(t,e){var n=e===void 0?{}:e,r=n.minDate,i=n.maxDate,o=n.excludeDates,a=n.includeDates,s=n.filterDate;return nu(t,{minDate:r,maxDate:i})||(o==null?void 0:o.some(function(l){return Jd(t,l instanceof Date?l:l.date)}))||a&&!a.some(function(l){return Jd(t,l)})||s&&!s(ct(t))||!1}function eg(t,e,n){if(!e||!n||!Id(e)||!Id(n))return!1;var r=Be(e),i=Be(n);return r<=t&&i>=t}function tg(t,e){var n=e===void 0?{}:e,r=n.minDate,i=n.maxDate,o=n.excludeDates,a=n.includeDates,s=n.filterDate,l=new Date(t,0,1);return nu(l,{minDate:r?$d(r):void 0,maxDate:i?a9(i):void 0})||(o==null?void 0:o.some(function(c){return Ni(l,c instanceof Date?c:c.date)}))||a&&!a.some(function(c){return Ni(l,c)})||s&&!s(ct(l))||!1}function ng(t,e,n,r){var i=Be(t),o=us(t),a=Be(e),s=us(e),l=Be(r);return i===a&&i===l?o<=n&&n<=s:i<a?l===i&&o<=n||l===a&&s>=n||l<a&&l>i:!1}function nu(t,e){var n,r=e===void 0?{}:e,i=r.minDate,o=r.maxDate;return(n=i&&Fc(t,i)<0||o&&Fc(t,o)>0)!==null&&n!==void 0?n:!1}function i4(t,e){return e.some(function(n){return Mi(n)===Mi(t)&&Qi(n)===Qi(t)&&To(n)===To(t)})}function o4(t,e){var n=e===void 0?{}:e,r=n.excludeTimes,i=n.includeTimes,o=n.filterTime;return r&&i4(t,r)||i&&!i4(t,i)||o&&!o(t)||!1}function a4(t,e){var n=e.minTime,r=e.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i=ct();i=Nd(i,Mi(t)),i=Rd(i,Qi(t)),i=Bd(i,To(t));var o=ct();o=Nd(o,Mi(n)),o=Rd(o,Qi(n)),o=Bd(o,To(n));var a=ct();a=Nd(a,Mi(r)),a=Rd(a,Qi(r)),a=Bd(a,To(r));var s;try{s=!Wc(i,{start:o,end:a})}catch{s=!1}return s}function s4(t,e){var n=e===void 0?{}:e,r=n.minDate,i=n.includeDates,o=gl(t,1);return r&&Md(r,o)>0||i&&i.every(function(a){return Md(a,o)>0})||!1}function l4(t,e){var n=e===void 0?{}:e,r=n.maxDate,i=n.includeDates,o=Oi(t,1);return r&&Md(o,r)>0||i&&i.every(function(a){return Md(o,a)>0})||!1}function UF(t,e){var n=e===void 0?{}:e,r=n.minDate,i=n.includeDates,o=$d(t),a=E9(o,1);return r&&Qd(r,a)>0||i&&i.every(function(s){return Qd(s,a)>0})||!1}function HF(t,e){var n=e===void 0?{}:e,r=n.maxDate,i=n.includeDates,o=a9(t),a=C0(o,1);return r&&Qd(a,r)>0||i&&i.every(function(s){return Qd(a,s)>0})||!1}function c4(t,e){var n=e===void 0?{}:e,r=n.minDate,i=n.includeDates,o=Ol(t,1);return r&&Dd(r,o)>0||i&&i.every(function(a){return Dd(a,o)>0})||!1}function GF(t,e){var n=e===void 0?{}:e,r=n.minDate,i=n.yearItemNumber,o=i===void 0?Jc:i,a=eu(Ol(t,o)),s=xa(a,o).endPeriod,l=r&&Be(r);return l&&l>s||!1}function u4(t,e){var n=e===void 0?{}:e,r=n.maxDate,i=n.includeDates,o=Co(t,1);return r&&Dd(o,r)>0||i&&i.every(function(a){return Dd(o,a)>0})||!1}function KF(t,e){var n=e===void 0?{}:e,r=n.maxDate,i=n.yearItemNumber,o=i===void 0?Jc:i,a=Co(t,o),s=xa(a,o).startPeriod,l=r&&Be(r);return l&&l<s||!1}function f4(t){var e=t.minDate,n=t.includeDates;if(n&&e){var r=n.filter(function(i){return Fc(i,e)>=0});return b9(r)}else return n?b9(n):e}function d4(t){var e=t.maxDate,n=t.includeDates;if(n&&e){var r=n.filter(function(i){return Fc(i,e)<=0});return v9(r)}else return n?v9(n):e}function h4(t,e){var n;t===void 0&&(t=[]),e===void 0&&(e="react-datepicker__day--highlighted");for(var r=new Map,i=0,o=t.length;i<o;i++){var a=t[i];if(Eo(a)){var s=Ct(a,"MM.dd.yyyy"),l=r.get(s)||[];l.includes(e)||(l.push(e),r.set(s,l))}else if(typeof a=="object"){var c=Object.keys(a),u=(n=c[0])!==null&&n!==void 0?n:"",f=a[u];if(typeof u=="string"&&Array.isArray(f))for(var d=0,h=f.length;d<h;d++){var m=f[d];if(m){var s=Ct(m,"MM.dd.yyyy"),l=r.get(s)||[];l.includes(u)||(l.push(u),r.set(s,l))}}}}return r}function JF(t,e){return t.length!==e.length?!1:t.every(function(n,r){return n===e[r]})}function eY(t,e){t===void 0&&(t=[]),e===void 0&&(e="react-datepicker__day--holidays");var n=new Map;return t.forEach(function(r){var i=r.date,o=r.holidayName;if(Eo(i)){var a=Ct(i,"MM.dd.yyyy"),s=n.get(a)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===e&&JF(s.holidayNames,[o]))){s.className=e;var l=s.holidayNames;s.holidayNames=l?ji(ji([],l,!0),[o],!1):[o],n.set(a,s)}}}),n}function tY(t,e,n,r,i){for(var o=i.length,a=[],s=0;s<o;s++){var l=t,c=i[s];c&&(l=gz(l,Mi(c)),l=k0(l,Qi(c)),l=Oz(l,To(c)));var u=k0(t,(n+1)*r);ga(l,e)&&hs(l,u)&&c!=null&&a.push(c)}return a}function p4(t){return t<10?"0".concat(t):"".concat(t)}function xa(t,e){e===void 0&&(e=Jc);var n=Math.ceil(Be(t)/e)*e,r=n-(e-1);return{startPeriod:r,endPeriod:n}}function nY(t){var e=new Date(t.getFullYear(),t.getMonth(),t.getDate()),n=new Date(t.getFullYear(),t.getMonth(),t.getDate(),24);return Math.round((+n-+e)/36e5)}function m4(t){var e=t.getSeconds(),n=t.getMilliseconds();return Oe(t.getTime()-e*1e3-n)}function rY(t,e){return m4(t).getTime()===m4(e).getTime()}function g4(t){if(!Eo(t))throw new Error("Invalid date");var e=new Date(t);return e.setHours(0,0,0,0),e}function O4(t,e){if(!Eo(t)||!Eo(e))throw new Error("Invalid date received");var n=g4(t),r=g4(e);return hs(n,r)}function y4(t){return t.key===de.Space}var iY=function(t){hn(e,t);function e(n){var r=t.call(this,n)||this;return r.onTimeChange=function(i){var o,a;r.setState({time:i});var s=r.props.date,l=s instanceof Date&&!isNaN(+s),c=l?s:new Date;if(i!=null&&i.includes(":")){var u=i.split(":"),f=u[0],d=u[1];c.setHours(Number(f)),c.setMinutes(Number(d))}(a=(o=r.props).onChange)===null||a===void 0||a.call(o,c)},r.renderTimeInput=function(){var i=r.state.time,o=r.props,a=o.date,s=o.timeString,l=o.customTimeInput;return l?k.cloneElement(l,{date:a,value:i,onChange:r.onTimeChange}):k.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",required:!0,value:i,onChange:function(c){r.onTimeChange(c.target.value||s)}})},r.state={time:r.props.timeString},r}return e.getDerivedStateFromProps=function(n,r){return n.timeString!==r.time?{time:n.timeString}:null},e.prototype.render=function(){return k.createElement("div",{className:"react-datepicker__input-time-container"},k.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),k.createElement("div",{className:"react-datepicker-time__input-container"},k.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},e}(k.Component),oY=function(t){hn(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.dayEl=k.createRef(),n.handleClick=function(r){!n.isDisabled()&&n.props.onClick&&n.props.onClick(r)},n.handleMouseEnter=function(r){!n.isDisabled()&&n.props.onMouseEnter&&n.props.onMouseEnter(r)},n.handleOnKeyDown=function(r){var i,o,a=r.key;a===de.Space&&(r.preventDefault(),r.key=de.Enter),(o=(i=n.props).handleOnKeyDown)===null||o===void 0||o.call(i,r)},n.isSameDay=function(r){return Ve(n.props.day,r)},n.isKeyboardSelected=function(){var r;if(n.props.disabledKeyboardNavigation)return!1;var i=n.props.selectsMultiple?(r=n.props.selectedDates)===null||r===void 0?void 0:r.some(function(a){return n.isSameDayOrWeek(a)}):n.isSameDayOrWeek(n.props.selected),o=n.props.preSelection&&n.isDisabled(n.props.preSelection);return!i&&n.isSameDayOrWeek(n.props.preSelection)&&!o},n.isDisabled=function(r){return r===void 0&&(r=n.props.day),wa(r,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals,includeDateIntervals:n.props.includeDateIntervals,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.isExcluded=function(){return G0(n.props.day,{excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals})},n.isStartOfWeek=function(){return Ve(n.props.day,va(n.props.day,n.props.locale,n.props.calendarStartDay))},n.isSameWeek=function(r){return n.props.showWeekPicker&&Ve(r,va(n.props.day,n.props.locale,n.props.calendarStartDay))},n.isSameDayOrWeek=function(r){return n.isSameDay(r)||n.isSameWeek(r)},n.getHighLightedClass=function(){var r=n.props,i=r.day,o=r.highlightDates;if(!o)return!1;var a=Ct(i,"MM.dd.yyyy");return o.get(a)},n.getHolidaysClass=function(){var r,i=n.props,o=i.day,a=i.holidays;if(!a)return[void 0];var s=Ct(o,"MM.dd.yyyy");return a.has(s)?[(r=a.get(s))===null||r===void 0?void 0:r.className]:[void 0]},n.isInRange=function(){var r=n.props,i=r.day,o=r.startDate,a=r.endDate;return!o||!a?!1:eh(i,o,a)},n.isInSelectingRange=function(){var r,i=n.props,o=i.day,a=i.selectsStart,s=i.selectsEnd,l=i.selectsRange,c=i.selectsDisabledDaysInRange,u=i.startDate,f=i.endDate,d=(r=n.props.selectingDate)!==null&&r!==void 0?r:n.props.preSelection;return!(a||s||l)||!d||!c&&n.isDisabled()?!1:a&&f&&(hs(d,f)||ms(d,f))?eh(o,d,f):s&&u&&(ga(d,u)||ms(d,u))||l&&u&&!f&&(ga(d,u)||ms(d,u))?eh(o,u,d):!1},n.isSelectingRangeStart=function(){var r;if(!n.isInSelectingRange())return!1;var i=n.props,o=i.day,a=i.startDate,s=i.selectsStart,l=(r=n.props.selectingDate)!==null&&r!==void 0?r:n.props.preSelection;return s?Ve(o,l):Ve(o,a)},n.isSelectingRangeEnd=function(){var r;if(!n.isInSelectingRange())return!1;var i=n.props,o=i.day,a=i.endDate,s=i.selectsEnd,l=i.selectsRange,c=(r=n.props.selectingDate)!==null&&r!==void 0?r:n.props.preSelection;return s||l?Ve(o,c):Ve(o,a)},n.isRangeStart=function(){var r=n.props,i=r.day,o=r.startDate,a=r.endDate;return!o||!a?!1:Ve(o,i)},n.isRangeEnd=function(){var r=n.props,i=r.day,o=r.startDate,a=r.endDate;return!o||!a?!1:Ve(a,i)},n.isWeekend=function(){var r=hX(n.props.day);return r===0||r===6},n.isAfterMonth=function(){return n.props.month!==void 0&&(n.props.month+1)%12===Yn(n.props.day)},n.isBeforeMonth=function(){return n.props.month!==void 0&&(Yn(n.props.day)+1)%12===n.props.month},n.isCurrentDay=function(){return n.isSameDay(ct())},n.isSelected=function(){var r;return n.props.selectsMultiple?(r=n.props.selectedDates)===null||r===void 0?void 0:r.some(function(i){return n.isSameDayOrWeek(i)}):n.isSameDayOrWeek(n.props.selected)},n.getClassNames=function(r){var i=n.props.dayClassName?n.props.dayClassName(r):void 0;return dn("react-datepicker__day",i,"react-datepicker__day--"+zF(n.props.day),{"react-datepicker__day--disabled":n.isDisabled(),"react-datepicker__day--excluded":n.isExcluded(),"react-datepicker__day--selected":n.isSelected(),"react-datepicker__day--keyboard-selected":n.isKeyboardSelected(),"react-datepicker__day--range-start":n.isRangeStart(),"react-datepicker__day--range-end":n.isRangeEnd(),"react-datepicker__day--in-range":n.isInRange(),"react-datepicker__day--in-selecting-range":n.isInSelectingRange(),"react-datepicker__day--selecting-range-start":n.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":n.isSelectingRangeEnd(),"react-datepicker__day--today":n.isCurrentDay(),"react-datepicker__day--weekend":n.isWeekend(),"react-datepicker__day--outside-month":n.isAfterMonth()||n.isBeforeMonth()},n.getHighLightedClass(),n.getHolidaysClass())},n.getAriaLabel=function(){var r=n.props,i=r.day,o=r.ariaLabelPrefixWhenEnabled,a=o===void 0?"Choose":o,s=r.ariaLabelPrefixWhenDisabled,l=s===void 0?"Not available":s,c=n.isDisabled()||n.isExcluded()?l:a;return"".concat(c," ").concat(Ct(i,"PPPP",n.props.locale))},n.getTitle=function(){var r=n.props,i=r.day,o=r.holidays,a=o===void 0?new Map:o,s=r.excludeDates,l=Ct(i,"MM.dd.yyyy"),c=[];return a.has(l)&&c.push.apply(c,a.get(l).holidayNames),n.isExcluded()&&c.push(s==null?void 0:s.filter(function(u){return u instanceof Date?Ve(u,i):Ve(u==null?void 0:u.date,i)}).map(function(u){if(!(u instanceof Date))return u==null?void 0:u.message})),c.join(", ")},n.getTabIndex=function(){var r=n.props.selected,i=n.props.preSelection,o=!(n.props.showWeekPicker&&(n.props.showWeekNumber||!n.isStartOfWeek()))&&(n.isKeyboardSelected()||n.isSameDay(r)&&Ve(i,r))?0:-1;return o},n.handleFocusDay=function(){var r;n.shouldFocusDay()&&((r=n.dayEl.current)===null||r===void 0||r.focus({preventScroll:!0}))},n.renderDayContents=function(){return n.props.monthShowsDuplicateDaysEnd&&n.isAfterMonth()||n.props.monthShowsDuplicateDaysStart&&n.isBeforeMonth()?null:n.props.renderDayContents?n.props.renderDayContents(y9(n.props.day),n.props.day):y9(n.props.day)},n.render=function(){return k.createElement("div",{ref:n.dayEl,className:n.getClassNames(n.props.day),onKeyDown:n.handleOnKeyDown,onClick:n.handleClick,onMouseEnter:n.props.usePointerEvent?void 0:n.handleMouseEnter,onPointerEnter:n.props.usePointerEvent?n.handleMouseEnter:void 0,tabIndex:n.getTabIndex(),"aria-label":n.getAriaLabel(),role:"option",title:n.getTitle(),"aria-disabled":n.isDisabled(),"aria-current":n.isCurrentDay()?"date":void 0,"aria-selected":n.isSelected()||n.isInRange()},n.renderDayContents(),n.getTitle()!==""&&k.createElement("span",{className:"overlay"},n.getTitle()))},n}return e.prototype.componentDidMount=function(){this.handleFocusDay()},e.prototype.componentDidUpdate=function(){this.handleFocusDay()},e.prototype.shouldFocusDay=function(){var n=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(n=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(n=!1),this.isDayActiveElement()&&(n=!0),this.isDuplicateDay()&&(n=!1)),n},e.prototype.isDayActiveElement=function(){var n,r,i;return((r=(n=this.props.containerRef)===null||n===void 0?void 0:n.current)===null||r===void 0?void 0:r.contains(document.activeElement))&&((i=document.activeElement)===null||i===void 0?void 0:i.classList.contains("react-datepicker__day"))},e.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},e}(k.Component),aY=function(t){hn(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.weekNumberEl=k.createRef(),n.handleClick=function(r){n.props.onClick&&n.props.onClick(r)},n.handleOnKeyDown=function(r){var i,o,a=r.key;a===de.Space&&(r.preventDefault(),r.key=de.Enter),(o=(i=n.props).handleOnKeyDown)===null||o===void 0||o.call(i,r)},n.isKeyboardSelected=function(){return!n.props.disabledKeyboardNavigation&&!Ve(n.props.date,n.props.selected)&&Ve(n.props.date,n.props.preSelection)},n.getTabIndex=function(){return n.props.showWeekPicker&&n.props.showWeekNumber&&(n.isKeyboardSelected()||Ve(n.props.date,n.props.selected)&&Ve(n.props.preSelection,n.props.selected))?0:-1},n.handleFocusWeekNumber=function(r){var i=!1;n.getTabIndex()===0&&!(r!=null&&r.isInputFocused)&&Ve(n.props.date,n.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(i=!0),n.props.inline&&!n.props.shouldFocusDayInline&&(i=!1),n.props.containerRef&&n.props.containerRef.current&&n.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(i=!0)),i&&n.weekNumberEl.current&&n.weekNumberEl.current.focus({preventScroll:!0})},n}return Object.defineProperty(e,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),e.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},e.prototype.componentDidUpdate=function(n){this.handleFocusWeekNumber(n)},e.prototype.render=function(){var n=this.props,r=n.weekNumber,i=n.ariaLabelPrefix,o=i===void 0?e.defaultProps.ariaLabelPrefix:i,a=n.onClick,s={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!a,"react-datepicker__week-number--selected":!!a&&Ve(this.props.date,this.props.selected),"react-datepicker__week-number--keyboard-selected":this.isKeyboardSelected()};return k.createElement("div",{ref:this.weekNumberEl,className:dn(s),"aria-label":"".concat(o," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},r)},e}(k.Component),sY=function(t){hn(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.isDisabled=function(r){return wa(r,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals,includeDateIntervals:n.props.includeDateIntervals,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.handleDayClick=function(r,i){n.props.onDayClick&&n.props.onDayClick(r,i)},n.handleDayMouseEnter=function(r){n.props.onDayMouseEnter&&n.props.onDayMouseEnter(r)},n.handleWeekClick=function(r,i,o){for(var a,s,l,c=new Date(r),u=0;u<7;u++){var f=new Date(r);f.setDate(f.getDate()+u);var d=!n.isDisabled(f);if(d){c=f;break}}typeof n.props.onWeekSelect=="function"&&n.props.onWeekSelect(c,i,o),n.props.showWeekPicker&&n.handleDayClick(c,o),((a=n.props.shouldCloseOnSelect)!==null&&a!==void 0?a:e.defaultProps.shouldCloseOnSelect)&&((l=(s=n.props).setOpen)===null||l===void 0||l.call(s,!1))},n.formatWeekNumber=function(r){return n.props.formatWeekNumber?n.props.formatWeekNumber(r):ZF(r)},n.renderDays=function(){var r=n.startOfWeek(),i=[],o=n.formatWeekNumber(r);if(n.props.showWeekNumber){var a=n.props.onWeekSelect||n.props.showWeekPicker?n.handleWeekClick.bind(n,r,o):void 0;i.push(k.createElement(aY,We({key:"W"},e.defaultProps,n.props,{weekNumber:o,date:r,onClick:a})))}return i.concat([0,1,2,3,4,5,6].map(function(s){var l=pa(r,s);return k.createElement(oY,We({},e.defaultProps,n.props,{ariaLabelPrefixWhenEnabled:n.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:n.props.disabledDayAriaLabelPrefix,key:l.valueOf(),day:l,onClick:n.handleDayClick.bind(n,l),onMouseEnter:n.handleDayMouseEnter.bind(n,l)}))}))},n.startOfWeek=function(){return va(n.props.day,n.props.locale,n.props.calendarStartDay)},n.isKeyboardSelected=function(){return!n.props.disabledKeyboardNavigation&&!Ve(n.startOfWeek(),n.props.selected)&&Ve(n.startOfWeek(),n.props.preSelection)},n}return Object.defineProperty(e,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),e.prototype.render=function(){var n={"react-datepicker__week":!0,"react-datepicker__week--selected":Ve(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return k.createElement("div",{className:dn(n)},this.renderDays())},e}(k.Component),ru,lY=6,_l={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},rg=(ru={},ru[_l.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},ru[_l.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},ru[_l.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},ru),th=1;function v4(t,e){return t?_l.FOUR_COLUMNS:e?_l.TWO_COLUMNS:_l.THREE_COLUMNS}var cY=function(t){hn(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.MONTH_REFS=ji([],Array(12),!0).map(function(){return k.createRef()}),n.QUARTER_REFS=ji([],Array(4),!0).map(function(){return k.createRef()}),n.isDisabled=function(r){return wa(r,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals,includeDateIntervals:n.props.includeDateIntervals,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.isExcluded=function(r){return G0(r,{excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals})},n.handleDayClick=function(r,i){var o,a;(a=(o=n.props).onDayClick)===null||a===void 0||a.call(o,r,i,n.props.orderInDisplay)},n.handleDayMouseEnter=function(r){var i,o;(o=(i=n.props).onDayMouseEnter)===null||o===void 0||o.call(i,r)},n.handleMouseLeave=function(){var r,i;(i=(r=n.props).onMouseLeave)===null||i===void 0||i.call(r)},n.isRangeStartMonth=function(r){var i=n.props,o=i.day,a=i.startDate,s=i.endDate;return!a||!s?!1:qn(pr(o,r),a)},n.isRangeStartQuarter=function(r){var i=n.props,o=i.day,a=i.startDate,s=i.endDate;return!a||!s?!1:Jd(ml(o,r),a)},n.isRangeEndMonth=function(r){var i=n.props,o=i.day,a=i.startDate,s=i.endDate;return!a||!s?!1:qn(pr(o,r),s)},n.isRangeEndQuarter=function(r){var i=n.props,o=i.day,a=i.startDate,s=i.endDate;return!a||!s?!1:Jd(ml(o,r),s)},n.isInSelectingRangeMonth=function(r){var i,o=n.props,a=o.day,s=o.selectsStart,l=o.selectsEnd,c=o.selectsRange,u=o.startDate,f=o.endDate,d=(i=n.props.selectingDate)!==null&&i!==void 0?i:n.props.preSelection;return!(s||l||c)||!d?!1:s&&f?K0(d,f,r,a):l&&u||c&&u&&!f?K0(u,d,r,a):!1},n.isSelectingMonthRangeStart=function(r){var i;if(!n.isInSelectingRangeMonth(r))return!1;var o=n.props,a=o.day,s=o.startDate,l=o.selectsStart,c=pr(a,r),u=(i=n.props.selectingDate)!==null&&i!==void 0?i:n.props.preSelection;return l?qn(c,u):qn(c,s)},n.isSelectingMonthRangeEnd=function(r){var i;if(!n.isInSelectingRangeMonth(r))return!1;var o=n.props,a=o.day,s=o.endDate,l=o.selectsEnd,c=o.selectsRange,u=pr(a,r),f=(i=n.props.selectingDate)!==null&&i!==void 0?i:n.props.preSelection;return l||c?qn(u,f):qn(u,s)},n.isInSelectingRangeQuarter=function(r){var i,o=n.props,a=o.day,s=o.selectsStart,l=o.selectsEnd,c=o.selectsRange,u=o.startDate,f=o.endDate,d=(i=n.props.selectingDate)!==null&&i!==void 0?i:n.props.preSelection;return!(s||l||c)||!d?!1:s&&f?ng(d,f,r,a):l&&u||c&&u&&!f?ng(u,d,r,a):!1},n.isWeekInMonth=function(r){var i=n.props.day,o=pa(r,6);return qn(r,i)||qn(o,i)},n.isCurrentMonth=function(r,i){return Be(r)===Be(ct())&&i===Yn(ct())},n.isCurrentQuarter=function(r,i){return Be(r)===Be(ct())&&i===us(ct())},n.isSelectedMonth=function(r,i,o){return Yn(o)===i&&Be(r)===Be(o)},n.isSelectMonthInList=function(r,i,o){return o.some(function(a){return n.isSelectedMonth(r,i,a)})},n.isSelectedQuarter=function(r,i,o){return us(r)===i&&Be(r)===Be(o)},n.renderWeeks=function(){for(var r=[],i=n.props.fixedHeight,o=0,a=!1,s=va(ba(n.props.day),n.props.locale,n.props.calendarStartDay),l=function(m){return n.props.showWeekPicker?va(m,n.props.locale,n.props.calendarStartDay):n.props.preSelection},c=function(m){return n.props.showWeekPicker?va(m,n.props.locale,n.props.calendarStartDay):n.props.selected},u=n.props.selected?c(n.props.selected):void 0,f=n.props.preSelection?l(n.props.preSelection):void 0;r.push(k.createElement(sY,We({},n.props,{ariaLabelPrefix:n.props.weekAriaLabelPrefix,key:o,day:s,month:Yn(n.props.day),onDayClick:n.handleDayClick,onDayMouseEnter:n.handleDayMouseEnter,selected:u,preSelection:f,showWeekNumber:n.props.showWeekNumbers}))),!a;){o++,s=Td(s,1);var d=i&&o>=lY,h=!i&&!n.isWeekInMonth(s);if(d||h)if(n.props.peekNextMonth)a=!0;else break}return r},n.onMonthClick=function(r,i){var o=n.isMonthDisabledForLabelDate(i),a=o.isDisabled,s=o.labelDate;a||n.handleDayClick(ba(s),r)},n.onMonthMouseEnter=function(r){var i=n.isMonthDisabledForLabelDate(r),o=i.isDisabled,a=i.labelDate;o||n.handleDayMouseEnter(ba(a))},n.handleMonthNavigation=function(r,i){var o,a,s,l;(a=(o=n.props).setPreSelection)===null||a===void 0||a.call(o,i),(l=(s=n.MONTH_REFS[r])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus()},n.handleKeyboardNavigation=function(r,i,o){var a,s=n.props,l=s.selected,c=s.preSelection,u=s.setPreSelection,f=s.minDate,d=s.maxDate,h=s.showFourColumnMonthYearPicker,m=s.showTwoColumnMonthYearPicker;if(c){var g=v4(h,m),p=n.getVerticalOffset(g),O=(a=rg[g])===null||a===void 0?void 0:a.grid,w=function(_,E,A){var I,Q,D=E,j=A;switch(_){case de.ArrowRight:D=Oi(E,th),j=A===11?0:A+th;break;case de.ArrowLeft:D=gl(E,th),j=A===0?11:A-th;break;case de.ArrowUp:D=gl(E,p),j=!((I=O==null?void 0:O[0])===null||I===void 0)&&I.includes(A)?A+12-p:A-p;break;case de.ArrowDown:D=Oi(E,p),j=!((Q=O==null?void 0:O[O.length-1])===null||Q===void 0)&&Q.includes(A)?A-12+p:A+p;break}return{newCalculatedDate:D,newCalculatedMonth:j}},v=function(_,E,A){for(var I=40,Q=_,D=!1,j=0,R=w(Q,E,A),B=R.newCalculatedDate,X=R.newCalculatedMonth;!D;){if(j>=I){B=E,X=A;break}if(f&&B<f){Q=de.ArrowRight;var V=w(Q,B,X);B=V.newCalculatedDate,X=V.newCalculatedMonth}if(d&&B>d){Q=de.ArrowLeft;var V=w(Q,B,X);B=V.newCalculatedDate,X=V.newCalculatedMonth}if(WF(B,n.props)){var V=w(Q,B,X);B=V.newCalculatedDate,X=V.newCalculatedMonth}else D=!0;j++}return{newCalculatedDate:B,newCalculatedMonth:X}};if(i===de.Enter){n.isMonthDisabled(o)||(n.onMonthClick(r,o),u==null||u(l));return}var b=v(i,c,o),y=b.newCalculatedDate,x=b.newCalculatedMonth;switch(i){case de.ArrowRight:case de.ArrowLeft:case de.ArrowUp:case de.ArrowDown:n.handleMonthNavigation(x,y);break}}},n.getVerticalOffset=function(r){var i,o;return(o=(i=rg[r])===null||i===void 0?void 0:i.verticalNavigationOffset)!==null&&o!==void 0?o:0},n.onMonthKeyDown=function(r,i){var o=n.props,a=o.disabledKeyboardNavigation,s=o.handleOnMonthKeyDown,l=r.key;l!==de.Tab&&r.preventDefault(),a||n.handleKeyboardNavigation(r,l,i),s&&s(r)},n.onQuarterClick=function(r,i){var o=ml(n.props.day,i);J0(o,n.props)||n.handleDayClick(J9(o),r)},n.onQuarterMouseEnter=function(r){var i=ml(n.props.day,r);J0(i,n.props)||n.handleDayMouseEnter(J9(i))},n.handleQuarterNavigation=function(r,i){var o,a,s,l;n.isDisabled(i)||n.isExcluded(i)||((a=(o=n.props).setPreSelection)===null||a===void 0||a.call(o,i),(l=(s=n.QUARTER_REFS[r-1])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus())},n.onQuarterKeyDown=function(r,i){var o,a,s=r.key;if(!n.props.disabledKeyboardNavigation)switch(s){case de.Enter:n.onQuarterClick(r,i),(a=(o=n.props).setPreSelection)===null||a===void 0||a.call(o,n.props.selected);break;case de.ArrowRight:if(!n.props.preSelection)break;n.handleQuarterNavigation(i===4?1:i+1,C0(n.props.preSelection,1));break;case de.ArrowLeft:if(!n.props.preSelection)break;n.handleQuarterNavigation(i===1?4:i-1,E9(n.props.preSelection,1));break}},n.isMonthDisabledForLabelDate=function(r){var i,o=n.props,a=o.day,s=o.minDate,l=o.maxDate,c=o.excludeDates,u=o.includeDates,f=pr(a,r);return{isDisabled:(i=(s||l||c||u)&&r4(f,n.props))!==null&&i!==void 0?i:!1,labelDate:f}},n.isMonthDisabled=function(r){var i=n.isMonthDisabledForLabelDate(r).isDisabled;return i},n.getMonthClassNames=function(r){var i=n.props,o=i.day,a=i.startDate,s=i.endDate,l=i.preSelection,c=i.monthClassName,u=c?c(pr(o,r)):void 0,f=n.getSelection();return dn("react-datepicker__month-text","react-datepicker__month-".concat(r),u,{"react-datepicker__month-text--disabled":n.isMonthDisabled(r),"react-datepicker__month-text--selected":f?n.isSelectMonthInList(o,r,f):void 0,"react-datepicker__month-text--keyboard-selected":!n.props.disabledKeyboardNavigation&&l&&n.isSelectedMonth(o,r,l)&&!n.isMonthDisabled(r),"react-datepicker__month-text--in-selecting-range":n.isInSelectingRangeMonth(r),"react-datepicker__month-text--in-range":a&&s?K0(a,s,r,o):void 0,"react-datepicker__month-text--range-start":n.isRangeStartMonth(r),"react-datepicker__month-text--range-end":n.isRangeEndMonth(r),"react-datepicker__month-text--selecting-range-start":n.isSelectingMonthRangeStart(r),"react-datepicker__month-text--selecting-range-end":n.isSelectingMonthRangeEnd(r),"react-datepicker__month-text--today":n.isCurrentMonth(o,r)})},n.getTabIndex=function(r){if(n.props.preSelection==null)return"-1";var i=Yn(n.props.preSelection),o=!n.props.disabledKeyboardNavigation&&r===i?"0":"-1";return o},n.getQuarterTabIndex=function(r){if(n.props.preSelection==null)return"-1";var i=us(n.props.preSelection),o=!n.props.disabledKeyboardNavigation&&r===i?"0":"-1";return o},n.getAriaLabel=function(r){var i=n.props,o=i.chooseDayAriaLabelPrefix,a=o===void 0?"Choose":o,s=i.disabledDayAriaLabelPrefix,l=s===void 0?"Not available":s,c=i.day,u=i.locale,f=pr(c,r),d=n.isDisabled(f)||n.isExcluded(f)?l:a;return"".concat(d," ").concat(Ct(f,"MMMM yyyy",u))},n.getQuarterClassNames=function(r){var i=n.props,o=i.day,a=i.startDate,s=i.endDate,l=i.selected,c=i.minDate,u=i.maxDate,f=i.excludeDates,d=i.includeDates,h=i.filterDate,m=i.preSelection,g=i.disabledKeyboardNavigation,p=(c||u||f||d||h)&&J0(ml(o,r),n.props);return dn("react-datepicker__quarter-text","react-datepicker__quarter-".concat(r),{"react-datepicker__quarter-text--disabled":p,"react-datepicker__quarter-text--selected":l?n.isSelectedQuarter(o,r,l):void 0,"react-datepicker__quarter-text--keyboard-selected":!g&&m&&n.isSelectedQuarter(o,r,m)&&!p,"react-datepicker__quarter-text--in-selecting-range":n.isInSelectingRangeQuarter(r),"react-datepicker__quarter-text--in-range":a&&s?ng(a,s,r,o):void 0,"react-datepicker__quarter-text--range-start":n.isRangeStartQuarter(r),"react-datepicker__quarter-text--range-end":n.isRangeEndQuarter(r)})},n.getMonthContent=function(r){var i=n.props,o=i.showFullMonthYearPicker,a=i.renderMonthContent,s=i.locale,l=i.day,c=n4(r,s),u=H0(r,s);return a?a(r,c,u,l):o?u:c},n.getQuarterContent=function(r){var i,o=n.props,a=o.renderQuarterContent,s=o.locale,l=qF(r,s);return(i=a==null?void 0:a(r,l))!==null&&i!==void 0?i:l},n.renderMonths=function(){var r,i=n.props,o=i.showTwoColumnMonthYearPicker,a=i.showFourColumnMonthYearPicker,s=i.day,l=i.selected,c=(r=rg[v4(a,o)])===null||r===void 0?void 0:r.grid;return c==null?void 0:c.map(function(u,f){return k.createElement("div",{className:"react-datepicker__month-wrapper",key:f},u.map(function(d,h){return k.createElement("div",{ref:n.MONTH_REFS[d],key:h,onClick:function(m){n.onMonthClick(m,d)},onKeyDown:function(m){y4(m)&&(m.preventDefault(),m.key=de.Enter),n.onMonthKeyDown(m,d)},onMouseEnter:n.props.usePointerEvent?void 0:function(){return n.onMonthMouseEnter(d)},onPointerEnter:n.props.usePointerEvent?function(){return n.onMonthMouseEnter(d)}:void 0,tabIndex:Number(n.getTabIndex(d)),className:n.getMonthClassNames(d),"aria-disabled":n.isMonthDisabled(d),role:"option","aria-label":n.getAriaLabel(d),"aria-current":n.isCurrentMonth(s,d)?"date":void 0,"aria-selected":l?n.isSelectedMonth(s,d,l):void 0},n.getMonthContent(d))}))})},n.renderQuarters=function(){var r=n.props,i=r.day,o=r.selected,a=[1,2,3,4];return k.createElement("div",{className:"react-datepicker__quarter-wrapper"},a.map(function(s,l){return k.createElement("div",{key:l,ref:n.QUARTER_REFS[l],role:"option",onClick:function(c){n.onQuarterClick(c,s)},onKeyDown:function(c){n.onQuarterKeyDown(c,s)},onMouseEnter:n.props.usePointerEvent?void 0:function(){return n.onQuarterMouseEnter(s)},onPointerEnter:n.props.usePointerEvent?function(){return n.onQuarterMouseEnter(s)}:void 0,className:n.getQuarterClassNames(s),"aria-selected":o?n.isSelectedQuarter(i,s,o):void 0,tabIndex:Number(n.getQuarterTabIndex(s)),"aria-current":n.isCurrentQuarter(i,s)?"date":void 0},n.getQuarterContent(s))}))},n.getClassNames=function(){var r=n.props,i=r.selectingDate,o=r.selectsStart,a=r.selectsEnd,s=r.showMonthYearPicker,l=r.showQuarterYearPicker,c=r.showWeekPicker;return dn("react-datepicker__month",{"react-datepicker__month--selecting-range":i&&(o||a)},{"react-datepicker__monthPicker":s},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":c})},n}return e.prototype.getSelection=function(){var n=this.props,r=n.selected,i=n.selectedDates,o=n.selectsMultiple;if(o)return i;if(r)return[r]},e.prototype.render=function(){var n=this.props,r=n.showMonthYearPicker,i=n.showQuarterYearPicker,o=n.day,a=n.ariaLabelPrefix,s=a===void 0?"Month ":a,l=s?s.trim()+" ":"";return k.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(l).concat(Ct(o,"MMMM, yyyy",this.props.locale)),role:"listbox"},r?this.renderMonths():i?this.renderQuarters():this.renderWeeks())},e}(k.Component),uY=function(t){hn(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.isSelectedMonth=function(r){return n.props.month===r},n.renderOptions=function(){return n.props.monthNames.map(function(r,i){return k.createElement("div",{className:n.isSelectedMonth(i)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:r,onClick:n.onChange.bind(n,i),"aria-selected":n.isSelectedMonth(i)?"true":void 0},n.isSelectedMonth(i)?k.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",r)})},n.onChange=function(r){return n.props.onChange(r)},n.handleClickOutside=function(){return n.props.onCancel()},n}return e.prototype.render=function(){return k.createElement("div",{className:"react-datepicker__month-dropdown"},this.renderOptions())},e}(k.Component),fY=Cd(uY),dY=function(t){hn(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={dropdownVisible:!1},n.renderSelectOptions=function(r){return r.map(function(i,o){return k.createElement("option",{key:i,value:o},i)})},n.renderSelectMode=function(r){return k.createElement("select",{value:n.props.month,className:"react-datepicker__month-select",onChange:function(i){return n.onChange(parseInt(i.target.value))}},n.renderSelectOptions(r))},n.renderReadView=function(r,i){return k.createElement("div",{key:"read",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:n.toggleDropdown},k.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),k.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},i[n.props.month]))},n.renderDropdown=function(r){return k.createElement(fY,We({key:"dropdown"},n.props,{monthNames:r,onChange:n.onChange,onCancel:n.toggleDropdown}))},n.renderScrollMode=function(r){var i=n.state.dropdownVisible,o=[n.renderReadView(!i,r)];return i&&o.unshift(n.renderDropdown(r)),o},n.onChange=function(r){n.toggleDropdown(),r!==n.props.month&&n.props.onChange(r)},n.toggleDropdown=function(){return n.setState({dropdownVisible:!n.state.dropdownVisible})},n}return e.prototype.render=function(){var n=this,r=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(o){return n4(o,n.props.locale)}:function(o){return H0(o,n.props.locale)}),i;switch(this.props.dropdownMode){case"scroll":i=this.renderScrollMode(r);break;case"select":i=this.renderSelectMode(r);break}return k.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},i)},e}(k.Component);function hY(t,e){for(var n=[],r=ba(t),i=ba(e);!ga(r,i);)n.push(ct(r)),r=Oi(r,1);return n}var pY=function(t){hn(e,t);function e(n){var r=t.call(this,n)||this;return r.renderOptions=function(){return r.state.monthYearsList.map(function(i){var o=M0(i),a=Ni(r.props.date,i)&&qn(r.props.date,i);return k.createElement("div",{className:a?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:o,onClick:r.onChange.bind(r,o),"aria-selected":a?"true":void 0},a?k.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",Ct(i,r.props.dateFormat,r.props.locale))})},r.onChange=function(i){return r.props.onChange(i)},r.handleClickOutside=function(){r.props.onCancel()},r.state={monthYearsList:hY(r.props.minDate,r.props.maxDate)},r}return e.prototype.render=function(){var n=dn({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return k.createElement("div",{className:n},this.renderOptions())},e}(k.Component),mY=Cd(pY),gY=function(t){hn(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={dropdownVisible:!1},n.renderSelectOptions=function(){for(var r=ba(n.props.minDate),i=ba(n.props.maxDate),o=[];!ga(r,i);){var a=M0(r);o.push(k.createElement("option",{key:a,value:a},Ct(r,n.props.dateFormat,n.props.locale))),r=Oi(r,1)}return o},n.onSelectChange=function(r){n.onChange(parseInt(r.target.value))},n.renderSelectMode=function(){return k.createElement("select",{value:M0(ba(n.props.date)),className:"react-datepicker__month-year-select",onChange:n.onSelectChange},n.renderSelectOptions())},n.renderReadView=function(r){var i=Ct(n.props.date,n.props.dateFormat,n.props.locale);return k.createElement("div",{key:"read",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:n.toggleDropdown},k.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),k.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},i))},n.renderDropdown=function(){return k.createElement(mY,We({key:"dropdown"},n.props,{onChange:n.onChange,onCancel:n.toggleDropdown}))},n.renderScrollMode=function(){var r=n.state.dropdownVisible,i=[n.renderReadView(!r)];return r&&i.unshift(n.renderDropdown()),i},n.onChange=function(r){n.toggleDropdown();var i=ct(r);Ni(n.props.date,i)&&qn(n.props.date,i)||n.props.onChange(i)},n.toggleDropdown=function(){return n.setState({dropdownVisible:!n.state.dropdownVisible})},n}return e.prototype.render=function(){var n;switch(this.props.dropdownMode){case"scroll":n=this.renderScrollMode();break;case"select":n=this.renderSelectMode();break}return k.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},n)},e}(k.Component),OY=function(t){hn(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={height:null},n.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var r,i,o;n.list&&(n.list.scrollTop=(o=n.centerLi&&e.calcCenterPosition(n.props.monthRef?n.props.monthRef.clientHeight-((i=(r=n.header)===null||r===void 0?void 0:r.clientHeight)!==null&&i!==void 0?i:0):n.list.clientHeight,n.centerLi))!==null&&o!==void 0?o:0)})},n.handleClick=function(r){var i,o;(n.props.minTime||n.props.maxTime)&&a4(r,n.props)||(n.props.excludeTimes||n.props.includeTimes||n.props.filterTime)&&o4(r,n.props)||(o=(i=n.props).onChange)===null||o===void 0||o.call(i,r)},n.isSelectedTime=function(r){return n.props.selected&&rY(n.props.selected,r)},n.isDisabledTime=function(r){return(n.props.minTime||n.props.maxTime)&&a4(r,n.props)||(n.props.excludeTimes||n.props.includeTimes||n.props.filterTime)&&o4(r,n.props)},n.liClasses=function(r){var i,o=["react-datepicker__time-list-item",n.props.timeClassName?n.props.timeClassName(r):void 0];return n.isSelectedTime(r)&&o.push("react-datepicker__time-list-item--selected"),n.isDisabledTime(r)&&o.push("react-datepicker__time-list-item--disabled"),n.props.injectTimes&&(Mi(r)*3600+Qi(r)*60+To(r))%(((i=n.props.intervals)!==null&&i!==void 0?i:e.defaultProps.intervals)*60)!==0&&o.push("react-datepicker__time-list-item--injected"),o.join(" ")},n.handleOnKeyDown=function(r,i){var o,a;r.key===de.Space&&(r.preventDefault(),r.key=de.Enter),(r.key===de.ArrowUp||r.key===de.ArrowLeft)&&r.target instanceof HTMLElement&&r.target.previousSibling&&(r.preventDefault(),r.target.previousSibling instanceof HTMLElement&&r.target.previousSibling.focus()),(r.key===de.ArrowDown||r.key===de.ArrowRight)&&r.target instanceof HTMLElement&&r.target.nextSibling&&(r.preventDefault(),r.target.nextSibling instanceof HTMLElement&&r.target.nextSibling.focus()),r.key===de.Enter&&n.handleClick(i),(a=(o=n.props).handleOnKeyDown)===null||a===void 0||a.call(o,r)},n.renderTimes=function(){for(var r,i=[],o=n.props.format?n.props.format:"p",a=(r=n.props.intervals)!==null&&r!==void 0?r:e.defaultProps.intervals,s=n.props.selected||n.props.openToDate||ct(),l=Kd(s),c=n.props.injectTimes&&n.props.injectTimes.sort(function(p,O){return p.getTime()-O.getTime()}),u=60*nY(s),f=u/a,d=0;d<f;d++){var h=k0(l,d*a);if(i.push(h),c){var m=tY(l,h,d,a,c);i=i.concat(m)}}var g=i.reduce(function(p,O){return O.getTime()<=s.getTime()?O:p},i[0]);return i.map(function(p){return k.createElement("li",{key:p.valueOf(),onClick:n.handleClick.bind(n,p),className:n.liClasses(p),ref:function(O){p===g&&(n.centerLi=O)},onKeyDown:function(O){n.handleOnKeyDown(O,p)},tabIndex:p===g?0:-1,role:"option","aria-selected":n.isSelectedTime(p)?"true":void 0,"aria-disabled":n.isDisabledTime(p)?"true":void 0},Ct(p,o,n.props.locale))})},n}return Object.defineProperty(e,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time"}},enumerable:!1,configurable:!0}),e.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},e.prototype.render=function(){var n=this,r,i=this.state.height;return k.createElement("div",{className:"react-datepicker__time-container ".concat(((r=this.props.todayButton)!==null&&r!==void 0?r:e.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},k.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(this.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(o){n.header=o}},k.createElement("div",{className:"react-datepicker-time__header"},this.props.timeCaption)),k.createElement("div",{className:"react-datepicker__time"},k.createElement("div",{className:"react-datepicker__time-box"},k.createElement("ul",{className:"react-datepicker__time-list",ref:function(o){n.list=o},style:i?{height:i}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},e.calcCenterPosition=function(n,r){return r.offsetTop-(n/2-r.clientHeight/2)},e}(k.Component),b4=3,yY=function(t){hn(e,t);function e(n){var r=t.call(this,n)||this;return r.YEAR_REFS=ji([],Array(r.props.yearItemNumber),!0).map(function(){return k.createRef()}),r.isDisabled=function(i){return wa(i,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(i){return G0(i,{excludeDates:r.props.excludeDates})},r.selectingDate=function(){var i;return(i=r.props.selectingDate)!==null&&i!==void 0?i:r.props.preSelection},r.updateFocusOnPaginate=function(i){var o=function(){var a,s;(s=(a=r.YEAR_REFS[i])===null||a===void 0?void 0:a.current)===null||s===void 0||s.focus()};window.requestAnimationFrame(o)},r.handleYearClick=function(i,o){r.props.onDayClick&&r.props.onDayClick(i,o)},r.handleYearNavigation=function(i,o){var a,s,l,c,u=r.props,f=u.date,d=u.yearItemNumber;if(!(f===void 0||d===void 0)){var h=xa(f,d).startPeriod;r.isDisabled(o)||r.isExcluded(o)||((s=(a=r.props).setPreSelection)===null||s===void 0||s.call(a,o),i-h<0?r.updateFocusOnPaginate(d-(h-i)):i-h>=d?r.updateFocusOnPaginate(Math.abs(d-(i-h))):(c=(l=r.YEAR_REFS[i-h])===null||l===void 0?void 0:l.current)===null||c===void 0||c.focus())}},r.isSameDay=function(i,o){return Ve(i,o)},r.isCurrentYear=function(i){return i===Be(ct())},r.isRangeStart=function(i){return r.props.startDate&&r.props.endDate&&Ni(Li(ct(),i),r.props.startDate)},r.isRangeEnd=function(i){return r.props.startDate&&r.props.endDate&&Ni(Li(ct(),i),r.props.endDate)},r.isInRange=function(i){return eg(i,r.props.startDate,r.props.endDate)},r.isInSelectingRange=function(i){var o=r.props,a=o.selectsStart,s=o.selectsEnd,l=o.selectsRange,c=o.startDate,u=o.endDate;return!(a||s||l)||!r.selectingDate()?!1:a&&u?eg(i,r.selectingDate(),u):s&&c||l&&c&&!u?eg(i,c,r.selectingDate()):!1},r.isSelectingRangeStart=function(i){var o;if(!r.isInSelectingRange(i))return!1;var a=r.props,s=a.startDate,l=a.selectsStart,c=Li(ct(),i);return l?Ni(c,(o=r.selectingDate())!==null&&o!==void 0?o:null):Ni(c,s??null)},r.isSelectingRangeEnd=function(i){var o;if(!r.isInSelectingRange(i))return!1;var a=r.props,s=a.endDate,l=a.selectsEnd,c=a.selectsRange,u=Li(ct(),i);return l||c?Ni(u,(o=r.selectingDate())!==null&&o!==void 0?o:null):Ni(u,s??null)},r.isKeyboardSelected=function(i){if(!(r.props.date===void 0||r.props.selected==null||r.props.preSelection==null)){var o=r.props,a=o.minDate,s=o.maxDate,l=o.excludeDates,c=o.includeDates,u=o.filterDate,f=eu(Li(r.props.date,i)),d=(a||s||l||c||u)&&tg(i,r.props);return!r.props.disabledKeyboardNavigation&&!r.props.inline&&!Ve(f,eu(r.props.selected))&&Ve(f,eu(r.props.preSelection))&&!d}},r.onYearClick=function(i,o){var a=r.props.date;a!==void 0&&r.handleYearClick(eu(Li(a,o)),i)},r.onYearKeyDown=function(i,o){var a,s,l=i.key,c=r.props,u=c.date,f=c.yearItemNumber,d=c.handleOnKeyDown;if(l!==de.Tab&&i.preventDefault(),!r.props.disabledKeyboardNavigation)switch(l){case de.Enter:if(r.props.selected==null)break;r.onYearClick(i,o),(s=(a=r.props).setPreSelection)===null||s===void 0||s.call(a,r.props.selected);break;case de.ArrowRight:if(r.props.preSelection==null)break;r.handleYearNavigation(o+1,Co(r.props.preSelection,1));break;case de.ArrowLeft:if(r.props.preSelection==null)break;r.handleYearNavigation(o-1,Ol(r.props.preSelection,1));break;case de.ArrowUp:{if(u===void 0||f===void 0||r.props.preSelection==null)break;var h=xa(u,f).startPeriod,m=b4,g=o-m;if(g<h){var p=f%m;o>=h&&o<h+p?m=p:m+=p,g=o-m}r.handleYearNavigation(g,Ol(r.props.preSelection,m));break}case de.ArrowDown:{if(u===void 0||f===void 0||r.props.preSelection==null)break;var O=xa(u,f).endPeriod,m=b4,g=o+m;if(g>O){var p=f%m;o<=O&&o>O-p?m=p:m+=p,g=o+m}r.handleYearNavigation(g,Co(r.props.preSelection,m));break}}d&&d(i)},r.getYearClassNames=function(i){var o=r.props,a=o.date,s=o.minDate,l=o.maxDate,c=o.selected,u=o.excludeDates,f=o.includeDates,d=o.filterDate,h=o.yearClassName;return dn("react-datepicker__year-text","react-datepicker__year-".concat(i),a?h==null?void 0:h(Li(a,i)):void 0,{"react-datepicker__year-text--selected":c?i===Be(c):void 0,"react-datepicker__year-text--disabled":(s||l||u||f||d)&&tg(i,r.props),"react-datepicker__year-text--keyboard-selected":r.isKeyboardSelected(i),"react-datepicker__year-text--range-start":r.isRangeStart(i),"react-datepicker__year-text--range-end":r.isRangeEnd(i),"react-datepicker__year-text--in-range":r.isInRange(i),"react-datepicker__year-text--in-selecting-range":r.isInSelectingRange(i),"react-datepicker__year-text--selecting-range-start":r.isSelectingRangeStart(i),"react-datepicker__year-text--selecting-range-end":r.isSelectingRangeEnd(i),"react-datepicker__year-text--today":r.isCurrentYear(i)})},r.getYearTabIndex=function(i){if(r.props.disabledKeyboardNavigation||r.props.preSelection==null)return"-1";var o=Be(r.props.preSelection);return i===o?"0":"-1"},r.getYearContainerClassNames=function(){var i=r.props,o=i.selectingDate,a=i.selectsStart,s=i.selectsEnd,l=i.selectsRange;return dn("react-datepicker__year",{"react-datepicker__year--selecting-range":o&&(a||s||l)})},r.getYearContent=function(i){return r.props.renderYearContent?r.props.renderYearContent(i):i},r}return e.prototype.render=function(){var n=this,r=[],i=this.props,o=i.date,a=i.yearItemNumber,s=i.onYearMouseEnter,l=i.onYearMouseLeave;if(o===void 0)return null;for(var c=xa(o,a),u=c.startPeriod,f=c.endPeriod,d=function(g){r.push(k.createElement("div",{ref:h.YEAR_REFS[g-u],onClick:function(p){n.onYearClick(p,g)},onKeyDown:function(p){y4(p)&&(p.preventDefault(),p.key=de.Enter),n.onYearKeyDown(p,g)},tabIndex:Number(h.getYearTabIndex(g)),className:h.getYearClassNames(g),onMouseEnter:h.props.usePointerEvent?void 0:function(p){return s(p,g)},onPointerEnter:h.props.usePointerEvent?function(p){return s(p,g)}:void 0,onMouseLeave:h.props.usePointerEvent?void 0:function(p){return l(p,g)},onPointerLeave:h.props.usePointerEvent?function(p){return l(p,g)}:void 0,key:g,"aria-current":h.isCurrentYear(g)?"date":void 0},h.getYearContent(g)))},h=this,m=u;m<=f;m++)d(m);return k.createElement("div",{className:this.getYearContainerClassNames()},k.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},r))},e}(k.Component);function vY(t,e,n,r){for(var i=[],o=0;o<2*e+1;o++){var a=t+e-o,s=!0;n&&(s=Be(n)<=a),r&&s&&(s=Be(r)>=a),s&&i.push(a)}return i}var bY=function(t){hn(e,t);function e(n){var r=t.call(this,n)||this;r.renderOptions=function(){var s=r.props.year,l=r.state.yearsList.map(function(f){return k.createElement("div",{className:s===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:r.onChange.bind(r,f),"aria-selected":s===f?"true":void 0},s===f?k.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",f)}),c=r.props.minDate?Be(r.props.minDate):null,u=r.props.maxDate?Be(r.props.maxDate):null;return(!u||!r.state.yearsList.find(function(f){return f===u}))&&l.unshift(k.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:r.incrementYears},k.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!c||!r.state.yearsList.find(function(f){return f===c}))&&l.push(k.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:r.decrementYears},k.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),l},r.onChange=function(s){r.props.onChange(s)},r.handleClickOutside=function(){r.props.onCancel()},r.shiftYears=function(s){var l=r.state.yearsList.map(function(c){return c+s});r.setState({yearsList:l})},r.incrementYears=function(){return r.shiftYears(1)},r.decrementYears=function(){return r.shiftYears(-1)};var i=n.yearDropdownItemNumber,o=n.scrollableYearDropdown,a=i||(o?10:5);return r.state={yearsList:vY(r.props.year,a,r.props.minDate,r.props.maxDate)},r.dropdownRef=k.createRef(),r}return e.prototype.componentDidMount=function(){var n=this.dropdownRef.current;if(n){var r=n.children?Array.from(n.children):null,i=r?r.find(function(o){return o.ariaSelected}):null;n.scrollTop=i&&i instanceof HTMLElement?i.offsetTop+(i.clientHeight-n.clientHeight)/2:(n.scrollHeight-n.clientHeight)/2}},e.prototype.render=function(){var n=dn({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return k.createElement("div",{className:n,ref:this.dropdownRef},this.renderOptions())},e}(k.Component),wY=Cd(bY),xY=function(t){hn(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={dropdownVisible:!1},n.renderSelectOptions=function(){for(var r=n.props.minDate?Be(n.props.minDate):1900,i=n.props.maxDate?Be(n.props.maxDate):2100,o=[],a=r;a<=i;a++)o.push(k.createElement("option",{key:a,value:a},a));return o},n.onSelectChange=function(r){n.onChange(parseInt(r.target.value))},n.renderSelectMode=function(){return k.createElement("select",{value:n.props.year,className:"react-datepicker__year-select",onChange:n.onSelectChange},n.renderSelectOptions())},n.renderReadView=function(r){return k.createElement("div",{key:"read",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(i){return n.toggleDropdown(i)}},k.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),k.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},n.props.year))},n.renderDropdown=function(){return k.createElement(wY,We({key:"dropdown"},n.props,{onChange:n.onChange,onCancel:n.toggleDropdown}))},n.renderScrollMode=function(){var r=n.state.dropdownVisible,i=[n.renderReadView(!r)];return r&&i.unshift(n.renderDropdown()),i},n.onChange=function(r){n.toggleDropdown(),r!==n.props.year&&n.props.onChange(r)},n.toggleDropdown=function(r){n.setState({dropdownVisible:!n.state.dropdownVisible},function(){n.props.adjustDateOnChange&&n.handleYearChange(n.props.date,r)})},n.handleYearChange=function(r,i){n.onSelect(r,i),n.setOpen()},n.onSelect=function(r,i){n.props.onSelect&&n.props.onSelect(r,i)},n.setOpen=function(){n.props.setOpen&&n.props.setOpen(!0)},n}return e.prototype.render=function(){var n;switch(this.props.dropdownMode){case"scroll":n=this.renderScrollMode();break;case"select":n=this.renderSelectMode();break}return k.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},n)},e}(k.Component),_Y=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],SY=function(t){var e=(t.className||"").split(/\s+/);return _Y.some(function(n){return e.indexOf(n)>=0})},kY=function(t){hn(e,t);function e(n){var r=t.call(this,n)||this;return r.monthContainer=void 0,r.handleClickOutside=function(i){r.props.onClickOutside(i)},r.setClickOutsideRef=function(){return r.containerRef.current},r.handleDropdownFocus=function(i){var o,a;SY(i.target)&&((a=(o=r.props).onDropdownFocus)===null||a===void 0||a.call(o,i))},r.getDateInView=function(){var i=r.props,o=i.preSelection,a=i.selected,s=i.openToDate,l=f4(r.props),c=d4(r.props),u=ct(),f=s||a||o;return f||(l&&hs(u,l)?l:c&&ga(u,c)?c:u)},r.increaseMonth=function(){r.setState(function(i){var o=i.date;return{date:Oi(o,1)}},function(){return r.handleMonthChange(r.state.date)})},r.decreaseMonth=function(){r.setState(function(i){var o=i.date;return{date:gl(o,1)}},function(){return r.handleMonthChange(r.state.date)})},r.handleDayClick=function(i,o,a){r.props.onSelect(i,o,a),r.props.setPreSelection&&r.props.setPreSelection(i)},r.handleDayMouseEnter=function(i){r.setState({selectingDate:i}),r.props.onDayMouseEnter&&r.props.onDayMouseEnter(i)},r.handleMonthMouseLeave=function(){r.setState({selectingDate:void 0}),r.props.onMonthMouseLeave&&r.props.onMonthMouseLeave()},r.handleYearMouseEnter=function(i,o){r.setState({selectingDate:Li(ct(),o)}),r.props.onYearMouseEnter&&r.props.onYearMouseEnter(i,o)},r.handleYearMouseLeave=function(i,o){r.props.onYearMouseLeave&&r.props.onYearMouseLeave(i,o)},r.handleYearChange=function(i){r.props.onYearChange&&(r.props.onYearChange(i),r.setState({isRenderAriaLiveMessage:!0})),r.props.adjustDateOnChange&&(r.props.onSelect&&r.props.onSelect(i),r.props.setOpen&&r.props.setOpen(!0)),r.props.setPreSelection&&r.props.setPreSelection(i)},r.handleMonthChange=function(i){r.handleCustomMonthChange(i),r.props.adjustDateOnChange&&(r.props.onSelect&&r.props.onSelect(i),r.props.setOpen&&r.props.setOpen(!0)),r.props.setPreSelection&&r.props.setPreSelection(i)},r.handleCustomMonthChange=function(i){r.props.onMonthChange&&(r.props.onMonthChange(i),r.setState({isRenderAriaLiveMessage:!0}))},r.handleMonthYearChange=function(i){r.handleYearChange(i),r.handleMonthChange(i)},r.changeYear=function(i){r.setState(function(o){var a=o.date;return{date:Li(a,Number(i))}},function(){return r.handleYearChange(r.state.date)})},r.changeMonth=function(i){r.setState(function(o){var a=o.date;return{date:pr(a,Number(i))}},function(){return r.handleMonthChange(r.state.date)})},r.changeMonthYear=function(i){r.setState(function(o){var a=o.date;return{date:Li(pr(a,Yn(i)),Be(i))}},function(){return r.handleMonthYearChange(r.state.date)})},r.header=function(i){i===void 0&&(i=r.state.date);var o=va(i,r.props.locale,r.props.calendarStartDay),a=[];return r.props.showWeekNumbers&&a.push(k.createElement("div",{key:"W",className:"react-datepicker__day-name"},r.props.weekLabel||"#")),a.concat([0,1,2,3,4,5,6].map(function(s){var l=pa(o,s),c=r.formatWeekday(l,r.props.locale),u=r.props.weekDayClassName?r.props.weekDayClassName(l):void 0;return k.createElement("div",{key:s,"aria-label":Ct(l,"EEEE",r.props.locale),className:dn("react-datepicker__day-name",u)},c)}))},r.formatWeekday=function(i,o){return r.props.formatWeekDay?VF(i,r.props.formatWeekDay,o):r.props.useWeekdaysShort?YF(i,o):FF(i,o)},r.decreaseYear=function(){r.setState(function(i){var o,a=i.date;return{date:Ol(a,r.props.showYearPicker?(o=r.props.yearItemNumber)!==null&&o!==void 0?o:e.defaultProps.yearItemNumber:1)}},function(){return r.handleYearChange(r.state.date)})},r.clearSelectingDate=function(){r.setState({selectingDate:void 0})},r.renderPreviousButton=function(){var i;if(!r.props.renderCustomHeader){var o;switch(!0){case r.props.showMonthYearPicker:o=c4(r.state.date,r.props);break;case r.props.showYearPicker:o=GF(r.state.date,r.props);break;case r.props.showQuarterYearPicker:o=UF(r.state.date,r.props);break;default:o=s4(r.state.date,r.props);break}if(!(!((i=r.props.forceShowMonthNavigation)!==null&&i!==void 0?i:e.defaultProps.forceShowMonthNavigation)&&!r.props.showDisabledMonthNavigation&&o||r.props.showTimeSelectOnly)){var a=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],s=["react-datepicker__navigation","react-datepicker__navigation--previous"],l=r.decreaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(l=r.decreaseYear),o&&r.props.showDisabledMonthNavigation&&(s.push("react-datepicker__navigation--previous--disabled"),l=void 0);var c=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,u=r.props,f=u.previousMonthButtonLabel,d=f===void 0?e.defaultProps.previousMonthButtonLabel:f,h=u.previousYearButtonLabel,m=h===void 0?e.defaultProps.previousYearButtonLabel:h,g=r.props,p=g.previousMonthAriaLabel,O=p===void 0?typeof d=="string"?d:"Previous Month":p,w=g.previousYearAriaLabel,v=w===void 0?typeof m=="string"?m:"Previous Year":w;return k.createElement("button",{type:"button",className:s.join(" "),onClick:l,onKeyDown:r.props.handleOnKeyDown,"aria-label":c?v:O},k.createElement("span",{className:a.join(" ")},c?m:d))}}},r.increaseYear=function(){r.setState(function(i){var o,a=i.date;return{date:Co(a,r.props.showYearPicker?(o=r.props.yearItemNumber)!==null&&o!==void 0?o:e.defaultProps.yearItemNumber:1)}},function(){return r.handleYearChange(r.state.date)})},r.renderNextButton=function(){var i;if(!r.props.renderCustomHeader){var o;switch(!0){case r.props.showMonthYearPicker:o=u4(r.state.date,r.props);break;case r.props.showYearPicker:o=KF(r.state.date,r.props);break;case r.props.showQuarterYearPicker:o=HF(r.state.date,r.props);break;default:o=l4(r.state.date,r.props);break}if(!(!((i=r.props.forceShowMonthNavigation)!==null&&i!==void 0?i:e.defaultProps.forceShowMonthNavigation)&&!r.props.showDisabledMonthNavigation&&o||r.props.showTimeSelectOnly)){var a=["react-datepicker__navigation","react-datepicker__navigation--next"],s=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];r.props.showTimeSelect&&a.push("react-datepicker__navigation--next--with-time"),r.props.todayButton&&a.push("react-datepicker__navigation--next--with-today-button");var l=r.increaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(l=r.increaseYear),o&&r.props.showDisabledMonthNavigation&&(a.push("react-datepicker__navigation--next--disabled"),l=void 0);var c=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,u=r.props,f=u.nextMonthButtonLabel,d=f===void 0?e.defaultProps.nextMonthButtonLabel:f,h=u.nextYearButtonLabel,m=h===void 0?e.defaultProps.nextYearButtonLabel:h,g=r.props,p=g.nextMonthAriaLabel,O=p===void 0?typeof d=="string"?d:"Next Month":p,w=g.nextYearAriaLabel,v=w===void 0?typeof m=="string"?m:"Next Year":w;return k.createElement("button",{type:"button",className:a.join(" "),onClick:l,onKeyDown:r.props.handleOnKeyDown,"aria-label":c?v:O},k.createElement("span",{className:s.join(" ")},c?m:d))}}},r.renderCurrentMonth=function(i){i===void 0&&(i=r.state.date);var o=["react-datepicker__current-month"];return r.props.showYearDropdown&&o.push("react-datepicker__current-month--hasYearDropdown"),r.props.showMonthDropdown&&o.push("react-datepicker__current-month--hasMonthDropdown"),r.props.showMonthYearDropdown&&o.push("react-datepicker__current-month--hasMonthYearDropdown"),k.createElement("h2",{className:o.join(" ")},Ct(i,r.props.dateFormat,r.props.locale))},r.renderYearDropdown=function(i){if(i===void 0&&(i=!1),!(!r.props.showYearDropdown||i))return k.createElement(xY,We({},e.defaultProps,r.props,{date:r.state.date,onChange:r.changeYear,year:Be(r.state.date)}))},r.renderMonthDropdown=function(i){if(i===void 0&&(i=!1),!(!r.props.showMonthDropdown||i))return k.createElement(dY,We({},e.defaultProps,r.props,{month:Yn(r.state.date),onChange:r.changeMonth}))},r.renderMonthYearDropdown=function(i){if(i===void 0&&(i=!1),!(!r.props.showMonthYearDropdown||i))return k.createElement(gY,We({},e.defaultProps,r.props,{date:r.state.date,onChange:r.changeMonthYear}))},r.handleTodayButtonClick=function(i){r.props.onSelect(e4(),i),r.props.setPreSelection&&r.props.setPreSelection(e4())},r.renderTodayButton=function(){if(!(!r.props.todayButton||r.props.showTimeSelectOnly))return k.createElement("div",{className:"react-datepicker__today-button",onClick:r.handleTodayButtonClick},r.props.todayButton)},r.renderDefaultHeader=function(i){var o=i.monthDate,a=i.i;return k.createElement("div",{className:"react-datepicker__header ".concat(r.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},r.renderCurrentMonth(o),k.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(r.props.dropdownMode),onFocus:r.handleDropdownFocus},r.renderMonthDropdown(a!==0),r.renderMonthYearDropdown(a!==0),r.renderYearDropdown(a!==0)),k.createElement("div",{className:"react-datepicker__day-names"},r.header(o)))},r.renderCustomHeader=function(i){var o,a,s=i.monthDate,l=i.i;if(r.props.showTimeSelect&&!r.state.monthContainer||r.props.showTimeSelectOnly)return null;var c=s4(r.state.date,r.props),u=l4(r.state.date,r.props),f=c4(r.state.date,r.props),d=u4(r.state.date,r.props),h=!r.props.showMonthYearPicker&&!r.props.showQuarterYearPicker&&!r.props.showYearPicker;return k.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:r.props.onDropdownFocus},(a=(o=r.props).renderCustomHeader)===null||a===void 0?void 0:a.call(o,We(We({},r.state),{customHeaderCount:l,monthDate:s,changeMonth:r.changeMonth,changeYear:r.changeYear,decreaseMonth:r.decreaseMonth,increaseMonth:r.increaseMonth,decreaseYear:r.decreaseYear,increaseYear:r.increaseYear,prevMonthButtonDisabled:c,nextMonthButtonDisabled:u,prevYearButtonDisabled:f,nextYearButtonDisabled:d})),h&&k.createElement("div",{className:"react-datepicker__day-names"},r.header(s)))},r.renderYearHeader=function(i){var o=i.monthDate,a=r.props,s=a.showYearPicker,l=a.yearItemNumber,c=l===void 0?e.defaultProps.yearItemNumber:l,u=xa(o,c),f=u.startPeriod,d=u.endPeriod;return k.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(f," - ").concat(d):Be(o))},r.renderHeader=function(i){var o=i.monthDate,a=i.i,s=a===void 0?0:a,l={monthDate:o,i:s};switch(!0){case r.props.renderCustomHeader!==void 0:return r.renderCustomHeader(l);case(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker):return r.renderYearHeader(l);default:return r.renderDefaultHeader(l)}},r.renderMonths=function(){var i,o;if(!(r.props.showTimeSelectOnly||r.props.showYearPicker)){for(var a=[],s=(i=r.props.monthsShown)!==null&&i!==void 0?i:e.defaultProps.monthsShown,l=r.props.showPreviousMonths?s-1:0,c=r.props.showMonthYearPicker||r.props.showQuarterYearPicker?Co(r.state.date,l):gl(r.state.date,l),u=(o=r.props.monthSelectedIn)!==null&&o!==void 0?o:l,f=0;f<s;++f){var d=f-u+l,h=r.props.showMonthYearPicker||r.props.showQuarterYearPicker?Co(c,d):Oi(c,d),m="month-".concat(f),g=f<s-1,p=f>0;a.push(k.createElement("div",{key:m,ref:function(O){r.monthContainer=O??void 0},className:"react-datepicker__month-container"},r.renderHeader({monthDate:h,i:f}),k.createElement(cY,We({},e.defaultProps,r.props,{ariaLabelPrefix:r.props.monthAriaLabelPrefix,day:h,onDayClick:r.handleDayClick,handleOnKeyDown:r.props.handleOnDayKeyDown,handleOnMonthKeyDown:r.props.handleOnKeyDown,onDayMouseEnter:r.handleDayMouseEnter,onMouseLeave:r.handleMonthMouseLeave,orderInDisplay:f,selectingDate:r.state.selectingDate,monthShowsDuplicateDaysEnd:g,monthShowsDuplicateDaysStart:p}))))}return a}},r.renderYears=function(){if(!r.props.showTimeSelectOnly&&r.props.showYearPicker)return k.createElement("div",{className:"react-datepicker__year--container"},r.renderHeader({monthDate:r.state.date}),k.createElement(yY,We({},e.defaultProps,r.props,{selectingDate:r.state.selectingDate,date:r.state.date,onDayClick:r.handleDayClick,clearSelectingDate:r.clearSelectingDate,onYearMouseEnter:r.handleYearMouseEnter,onYearMouseLeave:r.handleYearMouseLeave})))},r.renderTimeSection=function(){if(r.props.showTimeSelect&&(r.state.monthContainer||r.props.showTimeSelectOnly))return k.createElement(OY,We({},e.defaultProps,r.props,{onChange:r.props.onTimeChange,format:r.props.timeFormat,intervals:r.props.timeIntervals,monthRef:r.state.monthContainer}))},r.renderInputTimeSection=function(){var i=r.props.selected?new Date(r.props.selected):void 0,o=i&&Mo(i)&&!!r.props.selected,a=o?"".concat(p4(i.getHours()),":").concat(p4(i.getMinutes())):"";if(r.props.showTimeInput)return k.createElement(iY,We({},e.defaultProps,r.props,{date:i,timeString:a,onChange:r.props.onTimeChange}))},r.renderAriaLiveRegion=function(){var i,o=xa(r.state.date,(i=r.props.yearItemNumber)!==null&&i!==void 0?i:e.defaultProps.yearItemNumber),a=o.startPeriod,s=o.endPeriod,l;return r.props.showYearPicker?l="".concat(a," - ").concat(s):r.props.showMonthYearPicker||r.props.showQuarterYearPicker?l=Be(r.state.date):l="".concat(H0(Yn(r.state.date),r.props.locale)," ").concat(Be(r.state.date)),k.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},r.state.isRenderAriaLiveMessage&&l)},r.renderChildren=function(){if(r.props.children)return k.createElement("div",{className:"react-datepicker__children-container"},r.props.children)},r.containerRef=k.createRef(),r.state={date:r.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},r}return Object.defineProperty(e,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:Jc}},enumerable:!1,configurable:!0}),e.prototype.componentDidMount=function(){var n=this;this.props.showTimeSelect&&(this.assignMonthContainer=function(){n.setState({monthContainer:n.monthContainer})}())},e.prototype.componentDidUpdate=function(n){var r=this;if(this.props.preSelection&&(!Ve(this.props.preSelection,n.preSelection)||this.props.monthSelectedIn!==n.monthSelectedIn)){var i=!qn(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return i&&r.handleCustomMonthChange(r.state.date)})}else this.props.openToDate&&!Ve(this.props.openToDate,n.openToDate)&&this.setState({date:this.props.openToDate})},e.prototype.render=function(){var n=this.props.container||IF;return k.createElement("div",{style:{display:"contents"},ref:this.containerRef},k.createElement(n,{className:dn("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))},e}(k.Component),CY=function(t){var e=t.icon,n=t.className,r=n===void 0?"":n,i=t.onClick,o="react-datepicker__calendar-icon";return typeof e=="string"?k.createElement("i",{className:"".concat(o," ").concat(e," ").concat(r),"aria-hidden":"true",onClick:i}):k.isValidElement(e)?k.cloneElement(e,{className:"".concat(e.props.className||""," ").concat(o," ").concat(r),onClick:function(a){typeof e.props.onClick=="function"&&e.props.onClick(a),typeof i=="function"&&i(a)}}):k.createElement("svg",{className:"".concat(o," ").concat(r),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:i},k.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},w4=function(t){hn(e,t);function e(n){var r=t.call(this,n)||this;return r.portalRoot=null,r.el=document.createElement("div"),r}return e.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},e.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},e.prototype.render=function(){return Rr.createPortal(this.props.children,this.el)},e}(k.Component),PY="[tabindex], a, button, input, select, textarea",EY=function(t){return(t instanceof HTMLAnchorElement||!t.disabled)&&t.tabIndex!==-1},x4=function(t){hn(e,t);function e(n){var r=t.call(this,n)||this;return r.getTabChildren=function(){var i;return Array.prototype.slice.call((i=r.tabLoopRef.current)===null||i===void 0?void 0:i.querySelectorAll(PY),1,-1).filter(EY)},r.handleFocusStart=function(){var i=r.getTabChildren();i&&i.length>1&&i[i.length-1].focus()},r.handleFocusEnd=function(){var i=r.getTabChildren();i&&i.length>1&&i[0].focus()},r.tabLoopRef=k.createRef(),r}return e.prototype.render=function(){var n;return((n=this.props.enableTabLoop)!==null&&n!==void 0?n:e.defaultProps.enableTabLoop)?k.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},k.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,k.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},e.defaultProps={enableTabLoop:!0},e}(k.Component);function TY(t){var e=function(n){var r,i=typeof n.hidePopper=="boolean"?n.hidePopper:!0,o=k.useRef(null),a=LF(We({open:!i,whileElementsMounted:V9,placement:n.popperPlacement,middleware:ji([bF({padding:15}),vF(10),wF({element:o})],(r=n.popperModifiers)!==null&&r!==void 0?r:[],!0)},n.popperProps)),s=We(We({},n),{hidePopper:i,popperProps:We(We({},a),{arrowRef:o})});return k.createElement(t,We({},s))};return e}var AY=function(t){hn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e,"defaultProps",{get:function(){return{hidePopper:!0}},enumerable:!1,configurable:!0}),e.prototype.render=function(){var n=this.props,r=n.className,i=n.wrapperClassName,o=n.hidePopper,a=o===void 0?e.defaultProps.hidePopper:o,s=n.popperComponent,l=n.targetComponent,c=n.enableTabLoop,u=n.popperOnKeyDown,f=n.portalId,d=n.portalHost,h=n.popperProps,m=n.showArrow,g=void 0;if(!a){var p=dn("react-datepicker-popper",r);g=k.createElement(x4,{enableTabLoop:c},k.createElement("div",{ref:h.refs.setFloating,style:h.floatingStyles,className:p,"data-placement":h.placement,onKeyDown:u},s,m&&k.createElement(EF,{ref:h.arrowRef,context:h.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}this.props.popperContainer&&(g=k.createElement(this.props.popperContainer,{},g)),f&&!a&&(g=k.createElement(w4,{portalId:f,portalHost:d},g));var O=dn("react-datepicker-wrapper",i);return k.createElement(k.Fragment,null,k.createElement("div",{ref:h.refs.setReference,className:O},l),g)},e}(k.Component),MY=TY(AY),_4="react-datepicker-ignore-onclickoutside",QY=Cd(kY);function DY(t,e){return t&&e?Yn(t)!==Yn(e)||Be(t)!==Be(e):t!==e}var ig="Date input not valid.";(function(t){hn(e,t);function e(n){var r=t.call(this,n)||this;return r.calendar=null,r.input=null,r.getPreSelection=function(){return r.props.openToDate?r.props.openToDate:r.props.selectsEnd&&r.props.startDate?r.props.startDate:r.props.selectsStart&&r.props.endDate?r.props.endDate:ct()},r.modifyHolidays=function(){var i;return(i=r.props.holidays)===null||i===void 0?void 0:i.reduce(function(o,a){var s=new Date(a.date);return Mo(s)?ji(ji([],o,!0),[We(We({},a),{date:s})],!1):o},[])},r.calcInitialState=function(){var i,o=r.getPreSelection(),a=f4(r.props),s=d4(r.props),l=a&&hs(o,Kd(a))?a:s&&ga(o,t4(s))?s:o;return{open:r.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(i=r.props.selectsRange?r.props.startDate:r.props.selected)!==null&&i!==void 0?i:l,highlightDates:h4(r.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},r.resetHiddenStatus=function(){r.setState(We(We({},r.state),{wasHidden:!1}))},r.setHiddenStatus=function(){r.setState(We(We({},r.state),{wasHidden:!0}))},r.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&r.setHiddenStatus()},r.clearPreventFocusTimeout=function(){r.preventFocusTimeout&&clearTimeout(r.preventFocusTimeout)},r.setFocus=function(){r.input&&r.input.focus&&r.input.focus({preventScroll:!0})},r.setBlur=function(){r.input&&r.input.blur&&r.input.blur(),r.cancelFocusInput()},r.setOpen=function(i,o){o===void 0&&(o=!1),r.setState({open:i,preSelection:i&&r.state.open?r.state.preSelection:r.calcInitialState().preSelection,lastPreSelectChange:og},function(){i||r.setState(function(a){return{focused:o?a.focused:!1}},function(){!o&&r.setBlur(),r.setState({inputValue:null})})})},r.inputOk=function(){return Eo(r.state.preSelection)},r.isCalendarOpen=function(){return r.props.open===void 0?r.state.open&&!r.props.disabled&&!r.props.readOnly:r.props.open},r.handleFocus=function(i){var o,a,s=r.state.wasHidden,l=s?r.state.open:!0;s&&r.resetHiddenStatus(),!r.state.preventFocus&&l&&((a=(o=r.props).onFocus)===null||a===void 0||a.call(o,i),!r.props.preventOpenOnFocus&&!r.props.readOnly&&r.setOpen(!0)),r.setState({focused:!0})},r.sendFocusBackToInput=function(){r.preventFocusTimeout&&r.clearPreventFocusTimeout(),r.setState({preventFocus:!0},function(){r.preventFocusTimeout=setTimeout(function(){r.setFocus(),r.setState({preventFocus:!1})})})},r.cancelFocusInput=function(){clearTimeout(r.inputFocusTimeout),r.inputFocusTimeout=void 0},r.deferFocusInput=function(){r.cancelFocusInput(),r.inputFocusTimeout=setTimeout(function(){return r.setFocus()},1)},r.handleDropdownFocus=function(){r.cancelFocusInput()},r.handleBlur=function(i){var o,a;(!r.state.open||r.props.withPortal||r.props.showTimeInput)&&((a=(o=r.props).onBlur)===null||a===void 0||a.call(o,i)),r.setState({focused:!1})},r.handleCalendarClickOutside=function(i){var o,a;r.props.inline||r.setOpen(!1),(a=(o=r.props).onClickOutside)===null||a===void 0||a.call(o,i),r.props.withPortal&&i.preventDefault()},r.handleChange=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var a=i[0];if(!(r.props.onChangeRaw&&(r.props.onChangeRaw.apply(r,i),!a||typeof a.isDefaultPrevented!="function"||a.isDefaultPrevented()))){r.setState({inputValue:(a==null?void 0:a.target)instanceof HTMLInputElement?a.target.value:null,lastPreSelectChange:$Y});var s=r.props,l=s.dateFormat,c=l===void 0?e.defaultProps.dateFormat:l,u=s.strictParsing,f=u===void 0?e.defaultProps.strictParsing:u,d=NF((a==null?void 0:a.target)instanceof HTMLInputElement?a.target.value:"",c,r.props.locale,f,r.props.minDate);r.props.showTimeSelectOnly&&r.props.selected&&d&&!Ve(d,r.props.selected)&&(d=QV(r.props.selected,{hours:Mi(d),minutes:Qi(d),seconds:To(d)})),(d||!((a==null?void 0:a.target)instanceof HTMLInputElement)||!(a!=null&&a.target.value))&&r.setSelected(d,a,!0)}},r.handleSelect=function(i,o,a){if(r.props.shouldCloseOnSelect&&!r.props.showTimeSelect&&r.sendFocusBackToInput(),r.props.onChangeRaw&&r.props.onChangeRaw(o),r.setSelected(i,o,!1,a),r.props.showDateSelect&&r.setState({isRenderAriaLiveMessage:!0}),!r.props.shouldCloseOnSelect||r.props.showTimeSelect)r.setPreSelection(i);else if(!r.props.inline){r.props.selectsRange||r.setOpen(!1);var s=r.props,l=s.startDate,c=s.endDate;l&&!c&&(r.props.swapRange||!O4(i,l))&&r.setOpen(!1)}},r.setSelected=function(i,o,a,s){var l,c=i;if(r.props.showYearPicker){if(c!==null&&tg(Be(c),r.props))return}else if(r.props.showMonthYearPicker){if(c!==null&&r4(c,r.props))return}else if(c!==null&&wa(c,r.props))return;var u=r.props,f=u.onChange,d=u.selectsRange,h=u.startDate,m=u.endDate,g=u.selectsMultiple,p=u.selectedDates,O=u.minTime,w=u.swapRange;if(!ms(r.props.selected,c)||r.props.allowSameDay||d||g)if(c!==null&&(r.props.selected&&(!a||!r.props.showTimeSelect&&!r.props.showTimeSelectOnly&&!r.props.showTimeInput)&&(c=U0(c,{hour:Mi(r.props.selected),minute:Qi(r.props.selected),second:To(r.props.selected)})),!a&&(r.props.showTimeSelect||r.props.showTimeSelectOnly)&&O&&(c=U0(c,{hour:O.getHours(),minute:O.getMinutes(),second:O.getSeconds()})),r.props.inline||r.setState({preSelection:c}),r.props.focusSelectedMonth||r.setState({monthSelectedIn:s})),d){var v=!h&&!m,b=h&&!m,y=h&&m;v?f?f([c,null],o):e.defaultProps.onChange:b&&(c===null?f?f([null,null],o):e.defaultProps.onChange:O4(c,h)?w?f?f([c,h],o):e.defaultProps.onChange:f?f([c,null],o):e.defaultProps.onChange:f?f([h,c],o):e.defaultProps.onChange),y&&(f?f([c,null],o):e.defaultProps.onChange)}else if(g){if(c!==null)if(!(p!=null&&p.length))f?f([c],o):e.defaultProps.onChange;else{var x=p.some(function(A){return Ve(A,c)});if(x){var _=p.filter(function(A){return!Ve(A,c)});f?f(_,o):e.defaultProps.onChange}else f?f(ji(ji([],p,!0),[c],!1),o):e.defaultProps.onChange}}else f?f(c,o):e.defaultProps.onChange;if(!a){var E=(l=r.props.onSelect)!==null&&l!==void 0?l:e.defaultProps.onSelect;E(c,o),r.setState({inputValue:null})}},r.setPreSelection=function(i){var o=Eo(r.props.minDate),a=Eo(r.props.maxDate),s=!0;if(i){var l=Kd(i);if(o&&a)s=eh(i,r.props.minDate,r.props.maxDate);else if(o){var c=Kd(r.props.minDate);s=ga(i,c)||ms(l,c)}else if(a){var u=t4(r.props.maxDate);s=hs(i,u)||ms(l,u)}}s&&r.setState({preSelection:i})},r.toggleCalendar=function(){r.setOpen(!r.state.open)},r.handleTimeChange=function(i){var o;if(!(r.props.selectsRange||r.props.selectsMultiple)){var a=r.props.selected?r.props.selected:r.getPreSelection(),s=r.props.selected?i:U0(a,{hour:Mi(i),minute:Qi(i)});r.setState({preSelection:s});var l=(o=r.props.onChange)!==null&&o!==void 0?o:e.defaultProps.onChange;l(s),r.props.shouldCloseOnSelect&&!r.props.showTimeInput&&(r.sendFocusBackToInput(),r.setOpen(!1)),r.props.showTimeInput&&r.setOpen(!0),(r.props.showTimeSelectOnly||r.props.showTimeSelect)&&r.setState({isRenderAriaLiveMessage:!0}),r.setState({inputValue:null})}},r.onInputClick=function(){var i,o;!r.props.disabled&&!r.props.readOnly&&r.setOpen(!0),(o=(i=r.props).onInputClick)===null||o===void 0||o.call(i)},r.onInputKeyDown=function(i){var o,a,s,l,c;(a=(o=r.props).onKeyDown)===null||a===void 0||a.call(o,i);var u=i.key;if(!r.state.open&&!r.props.inline&&!r.props.preventOpenOnFocus){(u===de.ArrowDown||u===de.ArrowUp||u===de.Enter)&&r.onInputClick();return}if(r.state.open){if(u===de.ArrowDown||u===de.ArrowUp){i.preventDefault();var f=r.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":r.props.showWeekPicker&&r.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':r.props.showFullMonthYearPicker||r.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',d=((s=r.calendar)===null||s===void 0?void 0:s.componentNode)instanceof Element&&r.calendar.componentNode.querySelector(f);d instanceof HTMLElement&&d.focus({preventScroll:!0});return}var h=ct(r.state.preSelection);u===de.Enter?(i.preventDefault(),r.inputOk()&&r.state.lastPreSelectChange===og?(r.handleSelect(h,i),!r.props.shouldCloseOnSelect&&r.setPreSelection(h)):r.setOpen(!1)):u===de.Escape?(i.preventDefault(),r.sendFocusBackToInput(),r.setOpen(!1)):u===de.Tab&&r.setOpen(!1),r.inputOk()||(c=(l=r.props).onInputError)===null||c===void 0||c.call(l,{code:1,msg:ig})}},r.onPortalKeyDown=function(i){var o=i.key;o===de.Escape&&(i.preventDefault(),r.setState({preventFocus:!0},function(){r.setOpen(!1),setTimeout(function(){r.setFocus(),r.setState({preventFocus:!1})})}))},r.onDayKeyDown=function(i){var o,a,s,l,c=r.props,u=c.minDate,f=c.maxDate,d=c.disabledKeyboardNavigation,h=c.showWeekPicker,m=c.shouldCloseOnSelect,g=c.locale,p=c.calendarStartDay,O=c.adjustDateOnChange,w=c.inline;if((a=(o=r.props).onKeyDown)===null||a===void 0||a.call(o,i),!d){var v=i.key,b=i.shiftKey,y=ct(r.state.preSelection),x=function(j,R){var B=R;switch(j){case de.ArrowRight:B=h?Td(R,1):pa(R,1);break;case de.ArrowLeft:B=h?T9(R,1):DV(R,1);break;case de.ArrowUp:B=T9(R,1);break;case de.ArrowDown:B=Td(R,1);break;case de.PageUp:B=b?Ol(R,1):gl(R,1);break;case de.PageDown:B=b?Co(R,1):Oi(R,1);break;case de.Home:B=va(R,g,p);break;case de.End:B=XF(R);break}return B},_=function(j,R){for(var B=40,X=j,V=!1,K=0,ne=x(j,R);!V;){if(K>=B){ne=R;break}u&&ne<u&&(X=de.ArrowRight,ne=wa(u,r.props)?x(X,ne):u),f&&ne>f&&(X=de.ArrowLeft,ne=wa(f,r.props)?x(X,ne):f),wa(ne,r.props)?((X===de.PageUp||X===de.Home)&&(X=de.ArrowRight),(X===de.PageDown||X===de.End)&&(X=de.ArrowLeft),ne=x(X,ne)):V=!0,K++}return ne};if(v===de.Enter){i.preventDefault(),r.handleSelect(y,i),!m&&r.setPreSelection(y);return}else if(v===de.Escape){i.preventDefault(),r.setOpen(!1),r.inputOk()||(l=(s=r.props).onInputError)===null||l===void 0||l.call(s,{code:1,msg:ig});return}var E=null;switch(v){case de.ArrowLeft:case de.ArrowRight:case de.ArrowUp:case de.ArrowDown:case de.PageUp:case de.PageDown:case de.Home:case de.End:E=_(v,y);break}if(!E){r.props.onInputError&&r.props.onInputError({code:1,msg:ig});return}if(i.preventDefault(),r.setState({lastPreSelectChange:og}),O&&r.setSelected(E),r.setPreSelection(E),w){var A=Yn(y),I=Yn(E),Q=Be(y),D=Be(E);A!==I||Q!==D?r.setState({shouldFocusDayInline:!0}):r.setState({shouldFocusDayInline:!1})}}},r.onPopperKeyDown=function(i){var o=i.key;o===de.Escape&&(i.preventDefault(),r.sendFocusBackToInput())},r.onClearClick=function(i){i&&i.preventDefault&&i.preventDefault(),r.sendFocusBackToInput();var o=r.props,a=o.selectsRange,s=o.onChange;a?s?s([null,null],i):e.defaultProps.onChange():s?s(null,i):e.defaultProps.onChange(),r.setState({inputValue:null})},r.clear=function(){r.onClearClick()},r.onScroll=function(i){typeof r.props.closeOnScroll=="boolean"&&r.props.closeOnScroll?(i.target===document||i.target===document.documentElement||i.target===document.body)&&r.setOpen(!1):typeof r.props.closeOnScroll=="function"&&r.props.closeOnScroll(i)&&r.setOpen(!1)},r.renderCalendar=function(){var i,o;return!r.props.inline&&!r.isCalendarOpen()?null:k.createElement(QY,We({ref:function(a){r.calendar=a}},r.props,r.state,{setOpen:r.setOpen,dateFormat:(i=r.props.dateFormatCalendar)!==null&&i!==void 0?i:e.defaultProps.dateFormatCalendar,onSelect:r.handleSelect,onClickOutside:r.handleCalendarClickOutside,holidays:eY(r.modifyHolidays()),outsideClickIgnoreClass:_4,onDropdownFocus:r.handleDropdownFocus,onTimeChange:r.handleTimeChange,className:r.props.calendarClassName,container:r.props.calendarContainer,handleOnKeyDown:r.props.onKeyDown,handleOnDayKeyDown:r.onDayKeyDown,setPreSelection:r.setPreSelection,dropdownMode:(o=r.props.dropdownMode)!==null&&o!==void 0?o:e.defaultProps.dropdownMode}),r.props.children)},r.renderAriaLiveRegion=function(){var i=r.props,o=i.dateFormat,a=o===void 0?e.defaultProps.dateFormat:o,s=i.locale,l=r.props.showTimeInput||r.props.showTimeSelect,c=l?"PPPPp":"PPPP",u;return r.props.selectsRange?u="Selected start date: ".concat(zr(r.props.startDate,{dateFormat:c,locale:s}),". ").concat(r.props.endDate?"End date: "+zr(r.props.endDate,{dateFormat:c,locale:s}):""):r.props.showTimeSelectOnly?u="Selected time: ".concat(zr(r.props.selected,{dateFormat:a,locale:s})):r.props.showYearPicker?u="Selected year: ".concat(zr(r.props.selected,{dateFormat:"yyyy",locale:s})):r.props.showMonthYearPicker?u="Selected month: ".concat(zr(r.props.selected,{dateFormat:"MMMM yyyy",locale:s})):r.props.showQuarterYearPicker?u="Selected quarter: ".concat(zr(r.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):u="Selected date: ".concat(zr(r.props.selected,{dateFormat:c,locale:s})),k.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},u)},r.renderDateInput=function(){var i,o,a,s=dn(r.props.className,(i={},i[_4]=r.state.open,i)),l=r.props.customInput||k.createElement("input",{type:"text"}),c=r.props.customInputRef||"ref",u=r.props,f=u.dateFormat,d=f===void 0?e.defaultProps.dateFormat:f,h=u.locale,m=typeof r.props.value=="string"?r.props.value:typeof r.state.inputValue=="string"?r.state.inputValue:r.props.selectsRange?RF(r.props.startDate,r.props.endDate,{dateFormat:d,locale:h}):r.props.selectsMultiple?BF((a=r.props.selectedDates)!==null&&a!==void 0?a:[],{dateFormat:d,locale:h}):zr(r.props.selected,{dateFormat:d,locale:h});return k.cloneElement(l,(o={},o[c]=function(g){r.input=g},o.value=m,o.onBlur=r.handleBlur,o.onChange=r.handleChange,o.onClick=r.onInputClick,o.onFocus=r.handleFocus,o.onKeyDown=r.onInputKeyDown,o.id=r.props.id,o.name=r.props.name,o.form=r.props.form,o.autoFocus=r.props.autoFocus,o.placeholder=r.props.placeholderText,o.disabled=r.props.disabled,o.autoComplete=r.props.autoComplete,o.className=dn(l.props.className,s),o.title=r.props.title,o.readOnly=r.props.readOnly,o.required=r.props.required,o.tabIndex=r.props.tabIndex,o["aria-describedby"]=r.props.ariaDescribedBy,o["aria-invalid"]=r.props.ariaInvalid,o["aria-labelledby"]=r.props.ariaLabelledBy,o["aria-required"]=r.props.ariaRequired,o))},r.renderClearButton=function(){var i=r.props,o=i.isClearable,a=i.disabled,s=i.selected,l=i.startDate,c=i.endDate,u=i.clearButtonTitle,f=i.clearButtonClassName,d=f===void 0?"":f,h=i.ariaLabelClose,m=h===void 0?"Close":h,g=i.selectedDates;return o&&(s!=null||l!=null||c!=null||g!=null&&g.length)?k.createElement("button",{type:"button",className:dn("react-datepicker__close-icon",d,{"react-datepicker__close-icon--disabled":a}),disabled:a,"aria-label":m,onClick:r.onClearClick,title:u,tabIndex:-1}):null},r.state=r.calcInitialState(),r.preventFocusTimeout=void 0,r}return Object.defineProperty(e,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Jc,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),e.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},e.prototype.componentDidUpdate=function(n,r){var i,o,a,s;n.inline&&DY(n.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&n.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),n.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:h4(this.props.highlightDates)}),!r.focused&&!ms(n.selected,this.props.selected)&&this.setState({inputValue:null}),r.open!==this.state.open&&(r.open===!1&&this.state.open===!0&&((o=(i=this.props).onCalendarOpen)===null||o===void 0||o.call(i)),r.open===!0&&this.state.open===!1&&((s=(a=this.props).onCalendarClose)===null||s===void 0||s.call(a)))},e.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},e.prototype.renderInputContainer=function(){var n=this.props,r=n.showIcon,i=n.icon,o=n.calendarIconClassname,a=n.calendarIconClassName,s=n.toggleCalendarOnIconClick,l=this.state.open;return o&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),k.createElement("div",{className:"react-datepicker__input-container".concat(r?" react-datepicker__view-calendar-icon":"")},r&&k.createElement(CY,We({icon:i,className:dn(a,!a&&o,l&&"react-datepicker-ignore-onclickoutside")},s?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},e.prototype.render=function(){var n=this.renderCalendar();if(this.props.inline)return n;if(this.props.withPortal){var r=this.state.open?k.createElement(x4,{enableTabLoop:this.props.enableTabLoop},k.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},n)):null;return this.state.open&&this.props.portalId&&(r=k.createElement(w4,We({portalId:this.props.portalId},this.props),r)),k.createElement("div",null,this.renderInputContainer(),r)}return k.createElement(MY,We({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:n,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},e})(k.Component);var $Y="input",og="navigate";const LY="_divider_6zaq8_1",IY="_divider__vertical_6zaq8_6",jY="_divider__disabled_6zaq8_10",ag={divider:LY,divider__vertical:IY,divider__disabled:jY},S4=({className:t,disabled:e=!1,vertical:n=!1})=>N.jsx("div",{className:Ce(ag.divider,e&&ag.divider__disabled,n&&ag.divider__vertical,t&&t)});S4.prototype={avocado:"Divider"};const NY=({ref:t,onClickOutside:e})=>{let n=!1;const r=s=>{t!=null&&t.current&&!(t!=null&&t.current.contains(s.target))&&(e==null||e())},i=()=>{document.addEventListener("mousedown",r)},o=()=>{document.removeEventListener("mousedown",r)},a=()=>{if(!n){i(),n=!0;return}o(),i()};k.useEffect(()=>(a(),()=>{o()}),[t])},RY="_spinnerSvg_1i15l_1",BY="_rotate_1i15l_1",k4={spinnerSvg:RY,rotate:BY},ZY=({size:t="lg"})=>N.jsx(N.Fragment,{children:t==="lg"?N.jsxs("svg",{width:"104",height:"104",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:k4.spinnerSvg,children:[N.jsx("path",{d:"M100 52a48 48 0 1 1-96.001 0A48 48 0 0 1 100 52Z",stroke:"var(--color-primary-30)",strokeWidth:"8"}),N.jsx("path",{d:"M100 52a48 48 0 0 1-33.167 45.65",stroke:"var(--color-primary-50)",strokeWidth:"8",strokeLinecap:"round"})]}):N.jsxs("svg",{width:"36",height:"36",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:k4.spinnerSvg,children:[N.jsx("circle",{opacity:".5",cx:"18",cy:"18",r:"16",stroke:"var(--color-primary-30)",strokeWidth:"4"}),N.jsx("path",{d:"M18 34C9.163 34 2 26.837 2 18",stroke:"var(--color-primary-50)",strokeWidth:"4"})]})}),zY="_cntLoading_1suxv_1",XY="_cntLoading__inline_1suxv_16",VY="_cntLoading_content_1suxv_20",FY="_title_1suxv_28",YY="_description_1suxv_31",qY="_cntLoading__darkMode_1suxv_34",Sl={cntLoading:zY,cntLoading__inline:XY,cntLoading_content:VY,title:FY,description:YY,cntLoading__darkMode:qY},WY=({className:t,description:e,title:n,size:r,inline:i})=>{const{theme:{mode:o}}=ss();return N.jsxs("section",{className:Ce(Sl.cntLoading,o==="dark"&&Sl.cntLoading__darkMode,i&&Sl.cntLoading__inline,t&&t),children:[N.jsx(ZY,{size:r}),N.jsxs("div",{className:Sl.cntLoading_content,children:[n&&N.jsx(da,{className:Sl.title,type:"h1",darkMode:!0,children:n}),e&&N.jsx(So,{className:Sl.description,darkMode:!0,type:"lg",weight:"medium",children:e})]})]})},nh=t=>{const{icon:e,variant:n="primary",type:r="button",size:i="md",className:o="",disabled:a=!1,loading:s=!1,...l}=t,c=["roundButton",o&&o,s&&"roundButton__loading",i&&`roundButton__${i}`],u={sm:"md",md:"lg"};return N.jsx(b0,{className:Ce(...c),disabled:a,variant:n,loading:s,type:r,...l,children:N.jsx(kt,{className:"roundButton_icon",name:s?"loading":e,size:u[i]})})};nh.prototype={avocado:"RoundButton"};const UY="_modal__bodyOpen_a1mon_1",HY="_modal_a1mon_1",GY="_modal__dark_a1mon_16",KY="_modal_overlay_a1mon_16",JY="_modal__isOpen_a1mon_19",eq="_fadeInOverlay_a1mon_1",tq="_modal_content_a1mon_22",nq="_modalEnter_a1mon_1",rq="_modal__isClosing_a1mon_25",iq="_fadeOutOverlay_a1mon_1",oq="_modalLeave_a1mon_1",aq="_modal__danger_a1mon_31",sq="_modal__warning_a1mon_34",lq="_modal__palette_1_50_a1mon_37",cq="_modal__palette_2_50_a1mon_40",uq="_modal__palette_3_50_a1mon_43",fq="_modal__palette_4_50_a1mon_46",dq="_modal__palette_5_50_a1mon_49",hq="_modal__palette_6_50_a1mon_52",pq="_modal__palette_7_50_a1mon_55",mq="_modal__palette_8_50_a1mon_58",gq="_modal__palette_9_50_a1mon_61",Oq="_modal__palette_10_50_a1mon_64",yq="_modal__palette_11_50_a1mon_67",vq="_modal__palette_12_50_a1mon_70",bq="_modal__palette_13_50_a1mon_73",wq="_modal__palette_14_50_a1mon_76",xq="_modal__palette_15_50_a1mon_79",_q="_modal__palette_16_50_a1mon_82",Sq="_modal__palette_17_50_a1mon_85",kq="_modal__palette_18_50_a1mon_88",Cq="_modalHeader_a1mon_115",Pq="_modalHeader_closeBtn_a1mon_123",Eq="_modalBody_a1mon_131",Tq="_modalFooter_a1mon_134",Xr={modal__bodyOpen:UY,modal:HY,modal__dark:GY,modal_overlay:KY,modal__isOpen:JY,fadeInOverlay:eq,modal_content:tq,modalEnter:nq,modal__isClosing:rq,fadeOutOverlay:iq,modalLeave:oq,modal__danger:aq,modal__warning:sq,modal__palette_1_50:lq,modal__palette_2_50:cq,modal__palette_3_50:uq,modal__palette_4_50:fq,modal__palette_5_50:dq,modal__palette_6_50:hq,modal__palette_7_50:pq,modal__palette_8_50:mq,modal__palette_9_50:gq,modal__palette_10_50:Oq,modal__palette_11_50:yq,modal__palette_12_50:vq,modal__palette_13_50:bq,modal__palette_14_50:wq,modal__palette_15_50:xq,modal__palette_16_50:_q,modal__palette_17_50:Sq,modal__palette_18_50:kq,modalHeader:Cq,modalHeader_closeBtn:Pq,modalBody:Eq,modalFooter:Tq},C4=t=>{const e=Xr.modal__bodyOpen;if(t){document.body.classList.add(e);return}document.body.classList.remove(e)},Aq=({open:t,disableOverlayClick:e=!1,className:n,header:r,headerStatusColor:i,children:o,actions:a,onClose:s})=>{const l=k.useRef(null),[c,u]=k.useState(t),[f,d]=k.useState(!1),{theme:h}=ss(),m=()=>{d(!0),s==null||s()},g=()=>{d(!1),u(!1)};NY({ref:l,onClickOutside:()=>!e&&m()}),k.useEffect(()=>(t?(d(!1),u(!0)):!f&&c&&m(),C4(t),()=>{C4(!1)}),[t]);const p=[Xr.modal,n,c&&Xr.modal__isOpen,i&&Xr[`modal__${i}`],f&&Xr.modal__isClosing,h.mode==="dark"&&Xr.modal__dark];return c?N.jsxs("div",{className:Ce(...p),children:[N.jsx("div",{className:Xr.modal_overlay}),N.jsxs("div",{ref:l,className:Xr.modal_content,onAnimationEndCapture:()=>f&&g(),children:[N.jsxs("header",{className:Xr.modalHeader,children:[typeof r=="string"?N.jsx(da,{type:"h2",children:r}):r,N.jsx("button",{type:"button",className:Xr.modalHeader_closeBtn,onClick:m,children:N.jsx(kt,{name:"close",color:"neutral-70"})})]}),o&&N.jsx("main",{className:Xr.modalBody,children:o}),a&&N.jsx("footer",{className:Xr.modalFooter,children:a})]})]}):null},Mq="_paginator_1bm60_1",Qq="_paginator__mobile_1bm60_1",Dq="_paginator_rowsPerPage_1bm60_9",$q="_select_1bm60_15",Lq="_navPager_1bm60_19",Iq="_navPager_button_1bm60_24",jq="_icon_1bm60_66",Nq="_icon__disabled_1bm60_70",Rq="_navPager_button__active_1bm60_73",Bq="_navPager_button__block_1bm60_78",Qo={paginator:Mq,paginator__mobile:Qq,paginator_rowsPerPage:Dq,select:$q,navPager:Lq,navPager_button:Iq,icon:jq,icon__disabled:Nq,navPager_button__active:Rq,navPager_button__block:Bq},iu=t=>{const{className:e,disabled:n,icon:r,onClick:i}=t;return N.jsx("button",{"data-testid":"pager-arrow",className:Ce(Qo.navPager_button,e&&e),onClick:()=>i(),disabled:n,children:N.jsx(kt,{name:r,color:n?"neutral-30":"neutral-70"})})};iu.prototype={avocado:"ArrowPager"};const P4=t=>{const{className:e,disabled:n,page:r,currentPage:i,onClick:o,ellipsisAsNumber:a}=t;return N.jsx("button",{"data-testid":"pager-button","aria-label":r===a?"ellipsis":`Page ${r}`,disabled:n,className:Ce(Qo.navPager_button,i===r&&Qo.navPager_button__active,r===a&&Qo.navPager_button__block,e&&e),onClick:o,children:r!==a?r.toString():"..."})};P4.prototype={avocado:"ButtonPager"};function gs(t){"@babel/helpers - typeof";return gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gs(t)}function Zq(t,e){if(gs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(gs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function E4(t){var e=Zq(t,"string");return gs(e)=="symbol"?e:String(e)}function ou(t,e,n){return e=E4(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function T4(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ee(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?T4(Object(n),!0).forEach(function(r){ou(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T4(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function zq(t){if(Array.isArray(t))return t}function Xq(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function sg(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function A4(t,e){if(t){if(typeof t=="string")return sg(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sg(t,e)}}function Vq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
648
648
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Do(t,e){return zq(t)||Xq(t,e)||A4(t,e)||Vq()}function Fq(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function $o(t,e){if(t==null)return{};var n=Fq(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var Yq=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function qq(t){var e=t.defaultInputValue,n=e===void 0?"":e,r=t.defaultMenuIsOpen,i=r===void 0?!1:r,o=t.defaultValue,a=o===void 0?null:o,s=t.inputValue,l=t.menuIsOpen,c=t.onChange,u=t.onInputChange,f=t.onMenuClose,d=t.onMenuOpen,h=t.value,m=$o(t,Yq),g=k.useState(s!==void 0?s:n),p=Do(g,2),O=p[0],w=p[1],v=k.useState(l!==void 0?l:i),b=Do(v,2),y=b[0],x=b[1],_=k.useState(h!==void 0?h:a),E=Do(_,2),A=E[0],I=E[1],Q=k.useCallback(function(K,ne){typeof c=="function"&&c(K,ne),I(K)},[c]),D=k.useCallback(function(K,ne){var L;typeof u=="function"&&(L=u(K,ne)),w(L!==void 0?L:K)},[u]),j=k.useCallback(function(){typeof d=="function"&&d(),x(!0)},[d]),R=k.useCallback(function(){typeof f=="function"&&f(),x(!1)},[f]),B=s!==void 0?s:O,X=l!==void 0?l:y,V=h!==void 0?h:A;return Ee(Ee({},m),{},{inputValue:B,menuIsOpen:X,onChange:Q,onInputChange:D,onMenuClose:R,onMenuOpen:j,value:V})}function Te(){return Te=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Te.apply(this,arguments)}function Wq(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function M4(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,E4(r.key),r)}}function Uq(t,e,n){return e&&M4(t.prototype,e),n&&M4(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function lg(t,e){return lg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},lg(t,e)}function Hq(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lg(t,e)}function rh(t){return rh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rh(t)}function Q4(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Q4=function(){return!!t})()}function Gq(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Kq(t,e){if(e&&(gs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gq(t)}function Jq(t){var e=Q4();return function(){var n=rh(t),r;if(e){var i=rh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Kq(this,r)}}function eW(t){if(Array.isArray(t))return sg(t)}function tW(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function nW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
649
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cg(t){return eW(t)||tW(t)||A4(t)||nW()}var rW={npm_package_exports___require:"./dist/avocado-suite.umd.js",npm_package_devDependencies__types_node:"20.2.5",npm_package_devDependencies_vitest:"1.2.2",npm_package_dependencies_react_toastify:"9.0.3",npm_package_devDependencies__testing_library_jest_dom:"6.4.0",npm_config_user_agent:"pnpm/9.10.0 npm/? node/v20.17.0 linux x64",CI:"true",npm_package_devDependencies__testing_library_user_event:"14.5.2",npm_package_dependencies_embla_carousel_react:"^8.5.2",npm_package_devDependencies_vite:"5.0.12",npm_node_execpath:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_package_publishConfig_access:"public",npm_package_files_0:"dist",HOME:"/home/runner",npm_package_dependencies_react_select_async_paginate:"0.7.3",npm_package_devDependencies_classnames:"2.3.2",npm_package_devDependencies_sass:"1.62.1",npm_package_peerDependencies_react_toastify:"9.0.3",npm_config_auto_install_peers:"true",npm_package_devDependencies_vite_plugin_dts:"3.7.1",npm_package_devDependencies_typescript:"5.1.3",npm_package_peerDependencies_react_select_async_paginate:"0.7.3",npm_package_types:"./dist/index.d.ts",npm_package_devDependencies__types_react_dom:"18.0.11",npm_package_devDependencies__vitejs_plugin_react_swc:"3.5.0",npm_package_type:"module",npm_package_dependencies_react_datepicker:"7.3.0",npm_package_dependencies_zustand:"4.5.4",npm_package_module:"./dist/avocado-suite.es.js",npm_package_devDependencies__types_testing_library__jest_dom:"6.0.0",npm_package_dependencies__foris_avocado_icons:"workspace:*",npm_package_devDependencies__vitest_coverage_v8:"1.2.2",npm_config_registry:"https://registry.npmjs.org/",npm_config_node_linker:"hoisted",npm_package_exports___import:"./dist/avocado-suite.es.js",npm_package_dependencies__foris_avocado_core:"workspace:*",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/avocado/avocado/packages/avocado-suite/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/opt/hostedtoolcache/node/20.17.0/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",TURBO_HASH:"1d47e286dae78b6a",npm_package_name:"@foris/avocado-suite",NODE:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_config_frozen_lockfile:"",npm_package_devDependencies__vitest_ui:"1.2.2",npm_config_legacy_peer_deps:"true",LANG:"C.UTF-8",npm_package_dependencies_react_dom:"18.2.0",npm_package_main:"./dist/avocado-suite.umd.js",npm_package_dependencies_react_markdown:"^8.0.3",npm_lifecycle_script:"tsc && vite build",npm_package_scripts_test:"vitest run",SHELL:"/bin/bash",NODE_PATH:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.0.0",npm_package_devDependencies__testing_library_react:"14.2.0",npm_package_devDependencies__types_react:"18.0.28",npm_package_devDependencies_jsdom:"24.0.0",npm_lifecycle_event:"build",npm_package_scripts_build:"tsc && vite build",npm_package_devDependencies__foris_tsconfig:"workspace:*",npm_package_scripts_test_watch:"vitest --ui",npm_package_scripts_coverage:"vitest run --coverage",npm_package_dependencies_react_select:"5.8.0",PWD:"/home/runner/work/avocado/avocado/packages/avocado-suite",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/pnpm.cjs",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/avocado/avocado/packages/avocado-suite",npm_package_dependencies_react:"18.2.0",npm_package_peerDependencies_react_select:"5.8.0",INIT_CWD:"/home/runner/work/avocado/avocado/packages/avocado-suite",NODE_ENV:"production"};function iW(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function oW(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var aW=function(){function t(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?rW.NODE_ENV==="production":n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(oW(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var i=iW(r);try{i.insertRule(n,i.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0},t}(),$n="-ms-",ih="-moz-",et="-webkit-",D4="comm",ug="rule",fg="decl",sW="@import",$4="@keyframes",lW="@layer",cW=Math.abs,oh=String.fromCharCode,uW=Object.assign;function fW(t,e){return Sn(t,0)^45?(((e<<2^Sn(t,0))<<2^Sn(t,1))<<2^Sn(t,2))<<2^Sn(t,3):0}function L4(t){return t.trim()}function dW(t,e){return(t=e.exec(t))?t[0]:t}function tt(t,e,n){return t.replace(e,n)}function dg(t,e){return t.indexOf(e)}function Sn(t,e){return t.charCodeAt(e)|0}function au(t,e,n){return t.slice(e,n)}function Ri(t){return t.length}function hg(t){return t.length}function ah(t,e){return e.push(t),t}function hW(t,e){return t.map(e).join("")}var sh=1,kl=1,I4=0,Jn=0,Gt=0,Cl="";function lh(t,e,n,r,i,o,a){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:sh,column:kl,length:a,return:""}}function su(t,e){return uW(lh("",null,null,"",null,null,0),t,{length:-t.length},e)}function pW(){return Gt}function mW(){return Gt=Jn>0?Sn(Cl,--Jn):0,kl--,Gt===10&&(kl=1,sh--),Gt}function Or(){return Gt=Jn<I4?Sn(Cl,Jn++):0,kl++,Gt===10&&(kl=1,sh++),Gt}function Bi(){return Sn(Cl,Jn)}function ch(){return Jn}function lu(t,e){return au(Cl,t,e)}function cu(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function j4(t){return sh=kl=1,I4=Ri(Cl=t),Jn=0,[]}function N4(t){return Cl="",t}function uh(t){return L4(lu(Jn-1,pg(t===91?t+2:t===40?t+1:t)))}function gW(t){for(;(Gt=Bi())&&Gt<33;)Or();return cu(t)>2||cu(Gt)>3?"":" "}function OW(t,e){for(;--e&&Or()&&!(Gt<48||Gt>102||Gt>57&&Gt<65||Gt>70&&Gt<97););return lu(t,ch()+(e<6&&Bi()==32&&Or()==32))}function pg(t){for(;Or();)switch(Gt){case t:return Jn;case 34:case 39:t!==34&&t!==39&&pg(Gt);break;case 40:t===41&&pg(t);break;case 92:Or();break}return Jn}function yW(t,e){for(;Or()&&t+Gt!==57&&!(t+Gt===84&&Bi()===47););return"/*"+lu(e,Jn-1)+"*"+oh(t===47?t:Or())}function vW(t){for(;!cu(Bi());)Or();return lu(t,Jn)}function bW(t){return N4(fh("",null,null,null,[""],t=j4(t),0,[0],t))}function fh(t,e,n,r,i,o,a,s,l){for(var c=0,u=0,f=a,d=0,h=0,m=0,g=1,p=1,O=1,w=0,v="",b=i,y=o,x=r,_=v;p;)switch(m=w,w=Or()){case 40:if(m!=108&&Sn(_,f-1)==58){dg(_+=tt(uh(w),"&","&\f"),"&\f")!=-1&&(O=-1);break}case 34:case 39:case 91:_+=uh(w);break;case 9:case 10:case 13:case 32:_+=gW(m);break;case 92:_+=OW(ch()-1,7);continue;case 47:switch(Bi()){case 42:case 47:ah(wW(yW(Or(),ch()),e,n),l);break;default:_+="/"}break;case 123*g:s[c++]=Ri(_)*O;case 125*g:case 59:case 0:switch(w){case 0:case 125:p=0;case 59+u:O==-1&&(_=tt(_,/\f/g,"")),h>0&&Ri(_)-f&&ah(h>32?B4(_+";",r,n,f-1):B4(tt(_," ","")+";",r,n,f-2),l);break;case 59:_+=";";default:if(ah(x=R4(_,e,n,c,u,i,s,v,b=[],y=[],f),o),w===123)if(u===0)fh(_,e,x,x,b,o,f,s,y);else switch(d===99&&Sn(_,3)===110?100:d){case 100:case 108:case 109:case 115:fh(t,x,x,r&&ah(R4(t,x,x,0,0,i,s,v,i,b=[],f),y),i,y,f,s,r?b:y);break;default:fh(_,x,x,x,[""],y,0,s,y)}}c=u=h=0,g=O=1,v=_="",f=a;break;case 58:f=1+Ri(_),h=m;default:if(g<1){if(w==123)--g;else if(w==125&&g++==0&&mW()==125)continue}switch(_+=oh(w),w*g){case 38:O=u>0?1:(_+="\f",-1);break;case 44:s[c++]=(Ri(_)-1)*O,O=1;break;case 64:Bi()===45&&(_+=uh(Or())),d=Bi(),u=f=Ri(v=_+=vW(ch())),w++;break;case 45:m===45&&Ri(_)==2&&(g=0)}}return o}function R4(t,e,n,r,i,o,a,s,l,c,u){for(var f=i-1,d=i===0?o:[""],h=hg(d),m=0,g=0,p=0;m<r;++m)for(var O=0,w=au(t,f+1,f=cW(g=a[m])),v=t;O<h;++O)(v=L4(g>0?d[O]+" "+w:tt(w,/&\f/g,d[O])))&&(l[p++]=v);return lh(t,e,n,i===0?ug:s,l,c,u)}function wW(t,e,n){return lh(t,e,n,D4,oh(pW()),au(t,2,-2),0)}function B4(t,e,n,r){return lh(t,e,n,fg,au(t,0,r),au(t,r+1,-1),r)}function Pl(t,e){for(var n="",r=hg(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function xW(t,e,n,r){switch(t.type){case lW:if(t.children.length)break;case sW:case fg:return t.return=t.return||t.value;case D4:return"";case $4:return t.return=t.value+"{"+Pl(t.children,r)+"}";case ug:t.value=t.props.join(",")}return Ri(n=Pl(t.children,r))?t.return=t.value+"{"+n+"}":""}function _W(t){var e=hg(t);return function(n,r,i,o){for(var a="",s=0;s<e;s++)a+=t[s](n,r,i,o)||"";return a}}function SW(t){return function(e){e.root||(e=e.return)&&t(e)}}function kW(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var CW=function(t,e,n){for(var r=0,i=0;r=i,i=Bi(),r===38&&i===12&&(e[n]=1),!cu(i);)Or();return lu(t,Jn)},PW=function(t,e){var n=-1,r=44;do switch(cu(r)){case 0:r===38&&Bi()===12&&(e[n]=1),t[n]+=CW(Jn-1,e,n);break;case 2:t[n]+=uh(r);break;case 4:if(r===44){t[++n]=Bi()===58?"&\f":"",e[n]=t[n].length;break}default:t[n]+=oh(r)}while(r=Or());return t},EW=function(t,e){return N4(PW(j4(t),e))},Z4=new WeakMap,TW=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var e=t.value,n=t.parent,r=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&e.charCodeAt(0)!==58&&!Z4.get(n))&&!r){Z4.set(t,!0);for(var i=[],o=EW(e,i),a=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)t.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},AW=function(t){if(t.type==="decl"){var e=t.value;e.charCodeAt(0)===108&&e.charCodeAt(2)===98&&(t.return="",t.value="")}};function z4(t,e){switch(fW(t,e)){case 5103:return et+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return et+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return et+t+ih+t+$n+t+t;case 6828:case 4268:return et+t+$n+t+t;case 6165:return et+t+$n+"flex-"+t+t;case 5187:return et+t+tt(t,/(\w+).+(:[^]+)/,et+"box-$1$2"+$n+"flex-$1$2")+t;case 5443:return et+t+$n+"flex-item-"+tt(t,/flex-|-self/,"")+t;case 4675:return et+t+$n+"flex-line-pack"+tt(t,/align-content|flex-|-self/,"")+t;case 5548:return et+t+$n+tt(t,"shrink","negative")+t;case 5292:return et+t+$n+tt(t,"basis","preferred-size")+t;case 6060:return et+"box-"+tt(t,"-grow","")+et+t+$n+tt(t,"grow","positive")+t;case 4554:return et+tt(t,/([^-])(transform)/g,"$1"+et+"$2")+t;case 6187:return tt(tt(tt(t,/(zoom-|grab)/,et+"$1"),/(image-set)/,et+"$1"),t,"")+t;case 5495:case 3959:return tt(t,/(image-set\([^]*)/,et+"$1$`$1");case 4968:return tt(tt(t,/(.+:)(flex-)?(.*)/,et+"box-pack:$3"+$n+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+et+t+t;case 4095:case 3583:case 4068:case 2532:return tt(t,/(.+)-inline(.+)/,et+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ri(t)-1-e>6)switch(Sn(t,e+1)){case 109:if(Sn(t,e+4)!==45)break;case 102:return tt(t,/(.+:)(.+)-([^]+)/,"$1"+et+"$2-$3$1"+ih+(Sn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~dg(t,"stretch")?z4(tt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Sn(t,e+1)!==115)break;case 6444:switch(Sn(t,Ri(t)-3-(~dg(t,"!important")&&10))){case 107:return tt(t,":",":"+et)+t;case 101:return tt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+et+(Sn(t,14)===45?"inline-":"")+"box$3$1"+et+"$2$3$1"+$n+"$2box$3")+t}break;case 5936:switch(Sn(t,e+11)){case 114:return et+t+$n+tt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return et+t+$n+tt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return et+t+$n+tt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return et+t+$n+t+t}return t}var MW=function(t,e,n,r){if(t.length>-1&&!t.return)switch(t.type){case fg:t.return=z4(t.value,t.length);break;case $4:return Pl([su(t,{value:tt(t.value,"@","@"+et)})],r);case ug:if(t.length)return hW(t.props,function(i){switch(dW(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Pl([su(t,{props:[tt(i,/:(read-\w+)/,":"+ih+"$1")]})],r);case"::placeholder":return Pl([su(t,{props:[tt(i,/:(plac\w+)/,":"+et+"input-$1")]}),su(t,{props:[tt(i,/:(plac\w+)/,":"+ih+"$1")]}),su(t,{props:[tt(i,/:(plac\w+)/,$n+"input-$1")]})],r)}return""})}},QW=[MW],DW=function(t){var e=t.key;if(e==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(m){var g=m.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var r=t.stylisPlugins||QW,i={},o,a=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),function(m){for(var g=m.getAttribute("data-emotion").split(" "),p=1;p<g.length;p++)i[g[p]]=!0;a.push(m)});var s,l=[TW,AW];{var c,u=[xW,SW(function(m){c.insert(m)})],f=_W(l.concat(r,u)),d=function(m){return Pl(bW(m),f)};s=function(m,g,p,O){c=p,d(m?m+"{"+g.styles+"}":g.styles),O&&(h.inserted[g.name]=!0)}}var h={key:e,sheet:new aW({key:e,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:s};return h.sheet.hydrate(a),h},X4={exports:{}},rt={};/** @license React v16.13.1
649
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cg(t){return eW(t)||tW(t)||A4(t)||nW()}var rW={npm_package_exports___require:"./dist/avocado-suite.umd.js",npm_package_devDependencies__types_node:"20.2.5",npm_package_devDependencies_vitest:"1.2.2",npm_package_dependencies_react_toastify:"9.0.3",npm_package_devDependencies__testing_library_jest_dom:"6.4.0",npm_config_user_agent:"pnpm/9.10.0 npm/? node/v20.17.0 linux x64",CI:"true",npm_package_devDependencies__testing_library_user_event:"14.5.2",npm_package_dependencies_embla_carousel_react:"^8.5.2",npm_package_devDependencies_vite:"5.0.12",npm_node_execpath:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_package_publishConfig_access:"public",npm_package_files_0:"dist",HOME:"/home/runner",npm_package_dependencies_react_select_async_paginate:"0.7.3",npm_package_devDependencies_classnames:"2.3.2",npm_package_devDependencies_sass:"1.62.1",npm_package_peerDependencies_react_toastify:"9.0.3",npm_config_auto_install_peers:"true",npm_package_devDependencies_vite_plugin_dts:"3.7.1",npm_package_devDependencies_typescript:"5.1.3",npm_package_peerDependencies_react_select_async_paginate:"0.7.3",npm_package_types:"./dist/index.d.ts",npm_package_devDependencies__types_react_dom:"18.0.11",npm_package_devDependencies__vitejs_plugin_react_swc:"3.5.0",npm_package_type:"module",npm_package_dependencies_react_datepicker:"7.3.0",npm_package_dependencies_zustand:"4.5.4",npm_package_module:"./dist/avocado-suite.es.js",npm_package_devDependencies__types_testing_library__jest_dom:"6.0.0",npm_package_dependencies__foris_avocado_icons:"workspace:*",npm_package_devDependencies__vitest_coverage_v8:"1.2.2",npm_config_registry:"https://registry.npmjs.org/",npm_config_node_linker:"hoisted",npm_package_exports___import:"./dist/avocado-suite.es.js",npm_package_dependencies__foris_avocado_core:"workspace:*",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/avocado/avocado/packages/avocado-suite/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/opt/hostedtoolcache/node/20.17.0/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",TURBO_HASH:"eb947337d08bc87f",npm_package_name:"@foris/avocado-suite",NODE:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_config_frozen_lockfile:"",npm_package_devDependencies__vitest_ui:"1.2.2",npm_config_legacy_peer_deps:"true",LANG:"C.UTF-8",npm_package_dependencies_react_dom:"18.2.0",npm_package_main:"./dist/avocado-suite.umd.js",npm_package_dependencies_react_markdown:"^8.0.3",npm_lifecycle_script:"tsc && vite build",npm_package_scripts_test:"vitest run",SHELL:"/bin/bash",NODE_PATH:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.0.1",npm_package_devDependencies__testing_library_react:"14.2.0",npm_package_devDependencies__types_react:"18.0.28",npm_package_devDependencies_jsdom:"24.0.0",npm_lifecycle_event:"build",npm_package_scripts_build:"tsc && vite build",npm_package_devDependencies__foris_tsconfig:"workspace:*",npm_package_scripts_test_watch:"vitest --ui",npm_package_scripts_coverage:"vitest run --coverage",npm_package_dependencies_react_select:"5.8.0",PWD:"/home/runner/work/avocado/avocado/packages/avocado-suite",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/pnpm.cjs",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/avocado/avocado/packages/avocado-suite",npm_package_dependencies_react:"18.2.0",npm_package_peerDependencies_react_select:"5.8.0",INIT_CWD:"/home/runner/work/avocado/avocado/packages/avocado-suite",NODE_ENV:"production"};function iW(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function oW(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var aW=function(){function t(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?rW.NODE_ENV==="production":n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(oW(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var i=iW(r);try{i.insertRule(n,i.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0},t}(),$n="-ms-",ih="-moz-",et="-webkit-",D4="comm",ug="rule",fg="decl",sW="@import",$4="@keyframes",lW="@layer",cW=Math.abs,oh=String.fromCharCode,uW=Object.assign;function fW(t,e){return Sn(t,0)^45?(((e<<2^Sn(t,0))<<2^Sn(t,1))<<2^Sn(t,2))<<2^Sn(t,3):0}function L4(t){return t.trim()}function dW(t,e){return(t=e.exec(t))?t[0]:t}function tt(t,e,n){return t.replace(e,n)}function dg(t,e){return t.indexOf(e)}function Sn(t,e){return t.charCodeAt(e)|0}function au(t,e,n){return t.slice(e,n)}function Ri(t){return t.length}function hg(t){return t.length}function ah(t,e){return e.push(t),t}function hW(t,e){return t.map(e).join("")}var sh=1,kl=1,I4=0,Jn=0,Gt=0,Cl="";function lh(t,e,n,r,i,o,a){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:sh,column:kl,length:a,return:""}}function su(t,e){return uW(lh("",null,null,"",null,null,0),t,{length:-t.length},e)}function pW(){return Gt}function mW(){return Gt=Jn>0?Sn(Cl,--Jn):0,kl--,Gt===10&&(kl=1,sh--),Gt}function Or(){return Gt=Jn<I4?Sn(Cl,Jn++):0,kl++,Gt===10&&(kl=1,sh++),Gt}function Bi(){return Sn(Cl,Jn)}function ch(){return Jn}function lu(t,e){return au(Cl,t,e)}function cu(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function j4(t){return sh=kl=1,I4=Ri(Cl=t),Jn=0,[]}function N4(t){return Cl="",t}function uh(t){return L4(lu(Jn-1,pg(t===91?t+2:t===40?t+1:t)))}function gW(t){for(;(Gt=Bi())&&Gt<33;)Or();return cu(t)>2||cu(Gt)>3?"":" "}function OW(t,e){for(;--e&&Or()&&!(Gt<48||Gt>102||Gt>57&&Gt<65||Gt>70&&Gt<97););return lu(t,ch()+(e<6&&Bi()==32&&Or()==32))}function pg(t){for(;Or();)switch(Gt){case t:return Jn;case 34:case 39:t!==34&&t!==39&&pg(Gt);break;case 40:t===41&&pg(t);break;case 92:Or();break}return Jn}function yW(t,e){for(;Or()&&t+Gt!==57&&!(t+Gt===84&&Bi()===47););return"/*"+lu(e,Jn-1)+"*"+oh(t===47?t:Or())}function vW(t){for(;!cu(Bi());)Or();return lu(t,Jn)}function bW(t){return N4(fh("",null,null,null,[""],t=j4(t),0,[0],t))}function fh(t,e,n,r,i,o,a,s,l){for(var c=0,u=0,f=a,d=0,h=0,m=0,g=1,p=1,O=1,w=0,v="",b=i,y=o,x=r,_=v;p;)switch(m=w,w=Or()){case 40:if(m!=108&&Sn(_,f-1)==58){dg(_+=tt(uh(w),"&","&\f"),"&\f")!=-1&&(O=-1);break}case 34:case 39:case 91:_+=uh(w);break;case 9:case 10:case 13:case 32:_+=gW(m);break;case 92:_+=OW(ch()-1,7);continue;case 47:switch(Bi()){case 42:case 47:ah(wW(yW(Or(),ch()),e,n),l);break;default:_+="/"}break;case 123*g:s[c++]=Ri(_)*O;case 125*g:case 59:case 0:switch(w){case 0:case 125:p=0;case 59+u:O==-1&&(_=tt(_,/\f/g,"")),h>0&&Ri(_)-f&&ah(h>32?B4(_+";",r,n,f-1):B4(tt(_," ","")+";",r,n,f-2),l);break;case 59:_+=";";default:if(ah(x=R4(_,e,n,c,u,i,s,v,b=[],y=[],f),o),w===123)if(u===0)fh(_,e,x,x,b,o,f,s,y);else switch(d===99&&Sn(_,3)===110?100:d){case 100:case 108:case 109:case 115:fh(t,x,x,r&&ah(R4(t,x,x,0,0,i,s,v,i,b=[],f),y),i,y,f,s,r?b:y);break;default:fh(_,x,x,x,[""],y,0,s,y)}}c=u=h=0,g=O=1,v=_="",f=a;break;case 58:f=1+Ri(_),h=m;default:if(g<1){if(w==123)--g;else if(w==125&&g++==0&&mW()==125)continue}switch(_+=oh(w),w*g){case 38:O=u>0?1:(_+="\f",-1);break;case 44:s[c++]=(Ri(_)-1)*O,O=1;break;case 64:Bi()===45&&(_+=uh(Or())),d=Bi(),u=f=Ri(v=_+=vW(ch())),w++;break;case 45:m===45&&Ri(_)==2&&(g=0)}}return o}function R4(t,e,n,r,i,o,a,s,l,c,u){for(var f=i-1,d=i===0?o:[""],h=hg(d),m=0,g=0,p=0;m<r;++m)for(var O=0,w=au(t,f+1,f=cW(g=a[m])),v=t;O<h;++O)(v=L4(g>0?d[O]+" "+w:tt(w,/&\f/g,d[O])))&&(l[p++]=v);return lh(t,e,n,i===0?ug:s,l,c,u)}function wW(t,e,n){return lh(t,e,n,D4,oh(pW()),au(t,2,-2),0)}function B4(t,e,n,r){return lh(t,e,n,fg,au(t,0,r),au(t,r+1,-1),r)}function Pl(t,e){for(var n="",r=hg(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function xW(t,e,n,r){switch(t.type){case lW:if(t.children.length)break;case sW:case fg:return t.return=t.return||t.value;case D4:return"";case $4:return t.return=t.value+"{"+Pl(t.children,r)+"}";case ug:t.value=t.props.join(",")}return Ri(n=Pl(t.children,r))?t.return=t.value+"{"+n+"}":""}function _W(t){var e=hg(t);return function(n,r,i,o){for(var a="",s=0;s<e;s++)a+=t[s](n,r,i,o)||"";return a}}function SW(t){return function(e){e.root||(e=e.return)&&t(e)}}function kW(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var CW=function(t,e,n){for(var r=0,i=0;r=i,i=Bi(),r===38&&i===12&&(e[n]=1),!cu(i);)Or();return lu(t,Jn)},PW=function(t,e){var n=-1,r=44;do switch(cu(r)){case 0:r===38&&Bi()===12&&(e[n]=1),t[n]+=CW(Jn-1,e,n);break;case 2:t[n]+=uh(r);break;case 4:if(r===44){t[++n]=Bi()===58?"&\f":"",e[n]=t[n].length;break}default:t[n]+=oh(r)}while(r=Or());return t},EW=function(t,e){return N4(PW(j4(t),e))},Z4=new WeakMap,TW=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var e=t.value,n=t.parent,r=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&e.charCodeAt(0)!==58&&!Z4.get(n))&&!r){Z4.set(t,!0);for(var i=[],o=EW(e,i),a=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)t.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},AW=function(t){if(t.type==="decl"){var e=t.value;e.charCodeAt(0)===108&&e.charCodeAt(2)===98&&(t.return="",t.value="")}};function z4(t,e){switch(fW(t,e)){case 5103:return et+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return et+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return et+t+ih+t+$n+t+t;case 6828:case 4268:return et+t+$n+t+t;case 6165:return et+t+$n+"flex-"+t+t;case 5187:return et+t+tt(t,/(\w+).+(:[^]+)/,et+"box-$1$2"+$n+"flex-$1$2")+t;case 5443:return et+t+$n+"flex-item-"+tt(t,/flex-|-self/,"")+t;case 4675:return et+t+$n+"flex-line-pack"+tt(t,/align-content|flex-|-self/,"")+t;case 5548:return et+t+$n+tt(t,"shrink","negative")+t;case 5292:return et+t+$n+tt(t,"basis","preferred-size")+t;case 6060:return et+"box-"+tt(t,"-grow","")+et+t+$n+tt(t,"grow","positive")+t;case 4554:return et+tt(t,/([^-])(transform)/g,"$1"+et+"$2")+t;case 6187:return tt(tt(tt(t,/(zoom-|grab)/,et+"$1"),/(image-set)/,et+"$1"),t,"")+t;case 5495:case 3959:return tt(t,/(image-set\([^]*)/,et+"$1$`$1");case 4968:return tt(tt(t,/(.+:)(flex-)?(.*)/,et+"box-pack:$3"+$n+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+et+t+t;case 4095:case 3583:case 4068:case 2532:return tt(t,/(.+)-inline(.+)/,et+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ri(t)-1-e>6)switch(Sn(t,e+1)){case 109:if(Sn(t,e+4)!==45)break;case 102:return tt(t,/(.+:)(.+)-([^]+)/,"$1"+et+"$2-$3$1"+ih+(Sn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~dg(t,"stretch")?z4(tt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Sn(t,e+1)!==115)break;case 6444:switch(Sn(t,Ri(t)-3-(~dg(t,"!important")&&10))){case 107:return tt(t,":",":"+et)+t;case 101:return tt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+et+(Sn(t,14)===45?"inline-":"")+"box$3$1"+et+"$2$3$1"+$n+"$2box$3")+t}break;case 5936:switch(Sn(t,e+11)){case 114:return et+t+$n+tt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return et+t+$n+tt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return et+t+$n+tt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return et+t+$n+t+t}return t}var MW=function(t,e,n,r){if(t.length>-1&&!t.return)switch(t.type){case fg:t.return=z4(t.value,t.length);break;case $4:return Pl([su(t,{value:tt(t.value,"@","@"+et)})],r);case ug:if(t.length)return hW(t.props,function(i){switch(dW(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Pl([su(t,{props:[tt(i,/:(read-\w+)/,":"+ih+"$1")]})],r);case"::placeholder":return Pl([su(t,{props:[tt(i,/:(plac\w+)/,":"+et+"input-$1")]}),su(t,{props:[tt(i,/:(plac\w+)/,":"+ih+"$1")]}),su(t,{props:[tt(i,/:(plac\w+)/,$n+"input-$1")]})],r)}return""})}},QW=[MW],DW=function(t){var e=t.key;if(e==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(m){var g=m.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var r=t.stylisPlugins||QW,i={},o,a=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),function(m){for(var g=m.getAttribute("data-emotion").split(" "),p=1;p<g.length;p++)i[g[p]]=!0;a.push(m)});var s,l=[TW,AW];{var c,u=[xW,SW(function(m){c.insert(m)})],f=_W(l.concat(r,u)),d=function(m){return Pl(bW(m),f)};s=function(m,g,p,O){c=p,d(m?m+"{"+g.styles+"}":g.styles),O&&(h.inserted[g.name]=!0)}}var h={key:e,sheet:new aW({key:e,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:s};return h.sheet.hydrate(a),h},X4={exports:{}},rt={};/** @license React v16.13.1
650
650
  * react-is.production.min.js
651
651
  *
652
652
  * Copyright (c) Facebook, Inc. and its affiliates.
653
653
  *
654
654
  * This source code is licensed under the MIT license found in the
655
655
  * LICENSE file in the root directory of this source tree.
656
- */var V4;function $W(){if(V4)return rt;V4=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,p=t?Symbol.for("react.fundamental"):60117,O=t?Symbol.for("react.responder"):60118,w=t?Symbol.for("react.scope"):60119;function v(y){if(typeof y=="object"&&y!==null){var x=y.$$typeof;switch(x){case e:switch(y=y.type,y){case l:case c:case r:case o:case i:case f:return y;default:switch(y=y&&y.$$typeof,y){case s:case u:case m:case h:case a:return y;default:return x}}case n:return x}}}function b(y){return v(y)===c}return rt.AsyncMode=l,rt.ConcurrentMode=c,rt.ContextConsumer=s,rt.ContextProvider=a,rt.Element=e,rt.ForwardRef=u,rt.Fragment=r,rt.Lazy=m,rt.Memo=h,rt.Portal=n,rt.Profiler=o,rt.StrictMode=i,rt.Suspense=f,rt.isAsyncMode=function(y){return b(y)||v(y)===l},rt.isConcurrentMode=b,rt.isContextConsumer=function(y){return v(y)===s},rt.isContextProvider=function(y){return v(y)===a},rt.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},rt.isForwardRef=function(y){return v(y)===u},rt.isFragment=function(y){return v(y)===r},rt.isLazy=function(y){return v(y)===m},rt.isMemo=function(y){return v(y)===h},rt.isPortal=function(y){return v(y)===n},rt.isProfiler=function(y){return v(y)===o},rt.isStrictMode=function(y){return v(y)===i},rt.isSuspense=function(y){return v(y)===f},rt.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===c||y===o||y===i||y===f||y===d||typeof y=="object"&&y!==null&&(y.$$typeof===m||y.$$typeof===h||y.$$typeof===a||y.$$typeof===s||y.$$typeof===u||y.$$typeof===p||y.$$typeof===O||y.$$typeof===w||y.$$typeof===g)},rt.typeOf=v,rt}X4.exports=$W();var LW=X4.exports,F4=LW,IW={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},jW={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Y4={};Y4[F4.ForwardRef]=IW,Y4[F4.Memo]=jW;var NW=!0;function RW(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):r+=i+" "}),r}var q4=function(t,e,n){var r=t.key+"-"+e.name;(n===!1||NW===!1)&&t.registered[r]===void 0&&(t.registered[r]=e.styles)},BW=function(t,e,n){q4(t,e,n);var r=t.key+"-"+e.name;if(t.inserted[e.name]===void 0){var i=e;do t.insert(e===i?"."+r:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function ZW(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var zW={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},XW={npm_package_exports___require:"./dist/avocado-suite.umd.js",npm_package_devDependencies__types_node:"20.2.5",npm_package_devDependencies_vitest:"1.2.2",npm_package_dependencies_react_toastify:"9.0.3",npm_package_devDependencies__testing_library_jest_dom:"6.4.0",npm_config_user_agent:"pnpm/9.10.0 npm/? node/v20.17.0 linux x64",CI:"true",npm_package_devDependencies__testing_library_user_event:"14.5.2",npm_package_dependencies_embla_carousel_react:"^8.5.2",npm_package_devDependencies_vite:"5.0.12",npm_node_execpath:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_package_publishConfig_access:"public",npm_package_files_0:"dist",HOME:"/home/runner",npm_package_dependencies_react_select_async_paginate:"0.7.3",npm_package_devDependencies_classnames:"2.3.2",npm_package_devDependencies_sass:"1.62.1",npm_package_peerDependencies_react_toastify:"9.0.3",npm_config_auto_install_peers:"true",npm_package_devDependencies_vite_plugin_dts:"3.7.1",npm_package_devDependencies_typescript:"5.1.3",npm_package_peerDependencies_react_select_async_paginate:"0.7.3",npm_package_types:"./dist/index.d.ts",npm_package_devDependencies__types_react_dom:"18.0.11",npm_package_devDependencies__vitejs_plugin_react_swc:"3.5.0",npm_package_type:"module",npm_package_dependencies_react_datepicker:"7.3.0",npm_package_dependencies_zustand:"4.5.4",npm_package_module:"./dist/avocado-suite.es.js",npm_package_devDependencies__types_testing_library__jest_dom:"6.0.0",npm_package_dependencies__foris_avocado_icons:"workspace:*",npm_package_devDependencies__vitest_coverage_v8:"1.2.2",npm_config_registry:"https://registry.npmjs.org/",npm_config_node_linker:"hoisted",npm_package_exports___import:"./dist/avocado-suite.es.js",npm_package_dependencies__foris_avocado_core:"workspace:*",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/avocado/avocado/packages/avocado-suite/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/opt/hostedtoolcache/node/20.17.0/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",TURBO_HASH:"1d47e286dae78b6a",npm_package_name:"@foris/avocado-suite",NODE:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_config_frozen_lockfile:"",npm_package_devDependencies__vitest_ui:"1.2.2",npm_config_legacy_peer_deps:"true",LANG:"C.UTF-8",npm_package_dependencies_react_dom:"18.2.0",npm_package_main:"./dist/avocado-suite.umd.js",npm_package_dependencies_react_markdown:"^8.0.3",npm_lifecycle_script:"tsc && vite build",npm_package_scripts_test:"vitest run",SHELL:"/bin/bash",NODE_PATH:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.0.0",npm_package_devDependencies__testing_library_react:"14.2.0",npm_package_devDependencies__types_react:"18.0.28",npm_package_devDependencies_jsdom:"24.0.0",npm_lifecycle_event:"build",npm_package_scripts_build:"tsc && vite build",npm_package_devDependencies__foris_tsconfig:"workspace:*",npm_package_scripts_test_watch:"vitest --ui",npm_package_scripts_coverage:"vitest run --coverage",npm_package_dependencies_react_select:"5.8.0",PWD:"/home/runner/work/avocado/avocado/packages/avocado-suite",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/pnpm.cjs",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/avocado/avocado/packages/avocado-suite",npm_package_dependencies_react:"18.2.0",npm_package_peerDependencies_react_select:"5.8.0",INIT_CWD:"/home/runner/work/avocado/avocado/packages/avocado-suite",NODE_ENV:"production"},VW=/[A-Z]|^ms/g,FW=/_EMO_([^_]+?)_([^]*?)_EMO_/g,W4=function(t){return t.charCodeAt(1)===45},U4=function(t){return t!=null&&typeof t!="boolean"},mg=kW(function(t){return W4(t)?t:t.replace(VW,"-$&").toLowerCase()}),H4=function(t,e){switch(t){case"animation":case"animationName":if(typeof e=="string")return e.replace(FW,function(n,r,i){return Zi={name:r,styles:i,next:Zi},r})}return zW[t]!==1&&!W4(t)&&typeof e=="number"&&e!==0?e+"px":e},YW="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function uu(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Zi={name:n.name,styles:n.styles,next:Zi},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Zi={name:r.name,styles:r.styles,next:Zi},r=r.next;var i=n.styles+";";return i}return qW(t,e,n)}case"function":{if(t!==void 0){var o=Zi,a=n(t);return Zi=o,uu(t,e,a)}break}}return n}function qW(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=uu(t,e,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object")U4(a)&&(r+=mg(o)+":"+H4(o,a)+";");else{if(o==="NO_COMPONENT_SELECTOR"&&XW.NODE_ENV!=="production")throw new Error(YW);if(Array.isArray(a)&&typeof a[0]=="string"&&e==null)for(var s=0;s<a.length;s++)U4(a[s])&&(r+=mg(o)+":"+H4(o,a[s])+";");else{var l=uu(t,e,a);switch(o){case"animation":case"animationName":{r+=mg(o)+":"+l+";";break}default:r+=o+"{"+l+"}"}}}}return r}var G4=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Zi,K4=function(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var r=!0,i="";Zi=void 0;var o=t[0];o==null||o.raw===void 0?(r=!1,i+=uu(n,e,o)):i+=o[0];for(var a=1;a<t.length;a++)i+=uu(n,e,t[a]),r&&(i+=o[a]);G4.lastIndex=0;for(var s="",l;(l=G4.exec(i))!==null;)s+="-"+l[1];var c=ZW(i)+s;return{name:c,styles:i,next:Zi}},WW=function(t){return t()},UW=P.useInsertionEffect?P.useInsertionEffect:!1,HW=UW||WW,GW={npm_package_exports___require:"./dist/avocado-suite.umd.js",npm_package_devDependencies__types_node:"20.2.5",npm_package_devDependencies_vitest:"1.2.2",npm_package_dependencies_react_toastify:"9.0.3",npm_package_devDependencies__testing_library_jest_dom:"6.4.0",npm_config_user_agent:"pnpm/9.10.0 npm/? node/v20.17.0 linux x64",CI:"true",npm_package_devDependencies__testing_library_user_event:"14.5.2",npm_package_dependencies_embla_carousel_react:"^8.5.2",npm_package_devDependencies_vite:"5.0.12",npm_node_execpath:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_package_publishConfig_access:"public",npm_package_files_0:"dist",HOME:"/home/runner",npm_package_dependencies_react_select_async_paginate:"0.7.3",npm_package_devDependencies_classnames:"2.3.2",npm_package_devDependencies_sass:"1.62.1",npm_package_peerDependencies_react_toastify:"9.0.3",npm_config_auto_install_peers:"true",npm_package_devDependencies_vite_plugin_dts:"3.7.1",npm_package_devDependencies_typescript:"5.1.3",npm_package_peerDependencies_react_select_async_paginate:"0.7.3",npm_package_types:"./dist/index.d.ts",npm_package_devDependencies__types_react_dom:"18.0.11",npm_package_devDependencies__vitejs_plugin_react_swc:"3.5.0",npm_package_type:"module",npm_package_dependencies_react_datepicker:"7.3.0",npm_package_dependencies_zustand:"4.5.4",npm_package_module:"./dist/avocado-suite.es.js",npm_package_devDependencies__types_testing_library__jest_dom:"6.0.0",npm_package_dependencies__foris_avocado_icons:"workspace:*",npm_package_devDependencies__vitest_coverage_v8:"1.2.2",npm_config_registry:"https://registry.npmjs.org/",npm_config_node_linker:"hoisted",npm_package_exports___import:"./dist/avocado-suite.es.js",npm_package_dependencies__foris_avocado_core:"workspace:*",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/avocado/avocado/packages/avocado-suite/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/opt/hostedtoolcache/node/20.17.0/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",TURBO_HASH:"1d47e286dae78b6a",npm_package_name:"@foris/avocado-suite",NODE:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_config_frozen_lockfile:"",npm_package_devDependencies__vitest_ui:"1.2.2",npm_config_legacy_peer_deps:"true",LANG:"C.UTF-8",npm_package_dependencies_react_dom:"18.2.0",npm_package_main:"./dist/avocado-suite.umd.js",npm_package_dependencies_react_markdown:"^8.0.3",npm_lifecycle_script:"tsc && vite build",npm_package_scripts_test:"vitest run",SHELL:"/bin/bash",NODE_PATH:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.0.0",npm_package_devDependencies__testing_library_react:"14.2.0",npm_package_devDependencies__types_react:"18.0.28",npm_package_devDependencies_jsdom:"24.0.0",npm_lifecycle_event:"build",npm_package_scripts_build:"tsc && vite build",npm_package_devDependencies__foris_tsconfig:"workspace:*",npm_package_scripts_test_watch:"vitest --ui",npm_package_scripts_coverage:"vitest run --coverage",npm_package_dependencies_react_select:"5.8.0",PWD:"/home/runner/work/avocado/avocado/packages/avocado-suite",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/pnpm.cjs",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/avocado/avocado/packages/avocado-suite",npm_package_dependencies_react:"18.2.0",npm_package_peerDependencies_react_select:"5.8.0",INIT_CWD:"/home/runner/work/avocado/avocado/packages/avocado-suite",NODE_ENV:"production"},gg={}.hasOwnProperty,J4=P.createContext(typeof HTMLElement<"u"?DW({key:"css"}):null);J4.Provider;var KW=function(t){return k.forwardRef(function(e,n){var r=k.useContext(J4);return t(e,r,n)})},JW=P.createContext({}),Og="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",eU=function(t,e){var n={};for(var r in e)gg.call(e,r)&&(n[r]=e[r]);return n[Og]=t,n},tU=function(t){var e=t.cache,n=t.serialized,r=t.isStringTag;return q4(e,n,r),HW(function(){return BW(e,n,r)}),null},nU=KW(function(t,e,n){var r=t.css;typeof r=="string"&&e.registered[r]!==void 0&&(r=e.registered[r]);var i=t[Og],o=[r],a="";typeof t.className=="string"?a=RW(e.registered,o,t.className):t.className!=null&&(a=t.className+" ");var s=K4(o,void 0,P.useContext(JW));a+=e.key+"-"+s.name;var l={};for(var c in t)gg.call(t,c)&&c!=="css"&&c!==Og&&GW.NODE_ENV==="production"&&(l[c]=t[c]);return l.ref=n,l.className=a,P.createElement(P.Fragment,null,P.createElement(tU,{cache:e,serialized:s,isStringTag:typeof i=="string"}),P.createElement(i,l))}),rU=nU,Pe=function(t,e){var n=arguments;if(e==null||!gg.call(e,"css"))return P.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=rU,i[1]=eU(t,e);for(var o=2;o<r;o++)i[o]=n[o];return P.createElement.apply(null,i)};function yg(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K4(e)}var iU=function(){var t=yg.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function oU(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var vg=k.useLayoutEffect,aU=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],dh=function(){};function sU(t,e){return e?e[0]==="-"?t+e:t+"__"+e:t}function lU(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(e&&t)for(var a in e)e.hasOwnProperty(a)&&e[a]&&o.push("".concat(sU(t,a)));return o.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var e8=function(t){return OU(t)?t.filter(Boolean):gs(t)==="object"&&t!==null?[t]:[]},t8=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var e=$o(t,aU);return Ee({},e)},Bt=function(t,e,n){var r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.className;return{css:i(e,t),className:r(n??{},o(e,t),a)}};function hh(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function cU(t){return hh(t)?window.innerHeight:t.clientHeight}function n8(t){return hh(t)?window.pageYOffset:t.scrollTop}function ph(t,e){if(hh(t)){window.scrollTo(0,e);return}t.scrollTop=e}function uU(t){var e=getComputedStyle(t),n=e.position==="absolute",r=/(auto|scroll)/;if(e.position==="fixed")return document.documentElement;for(var i=t;i=i.parentElement;)if(e=getComputedStyle(i),!(n&&e.position==="static")&&r.test(e.overflow+e.overflowY+e.overflowX))return i;return document.documentElement}function fU(t,e,n,r){return n*((t=t/r-1)*t*t+1)+e}function mh(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:dh,i=n8(t),o=e-i,a=10,s=0;function l(){s+=a;var c=fU(s,i,o,n);ph(t,c),s<n?window.requestAnimationFrame(l):r(t)}l()}function r8(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=e.offsetHeight/3;r.bottom+i>n.bottom?ph(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+i,t.scrollHeight)):r.top-i<n.top&&ph(t,Math.max(e.offsetTop-i,0))}function dU(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}function i8(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function hU(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var o8=!1,pU={get passive(){return o8=!0}},gh=typeof window<"u"?window:{};gh.addEventListener&&gh.removeEventListener&&(gh.addEventListener("p",dh,pU),gh.removeEventListener("p",dh,!1));var mU=o8;function gU(t){return t!=null}function OU(t){return Array.isArray(t)}function Oh(t,e,n){return t?e:n}var yU=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=Object.entries(t).filter(function(o){var a=Do(o,1),s=a[0];return!n.includes(s)});return i.reduce(function(o,a){var s=Do(a,2),l=s[0],c=s[1];return o[l]=c,o},{})},vU=["children","innerProps"],bU=["children","innerProps"];function wU(t){var e=t.maxHeight,n=t.menuEl,r=t.minHeight,i=t.placement,o=t.shouldScroll,a=t.isFixedPosition,s=t.controlHeight,l=uU(n),c={placement:"bottom",maxHeight:e};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect(),f=u.height,d=n.getBoundingClientRect(),h=d.bottom,m=d.height,g=d.top,p=n.offsetParent.getBoundingClientRect(),O=p.top,w=a?window.innerHeight:cU(l),v=n8(l),b=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),x=O-y,_=w-g,E=x+v,A=f-v-g,I=h-w+v+b,Q=v+g-y,D=160;switch(i){case"auto":case"bottom":if(_>=m)return{placement:"bottom",maxHeight:e};if(A>=m&&!a)return o&&mh(l,I,D),{placement:"bottom",maxHeight:e};if(!a&&A>=r||a&&_>=r){o&&mh(l,I,D);var j=a?_-b:A-b;return{placement:"bottom",maxHeight:j}}if(i==="auto"||a){var R=e,B=a?x:E;return B>=r&&(R=Math.min(B-b-s,e)),{placement:"top",maxHeight:R}}if(i==="bottom")return o&&ph(l,I),{placement:"bottom",maxHeight:e};break;case"top":if(x>=m)return{placement:"top",maxHeight:e};if(E>=m&&!a)return o&&mh(l,Q,D),{placement:"top",maxHeight:e};if(!a&&E>=r||a&&x>=r){var X=e;return(!a&&E>=r||a&&x>=r)&&(X=a?x-y:E-y),o&&mh(l,Q,D),{placement:"top",maxHeight:X}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function xU(t){var e={bottom:"top",top:"bottom"};return t?e[t]:"bottom"}var a8=function(t){return t==="auto"?"bottom":t},_U=function(t,e){var n,r=t.placement,i=t.theme,o=i.borderRadius,a=i.spacing,s=i.colors;return Ee((n={label:"menu"},ou(n,xU(r),"100%"),ou(n,"position","absolute"),ou(n,"width","100%"),ou(n,"zIndex",1),n),e?{}:{backgroundColor:s.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},s8=k.createContext(null),SU=function(t){var e=t.children,n=t.minMenuHeight,r=t.maxMenuHeight,i=t.menuPlacement,o=t.menuPosition,a=t.menuShouldScrollIntoView,s=t.theme,l=k.useContext(s8)||{},c=l.setPortalPlacement,u=k.useRef(null),f=k.useState(r),d=Do(f,2),h=d[0],m=d[1],g=k.useState(null),p=Do(g,2),O=p[0],w=p[1],v=s.spacing.controlHeight;return vg(function(){var b=u.current;if(b){var y=o==="fixed",x=a&&!y,_=wU({maxHeight:r,menuEl:b,minHeight:n,placement:i,shouldScroll:x,isFixedPosition:y,controlHeight:v});m(_.maxHeight),w(_.placement),c==null||c(_.placement)}},[r,i,o,a,n,c,v]),e({ref:u,placerProps:Ee(Ee({},t),{},{placement:O||a8(i),maxHeight:h})})},kU=function(t){var e=t.children,n=t.innerRef,r=t.innerProps;return Pe("div",Te({},Bt(t,"menu",{menu:!0}),{ref:n},r),e)},CU=kU,PU=function(t,e){var n=t.maxHeight,r=t.theme.spacing.baseUnit;return Ee({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},e?{}:{paddingBottom:r,paddingTop:r})},EU=function(t){var e=t.children,n=t.innerProps,r=t.innerRef,i=t.isMulti;return Pe("div",Te({},Bt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":i}),{ref:r},n),e)},l8=function(t,e){var n=t.theme,r=n.spacing.baseUnit,i=n.colors;return Ee({textAlign:"center"},e?{}:{color:i.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},TU=l8,AU=l8,MU=function(t){var e=t.children,n=e===void 0?"No options":e,r=t.innerProps,i=$o(t,vU);return Pe("div",Te({},Bt(Ee(Ee({},i),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},QU=function(t){var e=t.children,n=e===void 0?"Loading...":e,r=t.innerProps,i=$o(t,bU);return Pe("div",Te({},Bt(Ee(Ee({},i),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},DU=function(t){var e=t.rect,n=t.offset,r=t.position;return{left:e.left,position:r,top:n,width:e.width,zIndex:1}},$U=function(t){var e=t.appendTo,n=t.children,r=t.controlElement,i=t.innerProps,o=t.menuPlacement,a=t.menuPosition,s=k.useRef(null),l=k.useRef(null),c=k.useState(a8(o)),u=Do(c,2),f=u[0],d=u[1],h=k.useMemo(function(){return{setPortalPlacement:d}},[]),m=k.useState(null),g=Do(m,2),p=g[0],O=g[1],w=k.useCallback(function(){if(r){var x=dU(r),_=a==="fixed"?0:window.pageYOffset,E=x[f]+_;(E!==(p==null?void 0:p.offset)||x.left!==(p==null?void 0:p.rect.left)||x.width!==(p==null?void 0:p.rect.width))&&O({offset:E,rect:x})}},[r,a,f,p==null?void 0:p.offset,p==null?void 0:p.rect.left,p==null?void 0:p.rect.width]);vg(function(){w()},[w]);var v=k.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),r&&s.current&&(l.current=V9(r,s.current,w,{elementResize:"ResizeObserver"in window}))},[r,w]);vg(function(){v()},[v]);var b=k.useCallback(function(x){s.current=x,v()},[v]);if(!e&&a!=="fixed"||!p)return null;var y=Pe("div",Te({ref:b},Bt(Ee(Ee({},t),{},{offset:p.offset,position:a,rect:p.rect}),"menuPortal",{"menu-portal":!0}),i),n);return Pe(s8.Provider,{value:h},e?Rr.createPortal(y,e):y)},LU=function(t){var e=t.isDisabled,n=t.isRtl;return{label:"container",direction:n?"rtl":void 0,pointerEvents:e?"none":void 0,position:"relative"}},IU=function(t){var e=t.children,n=t.innerProps,r=t.isDisabled,i=t.isRtl;return Pe("div",Te({},Bt(t,"container",{"--is-disabled":r,"--is-rtl":i}),n),e)},jU=function(t,e){var n=t.theme.spacing,r=t.isMulti,i=t.hasValue,o=t.selectProps.controlShouldRenderValue;return Ee({alignItems:"center",display:r&&i&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},e?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(n.baseUnit*2,"px")})},NU=function(t){var e=t.children,n=t.innerProps,r=t.isMulti,i=t.hasValue;return Pe("div",Te({},Bt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":i}),n),e)},RU=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},BU=function(t){var e=t.children,n=t.innerProps;return Pe("div",Te({},Bt(t,"indicatorsContainer",{indicators:!0}),n),e)},c8,ZU=["size"],zU=["innerProps","isRtl","size"],XU={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},u8=function(t){var e=t.size,n=$o(t,ZU);return Pe("svg",Te({height:e,width:e,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:XU},n))},bg=function(t){return Pe(u8,Te({size:20},t),Pe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},f8=function(t){return Pe(u8,Te({size:20},t),Pe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},d8=function(t,e){var n=t.isFocused,r=t.theme,i=r.spacing.baseUnit,o=r.colors;return Ee({label:"indicatorContainer",display:"flex",transition:"color 150ms"},e?{}:{color:n?o.neutral60:o.neutral20,padding:i*2,":hover":{color:n?o.neutral80:o.neutral40}})},VU=d8,FU=function(t){var e=t.children,n=t.innerProps;return Pe("div",Te({},Bt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),e||Pe(f8,null))},YU=d8,qU=function(t){var e=t.children,n=t.innerProps;return Pe("div",Te({},Bt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),e||Pe(bg,null))},WU=function(t,e){var n=t.isDisabled,r=t.theme,i=r.spacing.baseUnit,o=r.colors;return Ee({label:"indicatorSeparator",alignSelf:"stretch",width:1},e?{}:{backgroundColor:n?o.neutral10:o.neutral20,marginBottom:i*2,marginTop:i*2})},UU=function(t){var e=t.innerProps;return Pe("span",Te({},e,Bt(t,"indicatorSeparator",{"indicator-separator":!0})))},HU=iU(c8||(c8=oU([`
656
+ */var V4;function $W(){if(V4)return rt;V4=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,p=t?Symbol.for("react.fundamental"):60117,O=t?Symbol.for("react.responder"):60118,w=t?Symbol.for("react.scope"):60119;function v(y){if(typeof y=="object"&&y!==null){var x=y.$$typeof;switch(x){case e:switch(y=y.type,y){case l:case c:case r:case o:case i:case f:return y;default:switch(y=y&&y.$$typeof,y){case s:case u:case m:case h:case a:return y;default:return x}}case n:return x}}}function b(y){return v(y)===c}return rt.AsyncMode=l,rt.ConcurrentMode=c,rt.ContextConsumer=s,rt.ContextProvider=a,rt.Element=e,rt.ForwardRef=u,rt.Fragment=r,rt.Lazy=m,rt.Memo=h,rt.Portal=n,rt.Profiler=o,rt.StrictMode=i,rt.Suspense=f,rt.isAsyncMode=function(y){return b(y)||v(y)===l},rt.isConcurrentMode=b,rt.isContextConsumer=function(y){return v(y)===s},rt.isContextProvider=function(y){return v(y)===a},rt.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},rt.isForwardRef=function(y){return v(y)===u},rt.isFragment=function(y){return v(y)===r},rt.isLazy=function(y){return v(y)===m},rt.isMemo=function(y){return v(y)===h},rt.isPortal=function(y){return v(y)===n},rt.isProfiler=function(y){return v(y)===o},rt.isStrictMode=function(y){return v(y)===i},rt.isSuspense=function(y){return v(y)===f},rt.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===c||y===o||y===i||y===f||y===d||typeof y=="object"&&y!==null&&(y.$$typeof===m||y.$$typeof===h||y.$$typeof===a||y.$$typeof===s||y.$$typeof===u||y.$$typeof===p||y.$$typeof===O||y.$$typeof===w||y.$$typeof===g)},rt.typeOf=v,rt}X4.exports=$W();var LW=X4.exports,F4=LW,IW={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},jW={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Y4={};Y4[F4.ForwardRef]=IW,Y4[F4.Memo]=jW;var NW=!0;function RW(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):r+=i+" "}),r}var q4=function(t,e,n){var r=t.key+"-"+e.name;(n===!1||NW===!1)&&t.registered[r]===void 0&&(t.registered[r]=e.styles)},BW=function(t,e,n){q4(t,e,n);var r=t.key+"-"+e.name;if(t.inserted[e.name]===void 0){var i=e;do t.insert(e===i?"."+r:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function ZW(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var zW={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},XW={npm_package_exports___require:"./dist/avocado-suite.umd.js",npm_package_devDependencies__types_node:"20.2.5",npm_package_devDependencies_vitest:"1.2.2",npm_package_dependencies_react_toastify:"9.0.3",npm_package_devDependencies__testing_library_jest_dom:"6.4.0",npm_config_user_agent:"pnpm/9.10.0 npm/? node/v20.17.0 linux x64",CI:"true",npm_package_devDependencies__testing_library_user_event:"14.5.2",npm_package_dependencies_embla_carousel_react:"^8.5.2",npm_package_devDependencies_vite:"5.0.12",npm_node_execpath:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_package_publishConfig_access:"public",npm_package_files_0:"dist",HOME:"/home/runner",npm_package_dependencies_react_select_async_paginate:"0.7.3",npm_package_devDependencies_classnames:"2.3.2",npm_package_devDependencies_sass:"1.62.1",npm_package_peerDependencies_react_toastify:"9.0.3",npm_config_auto_install_peers:"true",npm_package_devDependencies_vite_plugin_dts:"3.7.1",npm_package_devDependencies_typescript:"5.1.3",npm_package_peerDependencies_react_select_async_paginate:"0.7.3",npm_package_types:"./dist/index.d.ts",npm_package_devDependencies__types_react_dom:"18.0.11",npm_package_devDependencies__vitejs_plugin_react_swc:"3.5.0",npm_package_type:"module",npm_package_dependencies_react_datepicker:"7.3.0",npm_package_dependencies_zustand:"4.5.4",npm_package_module:"./dist/avocado-suite.es.js",npm_package_devDependencies__types_testing_library__jest_dom:"6.0.0",npm_package_dependencies__foris_avocado_icons:"workspace:*",npm_package_devDependencies__vitest_coverage_v8:"1.2.2",npm_config_registry:"https://registry.npmjs.org/",npm_config_node_linker:"hoisted",npm_package_exports___import:"./dist/avocado-suite.es.js",npm_package_dependencies__foris_avocado_core:"workspace:*",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/avocado/avocado/packages/avocado-suite/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/opt/hostedtoolcache/node/20.17.0/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",TURBO_HASH:"eb947337d08bc87f",npm_package_name:"@foris/avocado-suite",NODE:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_config_frozen_lockfile:"",npm_package_devDependencies__vitest_ui:"1.2.2",npm_config_legacy_peer_deps:"true",LANG:"C.UTF-8",npm_package_dependencies_react_dom:"18.2.0",npm_package_main:"./dist/avocado-suite.umd.js",npm_package_dependencies_react_markdown:"^8.0.3",npm_lifecycle_script:"tsc && vite build",npm_package_scripts_test:"vitest run",SHELL:"/bin/bash",NODE_PATH:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.0.1",npm_package_devDependencies__testing_library_react:"14.2.0",npm_package_devDependencies__types_react:"18.0.28",npm_package_devDependencies_jsdom:"24.0.0",npm_lifecycle_event:"build",npm_package_scripts_build:"tsc && vite build",npm_package_devDependencies__foris_tsconfig:"workspace:*",npm_package_scripts_test_watch:"vitest --ui",npm_package_scripts_coverage:"vitest run --coverage",npm_package_dependencies_react_select:"5.8.0",PWD:"/home/runner/work/avocado/avocado/packages/avocado-suite",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/pnpm.cjs",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/avocado/avocado/packages/avocado-suite",npm_package_dependencies_react:"18.2.0",npm_package_peerDependencies_react_select:"5.8.0",INIT_CWD:"/home/runner/work/avocado/avocado/packages/avocado-suite",NODE_ENV:"production"},VW=/[A-Z]|^ms/g,FW=/_EMO_([^_]+?)_([^]*?)_EMO_/g,W4=function(t){return t.charCodeAt(1)===45},U4=function(t){return t!=null&&typeof t!="boolean"},mg=kW(function(t){return W4(t)?t:t.replace(VW,"-$&").toLowerCase()}),H4=function(t,e){switch(t){case"animation":case"animationName":if(typeof e=="string")return e.replace(FW,function(n,r,i){return Zi={name:r,styles:i,next:Zi},r})}return zW[t]!==1&&!W4(t)&&typeof e=="number"&&e!==0?e+"px":e},YW="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function uu(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Zi={name:n.name,styles:n.styles,next:Zi},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Zi={name:r.name,styles:r.styles,next:Zi},r=r.next;var i=n.styles+";";return i}return qW(t,e,n)}case"function":{if(t!==void 0){var o=Zi,a=n(t);return Zi=o,uu(t,e,a)}break}}return n}function qW(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=uu(t,e,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object")U4(a)&&(r+=mg(o)+":"+H4(o,a)+";");else{if(o==="NO_COMPONENT_SELECTOR"&&XW.NODE_ENV!=="production")throw new Error(YW);if(Array.isArray(a)&&typeof a[0]=="string"&&e==null)for(var s=0;s<a.length;s++)U4(a[s])&&(r+=mg(o)+":"+H4(o,a[s])+";");else{var l=uu(t,e,a);switch(o){case"animation":case"animationName":{r+=mg(o)+":"+l+";";break}default:r+=o+"{"+l+"}"}}}}return r}var G4=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Zi,K4=function(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var r=!0,i="";Zi=void 0;var o=t[0];o==null||o.raw===void 0?(r=!1,i+=uu(n,e,o)):i+=o[0];for(var a=1;a<t.length;a++)i+=uu(n,e,t[a]),r&&(i+=o[a]);G4.lastIndex=0;for(var s="",l;(l=G4.exec(i))!==null;)s+="-"+l[1];var c=ZW(i)+s;return{name:c,styles:i,next:Zi}},WW=function(t){return t()},UW=P.useInsertionEffect?P.useInsertionEffect:!1,HW=UW||WW,GW={npm_package_exports___require:"./dist/avocado-suite.umd.js",npm_package_devDependencies__types_node:"20.2.5",npm_package_devDependencies_vitest:"1.2.2",npm_package_dependencies_react_toastify:"9.0.3",npm_package_devDependencies__testing_library_jest_dom:"6.4.0",npm_config_user_agent:"pnpm/9.10.0 npm/? node/v20.17.0 linux x64",CI:"true",npm_package_devDependencies__testing_library_user_event:"14.5.2",npm_package_dependencies_embla_carousel_react:"^8.5.2",npm_package_devDependencies_vite:"5.0.12",npm_node_execpath:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_package_publishConfig_access:"public",npm_package_files_0:"dist",HOME:"/home/runner",npm_package_dependencies_react_select_async_paginate:"0.7.3",npm_package_devDependencies_classnames:"2.3.2",npm_package_devDependencies_sass:"1.62.1",npm_package_peerDependencies_react_toastify:"9.0.3",npm_config_auto_install_peers:"true",npm_package_devDependencies_vite_plugin_dts:"3.7.1",npm_package_devDependencies_typescript:"5.1.3",npm_package_peerDependencies_react_select_async_paginate:"0.7.3",npm_package_types:"./dist/index.d.ts",npm_package_devDependencies__types_react_dom:"18.0.11",npm_package_devDependencies__vitejs_plugin_react_swc:"3.5.0",npm_package_type:"module",npm_package_dependencies_react_datepicker:"7.3.0",npm_package_dependencies_zustand:"4.5.4",npm_package_module:"./dist/avocado-suite.es.js",npm_package_devDependencies__types_testing_library__jest_dom:"6.0.0",npm_package_dependencies__foris_avocado_icons:"workspace:*",npm_package_devDependencies__vitest_coverage_v8:"1.2.2",npm_config_registry:"https://registry.npmjs.org/",npm_config_node_linker:"hoisted",npm_package_exports___import:"./dist/avocado-suite.es.js",npm_package_dependencies__foris_avocado_core:"workspace:*",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/avocado/avocado/packages/avocado-suite/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/opt/hostedtoolcache/node/20.17.0/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",TURBO_HASH:"eb947337d08bc87f",npm_package_name:"@foris/avocado-suite",NODE:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_config_frozen_lockfile:"",npm_package_devDependencies__vitest_ui:"1.2.2",npm_config_legacy_peer_deps:"true",LANG:"C.UTF-8",npm_package_dependencies_react_dom:"18.2.0",npm_package_main:"./dist/avocado-suite.umd.js",npm_package_dependencies_react_markdown:"^8.0.3",npm_lifecycle_script:"tsc && vite build",npm_package_scripts_test:"vitest run",SHELL:"/bin/bash",NODE_PATH:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.0.1",npm_package_devDependencies__testing_library_react:"14.2.0",npm_package_devDependencies__types_react:"18.0.28",npm_package_devDependencies_jsdom:"24.0.0",npm_lifecycle_event:"build",npm_package_scripts_build:"tsc && vite build",npm_package_devDependencies__foris_tsconfig:"workspace:*",npm_package_scripts_test_watch:"vitest --ui",npm_package_scripts_coverage:"vitest run --coverage",npm_package_dependencies_react_select:"5.8.0",PWD:"/home/runner/work/avocado/avocado/packages/avocado-suite",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/pnpm.cjs",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/avocado/avocado/packages/avocado-suite",npm_package_dependencies_react:"18.2.0",npm_package_peerDependencies_react_select:"5.8.0",INIT_CWD:"/home/runner/work/avocado/avocado/packages/avocado-suite",NODE_ENV:"production"},gg={}.hasOwnProperty,J4=P.createContext(typeof HTMLElement<"u"?DW({key:"css"}):null);J4.Provider;var KW=function(t){return k.forwardRef(function(e,n){var r=k.useContext(J4);return t(e,r,n)})},JW=P.createContext({}),Og="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",eU=function(t,e){var n={};for(var r in e)gg.call(e,r)&&(n[r]=e[r]);return n[Og]=t,n},tU=function(t){var e=t.cache,n=t.serialized,r=t.isStringTag;return q4(e,n,r),HW(function(){return BW(e,n,r)}),null},nU=KW(function(t,e,n){var r=t.css;typeof r=="string"&&e.registered[r]!==void 0&&(r=e.registered[r]);var i=t[Og],o=[r],a="";typeof t.className=="string"?a=RW(e.registered,o,t.className):t.className!=null&&(a=t.className+" ");var s=K4(o,void 0,P.useContext(JW));a+=e.key+"-"+s.name;var l={};for(var c in t)gg.call(t,c)&&c!=="css"&&c!==Og&&GW.NODE_ENV==="production"&&(l[c]=t[c]);return l.ref=n,l.className=a,P.createElement(P.Fragment,null,P.createElement(tU,{cache:e,serialized:s,isStringTag:typeof i=="string"}),P.createElement(i,l))}),rU=nU,Pe=function(t,e){var n=arguments;if(e==null||!gg.call(e,"css"))return P.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=rU,i[1]=eU(t,e);for(var o=2;o<r;o++)i[o]=n[o];return P.createElement.apply(null,i)};function yg(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K4(e)}var iU=function(){var t=yg.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function oU(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var vg=k.useLayoutEffect,aU=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],dh=function(){};function sU(t,e){return e?e[0]==="-"?t+e:t+"__"+e:t}function lU(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(e&&t)for(var a in e)e.hasOwnProperty(a)&&e[a]&&o.push("".concat(sU(t,a)));return o.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var e7=function(t){return OU(t)?t.filter(Boolean):gs(t)==="object"&&t!==null?[t]:[]},t7=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var e=$o(t,aU);return Ee({},e)},Bt=function(t,e,n){var r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.className;return{css:i(e,t),className:r(n??{},o(e,t),a)}};function hh(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function cU(t){return hh(t)?window.innerHeight:t.clientHeight}function n7(t){return hh(t)?window.pageYOffset:t.scrollTop}function ph(t,e){if(hh(t)){window.scrollTo(0,e);return}t.scrollTop=e}function uU(t){var e=getComputedStyle(t),n=e.position==="absolute",r=/(auto|scroll)/;if(e.position==="fixed")return document.documentElement;for(var i=t;i=i.parentElement;)if(e=getComputedStyle(i),!(n&&e.position==="static")&&r.test(e.overflow+e.overflowY+e.overflowX))return i;return document.documentElement}function fU(t,e,n,r){return n*((t=t/r-1)*t*t+1)+e}function mh(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:dh,i=n7(t),o=e-i,a=10,s=0;function l(){s+=a;var c=fU(s,i,o,n);ph(t,c),s<n?window.requestAnimationFrame(l):r(t)}l()}function r7(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=e.offsetHeight/3;r.bottom+i>n.bottom?ph(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+i,t.scrollHeight)):r.top-i<n.top&&ph(t,Math.max(e.offsetTop-i,0))}function dU(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}function i7(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function hU(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var o7=!1,pU={get passive(){return o7=!0}},gh=typeof window<"u"?window:{};gh.addEventListener&&gh.removeEventListener&&(gh.addEventListener("p",dh,pU),gh.removeEventListener("p",dh,!1));var mU=o7;function gU(t){return t!=null}function OU(t){return Array.isArray(t)}function Oh(t,e,n){return t?e:n}var yU=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=Object.entries(t).filter(function(o){var a=Do(o,1),s=a[0];return!n.includes(s)});return i.reduce(function(o,a){var s=Do(a,2),l=s[0],c=s[1];return o[l]=c,o},{})},vU=["children","innerProps"],bU=["children","innerProps"];function wU(t){var e=t.maxHeight,n=t.menuEl,r=t.minHeight,i=t.placement,o=t.shouldScroll,a=t.isFixedPosition,s=t.controlHeight,l=uU(n),c={placement:"bottom",maxHeight:e};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect(),f=u.height,d=n.getBoundingClientRect(),h=d.bottom,m=d.height,g=d.top,p=n.offsetParent.getBoundingClientRect(),O=p.top,w=a?window.innerHeight:cU(l),v=n7(l),b=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),x=O-y,_=w-g,E=x+v,A=f-v-g,I=h-w+v+b,Q=v+g-y,D=160;switch(i){case"auto":case"bottom":if(_>=m)return{placement:"bottom",maxHeight:e};if(A>=m&&!a)return o&&mh(l,I,D),{placement:"bottom",maxHeight:e};if(!a&&A>=r||a&&_>=r){o&&mh(l,I,D);var j=a?_-b:A-b;return{placement:"bottom",maxHeight:j}}if(i==="auto"||a){var R=e,B=a?x:E;return B>=r&&(R=Math.min(B-b-s,e)),{placement:"top",maxHeight:R}}if(i==="bottom")return o&&ph(l,I),{placement:"bottom",maxHeight:e};break;case"top":if(x>=m)return{placement:"top",maxHeight:e};if(E>=m&&!a)return o&&mh(l,Q,D),{placement:"top",maxHeight:e};if(!a&&E>=r||a&&x>=r){var X=e;return(!a&&E>=r||a&&x>=r)&&(X=a?x-y:E-y),o&&mh(l,Q,D),{placement:"top",maxHeight:X}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function xU(t){var e={bottom:"top",top:"bottom"};return t?e[t]:"bottom"}var a7=function(t){return t==="auto"?"bottom":t},_U=function(t,e){var n,r=t.placement,i=t.theme,o=i.borderRadius,a=i.spacing,s=i.colors;return Ee((n={label:"menu"},ou(n,xU(r),"100%"),ou(n,"position","absolute"),ou(n,"width","100%"),ou(n,"zIndex",1),n),e?{}:{backgroundColor:s.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},s7=k.createContext(null),SU=function(t){var e=t.children,n=t.minMenuHeight,r=t.maxMenuHeight,i=t.menuPlacement,o=t.menuPosition,a=t.menuShouldScrollIntoView,s=t.theme,l=k.useContext(s7)||{},c=l.setPortalPlacement,u=k.useRef(null),f=k.useState(r),d=Do(f,2),h=d[0],m=d[1],g=k.useState(null),p=Do(g,2),O=p[0],w=p[1],v=s.spacing.controlHeight;return vg(function(){var b=u.current;if(b){var y=o==="fixed",x=a&&!y,_=wU({maxHeight:r,menuEl:b,minHeight:n,placement:i,shouldScroll:x,isFixedPosition:y,controlHeight:v});m(_.maxHeight),w(_.placement),c==null||c(_.placement)}},[r,i,o,a,n,c,v]),e({ref:u,placerProps:Ee(Ee({},t),{},{placement:O||a7(i),maxHeight:h})})},kU=function(t){var e=t.children,n=t.innerRef,r=t.innerProps;return Pe("div",Te({},Bt(t,"menu",{menu:!0}),{ref:n},r),e)},CU=kU,PU=function(t,e){var n=t.maxHeight,r=t.theme.spacing.baseUnit;return Ee({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},e?{}:{paddingBottom:r,paddingTop:r})},EU=function(t){var e=t.children,n=t.innerProps,r=t.innerRef,i=t.isMulti;return Pe("div",Te({},Bt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":i}),{ref:r},n),e)},l7=function(t,e){var n=t.theme,r=n.spacing.baseUnit,i=n.colors;return Ee({textAlign:"center"},e?{}:{color:i.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},TU=l7,AU=l7,MU=function(t){var e=t.children,n=e===void 0?"No options":e,r=t.innerProps,i=$o(t,vU);return Pe("div",Te({},Bt(Ee(Ee({},i),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},QU=function(t){var e=t.children,n=e===void 0?"Loading...":e,r=t.innerProps,i=$o(t,bU);return Pe("div",Te({},Bt(Ee(Ee({},i),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},DU=function(t){var e=t.rect,n=t.offset,r=t.position;return{left:e.left,position:r,top:n,width:e.width,zIndex:1}},$U=function(t){var e=t.appendTo,n=t.children,r=t.controlElement,i=t.innerProps,o=t.menuPlacement,a=t.menuPosition,s=k.useRef(null),l=k.useRef(null),c=k.useState(a7(o)),u=Do(c,2),f=u[0],d=u[1],h=k.useMemo(function(){return{setPortalPlacement:d}},[]),m=k.useState(null),g=Do(m,2),p=g[0],O=g[1],w=k.useCallback(function(){if(r){var x=dU(r),_=a==="fixed"?0:window.pageYOffset,E=x[f]+_;(E!==(p==null?void 0:p.offset)||x.left!==(p==null?void 0:p.rect.left)||x.width!==(p==null?void 0:p.rect.width))&&O({offset:E,rect:x})}},[r,a,f,p==null?void 0:p.offset,p==null?void 0:p.rect.left,p==null?void 0:p.rect.width]);vg(function(){w()},[w]);var v=k.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),r&&s.current&&(l.current=V9(r,s.current,w,{elementResize:"ResizeObserver"in window}))},[r,w]);vg(function(){v()},[v]);var b=k.useCallback(function(x){s.current=x,v()},[v]);if(!e&&a!=="fixed"||!p)return null;var y=Pe("div",Te({ref:b},Bt(Ee(Ee({},t),{},{offset:p.offset,position:a,rect:p.rect}),"menuPortal",{"menu-portal":!0}),i),n);return Pe(s7.Provider,{value:h},e?Rr.createPortal(y,e):y)},LU=function(t){var e=t.isDisabled,n=t.isRtl;return{label:"container",direction:n?"rtl":void 0,pointerEvents:e?"none":void 0,position:"relative"}},IU=function(t){var e=t.children,n=t.innerProps,r=t.isDisabled,i=t.isRtl;return Pe("div",Te({},Bt(t,"container",{"--is-disabled":r,"--is-rtl":i}),n),e)},jU=function(t,e){var n=t.theme.spacing,r=t.isMulti,i=t.hasValue,o=t.selectProps.controlShouldRenderValue;return Ee({alignItems:"center",display:r&&i&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},e?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(n.baseUnit*2,"px")})},NU=function(t){var e=t.children,n=t.innerProps,r=t.isMulti,i=t.hasValue;return Pe("div",Te({},Bt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":i}),n),e)},RU=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},BU=function(t){var e=t.children,n=t.innerProps;return Pe("div",Te({},Bt(t,"indicatorsContainer",{indicators:!0}),n),e)},c7,ZU=["size"],zU=["innerProps","isRtl","size"],XU={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},u7=function(t){var e=t.size,n=$o(t,ZU);return Pe("svg",Te({height:e,width:e,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:XU},n))},bg=function(t){return Pe(u7,Te({size:20},t),Pe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},f7=function(t){return Pe(u7,Te({size:20},t),Pe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},d7=function(t,e){var n=t.isFocused,r=t.theme,i=r.spacing.baseUnit,o=r.colors;return Ee({label:"indicatorContainer",display:"flex",transition:"color 150ms"},e?{}:{color:n?o.neutral60:o.neutral20,padding:i*2,":hover":{color:n?o.neutral80:o.neutral40}})},VU=d7,FU=function(t){var e=t.children,n=t.innerProps;return Pe("div",Te({},Bt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),e||Pe(f7,null))},YU=d7,qU=function(t){var e=t.children,n=t.innerProps;return Pe("div",Te({},Bt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),e||Pe(bg,null))},WU=function(t,e){var n=t.isDisabled,r=t.theme,i=r.spacing.baseUnit,o=r.colors;return Ee({label:"indicatorSeparator",alignSelf:"stretch",width:1},e?{}:{backgroundColor:n?o.neutral10:o.neutral20,marginBottom:i*2,marginTop:i*2})},UU=function(t){var e=t.innerProps;return Pe("span",Te({},e,Bt(t,"indicatorSeparator",{"indicator-separator":!0})))},HU=iU(c7||(c7=oU([`
657
657
  0%, 80%, 100% { opacity: 0; }
658
658
  40% { opacity: 1; }
659
- `]))),GU=function(t,e){var n=t.isFocused,r=t.size,i=t.theme,o=i.colors,a=i.spacing.baseUnit;return Ee({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},e?{}:{color:n?o.neutral60:o.neutral20,padding:a*2})},wg=function(t){var e=t.delay,n=t.offset;return Pe("span",{css:yg({animation:"".concat(HU," 1s ease-in-out ").concat(e,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},KU=function(t){var e=t.innerProps,n=t.isRtl,r=t.size,i=r===void 0?4:r,o=$o(t,zU);return Pe("div",Te({},Bt(Ee(Ee({},o),{},{innerProps:e,isRtl:n,size:i}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),e),Pe(wg,{delay:0,offset:n}),Pe(wg,{delay:160,offset:!0}),Pe(wg,{delay:320,offset:!n}))},JU=function(t,e){var n=t.isDisabled,r=t.isFocused,i=t.theme,o=i.colors,a=i.borderRadius,s=i.spacing;return Ee({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},e?{}:{backgroundColor:n?o.neutral5:o.neutral0,borderColor:n?o.neutral10:r?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:r?o.primary:o.neutral30}})},eH=function(t){var e=t.children,n=t.isDisabled,r=t.isFocused,i=t.innerRef,o=t.innerProps,a=t.menuIsOpen;return Pe("div",Te({ref:i},Bt(t,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),o,{"aria-disabled":n||void 0}),e)},tH=eH,nH=["data"],rH=function(t,e){var n=t.theme.spacing;return e?{}:{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},iH=function(t){var e=t.children,n=t.cx,r=t.getStyles,i=t.getClassNames,o=t.Heading,a=t.headingProps,s=t.innerProps,l=t.label,c=t.theme,u=t.selectProps;return Pe("div",Te({},Bt(t,"group",{group:!0}),s),Pe(o,Te({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:i,cx:n}),l),Pe("div",null,e))},oH=function(t,e){var n=t.theme,r=n.colors,i=n.spacing;return Ee({label:"group",cursor:"default",display:"block"},e?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:i.baseUnit*3,paddingRight:i.baseUnit*3,textTransform:"uppercase"})},aH=function(t){var e=t8(t);e.data;var n=$o(e,nH);return Pe("div",Te({},Bt(t,"groupHeading",{"group-heading":!0}),n))},sH=iH,lH=["innerRef","isDisabled","isHidden","inputClassName"],cH=function(t,e){var n=t.isDisabled,r=t.value,i=t.theme,o=i.spacing,a=i.colors;return Ee(Ee({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},uH),e?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:a.neutral80})},h8={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},uH={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ee({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},h8)},fH=function(t){return Ee({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},h8)},dH=function(t){var e=t.cx,n=t.value,r=t8(t),i=r.innerRef,o=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=$o(r,lH);return Pe("div",Te({},Bt(t,"input",{"input-container":!0}),{"data-value":n||""}),Pe("input",Te({className:e({input:!0},s),ref:i,style:fH(a),disabled:o},l)))},hH=dH,pH=function(t,e){var n=t.theme,r=n.spacing,i=n.borderRadius,o=n.colors;return Ee({label:"multiValue",display:"flex",minWidth:0},e?{}:{backgroundColor:o.neutral10,borderRadius:i/2,margin:r.baseUnit/2})},mH=function(t,e){var n=t.theme,r=n.borderRadius,i=n.colors,o=t.cropWithEllipsis;return Ee({overflow:"hidden",textOverflow:o||o===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},e?{}:{borderRadius:r/2,color:i.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},gH=function(t,e){var n=t.theme,r=n.spacing,i=n.borderRadius,o=n.colors,a=t.isFocused;return Ee({alignItems:"center",display:"flex"},e?{}:{borderRadius:i/2,backgroundColor:a?o.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},p8=function(t){var e=t.children,n=t.innerProps;return Pe("div",n,e)},OH=p8,yH=p8;function vH(t){var e=t.children,n=t.innerProps;return Pe("div",Te({role:"button"},n),e||Pe(bg,{size:14}))}var bH=function(t){var e=t.children,n=t.components,r=t.data,i=t.innerProps,o=t.isDisabled,a=t.removeProps,s=t.selectProps,l=n.Container,c=n.Label,u=n.Remove;return Pe(l,{data:r,innerProps:Ee(Ee({},Bt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),i),selectProps:s},Pe(c,{data:r,innerProps:Ee({},Bt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},e),Pe(u,{data:r,innerProps:Ee(Ee({},Bt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(e||"option")},a),selectProps:s}))},wH=bH,xH=function(t,e){var n=t.isDisabled,r=t.isFocused,i=t.isSelected,o=t.theme,a=o.spacing,s=o.colors;return Ee({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},e?{}:{backgroundColor:i?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:i?s.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:n?void 0:i?s.primary:s.primary50}})},_H=function(t){var e=t.children,n=t.isDisabled,r=t.isFocused,i=t.isSelected,o=t.innerRef,a=t.innerProps;return Pe("div",Te({},Bt(t,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":i}),{ref:o,"aria-disabled":n},a),e)},SH=_H,kH=function(t,e){var n=t.theme,r=n.spacing,i=n.colors;return Ee({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},e?{}:{color:i.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},CH=function(t){var e=t.children,n=t.innerProps;return Pe("div",Te({},Bt(t,"placeholder",{placeholder:!0}),n),e)},PH=CH,EH=function(t,e){var n=t.isDisabled,r=t.theme,i=r.spacing,o=r.colors;return Ee({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e?{}:{color:n?o.neutral40:o.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},TH=function(t){var e=t.children,n=t.isDisabled,r=t.innerProps;return Pe("div",Te({},Bt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),e)},AH=TH,yh={ClearIndicator:qU,Control:tH,DropdownIndicator:FU,DownChevron:f8,CrossIcon:bg,Group:sH,GroupHeading:aH,IndicatorsContainer:BU,IndicatorSeparator:UU,Input:hH,LoadingIndicator:KU,Menu:CU,MenuList:EU,MenuPortal:$U,LoadingMessage:QU,NoOptionsMessage:MU,MultiValue:wH,MultiValueContainer:OH,MultiValueLabel:yH,MultiValueRemove:vH,Option:SH,Placeholder:PH,SelectContainer:IU,SingleValue:AH,ValueContainer:NU},MH=function(t){return Ee(Ee({},yh),t.components)},m8=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function QH(t,e){return!!(t===e||m8(t)&&m8(e))}function DH(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!QH(t[n],e[n]))return!1;return!0}function $H(t,e){e===void 0&&(e=DH);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&e(i,n.lastArgs))return n.lastResult;var a=t.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}for(var LH={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},IH=function(t){return Pe("span",Te({css:LH},t))},g8=IH,jH={guidance:function(t){var e=t.isSearchable,n=t.isMulti,r=t.tabSelectsValue,i=t.context,o=t.isInitialFocus;switch(i){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(t["aria-label"]||"Select"," is focused ").concat(e?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var e=t.action,n=t.label,r=n===void 0?"":n,i=t.labels,o=t.isDisabled;switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(i.length>1?"s":""," ").concat(i.join(","),", selected.");case"select-option":return o?"option ".concat(r," is disabled. Select another option."):"option ".concat(r,", selected.");default:return""}},onFocus:function(t){var e=t.context,n=t.focused,r=t.options,i=t.label,o=i===void 0?"":i,a=t.selectValue,s=t.isDisabled,l=t.isSelected,c=t.isAppleDevice,u=function(h,m){return h&&h.length?"".concat(h.indexOf(m)+1," of ").concat(h.length):""};if(e==="value"&&a)return"value ".concat(o," focused, ").concat(u(a,n),".");if(e==="menu"&&c){var f=s?" disabled":"",d="".concat(l?" selected":"").concat(f);return"".concat(o).concat(d,", ").concat(u(r,n),".")}return""},onFilter:function(t){var e=t.inputValue,n=t.resultsMessage;return"".concat(n).concat(e?" for search term "+e:"",".")}},NH=function(t){var e=t.ariaSelection,n=t.focusedOption,r=t.focusedValue,i=t.focusableOptions,o=t.isFocused,a=t.selectValue,s=t.selectProps,l=t.id,c=t.isAppleDevice,u=s.ariaLiveMessages,f=s.getOptionLabel,d=s.inputValue,h=s.isMulti,m=s.isOptionDisabled,g=s.isSearchable,p=s.menuIsOpen,O=s.options,w=s.screenReaderStatus,v=s.tabSelectsValue,b=s.isLoading,y=s["aria-label"],x=s["aria-live"],_=k.useMemo(function(){return Ee(Ee({},jH),u||{})},[u]),E=k.useMemo(function(){var R="";if(e&&_.onChange){var B=e.option,X=e.options,V=e.removedValue,K=e.removedValues,ne=e.value,L=function(we){return Array.isArray(we)?null:we},fe=V||B||L(ne),oe=fe?f(fe):"",T=X||K||void 0,W=T?T.map(f):[],ee=Ee({isDisabled:fe&&m(fe,a),label:oe,labels:W},e);R=_.onChange(ee)}return R},[e,_,m,a,f]),A=k.useMemo(function(){var R="",B=n||r,X=!!(n&&a&&a.includes(n));if(B&&_.onFocus){var V={focused:B,label:f(B),isDisabled:m(B,a),isSelected:X,options:i,context:B===n?"menu":"value",selectValue:a,isAppleDevice:c};R=_.onFocus(V)}return R},[n,r,f,m,_,i,a,c]),I=k.useMemo(function(){var R="";if(p&&O.length&&!b&&_.onFilter){var B=w({count:i.length});R=_.onFilter({inputValue:d,resultsMessage:B})}return R},[i,d,p,_,O,w,b]),Q=(e==null?void 0:e.action)==="initial-input-focus",D=k.useMemo(function(){var R="";if(_.guidance){var B=r?"value":p?"menu":"input";R=_.guidance({"aria-label":y,context:B,isDisabled:n&&m(n,a),isMulti:h,isSearchable:g,tabSelectsValue:v,isInitialFocus:Q})}return R},[y,n,r,h,m,g,p,_,a,v,Q]),j=Pe(k.Fragment,null,Pe("span",{id:"aria-selection"},E),Pe("span",{id:"aria-focused"},A),Pe("span",{id:"aria-results"},I),Pe("span",{id:"aria-guidance"},D));return Pe(k.Fragment,null,Pe(g8,{id:l},Q&&j),Pe(g8,{"aria-live":x,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!Q&&j))},RH=NH,xg=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],BH=new RegExp("["+xg.map(function(t){return t.letters}).join("")+"]","g"),O8={},_g=0;_g<xg.length;_g++)for(var Sg=xg[_g],kg=0;kg<Sg.letters.length;kg++)O8[Sg.letters[kg]]=Sg.base;var y8=function(t){return t.replace(BH,function(e){return O8[e]})},ZH=$H(y8),v8=function(t){return t.replace(/^\s+|\s+$/g,"")},zH=function(t){return"".concat(t.label," ").concat(t.value)},XH=function(t){return function(e,n){if(e.data.__isNew__)return!0;var r=Ee({ignoreCase:!0,ignoreAccents:!0,stringify:zH,trim:!0,matchFrom:"any"},t),i=r.ignoreCase,o=r.ignoreAccents,a=r.stringify,s=r.trim,l=r.matchFrom,c=s?v8(n):n,u=s?v8(a(e)):a(e);return i&&(c=c.toLowerCase(),u=u.toLowerCase()),o&&(c=ZH(c),u=y8(u)),l==="start"?u.substr(0,c.length)===c:u.indexOf(c)>-1}},VH=["innerRef"];function FH(t){var e=t.innerRef,n=$o(t,VH),r=yU(n,"onExited","in","enter","exit","appear");return Pe("input",Te({ref:e},r,{css:yg({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var YH=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function qH(t){var e=t.isEnabled,n=t.onBottomArrive,r=t.onBottomLeave,i=t.onTopArrive,o=t.onTopLeave,a=k.useRef(!1),s=k.useRef(!1),l=k.useRef(0),c=k.useRef(null),u=k.useCallback(function(p,O){if(c.current!==null){var w=c.current,v=w.scrollTop,b=w.scrollHeight,y=w.clientHeight,x=c.current,_=O>0,E=b-y-v,A=!1;E>O&&a.current&&(r&&r(p),a.current=!1),_&&s.current&&(o&&o(p),s.current=!1),_&&O>E?(n&&!a.current&&n(p),x.scrollTop=b,A=!0,a.current=!0):!_&&-O>v&&(i&&!s.current&&i(p),x.scrollTop=0,A=!0,s.current=!0),A&&YH(p)}},[n,r,i,o]),f=k.useCallback(function(p){u(p,p.deltaY)},[u]),d=k.useCallback(function(p){l.current=p.changedTouches[0].clientY},[]),h=k.useCallback(function(p){var O=l.current-p.changedTouches[0].clientY;u(p,O)},[u]),m=k.useCallback(function(p){if(p){var O=mU?{passive:!1}:!1;p.addEventListener("wheel",f,O),p.addEventListener("touchstart",d,O),p.addEventListener("touchmove",h,O)}},[h,d,f]),g=k.useCallback(function(p){p&&(p.removeEventListener("wheel",f,!1),p.removeEventListener("touchstart",d,!1),p.removeEventListener("touchmove",h,!1))},[h,d,f]);return k.useEffect(function(){if(e){var p=c.current;return m(p),function(){g(p)}}},[e,m,g]),function(p){c.current=p}}var b8=["boxSizing","height","overflow","paddingRight","position"],w8={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function x8(t){t.preventDefault()}function _8(t){t.stopPropagation()}function S8(){var t=this.scrollTop,e=this.scrollHeight,n=t+this.offsetHeight;t===0?this.scrollTop=1:n===e&&(this.scrollTop=t-1)}function k8(){return"ontouchstart"in window||navigator.maxTouchPoints}var C8=!!(typeof window<"u"&&window.document&&window.document.createElement),fu=0,El={capture:!1,passive:!1};function WH(t){var e=t.isEnabled,n=t.accountForScrollbars,r=n===void 0?!0:n,i=k.useRef({}),o=k.useRef(null),a=k.useCallback(function(l){if(C8){var c=document.body,u=c&&c.style;if(r&&b8.forEach(function(m){var g=u&&u[m];i.current[m]=g}),r&&fu<1){var f=parseInt(i.current.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,h=window.innerWidth-d+f||0;Object.keys(w8).forEach(function(m){var g=w8[m];u&&(u[m]=g)}),u&&(u.paddingRight="".concat(h,"px"))}c&&k8()&&(c.addEventListener("touchmove",x8,El),l&&(l.addEventListener("touchstart",S8,El),l.addEventListener("touchmove",_8,El))),fu+=1}},[r]),s=k.useCallback(function(l){if(C8){var c=document.body,u=c&&c.style;fu=Math.max(fu-1,0),r&&fu<1&&b8.forEach(function(f){var d=i.current[f];u&&(u[f]=d)}),c&&k8()&&(c.removeEventListener("touchmove",x8,El),l&&(l.removeEventListener("touchstart",S8,El),l.removeEventListener("touchmove",_8,El)))}},[r]);return k.useEffect(function(){if(e){var l=o.current;return a(l),function(){s(l)}}},[e,a,s]),function(l){o.current=l}}var UH=function(t){var e=t.target;return e.ownerDocument.activeElement&&e.ownerDocument.activeElement.blur()},HH={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function GH(t){var e=t.children,n=t.lockEnabled,r=t.captureEnabled,i=r===void 0?!0:r,o=t.onBottomArrive,a=t.onBottomLeave,s=t.onTopArrive,l=t.onTopLeave,c=qH({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:s,onTopLeave:l}),u=WH({isEnabled:n}),f=function(d){c(d),u(d)};return Pe(k.Fragment,null,n&&Pe("div",{onClick:UH,css:HH}),e(f))}var KH={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},JH=function(t){var e=t.name,n=t.onFocus;return Pe("input",{required:!0,name:e,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:KH,value:"",onChange:function(){}})},eG=JH;function Cg(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function tG(){return Cg(/^iPhone/i)}function P8(){return Cg(/^Mac/i)}function nG(){return Cg(/^iPad/i)||P8()&&navigator.maxTouchPoints>1}function rG(){return tG()||nG()}function iG(){return P8()||rG()}var oG=function(t){return t.label},aG=function(t){return t.label},sG=function(t){return t.value},lG=function(t){return!!t.isDisabled},cG={clearIndicator:YU,container:LU,control:JU,dropdownIndicator:VU,group:rH,groupHeading:oH,indicatorsContainer:RU,indicatorSeparator:WU,input:cH,loadingIndicator:GU,loadingMessage:AU,menu:_U,menuList:PU,menuPortal:DU,multiValue:pH,multiValueLabel:mH,multiValueRemove:gH,noOptionsMessage:TU,option:xH,placeholder:kH,singleValue:EH,valueContainer:jU},uG={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},fG=4,E8=4,dG=38,hG=E8*2,pG={baseUnit:E8,controlHeight:dG,menuGutter:hG},Pg={borderRadius:fG,colors:uG,spacing:pG},mG={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:i8(),captureMenuScroll:!i8(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:XH(),formatGroupLabel:oG,getOptionLabel:aG,getOptionValue:sG,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:lG,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!hU(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var e=t.count;return"".concat(e," result").concat(e!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function T8(t,e,n,r){var i=$8(t,e,n),o=L8(t,e,n),a=D8(t,e),s=bh(t,e);return{type:"option",data:e,isDisabled:i,isSelected:o,label:a,value:s,index:r}}function vh(t,e){return t.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,s){return T8(t,a,e,s)}).filter(function(a){return Q8(t,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=T8(t,n,e,r);return Q8(t,o)?o:void 0}).filter(gU)}function A8(t){return t.reduce(function(e,n){return n.type==="group"?e.push.apply(e,cg(n.options.map(function(r){return r.data}))):e.push(n.data),e},[])}function M8(t,e){return t.reduce(function(n,r){return r.type==="group"?n.push.apply(n,cg(r.options.map(function(i){return{data:i.data,id:"".concat(e,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(e,"-").concat(r.index)}),n},[])}function gG(t,e){return A8(vh(t,e))}function Q8(t,e){var n=t.inputValue,r=n===void 0?"":n,i=e.data,o=e.isSelected,a=e.label,s=e.value;return(!j8(t)||!o)&&I8(t,{label:a,value:s,data:i},r)}function OG(t,e){var n=t.focusedValue,r=t.selectValue,i=r.indexOf(n);if(i>-1){var o=e.indexOf(n);if(o>-1)return n;if(i<e.length)return e[i]}return null}function yG(t,e){var n=t.focusedOption;return n&&e.indexOf(n)>-1?n:e[0]}var Eg=function(t,e){var n,r=(n=t.find(function(i){return i.data===e}))===null||n===void 0?void 0:n.id;return r||null},D8=function(t,e){return t.getOptionLabel(e)},bh=function(t,e){return t.getOptionValue(e)};function $8(t,e,n){return typeof t.isOptionDisabled=="function"?t.isOptionDisabled(e,n):!1}function L8(t,e,n){if(n.indexOf(e)>-1)return!0;if(typeof t.isOptionSelected=="function")return t.isOptionSelected(e,n);var r=bh(t,e);return n.some(function(i){return bh(t,i)===r})}function I8(t,e,n){return t.filterOption?t.filterOption(e,n):!0}var j8=function(t){var e=t.hideSelectedOptions,n=t.isMulti;return e===void 0?n:e},vG=1,N8=function(t){Hq(n,t);var e=Jq(n);function n(r){var i;if(Wq(this,n),i=e.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=iG(),i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,c){var u=i.props,f=u.onChange,d=u.name;c.name=d,i.ariaOnChange(l,c),f(l,c)},i.setValue=function(l,c,u){var f=i.props,d=f.closeMenuOnSelect,h=f.isMulti,m=f.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:m}),d&&(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:c,option:u})},i.selectOption=function(l){var c=i.props,u=c.blurInputOnSelect,f=c.isMulti,d=c.name,h=i.state.selectValue,m=f&&i.isOptionSelected(l,h),g=i.isOptionDisabled(l,h);if(m){var p=i.getOptionValue(l);i.setValue(h.filter(function(O){return i.getOptionValue(O)!==p}),"deselect-option",l)}else if(!g)f?i.setValue([].concat(cg(h),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:d});return}u&&i.blurInput()},i.removeValue=function(l){var c=i.props.isMulti,u=i.state.selectValue,f=i.getOptionValue(l),d=u.filter(function(m){return i.getOptionValue(m)!==f}),h=Oh(c,d,d[0]||null);i.onChange(h,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange(Oh(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,c=i.state.selectValue,u=c[c.length-1],f=c.slice(0,c.length-1),d=Oh(l,f,f[0]||null);i.onChange(d,{action:"pop-value",removedValue:u})},i.getFocusedOptionId=function(l){return Eg(i.state.focusableOptionsWithIds,l)},i.getFocusableOptionsWithIds=function(){return M8(vh(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return lU.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(l){return D8(i.props,l)},i.getOptionValue=function(l){return bh(i.props,l)},i.getStyles=function(l,c){var u=i.props.unstyled,f=cG[l](c,u);f.boxSizing="border-box";var d=i.props.styles[l];return d?d(f,c):f},i.getClassNames=function(l,c){var u,f;return(u=(f=i.props.classNames)[l])===null||u===void 0?void 0:u.call(f,c)},i.getElementId=function(l){return"".concat(i.state.instancePrefix,"-").concat(l)},i.getComponents=function(){return MH(i.props)},i.buildCategorizedOptions=function(){return vh(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return A8(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,c){i.setState({ariaSelection:Ee({value:l},c)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var c=i.props,u=c.isMulti,f=c.menuIsOpen;i.focusInput(),f?(i.setState({inputIsHiddenAfterUpdate:!u}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&hh(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var c=l.touches,u=c&&c.item(0);u&&(i.initialTouchX=u.clientX,i.initialTouchY=u.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var c=l.touches,u=c&&c.item(0);if(u){var f=Math.abs(u.clientX-i.initialTouchX),d=Math.abs(u.clientY-i.initialTouchY),h=5;i.userIsDragging=f>h||d>h}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var c=i.props.inputValue,u=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(u,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){if(!(i.blockOptionHover||i.state.focusedOption===l)){var c=i.getFocusableOptions(),u=c.indexOf(l);i.setState({focusedOption:l,focusedOptionId:u>-1?i.getFocusedOptionId(l):null})}},i.shouldHideSelectedOptions=function(){return j8(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var c=i.props,u=c.isMulti,f=c.backspaceRemovesValue,d=c.escapeClearsValue,h=c.inputValue,m=c.isClearable,g=c.isDisabled,p=c.menuIsOpen,O=c.onKeyDown,w=c.tabSelectsValue,v=c.openMenuOnFocus,b=i.state,y=b.focusedOption,x=b.focusedValue,_=b.selectValue;if(!g&&!(typeof O=="function"&&(O(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!u||h)return;i.focusValue("previous");break;case"ArrowRight":if(!u||h)return;i.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(x)i.removeValue(x);else{if(!f)return;u?i.popValue():m&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!p||!w||!y||v&&i.isOptionSelected(y,_))return;i.selectOption(y);break;case"Enter":if(l.keyCode===229)break;if(p){if(!y||i.isComposing)return;i.selectOption(y);break}return;case"Escape":p?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:h}),i.onMenuClose()):m&&d&&i.clearValue();break;case" ":if(h)return;if(!p){i.openMenu("first");break}if(!y)return;i.selectOption(y);break;case"ArrowUp":p?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":p?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!p)return;i.focusOption("pageup");break;case"PageDown":if(!p)return;i.focusOption("pagedown");break;case"Home":if(!p)return;i.focusOption("first");break;case"End":if(!p)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++vG),i.state.selectValue=e8(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),a=i.buildFocusableOptions(),s=a.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=a[s],i.state.focusedOptionId=Eg(o,a[s])}return i}return Uq(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&r8(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(r){var i=this.props,o=i.isDisabled,a=i.menuIsOpen,s=this.state.isFocused;(s&&!o&&r.isDisabled||s&&a&&!r.menuIsOpen)&&this.focusInput(),s&&o&&!r.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!s&&!o&&r.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(r8(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(r,i){this.props.onInputChange(r,i)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(r){var i=this,o=this.state,a=o.selectValue,s=o.isFocused,l=this.buildFocusableOptions(),c=r==="first"?0:l.length-1;if(!this.props.isMulti){var u=l.indexOf(a[0]);u>-1&&(c=u)}this.scrollToFocusedOptionOnUpdate=!(s&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[c],focusedOptionId:this.getFocusedOptionId(l[c])},function(){return i.onMenuOpen()})}},{key:"focusValue",value:function(r){var i=this.state,o=i.selectValue,a=i.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var s=o.indexOf(a);a||(s=-1);var l=o.length-1,c=-1;if(o.length){switch(r){case"previous":s===0?c=0:s===-1?c=l:c=s-1;break;case"next":s>-1&&s<l&&(c=s+1);break}this.setState({inputIsHidden:c!==-1,focusedValue:o[c]})}}}},{key:"focusOption",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",i=this.props.pageSize,o=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var s=0,l=a.indexOf(o);o||(l=-1),r==="up"?s=l>0?l-1:a.length-1:r==="down"?s=(l+1)%a.length:r==="pageup"?(s=l-i,s<0&&(s=0)):r==="pagedown"?(s=l+i,s>a.length-1&&(s=a.length-1)):r==="last"&&(s=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[s],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[s])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Pg):Ee(Ee({},Pg),this.props.theme):Pg}},{key:"getCommonProps",value:function(){var r=this.clearValue,i=this.cx,o=this.getStyles,a=this.getClassNames,s=this.getValue,l=this.selectOption,c=this.setValue,u=this.props,f=u.isMulti,d=u.isRtl,h=u.options,m=this.hasValue();return{clearValue:r,cx:i,getStyles:o,getClassNames:a,getValue:s,hasValue:m,isMulti:f,isRtl:d,options:h,selectOption:l,selectProps:u,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var r=this.state.selectValue;return r.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var r=this.props,i=r.isClearable,o=r.isMulti;return i===void 0?o:i}},{key:"isOptionDisabled",value:function(r,i){return $8(this.props,r,i)}},{key:"isOptionSelected",value:function(r,i){return L8(this.props,r,i)}},{key:"filterOption",value:function(r,i){return I8(this.props,r,i)}},{key:"formatOptionLabel",value:function(r,i){if(typeof this.props.formatOptionLabel=="function"){var o=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(r,{context:i,inputValue:o,selectValue:a})}else return this.getOptionLabel(r)}},{key:"formatGroupLabel",value:function(r){return this.props.formatGroupLabel(r)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var r=this.props,i=r.isDisabled,o=r.isSearchable,a=r.inputId,s=r.inputValue,l=r.tabIndex,c=r.form,u=r.menuIsOpen,f=r.required,d=this.getComponents(),h=d.Input,m=this.state,g=m.inputIsHidden,p=m.ariaSelection,O=this.commonProps,w=a||this.getElementId("input"),v=Ee(Ee(Ee({"aria-autocomplete":"list","aria-expanded":u,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":f,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},u&&{"aria-controls":this.getElementId("listbox")}),!o&&{"aria-readonly":!0}),this.hasValue()?(p==null?void 0:p.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return o?P.createElement(h,Te({},O,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:w,innerRef:this.getInputRef,isDisabled:i,isHidden:g,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:c,type:"text",value:s},v)):P.createElement(FH,Te({id:w,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:dh,onFocus:this.onInputFocus,disabled:i,tabIndex:l,inputMode:"none",form:c,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var r=this,i=this.getComponents(),o=i.MultiValue,a=i.MultiValueContainer,s=i.MultiValueLabel,l=i.MultiValueRemove,c=i.SingleValue,u=i.Placeholder,f=this.commonProps,d=this.props,h=d.controlShouldRenderValue,m=d.isDisabled,g=d.isMulti,p=d.inputValue,O=d.placeholder,w=this.state,v=w.selectValue,b=w.focusedValue,y=w.isFocused;if(!this.hasValue()||!h)return p?null:P.createElement(u,Te({},f,{key:"placeholder",isDisabled:m,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),O);if(g)return v.map(function(_,E){var A=_===b,I="".concat(r.getOptionLabel(_),"-").concat(r.getOptionValue(_));return P.createElement(o,Te({},f,{components:{Container:a,Label:s,Remove:l},isFocused:A,isDisabled:m,key:I,index:E,removeProps:{onClick:function(){return r.removeValue(_)},onTouchEnd:function(){return r.removeValue(_)},onMouseDown:function(Q){Q.preventDefault()}},data:_}),r.formatOptionLabel(_,"value"))});if(p)return null;var x=v[0];return P.createElement(c,Te({},f,{data:x,isDisabled:m}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var r=this.getComponents(),i=r.ClearIndicator,o=this.commonProps,a=this.props,s=a.isDisabled,l=a.isLoading,c=this.state.isFocused;if(!this.isClearable()||!i||s||!this.hasValue()||l)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return P.createElement(i,Te({},o,{innerProps:u,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var r=this.getComponents(),i=r.LoadingIndicator,o=this.commonProps,a=this.props,s=a.isDisabled,l=a.isLoading,c=this.state.isFocused;if(!i||!l)return null;var u={"aria-hidden":"true"};return P.createElement(i,Te({},o,{innerProps:u,isDisabled:s,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var r=this.getComponents(),i=r.DropdownIndicator,o=r.IndicatorSeparator;if(!i||!o)return null;var a=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused;return P.createElement(o,Te({},a,{isDisabled:s,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var r=this.getComponents(),i=r.DropdownIndicator;if(!i)return null;var o=this.commonProps,a=this.props.isDisabled,s=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return P.createElement(i,Te({},o,{innerProps:l,isDisabled:a,isFocused:s}))}},{key:"renderMenu",value:function(){var r=this,i=this.getComponents(),o=i.Group,a=i.GroupHeading,s=i.Menu,l=i.MenuList,c=i.MenuPortal,u=i.LoadingMessage,f=i.NoOptionsMessage,d=i.Option,h=this.commonProps,m=this.state.focusedOption,g=this.props,p=g.captureMenuScroll,O=g.inputValue,w=g.isLoading,v=g.loadingMessage,b=g.minMenuHeight,y=g.maxMenuHeight,x=g.menuIsOpen,_=g.menuPlacement,E=g.menuPosition,A=g.menuPortalTarget,I=g.menuShouldBlockScroll,Q=g.menuShouldScrollIntoView,D=g.noOptionsMessage,j=g.onMenuScrollToTop,R=g.onMenuScrollToBottom;if(!x)return null;var B=function(fe,oe){var T=fe.type,W=fe.data,ee=fe.isDisabled,we=fe.isSelected,Ze=fe.label,De=fe.value,te=m===W,he=ee?void 0:function(){return r.onOptionHover(W)},xe=ee?void 0:function(){return r.selectOption(W)},J="".concat(r.getElementId("option"),"-").concat(oe),At={id:J,onClick:xe,onMouseMove:he,onMouseOver:he,tabIndex:-1,role:"option","aria-selected":r.isAppleDevice?void 0:we};return P.createElement(d,Te({},h,{innerProps:At,data:W,isDisabled:ee,isSelected:we,key:J,label:Ze,type:T,value:De,isFocused:te,innerRef:te?r.getFocusedOptionRef:void 0}),r.formatOptionLabel(fe.data,"menu"))},X;if(this.hasOptions())X=this.getCategorizedOptions().map(function(fe){if(fe.type==="group"){var oe=fe.data,T=fe.options,W=fe.index,ee="".concat(r.getElementId("group"),"-").concat(W),we="".concat(ee,"-heading");return P.createElement(o,Te({},h,{key:ee,data:oe,options:T,Heading:a,headingProps:{id:we,data:fe.data},label:r.formatGroupLabel(fe.data)}),fe.options.map(function(Ze){return B(Ze,"".concat(W,"-").concat(Ze.index))}))}else if(fe.type==="option")return B(fe,"".concat(fe.index))});else if(w){var V=v({inputValue:O});if(V===null)return null;X=P.createElement(u,h,V)}else{var K=D({inputValue:O});if(K===null)return null;X=P.createElement(f,h,K)}var ne={minMenuHeight:b,maxMenuHeight:y,menuPlacement:_,menuPosition:E,menuShouldScrollIntoView:Q},L=P.createElement(SU,Te({},h,ne),function(fe){var oe=fe.ref,T=fe.placerProps,W=T.placement,ee=T.maxHeight;return P.createElement(s,Te({},h,ne,{innerRef:oe,innerProps:{onMouseDown:r.onMenuMouseDown,onMouseMove:r.onMenuMouseMove},isLoading:w,placement:W}),P.createElement(GH,{captureEnabled:p,onTopArrive:j,onBottomArrive:R,lockEnabled:I},function(we){return P.createElement(l,Te({},h,{innerRef:function(Ze){r.getMenuListRef(Ze),we(Ze)},innerProps:{role:"listbox","aria-multiselectable":h.isMulti,id:r.getElementId("listbox")},isLoading:w,maxHeight:ee,focusedOption:m}),X)}))});return A||E==="fixed"?P.createElement(c,Te({},h,{appendTo:A,controlElement:this.controlRef,menuPlacement:_,menuPosition:E}),L):L}},{key:"renderFormField",value:function(){var r=this,i=this.props,o=i.delimiter,a=i.isDisabled,s=i.isMulti,l=i.name,c=i.required,u=this.state.selectValue;if(c&&!this.hasValue()&&!a)return P.createElement(eG,{name:l,onFocus:this.onValueInputFocus});if(!(!l||a))if(s)if(o){var f=u.map(function(m){return r.getOptionValue(m)}).join(o);return P.createElement("input",{name:l,type:"hidden",value:f})}else{var d=u.length>0?u.map(function(m,g){return P.createElement("input",{key:"i-".concat(g),name:l,type:"hidden",value:r.getOptionValue(m)})}):P.createElement("input",{name:l,type:"hidden",value:""});return P.createElement("div",null,d)}else{var h=u[0]?this.getOptionValue(u[0]):"";return P.createElement("input",{name:l,type:"hidden",value:h})}}},{key:"renderLiveRegion",value:function(){var r=this.commonProps,i=this.state,o=i.ariaSelection,a=i.focusedOption,s=i.focusedValue,l=i.isFocused,c=i.selectValue,u=this.getFocusableOptions();return P.createElement(RH,Te({},r,{id:this.getElementId("live-region"),ariaSelection:o,focusedOption:a,focusedValue:s,isFocused:l,selectValue:c,focusableOptions:u,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var r=this.getComponents(),i=r.Control,o=r.IndicatorsContainer,a=r.SelectContainer,s=r.ValueContainer,l=this.props,c=l.className,u=l.id,f=l.isDisabled,d=l.menuIsOpen,h=this.state.isFocused,m=this.commonProps=this.getCommonProps();return P.createElement(a,Te({},m,{className:c,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:f,isFocused:h}),this.renderLiveRegion(),P.createElement(i,Te({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:f,isFocused:h,menuIsOpen:d}),P.createElement(s,Te({},m,{isDisabled:f}),this.renderPlaceholderOrValue(),this.renderInput()),P.createElement(o,Te({},m,{isDisabled:f}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(r,i){var o=i.prevProps,a=i.clearFocusValueOnUpdate,s=i.inputIsHiddenAfterUpdate,l=i.ariaSelection,c=i.isFocused,u=i.prevWasFocused,f=i.instancePrefix,d=r.options,h=r.value,m=r.menuIsOpen,g=r.inputValue,p=r.isMulti,O=e8(h),w={};if(o&&(h!==o.value||d!==o.options||m!==o.menuIsOpen||g!==o.inputValue)){var v=m?gG(r,O):[],b=m?M8(vh(r,O),"".concat(f,"-option")):[],y=a?OG(i,O):null,x=yG(i,v),_=Eg(b,x);w={selectValue:O,focusedOption:x,focusedOptionId:_,focusableOptionsWithIds:b,focusedValue:y,clearFocusValueOnUpdate:!1}}var E=s!=null&&r!==o?{inputIsHidden:s,inputIsHiddenAfterUpdate:void 0}:{},A=l,I=c&&u;return c&&!I&&(A={value:Oh(p,O,O[0]||null),options:O,action:"initial-input-focus"},I=!u),(l==null?void 0:l.action)==="initial-input-focus"&&(A=null),Ee(Ee(Ee({},w),E),{},{prevProps:r,ariaSelection:A,prevWasFocused:I})}}]),n}(k.Component);N8.defaultProps=mG;var bG=k.forwardRef(function(t,e){var n=qq(t);return P.createElement(N8,Te({ref:e},n))}),R8=bG;const B8=t=>N.jsx(yh.ClearIndicator,{...t,children:N.jsx(kt,{name:"close"})}),Z8=t=>{var e;return N.jsx(yh.DropdownIndicator,{...t,children:N.jsx(kt,{className:Ce("buttonDropdownIndicator",((e=t==null?void 0:t.selectProps)==null?void 0:e.menuIsOpen)&&"buttonDropdownIndicator__open"),name:"chevron-down"})})},z8=t=>{const{message:e}=t;return N.jsxs("div",{className:"errorIndicator",children:[N.jsx(kt,{name:"circle-cross",size:"sm",color:"error-50"}),N.jsx("p",{className:"errorIndicator_message",children:e})]})},X8=({id:t})=>{const[e]=k.useState(()=>t||"select_"+Math.random().toFixed(5).slice(2));return{uniqueId:e,handleCloseSelect:()=>{const n=document.querySelector(`#${e} .reactSelect__menu`),r=n==null?void 0:n.parentElement,i=n==null?void 0:n.cloneNode(!0);i&&(i.classList.add("reactSelect__menu--closed"),i.addEventListener("animationend",()=>{r==null||r.removeChild(i),i.removeEventListener("animationend",()=>{})}),r==null||r.appendChild(i))}}},V8=({className:t="",disabled:e=!1,error:n="",label:r="",placeholder:i="",...o})=>{const{options:a,value:s,onChange:l,onInputChange:c}=o,u=n&&typeof n=="string",{uniqueId:f,handleCloseSelect:d}=X8({id:o==null?void 0:o.id});return N.jsxs("div",{className:Ce("select",n&&"select__error",t&&t),children:[r&&N.jsx("label",{className:"select_label",children:r}),N.jsx(R8,{...o,id:f,className:"reactSelect",classNamePrefix:"reactSelect",isDisabled:e,components:{ClearIndicator:B8,DropdownIndicator:Z8},onMenuClose:d,options:a,placeholder:i,value:s&&s,onChange:h=>l&&l(h),onInputChange:h=>c&&c(h)}),u&&N.jsx(z8,{message:n})]})},wG=5,xG=9,_G=(t,e,n)=>{const r=n?3:7;return t<=r?"LEFT_LEANED":t>e-r?"RIGHT_LEANED":"BALANCED"},SG=(t,e,n)=>e?[1,2,3,n,t]:[1,2,3,4,5,6,7,n,t],kG=(t,e,n,r)=>n?[1,r,t,r,e]:[1,r,t-2,t-1,t,t+1,t+2,r,e],CG=(t,e,n)=>e?[1,n,t-2,t-1,t]:[1,n,t-6,t-5,t-4,t-3,t-2,t-1,t],F8=(t,e,n)=>{const r=window.innerWidth<=991.98;if(e<=(r?wG:xG))return Array.from({length:e},(i,o)=>o+1);switch(_G(t,e,r)){case"LEFT_LEANED":return SG(e,r,n);case"BALANCED":return kG(t,e,r,n);case"RIGHT_LEANED":return CG(e,r,n);default:throw new Error("Unknown pager type")}},Y8=t=>{const{page:e,size:n=10,total:r,totalPages:i,classname:o,onChange:a,onPageChange:s,onRowsPerPageChange:l,showRowsPerPage:c=!1,labelRowsPerPage:u="Filas por página:",pageSizeOptions:f=[5,10]}=t;r!=null&&i!=null&&console.error("You shouldn't use `total` and `totalPages` at the same time. Prefer `totalPages`.");const d=-1,[h,m]=k.useState(n),g=i??Math.ceil(r/h),[p,O]=k.useState(F8(e,g,d)),[w,v]=k.useState(window.innerWidth<=992),b=A=>{O(F8(A,g,d))};k.useEffect(()=>{const A=()=>{v(window.innerWidth<=992)};return window.addEventListener("resize",A),()=>window.removeEventListener("resize",A)},[]),k.useEffect(()=>(window.addEventListener("resize",()=>b(e)),()=>window.removeEventListener("resize",()=>b(e))),[]);const y=A=>{A!==e&&A!==0&&(s&&s(A),a&&a(A),b(A))},x=A=>{m(A==null?void 0:A.value),l==null||l(A)};if(g===1)return null;const _=k.useMemo(()=>f.map(A=>({label:A.toString(),value:A})),[f]),E=k.useMemo(()=>_.find(A=>A.value===h),[h,_]);return N.jsxs("section",{"data-testid":"pager-global","aria-label":"Pagination",className:Ce(Qo.paginator,w&&c&&Qo.paginator__mobile,(o==null?void 0:o.global)&&(o==null?void 0:o.global),"container_row","row__center"),children:[c&&N.jsxs("div",{className:Qo.paginator_rowsPerPage,children:[!w&&N.jsx(So,{type:"sm",weight:"medium",children:u}),N.jsx(V8,{className:Qo.select,options:_,value:E,onChange:x})]}),N.jsxs("nav",{"data-testid":"pager-nav",className:Ce(Qo.navPager,(o==null?void 0:o.nav)&&(o==null?void 0:o.nav)),children:[N.jsx(iu,{icon:"chevrons-left","aria-label":"First page",disabled:e===1,onClick:()=>y(1),className:(o==null?void 0:o.arrow)&&(o==null?void 0:o.arrow)}),N.jsx(iu,{icon:"chevron-left","aria-label":"Previous page",disabled:e===1,onClick:()=>y(e-1),className:(o==null?void 0:o.arrow)&&(o==null?void 0:o.arrow)}),p.map((A,I)=>N.jsx(P4,{className:(o==null?void 0:o.button)&&(o==null?void 0:o.button),ellipsisAsNumber:d,page:A,currentPage:e,onClick:()=>y(A)},`${A}-${I}`)),N.jsx(iu,{icon:"chevron-right","aria-label":"Next page",disabled:e===g,onClick:()=>y(e+1),className:(o==null?void 0:o.arrow)&&(o==null?void 0:o.arrow)}),N.jsx(iu,{icon:"chevrons-right","aria-label":"Last page",disabled:e===g,onClick:()=>y(g),className:(o==null?void 0:o.arrow)&&(o==null?void 0:o.arrow)})]})]})};Y8.prototype={avocado:"Pager"};const PG="_pill_twyo2_1",EG="_pill__outlined_twyo2_15",TG="_pill_icon_twyo2_19",Tg={pill:PG,pill__outlined:EG,pill_icon:TG},Ag=({children:t,className:e="",icon:n,iconFilled:r=!1,color:i="neutral-10",textColor:o="neutral-80",iconColor:a="neutral-80",outlined:s=!1})=>{const l=Ce(Tg.pill,e&&e,s&&Tg.pill__outlined),c={"--pill-color":`var(--color-${i})`,"--pill-text-color":`var(--color-${o})`};return N.jsxs("div",{className:l,style:c,children:[!!n&&N.jsx(kt,{className:Tg.pill_icon,filled:r,name:n,color:a,size:"sm"}),t]})},q8=["http","https","mailto","tel"];function AG(t){const e=(t||"").trim(),n=e.charAt(0);if(n==="#"||n==="/")return e;const r=e.indexOf(":");if(r===-1)return e;let i=-1;for(;++i<q8.length;){const o=q8[i];if(r===o.length&&e.slice(0,o.length).toLowerCase()===o)return e}return i=e.indexOf("?"),i!==-1&&r>i||(i=e.indexOf("#"),i!==-1&&r>i)?e:"javascript:void(0)"}/*!
659
+ `]))),GU=function(t,e){var n=t.isFocused,r=t.size,i=t.theme,o=i.colors,a=i.spacing.baseUnit;return Ee({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},e?{}:{color:n?o.neutral60:o.neutral20,padding:a*2})},wg=function(t){var e=t.delay,n=t.offset;return Pe("span",{css:yg({animation:"".concat(HU," 1s ease-in-out ").concat(e,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},KU=function(t){var e=t.innerProps,n=t.isRtl,r=t.size,i=r===void 0?4:r,o=$o(t,zU);return Pe("div",Te({},Bt(Ee(Ee({},o),{},{innerProps:e,isRtl:n,size:i}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),e),Pe(wg,{delay:0,offset:n}),Pe(wg,{delay:160,offset:!0}),Pe(wg,{delay:320,offset:!n}))},JU=function(t,e){var n=t.isDisabled,r=t.isFocused,i=t.theme,o=i.colors,a=i.borderRadius,s=i.spacing;return Ee({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},e?{}:{backgroundColor:n?o.neutral5:o.neutral0,borderColor:n?o.neutral10:r?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:r?o.primary:o.neutral30}})},eH=function(t){var e=t.children,n=t.isDisabled,r=t.isFocused,i=t.innerRef,o=t.innerProps,a=t.menuIsOpen;return Pe("div",Te({ref:i},Bt(t,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),o,{"aria-disabled":n||void 0}),e)},tH=eH,nH=["data"],rH=function(t,e){var n=t.theme.spacing;return e?{}:{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},iH=function(t){var e=t.children,n=t.cx,r=t.getStyles,i=t.getClassNames,o=t.Heading,a=t.headingProps,s=t.innerProps,l=t.label,c=t.theme,u=t.selectProps;return Pe("div",Te({},Bt(t,"group",{group:!0}),s),Pe(o,Te({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:i,cx:n}),l),Pe("div",null,e))},oH=function(t,e){var n=t.theme,r=n.colors,i=n.spacing;return Ee({label:"group",cursor:"default",display:"block"},e?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:i.baseUnit*3,paddingRight:i.baseUnit*3,textTransform:"uppercase"})},aH=function(t){var e=t7(t);e.data;var n=$o(e,nH);return Pe("div",Te({},Bt(t,"groupHeading",{"group-heading":!0}),n))},sH=iH,lH=["innerRef","isDisabled","isHidden","inputClassName"],cH=function(t,e){var n=t.isDisabled,r=t.value,i=t.theme,o=i.spacing,a=i.colors;return Ee(Ee({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},uH),e?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:a.neutral80})},h7={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},uH={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ee({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},h7)},fH=function(t){return Ee({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},h7)},dH=function(t){var e=t.cx,n=t.value,r=t7(t),i=r.innerRef,o=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=$o(r,lH);return Pe("div",Te({},Bt(t,"input",{"input-container":!0}),{"data-value":n||""}),Pe("input",Te({className:e({input:!0},s),ref:i,style:fH(a),disabled:o},l)))},hH=dH,pH=function(t,e){var n=t.theme,r=n.spacing,i=n.borderRadius,o=n.colors;return Ee({label:"multiValue",display:"flex",minWidth:0},e?{}:{backgroundColor:o.neutral10,borderRadius:i/2,margin:r.baseUnit/2})},mH=function(t,e){var n=t.theme,r=n.borderRadius,i=n.colors,o=t.cropWithEllipsis;return Ee({overflow:"hidden",textOverflow:o||o===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},e?{}:{borderRadius:r/2,color:i.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},gH=function(t,e){var n=t.theme,r=n.spacing,i=n.borderRadius,o=n.colors,a=t.isFocused;return Ee({alignItems:"center",display:"flex"},e?{}:{borderRadius:i/2,backgroundColor:a?o.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},p7=function(t){var e=t.children,n=t.innerProps;return Pe("div",n,e)},OH=p7,yH=p7;function vH(t){var e=t.children,n=t.innerProps;return Pe("div",Te({role:"button"},n),e||Pe(bg,{size:14}))}var bH=function(t){var e=t.children,n=t.components,r=t.data,i=t.innerProps,o=t.isDisabled,a=t.removeProps,s=t.selectProps,l=n.Container,c=n.Label,u=n.Remove;return Pe(l,{data:r,innerProps:Ee(Ee({},Bt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),i),selectProps:s},Pe(c,{data:r,innerProps:Ee({},Bt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},e),Pe(u,{data:r,innerProps:Ee(Ee({},Bt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(e||"option")},a),selectProps:s}))},wH=bH,xH=function(t,e){var n=t.isDisabled,r=t.isFocused,i=t.isSelected,o=t.theme,a=o.spacing,s=o.colors;return Ee({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},e?{}:{backgroundColor:i?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:i?s.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:n?void 0:i?s.primary:s.primary50}})},_H=function(t){var e=t.children,n=t.isDisabled,r=t.isFocused,i=t.isSelected,o=t.innerRef,a=t.innerProps;return Pe("div",Te({},Bt(t,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":i}),{ref:o,"aria-disabled":n},a),e)},SH=_H,kH=function(t,e){var n=t.theme,r=n.spacing,i=n.colors;return Ee({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},e?{}:{color:i.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},CH=function(t){var e=t.children,n=t.innerProps;return Pe("div",Te({},Bt(t,"placeholder",{placeholder:!0}),n),e)},PH=CH,EH=function(t,e){var n=t.isDisabled,r=t.theme,i=r.spacing,o=r.colors;return Ee({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e?{}:{color:n?o.neutral40:o.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},TH=function(t){var e=t.children,n=t.isDisabled,r=t.innerProps;return Pe("div",Te({},Bt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),e)},AH=TH,yh={ClearIndicator:qU,Control:tH,DropdownIndicator:FU,DownChevron:f7,CrossIcon:bg,Group:sH,GroupHeading:aH,IndicatorsContainer:BU,IndicatorSeparator:UU,Input:hH,LoadingIndicator:KU,Menu:CU,MenuList:EU,MenuPortal:$U,LoadingMessage:QU,NoOptionsMessage:MU,MultiValue:wH,MultiValueContainer:OH,MultiValueLabel:yH,MultiValueRemove:vH,Option:SH,Placeholder:PH,SelectContainer:IU,SingleValue:AH,ValueContainer:NU},MH=function(t){return Ee(Ee({},yh),t.components)},m7=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function QH(t,e){return!!(t===e||m7(t)&&m7(e))}function DH(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!QH(t[n],e[n]))return!1;return!0}function $H(t,e){e===void 0&&(e=DH);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&e(i,n.lastArgs))return n.lastResult;var a=t.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}for(var LH={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},IH=function(t){return Pe("span",Te({css:LH},t))},g7=IH,jH={guidance:function(t){var e=t.isSearchable,n=t.isMulti,r=t.tabSelectsValue,i=t.context,o=t.isInitialFocus;switch(i){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(t["aria-label"]||"Select"," is focused ").concat(e?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var e=t.action,n=t.label,r=n===void 0?"":n,i=t.labels,o=t.isDisabled;switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(i.length>1?"s":""," ").concat(i.join(","),", selected.");case"select-option":return o?"option ".concat(r," is disabled. Select another option."):"option ".concat(r,", selected.");default:return""}},onFocus:function(t){var e=t.context,n=t.focused,r=t.options,i=t.label,o=i===void 0?"":i,a=t.selectValue,s=t.isDisabled,l=t.isSelected,c=t.isAppleDevice,u=function(h,m){return h&&h.length?"".concat(h.indexOf(m)+1," of ").concat(h.length):""};if(e==="value"&&a)return"value ".concat(o," focused, ").concat(u(a,n),".");if(e==="menu"&&c){var f=s?" disabled":"",d="".concat(l?" selected":"").concat(f);return"".concat(o).concat(d,", ").concat(u(r,n),".")}return""},onFilter:function(t){var e=t.inputValue,n=t.resultsMessage;return"".concat(n).concat(e?" for search term "+e:"",".")}},NH=function(t){var e=t.ariaSelection,n=t.focusedOption,r=t.focusedValue,i=t.focusableOptions,o=t.isFocused,a=t.selectValue,s=t.selectProps,l=t.id,c=t.isAppleDevice,u=s.ariaLiveMessages,f=s.getOptionLabel,d=s.inputValue,h=s.isMulti,m=s.isOptionDisabled,g=s.isSearchable,p=s.menuIsOpen,O=s.options,w=s.screenReaderStatus,v=s.tabSelectsValue,b=s.isLoading,y=s["aria-label"],x=s["aria-live"],_=k.useMemo(function(){return Ee(Ee({},jH),u||{})},[u]),E=k.useMemo(function(){var R="";if(e&&_.onChange){var B=e.option,X=e.options,V=e.removedValue,K=e.removedValues,ne=e.value,L=function(we){return Array.isArray(we)?null:we},fe=V||B||L(ne),oe=fe?f(fe):"",T=X||K||void 0,W=T?T.map(f):[],ee=Ee({isDisabled:fe&&m(fe,a),label:oe,labels:W},e);R=_.onChange(ee)}return R},[e,_,m,a,f]),A=k.useMemo(function(){var R="",B=n||r,X=!!(n&&a&&a.includes(n));if(B&&_.onFocus){var V={focused:B,label:f(B),isDisabled:m(B,a),isSelected:X,options:i,context:B===n?"menu":"value",selectValue:a,isAppleDevice:c};R=_.onFocus(V)}return R},[n,r,f,m,_,i,a,c]),I=k.useMemo(function(){var R="";if(p&&O.length&&!b&&_.onFilter){var B=w({count:i.length});R=_.onFilter({inputValue:d,resultsMessage:B})}return R},[i,d,p,_,O,w,b]),Q=(e==null?void 0:e.action)==="initial-input-focus",D=k.useMemo(function(){var R="";if(_.guidance){var B=r?"value":p?"menu":"input";R=_.guidance({"aria-label":y,context:B,isDisabled:n&&m(n,a),isMulti:h,isSearchable:g,tabSelectsValue:v,isInitialFocus:Q})}return R},[y,n,r,h,m,g,p,_,a,v,Q]),j=Pe(k.Fragment,null,Pe("span",{id:"aria-selection"},E),Pe("span",{id:"aria-focused"},A),Pe("span",{id:"aria-results"},I),Pe("span",{id:"aria-guidance"},D));return Pe(k.Fragment,null,Pe(g7,{id:l},Q&&j),Pe(g7,{"aria-live":x,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!Q&&j))},RH=NH,xg=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],BH=new RegExp("["+xg.map(function(t){return t.letters}).join("")+"]","g"),O7={},_g=0;_g<xg.length;_g++)for(var Sg=xg[_g],kg=0;kg<Sg.letters.length;kg++)O7[Sg.letters[kg]]=Sg.base;var y7=function(t){return t.replace(BH,function(e){return O7[e]})},ZH=$H(y7),v7=function(t){return t.replace(/^\s+|\s+$/g,"")},zH=function(t){return"".concat(t.label," ").concat(t.value)},XH=function(t){return function(e,n){if(e.data.__isNew__)return!0;var r=Ee({ignoreCase:!0,ignoreAccents:!0,stringify:zH,trim:!0,matchFrom:"any"},t),i=r.ignoreCase,o=r.ignoreAccents,a=r.stringify,s=r.trim,l=r.matchFrom,c=s?v7(n):n,u=s?v7(a(e)):a(e);return i&&(c=c.toLowerCase(),u=u.toLowerCase()),o&&(c=ZH(c),u=y7(u)),l==="start"?u.substr(0,c.length)===c:u.indexOf(c)>-1}},VH=["innerRef"];function FH(t){var e=t.innerRef,n=$o(t,VH),r=yU(n,"onExited","in","enter","exit","appear");return Pe("input",Te({ref:e},r,{css:yg({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var YH=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function qH(t){var e=t.isEnabled,n=t.onBottomArrive,r=t.onBottomLeave,i=t.onTopArrive,o=t.onTopLeave,a=k.useRef(!1),s=k.useRef(!1),l=k.useRef(0),c=k.useRef(null),u=k.useCallback(function(p,O){if(c.current!==null){var w=c.current,v=w.scrollTop,b=w.scrollHeight,y=w.clientHeight,x=c.current,_=O>0,E=b-y-v,A=!1;E>O&&a.current&&(r&&r(p),a.current=!1),_&&s.current&&(o&&o(p),s.current=!1),_&&O>E?(n&&!a.current&&n(p),x.scrollTop=b,A=!0,a.current=!0):!_&&-O>v&&(i&&!s.current&&i(p),x.scrollTop=0,A=!0,s.current=!0),A&&YH(p)}},[n,r,i,o]),f=k.useCallback(function(p){u(p,p.deltaY)},[u]),d=k.useCallback(function(p){l.current=p.changedTouches[0].clientY},[]),h=k.useCallback(function(p){var O=l.current-p.changedTouches[0].clientY;u(p,O)},[u]),m=k.useCallback(function(p){if(p){var O=mU?{passive:!1}:!1;p.addEventListener("wheel",f,O),p.addEventListener("touchstart",d,O),p.addEventListener("touchmove",h,O)}},[h,d,f]),g=k.useCallback(function(p){p&&(p.removeEventListener("wheel",f,!1),p.removeEventListener("touchstart",d,!1),p.removeEventListener("touchmove",h,!1))},[h,d,f]);return k.useEffect(function(){if(e){var p=c.current;return m(p),function(){g(p)}}},[e,m,g]),function(p){c.current=p}}var b7=["boxSizing","height","overflow","paddingRight","position"],w7={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function x7(t){t.preventDefault()}function _7(t){t.stopPropagation()}function S7(){var t=this.scrollTop,e=this.scrollHeight,n=t+this.offsetHeight;t===0?this.scrollTop=1:n===e&&(this.scrollTop=t-1)}function k7(){return"ontouchstart"in window||navigator.maxTouchPoints}var C7=!!(typeof window<"u"&&window.document&&window.document.createElement),fu=0,El={capture:!1,passive:!1};function WH(t){var e=t.isEnabled,n=t.accountForScrollbars,r=n===void 0?!0:n,i=k.useRef({}),o=k.useRef(null),a=k.useCallback(function(l){if(C7){var c=document.body,u=c&&c.style;if(r&&b7.forEach(function(m){var g=u&&u[m];i.current[m]=g}),r&&fu<1){var f=parseInt(i.current.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,h=window.innerWidth-d+f||0;Object.keys(w7).forEach(function(m){var g=w7[m];u&&(u[m]=g)}),u&&(u.paddingRight="".concat(h,"px"))}c&&k7()&&(c.addEventListener("touchmove",x7,El),l&&(l.addEventListener("touchstart",S7,El),l.addEventListener("touchmove",_7,El))),fu+=1}},[r]),s=k.useCallback(function(l){if(C7){var c=document.body,u=c&&c.style;fu=Math.max(fu-1,0),r&&fu<1&&b7.forEach(function(f){var d=i.current[f];u&&(u[f]=d)}),c&&k7()&&(c.removeEventListener("touchmove",x7,El),l&&(l.removeEventListener("touchstart",S7,El),l.removeEventListener("touchmove",_7,El)))}},[r]);return k.useEffect(function(){if(e){var l=o.current;return a(l),function(){s(l)}}},[e,a,s]),function(l){o.current=l}}var UH=function(t){var e=t.target;return e.ownerDocument.activeElement&&e.ownerDocument.activeElement.blur()},HH={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function GH(t){var e=t.children,n=t.lockEnabled,r=t.captureEnabled,i=r===void 0?!0:r,o=t.onBottomArrive,a=t.onBottomLeave,s=t.onTopArrive,l=t.onTopLeave,c=qH({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:s,onTopLeave:l}),u=WH({isEnabled:n}),f=function(d){c(d),u(d)};return Pe(k.Fragment,null,n&&Pe("div",{onClick:UH,css:HH}),e(f))}var KH={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},JH=function(t){var e=t.name,n=t.onFocus;return Pe("input",{required:!0,name:e,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:KH,value:"",onChange:function(){}})},eG=JH;function Cg(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function tG(){return Cg(/^iPhone/i)}function P7(){return Cg(/^Mac/i)}function nG(){return Cg(/^iPad/i)||P7()&&navigator.maxTouchPoints>1}function rG(){return tG()||nG()}function iG(){return P7()||rG()}var oG=function(t){return t.label},aG=function(t){return t.label},sG=function(t){return t.value},lG=function(t){return!!t.isDisabled},cG={clearIndicator:YU,container:LU,control:JU,dropdownIndicator:VU,group:rH,groupHeading:oH,indicatorsContainer:RU,indicatorSeparator:WU,input:cH,loadingIndicator:GU,loadingMessage:AU,menu:_U,menuList:PU,menuPortal:DU,multiValue:pH,multiValueLabel:mH,multiValueRemove:gH,noOptionsMessage:TU,option:xH,placeholder:kH,singleValue:EH,valueContainer:jU},uG={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},fG=4,E7=4,dG=38,hG=E7*2,pG={baseUnit:E7,controlHeight:dG,menuGutter:hG},Pg={borderRadius:fG,colors:uG,spacing:pG},mG={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:i7(),captureMenuScroll:!i7(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:XH(),formatGroupLabel:oG,getOptionLabel:aG,getOptionValue:sG,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:lG,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!hU(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var e=t.count;return"".concat(e," result").concat(e!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function T7(t,e,n,r){var i=$7(t,e,n),o=L7(t,e,n),a=D7(t,e),s=bh(t,e);return{type:"option",data:e,isDisabled:i,isSelected:o,label:a,value:s,index:r}}function vh(t,e){return t.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,s){return T7(t,a,e,s)}).filter(function(a){return Q7(t,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=T7(t,n,e,r);return Q7(t,o)?o:void 0}).filter(gU)}function A7(t){return t.reduce(function(e,n){return n.type==="group"?e.push.apply(e,cg(n.options.map(function(r){return r.data}))):e.push(n.data),e},[])}function M7(t,e){return t.reduce(function(n,r){return r.type==="group"?n.push.apply(n,cg(r.options.map(function(i){return{data:i.data,id:"".concat(e,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(e,"-").concat(r.index)}),n},[])}function gG(t,e){return A7(vh(t,e))}function Q7(t,e){var n=t.inputValue,r=n===void 0?"":n,i=e.data,o=e.isSelected,a=e.label,s=e.value;return(!j7(t)||!o)&&I7(t,{label:a,value:s,data:i},r)}function OG(t,e){var n=t.focusedValue,r=t.selectValue,i=r.indexOf(n);if(i>-1){var o=e.indexOf(n);if(o>-1)return n;if(i<e.length)return e[i]}return null}function yG(t,e){var n=t.focusedOption;return n&&e.indexOf(n)>-1?n:e[0]}var Eg=function(t,e){var n,r=(n=t.find(function(i){return i.data===e}))===null||n===void 0?void 0:n.id;return r||null},D7=function(t,e){return t.getOptionLabel(e)},bh=function(t,e){return t.getOptionValue(e)};function $7(t,e,n){return typeof t.isOptionDisabled=="function"?t.isOptionDisabled(e,n):!1}function L7(t,e,n){if(n.indexOf(e)>-1)return!0;if(typeof t.isOptionSelected=="function")return t.isOptionSelected(e,n);var r=bh(t,e);return n.some(function(i){return bh(t,i)===r})}function I7(t,e,n){return t.filterOption?t.filterOption(e,n):!0}var j7=function(t){var e=t.hideSelectedOptions,n=t.isMulti;return e===void 0?n:e},vG=1,N7=function(t){Hq(n,t);var e=Jq(n);function n(r){var i;if(Wq(this,n),i=e.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=iG(),i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,c){var u=i.props,f=u.onChange,d=u.name;c.name=d,i.ariaOnChange(l,c),f(l,c)},i.setValue=function(l,c,u){var f=i.props,d=f.closeMenuOnSelect,h=f.isMulti,m=f.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:m}),d&&(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:c,option:u})},i.selectOption=function(l){var c=i.props,u=c.blurInputOnSelect,f=c.isMulti,d=c.name,h=i.state.selectValue,m=f&&i.isOptionSelected(l,h),g=i.isOptionDisabled(l,h);if(m){var p=i.getOptionValue(l);i.setValue(h.filter(function(O){return i.getOptionValue(O)!==p}),"deselect-option",l)}else if(!g)f?i.setValue([].concat(cg(h),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:d});return}u&&i.blurInput()},i.removeValue=function(l){var c=i.props.isMulti,u=i.state.selectValue,f=i.getOptionValue(l),d=u.filter(function(m){return i.getOptionValue(m)!==f}),h=Oh(c,d,d[0]||null);i.onChange(h,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange(Oh(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,c=i.state.selectValue,u=c[c.length-1],f=c.slice(0,c.length-1),d=Oh(l,f,f[0]||null);i.onChange(d,{action:"pop-value",removedValue:u})},i.getFocusedOptionId=function(l){return Eg(i.state.focusableOptionsWithIds,l)},i.getFocusableOptionsWithIds=function(){return M7(vh(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return lU.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(l){return D7(i.props,l)},i.getOptionValue=function(l){return bh(i.props,l)},i.getStyles=function(l,c){var u=i.props.unstyled,f=cG[l](c,u);f.boxSizing="border-box";var d=i.props.styles[l];return d?d(f,c):f},i.getClassNames=function(l,c){var u,f;return(u=(f=i.props.classNames)[l])===null||u===void 0?void 0:u.call(f,c)},i.getElementId=function(l){return"".concat(i.state.instancePrefix,"-").concat(l)},i.getComponents=function(){return MH(i.props)},i.buildCategorizedOptions=function(){return vh(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return A7(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,c){i.setState({ariaSelection:Ee({value:l},c)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var c=i.props,u=c.isMulti,f=c.menuIsOpen;i.focusInput(),f?(i.setState({inputIsHiddenAfterUpdate:!u}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&hh(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var c=l.touches,u=c&&c.item(0);u&&(i.initialTouchX=u.clientX,i.initialTouchY=u.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var c=l.touches,u=c&&c.item(0);if(u){var f=Math.abs(u.clientX-i.initialTouchX),d=Math.abs(u.clientY-i.initialTouchY),h=5;i.userIsDragging=f>h||d>h}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var c=i.props.inputValue,u=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(u,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){if(!(i.blockOptionHover||i.state.focusedOption===l)){var c=i.getFocusableOptions(),u=c.indexOf(l);i.setState({focusedOption:l,focusedOptionId:u>-1?i.getFocusedOptionId(l):null})}},i.shouldHideSelectedOptions=function(){return j7(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var c=i.props,u=c.isMulti,f=c.backspaceRemovesValue,d=c.escapeClearsValue,h=c.inputValue,m=c.isClearable,g=c.isDisabled,p=c.menuIsOpen,O=c.onKeyDown,w=c.tabSelectsValue,v=c.openMenuOnFocus,b=i.state,y=b.focusedOption,x=b.focusedValue,_=b.selectValue;if(!g&&!(typeof O=="function"&&(O(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!u||h)return;i.focusValue("previous");break;case"ArrowRight":if(!u||h)return;i.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(x)i.removeValue(x);else{if(!f)return;u?i.popValue():m&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!p||!w||!y||v&&i.isOptionSelected(y,_))return;i.selectOption(y);break;case"Enter":if(l.keyCode===229)break;if(p){if(!y||i.isComposing)return;i.selectOption(y);break}return;case"Escape":p?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:h}),i.onMenuClose()):m&&d&&i.clearValue();break;case" ":if(h)return;if(!p){i.openMenu("first");break}if(!y)return;i.selectOption(y);break;case"ArrowUp":p?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":p?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!p)return;i.focusOption("pageup");break;case"PageDown":if(!p)return;i.focusOption("pagedown");break;case"Home":if(!p)return;i.focusOption("first");break;case"End":if(!p)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++vG),i.state.selectValue=e7(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),a=i.buildFocusableOptions(),s=a.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=a[s],i.state.focusedOptionId=Eg(o,a[s])}return i}return Uq(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&r7(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(r){var i=this.props,o=i.isDisabled,a=i.menuIsOpen,s=this.state.isFocused;(s&&!o&&r.isDisabled||s&&a&&!r.menuIsOpen)&&this.focusInput(),s&&o&&!r.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!s&&!o&&r.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(r7(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(r,i){this.props.onInputChange(r,i)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(r){var i=this,o=this.state,a=o.selectValue,s=o.isFocused,l=this.buildFocusableOptions(),c=r==="first"?0:l.length-1;if(!this.props.isMulti){var u=l.indexOf(a[0]);u>-1&&(c=u)}this.scrollToFocusedOptionOnUpdate=!(s&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[c],focusedOptionId:this.getFocusedOptionId(l[c])},function(){return i.onMenuOpen()})}},{key:"focusValue",value:function(r){var i=this.state,o=i.selectValue,a=i.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var s=o.indexOf(a);a||(s=-1);var l=o.length-1,c=-1;if(o.length){switch(r){case"previous":s===0?c=0:s===-1?c=l:c=s-1;break;case"next":s>-1&&s<l&&(c=s+1);break}this.setState({inputIsHidden:c!==-1,focusedValue:o[c]})}}}},{key:"focusOption",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",i=this.props.pageSize,o=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var s=0,l=a.indexOf(o);o||(l=-1),r==="up"?s=l>0?l-1:a.length-1:r==="down"?s=(l+1)%a.length:r==="pageup"?(s=l-i,s<0&&(s=0)):r==="pagedown"?(s=l+i,s>a.length-1&&(s=a.length-1)):r==="last"&&(s=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[s],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[s])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Pg):Ee(Ee({},Pg),this.props.theme):Pg}},{key:"getCommonProps",value:function(){var r=this.clearValue,i=this.cx,o=this.getStyles,a=this.getClassNames,s=this.getValue,l=this.selectOption,c=this.setValue,u=this.props,f=u.isMulti,d=u.isRtl,h=u.options,m=this.hasValue();return{clearValue:r,cx:i,getStyles:o,getClassNames:a,getValue:s,hasValue:m,isMulti:f,isRtl:d,options:h,selectOption:l,selectProps:u,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var r=this.state.selectValue;return r.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var r=this.props,i=r.isClearable,o=r.isMulti;return i===void 0?o:i}},{key:"isOptionDisabled",value:function(r,i){return $7(this.props,r,i)}},{key:"isOptionSelected",value:function(r,i){return L7(this.props,r,i)}},{key:"filterOption",value:function(r,i){return I7(this.props,r,i)}},{key:"formatOptionLabel",value:function(r,i){if(typeof this.props.formatOptionLabel=="function"){var o=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(r,{context:i,inputValue:o,selectValue:a})}else return this.getOptionLabel(r)}},{key:"formatGroupLabel",value:function(r){return this.props.formatGroupLabel(r)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var r=this.props,i=r.isDisabled,o=r.isSearchable,a=r.inputId,s=r.inputValue,l=r.tabIndex,c=r.form,u=r.menuIsOpen,f=r.required,d=this.getComponents(),h=d.Input,m=this.state,g=m.inputIsHidden,p=m.ariaSelection,O=this.commonProps,w=a||this.getElementId("input"),v=Ee(Ee(Ee({"aria-autocomplete":"list","aria-expanded":u,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":f,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},u&&{"aria-controls":this.getElementId("listbox")}),!o&&{"aria-readonly":!0}),this.hasValue()?(p==null?void 0:p.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return o?P.createElement(h,Te({},O,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:w,innerRef:this.getInputRef,isDisabled:i,isHidden:g,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:c,type:"text",value:s},v)):P.createElement(FH,Te({id:w,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:dh,onFocus:this.onInputFocus,disabled:i,tabIndex:l,inputMode:"none",form:c,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var r=this,i=this.getComponents(),o=i.MultiValue,a=i.MultiValueContainer,s=i.MultiValueLabel,l=i.MultiValueRemove,c=i.SingleValue,u=i.Placeholder,f=this.commonProps,d=this.props,h=d.controlShouldRenderValue,m=d.isDisabled,g=d.isMulti,p=d.inputValue,O=d.placeholder,w=this.state,v=w.selectValue,b=w.focusedValue,y=w.isFocused;if(!this.hasValue()||!h)return p?null:P.createElement(u,Te({},f,{key:"placeholder",isDisabled:m,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),O);if(g)return v.map(function(_,E){var A=_===b,I="".concat(r.getOptionLabel(_),"-").concat(r.getOptionValue(_));return P.createElement(o,Te({},f,{components:{Container:a,Label:s,Remove:l},isFocused:A,isDisabled:m,key:I,index:E,removeProps:{onClick:function(){return r.removeValue(_)},onTouchEnd:function(){return r.removeValue(_)},onMouseDown:function(Q){Q.preventDefault()}},data:_}),r.formatOptionLabel(_,"value"))});if(p)return null;var x=v[0];return P.createElement(c,Te({},f,{data:x,isDisabled:m}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var r=this.getComponents(),i=r.ClearIndicator,o=this.commonProps,a=this.props,s=a.isDisabled,l=a.isLoading,c=this.state.isFocused;if(!this.isClearable()||!i||s||!this.hasValue()||l)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return P.createElement(i,Te({},o,{innerProps:u,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var r=this.getComponents(),i=r.LoadingIndicator,o=this.commonProps,a=this.props,s=a.isDisabled,l=a.isLoading,c=this.state.isFocused;if(!i||!l)return null;var u={"aria-hidden":"true"};return P.createElement(i,Te({},o,{innerProps:u,isDisabled:s,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var r=this.getComponents(),i=r.DropdownIndicator,o=r.IndicatorSeparator;if(!i||!o)return null;var a=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused;return P.createElement(o,Te({},a,{isDisabled:s,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var r=this.getComponents(),i=r.DropdownIndicator;if(!i)return null;var o=this.commonProps,a=this.props.isDisabled,s=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return P.createElement(i,Te({},o,{innerProps:l,isDisabled:a,isFocused:s}))}},{key:"renderMenu",value:function(){var r=this,i=this.getComponents(),o=i.Group,a=i.GroupHeading,s=i.Menu,l=i.MenuList,c=i.MenuPortal,u=i.LoadingMessage,f=i.NoOptionsMessage,d=i.Option,h=this.commonProps,m=this.state.focusedOption,g=this.props,p=g.captureMenuScroll,O=g.inputValue,w=g.isLoading,v=g.loadingMessage,b=g.minMenuHeight,y=g.maxMenuHeight,x=g.menuIsOpen,_=g.menuPlacement,E=g.menuPosition,A=g.menuPortalTarget,I=g.menuShouldBlockScroll,Q=g.menuShouldScrollIntoView,D=g.noOptionsMessage,j=g.onMenuScrollToTop,R=g.onMenuScrollToBottom;if(!x)return null;var B=function(fe,oe){var T=fe.type,W=fe.data,ee=fe.isDisabled,we=fe.isSelected,Ze=fe.label,De=fe.value,te=m===W,he=ee?void 0:function(){return r.onOptionHover(W)},xe=ee?void 0:function(){return r.selectOption(W)},J="".concat(r.getElementId("option"),"-").concat(oe),At={id:J,onClick:xe,onMouseMove:he,onMouseOver:he,tabIndex:-1,role:"option","aria-selected":r.isAppleDevice?void 0:we};return P.createElement(d,Te({},h,{innerProps:At,data:W,isDisabled:ee,isSelected:we,key:J,label:Ze,type:T,value:De,isFocused:te,innerRef:te?r.getFocusedOptionRef:void 0}),r.formatOptionLabel(fe.data,"menu"))},X;if(this.hasOptions())X=this.getCategorizedOptions().map(function(fe){if(fe.type==="group"){var oe=fe.data,T=fe.options,W=fe.index,ee="".concat(r.getElementId("group"),"-").concat(W),we="".concat(ee,"-heading");return P.createElement(o,Te({},h,{key:ee,data:oe,options:T,Heading:a,headingProps:{id:we,data:fe.data},label:r.formatGroupLabel(fe.data)}),fe.options.map(function(Ze){return B(Ze,"".concat(W,"-").concat(Ze.index))}))}else if(fe.type==="option")return B(fe,"".concat(fe.index))});else if(w){var V=v({inputValue:O});if(V===null)return null;X=P.createElement(u,h,V)}else{var K=D({inputValue:O});if(K===null)return null;X=P.createElement(f,h,K)}var ne={minMenuHeight:b,maxMenuHeight:y,menuPlacement:_,menuPosition:E,menuShouldScrollIntoView:Q},L=P.createElement(SU,Te({},h,ne),function(fe){var oe=fe.ref,T=fe.placerProps,W=T.placement,ee=T.maxHeight;return P.createElement(s,Te({},h,ne,{innerRef:oe,innerProps:{onMouseDown:r.onMenuMouseDown,onMouseMove:r.onMenuMouseMove},isLoading:w,placement:W}),P.createElement(GH,{captureEnabled:p,onTopArrive:j,onBottomArrive:R,lockEnabled:I},function(we){return P.createElement(l,Te({},h,{innerRef:function(Ze){r.getMenuListRef(Ze),we(Ze)},innerProps:{role:"listbox","aria-multiselectable":h.isMulti,id:r.getElementId("listbox")},isLoading:w,maxHeight:ee,focusedOption:m}),X)}))});return A||E==="fixed"?P.createElement(c,Te({},h,{appendTo:A,controlElement:this.controlRef,menuPlacement:_,menuPosition:E}),L):L}},{key:"renderFormField",value:function(){var r=this,i=this.props,o=i.delimiter,a=i.isDisabled,s=i.isMulti,l=i.name,c=i.required,u=this.state.selectValue;if(c&&!this.hasValue()&&!a)return P.createElement(eG,{name:l,onFocus:this.onValueInputFocus});if(!(!l||a))if(s)if(o){var f=u.map(function(m){return r.getOptionValue(m)}).join(o);return P.createElement("input",{name:l,type:"hidden",value:f})}else{var d=u.length>0?u.map(function(m,g){return P.createElement("input",{key:"i-".concat(g),name:l,type:"hidden",value:r.getOptionValue(m)})}):P.createElement("input",{name:l,type:"hidden",value:""});return P.createElement("div",null,d)}else{var h=u[0]?this.getOptionValue(u[0]):"";return P.createElement("input",{name:l,type:"hidden",value:h})}}},{key:"renderLiveRegion",value:function(){var r=this.commonProps,i=this.state,o=i.ariaSelection,a=i.focusedOption,s=i.focusedValue,l=i.isFocused,c=i.selectValue,u=this.getFocusableOptions();return P.createElement(RH,Te({},r,{id:this.getElementId("live-region"),ariaSelection:o,focusedOption:a,focusedValue:s,isFocused:l,selectValue:c,focusableOptions:u,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var r=this.getComponents(),i=r.Control,o=r.IndicatorsContainer,a=r.SelectContainer,s=r.ValueContainer,l=this.props,c=l.className,u=l.id,f=l.isDisabled,d=l.menuIsOpen,h=this.state.isFocused,m=this.commonProps=this.getCommonProps();return P.createElement(a,Te({},m,{className:c,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:f,isFocused:h}),this.renderLiveRegion(),P.createElement(i,Te({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:f,isFocused:h,menuIsOpen:d}),P.createElement(s,Te({},m,{isDisabled:f}),this.renderPlaceholderOrValue(),this.renderInput()),P.createElement(o,Te({},m,{isDisabled:f}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(r,i){var o=i.prevProps,a=i.clearFocusValueOnUpdate,s=i.inputIsHiddenAfterUpdate,l=i.ariaSelection,c=i.isFocused,u=i.prevWasFocused,f=i.instancePrefix,d=r.options,h=r.value,m=r.menuIsOpen,g=r.inputValue,p=r.isMulti,O=e7(h),w={};if(o&&(h!==o.value||d!==o.options||m!==o.menuIsOpen||g!==o.inputValue)){var v=m?gG(r,O):[],b=m?M7(vh(r,O),"".concat(f,"-option")):[],y=a?OG(i,O):null,x=yG(i,v),_=Eg(b,x);w={selectValue:O,focusedOption:x,focusedOptionId:_,focusableOptionsWithIds:b,focusedValue:y,clearFocusValueOnUpdate:!1}}var E=s!=null&&r!==o?{inputIsHidden:s,inputIsHiddenAfterUpdate:void 0}:{},A=l,I=c&&u;return c&&!I&&(A={value:Oh(p,O,O[0]||null),options:O,action:"initial-input-focus"},I=!u),(l==null?void 0:l.action)==="initial-input-focus"&&(A=null),Ee(Ee(Ee({},w),E),{},{prevProps:r,ariaSelection:A,prevWasFocused:I})}}]),n}(k.Component);N7.defaultProps=mG;var bG=k.forwardRef(function(t,e){var n=qq(t);return P.createElement(N7,Te({ref:e},n))}),R7=bG;const B7=t=>N.jsx(yh.ClearIndicator,{...t,children:N.jsx(kt,{name:"close"})}),Z7=t=>{var e;return N.jsx(yh.DropdownIndicator,{...t,children:N.jsx(kt,{className:Ce("buttonDropdownIndicator",((e=t==null?void 0:t.selectProps)==null?void 0:e.menuIsOpen)&&"buttonDropdownIndicator__open"),name:"chevron-down"})})},z7=t=>{const{message:e}=t;return N.jsxs("div",{className:"errorIndicator",children:[N.jsx(kt,{name:"circle-cross",size:"sm",color:"error-50"}),N.jsx("p",{className:"errorIndicator_message",children:e})]})},X7=({id:t})=>{const[e]=k.useState(()=>t||"select_"+Math.random().toFixed(5).slice(2));return{uniqueId:e,handleCloseSelect:()=>{const n=document.querySelector(`#${e} .reactSelect__menu`),r=n==null?void 0:n.parentElement,i=n==null?void 0:n.cloneNode(!0);i&&(i.classList.add("reactSelect__menu--closed"),i.addEventListener("animationend",()=>{r==null||r.removeChild(i),i.removeEventListener("animationend",()=>{})}),r==null||r.appendChild(i))}}},V7=({className:t="",disabled:e=!1,error:n="",label:r="",placeholder:i="",...o})=>{const{options:a,value:s,onChange:l,onInputChange:c}=o,u=n&&typeof n=="string",{uniqueId:f,handleCloseSelect:d}=X7({id:o==null?void 0:o.id});return N.jsxs("div",{className:Ce("select",n&&"select__error",t&&t),children:[r&&N.jsx("label",{className:"select_label",children:r}),N.jsx(R7,{...o,id:f,className:"reactSelect",classNamePrefix:"reactSelect",isDisabled:e,components:{ClearIndicator:B7,DropdownIndicator:Z7},onMenuClose:d,options:a,placeholder:i,value:s&&s,onChange:h=>l&&l(h),onInputChange:h=>c&&c(h)}),u&&N.jsx(z7,{message:n})]})},wG=5,xG=9,_G=(t,e,n)=>{const r=n?3:7;return t<=r?"LEFT_LEANED":t>e-r?"RIGHT_LEANED":"BALANCED"},SG=(t,e,n)=>e?[1,2,3,n,t]:[1,2,3,4,5,6,7,n,t],kG=(t,e,n,r)=>n?[1,r,t,r,e]:[1,r,t-2,t-1,t,t+1,t+2,r,e],CG=(t,e,n)=>e?[1,n,t-2,t-1,t]:[1,n,t-6,t-5,t-4,t-3,t-2,t-1,t],F7=(t,e,n)=>{const r=window.innerWidth<=991.98;if(e<=(r?wG:xG))return Array.from({length:e},(i,o)=>o+1);switch(_G(t,e,r)){case"LEFT_LEANED":return SG(e,r,n);case"BALANCED":return kG(t,e,r,n);case"RIGHT_LEANED":return CG(e,r,n);default:throw new Error("Unknown pager type")}},Y7=t=>{const{page:e,size:n=10,total:r,totalPages:i,classname:o,onChange:a,onPageChange:s,onRowsPerPageChange:l,showRowsPerPage:c=!1,labelRowsPerPage:u="Filas por página:",pageSizeOptions:f=[5,10]}=t;r!=null&&i!=null&&console.error("You shouldn't use `total` and `totalPages` at the same time. Prefer `totalPages`.");const d=-1,[h,m]=k.useState(n),g=i??Math.ceil(r/h),[p,O]=k.useState(F7(e,g,d)),[w,v]=k.useState(window.innerWidth<=992),b=A=>{O(F7(A,g,d))};k.useEffect(()=>{const A=()=>{v(window.innerWidth<=992)};return window.addEventListener("resize",A),()=>window.removeEventListener("resize",A)},[]),k.useEffect(()=>(window.addEventListener("resize",()=>b(e)),()=>window.removeEventListener("resize",()=>b(e))),[]);const y=A=>{A!==e&&A!==0&&(s&&s(A),a&&a(A),b(A))},x=A=>{m(A==null?void 0:A.value),l==null||l(A)};if(g===1)return null;const _=k.useMemo(()=>f.map(A=>({label:A.toString(),value:A})),[f]),E=k.useMemo(()=>_.find(A=>A.value===h),[h,_]);return N.jsxs("section",{"data-testid":"pager-global","aria-label":"Pagination",className:Ce(Qo.paginator,w&&c&&Qo.paginator__mobile,(o==null?void 0:o.global)&&(o==null?void 0:o.global),"container_row","row__center"),children:[c&&N.jsxs("div",{className:Qo.paginator_rowsPerPage,children:[!w&&N.jsx(So,{type:"sm",weight:"medium",children:u}),N.jsx(V7,{className:Qo.select,options:_,value:E,onChange:x})]}),N.jsxs("nav",{"data-testid":"pager-nav",className:Ce(Qo.navPager,(o==null?void 0:o.nav)&&(o==null?void 0:o.nav)),children:[N.jsx(iu,{icon:"chevrons-left","aria-label":"First page",disabled:e===1,onClick:()=>y(1),className:(o==null?void 0:o.arrow)&&(o==null?void 0:o.arrow)}),N.jsx(iu,{icon:"chevron-left","aria-label":"Previous page",disabled:e===1,onClick:()=>y(e-1),className:(o==null?void 0:o.arrow)&&(o==null?void 0:o.arrow)}),p.map((A,I)=>N.jsx(P4,{className:(o==null?void 0:o.button)&&(o==null?void 0:o.button),ellipsisAsNumber:d,page:A,currentPage:e,onClick:()=>y(A)},`${A}-${I}`)),N.jsx(iu,{icon:"chevron-right","aria-label":"Next page",disabled:e===g,onClick:()=>y(e+1),className:(o==null?void 0:o.arrow)&&(o==null?void 0:o.arrow)}),N.jsx(iu,{icon:"chevrons-right","aria-label":"Last page",disabled:e===g,onClick:()=>y(g),className:(o==null?void 0:o.arrow)&&(o==null?void 0:o.arrow)})]})]})};Y7.prototype={avocado:"Pager"};const PG="_pill_twyo2_1",EG="_pill__outlined_twyo2_15",TG="_pill_icon_twyo2_19",Tg={pill:PG,pill__outlined:EG,pill_icon:TG},Ag=({children:t,className:e="",icon:n,iconFilled:r=!1,color:i="neutral-10",textColor:o="neutral-80",iconColor:a="neutral-80",outlined:s=!1})=>{const l=Ce(Tg.pill,e&&e,s&&Tg.pill__outlined),c={"--pill-color":`var(--color-${i})`,"--pill-text-color":`var(--color-${o})`};return N.jsxs("div",{className:l,style:c,children:[!!n&&N.jsx(kt,{className:Tg.pill_icon,filled:r,name:n,color:a,size:"sm"}),t]})},q7=["http","https","mailto","tel"];function AG(t){const e=(t||"").trim(),n=e.charAt(0);if(n==="#"||n==="/")return e;const r=e.indexOf(":");if(r===-1)return e;let i=-1;for(;++i<q7.length;){const o=q7[i];if(r===o.length&&e.slice(0,o.length).toLowerCase()===o)return e}return i=e.indexOf("?"),i!==-1&&r>i||(i=e.indexOf("#"),i!==-1&&r>i)?e:"javascript:void(0)"}/*!
660
660
  * Determine if an object is a Buffer
661
661
  *
662
662
  * @author Feross Aboukhadijeh <https://feross.org>
663
663
  * @license MIT
664
- */var MG=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)};const W8=as(MG);function du(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?U8(t.position):"start"in t||"end"in t?U8(t):"line"in t||"column"in t?Mg(t):""}function Mg(t){return H8(t&&t.line)+":"+H8(t&&t.column)}function U8(t){return Mg(t&&t.start)+"-"+Mg(t&&t.end)}function H8(t){return t&&typeof t=="number"?t:1}class Vr extends Error{constructor(e,n,r){const i=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const a=r.indexOf(":");a===-1?i[1]=r:(i[0]=r.slice(0,a),i[1]=r.slice(a+1))}n&&("type"in n||"position"in n?n.position&&(o=n.position):"start"in n||"end"in n?o=n:("line"in n||"column"in n)&&(o.start=n)),this.name=du(n)||"1:1",this.message=typeof e=="object"?e.message:e,this.stack="",typeof e=="object"&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.position=o,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}Vr.prototype.file="",Vr.prototype.name="",Vr.prototype.reason="",Vr.prototype.message="",Vr.prototype.stack="",Vr.prototype.fatal=null,Vr.prototype.column=null,Vr.prototype.line=null,Vr.prototype.source=null,Vr.prototype.ruleId=null,Vr.prototype.position=null;const zi={basename:QG,dirname:DG,extname:$G,join:LG,sep:"/"};function QG(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');hu(t);let n=0,r=-1,i=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.charCodeAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let a=-1,s=e.length-1;for(;i--;)if(t.charCodeAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(t.charCodeAt(i)===e.charCodeAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=t.length),t.slice(n,r)}function DG(t){if(hu(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.charCodeAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.charCodeAt(0)===47?"/":".":e===1&&t.charCodeAt(0)===47?"//":t.slice(0,e)}function $G(t){hu(t);let e=t.length,n=-1,r=0,i=-1,o=0,a;for(;e--;){const s=t.charCodeAt(e);if(s===47){if(a){r=e+1;break}continue}n<0&&(a=!0,n=e+1),s===46?i<0?i=e:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":t.slice(i,n)}function LG(...t){let e=-1,n;for(;++e<t.length;)hu(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":IG(n)}function IG(t){hu(t);const e=t.charCodeAt(0)===47;let n=jG(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.charCodeAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function jG(t,e){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=t.length;){if(a<t.length)s=t.charCodeAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(i+1,a):n=t.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function hu(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const NG={cwd:RG};function RG(){return"/"}function Qg(t){return t!==null&&typeof t=="object"&&t.href&&t.origin}function BG(t){if(typeof t=="string")t=new URL(t);else if(!Qg(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return ZG(t)}function ZG(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.charCodeAt(n)===37&&e.charCodeAt(n+1)===50){const r=e.charCodeAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}const Dg=["history","path","basename","stem","extname","dirname"];class G8{constructor(e){let n;e?typeof e=="string"||zG(e)?n={value:e}:Qg(e)?n={path:e}:n=e:n={},this.data={},this.messages=[],this.history=[],this.cwd=NG.cwd(),this.value,this.stored,this.result,this.map;let r=-1;for(;++r<Dg.length;){const o=Dg[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Dg.includes(i)||(this[i]=n[i])}get path(){return this.history[this.history.length-1]}set path(e){Qg(e)&&(e=BG(e)),Lg(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return typeof this.path=="string"?zi.dirname(this.path):void 0}set dirname(e){K8(this.basename,"dirname"),this.path=zi.join(e||"",this.basename)}get basename(){return typeof this.path=="string"?zi.basename(this.path):void 0}set basename(e){Lg(e,"basename"),$g(e,"basename"),this.path=zi.join(this.dirname||"",e)}get extname(){return typeof this.path=="string"?zi.extname(this.path):void 0}set extname(e){if($g(e,"extname"),K8(this.dirname,"extname"),e){if(e.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=zi.join(this.dirname,this.stem+(e||""))}get stem(){return typeof this.path=="string"?zi.basename(this.path,this.extname):void 0}set stem(e){Lg(e,"stem"),$g(e,"stem"),this.path=zi.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e||void 0)}message(e,n,r){const i=new Vr(e,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}info(e,n,r){const i=this.message(e,n,r);return i.fatal=null,i}fail(e,n,r){const i=this.message(e,n,r);throw i.fatal=!0,i}}function $g(t,e){if(t&&t.includes(zi.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+zi.sep+"`")}function Lg(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function K8(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function zG(t){return W8(t)}function J8(t){if(t)throw t}var wh=Object.prototype.hasOwnProperty,e7=Object.prototype.toString,t7=Object.defineProperty,n7=Object.getOwnPropertyDescriptor,r7=function(t){return typeof Array.isArray=="function"?Array.isArray(t):e7.call(t)==="[object Array]"},i7=function(t){if(!t||e7.call(t)!=="[object Object]")return!1;var e=wh.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&wh.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!e&&!n)return!1;var r;for(r in t);return typeof r>"u"||wh.call(t,r)},o7=function(t,e){t7&&e.name==="__proto__"?t7(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},a7=function(t,e){if(e==="__proto__")if(wh.call(t,e)){if(n7)return n7(t,e).value}else return;return t[e]},XG=function t(){var e,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(e=arguments[l],e!=null)for(n in e)r=a7(s,n),i=a7(e,n),s!==i&&(u&&i&&(i7(i)||(o=r7(i)))?(o?(o=!1,a=r&&r7(r)?r:[]):a=r&&i7(r)?r:{},o7(s,{name:n,newValue:t(u,a,i)})):typeof i<"u"&&o7(s,{name:n,newValue:i}));return s};const s7=as(XG);function Ig(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function VG(){const t=[],e={run:n,use:r};return e;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...c){const u=t[++o];let f=-1;if(l){a(l);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,u?FG(u,s)(...c):a(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function FG(t,e){let n;return r;function r(...a){const s=t.length>a.length;let l;s&&a.push(i);try{l=t.apply(this,a)}catch(c){const u=c;if(s&&n)throw u;return i(u)}s||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,e(a,...s))}function o(a){i(null,a)}}const YG=c7().freeze(),l7={}.hasOwnProperty;function c7(){const t=VG(),e=[];let n={},r,i=-1;return o.data=a,o.Parser=void 0,o.Compiler=void 0,o.freeze=s,o.attachers=e,o.use=l,o.parse=c,o.stringify=u,o.run=f,o.runSync=d,o.process=h,o.processSync=m,o;function o(){const g=c7();let p=-1;for(;++p<e.length;)g.use(...e[p]);return g.data(s7(!0,{},n)),g}function a(g,p){return typeof g=="string"?arguments.length===2?(Rg("data",r),n[g]=p,o):l7.call(n,g)&&n[g]||null:g?(Rg("data",r),n=g,o):n}function s(){if(r)return o;for(;++i<e.length;){const[g,...p]=e[i];if(p[0]===!1)continue;p[0]===!0&&(p[0]=void 0);const O=g.call(o,...p);typeof O=="function"&&t.use(O)}return r=!0,i=Number.POSITIVE_INFINITY,o}function l(g,...p){let O;if(Rg("use",r),g!=null)if(typeof g=="function")y(g,...p);else if(typeof g=="object")Array.isArray(g)?b(g):v(g);else throw new TypeError("Expected usable value, not `"+g+"`");return O&&(n.settings=Object.assign(n.settings||{},O)),o;function w(x){if(typeof x=="function")y(x);else if(typeof x=="object")if(Array.isArray(x)){const[_,...E]=x;y(_,...E)}else v(x);else throw new TypeError("Expected usable value, not `"+x+"`")}function v(x){b(x.plugins),x.settings&&(O=Object.assign(O||{},x.settings))}function b(x){let _=-1;if(x!=null)if(Array.isArray(x))for(;++_<x.length;){const E=x[_];w(E)}else throw new TypeError("Expected a list of plugins, not `"+x+"`")}function y(x,_){let E=-1,A;for(;++E<e.length;)if(e[E][0]===x){A=e[E];break}A?(Ig(A[1])&&Ig(_)&&(_=s7(!0,A[1],_)),A[1]=_):e.push([...arguments])}}function c(g){o.freeze();const p=pu(g),O=o.Parser;return jg("parse",O),u7(O,"parse")?new O(String(p),p).parse():O(String(p),p)}function u(g,p){o.freeze();const O=pu(p),w=o.Compiler;return Ng("stringify",w),f7(g),u7(w,"compile")?new w(g,O).compile():w(g,O)}function f(g,p,O){if(f7(g),o.freeze(),!O&&typeof p=="function"&&(O=p,p=void 0),!O)return new Promise(w);w(null,O);function w(v,b){t.run(g,pu(p),y);function y(x,_,E){_=_||g,x?b(x):v?v(_):O(null,_,E)}}}function d(g,p){let O,w;return o.run(g,p,v),d7("runSync","run",w),O;function v(b,y){J8(b),O=y,w=!0}}function h(g,p){if(o.freeze(),jg("process",o.Parser),Ng("process",o.Compiler),!p)return new Promise(O);O(null,p);function O(w,v){const b=pu(g);o.run(o.parse(b),b,(x,_,E)=>{if(x||!_||!E)y(x);else{const A=o.stringify(_,E);A==null||(UG(A)?E.value=A:E.result=A),y(x,E)}});function y(x,_){x||!_?v(x):w?w(_):p(null,_)}}}function m(g){let p;o.freeze(),jg("processSync",o.Parser),Ng("processSync",o.Compiler);const O=pu(g);return o.process(O,w),d7("processSync","process",p),O;function w(v){p=!0,J8(v)}}}function u7(t,e){return typeof t=="function"&&t.prototype&&(qG(t.prototype)||e in t.prototype)}function qG(t){let e;for(e in t)if(l7.call(t,e))return!0;return!1}function jg(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `Parser`")}function Ng(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `Compiler`")}function Rg(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function f7(t){if(!Ig(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function d7(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function pu(t){return WG(t)?t:new G8(t)}function WG(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function UG(t){return typeof t=="string"||W8(t)}const HG={};function GG(t,e){const n=HG,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return h7(t,r,i)}function h7(t,e,n){if(KG(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return p7(t.children,e,n)}return Array.isArray(t)?p7(t,e,n):""}function p7(t,e,n){const r=[];let i=-1;for(;++i<t.length;)r[i]=h7(t[i],e,n);return r.join("")}function KG(t){return!!(t&&typeof t=="object")}function Xi(t,e,n,r){const i=t.length;let o=0,a;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(e,n),t.splice(...a);else for(n&&t.splice(e,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(e,0),t.splice(...a),o+=1e4,e+=1e4}function Fr(t,e){return t.length>0?(Xi(t,t.length,0,e),t):e}const m7={}.hasOwnProperty;function JG(t){const e={};let n=-1;for(;++n<t.length;)eK(e,t[n]);return e}function eK(t,e){let n;for(n in e){const r=(m7.call(t,n)?t[n]:void 0)||(t[n]={}),i=e[n];let o;if(i)for(o in i){m7.call(r,o)||(r[o]=[]);const a=i[o];tK(r[o],Array.isArray(a)?a:a?[a]:[])}}}function tK(t,e){let n=-1;const r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);Xi(t,0,0,r)}const nK=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Vi=_a(/[A-Za-z]/),yr=_a(/[\dA-Za-z]/),rK=_a(/[#-'*+\--9=?A-Z^-~]/);function Bg(t){return t!==null&&(t<32||t===127)}const Zg=_a(/\d/),iK=_a(/[\dA-Fa-f]/),oK=_a(/[!-/:-@[-`{-~]/);function Ae(t){return t!==null&&t<-2}function er(t){return t!==null&&(t<0||t===32)}function nt(t){return t===-2||t===-1||t===32}const aK=_a(nK),sK=_a(/\s/);function _a(t){return e;function e(n){return n!==null&&t.test(String.fromCharCode(n))}}function wt(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return nt(l)?(t.enter(n),s(l)):e(l)}function s(l){return nt(l)&&o++<i?(t.consume(l),s):(t.exit(n),e(l))}}const lK={tokenize:cK};function cK(t){const e=t.attempt(this.parser.constructs.contentInitial,r,i);let n;return e;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),wt(t,e,"linePrefix")}function i(s){return t.enter("paragraph"),o(s)}function o(s){const l=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(s);return}return Ae(s)?(t.consume(s),t.exit("chunkText"),o):(t.consume(s),a)}}const uK={tokenize:fK},g7={tokenize:dK};function fK(t){const e=this,n=[];let r=0,i,o,a;return s;function s(v){if(r<n.length){const b=n[r];return e.containerState=b[1],t.attempt(b[0].continuation,l,c)(v)}return c(v)}function l(v){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&w();const b=e.events.length;let y=b,x;for(;y--;)if(e.events[y][0]==="exit"&&e.events[y][1].type==="chunkFlow"){x=e.events[y][1].end;break}O(r);let _=b;for(;_<e.events.length;)e.events[_][1].end=Object.assign({},x),_++;return Xi(e.events,y+1,0,e.events.slice(b)),e.events.length=_,c(v)}return s(v)}function c(v){if(r===n.length){if(!i)return d(v);if(i.currentConstruct&&i.currentConstruct.concrete)return m(v);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(g7,u,f)(v)}function u(v){return i&&w(),O(r),d(v)}function f(v){return e.parser.lazy[e.now().line]=r!==n.length,a=e.now().offset,m(v)}function d(v){return e.containerState={},t.attempt(g7,h,m)(v)}function h(v){return r++,n.push([e.currentConstruct,e.containerState]),d(v)}function m(v){if(v===null){i&&w(),O(0),t.consume(v);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),g(v)}function g(v){if(v===null){p(t.exit("chunkFlow"),!0),O(0),t.consume(v);return}return Ae(v)?(t.consume(v),p(t.exit("chunkFlow")),r=0,e.interrupt=void 0,s):(t.consume(v),g)}function p(v,b){const y=e.sliceStream(v);if(b&&y.push(null),v.previous=o,o&&(o.next=v),o=v,i.defineSkip(v.start),i.write(y),e.parser.lazy[v.start.line]){let x=i.events.length;for(;x--;)if(i.events[x][1].start.offset<a&&(!i.events[x][1].end||i.events[x][1].end.offset>a))return;const _=e.events.length;let E=_,A,I;for(;E--;)if(e.events[E][0]==="exit"&&e.events[E][1].type==="chunkFlow"){if(A){I=e.events[E][1].end;break}A=!0}for(O(r),x=_;x<e.events.length;)e.events[x][1].end=Object.assign({},I),x++;Xi(e.events,E+1,0,e.events.slice(_)),e.events.length=x}}function O(v){let b=n.length;for(;b-- >v;){const y=n[b];e.containerState=y[1],y[0].exit.call(e,t)}n.length=v}function w(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function dK(t,e,n){return wt(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function O7(t){if(t===null||er(t)||sK(t))return 1;if(aK(t))return 2}function zg(t,e,n){const r=[];let i=-1;for(;++i<t.length;){const o=t[i].resolveAll;o&&!r.includes(o)&&(e=o(e,n),r.push(o))}return e}const Xg={name:"attention",tokenize:pK,resolveAll:hK};function hK(t,e){let n=-1,r,i,o,a,s,l,c,u;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;l=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const f=Object.assign({},t[r][1].end),d=Object.assign({},t[n][1].start);y7(f,-l),y7(d,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},t[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[n][1].start),end:d},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},t[r][1].end),end:Object.assign({},t[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},t[r][1].end=Object.assign({},a.start),t[n][1].start=Object.assign({},s.end),c=[],t[r][1].end.offset-t[r][1].start.offset&&(c=Fr(c,[["enter",t[r][1],e],["exit",t[r][1],e]])),c=Fr(c,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",o,e]]),c=Fr(c,zg(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),c=Fr(c,[["exit",o,e],["enter",s,e],["exit",s,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(u=2,c=Fr(c,[["enter",t[n][1],e],["exit",t[n][1],e]])):u=0,Xi(t,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function pK(t,e){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=O7(r);let o;return a;function a(l){return o=l,t.enter("attentionSequence"),s(l)}function s(l){if(l===o)return t.consume(l),s;const c=t.exit("attentionSequence"),u=O7(l),f=!u||u===2&&i||n.includes(l),d=!i||i===2&&u||n.includes(r);return c._open=!!(o===42?f:f&&(i||!d)),c._close=!!(o===42?d:d&&(u||!f)),e(l)}}function y7(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const mK={name:"autolink",tokenize:gK};function gK(t,e,n){let r=0;return i;function i(h){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(h){return Vi(h)?(t.consume(h),a):c(h)}function a(h){return h===43||h===45||h===46||yr(h)?(r=1,s(h)):c(h)}function s(h){return h===58?(t.consume(h),r=0,l):(h===43||h===45||h===46||yr(h))&&r++<32?(t.consume(h),s):(r=0,c(h))}function l(h){return h===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):h===null||h===32||h===60||Bg(h)?n(h):(t.consume(h),l)}function c(h){return h===64?(t.consume(h),u):rK(h)?(t.consume(h),c):n(h)}function u(h){return yr(h)?f(h):n(h)}function f(h){return h===46?(t.consume(h),r=0,u):h===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):d(h)}function d(h){if((h===45||yr(h))&&r++<63){const m=h===45?d:f;return t.consume(h),m}return n(h)}}const xh={tokenize:OK,partial:!0};function OK(t,e,n){return r;function r(o){return nt(o)?wt(t,i,"linePrefix")(o):i(o)}function i(o){return o===null||Ae(o)?e(o):n(o)}}const v7={name:"blockQuote",tokenize:yK,continuation:{tokenize:vK},exit:bK};function yK(t,e,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(t.enter("blockQuote",{_container:!0}),s.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(a),t.exit("blockQuoteMarker"),o}return n(a)}function o(a){return nt(a)?(t.enter("blockQuotePrefixWhitespace"),t.consume(a),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(a))}}function vK(t,e,n){const r=this;return i;function i(a){return nt(a)?wt(t,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return t.attempt(v7,e,n)(a)}}function bK(t){t.exit("blockQuote")}const b7={name:"characterEscape",tokenize:wK};function wK(t,e,n){return r;function r(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),i}function i(o){return oK(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(o)}}const w7=document.createElement("i");function Vg(t){const e="&"+t+";";w7.innerHTML=e;const n=w7.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}const x7={name:"characterReference",tokenize:xK};function xK(t,e,n){const r=this;let i=0,o,a;return s;function s(f){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),l}function l(f){return f===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(f),t.exit("characterReferenceMarkerNumeric"),c):(t.enter("characterReferenceValue"),o=31,a=yr,u(f))}function c(f){return f===88||f===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(f),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,a=iK,u):(t.enter("characterReferenceValue"),o=7,a=Zg,u(f))}function u(f){if(f===59&&i){const d=t.exit("characterReferenceValue");return a===yr&&!Vg(r.sliceSerialize(d))?n(f):(t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return a(f)&&i++<o?(t.consume(f),u):n(f)}}const _7={tokenize:SK,partial:!0},S7={name:"codeFenced",tokenize:_K,concrete:!0};function _K(t,e,n){const r=this,i={tokenize:y,partial:!0};let o=0,a=0,s;return l;function l(x){return c(x)}function c(x){const _=r.events[r.events.length-1];return o=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,s=x,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(x)}function u(x){return x===s?(a++,t.consume(x),u):a<3?n(x):(t.exit("codeFencedFenceSequence"),nt(x)?wt(t,f,"whitespace")(x):f(x))}function f(x){return x===null||Ae(x)?(t.exit("codeFencedFence"),r.interrupt?e(x):t.check(_7,g,b)(x)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),d(x))}function d(x){return x===null||Ae(x)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),f(x)):nt(x)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),wt(t,h,"whitespace")(x)):x===96&&x===s?n(x):(t.consume(x),d)}function h(x){return x===null||Ae(x)?f(x):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===null||Ae(x)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(x)):x===96&&x===s?n(x):(t.consume(x),m)}function g(x){return t.attempt(i,b,p)(x)}function p(x){return t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),O}function O(x){return o>0&&nt(x)?wt(t,w,"linePrefix",o+1)(x):w(x)}function w(x){return x===null||Ae(x)?t.check(_7,g,b)(x):(t.enter("codeFlowValue"),v(x))}function v(x){return x===null||Ae(x)?(t.exit("codeFlowValue"),w(x)):(t.consume(x),v)}function b(x){return t.exit("codeFenced"),e(x)}function y(x,_,E){let A=0;return I;function I(B){return x.enter("lineEnding"),x.consume(B),x.exit("lineEnding"),Q}function Q(B){return x.enter("codeFencedFence"),nt(B)?wt(x,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):D(B)}function D(B){return B===s?(x.enter("codeFencedFenceSequence"),j(B)):E(B)}function j(B){return B===s?(A++,x.consume(B),j):A>=a?(x.exit("codeFencedFenceSequence"),nt(B)?wt(x,R,"whitespace")(B):R(B)):E(B)}function R(B){return B===null||Ae(B)?(x.exit("codeFencedFence"),_(B)):E(B)}}}function SK(t,e,n){const r=this;return i;function i(a){return a===null?n(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}const Fg={name:"codeIndented",tokenize:CK},kK={tokenize:PK,partial:!0};function CK(t,e,n){const r=this;return i;function i(c){return t.enter("codeIndented"),wt(t,o,"linePrefix",5)(c)}function o(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):Ae(c)?t.attempt(kK,a,l)(c):(t.enter("codeFlowValue"),s(c))}function s(c){return c===null||Ae(c)?(t.exit("codeFlowValue"),a(c)):(t.consume(c),s)}function l(c){return t.exit("codeIndented"),e(c)}}function PK(t,e,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Ae(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):wt(t,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?e(a):Ae(a)?i(a):n(a)}}const EK={name:"codeText",tokenize:MK,resolve:TK,previous:AK};function TK(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)i===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(i=r):(r===e||t[r][1].type==="lineEnding")&&(t[i][1].type="codeTextData",r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return t}function AK(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function MK(t,e,n){let r=0,i,o;return a;function a(f){return t.enter("codeText"),t.enter("codeTextSequence"),s(f)}function s(f){return f===96?(t.consume(f),r++,s):(t.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(t.enter("space"),t.consume(f),t.exit("space"),l):f===96?(o=t.enter("codeTextSequence"),i=0,u(f)):Ae(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||Ae(f)?(t.exit("codeTextData"),l(f)):(t.consume(f),c)}function u(f){return f===96?(t.consume(f),i++,u):i===r?(t.exit("codeTextSequence"),t.exit("codeText"),e(f)):(o.type="codeTextData",c(f))}}function k7(t){const e={};let n=-1,r,i,o,a,s,l,c;for(;++n<t.length;){for(;n in e;)n=e[n];if(r=t[n],n&&r[1].type==="chunkFlow"&&t[n-1][1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,QK(t,n)),n=e[n],c=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(a=t[o],a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(t[i][1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},t[i][1].start),s=t.slice(i,n),s.unshift(r),Xi(t,i,n-i+1,s))}}return!c}function QK(t,e){const n=t[e][1],r=t[e][2];let i=e-1;const o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],c={};let u,f,d=-1,h=n,m=0,g=0;const p=[g];for(;h;){for(;t[++i][1]!==h;);o.push(i),h._tokenizer||(u=r.sliceStream(h),h.next||u.push(null),f&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(g=d+1,p.push(g),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):p.pop(),d=p.length;d--;){const O=s.slice(p[d],p[d+1]),w=o.pop();l.unshift([w,w+O.length-1]),Xi(t,w,2,O)}for(d=-1;++d<l.length;)c[m+l[d][0]]=m+l[d][1],m+=l[d][1]-l[d][0]-1;return c}const DK={tokenize:IK,resolve:LK},$K={tokenize:jK,partial:!0};function LK(t){return k7(t),t}function IK(t,e){let n;return r;function r(s){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):Ae(s)?t.check($K,a,o)(s):(t.consume(s),i)}function o(s){return t.exit("chunkContent"),t.exit("content"),e(s)}function a(s){return t.consume(s),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function jK(t,e,n){const r=this;return i;function i(a){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),wt(t,o,"linePrefix")}function o(a){if(a===null||Ae(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?e(a):t.interrupt(r.parser.constructs.flow,n,e)(a)}}function C7(t,e,n,r,i,o,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return f;function f(O){return O===60?(t.enter(r),t.enter(i),t.enter(o),t.consume(O),t.exit(o),d):O===null||O===32||O===41||Bg(O)?n(O):(t.enter(r),t.enter(a),t.enter(s),t.enter("chunkString",{contentType:"string"}),g(O))}function d(O){return O===62?(t.enter(o),t.consume(O),t.exit(o),t.exit(i),t.exit(r),e):(t.enter(s),t.enter("chunkString",{contentType:"string"}),h(O))}function h(O){return O===62?(t.exit("chunkString"),t.exit(s),d(O)):O===null||O===60||Ae(O)?n(O):(t.consume(O),O===92?m:h)}function m(O){return O===60||O===62||O===92?(t.consume(O),h):h(O)}function g(O){return!u&&(O===null||O===41||er(O))?(t.exit("chunkString"),t.exit(s),t.exit(a),t.exit(r),e(O)):u<c&&O===40?(t.consume(O),u++,g):O===41?(t.consume(O),u--,g):O===null||O===32||O===40||Bg(O)?n(O):(t.consume(O),O===92?p:g)}function p(O){return O===40||O===41||O===92?(t.consume(O),g):g(O)}}function P7(t,e,n,r,i,o){const a=this;let s=0,l;return c;function c(h){return t.enter(r),t.enter(i),t.consume(h),t.exit(i),t.enter(o),u}function u(h){return s>999||h===null||h===91||h===93&&!l||h===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(t.exit(o),t.enter(i),t.consume(h),t.exit(i),t.exit(r),e):Ae(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||Ae(h)||s++>999?(t.exit("chunkString"),u(h)):(t.consume(h),l||(l=!nt(h)),h===92?d:f)}function d(h){return h===91||h===92||h===93?(t.consume(h),s++,f):f(h)}}function E7(t,e,n,r,i,o){let a;return s;function s(d){return d===34||d===39||d===40?(t.enter(r),t.enter(i),t.consume(d),t.exit(i),a=d===40?41:d,l):n(d)}function l(d){return d===a?(t.enter(i),t.consume(d),t.exit(i),t.exit(r),e):(t.enter(o),c(d))}function c(d){return d===a?(t.exit(o),l(a)):d===null?n(d):Ae(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),wt(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===a||d===null||Ae(d)?(t.exit("chunkString"),c(d)):(t.consume(d),d===92?f:u)}function f(d){return d===a||d===92?(t.consume(d),u):u(d)}}function mu(t,e){let n;return r;function r(i){return Ae(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):nt(i)?wt(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}function Tl(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const NK={name:"definition",tokenize:BK},RK={tokenize:ZK,partial:!0};function BK(t,e,n){const r=this;let i;return o;function o(h){return t.enter("definition"),a(h)}function a(h){return P7.call(r,t,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=Tl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(t.enter("definitionMarker"),t.consume(h),t.exit("definitionMarker"),l):n(h)}function l(h){return er(h)?mu(t,c)(h):c(h)}function c(h){return C7(t,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function u(h){return t.attempt(RK,f,f)(h)}function f(h){return nt(h)?wt(t,d,"whitespace")(h):d(h)}function d(h){return h===null||Ae(h)?(t.exit("definition"),r.parser.defined.push(i),e(h)):n(h)}}function ZK(t,e,n){return r;function r(s){return er(s)?mu(t,i)(s):n(s)}function i(s){return E7(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return nt(s)?wt(t,a,"whitespace")(s):a(s)}function a(s){return s===null||Ae(s)?e(s):n(s)}}const zK={name:"hardBreakEscape",tokenize:XK};function XK(t,e,n){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return Ae(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}const VK={name:"headingAtx",tokenize:YK,resolve:FK};function FK(t,e){let n=t.length-2,r=3,i,o;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},o={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},Xi(t,r,n-r+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function YK(t,e,n){let r=0;return i;function i(u){return t.enter("atxHeading"),o(u)}function o(u){return t.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(t.consume(u),a):u===null||er(u)?(t.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||Ae(u)?(t.exit("atxHeading"),e(u)):nt(u)?wt(t,s,"whitespace")(u):(t.enter("atxHeadingText"),c(u))}function l(u){return u===35?(t.consume(u),l):(t.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||er(u)?(t.exit("atxHeadingText"),s(u)):(t.consume(u),c)}}const qK=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],T7=["pre","script","style","textarea"],WK={name:"htmlFlow",tokenize:KK,resolveTo:GK,concrete:!0},UK={tokenize:eJ,partial:!0},HK={tokenize:JK,partial:!0};function GK(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function KK(t,e,n){const r=this;let i,o,a,s,l;return c;function c(T){return u(T)}function u(T){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(T),f}function f(T){return T===33?(t.consume(T),d):T===47?(t.consume(T),o=!0,g):T===63?(t.consume(T),i=3,r.interrupt?e:L):Vi(T)?(t.consume(T),a=String.fromCharCode(T),p):n(T)}function d(T){return T===45?(t.consume(T),i=2,h):T===91?(t.consume(T),i=5,s=0,m):Vi(T)?(t.consume(T),i=4,r.interrupt?e:L):n(T)}function h(T){return T===45?(t.consume(T),r.interrupt?e:L):n(T)}function m(T){const W="CDATA[";return T===W.charCodeAt(s++)?(t.consume(T),s===W.length?r.interrupt?e:D:m):n(T)}function g(T){return Vi(T)?(t.consume(T),a=String.fromCharCode(T),p):n(T)}function p(T){if(T===null||T===47||T===62||er(T)){const W=T===47,ee=a.toLowerCase();return!W&&!o&&T7.includes(ee)?(i=1,r.interrupt?e(T):D(T)):qK.includes(a.toLowerCase())?(i=6,W?(t.consume(T),O):r.interrupt?e(T):D(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):o?w(T):v(T))}return T===45||yr(T)?(t.consume(T),a+=String.fromCharCode(T),p):n(T)}function O(T){return T===62?(t.consume(T),r.interrupt?e:D):n(T)}function w(T){return nt(T)?(t.consume(T),w):I(T)}function v(T){return T===47?(t.consume(T),I):T===58||T===95||Vi(T)?(t.consume(T),b):nt(T)?(t.consume(T),v):I(T)}function b(T){return T===45||T===46||T===58||T===95||yr(T)?(t.consume(T),b):y(T)}function y(T){return T===61?(t.consume(T),x):nt(T)?(t.consume(T),y):v(T)}function x(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(t.consume(T),l=T,_):nt(T)?(t.consume(T),x):E(T)}function _(T){return T===l?(t.consume(T),l=null,A):T===null||Ae(T)?n(T):(t.consume(T),_)}function E(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||er(T)?y(T):(t.consume(T),E)}function A(T){return T===47||T===62||nt(T)?v(T):n(T)}function I(T){return T===62?(t.consume(T),Q):n(T)}function Q(T){return T===null||Ae(T)?D(T):nt(T)?(t.consume(T),Q):n(T)}function D(T){return T===45&&i===2?(t.consume(T),X):T===60&&i===1?(t.consume(T),V):T===62&&i===4?(t.consume(T),fe):T===63&&i===3?(t.consume(T),L):T===93&&i===5?(t.consume(T),ne):Ae(T)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(UK,oe,j)(T)):T===null||Ae(T)?(t.exit("htmlFlowData"),j(T)):(t.consume(T),D)}function j(T){return t.check(HK,R,oe)(T)}function R(T){return t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),B}function B(T){return T===null||Ae(T)?j(T):(t.enter("htmlFlowData"),D(T))}function X(T){return T===45?(t.consume(T),L):D(T)}function V(T){return T===47?(t.consume(T),a="",K):D(T)}function K(T){if(T===62){const W=a.toLowerCase();return T7.includes(W)?(t.consume(T),fe):D(T)}return Vi(T)&&a.length<8?(t.consume(T),a+=String.fromCharCode(T),K):D(T)}function ne(T){return T===93?(t.consume(T),L):D(T)}function L(T){return T===62?(t.consume(T),fe):T===45&&i===2?(t.consume(T),L):D(T)}function fe(T){return T===null||Ae(T)?(t.exit("htmlFlowData"),oe(T)):(t.consume(T),fe)}function oe(T){return t.exit("htmlFlow"),e(T)}}function JK(t,e,n){const r=this;return i;function i(a){return Ae(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}function eJ(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(xh,e,n)}}const tJ={name:"htmlText",tokenize:nJ};function nJ(t,e,n){const r=this;let i,o,a;return s;function s(L){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(L),l}function l(L){return L===33?(t.consume(L),c):L===47?(t.consume(L),y):L===63?(t.consume(L),v):Vi(L)?(t.consume(L),E):n(L)}function c(L){return L===45?(t.consume(L),u):L===91?(t.consume(L),o=0,m):Vi(L)?(t.consume(L),w):n(L)}function u(L){return L===45?(t.consume(L),h):n(L)}function f(L){return L===null?n(L):L===45?(t.consume(L),d):Ae(L)?(a=f,V(L)):(t.consume(L),f)}function d(L){return L===45?(t.consume(L),h):f(L)}function h(L){return L===62?X(L):L===45?d(L):f(L)}function m(L){const fe="CDATA[";return L===fe.charCodeAt(o++)?(t.consume(L),o===fe.length?g:m):n(L)}function g(L){return L===null?n(L):L===93?(t.consume(L),p):Ae(L)?(a=g,V(L)):(t.consume(L),g)}function p(L){return L===93?(t.consume(L),O):g(L)}function O(L){return L===62?X(L):L===93?(t.consume(L),O):g(L)}function w(L){return L===null||L===62?X(L):Ae(L)?(a=w,V(L)):(t.consume(L),w)}function v(L){return L===null?n(L):L===63?(t.consume(L),b):Ae(L)?(a=v,V(L)):(t.consume(L),v)}function b(L){return L===62?X(L):v(L)}function y(L){return Vi(L)?(t.consume(L),x):n(L)}function x(L){return L===45||yr(L)?(t.consume(L),x):_(L)}function _(L){return Ae(L)?(a=_,V(L)):nt(L)?(t.consume(L),_):X(L)}function E(L){return L===45||yr(L)?(t.consume(L),E):L===47||L===62||er(L)?A(L):n(L)}function A(L){return L===47?(t.consume(L),X):L===58||L===95||Vi(L)?(t.consume(L),I):Ae(L)?(a=A,V(L)):nt(L)?(t.consume(L),A):X(L)}function I(L){return L===45||L===46||L===58||L===95||yr(L)?(t.consume(L),I):Q(L)}function Q(L){return L===61?(t.consume(L),D):Ae(L)?(a=Q,V(L)):nt(L)?(t.consume(L),Q):A(L)}function D(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(t.consume(L),i=L,j):Ae(L)?(a=D,V(L)):nt(L)?(t.consume(L),D):(t.consume(L),R)}function j(L){return L===i?(t.consume(L),i=void 0,B):L===null?n(L):Ae(L)?(a=j,V(L)):(t.consume(L),j)}function R(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||er(L)?A(L):(t.consume(L),R)}function B(L){return L===47||L===62||er(L)?A(L):n(L)}function X(L){return L===62?(t.consume(L),t.exit("htmlTextData"),t.exit("htmlText"),e):n(L)}function V(L){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),K}function K(L){return nt(L)?wt(t,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):ne(L)}function ne(L){return t.enter("htmlTextData"),a(L)}}const Yg={name:"labelEnd",tokenize:lJ,resolveTo:sJ,resolveAll:aJ},rJ={tokenize:cJ},iJ={tokenize:uJ},oJ={tokenize:fJ};function aJ(t){let e=-1;for(;++e<t.length;){const n=t[e][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(t.splice(e+1,n.type==="labelImage"?4:2),n.type="data",e++)}return t}function sJ(t,e){let n=t.length,r=0,i,o,a,s;for(;n--;)if(i=t[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:t[o][1].type==="labelLink"?"link":"image",start:Object.assign({},t[o][1].start),end:Object.assign({},t[t.length-1][1].end)},c={type:"label",start:Object.assign({},t[o][1].start),end:Object.assign({},t[a][1].end)},u={type:"labelText",start:Object.assign({},t[o+r+2][1].end),end:Object.assign({},t[a-2][1].start)};return s=[["enter",l,e],["enter",c,e]],s=Fr(s,t.slice(o+1,o+r+3)),s=Fr(s,[["enter",u,e]]),s=Fr(s,zg(e.parser.constructs.insideSpan.null,t.slice(o+r+4,a-3),e)),s=Fr(s,[["exit",u,e],t[a-2],t[a-1],["exit",c,e]]),s=Fr(s,t.slice(a+1)),s=Fr(s,[["exit",l,e]]),Xi(t,o,t.length,s),t}function lJ(t,e,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(d){return o?o._inactive?f(d):(a=r.parser.defined.includes(Tl(r.sliceSerialize({start:o.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelEnd"),l):n(d)}function l(d){return d===40?t.attempt(rJ,u,a?u:f)(d):d===91?t.attempt(iJ,u,a?c:f)(d):a?u(d):f(d)}function c(d){return t.attempt(oJ,u,f)(d)}function u(d){return e(d)}function f(d){return o._balanced=!0,n(d)}}function cJ(t,e,n){return r;function r(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),i}function i(f){return er(f)?mu(t,o)(f):o(f)}function o(f){return f===41?u(f):C7(t,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return er(f)?mu(t,l)(f):u(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?E7(t,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return er(f)?mu(t,u)(f):u(f)}function u(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),e):n(f)}}function uJ(t,e,n){const r=this;return i;function i(s){return P7.call(r,t,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(Tl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(s):n(s)}function a(s){return n(s)}}function fJ(t,e,n){return r;function r(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),i}function i(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),e):n(o)}}const dJ={name:"labelStartImage",tokenize:hJ,resolveAll:Yg.resolveAll};function hJ(t,e,n){const r=this;return i;function i(s){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(s),t.exit("labelImageMarker"),o}function o(s){return s===91?(t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):e(s)}}const pJ={name:"labelStartLink",tokenize:mJ,resolveAll:Yg.resolveAll};function mJ(t,e,n){const r=this;return i;function i(a){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):e(a)}}const qg={name:"lineEnding",tokenize:gJ};function gJ(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),wt(t,e,"linePrefix")}}const _h={name:"thematicBreak",tokenize:OJ};function OJ(t,e,n){let r=0,i;return o;function o(c){return t.enter("thematicBreak"),a(c)}function a(c){return i=c,s(c)}function s(c){return c===i?(t.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||Ae(c))?(t.exit("thematicBreak"),e(c)):n(c)}function l(c){return c===i?(t.consume(c),r++,l):(t.exit("thematicBreakSequence"),nt(c)?wt(t,s,"whitespace")(c):s(c))}}const tr={name:"list",tokenize:bJ,continuation:{tokenize:wJ},exit:_J},yJ={tokenize:SJ,partial:!0},vJ={tokenize:xJ,partial:!0};function bJ(t,e,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(h){const m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Zg(h)){if(r.containerState.type||(r.containerState.type=m,t.enter(m,{_container:!0})),m==="listUnordered")return t.enter("listItemPrefix"),h===42||h===45?t.check(_h,n,c)(h):c(h);if(!r.interrupt||h===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(h)}return n(h)}function l(h){return Zg(h)&&++a<10?(t.consume(h),l):(!r.interrupt||a<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(t.exit("listItemValue"),c(h)):n(h)}function c(h){return t.enter("listItemMarker"),t.consume(h),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,t.check(xh,r.interrupt?n:u,t.attempt(yJ,d,f))}function u(h){return r.containerState.initialBlankLine=!0,o++,d(h)}function f(h){return nt(h)?(t.enter("listItemPrefixWhitespace"),t.consume(h),t.exit("listItemPrefixWhitespace"),d):n(h)}function d(h){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(h)}}function wJ(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(xh,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,wt(t,e,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!nt(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(vJ,e,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,wt(t,t.attempt(tr,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function xJ(t,e,n){const r=this;return wt(t,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?e(o):n(o)}}function _J(t){t.exit(this.containerState.type)}function SJ(t,e,n){const r=this;return wt(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!nt(o)&&a&&a[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}const A7={name:"setextUnderline",tokenize:CJ,resolveTo:kJ};function kJ(t,e){let n=t.length,r,i,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!o&&t[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:Object.assign({},t[i][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",a,e]),t.splice(o+1,0,["exit",t[r][1],e]),t[r][1].end=Object.assign({},t[o][1].end)):t[r][1]=a,t.push(["exit",a,e]),t}function CJ(t,e,n){const r=this;let i;return o;function o(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return t.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(t.consume(c),s):(t.exit("setextHeadingLineSequence"),nt(c)?wt(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Ae(c)?(t.exit("setextHeadingLine"),e(c)):n(c)}}const PJ={tokenize:EJ};function EJ(t){const e=this,n=t.attempt(xh,r,t.attempt(this.parser.constructs.flowInitial,i,wt(t,t.attempt(this.parser.constructs.flow,i,t.attempt(DK,i)),"linePrefix")));return n;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const TJ={resolveAll:Q7()},AJ=M7("string"),MJ=M7("text");function M7(t){return{tokenize:e,resolveAll:Q7(t==="text"?QJ:void 0)};function e(n){const r=this,i=this.parser.constructs[t],o=n.attempt(i,a,s);return a;function a(u){return c(u)?o(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),o(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const f=i[u];let d=-1;if(f)for(;++d<f.length;){const h=f[d];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Q7(t){return e;function e(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return t?t(n,r):n}}function QJ(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const r=t[n-1][1],i=e.sliceStream(r);let o=i.length,a=-1,s=0,l;for(;o--;){const c=i[o];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){o++;break}}if(s){const c={type:n===t.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(t.splice(n,0,["enter",c,e],["exit",c,e]),n+=2)}n++}return t}function DJ(t,e,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const l={consume:w,enter:v,exit:b,attempt:_(y),check:_(x),interrupt:_(x,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:t,sliceStream:h,sliceSerialize:d,now:m,defineSkip:g,write:f};let u=e.tokenize.call(c,l);return e.resolveAll&&o.push(e),c;function f(Q){return a=Fr(a,Q),p(),a[a.length-1]!==null?[]:(E(e,0),c.events=zg(o,c.events,c),c.events)}function d(Q,D){return LJ(h(Q),D)}function h(Q){return $J(a,Q)}function m(){const{line:Q,column:D,offset:j,_index:R,_bufferIndex:B}=r;return{line:Q,column:D,offset:j,_index:R,_bufferIndex:B}}function g(Q){i[Q.line]=Q.column,I()}function p(){let Q;for(;r._index<a.length;){const D=a[r._index];if(typeof D=="string")for(Q=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Q&&r._bufferIndex<D.length;)O(D.charCodeAt(r._bufferIndex));else O(D)}}function O(Q){u=u(Q)}function w(Q){Ae(Q)?(r.line++,r.column=1,r.offset+=Q===-3?2:1,I()):Q!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=Q}function v(Q,D){const j=D||{};return j.type=Q,j.start=m(),c.events.push(["enter",j,c]),s.push(j),j}function b(Q){const D=s.pop();return D.end=m(),c.events.push(["exit",D,c]),D}function y(Q,D){E(Q,D.from)}function x(Q,D){D.restore()}function _(Q,D){return j;function j(R,B,X){let V,K,ne,L;return Array.isArray(R)?oe(R):"tokenize"in R?oe([R]):fe(R);function fe(we){return Ze;function Ze(De){const te=De!==null&&we[De],he=De!==null&&we.null,xe=[...Array.isArray(te)?te:te?[te]:[],...Array.isArray(he)?he:he?[he]:[]];return oe(xe)(De)}}function oe(we){return V=we,K=0,we.length===0?X:T(we[K])}function T(we){return Ze;function Ze(De){return L=A(),ne=we,we.partial||(c.currentConstruct=we),we.name&&c.parser.constructs.disable.null.includes(we.name)?ee():we.tokenize.call(D?Object.assign(Object.create(c),D):c,l,W,ee)(De)}}function W(we){return Q(ne,L),B}function ee(we){return L.restore(),++K<V.length?T(V[K]):X}}}function E(Q,D){Q.resolveAll&&!o.includes(Q)&&o.push(Q),Q.resolve&&Xi(c.events,D,c.events.length-D,Q.resolve(c.events.slice(D),c)),Q.resolveTo&&(c.events=Q.resolveTo(c.events,c))}function A(){const Q=m(),D=c.previous,j=c.currentConstruct,R=c.events.length,B=Array.from(s);return{restore:X,from:R};function X(){r=Q,c.previous=D,c.currentConstruct=j,c.events.length=R,s=B,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function $J(t,e){const n=e.start._index,r=e.start._bufferIndex,i=e.end._index,o=e.end._bufferIndex;let a;if(n===i)a=[t[n].slice(r,o)];else{if(a=t.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(t[i].slice(0,o))}return a}function LJ(t,e){let n=-1;const r=[];let i;for(;++n<t.length;){const o=t[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
664
+ */var MG=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)};const W7=as(MG);function du(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?U7(t.position):"start"in t||"end"in t?U7(t):"line"in t||"column"in t?Mg(t):""}function Mg(t){return H7(t&&t.line)+":"+H7(t&&t.column)}function U7(t){return Mg(t&&t.start)+"-"+Mg(t&&t.end)}function H7(t){return t&&typeof t=="number"?t:1}class Vr extends Error{constructor(e,n,r){const i=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const a=r.indexOf(":");a===-1?i[1]=r:(i[0]=r.slice(0,a),i[1]=r.slice(a+1))}n&&("type"in n||"position"in n?n.position&&(o=n.position):"start"in n||"end"in n?o=n:("line"in n||"column"in n)&&(o.start=n)),this.name=du(n)||"1:1",this.message=typeof e=="object"?e.message:e,this.stack="",typeof e=="object"&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.position=o,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}Vr.prototype.file="",Vr.prototype.name="",Vr.prototype.reason="",Vr.prototype.message="",Vr.prototype.stack="",Vr.prototype.fatal=null,Vr.prototype.column=null,Vr.prototype.line=null,Vr.prototype.source=null,Vr.prototype.ruleId=null,Vr.prototype.position=null;const zi={basename:QG,dirname:DG,extname:$G,join:LG,sep:"/"};function QG(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');hu(t);let n=0,r=-1,i=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.charCodeAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let a=-1,s=e.length-1;for(;i--;)if(t.charCodeAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(t.charCodeAt(i)===e.charCodeAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=t.length),t.slice(n,r)}function DG(t){if(hu(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.charCodeAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.charCodeAt(0)===47?"/":".":e===1&&t.charCodeAt(0)===47?"//":t.slice(0,e)}function $G(t){hu(t);let e=t.length,n=-1,r=0,i=-1,o=0,a;for(;e--;){const s=t.charCodeAt(e);if(s===47){if(a){r=e+1;break}continue}n<0&&(a=!0,n=e+1),s===46?i<0?i=e:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":t.slice(i,n)}function LG(...t){let e=-1,n;for(;++e<t.length;)hu(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":IG(n)}function IG(t){hu(t);const e=t.charCodeAt(0)===47;let n=jG(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.charCodeAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function jG(t,e){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=t.length;){if(a<t.length)s=t.charCodeAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(i+1,a):n=t.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function hu(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const NG={cwd:RG};function RG(){return"/"}function Qg(t){return t!==null&&typeof t=="object"&&t.href&&t.origin}function BG(t){if(typeof t=="string")t=new URL(t);else if(!Qg(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return ZG(t)}function ZG(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.charCodeAt(n)===37&&e.charCodeAt(n+1)===50){const r=e.charCodeAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}const Dg=["history","path","basename","stem","extname","dirname"];class G7{constructor(e){let n;e?typeof e=="string"||zG(e)?n={value:e}:Qg(e)?n={path:e}:n=e:n={},this.data={},this.messages=[],this.history=[],this.cwd=NG.cwd(),this.value,this.stored,this.result,this.map;let r=-1;for(;++r<Dg.length;){const o=Dg[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Dg.includes(i)||(this[i]=n[i])}get path(){return this.history[this.history.length-1]}set path(e){Qg(e)&&(e=BG(e)),Lg(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return typeof this.path=="string"?zi.dirname(this.path):void 0}set dirname(e){K7(this.basename,"dirname"),this.path=zi.join(e||"",this.basename)}get basename(){return typeof this.path=="string"?zi.basename(this.path):void 0}set basename(e){Lg(e,"basename"),$g(e,"basename"),this.path=zi.join(this.dirname||"",e)}get extname(){return typeof this.path=="string"?zi.extname(this.path):void 0}set extname(e){if($g(e,"extname"),K7(this.dirname,"extname"),e){if(e.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=zi.join(this.dirname,this.stem+(e||""))}get stem(){return typeof this.path=="string"?zi.basename(this.path,this.extname):void 0}set stem(e){Lg(e,"stem"),$g(e,"stem"),this.path=zi.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e||void 0)}message(e,n,r){const i=new Vr(e,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}info(e,n,r){const i=this.message(e,n,r);return i.fatal=null,i}fail(e,n,r){const i=this.message(e,n,r);throw i.fatal=!0,i}}function $g(t,e){if(t&&t.includes(zi.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+zi.sep+"`")}function Lg(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function K7(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function zG(t){return W7(t)}function J7(t){if(t)throw t}var wh=Object.prototype.hasOwnProperty,e8=Object.prototype.toString,t8=Object.defineProperty,n8=Object.getOwnPropertyDescriptor,r8=function(t){return typeof Array.isArray=="function"?Array.isArray(t):e8.call(t)==="[object Array]"},i8=function(t){if(!t||e8.call(t)!=="[object Object]")return!1;var e=wh.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&wh.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!e&&!n)return!1;var r;for(r in t);return typeof r>"u"||wh.call(t,r)},o8=function(t,e){t8&&e.name==="__proto__"?t8(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},a8=function(t,e){if(e==="__proto__")if(wh.call(t,e)){if(n8)return n8(t,e).value}else return;return t[e]},XG=function t(){var e,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(e=arguments[l],e!=null)for(n in e)r=a8(s,n),i=a8(e,n),s!==i&&(u&&i&&(i8(i)||(o=r8(i)))?(o?(o=!1,a=r&&r8(r)?r:[]):a=r&&i8(r)?r:{},o8(s,{name:n,newValue:t(u,a,i)})):typeof i<"u"&&o8(s,{name:n,newValue:i}));return s};const s8=as(XG);function Ig(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function VG(){const t=[],e={run:n,use:r};return e;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...c){const u=t[++o];let f=-1;if(l){a(l);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,u?FG(u,s)(...c):a(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function FG(t,e){let n;return r;function r(...a){const s=t.length>a.length;let l;s&&a.push(i);try{l=t.apply(this,a)}catch(c){const u=c;if(s&&n)throw u;return i(u)}s||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,e(a,...s))}function o(a){i(null,a)}}const YG=c8().freeze(),l8={}.hasOwnProperty;function c8(){const t=VG(),e=[];let n={},r,i=-1;return o.data=a,o.Parser=void 0,o.Compiler=void 0,o.freeze=s,o.attachers=e,o.use=l,o.parse=c,o.stringify=u,o.run=f,o.runSync=d,o.process=h,o.processSync=m,o;function o(){const g=c8();let p=-1;for(;++p<e.length;)g.use(...e[p]);return g.data(s8(!0,{},n)),g}function a(g,p){return typeof g=="string"?arguments.length===2?(Rg("data",r),n[g]=p,o):l8.call(n,g)&&n[g]||null:g?(Rg("data",r),n=g,o):n}function s(){if(r)return o;for(;++i<e.length;){const[g,...p]=e[i];if(p[0]===!1)continue;p[0]===!0&&(p[0]=void 0);const O=g.call(o,...p);typeof O=="function"&&t.use(O)}return r=!0,i=Number.POSITIVE_INFINITY,o}function l(g,...p){let O;if(Rg("use",r),g!=null)if(typeof g=="function")y(g,...p);else if(typeof g=="object")Array.isArray(g)?b(g):v(g);else throw new TypeError("Expected usable value, not `"+g+"`");return O&&(n.settings=Object.assign(n.settings||{},O)),o;function w(x){if(typeof x=="function")y(x);else if(typeof x=="object")if(Array.isArray(x)){const[_,...E]=x;y(_,...E)}else v(x);else throw new TypeError("Expected usable value, not `"+x+"`")}function v(x){b(x.plugins),x.settings&&(O=Object.assign(O||{},x.settings))}function b(x){let _=-1;if(x!=null)if(Array.isArray(x))for(;++_<x.length;){const E=x[_];w(E)}else throw new TypeError("Expected a list of plugins, not `"+x+"`")}function y(x,_){let E=-1,A;for(;++E<e.length;)if(e[E][0]===x){A=e[E];break}A?(Ig(A[1])&&Ig(_)&&(_=s8(!0,A[1],_)),A[1]=_):e.push([...arguments])}}function c(g){o.freeze();const p=pu(g),O=o.Parser;return jg("parse",O),u8(O,"parse")?new O(String(p),p).parse():O(String(p),p)}function u(g,p){o.freeze();const O=pu(p),w=o.Compiler;return Ng("stringify",w),f8(g),u8(w,"compile")?new w(g,O).compile():w(g,O)}function f(g,p,O){if(f8(g),o.freeze(),!O&&typeof p=="function"&&(O=p,p=void 0),!O)return new Promise(w);w(null,O);function w(v,b){t.run(g,pu(p),y);function y(x,_,E){_=_||g,x?b(x):v?v(_):O(null,_,E)}}}function d(g,p){let O,w;return o.run(g,p,v),d8("runSync","run",w),O;function v(b,y){J7(b),O=y,w=!0}}function h(g,p){if(o.freeze(),jg("process",o.Parser),Ng("process",o.Compiler),!p)return new Promise(O);O(null,p);function O(w,v){const b=pu(g);o.run(o.parse(b),b,(x,_,E)=>{if(x||!_||!E)y(x);else{const A=o.stringify(_,E);A==null||(UG(A)?E.value=A:E.result=A),y(x,E)}});function y(x,_){x||!_?v(x):w?w(_):p(null,_)}}}function m(g){let p;o.freeze(),jg("processSync",o.Parser),Ng("processSync",o.Compiler);const O=pu(g);return o.process(O,w),d8("processSync","process",p),O;function w(v){p=!0,J7(v)}}}function u8(t,e){return typeof t=="function"&&t.prototype&&(qG(t.prototype)||e in t.prototype)}function qG(t){let e;for(e in t)if(l8.call(t,e))return!0;return!1}function jg(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `Parser`")}function Ng(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `Compiler`")}function Rg(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function f8(t){if(!Ig(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function d8(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function pu(t){return WG(t)?t:new G7(t)}function WG(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function UG(t){return typeof t=="string"||W7(t)}const HG={};function GG(t,e){const n=HG,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return h8(t,r,i)}function h8(t,e,n){if(KG(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return p8(t.children,e,n)}return Array.isArray(t)?p8(t,e,n):""}function p8(t,e,n){const r=[];let i=-1;for(;++i<t.length;)r[i]=h8(t[i],e,n);return r.join("")}function KG(t){return!!(t&&typeof t=="object")}function Xi(t,e,n,r){const i=t.length;let o=0,a;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(e,n),t.splice(...a);else for(n&&t.splice(e,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(e,0),t.splice(...a),o+=1e4,e+=1e4}function Fr(t,e){return t.length>0?(Xi(t,t.length,0,e),t):e}const m8={}.hasOwnProperty;function JG(t){const e={};let n=-1;for(;++n<t.length;)eK(e,t[n]);return e}function eK(t,e){let n;for(n in e){const r=(m8.call(t,n)?t[n]:void 0)||(t[n]={}),i=e[n];let o;if(i)for(o in i){m8.call(r,o)||(r[o]=[]);const a=i[o];tK(r[o],Array.isArray(a)?a:a?[a]:[])}}}function tK(t,e){let n=-1;const r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);Xi(t,0,0,r)}const nK=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Vi=_a(/[A-Za-z]/),yr=_a(/[\dA-Za-z]/),rK=_a(/[#-'*+\--9=?A-Z^-~]/);function Bg(t){return t!==null&&(t<32||t===127)}const Zg=_a(/\d/),iK=_a(/[\dA-Fa-f]/),oK=_a(/[!-/:-@[-`{-~]/);function Ae(t){return t!==null&&t<-2}function er(t){return t!==null&&(t<0||t===32)}function nt(t){return t===-2||t===-1||t===32}const aK=_a(nK),sK=_a(/\s/);function _a(t){return e;function e(n){return n!==null&&t.test(String.fromCharCode(n))}}function wt(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return nt(l)?(t.enter(n),s(l)):e(l)}function s(l){return nt(l)&&o++<i?(t.consume(l),s):(t.exit(n),e(l))}}const lK={tokenize:cK};function cK(t){const e=t.attempt(this.parser.constructs.contentInitial,r,i);let n;return e;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),wt(t,e,"linePrefix")}function i(s){return t.enter("paragraph"),o(s)}function o(s){const l=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(s);return}return Ae(s)?(t.consume(s),t.exit("chunkText"),o):(t.consume(s),a)}}const uK={tokenize:fK},g8={tokenize:dK};function fK(t){const e=this,n=[];let r=0,i,o,a;return s;function s(v){if(r<n.length){const b=n[r];return e.containerState=b[1],t.attempt(b[0].continuation,l,c)(v)}return c(v)}function l(v){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&w();const b=e.events.length;let y=b,x;for(;y--;)if(e.events[y][0]==="exit"&&e.events[y][1].type==="chunkFlow"){x=e.events[y][1].end;break}O(r);let _=b;for(;_<e.events.length;)e.events[_][1].end=Object.assign({},x),_++;return Xi(e.events,y+1,0,e.events.slice(b)),e.events.length=_,c(v)}return s(v)}function c(v){if(r===n.length){if(!i)return d(v);if(i.currentConstruct&&i.currentConstruct.concrete)return m(v);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(g8,u,f)(v)}function u(v){return i&&w(),O(r),d(v)}function f(v){return e.parser.lazy[e.now().line]=r!==n.length,a=e.now().offset,m(v)}function d(v){return e.containerState={},t.attempt(g8,h,m)(v)}function h(v){return r++,n.push([e.currentConstruct,e.containerState]),d(v)}function m(v){if(v===null){i&&w(),O(0),t.consume(v);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),g(v)}function g(v){if(v===null){p(t.exit("chunkFlow"),!0),O(0),t.consume(v);return}return Ae(v)?(t.consume(v),p(t.exit("chunkFlow")),r=0,e.interrupt=void 0,s):(t.consume(v),g)}function p(v,b){const y=e.sliceStream(v);if(b&&y.push(null),v.previous=o,o&&(o.next=v),o=v,i.defineSkip(v.start),i.write(y),e.parser.lazy[v.start.line]){let x=i.events.length;for(;x--;)if(i.events[x][1].start.offset<a&&(!i.events[x][1].end||i.events[x][1].end.offset>a))return;const _=e.events.length;let E=_,A,I;for(;E--;)if(e.events[E][0]==="exit"&&e.events[E][1].type==="chunkFlow"){if(A){I=e.events[E][1].end;break}A=!0}for(O(r),x=_;x<e.events.length;)e.events[x][1].end=Object.assign({},I),x++;Xi(e.events,E+1,0,e.events.slice(_)),e.events.length=x}}function O(v){let b=n.length;for(;b-- >v;){const y=n[b];e.containerState=y[1],y[0].exit.call(e,t)}n.length=v}function w(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function dK(t,e,n){return wt(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function O8(t){if(t===null||er(t)||sK(t))return 1;if(aK(t))return 2}function zg(t,e,n){const r=[];let i=-1;for(;++i<t.length;){const o=t[i].resolveAll;o&&!r.includes(o)&&(e=o(e,n),r.push(o))}return e}const Xg={name:"attention",tokenize:pK,resolveAll:hK};function hK(t,e){let n=-1,r,i,o,a,s,l,c,u;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;l=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const f=Object.assign({},t[r][1].end),d=Object.assign({},t[n][1].start);y8(f,-l),y8(d,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},t[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[n][1].start),end:d},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},t[r][1].end),end:Object.assign({},t[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},t[r][1].end=Object.assign({},a.start),t[n][1].start=Object.assign({},s.end),c=[],t[r][1].end.offset-t[r][1].start.offset&&(c=Fr(c,[["enter",t[r][1],e],["exit",t[r][1],e]])),c=Fr(c,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",o,e]]),c=Fr(c,zg(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),c=Fr(c,[["exit",o,e],["enter",s,e],["exit",s,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(u=2,c=Fr(c,[["enter",t[n][1],e],["exit",t[n][1],e]])):u=0,Xi(t,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function pK(t,e){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=O8(r);let o;return a;function a(l){return o=l,t.enter("attentionSequence"),s(l)}function s(l){if(l===o)return t.consume(l),s;const c=t.exit("attentionSequence"),u=O8(l),f=!u||u===2&&i||n.includes(l),d=!i||i===2&&u||n.includes(r);return c._open=!!(o===42?f:f&&(i||!d)),c._close=!!(o===42?d:d&&(u||!f)),e(l)}}function y8(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const mK={name:"autolink",tokenize:gK};function gK(t,e,n){let r=0;return i;function i(h){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(h){return Vi(h)?(t.consume(h),a):c(h)}function a(h){return h===43||h===45||h===46||yr(h)?(r=1,s(h)):c(h)}function s(h){return h===58?(t.consume(h),r=0,l):(h===43||h===45||h===46||yr(h))&&r++<32?(t.consume(h),s):(r=0,c(h))}function l(h){return h===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):h===null||h===32||h===60||Bg(h)?n(h):(t.consume(h),l)}function c(h){return h===64?(t.consume(h),u):rK(h)?(t.consume(h),c):n(h)}function u(h){return yr(h)?f(h):n(h)}function f(h){return h===46?(t.consume(h),r=0,u):h===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):d(h)}function d(h){if((h===45||yr(h))&&r++<63){const m=h===45?d:f;return t.consume(h),m}return n(h)}}const xh={tokenize:OK,partial:!0};function OK(t,e,n){return r;function r(o){return nt(o)?wt(t,i,"linePrefix")(o):i(o)}function i(o){return o===null||Ae(o)?e(o):n(o)}}const v8={name:"blockQuote",tokenize:yK,continuation:{tokenize:vK},exit:bK};function yK(t,e,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(t.enter("blockQuote",{_container:!0}),s.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(a),t.exit("blockQuoteMarker"),o}return n(a)}function o(a){return nt(a)?(t.enter("blockQuotePrefixWhitespace"),t.consume(a),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(a))}}function vK(t,e,n){const r=this;return i;function i(a){return nt(a)?wt(t,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return t.attempt(v8,e,n)(a)}}function bK(t){t.exit("blockQuote")}const b8={name:"characterEscape",tokenize:wK};function wK(t,e,n){return r;function r(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),i}function i(o){return oK(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(o)}}const w8=document.createElement("i");function Vg(t){const e="&"+t+";";w8.innerHTML=e;const n=w8.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}const x8={name:"characterReference",tokenize:xK};function xK(t,e,n){const r=this;let i=0,o,a;return s;function s(f){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),l}function l(f){return f===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(f),t.exit("characterReferenceMarkerNumeric"),c):(t.enter("characterReferenceValue"),o=31,a=yr,u(f))}function c(f){return f===88||f===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(f),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,a=iK,u):(t.enter("characterReferenceValue"),o=7,a=Zg,u(f))}function u(f){if(f===59&&i){const d=t.exit("characterReferenceValue");return a===yr&&!Vg(r.sliceSerialize(d))?n(f):(t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return a(f)&&i++<o?(t.consume(f),u):n(f)}}const _8={tokenize:SK,partial:!0},S8={name:"codeFenced",tokenize:_K,concrete:!0};function _K(t,e,n){const r=this,i={tokenize:y,partial:!0};let o=0,a=0,s;return l;function l(x){return c(x)}function c(x){const _=r.events[r.events.length-1];return o=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,s=x,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(x)}function u(x){return x===s?(a++,t.consume(x),u):a<3?n(x):(t.exit("codeFencedFenceSequence"),nt(x)?wt(t,f,"whitespace")(x):f(x))}function f(x){return x===null||Ae(x)?(t.exit("codeFencedFence"),r.interrupt?e(x):t.check(_8,g,b)(x)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),d(x))}function d(x){return x===null||Ae(x)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),f(x)):nt(x)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),wt(t,h,"whitespace")(x)):x===96&&x===s?n(x):(t.consume(x),d)}function h(x){return x===null||Ae(x)?f(x):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===null||Ae(x)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(x)):x===96&&x===s?n(x):(t.consume(x),m)}function g(x){return t.attempt(i,b,p)(x)}function p(x){return t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),O}function O(x){return o>0&&nt(x)?wt(t,w,"linePrefix",o+1)(x):w(x)}function w(x){return x===null||Ae(x)?t.check(_8,g,b)(x):(t.enter("codeFlowValue"),v(x))}function v(x){return x===null||Ae(x)?(t.exit("codeFlowValue"),w(x)):(t.consume(x),v)}function b(x){return t.exit("codeFenced"),e(x)}function y(x,_,E){let A=0;return I;function I(B){return x.enter("lineEnding"),x.consume(B),x.exit("lineEnding"),Q}function Q(B){return x.enter("codeFencedFence"),nt(B)?wt(x,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):D(B)}function D(B){return B===s?(x.enter("codeFencedFenceSequence"),j(B)):E(B)}function j(B){return B===s?(A++,x.consume(B),j):A>=a?(x.exit("codeFencedFenceSequence"),nt(B)?wt(x,R,"whitespace")(B):R(B)):E(B)}function R(B){return B===null||Ae(B)?(x.exit("codeFencedFence"),_(B)):E(B)}}}function SK(t,e,n){const r=this;return i;function i(a){return a===null?n(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}const Fg={name:"codeIndented",tokenize:CK},kK={tokenize:PK,partial:!0};function CK(t,e,n){const r=this;return i;function i(c){return t.enter("codeIndented"),wt(t,o,"linePrefix",5)(c)}function o(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):Ae(c)?t.attempt(kK,a,l)(c):(t.enter("codeFlowValue"),s(c))}function s(c){return c===null||Ae(c)?(t.exit("codeFlowValue"),a(c)):(t.consume(c),s)}function l(c){return t.exit("codeIndented"),e(c)}}function PK(t,e,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Ae(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):wt(t,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?e(a):Ae(a)?i(a):n(a)}}const EK={name:"codeText",tokenize:MK,resolve:TK,previous:AK};function TK(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)i===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(i=r):(r===e||t[r][1].type==="lineEnding")&&(t[i][1].type="codeTextData",r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return t}function AK(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function MK(t,e,n){let r=0,i,o;return a;function a(f){return t.enter("codeText"),t.enter("codeTextSequence"),s(f)}function s(f){return f===96?(t.consume(f),r++,s):(t.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(t.enter("space"),t.consume(f),t.exit("space"),l):f===96?(o=t.enter("codeTextSequence"),i=0,u(f)):Ae(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||Ae(f)?(t.exit("codeTextData"),l(f)):(t.consume(f),c)}function u(f){return f===96?(t.consume(f),i++,u):i===r?(t.exit("codeTextSequence"),t.exit("codeText"),e(f)):(o.type="codeTextData",c(f))}}function k8(t){const e={};let n=-1,r,i,o,a,s,l,c;for(;++n<t.length;){for(;n in e;)n=e[n];if(r=t[n],n&&r[1].type==="chunkFlow"&&t[n-1][1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,QK(t,n)),n=e[n],c=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(a=t[o],a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(t[i][1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},t[i][1].start),s=t.slice(i,n),s.unshift(r),Xi(t,i,n-i+1,s))}}return!c}function QK(t,e){const n=t[e][1],r=t[e][2];let i=e-1;const o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],c={};let u,f,d=-1,h=n,m=0,g=0;const p=[g];for(;h;){for(;t[++i][1]!==h;);o.push(i),h._tokenizer||(u=r.sliceStream(h),h.next||u.push(null),f&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(g=d+1,p.push(g),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):p.pop(),d=p.length;d--;){const O=s.slice(p[d],p[d+1]),w=o.pop();l.unshift([w,w+O.length-1]),Xi(t,w,2,O)}for(d=-1;++d<l.length;)c[m+l[d][0]]=m+l[d][1],m+=l[d][1]-l[d][0]-1;return c}const DK={tokenize:IK,resolve:LK},$K={tokenize:jK,partial:!0};function LK(t){return k8(t),t}function IK(t,e){let n;return r;function r(s){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):Ae(s)?t.check($K,a,o)(s):(t.consume(s),i)}function o(s){return t.exit("chunkContent"),t.exit("content"),e(s)}function a(s){return t.consume(s),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function jK(t,e,n){const r=this;return i;function i(a){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),wt(t,o,"linePrefix")}function o(a){if(a===null||Ae(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?e(a):t.interrupt(r.parser.constructs.flow,n,e)(a)}}function C8(t,e,n,r,i,o,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return f;function f(O){return O===60?(t.enter(r),t.enter(i),t.enter(o),t.consume(O),t.exit(o),d):O===null||O===32||O===41||Bg(O)?n(O):(t.enter(r),t.enter(a),t.enter(s),t.enter("chunkString",{contentType:"string"}),g(O))}function d(O){return O===62?(t.enter(o),t.consume(O),t.exit(o),t.exit(i),t.exit(r),e):(t.enter(s),t.enter("chunkString",{contentType:"string"}),h(O))}function h(O){return O===62?(t.exit("chunkString"),t.exit(s),d(O)):O===null||O===60||Ae(O)?n(O):(t.consume(O),O===92?m:h)}function m(O){return O===60||O===62||O===92?(t.consume(O),h):h(O)}function g(O){return!u&&(O===null||O===41||er(O))?(t.exit("chunkString"),t.exit(s),t.exit(a),t.exit(r),e(O)):u<c&&O===40?(t.consume(O),u++,g):O===41?(t.consume(O),u--,g):O===null||O===32||O===40||Bg(O)?n(O):(t.consume(O),O===92?p:g)}function p(O){return O===40||O===41||O===92?(t.consume(O),g):g(O)}}function P8(t,e,n,r,i,o){const a=this;let s=0,l;return c;function c(h){return t.enter(r),t.enter(i),t.consume(h),t.exit(i),t.enter(o),u}function u(h){return s>999||h===null||h===91||h===93&&!l||h===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(t.exit(o),t.enter(i),t.consume(h),t.exit(i),t.exit(r),e):Ae(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||Ae(h)||s++>999?(t.exit("chunkString"),u(h)):(t.consume(h),l||(l=!nt(h)),h===92?d:f)}function d(h){return h===91||h===92||h===93?(t.consume(h),s++,f):f(h)}}function E8(t,e,n,r,i,o){let a;return s;function s(d){return d===34||d===39||d===40?(t.enter(r),t.enter(i),t.consume(d),t.exit(i),a=d===40?41:d,l):n(d)}function l(d){return d===a?(t.enter(i),t.consume(d),t.exit(i),t.exit(r),e):(t.enter(o),c(d))}function c(d){return d===a?(t.exit(o),l(a)):d===null?n(d):Ae(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),wt(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===a||d===null||Ae(d)?(t.exit("chunkString"),c(d)):(t.consume(d),d===92?f:u)}function f(d){return d===a||d===92?(t.consume(d),u):u(d)}}function mu(t,e){let n;return r;function r(i){return Ae(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):nt(i)?wt(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}function Tl(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const NK={name:"definition",tokenize:BK},RK={tokenize:ZK,partial:!0};function BK(t,e,n){const r=this;let i;return o;function o(h){return t.enter("definition"),a(h)}function a(h){return P8.call(r,t,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=Tl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(t.enter("definitionMarker"),t.consume(h),t.exit("definitionMarker"),l):n(h)}function l(h){return er(h)?mu(t,c)(h):c(h)}function c(h){return C8(t,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function u(h){return t.attempt(RK,f,f)(h)}function f(h){return nt(h)?wt(t,d,"whitespace")(h):d(h)}function d(h){return h===null||Ae(h)?(t.exit("definition"),r.parser.defined.push(i),e(h)):n(h)}}function ZK(t,e,n){return r;function r(s){return er(s)?mu(t,i)(s):n(s)}function i(s){return E8(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return nt(s)?wt(t,a,"whitespace")(s):a(s)}function a(s){return s===null||Ae(s)?e(s):n(s)}}const zK={name:"hardBreakEscape",tokenize:XK};function XK(t,e,n){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return Ae(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}const VK={name:"headingAtx",tokenize:YK,resolve:FK};function FK(t,e){let n=t.length-2,r=3,i,o;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},o={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},Xi(t,r,n-r+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function YK(t,e,n){let r=0;return i;function i(u){return t.enter("atxHeading"),o(u)}function o(u){return t.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(t.consume(u),a):u===null||er(u)?(t.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||Ae(u)?(t.exit("atxHeading"),e(u)):nt(u)?wt(t,s,"whitespace")(u):(t.enter("atxHeadingText"),c(u))}function l(u){return u===35?(t.consume(u),l):(t.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||er(u)?(t.exit("atxHeadingText"),s(u)):(t.consume(u),c)}}const qK=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],T8=["pre","script","style","textarea"],WK={name:"htmlFlow",tokenize:KK,resolveTo:GK,concrete:!0},UK={tokenize:eJ,partial:!0},HK={tokenize:JK,partial:!0};function GK(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function KK(t,e,n){const r=this;let i,o,a,s,l;return c;function c(T){return u(T)}function u(T){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(T),f}function f(T){return T===33?(t.consume(T),d):T===47?(t.consume(T),o=!0,g):T===63?(t.consume(T),i=3,r.interrupt?e:L):Vi(T)?(t.consume(T),a=String.fromCharCode(T),p):n(T)}function d(T){return T===45?(t.consume(T),i=2,h):T===91?(t.consume(T),i=5,s=0,m):Vi(T)?(t.consume(T),i=4,r.interrupt?e:L):n(T)}function h(T){return T===45?(t.consume(T),r.interrupt?e:L):n(T)}function m(T){const W="CDATA[";return T===W.charCodeAt(s++)?(t.consume(T),s===W.length?r.interrupt?e:D:m):n(T)}function g(T){return Vi(T)?(t.consume(T),a=String.fromCharCode(T),p):n(T)}function p(T){if(T===null||T===47||T===62||er(T)){const W=T===47,ee=a.toLowerCase();return!W&&!o&&T8.includes(ee)?(i=1,r.interrupt?e(T):D(T)):qK.includes(a.toLowerCase())?(i=6,W?(t.consume(T),O):r.interrupt?e(T):D(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):o?w(T):v(T))}return T===45||yr(T)?(t.consume(T),a+=String.fromCharCode(T),p):n(T)}function O(T){return T===62?(t.consume(T),r.interrupt?e:D):n(T)}function w(T){return nt(T)?(t.consume(T),w):I(T)}function v(T){return T===47?(t.consume(T),I):T===58||T===95||Vi(T)?(t.consume(T),b):nt(T)?(t.consume(T),v):I(T)}function b(T){return T===45||T===46||T===58||T===95||yr(T)?(t.consume(T),b):y(T)}function y(T){return T===61?(t.consume(T),x):nt(T)?(t.consume(T),y):v(T)}function x(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(t.consume(T),l=T,_):nt(T)?(t.consume(T),x):E(T)}function _(T){return T===l?(t.consume(T),l=null,A):T===null||Ae(T)?n(T):(t.consume(T),_)}function E(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||er(T)?y(T):(t.consume(T),E)}function A(T){return T===47||T===62||nt(T)?v(T):n(T)}function I(T){return T===62?(t.consume(T),Q):n(T)}function Q(T){return T===null||Ae(T)?D(T):nt(T)?(t.consume(T),Q):n(T)}function D(T){return T===45&&i===2?(t.consume(T),X):T===60&&i===1?(t.consume(T),V):T===62&&i===4?(t.consume(T),fe):T===63&&i===3?(t.consume(T),L):T===93&&i===5?(t.consume(T),ne):Ae(T)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(UK,oe,j)(T)):T===null||Ae(T)?(t.exit("htmlFlowData"),j(T)):(t.consume(T),D)}function j(T){return t.check(HK,R,oe)(T)}function R(T){return t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),B}function B(T){return T===null||Ae(T)?j(T):(t.enter("htmlFlowData"),D(T))}function X(T){return T===45?(t.consume(T),L):D(T)}function V(T){return T===47?(t.consume(T),a="",K):D(T)}function K(T){if(T===62){const W=a.toLowerCase();return T8.includes(W)?(t.consume(T),fe):D(T)}return Vi(T)&&a.length<8?(t.consume(T),a+=String.fromCharCode(T),K):D(T)}function ne(T){return T===93?(t.consume(T),L):D(T)}function L(T){return T===62?(t.consume(T),fe):T===45&&i===2?(t.consume(T),L):D(T)}function fe(T){return T===null||Ae(T)?(t.exit("htmlFlowData"),oe(T)):(t.consume(T),fe)}function oe(T){return t.exit("htmlFlow"),e(T)}}function JK(t,e,n){const r=this;return i;function i(a){return Ae(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}function eJ(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(xh,e,n)}}const tJ={name:"htmlText",tokenize:nJ};function nJ(t,e,n){const r=this;let i,o,a;return s;function s(L){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(L),l}function l(L){return L===33?(t.consume(L),c):L===47?(t.consume(L),y):L===63?(t.consume(L),v):Vi(L)?(t.consume(L),E):n(L)}function c(L){return L===45?(t.consume(L),u):L===91?(t.consume(L),o=0,m):Vi(L)?(t.consume(L),w):n(L)}function u(L){return L===45?(t.consume(L),h):n(L)}function f(L){return L===null?n(L):L===45?(t.consume(L),d):Ae(L)?(a=f,V(L)):(t.consume(L),f)}function d(L){return L===45?(t.consume(L),h):f(L)}function h(L){return L===62?X(L):L===45?d(L):f(L)}function m(L){const fe="CDATA[";return L===fe.charCodeAt(o++)?(t.consume(L),o===fe.length?g:m):n(L)}function g(L){return L===null?n(L):L===93?(t.consume(L),p):Ae(L)?(a=g,V(L)):(t.consume(L),g)}function p(L){return L===93?(t.consume(L),O):g(L)}function O(L){return L===62?X(L):L===93?(t.consume(L),O):g(L)}function w(L){return L===null||L===62?X(L):Ae(L)?(a=w,V(L)):(t.consume(L),w)}function v(L){return L===null?n(L):L===63?(t.consume(L),b):Ae(L)?(a=v,V(L)):(t.consume(L),v)}function b(L){return L===62?X(L):v(L)}function y(L){return Vi(L)?(t.consume(L),x):n(L)}function x(L){return L===45||yr(L)?(t.consume(L),x):_(L)}function _(L){return Ae(L)?(a=_,V(L)):nt(L)?(t.consume(L),_):X(L)}function E(L){return L===45||yr(L)?(t.consume(L),E):L===47||L===62||er(L)?A(L):n(L)}function A(L){return L===47?(t.consume(L),X):L===58||L===95||Vi(L)?(t.consume(L),I):Ae(L)?(a=A,V(L)):nt(L)?(t.consume(L),A):X(L)}function I(L){return L===45||L===46||L===58||L===95||yr(L)?(t.consume(L),I):Q(L)}function Q(L){return L===61?(t.consume(L),D):Ae(L)?(a=Q,V(L)):nt(L)?(t.consume(L),Q):A(L)}function D(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(t.consume(L),i=L,j):Ae(L)?(a=D,V(L)):nt(L)?(t.consume(L),D):(t.consume(L),R)}function j(L){return L===i?(t.consume(L),i=void 0,B):L===null?n(L):Ae(L)?(a=j,V(L)):(t.consume(L),j)}function R(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||er(L)?A(L):(t.consume(L),R)}function B(L){return L===47||L===62||er(L)?A(L):n(L)}function X(L){return L===62?(t.consume(L),t.exit("htmlTextData"),t.exit("htmlText"),e):n(L)}function V(L){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),K}function K(L){return nt(L)?wt(t,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):ne(L)}function ne(L){return t.enter("htmlTextData"),a(L)}}const Yg={name:"labelEnd",tokenize:lJ,resolveTo:sJ,resolveAll:aJ},rJ={tokenize:cJ},iJ={tokenize:uJ},oJ={tokenize:fJ};function aJ(t){let e=-1;for(;++e<t.length;){const n=t[e][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(t.splice(e+1,n.type==="labelImage"?4:2),n.type="data",e++)}return t}function sJ(t,e){let n=t.length,r=0,i,o,a,s;for(;n--;)if(i=t[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:t[o][1].type==="labelLink"?"link":"image",start:Object.assign({},t[o][1].start),end:Object.assign({},t[t.length-1][1].end)},c={type:"label",start:Object.assign({},t[o][1].start),end:Object.assign({},t[a][1].end)},u={type:"labelText",start:Object.assign({},t[o+r+2][1].end),end:Object.assign({},t[a-2][1].start)};return s=[["enter",l,e],["enter",c,e]],s=Fr(s,t.slice(o+1,o+r+3)),s=Fr(s,[["enter",u,e]]),s=Fr(s,zg(e.parser.constructs.insideSpan.null,t.slice(o+r+4,a-3),e)),s=Fr(s,[["exit",u,e],t[a-2],t[a-1],["exit",c,e]]),s=Fr(s,t.slice(a+1)),s=Fr(s,[["exit",l,e]]),Xi(t,o,t.length,s),t}function lJ(t,e,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(d){return o?o._inactive?f(d):(a=r.parser.defined.includes(Tl(r.sliceSerialize({start:o.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelEnd"),l):n(d)}function l(d){return d===40?t.attempt(rJ,u,a?u:f)(d):d===91?t.attempt(iJ,u,a?c:f)(d):a?u(d):f(d)}function c(d){return t.attempt(oJ,u,f)(d)}function u(d){return e(d)}function f(d){return o._balanced=!0,n(d)}}function cJ(t,e,n){return r;function r(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),i}function i(f){return er(f)?mu(t,o)(f):o(f)}function o(f){return f===41?u(f):C8(t,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return er(f)?mu(t,l)(f):u(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?E8(t,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return er(f)?mu(t,u)(f):u(f)}function u(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),e):n(f)}}function uJ(t,e,n){const r=this;return i;function i(s){return P8.call(r,t,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(Tl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(s):n(s)}function a(s){return n(s)}}function fJ(t,e,n){return r;function r(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),i}function i(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),e):n(o)}}const dJ={name:"labelStartImage",tokenize:hJ,resolveAll:Yg.resolveAll};function hJ(t,e,n){const r=this;return i;function i(s){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(s),t.exit("labelImageMarker"),o}function o(s){return s===91?(t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):e(s)}}const pJ={name:"labelStartLink",tokenize:mJ,resolveAll:Yg.resolveAll};function mJ(t,e,n){const r=this;return i;function i(a){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):e(a)}}const qg={name:"lineEnding",tokenize:gJ};function gJ(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),wt(t,e,"linePrefix")}}const _h={name:"thematicBreak",tokenize:OJ};function OJ(t,e,n){let r=0,i;return o;function o(c){return t.enter("thematicBreak"),a(c)}function a(c){return i=c,s(c)}function s(c){return c===i?(t.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||Ae(c))?(t.exit("thematicBreak"),e(c)):n(c)}function l(c){return c===i?(t.consume(c),r++,l):(t.exit("thematicBreakSequence"),nt(c)?wt(t,s,"whitespace")(c):s(c))}}const tr={name:"list",tokenize:bJ,continuation:{tokenize:wJ},exit:_J},yJ={tokenize:SJ,partial:!0},vJ={tokenize:xJ,partial:!0};function bJ(t,e,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(h){const m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Zg(h)){if(r.containerState.type||(r.containerState.type=m,t.enter(m,{_container:!0})),m==="listUnordered")return t.enter("listItemPrefix"),h===42||h===45?t.check(_h,n,c)(h):c(h);if(!r.interrupt||h===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(h)}return n(h)}function l(h){return Zg(h)&&++a<10?(t.consume(h),l):(!r.interrupt||a<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(t.exit("listItemValue"),c(h)):n(h)}function c(h){return t.enter("listItemMarker"),t.consume(h),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,t.check(xh,r.interrupt?n:u,t.attempt(yJ,d,f))}function u(h){return r.containerState.initialBlankLine=!0,o++,d(h)}function f(h){return nt(h)?(t.enter("listItemPrefixWhitespace"),t.consume(h),t.exit("listItemPrefixWhitespace"),d):n(h)}function d(h){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(h)}}function wJ(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(xh,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,wt(t,e,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!nt(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(vJ,e,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,wt(t,t.attempt(tr,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function xJ(t,e,n){const r=this;return wt(t,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?e(o):n(o)}}function _J(t){t.exit(this.containerState.type)}function SJ(t,e,n){const r=this;return wt(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!nt(o)&&a&&a[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}const A8={name:"setextUnderline",tokenize:CJ,resolveTo:kJ};function kJ(t,e){let n=t.length,r,i,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!o&&t[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:Object.assign({},t[i][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",a,e]),t.splice(o+1,0,["exit",t[r][1],e]),t[r][1].end=Object.assign({},t[o][1].end)):t[r][1]=a,t.push(["exit",a,e]),t}function CJ(t,e,n){const r=this;let i;return o;function o(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return t.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(t.consume(c),s):(t.exit("setextHeadingLineSequence"),nt(c)?wt(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Ae(c)?(t.exit("setextHeadingLine"),e(c)):n(c)}}const PJ={tokenize:EJ};function EJ(t){const e=this,n=t.attempt(xh,r,t.attempt(this.parser.constructs.flowInitial,i,wt(t,t.attempt(this.parser.constructs.flow,i,t.attempt(DK,i)),"linePrefix")));return n;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const TJ={resolveAll:Q8()},AJ=M8("string"),MJ=M8("text");function M8(t){return{tokenize:e,resolveAll:Q8(t==="text"?QJ:void 0)};function e(n){const r=this,i=this.parser.constructs[t],o=n.attempt(i,a,s);return a;function a(u){return c(u)?o(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),o(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const f=i[u];let d=-1;if(f)for(;++d<f.length;){const h=f[d];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Q8(t){return e;function e(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return t?t(n,r):n}}function QJ(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const r=t[n-1][1],i=e.sliceStream(r);let o=i.length,a=-1,s=0,l;for(;o--;){const c=i[o];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){o++;break}}if(s){const c={type:n===t.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(t.splice(n,0,["enter",c,e],["exit",c,e]),n+=2)}n++}return t}function DJ(t,e,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const l={consume:w,enter:v,exit:b,attempt:_(y),check:_(x),interrupt:_(x,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:t,sliceStream:h,sliceSerialize:d,now:m,defineSkip:g,write:f};let u=e.tokenize.call(c,l);return e.resolveAll&&o.push(e),c;function f(Q){return a=Fr(a,Q),p(),a[a.length-1]!==null?[]:(E(e,0),c.events=zg(o,c.events,c),c.events)}function d(Q,D){return LJ(h(Q),D)}function h(Q){return $J(a,Q)}function m(){const{line:Q,column:D,offset:j,_index:R,_bufferIndex:B}=r;return{line:Q,column:D,offset:j,_index:R,_bufferIndex:B}}function g(Q){i[Q.line]=Q.column,I()}function p(){let Q;for(;r._index<a.length;){const D=a[r._index];if(typeof D=="string")for(Q=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Q&&r._bufferIndex<D.length;)O(D.charCodeAt(r._bufferIndex));else O(D)}}function O(Q){u=u(Q)}function w(Q){Ae(Q)?(r.line++,r.column=1,r.offset+=Q===-3?2:1,I()):Q!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=Q}function v(Q,D){const j=D||{};return j.type=Q,j.start=m(),c.events.push(["enter",j,c]),s.push(j),j}function b(Q){const D=s.pop();return D.end=m(),c.events.push(["exit",D,c]),D}function y(Q,D){E(Q,D.from)}function x(Q,D){D.restore()}function _(Q,D){return j;function j(R,B,X){let V,K,ne,L;return Array.isArray(R)?oe(R):"tokenize"in R?oe([R]):fe(R);function fe(we){return Ze;function Ze(De){const te=De!==null&&we[De],he=De!==null&&we.null,xe=[...Array.isArray(te)?te:te?[te]:[],...Array.isArray(he)?he:he?[he]:[]];return oe(xe)(De)}}function oe(we){return V=we,K=0,we.length===0?X:T(we[K])}function T(we){return Ze;function Ze(De){return L=A(),ne=we,we.partial||(c.currentConstruct=we),we.name&&c.parser.constructs.disable.null.includes(we.name)?ee():we.tokenize.call(D?Object.assign(Object.create(c),D):c,l,W,ee)(De)}}function W(we){return Q(ne,L),B}function ee(we){return L.restore(),++K<V.length?T(V[K]):X}}}function E(Q,D){Q.resolveAll&&!o.includes(Q)&&o.push(Q),Q.resolve&&Xi(c.events,D,c.events.length-D,Q.resolve(c.events.slice(D),c)),Q.resolveTo&&(c.events=Q.resolveTo(c.events,c))}function A(){const Q=m(),D=c.previous,j=c.currentConstruct,R=c.events.length,B=Array.from(s);return{restore:X,from:R};function X(){r=Q,c.previous=D,c.currentConstruct=j,c.events.length=R,s=B,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function $J(t,e){const n=e.start._index,r=e.start._bufferIndex,i=e.end._index,o=e.end._bufferIndex;let a;if(n===i)a=[t[n].slice(r,o)];else{if(a=t.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(t[i].slice(0,o))}return a}function LJ(t,e){let n=-1;const r=[];let i;for(;++n<t.length;){const o=t[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
665
665
  `;break}case-3:{a=`\r
666
- `;break}case-2:{a=e?" ":" ";break}case-1:{if(!e&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}const IJ={42:tr,43:tr,45:tr,48:tr,49:tr,50:tr,51:tr,52:tr,53:tr,54:tr,55:tr,56:tr,57:tr,62:v7},jJ={91:NK},NJ={[-2]:Fg,[-1]:Fg,32:Fg},RJ={35:VK,42:_h,45:[A7,_h],60:WK,61:A7,95:_h,96:S7,126:S7},BJ={38:x7,92:b7},ZJ={[-5]:qg,[-4]:qg,[-3]:qg,33:dJ,38:x7,42:Xg,60:[mK,tJ],91:pJ,92:[zK,b7],93:Yg,95:Xg,96:EK},zJ={null:[Xg,TJ]},XJ={null:[42,95]},VJ={null:[]},FJ=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:XJ,contentInitial:jJ,disable:VJ,document:IJ,flow:RJ,flowInitial:NJ,insideSpan:zJ,string:BJ,text:ZJ},Symbol.toStringTag,{value:"Module"}));function YJ(t){const e=JG([FJ,...(t||{}).extensions||[]]),n={defined:[],lazy:{},constructs:e,content:r(lK),document:r(uK),flow:r(PJ),string:r(AJ),text:r(MJ)};return n;function r(i){return o;function o(a){return DJ(n,i,a)}}}const D7=/[\0\t\n\r]/g;function qJ(){let t=1,e="",n=!0,r;return i;function i(o,a,s){const l=[];let c,u,f,d,h;for(o=e+o.toString(a),f=0,e="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(D7.lastIndex=f,c=D7.exec(o),d=c&&c.index!==void 0?c.index:o.length,h=o.charCodeAt(d),!c){e=o.slice(f);break}if(h===10&&f===d&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<d&&(l.push(o.slice(f,d)),t+=d-f),h){case 0:{l.push(65533),t++;break}case 9:{for(u=Math.ceil(t/4)*4,l.push(-2);t++<u;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:r=!0,t=1}f=d+1}return s&&(r&&l.push(-5),e&&l.push(e),l.push(null)),l}}function WJ(t){for(;!k7(t););return t}function $7(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const UJ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function HJ(t){return t.replace(UJ,GJ)}function GJ(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),i=r===120||r===88;return $7(n.slice(i?2:1),i?16:10)}return Vg(n)||t}const L7={}.hasOwnProperty,KJ=function(t,e,n){return typeof e!="string"&&(n=e,e=void 0),JJ(n)(WJ(YJ(n).document().write(qJ()(t,e,!0))))};function JJ(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Bc),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:s(Ht),blockQuote:s(xe),characterEscape:Q,characterReference:Q,codeFenced:s(J),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(J,l),codeText:s(At,l),codeTextData:Q,data:Q,codeFlowValue:Q,definition:s(Ke),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(Ut),hardBreakEscape:s(wn),hardBreakTrailing:s(wn),htmlFlow:s(ul,l),htmlFlowData:Q,htmlText:s(ul,l),htmlTextData:Q,image:s(S5),label:l,link:s(Bc),listItem:s(Ne),listItemValue:m,listOrdered:s(Od,h),listUnordered:s(Od),paragraph:s(yd),reference:ee,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(Ht),strong:s(g0),thematicBreak:s(fl)},exit:{atxHeading:u(),atxHeadingSequence:_,autolink:u(),autolinkEmail:he,autolinkProtocol:te,blockQuote:u(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:Ze,characterReferenceMarkerNumeric:Ze,characterReferenceValue:De,codeFenced:u(w),codeFencedFence:O,codeFencedFenceInfo:g,codeFencedFenceMeta:p,codeFlowValue:D,codeIndented:u(v),codeText:u(V),codeTextData:D,data:D,definition:u(),definitionDestinationString:x,definitionLabelString:b,definitionTitleString:y,emphasis:u(),hardBreakEscape:u(R),hardBreakTrailing:u(R),htmlFlow:u(B),htmlFlowData:D,htmlText:u(X),htmlTextData:D,image:u(ne),label:fe,labelText:L,lineEnding:j,link:u(K),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:we,resourceDestinationString:oe,resourceTitleString:T,resource:W,setextHeading:u(I),setextHeadingLineSequence:A,setextHeadingText:E,strong:u(),thematicBreak:u()}};I7(e,(t||{}).mdastExtensions||[]);const n={};return r;function r(z){let G={type:"root",children:[]};const ke={stack:[G],tokenStack:[],config:e,enter:c,exit:f,buffer:l,resume:d,setData:o,getData:a},le=[];let Me=-1;for(;++Me<z.length;)if(z[Me][1].type==="listOrdered"||z[Me][1].type==="listUnordered")if(z[Me][0]==="enter")le.push(Me);else{const be=le.pop();Me=i(z,be,Me)}for(Me=-1;++Me<z.length;){const be=e[z[Me][0]];L7.call(be,z[Me][1].type)&&be[z[Me][1].type].call(Object.assign({sliceSerialize:z[Me][2].sliceSerialize},ke),z[Me][1])}if(ke.tokenStack.length>0){const be=ke.tokenStack[ke.tokenStack.length-1];(be[1]||j7).call(ke,void 0,be[0])}for(G.position={start:Sa(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:Sa(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},Me=-1;++Me<e.transforms.length;)G=e.transforms[Me](G)||G;return G}function i(z,G,ke){let le=G-1,Me=-1,be=!1,Mt,Ti,Vn,xo;for(;++le<=ke;){const Nt=z[le];if(Nt[1].type==="listUnordered"||Nt[1].type==="listOrdered"||Nt[1].type==="blockQuote"?(Nt[0]==="enter"?Me++:Me--,xo=void 0):Nt[1].type==="lineEndingBlank"?Nt[0]==="enter"&&(Mt&&!xo&&!Me&&!Vn&&(Vn=le),xo=void 0):Nt[1].type==="linePrefix"||Nt[1].type==="listItemValue"||Nt[1].type==="listItemMarker"||Nt[1].type==="listItemPrefix"||Nt[1].type==="listItemPrefixWhitespace"||(xo=void 0),!Me&&Nt[0]==="enter"&&Nt[1].type==="listItemPrefix"||Me===-1&&Nt[0]==="exit"&&(Nt[1].type==="listUnordered"||Nt[1].type==="listOrdered")){if(Mt){let dl=le;for(Ti=void 0;dl--;){const hr=z[dl];if(hr[1].type==="lineEnding"||hr[1].type==="lineEndingBlank"){if(hr[0]==="exit")continue;Ti&&(z[Ti][1].type="lineEndingBlank",be=!0),hr[1].type="lineEnding",Ti=dl}else if(!(hr[1].type==="linePrefix"||hr[1].type==="blockQuotePrefix"||hr[1].type==="blockQuotePrefixWhitespace"||hr[1].type==="blockQuoteMarker"||hr[1].type==="listItemIndent"))break}Vn&&(!Ti||Vn<Ti)&&(Mt._spread=!0),Mt.end=Object.assign({},Ti?z[Ti][1].start:Nt[1].end),z.splice(Ti||le,0,["exit",Mt,Nt[2]]),le++,ke++}Nt[1].type==="listItemPrefix"&&(Mt={type:"listItem",_spread:!1,start:Object.assign({},Nt[1].start),end:void 0},z.splice(le,0,["enter",Mt,Nt[2]]),le++,ke++,Vn=void 0,xo=!0)}}return z[G][1]._spread=be,ke}function o(z,G){n[z]=G}function a(z){return n[z]}function s(z,G){return ke;function ke(le){c.call(this,z(le),le),G&&G.call(this,le)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(z,G,ke){return this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([G,ke]),z.position={start:Sa(G.start)},z}function u(z){return G;function G(ke){z&&z.call(this,ke),f.call(this,ke)}}function f(z,G){const ke=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==z.type&&(G?G.call(this,z,le[0]):(le[1]||j7).call(this,z,le[0]));else throw new Error("Cannot close `"+z.type+"` ("+du({start:z.start,end:z.end})+"): it’s not open");return ke.position.end=Sa(z.end),ke}function d(){return GG(this.stack.pop())}function h(){o("expectingFirstListItemValue",!0)}function m(z){if(a("expectingFirstListItemValue")){const G=this.stack[this.stack.length-2];G.start=Number.parseInt(this.sliceSerialize(z),10),o("expectingFirstListItemValue")}}function g(){const z=this.resume(),G=this.stack[this.stack.length-1];G.lang=z}function p(){const z=this.resume(),G=this.stack[this.stack.length-1];G.meta=z}function O(){a("flowCodeInside")||(this.buffer(),o("flowCodeInside",!0))}function w(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),o("flowCodeInside")}function v(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z.replace(/(\r?\n|\r)$/g,"")}function b(z){const G=this.resume(),ke=this.stack[this.stack.length-1];ke.label=G,ke.identifier=Tl(this.sliceSerialize(z)).toLowerCase()}function y(){const z=this.resume(),G=this.stack[this.stack.length-1];G.title=z}function x(){const z=this.resume(),G=this.stack[this.stack.length-1];G.url=z}function _(z){const G=this.stack[this.stack.length-1];if(!G.depth){const ke=this.sliceSerialize(z).length;G.depth=ke}}function E(){o("setextHeadingSlurpLineEnding",!0)}function A(z){const G=this.stack[this.stack.length-1];G.depth=this.sliceSerialize(z).charCodeAt(0)===61?1:2}function I(){o("setextHeadingSlurpLineEnding")}function Q(z){const G=this.stack[this.stack.length-1];let ke=G.children[G.children.length-1];(!ke||ke.type!=="text")&&(ke=k5(),ke.position={start:Sa(z.start)},G.children.push(ke)),this.stack.push(ke)}function D(z){const G=this.stack.pop();G.value+=this.sliceSerialize(z),G.position.end=Sa(z.end)}function j(z){const G=this.stack[this.stack.length-1];if(a("atHardBreak")){const ke=G.children[G.children.length-1];ke.position.end=Sa(z.end),o("atHardBreak");return}!a("setextHeadingSlurpLineEnding")&&e.canContainEols.includes(G.type)&&(Q.call(this,z),D.call(this,z))}function R(){o("atHardBreak",!0)}function B(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z}function X(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z}function V(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z}function K(){const z=this.stack[this.stack.length-1];if(a("inReference")){const G=a("referenceType")||"shortcut";z.type+="Reference",z.referenceType=G,delete z.url,delete z.title}else delete z.identifier,delete z.label;o("referenceType")}function ne(){const z=this.stack[this.stack.length-1];if(a("inReference")){const G=a("referenceType")||"shortcut";z.type+="Reference",z.referenceType=G,delete z.url,delete z.title}else delete z.identifier,delete z.label;o("referenceType")}function L(z){const G=this.sliceSerialize(z),ke=this.stack[this.stack.length-2];ke.label=HJ(G),ke.identifier=Tl(G).toLowerCase()}function fe(){const z=this.stack[this.stack.length-1],G=this.resume(),ke=this.stack[this.stack.length-1];if(o("inReference",!0),ke.type==="link"){const le=z.children;ke.children=le}else ke.alt=G}function oe(){const z=this.resume(),G=this.stack[this.stack.length-1];G.url=z}function T(){const z=this.resume(),G=this.stack[this.stack.length-1];G.title=z}function W(){o("inReference")}function ee(){o("referenceType","collapsed")}function we(z){const G=this.resume(),ke=this.stack[this.stack.length-1];ke.label=G,ke.identifier=Tl(this.sliceSerialize(z)).toLowerCase(),o("referenceType","full")}function Ze(z){o("characterReferenceType",z.type)}function De(z){const G=this.sliceSerialize(z),ke=a("characterReferenceType");let le;ke?(le=$7(G,ke==="characterReferenceMarkerNumeric"?10:16),o("characterReferenceType")):le=Vg(G);const Me=this.stack.pop();Me.value+=le,Me.position.end=Sa(z.end)}function te(z){D.call(this,z);const G=this.stack[this.stack.length-1];G.url=this.sliceSerialize(z)}function he(z){D.call(this,z);const G=this.stack[this.stack.length-1];G.url="mailto:"+this.sliceSerialize(z)}function xe(){return{type:"blockquote",children:[]}}function J(){return{type:"code",lang:null,meta:null,value:""}}function At(){return{type:"inlineCode",value:""}}function Ke(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ut(){return{type:"emphasis",children:[]}}function Ht(){return{type:"heading",depth:void 0,children:[]}}function wn(){return{type:"break"}}function ul(){return{type:"html",value:""}}function S5(){return{type:"image",title:null,url:"",alt:null}}function Bc(){return{type:"link",title:null,url:"",children:[]}}function Od(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function Ne(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function yd(){return{type:"paragraph",children:[]}}function g0(){return{type:"strong",children:[]}}function k5(){return{type:"text",value:""}}function fl(){return{type:"thematicBreak"}}}function Sa(t){return{line:t.line,column:t.column,offset:t.offset}}function I7(t,e){let n=-1;for(;++n<e.length;){const r=e[n];Array.isArray(r)?I7(t,r):eee(t,r)}}function eee(t,e){let n;for(n in e)if(L7.call(e,n)){if(n==="canContainEols"){const r=e[n];r&&t[n].push(...r)}else if(n==="transforms"){const r=e[n];r&&t[n].push(...r)}else if(n==="enter"||n==="exit"){const r=e[n];r&&Object.assign(t[n],r)}}}function j7(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+du({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+du({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+du({start:e.start,end:e.end})+") is still open")}function tee(t){Object.assign(this,{Parser:e=>{const n=this.data("settings");return KJ(e,Object.assign({},n,t,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function nee(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function ree(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
666
+ `;break}case-2:{a=e?" ":" ";break}case-1:{if(!e&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}const IJ={42:tr,43:tr,45:tr,48:tr,49:tr,50:tr,51:tr,52:tr,53:tr,54:tr,55:tr,56:tr,57:tr,62:v8},jJ={91:NK},NJ={[-2]:Fg,[-1]:Fg,32:Fg},RJ={35:VK,42:_h,45:[A8,_h],60:WK,61:A8,95:_h,96:S8,126:S8},BJ={38:x8,92:b8},ZJ={[-5]:qg,[-4]:qg,[-3]:qg,33:dJ,38:x8,42:Xg,60:[mK,tJ],91:pJ,92:[zK,b8],93:Yg,95:Xg,96:EK},zJ={null:[Xg,TJ]},XJ={null:[42,95]},VJ={null:[]},FJ=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:XJ,contentInitial:jJ,disable:VJ,document:IJ,flow:RJ,flowInitial:NJ,insideSpan:zJ,string:BJ,text:ZJ},Symbol.toStringTag,{value:"Module"}));function YJ(t){const e=JG([FJ,...(t||{}).extensions||[]]),n={defined:[],lazy:{},constructs:e,content:r(lK),document:r(uK),flow:r(PJ),string:r(AJ),text:r(MJ)};return n;function r(i){return o;function o(a){return DJ(n,i,a)}}}const D8=/[\0\t\n\r]/g;function qJ(){let t=1,e="",n=!0,r;return i;function i(o,a,s){const l=[];let c,u,f,d,h;for(o=e+o.toString(a),f=0,e="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(D8.lastIndex=f,c=D8.exec(o),d=c&&c.index!==void 0?c.index:o.length,h=o.charCodeAt(d),!c){e=o.slice(f);break}if(h===10&&f===d&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<d&&(l.push(o.slice(f,d)),t+=d-f),h){case 0:{l.push(65533),t++;break}case 9:{for(u=Math.ceil(t/4)*4,l.push(-2);t++<u;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:r=!0,t=1}f=d+1}return s&&(r&&l.push(-5),e&&l.push(e),l.push(null)),l}}function WJ(t){for(;!k8(t););return t}function $8(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const UJ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function HJ(t){return t.replace(UJ,GJ)}function GJ(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),i=r===120||r===88;return $8(n.slice(i?2:1),i?16:10)}return Vg(n)||t}const L8={}.hasOwnProperty,KJ=function(t,e,n){return typeof e!="string"&&(n=e,e=void 0),JJ(n)(WJ(YJ(n).document().write(qJ()(t,e,!0))))};function JJ(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Bc),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:s(Ht),blockQuote:s(xe),characterEscape:Q,characterReference:Q,codeFenced:s(J),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(J,l),codeText:s(At,l),codeTextData:Q,data:Q,codeFlowValue:Q,definition:s(Ke),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(Ut),hardBreakEscape:s(wn),hardBreakTrailing:s(wn),htmlFlow:s(ul,l),htmlFlowData:Q,htmlText:s(ul,l),htmlTextData:Q,image:s(S5),label:l,link:s(Bc),listItem:s(Ne),listItemValue:m,listOrdered:s(Od,h),listUnordered:s(Od),paragraph:s(yd),reference:ee,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(Ht),strong:s(g0),thematicBreak:s(fl)},exit:{atxHeading:u(),atxHeadingSequence:_,autolink:u(),autolinkEmail:he,autolinkProtocol:te,blockQuote:u(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:Ze,characterReferenceMarkerNumeric:Ze,characterReferenceValue:De,codeFenced:u(w),codeFencedFence:O,codeFencedFenceInfo:g,codeFencedFenceMeta:p,codeFlowValue:D,codeIndented:u(v),codeText:u(V),codeTextData:D,data:D,definition:u(),definitionDestinationString:x,definitionLabelString:b,definitionTitleString:y,emphasis:u(),hardBreakEscape:u(R),hardBreakTrailing:u(R),htmlFlow:u(B),htmlFlowData:D,htmlText:u(X),htmlTextData:D,image:u(ne),label:fe,labelText:L,lineEnding:j,link:u(K),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:we,resourceDestinationString:oe,resourceTitleString:T,resource:W,setextHeading:u(I),setextHeadingLineSequence:A,setextHeadingText:E,strong:u(),thematicBreak:u()}};I8(e,(t||{}).mdastExtensions||[]);const n={};return r;function r(z){let G={type:"root",children:[]};const ke={stack:[G],tokenStack:[],config:e,enter:c,exit:f,buffer:l,resume:d,setData:o,getData:a},le=[];let Me=-1;for(;++Me<z.length;)if(z[Me][1].type==="listOrdered"||z[Me][1].type==="listUnordered")if(z[Me][0]==="enter")le.push(Me);else{const be=le.pop();Me=i(z,be,Me)}for(Me=-1;++Me<z.length;){const be=e[z[Me][0]];L8.call(be,z[Me][1].type)&&be[z[Me][1].type].call(Object.assign({sliceSerialize:z[Me][2].sliceSerialize},ke),z[Me][1])}if(ke.tokenStack.length>0){const be=ke.tokenStack[ke.tokenStack.length-1];(be[1]||j8).call(ke,void 0,be[0])}for(G.position={start:Sa(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:Sa(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},Me=-1;++Me<e.transforms.length;)G=e.transforms[Me](G)||G;return G}function i(z,G,ke){let le=G-1,Me=-1,be=!1,Mt,Ti,Vn,xo;for(;++le<=ke;){const Nt=z[le];if(Nt[1].type==="listUnordered"||Nt[1].type==="listOrdered"||Nt[1].type==="blockQuote"?(Nt[0]==="enter"?Me++:Me--,xo=void 0):Nt[1].type==="lineEndingBlank"?Nt[0]==="enter"&&(Mt&&!xo&&!Me&&!Vn&&(Vn=le),xo=void 0):Nt[1].type==="linePrefix"||Nt[1].type==="listItemValue"||Nt[1].type==="listItemMarker"||Nt[1].type==="listItemPrefix"||Nt[1].type==="listItemPrefixWhitespace"||(xo=void 0),!Me&&Nt[0]==="enter"&&Nt[1].type==="listItemPrefix"||Me===-1&&Nt[0]==="exit"&&(Nt[1].type==="listUnordered"||Nt[1].type==="listOrdered")){if(Mt){let dl=le;for(Ti=void 0;dl--;){const hr=z[dl];if(hr[1].type==="lineEnding"||hr[1].type==="lineEndingBlank"){if(hr[0]==="exit")continue;Ti&&(z[Ti][1].type="lineEndingBlank",be=!0),hr[1].type="lineEnding",Ti=dl}else if(!(hr[1].type==="linePrefix"||hr[1].type==="blockQuotePrefix"||hr[1].type==="blockQuotePrefixWhitespace"||hr[1].type==="blockQuoteMarker"||hr[1].type==="listItemIndent"))break}Vn&&(!Ti||Vn<Ti)&&(Mt._spread=!0),Mt.end=Object.assign({},Ti?z[Ti][1].start:Nt[1].end),z.splice(Ti||le,0,["exit",Mt,Nt[2]]),le++,ke++}Nt[1].type==="listItemPrefix"&&(Mt={type:"listItem",_spread:!1,start:Object.assign({},Nt[1].start),end:void 0},z.splice(le,0,["enter",Mt,Nt[2]]),le++,ke++,Vn=void 0,xo=!0)}}return z[G][1]._spread=be,ke}function o(z,G){n[z]=G}function a(z){return n[z]}function s(z,G){return ke;function ke(le){c.call(this,z(le),le),G&&G.call(this,le)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(z,G,ke){return this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([G,ke]),z.position={start:Sa(G.start)},z}function u(z){return G;function G(ke){z&&z.call(this,ke),f.call(this,ke)}}function f(z,G){const ke=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==z.type&&(G?G.call(this,z,le[0]):(le[1]||j8).call(this,z,le[0]));else throw new Error("Cannot close `"+z.type+"` ("+du({start:z.start,end:z.end})+"): it’s not open");return ke.position.end=Sa(z.end),ke}function d(){return GG(this.stack.pop())}function h(){o("expectingFirstListItemValue",!0)}function m(z){if(a("expectingFirstListItemValue")){const G=this.stack[this.stack.length-2];G.start=Number.parseInt(this.sliceSerialize(z),10),o("expectingFirstListItemValue")}}function g(){const z=this.resume(),G=this.stack[this.stack.length-1];G.lang=z}function p(){const z=this.resume(),G=this.stack[this.stack.length-1];G.meta=z}function O(){a("flowCodeInside")||(this.buffer(),o("flowCodeInside",!0))}function w(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),o("flowCodeInside")}function v(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z.replace(/(\r?\n|\r)$/g,"")}function b(z){const G=this.resume(),ke=this.stack[this.stack.length-1];ke.label=G,ke.identifier=Tl(this.sliceSerialize(z)).toLowerCase()}function y(){const z=this.resume(),G=this.stack[this.stack.length-1];G.title=z}function x(){const z=this.resume(),G=this.stack[this.stack.length-1];G.url=z}function _(z){const G=this.stack[this.stack.length-1];if(!G.depth){const ke=this.sliceSerialize(z).length;G.depth=ke}}function E(){o("setextHeadingSlurpLineEnding",!0)}function A(z){const G=this.stack[this.stack.length-1];G.depth=this.sliceSerialize(z).charCodeAt(0)===61?1:2}function I(){o("setextHeadingSlurpLineEnding")}function Q(z){const G=this.stack[this.stack.length-1];let ke=G.children[G.children.length-1];(!ke||ke.type!=="text")&&(ke=k5(),ke.position={start:Sa(z.start)},G.children.push(ke)),this.stack.push(ke)}function D(z){const G=this.stack.pop();G.value+=this.sliceSerialize(z),G.position.end=Sa(z.end)}function j(z){const G=this.stack[this.stack.length-1];if(a("atHardBreak")){const ke=G.children[G.children.length-1];ke.position.end=Sa(z.end),o("atHardBreak");return}!a("setextHeadingSlurpLineEnding")&&e.canContainEols.includes(G.type)&&(Q.call(this,z),D.call(this,z))}function R(){o("atHardBreak",!0)}function B(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z}function X(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z}function V(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z}function K(){const z=this.stack[this.stack.length-1];if(a("inReference")){const G=a("referenceType")||"shortcut";z.type+="Reference",z.referenceType=G,delete z.url,delete z.title}else delete z.identifier,delete z.label;o("referenceType")}function ne(){const z=this.stack[this.stack.length-1];if(a("inReference")){const G=a("referenceType")||"shortcut";z.type+="Reference",z.referenceType=G,delete z.url,delete z.title}else delete z.identifier,delete z.label;o("referenceType")}function L(z){const G=this.sliceSerialize(z),ke=this.stack[this.stack.length-2];ke.label=HJ(G),ke.identifier=Tl(G).toLowerCase()}function fe(){const z=this.stack[this.stack.length-1],G=this.resume(),ke=this.stack[this.stack.length-1];if(o("inReference",!0),ke.type==="link"){const le=z.children;ke.children=le}else ke.alt=G}function oe(){const z=this.resume(),G=this.stack[this.stack.length-1];G.url=z}function T(){const z=this.resume(),G=this.stack[this.stack.length-1];G.title=z}function W(){o("inReference")}function ee(){o("referenceType","collapsed")}function we(z){const G=this.resume(),ke=this.stack[this.stack.length-1];ke.label=G,ke.identifier=Tl(this.sliceSerialize(z)).toLowerCase(),o("referenceType","full")}function Ze(z){o("characterReferenceType",z.type)}function De(z){const G=this.sliceSerialize(z),ke=a("characterReferenceType");let le;ke?(le=$8(G,ke==="characterReferenceMarkerNumeric"?10:16),o("characterReferenceType")):le=Vg(G);const Me=this.stack.pop();Me.value+=le,Me.position.end=Sa(z.end)}function te(z){D.call(this,z);const G=this.stack[this.stack.length-1];G.url=this.sliceSerialize(z)}function he(z){D.call(this,z);const G=this.stack[this.stack.length-1];G.url="mailto:"+this.sliceSerialize(z)}function xe(){return{type:"blockquote",children:[]}}function J(){return{type:"code",lang:null,meta:null,value:""}}function At(){return{type:"inlineCode",value:""}}function Ke(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ut(){return{type:"emphasis",children:[]}}function Ht(){return{type:"heading",depth:void 0,children:[]}}function wn(){return{type:"break"}}function ul(){return{type:"html",value:""}}function S5(){return{type:"image",title:null,url:"",alt:null}}function Bc(){return{type:"link",title:null,url:"",children:[]}}function Od(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function Ne(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function yd(){return{type:"paragraph",children:[]}}function g0(){return{type:"strong",children:[]}}function k5(){return{type:"text",value:""}}function fl(){return{type:"thematicBreak"}}}function Sa(t){return{line:t.line,column:t.column,offset:t.offset}}function I8(t,e){let n=-1;for(;++n<e.length;){const r=e[n];Array.isArray(r)?I8(t,r):eee(t,r)}}function eee(t,e){let n;for(n in e)if(L8.call(e,n)){if(n==="canContainEols"){const r=e[n];r&&t[n].push(...r)}else if(n==="transforms"){const r=e[n];r&&t[n].push(...r)}else if(n==="enter"||n==="exit"){const r=e[n];r&&Object.assign(t[n],r)}}}function j8(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+du({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+du({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+du({start:e.start,end:e.end})+") is still open")}function tee(t){Object.assign(this,{Parser:e=>{const n=this.data("settings");return KJ(e,Object.assign({},n,t,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function nee(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function ree(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
667
667
  `}]}function iee(t,e){const n=e.value?e.value+`
668
- `:"",r=e.lang?e.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return e.meta&&(o.data={meta:e.meta}),t.patch(e,o),o=t.applyData(e,o),o={type:"element",tagName:"pre",properties:{},children:[o]},t.patch(e,o),o}function oee(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function aee(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function Al(t){const e=[];let n=-1,r=0,i=0;for(;++n<t.length;){const o=t.charCodeAt(n);let a="";if(o===37&&yr(t.charCodeAt(n+1))&&yr(t.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=t.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(e.push(t.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}function N7(t,e){const n=String(e.identifier).toUpperCase(),r=Al(n.toLowerCase()),i=t.footnoteOrder.indexOf(n);let o;i===-1?(t.footnoteOrder.push(n),t.footnoteCounts[n]=1,o=t.footnoteOrder.length):(t.footnoteCounts[n]++,o=i+1);const a=t.footnoteCounts[n],s={type:"element",tagName:"a",properties:{href:"#"+t.clobberPrefix+"fn-"+r,id:t.clobberPrefix+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};t.patch(e,s);const l={type:"element",tagName:"sup",properties:{},children:[s]};return t.patch(e,l),t.applyData(e,l)}function see(t,e){const n=t.footnoteById;let r=1;for(;r in n;)r++;const i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:e.children}],position:e.position},N7(t,{type:"footnoteReference",identifier:i,position:e.position})}function lee(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function cee(t,e){if(t.dangerous){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}return null}function R7(t,e){const n=e.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return{type:"text",value:"!["+e.alt+r};const i=t.all(e),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function uee(t,e){const n=t.definition(e.identifier);if(!n)return R7(t,e);const r={src:Al(n.url||""),alt:e.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,i),t.applyData(e,i)}function fee(t,e){const n={src:Al(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,r),t.applyData(e,r)}function dee(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,r),t.applyData(e,r)}function hee(t,e){const n=t.definition(e.identifier);if(!n)return R7(t,e);const r={href:Al(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function pee(t,e){const n={href:Al(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function mee(t,e,n){const r=t.all(e),i=n?gee(n):B7(e),o={},a=[];if(typeof e.checked=="boolean"){const u=r[0];let f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const u=r[s];(i||s!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
668
+ `:"",r=e.lang?e.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return e.meta&&(o.data={meta:e.meta}),t.patch(e,o),o=t.applyData(e,o),o={type:"element",tagName:"pre",properties:{},children:[o]},t.patch(e,o),o}function oee(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function aee(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function Al(t){const e=[];let n=-1,r=0,i=0;for(;++n<t.length;){const o=t.charCodeAt(n);let a="";if(o===37&&yr(t.charCodeAt(n+1))&&yr(t.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=t.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(e.push(t.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}function N8(t,e){const n=String(e.identifier).toUpperCase(),r=Al(n.toLowerCase()),i=t.footnoteOrder.indexOf(n);let o;i===-1?(t.footnoteOrder.push(n),t.footnoteCounts[n]=1,o=t.footnoteOrder.length):(t.footnoteCounts[n]++,o=i+1);const a=t.footnoteCounts[n],s={type:"element",tagName:"a",properties:{href:"#"+t.clobberPrefix+"fn-"+r,id:t.clobberPrefix+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};t.patch(e,s);const l={type:"element",tagName:"sup",properties:{},children:[s]};return t.patch(e,l),t.applyData(e,l)}function see(t,e){const n=t.footnoteById;let r=1;for(;r in n;)r++;const i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:e.children}],position:e.position},N8(t,{type:"footnoteReference",identifier:i,position:e.position})}function lee(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function cee(t,e){if(t.dangerous){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}return null}function R8(t,e){const n=e.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return{type:"text",value:"!["+e.alt+r};const i=t.all(e),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function uee(t,e){const n=t.definition(e.identifier);if(!n)return R8(t,e);const r={src:Al(n.url||""),alt:e.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,i),t.applyData(e,i)}function fee(t,e){const n={src:Al(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,r),t.applyData(e,r)}function dee(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,r),t.applyData(e,r)}function hee(t,e){const n=t.definition(e.identifier);if(!n)return R8(t,e);const r={href:Al(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function pee(t,e){const n={href:Al(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function mee(t,e,n){const r=t.all(e),i=n?gee(n):B8(e),o={},a=[];if(typeof e.checked=="boolean"){const u=r[0];let f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const u=r[s];(i||s!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
669
669
  `}),u.type==="element"&&u.tagName==="p"&&!i?a.push(...u.children):a.push(u)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
670
- `});const c={type:"element",tagName:"li",properties:o,children:a};return t.patch(e,c),t.applyData(e,c)}function gee(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let r=-1;for(;!e&&++r<n.length;)e=B7(n[r])}return e}function B7(t){return t.spread??t.children.length>1}function Oee(t,e){const n={},r=t.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:e.ordered?"ol":"ul",properties:n,children:t.wrap(r,!0)};return t.patch(e,o),t.applyData(e,o)}function yee(t,e){const n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function vee(t,e){const n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function bee(t,e){const n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const Wg=Z7("start"),Ug=Z7("end");function wee(t){return{start:Wg(t),end:Ug(t)}}function Z7(t){return e;function e(n){const r=n&&n.position&&n.position[t]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}function xee(t,e){const n=t.all(e),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(e.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},s=Wg(e.children[1]),l=Ug(e.children[e.children.length-1]);s.line&&l.line&&(a.position={start:s,end:l}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,o),t.applyData(e,o)}function _ee(t,e,n){const r=n?n.children:void 0,i=(r?r.indexOf(e):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:e.children.length;let s=-1;const l=[];for(;++s<a;){const u=e.children[s],f={},d=o?o[s]:void 0;d&&(f.align=d);let h={type:"element",tagName:i,properties:f,children:[]};u&&(h.children=t.all(u),t.patch(u,h),h=t.applyData(e,h)),l.push(h)}const c={type:"element",tagName:"tr",properties:{},children:t.wrap(l,!0)};return t.patch(e,c),t.applyData(e,c)}function See(t,e){const n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const z7=9,X7=32;function kee(t){const e=String(t),n=/\r?\n|\r/g;let r=n.exec(e),i=0;const o=[];for(;r;)o.push(V7(e.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(e);return o.push(V7(e.slice(i),i>0,!1)),o.join("")}function V7(t,e,n){let r=0,i=t.length;if(e){let o=t.codePointAt(r);for(;o===z7||o===X7;)r++,o=t.codePointAt(r)}if(n){let o=t.codePointAt(i-1);for(;o===z7||o===X7;)i--,o=t.codePointAt(i-1)}return i>r?t.slice(r,i):""}function Cee(t,e){const n={type:"text",value:kee(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function Pee(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const Eee={blockquote:nee,break:ree,code:iee,delete:oee,emphasis:aee,footnoteReference:N7,footnote:see,heading:lee,html:cee,imageReference:uee,image:fee,inlineCode:dee,linkReference:hee,link:pee,listItem:mee,list:Oee,paragraph:yee,root:vee,strong:bee,table:xee,tableCell:See,tableRow:_ee,text:Cee,thematicBreak:Pee,toml:Sh,yaml:Sh,definition:Sh,footnoteDefinition:Sh};function Sh(){return null}const F7=function(t){if(t==null)return Qee;if(typeof t=="string")return Mee(t);if(typeof t=="object")return Array.isArray(t)?Tee(t):Aee(t);if(typeof t=="function")return kh(t);throw new Error("Expected function, string, or object as test")};function Tee(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=F7(t[n]);return kh(r);function r(...i){let o=-1;for(;++o<e.length;)if(e[o].call(this,...i))return!0;return!1}}function Aee(t){return kh(e);function e(n){let r;for(r in t)if(n[r]!==t[r])return!1;return!0}}function Mee(t){return kh(e);function e(n){return n&&n.type===t}}function kh(t){return e;function e(n,...r){return!!(n&&typeof n=="object"&&"type"in n&&t.call(this,n,...r))}}function Qee(){return!0}const Dee=!0,Y7=!1,$ee="skip",Lee=function(t,e,n,r){typeof e=="function"&&typeof n!="function"&&(r=n,n=e,e=null);const i=F7(e),o=r?-1:1;a(t,void 0,[])();function a(s,l,c){const u=s&&typeof s=="object"?s:{};if(typeof u.type=="string"){const d=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(s.type+(d?"<"+d+">":""))+")"})}return f;function f(){let d=[],h,m,g;if((!e||i(s,l,c[c.length-1]||null))&&(d=Iee(n(s,c)),d[0]===Y7))return d;if(s.children&&d[0]!==$ee)for(m=(r?s.children.length:-1)+o,g=c.concat(s);m>-1&&m<s.children.length;){if(h=a(s.children[m],m,g)(),h[0]===Y7)return h;m=typeof h[1]=="number"?h[1]:m+o}return d}}};function Iee(t){return Array.isArray(t)?t:typeof t=="number"?[Dee,t]:[t]}const q7=function(t,e,n,r){typeof e=="function"&&typeof n!="function"&&(r=n,n=e,e=null),Lee(t,e,i,r);function i(o,a){const s=a[a.length-1];return n(o,s?s.children.indexOf(o):null,s)}};function jee(t){return!t||!t.position||!t.position.start||!t.position.start.line||!t.position.start.column||!t.position.end||!t.position.end.line||!t.position.end.column}const Nee=function(t){return Ree(t)};function Ree(t){return Bee(e);function e(n){return n&&n.type===t}}function Bee(t){return e;function e(n,...r){return!!(n&&typeof n=="object"&&"type"in n&&t.call(this,n,...r))}}const Zee=!0,W7=!1,zee="skip",Xee=function(t,e,n,r){const i=Nee(e),o=1;a(t,void 0,[])();function a(s,l,c){const u=s&&typeof s=="object"?s:{};if(typeof u.type=="string"){const d=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(s.type+(d?"<"+d+">":""))+")"})}return f;function f(){let d=[],h,m,g;if(i(s,l,c[c.length-1]||null)&&(d=Vee(n(s,c)),d[0]===W7))return d;if(s.children&&d[0]!==zee)for(m=-1+o,g=c.concat(s);m>-1&&m<s.children.length;){if(h=a(s.children[m],m,g)(),h[0]===W7)return h;m=typeof h[1]=="number"?h[1]:m+o}return d}}};function Vee(t){return Array.isArray(t)?t:typeof t=="number"?[Zee,t]:[t]}const Fee=function(t,e,n,r){Xee(t,e,i);function i(o,a){const s=a[a.length-1];return n(o,s?s.children.indexOf(o):null,s)}},U7={}.hasOwnProperty;function Yee(t){const e=Object.create(null);if(!t||!t.type)throw new Error("mdast-util-definitions expected node");return Fee(t,"definition",r=>{const i=H7(r.identifier);i&&!U7.call(e,i)&&(e[i]=r)}),n;function n(r){const i=H7(r);return i&&U7.call(e,i)?e[i]:null}}function H7(t){return String(t||"").toUpperCase()}const Ch={}.hasOwnProperty;function qee(t,e){const n=e||{},r=n.allowDangerousHtml||!1,i={};return a.dangerous=r,a.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,a.footnoteLabel=n.footnoteLabel||"Footnotes",a.footnoteLabelTagName=n.footnoteLabelTagName||"h2",a.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},a.footnoteBackLabel=n.footnoteBackLabel||"Back to content",a.unknownHandler=n.unknownHandler,a.passThrough=n.passThrough,a.handlers={...Eee,...n.handlers},a.definition=Yee(t),a.footnoteById=i,a.footnoteOrder=[],a.footnoteCounts={},a.patch=Wee,a.applyData=Uee,a.one=s,a.all=l,a.wrap=Gee,a.augment=o,q7(t,"footnoteDefinition",c=>{const u=String(c.identifier).toUpperCase();Ch.call(i,u)||(i[u]=c)}),a;function o(c,u){if(c&&"data"in c&&c.data){const f=c.data;f.hName&&(u.type!=="element"&&(u={type:"element",tagName:"",properties:{},children:[]}),u.tagName=f.hName),u.type==="element"&&f.hProperties&&(u.properties={...u.properties,...f.hProperties}),"children"in u&&u.children&&f.hChildren&&(u.children=f.hChildren)}if(c){const f="type"in c?c:{position:c};jee(f)||(u.position={start:Wg(f),end:Ug(f)})}return u}function a(c,u,f,d){return Array.isArray(f)&&(d=f,f={}),o(c,{type:"element",tagName:u,properties:f||{},children:d||[]})}function s(c,u){return G7(a,c,u)}function l(c){return Hg(a,c)}}function Wee(t,e){t.position&&(e.position=wee(t))}function Uee(t,e){let n=e;if(t&&t.data){const r=t.data.hName,i=t.data.hChildren,o=t.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&o&&(n.properties={...n.properties,...o}),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function G7(t,e,n){const r=e&&e.type;if(!r)throw new Error("Expected node, got `"+e+"`");return Ch.call(t.handlers,r)?t.handlers[r](t,e,n):t.passThrough&&t.passThrough.includes(r)?"children"in e?{...e,children:Hg(t,e)}:e:t.unknownHandler?t.unknownHandler(t,e,n):Hee(t,e)}function Hg(t,e){const n=[];if("children"in e){const r=e.children;let i=-1;for(;++i<r.length;){const o=G7(t,r[i],e);if(o){if(i&&r[i-1].type==="break"&&(!Array.isArray(o)&&o.type==="text"&&(o.value=o.value.replace(/^\s+/,"")),!Array.isArray(o)&&o.type==="element")){const a=o.children[0];a&&a.type==="text"&&(a.value=a.value.replace(/^\s+/,""))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n}function Hee(t,e){const n=e.data||{},r="value"in e&&!(Ch.call(n,"hProperties")||Ch.call(n,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:Hg(t,e)};return t.patch(e,r),t.applyData(e,r)}function Gee(t,e){const n=[];let r=-1;for(e&&n.push({type:"text",value:`
670
+ `});const c={type:"element",tagName:"li",properties:o,children:a};return t.patch(e,c),t.applyData(e,c)}function gee(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let r=-1;for(;!e&&++r<n.length;)e=B8(n[r])}return e}function B8(t){return t.spread??t.children.length>1}function Oee(t,e){const n={},r=t.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:e.ordered?"ol":"ul",properties:n,children:t.wrap(r,!0)};return t.patch(e,o),t.applyData(e,o)}function yee(t,e){const n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function vee(t,e){const n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function bee(t,e){const n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const Wg=Z8("start"),Ug=Z8("end");function wee(t){return{start:Wg(t),end:Ug(t)}}function Z8(t){return e;function e(n){const r=n&&n.position&&n.position[t]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}function xee(t,e){const n=t.all(e),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(e.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},s=Wg(e.children[1]),l=Ug(e.children[e.children.length-1]);s.line&&l.line&&(a.position={start:s,end:l}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,o),t.applyData(e,o)}function _ee(t,e,n){const r=n?n.children:void 0,i=(r?r.indexOf(e):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:e.children.length;let s=-1;const l=[];for(;++s<a;){const u=e.children[s],f={},d=o?o[s]:void 0;d&&(f.align=d);let h={type:"element",tagName:i,properties:f,children:[]};u&&(h.children=t.all(u),t.patch(u,h),h=t.applyData(e,h)),l.push(h)}const c={type:"element",tagName:"tr",properties:{},children:t.wrap(l,!0)};return t.patch(e,c),t.applyData(e,c)}function See(t,e){const n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const z8=9,X8=32;function kee(t){const e=String(t),n=/\r?\n|\r/g;let r=n.exec(e),i=0;const o=[];for(;r;)o.push(V8(e.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(e);return o.push(V8(e.slice(i),i>0,!1)),o.join("")}function V8(t,e,n){let r=0,i=t.length;if(e){let o=t.codePointAt(r);for(;o===z8||o===X8;)r++,o=t.codePointAt(r)}if(n){let o=t.codePointAt(i-1);for(;o===z8||o===X8;)i--,o=t.codePointAt(i-1)}return i>r?t.slice(r,i):""}function Cee(t,e){const n={type:"text",value:kee(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function Pee(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const Eee={blockquote:nee,break:ree,code:iee,delete:oee,emphasis:aee,footnoteReference:N8,footnote:see,heading:lee,html:cee,imageReference:uee,image:fee,inlineCode:dee,linkReference:hee,link:pee,listItem:mee,list:Oee,paragraph:yee,root:vee,strong:bee,table:xee,tableCell:See,tableRow:_ee,text:Cee,thematicBreak:Pee,toml:Sh,yaml:Sh,definition:Sh,footnoteDefinition:Sh};function Sh(){return null}const F8=function(t){if(t==null)return Qee;if(typeof t=="string")return Mee(t);if(typeof t=="object")return Array.isArray(t)?Tee(t):Aee(t);if(typeof t=="function")return kh(t);throw new Error("Expected function, string, or object as test")};function Tee(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=F8(t[n]);return kh(r);function r(...i){let o=-1;for(;++o<e.length;)if(e[o].call(this,...i))return!0;return!1}}function Aee(t){return kh(e);function e(n){let r;for(r in t)if(n[r]!==t[r])return!1;return!0}}function Mee(t){return kh(e);function e(n){return n&&n.type===t}}function kh(t){return e;function e(n,...r){return!!(n&&typeof n=="object"&&"type"in n&&t.call(this,n,...r))}}function Qee(){return!0}const Dee=!0,Y8=!1,$ee="skip",Lee=function(t,e,n,r){typeof e=="function"&&typeof n!="function"&&(r=n,n=e,e=null);const i=F8(e),o=r?-1:1;a(t,void 0,[])();function a(s,l,c){const u=s&&typeof s=="object"?s:{};if(typeof u.type=="string"){const d=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(s.type+(d?"<"+d+">":""))+")"})}return f;function f(){let d=[],h,m,g;if((!e||i(s,l,c[c.length-1]||null))&&(d=Iee(n(s,c)),d[0]===Y8))return d;if(s.children&&d[0]!==$ee)for(m=(r?s.children.length:-1)+o,g=c.concat(s);m>-1&&m<s.children.length;){if(h=a(s.children[m],m,g)(),h[0]===Y8)return h;m=typeof h[1]=="number"?h[1]:m+o}return d}}};function Iee(t){return Array.isArray(t)?t:typeof t=="number"?[Dee,t]:[t]}const q8=function(t,e,n,r){typeof e=="function"&&typeof n!="function"&&(r=n,n=e,e=null),Lee(t,e,i,r);function i(o,a){const s=a[a.length-1];return n(o,s?s.children.indexOf(o):null,s)}};function jee(t){return!t||!t.position||!t.position.start||!t.position.start.line||!t.position.start.column||!t.position.end||!t.position.end.line||!t.position.end.column}const Nee=function(t){return Ree(t)};function Ree(t){return Bee(e);function e(n){return n&&n.type===t}}function Bee(t){return e;function e(n,...r){return!!(n&&typeof n=="object"&&"type"in n&&t.call(this,n,...r))}}const Zee=!0,W8=!1,zee="skip",Xee=function(t,e,n,r){const i=Nee(e),o=1;a(t,void 0,[])();function a(s,l,c){const u=s&&typeof s=="object"?s:{};if(typeof u.type=="string"){const d=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(s.type+(d?"<"+d+">":""))+")"})}return f;function f(){let d=[],h,m,g;if(i(s,l,c[c.length-1]||null)&&(d=Vee(n(s,c)),d[0]===W8))return d;if(s.children&&d[0]!==zee)for(m=-1+o,g=c.concat(s);m>-1&&m<s.children.length;){if(h=a(s.children[m],m,g)(),h[0]===W8)return h;m=typeof h[1]=="number"?h[1]:m+o}return d}}};function Vee(t){return Array.isArray(t)?t:typeof t=="number"?[Zee,t]:[t]}const Fee=function(t,e,n,r){Xee(t,e,i);function i(o,a){const s=a[a.length-1];return n(o,s?s.children.indexOf(o):null,s)}},U8={}.hasOwnProperty;function Yee(t){const e=Object.create(null);if(!t||!t.type)throw new Error("mdast-util-definitions expected node");return Fee(t,"definition",r=>{const i=H8(r.identifier);i&&!U8.call(e,i)&&(e[i]=r)}),n;function n(r){const i=H8(r);return i&&U8.call(e,i)?e[i]:null}}function H8(t){return String(t||"").toUpperCase()}const Ch={}.hasOwnProperty;function qee(t,e){const n=e||{},r=n.allowDangerousHtml||!1,i={};return a.dangerous=r,a.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,a.footnoteLabel=n.footnoteLabel||"Footnotes",a.footnoteLabelTagName=n.footnoteLabelTagName||"h2",a.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},a.footnoteBackLabel=n.footnoteBackLabel||"Back to content",a.unknownHandler=n.unknownHandler,a.passThrough=n.passThrough,a.handlers={...Eee,...n.handlers},a.definition=Yee(t),a.footnoteById=i,a.footnoteOrder=[],a.footnoteCounts={},a.patch=Wee,a.applyData=Uee,a.one=s,a.all=l,a.wrap=Gee,a.augment=o,q8(t,"footnoteDefinition",c=>{const u=String(c.identifier).toUpperCase();Ch.call(i,u)||(i[u]=c)}),a;function o(c,u){if(c&&"data"in c&&c.data){const f=c.data;f.hName&&(u.type!=="element"&&(u={type:"element",tagName:"",properties:{},children:[]}),u.tagName=f.hName),u.type==="element"&&f.hProperties&&(u.properties={...u.properties,...f.hProperties}),"children"in u&&u.children&&f.hChildren&&(u.children=f.hChildren)}if(c){const f="type"in c?c:{position:c};jee(f)||(u.position={start:Wg(f),end:Ug(f)})}return u}function a(c,u,f,d){return Array.isArray(f)&&(d=f,f={}),o(c,{type:"element",tagName:u,properties:f||{},children:d||[]})}function s(c,u){return G8(a,c,u)}function l(c){return Hg(a,c)}}function Wee(t,e){t.position&&(e.position=wee(t))}function Uee(t,e){let n=e;if(t&&t.data){const r=t.data.hName,i=t.data.hChildren,o=t.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&o&&(n.properties={...n.properties,...o}),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function G8(t,e,n){const r=e&&e.type;if(!r)throw new Error("Expected node, got `"+e+"`");return Ch.call(t.handlers,r)?t.handlers[r](t,e,n):t.passThrough&&t.passThrough.includes(r)?"children"in e?{...e,children:Hg(t,e)}:e:t.unknownHandler?t.unknownHandler(t,e,n):Hee(t,e)}function Hg(t,e){const n=[];if("children"in e){const r=e.children;let i=-1;for(;++i<r.length;){const o=G8(t,r[i],e);if(o){if(i&&r[i-1].type==="break"&&(!Array.isArray(o)&&o.type==="text"&&(o.value=o.value.replace(/^\s+/,"")),!Array.isArray(o)&&o.type==="element")){const a=o.children[0];a&&a.type==="text"&&(a.value=a.value.replace(/^\s+/,""))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n}function Hee(t,e){const n=e.data||{},r="value"in e&&!(Ch.call(n,"hProperties")||Ch.call(n,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:Hg(t,e)};return t.patch(e,r),t.applyData(e,r)}function Gee(t,e){const n=[];let r=-1;for(e&&n.push({type:"text",value:`
671
671
  `});++r<t.length;)r&&n.push({type:"text",value:`
672
672
  `}),n.push(t[r]);return e&&t.length>0&&n.push({type:"text",value:`
673
673
  `}),n}function Kee(t){const e=[];let n=-1;for(;++n<t.footnoteOrder.length;){const r=t.footnoteById[t.footnoteOrder[n]];if(!r)continue;const i=t.all(r),o=String(r.identifier).toUpperCase(),a=Al(o.toLowerCase());let s=0;const l=[];for(;++s<=t.footnoteCounts[o];){const f={type:"element",tagName:"a",properties:{href:"#"+t.clobberPrefix+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:t.footnoteBackLabel},children:[{type:"text",value:"↩"}]};s>1&&f.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(s)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(f)}const c=i[i.length-1];if(c&&c.type==="element"&&c.tagName==="p"){const f=c.children[c.children.length-1];f&&f.type==="text"?f.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...l)}else i.push(...l);const u={type:"element",tagName:"li",properties:{id:t.clobberPrefix+"fn-"+a},children:t.wrap(i,!0)};t.patch(r,u),e.push(u)}if(e.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:t.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(t.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:t.footnoteLabel}]},{type:"text",value:`
674
674
  `},{type:"element",tagName:"ol",properties:{},children:t.wrap(e,!0)},{type:"text",value:`
675
- `}]}}function K7(t,e){const n=qee(t,e),r=n.one(t,null),i=Kee(n);return i&&r.children.push({type:"text",value:`
676
- `},i),Array.isArray(r)?{type:"root",children:r}:r}const Jee=function(t,e){return t&&"run"in t?ete(t,e):tte(t||e)};function ete(t,e){return(n,r,i)=>{t.run(K7(n,e),r,o=>{i(o)})}}function tte(t){return e=>K7(e,t)}var J7={exports:{}},Gg,ew;function nte(){if(ew)return Gg;ew=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gg=t,Gg}var Kg,tw;function rte(){if(tw)return Kg;tw=1;var t=nte();function e(){}function n(){}return n.resetWarningCache=e,Kg=function(){function r(a,s,l,c,u,f){if(f!==t){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},Kg}J7.exports=rte()();var ite=J7.exports;const Le=as(ite);class gu{constructor(e,n,r){this.property=e,this.normal=n,r&&(this.space=r)}}gu.prototype.property={},gu.prototype.normal={},gu.prototype.space=null;function nw(t,e){const n={},r={};let i=-1;for(;++i<t.length;)Object.assign(n,t[i].property),Object.assign(r,t[i].normal);return new gu(n,r,e)}function Jg(t){return t.toLowerCase()}class Yr{constructor(e,n){this.property=e,this.attribute=n}}Yr.prototype.space=null,Yr.prototype.boolean=!1,Yr.prototype.booleanish=!1,Yr.prototype.overloadedBoolean=!1,Yr.prototype.number=!1,Yr.prototype.commaSeparated=!1,Yr.prototype.spaceSeparated=!1,Yr.prototype.commaOrSpaceSeparated=!1,Yr.prototype.mustUseProperty=!1,Yr.prototype.defined=!1;let ote=0;const Ie=Os(),Kt=Os(),rw=Os(),re=Os(),xt=Os(),Ml=Os(),vr=Os();function Os(){return 2**++ote}const eO=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:Kt,commaOrSpaceSeparated:vr,commaSeparated:Ml,number:re,overloadedBoolean:rw,spaceSeparated:xt},Symbol.toStringTag,{value:"Module"})),tO=Object.keys(eO);class nO extends Yr{constructor(e,n,r,i){let o=-1;if(super(e,n),iw(this,"space",i),typeof r=="number")for(;++o<tO.length;){const a=tO[o];iw(this,tO[o],(r&eO[a])===eO[a])}}}nO.prototype.defined=!0;function iw(t,e,n){n&&(t[e]=n)}const ate={}.hasOwnProperty;function Ql(t){const e={},n={};let r;for(r in t.properties)if(ate.call(t.properties,r)){const i=t.properties[r],o=new nO(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,n[Jg(r)]=r,n[Jg(o.attribute)]=r}return new gu(e,n,t.space)}const ow=Ql({space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),aw=Ql({space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function sw(t,e){return e in t?t[e]:e}function lw(t,e){return sw(t,e.toLowerCase())}const cw=Ql({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:lw,properties:{xmlns:null,xmlnsXLink:null}}),uw=Ql({transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Kt,ariaAutoComplete:null,ariaBusy:Kt,ariaChecked:Kt,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:xt,ariaCurrent:null,ariaDescribedBy:xt,ariaDetails:null,ariaDisabled:Kt,ariaDropEffect:xt,ariaErrorMessage:null,ariaExpanded:Kt,ariaFlowTo:xt,ariaGrabbed:Kt,ariaHasPopup:null,ariaHidden:Kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xt,ariaLevel:re,ariaLive:null,ariaModal:Kt,ariaMultiLine:Kt,ariaMultiSelectable:Kt,ariaOrientation:null,ariaOwns:xt,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:Kt,ariaReadOnly:Kt,ariaRelevant:null,ariaRequired:Kt,ariaRoleDescription:xt,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:Kt,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null}}),ste=Ql({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:lw,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ml,acceptCharset:xt,accessKey:xt,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:xt,autoFocus:Ie,autoPlay:Ie,blocking:xt,capture:null,charSet:null,checked:Ie,cite:null,className:xt,cols:re,colSpan:null,content:null,contentEditable:Kt,controls:Ie,controlsList:xt,coords:re|Ml,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:rw,draggable:Kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:xt,height:re,hidden:Ie,high:re,href:null,hrefLang:null,htmlFor:xt,httpEquiv:xt,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:xt,itemRef:xt,itemScope:Ie,itemType:xt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ie,optimum:re,pattern:null,ping:xt,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:xt,required:Ie,reversed:Ie,rows:re,rowSpan:re,sandbox:xt,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:Kt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:Ie,useMap:null,value:Kt,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xt,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:Kt,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ie,disableRemotePlayback:Ie,prefix:null,property:null,results:re,security:null,unselectable:null}}),lte=Ql({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:sw,properties:{about:vr,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:xt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:Ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ml,g2:Ml,glyphName:Ml,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:vr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vr,rev:vr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vr,requiredFeatures:vr,requiredFonts:vr,requiredFormats:vr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:vr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vr,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),cte=/^data[-\w.:]+$/i,fw=/-[a-z]/g,ute=/[A-Z]/g;function fte(t,e){const n=Jg(e);let r=e,i=Yr;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&cte.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(fw,hte);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!fw.test(o)){let a=o.replace(ute,dte);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=nO}return new i(r,e)}function dte(t){return"-"+t.toLowerCase()}function hte(t){return t.charAt(1).toUpperCase()}const dw={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},pte=nw([aw,ow,cw,uw,ste],"html"),mte=nw([aw,ow,cw,uw,lte],"svg");function gte(t){if(t.allowedElements&&t.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(t.allowedElements||t.disallowedElements||t.allowElement)return e=>{q7(e,"element",(n,r,i)=>{const o=i;let a;if(t.allowedElements?a=!t.allowedElements.includes(n.tagName):t.disallowedElements&&(a=t.disallowedElements.includes(n.tagName)),!a&&t.allowElement&&typeof r=="number"&&(a=!t.allowElement(n,r,o)),a&&typeof r=="number")return t.unwrapDisallowed&&n.children?o.children.splice(r,1,...n.children):o.children.splice(r,1),r})}}var hw={exports:{}},it={};/**
675
+ `}]}}function K8(t,e){const n=qee(t,e),r=n.one(t,null),i=Kee(n);return i&&r.children.push({type:"text",value:`
676
+ `},i),Array.isArray(r)?{type:"root",children:r}:r}const Jee=function(t,e){return t&&"run"in t?ete(t,e):tte(t||e)};function ete(t,e){return(n,r,i)=>{t.run(K8(n,e),r,o=>{i(o)})}}function tte(t){return e=>K8(e,t)}var J8={exports:{}},Gg,ew;function nte(){if(ew)return Gg;ew=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gg=t,Gg}var Kg,tw;function rte(){if(tw)return Kg;tw=1;var t=nte();function e(){}function n(){}return n.resetWarningCache=e,Kg=function(){function r(a,s,l,c,u,f){if(f!==t){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},Kg}J8.exports=rte()();var ite=J8.exports;const Le=as(ite);class gu{constructor(e,n,r){this.property=e,this.normal=n,r&&(this.space=r)}}gu.prototype.property={},gu.prototype.normal={},gu.prototype.space=null;function nw(t,e){const n={},r={};let i=-1;for(;++i<t.length;)Object.assign(n,t[i].property),Object.assign(r,t[i].normal);return new gu(n,r,e)}function Jg(t){return t.toLowerCase()}class Yr{constructor(e,n){this.property=e,this.attribute=n}}Yr.prototype.space=null,Yr.prototype.boolean=!1,Yr.prototype.booleanish=!1,Yr.prototype.overloadedBoolean=!1,Yr.prototype.number=!1,Yr.prototype.commaSeparated=!1,Yr.prototype.spaceSeparated=!1,Yr.prototype.commaOrSpaceSeparated=!1,Yr.prototype.mustUseProperty=!1,Yr.prototype.defined=!1;let ote=0;const Ie=Os(),Kt=Os(),rw=Os(),re=Os(),xt=Os(),Ml=Os(),vr=Os();function Os(){return 2**++ote}const eO=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:Kt,commaOrSpaceSeparated:vr,commaSeparated:Ml,number:re,overloadedBoolean:rw,spaceSeparated:xt},Symbol.toStringTag,{value:"Module"})),tO=Object.keys(eO);class nO extends Yr{constructor(e,n,r,i){let o=-1;if(super(e,n),iw(this,"space",i),typeof r=="number")for(;++o<tO.length;){const a=tO[o];iw(this,tO[o],(r&eO[a])===eO[a])}}}nO.prototype.defined=!0;function iw(t,e,n){n&&(t[e]=n)}const ate={}.hasOwnProperty;function Ql(t){const e={},n={};let r;for(r in t.properties)if(ate.call(t.properties,r)){const i=t.properties[r],o=new nO(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,n[Jg(r)]=r,n[Jg(o.attribute)]=r}return new gu(e,n,t.space)}const ow=Ql({space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),aw=Ql({space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function sw(t,e){return e in t?t[e]:e}function lw(t,e){return sw(t,e.toLowerCase())}const cw=Ql({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:lw,properties:{xmlns:null,xmlnsXLink:null}}),uw=Ql({transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Kt,ariaAutoComplete:null,ariaBusy:Kt,ariaChecked:Kt,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:xt,ariaCurrent:null,ariaDescribedBy:xt,ariaDetails:null,ariaDisabled:Kt,ariaDropEffect:xt,ariaErrorMessage:null,ariaExpanded:Kt,ariaFlowTo:xt,ariaGrabbed:Kt,ariaHasPopup:null,ariaHidden:Kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xt,ariaLevel:re,ariaLive:null,ariaModal:Kt,ariaMultiLine:Kt,ariaMultiSelectable:Kt,ariaOrientation:null,ariaOwns:xt,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:Kt,ariaReadOnly:Kt,ariaRelevant:null,ariaRequired:Kt,ariaRoleDescription:xt,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:Kt,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null}}),ste=Ql({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:lw,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ml,acceptCharset:xt,accessKey:xt,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:xt,autoFocus:Ie,autoPlay:Ie,blocking:xt,capture:null,charSet:null,checked:Ie,cite:null,className:xt,cols:re,colSpan:null,content:null,contentEditable:Kt,controls:Ie,controlsList:xt,coords:re|Ml,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:rw,draggable:Kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:xt,height:re,hidden:Ie,high:re,href:null,hrefLang:null,htmlFor:xt,httpEquiv:xt,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:xt,itemRef:xt,itemScope:Ie,itemType:xt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ie,optimum:re,pattern:null,ping:xt,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:xt,required:Ie,reversed:Ie,rows:re,rowSpan:re,sandbox:xt,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:Kt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:Ie,useMap:null,value:Kt,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xt,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:Kt,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ie,disableRemotePlayback:Ie,prefix:null,property:null,results:re,security:null,unselectable:null}}),lte=Ql({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:sw,properties:{about:vr,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:xt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:Ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ml,g2:Ml,glyphName:Ml,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:vr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vr,rev:vr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vr,requiredFeatures:vr,requiredFonts:vr,requiredFormats:vr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:vr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vr,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),cte=/^data[-\w.:]+$/i,fw=/-[a-z]/g,ute=/[A-Z]/g;function fte(t,e){const n=Jg(e);let r=e,i=Yr;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&cte.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(fw,hte);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!fw.test(o)){let a=o.replace(ute,dte);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=nO}return new i(r,e)}function dte(t){return"-"+t.toLowerCase()}function hte(t){return t.charAt(1).toUpperCase()}const dw={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},pte=nw([aw,ow,cw,uw,ste],"html"),mte=nw([aw,ow,cw,uw,lte],"svg");function gte(t){if(t.allowedElements&&t.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(t.allowedElements||t.disallowedElements||t.allowElement)return e=>{q8(e,"element",(n,r,i)=>{const o=i;let a;if(t.allowedElements?a=!t.allowedElements.includes(n.tagName):t.disallowedElements&&(a=t.disallowedElements.includes(n.tagName)),!a&&t.allowElement&&typeof r=="number"&&(a=!t.allowElement(n,r,o)),a&&typeof r=="number")return t.unwrapDisallowed&&n.children?o.children.splice(r,1,...n.children):o.children.splice(r,1),r})}}var hw={exports:{}},it={};/**
677
677
  * @license React
678
678
  * react-is.production.min.js
679
679
  *
@@ -682,7 +682,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
682
682
  * This source code is licensed under the MIT license found in the
683
683
  * LICENSE file in the root directory of this source tree.
684
684
  */var pw;function Ote(){if(pw)return it;pw=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function g(p){if(typeof p=="object"&&p!==null){var O=p.$$typeof;switch(O){case t:switch(p=p.type,p){case n:case i:case r:case c:case u:return p;default:switch(p=p&&p.$$typeof,p){case s:case a:case l:case d:case f:case o:return p;default:return O}}case e:return O}}}return it.ContextConsumer=a,it.ContextProvider=o,it.Element=t,it.ForwardRef=l,it.Fragment=n,it.Lazy=d,it.Memo=f,it.Portal=e,it.Profiler=i,it.StrictMode=r,it.Suspense=c,it.SuspenseList=u,it.isAsyncMode=function(){return!1},it.isConcurrentMode=function(){return!1},it.isContextConsumer=function(p){return g(p)===a},it.isContextProvider=function(p){return g(p)===o},it.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},it.isForwardRef=function(p){return g(p)===l},it.isFragment=function(p){return g(p)===n},it.isLazy=function(p){return g(p)===d},it.isMemo=function(p){return g(p)===f},it.isPortal=function(p){return g(p)===e},it.isProfiler=function(p){return g(p)===i},it.isStrictMode=function(p){return g(p)===r},it.isSuspense=function(p){return g(p)===c},it.isSuspenseList=function(p){return g(p)===u},it.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===i||p===r||p===c||p===u||p===h||typeof p=="object"&&p!==null&&(p.$$typeof===d||p.$$typeof===f||p.$$typeof===o||p.$$typeof===a||p.$$typeof===l||p.$$typeof===m||p.getModuleId!==void 0)},it.typeOf=g,it}hw.exports=Ote();var yte=hw.exports;const vte=as(yte);function bte(t){const e=t&&typeof t=="object"&&t.type==="text"?t.value||"":t;return typeof e=="string"&&e.replace(/[ \t\n\f\r]/g,"")===""}function wte(t){return t.join(" ").trim()}function xte(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var rO={exports:{}},mw=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,_te=/\n/g,Ste=/^\s*/,kte=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Cte=/^:\s*/,Pte=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ete=/^[;\s]*/,Tte=/^\s+|\s+$/g,Ate=`
685
- `,gw="/",Ow="*",ys="",Mte="comment",Qte="declaration",Dte=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function i(m){var g=m.match(_te);g&&(n+=g.length);var p=m.lastIndexOf(Ate);r=~p?m.length-p:r+m.length}function o(){var m={line:n,column:r};return function(g){return g.position=new a(m),c(),g}}function a(m){this.start=m,this.end={line:n,column:r},this.source=e.source}a.prototype.content=t;function s(m){var g=new Error(e.source+":"+n+":"+r+": "+m);if(g.reason=m,g.filename=e.source,g.line=n,g.column=r,g.source=t,!e.silent)throw g}function l(m){var g=m.exec(t);if(g){var p=g[0];return i(p),t=t.slice(p.length),g}}function c(){l(Ste)}function u(m){var g;for(m=m||[];g=f();)g!==!1&&m.push(g);return m}function f(){var m=o();if(!(gw!=t.charAt(0)||Ow!=t.charAt(1))){for(var g=2;ys!=t.charAt(g)&&(Ow!=t.charAt(g)||gw!=t.charAt(g+1));)++g;if(g+=2,ys===t.charAt(g-1))return s("End of comment missing");var p=t.slice(2,g-2);return r+=2,i(p),t=t.slice(g),r+=2,m({type:Mte,comment:p})}}function d(){var m=o(),g=l(kte);if(g){if(f(),!l(Cte))return s("property missing ':'");var p=l(Pte),O=m({type:Qte,property:yw(g[0].replace(mw,ys)),value:p?yw(p[0].replace(mw,ys)):ys});return l(Ete),O}}function h(){var m=[];u(m);for(var g;g=d();)g!==!1&&(m.push(g),u(m));return m}return c(),h()};function yw(t){return t?t.replace(Tte,ys):ys}var $te=Dte;function vw(t,e){var n=null;if(!t||typeof t!="string")return n;for(var r,i=$te(t),o=typeof e=="function",a,s,l=0,c=i.length;l<c;l++)r=i[l],a=r.property,s=r.value,o?e(a,s,r):s&&(n||(n={}),n[a]=s);return n}rO.exports=vw,rO.exports.default=vw;var Lte=rO.exports;const Ite=as(Lte),iO={}.hasOwnProperty,jte=new Set(["table","thead","tbody","tfoot","tr"]);function bw(t,e){const n=[];let r=-1,i;for(;++r<e.children.length;)i=e.children[r],i.type==="element"?n.push(Nte(t,i,r,e)):i.type==="text"?(e.type!=="element"||!jte.has(e.tagName)||!bte(i))&&n.push(i.value):i.type==="raw"&&!t.options.skipHtml&&n.push(i.value);return n}function Nte(t,e,n,r){const i=t.options,o=i.transformLinkUri===void 0?AG:i.transformLinkUri,a=t.schema,s=e.tagName,l={};let c=a,u;if(a.space==="html"&&s==="svg"&&(c=mte,t.schema=c),e.properties)for(u in e.properties)iO.call(e.properties,u)&&Bte(l,u,e.properties[u],t);(s==="ol"||s==="ul")&&t.listDepth++;const f=bw(t,e);(s==="ol"||s==="ul")&&t.listDepth--,t.schema=a;const d=e.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},h=i.components&&iO.call(i.components,s)?i.components[s]:s,m=typeof h=="string"||h===k.Fragment;if(!vte.isValidElementType(h))throw new TypeError(`Component for name \`${s}\` not defined or is not renderable`);if(l.key=n,s==="a"&&i.linkTarget&&(l.target=typeof i.linkTarget=="function"?i.linkTarget(String(l.href||""),e.children,typeof l.title=="string"?l.title:null):i.linkTarget),s==="a"&&o&&(l.href=o(String(l.href||""),e.children,typeof l.title=="string"?l.title:null)),!m&&s==="code"&&r.type==="element"&&r.tagName!=="pre"&&(l.inline=!0),!m&&(s==="h1"||s==="h2"||s==="h3"||s==="h4"||s==="h5"||s==="h6")&&(l.level=Number.parseInt(s.charAt(1),10)),s==="img"&&i.transformImageUri&&(l.src=i.transformImageUri(String(l.src||""),String(l.alt||""),typeof l.title=="string"?l.title:null)),!m&&s==="li"&&r.type==="element"){const g=Rte(e);l.checked=g&&g.properties?!!g.properties.checked:null,l.index=oO(r,e),l.ordered=r.tagName==="ol"}return!m&&(s==="ol"||s==="ul")&&(l.ordered=s==="ol",l.depth=t.listDepth),(s==="td"||s==="th")&&(l.align&&(l.style||(l.style={}),l.style.textAlign=l.align,delete l.align),m||(l.isHeader=s==="th")),!m&&s==="tr"&&r.type==="element"&&(l.isHeader=r.tagName==="thead"),i.sourcePos&&(l["data-sourcepos"]=Xte(d)),!m&&i.rawSourcePos&&(l.sourcePosition=e.position),!m&&i.includeElementIndex&&(l.index=oO(r,e),l.siblingCount=oO(r)),m||(l.node=e),f.length>0?k.createElement(h,l,f):k.createElement(h,l)}function Rte(t){let e=-1;for(;++e<t.children.length;){const n=t.children[e];if(n.type==="element"&&n.tagName==="input")return n}return null}function oO(t,e){let n=-1,r=0;for(;++n<t.children.length&&t.children[n]!==e;)t.children[n].type==="element"&&r++;return r}function Bte(t,e,n,r){const i=fte(r.schema,e);let o=n;o==null||o!==o||(Array.isArray(o)&&(o=i.commaSeparated?xte(o):wte(o)),i.property==="style"&&typeof o=="string"&&(o=Zte(o)),i.space&&i.property?t[iO.call(dw,i.property)?dw[i.property]:i.property]=o:i.attribute&&(t[i.attribute]=o))}function Zte(t){const e={};try{Ite(t,n)}catch{}return e;function n(r,i){const o=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;e[o.replace(/-([a-z])/g,zte)]=i}}function zte(t,e){return e.toUpperCase()}function Xte(t){return[t.start.line,":",t.start.column,"-",t.end.line,":",t.end.column].map(String).join("")}const ww={}.hasOwnProperty,Vte="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ph={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function xw(t){for(const o in Ph)if(ww.call(Ph,o)&&ww.call(t,o)){const a=Ph[o];console.warn(`[react-markdown] Warning: please ${a.to?`use \`${a.to}\` instead of`:"remove"} \`${o}\` (see <${Vte}#${a.id}> for more info)`),delete Ph[o]}const e=YG().use(tee).use(t.remarkPlugins||[]).use(Jee,{...t.remarkRehypeOptions,allowDangerousHtml:!0}).use(t.rehypePlugins||[]).use(gte,t),n=new G8;typeof t.children=="string"?n.value=t.children:t.children!==void 0&&t.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${t.children}\`)`);const r=e.runSync(e.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=k.createElement(k.Fragment,{},bw({options:t,schema:pte,listDepth:0},r));return t.className&&(i=k.createElement("div",{className:t.className},i)),i}xw.propTypes={children:Le.string,className:Le.string,allowElement:Le.func,allowedElements:Le.arrayOf(Le.string),disallowedElements:Le.arrayOf(Le.string),unwrapDisallowed:Le.bool,remarkPlugins:Le.arrayOf(Le.oneOfType([Le.object,Le.func,Le.arrayOf(Le.oneOfType([Le.bool,Le.string,Le.object,Le.func,Le.arrayOf(Le.any)]))])),rehypePlugins:Le.arrayOf(Le.oneOfType([Le.object,Le.func,Le.arrayOf(Le.oneOfType([Le.bool,Le.string,Le.object,Le.func,Le.arrayOf(Le.any)]))])),sourcePos:Le.bool,rawSourcePos:Le.bool,skipHtml:Le.bool,includeElementIndex:Le.bool,transformLinkUri:Le.oneOfType([Le.func,Le.bool]),linkTarget:Le.oneOfType([Le.func,Le.string]),transformImageUri:Le.func,components:Le.object};const Fte="_previewerWrapper_e7mb6_1",Yte={previewerWrapper:Fte},qte=({children:t,className:e})=>N.jsx(xw,{className:Ce(Yte.previewerWrapper,e),children:t}),Wte="_radio_9b2ek_1",Ute="_label_9b2ek_5",Hte="_label_left_9b2ek_15",Gte="_label_right_9b2ek_18",Kte="_label_radio_9b2ek_21",Jte="_label_button_9b2ek_27",ene="_label__disabled_9b2ek_75",tne="_radio__darkMode_9b2ek_78",ka={radio:Wte,label:Ute,label_left:Hte,label_right:Gte,label_radio:Kte,label_button:Jte,label__disabled:ene,radio__darkMode:tne},nne=({classNameRadioButton:t="",labelLeft:e="",labelRight:n="",disabled:r=!1,...i})=>{const{className:o,ref:a}=i,s=!!e&&typeof n=="string",l=!!n&&typeof n=="string";e&&n&&console.warn("Use `label` or `labelLeft`, not both.");const{theme:c}=ss();return N.jsx("div",{className:Ce(ka.radio,"container_row","row_align__end",o&&o,(c==null?void 0:c.mode)==="dark"&&ka.radio__darkMode),children:N.jsxs("label",{className:Ce(ka.label,r&&ka.label__disabled),children:[s?N.jsx("span",{className:ka.label_left,children:e}):N.jsx(N.Fragment,{children:e}),N.jsx("input",{...i,className:Ce(ka.label_radio,t&&t),type:"radio",disabled:r,ref:a}),N.jsx("span",{className:ka.label_button}),l?N.jsx("span",{className:ka.label_right,children:n}):N.jsx(N.Fragment,{children:n})]})})};function rne(){var t=k.useRef(!1);return k.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),t}const _w=Symbol("useLazyRef empty value"),ine=t=>{const e=k.useRef(_w);return e.current===_w&&(e.current=t()),e};var one=setTimeout;function ane(t,e){var n=e.useCachedSetTimeout?one:setTimeout;return new Promise(function(r){n(r,t)})}function sne(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.useCachedSetTimeout,r=ane(t,{useCachedSetTimeout:n});function i(o){return r.then(function(){return o})}return i.then=function(){return r.then.apply(r,arguments)},i.catch=Promise.resolve().catch,i}var Sw={};Object.defineProperty(Sw,"__esModule",{value:!0});function lne(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length===2)return Cw(t[0],t[1])||null;var n=t.slice(1).reduce(function(r,i){return Cw(r,i)},t[0]);return n||null}var cne=Sw.default=lne,kw=new WeakMap;function Cw(t,e){if(t&&e){var n=kw.get(t)||new WeakMap;kw.set(t,n);var r=n.get(e)||function(i){Pw(t,i),Pw(e,i)};return n.set(e,r),r}return t||e}function Pw(t,e){typeof t=="function"?t(e):t.current=e}var Ew=t=>({isFirstLoad:!0,options:[],hasMore:!0,isLoading:!1,additional:t.additional}),une=({options:t,defaultOptions:e,additional:n,defaultAdditional:r})=>{const i=e===!0?null:e instanceof Array?e:t;return i?{"":{isFirstLoad:!1,isLoading:!1,options:i,hasMore:!0,additional:r||n}}:{}},fne=10,dne=(t,e,n)=>t-e-fne<n,hne=(t,e)=>[...t,...e],Tw='[react-select-async-paginate] response of "loadOptions" should be an object with "options" prop, which contains array of options.',pne=t=>{if(!t)return!1;const{options:e,hasMore:n}=t;return!(!Array.isArray(e)||typeof n!="boolean"&&typeof n<"u")},mne=t=>{if(!pne(t))throw console.error(Tw,"Received:",t),new Error(Tw);return!0},gne=async(t,e,n,r,i,o)=>{const a=e.current.inputValue,s=!n.current[a],l=s?Ew(e.current):n.current[a];if(l.isLoading||!l.hasMore)return;if(i(f=>({...f,[a]:{...l,isLoading:!0}})),r>0&&t==="input-change"){await sne(r);const f=e.current.inputValue;if(a!==f){i(d=>{if(s){const{[a]:h,...m}=d;return m}return{...d,[a]:{...l,isLoading:!1}}});return}}let c,u=!1;try{const{loadOptions:f}=e.current;c=await f(a,l.options,l.additional)}catch{u=!0}if(u){i(f=>({...f,[a]:{...l,isLoading:!1}}));return}if(mne(c)){const{options:f,hasMore:d}=c,h=c.hasOwnProperty("additional")?c.additional:l.additional;i(m=>({...m,[a]:{...l,options:o(l.options,f,h),hasMore:!!d,isLoading:!1,isFirstLoad:!1,additional:h}}))}},Aw=t=>t+1,One=(t,e=[])=>{const{defaultOptions:n,loadOptionsOnMenuOpen:r=!0,debounceTimeout:i=0,inputValue:o,menuIsOpen:a,filterOption:s=null,reduceOptions:l=hne,shouldLoadMore:c=dne}=t,u=rne(),f=k.useRef(!0),d=k.useRef(t);d.current=t;const h=k.useState(0)[1],m=ine(()=>une(t)),g=k.useCallback(w=>{gne(w,d,m,i,v=>{m.current=v(m.current),u.current&&h(Aw)},l)},[i]),p=k.useCallback(()=>{const w=d.current.inputValue;m.current[w]&&g("menu-scroll")},[g]);k.useEffect(()=>{f.current?f.current=!1:(m.current={},h(Aw)),n===!0&&g("autoload")},e),k.useEffect(()=>{a&&!m.current[o]&&g("input-change")},[o]),k.useEffect(()=>{a&&!m.current[""]&&r&&g("menu-toggle")},[a]);const O=m.current[o]||Ew(t);return{handleScrolledToBottom:p,shouldLoadMore:c,filterOption:s,isLoading:O.isLoading,isFirstLoad:O.isFirstLoad,options:O.options}},yne=(t,e=[])=>{const{inputValue:n,menuIsOpen:r,defaultInputValue:i,defaultMenuIsOpen:o,onInputChange:a,onMenuClose:s,onMenuOpen:l}=t,[c,u]=k.useState(i||""),[f,d]=k.useState(!!o),h=typeof n=="string"?n:c,m=typeof r=="boolean"?r:f,g=k.useCallback((w,v)=>{a&&a(w,v),u(w)},[a]),p=k.useCallback(()=>{s&&s(),d(!1)},[s]),O=k.useCallback(()=>{l&&l(),d(!0)},[l]);return{...One({...t,inputValue:h,menuIsOpen:m},e),inputValue:h,menuIsOpen:m,onInputChange:g,onMenuClose:p,onMenuOpen:O}},vne=300;function bne(t){function e(n){const{selectProps:r,innerRef:i}=n,{handleScrolledToBottom:o,shouldLoadMore:a}=r,s=k.useRef(),l=k.useRef(null),c=k.useCallback(()=>{const d=l.current;if(!d)return!1;const{scrollTop:h,scrollHeight:m,clientHeight:g}=d;return a(m,g,h)},[a]),u=k.useCallback(()=>{c()&&o&&o()},[c,o]),f=k.useCallback(()=>{u(),s.current=setTimeout(f,vne)},[u]);return k.useEffect(()=>(f(),()=>{s.current&&clearTimeout(s.current)}),[]),N.jsx(t,{...n,innerRef:cne(i,l)})}return e}var wne=bne(yh.MenuList),xne=t=>k.useMemo(()=>({MenuList:wne,...t}),[t]),_ne=[],Sne={};function kne(t){function e(n){const{components:r=Sne,selectRef:i=void 0,isLoading:o,cacheUniqs:a=_ne,...s}=n,l=yne(s,a),c=xne(r),u=typeof o=="boolean"?o:l.isLoading;return N.jsx(t,{...n,...l,isLoading:u,components:c,ref:i})}return e}var Cne=kne(R8);const Pne=({className:t="",disabled:e=!1,error:n="",label:r="",placeholder:i="",...o})=>{const{loadOptions:a,value:s,onChange:l}=o,c=n&&typeof n=="string",{uniqueId:u,handleCloseSelect:f}=X8({id:o==null?void 0:o.id});return N.jsxs("div",{className:Ce("select",n&&"select__error",t&&t),children:[r&&N.jsx("label",{className:"select_label",children:r}),N.jsx(Cne,{...o,id:u,className:"reactSelect",classNamePrefix:"reactSelect",isDisabled:e,components:{ClearIndicator:B8,DropdownIndicator:Z8},onMenuClose:f,loadOptions:a,value:s,onChange:l,placeholder:i}),c&&N.jsx(z8,{message:n})]})},Ene="_skeletonBase_1yydk_1",Tne="_skeletonAnimation_1yydk_1",Ane={skeletonBase:Ene,skeletonAnimation:Tne},Mw=({width:t="100%",height:e="100px",radius:n="8px",maxWidth:r="unset",className:i})=>{const o={width:t,height:e,maxWidth:r,borderRadius:n};return N.jsx("div",{style:o,className:Ce(Ane.skeletonBase,i&&i)})},Mne="_switchComponent_c2vpp_1",Qne="_switchComponent_input_c2vpp_5",Dne="_inputCircle_c2vpp_16",$ne="_switchComponent_input__checked_c2vpp_26",Lne="_switchComponent_input__disabled_c2vpp_32",Ine="_inputCircle_icon_c2vpp_48",jne="_switchComponent_label_c2vpp_52",Ca={switchComponent:Mne,switchComponent_input:Qne,inputCircle:Dne,switchComponent_input__checked:$ne,switchComponent_input__disabled:Lne,inputCircle_icon:Ine,switchComponent_label:jne},Nne=({checked:t,className:e,disabled:n,label:r,onChange:i})=>{const o=()=>{i(!t)};return N.jsxs("section",{className:Ce(Ca.switchComponent,e&&e),children:[N.jsx("div",{className:Ce(Ca.switchComponent_input,t&&Ca.switchComponent_input__checked,n&&Ca.switchComponent_input__disabled),onClick:o,children:N.jsx("div",{className:Ca.inputCircle,children:t?N.jsx(kt,{name:"check",size:"sm",className:Ca.inputCircle_icon,color:n?"neutral-50":"neutral-70"}):N.jsx(kt,{name:"close",size:"sm",className:Ca.inputCircle_icon,color:n?"neutral-30":"neutral-70"})})}),r&&N.jsx("span",{className:Ca.switchComponent_label,children:r})]})},Qw=({status:t,size:e="md"})=>{const n={error:"circle-cross",warning:"alert-triangle",blocked:"circle-info",unsaved:"refresh"},r={error:!0,warning:!0,unsaved:!0},i={error:"error-50",warning:"warning-50",unsaved:"info-50"};return N.jsx(kt,{size:e,name:n[t],filled:r[t],color:i[t]})},Rne="_textField_1kcsd_1",Bne="_textField_label_1kcsd_4",Zne="_textField_content_1kcsd_12",zne="_input_1kcsd_17",Xne="_input_field_1kcsd_27",Vne="_input_clearButton_1kcsd_40",Fne="_input__withIcon_1kcsd_59",Yne="_textField_content__error_1kcsd_62",qne="_textField_content__warning_1kcsd_65",Wne="_textField_content__blocked_1kcsd_68",Une="_textField_content__unsaved_1kcsd_71",Hne="_textField_helperText_1kcsd_74",Gne="_textField__darkMode_1kcsd_84",Fi={textField:Rne,textField_label:Bne,textField_content:Zne,input:zne,input_field:Xne,input_clearButton:Vne,input__withIcon:Fne,textField_content__error:Yne,textField_content__warning:qne,textField_content__blocked:Wne,textField_content__unsaved:Une,textField_helperText:Hne,textField__darkMode:Gne},Dw=({className:t,allowClear:e=!1,label:n,status:r,statusDisplay:i="inline",statusText:o="",icon:a,...s})=>{const{theme:l}=ss(),[c,u]=k.useState(s.value||""),f=()=>{u("")},d=h=>{const m=h.currentTarget.value;u(m),s.onChange&&s.onChange(h)};return N.jsxs("section",{className:Ce(Fi.textField,t&&t,(l==null?void 0:l.mode)==="dark"&&Fi.textField__darkMode),children:[n&&N.jsx("label",{htmlFor:s.id,className:Fi.textField_label,children:n}),N.jsxs("div",{className:Ce(Fi.textField_content,r&&Fi[`textField_content__${r}`]),children:[N.jsxs("span",{className:Ce(Fi.input,a&&Fi.input__withIcon),children:[a&&N.jsx(kt,{name:a,color:s!=null&&s.disabled?"neutral-50":"neutral-70"}),N.jsx("input",{className:Fi.input_field,value:c,onChange:h=>{d(h)},...s}),e&&N.jsx("button",{className:Fi.input_clearButton,onClick:f,children:N.jsx(kt,{name:"close",size:"sm"})})]}),r&&i==="icon"&&N.jsx(Qw,{status:r})]}),r&&i==="inline"&&N.jsxs("span",{className:Fi.textField_helperText,children:[N.jsx(Qw,{size:"sm",status:r}),o]})]})};Dw.prototype={avocado:"TextField"};function $w(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=$w(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function Pa(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=$w(t))&&(r&&(r+=" "),r+=e);return r}function Ou(t){return typeof t=="number"&&!isNaN(t)}function yu(t){return typeof t=="boolean"}function vs(t){return typeof t=="string"}function nr(t){return typeof t=="function"}function Eh(t){return vs(t)||nr(t)?t:null}function aO(t){return t===0||t}function sO(t){return k.isValidElement(t)||vs(t)||nr(t)||Ou(t)}const Lw={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Lo={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function Kne(t,e,n){n===void 0&&(n=300);const{scrollHeight:r,style:i}=t;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition="all "+n+"ms",requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(e,n)})})}function Iw(t){let{enter:e,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:o=300}=t;return function(a){let{children:s,position:l,preventExitTransition:c,done:u,nodeRef:f,isIn:d}=a;const h=r?e+"--"+l:e,m=r?n+"--"+l:n,g=k.useRef(),p=k.useRef(0);function O(v){if(v.target!==f.current)return;const b=f.current;b.dispatchEvent(new Event("d")),b.removeEventListener("animationend",O),b.removeEventListener("animationcancel",O),p.current===0&&v.type!=="animationcancel"&&(b.className=g.current)}function w(){const v=f.current;v.removeEventListener("animationend",w),i?Kne(v,u,o):u()}return k.useLayoutEffect(()=>{(function(){const v=f.current;g.current=v.className,v.className+=" "+h,v.addEventListener("animationend",O),v.addEventListener("animationcancel",O)})()},[]),k.useEffect(()=>{d||(c?w():function(){p.current=1;const v=f.current;v.className+=" "+m,v.addEventListener("animationend",w)}())},[d]),k.createElement(k.Fragment,null,s)}}function jw(t,e){return{content:t.content,containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,status:e}}const qr={list:new Map,emitQueue:new Map,on(t,e){return this.list.has(t)||this.list.set(t,[]),this.list.get(t).push(e),this},off(t,e){if(e){const n=this.list.get(t).filter(r=>r!==e);return this.list.set(t,n),this}return this.list.delete(t),this},cancelEmit(t){const e=this.emitQueue.get(t);return e&&(e.forEach(clearTimeout),this.emitQueue.delete(t)),this},emit(t){this.list.has(t)&&this.list.get(t).forEach(e=>{const n=setTimeout(()=>{e(...[].slice.call(arguments,1))},0);this.emitQueue.has(t)||this.emitQueue.set(t,[]),this.emitQueue.get(t).push(n)})}},Th=t=>{let{theme:e,type:n,...r}=t;return k.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":"var(--toastify-icon-color-"+n+")",...r})},lO={info:function(t){return k.createElement(Th,{...t},k.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(t){return k.createElement(Th,{...t},k.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(t){return k.createElement(Th,{...t},k.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(t){return k.createElement(Th,{...t},k.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return k.createElement("div",{className:"Toastify__spinner"})}};function Jne(t){const[,e]=k.useReducer(h=>h+1,0),[n,r]=k.useState([]),i=k.useRef(null),o=k.useRef(new Map).current,a=h=>n.indexOf(h)!==-1,s=k.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:t,containerId:null,isToastActive:a,getToast:h=>o.get(h)}).current;function l(h){let{containerId:m}=h;const{limit:g}=s.props;!g||m&&s.containerId!==m||(s.count-=s.queue.length,s.queue=[])}function c(h){r(m=>aO(h)?m.filter(g=>g!==h):[])}function u(){const{toastContent:h,toastProps:m,staleId:g}=s.queue.shift();d(h,m,g)}function f(h,m){let{delay:g,staleId:p,...O}=m;if(!sO(h)||function(D){return!i.current||s.props.enableMultiContainer&&D.containerId!==s.props.containerId||o.has(D.toastId)&&D.updateId==null}(O))return;const{toastId:w,updateId:v,data:b}=O,{props:y}=s,x=()=>c(w),_=v==null;_&&s.count++;const E={toastId:w,updateId:v,data:b,containerId:O.containerId,isLoading:O.isLoading,theme:O.theme||y.theme,icon:O.icon!=null?O.icon:y.icon,isIn:!1,key:O.key||s.toastKey++,type:O.type,closeToast:x,closeButton:O.closeButton,rtl:y.rtl,position:O.position||y.position,transition:O.transition||y.transition,className:Eh(O.className||y.toastClassName),bodyClassName:Eh(O.bodyClassName||y.bodyClassName),style:O.style||y.toastStyle,bodyStyle:O.bodyStyle||y.bodyStyle,onClick:O.onClick||y.onClick,pauseOnHover:yu(O.pauseOnHover)?O.pauseOnHover:y.pauseOnHover,pauseOnFocusLoss:yu(O.pauseOnFocusLoss)?O.pauseOnFocusLoss:y.pauseOnFocusLoss,draggable:yu(O.draggable)?O.draggable:y.draggable,draggablePercent:O.draggablePercent||y.draggablePercent,draggableDirection:O.draggableDirection||y.draggableDirection,closeOnClick:yu(O.closeOnClick)?O.closeOnClick:y.closeOnClick,progressClassName:Eh(O.progressClassName||y.progressClassName),progressStyle:O.progressStyle||y.progressStyle,autoClose:!O.isLoading&&(A=O.autoClose,I=y.autoClose,A===!1||Ou(A)&&A>0?A:I),hideProgressBar:yu(O.hideProgressBar)?O.hideProgressBar:y.hideProgressBar,progress:O.progress,role:O.role||y.role,deleteToast(){const D=jw(o.get(w),"removed");o.delete(w),qr.emit(4,D);const j=s.queue.length;if(s.count=aO(w)?s.count-1:s.count-s.displayedToast,s.count<0&&(s.count=0),j>0){const R=aO(w)?1:s.props.limit;if(j===1||R===1)s.displayedToast++,u();else{const B=R>j?j:R;s.displayedToast=B;for(let X=0;X<B;X++)u()}}else e()}};var A,I;E.iconOut=function(D){let{theme:j,type:R,isLoading:B,icon:X}=D,V=null;const K={theme:j,type:R};return X===!1||(nr(X)?V=X(K):k.isValidElement(X)?V=k.cloneElement(X,K):vs(X)||Ou(X)?V=X:B?V=lO.spinner():(ne=>ne in lO)(R)&&(V=lO[R](K))),V}(E),nr(O.onOpen)&&(E.onOpen=O.onOpen),nr(O.onClose)&&(E.onClose=O.onClose),E.closeButton=y.closeButton,O.closeButton===!1||sO(O.closeButton)?E.closeButton=O.closeButton:O.closeButton===!0&&(E.closeButton=!sO(y.closeButton)||y.closeButton);let Q=h;k.isValidElement(h)&&!vs(h.type)?Q=k.cloneElement(h,{closeToast:x,toastProps:E,data:b}):nr(h)&&(Q=h({closeToast:x,toastProps:E,data:b})),y.limit&&y.limit>0&&s.count>y.limit&&_?s.queue.push({toastContent:Q,toastProps:E,staleId:p}):Ou(g)?setTimeout(()=>{d(Q,E,p)},g):d(Q,E,p)}function d(h,m,g){const{toastId:p}=m;g&&o.delete(g);const O={content:h,props:m};o.set(p,O),r(w=>[...w,p].filter(v=>v!==g)),qr.emit(4,jw(O,O.props.updateId==null?"added":"updated"))}return k.useEffect(()=>(s.containerId=t.containerId,qr.cancelEmit(3).on(0,f).on(1,h=>i.current&&c(h)).on(5,l).emit(2,s),()=>qr.emit(3,s)),[]),k.useEffect(()=>{s.props=t,s.isToastActive=a,s.displayedToast=n.length}),{getToastToRender:function(h){const m=new Map,g=Array.from(o.values());return t.newestOnTop&&g.reverse(),g.forEach(p=>{const{position:O}=p.props;m.has(O)||m.set(O,[]),m.get(O).push(p)}),Array.from(m,p=>h(p[0],p[1]))},containerRef:i,isToastActive:a}}function Nw(t){return t.targetTouches&&t.targetTouches.length>=1?t.targetTouches[0].clientX:t.clientX}function Rw(t){return t.targetTouches&&t.targetTouches.length>=1?t.targetTouches[0].clientY:t.clientY}function ere(t){const[e,n]=k.useState(!1),[r,i]=k.useState(!1),o=k.useRef(null),a=k.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,s=k.useRef(t),{autoClose:l,pauseOnHover:c,closeToast:u,onClick:f,closeOnClick:d}=t;function h(b){if(t.draggable){a.didMove=!1,document.addEventListener("mousemove",O),document.addEventListener("mouseup",w),document.addEventListener("touchmove",O),document.addEventListener("touchend",w);const y=o.current;a.canCloseOnClick=!0,a.canDrag=!0,a.boundingRect=y.getBoundingClientRect(),y.style.transition="",a.x=Nw(b.nativeEvent),a.y=Rw(b.nativeEvent),t.draggableDirection==="x"?(a.start=a.x,a.removalDistance=y.offsetWidth*(t.draggablePercent/100)):(a.start=a.y,a.removalDistance=y.offsetHeight*(t.draggablePercent===80?1.5*t.draggablePercent:t.draggablePercent/100))}}function m(){if(a.boundingRect){const{top:b,bottom:y,left:x,right:_}=a.boundingRect;t.pauseOnHover&&a.x>=x&&a.x<=_&&a.y>=b&&a.y<=y?p():g()}}function g(){n(!0)}function p(){n(!1)}function O(b){const y=o.current;a.canDrag&&y&&(a.didMove=!0,e&&p(),a.x=Nw(b),a.y=Rw(b),a.delta=t.draggableDirection==="x"?a.x-a.start:a.y-a.start,a.start!==a.x&&(a.canCloseOnClick=!1),y.style.transform="translate"+t.draggableDirection+"("+a.delta+"px)",y.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function w(){document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",w),document.removeEventListener("touchmove",O),document.removeEventListener("touchend",w);const b=o.current;if(a.canDrag&&a.didMove&&b){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return i(!0),void t.closeToast();b.style.transition="transform 0.2s, opacity 0.2s",b.style.transform="translate"+t.draggableDirection+"(0)",b.style.opacity="1"}}k.useEffect(()=>{s.current=t}),k.useEffect(()=>(o.current&&o.current.addEventListener("d",g,{once:!0}),nr(t.onOpen)&&t.onOpen(k.isValidElement(t.children)&&t.children.props),()=>{const b=s.current;nr(b.onClose)&&b.onClose(k.isValidElement(b.children)&&b.children.props)}),[]),k.useEffect(()=>(t.pauseOnFocusLoss&&(document.hasFocus()||p(),window.addEventListener("focus",g),window.addEventListener("blur",p)),()=>{t.pauseOnFocusLoss&&(window.removeEventListener("focus",g),window.removeEventListener("blur",p))}),[t.pauseOnFocusLoss]);const v={onMouseDown:h,onTouchStart:h,onMouseUp:m,onTouchEnd:m};return l&&c&&(v.onMouseEnter=p,v.onMouseLeave=g),d&&(v.onClick=b=>{f&&f(b),a.canCloseOnClick&&u()}),{playToast:g,pauseToast:p,isRunning:e,preventExitTransition:r,toastRef:o,eventHandlers:v}}function Bw(t){let{closeToast:e,theme:n,ariaLabel:r="close"}=t;return k.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:i=>{i.stopPropagation(),e(i)},"aria-label":r},k.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},k.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Zw(t){let{delay:e,isRunning:n,closeToast:r,type:i,hide:o,className:a,style:s,controlledProgress:l,progress:c,rtl:u,isIn:f,theme:d}=t;const h={...s,animationDuration:e+"ms",animationPlayState:n?"running":"paused",opacity:o?0:1};l&&(h.transform="scaleX("+c+")");const m=Pa("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+d,"Toastify__progress-bar--"+i,{"Toastify__progress-bar--rtl":u}),g=nr(a)?a({rtl:u,type:i,defaultClassName:m}):Pa(m,a);return k.createElement("div",{role:"progressbar","aria-hidden":o?"true":"false","aria-label":"notification timer",className:g,style:h,[l&&c>=1?"onTransitionEnd":"onAnimationEnd"]:l&&c<1?null:()=>{f&&r()}})}Zw.defaultProps={type:Lo.DEFAULT,hide:!1};const tre=t=>{const{isRunning:e,preventExitTransition:n,toastRef:r,eventHandlers:i}=ere(t),{closeButton:o,children:a,autoClose:s,onClick:l,type:c,hideProgressBar:u,closeToast:f,transition:d,position:h,className:m,style:g,bodyClassName:p,bodyStyle:O,progressClassName:w,progressStyle:v,updateId:b,role:y,progress:x,rtl:_,toastId:E,deleteToast:A,isIn:I,isLoading:Q,iconOut:D,theme:j}=t,R=Pa("Toastify__toast","Toastify__toast-theme--"+j,"Toastify__toast--"+c,{"Toastify__toast--rtl":_}),B=nr(m)?m({rtl:_,position:h,type:c,defaultClassName:R}):Pa(R,m),X=!!x,V={closeToast:f,type:c,theme:j};let K=null;return o===!1||(K=nr(o)?o(V):k.isValidElement(o)?k.cloneElement(o,V):Bw(V)),k.createElement(d,{isIn:I,done:A,position:h,preventExitTransition:n,nodeRef:r},k.createElement("div",{id:E,onClick:l,className:B,...i,style:g,ref:r},k.createElement("div",{...I&&{role:y},className:nr(p)?p({type:c}):Pa("Toastify__toast-body",p),style:O},D!=null&&k.createElement("div",{className:Pa("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!Q})},D),k.createElement("div",null,a)),K,(s||X)&&k.createElement(Zw,{...b&&!X?{key:"pb-"+b}:{},rtl:_,theme:j,delay:s,isRunning:e,isIn:I,closeToast:f,hide:u,type:c,style:v,className:w,controlledProgress:X,progress:x})))},nre=Iw({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),rre=Iw({enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0}),cO=k.forwardRef((t,e)=>{const{getToastToRender:n,containerRef:r,isToastActive:i}=Jne(t),{className:o,style:a,rtl:s,containerId:l}=t;function c(u){const f=Pa("Toastify__toast-container","Toastify__toast-container--"+u,{"Toastify__toast-container--rtl":s});return nr(o)?o({position:u,rtl:s,defaultClassName:f}):Pa(f,Eh(o))}return k.useEffect(()=>{e&&(e.current=r.current)},[]),k.createElement("div",{ref:r,className:"Toastify",id:l},n((u,f)=>{const d=f.length?{...a}:{...a,pointerEvents:"none"};return k.createElement("div",{className:c(u),style:d,key:"container-"+u},f.map((h,m)=>{let{content:g,props:p}=h;return k.createElement(tre,{...p,isIn:i(p.toastId),style:{...p.style,"--nth":m+1,"--len":f.length},key:"toast-"+p.key},g)}))}))});cO.displayName="ToastContainer",cO.defaultProps={position:Lw.TOP_RIGHT,transition:nre,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:Bw,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let uO,Dl=new Map,fO=[];function zw(){return Math.random().toString(36).substring(2,9)}function ire(t){return t&&(vs(t.toastId)||Ou(t.toastId))?t.toastId:zw()}function vu(t,e){return Dl.size>0?qr.emit(0,t,e):fO.push({content:t,options:e}),e.toastId}function Ah(t,e){return{...e,type:e&&e.type||t,toastId:ire(e)}}function Mh(t){return(e,n)=>vu(e,Ah(t,n))}function dt(t,e){return vu(t,Ah(Lo.DEFAULT,e))}dt.loading=(t,e)=>vu(t,Ah(Lo.DEFAULT,{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),dt.promise=function(t,e,n){let r,{pending:i,error:o,success:a}=e;i&&(r=vs(i)?dt.loading(i,n):dt.loading(i.render,{...n,...i}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null,delay:100},l=(u,f,d)=>{if(f==null)return void dt.dismiss(r);const h={type:u,...s,...n,data:d},m=vs(f)?{render:f}:f;return r?dt.update(r,{...h,...m}):dt(m.render,{...h,...m}),d},c=nr(t)?t():t;return c.then(u=>l("success",a,u)).catch(u=>l("error",o,u)),c},dt.success=Mh(Lo.SUCCESS),dt.info=Mh(Lo.INFO),dt.error=Mh(Lo.ERROR),dt.warning=Mh(Lo.WARNING),dt.warn=dt.warning,dt.dark=(t,e)=>vu(t,Ah(Lo.DEFAULT,{theme:"dark",...e})),dt.dismiss=t=>qr.emit(1,t),dt.clearWaitingQueue=function(t){return t===void 0&&(t={}),qr.emit(5,t)},dt.isActive=t=>{let e=!1;return Dl.forEach(n=>{n.isToastActive&&n.isToastActive(t)&&(e=!0)}),e},dt.update=function(t,e){e===void 0&&(e={}),setTimeout(()=>{const n=function(r,i){let{containerId:o}=i;const a=Dl.get(o||uO);return a?a.getToast(r):null}(t,e);if(n){const{props:r,content:i}=n,o={...r,...e,toastId:e.toastId||t,updateId:zw()};o.toastId!==t&&(o.staleId=t);const a=o.render||i;delete o.render,vu(a,o)}},0)},dt.done=t=>{dt.update(t,{progress:1})},dt.onChange=t=>(qr.on(4,t),()=>{qr.off(4,t)}),dt.POSITION=Lw,dt.TYPE=Lo,qr.on(2,t=>{uO=t.containerId||t,Dl.set(uO,t),fO.forEach(e=>{qr.emit(0,e.content,e.options)}),fO=[]}).on(3,t=>{Dl.delete(t.containerId||t),Dl.size===0&&qr.off(0).off(1).off(5)});const Xw=()=>{const[t,e]=k.useState(window.innerWidth<=992),n=({closeToast:r})=>N.jsx("button",{className:"closeToast",onClick:r,children:N.jsx(kt,{name:"close",color:"gray-00"})});return k.useEffect(()=>{const r=()=>{e(window.innerWidth<=992)};return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),N.jsx(cO,{autoClose:!1,className:"toaster",toastClassName:"toaster_item",bodyClassName:"bodyToast",closeButton:n,icon:!1,transition:rre,position:t?"bottom-right":"top-right"})};Xw.prototype={avocado:"Toaster"};const ore=()=>{const[t,e]=k.useState(!1);return k.useEffect(()=>{const n=window.matchMedia("(max-width: 992px)");e(n.matches);const r=i=>e(i.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),{isMobile:t}},Vw=({row:t,selectorType:e,isDisabled:n,isSelected:r,onSelect:i})=>e?e==="checkbox"?N.jsx(_d,{disabled:n,checked:r,onChange:o=>{var a;return i==null?void 0:i((a=o==null?void 0:o.target)==null?void 0:a.checked,t)}}):N.jsx(nne,{disabled:n,checked:r,onChange:o=>{var a;return i==null?void 0:i((a=o==null?void 0:o.target)==null?void 0:a.checked,t)}}):null,are="_tableActionItem_gekem_1",sre="_tableActionItem__mobile_gekem_7",lre="_tableActionItem__clickable_gekem_10",cre="_tableActionItem__disabledItem_gekem_17",ure="_tableActionItem__disabledRow_gekem_21",fre="_tableActionItem_button_gekem_24",$l={tableActionItem:are,tableActionItem__mobile:sre,tableActionItem__clickable:lre,tableActionItem__disabledItem:cre,tableActionItem__disabledRow:ure,tableActionItem_button:fre},Fw=({action:t,row:e,isDisabled:n,isMobile:r})=>{var i,o,a;return N.jsxs("div",{className:Ce($l.tableActionItem,!!(t!=null&&t.onClick)&&$l.tableActionItem__clickable,!!((i=t==null?void 0:t.isDisabled)!=null&&i.call(t,e))&&$l.tableActionItem__disabledItem,n&&$l.tableActionItem__disabledRow,r&&$l.tableActionItem__mobile),children:[!!(t!=null&&t.icon)&&N.jsx("button",{className:$l.tableActionItem_button,disabled:n||((o=t==null?void 0:t.isDisabled)==null?void 0:o.call(t,e)),onClick:()=>{var s;return!n&&((s=t==null?void 0:t.onClick)==null?void 0:s.call(t,e))},children:N.jsx(kt,{name:(a=t==null?void 0:t.icon)==null?void 0:a.call(t,e),color:"neutral-70"})}),!(t!=null&&t.icon)&&t!=null&&t.renderContent?t==null?void 0:t.renderContent(e,!!n):null]})},dre="_bodyRow_1il29_1",hre="_bodyRow_column_1il29_1",pre="_bodyRow__selected_1il29_10",mre="_bodyRow__disabled_1il29_13",gre="_columnContent_1il29_19",Ore="_bodyRow__adaptable_1il29_23",yre="_columnContent_text_1il29_23",vre="_bodyRow__relaxed_1il29_27",bre="_actions_item_1il29_28",wre="_bodyRow_column__select_1il29_29",xre="_actions_1il29_28",_re="_bodyRow__condensed_1il29_38",Sre="_bodyRow_column__actions_1il29_67",kre="_actions_item__expand_1il29_77",Cre="_actions_item__open_1il29_84",Pre="_actionButton_1il29_87",Ere="_actionButton__clickable_1il29_91",Tre="_actionButton__disabled_1il29_97",Are="_bodyExpandedRow_content_1il29_102",Vt={bodyRow:dre,bodyRow_column:hre,bodyRow__selected:pre,bodyRow__disabled:mre,columnContent:gre,bodyRow__adaptable:Ore,columnContent_text:yre,bodyRow__relaxed:vre,actions_item:bre,bodyRow_column__select:wre,actions:xre,bodyRow__condensed:_re,bodyRow_column__actions:Sre,actions_item__expand:kre,actions_item__open:Cre,actionButton:Pre,actionButton__clickable:Ere,actionButton__disabled:Tre,bodyExpandedRow_content:Are},Mre=({row:t,columns:e=[],rightActions:n,isDisabled:r,isSelectorDisabled:i,isSelected:o,selectorType:a,variant:s="regular",isTextAdaptable:l,onRowSelect:c,renderCustomContent:u})=>{const[f,d]=k.useState(!1);return N.jsxs(N.Fragment,{children:[N.jsxs("tr",{className:Ce(Vt.bodyRow,Vt==null?void 0:Vt[`bodyRow__${s}`],l&&Vt.bodyRow__adaptable,o&&Vt.bodyRow__selected,r&&Vt.bodyRow__disabled),children:[!!a&&N.jsx("td",{className:Ce(Vt.bodyRow_column,Vt.bodyRow_column__select),children:N.jsx("div",{className:Vt.columnContent,children:N.jsx(Vw,{row:t,selectorType:a,isDisabled:r||i,isSelected:o,onSelect:c})})}),e.map((h,m)=>{var g,p,O;return N.jsx("td",{className:Ce(Vt.bodyRow_column,(g=h==null?void 0:h.desktopOptions)==null?void 0:g.bodyCellClassName),style:(p=h==null?void 0:h.desktopOptions)==null?void 0:p.bodyCellStyles,children:N.jsx("div",{className:Vt.columnContent,children:h!=null&&h.renderCell?(O=h==null?void 0:h.renderCell)==null?void 0:O.call(h,t):!!(h!=null&&h.accessor)&&N.jsx(So,{className:Vt.columnContent_text,children:String(t[h==null?void 0:h.accessor])})})},`column-${m}-${h==null?void 0:h.key}`)}),(!!u||!!(n!=null&&n.length))&&N.jsx("td",{className:Ce(Vt.bodyRow_column,Vt.bodyRow_column__actions),children:N.jsxs("div",{className:Ce(Vt.columnContent,Vt.actions),children:[n==null?void 0:n.map((h,m)=>!(h!=null&&h.shouldRender)||h!=null&&h.shouldRender(t)?N.jsx(Fw,{action:h,row:t,isDisabled:r},m):null),!!u&&N.jsx(nh,{className:Ce(Vt.actions_item,Vt.actions_item__expand,f&&Vt.actions_item__open),icon:"chevron-down",variant:"ghost",size:"sm",disabled:r,onClick:()=>d(!f)})]})})]}),f&&!!u&&N.jsx("tr",{className:Vt.bodyExpandedRow,children:N.jsx("td",{className:Vt.bodyExpandedRow_content,colSpan:6,children:u(t)})})]})},Qre="_tableDesktopHead_1wp11_1",Dre="_tableDesktopHead__relaxed_1wp11_1",$re="_headRow_column_1wp11_1",Lre="_headRow_column__select_1wp11_2",Ire="_tableDesktopHead__condensed_1wp11_6",jre="_headRow_1wp11_1",Nre="_columnContent_1wp11_23",Rre="_columnContent_text_1wp11_29",Bre="_columnContent_sortButton_1wp11_32",Zre="_sortIcon_1wp11_38",zre="_sortIcon__asc_1wp11_41",br={tableDesktopHead:Qre,tableDesktopHead__relaxed:Dre,headRow_column:$re,headRow_column__select:Lre,tableDesktopHead__condensed:Ire,headRow:jre,columnContent:Nre,columnContent_text:Rre,columnContent_sortButton:Bre,sortIcon:Zre,sortIcon__asc:zre},Xre=({rowOptions:t,columns:e,variant:n="regular",initialSort:r,hasActions:i,isSelectorDisabled:o,onSortChange:a})=>{const[s,l]=k.useState({column:(r==null?void 0:r.column)||null,direction:(r==null?void 0:r.direction)||null}),c=u=>{if(!u)return;const f=(s==null?void 0:s.column)===u,d={column:u,direction:f&&s.direction==="asc"?"desc":"asc"};l(d),a==null||a(d)};return N.jsx("thead",{className:Ce(br.tableDesktopHead,br==null?void 0:br[`tableDesktopHead__${n}`]),children:N.jsxs("tr",{className:br.headRow,children:[!!(t!=null&&t.selectorType)&&N.jsx("th",{className:Ce(br.headRow_column,br.headRow_column__select),children:(t==null?void 0:t.selectorType)==="checkbox"&&N.jsx(_d,{disabled:o,checked:t==null?void 0:t.isAllSelected,onChange:u=>{var f,d;return(d=t==null?void 0:t.onSelectAll)==null?void 0:d.call(t,(f=u==null?void 0:u.target)==null?void 0:f.checked)}})}),e==null?void 0:e.map((u,f)=>{var d,h;return N.jsx("th",{className:Ce(br.headRow_column,(d=u==null?void 0:u.desktopOptions)==null?void 0:d.headCellClassName),style:(h=u==null?void 0:u.desktopOptions)==null?void 0:h.headCellStyles,children:N.jsxs("div",{className:br.columnContent,children:[(u==null?void 0:u.isSortable)&&N.jsx("button",{"aria-label":"sort",className:br.columnContent_sortButton,onClick:()=>(u==null?void 0:u.isSortable)&&c(u==null?void 0:u.key),children:N.jsx(kt,{className:Ce(br.sortIcon,(u==null?void 0:u.key)&&(s==null?void 0:s.direction)==="asc"&&(s==null?void 0:s.column)===(u==null?void 0:u.key)&&br.sortIcon__asc),name:"arrow-down",color:"neutral-70"})}),typeof(u==null?void 0:u.header)=="string"?N.jsx(da,{className:br.columnContent_text,type:"h4",children:u==null?void 0:u.header}):u==null?void 0:u.header]})},`head-column-${f}-${u==null?void 0:u.key}`)}),(!!(t!=null&&t.renderCustomContent)||!!i)&&N.jsx("th",{className:br.headRow_column})]})})},Vre="_tableDesktop_2qx8i_1",Fre="_tableDesktop_component_2qx8i_23",Yw={tableDesktop:Vre,tableDesktop_component:Fre},Yre=({className:t,data:e=[],columns:n=[],rightActions:r=[],rowOptions:i,desktopVariant:o="regular",initialSort:a,onSortChange:s})=>N.jsx("div",{className:Yw.tableDesktop,children:N.jsxs("table",{className:Ce(Yw.tableDesktop_component,t&&t),children:[N.jsx(Xre,{columns:n,rowOptions:i,variant:o,initialSort:a,isSelectorDisabled:i==null?void 0:i.isHeadSelectorDisabled,hasActions:!!r.length,onSortChange:s}),N.jsx("tbody",{children:e.map((l,c)=>{var u,f,d;return N.jsx(Mre,{row:l,columns:n,rightActions:r,variant:o,selectorType:i==null?void 0:i.selectorType,isSelected:(u=i==null?void 0:i.isSelected)==null?void 0:u.call(i,l),isDisabled:(f=i==null?void 0:i.isDisabled)==null?void 0:f.call(i,l),isSelectorDisabled:(d=i==null?void 0:i.isSelectorDisabled)==null?void 0:d.call(i,l),isTextAdaptable:i==null?void 0:i.isTextAdaptable,renderCustomContent:i==null?void 0:i.renderCustomContent,onRowSelect:i==null?void 0:i.onRowSelect},`row-${c}`)})})]})}),qre="_tableMobileRow_1rfpl_1",Wre="_tableMobileRow__selected_1rfpl_5",Ure="_tableMobileRow__disabled_1rfpl_8",Hre="_tableMobileRow_head_1rfpl_11",Gre="_headSelect_1rfpl_21",Kre="_headActions_1rfpl_25",Jre="_headActions_item_1rfpl_30",eie="_actionButton_1rfpl_30",tie="_actionButton__disabled_1rfpl_38",nie="_tableMobileRow_body_1rfpl_41",rie="_bodyContentTrigger_1rfpl_44",iie="_bodyContentTrigger_button_1rfpl_50",oie="_bodyContentTrigger_button__open_1rfpl_59",aie="_bodyContentTrigger_button__disabled_1rfpl_62",sie="_bodyColumn_1rfpl_65",lie="_bodyColumn__custom_1rfpl_71",cie="_bodyColumn_title_1rfpl_74",uie="_bodyColumn_text_1rfpl_74",fie="_bodyContent_1rfpl_44",die="_bodyContent_separator_1rfpl_94",on={tableMobileRow:qre,tableMobileRow__selected:Wre,tableMobileRow__disabled:Ure,tableMobileRow_head:Hre,headSelect:Gre,headActions:Kre,headActions_item:Jre,actionButton:eie,actionButton__disabled:tie,tableMobileRow_body:nie,bodyContentTrigger:rie,bodyContentTrigger_button:iie,bodyContentTrigger_button__open:oie,bodyContentTrigger_button__disabled:aie,bodyColumn:sie,bodyColumn__custom:lie,bodyColumn_title:cie,bodyColumn_text:uie,bodyContent:fie,bodyContent_separator:die},qw=({column:t,row:e})=>t?N.jsxs(N.Fragment,{children:[N.jsx(So,{className:on.bodyColumn_title,type:"sm",weight:"medium",children:t==null?void 0:t.header}),t!=null&&t.renderCell?t==null?void 0:t.renderCell(e):N.jsx(So,{className:on.bodyColumn_text,type:"sm",children:t!=null&&t.accessor?String(e==null?void 0:e[t==null?void 0:t.accessor]):""})]}):null,hie=({columns:t=[],row:e,isDisabled:n,isSelectorDisabled:r,isSelected:i,selectorType:o,actions:a=[],onRowSelect:s,renderCustomContent:l})=>{var c,u;const[f,d]=k.useState(!1),h=k.useMemo(()=>{const g=[...t];return{first:g.shift(),columns:g}},[t]),m=k.useMemo(()=>a==null?void 0:a.some(g=>!(g!=null&&g.shouldRender)||(g==null?void 0:g.shouldRender(e))),[a,e]);return N.jsxs("div",{className:Ce(on.tableMobileRow,n&&on.tableMobileRow__disabled,i&&on.tableMobileRow__selected),children:[(!!o||m)&&N.jsxs("div",{className:on.tableMobileRow_head,children:[N.jsx("div",{className:on.headSelect,children:N.jsx(Vw,{row:e,selectorType:o,isDisabled:n||r,isSelected:i,onSelect:s})}),N.jsx("div",{className:on.headActions,children:a==null?void 0:a.map((g,p)=>!(g!=null&&g.shouldRender)||g!=null&&g.shouldRender(e)?N.jsx(Fw,{action:g,row:e,isDisabled:n,isMobile:!0},p):null)})]}),N.jsxs("div",{className:on.tableMobileRow_body,children:[N.jsxs("div",{className:on.bodyContentTrigger,children:[N.jsx("div",{className:on.bodyColumn,children:qw({column:h.first,row:e})}),N.jsx("button",{disabled:n,className:Ce(on.bodyContentTrigger_button,f&&on.bodyContentTrigger_button__open,n&&on.bodyContentTrigger_button__disabled),onClick:()=>!n&&d(!f),children:N.jsx(kt,{name:"chevron-down",size:"lg"})})]}),N.jsxs("div",{className:on.bodyContent,style:{maxHeight:f?`${(Math.floor(((c=h==null?void 0:h.columns)==null?void 0:c.length)/2)+1)*100}px`:0},children:[N.jsx("div",{className:on.bodyContent_separator}),(u=h==null?void 0:h.columns)==null?void 0:u.map((g,p)=>N.jsx("div",{className:on.bodyColumn,children:qw({column:g,row:e})},p)),!!l&&N.jsx("div",{className:Ce(on.bodyColumn,on.bodyColumn__custom),children:l(e)})]})]})]})},pie="_tableMobile_1iao8_1",mie={tableMobile:pie},gie=({className:t,data:e=[],columns:n=[],rightActions:r,rowOptions:i})=>N.jsx("div",{className:Ce(mie.tableMobile,t&&t),children:e==null?void 0:e.map((o,a)=>{var s,l,c;return N.jsx(hie,{row:o,columns:n,actions:r,isDisabled:(s=i==null?void 0:i.isDisabled)==null?void 0:s.call(i,o),isSelected:(l=i==null?void 0:i.isSelected)==null?void 0:l.call(i,o),isSelectorDisabled:(c=i==null?void 0:i.isSelectorDisabled)==null?void 0:c.call(i,o),selectorType:i==null?void 0:i.selectorType,onRowSelect:i==null?void 0:i.onRowSelect,renderCustomContent:i==null?void 0:i.renderCustomContent},a)})}),Oie=({notResponsive:t=!1,...e})=>{const{isMobile:n}=ore(),r=n&&!t?gie:Yre;return N.jsx(r,{...e})},yie="_drawer_ik185_1",vie="_drawer__leftOrigin_ik185_9",bie="_drawer_content_ik185_9",wie="_drawer__closing_ik185_15",xie="_drawer_backdrop_ik185_18",_ie="_drawerHeader_main_ik185_44",Sie="_headerTitle_ik185_54",kie="_headerControls_ik185_59",Cie="_headerControls_close_ik185_64",Pie="_body_ik185_73",Eie="_footer_ik185_78",Tie="_drawer__show_ik185_85",wr={drawer:yie,drawer__leftOrigin:vie,drawer_content:bie,drawer__closing:wie,drawer_backdrop:xie,drawerHeader_main:_ie,headerTitle:Sie,headerControls:kie,headerControls_close:Cie,body:Pie,footer:Eie,drawer__show:Tie},Aie=({isOpen:t,children:e,title:n,footer:r,header:i,headerExtra:o,closeOnOverlayClick:a=!1,heightGap:s=50,origin:l="right",className:c,contentClassName:u,onClose:f})=>{const[d,h]=k.useState(t),[m,g]=k.useState(t),[p,O]=k.useState(!1),w=k.useRef(null),v=k.useRef(!1),b=k.useCallback(()=>{w.current&&(clearTimeout(w.current),w.current=null),v.current=!1},[]),y=k.useCallback(()=>{b(),h(!0),O(!1),v.current=!0,w.current=setTimeout(()=>{g(!0),v.current=!1},30)},[]),x=k.useCallback(()=>{p||!m||v.current||(b(),O(!0),g(!1))},[p,m]),_=k.useCallback(I=>{I===m&&!p&&!v.current||(I?y():x())},[x,m,p,v]),E=k.useCallback(()=>{p&&!m&&(O(!1),h(!1),f==null||f())},[p,m,f]);if(k.useEffect(()=>{v.current||_(t)},[t]),k.useEffect(()=>()=>{b()},[]),!d)return null;const A=!!n||!!i||!!o;return N.jsxs("section",{className:Ce(wr.drawer,wr[`drawer__${l}Origin`],c,m&&wr.drawer__show,p&&wr.drawer__closing),style:{top:`${s}px`},children:[N.jsx("div",{className:wr.drawer_backdrop,role:"button","aria-label":"Drawer backdrop",onClick:I=>{I==null||I.stopPropagation(),a&&x()}}),N.jsxs("div",{className:Ce(wr.drawer_content,u),"aria-label":"Drawer content",onTransitionEnd:()=>p&&!m&&E(),children:[A&&N.jsxs("header",{className:wr.drawerHeader,children:[N.jsxs("div",{className:wr.drawerHeader_main,children:[N.jsx("div",{className:wr.headerTitle,children:n}),N.jsxs("div",{className:wr.headerControls,children:[i,N.jsx(nh,{className:wr.headerControls_close,icon:"close",variant:"ghost",onClick:x})]})]}),o&&o]}),N.jsx("section",{className:wr.body,children:e}),r&&N.jsx("footer",{className:wr.footer,children:r})]})]})},Ww=t=>{if(!(t!=null&&t.content))return null;const e={...t,children:t.content,type:t.variant};return F.jsx(da,{...e})},Uw=t=>{if(!t)return null;const e={...t,children:t.content};return F.jsx(So,{...e})},Hw={body:"_body_14tsv_1",body_content:"_body_content_14tsv_5"},Mie=({inputs:t})=>F.jsx("section",{className:Hw.body,children:F.jsx("div",{className:Hw.body_content,children:t.map((e,n)=>F.jsx(k.Fragment,{children:e},n))})});var Qie={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Gw=t=>{let e;const n=new Set,r=(u,f)=>{const d=typeof u=="function"?u(e):u;if(!Object.is(d,e)){const h=e;e=f??(typeof d!="object"||d===null)?d:Object.assign({},e,d),n.forEach(m=>m(e,h))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(Qie?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=e=t(r,i,l);return l},Die=t=>t?Gw(t):Gw;var Kw={exports:{}},dO={},hO={exports:{}},pO={};/**
685
+ `,gw="/",Ow="*",ys="",Mte="comment",Qte="declaration",Dte=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function i(m){var g=m.match(_te);g&&(n+=g.length);var p=m.lastIndexOf(Ate);r=~p?m.length-p:r+m.length}function o(){var m={line:n,column:r};return function(g){return g.position=new a(m),c(),g}}function a(m){this.start=m,this.end={line:n,column:r},this.source=e.source}a.prototype.content=t;function s(m){var g=new Error(e.source+":"+n+":"+r+": "+m);if(g.reason=m,g.filename=e.source,g.line=n,g.column=r,g.source=t,!e.silent)throw g}function l(m){var g=m.exec(t);if(g){var p=g[0];return i(p),t=t.slice(p.length),g}}function c(){l(Ste)}function u(m){var g;for(m=m||[];g=f();)g!==!1&&m.push(g);return m}function f(){var m=o();if(!(gw!=t.charAt(0)||Ow!=t.charAt(1))){for(var g=2;ys!=t.charAt(g)&&(Ow!=t.charAt(g)||gw!=t.charAt(g+1));)++g;if(g+=2,ys===t.charAt(g-1))return s("End of comment missing");var p=t.slice(2,g-2);return r+=2,i(p),t=t.slice(g),r+=2,m({type:Mte,comment:p})}}function d(){var m=o(),g=l(kte);if(g){if(f(),!l(Cte))return s("property missing ':'");var p=l(Pte),O=m({type:Qte,property:yw(g[0].replace(mw,ys)),value:p?yw(p[0].replace(mw,ys)):ys});return l(Ete),O}}function h(){var m=[];u(m);for(var g;g=d();)g!==!1&&(m.push(g),u(m));return m}return c(),h()};function yw(t){return t?t.replace(Tte,ys):ys}var $te=Dte;function vw(t,e){var n=null;if(!t||typeof t!="string")return n;for(var r,i=$te(t),o=typeof e=="function",a,s,l=0,c=i.length;l<c;l++)r=i[l],a=r.property,s=r.value,o?e(a,s,r):s&&(n||(n={}),n[a]=s);return n}rO.exports=vw,rO.exports.default=vw;var Lte=rO.exports;const Ite=as(Lte),iO={}.hasOwnProperty,jte=new Set(["table","thead","tbody","tfoot","tr"]);function bw(t,e){const n=[];let r=-1,i;for(;++r<e.children.length;)i=e.children[r],i.type==="element"?n.push(Nte(t,i,r,e)):i.type==="text"?(e.type!=="element"||!jte.has(e.tagName)||!bte(i))&&n.push(i.value):i.type==="raw"&&!t.options.skipHtml&&n.push(i.value);return n}function Nte(t,e,n,r){const i=t.options,o=i.transformLinkUri===void 0?AG:i.transformLinkUri,a=t.schema,s=e.tagName,l={};let c=a,u;if(a.space==="html"&&s==="svg"&&(c=mte,t.schema=c),e.properties)for(u in e.properties)iO.call(e.properties,u)&&Bte(l,u,e.properties[u],t);(s==="ol"||s==="ul")&&t.listDepth++;const f=bw(t,e);(s==="ol"||s==="ul")&&t.listDepth--,t.schema=a;const d=e.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},h=i.components&&iO.call(i.components,s)?i.components[s]:s,m=typeof h=="string"||h===k.Fragment;if(!vte.isValidElementType(h))throw new TypeError(`Component for name \`${s}\` not defined or is not renderable`);if(l.key=n,s==="a"&&i.linkTarget&&(l.target=typeof i.linkTarget=="function"?i.linkTarget(String(l.href||""),e.children,typeof l.title=="string"?l.title:null):i.linkTarget),s==="a"&&o&&(l.href=o(String(l.href||""),e.children,typeof l.title=="string"?l.title:null)),!m&&s==="code"&&r.type==="element"&&r.tagName!=="pre"&&(l.inline=!0),!m&&(s==="h1"||s==="h2"||s==="h3"||s==="h4"||s==="h5"||s==="h6")&&(l.level=Number.parseInt(s.charAt(1),10)),s==="img"&&i.transformImageUri&&(l.src=i.transformImageUri(String(l.src||""),String(l.alt||""),typeof l.title=="string"?l.title:null)),!m&&s==="li"&&r.type==="element"){const g=Rte(e);l.checked=g&&g.properties?!!g.properties.checked:null,l.index=oO(r,e),l.ordered=r.tagName==="ol"}return!m&&(s==="ol"||s==="ul")&&(l.ordered=s==="ol",l.depth=t.listDepth),(s==="td"||s==="th")&&(l.align&&(l.style||(l.style={}),l.style.textAlign=l.align,delete l.align),m||(l.isHeader=s==="th")),!m&&s==="tr"&&r.type==="element"&&(l.isHeader=r.tagName==="thead"),i.sourcePos&&(l["data-sourcepos"]=Xte(d)),!m&&i.rawSourcePos&&(l.sourcePosition=e.position),!m&&i.includeElementIndex&&(l.index=oO(r,e),l.siblingCount=oO(r)),m||(l.node=e),f.length>0?k.createElement(h,l,f):k.createElement(h,l)}function Rte(t){let e=-1;for(;++e<t.children.length;){const n=t.children[e];if(n.type==="element"&&n.tagName==="input")return n}return null}function oO(t,e){let n=-1,r=0;for(;++n<t.children.length&&t.children[n]!==e;)t.children[n].type==="element"&&r++;return r}function Bte(t,e,n,r){const i=fte(r.schema,e);let o=n;o==null||o!==o||(Array.isArray(o)&&(o=i.commaSeparated?xte(o):wte(o)),i.property==="style"&&typeof o=="string"&&(o=Zte(o)),i.space&&i.property?t[iO.call(dw,i.property)?dw[i.property]:i.property]=o:i.attribute&&(t[i.attribute]=o))}function Zte(t){const e={};try{Ite(t,n)}catch{}return e;function n(r,i){const o=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;e[o.replace(/-([a-z])/g,zte)]=i}}function zte(t,e){return e.toUpperCase()}function Xte(t){return[t.start.line,":",t.start.column,"-",t.end.line,":",t.end.column].map(String).join("")}const ww={}.hasOwnProperty,Vte="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ph={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function xw(t){for(const o in Ph)if(ww.call(Ph,o)&&ww.call(t,o)){const a=Ph[o];console.warn(`[react-markdown] Warning: please ${a.to?`use \`${a.to}\` instead of`:"remove"} \`${o}\` (see <${Vte}#${a.id}> for more info)`),delete Ph[o]}const e=YG().use(tee).use(t.remarkPlugins||[]).use(Jee,{...t.remarkRehypeOptions,allowDangerousHtml:!0}).use(t.rehypePlugins||[]).use(gte,t),n=new G7;typeof t.children=="string"?n.value=t.children:t.children!==void 0&&t.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${t.children}\`)`);const r=e.runSync(e.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=k.createElement(k.Fragment,{},bw({options:t,schema:pte,listDepth:0},r));return t.className&&(i=k.createElement("div",{className:t.className},i)),i}xw.propTypes={children:Le.string,className:Le.string,allowElement:Le.func,allowedElements:Le.arrayOf(Le.string),disallowedElements:Le.arrayOf(Le.string),unwrapDisallowed:Le.bool,remarkPlugins:Le.arrayOf(Le.oneOfType([Le.object,Le.func,Le.arrayOf(Le.oneOfType([Le.bool,Le.string,Le.object,Le.func,Le.arrayOf(Le.any)]))])),rehypePlugins:Le.arrayOf(Le.oneOfType([Le.object,Le.func,Le.arrayOf(Le.oneOfType([Le.bool,Le.string,Le.object,Le.func,Le.arrayOf(Le.any)]))])),sourcePos:Le.bool,rawSourcePos:Le.bool,skipHtml:Le.bool,includeElementIndex:Le.bool,transformLinkUri:Le.oneOfType([Le.func,Le.bool]),linkTarget:Le.oneOfType([Le.func,Le.string]),transformImageUri:Le.func,components:Le.object};const Fte="_previewerWrapper_e7mb6_1",Yte={previewerWrapper:Fte},qte=({children:t,className:e})=>N.jsx(xw,{className:Ce(Yte.previewerWrapper,e),children:t}),Wte="_radio_9b2ek_1",Ute="_label_9b2ek_5",Hte="_label_left_9b2ek_15",Gte="_label_right_9b2ek_18",Kte="_label_radio_9b2ek_21",Jte="_label_button_9b2ek_27",ene="_label__disabled_9b2ek_75",tne="_radio__darkMode_9b2ek_78",ka={radio:Wte,label:Ute,label_left:Hte,label_right:Gte,label_radio:Kte,label_button:Jte,label__disabled:ene,radio__darkMode:tne},nne=({classNameRadioButton:t="",labelLeft:e="",labelRight:n="",disabled:r=!1,...i})=>{const{className:o,ref:a}=i,s=!!e&&typeof n=="string",l=!!n&&typeof n=="string";e&&n&&console.warn("Use `label` or `labelLeft`, not both.");const{theme:c}=ss();return N.jsx("div",{className:Ce(ka.radio,"container_row","row_align__end",o&&o,(c==null?void 0:c.mode)==="dark"&&ka.radio__darkMode),children:N.jsxs("label",{className:Ce(ka.label,r&&ka.label__disabled),children:[s?N.jsx("span",{className:ka.label_left,children:e}):N.jsx(N.Fragment,{children:e}),N.jsx("input",{...i,className:Ce(ka.label_radio,t&&t),type:"radio",disabled:r,ref:a}),N.jsx("span",{className:ka.label_button}),l?N.jsx("span",{className:ka.label_right,children:n}):N.jsx(N.Fragment,{children:n})]})})};function rne(){var t=k.useRef(!1);return k.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),t}const _w=Symbol("useLazyRef empty value"),ine=t=>{const e=k.useRef(_w);return e.current===_w&&(e.current=t()),e};var one=setTimeout;function ane(t,e){var n=e.useCachedSetTimeout?one:setTimeout;return new Promise(function(r){n(r,t)})}function sne(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.useCachedSetTimeout,r=ane(t,{useCachedSetTimeout:n});function i(o){return r.then(function(){return o})}return i.then=function(){return r.then.apply(r,arguments)},i.catch=Promise.resolve().catch,i}var Sw={};Object.defineProperty(Sw,"__esModule",{value:!0});function lne(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length===2)return Cw(t[0],t[1])||null;var n=t.slice(1).reduce(function(r,i){return Cw(r,i)},t[0]);return n||null}var cne=Sw.default=lne,kw=new WeakMap;function Cw(t,e){if(t&&e){var n=kw.get(t)||new WeakMap;kw.set(t,n);var r=n.get(e)||function(i){Pw(t,i),Pw(e,i)};return n.set(e,r),r}return t||e}function Pw(t,e){typeof t=="function"?t(e):t.current=e}var Ew=t=>({isFirstLoad:!0,options:[],hasMore:!0,isLoading:!1,additional:t.additional}),une=({options:t,defaultOptions:e,additional:n,defaultAdditional:r})=>{const i=e===!0?null:e instanceof Array?e:t;return i?{"":{isFirstLoad:!1,isLoading:!1,options:i,hasMore:!0,additional:r||n}}:{}},fne=10,dne=(t,e,n)=>t-e-fne<n,hne=(t,e)=>[...t,...e],Tw='[react-select-async-paginate] response of "loadOptions" should be an object with "options" prop, which contains array of options.',pne=t=>{if(!t)return!1;const{options:e,hasMore:n}=t;return!(!Array.isArray(e)||typeof n!="boolean"&&typeof n<"u")},mne=t=>{if(!pne(t))throw console.error(Tw,"Received:",t),new Error(Tw);return!0},gne=async(t,e,n,r,i,o)=>{const a=e.current.inputValue,s=!n.current[a],l=s?Ew(e.current):n.current[a];if(l.isLoading||!l.hasMore)return;if(i(f=>({...f,[a]:{...l,isLoading:!0}})),r>0&&t==="input-change"){await sne(r);const f=e.current.inputValue;if(a!==f){i(d=>{if(s){const{[a]:h,...m}=d;return m}return{...d,[a]:{...l,isLoading:!1}}});return}}let c,u=!1;try{const{loadOptions:f}=e.current;c=await f(a,l.options,l.additional)}catch{u=!0}if(u){i(f=>({...f,[a]:{...l,isLoading:!1}}));return}if(mne(c)){const{options:f,hasMore:d}=c,h=c.hasOwnProperty("additional")?c.additional:l.additional;i(m=>({...m,[a]:{...l,options:o(l.options,f,h),hasMore:!!d,isLoading:!1,isFirstLoad:!1,additional:h}}))}},Aw=t=>t+1,One=(t,e=[])=>{const{defaultOptions:n,loadOptionsOnMenuOpen:r=!0,debounceTimeout:i=0,inputValue:o,menuIsOpen:a,filterOption:s=null,reduceOptions:l=hne,shouldLoadMore:c=dne}=t,u=rne(),f=k.useRef(!0),d=k.useRef(t);d.current=t;const h=k.useState(0)[1],m=ine(()=>une(t)),g=k.useCallback(w=>{gne(w,d,m,i,v=>{m.current=v(m.current),u.current&&h(Aw)},l)},[i]),p=k.useCallback(()=>{const w=d.current.inputValue;m.current[w]&&g("menu-scroll")},[g]);k.useEffect(()=>{f.current?f.current=!1:(m.current={},h(Aw)),n===!0&&g("autoload")},e),k.useEffect(()=>{a&&!m.current[o]&&g("input-change")},[o]),k.useEffect(()=>{a&&!m.current[""]&&r&&g("menu-toggle")},[a]);const O=m.current[o]||Ew(t);return{handleScrolledToBottom:p,shouldLoadMore:c,filterOption:s,isLoading:O.isLoading,isFirstLoad:O.isFirstLoad,options:O.options}},yne=(t,e=[])=>{const{inputValue:n,menuIsOpen:r,defaultInputValue:i,defaultMenuIsOpen:o,onInputChange:a,onMenuClose:s,onMenuOpen:l}=t,[c,u]=k.useState(i||""),[f,d]=k.useState(!!o),h=typeof n=="string"?n:c,m=typeof r=="boolean"?r:f,g=k.useCallback((w,v)=>{a&&a(w,v),u(w)},[a]),p=k.useCallback(()=>{s&&s(),d(!1)},[s]),O=k.useCallback(()=>{l&&l(),d(!0)},[l]);return{...One({...t,inputValue:h,menuIsOpen:m},e),inputValue:h,menuIsOpen:m,onInputChange:g,onMenuClose:p,onMenuOpen:O}},vne=300;function bne(t){function e(n){const{selectProps:r,innerRef:i}=n,{handleScrolledToBottom:o,shouldLoadMore:a}=r,s=k.useRef(),l=k.useRef(null),c=k.useCallback(()=>{const d=l.current;if(!d)return!1;const{scrollTop:h,scrollHeight:m,clientHeight:g}=d;return a(m,g,h)},[a]),u=k.useCallback(()=>{c()&&o&&o()},[c,o]),f=k.useCallback(()=>{u(),s.current=setTimeout(f,vne)},[u]);return k.useEffect(()=>(f(),()=>{s.current&&clearTimeout(s.current)}),[]),N.jsx(t,{...n,innerRef:cne(i,l)})}return e}var wne=bne(yh.MenuList),xne=t=>k.useMemo(()=>({MenuList:wne,...t}),[t]),_ne=[],Sne={};function kne(t){function e(n){const{components:r=Sne,selectRef:i=void 0,isLoading:o,cacheUniqs:a=_ne,...s}=n,l=yne(s,a),c=xne(r),u=typeof o=="boolean"?o:l.isLoading;return N.jsx(t,{...n,...l,isLoading:u,components:c,ref:i})}return e}var Cne=kne(R7);const Pne=({className:t="",disabled:e=!1,error:n="",label:r="",placeholder:i="",...o})=>{const{loadOptions:a,value:s,onChange:l}=o,c=n&&typeof n=="string",{uniqueId:u,handleCloseSelect:f}=X7({id:o==null?void 0:o.id});return N.jsxs("div",{className:Ce("select",n&&"select__error",t&&t),children:[r&&N.jsx("label",{className:"select_label",children:r}),N.jsx(Cne,{...o,id:u,className:"reactSelect",classNamePrefix:"reactSelect",isDisabled:e,components:{ClearIndicator:B7,DropdownIndicator:Z7},onMenuClose:f,loadOptions:a,value:s,onChange:l,placeholder:i}),c&&N.jsx(z7,{message:n})]})},Ene="_skeletonBase_1yydk_1",Tne="_skeletonAnimation_1yydk_1",Ane={skeletonBase:Ene,skeletonAnimation:Tne},Mw=({width:t="100%",height:e="100px",radius:n="8px",maxWidth:r="unset",className:i})=>{const o={width:t,height:e,maxWidth:r,borderRadius:n};return N.jsx("div",{style:o,className:Ce(Ane.skeletonBase,i&&i)})},Mne="_switchComponent_c2vpp_1",Qne="_switchComponent_input_c2vpp_5",Dne="_inputCircle_c2vpp_16",$ne="_switchComponent_input__checked_c2vpp_26",Lne="_switchComponent_input__disabled_c2vpp_32",Ine="_inputCircle_icon_c2vpp_48",jne="_switchComponent_label_c2vpp_52",Ca={switchComponent:Mne,switchComponent_input:Qne,inputCircle:Dne,switchComponent_input__checked:$ne,switchComponent_input__disabled:Lne,inputCircle_icon:Ine,switchComponent_label:jne},Nne=({checked:t,className:e,disabled:n,label:r,onChange:i})=>{const o=()=>{i(!t)};return N.jsxs("section",{className:Ce(Ca.switchComponent,e&&e),children:[N.jsx("div",{className:Ce(Ca.switchComponent_input,t&&Ca.switchComponent_input__checked,n&&Ca.switchComponent_input__disabled),onClick:o,children:N.jsx("div",{className:Ca.inputCircle,children:t?N.jsx(kt,{name:"check",size:"sm",className:Ca.inputCircle_icon,color:n?"neutral-50":"neutral-70"}):N.jsx(kt,{name:"close",size:"sm",className:Ca.inputCircle_icon,color:n?"neutral-30":"neutral-70"})})}),r&&N.jsx("span",{className:Ca.switchComponent_label,children:r})]})},Qw=({status:t,size:e="md"})=>{const n={error:"circle-cross",warning:"alert-triangle",blocked:"circle-info",unsaved:"refresh"},r={error:!0,warning:!0,unsaved:!0},i={error:"error-50",warning:"warning-50",unsaved:"info-50"};return N.jsx(kt,{size:e,name:n[t],filled:r[t],color:i[t]})},Rne="_textField_1kcsd_1",Bne="_textField_label_1kcsd_4",Zne="_textField_content_1kcsd_12",zne="_input_1kcsd_17",Xne="_input_field_1kcsd_27",Vne="_input_clearButton_1kcsd_40",Fne="_input__withIcon_1kcsd_59",Yne="_textField_content__error_1kcsd_62",qne="_textField_content__warning_1kcsd_65",Wne="_textField_content__blocked_1kcsd_68",Une="_textField_content__unsaved_1kcsd_71",Hne="_textField_helperText_1kcsd_74",Gne="_textField__darkMode_1kcsd_84",Fi={textField:Rne,textField_label:Bne,textField_content:Zne,input:zne,input_field:Xne,input_clearButton:Vne,input__withIcon:Fne,textField_content__error:Yne,textField_content__warning:qne,textField_content__blocked:Wne,textField_content__unsaved:Une,textField_helperText:Hne,textField__darkMode:Gne},Dw=({className:t,allowClear:e=!1,label:n,status:r,statusDisplay:i="inline",statusText:o="",icon:a,...s})=>{const{theme:l}=ss(),[c,u]=k.useState(s.value||""),f=()=>{u("")},d=h=>{const m=h.currentTarget.value;u(m),s.onChange&&s.onChange(h)};return N.jsxs("section",{className:Ce(Fi.textField,t&&t,(l==null?void 0:l.mode)==="dark"&&Fi.textField__darkMode),children:[n&&N.jsx("label",{htmlFor:s.id,className:Fi.textField_label,children:n}),N.jsxs("div",{className:Ce(Fi.textField_content,r&&Fi[`textField_content__${r}`]),children:[N.jsxs("span",{className:Ce(Fi.input,a&&Fi.input__withIcon),children:[a&&N.jsx(kt,{name:a,color:s!=null&&s.disabled?"neutral-50":"neutral-70"}),N.jsx("input",{className:Fi.input_field,value:c,onChange:h=>{d(h)},...s}),e&&N.jsx("button",{className:Fi.input_clearButton,onClick:f,children:N.jsx(kt,{name:"close",size:"sm"})})]}),r&&i==="icon"&&N.jsx(Qw,{status:r})]}),r&&i==="inline"&&N.jsxs("span",{className:Fi.textField_helperText,children:[N.jsx(Qw,{size:"sm",status:r}),o]})]})};Dw.prototype={avocado:"TextField"};function $w(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=$w(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function Pa(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=$w(t))&&(r&&(r+=" "),r+=e);return r}function Ou(t){return typeof t=="number"&&!isNaN(t)}function yu(t){return typeof t=="boolean"}function vs(t){return typeof t=="string"}function nr(t){return typeof t=="function"}function Eh(t){return vs(t)||nr(t)?t:null}function aO(t){return t===0||t}function sO(t){return k.isValidElement(t)||vs(t)||nr(t)||Ou(t)}const Lw={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Lo={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function Kne(t,e,n){n===void 0&&(n=300);const{scrollHeight:r,style:i}=t;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition="all "+n+"ms",requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(e,n)})})}function Iw(t){let{enter:e,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:o=300}=t;return function(a){let{children:s,position:l,preventExitTransition:c,done:u,nodeRef:f,isIn:d}=a;const h=r?e+"--"+l:e,m=r?n+"--"+l:n,g=k.useRef(),p=k.useRef(0);function O(v){if(v.target!==f.current)return;const b=f.current;b.dispatchEvent(new Event("d")),b.removeEventListener("animationend",O),b.removeEventListener("animationcancel",O),p.current===0&&v.type!=="animationcancel"&&(b.className=g.current)}function w(){const v=f.current;v.removeEventListener("animationend",w),i?Kne(v,u,o):u()}return k.useLayoutEffect(()=>{(function(){const v=f.current;g.current=v.className,v.className+=" "+h,v.addEventListener("animationend",O),v.addEventListener("animationcancel",O)})()},[]),k.useEffect(()=>{d||(c?w():function(){p.current=1;const v=f.current;v.className+=" "+m,v.addEventListener("animationend",w)}())},[d]),k.createElement(k.Fragment,null,s)}}function jw(t,e){return{content:t.content,containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,status:e}}const qr={list:new Map,emitQueue:new Map,on(t,e){return this.list.has(t)||this.list.set(t,[]),this.list.get(t).push(e),this},off(t,e){if(e){const n=this.list.get(t).filter(r=>r!==e);return this.list.set(t,n),this}return this.list.delete(t),this},cancelEmit(t){const e=this.emitQueue.get(t);return e&&(e.forEach(clearTimeout),this.emitQueue.delete(t)),this},emit(t){this.list.has(t)&&this.list.get(t).forEach(e=>{const n=setTimeout(()=>{e(...[].slice.call(arguments,1))},0);this.emitQueue.has(t)||this.emitQueue.set(t,[]),this.emitQueue.get(t).push(n)})}},Th=t=>{let{theme:e,type:n,...r}=t;return k.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":"var(--toastify-icon-color-"+n+")",...r})},lO={info:function(t){return k.createElement(Th,{...t},k.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(t){return k.createElement(Th,{...t},k.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(t){return k.createElement(Th,{...t},k.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(t){return k.createElement(Th,{...t},k.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return k.createElement("div",{className:"Toastify__spinner"})}};function Jne(t){const[,e]=k.useReducer(h=>h+1,0),[n,r]=k.useState([]),i=k.useRef(null),o=k.useRef(new Map).current,a=h=>n.indexOf(h)!==-1,s=k.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:t,containerId:null,isToastActive:a,getToast:h=>o.get(h)}).current;function l(h){let{containerId:m}=h;const{limit:g}=s.props;!g||m&&s.containerId!==m||(s.count-=s.queue.length,s.queue=[])}function c(h){r(m=>aO(h)?m.filter(g=>g!==h):[])}function u(){const{toastContent:h,toastProps:m,staleId:g}=s.queue.shift();d(h,m,g)}function f(h,m){let{delay:g,staleId:p,...O}=m;if(!sO(h)||function(D){return!i.current||s.props.enableMultiContainer&&D.containerId!==s.props.containerId||o.has(D.toastId)&&D.updateId==null}(O))return;const{toastId:w,updateId:v,data:b}=O,{props:y}=s,x=()=>c(w),_=v==null;_&&s.count++;const E={toastId:w,updateId:v,data:b,containerId:O.containerId,isLoading:O.isLoading,theme:O.theme||y.theme,icon:O.icon!=null?O.icon:y.icon,isIn:!1,key:O.key||s.toastKey++,type:O.type,closeToast:x,closeButton:O.closeButton,rtl:y.rtl,position:O.position||y.position,transition:O.transition||y.transition,className:Eh(O.className||y.toastClassName),bodyClassName:Eh(O.bodyClassName||y.bodyClassName),style:O.style||y.toastStyle,bodyStyle:O.bodyStyle||y.bodyStyle,onClick:O.onClick||y.onClick,pauseOnHover:yu(O.pauseOnHover)?O.pauseOnHover:y.pauseOnHover,pauseOnFocusLoss:yu(O.pauseOnFocusLoss)?O.pauseOnFocusLoss:y.pauseOnFocusLoss,draggable:yu(O.draggable)?O.draggable:y.draggable,draggablePercent:O.draggablePercent||y.draggablePercent,draggableDirection:O.draggableDirection||y.draggableDirection,closeOnClick:yu(O.closeOnClick)?O.closeOnClick:y.closeOnClick,progressClassName:Eh(O.progressClassName||y.progressClassName),progressStyle:O.progressStyle||y.progressStyle,autoClose:!O.isLoading&&(A=O.autoClose,I=y.autoClose,A===!1||Ou(A)&&A>0?A:I),hideProgressBar:yu(O.hideProgressBar)?O.hideProgressBar:y.hideProgressBar,progress:O.progress,role:O.role||y.role,deleteToast(){const D=jw(o.get(w),"removed");o.delete(w),qr.emit(4,D);const j=s.queue.length;if(s.count=aO(w)?s.count-1:s.count-s.displayedToast,s.count<0&&(s.count=0),j>0){const R=aO(w)?1:s.props.limit;if(j===1||R===1)s.displayedToast++,u();else{const B=R>j?j:R;s.displayedToast=B;for(let X=0;X<B;X++)u()}}else e()}};var A,I;E.iconOut=function(D){let{theme:j,type:R,isLoading:B,icon:X}=D,V=null;const K={theme:j,type:R};return X===!1||(nr(X)?V=X(K):k.isValidElement(X)?V=k.cloneElement(X,K):vs(X)||Ou(X)?V=X:B?V=lO.spinner():(ne=>ne in lO)(R)&&(V=lO[R](K))),V}(E),nr(O.onOpen)&&(E.onOpen=O.onOpen),nr(O.onClose)&&(E.onClose=O.onClose),E.closeButton=y.closeButton,O.closeButton===!1||sO(O.closeButton)?E.closeButton=O.closeButton:O.closeButton===!0&&(E.closeButton=!sO(y.closeButton)||y.closeButton);let Q=h;k.isValidElement(h)&&!vs(h.type)?Q=k.cloneElement(h,{closeToast:x,toastProps:E,data:b}):nr(h)&&(Q=h({closeToast:x,toastProps:E,data:b})),y.limit&&y.limit>0&&s.count>y.limit&&_?s.queue.push({toastContent:Q,toastProps:E,staleId:p}):Ou(g)?setTimeout(()=>{d(Q,E,p)},g):d(Q,E,p)}function d(h,m,g){const{toastId:p}=m;g&&o.delete(g);const O={content:h,props:m};o.set(p,O),r(w=>[...w,p].filter(v=>v!==g)),qr.emit(4,jw(O,O.props.updateId==null?"added":"updated"))}return k.useEffect(()=>(s.containerId=t.containerId,qr.cancelEmit(3).on(0,f).on(1,h=>i.current&&c(h)).on(5,l).emit(2,s),()=>qr.emit(3,s)),[]),k.useEffect(()=>{s.props=t,s.isToastActive=a,s.displayedToast=n.length}),{getToastToRender:function(h){const m=new Map,g=Array.from(o.values());return t.newestOnTop&&g.reverse(),g.forEach(p=>{const{position:O}=p.props;m.has(O)||m.set(O,[]),m.get(O).push(p)}),Array.from(m,p=>h(p[0],p[1]))},containerRef:i,isToastActive:a}}function Nw(t){return t.targetTouches&&t.targetTouches.length>=1?t.targetTouches[0].clientX:t.clientX}function Rw(t){return t.targetTouches&&t.targetTouches.length>=1?t.targetTouches[0].clientY:t.clientY}function ere(t){const[e,n]=k.useState(!1),[r,i]=k.useState(!1),o=k.useRef(null),a=k.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,s=k.useRef(t),{autoClose:l,pauseOnHover:c,closeToast:u,onClick:f,closeOnClick:d}=t;function h(b){if(t.draggable){a.didMove=!1,document.addEventListener("mousemove",O),document.addEventListener("mouseup",w),document.addEventListener("touchmove",O),document.addEventListener("touchend",w);const y=o.current;a.canCloseOnClick=!0,a.canDrag=!0,a.boundingRect=y.getBoundingClientRect(),y.style.transition="",a.x=Nw(b.nativeEvent),a.y=Rw(b.nativeEvent),t.draggableDirection==="x"?(a.start=a.x,a.removalDistance=y.offsetWidth*(t.draggablePercent/100)):(a.start=a.y,a.removalDistance=y.offsetHeight*(t.draggablePercent===80?1.5*t.draggablePercent:t.draggablePercent/100))}}function m(){if(a.boundingRect){const{top:b,bottom:y,left:x,right:_}=a.boundingRect;t.pauseOnHover&&a.x>=x&&a.x<=_&&a.y>=b&&a.y<=y?p():g()}}function g(){n(!0)}function p(){n(!1)}function O(b){const y=o.current;a.canDrag&&y&&(a.didMove=!0,e&&p(),a.x=Nw(b),a.y=Rw(b),a.delta=t.draggableDirection==="x"?a.x-a.start:a.y-a.start,a.start!==a.x&&(a.canCloseOnClick=!1),y.style.transform="translate"+t.draggableDirection+"("+a.delta+"px)",y.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function w(){document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",w),document.removeEventListener("touchmove",O),document.removeEventListener("touchend",w);const b=o.current;if(a.canDrag&&a.didMove&&b){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return i(!0),void t.closeToast();b.style.transition="transform 0.2s, opacity 0.2s",b.style.transform="translate"+t.draggableDirection+"(0)",b.style.opacity="1"}}k.useEffect(()=>{s.current=t}),k.useEffect(()=>(o.current&&o.current.addEventListener("d",g,{once:!0}),nr(t.onOpen)&&t.onOpen(k.isValidElement(t.children)&&t.children.props),()=>{const b=s.current;nr(b.onClose)&&b.onClose(k.isValidElement(b.children)&&b.children.props)}),[]),k.useEffect(()=>(t.pauseOnFocusLoss&&(document.hasFocus()||p(),window.addEventListener("focus",g),window.addEventListener("blur",p)),()=>{t.pauseOnFocusLoss&&(window.removeEventListener("focus",g),window.removeEventListener("blur",p))}),[t.pauseOnFocusLoss]);const v={onMouseDown:h,onTouchStart:h,onMouseUp:m,onTouchEnd:m};return l&&c&&(v.onMouseEnter=p,v.onMouseLeave=g),d&&(v.onClick=b=>{f&&f(b),a.canCloseOnClick&&u()}),{playToast:g,pauseToast:p,isRunning:e,preventExitTransition:r,toastRef:o,eventHandlers:v}}function Bw(t){let{closeToast:e,theme:n,ariaLabel:r="close"}=t;return k.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:i=>{i.stopPropagation(),e(i)},"aria-label":r},k.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},k.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Zw(t){let{delay:e,isRunning:n,closeToast:r,type:i,hide:o,className:a,style:s,controlledProgress:l,progress:c,rtl:u,isIn:f,theme:d}=t;const h={...s,animationDuration:e+"ms",animationPlayState:n?"running":"paused",opacity:o?0:1};l&&(h.transform="scaleX("+c+")");const m=Pa("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+d,"Toastify__progress-bar--"+i,{"Toastify__progress-bar--rtl":u}),g=nr(a)?a({rtl:u,type:i,defaultClassName:m}):Pa(m,a);return k.createElement("div",{role:"progressbar","aria-hidden":o?"true":"false","aria-label":"notification timer",className:g,style:h,[l&&c>=1?"onTransitionEnd":"onAnimationEnd"]:l&&c<1?null:()=>{f&&r()}})}Zw.defaultProps={type:Lo.DEFAULT,hide:!1};const tre=t=>{const{isRunning:e,preventExitTransition:n,toastRef:r,eventHandlers:i}=ere(t),{closeButton:o,children:a,autoClose:s,onClick:l,type:c,hideProgressBar:u,closeToast:f,transition:d,position:h,className:m,style:g,bodyClassName:p,bodyStyle:O,progressClassName:w,progressStyle:v,updateId:b,role:y,progress:x,rtl:_,toastId:E,deleteToast:A,isIn:I,isLoading:Q,iconOut:D,theme:j}=t,R=Pa("Toastify__toast","Toastify__toast-theme--"+j,"Toastify__toast--"+c,{"Toastify__toast--rtl":_}),B=nr(m)?m({rtl:_,position:h,type:c,defaultClassName:R}):Pa(R,m),X=!!x,V={closeToast:f,type:c,theme:j};let K=null;return o===!1||(K=nr(o)?o(V):k.isValidElement(o)?k.cloneElement(o,V):Bw(V)),k.createElement(d,{isIn:I,done:A,position:h,preventExitTransition:n,nodeRef:r},k.createElement("div",{id:E,onClick:l,className:B,...i,style:g,ref:r},k.createElement("div",{...I&&{role:y},className:nr(p)?p({type:c}):Pa("Toastify__toast-body",p),style:O},D!=null&&k.createElement("div",{className:Pa("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!Q})},D),k.createElement("div",null,a)),K,(s||X)&&k.createElement(Zw,{...b&&!X?{key:"pb-"+b}:{},rtl:_,theme:j,delay:s,isRunning:e,isIn:I,closeToast:f,hide:u,type:c,style:v,className:w,controlledProgress:X,progress:x})))},nre=Iw({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),rre=Iw({enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0}),cO=k.forwardRef((t,e)=>{const{getToastToRender:n,containerRef:r,isToastActive:i}=Jne(t),{className:o,style:a,rtl:s,containerId:l}=t;function c(u){const f=Pa("Toastify__toast-container","Toastify__toast-container--"+u,{"Toastify__toast-container--rtl":s});return nr(o)?o({position:u,rtl:s,defaultClassName:f}):Pa(f,Eh(o))}return k.useEffect(()=>{e&&(e.current=r.current)},[]),k.createElement("div",{ref:r,className:"Toastify",id:l},n((u,f)=>{const d=f.length?{...a}:{...a,pointerEvents:"none"};return k.createElement("div",{className:c(u),style:d,key:"container-"+u},f.map((h,m)=>{let{content:g,props:p}=h;return k.createElement(tre,{...p,isIn:i(p.toastId),style:{...p.style,"--nth":m+1,"--len":f.length},key:"toast-"+p.key},g)}))}))});cO.displayName="ToastContainer",cO.defaultProps={position:Lw.TOP_RIGHT,transition:nre,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:Bw,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let uO,Dl=new Map,fO=[];function zw(){return Math.random().toString(36).substring(2,9)}function ire(t){return t&&(vs(t.toastId)||Ou(t.toastId))?t.toastId:zw()}function vu(t,e){return Dl.size>0?qr.emit(0,t,e):fO.push({content:t,options:e}),e.toastId}function Ah(t,e){return{...e,type:e&&e.type||t,toastId:ire(e)}}function Mh(t){return(e,n)=>vu(e,Ah(t,n))}function dt(t,e){return vu(t,Ah(Lo.DEFAULT,e))}dt.loading=(t,e)=>vu(t,Ah(Lo.DEFAULT,{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),dt.promise=function(t,e,n){let r,{pending:i,error:o,success:a}=e;i&&(r=vs(i)?dt.loading(i,n):dt.loading(i.render,{...n,...i}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null,delay:100},l=(u,f,d)=>{if(f==null)return void dt.dismiss(r);const h={type:u,...s,...n,data:d},m=vs(f)?{render:f}:f;return r?dt.update(r,{...h,...m}):dt(m.render,{...h,...m}),d},c=nr(t)?t():t;return c.then(u=>l("success",a,u)).catch(u=>l("error",o,u)),c},dt.success=Mh(Lo.SUCCESS),dt.info=Mh(Lo.INFO),dt.error=Mh(Lo.ERROR),dt.warning=Mh(Lo.WARNING),dt.warn=dt.warning,dt.dark=(t,e)=>vu(t,Ah(Lo.DEFAULT,{theme:"dark",...e})),dt.dismiss=t=>qr.emit(1,t),dt.clearWaitingQueue=function(t){return t===void 0&&(t={}),qr.emit(5,t)},dt.isActive=t=>{let e=!1;return Dl.forEach(n=>{n.isToastActive&&n.isToastActive(t)&&(e=!0)}),e},dt.update=function(t,e){e===void 0&&(e={}),setTimeout(()=>{const n=function(r,i){let{containerId:o}=i;const a=Dl.get(o||uO);return a?a.getToast(r):null}(t,e);if(n){const{props:r,content:i}=n,o={...r,...e,toastId:e.toastId||t,updateId:zw()};o.toastId!==t&&(o.staleId=t);const a=o.render||i;delete o.render,vu(a,o)}},0)},dt.done=t=>{dt.update(t,{progress:1})},dt.onChange=t=>(qr.on(4,t),()=>{qr.off(4,t)}),dt.POSITION=Lw,dt.TYPE=Lo,qr.on(2,t=>{uO=t.containerId||t,Dl.set(uO,t),fO.forEach(e=>{qr.emit(0,e.content,e.options)}),fO=[]}).on(3,t=>{Dl.delete(t.containerId||t),Dl.size===0&&qr.off(0).off(1).off(5)});const Xw=()=>{const[t,e]=k.useState(window.innerWidth<=992),n=({closeToast:r})=>N.jsx("button",{className:"closeToast",onClick:r,children:N.jsx(kt,{name:"close",color:"gray-00"})});return k.useEffect(()=>{const r=()=>{e(window.innerWidth<=992)};return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),N.jsx(cO,{autoClose:!1,className:"toaster",toastClassName:"toaster_item",bodyClassName:"bodyToast",closeButton:n,icon:!1,transition:rre,position:t?"bottom-right":"top-right"})};Xw.prototype={avocado:"Toaster"};const ore=()=>{const[t,e]=k.useState(!1);return k.useEffect(()=>{const n=window.matchMedia("(max-width: 992px)");e(n.matches);const r=i=>e(i.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),{isMobile:t}},Vw=({row:t,selectorType:e,isDisabled:n,isSelected:r,onSelect:i})=>e?e==="checkbox"?N.jsx(_d,{disabled:n,checked:r,onChange:o=>{var a;return i==null?void 0:i((a=o==null?void 0:o.target)==null?void 0:a.checked,t)}}):N.jsx(nne,{disabled:n,checked:r,onChange:o=>{var a;return i==null?void 0:i((a=o==null?void 0:o.target)==null?void 0:a.checked,t)}}):null,are="_tableActionItem_gekem_1",sre="_tableActionItem__mobile_gekem_7",lre="_tableActionItem__clickable_gekem_10",cre="_tableActionItem__disabledItem_gekem_17",ure="_tableActionItem__disabledRow_gekem_21",fre="_tableActionItem_button_gekem_24",$l={tableActionItem:are,tableActionItem__mobile:sre,tableActionItem__clickable:lre,tableActionItem__disabledItem:cre,tableActionItem__disabledRow:ure,tableActionItem_button:fre},Fw=({action:t,row:e,isDisabled:n,isMobile:r})=>{var i,o,a;return N.jsxs("div",{className:Ce($l.tableActionItem,!!(t!=null&&t.onClick)&&$l.tableActionItem__clickable,!!((i=t==null?void 0:t.isDisabled)!=null&&i.call(t,e))&&$l.tableActionItem__disabledItem,n&&$l.tableActionItem__disabledRow,r&&$l.tableActionItem__mobile),children:[!!(t!=null&&t.icon)&&N.jsx("button",{className:$l.tableActionItem_button,disabled:n||((o=t==null?void 0:t.isDisabled)==null?void 0:o.call(t,e)),onClick:()=>{var s;return!n&&((s=t==null?void 0:t.onClick)==null?void 0:s.call(t,e))},children:N.jsx(kt,{name:(a=t==null?void 0:t.icon)==null?void 0:a.call(t,e),color:"neutral-70"})}),!(t!=null&&t.icon)&&t!=null&&t.renderContent?t==null?void 0:t.renderContent(e,!!n):null]})},dre="_bodyRow_1il29_1",hre="_bodyRow_column_1il29_1",pre="_bodyRow__selected_1il29_10",mre="_bodyRow__disabled_1il29_13",gre="_columnContent_1il29_19",Ore="_bodyRow__adaptable_1il29_23",yre="_columnContent_text_1il29_23",vre="_bodyRow__relaxed_1il29_27",bre="_actions_item_1il29_28",wre="_bodyRow_column__select_1il29_29",xre="_actions_1il29_28",_re="_bodyRow__condensed_1il29_38",Sre="_bodyRow_column__actions_1il29_67",kre="_actions_item__expand_1il29_77",Cre="_actions_item__open_1il29_84",Pre="_actionButton_1il29_87",Ere="_actionButton__clickable_1il29_91",Tre="_actionButton__disabled_1il29_97",Are="_bodyExpandedRow_content_1il29_102",Vt={bodyRow:dre,bodyRow_column:hre,bodyRow__selected:pre,bodyRow__disabled:mre,columnContent:gre,bodyRow__adaptable:Ore,columnContent_text:yre,bodyRow__relaxed:vre,actions_item:bre,bodyRow_column__select:wre,actions:xre,bodyRow__condensed:_re,bodyRow_column__actions:Sre,actions_item__expand:kre,actions_item__open:Cre,actionButton:Pre,actionButton__clickable:Ere,actionButton__disabled:Tre,bodyExpandedRow_content:Are},Mre=({row:t,columns:e=[],rightActions:n,isDisabled:r,isSelectorDisabled:i,isSelected:o,selectorType:a,variant:s="regular",isTextAdaptable:l,onRowSelect:c,renderCustomContent:u})=>{const[f,d]=k.useState(!1);return N.jsxs(N.Fragment,{children:[N.jsxs("tr",{className:Ce(Vt.bodyRow,Vt==null?void 0:Vt[`bodyRow__${s}`],l&&Vt.bodyRow__adaptable,o&&Vt.bodyRow__selected,r&&Vt.bodyRow__disabled),children:[!!a&&N.jsx("td",{className:Ce(Vt.bodyRow_column,Vt.bodyRow_column__select),children:N.jsx("div",{className:Vt.columnContent,children:N.jsx(Vw,{row:t,selectorType:a,isDisabled:r||i,isSelected:o,onSelect:c})})}),e.map((h,m)=>{var g,p,O;return N.jsx("td",{className:Ce(Vt.bodyRow_column,(g=h==null?void 0:h.desktopOptions)==null?void 0:g.bodyCellClassName),style:(p=h==null?void 0:h.desktopOptions)==null?void 0:p.bodyCellStyles,children:N.jsx("div",{className:Vt.columnContent,children:h!=null&&h.renderCell?(O=h==null?void 0:h.renderCell)==null?void 0:O.call(h,t):!!(h!=null&&h.accessor)&&N.jsx(So,{className:Vt.columnContent_text,children:String(t[h==null?void 0:h.accessor])})})},`column-${m}-${h==null?void 0:h.key}`)}),(!!u||!!(n!=null&&n.length))&&N.jsx("td",{className:Ce(Vt.bodyRow_column,Vt.bodyRow_column__actions),children:N.jsxs("div",{className:Ce(Vt.columnContent,Vt.actions),children:[n==null?void 0:n.map((h,m)=>!(h!=null&&h.shouldRender)||h!=null&&h.shouldRender(t)?N.jsx(Fw,{action:h,row:t,isDisabled:r},m):null),!!u&&N.jsx(nh,{className:Ce(Vt.actions_item,Vt.actions_item__expand,f&&Vt.actions_item__open),icon:"chevron-down",variant:"ghost",size:"sm",disabled:r,onClick:()=>d(!f)})]})})]}),f&&!!u&&N.jsx("tr",{className:Vt.bodyExpandedRow,children:N.jsx("td",{className:Vt.bodyExpandedRow_content,colSpan:6,children:u(t)})})]})},Qre="_tableDesktopHead_1wp11_1",Dre="_tableDesktopHead__relaxed_1wp11_1",$re="_headRow_column_1wp11_1",Lre="_headRow_column__select_1wp11_2",Ire="_tableDesktopHead__condensed_1wp11_6",jre="_headRow_1wp11_1",Nre="_columnContent_1wp11_23",Rre="_columnContent_text_1wp11_29",Bre="_columnContent_sortButton_1wp11_32",Zre="_sortIcon_1wp11_38",zre="_sortIcon__asc_1wp11_41",br={tableDesktopHead:Qre,tableDesktopHead__relaxed:Dre,headRow_column:$re,headRow_column__select:Lre,tableDesktopHead__condensed:Ire,headRow:jre,columnContent:Nre,columnContent_text:Rre,columnContent_sortButton:Bre,sortIcon:Zre,sortIcon__asc:zre},Xre=({rowOptions:t,columns:e,variant:n="regular",initialSort:r,hasActions:i,isSelectorDisabled:o,onSortChange:a})=>{const[s,l]=k.useState({column:(r==null?void 0:r.column)||null,direction:(r==null?void 0:r.direction)||null}),c=u=>{if(!u)return;const f=(s==null?void 0:s.column)===u,d={column:u,direction:f&&s.direction==="asc"?"desc":"asc"};l(d),a==null||a(d)};return N.jsx("thead",{className:Ce(br.tableDesktopHead,br==null?void 0:br[`tableDesktopHead__${n}`]),children:N.jsxs("tr",{className:br.headRow,children:[!!(t!=null&&t.selectorType)&&N.jsx("th",{className:Ce(br.headRow_column,br.headRow_column__select),children:(t==null?void 0:t.selectorType)==="checkbox"&&N.jsx(_d,{disabled:o,checked:t==null?void 0:t.isAllSelected,onChange:u=>{var f,d;return(d=t==null?void 0:t.onSelectAll)==null?void 0:d.call(t,(f=u==null?void 0:u.target)==null?void 0:f.checked)}})}),e==null?void 0:e.map((u,f)=>{var d,h;return N.jsx("th",{className:Ce(br.headRow_column,(d=u==null?void 0:u.desktopOptions)==null?void 0:d.headCellClassName),style:(h=u==null?void 0:u.desktopOptions)==null?void 0:h.headCellStyles,children:N.jsxs("div",{className:br.columnContent,children:[(u==null?void 0:u.isSortable)&&N.jsx("button",{"aria-label":"sort",className:br.columnContent_sortButton,onClick:()=>(u==null?void 0:u.isSortable)&&c(u==null?void 0:u.key),children:N.jsx(kt,{className:Ce(br.sortIcon,(u==null?void 0:u.key)&&(s==null?void 0:s.direction)==="asc"&&(s==null?void 0:s.column)===(u==null?void 0:u.key)&&br.sortIcon__asc),name:"arrow-down",color:"neutral-70"})}),typeof(u==null?void 0:u.header)=="string"?N.jsx(da,{className:br.columnContent_text,type:"h4",children:u==null?void 0:u.header}):u==null?void 0:u.header]})},`head-column-${f}-${u==null?void 0:u.key}`)}),(!!(t!=null&&t.renderCustomContent)||!!i)&&N.jsx("th",{className:br.headRow_column})]})})},Vre="_tableDesktop_2qx8i_1",Fre="_tableDesktop_component_2qx8i_23",Yw={tableDesktop:Vre,tableDesktop_component:Fre},Yre=({className:t,data:e=[],columns:n=[],rightActions:r=[],rowOptions:i,desktopVariant:o="regular",initialSort:a,onSortChange:s})=>N.jsx("div",{className:Yw.tableDesktop,children:N.jsxs("table",{className:Ce(Yw.tableDesktop_component,t&&t),children:[N.jsx(Xre,{columns:n,rowOptions:i,variant:o,initialSort:a,isSelectorDisabled:i==null?void 0:i.isHeadSelectorDisabled,hasActions:!!r.length,onSortChange:s}),N.jsx("tbody",{children:e.map((l,c)=>{var u,f,d;return N.jsx(Mre,{row:l,columns:n,rightActions:r,variant:o,selectorType:i==null?void 0:i.selectorType,isSelected:(u=i==null?void 0:i.isSelected)==null?void 0:u.call(i,l),isDisabled:(f=i==null?void 0:i.isDisabled)==null?void 0:f.call(i,l),isSelectorDisabled:(d=i==null?void 0:i.isSelectorDisabled)==null?void 0:d.call(i,l),isTextAdaptable:i==null?void 0:i.isTextAdaptable,renderCustomContent:i==null?void 0:i.renderCustomContent,onRowSelect:i==null?void 0:i.onRowSelect},`row-${c}`)})})]})}),qre="_tableMobileRow_1rfpl_1",Wre="_tableMobileRow__selected_1rfpl_5",Ure="_tableMobileRow__disabled_1rfpl_8",Hre="_tableMobileRow_head_1rfpl_11",Gre="_headSelect_1rfpl_21",Kre="_headActions_1rfpl_25",Jre="_headActions_item_1rfpl_30",eie="_actionButton_1rfpl_30",tie="_actionButton__disabled_1rfpl_38",nie="_tableMobileRow_body_1rfpl_41",rie="_bodyContentTrigger_1rfpl_44",iie="_bodyContentTrigger_button_1rfpl_50",oie="_bodyContentTrigger_button__open_1rfpl_59",aie="_bodyContentTrigger_button__disabled_1rfpl_62",sie="_bodyColumn_1rfpl_65",lie="_bodyColumn__custom_1rfpl_71",cie="_bodyColumn_title_1rfpl_74",uie="_bodyColumn_text_1rfpl_74",fie="_bodyContent_1rfpl_44",die="_bodyContent_separator_1rfpl_94",on={tableMobileRow:qre,tableMobileRow__selected:Wre,tableMobileRow__disabled:Ure,tableMobileRow_head:Hre,headSelect:Gre,headActions:Kre,headActions_item:Jre,actionButton:eie,actionButton__disabled:tie,tableMobileRow_body:nie,bodyContentTrigger:rie,bodyContentTrigger_button:iie,bodyContentTrigger_button__open:oie,bodyContentTrigger_button__disabled:aie,bodyColumn:sie,bodyColumn__custom:lie,bodyColumn_title:cie,bodyColumn_text:uie,bodyContent:fie,bodyContent_separator:die},qw=({column:t,row:e})=>t?N.jsxs(N.Fragment,{children:[N.jsx(So,{className:on.bodyColumn_title,type:"sm",weight:"medium",children:t==null?void 0:t.header}),t!=null&&t.renderCell?t==null?void 0:t.renderCell(e):N.jsx(So,{className:on.bodyColumn_text,type:"sm",children:t!=null&&t.accessor?String(e==null?void 0:e[t==null?void 0:t.accessor]):""})]}):null,hie=({columns:t=[],row:e,isDisabled:n,isSelectorDisabled:r,isSelected:i,selectorType:o,actions:a=[],onRowSelect:s,renderCustomContent:l})=>{var c,u;const[f,d]=k.useState(!1),h=k.useMemo(()=>{const g=[...t];return{first:g.shift(),columns:g}},[t]),m=k.useMemo(()=>a==null?void 0:a.some(g=>!(g!=null&&g.shouldRender)||(g==null?void 0:g.shouldRender(e))),[a,e]);return N.jsxs("div",{className:Ce(on.tableMobileRow,n&&on.tableMobileRow__disabled,i&&on.tableMobileRow__selected),children:[(!!o||m)&&N.jsxs("div",{className:on.tableMobileRow_head,children:[N.jsx("div",{className:on.headSelect,children:N.jsx(Vw,{row:e,selectorType:o,isDisabled:n||r,isSelected:i,onSelect:s})}),N.jsx("div",{className:on.headActions,children:a==null?void 0:a.map((g,p)=>!(g!=null&&g.shouldRender)||g!=null&&g.shouldRender(e)?N.jsx(Fw,{action:g,row:e,isDisabled:n,isMobile:!0},p):null)})]}),N.jsxs("div",{className:on.tableMobileRow_body,children:[N.jsxs("div",{className:on.bodyContentTrigger,children:[N.jsx("div",{className:on.bodyColumn,children:qw({column:h.first,row:e})}),N.jsx("button",{disabled:n,className:Ce(on.bodyContentTrigger_button,f&&on.bodyContentTrigger_button__open,n&&on.bodyContentTrigger_button__disabled),onClick:()=>!n&&d(!f),children:N.jsx(kt,{name:"chevron-down",size:"lg"})})]}),N.jsxs("div",{className:on.bodyContent,style:{maxHeight:f?`${(Math.floor(((c=h==null?void 0:h.columns)==null?void 0:c.length)/2)+1)*100}px`:0},children:[N.jsx("div",{className:on.bodyContent_separator}),(u=h==null?void 0:h.columns)==null?void 0:u.map((g,p)=>N.jsx("div",{className:on.bodyColumn,children:qw({column:g,row:e})},p)),!!l&&N.jsx("div",{className:Ce(on.bodyColumn,on.bodyColumn__custom),children:l(e)})]})]})]})},pie="_tableMobile_1iao8_1",mie={tableMobile:pie},gie=({className:t,data:e=[],columns:n=[],rightActions:r,rowOptions:i})=>N.jsx("div",{className:Ce(mie.tableMobile,t&&t),children:e==null?void 0:e.map((o,a)=>{var s,l,c;return N.jsx(hie,{row:o,columns:n,actions:r,isDisabled:(s=i==null?void 0:i.isDisabled)==null?void 0:s.call(i,o),isSelected:(l=i==null?void 0:i.isSelected)==null?void 0:l.call(i,o),isSelectorDisabled:(c=i==null?void 0:i.isSelectorDisabled)==null?void 0:c.call(i,o),selectorType:i==null?void 0:i.selectorType,onRowSelect:i==null?void 0:i.onRowSelect,renderCustomContent:i==null?void 0:i.renderCustomContent},a)})}),Oie=({notResponsive:t=!1,...e})=>{const{isMobile:n}=ore(),r=n&&!t?gie:Yre;return N.jsx(r,{...e})},yie="_drawer_ik185_1",vie="_drawer__leftOrigin_ik185_9",bie="_drawer_content_ik185_9",wie="_drawer__closing_ik185_15",xie="_drawer_backdrop_ik185_18",_ie="_drawerHeader_main_ik185_44",Sie="_headerTitle_ik185_54",kie="_headerControls_ik185_59",Cie="_headerControls_close_ik185_64",Pie="_body_ik185_73",Eie="_footer_ik185_78",Tie="_drawer__show_ik185_85",wr={drawer:yie,drawer__leftOrigin:vie,drawer_content:bie,drawer__closing:wie,drawer_backdrop:xie,drawerHeader_main:_ie,headerTitle:Sie,headerControls:kie,headerControls_close:Cie,body:Pie,footer:Eie,drawer__show:Tie},Aie=({isOpen:t,children:e,title:n,footer:r,header:i,headerExtra:o,closeOnOverlayClick:a=!1,heightGap:s=50,origin:l="right",className:c,contentClassName:u,onClose:f})=>{const[d,h]=k.useState(t),[m,g]=k.useState(t),[p,O]=k.useState(!1),w=k.useRef(null),v=k.useRef(!1),b=k.useCallback(()=>{w.current&&(clearTimeout(w.current),w.current=null),v.current=!1},[]),y=k.useCallback(()=>{b(),h(!0),O(!1),v.current=!0,w.current=setTimeout(()=>{g(!0),v.current=!1},30)},[]),x=k.useCallback(()=>{p||!m||v.current||(b(),O(!0),g(!1))},[p,m]),_=k.useCallback(I=>{I===m&&!p&&!v.current||(I?y():x())},[x,m,p,v]),E=k.useCallback(()=>{p&&!m&&(O(!1),h(!1),f==null||f())},[p,m,f]);if(k.useEffect(()=>{v.current||_(t)},[t]),k.useEffect(()=>()=>{b()},[]),!d)return null;const A=!!n||!!i||!!o;return N.jsxs("section",{className:Ce(wr.drawer,wr[`drawer__${l}Origin`],c,m&&wr.drawer__show,p&&wr.drawer__closing),style:{top:`${s}px`},children:[N.jsx("div",{className:wr.drawer_backdrop,role:"button","aria-label":"Drawer backdrop",onClick:I=>{I==null||I.stopPropagation(),a&&x()}}),N.jsxs("div",{className:Ce(wr.drawer_content,u),"aria-label":"Drawer content",onTransitionEnd:()=>p&&!m&&E(),children:[A&&N.jsxs("header",{className:wr.drawerHeader,children:[N.jsxs("div",{className:wr.drawerHeader_main,children:[N.jsx("div",{className:wr.headerTitle,children:n}),N.jsxs("div",{className:wr.headerControls,children:[i,N.jsx(nh,{className:wr.headerControls_close,icon:"close",variant:"ghost",onClick:x})]})]}),o&&o]}),N.jsx("section",{className:wr.body,children:e}),r&&N.jsx("footer",{className:wr.footer,children:r})]})]})},Ww=t=>{if(!(t!=null&&t.content))return null;const e={...t,children:t.content,type:t.variant};return F.jsx(da,{...e})},Uw=t=>{if(!t)return null;const e={...t,children:t.content};return F.jsx(So,{...e})},Hw={body:"_body_14tsv_1",body_content:"_body_content_14tsv_5"},Mie=({inputs:t})=>F.jsx("section",{className:Hw.body,children:F.jsx("div",{className:Hw.body_content,children:t.map((e,n)=>F.jsx(k.Fragment,{children:e},n))})});var Qie={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Gw=t=>{let e;const n=new Set,r=(u,f)=>{const d=typeof u=="function"?u(e):u;if(!Object.is(d,e)){const h=e;e=f??(typeof d!="object"||d===null)?d:Object.assign({},e,d),n.forEach(m=>m(e,h))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(Qie?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=e=t(r,i,l);return l},Die=t=>t?Gw(t):Gw;var Kw={exports:{}},dO={},hO={exports:{}},pO={};/**
686
686
  * @license React
687
687
  * use-sync-external-store-shim.production.min.js
688
688
  *
@@ -714,7 +714,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
714
714
  `&&t.lineWrapping&&(r&&(r=U.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:He.of([" "])}),n)return k3(t,n,r,o);if(r&&!r.main.eq(i)){let a=!1,s="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(a=!0),s=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:a,userEvent:s}),!0}else return!1}function k3(t,e,n,r=-1){if(me.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(me.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&zl(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&zl(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&zl(t.contentDOM,"Delete",46)))return!0;let o=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,s=()=>a||(a=Qse(t,e,n));return t.state.facet(U_).some(l=>l(t,e.from,e.to,o,s))||t.dispatch(s()),!0}function Qse(t,e,n){let r,i=t.state,o=i.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let s=o.from<e.from?i.sliceDoc(o.from,e.from):"",l=o.to>e.to?i.sliceDoc(e.to,o.to):"";r=i.replaceSelection(t.state.toText(s+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let s=i.changes(e),l=n&&n.main.to<=s.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let c=t.state.sliceDoc(e.from,e.to),u,f=n&&sS(t,n.main.head);if(f){let m=e.insert.length-(e.to-e.from);u={from:f.from,to:f.to-m}}else u=t.state.doc.lineAt(o.head);let d=o.to-e.to,h=o.to-o.from;r=i.changeByRange(m=>{if(m.from==o.from&&m.to==o.to)return{changes:s,range:l||m.map(s)};let g=m.to-d,p=g-c.length;if(m.to-m.from!=h||t.state.sliceDoc(p,g)!=c||m.to>=u.from&&m.from<=u.to)return{range:m};let O=i.changes({from:p,to:g,insert:e.insert}),w=m.to-o.to;return{changes:O,range:l?U.range(Math.max(0,l.anchor+w),Math.max(0,l.head+w)):m.map(O)}})}else r={changes:s,selection:l&&i.selection.replaceRange(l)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:a,scrollIntoView:!0})}function Dse(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o<i&&t.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==i&&t.length==e.length)return null;let a=t.length,s=e.length;for(;a>0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;if(r=="end"){let l=Math.max(0,o-Math.min(a,s));n-=a+l-o}if(a<o&&t.length<e.length){let l=n<=o&&n>=a?o-n:0;o-=l,s=o+(s-a),a=o}else if(s<o){let l=n<=o&&n>=s?o-n:0;o-=l,a=o+(a-s),s=o}return{from:o,toA:a,toB:s}}function $se(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new pS(n,r)),(i!=n||o!=r)&&e.push(new pS(i,o))),e}function Lse(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?U.single(n+e,r+e):null}class Ise{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,me.safari&&e.contentDOM.addEventListener("input",()=>null),me.gecko&&Kse(e.contentDOM.ownerDocument)}handleEvent(e){!Vse(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=jse(e),r=this.handlers,i=this.view.contentDOM;for(let o in n)if(o!="scroll"){let a=!n[o].handlers.length,s=r[o];s&&a!=!s.handlers.length&&(i.removeEventListener(o,this.handleEvent),s=null),s||i.addEventListener(o,this.handleEvent,{passive:a})}for(let o in r)o!="scroll"&&!n[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&yS.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),me.android&&me.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return me.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=OS.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||Nse.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,zl(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:me.safari&&!me.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function gS(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){ar(n.state,i)}}}function jse(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec;if(i&&i.domEventHandlers)for(let o in i.domEventHandlers){let a=i.domEventHandlers[o];a&&n(o).handlers.push(gS(r.value,a))}if(i&&i.domEventObservers)for(let o in i.domEventObservers){let a=i.domEventObservers[o];a&&n(o).observers.push(gS(r.value,a))}}for(let r in _i)n(r).handlers.push(_i[r]);for(let r in Hr)n(r).observers.push(Hr[r]);return e}const OS=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Nse="dthko",yS=[16,17,18,20,91,92,224,225],sp=6;function lp(t){return Math.max(0,t)*.7+8}function Rse(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class Bse{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=Wae(e.contentDOM),this.atoms=e.state.facet(v3).map(a=>a(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Xe.allowMultipleSelections)&&Zse(e,n),this.dragging=Xse(e,n)&&PS(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&Rse(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,o=0,a=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=b3(this.view);e.clientX-l.left<=i+sp?n=-lp(i-e.clientX):e.clientX+l.right>=a-sp&&(n=lp(e.clientX-a)),e.clientY-l.top<=o+sp?r=-lp(o-e.clientY):e.clientY+l.bottom>=s-sp&&(r=lp(e.clientY-s)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],o=null;if(i.empty){let a=ap(this.atoms,i.from,0);a!=i.from&&(o=U.cursor(a,-1))}else{let a=ap(this.atoms,i.from,-1),s=ap(this.atoms,i.to,1);(a!=i.from||s!=i.to)&&(o=U.range(i.from==i.anchor?a:s,i.from==i.head?a:s))}o&&(n||(n=e.ranges.slice()),n[r]=o)}return n?U.create(n,e.mainIndex):e}select(e){let{view:n}=this,r=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function Zse(t,e){let n=t.state.facet(F_);return n.length?n[0](e):me.mac?e.metaKey:e.ctrlKey}function zse(t,e){let n=t.state.facet(Y_);return n.length?n[0](e):me.mac?!e.altKey:!e.ctrlKey}function Xse(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=Qu(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o<i.length;o++){let a=i[o];if(a.left<=e.clientX&&a.right>=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function Vse(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=mt.get(n))&&r.ignoreEvent(e))return!1;return!0}const _i=Object.create(null),Hr=Object.create(null),vS=me.ie&&me.ie_version<15||me.ios&&me.webkit_version<604;function Fse(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),bS(t,n.value)},50)}function cp(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function bS(t,e){e=cp(t.state,m3,e);let{state:n}=t,r,i=1,o=n.toText(e),a=o.lines==n.selection.ranges.length;if(C3!=null&&n.selection.ranges.every(l=>l.empty)&&C3==o.toString()){let l=-1;r=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let f=n.toText((a?o.line(i++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:f},range:U.cursor(c.from+f.length)}})}else a?r=n.changeByRange(l=>{let c=o.line(i++);return{changes:{from:l.from,to:l.to,insert:c.text},range:U.cursor(l.from+c.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Hr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},_i.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1),Hr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},Hr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},_i.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(q_))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=Wse(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new Bse(t,e,n,r)),r&&t.observer.ignore(()=>{b_(t.contentDOM);let o=t.root.activeElement;o&&!o.contains(t.contentDOM)&&o.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function wS(t,e,n,r){if(r==1)return U.cursor(e,n);if(r==2)return wse(t.state,e,n);{let i=en.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),a=i?i.posAtStart:o.from,s=i?i.posAtEnd:o.to;return s<t.state.doc.length&&s==o.to&&s++,U.range(a,s)}}let xS=(t,e,n)=>e>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function Yse(t,e,n,r){let i=en.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let a=i.coordsAt(o,-1);if(a&&xS(n,r,a))return-1;let s=i.coordsAt(o,1);return s&&xS(n,r,s)?1:a&&a.bottom>=r?-1:1}function _S(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:Yse(t,n,e.clientX,e.clientY)}}const qse=me.ie&&me.ie_version<=11;let SS=null,kS=0,CS=0;function PS(t){if(!qse)return t.detail;let e=SS,n=CS;return SS=t,CS=Date.now(),kS=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(kS+1)%3:1}function Wse(t,e){let n=_S(t,e),r=PS(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,a,s){let l=_S(t,o),c,u=wS(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!a){let f=wS(t,n.pos,n.bias,r),d=Math.min(f.from,u.from),h=Math.max(f.to,u.to);u=d<u.from?U.range(d,h):U.range(h,d)}return a?i.replaceRange(i.main.extend(u.from,u.to)):s&&r==1&&i.ranges.length>1&&(c=Use(i,l.pos))?c:s?i.addRange(u):U.create([u])}}}function Use(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return U.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}_i.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,a=o+i.length;(o>=n.to||a<=n.from)&&(n=U.range(o,a))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",cp(t.state,g3,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1},_i.dragend=t=>(t.inputState.draggedContent=null,!1);function ES(t,e,n,r){if(n=cp(t.state,m3,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,a=r&&o&&zse(t,e)?{from:o.from,to:o.to}:null,s={from:i,insert:n},l=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}_i.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&ES(t,e,r.filter(a=>a!=null).join(t.state.lineBreak),!1)};for(let a=0;a<n.length;a++){let s=new FileReader;s.onerror=o,s.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(s.result)||(r[a]=s.result),o()},s.readAsText(n[a])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return ES(t,e,r,!0),!0}return!1},_i.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=vS?null:e.clipboardData;return n?(bS(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(Fse(t),!1)};function Hse(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function Gse(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let a=t.doc.lineAt(o);a.number>i&&(e.push(a.text),n.push({from:a.from,to:Math.min(t.doc.length,a.to+1)})),i=a.number}r=!0}return{text:cp(t,g3,e.join(t.lineBreak)),ranges:n,linewise:r}}let C3=null;_i.copy=_i.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=Gse(t.state);if(!n&&!i)return!1;C3=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=vS?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(Hse(t,n),!1)};const TS=Hi.define();function AS(t,e){let n=[];for(let r of t.facet(H_)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:TS.of(!0)}):null}function MS(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=AS(t.state,e);n?t.dispatch(n):t.update([])}},10)}Hr.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),MS(t)},Hr.blur=t=>{t.observer.clearSelectionRange(),MS(t)},Hr.compositionstart=Hr.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))},Hr.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,me.chrome&&me.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))},Hr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},_i.beforeinput=(t,e)=>{var n,r;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let o=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),a=e.getTargetRanges();if(o&&a.length){let s=a[0],l=t.posAtDOM(s.startContainer,s.startOffset),c=t.posAtDOM(s.endContainer,s.endOffset);return k3(t,{from:l,to:c,insert:t.state.toText(o)},null),!0}}let i;if(me.chrome&&me.android&&(i=OS.find(o=>o.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let o=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>o+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return me.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),me.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>Hr.compositionend(t,e),20),!1};const QS=new Set;function Kse(t){QS.has(t)||(QS.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const DS=["pre-wrap","normal","pre-line","break-spaces"];let Yl=!1;function $S(){Yl=!1}class Jse{constructor(e){this.lineWrapping=e,this.doc=He.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return DS.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,o,a){let s=DS.indexOf(e)>-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,l){this.heightSamples={};for(let c=0;c<a.length;c++){let u=a[c];u<0?c++:this.heightSamples[Math.floor(u*10)]=!0}}return l}}class ele{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class to{constructor(e,n,r,i,o){this.from=e,this.length=n,this.top=r,this.height=i,this._content=o}get type(){return typeof this._content=="number"?Wn.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Qa?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new to(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var Et=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(Et||(Et={}));const up=.001;class Un{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>up&&(Yl=!0),this.height=e)}replace(e,n,r){return Un.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,a=r.doc;for(let s=i.length-1;s>=0;s--){let{fromA:l,toA:c,fromB:u,toB:f}=i[s],d=o.lineAt(l,Et.ByPosNoHeight,r.setDoc(n),0,0),h=d.to>=c?d:o.lineAt(c,Et.ByPosNoHeight,r,0,0);for(f+=h.to-c,c=h.to;s>0&&d.from<=i[s-1].toA;)l=i[s-1].fromA,u=i[s-1].fromB,s--,l<d.from&&(d=o.lineAt(l,Et.ByPosNoHeight,r,0,0));u+=d.from-l,l=d.from;let m=P3.build(r.setDoc(a),e,u,f);o=fp(o,o.replace(l,c,m))}return o.updateHeight(r,0)}static empty(){return new _r(0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,o=0;for(;;)if(n==r)if(i>o*2){let s=e[n-1];s.break?e.splice(--n,1,s.left,null,s.right):e.splice(--n,1,s.left,s.right),r+=1+s.break,i-=s.size}else if(o>i*2){let s=e[r];s.break?e.splice(r,1,s.left,null,s.right):e.splice(r,1,s.left,s.right),r+=2+s.break,o-=s.size}else break;else if(i<o){let s=e[n++];s&&(i+=s.size)}else{let s=e[--r];s&&(o+=s.size)}let a=0;return e[n-1]==null?(a=1,n--):e[n]==null&&(a=1,r++),new tle(Un.of(e.slice(0,n)),a,Un.of(e.slice(r)))}}function fp(t,e){return t==e?t:(t.constructor!=e.constructor&&(Yl=!0),e)}Un.prototype.size=1;class LS extends Un{constructor(e,n,r){super(e,n),this.deco=r}blockAt(e,n,r,i){return new to(i,this.length,r,this.height,this.deco||0)}lineAt(e,n,r,i,o){return this.blockAt(0,r,i,o)}forEachLine(e,n,r,i,o,a){e<=o+this.length&&n>=o&&a(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class _r extends LS{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new to(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof _r||i instanceof En&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof En?i=new _r(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Un.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class En extends Un{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+1,a,s=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*o);a=l/o,this.length>o+1&&(s=(this.height-l)/(this.length-o-1))}else a=this.height/o;return{firstLine:r,lastLine:i,perLine:a,perChar:s}}blockAt(e,n,r,i){let{firstLine:o,lastLine:a,perLine:s,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let c=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),u=n.doc.lineAt(c),f=s+u.length*l,d=Math.max(r,e-f/2);return new to(u.from,u.length,d,f,0)}else{let c=Math.max(0,Math.min(a-o,Math.floor((e-r)/s))),{from:u,length:f}=n.doc.line(o+c);return new to(u,f,r+s*c,s,0)}}lineAt(e,n,r,i,o){if(n==Et.ByHeight)return this.blockAt(e,r,i,o);if(n==Et.ByPosNoHeight){let{from:h,to:m}=r.doc.lineAt(e);return new to(h,m-h,0,0,0)}let{firstLine:a,perLine:s,perChar:l}=this.heightMetrics(r,o),c=r.doc.lineAt(e),u=s+c.length*l,f=c.number-a,d=i+s*f+l*(c.from-o-f);return new to(c.from,c.length,Math.max(i,Math.min(d,i+this.height-u)),u,0)}forEachLine(e,n,r,i,o,a){e=Math.max(e,o),n=Math.min(n,o+this.length);let{firstLine:s,perLine:l,perChar:c}=this.heightMetrics(r,o);for(let u=e,f=i;u<=n;){let d=r.doc.lineAt(u);if(u==e){let m=d.number-s;f+=l*m+c*(e-o-m)}let h=l+c*d.length;a(new to(d.from,d.length,f,h,0)),f+=h,u=d.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let o=r[r.length-1];o instanceof En?r[r.length-1]=new En(o.length+i):r.push(null,new En(i-1))}if(e>0){let o=r[0];o instanceof En?r[0]=new En(e+o.length):r.unshift(new En(e-1),null)}return Un.of(r)}decomposeLeft(e,n){n.push(new En(e-1),null)}decomposeRight(e,n){n.push(null,new En(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let a=[],s=Math.max(n,i.from),l=-1;for(i.from>n&&a.push(new En(i.from-n-1).updateHeight(e,n));s<=o&&i.more;){let u=e.doc.lineAt(s).length;a.length&&a.push(null);let f=i.heights[i.index++];l==-1?l=f:Math.abs(f-l)>=up&&(l=-2);let d=new _r(u,f);d.outdated=!1,a.push(d),s+=u+1}s<=o&&a.push(null,new En(o-s).updateHeight(e,s));let c=Un.of(a);return(l<0||Math.abs(c.height-this.height)>=up||Math.abs(l-this.heightMetrics(e,n).perLine)>=up)&&(Yl=!0),fp(this,c)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class tle extends Un{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return e<o?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,o,i+this.left.length+this.break)}lineAt(e,n,r,i,o){let a=i+this.left.height,s=o+this.left.length+this.break,l=n==Et.ByHeight?e<a:e<s,c=l?this.left.lineAt(e,n,r,i,o):this.right.lineAt(e,n,r,a,s);if(this.break||(l?c.to<s:c.from>s))return c;let u=n==Et.ByPosNoHeight?Et.ByPosNoHeight:Et.ByPos;return l?c.join(this.right.lineAt(s,u,r,a,s)):this.left.lineAt(s,u,r,i,o).join(c)}forEachLine(e,n,r,i,o,a){let s=i+this.left.height,l=o+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,n,r,i,o,a),n>=l&&this.right.forEachLine(e,n,r,s,l,a);else{let c=this.lineAt(l,Et.ByPos,r,i,o);e<c.from&&this.left.forEachLine(e,c.from-1,r,i,o,a),c.to>=e&&c.from<=n&&a(c),n>c.to&&this.right.forEachLine(c.to+1,n,r,s,l,a)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let a=o.length;for(let s of r)o.push(s);if(e>0&&IS(o,a-1),n<this.length){let s=o.length;this.decomposeRight(n,o),IS(o,s)}return Un.of(o)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?Un.of(this.break?[e,null,n]:[e,n]):(this.left=fp(this.left,e),this.right=fp(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:o,right:a}=this,s=n+o.length+this.break,l=null;return i&&i.from<=n+o.length&&i.more?l=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=s+a.length&&i.more?l=a=a.updateHeight(e,s,r,i):a.updateHeight(e,s,r),l?this.balanced(o,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function IS(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof En&&(r=t[e+1])instanceof En&&t.splice(e-1,3,new En(n.length+1+r.length))}const nle=5;class P3{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof _r?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new _r(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,o=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let a=n-e;r.block?this.addBlock(new LS(a,i,r)):(a||o||i>=nle)&&this.addLineDeco(i,o,a)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new _r(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new En(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof _r)return e;let n=new _r(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof _r)&&!this.isCovered?this.nodes.push(new _r(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof _r&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let o=new P3(r,e);return Ue.spans(n,r,i,o,0),o.finish(r)}}function rle(t,e,n){let r=new ile;return Ue.compare(t,e,n,r,0),r.changes}class ile{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&np(e,n,this.changes,5)}}function ole(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),a=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let c=t.parentNode;c&&c!=r.body;)if(c.nodeType==1){let u=c,f=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&f.overflow!="visible"){let d=u.getBoundingClientRect();o=Math.max(o,d.left),a=Math.min(a,d.right),s=Math.max(s,d.top),l=Math.min(c==t.parentNode?i.innerHeight:l,d.bottom)}c=f.position=="absolute"||f.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:o-n.left,right:Math.max(o,a)-n.left,top:s-(n.top+e),bottom:Math.max(s,l)-(n.top+e)}}function ale(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function sle(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class E3{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=n[r];if(i.from!=o.from||i.to!=o.to||i.size!=o.size)return!1}return!0}draw(e,n){return Se.replace({widget:new lle(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class lle extends Ji{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class jS{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=NS,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Pt.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(y3).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new Jse(n),this.stateDeco=e.facet(Ru).filter(r=>typeof r!="function"),this.heightMap=Un.empty().applyChanges(this.stateDeco,He.empty,this.heightOracle.setDoc(e.doc),[new Ur(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Se.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:a})=>i>=o&&i<=a)){let{from:o,to:a}=this.lineBlockAt(i);e.push(new dp(o,a))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?NS:new T3(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(zu(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(Ru).filter(u=>typeof u!="function");let i=e.changedRanges,o=Ur.extendWithRanges(i,rle(r,this.stateDeco,e?e.changes:an.empty(this.state.doc.length))),a=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);$S(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=a||Yl)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let l=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<l.from||n.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(K_)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Pt.RTL:Pt.LTR;let a=this.heightOracle.mustRefreshForWrapping(o),s=n.getBoundingClientRect(),l=a||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let c=0,u=0;if(s.width&&s.height){let{scaleX:b,scaleY:y}=v_(n,s);(b>.005&&Math.abs(this.scaleX-b)>.005||y>.005&&Math.abs(this.scaleY-y)>.005)&&(this.scaleX=b,this.scaleY=y,c|=16,a=l=!0)}let f=(parseInt(r.paddingTop)||0)*this.scaleY,d=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=d)&&(this.paddingTop=f,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=__(e.scrollDOM);let m=(this.printing?sle:ole)(n,this.paddingTop),g=m.top-this.pixelViewport.top,p=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let O=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(O!=this.inView&&(this.inView=O,O&&(l=!0)),!this.inView&&!this.scrollTarget&&!ale(e.dom))return 0;let w=s.width;if((this.contentDOMWidth!=w||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let b=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(b)&&(a=!0),a||i.lineWrapping&&Math.abs(w-this.contentDOMWidth)>i.charWidth){let{lineHeight:y,charWidth:x,textHeight:_}=e.docView.measureTextSize();a=y>0&&i.refresh(o,y,x,_,w/x,b),a&&(e.docView.minWidth=0,c|=16)}g>0&&p>0?u=Math.max(g,p):g<0&&p<0&&(u=Math.min(g,p)),$S();for(let y of this.viewports){let x=y.from==this.viewport.from?b:e.docView.measureVisibleLineHeights(y);this.heightMap=(a?Un.empty().applyChanges(this.stateDeco,He.empty,this.heightOracle,[new Ur(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,a,new ele(y.from,x))}Yl&&(c|=2)}let v=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return v&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:a,visibleBottom:s}=this,l=new dp(i.lineAt(a-r*1e3,Et.ByHeight,o,0,0).from,i.lineAt(s+(1-r)*1e3,Et.ByHeight,o,0,0).to);if(n){let{head:c}=n.range;if(c<l.from||c>l.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=i.lineAt(c,Et.ByPos,o,0,0),d;n.y=="center"?d=(f.top+f.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c<l.from?d=f.top:d=f.bottom-u,l=new dp(i.lineAt(d-1e3/2,Et.ByHeight,o,0,0).from,i.lineAt(d+u+1e3/2,Et.ByHeight,o,0,0).to)}}return l}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new dp(this.heightMap.lineAt(r,Et.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,Et.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,Et.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(n,Et.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:s}=this;return(e==0||i<=a-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||o>=s+Math.max(10,Math.min(r,250)))&&i>a-2*1e3&&o<s+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new E3(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,o=i>>1,a=i<<1;if(this.defaultTextDirection!=Pt.LTR&&!r)return[];let s=[],l=(u,f,d,h)=>{if(f-u<o)return;let m=this.state.selection.main,g=[m.from];m.empty||g.push(m.to);for(let O of g)if(O>u&&O<f){l(u,O-10,d,h),l(O+10,f,d,h);return}let p=ule(e,O=>O.from>=d.from&&O.to<=d.to&&Math.abs(O.from-u)<o&&Math.abs(O.to-f)<o&&!g.some(w=>O.from<w&&O.to>w));if(!p){if(f<d.to&&n&&r&&n.visibleRanges.some(v=>v.from<=f&&v.to>=f)){let v=n.moveToLineBoundary(U.cursor(f),!1,!0).head;v>u&&(f=v)}let O=this.gapSize(d,u,f,h),w=r||O<2e6?O:2e6;p=new E3(u,f,O,w)}s.push(p)},c=u=>{if(u.length<a||u.type!=Wn.Text)return;let f=cle(u.from,u.to,this.stateDeco);if(f.total<a)return;let d=this.scrollTarget?this.scrollTarget.range.head:null,h,m;if(r){let g=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,p,O;if(d!=null){let w=pp(f,d),v=((this.visibleBottom-this.visibleTop)/2+g)/u.height;p=w-v,O=w+v}else p=(this.visibleTop-u.top-g)/u.height,O=(this.visibleBottom-u.top+g)/u.height;h=hp(f,p),m=hp(f,O)}else{let g=f.total*this.heightOracle.charWidth,p=i*this.heightOracle.charWidth,O=0;if(g>2e6)for(let x of e)x.from>=u.from&&x.from<u.to&&x.size!=x.displaySize&&x.from*this.heightOracle.charWidth+O<this.pixelViewport.left&&(O=x.size-x.displaySize);let w=this.pixelViewport.left+O,v=this.pixelViewport.right+O,b,y;if(d!=null){let x=pp(f,d),_=((v-w)/2+p)/g;b=x-_,y=x+_}else b=(w-p)/g,y=(v+p)/g;h=hp(f,b),m=hp(f,y)}h>u.from&&l(u.from,h,u,f),m<u.to&&l(m,u.to,u,f)};for(let u of this.viewportLines)Array.isArray(u.type)?u.type.forEach(c):c(u);return s}gapSize(e,n,r,i){let o=pp(i,r)-pp(i,n);return this.heightOracle.lineWrapping?e.height*o:i.total*this.heightOracle.charWidth*o}updateLineGaps(e){E3.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Se.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];Ue.spans(n,this.viewport.from,this.viewport.to,{span(o,a){r.push({from:o,to:a})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let o=0;o<r.length&&!(i&8);o++){let a=this.visibleRanges[o],s=r[o];(a.from!=s.from||a.to!=s.to)&&(i|=4,e&&e.mapPos(a.from,-1)==s.from&&e.mapPos(a.to,1)==s.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||zu(this.heightMap.lineAt(e,Et.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||zu(this.heightMap.lineAt(this.scaler.fromDOM(e),Et.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return zu(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class dp{constructor(e,n){this.from=e,this.to=n}}function cle(t,e,n){let r=[],i=t,o=0;return Ue.spans(n,t,e,{span(){},point(a,s){a>i&&(r.push({from:i,to:a}),o+=a-i),i=s}},20),i<e&&(r.push({from:i,to:e}),o+=e-i),{total:o,ranges:r}}function hp({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:a}=e[i],s=a-o;if(r<=s)return o+r;r-=s}}function pp(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function ule(t,e){for(let n of t)if(e(n))return n}const NS={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class T3{constructor(e,n,r){let i=0,o=0,a=0;this.viewports=r.map(({from:s,to:l})=>{let c=n.lineAt(s,Et.ByPos,e,0,0).top,u=n.lineAt(l,Et.ByPos,e,0,0).bottom;return i+=u-c,{from:s,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let s of this.viewports)s.domTop=a+(s.top-o)*this.scale,a=s.domBottom=s.domTop+(s.bottom-s.top),o=s.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.top)return i+(e-r)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);r=o.bottom,i=o.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.domTop)return r+(e-i)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);r=o.bottom,i=o.domBottom}}eq(e){return e instanceof T3?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,r)=>n.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function zu(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new to(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>zu(i,e)):t._content)}const mp=pe.define({combine:t=>t.join(" ")}),A3=pe.define({combine:t=>t.indexOf(!0)>-1}),M3=Ta.newName(),RS=Ta.newName(),BS=Ta.newName(),ZS={"&light":"."+RS,"&dark":"."+BS};function Q3(t,e,n){return new Ta(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const fle=Q3("."+M3,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},ZS),dle={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},D3=me.ie&&me.ie_version<=11;class hle{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Uae,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(me.ie&&me.ie_version<=11||me.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(me.chrome&&me.chrome_version<126)&&(this.editContext=new mle(e),e.state.facet(Zo)&&(e.contentDOM.editContext=this.editContext.editContext)),D3&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Zo)?r.root.activeElement!=this.dom:!Kh(this.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(me.ie&&me.ie_version<=11||me.android&&me.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Du(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Qu(e.root);if(!n)return!1;let r=me.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&ple(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=Kh(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&Gae(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,dle),D3&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),D3&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&zl(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let o of e){let a=this.readMutation(o);a&&(a.typeOver&&(i=!0),n==-1?{from:n,to:r}=a:(n=Math.min(a.from,n),r=Math.max(a.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Kh(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new Mse(this.view,e,n,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=mS(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=zS(n,e.previousSibling||e.target.previousSibling,-1),i=zS(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Zo)!=e.state.facet(Zo)&&(e.view.contentDOM.editContext=e.state.facet(Zo)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function zS(t,e,n){for(;e;){let r=mt.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function XS(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return Du(a.node,a.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function ple(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return XS(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?XS(t,n):null}class mle{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:o,head:a}=i,s=this.toEditorPos(r.updateRangeStart),l=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:s,drifted:!1});let c={from:s,to:l,insert:He.of(r.text.split(`
715
715
  `))};if(c.from==this.from&&o<this.from?c.from=o:c.to==this.to&&o>this.to&&(c.to=o),c.from==c.to&&!c.insert.length){let u=U.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));u.main.eq(i)||e.dispatch({selection:u,userEvent:"select"});return}if((me.mac||me.android)&&c.from==a-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(c={from:s,to:l,insert:He.of([r.text.replace("."," ")])}),this.pendingContextChange=c,!e.state.readOnly){let u=this.to-this.from+(c.to-c.from+c.insert.length);k3(e,c,U.single(this.toEditorPos(r.selectionStart,u),this.toEditorPos(r.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=r=>{let i=[],o=null;for(let a=this.toEditorPos(r.rangeStart),s=this.toEditorPos(r.rangeEnd);a<s;a++){let l=e.coordsForChar(a);o=l&&new DOMRect(l.left,l.top,l.right-l.left,l.bottom-l.top)||o||new DOMRect,i.push(o)}n.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let o of r.getTextFormats()){let a=o.underlineStyle,s=o.underlineThickness;if(a!="None"&&s!="None"){let l=this.toEditorPos(o.rangeStart),c=this.toEditorPos(o.rangeEnd);if(l<c){let u=`text-decoration: underline ${a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${s=="Thin"?1:2}px`;i.push(Se.mark({attributes:{style:u}}).range(l,c))}}}e.dispatch({effects:eS.of(Se.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Qu(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((o,a,s,l,c)=>{if(r)return;let u=c.length-(a-o);if(i&&a>=i.to)if(i.from==o&&i.to==a&&i.insert.eq(c)){i=this.pendingContextChange=null,n+=u,this.to+=u;return}else i=null,this.revertPending(e.state);if(o+=n,a+=n,a<=this.from)this.from+=u,this.to+=u;else if(o<this.to){if(o<this.from||a>this.to||this.to-this.from+c.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(a),c.toString()),this.to+=u}n+=u}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class ae{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(o=>r(o,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Hae(e.parent)||document,this.viewState=new jS(e.state||Xe.create(e)),e.scrollTo&&e.scrollTo.is(ip)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Nu).map(i=>new O3(i));for(let i of this.plugins)i.update(this);this.observer=new hle(this),this.inputState=new Ise(this),this.inputState.ensureHandlers(this.plugins),this.docView=new aS(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof Jt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,o=this.state;for(let d of e){if(d.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=d.state}if(this.destroyed){this.viewState.state=o;return}let a=this.hasFocus,s=0,l=null;e.some(d=>d.annotation(TS))?(this.inputState.notifiedFocused=a,s=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,l=AS(o,a),l||(s=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(u=null)):this.observer.clear(),o.facet(Xe.phrases)!=this.state.facet(Xe.phrases))return this.setState(o);i=op.create(this,o,e),i.flags|=s;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(f&&(f=f.map(d.changes)),d.scrollIntoView){let{main:h}=d.state.selection;f=new Fl(h.empty?h:U.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of d.effects)h.is(ip)&&(f=h.value.clip(this.state))}this.viewState.update(i,f),this.bidiCache=gp.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Bu)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(mp)!=i.state.facet(mp)&&(this.viewState.mustMeasureContent=!0),(n||r||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let d of this.state.facet(p3))try{d(i)}catch(h){ar(this.state,h,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!mS(this,u)&&c.force&&zl(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new jS(e),this.plugins=e.facet(Nu).map(r=>new O3(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new aS(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Nu),r=e.state.facet(Nu);if(n!=r){let i=[];for(let o of r){let a=n.indexOf(o);if(a<0)i.push(new O3(o));else{let s=this.plugins[a];s.mustUpdate=e,i.push(s)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){ar(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:a}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let s=0;;s++){if(a<0)if(__(r))o=-1,a=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(i);o=h.from,a=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(s>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(h=>{try{return h.read(this)}catch(m){return ar(this.state,m),VS}}),f=op.create(this,this.state,[]),d=!1;f.flags|=l,n?n.flags|=l:n=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f),d&&this.docViewUpdate());for(let h=0;h<c.length;h++)if(u[h]!=VS)try{let m=c[h];m.write&&m.write(u[h],this)}catch(m){ar(this.state,m)}if(d&&this.docView.updateSelection(!0),!f.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let m=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-a;if(m>1||m<-1){i=i+m,r.scrollTop=i/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let s of this.state.facet(p3))s(n)}get themeClasses(){return M3+" "+(this.state.facet(A3)?BS:RS)+" "+this.state.facet(mp)}updateAttrs(){let e=FS(this,tS,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Zo)?"true":"false",class:"cm-content",style:`${me.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),FS(this,y3,n);let r=this.observer.ignore(()=>{let i=l3(this.contentDOM,this.contentAttrs,n),o=l3(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(ae.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Bu);let e=this.state.facet(ae.cspNonce);Ta.mount(this.root,this.styleModules.concat(fle).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.spec!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return S3(this,e,hS(this,e,n,r))}moveByGroup(e,n){return S3(this,e,hS(this,e,n,r=>Pse(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),o=r[n?r.length-1:0];return U.cursor(o.side(n,i)+e.from,o.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return Cse(this,e,n,r)}moveVertically(e,n,r){return S3(this,e,Ese(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),fS(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),a=o[Da.find(o,e-i.from,-1,n)];return $u(r,a.dir==Pt.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(G_)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>gle)return X_(e.length);let n=this.textDirectionAt(e.from),r;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||z_(o.isolates,r=iS(this,e))))return o.order;r||(r=iS(this,e));let i=use(e.text,n,r);return this.bidiCache.push(new gp(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||me.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{b_(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return ip.of(new Fl(typeof e=="number"?U.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return ip.of(new Fl(U.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Yt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Yt.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Ta.newName(),i=[mp.of(r),Bu.of(Q3(`.${r}`,e))];return n&&n.dark&&i.push(A3.of(!0)),i}static baseTheme(e){return jo.lowest(Bu.of(Q3("."+M3,e,ZS)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&mt.get(r)||mt.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}ae.styleModule=Bu,ae.inputHandler=U_,ae.clipboardInputFilter=m3,ae.clipboardOutputFilter=g3,ae.scrollHandler=J_,ae.focusChangeEffect=H_,ae.perLineTextDirection=G_,ae.exceptionSink=W_,ae.updateListener=p3,ae.editable=Zo,ae.mouseSelectionStyle=q_,ae.dragMovesSelection=Y_,ae.clickAddsSelectionRange=F_,ae.decorations=Ru,ae.outerDecorations=nS,ae.atomicRanges=v3,ae.bidiIsolatedRanges=rS,ae.scrollMargins=oS,ae.darkTheme=A3,ae.cspNonce=pe.define({combine:t=>t.length?t[0]:""}),ae.contentAttributes=y3,ae.editorAttributes=tS,ae.lineWrapping=ae.contentAttributes.of({class:"cm-lineWrapping"}),ae.announce=$e.define();const gle=4096,VS={};class gp{constructor(e,n,r,i,o,a){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=a}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Pt.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let a=e[o];a.dir==i&&!n.touchesRange(a.from,a.to)&&r.push(new gp(n.mapPos(a.from,1),n.mapPos(a.to,-1),a.dir,a.isolates,!1,a.order))}return r}}function FS(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let o=r[i],a=typeof o=="function"?o(t):o;a&&s3(a,n)}return n}const Ole=me.mac?"mac":me.windows?"win":me.linux?"linux":"key";function yle(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,a,s;for(let l=0;l<n.length-1;++l){const c=n[l];if(/^(cmd|meta|m)$/i.test(c))s=!0;else if(/^a(lt)?$/i.test(c))i=!0;else if(/^(c|ctrl|control)$/i.test(c))o=!0;else if(/^s(hift)?$/i.test(c))a=!0;else if(/^mod$/i.test(c))e=="mac"?s=!0:o=!0;else throw new Error("Unrecognized modifier name: "+c)}return i&&(r="Alt-"+r),o&&(r="Ctrl-"+r),s&&(r="Meta-"+r),a&&(r="Shift-"+r),r}function Op(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const vle=jo.default(ae.domEventHandlers({keydown(t,e){return WS(qS(e.state),t,e,"editor")}})),ql=pe.define({enables:vle}),YS=new WeakMap;function qS(t){let e=t.facet(ql),n=YS.get(e);return n||YS.set(e,n=xle(e.reduce((r,i)=>r.concat(i),[]))),n}function ble(t,e,n){return WS(qS(t.state),e,t,n)}let $a=null;const wle=4e3;function xle(t,e=Ole){let n=Object.create(null),r=Object.create(null),i=(a,s)=>{let l=r[a];if(l==null)r[a]=s;else if(l!=s)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},o=(a,s,l,c,u)=>{var f,d;let h=n[a]||(n[a]=Object.create(null)),m=s.split(/ (?!$)/).map(O=>yle(O,e));for(let O=1;O<m.length;O++){let w=m.slice(0,O).join(" ");i(w,!0),h[w]||(h[w]={preventDefault:!0,stopPropagation:!1,run:[v=>{let b=$a={view:v,prefix:w,scope:a};return setTimeout(()=>{$a==b&&($a=null)},wle),!0}]})}let g=m.join(" ");i(g,!1);let p=h[g]||(h[g]={preventDefault:!1,stopPropagation:!1,run:((d=(f=h._any)===null||f===void 0?void 0:f.run)===null||d===void 0?void 0:d.slice())||[]});l&&p.run.push(l),c&&(p.preventDefault=!0),u&&(p.stopPropagation=!0)};for(let a of t){let s=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let c of s){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=a;for(let d in u)u[d].run.push(h=>f(h,$3))}let l=a[e]||a.key;if(l)for(let c of s)o(c,l,a.run,a.preventDefault,a.stopPropagation),a.shift&&o(c,"Shift-"+l,a.shift,a.preventDefault,a.stopPropagation)}return n}let $3=null;function WS(t,e,n,r){$3=e;let i=Fae(e),o=ir(i,0),a=Wi(o)==i.length&&i!=" ",s="",l=!1,c=!1,u=!1;$a&&$a.view==n&&$a.scope==r&&(s=$a.prefix+" ",yS.indexOf(e.keyCode)<0&&(c=!0,$a=null));let f=new Set,d=p=>{if(p){for(let O of p.run)if(!f.has(O)&&(f.add(O),O(n)))return p.stopPropagation&&(u=!0),!0;p.preventDefault&&(p.stopPropagation&&(u=!0),c=!0)}return!1},h=t[r],m,g;return h&&(d(h[s+Op(i,e,!a)])?l=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(me.windows&&e.ctrlKey&&e.altKey)&&(m=Aa[e.keyCode])&&m!=i?(d(h[s+Op(m,e,!0)])||e.shiftKey&&(g=Mu[e.keyCode])!=i&&g!=m&&d(h[s+Op(g,e,!1)]))&&(l=!0):a&&e.shiftKey&&d(h[s+Op(i,e,!0)])&&(l=!0),!l&&d(h._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),$3=null,l}class Xu{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let o=US(e);return[new Xu(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return _le(e,n,r)}}function US(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Pt.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function HS(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let o=t.dom.getBoundingClientRect(),a=(i.top+i.bottom)/2,s=t.posAtCoords({x:o.left+1,y:a}),l=t.posAtCoords({x:o.right-1,y:a});return s==null||l==null?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}function _le(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),o=t.textDirection==Pt.LTR,a=t.contentDOM,s=a.getBoundingClientRect(),l=US(t),c=a.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),f=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),d=s.right-(u?parseInt(u.paddingRight):0),h=_3(t,r,1),m=_3(t,i,-1),g=h.type==Wn.Text?h:null,p=m.type==Wn.Text?m:null;if(g&&(t.lineWrapping||h.widgetLineBreaks)&&(g=HS(t,r,1,g)),p&&(t.lineWrapping||m.widgetLineBreaks)&&(p=HS(t,i,-1,p)),g&&p&&g.from==p.from&&g.to==p.to)return w(v(n.from,n.to,g));{let y=g?v(n.from,null,g):b(h,!1),x=p?v(null,n.to,p):b(m,!0),_=[];return(g||h).to<(p||m).from-(g&&p?1:0)||h.widgetLineBreaks>1&&y.bottom+t.defaultLineHeight/2<x.top?_.push(O(f,y.bottom,d,x.top)):y.bottom<x.top&&t.elementAtHeight((y.bottom+x.top)/2).type==Wn.Text&&(y.bottom=x.top=(y.bottom+x.top)/2),w(y).concat(_).concat(w(x))}function O(y,x,_,E){return new Xu(e,y-l.left,x-l.top,_-y,E-x)}function w({top:y,bottom:x,horizontal:_}){let E=[];for(let A=0;A<_.length;A+=2)E.push(O(_[A],y,_[A+1],x));return E}function v(y,x,_){let E=1e9,A=-1e9,I=[];function Q(R,B,X,V,K){let ne=t.coordsAtPos(R,R==_.to?-2:2),L=t.coordsAtPos(X,X==_.from?2:-2);!ne||!L||(E=Math.min(ne.top,L.top,E),A=Math.max(ne.bottom,L.bottom,A),K==Pt.LTR?I.push(o&&B?f:ne.left,o&&V?d:L.right):I.push(!o&&V?f:L.left,!o&&B?d:ne.right))}let D=y??_.from,j=x??_.to;for(let R of t.visibleRanges)if(R.to>D&&R.from<j)for(let B=Math.max(R.from,D),X=Math.min(R.to,j);;){let V=t.state.doc.lineAt(B);for(let K of t.bidiSpans(V)){let ne=K.from+V.from,L=K.to+V.from;if(ne>=X)break;L>B&&Q(Math.max(ne,B),y==null&&ne<=D,Math.min(L,X),x==null&&L>=j,K.dir)}if(B=V.to+1,B>=X)break}return I.length==0&&Q(D,y==null,j,x==null,t.textDirection),{top:E,bottom:A,horizontal:I}}function b(y,x){let _=s.top+(x?y.top:y.bottom);return{top:_,bottom:_,horizontal:[]}}}function Sle(t,e){return t.constructor==e.constructor&&t.eq(e)}class kle{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(yp)!=e.state.facet(yp)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(yp);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!Sle(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const yp=pe.define();function GS(t){return[Yt.define(e=>new kle(e,t)),yp.of(t)]}const Vu=pe.define({combine(t){return Gi(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function Cle(t={}){return[Vu.of(t),Ple,Ele,Tle,K_.of(!0)]}function KS(t){return t.startState.facet(Vu)!=t.state.facet(Vu)}const Ple=GS({above:!0,markers(t){let{state:e}=t,n=e.facet(Vu),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty||n.drawRangeCursor){let a=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",s=i.empty?i:U.cursor(i.head,i.head>i.anchor?-1:1);for(let l of Xu.forRange(t,a,s))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=KS(t);return n&&JS(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){JS(e.state,t)},class:"cm-cursorLayer"});function JS(t,e){e.style.animationDuration=t.facet(Vu).cursorBlinkRate+"ms"}const Ele=GS({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Xu.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||KS(t)},class:"cm-selectionLayer"}),Tle=jo.highest(ae.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),ek=$e.define({map(t,e){return t==null?null:e.mapPos(t)}}),Fu=pn.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(ek)?r.value:n,t)}}),Ale=Yt.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Fu);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Fu)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Fu),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Fu)!=t&&this.view.dispatch({effects:ek.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Mle(){return[Fu,Ale]}function tk(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),a=n,s;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;s=e.exec(o.value);)i(a+s.index,s)}function Qle(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class Dle{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:o,maxLength:a=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(s,l,c,u)=>i(u,c,c+s[0].length,s,l);else if(typeof r=="function")this.addMatch=(s,l,c,u)=>{let f=r(s,l,c);f&&u(c,c+s[0].length,f)};else if(r)this.addMatch=(s,l,c,u)=>u(c,c+s[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=a}createDeco(e){let n=new No,r=n.add.bind(n);for(let{from:i,to:o}of Qle(e,this.maxLength))tk(e.state.doc,this.regexp,i,o,(a,s)=>this.addMatch(s,e,a,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,a,s,l)=>{l>=e.view.viewport.from&&s<=e.view.viewport.to&&(r=Math.min(s,r),i=Math.max(l,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let o of e.visibleRanges){let a=Math.max(o.from,r),s=Math.min(o.to,i);if(s>a){let l=e.state.doc.lineAt(a),c=l.to<s?e.state.doc.lineAt(s):l,u=Math.max(o.from,l.from),f=Math.min(o.to,c.to);if(this.boundary){for(;a>l.from;a--)if(this.boundary.test(l.text[a-1-l.from])){u=a;break}for(;s<c.to;s++)if(this.boundary.test(c.text[s-c.from])){f=s;break}}let d=[],h,m=(g,p,O)=>d.push(O.range(g,p));if(l==c)for(this.regexp.lastIndex=u-l.from;(h=this.regexp.exec(l.text))&&h.index<f-l.from;)this.addMatch(h,e,h.index+l.from,m);else tk(e.state.doc,this.regexp,u,f,(g,p)=>this.addMatch(p,e,g,m));n=n.update({filterFrom:u,filterTo:f,filter:(g,p)=>g<u||p>f,add:d})}}return n}}const L3=/x/.unicode!=null?"gu":"g",$le=new RegExp(`[\0-\b
716
716
  --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,L3),Lle={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let I3=null;function Ile(){var t;if(I3==null&&typeof document<"u"&&document.body){let e=document.body.style;I3=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return I3||!1}const vp=pe.define({combine(t){let e=Gi(t,{render:null,specialChars:$le,addSpecialChars:null});return(e.replaceTabs=!Ile())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,L3)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,L3)),e}});function jle(t={}){return[vp.of(t),Nle()]}let nk=null;function Nle(){return nk||(nk=Yt.fromClass(class{constructor(t){this.view=t,this.decorations=Se.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(vp)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new Dle({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=ir(e[0],0);if(o==9){let a=i.lineAt(r),s=n.state.tabSize,l=wi(a.text,s,r-a.from);return Se.replace({widget:new zle((s-l%s)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=Se.replace({widget:new Zle(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(vp);t.startState.facet(vp)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const Rle="•";function Ble(t){return t>=32?Rle:t==10?"␤":String.fromCharCode(9216+t)}class Zle extends Ji{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=Ble(this.code),r=e.state.phrase("Control character")+" "+(Lle[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class zle extends Ji{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function Xle(){return Fle}const Vle=Se.line({class:"cm-activeLine"}),Fle=Yt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(Vle.range(i.from)),e=i.from)}return Se.set(n)}},{decorations:t=>t.decorations});class Yle extends Ji{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?Bl(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=$u(n[0],r.direction!="rtl"),o=parseInt(r.lineHeight);return i.bottom-i.top>o*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+o}:i}ignoreEvent(){return!1}}function qle(t){let e=Yt.fromClass(class{constructor(n){this.view=n,this.placeholder=t?Se.set([Se.widget({widget:new Yle(t),side:1}).range(0)]):Se.none}get decorations(){return this.view.state.doc.length?Se.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,ae.contentAttributes.of({"aria-placeholder":t})]:e}const j3=2e3;function Wle(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>j3||n.off>j3||e.col<0||n.col<0){let a=Math.min(e.off,n.off),s=Math.max(e.off,n.off);for(let l=r;l<=i;l++){let c=t.doc.line(l);c.length<=s&&o.push(U.range(c.from+a,c.to+s))}}else{let a=Math.min(e.col,n.col),s=Math.max(e.col,n.col);for(let l=r;l<=i;l++){let c=t.doc.line(l),u=GO(c.text,a,t.tabSize,!0);if(u<0)o.push(U.cursor(c.to));else{let f=GO(c.text,s,t.tabSize);o.push(U.range(c.from+u,c.from+f))}}}return o}function Ule(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function rk(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>j3?-1:i==r.length?Ule(t,e.clientX):wi(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function Hle(t,e){let n=rk(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),a=i.state.doc.lineAt(o);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},r=r.map(i.changes)}},get(i,o,a){let s=rk(t,i);if(!s)return r;let l=Wle(t.state,n,s);return l.length?a?U.create(l.concat(r.ranges)):U.create(l):r}}:null}function Gle(t){let e=n=>n.altKey&&n.button==0;return ae.mouseSelectionStyle.of((n,r)=>e(r)?Hle(n,r):null)}const Kle={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},Jle={style:"cursor: crosshair"};function ece(t={}){let[e,n]=Kle[t.key||"Alt"],r=Yt.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,ae.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?Jle:null})]}const Yu="-10000px";class ik{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(a=>a);let o=null;this.tooltipViews=this.tooltips.map(a=>o=r(a,o))}update(e,n){var r;let i=e.state.facet(this.facet),o=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let a=[],s=n?[]:null;for(let l=0;l<o.length;l++){let c=o[l],u=-1;if(c){for(let f=0;f<this.tooltips.length;f++){let d=this.tooltips[f];d&&d.create==c.create&&(u=f)}if(u<0)a[l]=this.createTooltipView(c,l?a[l-1]:null),s&&(s[l]=!!c.above);else{let f=a[l]=this.tooltipViews[u];s&&(s[l]=n[u]),f.update&&f.update(e)}}}for(let l of this.tooltipViews)a.indexOf(l)<0&&(this.removeTooltipView(l),(r=l.destroy)===null||r===void 0||r.call(l));return n&&(s.forEach((l,c)=>n[c]=l),n.length=s.length),this.input=i,this.tooltips=o,this.tooltipViews=a,!0}}function tce(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const N3=pe.define({combine:t=>{var e,n,r;return{position:me.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||tce}}}),ok=new WeakMap,R3=Yt.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(N3);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new ik(t,B3,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(N3);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=Yu,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:o}=this.manager.tooltipViews[0];if(me.gecko)n=o.offsetParent!=this.container.ownerDocument.body;else if(o.style.top==Yu&&o.style.left=="0px"){let a=o.getBoundingClientRect();n=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}}if(n||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(t=o.width/this.parent.offsetWidth,e=o.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=b3(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((o,a)=>{let s=this.manager.tooltipViews[a];return s.getCoords?s.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(N3).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let s of this.manager.tooltipViews)s.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:o}=t,a=[];for(let s=0;s<this.manager.tooltips.length;s++){let l=this.manager.tooltips[s],c=this.manager.tooltipViews[s],{dom:u}=c,f=t.pos[s],d=t.size[s];if(!f||l.clip!==!1&&(f.bottom<=Math.max(n.top,r.top)||f.top>=Math.min(n.bottom,r.bottom)||f.right<Math.max(n.left,r.left)-.1||f.left>Math.min(n.right,r.right)+.1)){u.style.top=Yu;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,m=h?7:0,g=d.right-d.left,p=(e=ok.get(c))!==null&&e!==void 0?e:d.bottom-d.top,O=c.offset||rce,w=this.view.textDirection==Pt.LTR,v=d.width>r.right-r.left?w?r.left:r.right-d.width:w?Math.max(r.left,Math.min(f.left-(h?14:0)+O.x,r.right-g)):Math.min(Math.max(r.left,f.left-g+(h?14:0)-O.x),r.right-g),b=this.above[s];!l.strictSide&&(b?f.top-p-m-O.y<r.top:f.bottom+p+m+O.y>r.bottom)&&b==r.bottom-f.bottom>f.top-r.top&&(b=this.above[s]=!b);let y=(b?f.top-r.top:r.bottom-f.bottom)-m;if(y<p&&c.resize!==!1){if(y<this.view.defaultLineHeight){u.style.top=Yu;continue}ok.set(c,p),u.style.height=(p=y)/o+"px"}else u.style.height&&(u.style.height="");let x=b?f.top-p-m-O.y:f.bottom+m+O.y,_=v+g;if(c.overlap!==!0)for(let E of a)E.left<_&&E.right>v&&E.top<x+p&&E.bottom>x&&(x=b?E.top-p-2-m:E.bottom+m+2);if(this.position=="absolute"?(u.style.top=(x-t.parent.top)/o+"px",ak(u,(v-t.parent.left)/i)):(u.style.top=x/o+"px",ak(u,v/i)),h){let E=f.left+(w?O.x:-O.x)-(v+14-7);h.style.left=E/i+"px"}c.overlap!==!0&&a.push({left:v,top:x,right:_,bottom:x+p}),u.classList.toggle("cm-tooltip-above",b),u.classList.toggle("cm-tooltip-below",!b),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Yu}},{eventObservers:{scroll(){this.maybeMeasure()}}});function ak(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const nce=ae.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),rce={x:0,y:0},B3=pe.define({enables:[R3,nce]}),bp=pe.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class wp{static create(e){return new wp(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new ik(e,bp,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const ice=B3.compute([bp],t=>{let e=t.facet(bp);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:wp.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class oce{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.nearest(n.target);if(!r)return;let i,o=1;if(r instanceof Ma)i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let s=e.coordsAtPos(i);if(!s||n.y<s.top||n.y>s.bottom||n.x<s.left-e.defaultCharacterWidth||n.x>s.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(u=>u.from<=i&&u.to>=i),c=l&&l.dir==Pt.RTL?-1:1;o=n.x<s.left?-c:c}let a=this.source(e,i,o);if(a!=null&&a.then){let s=this.pending={pos:i};a.then(l=>{this.pending==s&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>ar(e.state,l,"hover tooltip"))}else a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])})}get tooltip(){let e=this.view.plugin(R3),n=e?e.manager.tooltips.findIndex(r=>r.create==wp.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:o}=this;if(i.length&&o&&!ace(o.dom,e)||this.pending){let{pos:a}=i[0]||this.pending,s=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:a;(a==s?this.view.posAtCoords(this.lastMove)!=a:!sce(this.view,a,s,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const xp=4;function ace(t,e){let{left:n,right:r,top:i,bottom:o}=t.getBoundingClientRect(),a;if(a=t.querySelector(".cm-tooltip-arrow")){let s=a.getBoundingClientRect();i=Math.min(s.top,i),o=Math.max(s.bottom,o)}return e.clientX>=n-xp&&e.clientX<=r+xp&&e.clientY>=i-xp&&e.clientY<=o+xp}function sce(t,e,n,r,i,o){let a=t.scrollDOM.getBoundingClientRect(),s=t.documentTop+t.documentPadding.top+t.contentHeight;if(a.left>r||a.right<r||a.top>i||Math.min(a.bottom,s)<i)return!1;let l=t.posAtCoords({x:r,y:i},!1);return l>=e&&l<=n}function lce(t,e={}){let n=$e.define(),r=pn.define({create(){return[]},update(i,o){if(i.length&&(e.hideOnChange&&(o.docChanged||o.selection)?i=[]:e.hideOn&&(i=i.filter(a=>!e.hideOn(o,a))),o.docChanged)){let a=[];for(let s of i){let l=o.changes.mapPos(s.pos,-1,Cn.TrackDel);if(l!=null){let c=Object.assign(Object.create(null),s);c.pos=l,c.end!=null&&(c.end=o.changes.mapPos(c.end)),a.push(c)}}i=a}for(let a of o.effects)a.is(n)&&(i=a.value),a.is(cce)&&(i=[]);return i},provide:i=>bp.from(i)});return{active:r,extension:[r,Yt.define(i=>new oce(i,t,r,n,e.hoverTime||300)),ice]}}function sk(t,e){let n=t.plugin(R3);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const cce=$e.define(),lk=pe.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function qu(t,e){let n=t.plugin(ck),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const ck=Yt.fromClass(class{constructor(t){this.input=t.state.facet(Wu),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(lk);this.top=new _p(t,!0,e.topContainer),this.bottom=new _p(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(lk);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new _p(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new _p(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Wu);if(n!=this.input){let r=n.filter(l=>l),i=[],o=[],a=[],s=[];for(let l of r){let c=this.specs.indexOf(l),u;c<0?(u=l(t.view),s.push(u)):(u=this.panels[c],u.update&&u.update(t)),i.push(u),(u.top?o:a).push(u)}this.specs=r,this.panels=i,this.top.sync(o),this.bottom.sync(a);for(let l of s)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>ae.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class _p{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=uk(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=uk(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function uk(t){let e=t.nextSibling;return t.remove(),e}const Wu=pe.define({enables:ck});class zo extends ks{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}zo.prototype.elementClass="",zo.prototype.toDOM=void 0,zo.prototype.mapMode=Cn.TrackBefore,zo.prototype.startSide=zo.prototype.endSide=-1,zo.prototype.point=!0;const Sp=pe.define(),uce=pe.define(),fce={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ue.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Uu=pe.define();function dce(t){return[dk(),Uu.of(Object.assign(Object.assign({},fce),t))]}const fk=pe.define({combine:t=>t.some(e=>e)});function dk(t){return[hce]}const hce=Yt.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Uu).map(e=>new pk(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(fk),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(fk)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=Ue.iter(this.view.state.facet(Sp),this.view.viewport.from),r=[],i=this.gutters.map(o=>new pce(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let a=!0;for(let s of o.type)if(s.type==Wn.Text&&a){Z3(n,r,s.from);for(let l of i)l.line(this.view,s,r);a=!1}else if(s.widget)for(let l of i)l.widget(this.view,s)}else if(o.type==Wn.Text){Z3(n,r,o.from);for(let a of i)a.line(this.view,o,r)}else if(o.widget)for(let a of i)a.widget(this.view,o);for(let o of i)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Uu),n=t.state.facet(Uu),r=t.docChanged||t.heightChanged||t.viewportChanged||!Ue.eq(t.startState.facet(Sp),t.state.facet(Sp),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let a=e.indexOf(o);a<0?i.push(new pk(this.view,o)):(this.gutters[a].update(t),i.push(this.gutters[a]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>ae.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==Pt.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function hk(t){return Array.isArray(t)?t:[t]}function Z3(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class pce{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Ue.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=(n.top-this.height)/e.scaleY,a=n.height/e.scaleY;if(this.i==i.elements.length){let s=new mk(e,a,o,r);i.elements.push(s),i.dom.appendChild(s.dom)}else i.elements[this.i].update(e,a,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];Z3(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let a=this.gutter;i.length==0&&!a.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let o of e.state.facet(uce)){let a=o(e,n.widget,n);a&&(i||(i=[])).push(a)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class pk{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.target,a;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let l=o.getBoundingClientRect();a=(l.top+l.bottom)/2}else a=i.clientY;let s=e.lineBlockAtHeight(a-e.documentTop);n.domEventHandlers[r](e,s,i)&&i.preventDefault()});this.markers=hk(n.markers(e)),n.initialSpacer&&(this.spacer=new mk(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=hk(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Ue.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class mk{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),mce(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,a=0;;){let s=a,l=o<n.length?n[o++]:null,c=!1;if(l){let u=l.elementClass;u&&(r+=" "+u);for(let f=a;f<this.markers.length;f++)if(this.markers[f].compare(l)){s=f,c=!0;break}}else s=this.markers.length;for(;a<s;){let u=this.markers[a++];if(u.toDOM){u.destroy(i);let f=i.nextSibling;i.remove(),i=f}}if(!l)break;l.toDOM&&(c?i=i.nextSibling:this.dom.insertBefore(l.toDOM(e),i)),c&&a++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function mce(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const gce=pe.define(),Oce=pe.define(),Wl=pe.define({combine(t){return Gi(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let o=r[i],a=n[i];r[i]=o?(s,l,c)=>o(s,l,c)||a(s,l,c):a}return r}})}});class z3 extends zo{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function X3(t,e){return t.state.facet(Wl).formatNumber(e,t.state)}const yce=Uu.compute([Wl],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(gce)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new z3(X3(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(Oce)){let o=i(e,n,r);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(Wl)!=e.state.facet(Wl),initialSpacer(e){return new z3(X3(e,gk(e.state.doc.lines)))},updateSpacer(e,n){let r=X3(n.view,gk(n.view.state.doc.lines));return r==e.number?e:new z3(r)},domEventHandlers:t.facet(Wl).domEventHandlers}));function vce(t={}){return[Wl.of(t),dk(),yce]}function gk(t){let e=9;for(;e<t;)e=e*10+9;return e}const bce=new class extends zo{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},wce=Sp.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(bce.range(i)))}return Ue.of(e)});function xce(){return wce}const Ok=1024;let _ce=0;class Gr{constructor(e,n){this.from=e,this.to=n}}class Qe{constructor(e={}){this.id=_ce++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=sn.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Qe.closedBy=new Qe({deserialize:t=>t.split(" ")}),Qe.openedBy=new Qe({deserialize:t=>t.split(" ")}),Qe.group=new Qe({deserialize:t=>t.split(" ")}),Qe.isolate=new Qe({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}}),Qe.contextHash=new Qe({perNode:!0}),Qe.lookAhead=new Qe({perNode:!0}),Qe.mounted=new Qe({perNode:!0});class Hu{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[Qe.mounted.id]}}const Sce=Object.create(null);class sn{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):Sce,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new sn(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Qe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Qe.group),o=-1;o<(i?i.length:0);o++){let a=n[o<0?r.name:i[o]];if(a)return a}}}}sn.none=new sn("",Object.create(null),0,8);class Gu{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let o of e){let a=o(r);a&&(i||(i=Object.assign({},r.props)),i[a[0].id]=a[1])}n.push(i?new sn(r.name,i,r.id,r.flags):r)}return new Gu(n)}}const kp=new WeakMap,yk=new WeakMap;var _t;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(_t||(_t={}));class ot{constructor(e,n,r,i,o){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[a,s]of o)this.props[typeof a=="number"?a:a.id]=s}}toString(){let e=Hu.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new Cp(this.topNode,e)}cursorAt(e,n=0,r=0){let i=kp.get(this)||this.topNode,o=new Cp(i);return o.moveTo(e,n),kp.set(this,o._tree),o}get topNode(){return new Nn(this,0,0,null)}resolve(e,n=0){let r=Ku(kp.get(this)||this.topNode,e,n,!1);return kp.set(this,r),r}resolveInner(e,n=0){let r=Ku(yk.get(this)||this.topNode,e,n,!0);return yk.set(this,r),r}resolveStack(e,n=0){return Pce(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:o=this.length}=e,a=e.mode||0,s=(a&_t.IncludeAnonymous)>0;for(let l=this.cursor(a|_t.IncludeAnonymous);;){let c=!1;if(l.from<=o&&l.to>=i&&(!s&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(s||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:q3(sn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new ot(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new ot(sn.none,n,r,i)))}static build(e){return Ece(e)}}ot.empty=new ot(sn.none,[],[],0);class V3{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new V3(this.buffer,this.index)}}class La{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return sn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,r==e)return o;let a=[];for(;e<r;)a.push(this.childString(e)),e=this.buffer[e+3];return o+"("+a.join(",")+")"}findChild(e,n,r,i,o){let{buffer:a}=this,s=-1;for(let l=e;l!=n&&!(vk(o,i,a[l+1],a[l+2])&&(s=l,r>0));l=a[l+3]);return s}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),a=0;for(let s=e,l=0;s<n;){o[l++]=i[s++],o[l++]=i[s++]-r;let c=o[l++]=i[s++]-r;o[l++]=i[s++]-e,a=Math.max(a,c)}return new La(o,a,this.set)}}function vk(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Ku(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let a=!r&&t instanceof Nn&&t.index<0?null:t.parent;if(!a)return t;t=a}let o=r?0:_t.IgnoreOverlays;if(r)for(let a=t,s=a.parent;s;a=s,s=a.parent)a instanceof Nn&&a.index<0&&((i=s.enter(e,n,o))===null||i===void 0?void 0:i.from)!=a.from&&(t=s);for(;;){let a=t.enter(e,n,o);if(!a)return t;t=a}}class bk{cursor(e=0){return new Cp(this,e)}getChild(e,n=null,r=null){let i=wk(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return wk(this,e,n,r)}resolve(e,n=0){return Ku(this,e,n,!1)}resolveInner(e,n=0){return Ku(this,e,n,!0)}matchContext(e){return F3(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class Nn extends bk{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,o=0){for(let a=this;;){for(let{children:s,positions:l}=a._tree,c=n>0?s.length:-1;e!=c;e+=n){let u=s[e],f=l[e]+a.from;if(vk(i,r,f,f+u.length)){if(u instanceof La){if(o&_t.ExcludeBuffers)continue;let d=u.findChild(0,u.buffer.length,n,r-f,i);if(d>-1)return new no(new kce(a,u,e,f),null,d)}else if(o&_t.IncludeAnonymous||!u.type.isAnonymous||Y3(u)){let d;if(!(o&_t.IgnoreMounts)&&(d=Hu.get(u))&&!d.overlay)return new Nn(d.tree,f,e,a);let h=new Nn(u,f,e,a);return o&_t.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(n<0?u.children.length-1:0,n,r,i)}}}if(o&_t.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+n:e=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&_t.IgnoreOverlays)&&(i=Hu.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:a,to:s}of i.overlay)if((n>0?a<=o:a<o)&&(n<0?s>=o:s>o))return new Nn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function wk(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let a=!1;!a;)if(a=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function F3(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class kce{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class no extends bk{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new no(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&_t.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new no(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new no(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new no(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let a=r.buffer[this.index+1];e.push(r.slice(i,o,a)),n.push(0)}return new ot(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function xk(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;o<t.length;o++){let a=t[o];(a.from>n.from||a.to<n.to)&&(n=a,e=o)}let r=n instanceof Nn&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new Cce(i,n)}class Cce{constructor(e,n){this.heads=e,this.node=n}get next(){return xk(this.heads)}}function Pce(t,e,n){let r=t.resolveInner(e,n),i=null;for(let o=r instanceof Nn?r:r.context.parent;o;o=o.parent)if(o.index<0){let a=o.parent;(i||(i=[r])).push(a.resolve(e,n)),o=a}else{let a=Hu.get(o.tree);if(a&&a.overlay&&a.overlay[0].from<=e&&a.overlay[a.overlay.length-1].to>=e){let s=new Nn(a.tree,a.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(Ku(s,e,n,!1))}}return i?xk(i):r}class Cp{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Nn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Nn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&_t.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&_t.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&_t.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let o=n+e,a=e<0?-1:r._tree.children.length;o!=a;o+=e){let s=r._tree.children[o];if(this.mode&_t.IncludeAnonymous||s instanceof La||!s.type.isAnonymous||Y3(s))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,o=this.stack.length;o>=0;){for(let a=e;a;a=a._parent)if(a.index==i){if(i==this.index)return a;n=a,r=o+1;break e}i=this.stack[--o]}for(let i=r;i<this.stack.length;i++)n=new no(this.buffer,n,this.stack[i]);return this.bufferNode=new no(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return F3(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return F3(this._tree,e,i);let a=r[n.buffer[this.stack[o]]];if(!a.isAnonymous){if(e[i]&&e[i]!=a.name)return!1;i--}}return!0}}function Y3(t){return t.children.some(e=>e instanceof La||!e.type.isAnonymous||Y3(e))}function Ece(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=Ok,reused:o=[],minRepeatType:a=r.types.length}=t,s=Array.isArray(n)?new V3(n,n.length):n,l=r.types,c=0,u=0;function f(y,x,_,E,A,I){let{id:Q,start:D,end:j,size:R}=s,B=u,X=c;for(;R<0;)if(s.next(),R==-1){let fe=o[Q];_.push(fe),E.push(D-y);return}else if(R==-3){c=Q;return}else if(R==-4){u=Q;return}else throw new RangeError(`Unrecognized record size: ${R}`);let V=l[Q],K,ne,L=D-y;if(j-D<=i&&(ne=p(s.pos-x,A))){let fe=new Uint16Array(ne.size-ne.skip),oe=s.pos-ne.size,T=fe.length;for(;s.pos>oe;)T=O(ne.start,fe,T);K=new La(fe,j-ne.start,r),L=ne.start-y}else{let fe=s.pos-R;s.next();let oe=[],T=[],W=Q>=a?Q:-1,ee=0,we=j;for(;s.pos>fe;)W>=0&&s.id==W&&s.size>=0?(s.end<=we-i&&(m(oe,T,D,ee,s.end,we,W,B,X),ee=oe.length,we=s.end),s.next()):I>2500?d(D,fe,oe,T):f(D,fe,oe,T,W,I+1);if(W>=0&&ee>0&&ee<oe.length&&m(oe,T,D,ee,D,we,W,B,X),oe.reverse(),T.reverse(),W>-1&&ee>0){let Ze=h(V,X);K=q3(V,oe,T,0,oe.length,0,j-D,Ze,Ze)}else K=g(V,oe,T,j-D,B-j,X)}_.push(K),E.push(L)}function d(y,x,_,E){let A=[],I=0,Q=-1;for(;s.pos>x;){let{id:D,start:j,end:R,size:B}=s;if(B>4)s.next();else{if(Q>-1&&j<Q)break;Q<0&&(Q=R-i),A.push(D,j,R),I++,s.next()}}if(I){let D=new Uint16Array(I*4),j=A[A.length-2];for(let R=A.length-3,B=0;R>=0;R-=3)D[B++]=A[R],D[B++]=A[R+1]-j,D[B++]=A[R+2]-j,D[B++]=B;_.push(new La(D,A[2]-j,r)),E.push(j-y)}}function h(y,x){return(_,E,A)=>{let I=0,Q=_.length-1,D,j;if(Q>=0&&(D=_[Q])instanceof ot){if(!Q&&D.type==y&&D.length==A)return D;(j=D.prop(Qe.lookAhead))&&(I=E[Q]+D.length+j)}return g(y,_,E,A,I,x)}}function m(y,x,_,E,A,I,Q,D,j){let R=[],B=[];for(;y.length>E;)R.push(y.pop()),B.push(x.pop()+_-A);y.push(g(r.types[Q],R,B,I-A,D-I,j)),x.push(A-_)}function g(y,x,_,E,A,I,Q){if(I){let D=[Qe.contextHash,I];Q=Q?[D].concat(Q):[D]}if(A>25){let D=[Qe.lookAhead,A];Q=Q?[D].concat(Q):[D]}return new ot(y,x,_,E,Q)}function p(y,x){let _=s.fork(),E=0,A=0,I=0,Q=_.end-i,D={size:0,start:0,skip:0};e:for(let j=_.pos-y;_.pos>j;){let R=_.size;if(_.id==x&&R>=0){D.size=E,D.start=A,D.skip=I,I+=4,E+=4,_.next();continue}let B=_.pos-R;if(R<0||B<j||_.start<Q)break;let X=_.id>=a?4:0,V=_.start;for(_.next();_.pos>B;){if(_.size<0)if(_.size==-3)X+=4;else break e;else _.id>=a&&(X+=4);_.next()}A=V,E+=R,I+=X}return(x<0||E==y)&&(D.size=E,D.start=A,D.skip=I),D.size>4?D:void 0}function O(y,x,_){let{id:E,start:A,end:I,size:Q}=s;if(s.next(),Q>=0&&E<a){let D=_;if(Q>4){let j=s.pos-(Q-4);for(;s.pos>j;)_=O(y,x,_)}x[--_]=D,x[--_]=I-y,x[--_]=A-y,x[--_]=E}else Q==-3?c=E:Q==-4&&(u=E);return _}let w=[],v=[];for(;s.pos>0;)f(t.start||0,t.bufferStart||0,w,v,-1,0);let b=(e=t.length)!==null&&e!==void 0?e:w.length?v[0]+w[0].length:0;return new ot(l[t.topID],w.reverse(),v.reverse(),b)}const _k=new WeakMap;function Pp(t,e){if(!t.isAnonymous||e instanceof La||e.type!=t)return 1;let n=_k.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof ot)){n=1;break}n+=Pp(t,r)}_k.set(e,n)}return n}function q3(t,e,n,r,i,o,a,s,l){let c=0;for(let m=r;m<i;m++)c+=Pp(t,e[m]);let u=Math.ceil(c*1.5/8),f=[],d=[];function h(m,g,p,O,w){for(let v=p;v<O;){let b=v,y=g[v],x=Pp(t,m[v]);for(v++;v<O;v++){let _=Pp(t,m[v]);if(x+_>=u)break;x+=_}if(v==b+1){if(x>u){let _=m[b];h(_.children,_.positions,0,_.children.length,g[b]+w);continue}f.push(m[b])}else{let _=g[v-1]+m[v-1].length-y;f.push(q3(t,m,g,b,v,y,_,null,l))}d.push(y+w-o)}}return h(e,n,r,i,0),(s||l)(f,d,a)}class Sk{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof no?this.setBuffer(e.context.buffer,e.index,n):e instanceof Nn&&this.map.set(e.tree,n)}get(e){return e instanceof no?this.getBuffer(e.context.buffer,e.index):e instanceof Nn?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Xo{constructor(e,n,r,i,o=!1,a=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new Xo(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,a=e.length?e[0]:null;for(let s=0,l=0,c=0;;s++){let u=s<n.length?n[s]:null,f=u?u.fromA:1e9;if(f-l>=r)for(;a&&a.from<f;){let d=a;if(l>=d.from||f<=d.to||c){let h=Math.max(d.from,l)-c,m=Math.min(d.to,f)-c;d=h>=m?null:new Xo(h,m,d.tree,d.offset+c,s>0,!!u)}if(d&&i.push(d),a.to>f)break;a=o<e.length?e[o++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return i}}class W3{startParse(e,n,r){return typeof e=="string"&&(e=new Tce(e)),r=r?r.length?r.map(i=>new Gr(i.from,i.to)):[new Gr(0,0)]:[new Gr(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}}class Tce{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function kk(t){return(e,n,r,i)=>new Mce(e,t,n,r,i)}class Ck{constructor(e,n,r,i,o){this.parser=e,this.parse=n,this.overlay=r,this.target=i,this.from=o}}function Pk(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class Ace{constructor(e,n,r,i,o,a,s){this.parser=e,this.predicate=n,this.mounts=r,this.index=i,this.start=o,this.target=a,this.prev=s,this.depth=0,this.ranges=[]}}const U3=new Qe({perNode:!0});class Mce{constructor(e,n,r,i,o){this.nest=n,this.input=r,this.fragments=i,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new ot(r.type,r.children,r.positions,r.length,r.propValues.concat([[U3,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[Qe.mounted.id]=new Hu(n,e.overlay,e.parser),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new $ce(this.fragments),n=null,r=null,i=new Cp(new Nn(this.baseTree,this.ranges[0].from,0,null),_t.IncludeAnonymous|_t.IgnoreMounts);e:for(let o,a;;){let s=!0,l;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)s=!1;else if(e.hasNode(i)){if(n){let c=n.mounts.find(u=>u.frag.from<=i.from&&u.frag.to>=i.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let f=u.from+c.pos,d=u.to+c.pos;f>=i.from&&d<=i.to&&!n.ranges.some(h=>h.from<d&&h.to>f)&&n.ranges.push({from:f,to:d})}}s=!1}else if(r&&(a=Qce(r.ranges,i.from,i.to)))s=a!=2;else if(!i.type.isAnonymous&&(o=this.nest(i,this.input))&&(i.from<i.to||!o.overlay)){i.tree||Dce(i);let c=e.findMounts(i.from,o.parser);if(typeof o.overlay=="function")n=new Ace(o.parser,o.overlay,c,this.inner.length,i.from,i.tree,n);else{let u=Ak(this.ranges,o.overlay||(i.from<i.to?[new Gr(i.from,i.to)]:[]));u.length&&Pk(u),(u.length||!o.overlay)&&this.inner.push(new Ck(o.parser,u.length?o.parser.startParse(this.input,Mk(c,u),u):o.parser.startParse(""),o.overlay?o.overlay.map(f=>new Gr(f.from-i.from,f.to-i.from)):null,i.tree,u.length?u[0].from:i.from)),o.overlay?u.length&&(r={ranges:u,depth:0,prev:r}):s=!1}}else if(n&&(l=n.predicate(i))&&(l===!0&&(l=new Gr(i.from,i.to)),l.from<l.to)){let c=n.ranges.length-1;c>=0&&n.ranges[c].to==l.from?n.ranges[c]={from:n.ranges[c].from,to:l.to}:n.ranges.push(l)}if(s&&i.firstChild())n&&n.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(n&&!--n.depth){let c=Ak(this.ranges,n.ranges);c.length&&(Pk(c),this.inner.splice(n.index,0,new Ck(n.parser,n.parser.startParse(this.input,Mk(n.mounts,c),c),n.ranges.map(u=>new Gr(u.from-n.start,u.to-n.start)),n.target,c[0].from))),n=n.prev}r&&!--r.depth&&(r=r.prev)}}}}function Qce(t,e,n){for(let r of t){if(r.from>=n)break;if(r.to>e)return r.from<=e&&r.to>=n?2:1}return 0}function Ek(t,e,n,r,i,o){if(e<n){let a=t.buffer[e+1];r.push(t.slice(e,n,a)),i.push(a-o)}}function Dce(t){let{node:e}=t,n=[],r=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let i=t.tree,o=i.children.indexOf(r),a=i.children[o],s=a.buffer,l=[o];function c(u,f,d,h,m,g){let p=n[g],O=[],w=[];Ek(a,u,p,O,w,h);let v=s[p+1],b=s[p+2];l.push(O.length);let y=g?c(p+4,s[p+3],a.set.types[s[p]],v,b-v,g-1):e.toTree();return O.push(y),w.push(v-h),Ek(a,s[p+3],f,O,w,h),new ot(d,O,w,m)}i.children[o]=c(0,s.length,sn.none,0,a.length,n.length-1);for(let u of l){let f=t.tree.children[u],d=t.tree.positions[u];t.yield(new Nn(f,d+t.from,u,t._tree))}}class Tk{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(_t.IncludeAnonymous|_t.IgnoreMounts)}moveTo(e){let{cursor:n}=this,r=e-this.offset;for(;!this.done&&n.from<r;)n.to>=e&&n.enter(r,1,_t.IgnoreOverlays|_t.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof ot)n=n.children[0];else break}return!1}}let $ce=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(n=r.tree.prop(U3))!==null&&n!==void 0?n:r.to,this.inner=new Tk(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(U3))!==null&&e!==void 0?e:n.to,this.inner=new Tk(n.tree,-n.offset)}}findMounts(e,n){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let o=this.inner.cursor.node;o;o=o.parent){let a=(r=o.tree)===null||r===void 0?void 0:r.prop(Qe.mounted);if(a&&a.parser==n)for(let s=this.fragI;s<this.fragments.length;s++){let l=this.fragments[s];if(l.from>=o.to)break;l.tree==this.curFrag.tree&&i.push({frag:l,pos:o.from-l.offset,mount:a})}}}return i}};function Ak(t,e){let n=null,r=e;for(let i=1,o=0;i<t.length;i++){let a=t[i-1].to,s=t[i].from;for(;o<r.length;o++){let l=r[o];if(l.from>=s)break;l.to<=a||(n||(r=n=e.slice()),l.from<a?(n[o]=new Gr(l.from,a),l.to>s&&n.splice(o+1,0,new Gr(s,l.to))):l.to>s?n[o--]=new Gr(s,l.to):n.splice(o--,1))}}return r}function Lce(t,e,n,r){let i=0,o=0,a=!1,s=!1,l=-1e9,c=[];for(;;){let u=i==t.length?1e9:a?t[i].to:t[i].from,f=o==e.length?1e9:s?e[o].to:e[o].from;if(a!=s){let d=Math.max(l,n),h=Math.min(u,f,r);d<h&&c.push(new Gr(d,h))}if(l=Math.min(u,f),l==1e9)break;u==l&&(a?(a=!1,i++):a=!0),f==l&&(s?(s=!1,o++):s=!0)}return c}function Mk(t,e){let n=[];for(let{pos:r,mount:i,frag:o}of t){let a=r+(i.overlay?i.overlay[0].from:0),s=a+i.tree.length,l=Math.max(o.from,a),c=Math.min(o.to,s);if(i.overlay){let u=i.overlay.map(d=>new Gr(d.from+r,d.to+r)),f=Lce(e,u,l,c);for(let d=0,h=l;;d++){let m=d==f.length,g=m?c:f[d].from;if(g>h&&n.push(new Xo(h,g,i.tree,-a,o.from>=h||o.openStart,o.to<=g||o.openEnd)),m)break;h=f[d].to}}else n.push(new Xo(l,c,i.tree,-a,o.from>=a||o.openStart,o.to<=s||o.openEnd))}return n}let Ice=0,ro=class T5{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=Ice++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof T5&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new T5(r,[],null,[]);if(i.set.push(i),n)for(let o of n.set)i.set.push(o);return i}static defineModifier(e){let n=new Ep(e);return r=>r.modified.indexOf(n)>-1?r:Ep.get(r.base||r,r.modified.concat(n).sort((i,o)=>i.id-o.id))}},jce=0;class Ep{constructor(e){this.name=e,this.instances=[],this.id=jce++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(s=>s.base==e&&Nce(n,s.modified));if(r)return r;let i=[],o=new ro(e.name,i,e,n);for(let s of n)s.instances.push(o);let a=Rce(n);for(let s of e.set)if(!s.modified.length)for(let l of a)i.push(Ep.get(s,l));return o}}function Nce(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function Rce(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function io(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],a=2,s=i;for(let f=0;;){if(s=="..."&&f>0&&f+3==i.length){a=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!d)throw new RangeError("Invalid path: "+i);if(o.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==i.length)break;let h=i[f++];if(f==i.length&&h=="!"){a=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);s=i.slice(f)}let l=o.length-1,c=o[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new Tp(r,a,l>0?o.slice(0,l):null);e[c]=u.sort(e[c])}}return Qk.add(e)}const Qk=new Qe;class Tp{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Tp.empty=new Tp([],2,null);function Dk(t,e){let n=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))n[o.tag.id]=o.class;else for(let a of o.tag)n[a.id]=o.class;let{scope:r,all:i=null}=e||{};return{style:o=>{let a=i;for(let s of o)for(let l of s.set){let c=n[l.id];if(c){a=a?a+" "+c:c;break}}return a},scope:r}}function Bce(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function Zce(t,e,n,r=0,i=t.length){let o=new zce(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class zce{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:a,from:s,to:l}=e;if(s>=r||l<=n)return;a.isTop&&(o=this.highlighters.filter(h=>!h.scope||h.scope(a)));let c=i,u=Xce(e)||Tp.empty,f=Bce(o,u.tags);if(f&&(c&&(c+=" "),c+=f,u.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(Math.max(n,s),c),u.opaque)return;let d=e.tree&&e.tree.prop(Qe.mounted);if(d&&d.overlay){let h=e.node.enter(d.overlay[0].from+s,1),m=this.highlighters.filter(p=>!p.scope||p.scope(d.tree.type)),g=e.firstChild();for(let p=0,O=s;;p++){let w=p<d.overlay.length?d.overlay[p]:null,v=w?w.from+s:l,b=Math.max(n,O),y=Math.min(r,v);if(b<y&&g)for(;e.from<y&&(this.highlightRange(e,b,y,i,o),this.startSpan(Math.min(y,e.to),c),!(e.to>=v||!e.nextSibling())););if(!w||v>r)break;O=w.to+s,O>n&&(this.highlightRange(h.cursor(),Math.max(n,w.from+s),Math.min(r,O),"",m),this.startSpan(Math.min(r,O),c))}g&&e.parent()}else if(e.firstChild()){d&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function Xce(t){let e=t.type.prop(Qk);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const se=ro.define,Ap=se(),Ia=se(),$k=se(Ia),Lk=se(Ia),ja=se(),Mp=se(ja),H3=se(ja),oo=se(),Ts=se(oo),ao=se(),so=se(),G3=se(),Ju=se(G3),Qp=se(),M={comment:Ap,lineComment:se(Ap),blockComment:se(Ap),docComment:se(Ap),name:Ia,variableName:se(Ia),typeName:$k,tagName:se($k),propertyName:Lk,attributeName:se(Lk),className:se(Ia),labelName:se(Ia),namespace:se(Ia),macroName:se(Ia),literal:ja,string:Mp,docString:se(Mp),character:se(Mp),attributeValue:se(Mp),number:H3,integer:se(H3),float:se(H3),bool:se(ja),regexp:se(ja),escape:se(ja),color:se(ja),url:se(ja),keyword:ao,self:se(ao),null:se(ao),atom:se(ao),unit:se(ao),modifier:se(ao),operatorKeyword:se(ao),controlKeyword:se(ao),definitionKeyword:se(ao),moduleKeyword:se(ao),operator:so,derefOperator:se(so),arithmeticOperator:se(so),logicOperator:se(so),bitwiseOperator:se(so),compareOperator:se(so),updateOperator:se(so),definitionOperator:se(so),typeOperator:se(so),controlOperator:se(so),punctuation:G3,separator:se(G3),bracket:Ju,angleBracket:se(Ju),squareBracket:se(Ju),paren:se(Ju),brace:se(Ju),content:oo,heading:Ts,heading1:se(Ts),heading2:se(Ts),heading3:se(Ts),heading4:se(Ts),heading5:se(Ts),heading6:se(Ts),contentSeparator:se(oo),list:se(oo),quote:se(oo),emphasis:se(oo),strong:se(oo),link:se(oo),monospace:se(oo),strikethrough:se(oo),inserted:se(),deleted:se(),changed:se(),invalid:se(),meta:Qp,documentMeta:se(Qp),annotation:se(Qp),processingInstruction:se(Qp),definition:ro.defineModifier("definition"),constant:ro.defineModifier("constant"),function:ro.defineModifier("function"),standard:ro.defineModifier("standard"),local:ro.defineModifier("local"),special:ro.defineModifier("special")};for(let t in M){let e=M[t];e instanceof ro&&(e.name=t)}Dk([{tag:M.link,class:"tok-link"},{tag:M.heading,class:"tok-heading"},{tag:M.emphasis,class:"tok-emphasis"},{tag:M.strong,class:"tok-strong"},{tag:M.keyword,class:"tok-keyword"},{tag:M.atom,class:"tok-atom"},{tag:M.bool,class:"tok-bool"},{tag:M.url,class:"tok-url"},{tag:M.labelName,class:"tok-labelName"},{tag:M.inserted,class:"tok-inserted"},{tag:M.deleted,class:"tok-deleted"},{tag:M.literal,class:"tok-literal"},{tag:M.string,class:"tok-string"},{tag:M.number,class:"tok-number"},{tag:[M.regexp,M.escape,M.special(M.string)],class:"tok-string2"},{tag:M.variableName,class:"tok-variableName"},{tag:M.local(M.variableName),class:"tok-variableName tok-local"},{tag:M.definition(M.variableName),class:"tok-variableName tok-definition"},{tag:M.special(M.variableName),class:"tok-variableName2"},{tag:M.definition(M.propertyName),class:"tok-propertyName tok-definition"},{tag:M.typeName,class:"tok-typeName"},{tag:M.namespace,class:"tok-namespace"},{tag:M.className,class:"tok-className"},{tag:M.macroName,class:"tok-macroName"},{tag:M.propertyName,class:"tok-propertyName"},{tag:M.operator,class:"tok-operator"},{tag:M.comment,class:"tok-comment"},{tag:M.meta,class:"tok-meta"},{tag:M.invalid,class:"tok-invalid"},{tag:M.punctuation,class:"tok-punctuation"}]);var K3;const As=new Qe;function J3(t){return pe.define({combine:t?e=>e.concat(t):void 0})}const e6=new Qe;class Kr{constructor(e,n,r=[],i=""){this.data=e,this.name=i,Xe.prototype.hasOwnProperty("tree")||Object.defineProperty(Xe.prototype,"tree",{get(){return Ot(this)}}),this.parser=n,this.extension=[Na.of(this),Xe.languageData.of((o,a,s)=>{let l=Ik(o,a,s),c=l.type.prop(As);if(!c)return[];let u=o.facet(c),f=l.type.prop(e6);if(f){let d=l.resolve(a-l.from,s);for(let h of f)if(h.test(d,o)){let m=o.facet(h.facet);return h.type=="replace"?m:m.concat(u)}}return u})].concat(r)}isActiveAt(e,n,r=-1){return Ik(e,n,r).type.prop(As)==this.data}findRegions(e){let n=e.facet(Na);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,a)=>{if(o.prop(As)==this.data){r.push({from:a,to:a+o.length});return}let s=o.prop(Qe.mounted);if(s){if(s.tree.prop(As)==this.data){if(s.overlay)for(let l of s.overlay)r.push({from:l.from+a,to:l.to+a});else r.push({from:a,to:a+o.length});return}else if(s.overlay){let l=r.length;if(i(s.tree,s.overlay[0].from+a),r.length>l)return}}for(let l=0;l<o.children.length;l++){let c=o.children[l];c instanceof ot&&i(c,o.positions[l]+a)}};return i(Ot(e),0),r}get allowsNesting(){return!0}}Kr.setState=$e.define();function Ik(t,e,n){let r=t.facet(Na),i=Ot(t).topNode;if(!r||r.allowsNesting)for(let o=i;o;o=o.enter(e,n,_t.ExcludeBuffers))o.type.isTop&&(i=o);return i}class lo extends Kr{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=J3(e.languageData);return new lo(n,e.parser.configure({props:[As.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new lo(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Ot(t){let e=t.field(Kr.state,!1);return e?e.tree:ot.empty}class Vce{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let ef=null;class tf{constructor(e,n,r=[],i,o,a,s,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=a,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new tf(e,n,[],ot.empty,0,r,[],null)}startParse(){return this.parser.startParse(new Vce(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=ot.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Xo.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Xo.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=ef;ef=this;try{return e()}finally{ef=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=jk(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:a,skipped:s}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,f,d)=>l.push({fromA:c,toA:u,fromB:f,toB:d})),r=Xo.applyChanges(r,l),i=ot.empty,o=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){s=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),f=e.mapPos(c.to,-1);u<f&&s.push({from:u,to:f})}}}return new tf(this.parser,n,r,i,o,a,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:o}=this.skipped[r];i<e.to&&o>e.from&&(this.fragments=jk(this.fragments,i,o),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends W3{createParse(n,r,i){let o=i[0].from,a=i[i.length-1].to;return{parsedPos:o,advance(){let l=ef;if(l){for(let c of i)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=a,new ot(sn.none,[],[],a-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return ef}}function jk(t,e,n){return Xo.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Ul{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Ul(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=tf.create(e.facet(Na).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Ul(r)}}Kr.state=pn.define({create:Ul.init,update(t,e){for(let n of e.effects)if(n.is(Kr.setState))return n.value;return e.startState.facet(Na)!=e.state.facet(Na)?Ul.init(e.state):t.apply(e)}});let Nk=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Nk=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const t6=typeof navigator<"u"&&(!((K3=navigator.scheduling)===null||K3===void 0)&&K3.isInputPending)?()=>navigator.scheduling.isInputPending():null,Fce=Yt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Kr.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Kr.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=Nk(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,o=r.field(Kr.state);if(o.tree==o.context.tree&&o.context.isDone(i+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!t6?Math.max(25,e.timeRemaining()-5):1e9),s=o.context.treeLen<i&&r.doc.length>i+1e3,l=o.context.work(()=>t6&&t6()||Date.now()>a,i+(s?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:Kr.setState.of(new Ul(o.context))})),this.chunkBudget>0&&!(l&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>ar(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Na=pe.define({combine(t){return t.length?t[0]:null},enables:t=>[Kr.state,Fce,ae.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class Ra{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class Dp{constructor(e,n,r,i,o,a=void 0){this.name=e,this.alias=n,this.extensions=r,this.filename=i,this.loadFunc=o,this.support=a,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:n,support:r}=e;if(!n){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(r)}return new Dp(e.name,(e.alias||[]).concat(e.name).map(i=>i.toLowerCase()),e.extensions||[],e.filename,n,r)}static matchFilename(e,n){for(let i of e)if(i.filename&&i.filename.test(n))return i;let r=/\.([^.]+)$/.exec(n);if(r){for(let i of e)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(e,n,r=!0){n=n.toLowerCase();for(let i of e)if(i.alias.some(o=>o==n))return i;if(r)for(let i of e)for(let o of i.alias){let a=n.indexOf(o);if(a>-1&&(o.length>2||!/\w/.test(n[a-1])&&!/\w/.test(n[a+o.length])))return i}return null}}const Yce=pe.define(),Hl=pe.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function $p(t){let e=t.facet(Hl);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function nf(t,e){let n="",r=t.tabSize,i=t.facet(Hl)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let o=0;o<e;o++)n+=i;return n}function n6(t,e){t instanceof Xe&&(t=new Lp(t));for(let r of t.state.facet(Yce)){let i=r(t,e);if(i!==void 0)return i}let n=Ot(t.state);return n.length>=e?qce(t,n,e):null}class Lp{constructor(e,n={}){this.state=e,this.options=n,this.unit=$p(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.countColumn(r,e-i),a=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return a>-1&&(o+=a-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return wi(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let a=o(i);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Ba=new Qe;function qce(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let o=[];for(let a=i;a&&!(a.from==r.node.from&&a.type==r.node.type);a=a.parent)o.push(a);for(let a=o.length-1;a>=0;a--)r={node:o[a],next:r}}return Rk(r,t,n)}function Rk(t,e,n){for(let r=t;r;r=r.next){let i=Uce(r.node);if(i)return i(r6.create(e,n,r))}return 0}function Wce(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function Uce(t){let e=t.type.prop(Ba);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(Qe.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return a=>Bk(a,!0,1,void 0,o&&!Wce(a)?i.from:void 0)}return t.parent==null?Hce:null}function Hce(){return 0}class r6 extends Lp{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new r6(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(Gce(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return Rk(this.context.next,this.base,this.pos)}}function Gce(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function Kce(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),a=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let s=n.to;;){let l=e.childAfter(s);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=a)return null;let c=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+c}}s=l.to}}function i6({closing:t,align:e=!0,units:n=1}){return r=>Bk(r,e,n,t)}function Bk(t,e,n,r,i){let o=t.textAfter,a=o.match(/^\s*/)[0].length,s=r&&o.slice(a,a+r.length)==r||i==t.pos+a,l=e?Kce(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*n)}const Jce=t=>t.baseIndent;function Ms({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const eue=200;function tue(){return Xe.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+eue)return t;let o=n.sliceString(i.from,r);if(!e.some(c=>c.test(o)))return t;let{state:a}=t,s=-1,l=[];for(let{head:c}of a.selection.ranges){let u=a.doc.lineAt(c);if(u.from==s)continue;s=u.from;let f=n6(a,u.from);if(f==null)continue;let d=/^\s*/.exec(u.text)[0],h=nf(a,f);d!=h&&l.push({from:u.from,to:u.from+d.length,insert:h})}return l.length?[t,{changes:l,sequential:!0}]:t})}const Zk=pe.define(),Vo=new Qe;function Ip(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function nue(t,e,n){let r=Ot(t);if(r.length<n)return null;let i=r.resolveStack(n,1),o=null;for(let a=i;a;a=a.next){let s=a.node;if(s.to<=n||s.from>n)continue;if(o&&s.from<e)break;let l=s.type.prop(Vo);if(l&&(s.to<r.length-50||r.length==t.doc.length||!rue(s))){let c=l(s,t);c&&c.from<=n&&c.from>=e&&c.to>n&&(o=c)}}return o}function rue(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function jp(t,e,n){for(let r of t.facet(Zk)){let i=r(t,e,n);if(i)return i}return nue(t,e,n)}function zk(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const Np=$e.define({map:zk}),rf=$e.define({map:zk});function Xk(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const Qs=pn.define({create(){return Se.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(Np)&&!iue(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(Yk),i=r?Se.replace({widget:new cue(r(e.state,n.value))}):Uk;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(rf)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:r}=e.selection.main;t.between(r,r,(i,o)=>{i<r&&o>r&&(n=!0)}),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(i,o)=>o<=r||i>=r}))}return t},provide:t=>ae.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(Uk.range(r,i))}return Se.set(e,!0)}});function Rp(t,e,n){var r;let i=null;return(r=t.field(Qs,!1))===null||r===void 0||r.between(e,n,(o,a)=>{(!i||i.from>o)&&(i={from:o,to:a})}),i}function iue(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function Vk(t,e){return t.field(Qs,!1)?e:e.concat($e.appendConfig.of(qk()))}const oue=t=>{for(let e of Xk(t)){let n=jp(t.state,e.from,e.to);if(n)return t.dispatch({effects:Vk(t.state,[Np.of(n),Fk(t,n)])}),!0}return!1},aue=t=>{if(!t.state.field(Qs,!1))return!1;let e=[];for(let n of Xk(t)){let r=Rp(t.state,n.from,n.to);r&&e.push(rf.of(r),Fk(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function Fk(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return ae.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const sue=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:oue},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:aue},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),o=jp(e,i.from,i.to);o&&n.push(Np.of(o)),r=(o?t.lineBlockAt(o.to):i).to+1}return n.length&&t.dispatch({effects:Vk(t.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:t=>{let e=t.state.field(Qs,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(rf.of({from:r,to:i}))}),t.dispatch({effects:n}),!0}}],lue={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Yk=pe.define({combine(t){return Gi(t,lue)}});function qk(t){return[Qs,due]}function Wk(t,e){let{state:n}=t,r=n.facet(Yk),i=a=>{let s=t.lineBlockAt(t.posAtDOM(a.target)),l=Rp(t.state,s.from,s.to);l&&t.dispatch({effects:rf.of(l)}),a.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const Uk=Se.replace({widget:new class extends Ji{toDOM(t){return Wk(t,null)}}});class cue extends Ji{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Wk(e,this.value)}}const uue={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class o6 extends zo{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function fue(t={}){let e=Object.assign(Object.assign({},uue),t),n=new o6(e,!0),r=new o6(e,!1),i=Yt.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(Na)!=a.state.facet(Na)||a.startState.field(Qs,!1)!=a.state.field(Qs,!1)||Ot(a.startState)!=Ot(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let s=new No;for(let l of a.viewportLineBlocks){let c=Rp(a.state,l.from,l.to)?r:jp(a.state,l.from,l.to)?n:null;c&&s.add(l.from,l.from,c)}return s.finish()}}),{domEventHandlers:o}=e;return[i,dce({class:"cm-foldGutter",markers(a){var s;return((s=a.plugin(i))===null||s===void 0?void 0:s.markers)||Ue.empty},initialSpacer(){return new o6(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(a,s,l)=>{if(o.click&&o.click(a,s,l))return!0;let c=Rp(a.state,s.from,s.to);if(c)return a.dispatch({effects:rf.of(c)}),!0;let u=jp(a.state,s.from,s.to);return u?(a.dispatch({effects:Np.of(u)}),!0):!1}})}),qk()]}const due=ae.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class of{constructor(e,n){this.specs=e;let r;function i(s){let l=Ta.newName();return(r||(r=Object.create(null)))["."+l]=s,l}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,a=n.scope;this.scope=a instanceof Kr?s=>s.prop(As)==a.data:a?s=>s==a:void 0,this.style=Dk(e.map(s=>({tag:s.tag,class:s.class||i(Object.assign({},s,{tag:null}))})),{all:o}).style,this.module=r?new Ta(r):null,this.themeType=n.themeType}static define(e,n){return new of(e,n||{})}}const a6=pe.define(),Hk=pe.define({combine(t){return t.length?[t[0]]:null}});function s6(t){let e=t.facet(a6);return e.length?e:t.facet(Hk)}function Gk(t,e){let n=[pue],r;return t instanceof of&&(t.module&&n.push(ae.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(Hk.of(t)):r?n.push(a6.computeN([ae.darkTheme],i=>i.facet(ae.darkTheme)==(r=="dark")?[t]:[])):n.push(a6.of(t)),n}class hue{constructor(e){this.markCache=Object.create(null),this.tree=Ot(e.state),this.decorations=this.buildDeco(e,s6(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Ot(e.state),r=s6(e.state),i=r!=s6(e.startState),{viewport:o}=e.view,a=e.changes.mapPos(this.decoratedTo,1);n.length<o.to&&!i&&n.type==this.tree.type&&a>=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=o.to)}buildDeco(e,n){if(!n||!this.tree.length)return Se.none;let r=new No;for(let{from:i,to:o}of e.visibleRanges)Zce(this.tree,n,(a,s,l)=>{r.add(a,s,this.markCache[l]||(this.markCache[l]=Se.mark({class:l})))},i,o);return r.finish()}}const pue=jo.high(Yt.fromClass(hue,{decorations:t=>t.decorations})),mue=of.define([{tag:M.meta,color:"#404740"},{tag:M.link,textDecoration:"underline"},{tag:M.heading,textDecoration:"underline",fontWeight:"bold"},{tag:M.emphasis,fontStyle:"italic"},{tag:M.strong,fontWeight:"bold"},{tag:M.strikethrough,textDecoration:"line-through"},{tag:M.keyword,color:"#708"},{tag:[M.atom,M.bool,M.url,M.contentSeparator,M.labelName],color:"#219"},{tag:[M.literal,M.inserted],color:"#164"},{tag:[M.string,M.deleted],color:"#a11"},{tag:[M.regexp,M.escape,M.special(M.string)],color:"#e40"},{tag:M.definition(M.variableName),color:"#00f"},{tag:M.local(M.variableName),color:"#30a"},{tag:[M.typeName,M.namespace],color:"#085"},{tag:M.className,color:"#167"},{tag:[M.special(M.variableName),M.macroName],color:"#256"},{tag:M.definition(M.propertyName),color:"#00c"},{tag:M.comment,color:"#940"},{tag:M.invalid,color:"#f00"}]),gue=ae.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Kk=1e4,Jk="()[]{}",eC=pe.define({combine(t){return Gi(t,{afterCursor:!0,brackets:Jk,maxScanDistance:Kk,renderMatch:vue})}}),Oue=Se.mark({class:"cm-matchingBracket"}),yue=Se.mark({class:"cm-nonmatchingBracket"});function vue(t){let e=[],n=t.matched?Oue:yue;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const bue=[pn.define({create(){return Se.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(eC);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=co(e.state,i.head,-1,r)||i.head>0&&co(e.state,i.head-1,1,r)||r.afterCursor&&(co(e.state,i.head,1,r)||i.head<e.state.doc.length&&co(e.state,i.head+1,-1,r));o&&(n=n.concat(r.renderMatch(o,e.state)))}return Se.set(n,!0)},provide:t=>ae.decorations.from(t)}),gue];function wue(t={}){return[eC.of(t),bue]}const tC=new Qe;function l6(t,e,n){let r=t.prop(e<0?Qe.openedBy:Qe.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function c6(t){let e=t.type.prop(tC);return e?e(t.node):t}function co(t,e,n,r={}){let i=r.maxScanDistance||Kk,o=r.brackets||Jk,a=Ot(t),s=a.resolveInner(e,n);for(let l=s;l;l=l.parent){let c=l6(l.type,n,o);if(c&&l.from<l.to){let u=c6(l);if(u&&(n>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return xue(t,e,n,l,u,c,o)}}return _ue(t,e,n,a,s.type,i,o)}function xue(t,e,n,r,i,o,a){let s=r.parent,l={from:i.from,to:i.to},c=0,u=s==null?void 0:s.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(c==0&&o.indexOf(u.type.name)>-1&&u.from<u.to){let f=c6(u);return{start:l,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(l6(u.type,n,a))c++;else if(l6(u.type,-n,a)){if(c==0){let f=c6(u);return{start:l,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}c--}}while(n<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}function _ue(t,e,n,r,i,o,a){let s=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=a.indexOf(s);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),f=0;for(let d=0;!u.next().done&&d<=o;){let h=u.value;n<0&&(d+=h.length);let m=e+d*n;for(let g=n>0?0:h.length-1,p=n>0?h.length:-1;g!=p;g+=n){let O=a.indexOf(h[g]);if(!(O<0||r.resolveInner(m+g,1).type!=i))if(O%2==0==n>0)f++;else{if(f==1)return{start:c,end:{from:m+g,to:m+g+1},matched:O>>1==l>>1};f--}}n>0&&(d+=h.length)}return u.done?{start:c,matched:!1}:null}const Sue=Object.create(null),nC=[sn.none],rC=[],iC=Object.create(null),kue=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])kue[t]=Cue(Sue,e);function u6(t,e){rC.indexOf(t)>-1||(rC.push(t),console.warn(e))}function Cue(t,e){let n=[];for(let s of e.split(" ")){let l=[];for(let c of s.split(".")){let u=t[c]||M[c];u?typeof u=="function"?l.length?l=l.map(u):u6(c,`Modifier ${c} used at start of tag`):l.length?u6(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:u6(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(s=>s.id),o=iC[i];if(o)return o.id;let a=iC[i]=sn.define({id:nC.length,name:r,props:[io({[r]:n})]});return nC.push(a),a.id}Pt.RTL,Pt.LTR;const Pue=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=d6(t.state,n.from);return r.line?Eue(t):r.block?Aue(t):!1};function f6(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const Eue=f6(Due,0),Tue=f6(oC,0),Aue=f6((t,e)=>oC(t,e,Que(e)),0);function d6(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const af=50;function Mue(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-af,r),a=t.sliceDoc(i,i+af),s=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(a)[0].length,c=o.length-s;if(o.slice(c-e.length,c)==e&&a.slice(l,l+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+l,margin:l&&1}};let u,f;i-r<=2*af?u=f=t.sliceDoc(r,i):(u=t.sliceDoc(r,r+af),f=t.sliceDoc(i-af,i));let d=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(f)[0].length,m=f.length-h-n.length;return u.slice(d,d+e.length)==e&&f.slice(m,m+n.length)==n?{open:{pos:r+d+e.length,margin:/\s/.test(u.charAt(d+e.length))?1:0},close:{pos:i-h-n.length,margin:/\s/.test(f.charAt(m-1))?1:0}}:null}function Que(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function oC(t,e,n=e.selection.ranges){let r=n.map(o=>d6(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,a)=>Mue(e,r[a],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,a)=>i[a]?[]:[{from:o.from,insert:r[a].open+" "},{from:o.to,insert:" "+r[a].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let a=0,s;a<i.length;a++)if(s=i[a]){let l=r[a],{open:c,close:u}=s;o.push({from:c.pos-l.open.length,to:c.pos+c.margin},{from:u.pos-u.margin,to:u.pos+l.close.length})}return{changes:o}}return null}function Due(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:o,to:a}of n){let s=r.length,l=1e9,c=d6(e,o).line;if(c){for(let u=o;u<=a;){let f=e.doc.lineAt(u);if(f.from>i&&(o==a||a>f.from)){i=f.from;let d=/^\s*/.exec(f.text)[0].length,h=d==f.length,m=f.text.slice(d,d+c.length)==c?d:-1;d<f.text.length&&d<l&&(l=d),r.push({line:f,comment:m,token:c,indent:d,empty:h,single:!1})}u=f.to+1}if(l<1e9)for(let u=s;u<r.length;u++)r[u].indent<r[u].line.text.length&&(r[u].indent=l);r.length==s+1&&(r[s].single=!0)}}if(t!=2&&r.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:s,token:l,indent:c,empty:u,single:f}of r)(f||!u)&&o.push({from:s.from+c,insert:l+" "});let a=e.changes(o);return{changes:a,selection:e.selection.map(a,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:a,comment:s,token:l}of r)if(s>=0){let c=a.from+s,u=c+l.length;a.text[u-a.from]==" "&&u++,o.push({from:c,to:u})}return{changes:o}}return null}const h6=Hi.define(),$ue=Hi.define(),Lue=pe.define(),aC=pe.define({combine(t){return Gi(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),sC=pn.define({create(){return uo.empty},update(t,e){let n=e.state.facet(aC),r=e.annotation(h6);if(r){let l=sr.fromTransaction(e,r.selection),c=r.side,u=c==0?t.undone:t.done;return l?u=Zp(u,u.length,n.minDepth,l):u=uC(u,e.startState.selection),new uo(c==0?r.rest:u,c==0?u:r.rest)}let i=e.annotation($ue);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Jt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=sr.fromTransaction(e),a=e.annotation(Jt.time),s=e.annotation(Jt.userEvent);return o?t=t.addChanges(o,a,s,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,s,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new uo(t.done.map(sr.fromJSON),t.undone.map(sr.fromJSON))}});function Iue(t={}){return[sC,aC.of(t),ae.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?lC:e.inputType=="historyRedo"?p6:null;return r?(e.preventDefault(),r(n)):!1}})]}function Bp(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(sC,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const lC=Bp(0,!1),p6=Bp(1,!1),jue=Bp(0,!0),Nue=Bp(1,!0);class sr{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new sr(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new sr(e.changes&&an.fromJSON(e.changes),[],e.mapped&&Ui.fromJSON(e.mapped),e.startSelection&&U.fromJSON(e.startSelection),e.selectionsAfter.map(U.fromJSON))}static fromTransaction(e,n){let r=Jr;for(let i of e.startState.facet(Lue)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new sr(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,Jr)}static selection(e){return new sr(void 0,Jr,void 0,void 0,e)}}function Zp(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function Rue(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,a,s)=>{for(let l=0;l<n.length;){let c=n[l++],u=n[l++];s>=c&&a<=u&&(r=!0)}}),r}function Bue(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function cC(t,e){return t.length?e.length?t.concat(e):t:e}const Jr=[],Zue=200;function uC(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Zue));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),Zp(t,t.length-1,1e9,n.setSelAfter(r)))}else return[sr.selection([e])]}function zue(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function m6(t,e){if(!t.length)return t;let n=t.length,r=Jr;for(;n;){let i=Xue(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[sr.selection(r)]:Jr}function Xue(t,e,n){let r=cC(t.selectionsAfter.length?t.selectionsAfter.map(s=>s.map(e)):Jr,n);if(!t.changes)return sr.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(o):o;return new sr(i,$e.mapEffects(t.effects,e),a,t.startSelection.map(o),r)}const Vue=/^(input\.type|delete)($|\.)/;class uo{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new uo(this.done,this.undone):this}addChanges(e,n,r,i,o){let a=this.done,s=a[a.length-1];return s&&s.changes&&!s.changes.empty&&e.changes&&(!r||Vue.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,Rue(s.changes,e.changes))||r=="input.type.compose")?a=Zp(a,a.length-1,i.minDepth,new sr(e.changes.compose(s.changes),cC($e.mapEffects(e.effects,s.changes),s.effects),s.mapped,s.startSelection,Jr)):a=Zp(a,a.length,i.minDepth,e),new uo(a,Jr,n,r)}addSelection(e,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Jr;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&Bue(o[o.length-1],e)?this:new uo(uC(this.done,e),this.undone,n,r)}addMapping(e){return new uo(m6(this.done,e),m6(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1],a=o.selectionsAfter[0]||n.selection;if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:h6.of({side:e,rest:zue(i),selection:a}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let s=i.length==1?Jr:i.slice(0,i.length-1);return o.mapped&&(s=m6(s,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:h6.of({side:e,rest:s,selection:a}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}uo.empty=new uo(Jr,Jr);const Fue=[{key:"Mod-z",run:lC,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:p6,preventDefault:!0},{linux:"Ctrl-Shift-z",run:p6,preventDefault:!0},{key:"Mod-u",run:jue,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Nue,preventDefault:!0}];function Gl(t,e){return U.create(t.ranges.map(e),t.mainIndex)}function fo(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Si({state:t,dispatch:e},n){let r=Gl(t.selection,n);return r.eq(t.selection,!0)?!1:(e(fo(t,r)),!0)}function zp(t,e){return U.cursor(e?t.to:t.from)}function fC(t,e){return Si(t,n=>n.empty?t.moveByChar(n,e):zp(n,e))}function Rn(t){return t.textDirectionAt(t.state.selection.main.head)==Pt.LTR}const dC=t=>fC(t,!Rn(t)),hC=t=>fC(t,Rn(t));function pC(t,e){return Si(t,n=>n.empty?t.moveByGroup(n,e):zp(n,e))}const Yue=t=>pC(t,!Rn(t)),que=t=>pC(t,Rn(t));function Wue(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Xp(t,e,n){let r=Ot(t).resolveInner(e.head),i=n?Qe.closedBy:Qe.openedBy;for(let l=e.head;;){let c=n?r.childAfter(l):r.childBefore(l);if(!c)break;Wue(t,c,i)?r=c:l=n?c.to:c.from}let o=r.type.prop(i),a,s;return o&&(a=n?co(t,r.from,1):co(t,r.to,-1))&&a.matched?s=n?a.end.to:a.end.from:s=n?r.to:r.from,U.cursor(s,n?-1:1)}const Uue=t=>Si(t,e=>Xp(t.state,e,!Rn(t))),Hue=t=>Si(t,e=>Xp(t.state,e,Rn(t)));function mC(t,e){return Si(t,n=>{if(!n.empty)return zp(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const gC=t=>mC(t,!1),OC=t=>mC(t,!0);function yC(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let o of t.state.facet(ae.scrollMargins)){let a=o(t);a!=null&&a.top&&(n=Math.max(a==null?void 0:a.top,n)),a!=null&&a.bottom&&(r=Math.max(a==null?void 0:a.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function vC(t,e){let n=yC(t),{state:r}=t,i=Gl(r.selection,a=>a.empty?t.moveVertically(a,e,n.height):zp(a,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let a=t.coordsAtPos(r.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),l=s.top+n.marginTop,c=s.bottom-n.marginBottom;a&&a.top>l&&a.bottom<c&&(o=ae.scrollIntoView(i.main.head,{y:"start",yMargin:a.top-l}))}return t.dispatch(fo(r,i),{effects:o}),!0}const bC=t=>vC(t,!1),g6=t=>vC(t,!0);function Za(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=U.cursor(r.from+o))}return i}const Gue=t=>Si(t,e=>Za(t,e,!0)),Kue=t=>Si(t,e=>Za(t,e,!1)),Jue=t=>Si(t,e=>Za(t,e,!Rn(t))),efe=t=>Si(t,e=>Za(t,e,Rn(t))),tfe=t=>Si(t,e=>U.cursor(t.lineBlockAt(e.head).from,1)),nfe=t=>Si(t,e=>U.cursor(t.lineBlockAt(e.head).to,-1));function rfe(t,e,n){let r=!1,i=Gl(t.selection,o=>{let a=co(t,o.head,-1)||co(t,o.head,1)||o.head>0&&co(t,o.head-1,1)||o.head<t.doc.length&&co(t,o.head+1,-1);if(!a||!a.end)return o;r=!0;let s=a.start.from==o.head?a.end.to:a.end.from;return U.cursor(s)});return r?(e(fo(t,i)),!0):!1}const ife=({state:t,dispatch:e})=>rfe(t,e);function ei(t,e){let n=Gl(t.state.selection,r=>{let i=e(r);return U.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(fo(t.state,n)),!0)}function wC(t,e){return ei(t,n=>t.moveByChar(n,e))}const xC=t=>wC(t,!Rn(t)),_C=t=>wC(t,Rn(t));function SC(t,e){return ei(t,n=>t.moveByGroup(n,e))}const ofe=t=>SC(t,!Rn(t)),afe=t=>SC(t,Rn(t)),sfe=t=>ei(t,e=>Xp(t.state,e,!Rn(t))),lfe=t=>ei(t,e=>Xp(t.state,e,Rn(t)));function kC(t,e){return ei(t,n=>t.moveVertically(n,e))}const CC=t=>kC(t,!1),PC=t=>kC(t,!0);function EC(t,e){return ei(t,n=>t.moveVertically(n,e,yC(t).height))}const TC=t=>EC(t,!1),AC=t=>EC(t,!0),cfe=t=>ei(t,e=>Za(t,e,!0)),ufe=t=>ei(t,e=>Za(t,e,!1)),ffe=t=>ei(t,e=>Za(t,e,!Rn(t))),dfe=t=>ei(t,e=>Za(t,e,Rn(t))),hfe=t=>ei(t,e=>U.cursor(t.lineBlockAt(e.head).from)),pfe=t=>ei(t,e=>U.cursor(t.lineBlockAt(e.head).to)),MC=({state:t,dispatch:e})=>(e(fo(t,{anchor:0})),!0),QC=({state:t,dispatch:e})=>(e(fo(t,{anchor:t.doc.length})),!0),DC=({state:t,dispatch:e})=>(e(fo(t,{anchor:t.selection.main.anchor,head:0})),!0),$C=({state:t,dispatch:e})=>(e(fo(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),mfe=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),gfe=({state:t,dispatch:e})=>{let n=Fp(t).map(({from:r,to:i})=>U.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:U.create(n),userEvent:"select"})),!0},Ofe=({state:t,dispatch:e})=>{let n=Gl(t.selection,r=>{let i=Ot(t),o=i.resolveStack(r.from,1);if(r.empty){let a=i.resolveStack(r.from,-1);a.node.from>=o.node.from&&a.node.to<=o.node.to&&(o=a)}for(let a=o;a;a=a.next){let{node:s}=a;if((s.from<r.from&&s.to>=r.to||s.to>r.to&&s.from<=r.from)&&a.next)return U.range(s.to,s.from)}return r});return n.eq(t.selection)?!1:(e(fo(t,n)),!0)},yfe=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=U.create([n.main]):n.main.empty||(r=U.create([U.cursor(n.main.head)])),r?(e(fo(t,r)),!0):!1};function sf(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:a,to:s}=o;if(a==s){let l=e(o);l<a?(n="delete.backward",l=Vp(t,l,!1)):l>a&&(n="delete.forward",l=Vp(t,l,!0)),a=Math.min(a,l),s=Math.max(s,l)}else a=Vp(t,a,!1),s=Vp(t,s,!0);return a==s?{range:o}:{changes:{from:a,to:s},range:U.cursor(a,a<o.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?ae.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function Vp(t,e,n){if(t instanceof ae)for(let r of t.state.facet(ae.atomicRanges).map(i=>i(t)))r.between(e,e,(i,o)=>{i<e&&o>e&&(e=n?o:i)});return e}const LC=(t,e,n)=>sf(t,r=>{let i=r.from,{state:o}=t,a=o.doc.lineAt(i),s,l;if(n&&!e&&i>a.from&&i<a.from+200&&!/[^ \t]/.test(s=a.text.slice(0,i-a.from))){if(s[s.length-1]==" ")return i-1;let c=wi(s,o.tabSize),u=c%$p(o)||$p(o);for(let f=0;f<u&&s[s.length-1-f]==" ";f++)i--;l=i}else l=kn(a.text,i-a.from,e,e)+a.from,l==i&&a.number!=(e?o.doc.lines:1)?l+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(a.text.slice(l-a.from,i-a.from))&&(l=kn(a.text,l-a.from,!1,!1)+a.from);return l}),O6=t=>LC(t,!1,!0),IC=t=>LC(t,!0,!1),jC=(t,e)=>sf(t,n=>{let r=n.head,{state:i}=t,o=i.doc.lineAt(r),a=i.charCategorizer(r);for(let s=null;;){if(r==(e?o.to:o.from)){r==n.head&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=kn(o.text,r-o.from,e)+o.from,c=o.text.slice(Math.min(r,l)-o.from,Math.max(r,l)-o.from),u=a(c);if(s!=null&&u!=s)break;(c!=" "||r!=n.head)&&(s=u),r=l}return r}),NC=t=>jC(t,!1),vfe=t=>jC(t,!0),bfe=t=>sf(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),wfe=t=>sf(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),xfe=t=>sf(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),_fe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:He.of(["",""])},range:U.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Sfe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),a=i==o.from?i-1:kn(o.text,i-o.from,!1)+o.from,s=i==o.to?i+1:kn(o.text,i-o.from,!0)+o.from;return{changes:{from:a,to:s,insert:t.doc.slice(i,s).append(t.doc.slice(a,i))},range:U.cursor(s)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Fp(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let a=e[e.length-1];a.to=o.to,a.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function RC(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of Fp(t)){if(n?o.to==t.doc.length:o.from==0)continue;let a=t.doc.lineAt(n?o.to+1:o.from-1),s=a.length+1;if(n){r.push({from:o.to,to:a.to},{from:o.from,insert:a.text+t.lineBreak});for(let l of o.ranges)i.push(U.range(Math.min(t.doc.length,l.anchor+s),Math.min(t.doc.length,l.head+s)))}else{r.push({from:a.from,to:o.from},{from:o.to,insert:t.lineBreak+a.text});for(let l of o.ranges)i.push(U.range(l.anchor-s,l.head-s))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:U.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const kfe=({state:t,dispatch:e})=>RC(t,e,!1),Cfe=({state:t,dispatch:e})=>RC(t,e,!0);function BC(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of Fp(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Pfe=({state:t,dispatch:e})=>BC(t,e,!1),Efe=({state:t,dispatch:e})=>BC(t,e,!0),Tfe=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Fp(e).map(({from:i,to:o})=>(i>0?i--:o<e.doc.length&&o++,{from:i,to:o}))),r=Gl(e.selection,i=>{let o;if(t.lineWrapping){let a=t.lineBlockAt(i.head),s=t.coordsAtPos(i.head,i.assoc||1);s&&(o=a.bottom+t.documentTop-s.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,o)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Afe(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Ot(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(Qe.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const ZC=zC(!1),Mfe=zC(!0);function zC(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:a}=i,s=e.doc.lineAt(o),l=!t&&o==a&&Afe(e,o);t&&(o=a=(a<=s.to?s:e.doc.lineAt(a)).to);let c=new Lp(e,{simulateBreak:o,simulateDoubleBreak:!!l}),u=n6(c,o);for(u==null&&(u=wi(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));a<s.to&&/\s/.test(s.text[a-s.from]);)a++;l?{from:o,to:a}=l:o>s.from&&o<s.from+100&&!/\S/.test(s.text.slice(0,o))&&(o=s.from);let f=["",nf(e,u)];return l&&f.push(nf(e,c.lineIndent(s.from,-1))),{changes:{from:o,to:a,insert:He.of(f)},range:U.cursor(o+1+f[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function y6(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let s=t.doc.lineAt(a);s.number>n&&(r.empty||r.to>s.from)&&(e(s,i,r),n=s.number),a=s.to+1}let o=t.changes(i);return{changes:i,range:U.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const Qfe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Lp(t,{overrideIndentation:o=>{let a=n[o];return a??-1}}),i=y6(t,(o,a,s)=>{let l=n6(r,o.from);if(l==null)return;/\S/.test(o.text)||(l=0);let c=/^\s*/.exec(o.text)[0],u=nf(t,l);(c!=u||s.from<o.from+c.length)&&(n[o.from]=l,a.push({from:o.from,to:o.from+c.length,insert:u}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},XC=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(y6(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Hl)})}),{userEvent:"input.indent"})),!0),VC=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(y6(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=wi(i,t.tabSize),a=0,s=nf(t,Math.max(0,o-$p(t)));for(;a<i.length&&a<s.length&&i.charCodeAt(a)==s.charCodeAt(a);)a++;r.push({from:n.from+a,to:n.from+i.length,insert:s.slice(a)})}),{userEvent:"delete.dedent"})),!0),Dfe=t=>(t.setTabFocusMode(),!0),$fe=[{key:"Ctrl-b",run:dC,shift:xC,preventDefault:!0},{key:"Ctrl-f",run:hC,shift:_C},{key:"Ctrl-p",run:gC,shift:CC},{key:"Ctrl-n",run:OC,shift:PC},{key:"Ctrl-a",run:tfe,shift:hfe},{key:"Ctrl-e",run:nfe,shift:pfe},{key:"Ctrl-d",run:IC},{key:"Ctrl-h",run:O6},{key:"Ctrl-k",run:bfe},{key:"Ctrl-Alt-h",run:NC},{key:"Ctrl-o",run:_fe},{key:"Ctrl-t",run:Sfe},{key:"Ctrl-v",run:g6}],Lfe=[{key:"ArrowLeft",run:dC,shift:xC,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Yue,shift:ofe,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:Jue,shift:ffe,preventDefault:!0},{key:"ArrowRight",run:hC,shift:_C,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:que,shift:afe,preventDefault:!0},{mac:"Cmd-ArrowRight",run:efe,shift:dfe,preventDefault:!0},{key:"ArrowUp",run:gC,shift:CC,preventDefault:!0},{mac:"Cmd-ArrowUp",run:MC,shift:DC},{mac:"Ctrl-ArrowUp",run:bC,shift:TC},{key:"ArrowDown",run:OC,shift:PC,preventDefault:!0},{mac:"Cmd-ArrowDown",run:QC,shift:$C},{mac:"Ctrl-ArrowDown",run:g6,shift:AC},{key:"PageUp",run:bC,shift:TC},{key:"PageDown",run:g6,shift:AC},{key:"Home",run:Kue,shift:ufe,preventDefault:!0},{key:"Mod-Home",run:MC,shift:DC},{key:"End",run:Gue,shift:cfe,preventDefault:!0},{key:"Mod-End",run:QC,shift:$C},{key:"Enter",run:ZC,shift:ZC},{key:"Mod-a",run:mfe},{key:"Backspace",run:O6,shift:O6},{key:"Delete",run:IC},{key:"Mod-Backspace",mac:"Alt-Backspace",run:NC},{key:"Mod-Delete",mac:"Alt-Delete",run:vfe},{mac:"Mod-Backspace",run:wfe},{mac:"Mod-Delete",run:xfe}].concat($fe.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),Ife=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Uue,shift:sfe},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Hue,shift:lfe},{key:"Alt-ArrowUp",run:kfe},{key:"Shift-Alt-ArrowUp",run:Pfe},{key:"Alt-ArrowDown",run:Cfe},{key:"Shift-Alt-ArrowDown",run:Efe},{key:"Escape",run:yfe},{key:"Mod-Enter",run:Mfe},{key:"Alt-l",mac:"Ctrl-l",run:gfe},{key:"Mod-i",run:Ofe,preventDefault:!0},{key:"Mod-[",run:VC},{key:"Mod-]",run:XC},{key:"Mod-Alt-\\",run:Qfe},{key:"Shift-Mod-k",run:Tfe},{key:"Shift-Mod-\\",run:ife},{key:"Mod-/",run:Pue},{key:"Alt-A",run:Tue},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Dfe}].concat(Lfe),jfe={key:"Tab",run:XC,shift:VC};function yt(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)FC(t,arguments[e]);return t}function FC(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)FC(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}const YC=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class Kl{constructor(e,n,r=0,i=e.length,o,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?s=>o(YC(s)):YC,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ir(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=LO(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Wi(e);let i=this.normalize(n);if(i.length)for(let o=0,a=r;;o++){let s=i.charCodeAt(o),l=this.match(s,a,this.bufferPos+this.bufferStart);if(o==i.length-1){if(l)return this.value=l,this;break}a==r&&o<n.length&&n.charCodeAt(o)==s&&a++}}}match(e,n,r){let i=null;for(let o=0;o<this.matches.length;o+=2){let a=this.matches[o],s=!1;this.query.charCodeAt(a)==e&&(a==this.query.length-1?i={from:this.matches[o+1],to:r}:(this.matches[o]++,s=!0)),s||(this.matches.splice(o,2),o-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:n,to:r}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(Kl.prototype[Symbol.iterator]=function(){return this});const qC={from:-1,to:-1,match:/.*/.exec("")},v6="gm"+(/x/.unicode==null?"":"u");class WC{constructor(e,n,r,i=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=qC,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new UC(e,n,r,i,o);this.re=new RegExp(n,v6+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let a=e.lineAt(i);this.curLineStart=a.from,this.matchPos=Yp(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=Yp(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const b6=new WeakMap;class Jl{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=b6.get(e);if(!i||i.from>=r||i.to<=n){let s=new Jl(n,e.sliceString(n,r));return b6.set(e,s),s}if(i.from==n&&i.to==r)return i;let{text:o,from:a}=i;return a>n&&(o=e.sliceString(n,a)+o,a=n),i.to<r&&(o+=e.sliceString(i.to,r)),b6.set(e,new Jl(a,o)),new Jl(n,o.slice(n-a,r-a))}}class UC{constructor(e,n,r,i,o){this.text=e,this.to=o,this.done=!1,this.value=qC,this.matchPos=Yp(e,i),this.re=new RegExp(n,v6+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=Jl.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=Yp(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Jl.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(WC.prototype[Symbol.iterator]=UC.prototype[Symbol.iterator]=function(){return this});function Nfe(t){try{return new RegExp(t,v6),!0}catch{return!1}}function Yp(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}function w6(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=yt("input",{class:"cm-textfield",name:"line",value:e}),r=yt("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:lf.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},yt("label",t.state.phrase("Go to line"),": ",n)," ",yt("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),yt("button",{name:"close",onclick:()=>{t.dispatch({effects:lf.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:a}=t,s=a.doc.lineAt(a.selection.main.head),[,l,c,u,f]=o,d=u?+u.slice(1):0,h=c?+c:s.number;if(c&&f){let p=h/100;l&&(p=p*(l=="-"?-1:1)+s.number/a.doc.lines),h=Math.round(a.doc.lines*p)}else c&&l&&(h=h*(l=="-"?-1:1)+s.number);let m=a.doc.line(Math.max(1,Math.min(a.doc.lines,h))),g=U.cursor(m.from+Math.max(0,Math.min(d,m.length)));t.dispatch({effects:[lf.of(!1),ae.scrollIntoView(g.from,{y:"center"})],selection:g}),t.focus()}return{dom:r}}const lf=$e.define(),HC=pn.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(lf)&&(t=n.value);return t},provide:t=>Wu.from(t,e=>e?w6:null)}),Rfe=t=>{let e=qu(t,w6);if(!e){let n=[lf.of(!0)];t.state.field(HC,!1)==null&&n.push($e.appendConfig.of([HC,Bfe])),t.dispatch({effects:n}),e=qu(t,w6)}return e&&e.dom.querySelector("input").select(),!0},Bfe=ae.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),Zfe={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},zfe=pe.define({combine(t){return Gi(t,Zfe,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function Xfe(t){return[Wfe,qfe]}const Vfe=Se.mark({class:"cm-selectionMatch"}),Ffe=Se.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function GC(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=Qt.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=Qt.Word)}function Yfe(t,e,n,r){return t(e.sliceDoc(n,n+1))==Qt.Word&&t(e.sliceDoc(r-1,r))==Qt.Word}const qfe=Yt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(zfe),{state:n}=t,r=n.selection;if(r.ranges.length>1)return Se.none;let i=r.main,o,a=null;if(i.empty){if(!e.highlightWordAroundCursor)return Se.none;let l=n.wordAt(i.head);if(!l)return Se.none;a=n.charCategorizer(i.head),o=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return Se.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),a=n.charCategorizer(i.head),!(GC(a,n,i.from,i.to)&&Yfe(a,n,i.from,i.to)))return Se.none}else if(o=n.sliceDoc(i.from,i.to),!o)return Se.none}let s=[];for(let l of t.visibleRanges){let c=new Kl(n.doc,o,l.from,l.to);for(;!c.next().done;){let{from:u,to:f}=c.value;if((!a||GC(a,n,u,f))&&(i.empty&&u<=i.from&&f>=i.to?s.push(Ffe.range(u,f)):(u>=i.to||f<=i.from)&&s.push(Vfe.range(u,f)),s.length>e.maxMatches))return Se.none}}return Se.set(s)}},{decorations:t=>t.decorations}),Wfe=ae.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Ufe=({state:t,dispatch:e})=>{let{selection:n}=t,r=U.create(n.ranges.map(i=>t.wordAt(i.head)||U.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function Hfe(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let a=!1,s=new Kl(t.doc,e,r[r.length-1].to);;)if(s.next(),s.done){if(a)return null;s=new Kl(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),a=!0}else{if(a&&r.some(l=>l.from==s.value.from))continue;if(o){let l=t.wordAt(s.value.from);if(!l||l.from!=s.value.from||l.to!=s.value.to)continue}return s.value}}const Gfe=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return Ufe({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=Hfe(t,r);return i?(e(t.update({selection:t.selection.addRange(U.range(i.from,i.to),!1),effects:ae.scrollIntoView(i.to)})),!0):!1},ec=pe.define({combine(t){return Gi(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new cde(e),scrollToMatch:e=>ae.scrollIntoView(e)})}});class KC{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Nfe(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
717
- `:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new tde(this):new Jfe(this)}getCursor(e,n=0,r){let i=e.doc?e:Xe.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?nc(this,i,n,r):tc(this,i,n,r)}}class JC{constructor(e){this.spec=e}}function tc(t,e,n,r){return new Kl(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?Kfe(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Kfe(t,e){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=t.sliceString(o,Math.min(t.length,r+2))),(e(qp(i,n-o))!=Qt.Word||e(Wp(i,n-o))!=Qt.Word)&&(e(Wp(i,r-o))!=Qt.Word||e(qp(i,r-o))!=Qt.Word))}class Jfe extends JC{constructor(e){super(e)}nextMatch(e,n,r){let i=tc(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let o=Math.min(e.doc.length,n+this.spec.unquoted.length);i=tc(this.spec,e,0,o).nextOverlapping()}return i.done||i.value.from==n&&i.value.to==r?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let o=Math.max(n,i-1e4-this.spec.unquoted.length),a=tc(this.spec,e,o,i),s=null;for(;!a.nextOverlapping().done;)s=a.value;if(s)return s;if(o==n)return null;i-=1e4}}prevMatch(e,n,r){let i=this.prevMatchInRange(e,0,n);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=n||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=tc(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=tc(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function nc(t,e,n,r){return new WC(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?ede(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function qp(t,e){return t.slice(kn(t,e,!1),e)}function Wp(t,e){return t.slice(e,kn(t,e))}function ede(t){return(e,n,r)=>!r[0].length||(t(qp(r.input,r.index))!=Qt.Word||t(Wp(r.input,r.index))!=Qt.Word)&&(t(Wp(r.input,r.index+r[0].length))!=Qt.Word||t(qp(r.input,r.index+r[0].length))!=Qt.Word)}class tde extends JC{nextMatch(e,n,r){let i=nc(this.spec,e,r,e.doc.length).next();return i.done&&(i=nc(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),a=nc(this.spec,e,o,r),s=null;for(;!a.next().done;)s=a.value;if(s&&(o==n||s.from>o+10))return s;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let o=+r.slice(0,i);if(o>0&&o<e.match.length)return e.match[o]+r.slice(i)}return n})}matchAll(e,n){let r=nc(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=nc(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const cf=$e.define(),x6=$e.define(),za=pn.define({create(t){return new _6(k6(t).create(),null)},update(t,e){for(let n of e.effects)n.is(cf)?t=new _6(n.value.create(),t.panel):n.is(x6)&&(t=new _6(t.query,n.value?S6:null));return t},provide:t=>Wu.from(t,e=>e.panel)});class _6{constructor(e,n){this.query=e,this.panel=n}}const nde=Se.mark({class:"cm-searchMatch"}),rde=Se.mark({class:"cm-searchMatch cm-searchMatch-selected"}),ide=Yt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(za))}update(t){let e=t.state.field(za);(e!=t.startState.field(za)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Se.none;let{view:n}=this,r=new No;for(let i=0,o=n.visibleRanges,a=o.length;i<a;i++){let{from:s,to:l}=o[i];for(;i<a-1&&l>o[i+1].from-2*250;)l=o[++i].to;t.highlight(n.state,s,l,(c,u)=>{let f=n.state.selection.ranges.some(d=>d.from==c&&d.to==u);r.add(c,u,f?rde:nde)})}return r.finish()}},{decorations:t=>t.decorations});function uf(t){return e=>{let n=e.state.field(za,!1);return n&&n.query.spec.valid?t(e,n):rP(e)}}const Up=uf((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=U.single(r.from,r.to),o=t.state.facet(ec);return t.dispatch({selection:i,effects:[C6(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),nP(t),!0}),Hp=uf((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=U.single(i.from,i.to),a=t.state.facet(ec);return t.dispatch({selection:o,effects:[C6(t,i),a.scrollToMatch(o.main,t)],userEvent:"select.search"}),nP(t),!0}),ode=uf((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:U.create(n.map(r=>U.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),ade=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],a=0;for(let s=new Kl(t.doc,t.sliceDoc(r,i));!s.next().done;){if(o.length>1e3)return!1;s.value.from==r&&(a=o.length),o.push(U.range(s.value.from,s.value.to))}return e(t.update({selection:U.create(o,a),userEvent:"select.search.matches"})),!0},eP=uf((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let a=o,s=[],l,c,u=[];if(a.from==r&&a.to==i&&(c=n.toText(e.getReplacement(a)),s.push({from:a.from,to:a.to,insert:c}),a=e.nextMatch(n,a.from,a.to),u.push(ae.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),a){let f=s.length==0||s[0].from>=o.to?0:o.to-o.from-c.length;l=U.single(a.from-f,a.to-f),u.push(C6(t,a)),u.push(n.facet(ec).scrollToMatch(l.main,t))}return t.dispatch({changes:s,selection:l,effects:u,userEvent:"input.replace"}),!0}),sde=uf((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:a}=i;return{from:o,to:a,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:ae.announce.of(r),userEvent:"input.replace.all"}),!0});function S6(t){return t.state.facet(ec).createPanel(t)}function k6(t,e){var n,r,i,o,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let c=t.facet(ec);return new KC({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:c.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:c.regexp,wholeWord:(a=e==null?void 0:e.wholeWord)!==null&&a!==void 0?a:c.wholeWord})}function tP(t){let e=qu(t,S6);return e&&e.dom.querySelector("[main-field]")}function nP(t){let e=tP(t);e&&e==t.root.activeElement&&e.select()}const rP=t=>{let e=t.state.field(za,!1);if(e&&e.panel){let n=tP(t);if(n&&n!=t.root.activeElement){let r=k6(t.state,e.query.spec);r.valid&&t.dispatch({effects:cf.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[x6.of(!0),e?cf.of(k6(t.state,e.query.spec)):$e.appendConfig.of(fde)]});return!0},iP=t=>{let e=t.state.field(za,!1);if(!e||!e.panel)return!1;let n=qu(t,S6);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:x6.of(!1)}),!0},lde=[{key:"Mod-f",run:rP,scope:"editor search-panel"},{key:"F3",run:Up,shift:Hp,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Up,shift:Hp,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:iP,scope:"editor search-panel"},{key:"Mod-Shift-l",run:ade},{key:"Mod-Alt-g",run:Rfe},{key:"Mod-d",run:Gfe,preventDefault:!0}];class cde{constructor(e){this.view=e;let n=this.query=e.state.field(za).query.spec;this.commit=this.commit.bind(this),this.searchField=yt("input",{value:n.search,placeholder:Sr(e,"Find"),"aria-label":Sr(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=yt("input",{value:n.replace,placeholder:Sr(e,"Replace"),"aria-label":Sr(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=yt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=yt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=yt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,a){return yt("button",{class:"cm-button",name:i,onclick:o,type:"button"},a)}this.dom=yt("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>Up(e),[Sr(e,"next")]),r("prev",()=>Hp(e),[Sr(e,"previous")]),r("select",()=>ode(e),[Sr(e,"all")]),yt("label",null,[this.caseField,Sr(e,"match case")]),yt("label",null,[this.reField,Sr(e,"regexp")]),yt("label",null,[this.wordField,Sr(e,"by word")]),...e.state.readOnly?[]:[yt("br"),this.replaceField,r("replace",()=>eP(e),[Sr(e,"replace")]),r("replaceAll",()=>sde(e),[Sr(e,"replace all")])],yt("button",{name:"close",onclick:()=>iP(e),"aria-label":Sr(e,"close"),type:"button"},["×"])])}commit(){let e=new KC({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:cf.of(e)}))}keydown(e){ble(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Hp:Up)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),eP(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(cf)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(ec).top}}function Sr(t,e){return t.state.phrase(e)}const Gp=30,Kp=/[\s\.,:;?!]/;function C6(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-Gp),a=Math.min(i,n+Gp),s=t.state.sliceDoc(o,a);if(o!=r.from){for(let l=0;l<Gp;l++)if(!Kp.test(s[l+1])&&Kp.test(s[l])){s=s.slice(l);break}}if(a!=i){for(let l=s.length-1;l>s.length-Gp;l--)if(!Kp.test(s[l-1])&&Kp.test(s[l])){s=s.slice(0,l);break}}return ae.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`)}const ude=ae.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),fde=[za,jo.low(ide),ude];class P6{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Ot(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(lP(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function oP(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function dde(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=oP(e)+oP(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function E6(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:dde(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}function aP(t,e){return n=>{for(let r=Ot(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class sP{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function Ds(t){return t.selection.main.from}function lP(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const T6=Hi.define();function hde(t,e,n,r){let{main:i}=t.selection,o=n-i.from,a=r-i.from;return Object.assign(Object.assign({},t.changeByRange(s=>{if(s!=i&&n!=r&&t.sliceDoc(s.from+o,s.from+a)!=t.sliceDoc(n,r))return{range:s};let l=t.toText(e);return{changes:{from:s.from+o,to:r==i.from?s.to:s.from+a,insert:l},range:U.cursor(s.from+o+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const cP=new WeakMap;function pde(t){if(!Array.isArray(t))return t;let e=cP.get(t);return e||cP.set(t,e=E6(t)),e}const Jp=$e.define(),ff=$e.define();class mde{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=ir(e,n),i=Wi(r);this.chars.push(r);let o=e.slice(n,n+i),a=o.toUpperCase();this.folded.push(ir(a==o?o.toLowerCase():a,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:o,byWord:a}=this;if(n.length==1){let w=ir(e,0),v=Wi(w),b=v==e.length?0:-100;if(w!=n[0])if(w==r[0])b+=-200;else return null;return this.ret(b,[0,v])}let s=e.indexOf(this.pattern);if(s==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=n.length,c=0;if(s<0){for(let w=0,v=Math.min(e.length,200);w<v&&c<l;){let b=ir(e,w);(b==n[c]||b==r[c])&&(i[c++]=w),w+=Wi(b)}if(c<l)return null}let u=0,f=0,d=!1,h=0,m=-1,g=-1,p=/[a-z]/.test(e),O=!0;for(let w=0,v=Math.min(e.length,200),b=0;w<v&&f<l;){let y=ir(e,w);s<0&&(u<l&&y==n[u]&&(o[u++]=w),h<l&&(y==n[h]||y==r[h]?(h==0&&(m=w),g=w+1,h++):h=0));let x,_=y<255?y>=48&&y<=57||y>=97&&y<=122?2:y>=65&&y<=90?1:0:(x=LO(y))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!w||_==1&&p||b==0&&_!=0)&&(n[f]==y||r[f]==y&&(d=!0)?a[f++]=w:a.length&&(O=!1)),b=_,w+=Wi(y)}return f==l&&a[0]==0&&O?this.result(-100+(d?-200:0),a,e):h==l&&m==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):h==l?this.ret(-900-e.length,[m,g]):f==l?this.result(-100+(d?-200:0)+-700+(O?0:-1100),a,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let a of n){let s=a+(this.astral?Wi(ir(r,a)):1);o&&i[o-1]==a?i[o-1]=s:(i[o++]=a,i[o++]=s)}return this.ret(e-r.length,i)}}class gde{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const mn=pe.define({combine(t){return Gi(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Ode,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>uP(e(r),n(r)),optionClass:(e,n)=>r=>uP(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function uP(t,e){return t?e?t+" "+e:t:e}function Ode(t,e,n,r,i,o){let a=t.textDirection==Pt.RTL,s=a,l=!1,c="top",u,f,d=e.left-i.left,h=i.right-e.right,m=r.right-r.left,g=r.bottom-r.top;if(s&&d<Math.min(m,h)?s=!1:!s&&h<Math.min(m,d)&&(s=!0),m<=(s?d:h))u=Math.max(i.top,Math.min(n.top,i.bottom-g))-e.top,f=Math.min(400,s?d:h);else{l=!0,f=Math.min(400,(a?e.right:i.right-e.left)-30);let w=i.bottom-e.bottom;w>=g||w>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let p=(e.bottom-e.top)/o.offsetHeight,O=(e.right-e.left)/o.offsetWidth;return{style:`${c}: ${u/p}px; max-width: ${f/O}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":s?"left":"right")}}function yde(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let a=document.createElement("span");a.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let c=0;c<o.length;){let u=o[c++],f=o[c++];u>l&&a.appendChild(document.createTextNode(s.slice(l,u)));let d=a.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(s.slice(u,f))),d.className="cm-completionMatchedText",l=f}return l<s.length&&a.appendChild(document.createTextNode(s.slice(l))),a},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function A6(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class vde{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:a}=i.open,s=e.state.facet(mn);this.optionContent=yde(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=A6(o.length,a,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(n).open;for(let u=l.target,f;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(f=/-(\d+)$/.exec(u.id))&&+f[1]<c.length){this.applyCompletion(e,c[+f[1]]),l.preventDefault();return}}),this.dom.addEventListener("focusout",l=>{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(mn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:ff.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:a,disabled:s}=r.open;(!i.open||i.open.options!=o)&&(this.range=A6(o.length,a,e.state.facet(mn).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),s!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=A6(n.options.length,n.selected,this.view.state.facet(mn).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,r)}).catch(a=>ar(this.view.state,a,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&wde(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let a=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom<Math.max(o.top,n.top)+10?null:this.view.state.facet(mn).positionInfo(this.view,n,i,r,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",a=>{a.target==i&&a.preventDefault()});let o=null;for(let a=r.from;a<r.to;a++){let{completion:s,match:l}=e[a],{section:c}=s;if(c){let d=typeof c=="string"?c:c.name;if(d!=o&&(a>r.from||r.from==0))if(o=d,typeof c!="string"&&c.header)i.appendChild(c.header(c));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=d}}const u=i.appendChild(document.createElement("li"));u.id=n+"-"+a,u.setAttribute("role","option");let f=this.optionClass(s);f&&(u.className=f);for(let d of this.optionContent){let h=d(s,this.view.state,this.view,l);h&&u.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function bde(t,e){return n=>new vde(n,t,e)}function wde(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function fP(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function xde(t,e){let n=[],r=null,i=c=>{n.push(c);let{section:u}=c.completion;if(u){r||(r=[]);let f=typeof u=="string"?u:u.name;r.some(d=>d.name==f)||r.push(typeof u=="string"?{name:f}:u)}},o=e.facet(mn);for(let c of t)if(c.hasResult()){let u=c.result.getMatch;if(c.result.filter===!1)for(let f of c.result.options)i(new sP(f,c.source,u?u(f):[],1e9-n.length));else{let f=e.sliceDoc(c.from,c.to),d,h=o.filterStrict?new gde(f):new mde(f);for(let m of c.result.options)if(d=h.match(m.label)){let g=m.displayLabel?u?u(m,d.matched):[]:d.matched;i(new sP(m,c.source,g,d.score+(m.boost||0)))}}}if(r){let c=Object.create(null),u=0,f=(d,h)=>{var m,g;return((m=d.rank)!==null&&m!==void 0?m:1e9)-((g=h.rank)!==null&&g!==void 0?g:1e9)||(d.name<h.name?-1:1)};for(let d of r.sort(f))u-=1e5,c[d.name]=u;for(let d of n){let{section:h}=d.completion;h&&(d.score+=c[typeof h=="string"?h:h.name])}}let a=[],s=null,l=o.compareCompletions;for(let c of n.sort((u,f)=>f.score-u.score||l(u.completion,f.completion))){let u=c.completion;!s||s.label!=u.label||s.detail!=u.detail||s.type!=null&&u.type!=null&&s.type!=u.type||s.apply!=u.apply||s.boost!=u.boost?a.push(c):fP(c.completion)>fP(s)&&(a[a.length-1]=c),s=c.completion}return a}class rc{constructor(e,n,r,i,o,a){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new rc(this.options,dP(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o,a){if(i&&!a&&e.some(c=>c.isPending))return i.setDisabled();let s=xde(e,n);if(!s.length)return i&&e.some(c=>c.isPending)?i.setDisabled():null;let l=n.facet(mn).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let c=i.options[i.selected].completion;for(let u=0;u<s.length;u++)if(s[u].completion==c){l=u;break}}return new rc(s,dP(r,l),{pos:e.reduce((c,u)=>u.hasResult()?Math.min(c,u.from):c,1e8),create:Ede,above:o.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new rc(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new rc(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class e1{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new e1(Cde,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(mn),o=(r.override||n.languageDataAt("autocomplete",Ds(n)).map(pde)).map(l=>(this.active.find(u=>u.source==l)||new ti(l,this.active.some(u=>u.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((l,c)=>l==this.active[c])&&(o=this.active);let a=this.open,s=e.effects.some(l=>l.is(M6));a&&e.docChanged&&(a=a.map(e.changes)),e.selection||o.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!_de(o,this.active)||s?a=rc.build(o,n,this.id,a,r,s):a&&a.disabled&&!o.some(l=>l.isPending)&&(a=null),!a&&o.every(l=>!l.isPending)&&o.some(l=>l.hasResult())&&(o=o.map(l=>l.hasResult()?new ti(l.source,0):l));for(let l of e.effects)l.is(pP)&&(a=a&&a.setSelected(l.value,this.id));return o==this.active&&a==this.open?this:new e1(o,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Sde:kde}}function _de(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;r<e.length&&!e[r].hasResult();)r++;let i=n==t.length,o=r==e.length;if(i||o)return i==o;if(t[n++].result!=e[r++].result)return!1}}const Sde={"aria-autocomplete":"list"},kde={};function dP(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const Cde=[];function hP(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(T6);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class ti{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=hP(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new ti(i.source,0)),r&4&&i.state==0&&(i=new ti(this.source,1)),i=i.updateFor(e,r);for(let o of e.effects)if(o.is(Jp))i=new ti(i.source,1,o.value);else if(o.is(ff))i=new ti(i.source,0);else if(o.is(M6))for(let a of o.value)a.source==i.source&&(i=a);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Ds(e.state))}}class ic extends ti{constructor(e,n,r,i,o,a){super(e,3,n),this.limit=r,this.result=i,this.from=o,this.to=a}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let o=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),s=Ds(e.state);if(s>a||!i||n&2&&(Ds(e.startState)==this.from||s<this.limit))return new ti(this.source,n&4?1:0);let l=e.changes.mapPos(this.limit);return Pde(i.validFor,e.state,o,a)?new ic(this.source,this.explicit,l,i,o,a):i.update&&(i=i.update(i,o,a,new P6(e.state,s,!1)))?new ic(this.source,this.explicit,l,i,i.from,(r=i.to)!==null&&r!==void 0?r:Ds(e.state)):new ti(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new ic(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new ti(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function Pde(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):lP(t,!0).test(i)}const M6=$e.define({map(t,e){return t.map(n=>n.map(e))}}),pP=$e.define(),lr=pn.define({create(){return e1.start()},update(t,e){return t.update(e)},provide:t=>[B3.from(t,e=>e.tooltip),ae.contentAttributes.from(t,e=>e.attrs)]});function Q6(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(lr).active.find(i=>i.source==e.source);return r instanceof ic?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},hde(t.state,n,r.from,r.to)),{annotations:T6.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}const Ede=bde(lr,Q6);function t1(t,e="option"){return n=>{let r=n.state.field(lr,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(mn).interactionDelay)return!1;let i=1,o;e=="page"&&(o=sk(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:a}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:a-1;return s<0?s=e=="page"?0:a-1:s>=a&&(s=e=="page"?a-1:0),n.dispatch({effects:pP.of(s)}),!0}}const Tde=t=>{let e=t.state.field(lr,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(mn).interactionDelay?!1:Q6(t,e.open.options[e.open.selected])},mP=t=>t.state.field(lr,!1)?(t.dispatch({effects:Jp.of(!0)}),!0):!1,Ade=t=>{let e=t.state.field(lr,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:ff.of(null)}),!0)};class Mde{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Qde=50,Dde=1e3,$de=Yt.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(lr).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(lr),n=t.state.facet(mn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(lr)==e)return;let r=t.transactions.some(o=>{let a=hP(o,n);return a&8||(o.selection||o.docChanged)&&!(a&3)});for(let o=0;o<this.running.length;o++){let a=this.running[o];if(r||a.context.abortOnDocChange&&t.docChanged||a.updates.length+t.transactions.length>Qde&&Date.now()-a.time>Dde){for(let s of a.context.abortListeners)try{s()}catch(l){ar(this.view.state,l)}a.context.abortListeners=null,this.running.splice(o--,1)}else a.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(a=>a.is(Jp)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.isPending&&!this.running.some(a=>a.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of t.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(lr);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(mn).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=Ds(e),r=new P6(e,n,t.explicit,this.view),i=new Mde(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:ff.of(null)}),ar(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(mn).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(mn),r=this.view.state.field(lr);for(let i=0;i<this.running.length;i++){let o=this.running[i];if(o.done===void 0)continue;if(this.running.splice(i--,1),o.done){let s=Ds(o.updates.length?o.updates[0].startState:this.view.state),l=Math.min(s,o.done.from+(o.active.explicit?0:1)),c=new ic(o.active.source,o.active.explicit,l,o.done,o.done.from,(t=o.done.to)!==null&&t!==void 0?t:s);for(let u of o.updates)c=c.update(u,n);if(c.hasResult()){e.push(c);continue}}let a=r.active.find(s=>s.source==o.active.source);if(a&&a.isPending)if(o.done==null){let s=new ti(o.active.source,0);for(let l of o.updates)s=s.update(l,n);s.isPending||e.push(s)}else this.startQuery(a)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:M6.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(lr,!1);if(e&&e.tooltip&&this.view.state.facet(mn).closeOnBlur){let n=e.open&&sk(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ff.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Jp.of(!1)}),20),this.composing=0}}}),Lde=typeof navigator=="object"&&/Win/.test(navigator.platform),Ide=jo.highest(ae.domEventHandlers({keydown(t,e){let n=e.state.field(lr,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(Lde&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(a=>a.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&Q6(e,r),!1}})),gP=ae.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class jde{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class D6{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,Cn.TrackDel),r=e.mapPos(this.to,1,Cn.TrackDel);return n==null||r==null?null:new D6(this.field,n,r)}}class $6{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],o=e.doc.lineAt(n),a=/^\s*/.exec(o.text)[0];for(let l of this.lines){if(r.length){let c=a,u=/^\t*/.exec(l)[0].length;for(let f=0;f<u;f++)c+=e.facet(Hl);i.push(n+c.length-u),l=c+l.slice(u)}r.push(l),n+=l.length+1}let s=this.fieldPositions.map(l=>new D6(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:s}}static parse(e){let n=[],r=[],i=[],o;for(let a of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(a);){let s=o[1]?+o[1]:null,l=o[2]||o[3]||"",c=-1,u=l.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f<n.length;f++)(s!=null?n[f].seq==s:u&&n[f].name==u)&&(c=f);if(c<0){let f=0;for(;f<n.length&&(s==null||n[f].seq!=null&&n[f].seq<s);)f++;n.splice(f,0,{seq:s,name:u}),c=f;for(let d of i)d.field>=c&&d.field++}i.push(new jde(c,r.length,o.index,o.index+u.length)),a=a.slice(0,o.index)+l+a.slice(o.index+o[0].length)}a=a.replace(/\\([{}])/g,(s,l,c)=>{for(let u of i)u.line==r.length&&u.from>c&&(u.from--,u.to--);return l}),r.push(a)}return new $6(r,i)}}let Nde=Se.widget({widget:new class extends Ji{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Rde=Se.mark({class:"cm-snippetField"});class oc{constructor(e,n){this.ranges=e,this.active=n,this.deco=Se.set(e.map(r=>(r.from==r.to?Nde:Rde).range(r.from,r.to)))}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new oc(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const df=$e.define({map(t,e){return t&&t.map(e)}}),Bde=$e.define(),hf=pn.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(df))return n.value;if(n.is(Bde)&&t)return new oc(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>ae.decorations.from(t,e=>e?e.deco:Se.none)});function L6(t,e){return U.create(t.filter(n=>n.field==e).map(n=>U.range(n.from,n.to)))}function Zde(t){let e=$6.parse(t);return(n,r,i,o)=>{let{text:a,ranges:s}=e.instantiate(n.state,i),{main:l}=n.state.selection,c={changes:{from:i,to:o==l.from?l.to:o,insert:He.of(a)},scrollIntoView:!0,annotations:r?[T6.of(r),Jt.userEvent.of("input.complete")]:void 0};if(s.length&&(c.selection=L6(s,0)),s.some(u=>u.field>0)){let u=new oc(s,0),f=c.effects=[df.of(u)];n.state.field(hf,!1)===void 0&&f.push($e.appendConfig.of([hf,Xde,Vde,gP]))}n.dispatch(n.state.update(c))}}function OP(t){return({state:e,dispatch:n})=>{let r=e.field(hf,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,o=t>0&&!r.ranges.some(a=>a.field==i+t);return n(e.update({selection:L6(r.ranges,i),effects:df.of(o?null:new oc(r.ranges,i)),scrollIntoView:!0})),!0}}const zde=[{key:"Tab",run:OP(1),shift:OP(-1)},{key:"Escape",run:({state:t,dispatch:e})=>t.field(hf,!1)?(e(t.update({effects:df.of(null)})),!0):!1}],yP=pe.define({combine(t){return t.length?t[0]:zde}}),Xde=jo.highest(ql.compute([yP],t=>t.facet(yP)));function cr(t,e){return Object.assign(Object.assign({},e),{apply:Zde(t)})}const Vde=ae.domEventHandlers({mousedown(t,e){let n=e.state.field(hf,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(o=>o.from<=r&&o.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:L6(n.ranges,i.field),effects:df.of(n.ranges.some(o=>o.field>i.field)?new oc(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),pf={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},$s=$e.define({map(t,e){let n=e.mapPos(t,-1,Cn.TrackAfter);return n??void 0}}),I6=new class extends ks{};I6.startSide=1,I6.endSide=-1;const vP=pn.define({create(){return Ue.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is($s)&&(t=t.update({add:[I6.range(n.value,n.value+1)]}));return t}});function Fde(){return[qde,vP]}const j6="()[]{}<>«»»«[]{}";function bP(t){for(let e=0;e<j6.length;e+=2)if(j6.charCodeAt(e)==t)return j6.charAt(e+1);return LO(t<128?t:t+1)}function wP(t,e){return t.languageDataAt("closeBrackets",e)[0]||pf}const Yde=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),qde=ae.inputHandler.of((t,e,n,r)=>{if((Yde?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Wi(ir(r,0))==1||e!=i.from||n!=i.to)return!1;let o=Ude(t.state,r);return o?(t.dispatch(o),!0):!1}),Wde=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=wP(t,t.selection.main.head).brackets||pf.brackets,i=null,o=t.changeByRange(a=>{if(a.empty){let s=Hde(t.doc,a.head);for(let l of r)if(l==s&&n1(t.doc,a.head)==bP(ir(l,0)))return{changes:{from:a.head-l.length,to:a.head+l.length},range:U.cursor(a.head-l.length)}}return{range:i=a}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i}}];function Ude(t,e){let n=wP(t,t.selection.main.head),r=n.brackets||pf.brackets;for(let i of r){let o=bP(ir(i,0));if(e==i)return o==i?Jde(t,i,r.indexOf(i+i+i)>-1,n):Gde(t,i,o,n.before||pf.before);if(e==o&&xP(t,t.selection.main.from))return Kde(t,i,o)}return null}function xP(t,e){let n=!1;return t.field(vP).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function n1(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Wi(ir(n,0)))}function Hde(t,e){let n=t.sliceString(e-2,e);return Wi(ir(n,0))==n.length?n:n.slice(1)}function Gde(t,e,n,r){let i=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:$s.of(a.to+e.length),range:U.range(a.anchor+e.length,a.head+e.length)};let s=n1(t.doc,a.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:e+n,from:a.head},effects:$s.of(a.head+e.length),range:U.cursor(a.head+e.length)}:{range:i=a}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Kde(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&n1(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:U.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function Jde(t,e,n,r){let i=r.stringPrefixes||pf.stringPrefixes,o=null,a=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:$s.of(s.to+e.length),range:U.range(s.anchor+e.length,s.head+e.length)};let l=s.head,c=n1(t.doc,l),u;if(c==e){if(_P(t,l))return{changes:{insert:e+e,from:l},effects:$s.of(l+e.length),range:U.cursor(l+e.length)};if(xP(t,l)){let d=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+d.length,insert:d},range:U.cursor(l+d.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(u=SP(t,l-2*e.length,i))>-1&&_P(t,u))return{changes:{insert:e+e+e+e,from:l},effects:$s.of(l+e.length),range:U.cursor(l+e.length)};if(t.charCategorizer(l)(c)!=Qt.Word&&SP(t,l,i)>-1&&!ehe(t,l,e,i))return{changes:{insert:e+e,from:l},effects:$s.of(l+e.length),range:U.cursor(l+e.length)}}return{range:o=s}});return o?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function _P(t,e){let n=Ot(t).resolveInner(e+1);return n.parent&&n.from==e}function ehe(t,e,n,r){let i=Ot(t).resolveInner(e,-1),o=r.reduce((a,s)=>Math.max(a,s.length),0);for(let a=0;a<5;a++){let s=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=s.indexOf(n);if(!l||l>-1&&r.indexOf(s.slice(0,l))>-1){let u=i.firstChild;for(;u&&u.from==i.from&&u.to-u.from>n.length+l;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=i.to==e&&i.parent;if(!c)break;i=c}return!1}function SP(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=Qt.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=Qt.Word)return o}return-1}function the(t={}){return[Ide,lr,mn.of(t),$de,nhe,gP]}const kP=[{key:"Ctrl-Space",run:mP},{mac:"Alt-`",run:mP},{key:"Escape",run:Ade},{key:"ArrowDown",run:t1(!0)},{key:"ArrowUp",run:t1(!1)},{key:"PageDown",run:t1(!0,"page")},{key:"PageUp",run:t1(!1,"page")},{key:"Enter",run:Tde}],nhe=jo.highest(ql.computeN([mn],t=>t.facet(mn).defaultKeymap?[kP]:[]));class CP{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class Ls{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=r.facet(mf).markerFilter;i&&(e=i(e,r));let o=e.slice().sort((u,f)=>u.from-f.from||u.to-f.to),a=new No,s=[],l=0;for(let u=0;;){let f=u==o.length?null:o[u];if(!f&&!s.length)break;let d,h;for(s.length?(d=l,h=s.reduce((g,p)=>Math.min(g,p.to),f&&f.from>d?f.from:1e8)):(d=f.from,h=f.to,s.push(f),u++);u<o.length;){let g=o[u];if(g.from==d&&(g.to>g.from||g.to==d))s.push(g),u++,h=Math.min(g.to,h);else{h=Math.min(g.from,h);break}}let m=phe(s);if(s.some(g=>g.from==g.to||g.from==g.to-1&&r.doc.lineAt(g.from).to==g.from))a.add(d,d,Se.widget({widget:new uhe(m),diagnostics:s.slice()}));else{let g=s.reduce((p,O)=>O.markClass?p+" "+O.markClass:p,"");a.add(d,h,Se.mark({class:"cm-lintRange cm-lintRange-"+m+g,diagnostics:s.slice(),inclusiveEnd:s.some(p=>p.to>h)}))}l=h;for(let g=0;g<s.length;g++)s[g].to<=l&&s.splice(g--,1)}let c=a.finish();return new Ls(c,n,ac(c))}}function ac(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,o,{spec:a})=>{if(!(e&&a.diagnostics.indexOf(e)<0))if(!r)r=new CP(i,o,e||a.diagnostics[0]);else{if(a.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new CP(r.from,o,r.diagnostic)}}),r}function rhe(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(mf).hideOn(t,n,r);if(i!=null)return i;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(a=>a.is(PP))||t.changes.touchesRange(o.from,Math.max(o.to,r)))}function ihe(t,e){return t.field(kr,!1)?e:e.concat($e.appendConfig.of(mhe))}const PP=$e.define(),N6=$e.define(),EP=$e.define(),kr=pn.define({create(){return new Ls(Se.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);r=ac(n,t.selected.diagnostic,o)||ac(n,null,o)}!n.size&&i&&e.state.facet(mf).autoPanel&&(i=null),t=new Ls(n,i,r)}for(let n of e.effects)if(n.is(PP)){let r=e.state.facet(mf).autoPanel?n.value.length?gf.open:null:t.panel;t=Ls.init(n.value,r,e.state)}else n.is(N6)?t=new Ls(t.diagnostics,n.value?gf.open:null,t.selected):n.is(EP)&&(t=new Ls(t.diagnostics,t.panel,n.value));return t},provide:t=>[Wu.from(t,e=>e.panel),ae.decorations.from(t,e=>e.diagnostics)]}),ohe=Se.mark({class:"cm-lintRange cm-lintRange-active"});function ahe(t,e,n){let{diagnostics:r}=t.state.field(kr),i,o=-1,a=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,c,{spec:u})=>{if(e>=l&&e<=c&&(l==c||(e>l||n>0)&&(e<c||n<0)))return i=u.diagnostics,o=l,a=c,!1});let s=t.state.facet(mf).tooltipFilter;return i&&s&&(i=s(i,t.state)),i?{pos:o,end:a,above:t.state.doc.lineAt(o).to<a,create(){return{dom:she(t,i)}}}:null}function she(t,e){return yt("ul",{class:"cm-tooltip-lint"},e.map(n=>MP(t,n,!1)))}const lhe=t=>{let e=t.state.field(kr,!1);(!e||!e.panel)&&t.dispatch({effects:ihe(t.state,[N6.of(!0)])});let n=qu(t,gf.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},TP=t=>{let e=t.state.field(kr,!1);return!e||!e.panel?!1:(t.dispatch({effects:N6.of(!1)}),!0)},che=[{key:"Mod-Shift-m",run:lhe,preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field(kr,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],mf=pe.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},Gi(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function AP(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(o=>o.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function MP(t,e,n){var r;let i=n?AP(e.actions):[];return yt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},yt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,a)=>{let s=!1,l=d=>{if(d.preventDefault(),s)return;s=!0;let h=ac(t.state.field(kr).diagnostics,e);h&&o.apply(t,h.from,h.to)},{name:c}=o,u=i[a]?c.indexOf(i[a]):-1,f=u<0?c:[c.slice(0,u),yt("u",c.slice(u,u+1)),c.slice(u+1)];return yt("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${i[a]})"`}.`},f)}),e.source&&yt("div",{class:"cm-diagnosticSource"},e.source))}class uhe extends Ji{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return yt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class QP{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=MP(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class gf{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)TP(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],a=AP(o.actions);for(let s=0;s<a.length;s++)if(a[s].toUpperCase().charCodeAt(0)==i.keyCode){let l=ac(this.view.state.field(kr).diagnostics,o);l&&o.actions[s].apply(e,l.from,l.to)}}else return;i.preventDefault()},r=i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)};this.list=yt("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=yt("div",{class:"cm-panel-lint"},this.list,yt("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>TP(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(kr).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(kr),r=0,i=!1,o=null,a=new Set;for(e.between(0,this.view.state.doc.length,(s,l,{spec:c})=>{for(let u of c.diagnostics){if(a.has(u))continue;a.add(u);let f=-1,d;for(let h=r;h<this.items.length;h++)if(this.items[h].diagnostic==u){f=h;break}f<0?(d=new QP(this.view,u),this.items.splice(r,0,d),i=!0):(d=this.items[f],f>r&&(this.items.splice(r,f-r),i=!0)),n&&d.diagnostic==n.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),o=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new QP(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:l})=>{let c=l.height/this.list.offsetHeight;s.top<l.top?this.list.scrollTop-=(l.top-s.top)/c:s.bottom>l.bottom&&(this.list.scrollTop+=(s.bottom-l.bottom)/c)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(kr),r=ac(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:EP.of(r)})}static open(e){return new gf(e)}}function fhe(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function r1(t){return fhe(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const dhe=ae.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:r1("#d11")},".cm-lintRange-warning":{backgroundImage:r1("orange")},".cm-lintRange-info":{backgroundImage:r1("#999")},".cm-lintRange-hint":{backgroundImage:r1("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function hhe(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function phe(t){let e="hint",n=1;for(let r of t){let i=hhe(r.severity);i>n&&(n=i,e=r.severity)}return e}const mhe=[kr,ae.decorations.compute([kr],t=>{let{selected:e,panel:n}=t.field(kr);return!e||!n||e.from==e.to?Se.none:Se.set([ohe.range(e.from,e.to)])}),lce(ahe,{hideOn:rhe}),dhe];var DP=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(Wde)),e.defaultKeymap!==!1&&(r=r.concat(Ife)),e.searchKeymap!==!1&&(r=r.concat(lde)),e.historyKeymap!==!1&&(r=r.concat(Fue)),e.foldKeymap!==!1&&(r=r.concat(sue)),e.completionKeymap!==!1&&(r=r.concat(kP)),e.lintKeymap!==!1&&(r=r.concat(che));var i=[];return e.lineNumbers!==!1&&i.push(vce()),e.highlightActiveLineGutter!==!1&&i.push(xce()),e.highlightSpecialChars!==!1&&i.push(jle()),e.history!==!1&&i.push(Iue()),e.foldGutter!==!1&&i.push(fue()),e.drawSelection!==!1&&i.push(Cle()),e.dropCursor!==!1&&i.push(Mle()),e.allowMultipleSelections!==!1&&i.push(Xe.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(tue()),e.syntaxHighlighting!==!1&&i.push(Gk(mue,{fallback:!0})),e.bracketMatching!==!1&&i.push(wue()),e.closeBrackets!==!1&&i.push(Fde()),e.autocompletion!==!1&&i.push(the()),e.rectangularSelection!==!1&&i.push(Gle()),n!==!1&&i.push(ece()),e.highlightActiveLine!==!1&&i.push(Xle()),e.highlightSelectionMatches!==!1&&i.push(Xfe()),e.tabSize&&typeof e.tabSize=="number"&&i.push(Hl.of(" ".repeat(e.tabSize))),i.concat([ql.of(r.flat())]).filter(Boolean)};const ghe="#e5c07b",$P="#e06c75",Ohe="#56b6c2",yhe="#ffffff",i1="#abb2bf",R6="#7d8799",vhe="#61afef",bhe="#98c379",LP="#d19a66",whe="#c678dd",xhe="#21252b",IP="#2c313a",jP="#282c34",B6="#353a42",_he="#3E4451",NP="#528bff",She=ae.theme({"&":{color:i1,backgroundColor:jP},".cm-content":{caretColor:NP},".cm-cursor, .cm-dropCursor":{borderLeftColor:NP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:_he},".cm-panels":{backgroundColor:xhe,color:i1},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:jP,color:R6,border:"none"},".cm-activeLineGutter":{backgroundColor:IP},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:B6},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:B6,borderBottomColor:B6},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:IP,color:i1}}},{dark:!0}),khe=of.define([{tag:M.keyword,color:whe},{tag:[M.name,M.deleted,M.character,M.propertyName,M.macroName],color:$P},{tag:[M.function(M.variableName),M.labelName],color:vhe},{tag:[M.color,M.constant(M.name),M.standard(M.name)],color:LP},{tag:[M.definition(M.name),M.separator],color:i1},{tag:[M.typeName,M.className,M.number,M.changed,M.annotation,M.modifier,M.self,M.namespace],color:ghe},{tag:[M.operator,M.operatorKeyword,M.url,M.escape,M.regexp,M.link,M.special(M.string)],color:Ohe},{tag:[M.meta,M.comment],color:R6},{tag:M.strong,fontWeight:"bold"},{tag:M.emphasis,fontStyle:"italic"},{tag:M.strikethrough,textDecoration:"line-through"},{tag:M.link,color:R6,textDecoration:"underline"},{tag:M.heading,fontWeight:"bold",color:$P},{tag:[M.atom,M.bool,M.special(M.variableName)],color:LP},{tag:[M.processingInstruction,M.string,M.inserted],color:bhe},{tag:M.invalid,color:yhe}]),Che=[She,Gk(khe)];var Phe=ae.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Ehe=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:o="light",placeholder:a="",basicSetup:s=!0}=e,l=[];switch(n&&l.unshift(ql.of([jfe])),s&&(typeof s=="boolean"?l.unshift(DP()):l.unshift(DP(s))),a&&l.unshift(qle(a)),o){case"light":l.push(Phe);break;case"dark":l.push(Che);break;case"none":break;default:l.push(o);break}return r===!1&&l.push(ae.editable.of(!1)),i&&l.push(Xe.readOnly.of(!0)),[...l]},The=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)}),RP=Hi.define(),Ahe=[];function Mhe(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:a,extensions:s=Ahe,autoFocus:l,theme:c="light",height:u=null,minHeight:f=null,maxHeight:d=null,width:h=null,minWidth:m=null,maxWidth:g=null,placeholder:p="",editable:O=!0,readOnly:w=!1,indentWithTab:v=!0,basicSetup:b=!0,root:y,initialState:x}=t,[_,E]=k.useState(),[A,I]=k.useState(),[Q,D]=k.useState(),j=ae.theme({"&":{height:u,minHeight:f,maxHeight:d,width:h,minWidth:m,maxWidth:g},"& .cm-scroller":{height:"100% !important"}}),R=ae.updateListener.of(V=>{if(V.docChanged&&typeof r=="function"&&!V.transactions.some(L=>L.annotation(RP))){var K=V.state.doc,ne=K.toString();r(ne,V)}i&&i(The(V))}),B=Ehe({theme:c,editable:O,readOnly:w,placeholder:p,indentWithTab:v,basicSetup:b}),X=[R,j,...B];return a&&typeof a=="function"&&X.push(ae.updateListener.of(a)),X=X.concat(s),k.useLayoutEffect(()=>{if(_&&!Q){var V={doc:e,selection:n,extensions:X},K=x?Xe.fromJSON(x.json,V,x.fields):Xe.create(V);if(D(K),!A){var ne=new ae({state:K,parent:_,root:y});I(ne),o&&o(ne,K)}}return()=>{A&&(D(void 0),I(void 0))}},[_,Q]),k.useEffect(()=>{t.container&&E(t.container)},[t.container]),k.useEffect(()=>()=>{A&&(A.destroy(),I(void 0))},[A]),k.useEffect(()=>{l&&A&&A.focus()},[l,A]),k.useEffect(()=>{A&&A.dispatch({effects:$e.reconfigure.of(X)})},[c,s,u,f,d,h,m,g,p,O,w,v,b,r,a]),k.useEffect(()=>{if(e!==void 0){var V=A?A.state.doc.toString():"";A&&e!==V&&A.dispatch({changes:{from:0,to:V.length,insert:e||""},annotations:[RP.of(!0)]})}},[e,A]),{state:Q,setState:D,view:A,setView:I,container:_,setContainer:E}}var Qhe=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],BP=k.forwardRef((t,e)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,autoFocus:u,theme:f="light",height:d,minHeight:h,maxHeight:m,width:g,minWidth:p,maxWidth:O,basicSetup:w,placeholder:v,indentWithTab:b,editable:y,readOnly:x,root:_,initialState:E}=t,A=xae(t,Qhe),I=k.useRef(null),{state:Q,view:D,container:j,setContainer:R}=Mhe({root:_,value:r,autoFocus:u,theme:f,height:d,minHeight:h,maxHeight:m,width:g,minWidth:p,maxWidth:O,basicSetup:w,placeholder:v,indentWithTab:b,editable:y,readOnly:x,selection:i,onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,extensions:o,initialState:E});k.useImperativeHandle(e,()=>({editor:I.current,state:Q,view:D}),[I,j,Q,D]);var B=k.useCallback(V=>{I.current=V,R(V)},[R]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var X=typeof f=="string"?"cm-theme-"+f:"cm-theme";return F.jsx("div",QO({ref:B,className:""+X+(n?" "+n:"")},A))});BP.displayName="CodeMirror";var ZP={npm_package_exports___require:"./dist/avocado-not-front.umd.js",npm_package_devDependencies__types_node:"20.2.5",npm_package_devDependencies__testing_library_jest_dom:"6.4.0",npm_config_user_agent:"pnpm/9.10.0 npm/? node/v20.17.0 linux x64",CI:"true",npm_package_devDependencies__testing_library_user_event:"14.5.2",npm_package_devDependencies_vite:"5.0.12",npm_node_execpath:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_package_publishConfig_access:"public",npm_package_files_0:"dist",HOME:"/home/runner",npm_package_dependencies_react_select_async_paginate:"0.7.3",npm_package_devDependencies_classnames:"2.3.2",npm_package_devDependencies_sass:"1.62.1",npm_config_auto_install_peers:"true",npm_package_devDependencies_vite_plugin_dts:"3.7.1",npm_package_dependencies__codemirror_lang_yaml:"6.1.2",npm_package_devDependencies_typescript:"5.1.3",npm_package_peerDependencies_react_select_async_paginate:"0.7.3",npm_package_types:"./dist/index.d.ts",npm_package_devDependencies__types_react_dom:"18.0.11",npm_package_dependencies__codemirror_lang_markdown:"6.3.4",npm_package_devDependencies__vitejs_plugin_react_swc:"3.5.0",npm_package_type:"module",npm_package_dependencies_zustand:"4.5.4",npm_package_module:"./dist/avocado-not-front.es.js",npm_package_devDependencies__types_testing_library__jest_dom:"6.0.0",npm_package_dependencies__foris_avocado_icons:"workspace:*",npm_config_registry:"https://registry.npmjs.org/",npm_config_node_linker:"hoisted",npm_package_dependencies__codemirror_lang_json:"6.0.1",npm_package_exports___import:"./dist/avocado-not-front.es.js",npm_package_dependencies__foris_avocado_core:"workspace:*",npm_package_dependencies_axios:"^1.8.4",npm_package_dependencies_recharts:"3.1.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/avocado/avocado/packages/avocado-not-front/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/opt/hostedtoolcache/node/20.17.0/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",TURBO_HASH:"06187051d8686c49",npm_package_name:"@foris/avocado-not-front",npm_package_scripts_start_stubby_examples:"stubby -d src/services/stubs/stubby-examples.yml -w -s 8300 -q",NODE:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_config_frozen_lockfile:"",npm_config_legacy_peer_deps:"true",LANG:"C.UTF-8",npm_package_dependencies_react_dom:"18.2.0",npm_package_main:"./dist/avocado-not-front.umd.js",npm_lifecycle_script:"tsc && vite build",npm_package_dependencies__uiw_react_codemirror:"4.23.12",SHELL:"/bin/bash",NODE_PATH:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.4.0",npm_package_devDependencies__testing_library_react:"14.2.0",npm_package_devDependencies__types_react:"18.0.28",npm_package_devDependencies_jsdom:"24.0.0",npm_lifecycle_event:"build",npm_package_scripts_build:"tsc && vite build",npm_package_dependencies__codemirror_lang_sql:"6.8.0",npm_package_dependencies__foris_avocado_suite:"workspace:*",npm_package_dependencies_jsonpath:"1.1.1",npm_package_devDependencies__foris_tsconfig:"workspace:*",npm_package_dependencies_react_select:"5.8.0",PWD:"/home/runner/work/avocado/avocado/packages/avocado-not-front",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/pnpm.cjs",npm_package_devDependencies_stubby:"^5.1.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/avocado/avocado/packages/avocado-not-front",npm_package_scripts_start_stubby:"stubby -d src/services/stubs/stubby-config.yml -w -s 8200 -q",npm_package_dependencies_react:"18.2.0",npm_package_peerDependencies_react_select:"5.8.0",INIT_CWD:"/home/runner/work/avocado/avocado/packages/avocado-not-front",NODE_ENV:"production"};class o1{constructor(e,n,r,i,o,a,s,l,c,u=0,f){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=a,this.buffer=s,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new o1(e,[],n,r,r,0,[],0,i?new zP(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,a=this.reducePos<this.pos-25;a&&this.setLookAhead(this.pos);let s=o.dynamicPrecedence(i);if(s&&(this.score+=s),r==0){this.pushState(o.getGoto(this.state,i,!0),this.reducePos),i<o.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(r-1)*3-(e&262144?6:0),c=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=u));let f=l?this.stack[l-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<o.minRepeatTerm||e&131072){let h=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,c,h,d+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=o.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this,s=this.buffer.length;if(s==0&&a.parent&&(s=a.bufferBase-a.parent.bufferBase,a=a.parent),s>0&&a.buffer[s-4]==0&&a.buffer[s-1]>-1){if(n==r)return;if(a.buffer[s-2]>=n){a.buffer[s-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0){let s=!1;for(let l=a;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){s=!0;break}if(s)for(;a>0&&this.buffer[a-2]>r;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,i>4&&(i-=4)}this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=r,this.buffer[a+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4);else{let o=e,{parser:a}=this.p;(i>this.pos||n<=a.maxNode)&&(this.pos=i,a.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=a.maxNode&&this.buffer.push(n,r,i,4)}}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new o1(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new Dhe(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let o=0,a;o<n.length;o+=2)(a=n[o+1])!=this.state&&this.p.parser.hasAction(a,e)&&i.push(n[o],a);if(this.stack.length<120)for(let o=0;i.length<8&&o<n.length;o+=2){let a=n[o+1];i.some((s,l)=>l&1&&s==a)||i.push(n[o],a)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let o=n[i+1];if(o==this.state)continue;let a=this.split();a.pushState(o,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(n[i],this.pos),a.reducePos=this.pos,a.score-=200,r.push(a)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if(!(n&65536))return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,a=>{if(!(a&393216))if(a&65536){let s=(a>>19)-o;if(s>1){let l=a&65535,c=this.stack.length-s*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return s<<19|65536|l}}else{let s=r(a,o+1);if(s!=null)return s}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new zP(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class zP{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class Dhe{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class a1{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new a1(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new a1(this.stack,this.pos,this.index)}}function Of(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let o=0;for(;;){let a=t.charCodeAt(r++),s=!1;if(a==126){o=65535;break}a>=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,s=!0),o+=l,s)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class s1{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const XP=new s1;class $he{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=XP,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;o<r.from;){if(!i)return null;let a=this.ranges[--i];o-=r.from-a.to,r=a}for(;n<0?o>r.to:o>=r.to;){if(i==this.ranges.length-1)return null;let a=this.ranges[++i];o+=a.from-r.to,r=a}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(r=o,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let a=this.rangeIndex,s=this.range;for(;s.to<=r;)s=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>s.to&&(this.chunk2=this.chunk2.slice(0,s.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=XP,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class sc{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;VP(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}sc.prototype.contextual=sc.prototype.fallback=sc.prototype.extend=!1;class l1{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?Of(e):e}token(e,n){let r=e.pos,i=0;for(;;){let o=e.next<0,a=e.resolveOffset(1,1);if(VP(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||i++,a==null)break;e.reset(a,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}l1.prototype.contextual=sc.prototype.fallback=sc.prototype.extend=!1;class gn{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function VP(t,e,n,r,i,o){let a=0,s=1<<r,{dialect:l}=n.p.parser;e:for(;s&t[a];){let c=t[a+1];for(let h=a+3;h<c;h+=2)if((t[h+1]&s)>0){let m=t[h];if(l.allows(m)&&(e.token.value==-1||e.token.value==m||Lhe(m,e.token.value,i,o))){e.acceptToken(m);break}}let u=e.next,f=0,d=t[a+2];if(e.next<0&&d>f&&t[c+d*3-3]==65535){a=t[c+d*3-1];continue e}for(;f<d;){let h=f+d>>1,m=c+h+(h<<1),g=t[m],p=t[m+1]||65536;if(u<g)d=h;else if(u>=p)f=h+1;else{a=t[m+2],e.advance();continue e}}break}}function FP(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function Lhe(t,e,n,r){let i=FP(n,r,e);return i<0||FP(n,r,t)<i}const Cr=typeof process<"u"&&ZP&&/\bparse\b/.test(ZP.LOG);let Z6=null;function YP(t,e,n){let r=t.cursor(_t.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}let Ihe=class{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?YP(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?YP(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=r.children[i],a=this.start[n]+r.positions[i];if(a>e)return this.nextStart=a,null;if(o instanceof ot){if(a==e){if(a<this.safeFrom)return null;let s=a+o.length;if(s<=this.safeTo){let l=o.prop(Qe.lookAhead);if(!l||s+l<this.fragment.to)return o}}this.index[n]++,a+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+o.length}}};class jhe{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new s1)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,a=i.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let c=0;c<o.length;c++){if(!(1<<c&a))continue;let u=o[c],f=this.tokens[c];if(!(r&&!u.fallback)&&((u.contextual||f.start!=e.pos||f.mask!=a||f.context!=s)&&(this.updateCachedToken(f,u,e),f.mask=a,f.context=s),f.lookAhead>f.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let d=n;if(f.extended>-1&&(n=this.addActions(e,f.extended,f.end,n)),n=this.addActions(e,f.value,f.end,n),!u.extend&&(r=f,n>d))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new s1,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new s1,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let a=0;a<o.specialized.length;a++)if(o.specialized[a]==e.value){let s=o.specializers[a](this.stream.read(e.start,e.end),r);if(s>=0&&r.p.parser.dialect.allows(s>>1)){s&1?e.extended=s>>1:e.value=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;o<i;o+=3)if(this.actions[o]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:o}=e,{parser:a}=e.p,{data:s}=a;for(let l=0;l<2;l++)for(let c=a.stateSlot(o,l?2:1);;c+=3){if(s[c]==65535)if(s[c+1]==1)c=Fo(s,c+2);else{i==0&&s[c+1]==2&&(i=this.putAction(Fo(s,c+2),n,r,i));break}s[c]==n&&(i=this.putAction(Fo(s,c+1),n,r,i))}return i}}class Nhe{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new $he(n,i),this.tokens=new jhe(e,this.stream),this.topTerm=e.top[1];let{from:o}=i[0];this.stacks=[o1.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>e.bufferLength*4?new Ihe(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let s=e[a];for(;;){if(this.tokens.mainToken=null,s.pos>n)r.push(s);else{if(this.advanceStack(s,r,e))continue;{i||(i=[],o=[]),i.push(s);let l=this.tokens.getMainToken(s);o.push(l.value,l.end)}}break}}if(!r.length){let a=i&&Bhe(i);if(a)return Cr&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Cr&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let a=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(a)return Cr&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(r.length>a)for(r.sort((s,l)=>l.score-s.score);r.length>a;)r.pop();r.some(s=>s.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let a=0;a<r.length-1;a++){let s=r[a];for(let l=a+1;l<r.length;l++){let c=r[l];if(s.sameState(c)||s.buffer.length>500&&c.buffer.length>500)if((s.score-c.score||s.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(a--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let a=1;a<r.length;a++)r[a].pos<this.minStackPos&&(this.minStackPos=r[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:o}=this,a=Cr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?o.getGoto(e.state,f.type.id):-1;if(d>-1&&f.length&&(!c||(f.prop(Qe.contextHash)||0)==u))return e.useNode(f,d),Cr&&console.log(a+this.stackID(e)+` (via reuse of ${o.getName(f.type.id)})`),!0;if(!(f instanceof ot)||f.children.length==0||f.positions[0]>0)break;let h=f.children[0];if(h instanceof ot&&f.positions[0]==0)f=h;else break}}let s=o.stateSlot(e.state,4);if(s>0)return e.reduce(s),Cr&&console.log(a+this.stackID(e)+` (via always-reduce ${o.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;c<l.length;){let u=l[c++],f=l[c++],d=l[c++],h=c==l.length||!r,m=h?e:e.split(),g=this.tokens.mainToken;if(m.apply(u,f,g?g.start:m.pos,d),Cr&&console.log(a+this.stackID(m)+` (via ${u&65536?`reduce of ${o.getName(u&65535)}`:"shift"} for ${o.getName(f)} @ ${i}${m==e?"":", split"})`),h)return!0;m.pos>i?n.push(m):r.push(m)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return qP(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let a=0;a<e.length;a++){let s=e[a],l=n[a<<1],c=n[(a<<1)+1],u=Cr?this.stackID(s)+" -> ":"";if(s.deadEnd&&(o||(o=!0,s.restart(),Cr&&console.log(u+this.stackID(s)+" (restarted)"),this.advanceFully(s,r))))continue;let f=s.split(),d=u;for(let h=0;f.forceReduce()&&h<10&&(Cr&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,r));h++)Cr&&(d=this.stackID(f)+" -> ");for(let h of s.recoverByInsert(l))Cr&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>s.pos?(c==s.pos&&(c++,l=0),s.recoverByDelete(l,c),Cr&&console.log(u+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),qP(s,r)):(!i||i.score<s.score)&&(i=s)}return i}stackToTree(e){return e.close(),ot.build({buffer:a1.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(Z6||(Z6=new WeakMap)).get(e);return n||Z6.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function qP(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class Rhe{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const z6=t=>t;class X6{constructor(e){this.start=e.start,this.shift=e.shift||z6,this.reduce=e.reduce||z6,this.reuse=e.reuse||z6,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class ho extends W3{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let s=0;s<e.repeatNodeCount;s++)n.push("");let r=Object.keys(e.topRules).map(s=>e.topRules[s][1]),i=[];for(let s=0;s<n.length;s++)i.push([]);function o(s,l,c){i[s].push([l,l.deserialize(String(c))])}if(e.nodeProps)for(let s of e.nodeProps){let l=s[0];typeof l=="string"&&(l=Qe[l]);for(let c=1;c<s.length;){let u=s[c++];if(u>=0)o(u,l,s[c++]);else{let f=s[c+-u];for(let d=-u;d>0;d--)o(s[c++],l,f);c++}}}this.nodeSet=new Gu(n.map((s,l)=>sn.define({name:l>=this.minRepeatTerm?void 0:s,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Ok;let a=Of(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;s<this.specializerSpecs.length;s++)this.specialized[s]=this.specializerSpecs[s].term;this.specializers=this.specializerSpecs.map(WP),this.states=Of(e.states,Uint32Array),this.data=Of(e.stateData),this.goto=Of(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(s=>typeof s=="number"?new sc(a,s):s),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new Nhe(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let a=i[o++],s=a&1,l=i[o++];if(s&&r)return l;for(let c=o+(a>>1);o<c;o++)if(i[o]==e)return l;if(s)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let o=this.stateSlot(e,i?2:1),a;;o+=3){if((a=r[o])==65535)if(r[o+1]==1)a=r[o=Fo(r,o+2)];else{if(r[o+1]==2)return Fo(r,o+2);break}if(a==n||a==0)return Fo(r,o+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=Fo(this.data,o+2);else break;i=n(Fo(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Fo(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((o,a)=>a&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(ho.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(s=>s.from==r.external);if(!o)return r;let a=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=WP(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let a=n.indexOf(o);a>=0&&(r[a]=!0)}let i=null;for(let o=0;o<n.length;o++)if(!r[o])for(let a=this.dialects[n[o]],s;(s=this.data[a++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[s]=1;return new Rhe(e,r,i)}static deserialize(e){return new ho(e)}}function Fo(t,e){return t[e]|t[e+1]<<16}function Bhe(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function WP(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}const Zhe=io({String:M.string,Number:M.number,"True False":M.bool,PropertyName:M.propertyName,Null:M.null,", :":M.separator,"[ ]":M.squareBracket,"{ }":M.brace}),zhe=ho.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[Zhe],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),Xhe=lo.define({name:"json",parser:zhe.configure({props:[Ba.add({Object:Ms({except:/^\s*\}/}),Array:Ms({except:/^\s*\]/})}),Vo.add({"Object Array":Ip})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function UP(){return new Ra(Xhe)}class c1{static create(e,n,r,i,o){let a=i+(i<<8)+e+(n<<4)|0;return new c1(e,n,r,a,o,[],[])}constructor(e,n,r,i,o,a,s){this.type=e,this.value=n,this.from=r,this.hash=i,this.end=o,this.children=a,this.positions=s,this.hashProp=[[Qe.contextHash,i]]}addChild(e,n){e.prop(Qe.contextHash)!=this.hash&&(e=new ot(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let r=this.children.length-1;return r>=0&&(n=Math.max(n,this.positions[r]+this.children[r].length+this.from)),new ot(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(i,o,a)=>new ot(sn.none,i,o,a,this.hashProp)})}}var ie;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(ie||(ie={}));class Vhe{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}let Fhe=class{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return yf(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,n=0,r=0){for(let i=n;i<e;i++)r+=this.text.charCodeAt(i)==9?4-r%4:1;return r}findColumn(e){let n=0;for(let r=0;n<this.text.length&&r<e;n++)r+=this.text.charCodeAt(n)==9?4-r%4:1;return n}scrub(){if(!this.baseIndent)return this.text;let e="";for(let n=0;n<this.basePos;n++)e+=" ";return e+this.text.slice(this.basePos)}};function HP(t,e,n){if(n.pos==n.text.length||t!=e.block&&n.indent>=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(t.type==ie.OrderedList?Y6:F6)(n,e,!1);return r>0&&(t.type!=ie.BulletList||V6(n,e,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==t.value}const GP={[ie.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(Fe(ie.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(ni(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[ie.ListItem](t,e,n){return n.indent<n.baseIndent+t.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[ie.OrderedList]:HP,[ie.BulletList]:HP,[ie.Document](){return!0}};function ni(t){return t==32||t==9||t==10||t==13}function yf(t,e=0){for(;e<t.length&&ni(t.charCodeAt(e));)e++;return e}function KP(t,e,n){for(;e>n&&ni(t.charCodeAt(e-1));)e--;return e}function JP(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let n=e;n<t.text.length;n++)if(t.text.charCodeAt(n)==96)return-1}return e}function eE(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function V6(t,e,n){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let r=1;for(let i=t.pos+1;i<t.text.length;i++){let o=t.text.charCodeAt(i);if(o==t.next)r++;else if(!ni(o))return-1}return n&&t.next==45&&rE(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(lE.SetextHeading)>-1||r<3?-1:1}function tE(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function F6(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||ni(t.text.charCodeAt(t.pos+1)))&&(!n||tE(e,ie.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function Y6(t,e,n){let r=t.pos,i=t.next;for(;i>=48&&i<=57;){r++;if(r==t.text.length)return-1;i=t.text.charCodeAt(r)}return r==t.pos||r>t.pos+9||i!=46&&i!=41||r<t.text.length-1&&!ni(t.text.charCodeAt(r+1))||n&&!tE(e,ie.OrderedList)&&(t.skipSpace(r+1)==t.text.length||r>t.pos+1||t.next!=49)?-1:r+1-t.pos}function nE(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let n=e-t.pos;return n>6?-1:n}function rE(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let n=e;for(;e<t.text.length&&ni(t.text.charCodeAt(e));)e++;return e==t.text.length?n:-1}const q6=/^[ \t]*$/,iE=/-->/,oE=/\?>/,W6=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,iE],[/^\s*<\?/,oE],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,q6],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,q6]];function aE(t,e,n){if(t.next!=60)return-1;let r=t.text.slice(t.pos);for(let i=0,o=W6.length-(n?1:0);i<o;i++)if(W6[i][0].test(r))return i;return-1}function sE(t,e){let n=t.countIndent(e,t.pos,t.indent),r=t.countIndent(t.skipSpace(e),e,n);return r>=n+5?n+1:r}function Is(t,e,n){let r=t.length-1;r>=0&&t[r].to==e&&t[r].type==ie.CodeText?t[r].to=n:t.push(Fe(ie.CodeText,e,n))}const u1={LinkReference:void 0,IndentedCode(t,e){let n=e.baseIndent+4;if(e.indent<n)return!1;let r=e.findColumn(n),i=t.lineStart+r,o=t.lineStart+e.text.length,a=[],s=[];for(Is(a,i,o);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){Is(s,t.lineStart-1,t.lineStart);for(let l of e.markers)s.push(l)}else{if(e.indent<n)break;{if(s.length){for(let c of s)c.type==ie.CodeText?Is(a,c.from,c.to):a.push(c);s=[]}Is(a,t.lineStart-1,t.lineStart);for(let c of e.markers)a.push(c);o=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<o&&Is(a,l,o)}}return s.length&&(s=s.filter(l=>l.type!=ie.CodeText),s.length&&(e.markers=s.concat(e.markers))),t.addNode(t.buffer.writeElements(a,-i).finish(ie.CodeBlock,o-i),i),!0},FencedCode(t,e){let n=JP(e);if(n<0)return!1;let r=t.lineStart+e.pos,i=e.next,o=n-e.pos,a=e.skipSpace(n),s=KP(e.text,e.text.length,a),l=[Fe(ie.CodeMark,r,r+o)];a<s&&l.push(Fe(ie.CodeInfo,t.lineStart+a,t.lineStart+s));for(let c=!0;t.nextLine()&&e.depth>=t.stack.length;c=!1){let u=e.pos;if(e.indent-e.baseIndent<4)for(;u<e.text.length&&e.text.charCodeAt(u)==i;)u++;if(u-e.pos>=o&&e.skipSpace(u)==e.text.length){for(let f of e.markers)l.push(f);l.push(Fe(ie.CodeMark,t.lineStart+e.pos,t.lineStart+u)),t.nextLine();break}else{c||Is(l,t.lineStart-1,t.lineStart);for(let h of e.markers)l.push(h);let f=t.lineStart+e.basePos,d=t.lineStart+e.text.length;f<d&&Is(l,f,d)}}return t.addNode(t.buffer.writeElements(l,-r).finish(ie.FencedCode,t.prevLineEnd()-r),r),!0},Blockquote(t,e){let n=eE(e);return n<0?!1:(t.startContext(ie.Blockquote,e.pos),t.addNode(ie.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+n),null)},HorizontalRule(t,e){if(V6(e,t,!1)<0)return!1;let n=t.lineStart+e.pos;return t.nextLine(),t.addNode(ie.HorizontalRule,n),!0},BulletList(t,e){let n=F6(e,t,!1);if(n<0)return!1;t.block.type!=ie.BulletList&&t.startContext(ie.BulletList,e.basePos,e.next);let r=sE(e,e.pos+1);return t.startContext(ie.ListItem,e.basePos,r-e.baseIndent),t.addNode(ie.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},OrderedList(t,e){let n=Y6(e,t,!1);if(n<0)return!1;t.block.type!=ie.OrderedList&&t.startContext(ie.OrderedList,e.basePos,e.text.charCodeAt(e.pos+n-1));let r=sE(e,e.pos+n);return t.startContext(ie.ListItem,e.basePos,r-e.baseIndent),t.addNode(ie.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},ATXHeading(t,e){let n=nE(e);if(n<0)return!1;let r=e.pos,i=t.lineStart+r,o=KP(e.text,e.text.length,r),a=o;for(;a>r&&e.text.charCodeAt(a-1)==e.next;)a--;(a==o||a==r||!ni(e.text.charCodeAt(a-1)))&&(a=e.text.length);let s=t.buffer.write(ie.HeaderMark,0,n).writeElements(t.parser.parseInline(e.text.slice(r+n+1,a),i+n+1),-i);a<e.text.length&&s.write(ie.HeaderMark,a-r,o-r);let l=s.finish(ie.ATXHeading1-1+n,e.text.length-r);return t.nextLine(),t.addNode(l,i),!0},HTMLBlock(t,e){let n=aE(e,t,!1);if(n<0)return!1;let r=t.lineStart+e.pos,i=W6[n][1],o=[],a=i!=q6;for(;!i.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){a=!1;break}for(let c of e.markers)o.push(c)}a&&t.nextLine();let s=i==iE?ie.CommentBlock:i==oE?ie.ProcessingInstructionBlock:ie.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(o,-r).finish(s,l-r),r),!0},SetextHeading:void 0};class Yhe{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,n,r){if(this.stage==-1)return!1;let i=r.content+`
717
+ `:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new tde(this):new Jfe(this)}getCursor(e,n=0,r){let i=e.doc?e:Xe.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?nc(this,i,n,r):tc(this,i,n,r)}}class JC{constructor(e){this.spec=e}}function tc(t,e,n,r){return new Kl(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?Kfe(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Kfe(t,e){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=t.sliceString(o,Math.min(t.length,r+2))),(e(qp(i,n-o))!=Qt.Word||e(Wp(i,n-o))!=Qt.Word)&&(e(Wp(i,r-o))!=Qt.Word||e(qp(i,r-o))!=Qt.Word))}class Jfe extends JC{constructor(e){super(e)}nextMatch(e,n,r){let i=tc(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let o=Math.min(e.doc.length,n+this.spec.unquoted.length);i=tc(this.spec,e,0,o).nextOverlapping()}return i.done||i.value.from==n&&i.value.to==r?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let o=Math.max(n,i-1e4-this.spec.unquoted.length),a=tc(this.spec,e,o,i),s=null;for(;!a.nextOverlapping().done;)s=a.value;if(s)return s;if(o==n)return null;i-=1e4}}prevMatch(e,n,r){let i=this.prevMatchInRange(e,0,n);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=n||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=tc(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=tc(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function nc(t,e,n,r){return new WC(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?ede(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function qp(t,e){return t.slice(kn(t,e,!1),e)}function Wp(t,e){return t.slice(e,kn(t,e))}function ede(t){return(e,n,r)=>!r[0].length||(t(qp(r.input,r.index))!=Qt.Word||t(Wp(r.input,r.index))!=Qt.Word)&&(t(Wp(r.input,r.index+r[0].length))!=Qt.Word||t(qp(r.input,r.index+r[0].length))!=Qt.Word)}class tde extends JC{nextMatch(e,n,r){let i=nc(this.spec,e,r,e.doc.length).next();return i.done&&(i=nc(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),a=nc(this.spec,e,o,r),s=null;for(;!a.next().done;)s=a.value;if(s&&(o==n||s.from>o+10))return s;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let o=+r.slice(0,i);if(o>0&&o<e.match.length)return e.match[o]+r.slice(i)}return n})}matchAll(e,n){let r=nc(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=nc(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const cf=$e.define(),x6=$e.define(),za=pn.define({create(t){return new _6(k6(t).create(),null)},update(t,e){for(let n of e.effects)n.is(cf)?t=new _6(n.value.create(),t.panel):n.is(x6)&&(t=new _6(t.query,n.value?S6:null));return t},provide:t=>Wu.from(t,e=>e.panel)});class _6{constructor(e,n){this.query=e,this.panel=n}}const nde=Se.mark({class:"cm-searchMatch"}),rde=Se.mark({class:"cm-searchMatch cm-searchMatch-selected"}),ide=Yt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(za))}update(t){let e=t.state.field(za);(e!=t.startState.field(za)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Se.none;let{view:n}=this,r=new No;for(let i=0,o=n.visibleRanges,a=o.length;i<a;i++){let{from:s,to:l}=o[i];for(;i<a-1&&l>o[i+1].from-2*250;)l=o[++i].to;t.highlight(n.state,s,l,(c,u)=>{let f=n.state.selection.ranges.some(d=>d.from==c&&d.to==u);r.add(c,u,f?rde:nde)})}return r.finish()}},{decorations:t=>t.decorations});function uf(t){return e=>{let n=e.state.field(za,!1);return n&&n.query.spec.valid?t(e,n):rP(e)}}const Up=uf((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=U.single(r.from,r.to),o=t.state.facet(ec);return t.dispatch({selection:i,effects:[C6(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),nP(t),!0}),Hp=uf((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=U.single(i.from,i.to),a=t.state.facet(ec);return t.dispatch({selection:o,effects:[C6(t,i),a.scrollToMatch(o.main,t)],userEvent:"select.search"}),nP(t),!0}),ode=uf((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:U.create(n.map(r=>U.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),ade=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],a=0;for(let s=new Kl(t.doc,t.sliceDoc(r,i));!s.next().done;){if(o.length>1e3)return!1;s.value.from==r&&(a=o.length),o.push(U.range(s.value.from,s.value.to))}return e(t.update({selection:U.create(o,a),userEvent:"select.search.matches"})),!0},eP=uf((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let a=o,s=[],l,c,u=[];if(a.from==r&&a.to==i&&(c=n.toText(e.getReplacement(a)),s.push({from:a.from,to:a.to,insert:c}),a=e.nextMatch(n,a.from,a.to),u.push(ae.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),a){let f=s.length==0||s[0].from>=o.to?0:o.to-o.from-c.length;l=U.single(a.from-f,a.to-f),u.push(C6(t,a)),u.push(n.facet(ec).scrollToMatch(l.main,t))}return t.dispatch({changes:s,selection:l,effects:u,userEvent:"input.replace"}),!0}),sde=uf((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:a}=i;return{from:o,to:a,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:ae.announce.of(r),userEvent:"input.replace.all"}),!0});function S6(t){return t.state.facet(ec).createPanel(t)}function k6(t,e){var n,r,i,o,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let c=t.facet(ec);return new KC({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:c.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:c.regexp,wholeWord:(a=e==null?void 0:e.wholeWord)!==null&&a!==void 0?a:c.wholeWord})}function tP(t){let e=qu(t,S6);return e&&e.dom.querySelector("[main-field]")}function nP(t){let e=tP(t);e&&e==t.root.activeElement&&e.select()}const rP=t=>{let e=t.state.field(za,!1);if(e&&e.panel){let n=tP(t);if(n&&n!=t.root.activeElement){let r=k6(t.state,e.query.spec);r.valid&&t.dispatch({effects:cf.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[x6.of(!0),e?cf.of(k6(t.state,e.query.spec)):$e.appendConfig.of(fde)]});return!0},iP=t=>{let e=t.state.field(za,!1);if(!e||!e.panel)return!1;let n=qu(t,S6);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:x6.of(!1)}),!0},lde=[{key:"Mod-f",run:rP,scope:"editor search-panel"},{key:"F3",run:Up,shift:Hp,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Up,shift:Hp,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:iP,scope:"editor search-panel"},{key:"Mod-Shift-l",run:ade},{key:"Mod-Alt-g",run:Rfe},{key:"Mod-d",run:Gfe,preventDefault:!0}];class cde{constructor(e){this.view=e;let n=this.query=e.state.field(za).query.spec;this.commit=this.commit.bind(this),this.searchField=yt("input",{value:n.search,placeholder:Sr(e,"Find"),"aria-label":Sr(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=yt("input",{value:n.replace,placeholder:Sr(e,"Replace"),"aria-label":Sr(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=yt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=yt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=yt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,a){return yt("button",{class:"cm-button",name:i,onclick:o,type:"button"},a)}this.dom=yt("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>Up(e),[Sr(e,"next")]),r("prev",()=>Hp(e),[Sr(e,"previous")]),r("select",()=>ode(e),[Sr(e,"all")]),yt("label",null,[this.caseField,Sr(e,"match case")]),yt("label",null,[this.reField,Sr(e,"regexp")]),yt("label",null,[this.wordField,Sr(e,"by word")]),...e.state.readOnly?[]:[yt("br"),this.replaceField,r("replace",()=>eP(e),[Sr(e,"replace")]),r("replaceAll",()=>sde(e),[Sr(e,"replace all")])],yt("button",{name:"close",onclick:()=>iP(e),"aria-label":Sr(e,"close"),type:"button"},["×"])])}commit(){let e=new KC({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:cf.of(e)}))}keydown(e){ble(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Hp:Up)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),eP(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(cf)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(ec).top}}function Sr(t,e){return t.state.phrase(e)}const Gp=30,Kp=/[\s\.,:;?!]/;function C6(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-Gp),a=Math.min(i,n+Gp),s=t.state.sliceDoc(o,a);if(o!=r.from){for(let l=0;l<Gp;l++)if(!Kp.test(s[l+1])&&Kp.test(s[l])){s=s.slice(l);break}}if(a!=i){for(let l=s.length-1;l>s.length-Gp;l--)if(!Kp.test(s[l-1])&&Kp.test(s[l])){s=s.slice(0,l);break}}return ae.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`)}const ude=ae.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),fde=[za,jo.low(ide),ude];class P6{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Ot(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(lP(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function oP(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function dde(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=oP(e)+oP(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function E6(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:dde(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}function aP(t,e){return n=>{for(let r=Ot(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class sP{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function Ds(t){return t.selection.main.from}function lP(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const T6=Hi.define();function hde(t,e,n,r){let{main:i}=t.selection,o=n-i.from,a=r-i.from;return Object.assign(Object.assign({},t.changeByRange(s=>{if(s!=i&&n!=r&&t.sliceDoc(s.from+o,s.from+a)!=t.sliceDoc(n,r))return{range:s};let l=t.toText(e);return{changes:{from:s.from+o,to:r==i.from?s.to:s.from+a,insert:l},range:U.cursor(s.from+o+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const cP=new WeakMap;function pde(t){if(!Array.isArray(t))return t;let e=cP.get(t);return e||cP.set(t,e=E6(t)),e}const Jp=$e.define(),ff=$e.define();class mde{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=ir(e,n),i=Wi(r);this.chars.push(r);let o=e.slice(n,n+i),a=o.toUpperCase();this.folded.push(ir(a==o?o.toLowerCase():a,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:o,byWord:a}=this;if(n.length==1){let w=ir(e,0),v=Wi(w),b=v==e.length?0:-100;if(w!=n[0])if(w==r[0])b+=-200;else return null;return this.ret(b,[0,v])}let s=e.indexOf(this.pattern);if(s==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=n.length,c=0;if(s<0){for(let w=0,v=Math.min(e.length,200);w<v&&c<l;){let b=ir(e,w);(b==n[c]||b==r[c])&&(i[c++]=w),w+=Wi(b)}if(c<l)return null}let u=0,f=0,d=!1,h=0,m=-1,g=-1,p=/[a-z]/.test(e),O=!0;for(let w=0,v=Math.min(e.length,200),b=0;w<v&&f<l;){let y=ir(e,w);s<0&&(u<l&&y==n[u]&&(o[u++]=w),h<l&&(y==n[h]||y==r[h]?(h==0&&(m=w),g=w+1,h++):h=0));let x,_=y<255?y>=48&&y<=57||y>=97&&y<=122?2:y>=65&&y<=90?1:0:(x=LO(y))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!w||_==1&&p||b==0&&_!=0)&&(n[f]==y||r[f]==y&&(d=!0)?a[f++]=w:a.length&&(O=!1)),b=_,w+=Wi(y)}return f==l&&a[0]==0&&O?this.result(-100+(d?-200:0),a,e):h==l&&m==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):h==l?this.ret(-900-e.length,[m,g]):f==l?this.result(-100+(d?-200:0)+-700+(O?0:-1100),a,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let a of n){let s=a+(this.astral?Wi(ir(r,a)):1);o&&i[o-1]==a?i[o-1]=s:(i[o++]=a,i[o++]=s)}return this.ret(e-r.length,i)}}class gde{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const mn=pe.define({combine(t){return Gi(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Ode,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>uP(e(r),n(r)),optionClass:(e,n)=>r=>uP(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function uP(t,e){return t?e?t+" "+e:t:e}function Ode(t,e,n,r,i,o){let a=t.textDirection==Pt.RTL,s=a,l=!1,c="top",u,f,d=e.left-i.left,h=i.right-e.right,m=r.right-r.left,g=r.bottom-r.top;if(s&&d<Math.min(m,h)?s=!1:!s&&h<Math.min(m,d)&&(s=!0),m<=(s?d:h))u=Math.max(i.top,Math.min(n.top,i.bottom-g))-e.top,f=Math.min(400,s?d:h);else{l=!0,f=Math.min(400,(a?e.right:i.right-e.left)-30);let w=i.bottom-e.bottom;w>=g||w>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let p=(e.bottom-e.top)/o.offsetHeight,O=(e.right-e.left)/o.offsetWidth;return{style:`${c}: ${u/p}px; max-width: ${f/O}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":s?"left":"right")}}function yde(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let a=document.createElement("span");a.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let c=0;c<o.length;){let u=o[c++],f=o[c++];u>l&&a.appendChild(document.createTextNode(s.slice(l,u)));let d=a.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(s.slice(u,f))),d.className="cm-completionMatchedText",l=f}return l<s.length&&a.appendChild(document.createTextNode(s.slice(l))),a},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function A6(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class vde{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:a}=i.open,s=e.state.facet(mn);this.optionContent=yde(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=A6(o.length,a,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(n).open;for(let u=l.target,f;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(f=/-(\d+)$/.exec(u.id))&&+f[1]<c.length){this.applyCompletion(e,c[+f[1]]),l.preventDefault();return}}),this.dom.addEventListener("focusout",l=>{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(mn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:ff.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:a,disabled:s}=r.open;(!i.open||i.open.options!=o)&&(this.range=A6(o.length,a,e.state.facet(mn).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),s!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=A6(n.options.length,n.selected,this.view.state.facet(mn).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,r)}).catch(a=>ar(this.view.state,a,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&wde(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let a=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom<Math.max(o.top,n.top)+10?null:this.view.state.facet(mn).positionInfo(this.view,n,i,r,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",a=>{a.target==i&&a.preventDefault()});let o=null;for(let a=r.from;a<r.to;a++){let{completion:s,match:l}=e[a],{section:c}=s;if(c){let d=typeof c=="string"?c:c.name;if(d!=o&&(a>r.from||r.from==0))if(o=d,typeof c!="string"&&c.header)i.appendChild(c.header(c));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=d}}const u=i.appendChild(document.createElement("li"));u.id=n+"-"+a,u.setAttribute("role","option");let f=this.optionClass(s);f&&(u.className=f);for(let d of this.optionContent){let h=d(s,this.view.state,this.view,l);h&&u.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function bde(t,e){return n=>new vde(n,t,e)}function wde(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function fP(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function xde(t,e){let n=[],r=null,i=c=>{n.push(c);let{section:u}=c.completion;if(u){r||(r=[]);let f=typeof u=="string"?u:u.name;r.some(d=>d.name==f)||r.push(typeof u=="string"?{name:f}:u)}},o=e.facet(mn);for(let c of t)if(c.hasResult()){let u=c.result.getMatch;if(c.result.filter===!1)for(let f of c.result.options)i(new sP(f,c.source,u?u(f):[],1e9-n.length));else{let f=e.sliceDoc(c.from,c.to),d,h=o.filterStrict?new gde(f):new mde(f);for(let m of c.result.options)if(d=h.match(m.label)){let g=m.displayLabel?u?u(m,d.matched):[]:d.matched;i(new sP(m,c.source,g,d.score+(m.boost||0)))}}}if(r){let c=Object.create(null),u=0,f=(d,h)=>{var m,g;return((m=d.rank)!==null&&m!==void 0?m:1e9)-((g=h.rank)!==null&&g!==void 0?g:1e9)||(d.name<h.name?-1:1)};for(let d of r.sort(f))u-=1e5,c[d.name]=u;for(let d of n){let{section:h}=d.completion;h&&(d.score+=c[typeof h=="string"?h:h.name])}}let a=[],s=null,l=o.compareCompletions;for(let c of n.sort((u,f)=>f.score-u.score||l(u.completion,f.completion))){let u=c.completion;!s||s.label!=u.label||s.detail!=u.detail||s.type!=null&&u.type!=null&&s.type!=u.type||s.apply!=u.apply||s.boost!=u.boost?a.push(c):fP(c.completion)>fP(s)&&(a[a.length-1]=c),s=c.completion}return a}class rc{constructor(e,n,r,i,o,a){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new rc(this.options,dP(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o,a){if(i&&!a&&e.some(c=>c.isPending))return i.setDisabled();let s=xde(e,n);if(!s.length)return i&&e.some(c=>c.isPending)?i.setDisabled():null;let l=n.facet(mn).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let c=i.options[i.selected].completion;for(let u=0;u<s.length;u++)if(s[u].completion==c){l=u;break}}return new rc(s,dP(r,l),{pos:e.reduce((c,u)=>u.hasResult()?Math.min(c,u.from):c,1e8),create:Ede,above:o.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new rc(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new rc(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class e1{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new e1(Cde,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(mn),o=(r.override||n.languageDataAt("autocomplete",Ds(n)).map(pde)).map(l=>(this.active.find(u=>u.source==l)||new ti(l,this.active.some(u=>u.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((l,c)=>l==this.active[c])&&(o=this.active);let a=this.open,s=e.effects.some(l=>l.is(M6));a&&e.docChanged&&(a=a.map(e.changes)),e.selection||o.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!_de(o,this.active)||s?a=rc.build(o,n,this.id,a,r,s):a&&a.disabled&&!o.some(l=>l.isPending)&&(a=null),!a&&o.every(l=>!l.isPending)&&o.some(l=>l.hasResult())&&(o=o.map(l=>l.hasResult()?new ti(l.source,0):l));for(let l of e.effects)l.is(pP)&&(a=a&&a.setSelected(l.value,this.id));return o==this.active&&a==this.open?this:new e1(o,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Sde:kde}}function _de(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;r<e.length&&!e[r].hasResult();)r++;let i=n==t.length,o=r==e.length;if(i||o)return i==o;if(t[n++].result!=e[r++].result)return!1}}const Sde={"aria-autocomplete":"list"},kde={};function dP(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const Cde=[];function hP(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(T6);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class ti{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=hP(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new ti(i.source,0)),r&4&&i.state==0&&(i=new ti(this.source,1)),i=i.updateFor(e,r);for(let o of e.effects)if(o.is(Jp))i=new ti(i.source,1,o.value);else if(o.is(ff))i=new ti(i.source,0);else if(o.is(M6))for(let a of o.value)a.source==i.source&&(i=a);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Ds(e.state))}}class ic extends ti{constructor(e,n,r,i,o,a){super(e,3,n),this.limit=r,this.result=i,this.from=o,this.to=a}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let o=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),s=Ds(e.state);if(s>a||!i||n&2&&(Ds(e.startState)==this.from||s<this.limit))return new ti(this.source,n&4?1:0);let l=e.changes.mapPos(this.limit);return Pde(i.validFor,e.state,o,a)?new ic(this.source,this.explicit,l,i,o,a):i.update&&(i=i.update(i,o,a,new P6(e.state,s,!1)))?new ic(this.source,this.explicit,l,i,i.from,(r=i.to)!==null&&r!==void 0?r:Ds(e.state)):new ti(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new ic(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new ti(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function Pde(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):lP(t,!0).test(i)}const M6=$e.define({map(t,e){return t.map(n=>n.map(e))}}),pP=$e.define(),lr=pn.define({create(){return e1.start()},update(t,e){return t.update(e)},provide:t=>[B3.from(t,e=>e.tooltip),ae.contentAttributes.from(t,e=>e.attrs)]});function Q6(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(lr).active.find(i=>i.source==e.source);return r instanceof ic?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},hde(t.state,n,r.from,r.to)),{annotations:T6.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}const Ede=bde(lr,Q6);function t1(t,e="option"){return n=>{let r=n.state.field(lr,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(mn).interactionDelay)return!1;let i=1,o;e=="page"&&(o=sk(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:a}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:a-1;return s<0?s=e=="page"?0:a-1:s>=a&&(s=e=="page"?a-1:0),n.dispatch({effects:pP.of(s)}),!0}}const Tde=t=>{let e=t.state.field(lr,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(mn).interactionDelay?!1:Q6(t,e.open.options[e.open.selected])},mP=t=>t.state.field(lr,!1)?(t.dispatch({effects:Jp.of(!0)}),!0):!1,Ade=t=>{let e=t.state.field(lr,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:ff.of(null)}),!0)};class Mde{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Qde=50,Dde=1e3,$de=Yt.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(lr).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(lr),n=t.state.facet(mn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(lr)==e)return;let r=t.transactions.some(o=>{let a=hP(o,n);return a&8||(o.selection||o.docChanged)&&!(a&3)});for(let o=0;o<this.running.length;o++){let a=this.running[o];if(r||a.context.abortOnDocChange&&t.docChanged||a.updates.length+t.transactions.length>Qde&&Date.now()-a.time>Dde){for(let s of a.context.abortListeners)try{s()}catch(l){ar(this.view.state,l)}a.context.abortListeners=null,this.running.splice(o--,1)}else a.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(a=>a.is(Jp)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.isPending&&!this.running.some(a=>a.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of t.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(lr);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(mn).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=Ds(e),r=new P6(e,n,t.explicit,this.view),i=new Mde(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:ff.of(null)}),ar(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(mn).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(mn),r=this.view.state.field(lr);for(let i=0;i<this.running.length;i++){let o=this.running[i];if(o.done===void 0)continue;if(this.running.splice(i--,1),o.done){let s=Ds(o.updates.length?o.updates[0].startState:this.view.state),l=Math.min(s,o.done.from+(o.active.explicit?0:1)),c=new ic(o.active.source,o.active.explicit,l,o.done,o.done.from,(t=o.done.to)!==null&&t!==void 0?t:s);for(let u of o.updates)c=c.update(u,n);if(c.hasResult()){e.push(c);continue}}let a=r.active.find(s=>s.source==o.active.source);if(a&&a.isPending)if(o.done==null){let s=new ti(o.active.source,0);for(let l of o.updates)s=s.update(l,n);s.isPending||e.push(s)}else this.startQuery(a)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:M6.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(lr,!1);if(e&&e.tooltip&&this.view.state.facet(mn).closeOnBlur){let n=e.open&&sk(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ff.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Jp.of(!1)}),20),this.composing=0}}}),Lde=typeof navigator=="object"&&/Win/.test(navigator.platform),Ide=jo.highest(ae.domEventHandlers({keydown(t,e){let n=e.state.field(lr,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(Lde&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(a=>a.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&Q6(e,r),!1}})),gP=ae.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class jde{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class D6{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,Cn.TrackDel),r=e.mapPos(this.to,1,Cn.TrackDel);return n==null||r==null?null:new D6(this.field,n,r)}}class $6{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],o=e.doc.lineAt(n),a=/^\s*/.exec(o.text)[0];for(let l of this.lines){if(r.length){let c=a,u=/^\t*/.exec(l)[0].length;for(let f=0;f<u;f++)c+=e.facet(Hl);i.push(n+c.length-u),l=c+l.slice(u)}r.push(l),n+=l.length+1}let s=this.fieldPositions.map(l=>new D6(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:s}}static parse(e){let n=[],r=[],i=[],o;for(let a of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(a);){let s=o[1]?+o[1]:null,l=o[2]||o[3]||"",c=-1,u=l.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f<n.length;f++)(s!=null?n[f].seq==s:u&&n[f].name==u)&&(c=f);if(c<0){let f=0;for(;f<n.length&&(s==null||n[f].seq!=null&&n[f].seq<s);)f++;n.splice(f,0,{seq:s,name:u}),c=f;for(let d of i)d.field>=c&&d.field++}i.push(new jde(c,r.length,o.index,o.index+u.length)),a=a.slice(0,o.index)+l+a.slice(o.index+o[0].length)}a=a.replace(/\\([{}])/g,(s,l,c)=>{for(let u of i)u.line==r.length&&u.from>c&&(u.from--,u.to--);return l}),r.push(a)}return new $6(r,i)}}let Nde=Se.widget({widget:new class extends Ji{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Rde=Se.mark({class:"cm-snippetField"});class oc{constructor(e,n){this.ranges=e,this.active=n,this.deco=Se.set(e.map(r=>(r.from==r.to?Nde:Rde).range(r.from,r.to)))}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new oc(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const df=$e.define({map(t,e){return t&&t.map(e)}}),Bde=$e.define(),hf=pn.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(df))return n.value;if(n.is(Bde)&&t)return new oc(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>ae.decorations.from(t,e=>e?e.deco:Se.none)});function L6(t,e){return U.create(t.filter(n=>n.field==e).map(n=>U.range(n.from,n.to)))}function Zde(t){let e=$6.parse(t);return(n,r,i,o)=>{let{text:a,ranges:s}=e.instantiate(n.state,i),{main:l}=n.state.selection,c={changes:{from:i,to:o==l.from?l.to:o,insert:He.of(a)},scrollIntoView:!0,annotations:r?[T6.of(r),Jt.userEvent.of("input.complete")]:void 0};if(s.length&&(c.selection=L6(s,0)),s.some(u=>u.field>0)){let u=new oc(s,0),f=c.effects=[df.of(u)];n.state.field(hf,!1)===void 0&&f.push($e.appendConfig.of([hf,Xde,Vde,gP]))}n.dispatch(n.state.update(c))}}function OP(t){return({state:e,dispatch:n})=>{let r=e.field(hf,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,o=t>0&&!r.ranges.some(a=>a.field==i+t);return n(e.update({selection:L6(r.ranges,i),effects:df.of(o?null:new oc(r.ranges,i)),scrollIntoView:!0})),!0}}const zde=[{key:"Tab",run:OP(1),shift:OP(-1)},{key:"Escape",run:({state:t,dispatch:e})=>t.field(hf,!1)?(e(t.update({effects:df.of(null)})),!0):!1}],yP=pe.define({combine(t){return t.length?t[0]:zde}}),Xde=jo.highest(ql.compute([yP],t=>t.facet(yP)));function cr(t,e){return Object.assign(Object.assign({},e),{apply:Zde(t)})}const Vde=ae.domEventHandlers({mousedown(t,e){let n=e.state.field(hf,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(o=>o.from<=r&&o.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:L6(n.ranges,i.field),effects:df.of(n.ranges.some(o=>o.field>i.field)?new oc(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),pf={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},$s=$e.define({map(t,e){let n=e.mapPos(t,-1,Cn.TrackAfter);return n??void 0}}),I6=new class extends ks{};I6.startSide=1,I6.endSide=-1;const vP=pn.define({create(){return Ue.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is($s)&&(t=t.update({add:[I6.range(n.value,n.value+1)]}));return t}});function Fde(){return[qde,vP]}const j6="()[]{}<>«»»«[]{}";function bP(t){for(let e=0;e<j6.length;e+=2)if(j6.charCodeAt(e)==t)return j6.charAt(e+1);return LO(t<128?t:t+1)}function wP(t,e){return t.languageDataAt("closeBrackets",e)[0]||pf}const Yde=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),qde=ae.inputHandler.of((t,e,n,r)=>{if((Yde?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Wi(ir(r,0))==1||e!=i.from||n!=i.to)return!1;let o=Ude(t.state,r);return o?(t.dispatch(o),!0):!1}),Wde=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=wP(t,t.selection.main.head).brackets||pf.brackets,i=null,o=t.changeByRange(a=>{if(a.empty){let s=Hde(t.doc,a.head);for(let l of r)if(l==s&&n1(t.doc,a.head)==bP(ir(l,0)))return{changes:{from:a.head-l.length,to:a.head+l.length},range:U.cursor(a.head-l.length)}}return{range:i=a}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i}}];function Ude(t,e){let n=wP(t,t.selection.main.head),r=n.brackets||pf.brackets;for(let i of r){let o=bP(ir(i,0));if(e==i)return o==i?Jde(t,i,r.indexOf(i+i+i)>-1,n):Gde(t,i,o,n.before||pf.before);if(e==o&&xP(t,t.selection.main.from))return Kde(t,i,o)}return null}function xP(t,e){let n=!1;return t.field(vP).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function n1(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Wi(ir(n,0)))}function Hde(t,e){let n=t.sliceString(e-2,e);return Wi(ir(n,0))==n.length?n:n.slice(1)}function Gde(t,e,n,r){let i=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:$s.of(a.to+e.length),range:U.range(a.anchor+e.length,a.head+e.length)};let s=n1(t.doc,a.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:e+n,from:a.head},effects:$s.of(a.head+e.length),range:U.cursor(a.head+e.length)}:{range:i=a}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Kde(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&n1(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:U.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function Jde(t,e,n,r){let i=r.stringPrefixes||pf.stringPrefixes,o=null,a=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:$s.of(s.to+e.length),range:U.range(s.anchor+e.length,s.head+e.length)};let l=s.head,c=n1(t.doc,l),u;if(c==e){if(_P(t,l))return{changes:{insert:e+e,from:l},effects:$s.of(l+e.length),range:U.cursor(l+e.length)};if(xP(t,l)){let d=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+d.length,insert:d},range:U.cursor(l+d.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(u=SP(t,l-2*e.length,i))>-1&&_P(t,u))return{changes:{insert:e+e+e+e,from:l},effects:$s.of(l+e.length),range:U.cursor(l+e.length)};if(t.charCategorizer(l)(c)!=Qt.Word&&SP(t,l,i)>-1&&!ehe(t,l,e,i))return{changes:{insert:e+e,from:l},effects:$s.of(l+e.length),range:U.cursor(l+e.length)}}return{range:o=s}});return o?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function _P(t,e){let n=Ot(t).resolveInner(e+1);return n.parent&&n.from==e}function ehe(t,e,n,r){let i=Ot(t).resolveInner(e,-1),o=r.reduce((a,s)=>Math.max(a,s.length),0);for(let a=0;a<5;a++){let s=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=s.indexOf(n);if(!l||l>-1&&r.indexOf(s.slice(0,l))>-1){let u=i.firstChild;for(;u&&u.from==i.from&&u.to-u.from>n.length+l;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=i.to==e&&i.parent;if(!c)break;i=c}return!1}function SP(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=Qt.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=Qt.Word)return o}return-1}function the(t={}){return[Ide,lr,mn.of(t),$de,nhe,gP]}const kP=[{key:"Ctrl-Space",run:mP},{mac:"Alt-`",run:mP},{key:"Escape",run:Ade},{key:"ArrowDown",run:t1(!0)},{key:"ArrowUp",run:t1(!1)},{key:"PageDown",run:t1(!0,"page")},{key:"PageUp",run:t1(!1,"page")},{key:"Enter",run:Tde}],nhe=jo.highest(ql.computeN([mn],t=>t.facet(mn).defaultKeymap?[kP]:[]));class CP{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class Ls{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=r.facet(mf).markerFilter;i&&(e=i(e,r));let o=e.slice().sort((u,f)=>u.from-f.from||u.to-f.to),a=new No,s=[],l=0;for(let u=0;;){let f=u==o.length?null:o[u];if(!f&&!s.length)break;let d,h;for(s.length?(d=l,h=s.reduce((g,p)=>Math.min(g,p.to),f&&f.from>d?f.from:1e8)):(d=f.from,h=f.to,s.push(f),u++);u<o.length;){let g=o[u];if(g.from==d&&(g.to>g.from||g.to==d))s.push(g),u++,h=Math.min(g.to,h);else{h=Math.min(g.from,h);break}}let m=phe(s);if(s.some(g=>g.from==g.to||g.from==g.to-1&&r.doc.lineAt(g.from).to==g.from))a.add(d,d,Se.widget({widget:new uhe(m),diagnostics:s.slice()}));else{let g=s.reduce((p,O)=>O.markClass?p+" "+O.markClass:p,"");a.add(d,h,Se.mark({class:"cm-lintRange cm-lintRange-"+m+g,diagnostics:s.slice(),inclusiveEnd:s.some(p=>p.to>h)}))}l=h;for(let g=0;g<s.length;g++)s[g].to<=l&&s.splice(g--,1)}let c=a.finish();return new Ls(c,n,ac(c))}}function ac(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,o,{spec:a})=>{if(!(e&&a.diagnostics.indexOf(e)<0))if(!r)r=new CP(i,o,e||a.diagnostics[0]);else{if(a.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new CP(r.from,o,r.diagnostic)}}),r}function rhe(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(mf).hideOn(t,n,r);if(i!=null)return i;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(a=>a.is(PP))||t.changes.touchesRange(o.from,Math.max(o.to,r)))}function ihe(t,e){return t.field(kr,!1)?e:e.concat($e.appendConfig.of(mhe))}const PP=$e.define(),N6=$e.define(),EP=$e.define(),kr=pn.define({create(){return new Ls(Se.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);r=ac(n,t.selected.diagnostic,o)||ac(n,null,o)}!n.size&&i&&e.state.facet(mf).autoPanel&&(i=null),t=new Ls(n,i,r)}for(let n of e.effects)if(n.is(PP)){let r=e.state.facet(mf).autoPanel?n.value.length?gf.open:null:t.panel;t=Ls.init(n.value,r,e.state)}else n.is(N6)?t=new Ls(t.diagnostics,n.value?gf.open:null,t.selected):n.is(EP)&&(t=new Ls(t.diagnostics,t.panel,n.value));return t},provide:t=>[Wu.from(t,e=>e.panel),ae.decorations.from(t,e=>e.diagnostics)]}),ohe=Se.mark({class:"cm-lintRange cm-lintRange-active"});function ahe(t,e,n){let{diagnostics:r}=t.state.field(kr),i,o=-1,a=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,c,{spec:u})=>{if(e>=l&&e<=c&&(l==c||(e>l||n>0)&&(e<c||n<0)))return i=u.diagnostics,o=l,a=c,!1});let s=t.state.facet(mf).tooltipFilter;return i&&s&&(i=s(i,t.state)),i?{pos:o,end:a,above:t.state.doc.lineAt(o).to<a,create(){return{dom:she(t,i)}}}:null}function she(t,e){return yt("ul",{class:"cm-tooltip-lint"},e.map(n=>MP(t,n,!1)))}const lhe=t=>{let e=t.state.field(kr,!1);(!e||!e.panel)&&t.dispatch({effects:ihe(t.state,[N6.of(!0)])});let n=qu(t,gf.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},TP=t=>{let e=t.state.field(kr,!1);return!e||!e.panel?!1:(t.dispatch({effects:N6.of(!1)}),!0)},che=[{key:"Mod-Shift-m",run:lhe,preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field(kr,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],mf=pe.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},Gi(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function AP(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(o=>o.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function MP(t,e,n){var r;let i=n?AP(e.actions):[];return yt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},yt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,a)=>{let s=!1,l=d=>{if(d.preventDefault(),s)return;s=!0;let h=ac(t.state.field(kr).diagnostics,e);h&&o.apply(t,h.from,h.to)},{name:c}=o,u=i[a]?c.indexOf(i[a]):-1,f=u<0?c:[c.slice(0,u),yt("u",c.slice(u,u+1)),c.slice(u+1)];return yt("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${i[a]})"`}.`},f)}),e.source&&yt("div",{class:"cm-diagnosticSource"},e.source))}class uhe extends Ji{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return yt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class QP{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=MP(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class gf{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)TP(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],a=AP(o.actions);for(let s=0;s<a.length;s++)if(a[s].toUpperCase().charCodeAt(0)==i.keyCode){let l=ac(this.view.state.field(kr).diagnostics,o);l&&o.actions[s].apply(e,l.from,l.to)}}else return;i.preventDefault()},r=i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)};this.list=yt("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=yt("div",{class:"cm-panel-lint"},this.list,yt("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>TP(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(kr).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(kr),r=0,i=!1,o=null,a=new Set;for(e.between(0,this.view.state.doc.length,(s,l,{spec:c})=>{for(let u of c.diagnostics){if(a.has(u))continue;a.add(u);let f=-1,d;for(let h=r;h<this.items.length;h++)if(this.items[h].diagnostic==u){f=h;break}f<0?(d=new QP(this.view,u),this.items.splice(r,0,d),i=!0):(d=this.items[f],f>r&&(this.items.splice(r,f-r),i=!0)),n&&d.diagnostic==n.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),o=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new QP(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:l})=>{let c=l.height/this.list.offsetHeight;s.top<l.top?this.list.scrollTop-=(l.top-s.top)/c:s.bottom>l.bottom&&(this.list.scrollTop+=(s.bottom-l.bottom)/c)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(kr),r=ac(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:EP.of(r)})}static open(e){return new gf(e)}}function fhe(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function r1(t){return fhe(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const dhe=ae.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:r1("#d11")},".cm-lintRange-warning":{backgroundImage:r1("orange")},".cm-lintRange-info":{backgroundImage:r1("#999")},".cm-lintRange-hint":{backgroundImage:r1("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function hhe(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function phe(t){let e="hint",n=1;for(let r of t){let i=hhe(r.severity);i>n&&(n=i,e=r.severity)}return e}const mhe=[kr,ae.decorations.compute([kr],t=>{let{selected:e,panel:n}=t.field(kr);return!e||!n||e.from==e.to?Se.none:Se.set([ohe.range(e.from,e.to)])}),lce(ahe,{hideOn:rhe}),dhe];var DP=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(Wde)),e.defaultKeymap!==!1&&(r=r.concat(Ife)),e.searchKeymap!==!1&&(r=r.concat(lde)),e.historyKeymap!==!1&&(r=r.concat(Fue)),e.foldKeymap!==!1&&(r=r.concat(sue)),e.completionKeymap!==!1&&(r=r.concat(kP)),e.lintKeymap!==!1&&(r=r.concat(che));var i=[];return e.lineNumbers!==!1&&i.push(vce()),e.highlightActiveLineGutter!==!1&&i.push(xce()),e.highlightSpecialChars!==!1&&i.push(jle()),e.history!==!1&&i.push(Iue()),e.foldGutter!==!1&&i.push(fue()),e.drawSelection!==!1&&i.push(Cle()),e.dropCursor!==!1&&i.push(Mle()),e.allowMultipleSelections!==!1&&i.push(Xe.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(tue()),e.syntaxHighlighting!==!1&&i.push(Gk(mue,{fallback:!0})),e.bracketMatching!==!1&&i.push(wue()),e.closeBrackets!==!1&&i.push(Fde()),e.autocompletion!==!1&&i.push(the()),e.rectangularSelection!==!1&&i.push(Gle()),n!==!1&&i.push(ece()),e.highlightActiveLine!==!1&&i.push(Xle()),e.highlightSelectionMatches!==!1&&i.push(Xfe()),e.tabSize&&typeof e.tabSize=="number"&&i.push(Hl.of(" ".repeat(e.tabSize))),i.concat([ql.of(r.flat())]).filter(Boolean)};const ghe="#e5c07b",$P="#e06c75",Ohe="#56b6c2",yhe="#ffffff",i1="#abb2bf",R6="#7d8799",vhe="#61afef",bhe="#98c379",LP="#d19a66",whe="#c678dd",xhe="#21252b",IP="#2c313a",jP="#282c34",B6="#353a42",_he="#3E4451",NP="#528bff",She=ae.theme({"&":{color:i1,backgroundColor:jP},".cm-content":{caretColor:NP},".cm-cursor, .cm-dropCursor":{borderLeftColor:NP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:_he},".cm-panels":{backgroundColor:xhe,color:i1},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:jP,color:R6,border:"none"},".cm-activeLineGutter":{backgroundColor:IP},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:B6},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:B6,borderBottomColor:B6},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:IP,color:i1}}},{dark:!0}),khe=of.define([{tag:M.keyword,color:whe},{tag:[M.name,M.deleted,M.character,M.propertyName,M.macroName],color:$P},{tag:[M.function(M.variableName),M.labelName],color:vhe},{tag:[M.color,M.constant(M.name),M.standard(M.name)],color:LP},{tag:[M.definition(M.name),M.separator],color:i1},{tag:[M.typeName,M.className,M.number,M.changed,M.annotation,M.modifier,M.self,M.namespace],color:ghe},{tag:[M.operator,M.operatorKeyword,M.url,M.escape,M.regexp,M.link,M.special(M.string)],color:Ohe},{tag:[M.meta,M.comment],color:R6},{tag:M.strong,fontWeight:"bold"},{tag:M.emphasis,fontStyle:"italic"},{tag:M.strikethrough,textDecoration:"line-through"},{tag:M.link,color:R6,textDecoration:"underline"},{tag:M.heading,fontWeight:"bold",color:$P},{tag:[M.atom,M.bool,M.special(M.variableName)],color:LP},{tag:[M.processingInstruction,M.string,M.inserted],color:bhe},{tag:M.invalid,color:yhe}]),Che=[She,Gk(khe)];var Phe=ae.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Ehe=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:o="light",placeholder:a="",basicSetup:s=!0}=e,l=[];switch(n&&l.unshift(ql.of([jfe])),s&&(typeof s=="boolean"?l.unshift(DP()):l.unshift(DP(s))),a&&l.unshift(qle(a)),o){case"light":l.push(Phe);break;case"dark":l.push(Che);break;case"none":break;default:l.push(o);break}return r===!1&&l.push(ae.editable.of(!1)),i&&l.push(Xe.readOnly.of(!0)),[...l]},The=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)}),RP=Hi.define(),Ahe=[];function Mhe(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:a,extensions:s=Ahe,autoFocus:l,theme:c="light",height:u=null,minHeight:f=null,maxHeight:d=null,width:h=null,minWidth:m=null,maxWidth:g=null,placeholder:p="",editable:O=!0,readOnly:w=!1,indentWithTab:v=!0,basicSetup:b=!0,root:y,initialState:x}=t,[_,E]=k.useState(),[A,I]=k.useState(),[Q,D]=k.useState(),j=ae.theme({"&":{height:u,minHeight:f,maxHeight:d,width:h,minWidth:m,maxWidth:g},"& .cm-scroller":{height:"100% !important"}}),R=ae.updateListener.of(V=>{if(V.docChanged&&typeof r=="function"&&!V.transactions.some(L=>L.annotation(RP))){var K=V.state.doc,ne=K.toString();r(ne,V)}i&&i(The(V))}),B=Ehe({theme:c,editable:O,readOnly:w,placeholder:p,indentWithTab:v,basicSetup:b}),X=[R,j,...B];return a&&typeof a=="function"&&X.push(ae.updateListener.of(a)),X=X.concat(s),k.useLayoutEffect(()=>{if(_&&!Q){var V={doc:e,selection:n,extensions:X},K=x?Xe.fromJSON(x.json,V,x.fields):Xe.create(V);if(D(K),!A){var ne=new ae({state:K,parent:_,root:y});I(ne),o&&o(ne,K)}}return()=>{A&&(D(void 0),I(void 0))}},[_,Q]),k.useEffect(()=>{t.container&&E(t.container)},[t.container]),k.useEffect(()=>()=>{A&&(A.destroy(),I(void 0))},[A]),k.useEffect(()=>{l&&A&&A.focus()},[l,A]),k.useEffect(()=>{A&&A.dispatch({effects:$e.reconfigure.of(X)})},[c,s,u,f,d,h,m,g,p,O,w,v,b,r,a]),k.useEffect(()=>{if(e!==void 0){var V=A?A.state.doc.toString():"";A&&e!==V&&A.dispatch({changes:{from:0,to:V.length,insert:e||""},annotations:[RP.of(!0)]})}},[e,A]),{state:Q,setState:D,view:A,setView:I,container:_,setContainer:E}}var Qhe=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],BP=k.forwardRef((t,e)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,autoFocus:u,theme:f="light",height:d,minHeight:h,maxHeight:m,width:g,minWidth:p,maxWidth:O,basicSetup:w,placeholder:v,indentWithTab:b,editable:y,readOnly:x,root:_,initialState:E}=t,A=xae(t,Qhe),I=k.useRef(null),{state:Q,view:D,container:j,setContainer:R}=Mhe({root:_,value:r,autoFocus:u,theme:f,height:d,minHeight:h,maxHeight:m,width:g,minWidth:p,maxWidth:O,basicSetup:w,placeholder:v,indentWithTab:b,editable:y,readOnly:x,selection:i,onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,extensions:o,initialState:E});k.useImperativeHandle(e,()=>({editor:I.current,state:Q,view:D}),[I,j,Q,D]);var B=k.useCallback(V=>{I.current=V,R(V)},[R]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var X=typeof f=="string"?"cm-theme-"+f:"cm-theme";return F.jsx("div",QO({ref:B,className:""+X+(n?" "+n:"")},A))});BP.displayName="CodeMirror";var ZP={npm_package_exports___require:"./dist/avocado-not-front.umd.js",npm_package_devDependencies__types_node:"20.2.5",npm_package_devDependencies__testing_library_jest_dom:"6.4.0",npm_config_user_agent:"pnpm/9.10.0 npm/? node/v20.17.0 linux x64",CI:"true",npm_package_devDependencies__testing_library_user_event:"14.5.2",npm_package_devDependencies_vite:"5.0.12",npm_node_execpath:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_package_publishConfig_access:"public",npm_package_files_0:"dist",HOME:"/home/runner",npm_package_dependencies_react_select_async_paginate:"0.7.3",npm_package_devDependencies_classnames:"2.3.2",npm_package_devDependencies_sass:"1.62.1",npm_config_auto_install_peers:"true",npm_package_devDependencies_vite_plugin_dts:"3.7.1",npm_package_dependencies__codemirror_lang_yaml:"6.1.2",npm_package_devDependencies_typescript:"5.1.3",npm_package_peerDependencies_react_select_async_paginate:"0.7.3",npm_package_types:"./dist/index.d.ts",npm_package_devDependencies__types_react_dom:"18.0.11",npm_package_dependencies__codemirror_lang_markdown:"6.3.4",npm_package_devDependencies__vitejs_plugin_react_swc:"3.5.0",npm_package_type:"module",npm_package_dependencies_zustand:"4.5.4",npm_package_module:"./dist/avocado-not-front.es.js",npm_package_devDependencies__types_testing_library__jest_dom:"6.0.0",npm_package_dependencies__foris_avocado_icons:"workspace:*",npm_config_registry:"https://registry.npmjs.org/",npm_config_node_linker:"hoisted",npm_package_dependencies__codemirror_lang_json:"6.0.1",npm_package_exports___import:"./dist/avocado-not-front.es.js",npm_package_dependencies__foris_avocado_core:"workspace:*",npm_package_dependencies_axios:"^1.8.4",npm_package_dependencies_recharts:"3.1.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/avocado/avocado/packages/avocado-not-front/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/opt/hostedtoolcache/node/20.17.0/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",TURBO_HASH:"9aeccc82d4b71519",npm_package_name:"@foris/avocado-not-front",npm_package_scripts_start_stubby_examples:"stubby -d src/services/stubs/stubby-examples.yml -w -s 8300 -q",NODE:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_config_frozen_lockfile:"",npm_config_legacy_peer_deps:"true",LANG:"C.UTF-8",npm_package_dependencies_react_dom:"18.2.0",npm_package_main:"./dist/avocado-not-front.umd.js",npm_lifecycle_script:"tsc && vite build",npm_package_dependencies__uiw_react_codemirror:"4.23.12",SHELL:"/bin/bash",NODE_PATH:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.4.1",npm_package_devDependencies__testing_library_react:"14.2.0",npm_package_devDependencies__types_react:"18.0.28",npm_package_devDependencies_jsdom:"24.0.0",npm_lifecycle_event:"build",npm_package_scripts_build:"tsc && vite build",npm_package_dependencies__codemirror_lang_sql:"6.8.0",npm_package_dependencies__foris_avocado_suite:"workspace:*",npm_package_dependencies_jsonpath:"1.1.1",npm_package_devDependencies__foris_tsconfig:"workspace:*",npm_package_dependencies_react_select:"5.8.0",PWD:"/home/runner/work/avocado/avocado/packages/avocado-not-front",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/pnpm.cjs",npm_package_devDependencies_stubby:"^5.1.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/avocado/avocado/packages/avocado-not-front",npm_package_scripts_start_stubby:"stubby -d src/services/stubs/stubby-config.yml -w -s 8200 -q",npm_package_dependencies_react:"18.2.0",npm_package_peerDependencies_react_select:"5.8.0",INIT_CWD:"/home/runner/work/avocado/avocado/packages/avocado-not-front",NODE_ENV:"production"};class o1{constructor(e,n,r,i,o,a,s,l,c,u=0,f){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=a,this.buffer=s,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new o1(e,[],n,r,r,0,[],0,i?new zP(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,a=this.reducePos<this.pos-25;a&&this.setLookAhead(this.pos);let s=o.dynamicPrecedence(i);if(s&&(this.score+=s),r==0){this.pushState(o.getGoto(this.state,i,!0),this.reducePos),i<o.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(r-1)*3-(e&262144?6:0),c=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=u));let f=l?this.stack[l-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<o.minRepeatTerm||e&131072){let h=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,c,h,d+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=o.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this,s=this.buffer.length;if(s==0&&a.parent&&(s=a.bufferBase-a.parent.bufferBase,a=a.parent),s>0&&a.buffer[s-4]==0&&a.buffer[s-1]>-1){if(n==r)return;if(a.buffer[s-2]>=n){a.buffer[s-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0){let s=!1;for(let l=a;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){s=!0;break}if(s)for(;a>0&&this.buffer[a-2]>r;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,i>4&&(i-=4)}this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=r,this.buffer[a+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4);else{let o=e,{parser:a}=this.p;(i>this.pos||n<=a.maxNode)&&(this.pos=i,a.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=a.maxNode&&this.buffer.push(n,r,i,4)}}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new o1(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new Dhe(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let o=0,a;o<n.length;o+=2)(a=n[o+1])!=this.state&&this.p.parser.hasAction(a,e)&&i.push(n[o],a);if(this.stack.length<120)for(let o=0;i.length<8&&o<n.length;o+=2){let a=n[o+1];i.some((s,l)=>l&1&&s==a)||i.push(n[o],a)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let o=n[i+1];if(o==this.state)continue;let a=this.split();a.pushState(o,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(n[i],this.pos),a.reducePos=this.pos,a.score-=200,r.push(a)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if(!(n&65536))return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,a=>{if(!(a&393216))if(a&65536){let s=(a>>19)-o;if(s>1){let l=a&65535,c=this.stack.length-s*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return s<<19|65536|l}}else{let s=r(a,o+1);if(s!=null)return s}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new zP(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class zP{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class Dhe{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class a1{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new a1(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new a1(this.stack,this.pos,this.index)}}function Of(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let o=0;for(;;){let a=t.charCodeAt(r++),s=!1;if(a==126){o=65535;break}a>=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,s=!0),o+=l,s)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class s1{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const XP=new s1;class $he{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=XP,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;o<r.from;){if(!i)return null;let a=this.ranges[--i];o-=r.from-a.to,r=a}for(;n<0?o>r.to:o>=r.to;){if(i==this.ranges.length-1)return null;let a=this.ranges[++i];o+=a.from-r.to,r=a}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(r=o,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let a=this.rangeIndex,s=this.range;for(;s.to<=r;)s=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>s.to&&(this.chunk2=this.chunk2.slice(0,s.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=XP,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class sc{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;VP(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}sc.prototype.contextual=sc.prototype.fallback=sc.prototype.extend=!1;class l1{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?Of(e):e}token(e,n){let r=e.pos,i=0;for(;;){let o=e.next<0,a=e.resolveOffset(1,1);if(VP(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||i++,a==null)break;e.reset(a,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}l1.prototype.contextual=sc.prototype.fallback=sc.prototype.extend=!1;class gn{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function VP(t,e,n,r,i,o){let a=0,s=1<<r,{dialect:l}=n.p.parser;e:for(;s&t[a];){let c=t[a+1];for(let h=a+3;h<c;h+=2)if((t[h+1]&s)>0){let m=t[h];if(l.allows(m)&&(e.token.value==-1||e.token.value==m||Lhe(m,e.token.value,i,o))){e.acceptToken(m);break}}let u=e.next,f=0,d=t[a+2];if(e.next<0&&d>f&&t[c+d*3-3]==65535){a=t[c+d*3-1];continue e}for(;f<d;){let h=f+d>>1,m=c+h+(h<<1),g=t[m],p=t[m+1]||65536;if(u<g)d=h;else if(u>=p)f=h+1;else{a=t[m+2],e.advance();continue e}}break}}function FP(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function Lhe(t,e,n,r){let i=FP(n,r,e);return i<0||FP(n,r,t)<i}const Cr=typeof process<"u"&&ZP&&/\bparse\b/.test(ZP.LOG);let Z6=null;function YP(t,e,n){let r=t.cursor(_t.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}let Ihe=class{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?YP(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?YP(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=r.children[i],a=this.start[n]+r.positions[i];if(a>e)return this.nextStart=a,null;if(o instanceof ot){if(a==e){if(a<this.safeFrom)return null;let s=a+o.length;if(s<=this.safeTo){let l=o.prop(Qe.lookAhead);if(!l||s+l<this.fragment.to)return o}}this.index[n]++,a+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+o.length}}};class jhe{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new s1)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,a=i.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let c=0;c<o.length;c++){if(!(1<<c&a))continue;let u=o[c],f=this.tokens[c];if(!(r&&!u.fallback)&&((u.contextual||f.start!=e.pos||f.mask!=a||f.context!=s)&&(this.updateCachedToken(f,u,e),f.mask=a,f.context=s),f.lookAhead>f.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let d=n;if(f.extended>-1&&(n=this.addActions(e,f.extended,f.end,n)),n=this.addActions(e,f.value,f.end,n),!u.extend&&(r=f,n>d))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new s1,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new s1,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let a=0;a<o.specialized.length;a++)if(o.specialized[a]==e.value){let s=o.specializers[a](this.stream.read(e.start,e.end),r);if(s>=0&&r.p.parser.dialect.allows(s>>1)){s&1?e.extended=s>>1:e.value=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;o<i;o+=3)if(this.actions[o]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:o}=e,{parser:a}=e.p,{data:s}=a;for(let l=0;l<2;l++)for(let c=a.stateSlot(o,l?2:1);;c+=3){if(s[c]==65535)if(s[c+1]==1)c=Fo(s,c+2);else{i==0&&s[c+1]==2&&(i=this.putAction(Fo(s,c+2),n,r,i));break}s[c]==n&&(i=this.putAction(Fo(s,c+1),n,r,i))}return i}}class Nhe{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new $he(n,i),this.tokens=new jhe(e,this.stream),this.topTerm=e.top[1];let{from:o}=i[0];this.stacks=[o1.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>e.bufferLength*4?new Ihe(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let s=e[a];for(;;){if(this.tokens.mainToken=null,s.pos>n)r.push(s);else{if(this.advanceStack(s,r,e))continue;{i||(i=[],o=[]),i.push(s);let l=this.tokens.getMainToken(s);o.push(l.value,l.end)}}break}}if(!r.length){let a=i&&Bhe(i);if(a)return Cr&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Cr&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let a=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(a)return Cr&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(r.length>a)for(r.sort((s,l)=>l.score-s.score);r.length>a;)r.pop();r.some(s=>s.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let a=0;a<r.length-1;a++){let s=r[a];for(let l=a+1;l<r.length;l++){let c=r[l];if(s.sameState(c)||s.buffer.length>500&&c.buffer.length>500)if((s.score-c.score||s.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(a--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let a=1;a<r.length;a++)r[a].pos<this.minStackPos&&(this.minStackPos=r[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:o}=this,a=Cr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?o.getGoto(e.state,f.type.id):-1;if(d>-1&&f.length&&(!c||(f.prop(Qe.contextHash)||0)==u))return e.useNode(f,d),Cr&&console.log(a+this.stackID(e)+` (via reuse of ${o.getName(f.type.id)})`),!0;if(!(f instanceof ot)||f.children.length==0||f.positions[0]>0)break;let h=f.children[0];if(h instanceof ot&&f.positions[0]==0)f=h;else break}}let s=o.stateSlot(e.state,4);if(s>0)return e.reduce(s),Cr&&console.log(a+this.stackID(e)+` (via always-reduce ${o.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;c<l.length;){let u=l[c++],f=l[c++],d=l[c++],h=c==l.length||!r,m=h?e:e.split(),g=this.tokens.mainToken;if(m.apply(u,f,g?g.start:m.pos,d),Cr&&console.log(a+this.stackID(m)+` (via ${u&65536?`reduce of ${o.getName(u&65535)}`:"shift"} for ${o.getName(f)} @ ${i}${m==e?"":", split"})`),h)return!0;m.pos>i?n.push(m):r.push(m)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return qP(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let a=0;a<e.length;a++){let s=e[a],l=n[a<<1],c=n[(a<<1)+1],u=Cr?this.stackID(s)+" -> ":"";if(s.deadEnd&&(o||(o=!0,s.restart(),Cr&&console.log(u+this.stackID(s)+" (restarted)"),this.advanceFully(s,r))))continue;let f=s.split(),d=u;for(let h=0;f.forceReduce()&&h<10&&(Cr&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,r));h++)Cr&&(d=this.stackID(f)+" -> ");for(let h of s.recoverByInsert(l))Cr&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>s.pos?(c==s.pos&&(c++,l=0),s.recoverByDelete(l,c),Cr&&console.log(u+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),qP(s,r)):(!i||i.score<s.score)&&(i=s)}return i}stackToTree(e){return e.close(),ot.build({buffer:a1.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(Z6||(Z6=new WeakMap)).get(e);return n||Z6.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function qP(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class Rhe{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const z6=t=>t;class X6{constructor(e){this.start=e.start,this.shift=e.shift||z6,this.reduce=e.reduce||z6,this.reuse=e.reuse||z6,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class ho extends W3{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let s=0;s<e.repeatNodeCount;s++)n.push("");let r=Object.keys(e.topRules).map(s=>e.topRules[s][1]),i=[];for(let s=0;s<n.length;s++)i.push([]);function o(s,l,c){i[s].push([l,l.deserialize(String(c))])}if(e.nodeProps)for(let s of e.nodeProps){let l=s[0];typeof l=="string"&&(l=Qe[l]);for(let c=1;c<s.length;){let u=s[c++];if(u>=0)o(u,l,s[c++]);else{let f=s[c+-u];for(let d=-u;d>0;d--)o(s[c++],l,f);c++}}}this.nodeSet=new Gu(n.map((s,l)=>sn.define({name:l>=this.minRepeatTerm?void 0:s,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Ok;let a=Of(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;s<this.specializerSpecs.length;s++)this.specialized[s]=this.specializerSpecs[s].term;this.specializers=this.specializerSpecs.map(WP),this.states=Of(e.states,Uint32Array),this.data=Of(e.stateData),this.goto=Of(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(s=>typeof s=="number"?new sc(a,s):s),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new Nhe(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let a=i[o++],s=a&1,l=i[o++];if(s&&r)return l;for(let c=o+(a>>1);o<c;o++)if(i[o]==e)return l;if(s)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let o=this.stateSlot(e,i?2:1),a;;o+=3){if((a=r[o])==65535)if(r[o+1]==1)a=r[o=Fo(r,o+2)];else{if(r[o+1]==2)return Fo(r,o+2);break}if(a==n||a==0)return Fo(r,o+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=Fo(this.data,o+2);else break;i=n(Fo(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Fo(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((o,a)=>a&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(ho.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(s=>s.from==r.external);if(!o)return r;let a=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=WP(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let a=n.indexOf(o);a>=0&&(r[a]=!0)}let i=null;for(let o=0;o<n.length;o++)if(!r[o])for(let a=this.dialects[n[o]],s;(s=this.data[a++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[s]=1;return new Rhe(e,r,i)}static deserialize(e){return new ho(e)}}function Fo(t,e){return t[e]|t[e+1]<<16}function Bhe(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function WP(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}const Zhe=io({String:M.string,Number:M.number,"True False":M.bool,PropertyName:M.propertyName,Null:M.null,", :":M.separator,"[ ]":M.squareBracket,"{ }":M.brace}),zhe=ho.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[Zhe],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),Xhe=lo.define({name:"json",parser:zhe.configure({props:[Ba.add({Object:Ms({except:/^\s*\}/}),Array:Ms({except:/^\s*\]/})}),Vo.add({"Object Array":Ip})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function UP(){return new Ra(Xhe)}class c1{static create(e,n,r,i,o){let a=i+(i<<8)+e+(n<<4)|0;return new c1(e,n,r,a,o,[],[])}constructor(e,n,r,i,o,a,s){this.type=e,this.value=n,this.from=r,this.hash=i,this.end=o,this.children=a,this.positions=s,this.hashProp=[[Qe.contextHash,i]]}addChild(e,n){e.prop(Qe.contextHash)!=this.hash&&(e=new ot(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let r=this.children.length-1;return r>=0&&(n=Math.max(n,this.positions[r]+this.children[r].length+this.from)),new ot(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(i,o,a)=>new ot(sn.none,i,o,a,this.hashProp)})}}var ie;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(ie||(ie={}));class Vhe{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}let Fhe=class{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return yf(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,n=0,r=0){for(let i=n;i<e;i++)r+=this.text.charCodeAt(i)==9?4-r%4:1;return r}findColumn(e){let n=0;for(let r=0;n<this.text.length&&r<e;n++)r+=this.text.charCodeAt(n)==9?4-r%4:1;return n}scrub(){if(!this.baseIndent)return this.text;let e="";for(let n=0;n<this.basePos;n++)e+=" ";return e+this.text.slice(this.basePos)}};function HP(t,e,n){if(n.pos==n.text.length||t!=e.block&&n.indent>=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(t.type==ie.OrderedList?Y6:F6)(n,e,!1);return r>0&&(t.type!=ie.BulletList||V6(n,e,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==t.value}const GP={[ie.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(Fe(ie.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(ni(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[ie.ListItem](t,e,n){return n.indent<n.baseIndent+t.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[ie.OrderedList]:HP,[ie.BulletList]:HP,[ie.Document](){return!0}};function ni(t){return t==32||t==9||t==10||t==13}function yf(t,e=0){for(;e<t.length&&ni(t.charCodeAt(e));)e++;return e}function KP(t,e,n){for(;e>n&&ni(t.charCodeAt(e-1));)e--;return e}function JP(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let n=e;n<t.text.length;n++)if(t.text.charCodeAt(n)==96)return-1}return e}function eE(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function V6(t,e,n){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let r=1;for(let i=t.pos+1;i<t.text.length;i++){let o=t.text.charCodeAt(i);if(o==t.next)r++;else if(!ni(o))return-1}return n&&t.next==45&&rE(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(lE.SetextHeading)>-1||r<3?-1:1}function tE(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function F6(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||ni(t.text.charCodeAt(t.pos+1)))&&(!n||tE(e,ie.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function Y6(t,e,n){let r=t.pos,i=t.next;for(;i>=48&&i<=57;){r++;if(r==t.text.length)return-1;i=t.text.charCodeAt(r)}return r==t.pos||r>t.pos+9||i!=46&&i!=41||r<t.text.length-1&&!ni(t.text.charCodeAt(r+1))||n&&!tE(e,ie.OrderedList)&&(t.skipSpace(r+1)==t.text.length||r>t.pos+1||t.next!=49)?-1:r+1-t.pos}function nE(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let n=e-t.pos;return n>6?-1:n}function rE(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let n=e;for(;e<t.text.length&&ni(t.text.charCodeAt(e));)e++;return e==t.text.length?n:-1}const q6=/^[ \t]*$/,iE=/-->/,oE=/\?>/,W6=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,iE],[/^\s*<\?/,oE],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,q6],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,q6]];function aE(t,e,n){if(t.next!=60)return-1;let r=t.text.slice(t.pos);for(let i=0,o=W6.length-(n?1:0);i<o;i++)if(W6[i][0].test(r))return i;return-1}function sE(t,e){let n=t.countIndent(e,t.pos,t.indent),r=t.countIndent(t.skipSpace(e),e,n);return r>=n+5?n+1:r}function Is(t,e,n){let r=t.length-1;r>=0&&t[r].to==e&&t[r].type==ie.CodeText?t[r].to=n:t.push(Fe(ie.CodeText,e,n))}const u1={LinkReference:void 0,IndentedCode(t,e){let n=e.baseIndent+4;if(e.indent<n)return!1;let r=e.findColumn(n),i=t.lineStart+r,o=t.lineStart+e.text.length,a=[],s=[];for(Is(a,i,o);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){Is(s,t.lineStart-1,t.lineStart);for(let l of e.markers)s.push(l)}else{if(e.indent<n)break;{if(s.length){for(let c of s)c.type==ie.CodeText?Is(a,c.from,c.to):a.push(c);s=[]}Is(a,t.lineStart-1,t.lineStart);for(let c of e.markers)a.push(c);o=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<o&&Is(a,l,o)}}return s.length&&(s=s.filter(l=>l.type!=ie.CodeText),s.length&&(e.markers=s.concat(e.markers))),t.addNode(t.buffer.writeElements(a,-i).finish(ie.CodeBlock,o-i),i),!0},FencedCode(t,e){let n=JP(e);if(n<0)return!1;let r=t.lineStart+e.pos,i=e.next,o=n-e.pos,a=e.skipSpace(n),s=KP(e.text,e.text.length,a),l=[Fe(ie.CodeMark,r,r+o)];a<s&&l.push(Fe(ie.CodeInfo,t.lineStart+a,t.lineStart+s));for(let c=!0;t.nextLine()&&e.depth>=t.stack.length;c=!1){let u=e.pos;if(e.indent-e.baseIndent<4)for(;u<e.text.length&&e.text.charCodeAt(u)==i;)u++;if(u-e.pos>=o&&e.skipSpace(u)==e.text.length){for(let f of e.markers)l.push(f);l.push(Fe(ie.CodeMark,t.lineStart+e.pos,t.lineStart+u)),t.nextLine();break}else{c||Is(l,t.lineStart-1,t.lineStart);for(let h of e.markers)l.push(h);let f=t.lineStart+e.basePos,d=t.lineStart+e.text.length;f<d&&Is(l,f,d)}}return t.addNode(t.buffer.writeElements(l,-r).finish(ie.FencedCode,t.prevLineEnd()-r),r),!0},Blockquote(t,e){let n=eE(e);return n<0?!1:(t.startContext(ie.Blockquote,e.pos),t.addNode(ie.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+n),null)},HorizontalRule(t,e){if(V6(e,t,!1)<0)return!1;let n=t.lineStart+e.pos;return t.nextLine(),t.addNode(ie.HorizontalRule,n),!0},BulletList(t,e){let n=F6(e,t,!1);if(n<0)return!1;t.block.type!=ie.BulletList&&t.startContext(ie.BulletList,e.basePos,e.next);let r=sE(e,e.pos+1);return t.startContext(ie.ListItem,e.basePos,r-e.baseIndent),t.addNode(ie.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},OrderedList(t,e){let n=Y6(e,t,!1);if(n<0)return!1;t.block.type!=ie.OrderedList&&t.startContext(ie.OrderedList,e.basePos,e.text.charCodeAt(e.pos+n-1));let r=sE(e,e.pos+n);return t.startContext(ie.ListItem,e.basePos,r-e.baseIndent),t.addNode(ie.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},ATXHeading(t,e){let n=nE(e);if(n<0)return!1;let r=e.pos,i=t.lineStart+r,o=KP(e.text,e.text.length,r),a=o;for(;a>r&&e.text.charCodeAt(a-1)==e.next;)a--;(a==o||a==r||!ni(e.text.charCodeAt(a-1)))&&(a=e.text.length);let s=t.buffer.write(ie.HeaderMark,0,n).writeElements(t.parser.parseInline(e.text.slice(r+n+1,a),i+n+1),-i);a<e.text.length&&s.write(ie.HeaderMark,a-r,o-r);let l=s.finish(ie.ATXHeading1-1+n,e.text.length-r);return t.nextLine(),t.addNode(l,i),!0},HTMLBlock(t,e){let n=aE(e,t,!1);if(n<0)return!1;let r=t.lineStart+e.pos,i=W6[n][1],o=[],a=i!=q6;for(;!i.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){a=!1;break}for(let c of e.markers)o.push(c)}a&&t.nextLine();let s=i==iE?ie.CommentBlock:i==oE?ie.ProcessingInstructionBlock:ie.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(o,-r).finish(s,l-r),r),!0},SetextHeading:void 0};class Yhe{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,n,r){if(this.stage==-1)return!1;let i=r.content+`
718
718
  `+n.scrub(),o=this.advance(i);return o>-1&&o<i.length?this.complete(e,r,o):!1}finish(e,n){return(this.stage==2||this.stage==3)&&yf(n.content,this.pos)==n.content.length?this.complete(e,n,n.content.length):!1}complete(e,n,r){return e.addLeafElement(n,Fe(ie.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(yE(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(Fe(ie.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(gE(e,yf(e,this.pos),this.start)))return-1}else if(this.stage==2){let n=yf(e,this.pos),r=0;if(n>this.pos){let i=OE(e,n,this.start);if(i){let o=U6(e,i.to-this.start);o>0&&(this.nextStage(i),r=o)}}return r||(r=U6(e,this.pos)),r>0&&r<e.length?r:-1}else return U6(e,this.pos)}}}function U6(t,e){for(;e<t.length;e++){let n=t.charCodeAt(e);if(n==10)break;if(!ni(n))return-1}return e}class qhe{nextLine(e,n,r){let i=n.depth<e.stack.length?-1:rE(n),o=n.next;if(i<0)return!1;let a=Fe(ie.HeaderMark,e.lineStart+n.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(r,Fe(o==61?ie.SetextHeading1:ie.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),a])),!0}finish(){return!1}}const lE={LinkReference(t,e){return e.content.charCodeAt(0)==91?new Yhe(e):null},SetextHeading(){return new qhe}},Whe=[(t,e)=>nE(e)>=0,(t,e)=>JP(e)>=0,(t,e)=>eE(e)>=0,(t,e)=>F6(e,t,!0)>=0,(t,e)=>Y6(e,t,!0)>=0,(t,e)=>V6(e,t,!0)>=0,(t,e)=>aE(e,t,!0)>=0],Uhe={text:"",end:0};class Hhe{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.line=new Fhe,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=c1.create(ie.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new epe(r,n):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let r=0;;){let i=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;r<e.markers.length&&(!i||e.markers[r].from<i.end);){let o=e.markers[r++];this.addNode(o.type,o.from,o.to)}if(!i)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let r of this.parser.blockParsers)if(r){let i=r(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}let n=new Vhe(this.lineStart+e.pos,e.text.slice(e.pos));for(let r of this.parser.leafBlockParsers)if(r){let i=r(this,n);i&&n.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,e,n))break e}for(let r of n.parsers)if(r.nextLine(this,e,n))return null;n.content+=`
719
719
  `+e.scrub();for(let r of e.markers)n.marks.push(r)}return this.finishLeaf(n),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let n=this.fragments.takeNodes(this);return n?(this.absoluteLineStart+=n,this.lineStart=vE(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let n=Uhe;if(n.end=e,e>=this.to)n.text="";else if(n.text=this.lineChunkAt(e),n.end+=n.text.length,this.ranges.length>1){let r=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<n.end;){i++;let o=this.ranges[i].from,a=this.lineChunkAt(o);n.end=o+a.length,n.text=n.text.slice(0,this.ranges[i-1].to-r)+a,r=n.end-n.text.length}}return n}readLine(){let{line:e}=this,{text:n,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,e.reset(n);e.depth<this.stack.length;e.depth++){let i=this.stack[e.depth],o=this.parser.skipContextMarkup[i.type];if(!o)throw new Error("Unhandled block context "+ie[i.type]);if(!o(i,this,e))break;e.forward()}}lineChunkAt(e){let n=this.input.chunk(e),r;if(this.input.lineChunks)r=n==`
720
720
  `?"":n;else{let i=n.indexOf(`
@@ -781,7 +781,7 @@ Expecting `+ne.join(", ")+", got '"+(this.terminals_[Q]||Q)+"'":L="Parse error o
781
781
  *
782
782
  * This source code is licensed under the MIT license found in the
783
783
  * LICENSE file in the root directory of this source tree.
784
- */var mM;function xOe(){if(mM)return vv;mM=1;var t=k,e=wOe();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,i=e.useSyncExternalStore,o=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;return vv.useSyncExternalStoreWithSelector=function(c,u,f,d,h){var m=o(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function O(x){if(!w){if(w=!0,v=x,x=d(x),h!==void 0&&g.hasValue){var _=g.value;if(h(_,x))return b=_}return b=x}if(_=b,r(v,x))return _;var E=d(x);return h!==void 0&&h(_,E)?(v=x,_):(v=x,b=E)}var w=!1,v,b,y=f===void 0?null:f;return[function(){return O(u())},y===null?void 0:function(){return O(y())}]},[u,f,d,h]);var p=i(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=p},[p]),l(p),p},vv}dM.exports=xOe();var _Oe=dM.exports,xv=k.createContext(null),SOe=t=>t,Dt=()=>{var t=k.useContext(xv);return t?t.store.dispatch:SOe},N1=()=>{},kOe=()=>N1,COe=(t,e)=>t===e;function ve(t){var e=k.useContext(xv);return _Oe.useSyncExternalStoreWithSelector(e?e.subscription.addNestedSub:kOe,e?e.store.getState:N1,e?e.store.getState:N1,e?t:N1,COe)}function POe(t,e=`expected a function, instead received ${typeof t}`){if(typeof t!="function")throw new TypeError(e)}function EOe(t,e=`expected an object, instead received ${typeof t}`){if(typeof t!="object")throw new TypeError(e)}function TOe(t,e="expected all items to be functions, instead received the following types: "){if(!t.every(n=>typeof n=="function")){const n=t.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${e}[${n}]`)}}var gM=t=>Array.isArray(t)?t:[t];function AOe(t){const e=Array.isArray(t[0])?t[0]:t;return TOe(e,"createSelector expects all input-selectors to be functions, but received the following types: "),e}function MOe(t,e){const n=[],{length:r}=t;for(let i=0;i<r;i++)n.push(t[i].apply(null,e));return n}var QOe=class{constructor(t){this.value=t}deref(){return this.value}},DOe=typeof WeakRef<"u"?WeakRef:QOe,$Oe=0,OM=1;function R1(){return{s:$Oe,v:void 0,o:null,p:null}}function yM(t,e={}){let n=R1();const{resultEqualityCheck:r}=e;let i,o=0;function a(){var f;let s=n;const{length:l}=arguments;for(let d=0,h=l;d<h;d++){const m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let g=s.o;g===null&&(s.o=g=new WeakMap);const p=g.get(m);p===void 0?(s=R1(),g.set(m,s)):s=p}else{let g=s.p;g===null&&(s.p=g=new Map);const p=g.get(m);p===void 0?(s=R1(),g.set(m,s)):s=p}}const c=s;let u;if(s.s===OM)u=s.v;else if(u=t.apply(null,arguments),o++,r){const d=((f=i==null?void 0:i.deref)==null?void 0:f.call(i))??i;d!=null&&r(d,u)&&(u=d,o!==0&&o--),i=typeof u=="object"&&u!==null||typeof u=="function"?new DOe(u):u}return c.s=OM,c.v=u,u}return a.clearCache=()=>{n=R1(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function LOe(t,...e){const n=typeof t=="function"?{memoize:t,memoizeOptions:e}:t,r=(...i)=>{let o=0,a=0,s,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),POe(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:f,memoizeOptions:d=[],argsMemoize:h=yM,argsMemoizeOptions:m=[],devModeChecks:g={}}=u,p=gM(d),O=gM(m),w=AOe(i),v=f(function(){return o++,c.apply(null,arguments)},...p),b=h(function(){a++;const x=MOe(w,arguments);return s=v.apply(null,x),s},...O);return Object.assign(b,{resultFunc:c,memoizedResultFunc:v,dependencies:w,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:f,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var Y=LOe(yM),IOe=Object.assign((t,e=Y)=>{EOe(t,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof t}`);const n=Object.keys(t),r=n.map(o=>t[o]);return e(r,(...o)=>o.reduce((a,s,l)=>(a[n[l]]=s,a),{}))},{withTypes:()=>IOe}),vM={},bM={},wM={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,i,o)=>{if(r!==i){const a=e(r),s=e(i);if(a===s&&a===0){if(r<i)return o==="desc"?1:-1;if(r>i)return o==="desc"?-1:1}return o==="desc"?s-a:a-s}return 0};t.compareValues=n})(wM);var xM={},_v={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n){return typeof n=="symbol"||n instanceof Symbol}t.isSymbol=e})(_v),function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=_v,n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,a){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||e.isSymbol(o)?!0:typeof o=="string"&&(r.test(o)||!n.test(o))||a!=null&&Object.hasOwn(a,o)}t.isKey=i}(xM),function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=wM,n=xM,r=_1;function i(o,a,s,l){if(o==null)return[];s=l?void 0:s,Array.isArray(o)||(o=Object.values(o)),Array.isArray(a)||(a=a==null?[null]:[a]),a.length===0&&(a=[null]),Array.isArray(s)||(s=s==null?[]:[s]),s=s.map(h=>String(h));const c=(h,m)=>{let g=h;for(let p=0;p<m.length&&g!=null;++p)g=g[m[p]];return g},u=(h,m)=>m==null||h==null?m:typeof h=="object"&&"key"in h?Object.hasOwn(m,h.key)?m[h.key]:c(m,h.path):typeof h=="function"?h(m):Array.isArray(h)?c(m,h):typeof m=="object"?m[h]:m,f=a.map(h=>(Array.isArray(h)&&h.length===1&&(h=h[0]),h==null||typeof h=="function"||Array.isArray(h)||n.isKey(h)?h:{key:h,path:r.toPath(h)}));return o.map(h=>({original:h,criteria:f.map(m=>u(m,h))})).slice().sort((h,m)=>{for(let g=0;g<f.length;g++){const p=e.compareValues(h.criteria[g],m.criteria[g],s[g]);if(p!==0)return p}return 0}).map(h=>h.original)}t.orderBy=i}(bM);var _M={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n,r=1){const i=[],o=Math.floor(r),a=(s,l)=>{for(let c=0;c<s.length;c++){const u=s[c];Array.isArray(u)&&l<o?a(u,l+1):i.push(u)}};return a(n,0),i}t.flatten=e})(_M);var Sv={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=yv,n=$1,r=hv,i=L1;function o(a,s,l){return r.isObject(l)&&(typeof s=="number"&&n.isArrayLike(l)&&e.isIndex(s)&&s<l.length||typeof s=="string"&&s in l)?i.eq(l[s],a):!1}t.isIterateeCall=o})(Sv),function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=bM,n=_M,r=Sv;function i(o,...a){const s=a.length;return s>1&&r.isIterateeCall(o,a[0],a[1])?a=[]:s>2&&r.isIterateeCall(a[0],a[1],a[2])&&(a=[a[0]]),e.orderBy(o,n.flatten(a),["asc"])}t.sortBy=i}(vM);var jOe=vM.sortBy;const B1=Br(jOe);var SM=t=>t.legend.settings,NOe=t=>t.legend.size,ROe=t=>t.legend.payload,BOe=Y([ROe,SM],(t,e)=>{var{itemSorter:n}=e,r=t.flat(1);return n?B1(r,n):r});function ZOe(){return ve(BOe)}var Z1=1;function kM(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[e,n]=k.useState({height:0,left:0,top:0,width:0}),r=k.useCallback(i=>{if(i!=null){var o=i.getBoundingClientRect(),a={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(a.height-e.height)>Z1||Math.abs(a.left-e.left)>Z1||Math.abs(a.top-e.top)>Z1||Math.abs(a.width-e.width)>Z1)&&n({height:a.height,left:a.left,top:a.top,width:a.width})}},[e.width,e.height,e.top,e.left,...t]);return[e,r]}function Tn(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var zOe=typeof Symbol=="function"&&Symbol.observable||"@@observable",CM=zOe,kv=()=>Math.random().toString(36).substring(7).split("").join("."),XOe={INIT:`@@redux/INIT${kv()}`,REPLACE:`@@redux/REPLACE${kv()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${kv()}`},z1=XOe;function Cv(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function PM(t,e,n){if(typeof t!="function")throw new Error(Tn(2));if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Tn(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Tn(1));return n(PM)(t,e)}let r=t,i=e,o=new Map,a=o,s=0,l=!1;function c(){a===o&&(a=new Map,o.forEach((p,O)=>{a.set(O,p)}))}function u(){if(l)throw new Error(Tn(3));return i}function f(p){if(typeof p!="function")throw new Error(Tn(4));if(l)throw new Error(Tn(5));let O=!0;c();const w=s++;return a.set(w,p),function(){if(O){if(l)throw new Error(Tn(6));O=!1,c(),a.delete(w),o=null}}}function d(p){if(!Cv(p))throw new Error(Tn(7));if(typeof p.type>"u")throw new Error(Tn(8));if(typeof p.type!="string")throw new Error(Tn(17));if(l)throw new Error(Tn(9));try{l=!0,i=r(i,p)}finally{l=!1}return(o=a).forEach(w=>{w()}),p}function h(p){if(typeof p!="function")throw new Error(Tn(10));r=p,d({type:z1.REPLACE})}function m(){const p=f;return{subscribe(O){if(typeof O!="object"||O===null)throw new Error(Tn(11));function w(){const b=O;b.next&&b.next(u())}return w(),{unsubscribe:p(w)}},[CM](){return this}}}return d({type:z1.INIT}),{dispatch:d,subscribe:f,getState:u,replaceReducer:h,[CM]:m}}function VOe(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:z1.INIT})>"u")throw new Error(Tn(12));if(typeof n(void 0,{type:z1.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Tn(13))})}function EM(t){const e=Object.keys(t),n={};for(let o=0;o<e.length;o++){const a=e[o];typeof t[a]=="function"&&(n[a]=t[a])}const r=Object.keys(n);let i;try{VOe(n)}catch(o){i=o}return function(a={},s){if(i)throw i;let l=!1;const c={};for(let u=0;u<r.length;u++){const f=r[u],d=n[f],h=a[f],m=d(h,s);if(typeof m>"u")throw s&&s.type,new Error(Tn(14));c[f]=m,l=l||m!==h}return l=l||r.length!==Object.keys(a).length,l?c:a}}function X1(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...r)=>e(n(...r)))}function FOe(...t){return e=>(n,r)=>{const i=e(n,r);let o=()=>{throw new Error(Tn(15))};const a={getState:i.getState,dispatch:(l,...c)=>o(l,...c)},s=t.map(l=>l(a));return o=X1(...s)(i.dispatch),{...i,dispatch:o}}}function TM(t){return Cv(t)&&"type"in t&&typeof t.type=="string"}var AM=Symbol.for("immer-nothing"),MM=Symbol.for("immer-draftable"),Tr=Symbol.for("immer-state");function Ci(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Oc=Object.getPrototypeOf;function Xs(t){return!!t&&!!t[Tr]}function Uo(t){var e;return t?QM(t)||Array.isArray(t)||!!t[MM]||!!((e=t.constructor)!=null&&e[MM])||Y1(t)||q1(t):!1}var YOe=Object.prototype.constructor.toString();function QM(t){if(!t||typeof t!="object")return!1;const e=Oc(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===YOe}function V1(t,e){F1(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function F1(t){const e=t[Tr];return e?e.type_:Array.isArray(t)?1:Y1(t)?2:q1(t)?3:0}function Pv(t,e){return F1(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function DM(t,e,n){const r=F1(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function qOe(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Y1(t){return t instanceof Map}function q1(t){return t instanceof Set}function Vs(t){return t.copy_||t.base_}function Ev(t,e){if(Y1(t))return new Map(t);if(q1(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=QM(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[Tr];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const a=i[o],s=r[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(r[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[a]})}return Object.create(Oc(t),r)}else{const r=Oc(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function Tv(t,e=!1){return W1(t)||Xs(t)||!Uo(t)||(F1(t)>1&&(t.set=t.add=t.clear=t.delete=WOe),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>Tv(r,!0))),t}function WOe(){Ci(2)}function W1(t){return Object.isFrozen(t)}var UOe={};function Fs(t){const e=UOe[t];return e||Ci(0,t),e}var $f;function $M(){return $f}function HOe(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function LM(t,e){e&&(Fs("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Av(t){Mv(t),t.drafts_.forEach(GOe),t.drafts_=null}function Mv(t){t===$f&&($f=t.parent_)}function IM(t){return $f=HOe($f,t)}function GOe(t){const e=t[Tr];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function jM(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Tr].modified_&&(Av(e),Ci(4)),Uo(t)&&(t=U1(e,t),e.parent_||H1(e,t)),e.patches_&&Fs("Patches").generateReplacementPatches_(n[Tr].base_,t,e.patches_,e.inversePatches_)):t=U1(e,n,[]),Av(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==AM?t:void 0}function U1(t,e,n){if(W1(e))return e;const r=e[Tr];if(!r)return V1(e,(i,o)=>NM(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return H1(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),V1(o,(s,l)=>NM(t,r,i,s,l,n,a)),H1(t,i,!1),n&&t.patches_&&Fs("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function NM(t,e,n,r,i,o,a){if(Xs(i)){const s=o&&e&&e.type_!==3&&!Pv(e.assigned_,r)?o.concat(r):void 0,l=U1(t,i,s);if(DM(n,r,l),Xs(l))t.canAutoFreeze_=!1;else return}else a&&n.add(i);if(Uo(i)&&!W1(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;U1(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&H1(t,i)}}function H1(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Tv(e,n)}function KOe(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:$M(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Qv;n&&(i=[r],o=Lf);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var Qv={get(t,e){if(e===Tr)return t;const n=Vs(t);if(!Pv(n,e))return JOe(t,n,e);const r=n[e];return t.finalized_||!Uo(r)?r:r===Dv(t.base_,e)?(Lv(t),t.copy_[e]=Iv(r,t)):r},has(t,e){return e in Vs(t)},ownKeys(t){return Reflect.ownKeys(Vs(t))},set(t,e,n){const r=RM(Vs(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=Dv(Vs(t),e),o=i==null?void 0:i[Tr];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(qOe(n,i)&&(n!==void 0||Pv(t.base_,e)))return!0;Lv(t),$v(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return Dv(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,Lv(t),$v(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=Vs(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){Ci(11)},getPrototypeOf(t){return Oc(t.base_)},setPrototypeOf(){Ci(12)}},Lf={};V1(Qv,(t,e)=>{Lf[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Lf.deleteProperty=function(t,e){return Lf.set.call(this,t,e,void 0)},Lf.set=function(t,e,n){return Qv.set.call(this,t[0],e,n,t[0])};function Dv(t,e){const n=t[Tr];return(n?Vs(n):t)[e]}function JOe(t,e,n){var i;const r=RM(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function RM(t,e){if(!(e in t))return;let n=Oc(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Oc(n)}}function $v(t){t.modified_||(t.modified_=!0,t.parent_&&$v(t.parent_))}function Lv(t){t.copy_||(t.copy_=Ev(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var e3e=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const o=n;n=e;const a=this;return function(l=o,...c){return a.produce(l,u=>n.call(this,u,...c))}}typeof n!="function"&&Ci(6),r!==void 0&&typeof r!="function"&&Ci(7);let i;if(Uo(e)){const o=IM(this),a=Iv(e,void 0);let s=!0;try{i=n(a),s=!1}finally{s?Av(o):Mv(o)}return LM(o,r),jM(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===AM&&(i=void 0),this.autoFreeze_&&Tv(i,!0),r){const o=[],a=[];Fs("Patches").generateReplacementPatches_(e,i,o,a),r(o,a)}return i}else Ci(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(a,...s)=>this.produceWithPatches(a,l=>e(l,...s));let r,i;return[this.produce(e,n,(a,s)=>{r=a,i=s}),r,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){Uo(t)||Ci(8),Xs(t)&&(t=Ho(t));const e=IM(this),n=Iv(t,void 0);return n[Tr].isManual_=!0,Mv(e),n}finishDraft(t,e){const n=t&&t[Tr];(!n||!n.isManual_)&&Ci(9);const{scope_:r}=n;return LM(r,e),jM(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const i=e[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(e=e.slice(n+1));const r=Fs("Patches").applyPatches_;return Xs(t)?r(t,e):this.produce(t,i=>r(i,e))}};function Iv(t,e){const n=Y1(t)?Fs("MapSet").proxyMap_(t,e):q1(t)?Fs("MapSet").proxySet_(t,e):KOe(t,e);return(e?e.scope_:$M()).drafts_.push(n),n}function Ho(t){return Xs(t)||Ci(10,t),BM(t)}function BM(t){if(!Uo(t)||W1(t))return t;const e=t[Tr];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Ev(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Ev(t,!0);return V1(n,(r,i)=>{DM(n,r,BM(i))}),e&&(e.finalized_=!1),n}var Ar=new e3e,ZM=Ar.produce;Ar.produceWithPatches.bind(Ar),Ar.setAutoFreeze.bind(Ar),Ar.setUseStrictShallowCopy.bind(Ar),Ar.applyPatches.bind(Ar),Ar.createDraft.bind(Ar),Ar.finishDraft.bind(Ar);function MCe(t){return t}function zM(t){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,t):i(o)}var t3e=zM(),n3e=zM,XM={npm_package_exports___require:"./dist/avocado-not-front.umd.js",npm_package_devDependencies__types_node:"20.2.5",npm_package_devDependencies__testing_library_jest_dom:"6.4.0",npm_config_user_agent:"pnpm/9.10.0 npm/? node/v20.17.0 linux x64",CI:"true",npm_package_devDependencies__testing_library_user_event:"14.5.2",npm_package_devDependencies_vite:"5.0.12",npm_node_execpath:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_package_publishConfig_access:"public",npm_package_files_0:"dist",HOME:"/home/runner",npm_package_dependencies_react_select_async_paginate:"0.7.3",npm_package_devDependencies_classnames:"2.3.2",npm_package_devDependencies_sass:"1.62.1",npm_config_auto_install_peers:"true",npm_package_devDependencies_vite_plugin_dts:"3.7.1",npm_package_dependencies__codemirror_lang_yaml:"6.1.2",npm_package_devDependencies_typescript:"5.1.3",npm_package_peerDependencies_react_select_async_paginate:"0.7.3",npm_package_types:"./dist/index.d.ts",npm_package_devDependencies__types_react_dom:"18.0.11",npm_package_dependencies__codemirror_lang_markdown:"6.3.4",npm_package_devDependencies__vitejs_plugin_react_swc:"3.5.0",npm_package_type:"module",npm_package_dependencies_zustand:"4.5.4",npm_package_module:"./dist/avocado-not-front.es.js",npm_package_devDependencies__types_testing_library__jest_dom:"6.0.0",npm_package_dependencies__foris_avocado_icons:"workspace:*",npm_config_registry:"https://registry.npmjs.org/",npm_config_node_linker:"hoisted",npm_package_dependencies__codemirror_lang_json:"6.0.1",npm_package_exports___import:"./dist/avocado-not-front.es.js",npm_package_dependencies__foris_avocado_core:"workspace:*",npm_package_dependencies_axios:"^1.8.4",npm_package_dependencies_recharts:"3.1.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/avocado/avocado/packages/avocado-not-front/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/opt/hostedtoolcache/node/20.17.0/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",TURBO_HASH:"06187051d8686c49",npm_package_name:"@foris/avocado-not-front",npm_package_scripts_start_stubby_examples:"stubby -d src/services/stubs/stubby-examples.yml -w -s 8300 -q",NODE:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_config_frozen_lockfile:"",npm_config_legacy_peer_deps:"true",LANG:"C.UTF-8",npm_package_dependencies_react_dom:"18.2.0",npm_package_main:"./dist/avocado-not-front.umd.js",npm_lifecycle_script:"tsc && vite build",npm_package_dependencies__uiw_react_codemirror:"4.23.12",SHELL:"/bin/bash",NODE_PATH:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.4.0",npm_package_devDependencies__testing_library_react:"14.2.0",npm_package_devDependencies__types_react:"18.0.28",npm_package_devDependencies_jsdom:"24.0.0",npm_lifecycle_event:"build",npm_package_scripts_build:"tsc && vite build",npm_package_dependencies__codemirror_lang_sql:"6.8.0",npm_package_dependencies__foris_avocado_suite:"workspace:*",npm_package_dependencies_jsonpath:"1.1.1",npm_package_devDependencies__foris_tsconfig:"workspace:*",npm_package_dependencies_react_select:"5.8.0",PWD:"/home/runner/work/avocado/avocado/packages/avocado-not-front",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/pnpm.cjs",npm_package_devDependencies_stubby:"^5.1.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/avocado/avocado/packages/avocado-not-front",npm_package_scripts_start_stubby:"stubby -d src/services/stubs/stubby-config.yml -w -s 8200 -q",npm_package_dependencies_react:"18.2.0",npm_package_peerDependencies_react_select:"5.8.0",INIT_CWD:"/home/runner/work/avocado/avocado/packages/avocado-not-front",NODE_ENV:"production"},r3e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?X1:X1.apply(null,arguments)};function si(t,e){function n(...r){if(e){let i=e(...r);if(!i)throw new Error(Mr(0));return{type:t,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:t,payload:r[0]}}return n.toString=()=>`${t}`,n.type=t,n.match=r=>TM(r)&&r.type===t,n}var VM=class bd extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,bd.prototype)}static get[Symbol.species](){return bd}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new bd(...e[0].concat(this)):new bd(...e.concat(this))}};function FM(t){return Uo(t)?ZM(t,()=>{}):t}function G1(t,e,n){return t.has(e)?t.get(e):t.set(e,n(e)).get(e)}function i3e(t){return typeof t=="boolean"}var o3e=()=>function(e){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=e??{};let a=new VM;return n&&(i3e(n)?a.push(t3e):a.push(n3e(n.extraArgument))),a},a3e="RTK_autoBatch",YM=t=>e=>{setTimeout(e,t)},s3e=(t={type:"raf"})=>e=>(...n)=>{const r=e(...n);let i=!0,o=!1,a=!1;const s=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:YM(10):t.type==="callback"?t.queueNotification:YM(t.timeout),c=()=>{a=!1,o&&(o=!1,s.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const f=()=>i&&u(),d=r.subscribe(f);return s.add(u),()=>{d(),s.delete(u)}},dispatch(u){var f;try{return i=!((f=u==null?void 0:u.meta)!=null&&f[a3e]),o=!i,o&&(a||(a=!0,l(c))),r.dispatch(u)}finally{i=!0}}})},l3e=t=>function(n){const{autoBatch:r=!0}=n??{};let i=new VM(t);return r&&i.push(s3e(typeof r=="object"?r:void 0)),i};function c3e(t){const e=o3e(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:a=void 0,enhancers:s=void 0}=t||{};let l;if(typeof n=="function")l=n;else if(Cv(n))l=EM(n);else throw new Error(Mr(1));let c;typeof r=="function"?c=r(e):c=e();let u=X1;i&&(u=r3e({trace:XM.NODE_ENV!=="production",...typeof i=="object"&&i}));const f=FOe(...c),d=l3e(f);let h=typeof s=="function"?s(d):d();const m=u(...h);return PM(l,a,m)}function qM(t){const e={},n=[];let r;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(!s)throw new Error(Mr(28));if(s in e)throw new Error(Mr(29));return e[s]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return t(i),[e,n,r]}function u3e(t){return typeof t=="function"}function f3e(t,e){let[n,r,i]=qM(e),o;if(u3e(t))o=()=>FM(t());else{const s=FM(t);o=()=>s}function a(s=o(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,f)=>{if(f)if(Xs(u)){const h=f(u,l);return h===void 0?u:h}else{if(Uo(u))return ZM(u,d=>f(d,l));{const d=f(u,l);if(d===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return u},s)}return a.getInitialState=o,a}var d3e="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",h3e=(t=21)=>{let e="",n=t;for(;n--;)e+=d3e[Math.random()*64|0];return e},p3e=Symbol.for("rtk-slice-createasyncthunk");function m3e(t,e){return`${t}/${e}`}function g3e({creators:t}={}){var n;const e=(n=t==null?void 0:t.asyncThunk)==null?void 0:n[p3e];return function(i){const{name:o,reducerPath:a=o}=i;if(!o)throw new Error(Mr(11));typeof process<"u"&&XM.NODE_ENV==="development"&&i.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const s=(typeof i.reducers=="function"?i.reducers(y3e()):i.reducers)||{},l=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(b,y){const x=typeof b=="string"?b:b.type;if(!x)throw new Error(Mr(12));if(x in c.sliceCaseReducersByType)throw new Error(Mr(13));return c.sliceCaseReducersByType[x]=y,u},addMatcher(b,y){return c.sliceMatchers.push({matcher:b,reducer:y}),u},exposeAction(b,y){return c.actionCreators[b]=y,u},exposeCaseReducer(b,y){return c.sliceCaseReducersByName[b]=y,u}};l.forEach(b=>{const y=s[b],x={reducerName:b,type:m3e(o,b),createNotation:typeof i.reducers=="function"};b3e(y)?x3e(x,y,u,e):v3e(x,y,u)});function f(){const[b={},y=[],x=void 0]=typeof i.extraReducers=="function"?qM(i.extraReducers):[i.extraReducers],_={...b,...c.sliceCaseReducersByType};return f3e(i.initialState,E=>{for(let A in _)E.addCase(A,_[A]);for(let A of c.sliceMatchers)E.addMatcher(A.matcher,A.reducer);for(let A of y)E.addMatcher(A.matcher,A.reducer);x&&E.addDefaultCase(x)})}const d=b=>b,h=new Map,m=new WeakMap;let g;function p(b,y){return g||(g=f()),g(b,y)}function O(){return g||(g=f()),g.getInitialState()}function w(b,y=!1){function x(E){let A=E[b];return typeof A>"u"&&y&&(A=G1(m,x,O)),A}function _(E=d){const A=G1(h,y,()=>new WeakMap);return G1(A,E,()=>{const I={};for(const[Q,D]of Object.entries(i.selectors??{}))I[Q]=O3e(D,E,()=>G1(m,E,O),y);return I})}return{reducerPath:b,getSelectors:_,get selectors(){return _(x)},selectSlice:x}}const v={name:o,reducer:p,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:O,...w(a),injectInto(b,{reducerPath:y,...x}={}){const _=y??a;return b.inject({reducerPath:_,reducer:p},x),{...v,...w(_,!0)}}};return v}}function O3e(t,e,n,r){function i(o,...a){let s=e(o);return typeof s>"u"&&r&&(s=n()),t(s,...a)}return i.unwrapped=t,i}var li=g3e();function y3e(){function t(e,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...n}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...n){return e(...n)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:n}},asyncThunk:t}}function v3e({type:t,reducerName:e,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!w3e(r))throw new Error(Mr(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,a?si(t,a):si(t))}function b3e(t){return t._reducerDefinitionType==="asyncThunk"}function w3e(t){return t._reducerDefinitionType==="reducerWithPrepare"}function x3e({type:t,reducerName:e},n,r,i){if(!i)throw new Error(Mr(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:l,settled:c,options:u}=n,f=i(t,o,u);r.exposeAction(e,f),a&&r.addCase(f.fulfilled,a),s&&r.addCase(f.pending,s),l&&r.addCase(f.rejected,l),c&&r.addMatcher(f.settled,c),r.exposeCaseReducer(e,{fulfilled:a||K1,pending:s||K1,rejected:l||K1,settled:c||K1})}function K1(){}var _3e="task",WM="listener",UM="completed",jv="cancelled",S3e=`task-${jv}`,k3e=`task-${UM}`,Nv=`${WM}-${jv}`,C3e=`${WM}-${UM}`,J1=class{constructor(t){E5(this,"name","TaskAbortError");E5(this,"message");this.code=t,this.message=`${_3e} ${jv} (reason: ${t})`}},Rv=(t,e)=>{if(typeof t!="function")throw new TypeError(Mr(32))},em=()=>{},HM=(t,e=em)=>(t.catch(e),t),GM=(t,e)=>(t.addEventListener("abort",e,{once:!0}),()=>t.removeEventListener("abort",e)),Ys=(t,e)=>{const n=t.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:e,configurable:!0,writable:!0}),t.abort(e))},qs=t=>{if(t.aborted){const{reason:e}=t;throw new J1(e)}};function KM(t,e){let n=em;return new Promise((r,i)=>{const o=()=>i(new J1(t.reason));if(t.aborted){o();return}n=GM(t,o),e.finally(()=>n()).then(r,i)}).finally(()=>{n=em})}var P3e=async(t,e)=>{try{return await Promise.resolve(),{status:"ok",value:await t()}}catch(n){return{status:n instanceof J1?"cancelled":"rejected",error:n}}finally{e==null||e()}},tm=t=>e=>HM(KM(t,e).then(n=>(qs(t),n))),JM=t=>{const e=tm(t);return n=>e(new Promise(r=>setTimeout(r,n)))},{assign:yc}=Object,eQ={},nm="listenerMiddleware",E3e=(t,e)=>{const n=r=>GM(t,()=>Ys(r,t.reason));return(r,i)=>{Rv(r);const o=new AbortController;n(o);const a=P3e(async()=>{qs(t),qs(o.signal);const s=await r({pause:tm(o.signal),delay:JM(o.signal),signal:o.signal});return qs(o.signal),s},()=>Ys(o,k3e));return i!=null&&i.autoJoin&&e.push(a.catch(em)),{result:tm(t)(a),cancel(){Ys(o,S3e)}}}},T3e=(t,e)=>{const n=async(r,i)=>{qs(e);let o=()=>{};const s=[new Promise((l,c)=>{let u=t({predicate:r,effect:(f,d)=>{d.unsubscribe(),l([f,d.getState(),d.getOriginalState()])}});o=()=>{u(),c()}})];i!=null&&s.push(new Promise(l=>setTimeout(l,i,null)));try{const l=await KM(e,Promise.race(s));return qs(e),l}finally{o()}};return(r,i)=>HM(n(r,i))},tQ=t=>{let{type:e,actionCreator:n,matcher:r,predicate:i,effect:o}=t;if(e)i=si(e).match;else if(n)e=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(Mr(21));return Rv(o),{predicate:i,type:e,effect:o}},nQ=yc(t=>{const{type:e,predicate:n,effect:r}=tQ(t);return{id:h3e(),effect:r,type:e,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Mr(22))}}},{withTypes:()=>nQ}),rQ=(t,e)=>{const{type:n,effect:r,predicate:i}=tQ(e);return Array.from(t.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},Bv=t=>{t.pending.forEach(e=>{Ys(e,Nv)})},A3e=t=>()=>{t.forEach(Bv),t.clear()},iQ=(t,e,n)=>{try{t(e,n)}catch(r){setTimeout(()=>{throw r},0)}},oQ=yc(si(`${nm}/add`),{withTypes:()=>oQ}),M3e=si(`${nm}/removeAll`),aQ=yc(si(`${nm}/remove`),{withTypes:()=>aQ}),Q3e=(...t)=>{console.error(`${nm}/error`,...t)},If=(t={})=>{const e=new Map,{extra:n,onError:r=Q3e}=t;Rv(r);const i=u=>(u.unsubscribe=()=>e.delete(u.id),e.set(u.id,u),f=>{u.unsubscribe(),f!=null&&f.cancelActive&&Bv(u)}),o=u=>{const f=rQ(e,u)??nQ(u);return i(f)};yc(o,{withTypes:()=>o});const a=u=>{const f=rQ(e,u);return f&&(f.unsubscribe(),u.cancelActive&&Bv(f)),!!f};yc(a,{withTypes:()=>a});const s=async(u,f,d,h)=>{const m=new AbortController,g=T3e(o,m.signal),p=[];try{u.pending.add(m),await Promise.resolve(u.effect(f,yc({},d,{getOriginalState:h,condition:(O,w)=>g(O,w).then(Boolean),take:g,delay:JM(m.signal),pause:tm(m.signal),extra:n,signal:m.signal,fork:E3e(m.signal,p),unsubscribe:u.unsubscribe,subscribe:()=>{e.set(u.id,u)},cancelActiveListeners:()=>{u.pending.forEach((O,w,v)=>{O!==m&&(Ys(O,Nv),v.delete(O))})},cancel:()=>{Ys(m,Nv),u.pending.delete(m)},throwIfCancelled:()=>{qs(m.signal)}})))}catch(O){O instanceof J1||iQ(r,O,{raisedBy:"effect"})}finally{await Promise.all(p),Ys(m,C3e),u.pending.delete(m)}},l=A3e(e);return{middleware:u=>f=>d=>{if(!TM(d))return f(d);if(oQ.match(d))return o(d.payload);if(M3e.match(d)){l();return}if(aQ.match(d))return a(d.payload);let h=u.getState();const m=()=>{if(h===eQ)throw new Error(Mr(23));return h};let g;try{if(g=f(d),e.size>0){const p=u.getState(),O=Array.from(e.values());for(const w of O){let v=!1;try{v=w.predicate(d,p,h)}catch(b){v=!1,iQ(r,b,{raisedBy:"predicate"})}v&&s(w,d,u,m)}}}finally{h=eQ}return g},startListening:o,stopListening:a,clearListeners:l}};function Mr(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var D3e={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},sQ=li({name:"chartLayout",initialState:D3e,reducers:{setLayout(t,e){t.layoutType=e.payload},setChartSize(t,e){t.width=e.payload.width,t.height=e.payload.height},setMargin(t,e){t.margin.top=e.payload.top,t.margin.right=e.payload.right,t.margin.bottom=e.payload.bottom,t.margin.left=e.payload.left},setScale(t,e){t.scale=e.payload}}}),{setMargin:$3e,setLayout:L3e,setChartSize:I3e,setScale:j3e}=sQ.actions,N3e=sQ.reducer;function lQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function cQ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?lQ(Object(n),!0).forEach(function(r){R3e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function R3e(t,e,n){return(e=B3e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B3e(t){var e=Z3e(t,"string");return typeof e=="symbol"?e:e+""}function Z3e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var rm=Math.PI/180,z3e=t=>t*180/Math.PI,tn=(t,e,n,r)=>({x:t+Math.cos(-rm*r)*n,y:e+Math.sin(-rm*r)*n}),uQ=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(e-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},X3e=(t,e)=>{var{x:n,y:r}=t,{x:i,y:o}=e;return Math.sqrt((n-i)**2+(r-o)**2)},V3e=(t,e)=>{var{x:n,y:r}=t,{cx:i,cy:o}=e,a=X3e({x:n,y:r},{x:i,y:o});if(a<=0)return{radius:a,angle:0};var s=(n-i)/a,l=Math.acos(s);return r>o&&(l=2*Math.PI-l),{radius:a,angle:z3e(l),angleInRadian:l}},F3e=t=>{var{startAngle:e,endAngle:n}=t,r=Math.floor(e/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:e-o*360,endAngle:n-o*360}},Y3e=(t,e)=>{var{startAngle:n,endAngle:r}=e,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return t+a*360},q3e=(t,e)=>{var{x:n,y:r}=t,{radius:i,angle:o}=V3e({x:n,y:r},e),{innerRadius:a,outerRadius:s}=e;if(i<a||i>s||i===0)return null;var{startAngle:l,endAngle:c}=F3e(e),u=o,f;if(l<=c){for(;u>c;)u-=360;for(;u<l;)u+=360;f=u>=l&&u<=c}else{for(;u>l;)u-=360;for(;u<c;)u+=360;f=u>=c&&u<=l}return f?cQ(cQ({},e),{},{radius:i,angle:Y3e(u,e)}):null};function fQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ci(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fQ(Object(n),!0).forEach(function(r){W3e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function W3e(t,e,n){return(e=U3e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function U3e(t){var e=H3e(t,"string");return typeof e=="symbol"?e:e+""}function H3e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function vt(t,e,n){return ut(t)||ut(e)?n:mo(e)?Xa(t,e,n):typeof e=="function"?e(t):n}var G3e=(t,e,n,r,i)=>{var o,a=-1,s=(o=e==null?void 0:e.length)!==null&&o!==void 0?o:0;if(s<=1||t==null)return 0;if(r==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var l=0;l<s;l++){var c=l>0?n[l-1].coordinate:n[s-1].coordinate,u=n[l].coordinate,f=l>=s-1?n[0].coordinate:n[l+1].coordinate,d=void 0;if(On(u-c)!==On(f-u)){var h=[];if(On(f-u)===On(i[1]-i[0])){d=f;var m=u+i[1]-i[0];h[0]=Math.min(m,(m+c)/2),h[1]=Math.max(m,(m+c)/2)}else{d=c;var g=f+i[1]-i[0];h[0]=Math.min(u,(g+u)/2),h[1]=Math.max(u,(g+u)/2)}var p=[Math.min(u,(d+u)/2),Math.max(u,(d+u)/2)];if(t>p[0]&&t<=p[1]||t>=h[0]&&t<=h[1]){({index:a}=n[l]);break}}else{var O=Math.min(c,f),w=Math.max(c,f);if(t>(O+u)/2&&t<=(w+u)/2){({index:a}=n[l]);break}}}else if(e){for(var v=0;v<s;v++)if(v===0&&t<=(e[v].coordinate+e[v+1].coordinate)/2||v>0&&v<s-1&&t>(e[v].coordinate+e[v-1].coordinate)/2&&t<=(e[v].coordinate+e[v+1].coordinate)/2||v===s-1&&t>(e[v].coordinate+e[v-1].coordinate)/2){({index:a}=e[v]);break}}return a},K3e=(t,e,n)=>{if(e&&n){var{width:r,height:i}=n,{align:o,verticalAlign:a,layout:s}=e;if((s==="vertical"||s==="horizontal"&&a==="middle")&&o!=="center"&&ue(t[o]))return ci(ci({},t),{},{[o]:t[o]+(r||0)});if((s==="horizontal"||s==="vertical"&&o==="center")&&a!=="middle"&&ue(t[a]))return ci(ci({},t),{},{[a]:t[a]+(i||0)})}return t},go=(t,e)=>t==="horizontal"&&e==="xAxis"||t==="vertical"&&e==="yAxis"||t==="centric"&&e==="angleAxis"||t==="radial"&&e==="radiusAxis",dQ=(t,e,n,r)=>{if(r)return t.map(s=>s.coordinate);var i,o,a=t.map(s=>(s.coordinate===e&&(i=!0),s.coordinate===n&&(o=!0),s.coordinate));return i||a.push(e),o||a.push(n),a},hQ=(t,e,n)=>{if(!t)return null;var{duplicateDomain:r,type:i,range:o,scale:a,realScaleType:s,isCategorical:l,categoricalDomain:c,tickCount:u,ticks:f,niceTicks:d,axisType:h}=t;if(!a)return null;var m=s==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,g=i==="category"&&a.bandwidth?a.bandwidth()/m:0;if(g=h==="angleAxis"&&o&&o.length>=2?On(o[0]-o[1])*2*g:g,f||d){var p=(f||d||[]).map((O,w)=>{var v=r?r.indexOf(O):O;return{coordinate:a(v)+g,value:O,offset:g,index:w}});return p.filter(O=>!ur(O.coordinate))}return l&&c?c.map((O,w)=>({coordinate:a(O)+g,value:O,index:w,offset:g})):a.ticks&&!n&&u!=null?a.ticks(u).map((O,w)=>({coordinate:a(O)+g,value:O,offset:g,index:w})):a.domain().map((O,w)=>({coordinate:a(O)+g,value:r?r[O]:O,index:w,offset:g}))},pQ=1e-4,J3e=t=>{var e=t.domain();if(!(!e||e.length<=2)){var n=e.length,r=t.range(),i=Math.min(r[0],r[1])-pQ,o=Math.max(r[0],r[1])+pQ,a=t(e[0]),s=t(e[n-1]);(a<i||a>o||s<i||s>o)&&t.domain([e[0],e[n-1]])}},e6e=(t,e)=>{if(!e||e.length!==2||!ue(e[0])||!ue(e[1]))return t;var n=Math.min(e[0],e[1]),r=Math.max(e[0],e[1]),i=[t[0],t[1]];return(!ue(t[0])||t[0]<n)&&(i[0]=n),(!ue(t[1])||t[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},t6e=t=>{var e=t.length;if(!(e<=0))for(var n=0,r=t[0].length;n<r;++n)for(var i=0,o=0,a=0;a<e;++a){var s=ur(t[a][n][1])?t[a][n][0]:t[a][n][1];s>=0?(t[a][n][0]=i,t[a][n][1]=i+s,i=t[a][n][1]):(t[a][n][0]=o,t[a][n][1]=o+s,o=t[a][n][1])}},n6e=t=>{var e=t.length;if(!(e<=0))for(var n=0,r=t[0].length;n<r;++n)for(var i=0,o=0;o<e;++o){var a=ur(t[o][n][1])?t[o][n][0]:t[o][n][1];a>=0?(t[o][n][0]=i,t[o][n][1]=i+a,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},r6e={sign:t6e,expand:nOe,none:gc,silhouette:rOe,wiggle:iOe,positive:n6e},i6e=(t,e,n)=>{var r=r6e[n],i=tOe().keys(e).value((o,a)=>+vt(o,a,0)).order(iv).offset(r);return i(t)};function Zv(t){return t==null?void 0:String(t)}function im(t){var{axis:e,ticks:n,bandSize:r,entry:i,index:o,dataKey:a}=t;if(e.type==="category"){if(!e.allowDuplicatedCategory&&e.dataKey&&!ut(i[e.dataKey])){var s=OA(n,"value",i[e.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var l=vt(i,ut(a)?e.dataKey:a);return ut(l)?null:e.scale(l)}var mQ=t=>{var{axis:e,ticks:n,offset:r,bandSize:i,entry:o,index:a}=t;if(e.type==="category")return n[a]?n[a].coordinate+r:null;var s=vt(o,e.dataKey,e.scale.domain()[a]);return ut(s)?null:e.scale(s)-i/2+r},o6e=t=>{var{numericAxis:e}=t,n=e.scale.domain();if(e.type==="number"){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},a6e=t=>{var e=t.flat(2).filter(ue);return[Math.min(...e),Math.max(...e)]},s6e=t=>[t[0]===1/0?0:t[0],t[1]===-1/0?0:t[1]],l6e=(t,e,n)=>{if(t!=null)return s6e(Object.keys(t).reduce((r,i)=>{var o=t[i],{stackedData:a}=o,s=a.reduce((l,c)=>{var u=a6e(c.slice(e,n+1));return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},gQ=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,OQ=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ws=(t,e,n)=>{if(t&&t.scale&&t.scale.bandwidth){var r=t.scale.bandwidth();if(!n||r>0)return r}if(t&&e&&e.length>=2){for(var i=B1(e,u=>u.coordinate),o=1/0,a=1,s=i.length;a<s;a++){var l=i[a],c=i[a-1];o=Math.min((l.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0};function yQ(t){var{tooltipEntrySettings:e,dataKey:n,payload:r,value:i,name:o}=t;return ci(ci({},e),{},{dataKey:n,payload:r,value:i,name:o})}function Fa(t,e){if(t)return String(t);if(typeof e=="string")return e}function c6e(t,e,n,r,i){if(n==="horizontal"||n==="vertical"){var o=t>=i.left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height;return o?{x:t,y:e}:null}return r?q3e({x:t,y:e},r):null}var u6e=(t,e,n,r)=>{var i=e.find(c=>c&&c.index===n);if(i){if(t==="horizontal")return{x:i.coordinate,y:r.y};if(t==="vertical")return{x:r.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,{radius:a}=r;return ci(ci(ci({},r),tn(r.cx,r.cy,a,o)),{},{angle:o,radius:a})}var s=i.coordinate,{angle:l}=r;return ci(ci(ci({},r),tn(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return{x:0,y:0}},f6e=(t,e)=>e==="horizontal"?t.x:e==="vertical"?t.y:e==="centric"?t.angle:t.radius,Go=t=>t.layout.width,Ko=t=>t.layout.height,d6e=t=>t.layout.scale,vQ=t=>t.layout.margin,zv=Y(t=>t.cartesianAxis.xAxis,t=>Object.values(t)),Xv=Y(t=>t.cartesianAxis.yAxis,t=>Object.values(t)),bQ="data-recharts-item-index",wQ="data-recharts-item-data-key",om=60;function xQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ya(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xQ(Object(n),!0).forEach(function(r){h6e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function h6e(t,e,n){return(e=p6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p6e(t){var e=m6e(t,"string");return typeof e=="symbol"?e:e+""}function m6e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var g6e=t=>t.brush.height,ln=Y([Go,Ko,vQ,g6e,zv,Xv,SM,NOe],(t,e,n,r,i,o,a,s)=>{var l=o.reduce((m,g)=>{var{orientation:p}=g;if(!g.mirror&&!g.hide){var O=typeof g.width=="number"?g.width:om;return Ya(Ya({},m),{},{[p]:m[p]+O})}return m},{left:n.left||0,right:n.right||0}),c=i.reduce((m,g)=>{var{orientation:p}=g;return!g.mirror&&!g.hide?Ya(Ya({},m),{},{[p]:Xa(m,"".concat(p))+g.height}):m},{top:n.top||0,bottom:n.bottom||0}),u=Ya(Ya({},c),l),f=u.bottom;u.bottom+=r,u=K3e(u,a,s);var d=t-u.left-u.right,h=e-u.top-u.bottom;return Ya(Ya({brushBottom:f},u),{},{width:Math.max(d,0),height:Math.max(h,0)})}),O6e=Y(ln,t=>({x:t.left,y:t.top,width:t.width,height:t.height})),_Q=Y(Go,Ko,(t,e)=>({x:0,y:0,width:t,height:e})),y6e=k.createContext(null),Bn=()=>k.useContext(y6e)!=null,am=t=>t.brush,sm=Y([am,ln,vQ],(t,e,n)=>({height:t.height,x:ue(t.x)?t.x:e.left,y:ue(t.y)?t.y:e.top+e.height+e.brushBottom-((n==null?void 0:n.bottom)||0),width:ue(t.width)?t.width:e.width})),Vv=()=>{var t,e=Bn(),n=ve(O6e),r=ve(sm),i=(t=ve(am))===null||t===void 0?void 0:t.padding;return!e||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},v6e={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},SQ=()=>{var t;return(t=ve(ln))!==null&&t!==void 0?t:v6e},Fv=()=>ve(Go),Yv=()=>ve(Ko),b6e={top:0,right:0,bottom:0,left:0},w6e=()=>{var t;return(t=ve(e=>e.layout.margin))!==null&&t!==void 0?t:b6e},qe=t=>t.layout.layoutType,jf=()=>ve(qe),x6e={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},kQ=li({name:"legend",initialState:x6e,reducers:{setLegendSize(t,e){t.size.width=e.payload.width,t.size.height=e.payload.height},setLegendSettings(t,e){t.settings.align=e.payload.align,t.settings.layout=e.payload.layout,t.settings.verticalAlign=e.payload.verticalAlign,t.settings.itemSorter=e.payload.itemSorter},addLegendPayload(t,e){t.payload.push(e.payload)},removeLegendPayload(t,e){var n=Ho(t).payload.indexOf(e.payload);n>-1&&t.payload.splice(n,1)}}}),{setLegendSize:CQ,setLegendSettings:_6e,addLegendPayload:PQ,removeLegendPayload:EQ}=kQ.actions,S6e=kQ.reducer,k6e=["contextPayload"];function qv(){return qv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},qv.apply(null,arguments)}function TQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function vc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?TQ(Object(n),!0).forEach(function(r){Wv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):TQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Wv(t,e,n){return(e=C6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C6e(t){var e=P6e(t,"string");return typeof e=="symbol"?e:e+""}function P6e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function E6e(t,e){if(t==null)return{};var n,r,i=T6e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function T6e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function A6e(t){return t.value}function M6e(t){var{contextPayload:e}=t,n=E6e(t,k6e),r=fM(e,t.payloadUniqBy,A6e),i=vc(vc({},n),{},{payload:r});return P.isValidElement(t.content)?P.cloneElement(t.content,i):typeof t.content=="function"?P.createElement(t.content,i):P.createElement(cv,i)}function Q6e(t,e,n,r,i,o){var{layout:a,align:s,verticalAlign:l}=e,c,u;return(!t||(t.left===void 0||t.left===null)&&(t.right===void 0||t.right===null))&&(s==="center"&&a==="vertical"?c={left:((r||0)-o.width)/2}:c=s==="right"?{right:n&&n.right||0}:{left:n&&n.left||0}),(!t||(t.top===void 0||t.top===null)&&(t.bottom===void 0||t.bottom===null))&&(l==="middle"?u={top:((i||0)-o.height)/2}:u=l==="bottom"?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),vc(vc({},c),u)}function D6e(t){var e=Dt();return k.useEffect(()=>{e(_6e(t))},[e,t]),null}function $6e(t){var e=Dt();return k.useEffect(()=>(e(CQ(t)),()=>{e(CQ({width:0,height:0}))}),[e,t]),null}function L6e(t){var e=ZOe(),n=kge(),r=w6e(),{width:i,height:o,wrapperStyle:a,portal:s}=t,[l,c]=kM([e]),u=Fv(),f=Yv(),d=u-(r.left||0)-(r.right||0),h=lm.getWidthOrHeight(t.layout,o,i,d),m=s?a:vc(vc({position:"absolute",width:(h==null?void 0:h.width)||i||"auto",height:(h==null?void 0:h.height)||o||"auto"},Q6e(a,t,r,u,f,l)),a),g=s??n;if(g==null)return null;var p=P.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:c},P.createElement(D6e,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),P.createElement($6e,{width:l.width,height:l.height}),P.createElement(M6e,qv({},t,h,{margin:r,chartWidth:u,chartHeight:f,contextPayload:e})));return Rr.createPortal(p,g)}let lm=class extends k.PureComponent{static getWidthOrHeight(e,n,r,i){return e==="vertical"&&ue(n)?{height:n}:e==="horizontal"?{width:r||i}:null}render(){return P.createElement(L6e,this.props)}};Wv(lm,"displayName","Legend"),Wv(lm,"defaultProps",{align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"});function Uv(){return Uv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Uv.apply(null,arguments)}function AQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Hv(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?AQ(Object(n),!0).forEach(function(r){I6e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):AQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function I6e(t,e,n){return(e=j6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function j6e(t){var e=N6e(t,"string");return typeof e=="symbol"?e:e+""}function N6e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function R6e(t){return Array.isArray(t)&&mo(t[0])&&mo(t[1])?t.join(" ~ "):t}var B6e=t=>{var{separator:e=" : ",contentStyle:n={},itemStyle:r={},labelStyle:i={},payload:o,formatter:a,itemSorter:s,wrapperClassName:l,labelClassName:c,label:u,labelFormatter:f,accessibilityLayer:d=!1}=t,h=()=>{if(o&&o.length){var y={padding:0,margin:0},x=(s?B1(o,s):o).map((_,E)=>{if(_.type==="none")return null;var A=_.formatter||a||R6e,{value:I,name:Q}=_,D=I,j=Q;if(A){var R=A(I,Q,_,E,o);if(Array.isArray(R))[D,j]=R;else if(R!=null)D=R;else return null}var B=Hv({display:"block",paddingTop:4,paddingBottom:4,color:_.color||"#000"},r);return P.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(E),style:B},mo(j)?P.createElement("span",{className:"recharts-tooltip-item-name"},j):null,mo(j)?P.createElement("span",{className:"recharts-tooltip-item-separator"},e):null,P.createElement("span",{className:"recharts-tooltip-item-value"},D),P.createElement("span",{className:"recharts-tooltip-item-unit"},_.unit||""))});return P.createElement("ul",{className:"recharts-tooltip-item-list",style:y},x)}return null},m=Hv({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},n),g=Hv({margin:0},i),p=!ut(u),O=p?u:"",w=Ye("recharts-default-tooltip",l),v=Ye("recharts-tooltip-label",c);p&&f&&o!==void 0&&o!==null&&(O=f(u,o));var b=d?{role:"status","aria-live":"assertive"}:{};return P.createElement("div",Uv({className:w,style:m},b),P.createElement("p",{className:v,style:g},P.isValidElement(O)?O:"".concat(O)),h())},Nf="recharts-tooltip-wrapper",Z6e={visibility:"hidden"};function z6e(t){var{coordinate:e,translateX:n,translateY:r}=t;return Ye(Nf,{["".concat(Nf,"-right")]:ue(n)&&e&&ue(e.x)&&n>=e.x,["".concat(Nf,"-left")]:ue(n)&&e&&ue(e.x)&&n<e.x,["".concat(Nf,"-bottom")]:ue(r)&&e&&ue(e.y)&&r>=e.y,["".concat(Nf,"-top")]:ue(r)&&e&&ue(e.y)&&r<e.y})}function MQ(t){var{allowEscapeViewBox:e,coordinate:n,key:r,offsetTopLeft:i,position:o,reverseDirection:a,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=t;if(o&&ue(o[r]))return o[r];var u=n[r]-s-(i>0?i:0),f=n[r]+i;if(e[r])return a[r]?u:f;var d=l[r];if(d==null)return 0;if(a[r]){var h=u,m=d;return h<m?Math.max(f,d):Math.max(u,d)}if(c==null)return 0;var g=f+s,p=d+c;return g>p?Math.max(u,d):Math.max(f,d)}function X6e(t){var{translateX:e,translateY:n,useTranslate3d:r}=t;return{transform:r?"translate3d(".concat(e,"px, ").concat(n,"px, 0)"):"translate(".concat(e,"px, ").concat(n,"px)")}}function V6e(t){var{allowEscapeViewBox:e,coordinate:n,offsetTopLeft:r,position:i,reverseDirection:o,tooltipBox:a,useTranslate3d:s,viewBox:l}=t,c,u,f;return a.height>0&&a.width>0&&n?(u=MQ({allowEscapeViewBox:e,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),f=MQ({allowEscapeViewBox:e,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=X6e({translateX:u,translateY:f,useTranslate3d:s})):c=Z6e,{cssProperties:c,cssClasses:z6e({translateX:u,translateY:f,coordinate:n})}}function QQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function cm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?QQ(Object(n),!0).forEach(function(r){Gv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):QQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Gv(t,e,n){return(e=F6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function F6e(t){var e=Y6e(t,"string");return typeof e=="symbol"?e:e+""}function Y6e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class q6e extends k.PureComponent{constructor(){super(...arguments),Gv(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Gv(this,"handleKeyDown",e=>{if(e.key==="Escape"){var n,r,i,o;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(n=(r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==null&&n!==void 0?n:0,y:(i=(o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var e,n;this.state.dismissed&&(((e=this.props.coordinate)===null||e===void 0?void 0:e.x)!==this.state.dismissedAtCoordinate.x||((n=this.props.coordinate)===null||n===void 0?void 0:n.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:e,allowEscapeViewBox:n,animationDuration:r,animationEasing:i,children:o,coordinate:a,hasPayload:s,isAnimationActive:l,offset:c,position:u,reverseDirection:f,useTranslate3d:d,viewBox:h,wrapperStyle:m,lastBoundingBox:g,innerRef:p,hasPortalFromProps:O}=this.props,{cssClasses:w,cssProperties:v}=V6e({allowEscapeViewBox:n,coordinate:a,offsetTopLeft:c,position:u,reverseDirection:f,tooltipBox:{height:g.height,width:g.width},useTranslate3d:d,viewBox:h}),b=O?{}:cm(cm({transition:l&&e?"transform ".concat(r,"ms ").concat(i):void 0},v),{},{pointerEvents:"none",visibility:!this.state.dismissed&&e&&s?"visible":"hidden",position:"absolute",top:0,left:0}),y=cm(cm({},b),{},{visibility:!this.state.dismissed&&e&&s?"visible":"hidden"},m);return P.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:w,style:y,ref:p},o)}}var W6e=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),qa={isSsr:W6e()},DQ=()=>ve(t=>t.rootProps.accessibilityLayer);function An(t){return Number.isFinite(t)}function bc(t){return typeof t=="number"&&t>0&&Number.isFinite(t)}function Kv(){return Kv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Kv.apply(null,arguments)}function $Q(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function LQ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$Q(Object(n),!0).forEach(function(r){U6e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$Q(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function U6e(t,e,n){return(e=H6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function H6e(t){var e=G6e(t,"string");return typeof e=="symbol"?e:e+""}function G6e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var IQ={curveBasisClosed:Vge,curveBasisOpen:Fge,curveBasis:Xge,curveBumpX:Tge,curveBumpY:Age,curveLinearClosed:Yge,curveLinear:E1,curveMonotoneX:qge,curveMonotoneY:Wge,curveNatural:Uge,curveStep:Hge,curveStepAfter:Kge,curveStepBefore:Gge},um=t=>An(t.x)&&An(t.y),Rf=t=>t.x,Bf=t=>t.y,K6e=(t,e)=>{if(typeof t=="function")return t;var n="curve".concat(Mf(t));return(n==="curveMonotone"||n==="curveBump")&&e?IQ["".concat(n).concat(e==="vertical"?"Y":"X")]:IQ[n]||E1},J6e=t=>{var{type:e="linear",points:n=[],baseLine:r,layout:i,connectNulls:o=!1}=t,a=K6e(e,i),s=o?n.filter(um):n,l;if(Array.isArray(r)){var c=o?r.filter(f=>um(f)):r,u=s.map((f,d)=>LQ(LQ({},f),{},{base:c[d]}));return i==="vertical"?l=T1().y(Bf).x1(Rf).x0(f=>f.base.x):l=T1().x(Rf).y1(Bf).y0(f=>f.base.y),l.defined(um).curve(a),l(u)}return i==="vertical"&&ue(r)?l=T1().y(Bf).x1(Rf).x0(r):ue(r)?l=T1().x(Rf).y1(Bf).y0(r):l=EA().x(Rf).y(Bf),l.defined(um).curve(a),l(s)},wc=t=>{var{className:e,points:n,path:r,pathRef:i}=t;if((!n||!n.length)&&!r)return null;var o=n&&n.length?J6e(t):r;return P.createElement("path",Kv({},Re(t,!1),Fy(t),{className:Ye("recharts-curve",e),d:o===null?void 0:o,ref:i}))},eye=["x","y","top","left","width","height","className"];function Jv(){return Jv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Jv.apply(null,arguments)}function jQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function tye(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?jQ(Object(n),!0).forEach(function(r){nye(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function nye(t,e,n){return(e=rye(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rye(t){var e=iye(t,"string");return typeof e=="symbol"?e:e+""}function iye(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function oye(t,e){if(t==null)return{};var n,r,i=aye(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function aye(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var sye=(t,e,n,r,i,o)=>"M".concat(t,",").concat(i,"v").concat(r,"M").concat(o,",").concat(e,"h").concat(n),lye=t=>{var{x:e=0,y:n=0,top:r=0,left:i=0,width:o=0,height:a=0,className:s}=t,l=oye(t,eye),c=tye({x:e,y:n,top:r,left:i,width:o,height:a},l);return!ue(e)||!ue(n)||!ue(o)||!ue(a)||!ue(r)||!ue(i)?null:P.createElement("path",Jv({},Re(c,!0),{className:Ye("recharts-cross",s),d:sye(e,n,o,a,r,i)}))};function cye(t,e,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-i:n.left+.5,y:t==="horizontal"?n.top+.5:e.y-i,width:t==="horizontal"?r:n.width-1,height:t==="horizontal"?n.height-1:r}}function NQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function uye(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?NQ(Object(n),!0).forEach(function(r){fye(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):NQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function fye(t,e,n){return(e=dye(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dye(t){var e=hye(t,"string");return typeof e=="symbol"?e:e+""}function hye(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qr(t,e){var n=uye({},t),r=e,i=Object.keys(e),o=i.reduce((a,s)=>(a[s]===void 0&&r[s]!==void 0&&(a[s]=r[s]),a),n);return o}var RQ={},BQ={},ZQ={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n){if(!n||typeof n!="object")return!1;const r=Object.getPrototypeOf(n);return r===null||r===Object.prototype||Object.getPrototypeOf(r)===null?Object.prototype.toString.call(n)==="[object Object]":!1}t.isPlainObject=e})(ZQ),function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=ZQ,n=Ov,r=I1,i=j1,o=L1;function a(c,u,f){return s(c,u,void 0,void 0,void 0,void 0,f)}function s(c,u,f,d,h,m,g){const p=g(c,u,f,d,h,m);if(p!==void 0)return p;if(typeof c==typeof u)switch(typeof c){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return c===u;case"number":return c===u||Object.is(c,u);case"function":return c===u;case"object":return l(c,u,m,g)}return l(c,u,m,g)}function l(c,u,f,d){if(Object.is(c,u))return!0;let h=r.getTag(c),m=r.getTag(u);if(h===i.argumentsTag&&(h=i.objectTag),m===i.argumentsTag&&(m=i.objectTag),h!==m)return!1;switch(h){case i.stringTag:return c.toString()===u.toString();case i.numberTag:{const O=c.valueOf(),w=u.valueOf();return o.eq(O,w)}case i.booleanTag:case i.dateTag:case i.symbolTag:return Object.is(c.valueOf(),u.valueOf());case i.regexpTag:return c.source===u.source&&c.flags===u.flags;case i.functionTag:return c===u}f=f??new Map;const g=f.get(c),p=f.get(u);if(g!=null&&p!=null)return g===u;f.set(c,u),f.set(u,c);try{switch(h){case i.mapTag:{if(c.size!==u.size)return!1;for(const[O,w]of c.entries())if(!u.has(O)||!s(w,u.get(O),O,c,u,f,d))return!1;return!0}case i.setTag:{if(c.size!==u.size)return!1;const O=Array.from(c.values()),w=Array.from(u.values());for(let v=0;v<O.length;v++){const b=O[v],y=w.findIndex(x=>s(b,x,void 0,c,u,f,d));if(y===-1)return!1;w.splice(y,1)}return!0}case i.arrayTag:case i.uint8ArrayTag:case i.uint8ClampedArrayTag:case i.uint16ArrayTag:case i.uint32ArrayTag:case i.bigUint64ArrayTag:case i.int8ArrayTag:case i.int16ArrayTag:case i.int32ArrayTag:case i.bigInt64ArrayTag:case i.float32ArrayTag:case i.float64ArrayTag:{if(typeof Buffer<"u"&&Buffer.isBuffer(c)!==Buffer.isBuffer(u)||c.length!==u.length)return!1;for(let O=0;O<c.length;O++)if(!s(c[O],u[O],O,c,u,f,d))return!1;return!0}case i.arrayBufferTag:return c.byteLength!==u.byteLength?!1:l(new Uint8Array(c),new Uint8Array(u),f,d);case i.dataViewTag:return c.byteLength!==u.byteLength||c.byteOffset!==u.byteOffset?!1:l(new Uint8Array(c),new Uint8Array(u),f,d);case i.errorTag:return c.name===u.name&&c.message===u.message;case i.objectTag:{if(!(l(c.constructor,u.constructor,f,d)||e.isPlainObject(c)&&e.isPlainObject(u)))return!1;const w=[...Object.keys(c),...n.getSymbols(c)],v=[...Object.keys(u),...n.getSymbols(u)];if(w.length!==v.length)return!1;for(let b=0;b<w.length;b++){const y=w[b],x=c[y];if(!Object.hasOwn(u,y))return!1;const _=u[y];if(!s(x,_,y,c,u,f,d))return!1}return!0}default:return!1}}finally{f.delete(c),f.delete(u)}}t.isEqualWith=a}(BQ);var zQ={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(){}t.noop=e})(zQ),function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=BQ,n=zQ;function r(i,o){return e.isEqualWith(i,o,n.noop)}t.isEqual=r}(RQ);var pye=RQ.isEqual;const mye=Br(pye);function gye(t){var e={},n=()=>null,r=!1,i=null,o=a=>{if(!r){if(Array.isArray(a)){if(!a.length)return;var s=a,[l,...c]=s;if(typeof l=="number"){i=t.setTimeout(o.bind(null,c),l);return}o(l),i=t.setTimeout(o.bind(null,c));return}typeof a=="object"&&(e=a,n(e)),typeof a=="function"&&a()}};return{stop:()=>{r=!0},start:a=>{r=!1,i&&(i(),i=null),o(a)},subscribe:a=>(n=a,()=>{n=()=>null}),getTimeoutController:()=>t}}var fm=1e-4,XQ=(t,e)=>[0,3*t,3*e-6*t,3*t-3*e+1],VQ=(t,e)=>t.map((n,r)=>n*e**r).reduce((n,r)=>n+r),FQ=(t,e)=>n=>{var r=XQ(t,e);return VQ(r,n)},Oye=(t,e)=>n=>{var r=XQ(t,e),i=[...r.map((o,a)=>o*a).slice(1),0];return VQ(i,n)},YQ=function(){for(var e,n,r,i,o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];if(a.length===1)switch(a[0]){case"linear":[e,r,n,i]=[0,0,1,1];break;case"ease":[e,r,n,i]=[.25,.1,.25,1];break;case"ease-in":[e,r,n,i]=[.42,0,1,1];break;case"ease-out":[e,r,n,i]=[.42,0,.58,1];break;case"ease-in-out":[e,r,n,i]=[0,0,.58,1];break;default:{var l=a[0].split("(");l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4&&([e,r,n,i]=l[1].split(")")[0].split(",").map(m=>parseFloat(m)))}}else a.length===4&&([e,r,n,i]=a);var c=FQ(e,n),u=FQ(r,i),f=Oye(e,n),d=m=>m>1?1:m<0?0:m,h=m=>{for(var g=m>1?1:m,p=g,O=0;O<8;++O){var w=c(p)-g,v=f(p);if(Math.abs(w-g)<fm||v<fm)return u(p);p=d(p-w/v)}return u(p)};return h.isStepper=!1,h},yye=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=e,o=(a,s,l)=>{var c=-(a-s)*n,u=l*r,f=l+(c-u)*i/1e3,d=l*i/1e3+a;return Math.abs(d-s)<fm&&Math.abs(f)<fm?[s,0]:[d,f]};return o.isStepper=!0,o.dt=i,o},vye=t=>{if(typeof t=="string")switch(t){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return YQ(t);case"spring":return yye();default:if(t.split("(")[0]==="cubic-bezier")return YQ(t)}return typeof t=="function"?t:null};function qQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function WQ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qQ(Object(n),!0).forEach(function(r){bye(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function bye(t,e,n){return(e=wye(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wye(t){var e=xye(t,"string");return typeof e=="symbol"?e:e+""}function xye(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var _ye=t=>t.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())),Sye=(t,e,n)=>t.map(r=>"".concat(_ye(r)," ").concat(e,"ms ").concat(n)).join(","),kye=(t,e)=>[Object.keys(t),Object.keys(e)].reduce((n,r)=>n.filter(i=>r.includes(i))),Zf=(t,e)=>Object.keys(e).reduce((n,r)=>WQ(WQ({},n),{},{[r]:t(r,e[r])}),{});function UQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Mn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?UQ(Object(n),!0).forEach(function(r){Cye(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):UQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Cye(t,e,n){return(e=Pye(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pye(t){var e=Eye(t,"string");return typeof e=="symbol"?e:e+""}function Eye(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var dm=(t,e,n)=>t+(e-t)*n,e2=t=>{var{from:e,to:n}=t;return e!==n},HQ=(t,e,n)=>{var r=Zf((i,o)=>{if(e2(o)){var[a,s]=t(o.from,o.to,o.velocity);return Mn(Mn({},o),{},{from:a,velocity:s})}return o},e);return n<1?Zf((i,o)=>e2(o)?Mn(Mn({},o),{},{velocity:dm(o.velocity,r[i].velocity,n),from:dm(o.from,r[i].from,n)}):o,e):HQ(t,r,n-1)};function Tye(t,e,n,r,i,o){var a,s=r.reduce((d,h)=>Mn(Mn({},d),{},{[h]:{from:t[h],velocity:0,to:e[h]}}),{}),l=()=>Zf((d,h)=>h.from,s),c=()=>!Object.values(s).filter(e2).length,u=null,f=d=>{a||(a=d);var h=d-a,m=h/n.dt;s=HQ(n,s,m),i(Mn(Mn(Mn({},t),e),l())),a=d,c()||(u=o.setTimeout(f))};return()=>(u=o.setTimeout(f),()=>{u()})}function Aye(t,e,n,r,i,o,a){var s=null,l=i.reduce((f,d)=>Mn(Mn({},f),{},{[d]:[t[d],e[d]]}),{}),c,u=f=>{c||(c=f);var d=(f-c)/r,h=Zf((g,p)=>dm(...p,n(d)),l);if(o(Mn(Mn(Mn({},t),e),h)),d<1)s=a.setTimeout(u);else{var m=Zf((g,p)=>dm(...p,n(1)),l);o(Mn(Mn(Mn({},t),e),m))}};return()=>(s=a.setTimeout(u),()=>{s()})}const Mye=(t,e,n,r,i,o)=>{var a=kye(t,e);return n.isStepper===!0?Tye(t,e,n,a,i,o):Aye(t,e,n,r,a,i,o)};class Qye{setTimeout(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,o=a=>{a-r>=n?e(a):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{cancelAnimationFrame(i)}}}var Dye=["children","begin","duration","attributeName","easing","isActive","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart","animationManager"];function t2(){return t2=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},t2.apply(null,arguments)}function $ye(t,e){if(t==null)return{};var n,r,i=Lye(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Lye(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function GQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Wa(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?GQ(Object(n),!0).forEach(function(r){Us(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):GQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Us(t,e,n){return(e=Iye(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Iye(t){var e=jye(t,"string");return typeof e=="symbol"?e:e+""}function jye(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Nye(){return gye(new Qye)}class n2 extends k.PureComponent{constructor(e,n){super(e,n),Us(this,"mounted",!1),Us(this,"manager",null),Us(this,"stopJSAnimation",null),Us(this,"unSubscribe",null);var{isActive:r,attributeName:i,from:o,to:a,children:s,duration:l,animationManager:c}=this.props;if(this.manager=c,this.handleStyleChange=this.handleStyleChange.bind(this),this.changeStyle=this.changeStyle.bind(this),!r||l<=0){this.state={style:{}},typeof s=="function"&&(this.state={style:a});return}if(o){if(typeof s=="function"){this.state={style:o};return}this.state={style:i?{[i]:o}:o}}else this.state={style:{}}}componentDidMount(){var{isActive:e,canBegin:n}=this.props;this.mounted=!0,!(!e||!n)&&this.runAnimation(this.props)}componentDidUpdate(e){var{isActive:n,canBegin:r,attributeName:i,shouldReAnimate:o,to:a,from:s}=this.props,{style:l}=this.state;if(r){if(!n){var c={style:i?{[i]:a}:a};this.state&&l&&(i&&l[i]!==a||!i&&l!==a)&&this.setState(c);return}if(!(mye(e.to,a)&&e.canBegin&&e.isActive)){var u=!e.canBegin||!e.isActive;this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var f=u||o?s:e.to;if(this.state&&l){var d={style:i?{[i]:f}:f};(i&&l[i]!==f||!i&&l!==f)&&this.setState(d)}this.runAnimation(Wa(Wa({},this.props),{},{from:f,begin:0}))}}}componentWillUnmount(){this.mounted=!1;var{onAnimationEnd:e}=this.props;this.unSubscribe&&this.unSubscribe(),this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}handleStyleChange(e){this.changeStyle(e)}changeStyle(e){this.mounted&&this.setState({style:e})}runJSAnimation(e){var{from:n,to:r,duration:i,easing:o,begin:a,onAnimationEnd:s,onAnimationStart:l}=e,c=Mye(n,r,vye(o),i,this.changeStyle,this.manager.getTimeoutController()),u=()=>{this.stopJSAnimation=c()};this.manager.start([l,a,u,i,s])}runAnimation(e){var{begin:n,duration:r,attributeName:i,to:o,easing:a,onAnimationStart:s,onAnimationEnd:l,children:c}=e;if(this.unSubscribe=this.manager.subscribe(this.handleStyleChange),typeof a=="function"||typeof c=="function"||a==="spring"){this.runJSAnimation(e);return}var u=i?{[i]:o}:o,f=Sye(Object.keys(u),r,a);this.manager.start([s,n,Wa(Wa({},u),{},{transition:f}),r,l])}render(){var e=this.props,{children:n,begin:r,duration:i,attributeName:o,easing:a,isActive:s,from:l,to:c,canBegin:u,onAnimationEnd:f,shouldReAnimate:d,onAnimationReStart:h,animationManager:m}=e,g=$ye(e,Dye),p=k.Children.count(n),O=this.state.style;if(typeof n=="function")return n(O);if(!s||p===0||i<=0)return n;var w=v=>{var{style:b={},className:y}=v.props,x=k.cloneElement(v,Wa(Wa({},g),{},{style:Wa(Wa({},b),O),className:y}));return x};return p===1?w(k.Children.only(n)):P.createElement("div",null,k.Children.map(n,v=>w(v)))}}Us(n2,"displayName","Animate"),Us(n2,"defaultProps",{begin:0,duration:1e3,attributeName:"",easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}});var Rye=k.createContext(null);function Jo(t){var e,n,r=k.useContext(Rye);return P.createElement(n2,t2({},t,{animationManager:(e=(n=t.animationManager)!==null&&n!==void 0?n:r)!==null&&e!==void 0?e:Nye()}))}function hm(){return hm=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},hm.apply(null,arguments)}var KQ=(t,e,n,r,i)=>{var o=Math.min(Math.abs(n)/2,Math.abs(r)/2),a=r>=0?1:-1,s=n>=0?1:-1,l=r>=0&&n>=0||r<0&&n<0?1:0,c;if(o>0&&i instanceof Array){for(var u=[0,0,0,0],f=0,d=4;f<d;f++)u[f]=i[f]>o?o:i[f];c="M".concat(t,",").concat(e+a*u[0]),u[0]>0&&(c+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(l,",").concat(t+s*u[0],",").concat(e)),c+="L ".concat(t+n-s*u[1],",").concat(e),u[1]>0&&(c+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(l,`,
784
+ */var mM;function xOe(){if(mM)return vv;mM=1;var t=k,e=wOe();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,i=e.useSyncExternalStore,o=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;return vv.useSyncExternalStoreWithSelector=function(c,u,f,d,h){var m=o(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function O(x){if(!w){if(w=!0,v=x,x=d(x),h!==void 0&&g.hasValue){var _=g.value;if(h(_,x))return b=_}return b=x}if(_=b,r(v,x))return _;var E=d(x);return h!==void 0&&h(_,E)?(v=x,_):(v=x,b=E)}var w=!1,v,b,y=f===void 0?null:f;return[function(){return O(u())},y===null?void 0:function(){return O(y())}]},[u,f,d,h]);var p=i(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=p},[p]),l(p),p},vv}dM.exports=xOe();var _Oe=dM.exports,xv=k.createContext(null),SOe=t=>t,Dt=()=>{var t=k.useContext(xv);return t?t.store.dispatch:SOe},N1=()=>{},kOe=()=>N1,COe=(t,e)=>t===e;function ve(t){var e=k.useContext(xv);return _Oe.useSyncExternalStoreWithSelector(e?e.subscription.addNestedSub:kOe,e?e.store.getState:N1,e?e.store.getState:N1,e?t:N1,COe)}function POe(t,e=`expected a function, instead received ${typeof t}`){if(typeof t!="function")throw new TypeError(e)}function EOe(t,e=`expected an object, instead received ${typeof t}`){if(typeof t!="object")throw new TypeError(e)}function TOe(t,e="expected all items to be functions, instead received the following types: "){if(!t.every(n=>typeof n=="function")){const n=t.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${e}[${n}]`)}}var gM=t=>Array.isArray(t)?t:[t];function AOe(t){const e=Array.isArray(t[0])?t[0]:t;return TOe(e,"createSelector expects all input-selectors to be functions, but received the following types: "),e}function MOe(t,e){const n=[],{length:r}=t;for(let i=0;i<r;i++)n.push(t[i].apply(null,e));return n}var QOe=class{constructor(t){this.value=t}deref(){return this.value}},DOe=typeof WeakRef<"u"?WeakRef:QOe,$Oe=0,OM=1;function R1(){return{s:$Oe,v:void 0,o:null,p:null}}function yM(t,e={}){let n=R1();const{resultEqualityCheck:r}=e;let i,o=0;function a(){var f;let s=n;const{length:l}=arguments;for(let d=0,h=l;d<h;d++){const m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let g=s.o;g===null&&(s.o=g=new WeakMap);const p=g.get(m);p===void 0?(s=R1(),g.set(m,s)):s=p}else{let g=s.p;g===null&&(s.p=g=new Map);const p=g.get(m);p===void 0?(s=R1(),g.set(m,s)):s=p}}const c=s;let u;if(s.s===OM)u=s.v;else if(u=t.apply(null,arguments),o++,r){const d=((f=i==null?void 0:i.deref)==null?void 0:f.call(i))??i;d!=null&&r(d,u)&&(u=d,o!==0&&o--),i=typeof u=="object"&&u!==null||typeof u=="function"?new DOe(u):u}return c.s=OM,c.v=u,u}return a.clearCache=()=>{n=R1(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function LOe(t,...e){const n=typeof t=="function"?{memoize:t,memoizeOptions:e}:t,r=(...i)=>{let o=0,a=0,s,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),POe(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:f,memoizeOptions:d=[],argsMemoize:h=yM,argsMemoizeOptions:m=[],devModeChecks:g={}}=u,p=gM(d),O=gM(m),w=AOe(i),v=f(function(){return o++,c.apply(null,arguments)},...p),b=h(function(){a++;const x=MOe(w,arguments);return s=v.apply(null,x),s},...O);return Object.assign(b,{resultFunc:c,memoizedResultFunc:v,dependencies:w,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:f,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var Y=LOe(yM),IOe=Object.assign((t,e=Y)=>{EOe(t,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof t}`);const n=Object.keys(t),r=n.map(o=>t[o]);return e(r,(...o)=>o.reduce((a,s,l)=>(a[n[l]]=s,a),{}))},{withTypes:()=>IOe}),vM={},bM={},wM={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,i,o)=>{if(r!==i){const a=e(r),s=e(i);if(a===s&&a===0){if(r<i)return o==="desc"?1:-1;if(r>i)return o==="desc"?-1:1}return o==="desc"?s-a:a-s}return 0};t.compareValues=n})(wM);var xM={},_v={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n){return typeof n=="symbol"||n instanceof Symbol}t.isSymbol=e})(_v),function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=_v,n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,a){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||e.isSymbol(o)?!0:typeof o=="string"&&(r.test(o)||!n.test(o))||a!=null&&Object.hasOwn(a,o)}t.isKey=i}(xM),function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=wM,n=xM,r=_1;function i(o,a,s,l){if(o==null)return[];s=l?void 0:s,Array.isArray(o)||(o=Object.values(o)),Array.isArray(a)||(a=a==null?[null]:[a]),a.length===0&&(a=[null]),Array.isArray(s)||(s=s==null?[]:[s]),s=s.map(h=>String(h));const c=(h,m)=>{let g=h;for(let p=0;p<m.length&&g!=null;++p)g=g[m[p]];return g},u=(h,m)=>m==null||h==null?m:typeof h=="object"&&"key"in h?Object.hasOwn(m,h.key)?m[h.key]:c(m,h.path):typeof h=="function"?h(m):Array.isArray(h)?c(m,h):typeof m=="object"?m[h]:m,f=a.map(h=>(Array.isArray(h)&&h.length===1&&(h=h[0]),h==null||typeof h=="function"||Array.isArray(h)||n.isKey(h)?h:{key:h,path:r.toPath(h)}));return o.map(h=>({original:h,criteria:f.map(m=>u(m,h))})).slice().sort((h,m)=>{for(let g=0;g<f.length;g++){const p=e.compareValues(h.criteria[g],m.criteria[g],s[g]);if(p!==0)return p}return 0}).map(h=>h.original)}t.orderBy=i}(bM);var _M={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n,r=1){const i=[],o=Math.floor(r),a=(s,l)=>{for(let c=0;c<s.length;c++){const u=s[c];Array.isArray(u)&&l<o?a(u,l+1):i.push(u)}};return a(n,0),i}t.flatten=e})(_M);var Sv={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=yv,n=$1,r=hv,i=L1;function o(a,s,l){return r.isObject(l)&&(typeof s=="number"&&n.isArrayLike(l)&&e.isIndex(s)&&s<l.length||typeof s=="string"&&s in l)?i.eq(l[s],a):!1}t.isIterateeCall=o})(Sv),function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=bM,n=_M,r=Sv;function i(o,...a){const s=a.length;return s>1&&r.isIterateeCall(o,a[0],a[1])?a=[]:s>2&&r.isIterateeCall(a[0],a[1],a[2])&&(a=[a[0]]),e.orderBy(o,n.flatten(a),["asc"])}t.sortBy=i}(vM);var jOe=vM.sortBy;const B1=Br(jOe);var SM=t=>t.legend.settings,NOe=t=>t.legend.size,ROe=t=>t.legend.payload,BOe=Y([ROe,SM],(t,e)=>{var{itemSorter:n}=e,r=t.flat(1);return n?B1(r,n):r});function ZOe(){return ve(BOe)}var Z1=1;function kM(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[e,n]=k.useState({height:0,left:0,top:0,width:0}),r=k.useCallback(i=>{if(i!=null){var o=i.getBoundingClientRect(),a={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(a.height-e.height)>Z1||Math.abs(a.left-e.left)>Z1||Math.abs(a.top-e.top)>Z1||Math.abs(a.width-e.width)>Z1)&&n({height:a.height,left:a.left,top:a.top,width:a.width})}},[e.width,e.height,e.top,e.left,...t]);return[e,r]}function Tn(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var zOe=typeof Symbol=="function"&&Symbol.observable||"@@observable",CM=zOe,kv=()=>Math.random().toString(36).substring(7).split("").join("."),XOe={INIT:`@@redux/INIT${kv()}`,REPLACE:`@@redux/REPLACE${kv()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${kv()}`},z1=XOe;function Cv(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function PM(t,e,n){if(typeof t!="function")throw new Error(Tn(2));if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Tn(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Tn(1));return n(PM)(t,e)}let r=t,i=e,o=new Map,a=o,s=0,l=!1;function c(){a===o&&(a=new Map,o.forEach((p,O)=>{a.set(O,p)}))}function u(){if(l)throw new Error(Tn(3));return i}function f(p){if(typeof p!="function")throw new Error(Tn(4));if(l)throw new Error(Tn(5));let O=!0;c();const w=s++;return a.set(w,p),function(){if(O){if(l)throw new Error(Tn(6));O=!1,c(),a.delete(w),o=null}}}function d(p){if(!Cv(p))throw new Error(Tn(7));if(typeof p.type>"u")throw new Error(Tn(8));if(typeof p.type!="string")throw new Error(Tn(17));if(l)throw new Error(Tn(9));try{l=!0,i=r(i,p)}finally{l=!1}return(o=a).forEach(w=>{w()}),p}function h(p){if(typeof p!="function")throw new Error(Tn(10));r=p,d({type:z1.REPLACE})}function m(){const p=f;return{subscribe(O){if(typeof O!="object"||O===null)throw new Error(Tn(11));function w(){const b=O;b.next&&b.next(u())}return w(),{unsubscribe:p(w)}},[CM](){return this}}}return d({type:z1.INIT}),{dispatch:d,subscribe:f,getState:u,replaceReducer:h,[CM]:m}}function VOe(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:z1.INIT})>"u")throw new Error(Tn(12));if(typeof n(void 0,{type:z1.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Tn(13))})}function EM(t){const e=Object.keys(t),n={};for(let o=0;o<e.length;o++){const a=e[o];typeof t[a]=="function"&&(n[a]=t[a])}const r=Object.keys(n);let i;try{VOe(n)}catch(o){i=o}return function(a={},s){if(i)throw i;let l=!1;const c={};for(let u=0;u<r.length;u++){const f=r[u],d=n[f],h=a[f],m=d(h,s);if(typeof m>"u")throw s&&s.type,new Error(Tn(14));c[f]=m,l=l||m!==h}return l=l||r.length!==Object.keys(a).length,l?c:a}}function X1(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...r)=>e(n(...r)))}function FOe(...t){return e=>(n,r)=>{const i=e(n,r);let o=()=>{throw new Error(Tn(15))};const a={getState:i.getState,dispatch:(l,...c)=>o(l,...c)},s=t.map(l=>l(a));return o=X1(...s)(i.dispatch),{...i,dispatch:o}}}function TM(t){return Cv(t)&&"type"in t&&typeof t.type=="string"}var AM=Symbol.for("immer-nothing"),MM=Symbol.for("immer-draftable"),Tr=Symbol.for("immer-state");function Ci(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Oc=Object.getPrototypeOf;function Xs(t){return!!t&&!!t[Tr]}function Uo(t){var e;return t?QM(t)||Array.isArray(t)||!!t[MM]||!!((e=t.constructor)!=null&&e[MM])||Y1(t)||q1(t):!1}var YOe=Object.prototype.constructor.toString();function QM(t){if(!t||typeof t!="object")return!1;const e=Oc(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===YOe}function V1(t,e){F1(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function F1(t){const e=t[Tr];return e?e.type_:Array.isArray(t)?1:Y1(t)?2:q1(t)?3:0}function Pv(t,e){return F1(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function DM(t,e,n){const r=F1(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function qOe(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Y1(t){return t instanceof Map}function q1(t){return t instanceof Set}function Vs(t){return t.copy_||t.base_}function Ev(t,e){if(Y1(t))return new Map(t);if(q1(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=QM(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[Tr];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const a=i[o],s=r[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(r[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[a]})}return Object.create(Oc(t),r)}else{const r=Oc(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function Tv(t,e=!1){return W1(t)||Xs(t)||!Uo(t)||(F1(t)>1&&(t.set=t.add=t.clear=t.delete=WOe),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>Tv(r,!0))),t}function WOe(){Ci(2)}function W1(t){return Object.isFrozen(t)}var UOe={};function Fs(t){const e=UOe[t];return e||Ci(0,t),e}var $f;function $M(){return $f}function HOe(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function LM(t,e){e&&(Fs("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Av(t){Mv(t),t.drafts_.forEach(GOe),t.drafts_=null}function Mv(t){t===$f&&($f=t.parent_)}function IM(t){return $f=HOe($f,t)}function GOe(t){const e=t[Tr];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function jM(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Tr].modified_&&(Av(e),Ci(4)),Uo(t)&&(t=U1(e,t),e.parent_||H1(e,t)),e.patches_&&Fs("Patches").generateReplacementPatches_(n[Tr].base_,t,e.patches_,e.inversePatches_)):t=U1(e,n,[]),Av(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==AM?t:void 0}function U1(t,e,n){if(W1(e))return e;const r=e[Tr];if(!r)return V1(e,(i,o)=>NM(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return H1(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),V1(o,(s,l)=>NM(t,r,i,s,l,n,a)),H1(t,i,!1),n&&t.patches_&&Fs("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function NM(t,e,n,r,i,o,a){if(Xs(i)){const s=o&&e&&e.type_!==3&&!Pv(e.assigned_,r)?o.concat(r):void 0,l=U1(t,i,s);if(DM(n,r,l),Xs(l))t.canAutoFreeze_=!1;else return}else a&&n.add(i);if(Uo(i)&&!W1(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;U1(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&H1(t,i)}}function H1(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Tv(e,n)}function KOe(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:$M(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Qv;n&&(i=[r],o=Lf);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var Qv={get(t,e){if(e===Tr)return t;const n=Vs(t);if(!Pv(n,e))return JOe(t,n,e);const r=n[e];return t.finalized_||!Uo(r)?r:r===Dv(t.base_,e)?(Lv(t),t.copy_[e]=Iv(r,t)):r},has(t,e){return e in Vs(t)},ownKeys(t){return Reflect.ownKeys(Vs(t))},set(t,e,n){const r=RM(Vs(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=Dv(Vs(t),e),o=i==null?void 0:i[Tr];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(qOe(n,i)&&(n!==void 0||Pv(t.base_,e)))return!0;Lv(t),$v(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return Dv(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,Lv(t),$v(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=Vs(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){Ci(11)},getPrototypeOf(t){return Oc(t.base_)},setPrototypeOf(){Ci(12)}},Lf={};V1(Qv,(t,e)=>{Lf[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Lf.deleteProperty=function(t,e){return Lf.set.call(this,t,e,void 0)},Lf.set=function(t,e,n){return Qv.set.call(this,t[0],e,n,t[0])};function Dv(t,e){const n=t[Tr];return(n?Vs(n):t)[e]}function JOe(t,e,n){var i;const r=RM(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function RM(t,e){if(!(e in t))return;let n=Oc(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Oc(n)}}function $v(t){t.modified_||(t.modified_=!0,t.parent_&&$v(t.parent_))}function Lv(t){t.copy_||(t.copy_=Ev(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var e3e=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const o=n;n=e;const a=this;return function(l=o,...c){return a.produce(l,u=>n.call(this,u,...c))}}typeof n!="function"&&Ci(6),r!==void 0&&typeof r!="function"&&Ci(7);let i;if(Uo(e)){const o=IM(this),a=Iv(e,void 0);let s=!0;try{i=n(a),s=!1}finally{s?Av(o):Mv(o)}return LM(o,r),jM(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===AM&&(i=void 0),this.autoFreeze_&&Tv(i,!0),r){const o=[],a=[];Fs("Patches").generateReplacementPatches_(e,i,o,a),r(o,a)}return i}else Ci(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(a,...s)=>this.produceWithPatches(a,l=>e(l,...s));let r,i;return[this.produce(e,n,(a,s)=>{r=a,i=s}),r,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){Uo(t)||Ci(8),Xs(t)&&(t=Ho(t));const e=IM(this),n=Iv(t,void 0);return n[Tr].isManual_=!0,Mv(e),n}finishDraft(t,e){const n=t&&t[Tr];(!n||!n.isManual_)&&Ci(9);const{scope_:r}=n;return LM(r,e),jM(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const i=e[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(e=e.slice(n+1));const r=Fs("Patches").applyPatches_;return Xs(t)?r(t,e):this.produce(t,i=>r(i,e))}};function Iv(t,e){const n=Y1(t)?Fs("MapSet").proxyMap_(t,e):q1(t)?Fs("MapSet").proxySet_(t,e):KOe(t,e);return(e?e.scope_:$M()).drafts_.push(n),n}function Ho(t){return Xs(t)||Ci(10,t),BM(t)}function BM(t){if(!Uo(t)||W1(t))return t;const e=t[Tr];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Ev(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Ev(t,!0);return V1(n,(r,i)=>{DM(n,r,BM(i))}),e&&(e.finalized_=!1),n}var Ar=new e3e,ZM=Ar.produce;Ar.produceWithPatches.bind(Ar),Ar.setAutoFreeze.bind(Ar),Ar.setUseStrictShallowCopy.bind(Ar),Ar.applyPatches.bind(Ar),Ar.createDraft.bind(Ar),Ar.finishDraft.bind(Ar);function MCe(t){return t}function zM(t){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,t):i(o)}var t3e=zM(),n3e=zM,XM={npm_package_exports___require:"./dist/avocado-not-front.umd.js",npm_package_devDependencies__types_node:"20.2.5",npm_package_devDependencies__testing_library_jest_dom:"6.4.0",npm_config_user_agent:"pnpm/9.10.0 npm/? node/v20.17.0 linux x64",CI:"true",npm_package_devDependencies__testing_library_user_event:"14.5.2",npm_package_devDependencies_vite:"5.0.12",npm_node_execpath:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_package_publishConfig_access:"public",npm_package_files_0:"dist",HOME:"/home/runner",npm_package_dependencies_react_select_async_paginate:"0.7.3",npm_package_devDependencies_classnames:"2.3.2",npm_package_devDependencies_sass:"1.62.1",npm_config_auto_install_peers:"true",npm_package_devDependencies_vite_plugin_dts:"3.7.1",npm_package_dependencies__codemirror_lang_yaml:"6.1.2",npm_package_devDependencies_typescript:"5.1.3",npm_package_peerDependencies_react_select_async_paginate:"0.7.3",npm_package_types:"./dist/index.d.ts",npm_package_devDependencies__types_react_dom:"18.0.11",npm_package_dependencies__codemirror_lang_markdown:"6.3.4",npm_package_devDependencies__vitejs_plugin_react_swc:"3.5.0",npm_package_type:"module",npm_package_dependencies_zustand:"4.5.4",npm_package_module:"./dist/avocado-not-front.es.js",npm_package_devDependencies__types_testing_library__jest_dom:"6.0.0",npm_package_dependencies__foris_avocado_icons:"workspace:*",npm_config_registry:"https://registry.npmjs.org/",npm_config_node_linker:"hoisted",npm_package_dependencies__codemirror_lang_json:"6.0.1",npm_package_exports___import:"./dist/avocado-not-front.es.js",npm_package_dependencies__foris_avocado_core:"workspace:*",npm_package_dependencies_axios:"^1.8.4",npm_package_dependencies_recharts:"3.1.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/avocado/avocado/packages/avocado-not-front/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/work/avocado/avocado/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/avocado/avocado/node_modules/.bin:/opt/hostedtoolcache/node/20.17.0/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",TURBO_HASH:"9aeccc82d4b71519",npm_package_name:"@foris/avocado-not-front",npm_package_scripts_start_stubby_examples:"stubby -d src/services/stubs/stubby-examples.yml -w -s 8300 -q",NODE:"/opt/hostedtoolcache/node/20.17.0/x64/bin/node",npm_config_frozen_lockfile:"",npm_config_legacy_peer_deps:"true",LANG:"C.UTF-8",npm_package_dependencies_react_dom:"18.2.0",npm_package_main:"./dist/avocado-not-front.umd.js",npm_lifecycle_script:"tsc && vite build",npm_package_dependencies__uiw_react_codemirror:"4.23.12",SHELL:"/bin/bash",NODE_PATH:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.4.1",npm_package_devDependencies__testing_library_react:"14.2.0",npm_package_devDependencies__types_react:"18.0.28",npm_package_devDependencies_jsdom:"24.0.0",npm_lifecycle_event:"build",npm_package_scripts_build:"tsc && vite build",npm_package_dependencies__codemirror_lang_sql:"6.8.0",npm_package_dependencies__foris_avocado_suite:"workspace:*",npm_package_dependencies_jsonpath:"1.1.1",npm_package_devDependencies__foris_tsconfig:"workspace:*",npm_package_dependencies_react_select:"5.8.0",PWD:"/home/runner/work/avocado/avocado/packages/avocado-not-front",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.10.0/node_modules/pnpm/bin/pnpm.cjs",npm_package_devDependencies_stubby:"^5.1.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/avocado/avocado/packages/avocado-not-front",npm_package_scripts_start_stubby:"stubby -d src/services/stubs/stubby-config.yml -w -s 8200 -q",npm_package_dependencies_react:"18.2.0",npm_package_peerDependencies_react_select:"5.8.0",INIT_CWD:"/home/runner/work/avocado/avocado/packages/avocado-not-front",NODE_ENV:"production"},r3e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?X1:X1.apply(null,arguments)};function si(t,e){function n(...r){if(e){let i=e(...r);if(!i)throw new Error(Mr(0));return{type:t,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:t,payload:r[0]}}return n.toString=()=>`${t}`,n.type=t,n.match=r=>TM(r)&&r.type===t,n}var VM=class bd extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,bd.prototype)}static get[Symbol.species](){return bd}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new bd(...e[0].concat(this)):new bd(...e.concat(this))}};function FM(t){return Uo(t)?ZM(t,()=>{}):t}function G1(t,e,n){return t.has(e)?t.get(e):t.set(e,n(e)).get(e)}function i3e(t){return typeof t=="boolean"}var o3e=()=>function(e){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=e??{};let a=new VM;return n&&(i3e(n)?a.push(t3e):a.push(n3e(n.extraArgument))),a},a3e="RTK_autoBatch",YM=t=>e=>{setTimeout(e,t)},s3e=(t={type:"raf"})=>e=>(...n)=>{const r=e(...n);let i=!0,o=!1,a=!1;const s=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:YM(10):t.type==="callback"?t.queueNotification:YM(t.timeout),c=()=>{a=!1,o&&(o=!1,s.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const f=()=>i&&u(),d=r.subscribe(f);return s.add(u),()=>{d(),s.delete(u)}},dispatch(u){var f;try{return i=!((f=u==null?void 0:u.meta)!=null&&f[a3e]),o=!i,o&&(a||(a=!0,l(c))),r.dispatch(u)}finally{i=!0}}})},l3e=t=>function(n){const{autoBatch:r=!0}=n??{};let i=new VM(t);return r&&i.push(s3e(typeof r=="object"?r:void 0)),i};function c3e(t){const e=o3e(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:a=void 0,enhancers:s=void 0}=t||{};let l;if(typeof n=="function")l=n;else if(Cv(n))l=EM(n);else throw new Error(Mr(1));let c;typeof r=="function"?c=r(e):c=e();let u=X1;i&&(u=r3e({trace:XM.NODE_ENV!=="production",...typeof i=="object"&&i}));const f=FOe(...c),d=l3e(f);let h=typeof s=="function"?s(d):d();const m=u(...h);return PM(l,a,m)}function qM(t){const e={},n=[];let r;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(!s)throw new Error(Mr(28));if(s in e)throw new Error(Mr(29));return e[s]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return t(i),[e,n,r]}function u3e(t){return typeof t=="function"}function f3e(t,e){let[n,r,i]=qM(e),o;if(u3e(t))o=()=>FM(t());else{const s=FM(t);o=()=>s}function a(s=o(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,f)=>{if(f)if(Xs(u)){const h=f(u,l);return h===void 0?u:h}else{if(Uo(u))return ZM(u,d=>f(d,l));{const d=f(u,l);if(d===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return u},s)}return a.getInitialState=o,a}var d3e="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",h3e=(t=21)=>{let e="",n=t;for(;n--;)e+=d3e[Math.random()*64|0];return e},p3e=Symbol.for("rtk-slice-createasyncthunk");function m3e(t,e){return`${t}/${e}`}function g3e({creators:t}={}){var n;const e=(n=t==null?void 0:t.asyncThunk)==null?void 0:n[p3e];return function(i){const{name:o,reducerPath:a=o}=i;if(!o)throw new Error(Mr(11));typeof process<"u"&&XM.NODE_ENV==="development"&&i.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const s=(typeof i.reducers=="function"?i.reducers(y3e()):i.reducers)||{},l=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(b,y){const x=typeof b=="string"?b:b.type;if(!x)throw new Error(Mr(12));if(x in c.sliceCaseReducersByType)throw new Error(Mr(13));return c.sliceCaseReducersByType[x]=y,u},addMatcher(b,y){return c.sliceMatchers.push({matcher:b,reducer:y}),u},exposeAction(b,y){return c.actionCreators[b]=y,u},exposeCaseReducer(b,y){return c.sliceCaseReducersByName[b]=y,u}};l.forEach(b=>{const y=s[b],x={reducerName:b,type:m3e(o,b),createNotation:typeof i.reducers=="function"};b3e(y)?x3e(x,y,u,e):v3e(x,y,u)});function f(){const[b={},y=[],x=void 0]=typeof i.extraReducers=="function"?qM(i.extraReducers):[i.extraReducers],_={...b,...c.sliceCaseReducersByType};return f3e(i.initialState,E=>{for(let A in _)E.addCase(A,_[A]);for(let A of c.sliceMatchers)E.addMatcher(A.matcher,A.reducer);for(let A of y)E.addMatcher(A.matcher,A.reducer);x&&E.addDefaultCase(x)})}const d=b=>b,h=new Map,m=new WeakMap;let g;function p(b,y){return g||(g=f()),g(b,y)}function O(){return g||(g=f()),g.getInitialState()}function w(b,y=!1){function x(E){let A=E[b];return typeof A>"u"&&y&&(A=G1(m,x,O)),A}function _(E=d){const A=G1(h,y,()=>new WeakMap);return G1(A,E,()=>{const I={};for(const[Q,D]of Object.entries(i.selectors??{}))I[Q]=O3e(D,E,()=>G1(m,E,O),y);return I})}return{reducerPath:b,getSelectors:_,get selectors(){return _(x)},selectSlice:x}}const v={name:o,reducer:p,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:O,...w(a),injectInto(b,{reducerPath:y,...x}={}){const _=y??a;return b.inject({reducerPath:_,reducer:p},x),{...v,...w(_,!0)}}};return v}}function O3e(t,e,n,r){function i(o,...a){let s=e(o);return typeof s>"u"&&r&&(s=n()),t(s,...a)}return i.unwrapped=t,i}var li=g3e();function y3e(){function t(e,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...n}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...n){return e(...n)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:n}},asyncThunk:t}}function v3e({type:t,reducerName:e,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!w3e(r))throw new Error(Mr(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,a?si(t,a):si(t))}function b3e(t){return t._reducerDefinitionType==="asyncThunk"}function w3e(t){return t._reducerDefinitionType==="reducerWithPrepare"}function x3e({type:t,reducerName:e},n,r,i){if(!i)throw new Error(Mr(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:l,settled:c,options:u}=n,f=i(t,o,u);r.exposeAction(e,f),a&&r.addCase(f.fulfilled,a),s&&r.addCase(f.pending,s),l&&r.addCase(f.rejected,l),c&&r.addMatcher(f.settled,c),r.exposeCaseReducer(e,{fulfilled:a||K1,pending:s||K1,rejected:l||K1,settled:c||K1})}function K1(){}var _3e="task",WM="listener",UM="completed",jv="cancelled",S3e=`task-${jv}`,k3e=`task-${UM}`,Nv=`${WM}-${jv}`,C3e=`${WM}-${UM}`,J1=class{constructor(t){E5(this,"name","TaskAbortError");E5(this,"message");this.code=t,this.message=`${_3e} ${jv} (reason: ${t})`}},Rv=(t,e)=>{if(typeof t!="function")throw new TypeError(Mr(32))},em=()=>{},HM=(t,e=em)=>(t.catch(e),t),GM=(t,e)=>(t.addEventListener("abort",e,{once:!0}),()=>t.removeEventListener("abort",e)),Ys=(t,e)=>{const n=t.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:e,configurable:!0,writable:!0}),t.abort(e))},qs=t=>{if(t.aborted){const{reason:e}=t;throw new J1(e)}};function KM(t,e){let n=em;return new Promise((r,i)=>{const o=()=>i(new J1(t.reason));if(t.aborted){o();return}n=GM(t,o),e.finally(()=>n()).then(r,i)}).finally(()=>{n=em})}var P3e=async(t,e)=>{try{return await Promise.resolve(),{status:"ok",value:await t()}}catch(n){return{status:n instanceof J1?"cancelled":"rejected",error:n}}finally{e==null||e()}},tm=t=>e=>HM(KM(t,e).then(n=>(qs(t),n))),JM=t=>{const e=tm(t);return n=>e(new Promise(r=>setTimeout(r,n)))},{assign:yc}=Object,eQ={},nm="listenerMiddleware",E3e=(t,e)=>{const n=r=>GM(t,()=>Ys(r,t.reason));return(r,i)=>{Rv(r);const o=new AbortController;n(o);const a=P3e(async()=>{qs(t),qs(o.signal);const s=await r({pause:tm(o.signal),delay:JM(o.signal),signal:o.signal});return qs(o.signal),s},()=>Ys(o,k3e));return i!=null&&i.autoJoin&&e.push(a.catch(em)),{result:tm(t)(a),cancel(){Ys(o,S3e)}}}},T3e=(t,e)=>{const n=async(r,i)=>{qs(e);let o=()=>{};const s=[new Promise((l,c)=>{let u=t({predicate:r,effect:(f,d)=>{d.unsubscribe(),l([f,d.getState(),d.getOriginalState()])}});o=()=>{u(),c()}})];i!=null&&s.push(new Promise(l=>setTimeout(l,i,null)));try{const l=await KM(e,Promise.race(s));return qs(e),l}finally{o()}};return(r,i)=>HM(n(r,i))},tQ=t=>{let{type:e,actionCreator:n,matcher:r,predicate:i,effect:o}=t;if(e)i=si(e).match;else if(n)e=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(Mr(21));return Rv(o),{predicate:i,type:e,effect:o}},nQ=yc(t=>{const{type:e,predicate:n,effect:r}=tQ(t);return{id:h3e(),effect:r,type:e,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Mr(22))}}},{withTypes:()=>nQ}),rQ=(t,e)=>{const{type:n,effect:r,predicate:i}=tQ(e);return Array.from(t.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},Bv=t=>{t.pending.forEach(e=>{Ys(e,Nv)})},A3e=t=>()=>{t.forEach(Bv),t.clear()},iQ=(t,e,n)=>{try{t(e,n)}catch(r){setTimeout(()=>{throw r},0)}},oQ=yc(si(`${nm}/add`),{withTypes:()=>oQ}),M3e=si(`${nm}/removeAll`),aQ=yc(si(`${nm}/remove`),{withTypes:()=>aQ}),Q3e=(...t)=>{console.error(`${nm}/error`,...t)},If=(t={})=>{const e=new Map,{extra:n,onError:r=Q3e}=t;Rv(r);const i=u=>(u.unsubscribe=()=>e.delete(u.id),e.set(u.id,u),f=>{u.unsubscribe(),f!=null&&f.cancelActive&&Bv(u)}),o=u=>{const f=rQ(e,u)??nQ(u);return i(f)};yc(o,{withTypes:()=>o});const a=u=>{const f=rQ(e,u);return f&&(f.unsubscribe(),u.cancelActive&&Bv(f)),!!f};yc(a,{withTypes:()=>a});const s=async(u,f,d,h)=>{const m=new AbortController,g=T3e(o,m.signal),p=[];try{u.pending.add(m),await Promise.resolve(u.effect(f,yc({},d,{getOriginalState:h,condition:(O,w)=>g(O,w).then(Boolean),take:g,delay:JM(m.signal),pause:tm(m.signal),extra:n,signal:m.signal,fork:E3e(m.signal,p),unsubscribe:u.unsubscribe,subscribe:()=>{e.set(u.id,u)},cancelActiveListeners:()=>{u.pending.forEach((O,w,v)=>{O!==m&&(Ys(O,Nv),v.delete(O))})},cancel:()=>{Ys(m,Nv),u.pending.delete(m)},throwIfCancelled:()=>{qs(m.signal)}})))}catch(O){O instanceof J1||iQ(r,O,{raisedBy:"effect"})}finally{await Promise.all(p),Ys(m,C3e),u.pending.delete(m)}},l=A3e(e);return{middleware:u=>f=>d=>{if(!TM(d))return f(d);if(oQ.match(d))return o(d.payload);if(M3e.match(d)){l();return}if(aQ.match(d))return a(d.payload);let h=u.getState();const m=()=>{if(h===eQ)throw new Error(Mr(23));return h};let g;try{if(g=f(d),e.size>0){const p=u.getState(),O=Array.from(e.values());for(const w of O){let v=!1;try{v=w.predicate(d,p,h)}catch(b){v=!1,iQ(r,b,{raisedBy:"predicate"})}v&&s(w,d,u,m)}}}finally{h=eQ}return g},startListening:o,stopListening:a,clearListeners:l}};function Mr(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var D3e={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},sQ=li({name:"chartLayout",initialState:D3e,reducers:{setLayout(t,e){t.layoutType=e.payload},setChartSize(t,e){t.width=e.payload.width,t.height=e.payload.height},setMargin(t,e){t.margin.top=e.payload.top,t.margin.right=e.payload.right,t.margin.bottom=e.payload.bottom,t.margin.left=e.payload.left},setScale(t,e){t.scale=e.payload}}}),{setMargin:$3e,setLayout:L3e,setChartSize:I3e,setScale:j3e}=sQ.actions,N3e=sQ.reducer;function lQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function cQ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?lQ(Object(n),!0).forEach(function(r){R3e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function R3e(t,e,n){return(e=B3e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B3e(t){var e=Z3e(t,"string");return typeof e=="symbol"?e:e+""}function Z3e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var rm=Math.PI/180,z3e=t=>t*180/Math.PI,tn=(t,e,n,r)=>({x:t+Math.cos(-rm*r)*n,y:e+Math.sin(-rm*r)*n}),uQ=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(e-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},X3e=(t,e)=>{var{x:n,y:r}=t,{x:i,y:o}=e;return Math.sqrt((n-i)**2+(r-o)**2)},V3e=(t,e)=>{var{x:n,y:r}=t,{cx:i,cy:o}=e,a=X3e({x:n,y:r},{x:i,y:o});if(a<=0)return{radius:a,angle:0};var s=(n-i)/a,l=Math.acos(s);return r>o&&(l=2*Math.PI-l),{radius:a,angle:z3e(l),angleInRadian:l}},F3e=t=>{var{startAngle:e,endAngle:n}=t,r=Math.floor(e/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:e-o*360,endAngle:n-o*360}},Y3e=(t,e)=>{var{startAngle:n,endAngle:r}=e,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return t+a*360},q3e=(t,e)=>{var{x:n,y:r}=t,{radius:i,angle:o}=V3e({x:n,y:r},e),{innerRadius:a,outerRadius:s}=e;if(i<a||i>s||i===0)return null;var{startAngle:l,endAngle:c}=F3e(e),u=o,f;if(l<=c){for(;u>c;)u-=360;for(;u<l;)u+=360;f=u>=l&&u<=c}else{for(;u>l;)u-=360;for(;u<c;)u+=360;f=u>=c&&u<=l}return f?cQ(cQ({},e),{},{radius:i,angle:Y3e(u,e)}):null};function fQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ci(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fQ(Object(n),!0).forEach(function(r){W3e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function W3e(t,e,n){return(e=U3e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function U3e(t){var e=H3e(t,"string");return typeof e=="symbol"?e:e+""}function H3e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function vt(t,e,n){return ut(t)||ut(e)?n:mo(e)?Xa(t,e,n):typeof e=="function"?e(t):n}var G3e=(t,e,n,r,i)=>{var o,a=-1,s=(o=e==null?void 0:e.length)!==null&&o!==void 0?o:0;if(s<=1||t==null)return 0;if(r==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var l=0;l<s;l++){var c=l>0?n[l-1].coordinate:n[s-1].coordinate,u=n[l].coordinate,f=l>=s-1?n[0].coordinate:n[l+1].coordinate,d=void 0;if(On(u-c)!==On(f-u)){var h=[];if(On(f-u)===On(i[1]-i[0])){d=f;var m=u+i[1]-i[0];h[0]=Math.min(m,(m+c)/2),h[1]=Math.max(m,(m+c)/2)}else{d=c;var g=f+i[1]-i[0];h[0]=Math.min(u,(g+u)/2),h[1]=Math.max(u,(g+u)/2)}var p=[Math.min(u,(d+u)/2),Math.max(u,(d+u)/2)];if(t>p[0]&&t<=p[1]||t>=h[0]&&t<=h[1]){({index:a}=n[l]);break}}else{var O=Math.min(c,f),w=Math.max(c,f);if(t>(O+u)/2&&t<=(w+u)/2){({index:a}=n[l]);break}}}else if(e){for(var v=0;v<s;v++)if(v===0&&t<=(e[v].coordinate+e[v+1].coordinate)/2||v>0&&v<s-1&&t>(e[v].coordinate+e[v-1].coordinate)/2&&t<=(e[v].coordinate+e[v+1].coordinate)/2||v===s-1&&t>(e[v].coordinate+e[v-1].coordinate)/2){({index:a}=e[v]);break}}return a},K3e=(t,e,n)=>{if(e&&n){var{width:r,height:i}=n,{align:o,verticalAlign:a,layout:s}=e;if((s==="vertical"||s==="horizontal"&&a==="middle")&&o!=="center"&&ue(t[o]))return ci(ci({},t),{},{[o]:t[o]+(r||0)});if((s==="horizontal"||s==="vertical"&&o==="center")&&a!=="middle"&&ue(t[a]))return ci(ci({},t),{},{[a]:t[a]+(i||0)})}return t},go=(t,e)=>t==="horizontal"&&e==="xAxis"||t==="vertical"&&e==="yAxis"||t==="centric"&&e==="angleAxis"||t==="radial"&&e==="radiusAxis",dQ=(t,e,n,r)=>{if(r)return t.map(s=>s.coordinate);var i,o,a=t.map(s=>(s.coordinate===e&&(i=!0),s.coordinate===n&&(o=!0),s.coordinate));return i||a.push(e),o||a.push(n),a},hQ=(t,e,n)=>{if(!t)return null;var{duplicateDomain:r,type:i,range:o,scale:a,realScaleType:s,isCategorical:l,categoricalDomain:c,tickCount:u,ticks:f,niceTicks:d,axisType:h}=t;if(!a)return null;var m=s==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,g=i==="category"&&a.bandwidth?a.bandwidth()/m:0;if(g=h==="angleAxis"&&o&&o.length>=2?On(o[0]-o[1])*2*g:g,f||d){var p=(f||d||[]).map((O,w)=>{var v=r?r.indexOf(O):O;return{coordinate:a(v)+g,value:O,offset:g,index:w}});return p.filter(O=>!ur(O.coordinate))}return l&&c?c.map((O,w)=>({coordinate:a(O)+g,value:O,index:w,offset:g})):a.ticks&&!n&&u!=null?a.ticks(u).map((O,w)=>({coordinate:a(O)+g,value:O,offset:g,index:w})):a.domain().map((O,w)=>({coordinate:a(O)+g,value:r?r[O]:O,index:w,offset:g}))},pQ=1e-4,J3e=t=>{var e=t.domain();if(!(!e||e.length<=2)){var n=e.length,r=t.range(),i=Math.min(r[0],r[1])-pQ,o=Math.max(r[0],r[1])+pQ,a=t(e[0]),s=t(e[n-1]);(a<i||a>o||s<i||s>o)&&t.domain([e[0],e[n-1]])}},e6e=(t,e)=>{if(!e||e.length!==2||!ue(e[0])||!ue(e[1]))return t;var n=Math.min(e[0],e[1]),r=Math.max(e[0],e[1]),i=[t[0],t[1]];return(!ue(t[0])||t[0]<n)&&(i[0]=n),(!ue(t[1])||t[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},t6e=t=>{var e=t.length;if(!(e<=0))for(var n=0,r=t[0].length;n<r;++n)for(var i=0,o=0,a=0;a<e;++a){var s=ur(t[a][n][1])?t[a][n][0]:t[a][n][1];s>=0?(t[a][n][0]=i,t[a][n][1]=i+s,i=t[a][n][1]):(t[a][n][0]=o,t[a][n][1]=o+s,o=t[a][n][1])}},n6e=t=>{var e=t.length;if(!(e<=0))for(var n=0,r=t[0].length;n<r;++n)for(var i=0,o=0;o<e;++o){var a=ur(t[o][n][1])?t[o][n][0]:t[o][n][1];a>=0?(t[o][n][0]=i,t[o][n][1]=i+a,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},r6e={sign:t6e,expand:nOe,none:gc,silhouette:rOe,wiggle:iOe,positive:n6e},i6e=(t,e,n)=>{var r=r6e[n],i=tOe().keys(e).value((o,a)=>+vt(o,a,0)).order(iv).offset(r);return i(t)};function Zv(t){return t==null?void 0:String(t)}function im(t){var{axis:e,ticks:n,bandSize:r,entry:i,index:o,dataKey:a}=t;if(e.type==="category"){if(!e.allowDuplicatedCategory&&e.dataKey&&!ut(i[e.dataKey])){var s=OA(n,"value",i[e.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var l=vt(i,ut(a)?e.dataKey:a);return ut(l)?null:e.scale(l)}var mQ=t=>{var{axis:e,ticks:n,offset:r,bandSize:i,entry:o,index:a}=t;if(e.type==="category")return n[a]?n[a].coordinate+r:null;var s=vt(o,e.dataKey,e.scale.domain()[a]);return ut(s)?null:e.scale(s)-i/2+r},o6e=t=>{var{numericAxis:e}=t,n=e.scale.domain();if(e.type==="number"){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},a6e=t=>{var e=t.flat(2).filter(ue);return[Math.min(...e),Math.max(...e)]},s6e=t=>[t[0]===1/0?0:t[0],t[1]===-1/0?0:t[1]],l6e=(t,e,n)=>{if(t!=null)return s6e(Object.keys(t).reduce((r,i)=>{var o=t[i],{stackedData:a}=o,s=a.reduce((l,c)=>{var u=a6e(c.slice(e,n+1));return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},gQ=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,OQ=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ws=(t,e,n)=>{if(t&&t.scale&&t.scale.bandwidth){var r=t.scale.bandwidth();if(!n||r>0)return r}if(t&&e&&e.length>=2){for(var i=B1(e,u=>u.coordinate),o=1/0,a=1,s=i.length;a<s;a++){var l=i[a],c=i[a-1];o=Math.min((l.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0};function yQ(t){var{tooltipEntrySettings:e,dataKey:n,payload:r,value:i,name:o}=t;return ci(ci({},e),{},{dataKey:n,payload:r,value:i,name:o})}function Fa(t,e){if(t)return String(t);if(typeof e=="string")return e}function c6e(t,e,n,r,i){if(n==="horizontal"||n==="vertical"){var o=t>=i.left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height;return o?{x:t,y:e}:null}return r?q3e({x:t,y:e},r):null}var u6e=(t,e,n,r)=>{var i=e.find(c=>c&&c.index===n);if(i){if(t==="horizontal")return{x:i.coordinate,y:r.y};if(t==="vertical")return{x:r.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,{radius:a}=r;return ci(ci(ci({},r),tn(r.cx,r.cy,a,o)),{},{angle:o,radius:a})}var s=i.coordinate,{angle:l}=r;return ci(ci(ci({},r),tn(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return{x:0,y:0}},f6e=(t,e)=>e==="horizontal"?t.x:e==="vertical"?t.y:e==="centric"?t.angle:t.radius,Go=t=>t.layout.width,Ko=t=>t.layout.height,d6e=t=>t.layout.scale,vQ=t=>t.layout.margin,zv=Y(t=>t.cartesianAxis.xAxis,t=>Object.values(t)),Xv=Y(t=>t.cartesianAxis.yAxis,t=>Object.values(t)),bQ="data-recharts-item-index",wQ="data-recharts-item-data-key",om=60;function xQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ya(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xQ(Object(n),!0).forEach(function(r){h6e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function h6e(t,e,n){return(e=p6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p6e(t){var e=m6e(t,"string");return typeof e=="symbol"?e:e+""}function m6e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var g6e=t=>t.brush.height,ln=Y([Go,Ko,vQ,g6e,zv,Xv,SM,NOe],(t,e,n,r,i,o,a,s)=>{var l=o.reduce((m,g)=>{var{orientation:p}=g;if(!g.mirror&&!g.hide){var O=typeof g.width=="number"?g.width:om;return Ya(Ya({},m),{},{[p]:m[p]+O})}return m},{left:n.left||0,right:n.right||0}),c=i.reduce((m,g)=>{var{orientation:p}=g;return!g.mirror&&!g.hide?Ya(Ya({},m),{},{[p]:Xa(m,"".concat(p))+g.height}):m},{top:n.top||0,bottom:n.bottom||0}),u=Ya(Ya({},c),l),f=u.bottom;u.bottom+=r,u=K3e(u,a,s);var d=t-u.left-u.right,h=e-u.top-u.bottom;return Ya(Ya({brushBottom:f},u),{},{width:Math.max(d,0),height:Math.max(h,0)})}),O6e=Y(ln,t=>({x:t.left,y:t.top,width:t.width,height:t.height})),_Q=Y(Go,Ko,(t,e)=>({x:0,y:0,width:t,height:e})),y6e=k.createContext(null),Bn=()=>k.useContext(y6e)!=null,am=t=>t.brush,sm=Y([am,ln,vQ],(t,e,n)=>({height:t.height,x:ue(t.x)?t.x:e.left,y:ue(t.y)?t.y:e.top+e.height+e.brushBottom-((n==null?void 0:n.bottom)||0),width:ue(t.width)?t.width:e.width})),Vv=()=>{var t,e=Bn(),n=ve(O6e),r=ve(sm),i=(t=ve(am))===null||t===void 0?void 0:t.padding;return!e||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},v6e={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},SQ=()=>{var t;return(t=ve(ln))!==null&&t!==void 0?t:v6e},Fv=()=>ve(Go),Yv=()=>ve(Ko),b6e={top:0,right:0,bottom:0,left:0},w6e=()=>{var t;return(t=ve(e=>e.layout.margin))!==null&&t!==void 0?t:b6e},qe=t=>t.layout.layoutType,jf=()=>ve(qe),x6e={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},kQ=li({name:"legend",initialState:x6e,reducers:{setLegendSize(t,e){t.size.width=e.payload.width,t.size.height=e.payload.height},setLegendSettings(t,e){t.settings.align=e.payload.align,t.settings.layout=e.payload.layout,t.settings.verticalAlign=e.payload.verticalAlign,t.settings.itemSorter=e.payload.itemSorter},addLegendPayload(t,e){t.payload.push(e.payload)},removeLegendPayload(t,e){var n=Ho(t).payload.indexOf(e.payload);n>-1&&t.payload.splice(n,1)}}}),{setLegendSize:CQ,setLegendSettings:_6e,addLegendPayload:PQ,removeLegendPayload:EQ}=kQ.actions,S6e=kQ.reducer,k6e=["contextPayload"];function qv(){return qv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},qv.apply(null,arguments)}function TQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function vc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?TQ(Object(n),!0).forEach(function(r){Wv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):TQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Wv(t,e,n){return(e=C6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C6e(t){var e=P6e(t,"string");return typeof e=="symbol"?e:e+""}function P6e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function E6e(t,e){if(t==null)return{};var n,r,i=T6e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function T6e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function A6e(t){return t.value}function M6e(t){var{contextPayload:e}=t,n=E6e(t,k6e),r=fM(e,t.payloadUniqBy,A6e),i=vc(vc({},n),{},{payload:r});return P.isValidElement(t.content)?P.cloneElement(t.content,i):typeof t.content=="function"?P.createElement(t.content,i):P.createElement(cv,i)}function Q6e(t,e,n,r,i,o){var{layout:a,align:s,verticalAlign:l}=e,c,u;return(!t||(t.left===void 0||t.left===null)&&(t.right===void 0||t.right===null))&&(s==="center"&&a==="vertical"?c={left:((r||0)-o.width)/2}:c=s==="right"?{right:n&&n.right||0}:{left:n&&n.left||0}),(!t||(t.top===void 0||t.top===null)&&(t.bottom===void 0||t.bottom===null))&&(l==="middle"?u={top:((i||0)-o.height)/2}:u=l==="bottom"?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),vc(vc({},c),u)}function D6e(t){var e=Dt();return k.useEffect(()=>{e(_6e(t))},[e,t]),null}function $6e(t){var e=Dt();return k.useEffect(()=>(e(CQ(t)),()=>{e(CQ({width:0,height:0}))}),[e,t]),null}function L6e(t){var e=ZOe(),n=kge(),r=w6e(),{width:i,height:o,wrapperStyle:a,portal:s}=t,[l,c]=kM([e]),u=Fv(),f=Yv(),d=u-(r.left||0)-(r.right||0),h=lm.getWidthOrHeight(t.layout,o,i,d),m=s?a:vc(vc({position:"absolute",width:(h==null?void 0:h.width)||i||"auto",height:(h==null?void 0:h.height)||o||"auto"},Q6e(a,t,r,u,f,l)),a),g=s??n;if(g==null)return null;var p=P.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:c},P.createElement(D6e,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),P.createElement($6e,{width:l.width,height:l.height}),P.createElement(M6e,qv({},t,h,{margin:r,chartWidth:u,chartHeight:f,contextPayload:e})));return Rr.createPortal(p,g)}let lm=class extends k.PureComponent{static getWidthOrHeight(e,n,r,i){return e==="vertical"&&ue(n)?{height:n}:e==="horizontal"?{width:r||i}:null}render(){return P.createElement(L6e,this.props)}};Wv(lm,"displayName","Legend"),Wv(lm,"defaultProps",{align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"});function Uv(){return Uv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Uv.apply(null,arguments)}function AQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Hv(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?AQ(Object(n),!0).forEach(function(r){I6e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):AQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function I6e(t,e,n){return(e=j6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function j6e(t){var e=N6e(t,"string");return typeof e=="symbol"?e:e+""}function N6e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function R6e(t){return Array.isArray(t)&&mo(t[0])&&mo(t[1])?t.join(" ~ "):t}var B6e=t=>{var{separator:e=" : ",contentStyle:n={},itemStyle:r={},labelStyle:i={},payload:o,formatter:a,itemSorter:s,wrapperClassName:l,labelClassName:c,label:u,labelFormatter:f,accessibilityLayer:d=!1}=t,h=()=>{if(o&&o.length){var y={padding:0,margin:0},x=(s?B1(o,s):o).map((_,E)=>{if(_.type==="none")return null;var A=_.formatter||a||R6e,{value:I,name:Q}=_,D=I,j=Q;if(A){var R=A(I,Q,_,E,o);if(Array.isArray(R))[D,j]=R;else if(R!=null)D=R;else return null}var B=Hv({display:"block",paddingTop:4,paddingBottom:4,color:_.color||"#000"},r);return P.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(E),style:B},mo(j)?P.createElement("span",{className:"recharts-tooltip-item-name"},j):null,mo(j)?P.createElement("span",{className:"recharts-tooltip-item-separator"},e):null,P.createElement("span",{className:"recharts-tooltip-item-value"},D),P.createElement("span",{className:"recharts-tooltip-item-unit"},_.unit||""))});return P.createElement("ul",{className:"recharts-tooltip-item-list",style:y},x)}return null},m=Hv({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},n),g=Hv({margin:0},i),p=!ut(u),O=p?u:"",w=Ye("recharts-default-tooltip",l),v=Ye("recharts-tooltip-label",c);p&&f&&o!==void 0&&o!==null&&(O=f(u,o));var b=d?{role:"status","aria-live":"assertive"}:{};return P.createElement("div",Uv({className:w,style:m},b),P.createElement("p",{className:v,style:g},P.isValidElement(O)?O:"".concat(O)),h())},Nf="recharts-tooltip-wrapper",Z6e={visibility:"hidden"};function z6e(t){var{coordinate:e,translateX:n,translateY:r}=t;return Ye(Nf,{["".concat(Nf,"-right")]:ue(n)&&e&&ue(e.x)&&n>=e.x,["".concat(Nf,"-left")]:ue(n)&&e&&ue(e.x)&&n<e.x,["".concat(Nf,"-bottom")]:ue(r)&&e&&ue(e.y)&&r>=e.y,["".concat(Nf,"-top")]:ue(r)&&e&&ue(e.y)&&r<e.y})}function MQ(t){var{allowEscapeViewBox:e,coordinate:n,key:r,offsetTopLeft:i,position:o,reverseDirection:a,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=t;if(o&&ue(o[r]))return o[r];var u=n[r]-s-(i>0?i:0),f=n[r]+i;if(e[r])return a[r]?u:f;var d=l[r];if(d==null)return 0;if(a[r]){var h=u,m=d;return h<m?Math.max(f,d):Math.max(u,d)}if(c==null)return 0;var g=f+s,p=d+c;return g>p?Math.max(u,d):Math.max(f,d)}function X6e(t){var{translateX:e,translateY:n,useTranslate3d:r}=t;return{transform:r?"translate3d(".concat(e,"px, ").concat(n,"px, 0)"):"translate(".concat(e,"px, ").concat(n,"px)")}}function V6e(t){var{allowEscapeViewBox:e,coordinate:n,offsetTopLeft:r,position:i,reverseDirection:o,tooltipBox:a,useTranslate3d:s,viewBox:l}=t,c,u,f;return a.height>0&&a.width>0&&n?(u=MQ({allowEscapeViewBox:e,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),f=MQ({allowEscapeViewBox:e,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=X6e({translateX:u,translateY:f,useTranslate3d:s})):c=Z6e,{cssProperties:c,cssClasses:z6e({translateX:u,translateY:f,coordinate:n})}}function QQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function cm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?QQ(Object(n),!0).forEach(function(r){Gv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):QQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Gv(t,e,n){return(e=F6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function F6e(t){var e=Y6e(t,"string");return typeof e=="symbol"?e:e+""}function Y6e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class q6e extends k.PureComponent{constructor(){super(...arguments),Gv(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Gv(this,"handleKeyDown",e=>{if(e.key==="Escape"){var n,r,i,o;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(n=(r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==null&&n!==void 0?n:0,y:(i=(o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var e,n;this.state.dismissed&&(((e=this.props.coordinate)===null||e===void 0?void 0:e.x)!==this.state.dismissedAtCoordinate.x||((n=this.props.coordinate)===null||n===void 0?void 0:n.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:e,allowEscapeViewBox:n,animationDuration:r,animationEasing:i,children:o,coordinate:a,hasPayload:s,isAnimationActive:l,offset:c,position:u,reverseDirection:f,useTranslate3d:d,viewBox:h,wrapperStyle:m,lastBoundingBox:g,innerRef:p,hasPortalFromProps:O}=this.props,{cssClasses:w,cssProperties:v}=V6e({allowEscapeViewBox:n,coordinate:a,offsetTopLeft:c,position:u,reverseDirection:f,tooltipBox:{height:g.height,width:g.width},useTranslate3d:d,viewBox:h}),b=O?{}:cm(cm({transition:l&&e?"transform ".concat(r,"ms ").concat(i):void 0},v),{},{pointerEvents:"none",visibility:!this.state.dismissed&&e&&s?"visible":"hidden",position:"absolute",top:0,left:0}),y=cm(cm({},b),{},{visibility:!this.state.dismissed&&e&&s?"visible":"hidden"},m);return P.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:w,style:y,ref:p},o)}}var W6e=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),qa={isSsr:W6e()},DQ=()=>ve(t=>t.rootProps.accessibilityLayer);function An(t){return Number.isFinite(t)}function bc(t){return typeof t=="number"&&t>0&&Number.isFinite(t)}function Kv(){return Kv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Kv.apply(null,arguments)}function $Q(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function LQ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$Q(Object(n),!0).forEach(function(r){U6e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$Q(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function U6e(t,e,n){return(e=H6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function H6e(t){var e=G6e(t,"string");return typeof e=="symbol"?e:e+""}function G6e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var IQ={curveBasisClosed:Vge,curveBasisOpen:Fge,curveBasis:Xge,curveBumpX:Tge,curveBumpY:Age,curveLinearClosed:Yge,curveLinear:E1,curveMonotoneX:qge,curveMonotoneY:Wge,curveNatural:Uge,curveStep:Hge,curveStepAfter:Kge,curveStepBefore:Gge},um=t=>An(t.x)&&An(t.y),Rf=t=>t.x,Bf=t=>t.y,K6e=(t,e)=>{if(typeof t=="function")return t;var n="curve".concat(Mf(t));return(n==="curveMonotone"||n==="curveBump")&&e?IQ["".concat(n).concat(e==="vertical"?"Y":"X")]:IQ[n]||E1},J6e=t=>{var{type:e="linear",points:n=[],baseLine:r,layout:i,connectNulls:o=!1}=t,a=K6e(e,i),s=o?n.filter(um):n,l;if(Array.isArray(r)){var c=o?r.filter(f=>um(f)):r,u=s.map((f,d)=>LQ(LQ({},f),{},{base:c[d]}));return i==="vertical"?l=T1().y(Bf).x1(Rf).x0(f=>f.base.x):l=T1().x(Rf).y1(Bf).y0(f=>f.base.y),l.defined(um).curve(a),l(u)}return i==="vertical"&&ue(r)?l=T1().y(Bf).x1(Rf).x0(r):ue(r)?l=T1().x(Rf).y1(Bf).y0(r):l=EA().x(Rf).y(Bf),l.defined(um).curve(a),l(s)},wc=t=>{var{className:e,points:n,path:r,pathRef:i}=t;if((!n||!n.length)&&!r)return null;var o=n&&n.length?J6e(t):r;return P.createElement("path",Kv({},Re(t,!1),Fy(t),{className:Ye("recharts-curve",e),d:o===null?void 0:o,ref:i}))},eye=["x","y","top","left","width","height","className"];function Jv(){return Jv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Jv.apply(null,arguments)}function jQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function tye(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?jQ(Object(n),!0).forEach(function(r){nye(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function nye(t,e,n){return(e=rye(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rye(t){var e=iye(t,"string");return typeof e=="symbol"?e:e+""}function iye(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function oye(t,e){if(t==null)return{};var n,r,i=aye(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function aye(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var sye=(t,e,n,r,i,o)=>"M".concat(t,",").concat(i,"v").concat(r,"M").concat(o,",").concat(e,"h").concat(n),lye=t=>{var{x:e=0,y:n=0,top:r=0,left:i=0,width:o=0,height:a=0,className:s}=t,l=oye(t,eye),c=tye({x:e,y:n,top:r,left:i,width:o,height:a},l);return!ue(e)||!ue(n)||!ue(o)||!ue(a)||!ue(r)||!ue(i)?null:P.createElement("path",Jv({},Re(c,!0),{className:Ye("recharts-cross",s),d:sye(e,n,o,a,r,i)}))};function cye(t,e,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-i:n.left+.5,y:t==="horizontal"?n.top+.5:e.y-i,width:t==="horizontal"?r:n.width-1,height:t==="horizontal"?n.height-1:r}}function NQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function uye(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?NQ(Object(n),!0).forEach(function(r){fye(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):NQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function fye(t,e,n){return(e=dye(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dye(t){var e=hye(t,"string");return typeof e=="symbol"?e:e+""}function hye(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qr(t,e){var n=uye({},t),r=e,i=Object.keys(e),o=i.reduce((a,s)=>(a[s]===void 0&&r[s]!==void 0&&(a[s]=r[s]),a),n);return o}var RQ={},BQ={},ZQ={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n){if(!n||typeof n!="object")return!1;const r=Object.getPrototypeOf(n);return r===null||r===Object.prototype||Object.getPrototypeOf(r)===null?Object.prototype.toString.call(n)==="[object Object]":!1}t.isPlainObject=e})(ZQ),function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=ZQ,n=Ov,r=I1,i=j1,o=L1;function a(c,u,f){return s(c,u,void 0,void 0,void 0,void 0,f)}function s(c,u,f,d,h,m,g){const p=g(c,u,f,d,h,m);if(p!==void 0)return p;if(typeof c==typeof u)switch(typeof c){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return c===u;case"number":return c===u||Object.is(c,u);case"function":return c===u;case"object":return l(c,u,m,g)}return l(c,u,m,g)}function l(c,u,f,d){if(Object.is(c,u))return!0;let h=r.getTag(c),m=r.getTag(u);if(h===i.argumentsTag&&(h=i.objectTag),m===i.argumentsTag&&(m=i.objectTag),h!==m)return!1;switch(h){case i.stringTag:return c.toString()===u.toString();case i.numberTag:{const O=c.valueOf(),w=u.valueOf();return o.eq(O,w)}case i.booleanTag:case i.dateTag:case i.symbolTag:return Object.is(c.valueOf(),u.valueOf());case i.regexpTag:return c.source===u.source&&c.flags===u.flags;case i.functionTag:return c===u}f=f??new Map;const g=f.get(c),p=f.get(u);if(g!=null&&p!=null)return g===u;f.set(c,u),f.set(u,c);try{switch(h){case i.mapTag:{if(c.size!==u.size)return!1;for(const[O,w]of c.entries())if(!u.has(O)||!s(w,u.get(O),O,c,u,f,d))return!1;return!0}case i.setTag:{if(c.size!==u.size)return!1;const O=Array.from(c.values()),w=Array.from(u.values());for(let v=0;v<O.length;v++){const b=O[v],y=w.findIndex(x=>s(b,x,void 0,c,u,f,d));if(y===-1)return!1;w.splice(y,1)}return!0}case i.arrayTag:case i.uint8ArrayTag:case i.uint8ClampedArrayTag:case i.uint16ArrayTag:case i.uint32ArrayTag:case i.bigUint64ArrayTag:case i.int8ArrayTag:case i.int16ArrayTag:case i.int32ArrayTag:case i.bigInt64ArrayTag:case i.float32ArrayTag:case i.float64ArrayTag:{if(typeof Buffer<"u"&&Buffer.isBuffer(c)!==Buffer.isBuffer(u)||c.length!==u.length)return!1;for(let O=0;O<c.length;O++)if(!s(c[O],u[O],O,c,u,f,d))return!1;return!0}case i.arrayBufferTag:return c.byteLength!==u.byteLength?!1:l(new Uint8Array(c),new Uint8Array(u),f,d);case i.dataViewTag:return c.byteLength!==u.byteLength||c.byteOffset!==u.byteOffset?!1:l(new Uint8Array(c),new Uint8Array(u),f,d);case i.errorTag:return c.name===u.name&&c.message===u.message;case i.objectTag:{if(!(l(c.constructor,u.constructor,f,d)||e.isPlainObject(c)&&e.isPlainObject(u)))return!1;const w=[...Object.keys(c),...n.getSymbols(c)],v=[...Object.keys(u),...n.getSymbols(u)];if(w.length!==v.length)return!1;for(let b=0;b<w.length;b++){const y=w[b],x=c[y];if(!Object.hasOwn(u,y))return!1;const _=u[y];if(!s(x,_,y,c,u,f,d))return!1}return!0}default:return!1}}finally{f.delete(c),f.delete(u)}}t.isEqualWith=a}(BQ);var zQ={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(){}t.noop=e})(zQ),function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=BQ,n=zQ;function r(i,o){return e.isEqualWith(i,o,n.noop)}t.isEqual=r}(RQ);var pye=RQ.isEqual;const mye=Br(pye);function gye(t){var e={},n=()=>null,r=!1,i=null,o=a=>{if(!r){if(Array.isArray(a)){if(!a.length)return;var s=a,[l,...c]=s;if(typeof l=="number"){i=t.setTimeout(o.bind(null,c),l);return}o(l),i=t.setTimeout(o.bind(null,c));return}typeof a=="object"&&(e=a,n(e)),typeof a=="function"&&a()}};return{stop:()=>{r=!0},start:a=>{r=!1,i&&(i(),i=null),o(a)},subscribe:a=>(n=a,()=>{n=()=>null}),getTimeoutController:()=>t}}var fm=1e-4,XQ=(t,e)=>[0,3*t,3*e-6*t,3*t-3*e+1],VQ=(t,e)=>t.map((n,r)=>n*e**r).reduce((n,r)=>n+r),FQ=(t,e)=>n=>{var r=XQ(t,e);return VQ(r,n)},Oye=(t,e)=>n=>{var r=XQ(t,e),i=[...r.map((o,a)=>o*a).slice(1),0];return VQ(i,n)},YQ=function(){for(var e,n,r,i,o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];if(a.length===1)switch(a[0]){case"linear":[e,r,n,i]=[0,0,1,1];break;case"ease":[e,r,n,i]=[.25,.1,.25,1];break;case"ease-in":[e,r,n,i]=[.42,0,1,1];break;case"ease-out":[e,r,n,i]=[.42,0,.58,1];break;case"ease-in-out":[e,r,n,i]=[0,0,.58,1];break;default:{var l=a[0].split("(");l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4&&([e,r,n,i]=l[1].split(")")[0].split(",").map(m=>parseFloat(m)))}}else a.length===4&&([e,r,n,i]=a);var c=FQ(e,n),u=FQ(r,i),f=Oye(e,n),d=m=>m>1?1:m<0?0:m,h=m=>{for(var g=m>1?1:m,p=g,O=0;O<8;++O){var w=c(p)-g,v=f(p);if(Math.abs(w-g)<fm||v<fm)return u(p);p=d(p-w/v)}return u(p)};return h.isStepper=!1,h},yye=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=e,o=(a,s,l)=>{var c=-(a-s)*n,u=l*r,f=l+(c-u)*i/1e3,d=l*i/1e3+a;return Math.abs(d-s)<fm&&Math.abs(f)<fm?[s,0]:[d,f]};return o.isStepper=!0,o.dt=i,o},vye=t=>{if(typeof t=="string")switch(t){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return YQ(t);case"spring":return yye();default:if(t.split("(")[0]==="cubic-bezier")return YQ(t)}return typeof t=="function"?t:null};function qQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function WQ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qQ(Object(n),!0).forEach(function(r){bye(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function bye(t,e,n){return(e=wye(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wye(t){var e=xye(t,"string");return typeof e=="symbol"?e:e+""}function xye(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var _ye=t=>t.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())),Sye=(t,e,n)=>t.map(r=>"".concat(_ye(r)," ").concat(e,"ms ").concat(n)).join(","),kye=(t,e)=>[Object.keys(t),Object.keys(e)].reduce((n,r)=>n.filter(i=>r.includes(i))),Zf=(t,e)=>Object.keys(e).reduce((n,r)=>WQ(WQ({},n),{},{[r]:t(r,e[r])}),{});function UQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Mn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?UQ(Object(n),!0).forEach(function(r){Cye(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):UQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Cye(t,e,n){return(e=Pye(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pye(t){var e=Eye(t,"string");return typeof e=="symbol"?e:e+""}function Eye(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var dm=(t,e,n)=>t+(e-t)*n,e2=t=>{var{from:e,to:n}=t;return e!==n},HQ=(t,e,n)=>{var r=Zf((i,o)=>{if(e2(o)){var[a,s]=t(o.from,o.to,o.velocity);return Mn(Mn({},o),{},{from:a,velocity:s})}return o},e);return n<1?Zf((i,o)=>e2(o)?Mn(Mn({},o),{},{velocity:dm(o.velocity,r[i].velocity,n),from:dm(o.from,r[i].from,n)}):o,e):HQ(t,r,n-1)};function Tye(t,e,n,r,i,o){var a,s=r.reduce((d,h)=>Mn(Mn({},d),{},{[h]:{from:t[h],velocity:0,to:e[h]}}),{}),l=()=>Zf((d,h)=>h.from,s),c=()=>!Object.values(s).filter(e2).length,u=null,f=d=>{a||(a=d);var h=d-a,m=h/n.dt;s=HQ(n,s,m),i(Mn(Mn(Mn({},t),e),l())),a=d,c()||(u=o.setTimeout(f))};return()=>(u=o.setTimeout(f),()=>{u()})}function Aye(t,e,n,r,i,o,a){var s=null,l=i.reduce((f,d)=>Mn(Mn({},f),{},{[d]:[t[d],e[d]]}),{}),c,u=f=>{c||(c=f);var d=(f-c)/r,h=Zf((g,p)=>dm(...p,n(d)),l);if(o(Mn(Mn(Mn({},t),e),h)),d<1)s=a.setTimeout(u);else{var m=Zf((g,p)=>dm(...p,n(1)),l);o(Mn(Mn(Mn({},t),e),m))}};return()=>(s=a.setTimeout(u),()=>{s()})}const Mye=(t,e,n,r,i,o)=>{var a=kye(t,e);return n.isStepper===!0?Tye(t,e,n,a,i,o):Aye(t,e,n,r,a,i,o)};class Qye{setTimeout(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,o=a=>{a-r>=n?e(a):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{cancelAnimationFrame(i)}}}var Dye=["children","begin","duration","attributeName","easing","isActive","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart","animationManager"];function t2(){return t2=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},t2.apply(null,arguments)}function $ye(t,e){if(t==null)return{};var n,r,i=Lye(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Lye(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function GQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Wa(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?GQ(Object(n),!0).forEach(function(r){Us(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):GQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Us(t,e,n){return(e=Iye(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Iye(t){var e=jye(t,"string");return typeof e=="symbol"?e:e+""}function jye(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Nye(){return gye(new Qye)}class n2 extends k.PureComponent{constructor(e,n){super(e,n),Us(this,"mounted",!1),Us(this,"manager",null),Us(this,"stopJSAnimation",null),Us(this,"unSubscribe",null);var{isActive:r,attributeName:i,from:o,to:a,children:s,duration:l,animationManager:c}=this.props;if(this.manager=c,this.handleStyleChange=this.handleStyleChange.bind(this),this.changeStyle=this.changeStyle.bind(this),!r||l<=0){this.state={style:{}},typeof s=="function"&&(this.state={style:a});return}if(o){if(typeof s=="function"){this.state={style:o};return}this.state={style:i?{[i]:o}:o}}else this.state={style:{}}}componentDidMount(){var{isActive:e,canBegin:n}=this.props;this.mounted=!0,!(!e||!n)&&this.runAnimation(this.props)}componentDidUpdate(e){var{isActive:n,canBegin:r,attributeName:i,shouldReAnimate:o,to:a,from:s}=this.props,{style:l}=this.state;if(r){if(!n){var c={style:i?{[i]:a}:a};this.state&&l&&(i&&l[i]!==a||!i&&l!==a)&&this.setState(c);return}if(!(mye(e.to,a)&&e.canBegin&&e.isActive)){var u=!e.canBegin||!e.isActive;this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var f=u||o?s:e.to;if(this.state&&l){var d={style:i?{[i]:f}:f};(i&&l[i]!==f||!i&&l!==f)&&this.setState(d)}this.runAnimation(Wa(Wa({},this.props),{},{from:f,begin:0}))}}}componentWillUnmount(){this.mounted=!1;var{onAnimationEnd:e}=this.props;this.unSubscribe&&this.unSubscribe(),this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}handleStyleChange(e){this.changeStyle(e)}changeStyle(e){this.mounted&&this.setState({style:e})}runJSAnimation(e){var{from:n,to:r,duration:i,easing:o,begin:a,onAnimationEnd:s,onAnimationStart:l}=e,c=Mye(n,r,vye(o),i,this.changeStyle,this.manager.getTimeoutController()),u=()=>{this.stopJSAnimation=c()};this.manager.start([l,a,u,i,s])}runAnimation(e){var{begin:n,duration:r,attributeName:i,to:o,easing:a,onAnimationStart:s,onAnimationEnd:l,children:c}=e;if(this.unSubscribe=this.manager.subscribe(this.handleStyleChange),typeof a=="function"||typeof c=="function"||a==="spring"){this.runJSAnimation(e);return}var u=i?{[i]:o}:o,f=Sye(Object.keys(u),r,a);this.manager.start([s,n,Wa(Wa({},u),{},{transition:f}),r,l])}render(){var e=this.props,{children:n,begin:r,duration:i,attributeName:o,easing:a,isActive:s,from:l,to:c,canBegin:u,onAnimationEnd:f,shouldReAnimate:d,onAnimationReStart:h,animationManager:m}=e,g=$ye(e,Dye),p=k.Children.count(n),O=this.state.style;if(typeof n=="function")return n(O);if(!s||p===0||i<=0)return n;var w=v=>{var{style:b={},className:y}=v.props,x=k.cloneElement(v,Wa(Wa({},g),{},{style:Wa(Wa({},b),O),className:y}));return x};return p===1?w(k.Children.only(n)):P.createElement("div",null,k.Children.map(n,v=>w(v)))}}Us(n2,"displayName","Animate"),Us(n2,"defaultProps",{begin:0,duration:1e3,attributeName:"",easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}});var Rye=k.createContext(null);function Jo(t){var e,n,r=k.useContext(Rye);return P.createElement(n2,t2({},t,{animationManager:(e=(n=t.animationManager)!==null&&n!==void 0?n:r)!==null&&e!==void 0?e:Nye()}))}function hm(){return hm=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},hm.apply(null,arguments)}var KQ=(t,e,n,r,i)=>{var o=Math.min(Math.abs(n)/2,Math.abs(r)/2),a=r>=0?1:-1,s=n>=0?1:-1,l=r>=0&&n>=0||r<0&&n<0?1:0,c;if(o>0&&i instanceof Array){for(var u=[0,0,0,0],f=0,d=4;f<d;f++)u[f]=i[f]>o?o:i[f];c="M".concat(t,",").concat(e+a*u[0]),u[0]>0&&(c+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(l,",").concat(t+s*u[0],",").concat(e)),c+="L ".concat(t+n-s*u[1],",").concat(e),u[1]>0&&(c+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(l,`,
785
785
  `).concat(t+n,",").concat(e+a*u[1])),c+="L ".concat(t+n,",").concat(e+r-a*u[2]),u[2]>0&&(c+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(l,`,
786
786
  `).concat(t+n-s*u[2],",").concat(e+r)),c+="L ".concat(t+s*u[3],",").concat(e+r),u[3]>0&&(c+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(l,`,
787
787
  `).concat(t,",").concat(e+r-a*u[3])),c+="Z"}else if(o>0&&i===+i&&i>0){var h=Math.min(o,i);c="M ".concat(t,",").concat(e+a*h,`
@@ -814,7 +814,7 @@ Expecting `+ne.join(", ")+", got '"+(this.terminals_[Q]||Q)+"'":L="Parse error o
814
814
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
815
815
  height and width.`,_,E,i,o,a,s,n),P.Children.map(c,A=>k.cloneElement(A,{width:_,height:E,style:Ab({width:_,height:E},A.props.style)}))},[n,c,o,l,s,a,O,i]);return P.createElement("div",{id:f?"".concat(f):void 0,className:Ye("recharts-responsive-container",d),style:Ab(Ab({},m),{},{width:i,height:o,minWidth:a,minHeight:s,maxHeight:l}),ref:g},P.createElement("div",{style:{width:0,height:0,overflow:"visible"}},b))}),dd=t=>null;dd.displayName="Cell";function fI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Mb(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fI(Object(n),!0).forEach(function(r){f4e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function f4e(t,e,n){return(e=d4e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d4e(t){var e=h4e(t,"string");return typeof e=="symbol"?e:e+""}function h4e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ic={widthCache:{},cacheCount:0},p4e=2e3,m4e={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},dI="recharts_measurement_span";function g4e(t){var e=Mb({},t);return Object.keys(e).forEach(n=>{e[n]||delete e[n]}),e}var hd=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||qa.isSsr)return{width:0,height:0};var r=g4e(n),i=JSON.stringify({text:e,copyStyle:r});if(Ic.widthCache[i])return Ic.widthCache[i];try{var o=document.getElementById(dI);o||(o=document.createElement("span"),o.setAttribute("id",dI),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=Mb(Mb({},m4e),r);Object.assign(o.style,a),o.textContent="".concat(e);var s=o.getBoundingClientRect(),l={width:s.width,height:s.height};return Ic.widthCache[i]=l,++Ic.cacheCount>p4e&&(Ic.cacheCount=0,Ic.widthCache={}),l}catch{return{width:0,height:0}}},hI=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,pI=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,O4e=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,y4e=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,mI={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},v4e=Object.keys(mI),jc="NaN";function b4e(t,e){return t*mI[e]}class dr{static parse(e){var n,[,r,i]=(n=y4e.exec(e))!==null&&n!==void 0?n:[];return new dr(parseFloat(r),i??"")}constructor(e,n){this.num=e,this.unit=n,this.num=e,this.unit=n,ur(e)&&(this.unit=""),n!==""&&!O4e.test(n)&&(this.num=NaN,this.unit=""),v4e.includes(n)&&(this.num=b4e(e,n),this.unit="px")}add(e){return this.unit!==e.unit?new dr(NaN,""):new dr(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new dr(NaN,""):new dr(this.num-e.num,this.unit)}multiply(e){return this.unit!==""&&e.unit!==""&&this.unit!==e.unit?new dr(NaN,""):new dr(this.num*e.num,this.unit||e.unit)}divide(e){return this.unit!==""&&e.unit!==""&&this.unit!==e.unit?new dr(NaN,""):new dr(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return ur(this.num)}}function gI(t){if(t.includes(jc))return jc;for(var e=t;e.includes("*")||e.includes("/");){var n,[,r,i,o]=(n=hI.exec(e))!==null&&n!==void 0?n:[],a=dr.parse(r??""),s=dr.parse(o??""),l=i==="*"?a.multiply(s):a.divide(s);if(l.isNaN())return jc;e=e.replace(hI,l.toString())}for(;e.includes("+")||/.-\d+(?:\.\d+)?/.test(e);){var c,[,u,f,d]=(c=pI.exec(e))!==null&&c!==void 0?c:[],h=dr.parse(u??""),m=dr.parse(d??""),g=f==="+"?h.add(m):h.subtract(m);if(g.isNaN())return jc;e=e.replace(pI,g.toString())}return e}var OI=/\(([^()]*)\)/;function w4e(t){for(var e=t,n;(n=OI.exec(e))!=null;){var[,r]=n;e=e.replace(OI,gI(r))}return e}function x4e(t){var e=t.replace(/\s+/g,"");return e=w4e(e),e=gI(e),e}function _4e(t){try{return x4e(t)}catch{return jc}}function Qb(t){var e=_4e(t.slice(5,-1));return e===jc?"":e}var S4e=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],k4e=["dx","dy","angle","className","breakAll"];function Db(){return Db=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Db.apply(null,arguments)}function yI(t,e){if(t==null)return{};var n,r,i=C4e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function C4e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var vI=/[ \f\n\r\t\v\u2028\u2029]+/,bI=t=>{var{children:e,breakAll:n,style:r}=t;try{var i=[];ut(e)||(n?i=e.toString().split(""):i=e.toString().split(vI));var o=i.map(s=>({word:s,width:hd(s,r).width})),a=n?0:hd(" ",r).width;return{wordsWithComputedWidth:o,spaceWidth:a}}catch{return null}},P4e=(t,e,n,r,i)=>{var{maxLines:o,children:a,style:s,breakAll:l}=t,c=ue(o),u=a,f=function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Q.reduce((D,j)=>{var{word:R,width:B}=j,X=D[D.length-1];if(X&&(r==null||i||X.width+B+n<Number(r)))X.words.push(R),X.width+=B+n;else{var V={words:[R],width:B};D.push(V)}return D},[])},d=f(e),h=I=>I.reduce((Q,D)=>Q.width>D.width?Q:D);if(!c||i)return d;var m=d.length>o||h(d).width>Number(r);if(!m)return d;for(var g="…",p=I=>{var Q=u.slice(0,I),D=bI({breakAll:l,style:s,children:Q+g}).wordsWithComputedWidth,j=f(D),R=j.length>o||h(j).width>Number(r);return[R,j]},O=0,w=u.length-1,v=0,b;O<=w&&v<=u.length-1;){var y=Math.floor((O+w)/2),x=y-1,[_,E]=p(x),[A]=p(y);if(!_&&!A&&(O=y+1),_&&A&&(w=y-1),!_&&A){b=E;break}v++}return b||d},wI=t=>{var e=ut(t)?[]:t.toString().split(vI);return[{words:e}]},E4e=t=>{var{width:e,scaleToFit:n,children:r,style:i,breakAll:o,maxLines:a}=t;if((e||n)&&!qa.isSsr){var s,l,c=bI({breakAll:o,children:r,style:i});if(c){var{wordsWithComputedWidth:u,spaceWidth:f}=c;s=u,l=f}else return wI(r);return P4e({breakAll:o,children:r,maxLines:a,style:i},s,l,e,n)}return wI(r)},xI="#808080",Hm=k.forwardRef((t,e)=>{var{x:n=0,y:r=0,lineHeight:i="1em",capHeight:o="0.71em",scaleToFit:a=!1,textAnchor:s="start",verticalAnchor:l="end",fill:c=xI}=t,u=yI(t,S4e),f=k.useMemo(()=>E4e({breakAll:u.breakAll,children:u.children,maxLines:u.maxLines,scaleToFit:a,style:u.style,width:u.width}),[u.breakAll,u.children,u.maxLines,a,u.style,u.width]),{dx:d,dy:h,angle:m,className:g,breakAll:p}=u,O=yI(u,k4e);if(!mo(n)||!mo(r))return null;var w=n+(ue(d)?d:0),v=r+(ue(h)?h:0),b;switch(l){case"start":b=Qb("calc(".concat(o,")"));break;case"middle":b=Qb("calc(".concat((f.length-1)/2," * -").concat(i," + (").concat(o," / 2))"));break;default:b=Qb("calc(".concat(f.length-1," * -").concat(i,")"));break}var y=[];if(a){var x=f[0].width,{width:_}=u;y.push("scale(".concat(ue(_)?_/x:1,")"))}return m&&y.push("rotate(".concat(m,", ").concat(w,", ").concat(v,")")),y.length&&(O.transform=y.join(" ")),P.createElement("text",Db({},Re(O,!0),{ref:e,x:w,y:v,className:Ye("recharts-text",g),textAnchor:s,fill:c.includes("url")?xI:c}),f.map((E,A)=>{var I=E.words.join(p?"":" ");return P.createElement("tspan",{x:w,dy:A===0?b:i,key:"".concat(I,"-").concat(A)},I)}))});Hm.displayName="Text";var T4e=["offset"],A4e=["labelRef"];function _I(t,e){if(t==null)return{};var n,r,i=M4e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function M4e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function SI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?SI(Object(n),!0).forEach(function(r){Q4e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):SI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Q4e(t,e,n){return(e=D4e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function D4e(t){var e=$4e(t,"string");return typeof e=="symbol"?e:e+""}function $4e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ua(){return ua=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ua.apply(null,arguments)}var L4e=t=>{var{value:e,formatter:n}=t,r=ut(t.children)?e:t.children;return typeof n=="function"?n(r):r},$b=t=>t!=null&&typeof t=="function",I4e=(t,e)=>{var n=On(e-t),r=Math.min(Math.abs(e-t),360);return n*r},j4e=(t,e,n)=>{var{position:r,viewBox:i,offset:o,className:a}=t,{cx:s,cy:l,innerRadius:c,outerRadius:u,startAngle:f,endAngle:d,clockWise:h}=i,m=(c+u)/2,g=I4e(f,d),p=g>=0?1:-1,O,w;r==="insideStart"?(O=f+p*o,w=h):r==="insideEnd"?(O=d-p*o,w=!h):r==="end"&&(O=d+p*o,w=h),w=g<=0?w:!w;var v=tn(s,l,m,O),b=tn(s,l,m,O+(w?1:-1)*359),y="M".concat(v.x,",").concat(v.y,`
816
816
  A`).concat(m,",").concat(m,",0,1,").concat(w?0:1,`,
817
- `).concat(b.x,",").concat(b.y),x=ut(t.id)?Va("recharts-radial-line-"):t.id;return P.createElement("text",ua({},n,{dominantBaseline:"central",className:Ye("recharts-radial-bar-label",a)}),P.createElement("defs",null,P.createElement("path",{id:x,d:y})),P.createElement("textPath",{xlinkHref:"#".concat(x)},e))},N4e=t=>{var{viewBox:e,offset:n,position:r}=t,{cx:i,cy:o,innerRadius:a,outerRadius:s,startAngle:l,endAngle:c}=e,u=(l+c)/2;if(r==="outside"){var{x:f,y:d}=tn(i,o,s+n,u);return{x:f,y:d,textAnchor:f>=i?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:i,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:i,y:o,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:i,y:o,textAnchor:"middle",verticalAnchor:"end"};var h=(a+s)/2,{x:m,y:g}=tn(i,o,h,u);return{x:m,y:g,textAnchor:"middle",verticalAnchor:"middle"}},R4e=(t,e)=>{var{parentViewBox:n,offset:r,position:i}=t,{x:o,y:a,width:s,height:l}=e,c=l>=0?1:-1,u=c*r,f=c>0?"end":"start",d=c>0?"start":"end",h=s>=0?1:-1,m=h*r,g=h>0?"end":"start",p=h>0?"start":"end";if(i==="top"){var O={x:o+s/2,y:a-c*r,textAnchor:"middle",verticalAnchor:f};return rn(rn({},O),n?{height:Math.max(a-n.y,0),width:s}:{})}if(i==="bottom"){var w={x:o+s/2,y:a+l+u,textAnchor:"middle",verticalAnchor:d};return rn(rn({},w),n?{height:Math.max(n.y+n.height-(a+l),0),width:s}:{})}if(i==="left"){var v={x:o-m,y:a+l/2,textAnchor:g,verticalAnchor:"middle"};return rn(rn({},v),n?{width:Math.max(v.x-n.x,0),height:l}:{})}if(i==="right"){var b={x:o+s+m,y:a+l/2,textAnchor:p,verticalAnchor:"middle"};return rn(rn({},b),n?{width:Math.max(n.x+n.width-b.x,0),height:l}:{})}var y=n?{width:s,height:l}:{};return i==="insideLeft"?rn({x:o+m,y:a+l/2,textAnchor:p,verticalAnchor:"middle"},y):i==="insideRight"?rn({x:o+s-m,y:a+l/2,textAnchor:g,verticalAnchor:"middle"},y):i==="insideTop"?rn({x:o+s/2,y:a+u,textAnchor:"middle",verticalAnchor:d},y):i==="insideBottom"?rn({x:o+s/2,y:a+l-u,textAnchor:"middle",verticalAnchor:f},y):i==="insideTopLeft"?rn({x:o+m,y:a+u,textAnchor:p,verticalAnchor:d},y):i==="insideTopRight"?rn({x:o+s-m,y:a+u,textAnchor:g,verticalAnchor:d},y):i==="insideBottomLeft"?rn({x:o+m,y:a+l-u,textAnchor:p,verticalAnchor:f},y):i==="insideBottomRight"?rn({x:o+s-m,y:a+l-u,textAnchor:g,verticalAnchor:f},y):i&&typeof i=="object"&&(ue(i.x)||Zs(i.x))&&(ue(i.y)||Zs(i.y))?rn({x:o+Hn(i.x,s),y:a+Hn(i.y,l),textAnchor:"end",verticalAnchor:"end"},y):rn({x:o+s/2,y:a+l/2,textAnchor:"middle",verticalAnchor:"middle"},y)},B4e=t=>"cx"in t&&ue(t.cx);function jr(t){var{offset:e=5}=t,n=_I(t,T4e),r=rn({offset:e},n),{viewBox:i,position:o,value:a,children:s,content:l,className:c="",textBreakAll:u,labelRef:f}=r,d=Vv(),h=i||d;if(!h||ut(a)&&ut(s)&&!k.isValidElement(l)&&typeof l!="function")return null;if(k.isValidElement(l)){var m=_I(r,A4e);return k.cloneElement(l,m)}var g;if(typeof l=="function"){if(g=k.createElement(l,r),k.isValidElement(g))return g}else g=L4e(r);var p=B4e(h),O=Re(r,!0);if(p&&(o==="insideStart"||o==="insideEnd"||o==="end"))return j4e(r,g,O);var w=p?N4e(r):R4e(r,h);return P.createElement(Hm,ua({ref:f,className:Ye("recharts-label",c)},O,w,{breakAll:u}),g)}jr.displayName="Label";var kI=t=>{var{cx:e,cy:n,angle:r,startAngle:i,endAngle:o,r:a,radius:s,innerRadius:l,outerRadius:c,x:u,y:f,top:d,left:h,width:m,height:g,clockWise:p,labelViewBox:O}=t;if(O)return O;if(ue(m)&&ue(g)){if(ue(u)&&ue(f))return{x:u,y:f,width:m,height:g};if(ue(d)&&ue(h))return{x:d,y:h,width:m,height:g}}if(ue(u)&&ue(f))return{x:u,y:f,width:0,height:0};if(ue(e)&&ue(n))return{cx:e,cy:n,startAngle:i||r||0,endAngle:o||r||0,innerRadius:l||0,outerRadius:c||s||a||0,clockWise:p};if(t.viewBox)return t.viewBox},Z4e=(t,e,n)=>{if(!t)return null;var r={viewBox:e,labelRef:n};return t===!0?P.createElement(jr,ua({key:"label-implicit"},r)):mo(t)?P.createElement(jr,ua({key:"label-implicit",value:t},r)):k.isValidElement(t)?t.type===jr?k.cloneElement(t,rn({key:"label-implicit"},r)):P.createElement(jr,ua({key:"label-implicit",content:t},r)):$b(t)?P.createElement(jr,ua({key:"label-implicit",content:t},r)):t&&typeof t=="object"?P.createElement(jr,ua({},t,{key:"label-implicit"},r)):null},z4e=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var{children:i,labelRef:o}=e,a=kI(e),s=Df(i,jr).map((c,u)=>k.cloneElement(c,{viewBox:n||a,key:"label-".concat(u)}));if(!r)return s;var l=Z4e(e.label,n||a,o);return[l,...s]};jr.parseViewBox=kI,jr.renderCallByParent=z4e;var CI={},PI={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n){return n[n.length-1]}t.last=e})(PI);var EI={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n){return Array.isArray(n)?n:Array.from(n)}t.toArray=e})(EI),function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=PI,n=EI,r=$1;function i(o){if(r.isArrayLike(o))return e.last(n.toArray(o))}t.last=i}(CI);var X4e=CI.last;const V4e=Br(X4e);var F4e=["valueAccessor"],Y4e=["data","dataKey","clockWise","id","textBreakAll"];function Gm(){return Gm=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Gm.apply(null,arguments)}function TI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function AI(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?TI(Object(n),!0).forEach(function(r){q4e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):TI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function q4e(t,e,n){return(e=W4e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function W4e(t){var e=U4e(t,"string");return typeof e=="symbol"?e:e+""}function U4e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function MI(t,e){if(t==null)return{};var n,r,i=H4e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function H4e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var G4e=t=>Array.isArray(t.value)?V4e(t.value):t.value;function fa(t){var{valueAccessor:e=G4e}=t,n=MI(t,F4e),{data:r,dataKey:i,clockWise:o,id:a,textBreakAll:s}=n,l=MI(n,Y4e);return!r||!r.length?null:P.createElement(jt,{className:"recharts-label-list"},r.map((c,u)=>{var f=ut(i)?e(c,u):vt(c&&c.payload,i),d=ut(a)?{}:{id:"".concat(a,"-").concat(u)};return P.createElement(jr,Gm({},Re(c,!0),l,d,{parentViewBox:c.parentViewBox,value:f,textBreakAll:s,viewBox:jr.parseViewBox(ut(o)?c:AI(AI({},c),{},{clockWise:o})),key:"label-".concat(u),index:u}))}))}fa.displayName="LabelList";function K4e(t,e){return t?t===!0?P.createElement(fa,{key:"labelList-implicit",data:e}):P.isValidElement(t)||$b(t)?P.createElement(fa,{key:"labelList-implicit",data:e,content:t}):typeof t=="object"?P.createElement(fa,Gm({data:e},t,{key:"labelList-implicit"})):null:null}function J4e(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var{children:r}=t,i=Df(r,fa).map((a,s)=>k.cloneElement(a,{data:e,key:"labelList-".concat(s)}));if(!n)return i;var o=K4e(t.label,e);return[o,...i]}fa.renderCallByParent=J4e;function Lb(){return Lb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Lb.apply(null,arguments)}var Ib=t=>{var{cx:e,cy:n,r,className:i}=t,o=Ye("recharts-dot",i);return e===+e&&n===+n&&r===+r?P.createElement("circle",Lb({},Re(t,!1),Fy(t),{className:o,cx:e,cy:n,r})):null},QI=t=>t.graphicalItems.polarItems,e8e=Y([qt,rd],tb),jb=Y([QI,Wt,e8e],nb),t8e=Y([jb],rb),Nb=Y([t8e,Z2],ib),n8e=Y([Nb,Wt,jb],ob),r8e=Y([Nb,Wt,jb],(t,e,n)=>n.length>0?t.flatMap(r=>n.flatMap(i=>{var o,a=vt(r,(o=e.dataKey)!==null&&o!==void 0?o:i.dataKey);return{value:a,errorDomain:[]}})).filter(Boolean):(e==null?void 0:e.dataKey)!=null?t.map(r=>({value:vt(r,e.dataKey),errorDomain:[]})):t.map(r=>({value:r,errorDomain:[]}))),DI=()=>{},i8e=Y([Wt,lL,DI,r8e,DI],lb),$I=Y([Wt,qe,Nb,n8e,nd,qt,i8e],cb),o8e=Y([$I,Wt,Qc],db);Y([Wt,$I,o8e,qt],pb);var a8e={radiusAxis:{},angleAxis:{}},s8e=li({name:"polarAxis",initialState:a8e,reducers:{addRadiusAxis(t,e){t.radiusAxis[e.payload.id]=e.payload},removeRadiusAxis(t,e){delete t.radiusAxis[e.payload.id]},addAngleAxis(t,e){t.angleAxis[e.payload.id]=e.payload},removeAngleAxis(t,e){delete t.angleAxis[e.payload.id]}}}),l8e=s8e.reducer;function LI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function II(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?LI(Object(n),!0).forEach(function(r){c8e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):LI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function c8e(t,e,n){return(e=u8e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u8e(t){var e=f8e(t,"string");return typeof e=="symbol"?e:e+""}function f8e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Rb=(t,e)=>e,d8e=[],Bb=(t,e,n)=>(n==null?void 0:n.length)===0?d8e:n,jI=Y([Z2,Rb,Bb],(t,e,n)=>{var{chartData:r}=t,i;if((e==null?void 0:e.data)!=null&&e.data.length>0?i=e.data:i=r,(!i||!i.length)&&n!=null&&(i=n.map(o=>II(II({},e.presentationProps),o.props))),i!=null)return i}),h8e=Y([jI,Rb,Bb],(t,e,n)=>{if(t!=null)return t.map((r,i)=>{var o,a=vt(r,e.nameKey,e.name),s;return n!=null&&(o=n[i])!==null&&o!==void 0&&(o=o.props)!==null&&o!==void 0&&o.fill?s=n[i].props.fill:typeof r=="object"&&r!=null&&"fill"in r?s=r.fill:s=e.fill,{value:Fa(a,e.dataKey),color:s,payload:r,type:e.legendType}})}),p8e=Y([QI,Rb],(t,e)=>{if(t.some(n=>n.type==="pie"&&e.dataKey===n.dataKey&&e.data===n.data))return e}),m8e=Y([jI,p8e,Bb,ln],(t,e,n,r)=>{if(!(e==null||t==null))return i7e({offset:r,pieSettings:e,displayedData:t,cells:n})}),g8e={countOfBars:0,cartesianItems:[],polarItems:[]},NI=li({name:"graphicalItems",initialState:g8e,reducers:{addBar(t){t.countOfBars+=1},removeBar(t){t.countOfBars-=1},addCartesianGraphicalItem(t,e){t.cartesianItems.push(e.payload)},replaceCartesianGraphicalItem(t,e){var{prev:n,next:r}=e.payload,i=Ho(t).cartesianItems.indexOf(n);i>-1&&(t.cartesianItems[i]=r)},removeCartesianGraphicalItem(t,e){var n=Ho(t).cartesianItems.indexOf(e.payload);n>-1&&t.cartesianItems.splice(n,1)},addPolarGraphicalItem(t,e){t.polarItems.push(e.payload)},removePolarGraphicalItem(t,e){var n=Ho(t).polarItems.indexOf(e.payload);n>-1&&t.polarItems.splice(n,1)}}}),{addBar:O8e,removeBar:y8e,addCartesianGraphicalItem:v8e,replaceCartesianGraphicalItem:b8e,removeCartesianGraphicalItem:w8e,addPolarGraphicalItem:x8e,removePolarGraphicalItem:_8e}=NI.actions,S8e=NI.reducer;function RI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function BI(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?RI(Object(n),!0).forEach(function(r){k8e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):RI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function k8e(t,e,n){return(e=C8e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C8e(t){var e=P8e(t,"string");return typeof e=="symbol"?e:e+""}function P8e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function E8e(t){var e=Dt(),n=k.useRef(null);return k.useEffect(()=>{var r=BI(BI({},t),{},{stackId:Zv(t.stackId)});n.current===null?e(v8e(r)):n.current!==r&&e(b8e({prev:n.current,next:r})),n.current=r},[e,t]),k.useEffect(()=>()=>{n.current&&(e(w8e(n.current)),n.current=null)},[e]),null}function T8e(t){var e=Dt();return k.useEffect(()=>(e(x8e(t)),()=>{e(_8e(t))}),[e,t]),null}var ZI={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n){var i;if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const o=n[Symbol.toStringTag];return o==null||!((i=Object.getOwnPropertyDescriptor(n,Symbol.toStringTag))!=null&&i.writable)?!1:n.toString()===`[object ${o}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}t.isPlainObject=e})(ZI);var A8e=ZI.isPlainObject;const M8e=Br(A8e);function Km(){return Km=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Km.apply(null,arguments)}var zI=(t,e,n,r,i)=>{var o=n-r,a;return a="M ".concat(t,",").concat(e),a+="L ".concat(t+n,",").concat(e),a+="L ".concat(t+n-o/2,",").concat(e+i),a+="L ".concat(t+n-o/2-r,",").concat(e+i),a+="L ".concat(t,",").concat(e," Z"),a},Q8e={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},D8e=t=>{var e=Qr(t,Q8e),n=k.useRef(),[r,i]=k.useState(-1);k.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var p=n.current.getTotalLength();p&&i(p)}catch{}},[]);var{x:o,y:a,upperWidth:s,lowerWidth:l,height:c,className:u}=e,{animationEasing:f,animationDuration:d,animationBegin:h,isUpdateAnimationActive:m}=e;if(o!==+o||a!==+a||s!==+s||l!==+l||c!==+c||s===0&&l===0||c===0)return null;var g=Ye("recharts-trapezoid",u);return m?P.createElement(Jo,{canBegin:r>0,from:{upperWidth:0,lowerWidth:0,height:c,x:o,y:a},to:{upperWidth:s,lowerWidth:l,height:c,x:o,y:a},duration:d,animationEasing:f,isActive:m},p=>{var{upperWidth:O,lowerWidth:w,height:v,x:b,y}=p;return P.createElement(Jo,{canBegin:r>0,from:"0px ".concat(r===-1?1:r,"px"),to:"".concat(r,"px 0px"),attributeName:"strokeDasharray",begin:h,duration:d,easing:f},P.createElement("path",Km({},Re(e,!0),{className:g,d:zI(b,y,O,w,v),ref:n})))}):P.createElement("g",null,P.createElement("path",Km({},Re(e,!0),{className:g,d:zI(o,a,s,l,c)})))},$8e=["option","shapeType","propTransformer","activeClassName","isActive"];function L8e(t,e){if(t==null)return{};var n,r,i=I8e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function I8e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function XI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Jm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?XI(Object(n),!0).forEach(function(r){j8e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):XI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function j8e(t,e,n){return(e=N8e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function N8e(t){var e=R8e(t,"string");return typeof e=="symbol"?e:e+""}function R8e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function B8e(t,e){return Jm(Jm({},e),t)}function Z8e(t,e){return t==="symbols"}function VI(t){var{shapeType:e,elementProps:n}=t;switch(e){case"rectangle":return P.createElement(JQ,n);case"trapezoid":return P.createElement(D8e,n);case"sector":return P.createElement(nD,n);case"symbols":if(Z8e(e))return P.createElement(av,n);break;default:return null}}function z8e(t){return k.isValidElement(t)?t.props:t}function FI(t){var{option:e,shapeType:n,propTransformer:r=B8e,activeClassName:i="recharts-active-shape",isActive:o}=t,a=L8e(t,$8e),s;if(k.isValidElement(e))s=k.cloneElement(e,Jm(Jm({},a),z8e(e)));else if(typeof e=="function")s=e(a);else if(M8e(e)&&typeof e!="boolean"){var l=r(e,a);s=P.createElement(VI,{shapeType:n,elementProps:l})}else{var c=a;s=P.createElement(VI,{shapeType:n,elementProps:c})}return o?P.createElement(jt,{className:i},s):s}var Zb=(t,e)=>{var n=Dt();return(r,i)=>o=>{t==null||t(r,i,o),n(CL({activeIndex:String(i),activeDataKey:e,activeCoordinate:r.tooltipPosition}))}},zb=t=>{var e=Dt();return(n,r)=>i=>{t==null||t(n,r,i),e(j5e())}},Xb=(t,e)=>{var n=Dt();return(r,i)=>o=>{t==null||t(r,i,o),n(N5e({activeIndex:String(i),activeDataKey:e,activeCoordinate:r.tooltipPosition}))}};function e0(t){var{fn:e,args:n}=t,r=Dt(),i=Bn();return k.useEffect(()=>{if(!i){var o=e(n);return r($5e(o)),()=>{r(L5e(o))}}},[e,n,r,i]),null}var YI=()=>{};function Vb(t){var{legendPayload:e}=t,n=Dt(),r=Bn();return k.useEffect(()=>r?YI:(n(PQ(e)),()=>{n(EQ(e))}),[n,r,e]),null}function X8e(t){var{legendPayload:e}=t,n=Dt(),r=ve(qe);return k.useEffect(()=>r!=="centric"&&r!=="radial"?YI:(n(PQ(e)),()=>{n(EQ(e))}),[n,r,e]),null}function t0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=k.useRef(Va(e)),r=k.useRef(t);return r.current!==t&&(n.current=Va(e),r.current=t),n.current}var V8e=["onMouseEnter","onClick","onMouseLeave"];function F8e(t,e){if(t==null)return{};var n,r,i=Y8e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Y8e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function qI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qI(Object(n),!0).forEach(function(r){n0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function n0(t,e,n){return(e=q8e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function q8e(t){var e=W8e(t,"string");return typeof e=="symbol"?e:e+""}function W8e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function sl(){return sl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},sl.apply(null,arguments)}function U8e(t){var e=k.useMemo(()=>Re(t,!1),[t]),n=k.useMemo(()=>Df(t.children,dd),[t.children]),r=k.useMemo(()=>({name:t.name,nameKey:t.nameKey,tooltipType:t.tooltipType,data:t.data,dataKey:t.dataKey,cx:t.cx,cy:t.cy,startAngle:t.startAngle,endAngle:t.endAngle,minAngle:t.minAngle,paddingAngle:t.paddingAngle,innerRadius:t.innerRadius,outerRadius:t.outerRadius,cornerRadius:t.cornerRadius,legendType:t.legendType,fill:t.fill,presentationProps:e}),[t.cornerRadius,t.cx,t.cy,t.data,t.dataKey,t.endAngle,t.innerRadius,t.minAngle,t.name,t.nameKey,t.outerRadius,t.paddingAngle,t.startAngle,t.tooltipType,t.legendType,t.fill,e]),i=ve(o=>h8e(o,r,n));return P.createElement(X8e,{legendPayload:i})}function H8e(t){var{dataKey:e,nameKey:n,sectors:r,stroke:i,strokeWidth:o,fill:a,name:s,hide:l,tooltipType:c}=t;return{dataDefinedOnItem:r==null?void 0:r.map(u=>u.tooltipPayload),positions:r==null?void 0:r.map(u=>u.tooltipPosition),settings:{stroke:i,strokeWidth:o,fill:a,dataKey:e,nameKey:n,name:Fa(s,e),hide:l,type:c,color:a,unit:""}}}var G8e=(t,e)=>t>e?"start":t<e?"end":"middle",K8e=(t,e,n)=>typeof e=="function"?e(t):Hn(e,n,n*.8),J8e=(t,e,n)=>{var{top:r,left:i,width:o,height:a}=e,s=uQ(o,a),l=i+Hn(t.cx,o,o/2),c=r+Hn(t.cy,a,a/2),u=Hn(t.innerRadius,s,0),f=K8e(n,t.outerRadius,s),d=t.maxRadius||Math.sqrt(o*o+a*a)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:f,maxRadius:d}},e7e=(t,e)=>{var n=On(e-t),r=Math.min(Math.abs(e-t),360);return n*r},t7e=(t,e)=>{if(P.isValidElement(t))return P.cloneElement(t,e);if(typeof t=="function")return t(e);var n=Ye("recharts-pie-label-line",typeof t!="boolean"?t.className:"");return P.createElement(wc,sl({},e,{type:"linear",className:n}))},n7e=(t,e,n)=>{if(P.isValidElement(t))return P.cloneElement(t,e);var r=n;if(typeof t=="function"&&(r=t(e),P.isValidElement(r)))return r;var i=Ye("recharts-pie-label-text",typeof t!="boolean"&&typeof t!="function"?t.className:"");return P.createElement(Hm,sl({},e,{alignmentBaseline:"middle",className:i}),r)};function r7e(t){var{sectors:e,props:n,showLabels:r}=t,{label:i,labelLine:o,dataKey:a}=n;if(!r||!i||!e)return null;var s=Re(n,!1),l=Re(i,!1),c=Re(o,!1),u=typeof i=="object"&&"offsetRadius"in i&&i.offsetRadius||20,f=e.map((d,h)=>{var m=(d.startAngle+d.endAngle)/2,g=tn(d.cx,d.cy,d.outerRadius+u,m),p=Zt(Zt(Zt(Zt({},s),d),{},{stroke:"none"},l),{},{index:h,textAnchor:G8e(g.x,d.cx)},g),O=Zt(Zt(Zt(Zt({},s),d),{},{fill:"none",stroke:d.fill},c),{},{index:h,points:[tn(d.cx,d.cy,d.outerRadius,m),g],key:"line"});return P.createElement(jt,{key:"label-".concat(d.startAngle,"-").concat(d.endAngle,"-").concat(d.midAngle,"-").concat(h)},o&&t7e(o,O),n7e(i,p,vt(d,a)))});return P.createElement(jt,{className:"recharts-pie-labels"},f)}function WI(t){var{sectors:e,activeShape:n,inactiveShape:r,allOtherPieProps:i,showLabels:o}=t,a=ve(ts),{onMouseEnter:s,onClick:l,onMouseLeave:c}=i,u=F8e(i,V8e),f=Zb(s,i.dataKey),d=zb(c),h=Xb(l,i.dataKey);return e==null?null:P.createElement(P.Fragment,null,e.map((m,g)=>{if((m==null?void 0:m.startAngle)===0&&(m==null?void 0:m.endAngle)===0&&e.length!==1)return null;var p=n&&String(g)===a,O=a?r:null,w=p?n:O,v=Zt(Zt({},m),{},{stroke:m.stroke,tabIndex:-1,[bQ]:g,[wQ]:i.dataKey});return P.createElement(jt,sl({tabIndex:-1,className:"recharts-pie-sector"},Qf(u,m,g),{onMouseEnter:f(m,g),onMouseLeave:d(m,g),onClick:h(m,g),key:"sector-".concat(m==null?void 0:m.startAngle,"-").concat(m==null?void 0:m.endAngle,"-").concat(m.midAngle,"-").concat(g)}),P.createElement(FI,sl({option:w,isActive:p,shapeType:"sector"},v)))}),P.createElement(r7e,{sectors:e,props:i,showLabels:o}))}function i7e(t){var e,{pieSettings:n,displayedData:r,cells:i,offset:o}=t,{cornerRadius:a,startAngle:s,endAngle:l,dataKey:c,nameKey:u,tooltipType:f}=n,d=Math.abs(n.minAngle),h=e7e(s,l),m=Math.abs(h),g=r.length<=1?0:(e=n.paddingAngle)!==null&&e!==void 0?e:0,p=r.filter(x=>vt(x,c,0)!==0).length,O=(m>=360?p:p-1)*g,w=m-p*d-O,v=r.reduce((x,_)=>{var E=vt(_,c,0);return x+(ue(E)?E:0)},0),b;if(v>0){var y;b=r.map((x,_)=>{var E=vt(x,c,0),A=vt(x,u,_),I=J8e(n,o,x),Q=(ue(E)?E:0)/v,D,j=Zt(Zt({},x),i&&i[_]&&i[_].props);_?D=y.endAngle+On(h)*g*(E!==0?1:0):D=s;var R=D+On(h)*((E!==0?d:0)+Q*w),B=(D+R)/2,X=(I.innerRadius+I.outerRadius)/2,V=[{name:A,value:E,payload:j,dataKey:c,type:f}],K=tn(I.cx,I.cy,X,B);return y=Zt(Zt(Zt(Zt({},n.presentationProps),{},{percent:Q,cornerRadius:a,name:A,tooltipPayload:V,midAngle:B,middleRadius:X,tooltipPosition:K},j),I),{},{value:vt(x,c),startAngle:D,endAngle:R,payload:j,paddingAngle:On(h)*g}),y})}return b}function o7e(t){var{props:e,previousSectorsRef:n}=t,{sectors:r,isAnimationActive:i,animationBegin:o,animationDuration:a,animationEasing:s,activeShape:l,inactiveShape:c,onAnimationStart:u,onAnimationEnd:f}=e,d=t0(e,"recharts-pie-"),h=n.current,[m,g]=k.useState(!0),p=k.useCallback(()=>{typeof f=="function"&&f(),g(!1)},[f]),O=k.useCallback(()=>{typeof u=="function"&&u(),g(!0)},[u]);return P.createElement(Jo,{begin:o,duration:a,isActive:i,easing:s,from:{t:0},to:{t:1},onAnimationStart:O,onAnimationEnd:p,key:d},w=>{var{t:v}=w,b=[],y=r&&r[0],x=y.startAngle;return r.forEach((_,E)=>{var A=h&&h[E],I=E>0?Xa(_,"paddingAngle",0):0;if(A){var Q=Er(A.endAngle-A.startAngle,_.endAngle-_.startAngle),D=Zt(Zt({},_),{},{startAngle:x+I,endAngle:x+Q(v)+I});b.push(D),x=D.endAngle}else{var{endAngle:j,startAngle:R}=_,B=Er(0,j-R),X=B(v),V=Zt(Zt({},_),{},{startAngle:x+I,endAngle:x+X+I});b.push(V),x=V.endAngle}}),n.current=b,P.createElement(jt,null,P.createElement(WI,{sectors:b,activeShape:l,inactiveShape:c,allOtherPieProps:e,showLabels:!m}))})}function a7e(t){var{sectors:e,isAnimationActive:n,activeShape:r,inactiveShape:i}=t,o=k.useRef(null),a=o.current;return n&&e&&e.length&&(!a||a!==e)?P.createElement(o7e,{props:t,previousSectorsRef:o}):P.createElement(WI,{sectors:e,activeShape:r,inactiveShape:i,allOtherPieProps:t,showLabels:!0})}function s7e(t){var{hide:e,className:n,rootTabIndex:r}=t,i=Ye("recharts-pie",n);return e?null:P.createElement(jt,{tabIndex:r,className:i},P.createElement(a7e,t))}var UI={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!qa.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function l7e(t){var e=Qr(t,UI),n=k.useMemo(()=>Df(t.children,dd),[t.children]),r=Re(e,!1),i=k.useMemo(()=>({name:e.name,nameKey:e.nameKey,tooltipType:e.tooltipType,data:e.data,dataKey:e.dataKey,cx:e.cx,cy:e.cy,startAngle:e.startAngle,endAngle:e.endAngle,minAngle:e.minAngle,paddingAngle:e.paddingAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius,legendType:e.legendType,fill:e.fill,presentationProps:r}),[e.cornerRadius,e.cx,e.cy,e.data,e.dataKey,e.endAngle,e.innerRadius,e.minAngle,e.name,e.nameKey,e.outerRadius,e.paddingAngle,e.startAngle,e.tooltipType,e.legendType,e.fill,r]),o=ve(a=>m8e(a,i,n));return P.createElement(P.Fragment,null,P.createElement(e0,{fn:H8e,args:Zt(Zt({},e),{},{sectors:o})}),P.createElement(s7e,sl({},e,{sectors:o})))}class Fb extends k.PureComponent{constructor(){super(...arguments),n0(this,"id",Va("recharts-pie-"))}render(){return P.createElement(P.Fragment,null,P.createElement(T8e,{data:this.props.data,dataKey:this.props.dataKey,hide:this.props.hide,angleAxisId:0,radiusAxisId:0,stackId:void 0,barSize:void 0,type:"pie"}),P.createElement(U8e,this.props),P.createElement(l7e,this.props),this.props.children)}}n0(Fb,"displayName","Pie"),n0(Fb,"defaultProps",UI);var c7e=Y([ln],t=>{if(t)return{top:t.top,bottom:t.bottom,left:t.left,right:t.right}}),u7e=Y([c7e,Go,Ko],(t,e,n)=>{if(!(!t||e==null||n==null))return{x:t.left,y:t.top,width:Math.max(0,e-t.left-t.right),height:Math.max(0,n-t.top-t.bottom)}}),f7e=t=>{var e=Bn();return ve(n=>hi(n,"xAxis",t,e))},d7e=t=>{var e=Bn();return ve(n=>hi(n,"yAxis",t,e))},r0=()=>ve(u7e),h7e=()=>ve(x9e);function HI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function GI(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?HI(Object(n),!0).forEach(function(r){p7e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):HI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function p7e(t,e,n){return(e=m7e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m7e(t){var e=g7e(t,"string");return typeof e=="symbol"?e:e+""}function g7e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var O7e=t=>{var{point:e,childIndex:n,mainColor:r,activeDot:i,dataKey:o}=t;if(i===!1||e.x==null||e.y==null)return null;var a=GI(GI({index:n,dataKey:o,cx:e.x,cy:e.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:e.payload,value:e.value},Re(i,!1)),Fy(i)),s;return k.isValidElement(i)?s=k.cloneElement(i,a):typeof i=="function"?s=i(a):s=P.createElement(Ib,a),P.createElement(jt,{className:"recharts-active-dot"},s)};function Yb(t){var{points:e,mainColor:n,activeDot:r,itemDataKey:i}=t,o=ve(ts),a=h7e();if(e==null||a==null)return null;var s=e.find(l=>a.includes(l.payload));return ut(s)?null:O7e({point:s,childIndex:Number(o),mainColor:n,dataKey:i,activeDot:r})}var y7e=()=>{var t=Dt();return k.useEffect(()=>(t(O8e()),()=>{t(y8e())})),null},v7e=["children"];function b7e(t,e){if(t==null)return{};var n,r,i=w7e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function w7e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var KI=()=>{},JI=k.createContext({addErrorBar:KI,removeErrorBar:KI}),x7e={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},ej=k.createContext(x7e);function tj(t){var{children:e}=t,n=b7e(t,v7e);return P.createElement(ej.Provider,{value:n},e)}var _7e=()=>k.useContext(ej),qb=t=>{var{children:e,xAxisId:n,yAxisId:r,zAxisId:i,dataKey:o,data:a,stackId:s,hide:l,type:c,barSize:u}=t,[f,d]=P.useState([]),h=k.useCallback(p=>{d(O=>[...O,p])},[d]),m=k.useCallback(p=>{d(O=>O.filter(w=>w!==p))},[d]),g=Bn();return P.createElement(JI.Provider,{value:{addErrorBar:h,removeErrorBar:m}},P.createElement(E8e,{type:c,data:a,xAxisId:n,yAxisId:r,zAxisId:i,dataKey:o,errorBars:f,stackId:s,hide:l,barSize:u,isPanorama:g}),e)};function S7e(t){var{addErrorBar:e,removeErrorBar:n}=k.useContext(JI);return k.useEffect(()=>(e(t),()=>{n(t)}),[e,n,t]),null}var k7e=["direction","width","dataKey","isAnimationActive","animationBegin","animationDuration","animationEasing"];function nj(t,e,n){return(e=C7e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C7e(t){var e=P7e(t,"string");return typeof e=="symbol"?e:e+""}function P7e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function pd(){return pd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},pd.apply(null,arguments)}function E7e(t,e){if(t==null)return{};var n,r,i=T7e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function T7e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function A7e(t){var{direction:e,width:n,dataKey:r,isAnimationActive:i,animationBegin:o,animationDuration:a,animationEasing:s}=t,l=E7e(t,k7e),c=Re(l,!1),{data:u,dataPointFormatter:f,xAxisId:d,yAxisId:h,errorBarOffset:m}=_7e(),g=f7e(d),p=d7e(h);if((g==null?void 0:g.scale)==null||(p==null?void 0:p.scale)==null||u==null||e==="x"&&g.type!=="number")return null;var O=u.map(w=>{var{x:v,y:b,value:y,errorVal:x}=f(w,r,e);if(!x)return null;var _=[],E,A;if(Array.isArray(x)?[E,A]=x:E=A=x,e==="x"){var{scale:I}=g,Q=b+m,D=Q+n,j=Q-n,R=I(y-E),B=I(y+A);_.push({x1:B,y1:D,x2:B,y2:j}),_.push({x1:R,y1:Q,x2:B,y2:Q}),_.push({x1:R,y1:D,x2:R,y2:j})}else if(e==="y"){var{scale:X}=p,V=v+m,K=V-n,ne=V+n,L=X(y-E),fe=X(y+A);_.push({x1:K,y1:fe,x2:ne,y2:fe}),_.push({x1:V,y1:L,x2:V,y2:fe}),_.push({x1:K,y1:L,x2:ne,y2:L})}var oe="".concat(v+m,"px ").concat(b+m,"px");return P.createElement(jt,pd({className:"recharts-errorBar",key:"bar-".concat(_.map(T=>"".concat(T.x1,"-").concat(T.x2,"-").concat(T.y1,"-").concat(T.y2)))},c),_.map(T=>{var W=i?{transformOrigin:"".concat(T.x1-5,"px")}:void 0;return P.createElement(Jo,{from:{transform:"scaleY(0)",transformOrigin:oe},to:{transform:"scaleY(1)",transformOrigin:oe},begin:o,easing:s,isActive:i,duration:a,key:"line-".concat(T.x1,"-").concat(T.x2,"-").concat(T.y1,"-").concat(T.y2),style:{transformOrigin:oe}},P.createElement("line",pd({},T,{style:W})))}))});return P.createElement(jt,{className:"recharts-errorBars"},O)}var rj=k.createContext(void 0);function M7e(t){var e=k.useContext(rj);return t??e??"x"}function ij(t){var{direction:e,children:n}=t;return P.createElement(rj.Provider,{value:e},n)}var oj={stroke:"black",strokeWidth:1.5,width:5,offset:0,isAnimationActive:!0,animationBegin:0,animationDuration:400,animationEasing:"ease-in-out"};function Q7e(t){var e=M7e(t.direction),{width:n,isAnimationActive:r,animationBegin:i,animationDuration:o,animationEasing:a}=Qr(t,oj);return P.createElement(P.Fragment,null,P.createElement(S7e,{dataKey:t.dataKey,direction:e}),P.createElement(A7e,pd({},t,{direction:e,width:n,isAnimationActive:r,animationBegin:i,animationDuration:o,animationEasing:a})))}class aj extends k.Component{render(){return P.createElement(Q7e,this.props)}}nj(aj,"defaultProps",oj),nj(aj,"displayName","ErrorBar");var D7e="Invariant failed";function $7e(t,e){throw new Error(D7e)}var L7e=["x","y"];function Wb(){return Wb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Wb.apply(null,arguments)}function sj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function md(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sj(Object(n),!0).forEach(function(r){I7e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function I7e(t,e,n){return(e=j7e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function j7e(t){var e=N7e(t,"string");return typeof e=="symbol"?e:e+""}function N7e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function R7e(t,e){if(t==null)return{};var n,r,i=B7e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function B7e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Z7e(t,e){var{x:n,y:r}=t,i=R7e(t,L7e),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),c="".concat(e.height||i.height),u=parseInt(c,10),f="".concat(e.width||i.width),d=parseInt(f,10);return md(md(md(md(md({},e),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:d,name:e.name,radius:e.radius})}function lj(t){return P.createElement(FI,Wb({shapeType:"rectangle",propTransformer:Z7e,activeClassName:"recharts-active-bar"},t))}var z7e=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,i)=>{if(ue(e))return e;var o=ue(r)||ut(r);return o?e(r,i):(o||$7e(),n)}};function i0(t,e){var n,r,i=ve(c=>la(c,t)),o=ve(c=>Ja(c,e)),a=(n=i==null?void 0:i.allowDataOverflow)!==null&&n!==void 0?n:Lr.allowDataOverflow,s=(r=o==null?void 0:o.allowDataOverflow)!==null&&r!==void 0?r:Ir.allowDataOverflow,l=a||s;return{needClip:l,needClipX:a,needClipY:s}}function Ub(t){var{xAxisId:e,yAxisId:n,clipPathId:r}=t,i=r0(),{needClipX:o,needClipY:a,needClip:s}=i0(e,n);if(!s)return null;var{x:l,y:c,width:u,height:f}=i;return P.createElement("clipPath",{id:"clipPath-".concat(r)},P.createElement("rect",{x:o?l:l-u/2,y:a?c:c-f/2,width:o?u:u*2,height:a?f:f*2}))}var X7e=["onMouseEnter","onMouseLeave","onClick"],V7e=["value","background","tooltipPosition"],F7e=["onMouseEnter","onClick","onMouseLeave"];function gd(){return gd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},gd.apply(null,arguments)}function cj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?cj(Object(n),!0).forEach(function(r){o0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function o0(t,e,n){return(e=Y7e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Y7e(t){var e=q7e(t,"string");return typeof e=="symbol"?e:e+""}function q7e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Hb(t,e){if(t==null)return{};var n,r,i=W7e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function W7e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var U7e=t=>{var{dataKey:e,name:n,fill:r,legendType:i,hide:o}=t;return[{inactive:o,dataKey:e,type:i,color:r,value:Fa(n,e),payload:t}]};function H7e(t){var{dataKey:e,stroke:n,strokeWidth:r,fill:i,name:o,hide:a,unit:s}=t;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:e,nameKey:void 0,name:Fa(o,e),hide:a,type:t.tooltipType,color:t.fill,unit:s}}}function G7e(t){var e=ve(ts),{data:n,dataKey:r,background:i,allOtherBarProps:o}=t,{onMouseEnter:a,onMouseLeave:s,onClick:l}=o,c=Hb(o,X7e),u=Zb(a,r),f=zb(s),d=Xb(l,r);if(!i||n==null)return null;var h=Re(i,!1);return P.createElement(P.Fragment,null,n.map((m,g)=>{var{value:p,background:O,tooltipPosition:w}=m,v=Hb(m,V7e);if(!O)return null;var b=u(m,g),y=f(m,g),x=d(m,g),_=Zn(Zn(Zn(Zn(Zn({option:i,isActive:String(g)===e},v),{},{fill:"#eee"},O),h),Qf(c,m,g)),{},{onMouseEnter:b,onMouseLeave:y,onClick:x,dataKey:r,index:g,className:"recharts-bar-background-rectangle"});return P.createElement(lj,gd({key:"background-bar-".concat(g)},_))}))}function uj(t){var{data:e,props:n,showLabels:r}=t,i=Re(n,!1),{shape:o,dataKey:a,activeBar:s}=n,l=ve(ts),c=ve(zL),{onMouseEnter:u,onClick:f,onMouseLeave:d}=n,h=Hb(n,F7e),m=Zb(u,a),g=zb(d),p=Xb(f,a);return e?P.createElement(P.Fragment,null,e.map((O,w)=>{var v=s&&String(w)===l&&(c==null||a===c),b=v?s:o,y=Zn(Zn(Zn({},i),O),{},{isActive:v,option:b,index:w,dataKey:a});return P.createElement(jt,gd({className:"recharts-bar-rectangle"},Qf(h,O,w),{onMouseEnter:m(O,w),onMouseLeave:g(O,w),onClick:p(O,w),key:"rectangle-".concat(O==null?void 0:O.x,"-").concat(O==null?void 0:O.y,"-").concat(O==null?void 0:O.value,"-").concat(w)}),P.createElement(lj,y))}),r&&fa.renderCallByParent(n,e)):null}function K7e(t){var{props:e,previousRectanglesRef:n}=t,{data:r,layout:i,isAnimationActive:o,animationBegin:a,animationDuration:s,animationEasing:l,onAnimationEnd:c,onAnimationStart:u}=e,f=n.current,d=t0(e,"recharts-bar-"),[h,m]=k.useState(!1),g=k.useCallback(()=>{typeof c=="function"&&c(),m(!1)},[c]),p=k.useCallback(()=>{typeof u=="function"&&u(),m(!0)},[u]);return P.createElement(Jo,{begin:a,duration:s,isActive:o,easing:l,from:{t:0},to:{t:1},onAnimationEnd:g,onAnimationStart:p,key:d},O=>{var{t:w}=O,v=w===1?r:r.map((b,y)=>{var x=f&&f[y];if(x){var _=Er(x.x,b.x),E=Er(x.y,b.y),A=Er(x.width,b.width),I=Er(x.height,b.height);return Zn(Zn({},b),{},{x:_(w),y:E(w),width:A(w),height:I(w)})}if(i==="horizontal"){var Q=Er(0,b.height),D=Q(w);return Zn(Zn({},b),{},{y:b.y+b.height-D,height:D})}var j=Er(0,b.width),R=j(w);return Zn(Zn({},b),{},{width:R})});return w>0&&(n.current=v),P.createElement(jt,null,P.createElement(uj,{props:e,data:v,showLabels:!h}))})}function J7e(t){var{data:e,isAnimationActive:n}=t,r=k.useRef(null);return n&&e&&e.length&&(r.current==null||r.current!==e)?P.createElement(K7e,{previousRectanglesRef:r,props:t}):P.createElement(uj,{props:t,data:e,showLabels:!0})}var fj=0,ewe=(t,e)=>{var n=Array.isArray(t.value)?t.value[1]:t.value;return{x:t.x,y:t.y,value:n,errorVal:vt(t,e)}};class twe extends k.PureComponent{constructor(){super(...arguments),o0(this,"id",Va("recharts-bar-"))}render(){var{hide:e,data:n,dataKey:r,className:i,xAxisId:o,yAxisId:a,needClip:s,background:l,id:c,layout:u}=this.props;if(e)return null;var f=Ye("recharts-bar",i),d=ut(c)?this.id:c;return P.createElement(jt,{className:f},s&&P.createElement("defs",null,P.createElement(Ub,{clipPathId:d,xAxisId:o,yAxisId:a})),P.createElement(jt,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(d,")"):null},P.createElement(G7e,{data:n,dataKey:r,background:l,allOtherBarProps:this.props}),P.createElement(J7e,this.props)),P.createElement(ij,{direction:u==="horizontal"?"y":"x"},this.props.children))}}var dj={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!qa.isSsr,legendType:"rect",minPointSize:fj,xAxisId:0,yAxisId:0};function nwe(t){var{xAxisId:e,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u}=Qr(t,dj),{needClip:f}=i0(e,n),d=jf(),h=Bn(),m=k.useMemo(()=>({barSize:t.barSize,data:void 0,dataKey:t.dataKey,maxBarSize:t.maxBarSize,minPointSize:o,stackId:Zv(t.stackId)}),[t.barSize,t.dataKey,t.maxBarSize,o,t.stackId]),g=Df(t.children,dd),p=ve(v=>Awe(v,e,n,h,m,g));if(d!=="vertical"&&d!=="horizontal")return null;var O,w=p==null?void 0:p[0];return w==null||w.height==null||w.width==null?O=0:O=d==="vertical"?w.height/2:w.width/2,P.createElement(tj,{xAxisId:e,yAxisId:n,data:p,dataPointFormatter:ewe,errorBarOffset:O},P.createElement(twe,gd({},t,{layout:d,needClip:f,data:p,xAxisId:e,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u})))}function rwe(t){var{layout:e,barSettings:{dataKey:n,minPointSize:r},pos:i,bandSize:o,xAxis:a,yAxis:s,xAxisTicks:l,yAxisTicks:c,stackedData:u,displayedData:f,offset:d,cells:h}=t,m=e==="horizontal"?s:a,g=u?m.scale.domain():null,p=o6e({numericAxis:m});return f.map((O,w)=>{var v,b,y,x,_,E;u?v=e6e(u[w],g):(v=vt(O,n),Array.isArray(v)||(v=[p,v]));var A=z7e(r,fj)(v[1],w);if(e==="horizontal"){var I,[Q,D]=[s.scale(v[0]),s.scale(v[1])];b=mQ({axis:a,ticks:l,bandSize:o,offset:i.offset,entry:O,index:w}),y=(I=D??Q)!==null&&I!==void 0?I:void 0,x=i.size;var j=Q-D;if(_=ur(j)?0:j,E={x:b,y:d.top,width:x,height:d.height},Math.abs(A)>0&&Math.abs(_)<Math.abs(A)){var R=On(_||A)*(Math.abs(A)-Math.abs(_));y-=R,_+=R}}else{var[B,X]=[a.scale(v[0]),a.scale(v[1])];if(b=B,y=mQ({axis:s,ticks:c,bandSize:o,offset:i.offset,entry:O,index:w}),x=X-B,_=i.size,E={x:d.left,y,width:d.width,height:_},Math.abs(A)>0&&Math.abs(x)<Math.abs(A)){var V=On(x||A)*(Math.abs(A)-Math.abs(x));x+=V}}var K=Zn(Zn({},O),{},{x:b,y,width:x,height:_,value:u?v:v[1],payload:O,background:E,tooltipPosition:{x:b+x/2,y:y+_/2}},h&&h[w]&&h[w].props);return K})}class Gb extends k.PureComponent{render(){return P.createElement(qb,{type:"bar",data:null,xAxisId:this.props.xAxisId,yAxisId:this.props.yAxisId,zAxisId:0,dataKey:this.props.dataKey,stackId:this.props.stackId,hide:this.props.hide,barSize:this.props.barSize},P.createElement(y7e,null),P.createElement(Vb,{legendPayload:U7e(this.props)}),P.createElement(e0,{fn:H7e,args:this.props}),P.createElement(nwe,this.props))}}o0(Gb,"displayName","Bar"),o0(Gb,"defaultProps",dj);function hj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function a0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?hj(Object(n),!0).forEach(function(r){iwe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function iwe(t,e,n){return(e=owe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function owe(t){var e=awe(t,"string");return typeof e=="symbol"?e:e+""}function awe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var swe=(t,e)=>e,lwe=(t,e,n)=>n,cwe=(t,e,n,r)=>r,Kb=(t,e,n,r,i)=>i,uwe=(t,e,n,r,i)=>i.maxBarSize,fwe=(t,e,n,r,i,o)=>o,pj=(t,e,n)=>{var r=n??t;if(!ut(r))return Hn(r,e,0)},dwe=Y([qe,od,swe,lwe,cwe],(t,e,n,r,i)=>e.filter(o=>t==="horizontal"?o.xAxisId===n:o.yAxisId===r).filter(o=>o.isPanorama===i).filter(o=>o.hide===!1).filter(o=>o.type==="bar")),hwe=(t,e,n,r)=>{var i=qe(t);return i==="horizontal"?sd(t,"yAxis",n,r):sd(t,"xAxis",e,r)},pwe=(t,e,n)=>{var r=qe(t);return r==="horizontal"?gL(t,"xAxis",e):gL(t,"yAxis",n)};function mwe(t){return t.stackId!=null&&t.dataKey!=null}var gwe=(t,e,n)=>{var r={},i=t.filter(mwe),o=t.filter(c=>c.stackId==null),a=i.reduce((c,u)=>(c[u.stackId]||(c[u.stackId]=[]),c[u.stackId].push(u),c),r),s=Object.entries(a).map(c=>{var[u,f]=c,d=f.map(m=>m.dataKey),h=pj(e,n,f[0].barSize);return{stackId:u,dataKeys:d,barSize:h}}),l=o.map(c=>{var u=[c.dataKey].filter(d=>d!=null),f=pj(e,n,c.barSize);return{stackId:void 0,dataKeys:u,barSize:f}});return[...s,...l]},Owe=Y([dwe,Dbe,pwe],gwe),ywe=(t,e,n,r,i)=>{var o,a,s=qe(t),l=z$(t),{maxBarSize:c}=i,u=ut(c)?l:c,f,d;return s==="horizontal"?(f=hi(t,"xAxis",e,r),d=bo(t,"xAxis",e,r)):(f=hi(t,"yAxis",n,r),d=bo(t,"yAxis",n,r)),(o=(a=Ws(f,d,!0))!==null&&a!==void 0?a:u)!==null&&o!==void 0?o:0},mj=(t,e,n,r)=>{var i=qe(t),o,a;return i==="horizontal"?(o=hi(t,"xAxis",e,r),a=bo(t,"xAxis",e,r)):(o=hi(t,"yAxis",n,r),a=bo(t,"yAxis",n,r)),Ws(o,a)};function vwe(t,e,n,r,i){var o=r.length;if(!(o<1)){var a=Hn(t,n,0,!0),s,l=[];if(An(r[0].barSize)){var c=!1,u=n/o,f=r.reduce((O,w)=>O+(w.barSize||0),0);f+=(o-1)*a,f>=n&&(f-=(o-1)*a,a=0),f>=n&&u>0&&(c=!0,u*=.9,f=o*u);var d=(n-f)/2>>0,h={offset:d-a,size:0};s=r.reduce((O,w)=>{var v,b={stackId:w.stackId,dataKeys:w.dataKeys,position:{offset:h.offset+h.size+a,size:c?u:(v=w.barSize)!==null&&v!==void 0?v:0}},y=[...O,b];return h=y[y.length-1].position,y},l)}else{var m=Hn(e,n,0,!0);n-2*m-(o-1)*a<=0&&(a=0);var g=(n-2*m-(o-1)*a)/o;g>1&&(g>>=0);var p=An(i)?Math.min(g,i):g;s=r.reduce((O,w,v)=>[...O,{stackId:w.stackId,dataKeys:w.dataKeys,position:{offset:m+(g+a)*v+(g-p)/2,size:p}}],l)}return s}}var bwe=(t,e,n,r,i,o,a)=>{var s=ut(a)?e:a,l=vwe(n,r,i!==o?i:o,t,s);return i!==o&&l!=null&&(l=l.map(c=>a0(a0({},c),{},{position:a0(a0({},c.position),{},{offset:c.position.offset-i/2})}))),l},wwe=Y([Owe,z$,Qbe,X$,ywe,mj,uwe],bwe),xwe=(t,e,n,r)=>hi(t,"xAxis",e,r),_we=(t,e,n,r)=>hi(t,"yAxis",n,r),Swe=(t,e,n,r)=>bo(t,"xAxis",e,r),kwe=(t,e,n,r)=>bo(t,"yAxis",n,r),Cwe=Y([wwe,Kb],(t,e)=>{if(t!=null){var n=t.find(r=>r.stackId===e.stackId&&r.dataKeys.includes(e.dataKey));if(n!=null)return n.position}}),Pwe=(t,e)=>{if(!(!t||(e==null?void 0:e.dataKey)==null)){var{stackId:n}=e;if(n!=null){var r=t[n];if(r){var{stackedData:i}=r;if(i){var o=i.find(a=>a.key===e.dataKey);return o}}}}},Ewe=Y([od,Kb],(t,e)=>{if(t.some(n=>n.type==="bar"&&e.dataKey===n.dataKey&&e.stackId===n.stackId&&e.stackId===n.stackId))return e}),Twe=Y([hwe,Kb],Pwe),Awe=Y([ln,xwe,_we,Swe,kwe,Cwe,qe,Dm,mj,Twe,Ewe,fwe],(t,e,n,r,i,o,a,s,l,c,u,f)=>{var{chartData:d,dataStartIndex:h,dataEndIndex:m}=s;if(!(u==null||o==null||a!=="horizontal"&&a!=="vertical"||e==null||n==null||r==null||i==null||l==null)){var{data:g}=u,p;if(g!=null&&g.length>0?p=g:p=d==null?void 0:d.slice(h,m+1),p!=null)return rwe({layout:a,barSettings:u,pos:o,bandSize:l,xAxis:e,yAxis:n,xAxisTicks:r,yAxisTicks:i,stackedData:c,displayedData:p,offset:t,cells:f})}}),gj=t=>{var{chartData:e}=t,n=Dt(),r=Bn();return k.useEffect(()=>r?()=>{}:(n(rI(e)),()=>{n(rI(void 0))}),[e,n,r]),null},Oj={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},Mwe=li({name:"brush",initialState:Oj,reducers:{setBrushSettings(t,e){return e.payload==null?Oj:e.payload}}}),Qwe=Mwe.reducer;function Dwe(t,e,n){return(e=$we(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $we(t){var e=Lwe(t,"string");return typeof e=="symbol"?e:e+""}function Lwe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Jb{static create(e){return new Jb(e)}constructor(e){this.scale=e}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(e){var{bandAware:n,position:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e!==void 0){if(r)switch(r){case"start":return this.scale(e);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(e)+o}default:return this.scale(e)}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}return this.scale(e)}}isInRange(e){var n=this.range(),r=n[0],i=n[n.length-1];return r<=i?e>=r&&e<=i:e>=i&&e<=r}}Dwe(Jb,"EPS",1e-4);function Iwe(t){return(t%180+180)%180}var jwe=function(e){var{width:n,height:r}=e,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Iwe(i),a=o*Math.PI/180,s=Math.atan(r/n),l=a>s&&a<Math.PI-s?r/Math.sin(a):n/Math.cos(a);return Math.abs(l)},Nwe={dots:[],areas:[],lines:[]},Rwe=li({name:"referenceElements",initialState:Nwe,reducers:{addDot:(t,e)=>{t.dots.push(e.payload)},removeDot:(t,e)=>{var n=Ho(t).dots.findIndex(r=>r===e.payload);n!==-1&&t.dots.splice(n,1)},addArea:(t,e)=>{t.areas.push(e.payload)},removeArea:(t,e)=>{var n=Ho(t).areas.findIndex(r=>r===e.payload);n!==-1&&t.areas.splice(n,1)},addLine:(t,e)=>{t.lines.push(e.payload)},removeLine:(t,e)=>{var n=Ho(t).lines.findIndex(r=>r===e.payload);n!==-1&&t.lines.splice(n,1)}}}),Bwe=Rwe.reducer,Zwe=k.createContext(void 0),zwe=t=>{var{children:e}=t,[n]=k.useState("".concat(Va("recharts"),"-clip")),r=r0();if(r==null)return null;var{x:i,y:o,width:a,height:s}=r;return P.createElement(Zwe.Provider,{value:n},P.createElement("defs",null,P.createElement("clipPath",{id:n},P.createElement("rect",{x:i,y:o,height:s,width:a}))),e)};function e5(t,e){for(var n in t)if({}.hasOwnProperty.call(t,n)&&(!{}.hasOwnProperty.call(e,n)||t[n]!==e[n]))return!1;for(var r in e)if({}.hasOwnProperty.call(e,r)&&!{}.hasOwnProperty.call(t,r))return!1;return!0}function yj(t,e,n){if(e<1)return[];if(e===1&&n===void 0)return t;for(var r=[],i=0;i<t.length;i+=e)r.push(t[i]);return r}function Xwe(t,e,n){var r={width:t.width+e.width,height:t.height+e.height};return jwe(r,n)}function Vwe(t,e,n){var r=n==="width",{x:i,y:o,width:a,height:s}=t;return e===1?{start:r?i:o,end:r?i+a:o+s}:{start:r?i+a:o+s,end:r?i:o}}function s0(t,e,n,r,i){if(t*e<t*r||t*e>t*i)return!1;var o=n();return t*(e-t*o/2-r)>=0&&t*(e+t*o/2-i)<=0}function Fwe(t,e){return yj(t,e+1)}function Ywe(t,e,n,r,i){for(var o=(r||[]).slice(),{start:a,end:s}=e,l=0,c=1,u=a,f=function(){var m=r==null?void 0:r[l];if(m===void 0)return{v:yj(r,c)};var g=l,p,O=()=>(p===void 0&&(p=n(m,g)),p),w=m.coordinate,v=l===0||s0(t,w,O,u,s);v||(l=0,u=a,c+=1),v&&(u=w+t*(O()/2+i),l+=c)},d;c<=o.length;)if(d=f(),d)return d.v;return[]}function vj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function zn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vj(Object(n),!0).forEach(function(r){qwe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function qwe(t,e,n){return(e=Wwe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wwe(t){var e=Uwe(t,"string");return typeof e=="symbol"?e:e+""}function Uwe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Hwe(t,e,n,r,i){for(var o=(r||[]).slice(),a=o.length,{start:s}=e,{end:l}=e,c=function(d){var h=o[d],m,g=()=>(m===void 0&&(m=n(h,d)),m);if(d===a-1){var p=t*(h.coordinate+t*g()/2-l);o[d]=h=zn(zn({},h),{},{tickCoord:p>0?h.coordinate-p*t:h.coordinate})}else o[d]=h=zn(zn({},h),{},{tickCoord:h.coordinate});var O=s0(t,h.tickCoord,g,s,l);O&&(l=h.tickCoord-t*(g()/2+i),o[d]=zn(zn({},h),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return o}function Gwe(t,e,n,r,i,o){var a=(r||[]).slice(),s=a.length,{start:l,end:c}=e;if(o){var u=r[s-1],f=n(u,s-1),d=t*(u.coordinate+t*f/2-c);a[s-1]=u=zn(zn({},u),{},{tickCoord:d>0?u.coordinate-d*t:u.coordinate});var h=s0(t,u.tickCoord,()=>f,l,c);h&&(c=u.tickCoord-t*(f/2+i),a[s-1]=zn(zn({},u),{},{isShow:!0}))}for(var m=o?s-1:s,g=function(w){var v=a[w],b,y=()=>(b===void 0&&(b=n(v,w)),b);if(w===0){var x=t*(v.coordinate-t*y()/2-l);a[w]=v=zn(zn({},v),{},{tickCoord:x<0?v.coordinate-x*t:v.coordinate})}else a[w]=v=zn(zn({},v),{},{tickCoord:v.coordinate});var _=s0(t,v.tickCoord,y,l,c);_&&(l=v.tickCoord+t*(y()/2+i),a[w]=zn(zn({},v),{},{isShow:!0}))},p=0;p<m;p++)g(p);return a}function t5(t,e,n){var{tick:r,ticks:i,viewBox:o,minTickGap:a,orientation:s,interval:l,tickFormatter:c,unit:u,angle:f}=t;if(!i||!i.length||!r)return[];if(ue(l)||qa.isSsr){var d;return(d=Fwe(i,ue(l)?l:0))!==null&&d!==void 0?d:[]}var h=[],m=s==="top"||s==="bottom"?"width":"height",g=u&&m==="width"?hd(u,{fontSize:e,letterSpacing:n}):{width:0,height:0},p=(v,b)=>{var y=typeof c=="function"?c(v.value,b):v.value;return m==="width"?Xwe(hd(y,{fontSize:e,letterSpacing:n}),g,f):hd(y,{fontSize:e,letterSpacing:n})[m]},O=i.length>=2?On(i[1].coordinate-i[0].coordinate):1,w=Vwe(o,O,m);return l==="equidistantPreserveStart"?Ywe(O,w,p,i,a):(l==="preserveStart"||l==="preserveStartEnd"?h=Gwe(O,w,p,i,a,l==="preserveStartEnd"):h=Hwe(O,w,p,i,a),h.filter(v=>v.isShow))}var Kwe=["viewBox"],Jwe=["viewBox"];function Nc(){return Nc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Nc.apply(null,arguments)}function bj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function un(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?bj(Object(n),!0).forEach(function(r){n5(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):bj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function wj(t,e){if(t==null)return{};var n,r,i=exe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function exe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function n5(t,e,n){return(e=txe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function txe(t){var e=nxe(t,"string");return typeof e=="symbol"?e:e+""}function nxe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class ns extends k.Component{constructor(e){super(e),this.tickRefs=P.createRef(),this.tickRefs.current=[],this.state={fontSize:"",letterSpacing:""}}shouldComponentUpdate(e,n){var{viewBox:r}=e,i=wj(e,Kwe),o=this.props,{viewBox:a}=o,s=wj(o,Jwe);return!e5(r,a)||!e5(i,s)||!e5(n,this.state)}getTickLineCoord(e){var{x:n,y:r,width:i,height:o,orientation:a,tickSize:s,mirror:l,tickMargin:c}=this.props,u,f,d,h,m,g,p=l?-1:1,O=e.tickSize||s,w=ue(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":u=f=e.coordinate,h=r+ +!l*o,d=h-p*O,g=d-p*c,m=w;break;case"left":d=h=e.coordinate,f=n+ +!l*i,u=f-p*O,m=u-p*c,g=w;break;case"right":d=h=e.coordinate,f=n+ +l*i,u=f+p*O,m=u+p*c,g=w;break;default:u=f=e.coordinate,h=r+ +l*o,d=h+p*O,g=d+p*c,m=w;break}return{line:{x1:u,y1:d,x2:f,y2:h},tick:{x:m,y:g}}}getTickTextAnchor(){var{orientation:e,mirror:n}=this.props,r;switch(e){case"left":r=n?"start":"end";break;case"right":r=n?"end":"start";break;default:r="middle";break}return r}getTickVerticalAnchor(){var{orientation:e,mirror:n}=this.props;switch(e){case"left":case"right":return"middle";case"top":return n?"start":"end";default:return n?"end":"start"}}renderAxisLine(){var{x:e,y:n,width:r,height:i,orientation:o,mirror:a,axisLine:s}=this.props,l=un(un(un({},Re(this.props,!1)),Re(s,!1)),{},{fill:"none"});if(o==="top"||o==="bottom"){var c=+(o==="top"&&!a||o==="bottom"&&a);l=un(un({},l),{},{x1:e,y1:n+c*i,x2:e+r,y2:n+c*i})}else{var u=+(o==="left"&&!a||o==="right"&&a);l=un(un({},l),{},{x1:e+u*r,y1:n,x2:e+u*r,y2:n+i})}return P.createElement("line",Nc({},l,{className:Ye("recharts-cartesian-axis-line",Xa(s,"className"))}))}static renderTickItem(e,n,r){var i,o=Ye(n.className,"recharts-cartesian-axis-tick-value");if(P.isValidElement(e))i=P.cloneElement(e,un(un({},n),{},{className:o}));else if(typeof e=="function")i=e(un(un({},n),{},{className:o}));else{var a="recharts-cartesian-axis-tick-value";typeof e!="boolean"&&(a=Ye(a,e.className)),i=P.createElement(Hm,Nc({},n,{className:a}),r)}return i}renderTicks(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],{tickLine:i,stroke:o,tick:a,tickFormatter:s,unit:l}=this.props,c=t5(un(un({},this.props),{},{ticks:r}),e,n),u=this.getTickTextAnchor(),f=this.getTickVerticalAnchor(),d=Re(this.props,!1),h=Re(a,!1),m=un(un({},d),{},{fill:"none"},Re(i,!1)),g=c.map((p,O)=>{var{line:w,tick:v}=this.getTickLineCoord(p),b=un(un(un(un({textAnchor:u,verticalAnchor:f},d),{},{stroke:"none",fill:o},h),v),{},{index:O,payload:p,visibleTicksCount:c.length,tickFormatter:s});return P.createElement(jt,Nc({className:"recharts-cartesian-axis-tick",key:"tick-".concat(p.value,"-").concat(p.coordinate,"-").concat(p.tickCoord)},Qf(this.props,p,O)),i&&P.createElement("line",Nc({},m,w,{className:Ye("recharts-cartesian-axis-tick-line",Xa(i,"className"))})),a&&ns.renderTickItem(a,b,"".concat(typeof s=="function"?s(p.value,O):p.value).concat(l||"")))});return g.length>0?P.createElement("g",{className:"recharts-cartesian-axis-ticks"},g):null}render(){var{axisLine:e,width:n,height:r,className:i,hide:o}=this.props;if(o)return null;var{ticks:a}=this.props;return n!=null&&n<=0||r!=null&&r<=0?null:P.createElement(jt,{className:Ye("recharts-cartesian-axis",i),ref:s=>{if(s){var l=s.getElementsByClassName("recharts-cartesian-axis-tick-value");this.tickRefs.current=Array.from(l);var c=l[0];if(c){var u=window.getComputedStyle(c).fontSize,f=window.getComputedStyle(c).letterSpacing;(u!==this.state.fontSize||f!==this.state.letterSpacing)&&this.setState({fontSize:window.getComputedStyle(c).fontSize,letterSpacing:window.getComputedStyle(c).letterSpacing})}}}},e&&this.renderAxisLine(),this.renderTicks(this.state.fontSize,this.state.letterSpacing,a),jr.renderCallByParent(this.props))}}n5(ns,"displayName","CartesianAxis"),n5(ns,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var rxe=["x1","y1","x2","y2","key"],ixe=["offset"],oxe=["xAxisId","yAxisId"],axe=["xAxisId","yAxisId"];function xj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Xn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xj(Object(n),!0).forEach(function(r){sxe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function sxe(t,e,n){return(e=lxe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lxe(t){var e=cxe(t,"string");return typeof e=="symbol"?e:e+""}function cxe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ll(){return ll=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ll.apply(null,arguments)}function l0(t,e){if(t==null)return{};var n,r,i=uxe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function uxe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var fxe=t=>{var{fill:e}=t;if(!e||e==="none")return null;var{fillOpacity:n,x:r,y:i,width:o,height:a,ry:s}=t;return P.createElement("rect",{x:r,y:i,ry:s,width:o,height:a,stroke:"none",fill:e,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function _j(t,e){var n;if(P.isValidElement(t))n=P.cloneElement(t,e);else if(typeof t=="function")n=t(e);else{var{x1:r,y1:i,x2:o,y2:a,key:s}=e,l=l0(e,rxe),c=Re(l,!1),u=l0(c,ixe);n=P.createElement("line",ll({},u,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function dxe(t){var{x:e,width:n,horizontal:r=!0,horizontalPoints:i}=t;if(!r||!i||!i.length)return null;var o=l0(t,oxe),a=i.map((s,l)=>{var c=Xn(Xn({},o),{},{x1:e,y1:s,x2:e+n,y2:s,key:"line-".concat(l),index:l});return _j(r,c)});return P.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function hxe(t){var{y:e,height:n,vertical:r=!0,verticalPoints:i}=t;if(!r||!i||!i.length)return null;var o=l0(t,axe),a=i.map((s,l)=>{var c=Xn(Xn({},o),{},{x1:s,y1:e,x2:s,y2:e+n,key:"line-".concat(l),index:l});return _j(r,c)});return P.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function pxe(t){var{horizontalFill:e,fillOpacity:n,x:r,y:i,width:o,height:a,horizontalPoints:s,horizontal:l=!0}=t;if(!l||!e||!e.length)return null;var c=s.map(f=>Math.round(f+i-i)).sort((f,d)=>f-d);i!==c[0]&&c.unshift(0);var u=c.map((f,d)=>{var h=!c[d+1],m=h?i+a-f:c[d+1]-f;if(m<=0)return null;var g=d%e.length;return P.createElement("rect",{key:"react-".concat(d),y:f,x:r,height:m,width:o,stroke:"none",fill:e[g],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function mxe(t){var{vertical:e=!0,verticalFill:n,fillOpacity:r,x:i,y:o,width:a,height:s,verticalPoints:l}=t;if(!e||!n||!n.length)return null;var c=l.map(f=>Math.round(f+i-i)).sort((f,d)=>f-d);i!==c[0]&&c.unshift(0);var u=c.map((f,d)=>{var h=!c[d+1],m=h?i+a-f:c[d+1]-f;if(m<=0)return null;var g=d%n.length;return P.createElement("rect",{key:"react-".concat(d),x:f,y:o,width:m,height:s,stroke:"none",fill:n[g],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var gxe=(t,e)=>{var{xAxis:n,width:r,height:i,offset:o}=t;return dQ(t5(Xn(Xn(Xn({},ns.defaultProps),n),{},{ticks:hQ(n),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,e)},Oxe=(t,e)=>{var{yAxis:n,width:r,height:i,offset:o}=t;return dQ(t5(Xn(Xn(Xn({},ns.defaultProps),n),{},{ticks:hQ(n),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,e)},yxe={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function c0(t){var e=Fv(),n=Yv(),r=SQ(),i=Xn(Xn({},Qr(t,yxe)),{},{x:ue(t.x)?t.x:r.left,y:ue(t.y)?t.y:r.top,width:ue(t.width)?t.width:r.width,height:ue(t.height)?t.height:r.height}),{xAxisId:o,yAxisId:a,x:s,y:l,width:c,height:u,syncWithTicks:f,horizontalValues:d,verticalValues:h}=i,m=Bn(),g=ve(A=>vL(A,"xAxis",o,m)),p=ve(A=>vL(A,"yAxis",a,m));if(!ue(c)||c<=0||!ue(u)||u<=0||!ue(s)||s!==+s||!ue(l)||l!==+l)return null;var O=i.verticalCoordinatesGenerator||gxe,w=i.horizontalCoordinatesGenerator||Oxe,{horizontalPoints:v,verticalPoints:b}=i;if((!v||!v.length)&&typeof w=="function"){var y=d&&d.length,x=w({yAxis:p?Xn(Xn({},p),{},{ticks:y?d:p.ticks}):void 0,width:e,height:n,offset:r},y?!0:f);fd(Array.isArray(x),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof x,"]")),Array.isArray(x)&&(v=x)}if((!b||!b.length)&&typeof O=="function"){var _=h&&h.length,E=O({xAxis:g?Xn(Xn({},g),{},{ticks:_?h:g.ticks}):void 0,width:e,height:n,offset:r},_?!0:f);fd(Array.isArray(E),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof E,"]")),Array.isArray(E)&&(b=E)}return P.createElement("g",{className:"recharts-cartesian-grid"},P.createElement(fxe,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),P.createElement(pxe,ll({},i,{horizontalPoints:v})),P.createElement(mxe,ll({},i,{verticalPoints:b})),P.createElement(dxe,ll({},i,{offset:r,horizontalPoints:v,xAxis:g,yAxis:p})),P.createElement(hxe,ll({},i,{offset:r,verticalPoints:b,xAxis:g,yAxis:p})))}c0.displayName="CartesianGrid";var Sj=(t,e,n,r)=>hi(t,"xAxis",e,r),kj=(t,e,n,r)=>bo(t,"xAxis",e,r),Cj=(t,e,n,r)=>hi(t,"yAxis",n,r),Pj=(t,e,n,r)=>bo(t,"yAxis",n,r),vxe=Y([qe,Sj,Cj,kj,Pj],(t,e,n,r,i)=>go(t,"xAxis")?Ws(e,r,!1):Ws(n,i,!1)),bxe=(t,e,n,r,i)=>i,wxe=Y([od,bxe],(t,e)=>{if(t.some(n=>n.type==="line"&&e.dataKey===n.dataKey&&e.data===n.data))return e}),xxe=Y([qe,Sj,Cj,kj,Pj,wxe,vxe,Dm],(t,e,n,r,i,o,a,s)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:u}=s;if(!(o==null||e==null||n==null||r==null||i==null||r.length===0||i.length===0||a==null)){var{dataKey:f,data:d}=o,h;if(d!=null&&d.length>0?h=d:h=l==null?void 0:l.slice(c,u+1),h!=null)return Zxe({layout:t,xAxis:e,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:f,bandSize:a,displayedData:h})}}),_xe=["type","layout","connectNulls","needClip"],Sxe=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId"];function Ej(t,e){if(t==null)return{};var n,r,i=kxe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function kxe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Tj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ei(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Tj(Object(n),!0).forEach(function(r){u0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function u0(t,e,n){return(e=Cxe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Cxe(t){var e=Pxe(t,"string");return typeof e=="symbol"?e:e+""}function Pxe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Rc(){return Rc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Rc.apply(null,arguments)}var Exe=t=>{var{dataKey:e,name:n,stroke:r,legendType:i,hide:o}=t;return[{inactive:o,dataKey:e,type:i,color:r,value:Fa(n,e),payload:t}]};function Txe(t){var{dataKey:e,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=t;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:e,nameKey:void 0,name:Fa(a,e),hide:s,type:t.tooltipType,color:t.stroke,unit:l}}}var Aj=(t,e)=>"".concat(e,"px ").concat(t-e,"px");function Axe(t,e){for(var n=t.length%2!==0?[...t,0]:t,r=[],i=0;i<e;++i)r=[...r,...n];return r}var Mxe=(t,e,n)=>{var r=n.reduce((f,d)=>f+d);if(!r)return Aj(e,t);for(var i=Math.floor(t/r),o=t%r,a=e-t,s=[],l=0,c=0;l<n.length;c+=n[l],++l)if(c+n[l]>o){s=[...n.slice(0,l),o-c];break}var u=s.length%2===0?[0,a]:[a];return[...Axe(n,i),...s,...u].map(f=>"".concat(f,"px")).join(", ")};function Qxe(t,e){var n;if(P.isValidElement(t))n=P.cloneElement(t,e);else if(typeof t=="function")n=t(e);else{var r=Ye("recharts-line-dot",typeof t!="boolean"?t.className:"");n=P.createElement(Ib,Rc({},e,{className:r}))}return n}function Dxe(t,e){return t==null?!1:e?!0:t.length===1}function $xe(t){var{clipPathId:e,points:n,props:r}=t,{dot:i,dataKey:o,needClip:a}=r;if(!Dxe(n,i))return null;var s=S1(i),l=Re(r,!1),c=Re(i,!0),u=n.map((d,h)=>{var m=Ei(Ei(Ei({key:"dot-".concat(h),r:3},l),c),{},{index:h,cx:d.x,cy:d.y,dataKey:o,value:d.value,payload:d.payload,points:n});return Qxe(i,m)}),f={clipPath:a?"url(#clipPath-".concat(s?"":"dots-").concat(e,")"):null};return P.createElement(jt,Rc({className:"recharts-line-dots",key:"dots"},f),u)}function r5(t){var{clipPathId:e,pathRef:n,points:r,strokeDasharray:i,props:o,showLabels:a}=t,{type:s,layout:l,connectNulls:c,needClip:u}=o,f=Ej(o,_xe),d=Ei(Ei({},Re(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(e,")"):null,points:r,type:s,layout:l,connectNulls:c,strokeDasharray:i??o.strokeDasharray});return P.createElement(P.Fragment,null,(r==null?void 0:r.length)>1&&P.createElement(wc,Rc({},d,{pathRef:n})),P.createElement($xe,{points:r,clipPathId:e,props:o}),a&&fa.renderCallByParent(o,r))}function Lxe(t){try{return t&&t.getTotalLength&&t.getTotalLength()||0}catch{return 0}}function Ixe(t){var{clipPathId:e,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:o}=t,{points:a,strokeDasharray:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:f,animateNewValues:d,width:h,height:m,onAnimationEnd:g,onAnimationStart:p}=n,O=i.current,w=t0(n,"recharts-line-"),[v,b]=k.useState(!1),y=k.useCallback(()=>{typeof g=="function"&&g(),b(!1)},[g]),x=k.useCallback(()=>{typeof p=="function"&&p(),b(!0)},[p]),_=Lxe(r.current),E=o.current;return P.createElement(Jo,{begin:c,duration:u,isActive:l,easing:f,from:{t:0},to:{t:1},onAnimationEnd:y,onAnimationStart:x,key:w},A=>{var{t:I}=A,Q=Er(E,_+E),D=Math.min(Q(I),_),j;if(s){var R="".concat(s).split(/[,\s]+/gim).map(V=>parseFloat(V));j=Mxe(D,_,R)}else j=Aj(_,D);if(O){var B=O.length/a.length,X=I===1?a:a.map((V,K)=>{var ne=Math.floor(K*B);if(O[ne]){var L=O[ne],fe=Er(L.x,V.x),oe=Er(L.y,V.y);return Ei(Ei({},V),{},{x:fe(I),y:oe(I)})}if(d){var T=Er(h*2,V.x),W=Er(m/2,V.y);return Ei(Ei({},V),{},{x:T(I),y:W(I)})}return Ei(Ei({},V),{},{x:V.x,y:V.y})});return i.current=X,P.createElement(r5,{props:n,points:X,clipPathId:e,pathRef:r,showLabels:!v,strokeDasharray:j})}return I>0&&_>0&&(i.current=a,o.current=D),P.createElement(r5,{props:n,points:a,clipPathId:e,pathRef:r,showLabels:!v,strokeDasharray:j})})}function jxe(t){var{clipPathId:e,props:n}=t,{points:r,isAnimationActive:i}=n,o=k.useRef(null),a=k.useRef(0),s=k.useRef(null),l=o.current;return i&&r&&r.length&&l!==r?P.createElement(Ixe,{props:n,clipPathId:e,previousPointsRef:o,longestAnimatedLengthRef:a,pathRef:s}):P.createElement(r5,{props:n,points:r,clipPathId:e,pathRef:s,showLabels:!0})}var Nxe=(t,e)=>({x:t.x,y:t.y,value:t.value,errorVal:vt(t.payload,e)});class Rxe extends k.Component{constructor(){super(...arguments),u0(this,"id",Va("recharts-line-"))}render(){var e,{hide:n,dot:r,points:i,className:o,xAxisId:a,yAxisId:s,top:l,left:c,width:u,height:f,id:d,needClip:h,layout:m}=this.props;if(n)return null;var g=Ye("recharts-line",o),p=ut(d)?this.id:d,{r:O=3,strokeWidth:w=2}=(e=Re(r,!1))!==null&&e!==void 0?e:{r:3,strokeWidth:2},v=S1(r),b=O*2+w;return P.createElement(P.Fragment,null,P.createElement(jt,{className:g},h&&P.createElement("defs",null,P.createElement(Ub,{clipPathId:p,xAxisId:a,yAxisId:s}),!v&&P.createElement("clipPath",{id:"clipPath-dots-".concat(p)},P.createElement("rect",{x:c-b/2,y:l-b/2,width:u+b,height:f+b}))),P.createElement(jxe,{props:this.props,clipPathId:p}),P.createElement(ij,{direction:m==="horizontal"?"y":"x"},P.createElement(tj,{xAxisId:a,yAxisId:s,data:i,dataPointFormatter:Nxe,errorBarOffset:0},this.props.children))),P.createElement(Yb,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var Mj={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!qa.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0};function Bxe(t){var e=Qr(t,Mj),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,hide:c,isAnimationActive:u,label:f,legendType:d,xAxisId:h,yAxisId:m}=e,g=Ej(e,Sxe),{needClip:p}=i0(h,m),{height:O,width:w,x:v,y:b}=r0(),y=jf(),x=Bn(),_=k.useMemo(()=>({dataKey:t.dataKey,data:t.data}),[t.dataKey,t.data]),E=ve(A=>xxe(A,h,m,x,_));return y!=="horizontal"&&y!=="vertical"?null:P.createElement(Rxe,Rc({},g,{connectNulls:s,dot:l,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,isAnimationActive:u,hide:c,label:f,legendType:d,xAxisId:h,yAxisId:m,points:E,layout:y,height:O,width:w,left:v,top:b,needClip:p}))}function Zxe(t){var{layout:e,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,dataKey:a,bandSize:s,displayedData:l}=t;return l.map((c,u)=>{var f=vt(c,a);return e==="horizontal"?{x:im({axis:n,ticks:i,bandSize:s,entry:c,index:u}),y:ut(f)?null:r.scale(f),value:f,payload:c}:{x:ut(f)?null:n.scale(f),y:im({axis:r,ticks:o,bandSize:s,entry:c,index:u}),value:f,payload:c}})}class i5 extends k.PureComponent{render(){return P.createElement(qb,{type:"line",data:this.props.data,xAxisId:this.props.xAxisId,yAxisId:this.props.yAxisId,zAxisId:0,dataKey:this.props.dataKey,stackId:void 0,hide:this.props.hide,barSize:void 0},P.createElement(Vb,{legendPayload:Exe(this.props)}),P.createElement(e0,{fn:Txe,args:this.props}),P.createElement(Bxe,this.props))}}u0(i5,"displayName","Line"),u0(i5,"defaultProps",Mj);var Qj=(t,e,n,r)=>hi(t,"xAxis",e,r),Dj=(t,e,n,r)=>bo(t,"xAxis",e,r),$j=(t,e,n,r)=>hi(t,"yAxis",n,r),Lj=(t,e,n,r)=>bo(t,"yAxis",n,r),zxe=Y([qe,Qj,$j,Dj,Lj],(t,e,n,r,i)=>go(t,"xAxis")?Ws(e,r,!1):Ws(n,i,!1)),Xxe=(t,e,n,r,i)=>{var o,a=qe(t),s=go(a,"xAxis"),l;if(s?l=sd(t,"yAxis",n,r):l=sd(t,"xAxis",e,r),l!=null){var{dataKey:c,stackId:u}=i;if(u!=null){var f=(o=l[u])===null||o===void 0?void 0:o.stackedData;return f==null?void 0:f.find(d=>d.key===c)}}},Vxe=(t,e,n,r,i)=>i,Fxe=Y([od,Vxe],(t,e)=>{if(t.some(n=>n.type==="area"&&e.dataKey===n.dataKey&&Zv(e.stackId)===n.stackId&&e.data===n.data))return e}),Yxe=Y([qe,Qj,$j,Dj,Lj,Xxe,Dm,zxe,Fxe],(t,e,n,r,i,o,a,s,l)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:f}=a;if(!(l==null||t!=="horizontal"&&t!=="vertical"||e==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var{data:d}=l,h;if(d&&d.length>0?h=d:h=c==null?void 0:c.slice(u,f+1),h!=null){var m=void 0;return f_e({layout:t,xAxis:e,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:u,areaSettings:l,stackedData:o,displayedData:h,chartBaseValue:m,bandSize:s})}}}),qxe=["layout","type","stroke","connectNulls","isRange"],Wxe=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function Ij(t,e){if(t==null)return{};var n,r,i=Uxe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Uxe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function jj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function cl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?jj(Object(n),!0).forEach(function(r){f0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function f0(t,e,n){return(e=Hxe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Hxe(t){var e=Gxe(t,"string");return typeof e=="symbol"?e:e+""}function Gxe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function rs(){return rs=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},rs.apply(null,arguments)}function d0(t,e){return t&&t!=="none"?t:e}var Kxe=t=>{var{dataKey:e,name:n,stroke:r,fill:i,legendType:o,hide:a}=t;return[{inactive:a,dataKey:e,type:o,color:d0(r,i),value:Fa(n,e),payload:t}]};function Jxe(t){var{dataKey:e,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=t;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:e,nameKey:void 0,name:Fa(a,e),hide:s,type:t.tooltipType,color:d0(r,o),unit:l}}}var e_e=(t,e)=>{var n;if(P.isValidElement(t))n=P.cloneElement(t,e);else if(typeof t=="function")n=t(e);else{var r=Ye("recharts-area-dot",typeof t!="boolean"?t.className:"");n=P.createElement(Ib,rs({},e,{className:r}))}return n};function t_e(t,e){return t==null?!1:e?!0:t.length===1}function n_e(t){var{clipPathId:e,points:n,props:r}=t,{needClip:i,dot:o,dataKey:a}=r;if(!t_e(n,o))return null;var s=S1(o),l=Re(r,!1),c=Re(o,!0),u=n.map((d,h)=>{var m=cl(cl(cl({key:"dot-".concat(h),r:3},l),c),{},{index:h,cx:d.x,cy:d.y,dataKey:a,value:d.value,payload:d.payload,points:n});return e_e(o,m)}),f={clipPath:i?"url(#clipPath-".concat(s?"":"dots-").concat(e,")"):void 0};return P.createElement(jt,rs({className:"recharts-area-dots"},f),u)}function o5(t){var{points:e,baseLine:n,needClip:r,clipPathId:i,props:o,showLabels:a}=t,{layout:s,type:l,stroke:c,connectNulls:u,isRange:f}=o,d=Ij(o,qxe);return P.createElement(P.Fragment,null,(e==null?void 0:e.length)>1&&P.createElement(jt,{clipPath:r?"url(#clipPath-".concat(i,")"):void 0},P.createElement(wc,rs({},Re(d,!0),{points:e,connectNulls:u,type:l,baseLine:n,layout:s,stroke:"none",className:"recharts-area-area"})),c!=="none"&&P.createElement(wc,rs({},Re(o,!1),{className:"recharts-area-curve",layout:s,type:l,connectNulls:u,fill:"none",points:e})),c!=="none"&&f&&P.createElement(wc,rs({},Re(o,!1),{className:"recharts-area-curve",layout:s,type:l,connectNulls:u,fill:"none",points:n}))),P.createElement(n_e,{points:e,props:o,clipPathId:i}),a&&fa.renderCallByParent(o,e))}function r_e(t){var{alpha:e,baseLine:n,points:r,strokeWidth:i}=t,o=r[0].y,a=r[r.length-1].y;if(!An(o)||!An(a))return null;var s=e*Math.abs(o-a),l=Math.max(...r.map(c=>c.x||0));return ue(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.x||0),l)),ue(l)?P.createElement("rect",{x:0,y:o<a?o:o-s,width:l+(i?parseInt("".concat(i),10):1),height:Math.floor(s)}):null}function i_e(t){var{alpha:e,baseLine:n,points:r,strokeWidth:i}=t,o=r[0].x,a=r[r.length-1].x;if(!An(o)||!An(a))return null;var s=e*Math.abs(o-a),l=Math.max(...r.map(c=>c.y||0));return ue(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.y||0),l)),ue(l)?P.createElement("rect",{x:o<a?o:o-s,y:0,width:s,height:Math.floor(l+(i?parseInt("".concat(i),10):1))}):null}function o_e(t){var{alpha:e,layout:n,points:r,baseLine:i,strokeWidth:o}=t;return n==="vertical"?P.createElement(r_e,{alpha:e,points:r,baseLine:i,strokeWidth:o}):P.createElement(i_e,{alpha:e,points:r,baseLine:i,strokeWidth:o})}function a_e(t){var{needClip:e,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o}=t,{points:a,baseLine:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:f,onAnimationStart:d,onAnimationEnd:h}=r,m=t0(r,"recharts-area-"),[g,p]=k.useState(!0),O=k.useCallback(()=>{typeof h=="function"&&h(),p(!1)},[h]),w=k.useCallback(()=>{typeof d=="function"&&d(),p(!0)},[d]),v=i.current,b=o.current;return P.createElement(Jo,{begin:c,duration:u,isActive:l,easing:f,from:{t:0},to:{t:1},onAnimationEnd:O,onAnimationStart:w,key:m},y=>{var{t:x}=y;if(v){var _=v.length/a.length,E=x===1?a:a.map((I,Q)=>{var D=Math.floor(Q*_);if(v[D]){var j=v[D];return cl(cl({},I),{},{x:mc(j.x,I.x,x),y:mc(j.y,I.y,x)})}return I}),A;return ue(s)?A=mc(b,s,x):ut(s)||ur(s)?A=mc(b,0,x):A=s.map((I,Q)=>{var D=Math.floor(Q*_);if(Array.isArray(b)&&b[D]){var j=b[D];return cl(cl({},I),{},{x:mc(j.x,I.x,x),y:mc(j.y,I.y,x)})}return I}),x>0&&(i.current=E,o.current=A),P.createElement(o5,{points:E,baseLine:A,needClip:e,clipPathId:n,props:r,showLabels:!g})}return x>0&&(i.current=a,o.current=s),P.createElement(jt,null,P.createElement("defs",null,P.createElement("clipPath",{id:"animationClipPath-".concat(n)},P.createElement(o_e,{alpha:x,points:a,baseLine:s,layout:r.layout,strokeWidth:r.strokeWidth}))),P.createElement(jt,{clipPath:"url(#animationClipPath-".concat(n,")")},P.createElement(o5,{points:a,baseLine:s,needClip:e,clipPathId:n,props:r,showLabels:!0})))})}function s_e(t){var{needClip:e,clipPathId:n,props:r}=t,{points:i,baseLine:o,isAnimationActive:a}=r,s=k.useRef(null),l=k.useRef(),c=s.current,u=l.current;return a&&i&&i.length&&(c!==i||u!==o)?P.createElement(a_e,{needClip:e,clipPathId:n,props:r,previousPointsRef:s,previousBaselineRef:l}):P.createElement(o5,{points:i,baseLine:o,needClip:e,clipPathId:n,props:r,showLabels:!0})}class l_e extends k.PureComponent{constructor(){super(...arguments),f0(this,"id",Va("recharts-area-"))}render(){var e,{hide:n,dot:r,points:i,className:o,top:a,left:s,needClip:l,xAxisId:c,yAxisId:u,width:f,height:d,id:h,baseLine:m}=this.props;if(n)return null;var g=Ye("recharts-area",o),p=ut(h)?this.id:h,{r:O=3,strokeWidth:w=2}=(e=Re(r,!1))!==null&&e!==void 0?e:{r:3,strokeWidth:2},v=S1(r),b=O*2+w;return P.createElement(P.Fragment,null,P.createElement(jt,{className:g},l&&P.createElement("defs",null,P.createElement(Ub,{clipPathId:p,xAxisId:c,yAxisId:u}),!v&&P.createElement("clipPath",{id:"clipPath-dots-".concat(p)},P.createElement("rect",{x:s-b/2,y:a-b/2,width:f+b,height:d+b}))),P.createElement(s_e,{needClip:l,clipPathId:p,props:this.props})),P.createElement(Yb,{points:i,mainColor:d0(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}),this.props.isRange&&Array.isArray(m)&&P.createElement(Yb,{points:m,mainColor:d0(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}))}}var Nj={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:!qa.isSsr,legendType:"line",stroke:"#3182bd",xAxisId:0,yAxisId:0};function c_e(t){var e,n=Qr(t,Nj),{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,fill:c,fillOpacity:u,hide:f,isAnimationActive:d,legendType:h,stroke:m,xAxisId:g,yAxisId:p}=n,O=Ij(n,Wxe),w=jf(),v=YL(),{needClip:b}=i0(g,p),y=Bn(),x=k.useMemo(()=>({baseValue:t.baseValue,stackId:t.stackId,connectNulls:s,data:t.data,dataKey:t.dataKey}),[t.baseValue,t.stackId,s,t.data,t.dataKey]),{points:_,isRange:E,baseLine:A}=(e=ve(R=>Yxe(R,g,p,y,x)))!==null&&e!==void 0?e:{},{height:I,width:Q,x:D,y:j}=r0();return w!=="horizontal"&&w!=="vertical"||v!=="AreaChart"&&v!=="ComposedChart"?null:P.createElement(l_e,rs({},O,{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,baseLine:A,connectNulls:s,dot:l,fill:c,fillOpacity:u,height:I,hide:f,layout:w,isAnimationActive:d,isRange:E,legendType:h,needClip:b,points:_,stroke:m,width:Q,left:D,top:j,xAxisId:g,yAxisId:p}))}var u_e=(t,e,n,r,i)=>{var o=n??e;if(ue(o))return o;var a=t==="horizontal"?i:r,s=a.scale.domain();if(a.type==="number"){var l=Math.max(s[0],s[1]),c=Math.min(s[0],s[1]);return o==="dataMin"?c:o==="dataMax"||l<0?l:Math.max(Math.min(s[0],s[1]),0)}return o==="dataMin"?s[0]:o==="dataMax"?s[1]:s[0]};function f_e(t){var{areaSettings:{connectNulls:e,baseValue:n,dataKey:r},stackedData:i,layout:o,chartBaseValue:a,xAxis:s,yAxis:l,displayedData:c,dataStartIndex:u,xAxisTicks:f,yAxisTicks:d,bandSize:h}=t,m=i&&i.length,g=u_e(o,a,n,s,l),p=o==="horizontal",O=!1,w=c.map((b,y)=>{var x;m?x=i[u+y]:(x=vt(b,r),Array.isArray(x)?O=!0:x=[g,x]);var _=x[1]==null||m&&!e&&vt(b,r)==null;return p?{x:im({axis:s,ticks:f,bandSize:h,entry:b,index:y}),y:_?null:l.scale(x[1]),value:x,payload:b}:{x:_?null:s.scale(x[1]),y:im({axis:l,ticks:d,bandSize:h,entry:b,index:y}),value:x,payload:b}}),v;return m||O?v=w.map(b=>{var y=Array.isArray(b.value)?b.value[0]:null;return p?{x:b.x,y:y!=null&&b.y!=null?l.scale(y):null}:{x:y!=null?s.scale(y):null,y:b.y}}):v=p?l.scale(g):s.scale(g),{points:w,baseLine:v,isRange:O}}class a5 extends k.PureComponent{render(){return P.createElement(qb,{type:"area",data:this.props.data,dataKey:this.props.dataKey,xAxisId:this.props.xAxisId,yAxisId:this.props.yAxisId,zAxisId:0,stackId:this.props.stackId,hide:this.props.hide,barSize:void 0},P.createElement(Vb,{legendPayload:Kxe(this.props)}),P.createElement(e0,{fn:Jxe,args:this.props}),P.createElement(c_e,this.props))}}f0(a5,"displayName","Area"),f0(a5,"defaultProps",Nj);function Rj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Bj(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Rj(Object(n),!0).forEach(function(r){d_e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function d_e(t,e,n){return(e=h_e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h_e(t){var e=p_e(t,"string");return typeof e=="symbol"?e:e+""}function p_e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var m_e={xAxis:{},yAxis:{},zAxis:{}},Zj=li({name:"cartesianAxis",initialState:m_e,reducers:{addXAxis(t,e){t.xAxis[e.payload.id]=e.payload},removeXAxis(t,e){delete t.xAxis[e.payload.id]},addYAxis(t,e){t.yAxis[e.payload.id]=e.payload},removeYAxis(t,e){delete t.yAxis[e.payload.id]},addZAxis(t,e){t.zAxis[e.payload.id]=e.payload},removeZAxis(t,e){delete t.zAxis[e.payload.id]},updateYAxisWidth(t,e){var{id:n,width:r}=e.payload;t.yAxis[n]&&(t.yAxis[n]=Bj(Bj({},t.yAxis[n]),{},{width:r}))}}}),{addXAxis:g_e,removeXAxis:O_e,addYAxis:y_e,removeYAxis:v_e,addZAxis:$Ce,removeZAxis:LCe,updateYAxisWidth:b_e}=Zj.actions,w_e=Zj.reducer,x_e=["children"],__e=["dangerouslySetInnerHTML","ticks"];function zj(t,e,n){return(e=S_e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function S_e(t){var e=k_e(t,"string");return typeof e=="symbol"?e:e+""}function k_e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function s5(){return s5=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s5.apply(null,arguments)}function Xj(t,e){if(t==null)return{};var n,r,i=C_e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function C_e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function P_e(t){var e=Dt(),n=k.useMemo(()=>{var o=Xj(t,x_e);return o},[t]),r=ve(o=>la(o,n.id)),i=n===r;return k.useEffect(()=>(e(g_e(n)),()=>{e(O_e(n))}),[n,e]),i?t.children:null}var E_e=t=>{var{xAxisId:e,className:n}=t,r=ve(_Q),i=Bn(),o="xAxis",a=ve(f=>Dc(f,o,e,i)),s=ve(f=>bL(f,o,e,i)),l=ve(f=>pL(f,e)),c=ve(f=>k5e(f,e));if(l==null||c==null)return null;var u=Xj(t,__e);return P.createElement(ns,s5({},u,{scale:a,x:c.x,y:c.y,width:l.width,height:l.height,className:Ye("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:s}))},T_e=t=>{var e,n,r,i,o;return P.createElement(P_e,{interval:(e=t.interval)!==null&&e!==void 0?e:"preserveEnd",id:t.xAxisId,scale:t.scale,type:t.type,padding:t.padding,allowDataOverflow:t.allowDataOverflow,domain:t.domain,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,includeHidden:(n=t.includeHidden)!==null&&n!==void 0?n:!1,reversed:t.reversed,ticks:t.ticks,height:t.height,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:(r=t.angle)!==null&&r!==void 0?r:0,minTickGap:(i=t.minTickGap)!==null&&i!==void 0?i:5,tick:(o=t.tick)!==null&&o!==void 0?o:!0,tickFormatter:t.tickFormatter},P.createElement(E_e,t))};let l5=class extends k.Component{render(){return P.createElement(T_e,this.props)}};zj(l5,"displayName","XAxis"),zj(l5,"defaultProps",{allowDataOverflow:Lr.allowDataOverflow,allowDecimals:Lr.allowDecimals,allowDuplicatedCategory:Lr.allowDuplicatedCategory,height:Lr.height,hide:!1,mirror:Lr.mirror,orientation:Lr.orientation,padding:Lr.padding,reversed:Lr.reversed,scale:Lr.scale,tickCount:Lr.tickCount,type:Lr.type,xAxisId:0});var A_e=t=>{var{ticks:e,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:o=0}=t,a=0;if(e){e.forEach(u=>{if(u){var f=u.getBoundingClientRect();f.width>a&&(a=f.width)}});var s=n?n.getBoundingClientRect().width:0,l=i+o,c=a+l+s+(n?r:0);return Math.round(c)}return 0},M_e=["dangerouslySetInnerHTML","ticks"];function Vj(t,e,n){return(e=Q_e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Q_e(t){var e=D_e(t,"string");return typeof e=="symbol"?e:e+""}function D_e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function c5(){return c5=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c5.apply(null,arguments)}function $_e(t,e){if(t==null)return{};var n,r,i=L_e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function L_e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function I_e(t){var e=Dt();return k.useEffect(()=>(e(y_e(t)),()=>{e(v_e(t))}),[t,e]),null}var j_e=t=>{var e,{yAxisId:n,className:r,width:i,label:o}=t,a=k.useRef(null),s=k.useRef(null),l=ve(_Q),c=Bn(),u=Dt(),f="yAxis",d=ve(O=>Dc(O,f,n,c)),h=ve(O=>mL(O,n)),m=ve(O=>C5e(O,n)),g=ve(O=>bL(O,f,n,c));if(k.useLayoutEffect(()=>{var O;if(!(i!=="auto"||!h||$b(o)||k.isValidElement(o))){var w=a.current,v=w==null||(O=w.tickRefs)===null||O===void 0?void 0:O.current,{tickSize:b,tickMargin:y}=w.props,x=A_e({ticks:v,label:s.current,labelGapWithTick:5,tickSize:b,tickMargin:y});Math.round(h.width)!==Math.round(x)&&u(b_e({id:n,width:x}))}},[a,a==null||(e=a.current)===null||e===void 0||(e=e.tickRefs)===null||e===void 0?void 0:e.current,h==null?void 0:h.width,h,u,o,n,i]),h==null||m==null)return null;var p=$_e(t,M_e);return P.createElement(ns,c5({},p,{ref:a,labelRef:s,scale:d,x:m.x,y:m.y,width:h.width,height:h.height,className:Ye("recharts-".concat(f," ").concat(f),r),viewBox:l,ticks:g}))},N_e=t=>{var e,n,r,i,o;return P.createElement(P.Fragment,null,P.createElement(I_e,{interval:(e=t.interval)!==null&&e!==void 0?e:"preserveEnd",id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:(n=t.includeHidden)!==null&&n!==void 0?n:!1,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:(r=t.angle)!==null&&r!==void 0?r:0,minTickGap:(i=t.minTickGap)!==null&&i!==void 0?i:5,tick:(o=t.tick)!==null&&o!==void 0?o:!0,tickFormatter:t.tickFormatter}),P.createElement(j_e,t))},R_e={allowDataOverflow:Ir.allowDataOverflow,allowDecimals:Ir.allowDecimals,allowDuplicatedCategory:Ir.allowDuplicatedCategory,hide:!1,mirror:Ir.mirror,orientation:Ir.orientation,padding:Ir.padding,reversed:Ir.reversed,scale:Ir.scale,tickCount:Ir.tickCount,type:Ir.type,width:Ir.width,yAxisId:0};let u5=class extends k.Component{render(){return P.createElement(N_e,this.props)}};Vj(u5,"displayName","YAxis"),Vj(u5,"defaultProps",R_e);var f5={};/**
817
+ `).concat(b.x,",").concat(b.y),x=ut(t.id)?Va("recharts-radial-line-"):t.id;return P.createElement("text",ua({},n,{dominantBaseline:"central",className:Ye("recharts-radial-bar-label",a)}),P.createElement("defs",null,P.createElement("path",{id:x,d:y})),P.createElement("textPath",{xlinkHref:"#".concat(x)},e))},N4e=t=>{var{viewBox:e,offset:n,position:r}=t,{cx:i,cy:o,innerRadius:a,outerRadius:s,startAngle:l,endAngle:c}=e,u=(l+c)/2;if(r==="outside"){var{x:f,y:d}=tn(i,o,s+n,u);return{x:f,y:d,textAnchor:f>=i?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:i,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:i,y:o,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:i,y:o,textAnchor:"middle",verticalAnchor:"end"};var h=(a+s)/2,{x:m,y:g}=tn(i,o,h,u);return{x:m,y:g,textAnchor:"middle",verticalAnchor:"middle"}},R4e=(t,e)=>{var{parentViewBox:n,offset:r,position:i}=t,{x:o,y:a,width:s,height:l}=e,c=l>=0?1:-1,u=c*r,f=c>0?"end":"start",d=c>0?"start":"end",h=s>=0?1:-1,m=h*r,g=h>0?"end":"start",p=h>0?"start":"end";if(i==="top"){var O={x:o+s/2,y:a-c*r,textAnchor:"middle",verticalAnchor:f};return rn(rn({},O),n?{height:Math.max(a-n.y,0),width:s}:{})}if(i==="bottom"){var w={x:o+s/2,y:a+l+u,textAnchor:"middle",verticalAnchor:d};return rn(rn({},w),n?{height:Math.max(n.y+n.height-(a+l),0),width:s}:{})}if(i==="left"){var v={x:o-m,y:a+l/2,textAnchor:g,verticalAnchor:"middle"};return rn(rn({},v),n?{width:Math.max(v.x-n.x,0),height:l}:{})}if(i==="right"){var b={x:o+s+m,y:a+l/2,textAnchor:p,verticalAnchor:"middle"};return rn(rn({},b),n?{width:Math.max(n.x+n.width-b.x,0),height:l}:{})}var y=n?{width:s,height:l}:{};return i==="insideLeft"?rn({x:o+m,y:a+l/2,textAnchor:p,verticalAnchor:"middle"},y):i==="insideRight"?rn({x:o+s-m,y:a+l/2,textAnchor:g,verticalAnchor:"middle"},y):i==="insideTop"?rn({x:o+s/2,y:a+u,textAnchor:"middle",verticalAnchor:d},y):i==="insideBottom"?rn({x:o+s/2,y:a+l-u,textAnchor:"middle",verticalAnchor:f},y):i==="insideTopLeft"?rn({x:o+m,y:a+u,textAnchor:p,verticalAnchor:d},y):i==="insideTopRight"?rn({x:o+s-m,y:a+u,textAnchor:g,verticalAnchor:d},y):i==="insideBottomLeft"?rn({x:o+m,y:a+l-u,textAnchor:p,verticalAnchor:f},y):i==="insideBottomRight"?rn({x:o+s-m,y:a+l-u,textAnchor:g,verticalAnchor:f},y):i&&typeof i=="object"&&(ue(i.x)||Zs(i.x))&&(ue(i.y)||Zs(i.y))?rn({x:o+Hn(i.x,s),y:a+Hn(i.y,l),textAnchor:"end",verticalAnchor:"end"},y):rn({x:o+s/2,y:a+l/2,textAnchor:"middle",verticalAnchor:"middle"},y)},B4e=t=>"cx"in t&&ue(t.cx);function jr(t){var{offset:e=5}=t,n=_I(t,T4e),r=rn({offset:e},n),{viewBox:i,position:o,value:a,children:s,content:l,className:c="",textBreakAll:u,labelRef:f}=r,d=Vv(),h=i||d;if(!h||ut(a)&&ut(s)&&!k.isValidElement(l)&&typeof l!="function")return null;if(k.isValidElement(l)){var m=_I(r,A4e);return k.cloneElement(l,m)}var g;if(typeof l=="function"){if(g=k.createElement(l,r),k.isValidElement(g))return g}else g=L4e(r);var p=B4e(h),O=Re(r,!0);if(p&&(o==="insideStart"||o==="insideEnd"||o==="end"))return j4e(r,g,O);var w=p?N4e(r):R4e(r,h);return P.createElement(Hm,ua({ref:f,className:Ye("recharts-label",c)},O,w,{breakAll:u}),g)}jr.displayName="Label";var kI=t=>{var{cx:e,cy:n,angle:r,startAngle:i,endAngle:o,r:a,radius:s,innerRadius:l,outerRadius:c,x:u,y:f,top:d,left:h,width:m,height:g,clockWise:p,labelViewBox:O}=t;if(O)return O;if(ue(m)&&ue(g)){if(ue(u)&&ue(f))return{x:u,y:f,width:m,height:g};if(ue(d)&&ue(h))return{x:d,y:h,width:m,height:g}}if(ue(u)&&ue(f))return{x:u,y:f,width:0,height:0};if(ue(e)&&ue(n))return{cx:e,cy:n,startAngle:i||r||0,endAngle:o||r||0,innerRadius:l||0,outerRadius:c||s||a||0,clockWise:p};if(t.viewBox)return t.viewBox},Z4e=(t,e,n)=>{if(!t)return null;var r={viewBox:e,labelRef:n};return t===!0?P.createElement(jr,ua({key:"label-implicit"},r)):mo(t)?P.createElement(jr,ua({key:"label-implicit",value:t},r)):k.isValidElement(t)?t.type===jr?k.cloneElement(t,rn({key:"label-implicit"},r)):P.createElement(jr,ua({key:"label-implicit",content:t},r)):$b(t)?P.createElement(jr,ua({key:"label-implicit",content:t},r)):t&&typeof t=="object"?P.createElement(jr,ua({},t,{key:"label-implicit"},r)):null},z4e=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var{children:i,labelRef:o}=e,a=kI(e),s=Df(i,jr).map((c,u)=>k.cloneElement(c,{viewBox:n||a,key:"label-".concat(u)}));if(!r)return s;var l=Z4e(e.label,n||a,o);return[l,...s]};jr.parseViewBox=kI,jr.renderCallByParent=z4e;var CI={},PI={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n){return n[n.length-1]}t.last=e})(PI);var EI={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n){return Array.isArray(n)?n:Array.from(n)}t.toArray=e})(EI),function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=PI,n=EI,r=$1;function i(o){if(r.isArrayLike(o))return e.last(n.toArray(o))}t.last=i}(CI);var X4e=CI.last;const V4e=Br(X4e);var F4e=["valueAccessor"],Y4e=["data","dataKey","clockWise","id","textBreakAll"];function Gm(){return Gm=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Gm.apply(null,arguments)}function TI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function AI(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?TI(Object(n),!0).forEach(function(r){q4e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):TI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function q4e(t,e,n){return(e=W4e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function W4e(t){var e=U4e(t,"string");return typeof e=="symbol"?e:e+""}function U4e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function MI(t,e){if(t==null)return{};var n,r,i=H4e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function H4e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var G4e=t=>Array.isArray(t.value)?V4e(t.value):t.value;function fa(t){var{valueAccessor:e=G4e}=t,n=MI(t,F4e),{data:r,dataKey:i,clockWise:o,id:a,textBreakAll:s}=n,l=MI(n,Y4e);return!r||!r.length?null:P.createElement(jt,{className:"recharts-label-list"},r.map((c,u)=>{var f=ut(i)?e(c,u):vt(c&&c.payload,i),d=ut(a)?{}:{id:"".concat(a,"-").concat(u)};return P.createElement(jr,Gm({},Re(c,!0),l,d,{parentViewBox:c.parentViewBox,value:f,textBreakAll:s,viewBox:jr.parseViewBox(ut(o)?c:AI(AI({},c),{},{clockWise:o})),key:"label-".concat(u),index:u}))}))}fa.displayName="LabelList";function K4e(t,e){return t?t===!0?P.createElement(fa,{key:"labelList-implicit",data:e}):P.isValidElement(t)||$b(t)?P.createElement(fa,{key:"labelList-implicit",data:e,content:t}):typeof t=="object"?P.createElement(fa,Gm({data:e},t,{key:"labelList-implicit"})):null:null}function J4e(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var{children:r}=t,i=Df(r,fa).map((a,s)=>k.cloneElement(a,{data:e,key:"labelList-".concat(s)}));if(!n)return i;var o=K4e(t.label,e);return[o,...i]}fa.renderCallByParent=J4e;function Lb(){return Lb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Lb.apply(null,arguments)}var Ib=t=>{var{cx:e,cy:n,r,className:i}=t,o=Ye("recharts-dot",i);return e===+e&&n===+n&&r===+r?P.createElement("circle",Lb({},Re(t,!1),Fy(t),{className:o,cx:e,cy:n,r})):null},QI=t=>t.graphicalItems.polarItems,e7e=Y([qt,rd],tb),jb=Y([QI,Wt,e7e],nb),t7e=Y([jb],rb),Nb=Y([t7e,Z2],ib),n7e=Y([Nb,Wt,jb],ob),r7e=Y([Nb,Wt,jb],(t,e,n)=>n.length>0?t.flatMap(r=>n.flatMap(i=>{var o,a=vt(r,(o=e.dataKey)!==null&&o!==void 0?o:i.dataKey);return{value:a,errorDomain:[]}})).filter(Boolean):(e==null?void 0:e.dataKey)!=null?t.map(r=>({value:vt(r,e.dataKey),errorDomain:[]})):t.map(r=>({value:r,errorDomain:[]}))),DI=()=>{},i7e=Y([Wt,lL,DI,r7e,DI],lb),$I=Y([Wt,qe,Nb,n7e,nd,qt,i7e],cb),o7e=Y([$I,Wt,Qc],db);Y([Wt,$I,o7e,qt],pb);var a7e={radiusAxis:{},angleAxis:{}},s7e=li({name:"polarAxis",initialState:a7e,reducers:{addRadiusAxis(t,e){t.radiusAxis[e.payload.id]=e.payload},removeRadiusAxis(t,e){delete t.radiusAxis[e.payload.id]},addAngleAxis(t,e){t.angleAxis[e.payload.id]=e.payload},removeAngleAxis(t,e){delete t.angleAxis[e.payload.id]}}}),l7e=s7e.reducer;function LI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function II(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?LI(Object(n),!0).forEach(function(r){c7e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):LI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function c7e(t,e,n){return(e=u7e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u7e(t){var e=f7e(t,"string");return typeof e=="symbol"?e:e+""}function f7e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Rb=(t,e)=>e,d7e=[],Bb=(t,e,n)=>(n==null?void 0:n.length)===0?d7e:n,jI=Y([Z2,Rb,Bb],(t,e,n)=>{var{chartData:r}=t,i;if((e==null?void 0:e.data)!=null&&e.data.length>0?i=e.data:i=r,(!i||!i.length)&&n!=null&&(i=n.map(o=>II(II({},e.presentationProps),o.props))),i!=null)return i}),h7e=Y([jI,Rb,Bb],(t,e,n)=>{if(t!=null)return t.map((r,i)=>{var o,a=vt(r,e.nameKey,e.name),s;return n!=null&&(o=n[i])!==null&&o!==void 0&&(o=o.props)!==null&&o!==void 0&&o.fill?s=n[i].props.fill:typeof r=="object"&&r!=null&&"fill"in r?s=r.fill:s=e.fill,{value:Fa(a,e.dataKey),color:s,payload:r,type:e.legendType}})}),p7e=Y([QI,Rb],(t,e)=>{if(t.some(n=>n.type==="pie"&&e.dataKey===n.dataKey&&e.data===n.data))return e}),m7e=Y([jI,p7e,Bb,ln],(t,e,n,r)=>{if(!(e==null||t==null))return i8e({offset:r,pieSettings:e,displayedData:t,cells:n})}),g7e={countOfBars:0,cartesianItems:[],polarItems:[]},NI=li({name:"graphicalItems",initialState:g7e,reducers:{addBar(t){t.countOfBars+=1},removeBar(t){t.countOfBars-=1},addCartesianGraphicalItem(t,e){t.cartesianItems.push(e.payload)},replaceCartesianGraphicalItem(t,e){var{prev:n,next:r}=e.payload,i=Ho(t).cartesianItems.indexOf(n);i>-1&&(t.cartesianItems[i]=r)},removeCartesianGraphicalItem(t,e){var n=Ho(t).cartesianItems.indexOf(e.payload);n>-1&&t.cartesianItems.splice(n,1)},addPolarGraphicalItem(t,e){t.polarItems.push(e.payload)},removePolarGraphicalItem(t,e){var n=Ho(t).polarItems.indexOf(e.payload);n>-1&&t.polarItems.splice(n,1)}}}),{addBar:O7e,removeBar:y7e,addCartesianGraphicalItem:v7e,replaceCartesianGraphicalItem:b7e,removeCartesianGraphicalItem:w7e,addPolarGraphicalItem:x7e,removePolarGraphicalItem:_7e}=NI.actions,S7e=NI.reducer;function RI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function BI(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?RI(Object(n),!0).forEach(function(r){k7e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):RI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function k7e(t,e,n){return(e=C7e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C7e(t){var e=P7e(t,"string");return typeof e=="symbol"?e:e+""}function P7e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function E7e(t){var e=Dt(),n=k.useRef(null);return k.useEffect(()=>{var r=BI(BI({},t),{},{stackId:Zv(t.stackId)});n.current===null?e(v7e(r)):n.current!==r&&e(b7e({prev:n.current,next:r})),n.current=r},[e,t]),k.useEffect(()=>()=>{n.current&&(e(w7e(n.current)),n.current=null)},[e]),null}function T7e(t){var e=Dt();return k.useEffect(()=>(e(x7e(t)),()=>{e(_7e(t))}),[e,t]),null}var ZI={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n){var i;if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const o=n[Symbol.toStringTag];return o==null||!((i=Object.getOwnPropertyDescriptor(n,Symbol.toStringTag))!=null&&i.writable)?!1:n.toString()===`[object ${o}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}t.isPlainObject=e})(ZI);var A7e=ZI.isPlainObject;const M7e=Br(A7e);function Km(){return Km=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Km.apply(null,arguments)}var zI=(t,e,n,r,i)=>{var o=n-r,a;return a="M ".concat(t,",").concat(e),a+="L ".concat(t+n,",").concat(e),a+="L ".concat(t+n-o/2,",").concat(e+i),a+="L ".concat(t+n-o/2-r,",").concat(e+i),a+="L ".concat(t,",").concat(e," Z"),a},Q7e={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},D7e=t=>{var e=Qr(t,Q7e),n=k.useRef(),[r,i]=k.useState(-1);k.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var p=n.current.getTotalLength();p&&i(p)}catch{}},[]);var{x:o,y:a,upperWidth:s,lowerWidth:l,height:c,className:u}=e,{animationEasing:f,animationDuration:d,animationBegin:h,isUpdateAnimationActive:m}=e;if(o!==+o||a!==+a||s!==+s||l!==+l||c!==+c||s===0&&l===0||c===0)return null;var g=Ye("recharts-trapezoid",u);return m?P.createElement(Jo,{canBegin:r>0,from:{upperWidth:0,lowerWidth:0,height:c,x:o,y:a},to:{upperWidth:s,lowerWidth:l,height:c,x:o,y:a},duration:d,animationEasing:f,isActive:m},p=>{var{upperWidth:O,lowerWidth:w,height:v,x:b,y}=p;return P.createElement(Jo,{canBegin:r>0,from:"0px ".concat(r===-1?1:r,"px"),to:"".concat(r,"px 0px"),attributeName:"strokeDasharray",begin:h,duration:d,easing:f},P.createElement("path",Km({},Re(e,!0),{className:g,d:zI(b,y,O,w,v),ref:n})))}):P.createElement("g",null,P.createElement("path",Km({},Re(e,!0),{className:g,d:zI(o,a,s,l,c)})))},$7e=["option","shapeType","propTransformer","activeClassName","isActive"];function L7e(t,e){if(t==null)return{};var n,r,i=I7e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function I7e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function XI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Jm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?XI(Object(n),!0).forEach(function(r){j7e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):XI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function j7e(t,e,n){return(e=N7e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function N7e(t){var e=R7e(t,"string");return typeof e=="symbol"?e:e+""}function R7e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function B7e(t,e){return Jm(Jm({},e),t)}function Z7e(t,e){return t==="symbols"}function VI(t){var{shapeType:e,elementProps:n}=t;switch(e){case"rectangle":return P.createElement(JQ,n);case"trapezoid":return P.createElement(D7e,n);case"sector":return P.createElement(nD,n);case"symbols":if(Z7e(e))return P.createElement(av,n);break;default:return null}}function z7e(t){return k.isValidElement(t)?t.props:t}function FI(t){var{option:e,shapeType:n,propTransformer:r=B7e,activeClassName:i="recharts-active-shape",isActive:o}=t,a=L7e(t,$7e),s;if(k.isValidElement(e))s=k.cloneElement(e,Jm(Jm({},a),z7e(e)));else if(typeof e=="function")s=e(a);else if(M7e(e)&&typeof e!="boolean"){var l=r(e,a);s=P.createElement(VI,{shapeType:n,elementProps:l})}else{var c=a;s=P.createElement(VI,{shapeType:n,elementProps:c})}return o?P.createElement(jt,{className:i},s):s}var Zb=(t,e)=>{var n=Dt();return(r,i)=>o=>{t==null||t(r,i,o),n(CL({activeIndex:String(i),activeDataKey:e,activeCoordinate:r.tooltipPosition}))}},zb=t=>{var e=Dt();return(n,r)=>i=>{t==null||t(n,r,i),e(j5e())}},Xb=(t,e)=>{var n=Dt();return(r,i)=>o=>{t==null||t(r,i,o),n(N5e({activeIndex:String(i),activeDataKey:e,activeCoordinate:r.tooltipPosition}))}};function e0(t){var{fn:e,args:n}=t,r=Dt(),i=Bn();return k.useEffect(()=>{if(!i){var o=e(n);return r($5e(o)),()=>{r(L5e(o))}}},[e,n,r,i]),null}var YI=()=>{};function Vb(t){var{legendPayload:e}=t,n=Dt(),r=Bn();return k.useEffect(()=>r?YI:(n(PQ(e)),()=>{n(EQ(e))}),[n,r,e]),null}function X7e(t){var{legendPayload:e}=t,n=Dt(),r=ve(qe);return k.useEffect(()=>r!=="centric"&&r!=="radial"?YI:(n(PQ(e)),()=>{n(EQ(e))}),[n,r,e]),null}function t0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=k.useRef(Va(e)),r=k.useRef(t);return r.current!==t&&(n.current=Va(e),r.current=t),n.current}var V7e=["onMouseEnter","onClick","onMouseLeave"];function F7e(t,e){if(t==null)return{};var n,r,i=Y7e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Y7e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function qI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qI(Object(n),!0).forEach(function(r){n0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function n0(t,e,n){return(e=q7e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function q7e(t){var e=W7e(t,"string");return typeof e=="symbol"?e:e+""}function W7e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function sl(){return sl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},sl.apply(null,arguments)}function U7e(t){var e=k.useMemo(()=>Re(t,!1),[t]),n=k.useMemo(()=>Df(t.children,dd),[t.children]),r=k.useMemo(()=>({name:t.name,nameKey:t.nameKey,tooltipType:t.tooltipType,data:t.data,dataKey:t.dataKey,cx:t.cx,cy:t.cy,startAngle:t.startAngle,endAngle:t.endAngle,minAngle:t.minAngle,paddingAngle:t.paddingAngle,innerRadius:t.innerRadius,outerRadius:t.outerRadius,cornerRadius:t.cornerRadius,legendType:t.legendType,fill:t.fill,presentationProps:e}),[t.cornerRadius,t.cx,t.cy,t.data,t.dataKey,t.endAngle,t.innerRadius,t.minAngle,t.name,t.nameKey,t.outerRadius,t.paddingAngle,t.startAngle,t.tooltipType,t.legendType,t.fill,e]),i=ve(o=>h7e(o,r,n));return P.createElement(X7e,{legendPayload:i})}function H7e(t){var{dataKey:e,nameKey:n,sectors:r,stroke:i,strokeWidth:o,fill:a,name:s,hide:l,tooltipType:c}=t;return{dataDefinedOnItem:r==null?void 0:r.map(u=>u.tooltipPayload),positions:r==null?void 0:r.map(u=>u.tooltipPosition),settings:{stroke:i,strokeWidth:o,fill:a,dataKey:e,nameKey:n,name:Fa(s,e),hide:l,type:c,color:a,unit:""}}}var G7e=(t,e)=>t>e?"start":t<e?"end":"middle",K7e=(t,e,n)=>typeof e=="function"?e(t):Hn(e,n,n*.8),J7e=(t,e,n)=>{var{top:r,left:i,width:o,height:a}=e,s=uQ(o,a),l=i+Hn(t.cx,o,o/2),c=r+Hn(t.cy,a,a/2),u=Hn(t.innerRadius,s,0),f=K7e(n,t.outerRadius,s),d=t.maxRadius||Math.sqrt(o*o+a*a)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:f,maxRadius:d}},e8e=(t,e)=>{var n=On(e-t),r=Math.min(Math.abs(e-t),360);return n*r},t8e=(t,e)=>{if(P.isValidElement(t))return P.cloneElement(t,e);if(typeof t=="function")return t(e);var n=Ye("recharts-pie-label-line",typeof t!="boolean"?t.className:"");return P.createElement(wc,sl({},e,{type:"linear",className:n}))},n8e=(t,e,n)=>{if(P.isValidElement(t))return P.cloneElement(t,e);var r=n;if(typeof t=="function"&&(r=t(e),P.isValidElement(r)))return r;var i=Ye("recharts-pie-label-text",typeof t!="boolean"&&typeof t!="function"?t.className:"");return P.createElement(Hm,sl({},e,{alignmentBaseline:"middle",className:i}),r)};function r8e(t){var{sectors:e,props:n,showLabels:r}=t,{label:i,labelLine:o,dataKey:a}=n;if(!r||!i||!e)return null;var s=Re(n,!1),l=Re(i,!1),c=Re(o,!1),u=typeof i=="object"&&"offsetRadius"in i&&i.offsetRadius||20,f=e.map((d,h)=>{var m=(d.startAngle+d.endAngle)/2,g=tn(d.cx,d.cy,d.outerRadius+u,m),p=Zt(Zt(Zt(Zt({},s),d),{},{stroke:"none"},l),{},{index:h,textAnchor:G7e(g.x,d.cx)},g),O=Zt(Zt(Zt(Zt({},s),d),{},{fill:"none",stroke:d.fill},c),{},{index:h,points:[tn(d.cx,d.cy,d.outerRadius,m),g],key:"line"});return P.createElement(jt,{key:"label-".concat(d.startAngle,"-").concat(d.endAngle,"-").concat(d.midAngle,"-").concat(h)},o&&t8e(o,O),n8e(i,p,vt(d,a)))});return P.createElement(jt,{className:"recharts-pie-labels"},f)}function WI(t){var{sectors:e,activeShape:n,inactiveShape:r,allOtherPieProps:i,showLabels:o}=t,a=ve(ts),{onMouseEnter:s,onClick:l,onMouseLeave:c}=i,u=F7e(i,V7e),f=Zb(s,i.dataKey),d=zb(c),h=Xb(l,i.dataKey);return e==null?null:P.createElement(P.Fragment,null,e.map((m,g)=>{if((m==null?void 0:m.startAngle)===0&&(m==null?void 0:m.endAngle)===0&&e.length!==1)return null;var p=n&&String(g)===a,O=a?r:null,w=p?n:O,v=Zt(Zt({},m),{},{stroke:m.stroke,tabIndex:-1,[bQ]:g,[wQ]:i.dataKey});return P.createElement(jt,sl({tabIndex:-1,className:"recharts-pie-sector"},Qf(u,m,g),{onMouseEnter:f(m,g),onMouseLeave:d(m,g),onClick:h(m,g),key:"sector-".concat(m==null?void 0:m.startAngle,"-").concat(m==null?void 0:m.endAngle,"-").concat(m.midAngle,"-").concat(g)}),P.createElement(FI,sl({option:w,isActive:p,shapeType:"sector"},v)))}),P.createElement(r8e,{sectors:e,props:i,showLabels:o}))}function i8e(t){var e,{pieSettings:n,displayedData:r,cells:i,offset:o}=t,{cornerRadius:a,startAngle:s,endAngle:l,dataKey:c,nameKey:u,tooltipType:f}=n,d=Math.abs(n.minAngle),h=e8e(s,l),m=Math.abs(h),g=r.length<=1?0:(e=n.paddingAngle)!==null&&e!==void 0?e:0,p=r.filter(x=>vt(x,c,0)!==0).length,O=(m>=360?p:p-1)*g,w=m-p*d-O,v=r.reduce((x,_)=>{var E=vt(_,c,0);return x+(ue(E)?E:0)},0),b;if(v>0){var y;b=r.map((x,_)=>{var E=vt(x,c,0),A=vt(x,u,_),I=J7e(n,o,x),Q=(ue(E)?E:0)/v,D,j=Zt(Zt({},x),i&&i[_]&&i[_].props);_?D=y.endAngle+On(h)*g*(E!==0?1:0):D=s;var R=D+On(h)*((E!==0?d:0)+Q*w),B=(D+R)/2,X=(I.innerRadius+I.outerRadius)/2,V=[{name:A,value:E,payload:j,dataKey:c,type:f}],K=tn(I.cx,I.cy,X,B);return y=Zt(Zt(Zt(Zt({},n.presentationProps),{},{percent:Q,cornerRadius:a,name:A,tooltipPayload:V,midAngle:B,middleRadius:X,tooltipPosition:K},j),I),{},{value:vt(x,c),startAngle:D,endAngle:R,payload:j,paddingAngle:On(h)*g}),y})}return b}function o8e(t){var{props:e,previousSectorsRef:n}=t,{sectors:r,isAnimationActive:i,animationBegin:o,animationDuration:a,animationEasing:s,activeShape:l,inactiveShape:c,onAnimationStart:u,onAnimationEnd:f}=e,d=t0(e,"recharts-pie-"),h=n.current,[m,g]=k.useState(!0),p=k.useCallback(()=>{typeof f=="function"&&f(),g(!1)},[f]),O=k.useCallback(()=>{typeof u=="function"&&u(),g(!0)},[u]);return P.createElement(Jo,{begin:o,duration:a,isActive:i,easing:s,from:{t:0},to:{t:1},onAnimationStart:O,onAnimationEnd:p,key:d},w=>{var{t:v}=w,b=[],y=r&&r[0],x=y.startAngle;return r.forEach((_,E)=>{var A=h&&h[E],I=E>0?Xa(_,"paddingAngle",0):0;if(A){var Q=Er(A.endAngle-A.startAngle,_.endAngle-_.startAngle),D=Zt(Zt({},_),{},{startAngle:x+I,endAngle:x+Q(v)+I});b.push(D),x=D.endAngle}else{var{endAngle:j,startAngle:R}=_,B=Er(0,j-R),X=B(v),V=Zt(Zt({},_),{},{startAngle:x+I,endAngle:x+X+I});b.push(V),x=V.endAngle}}),n.current=b,P.createElement(jt,null,P.createElement(WI,{sectors:b,activeShape:l,inactiveShape:c,allOtherPieProps:e,showLabels:!m}))})}function a8e(t){var{sectors:e,isAnimationActive:n,activeShape:r,inactiveShape:i}=t,o=k.useRef(null),a=o.current;return n&&e&&e.length&&(!a||a!==e)?P.createElement(o8e,{props:t,previousSectorsRef:o}):P.createElement(WI,{sectors:e,activeShape:r,inactiveShape:i,allOtherPieProps:t,showLabels:!0})}function s8e(t){var{hide:e,className:n,rootTabIndex:r}=t,i=Ye("recharts-pie",n);return e?null:P.createElement(jt,{tabIndex:r,className:i},P.createElement(a8e,t))}var UI={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!qa.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function l8e(t){var e=Qr(t,UI),n=k.useMemo(()=>Df(t.children,dd),[t.children]),r=Re(e,!1),i=k.useMemo(()=>({name:e.name,nameKey:e.nameKey,tooltipType:e.tooltipType,data:e.data,dataKey:e.dataKey,cx:e.cx,cy:e.cy,startAngle:e.startAngle,endAngle:e.endAngle,minAngle:e.minAngle,paddingAngle:e.paddingAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius,legendType:e.legendType,fill:e.fill,presentationProps:r}),[e.cornerRadius,e.cx,e.cy,e.data,e.dataKey,e.endAngle,e.innerRadius,e.minAngle,e.name,e.nameKey,e.outerRadius,e.paddingAngle,e.startAngle,e.tooltipType,e.legendType,e.fill,r]),o=ve(a=>m7e(a,i,n));return P.createElement(P.Fragment,null,P.createElement(e0,{fn:H7e,args:Zt(Zt({},e),{},{sectors:o})}),P.createElement(s8e,sl({},e,{sectors:o})))}class Fb extends k.PureComponent{constructor(){super(...arguments),n0(this,"id",Va("recharts-pie-"))}render(){return P.createElement(P.Fragment,null,P.createElement(T7e,{data:this.props.data,dataKey:this.props.dataKey,hide:this.props.hide,angleAxisId:0,radiusAxisId:0,stackId:void 0,barSize:void 0,type:"pie"}),P.createElement(U7e,this.props),P.createElement(l8e,this.props),this.props.children)}}n0(Fb,"displayName","Pie"),n0(Fb,"defaultProps",UI);var c8e=Y([ln],t=>{if(t)return{top:t.top,bottom:t.bottom,left:t.left,right:t.right}}),u8e=Y([c8e,Go,Ko],(t,e,n)=>{if(!(!t||e==null||n==null))return{x:t.left,y:t.top,width:Math.max(0,e-t.left-t.right),height:Math.max(0,n-t.top-t.bottom)}}),f8e=t=>{var e=Bn();return ve(n=>hi(n,"xAxis",t,e))},d8e=t=>{var e=Bn();return ve(n=>hi(n,"yAxis",t,e))},r0=()=>ve(u8e),h8e=()=>ve(x9e);function HI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function GI(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?HI(Object(n),!0).forEach(function(r){p8e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):HI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function p8e(t,e,n){return(e=m8e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m8e(t){var e=g8e(t,"string");return typeof e=="symbol"?e:e+""}function g8e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var O8e=t=>{var{point:e,childIndex:n,mainColor:r,activeDot:i,dataKey:o}=t;if(i===!1||e.x==null||e.y==null)return null;var a=GI(GI({index:n,dataKey:o,cx:e.x,cy:e.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:e.payload,value:e.value},Re(i,!1)),Fy(i)),s;return k.isValidElement(i)?s=k.cloneElement(i,a):typeof i=="function"?s=i(a):s=P.createElement(Ib,a),P.createElement(jt,{className:"recharts-active-dot"},s)};function Yb(t){var{points:e,mainColor:n,activeDot:r,itemDataKey:i}=t,o=ve(ts),a=h8e();if(e==null||a==null)return null;var s=e.find(l=>a.includes(l.payload));return ut(s)?null:O8e({point:s,childIndex:Number(o),mainColor:n,dataKey:i,activeDot:r})}var y8e=()=>{var t=Dt();return k.useEffect(()=>(t(O7e()),()=>{t(y7e())})),null},v8e=["children"];function b8e(t,e){if(t==null)return{};var n,r,i=w8e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function w8e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var KI=()=>{},JI=k.createContext({addErrorBar:KI,removeErrorBar:KI}),x8e={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},ej=k.createContext(x8e);function tj(t){var{children:e}=t,n=b8e(t,v8e);return P.createElement(ej.Provider,{value:n},e)}var _8e=()=>k.useContext(ej),qb=t=>{var{children:e,xAxisId:n,yAxisId:r,zAxisId:i,dataKey:o,data:a,stackId:s,hide:l,type:c,barSize:u}=t,[f,d]=P.useState([]),h=k.useCallback(p=>{d(O=>[...O,p])},[d]),m=k.useCallback(p=>{d(O=>O.filter(w=>w!==p))},[d]),g=Bn();return P.createElement(JI.Provider,{value:{addErrorBar:h,removeErrorBar:m}},P.createElement(E7e,{type:c,data:a,xAxisId:n,yAxisId:r,zAxisId:i,dataKey:o,errorBars:f,stackId:s,hide:l,barSize:u,isPanorama:g}),e)};function S8e(t){var{addErrorBar:e,removeErrorBar:n}=k.useContext(JI);return k.useEffect(()=>(e(t),()=>{n(t)}),[e,n,t]),null}var k8e=["direction","width","dataKey","isAnimationActive","animationBegin","animationDuration","animationEasing"];function nj(t,e,n){return(e=C8e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C8e(t){var e=P8e(t,"string");return typeof e=="symbol"?e:e+""}function P8e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function pd(){return pd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},pd.apply(null,arguments)}function E8e(t,e){if(t==null)return{};var n,r,i=T8e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function T8e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function A8e(t){var{direction:e,width:n,dataKey:r,isAnimationActive:i,animationBegin:o,animationDuration:a,animationEasing:s}=t,l=E8e(t,k8e),c=Re(l,!1),{data:u,dataPointFormatter:f,xAxisId:d,yAxisId:h,errorBarOffset:m}=_8e(),g=f8e(d),p=d8e(h);if((g==null?void 0:g.scale)==null||(p==null?void 0:p.scale)==null||u==null||e==="x"&&g.type!=="number")return null;var O=u.map(w=>{var{x:v,y:b,value:y,errorVal:x}=f(w,r,e);if(!x)return null;var _=[],E,A;if(Array.isArray(x)?[E,A]=x:E=A=x,e==="x"){var{scale:I}=g,Q=b+m,D=Q+n,j=Q-n,R=I(y-E),B=I(y+A);_.push({x1:B,y1:D,x2:B,y2:j}),_.push({x1:R,y1:Q,x2:B,y2:Q}),_.push({x1:R,y1:D,x2:R,y2:j})}else if(e==="y"){var{scale:X}=p,V=v+m,K=V-n,ne=V+n,L=X(y-E),fe=X(y+A);_.push({x1:K,y1:fe,x2:ne,y2:fe}),_.push({x1:V,y1:L,x2:V,y2:fe}),_.push({x1:K,y1:L,x2:ne,y2:L})}var oe="".concat(v+m,"px ").concat(b+m,"px");return P.createElement(jt,pd({className:"recharts-errorBar",key:"bar-".concat(_.map(T=>"".concat(T.x1,"-").concat(T.x2,"-").concat(T.y1,"-").concat(T.y2)))},c),_.map(T=>{var W=i?{transformOrigin:"".concat(T.x1-5,"px")}:void 0;return P.createElement(Jo,{from:{transform:"scaleY(0)",transformOrigin:oe},to:{transform:"scaleY(1)",transformOrigin:oe},begin:o,easing:s,isActive:i,duration:a,key:"line-".concat(T.x1,"-").concat(T.x2,"-").concat(T.y1,"-").concat(T.y2),style:{transformOrigin:oe}},P.createElement("line",pd({},T,{style:W})))}))});return P.createElement(jt,{className:"recharts-errorBars"},O)}var rj=k.createContext(void 0);function M8e(t){var e=k.useContext(rj);return t??e??"x"}function ij(t){var{direction:e,children:n}=t;return P.createElement(rj.Provider,{value:e},n)}var oj={stroke:"black",strokeWidth:1.5,width:5,offset:0,isAnimationActive:!0,animationBegin:0,animationDuration:400,animationEasing:"ease-in-out"};function Q8e(t){var e=M8e(t.direction),{width:n,isAnimationActive:r,animationBegin:i,animationDuration:o,animationEasing:a}=Qr(t,oj);return P.createElement(P.Fragment,null,P.createElement(S8e,{dataKey:t.dataKey,direction:e}),P.createElement(A8e,pd({},t,{direction:e,width:n,isAnimationActive:r,animationBegin:i,animationDuration:o,animationEasing:a})))}class aj extends k.Component{render(){return P.createElement(Q8e,this.props)}}nj(aj,"defaultProps",oj),nj(aj,"displayName","ErrorBar");var D8e="Invariant failed";function $8e(t,e){throw new Error(D8e)}var L8e=["x","y"];function Wb(){return Wb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Wb.apply(null,arguments)}function sj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function md(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sj(Object(n),!0).forEach(function(r){I8e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function I8e(t,e,n){return(e=j8e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function j8e(t){var e=N8e(t,"string");return typeof e=="symbol"?e:e+""}function N8e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function R8e(t,e){if(t==null)return{};var n,r,i=B8e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function B8e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Z8e(t,e){var{x:n,y:r}=t,i=R8e(t,L8e),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),c="".concat(e.height||i.height),u=parseInt(c,10),f="".concat(e.width||i.width),d=parseInt(f,10);return md(md(md(md(md({},e),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:d,name:e.name,radius:e.radius})}function lj(t){return P.createElement(FI,Wb({shapeType:"rectangle",propTransformer:Z8e,activeClassName:"recharts-active-bar"},t))}var z8e=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,i)=>{if(ue(e))return e;var o=ue(r)||ut(r);return o?e(r,i):(o||$8e(),n)}};function i0(t,e){var n,r,i=ve(c=>la(c,t)),o=ve(c=>Ja(c,e)),a=(n=i==null?void 0:i.allowDataOverflow)!==null&&n!==void 0?n:Lr.allowDataOverflow,s=(r=o==null?void 0:o.allowDataOverflow)!==null&&r!==void 0?r:Ir.allowDataOverflow,l=a||s;return{needClip:l,needClipX:a,needClipY:s}}function Ub(t){var{xAxisId:e,yAxisId:n,clipPathId:r}=t,i=r0(),{needClipX:o,needClipY:a,needClip:s}=i0(e,n);if(!s)return null;var{x:l,y:c,width:u,height:f}=i;return P.createElement("clipPath",{id:"clipPath-".concat(r)},P.createElement("rect",{x:o?l:l-u/2,y:a?c:c-f/2,width:o?u:u*2,height:a?f:f*2}))}var X8e=["onMouseEnter","onMouseLeave","onClick"],V8e=["value","background","tooltipPosition"],F8e=["onMouseEnter","onClick","onMouseLeave"];function gd(){return gd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},gd.apply(null,arguments)}function cj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?cj(Object(n),!0).forEach(function(r){o0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function o0(t,e,n){return(e=Y8e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Y8e(t){var e=q8e(t,"string");return typeof e=="symbol"?e:e+""}function q8e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Hb(t,e){if(t==null)return{};var n,r,i=W8e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function W8e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var U8e=t=>{var{dataKey:e,name:n,fill:r,legendType:i,hide:o}=t;return[{inactive:o,dataKey:e,type:i,color:r,value:Fa(n,e),payload:t}]};function H8e(t){var{dataKey:e,stroke:n,strokeWidth:r,fill:i,name:o,hide:a,unit:s}=t;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:e,nameKey:void 0,name:Fa(o,e),hide:a,type:t.tooltipType,color:t.fill,unit:s}}}function G8e(t){var e=ve(ts),{data:n,dataKey:r,background:i,allOtherBarProps:o}=t,{onMouseEnter:a,onMouseLeave:s,onClick:l}=o,c=Hb(o,X8e),u=Zb(a,r),f=zb(s),d=Xb(l,r);if(!i||n==null)return null;var h=Re(i,!1);return P.createElement(P.Fragment,null,n.map((m,g)=>{var{value:p,background:O,tooltipPosition:w}=m,v=Hb(m,V8e);if(!O)return null;var b=u(m,g),y=f(m,g),x=d(m,g),_=Zn(Zn(Zn(Zn(Zn({option:i,isActive:String(g)===e},v),{},{fill:"#eee"},O),h),Qf(c,m,g)),{},{onMouseEnter:b,onMouseLeave:y,onClick:x,dataKey:r,index:g,className:"recharts-bar-background-rectangle"});return P.createElement(lj,gd({key:"background-bar-".concat(g)},_))}))}function uj(t){var{data:e,props:n,showLabels:r}=t,i=Re(n,!1),{shape:o,dataKey:a,activeBar:s}=n,l=ve(ts),c=ve(zL),{onMouseEnter:u,onClick:f,onMouseLeave:d}=n,h=Hb(n,F8e),m=Zb(u,a),g=zb(d),p=Xb(f,a);return e?P.createElement(P.Fragment,null,e.map((O,w)=>{var v=s&&String(w)===l&&(c==null||a===c),b=v?s:o,y=Zn(Zn(Zn({},i),O),{},{isActive:v,option:b,index:w,dataKey:a});return P.createElement(jt,gd({className:"recharts-bar-rectangle"},Qf(h,O,w),{onMouseEnter:m(O,w),onMouseLeave:g(O,w),onClick:p(O,w),key:"rectangle-".concat(O==null?void 0:O.x,"-").concat(O==null?void 0:O.y,"-").concat(O==null?void 0:O.value,"-").concat(w)}),P.createElement(lj,y))}),r&&fa.renderCallByParent(n,e)):null}function K8e(t){var{props:e,previousRectanglesRef:n}=t,{data:r,layout:i,isAnimationActive:o,animationBegin:a,animationDuration:s,animationEasing:l,onAnimationEnd:c,onAnimationStart:u}=e,f=n.current,d=t0(e,"recharts-bar-"),[h,m]=k.useState(!1),g=k.useCallback(()=>{typeof c=="function"&&c(),m(!1)},[c]),p=k.useCallback(()=>{typeof u=="function"&&u(),m(!0)},[u]);return P.createElement(Jo,{begin:a,duration:s,isActive:o,easing:l,from:{t:0},to:{t:1},onAnimationEnd:g,onAnimationStart:p,key:d},O=>{var{t:w}=O,v=w===1?r:r.map((b,y)=>{var x=f&&f[y];if(x){var _=Er(x.x,b.x),E=Er(x.y,b.y),A=Er(x.width,b.width),I=Er(x.height,b.height);return Zn(Zn({},b),{},{x:_(w),y:E(w),width:A(w),height:I(w)})}if(i==="horizontal"){var Q=Er(0,b.height),D=Q(w);return Zn(Zn({},b),{},{y:b.y+b.height-D,height:D})}var j=Er(0,b.width),R=j(w);return Zn(Zn({},b),{},{width:R})});return w>0&&(n.current=v),P.createElement(jt,null,P.createElement(uj,{props:e,data:v,showLabels:!h}))})}function J8e(t){var{data:e,isAnimationActive:n}=t,r=k.useRef(null);return n&&e&&e.length&&(r.current==null||r.current!==e)?P.createElement(K8e,{previousRectanglesRef:r,props:t}):P.createElement(uj,{props:t,data:e,showLabels:!0})}var fj=0,ewe=(t,e)=>{var n=Array.isArray(t.value)?t.value[1]:t.value;return{x:t.x,y:t.y,value:n,errorVal:vt(t,e)}};class twe extends k.PureComponent{constructor(){super(...arguments),o0(this,"id",Va("recharts-bar-"))}render(){var{hide:e,data:n,dataKey:r,className:i,xAxisId:o,yAxisId:a,needClip:s,background:l,id:c,layout:u}=this.props;if(e)return null;var f=Ye("recharts-bar",i),d=ut(c)?this.id:c;return P.createElement(jt,{className:f},s&&P.createElement("defs",null,P.createElement(Ub,{clipPathId:d,xAxisId:o,yAxisId:a})),P.createElement(jt,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(d,")"):null},P.createElement(G8e,{data:n,dataKey:r,background:l,allOtherBarProps:this.props}),P.createElement(J8e,this.props)),P.createElement(ij,{direction:u==="horizontal"?"y":"x"},this.props.children))}}var dj={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!qa.isSsr,legendType:"rect",minPointSize:fj,xAxisId:0,yAxisId:0};function nwe(t){var{xAxisId:e,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u}=Qr(t,dj),{needClip:f}=i0(e,n),d=jf(),h=Bn(),m=k.useMemo(()=>({barSize:t.barSize,data:void 0,dataKey:t.dataKey,maxBarSize:t.maxBarSize,minPointSize:o,stackId:Zv(t.stackId)}),[t.barSize,t.dataKey,t.maxBarSize,o,t.stackId]),g=Df(t.children,dd),p=ve(v=>Awe(v,e,n,h,m,g));if(d!=="vertical"&&d!=="horizontal")return null;var O,w=p==null?void 0:p[0];return w==null||w.height==null||w.width==null?O=0:O=d==="vertical"?w.height/2:w.width/2,P.createElement(tj,{xAxisId:e,yAxisId:n,data:p,dataPointFormatter:ewe,errorBarOffset:O},P.createElement(twe,gd({},t,{layout:d,needClip:f,data:p,xAxisId:e,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u})))}function rwe(t){var{layout:e,barSettings:{dataKey:n,minPointSize:r},pos:i,bandSize:o,xAxis:a,yAxis:s,xAxisTicks:l,yAxisTicks:c,stackedData:u,displayedData:f,offset:d,cells:h}=t,m=e==="horizontal"?s:a,g=u?m.scale.domain():null,p=o6e({numericAxis:m});return f.map((O,w)=>{var v,b,y,x,_,E;u?v=e6e(u[w],g):(v=vt(O,n),Array.isArray(v)||(v=[p,v]));var A=z8e(r,fj)(v[1],w);if(e==="horizontal"){var I,[Q,D]=[s.scale(v[0]),s.scale(v[1])];b=mQ({axis:a,ticks:l,bandSize:o,offset:i.offset,entry:O,index:w}),y=(I=D??Q)!==null&&I!==void 0?I:void 0,x=i.size;var j=Q-D;if(_=ur(j)?0:j,E={x:b,y:d.top,width:x,height:d.height},Math.abs(A)>0&&Math.abs(_)<Math.abs(A)){var R=On(_||A)*(Math.abs(A)-Math.abs(_));y-=R,_+=R}}else{var[B,X]=[a.scale(v[0]),a.scale(v[1])];if(b=B,y=mQ({axis:s,ticks:c,bandSize:o,offset:i.offset,entry:O,index:w}),x=X-B,_=i.size,E={x:d.left,y,width:d.width,height:_},Math.abs(A)>0&&Math.abs(x)<Math.abs(A)){var V=On(x||A)*(Math.abs(A)-Math.abs(x));x+=V}}var K=Zn(Zn({},O),{},{x:b,y,width:x,height:_,value:u?v:v[1],payload:O,background:E,tooltipPosition:{x:b+x/2,y:y+_/2}},h&&h[w]&&h[w].props);return K})}class Gb extends k.PureComponent{render(){return P.createElement(qb,{type:"bar",data:null,xAxisId:this.props.xAxisId,yAxisId:this.props.yAxisId,zAxisId:0,dataKey:this.props.dataKey,stackId:this.props.stackId,hide:this.props.hide,barSize:this.props.barSize},P.createElement(y8e,null),P.createElement(Vb,{legendPayload:U8e(this.props)}),P.createElement(e0,{fn:H8e,args:this.props}),P.createElement(nwe,this.props))}}o0(Gb,"displayName","Bar"),o0(Gb,"defaultProps",dj);function hj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function a0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?hj(Object(n),!0).forEach(function(r){iwe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function iwe(t,e,n){return(e=owe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function owe(t){var e=awe(t,"string");return typeof e=="symbol"?e:e+""}function awe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var swe=(t,e)=>e,lwe=(t,e,n)=>n,cwe=(t,e,n,r)=>r,Kb=(t,e,n,r,i)=>i,uwe=(t,e,n,r,i)=>i.maxBarSize,fwe=(t,e,n,r,i,o)=>o,pj=(t,e,n)=>{var r=n??t;if(!ut(r))return Hn(r,e,0)},dwe=Y([qe,od,swe,lwe,cwe],(t,e,n,r,i)=>e.filter(o=>t==="horizontal"?o.xAxisId===n:o.yAxisId===r).filter(o=>o.isPanorama===i).filter(o=>o.hide===!1).filter(o=>o.type==="bar")),hwe=(t,e,n,r)=>{var i=qe(t);return i==="horizontal"?sd(t,"yAxis",n,r):sd(t,"xAxis",e,r)},pwe=(t,e,n)=>{var r=qe(t);return r==="horizontal"?gL(t,"xAxis",e):gL(t,"yAxis",n)};function mwe(t){return t.stackId!=null&&t.dataKey!=null}var gwe=(t,e,n)=>{var r={},i=t.filter(mwe),o=t.filter(c=>c.stackId==null),a=i.reduce((c,u)=>(c[u.stackId]||(c[u.stackId]=[]),c[u.stackId].push(u),c),r),s=Object.entries(a).map(c=>{var[u,f]=c,d=f.map(m=>m.dataKey),h=pj(e,n,f[0].barSize);return{stackId:u,dataKeys:d,barSize:h}}),l=o.map(c=>{var u=[c.dataKey].filter(d=>d!=null),f=pj(e,n,c.barSize);return{stackId:void 0,dataKeys:u,barSize:f}});return[...s,...l]},Owe=Y([dwe,Dbe,pwe],gwe),ywe=(t,e,n,r,i)=>{var o,a,s=qe(t),l=z$(t),{maxBarSize:c}=i,u=ut(c)?l:c,f,d;return s==="horizontal"?(f=hi(t,"xAxis",e,r),d=bo(t,"xAxis",e,r)):(f=hi(t,"yAxis",n,r),d=bo(t,"yAxis",n,r)),(o=(a=Ws(f,d,!0))!==null&&a!==void 0?a:u)!==null&&o!==void 0?o:0},mj=(t,e,n,r)=>{var i=qe(t),o,a;return i==="horizontal"?(o=hi(t,"xAxis",e,r),a=bo(t,"xAxis",e,r)):(o=hi(t,"yAxis",n,r),a=bo(t,"yAxis",n,r)),Ws(o,a)};function vwe(t,e,n,r,i){var o=r.length;if(!(o<1)){var a=Hn(t,n,0,!0),s,l=[];if(An(r[0].barSize)){var c=!1,u=n/o,f=r.reduce((O,w)=>O+(w.barSize||0),0);f+=(o-1)*a,f>=n&&(f-=(o-1)*a,a=0),f>=n&&u>0&&(c=!0,u*=.9,f=o*u);var d=(n-f)/2>>0,h={offset:d-a,size:0};s=r.reduce((O,w)=>{var v,b={stackId:w.stackId,dataKeys:w.dataKeys,position:{offset:h.offset+h.size+a,size:c?u:(v=w.barSize)!==null&&v!==void 0?v:0}},y=[...O,b];return h=y[y.length-1].position,y},l)}else{var m=Hn(e,n,0,!0);n-2*m-(o-1)*a<=0&&(a=0);var g=(n-2*m-(o-1)*a)/o;g>1&&(g>>=0);var p=An(i)?Math.min(g,i):g;s=r.reduce((O,w,v)=>[...O,{stackId:w.stackId,dataKeys:w.dataKeys,position:{offset:m+(g+a)*v+(g-p)/2,size:p}}],l)}return s}}var bwe=(t,e,n,r,i,o,a)=>{var s=ut(a)?e:a,l=vwe(n,r,i!==o?i:o,t,s);return i!==o&&l!=null&&(l=l.map(c=>a0(a0({},c),{},{position:a0(a0({},c.position),{},{offset:c.position.offset-i/2})}))),l},wwe=Y([Owe,z$,Qbe,X$,ywe,mj,uwe],bwe),xwe=(t,e,n,r)=>hi(t,"xAxis",e,r),_we=(t,e,n,r)=>hi(t,"yAxis",n,r),Swe=(t,e,n,r)=>bo(t,"xAxis",e,r),kwe=(t,e,n,r)=>bo(t,"yAxis",n,r),Cwe=Y([wwe,Kb],(t,e)=>{if(t!=null){var n=t.find(r=>r.stackId===e.stackId&&r.dataKeys.includes(e.dataKey));if(n!=null)return n.position}}),Pwe=(t,e)=>{if(!(!t||(e==null?void 0:e.dataKey)==null)){var{stackId:n}=e;if(n!=null){var r=t[n];if(r){var{stackedData:i}=r;if(i){var o=i.find(a=>a.key===e.dataKey);return o}}}}},Ewe=Y([od,Kb],(t,e)=>{if(t.some(n=>n.type==="bar"&&e.dataKey===n.dataKey&&e.stackId===n.stackId&&e.stackId===n.stackId))return e}),Twe=Y([hwe,Kb],Pwe),Awe=Y([ln,xwe,_we,Swe,kwe,Cwe,qe,Dm,mj,Twe,Ewe,fwe],(t,e,n,r,i,o,a,s,l,c,u,f)=>{var{chartData:d,dataStartIndex:h,dataEndIndex:m}=s;if(!(u==null||o==null||a!=="horizontal"&&a!=="vertical"||e==null||n==null||r==null||i==null||l==null)){var{data:g}=u,p;if(g!=null&&g.length>0?p=g:p=d==null?void 0:d.slice(h,m+1),p!=null)return rwe({layout:a,barSettings:u,pos:o,bandSize:l,xAxis:e,yAxis:n,xAxisTicks:r,yAxisTicks:i,stackedData:c,displayedData:p,offset:t,cells:f})}}),gj=t=>{var{chartData:e}=t,n=Dt(),r=Bn();return k.useEffect(()=>r?()=>{}:(n(rI(e)),()=>{n(rI(void 0))}),[e,n,r]),null},Oj={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},Mwe=li({name:"brush",initialState:Oj,reducers:{setBrushSettings(t,e){return e.payload==null?Oj:e.payload}}}),Qwe=Mwe.reducer;function Dwe(t,e,n){return(e=$we(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $we(t){var e=Lwe(t,"string");return typeof e=="symbol"?e:e+""}function Lwe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Jb{static create(e){return new Jb(e)}constructor(e){this.scale=e}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(e){var{bandAware:n,position:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e!==void 0){if(r)switch(r){case"start":return this.scale(e);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(e)+o}default:return this.scale(e)}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}return this.scale(e)}}isInRange(e){var n=this.range(),r=n[0],i=n[n.length-1];return r<=i?e>=r&&e<=i:e>=i&&e<=r}}Dwe(Jb,"EPS",1e-4);function Iwe(t){return(t%180+180)%180}var jwe=function(e){var{width:n,height:r}=e,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Iwe(i),a=o*Math.PI/180,s=Math.atan(r/n),l=a>s&&a<Math.PI-s?r/Math.sin(a):n/Math.cos(a);return Math.abs(l)},Nwe={dots:[],areas:[],lines:[]},Rwe=li({name:"referenceElements",initialState:Nwe,reducers:{addDot:(t,e)=>{t.dots.push(e.payload)},removeDot:(t,e)=>{var n=Ho(t).dots.findIndex(r=>r===e.payload);n!==-1&&t.dots.splice(n,1)},addArea:(t,e)=>{t.areas.push(e.payload)},removeArea:(t,e)=>{var n=Ho(t).areas.findIndex(r=>r===e.payload);n!==-1&&t.areas.splice(n,1)},addLine:(t,e)=>{t.lines.push(e.payload)},removeLine:(t,e)=>{var n=Ho(t).lines.findIndex(r=>r===e.payload);n!==-1&&t.lines.splice(n,1)}}}),Bwe=Rwe.reducer,Zwe=k.createContext(void 0),zwe=t=>{var{children:e}=t,[n]=k.useState("".concat(Va("recharts"),"-clip")),r=r0();if(r==null)return null;var{x:i,y:o,width:a,height:s}=r;return P.createElement(Zwe.Provider,{value:n},P.createElement("defs",null,P.createElement("clipPath",{id:n},P.createElement("rect",{x:i,y:o,height:s,width:a}))),e)};function e5(t,e){for(var n in t)if({}.hasOwnProperty.call(t,n)&&(!{}.hasOwnProperty.call(e,n)||t[n]!==e[n]))return!1;for(var r in e)if({}.hasOwnProperty.call(e,r)&&!{}.hasOwnProperty.call(t,r))return!1;return!0}function yj(t,e,n){if(e<1)return[];if(e===1&&n===void 0)return t;for(var r=[],i=0;i<t.length;i+=e)r.push(t[i]);return r}function Xwe(t,e,n){var r={width:t.width+e.width,height:t.height+e.height};return jwe(r,n)}function Vwe(t,e,n){var r=n==="width",{x:i,y:o,width:a,height:s}=t;return e===1?{start:r?i:o,end:r?i+a:o+s}:{start:r?i+a:o+s,end:r?i:o}}function s0(t,e,n,r,i){if(t*e<t*r||t*e>t*i)return!1;var o=n();return t*(e-t*o/2-r)>=0&&t*(e+t*o/2-i)<=0}function Fwe(t,e){return yj(t,e+1)}function Ywe(t,e,n,r,i){for(var o=(r||[]).slice(),{start:a,end:s}=e,l=0,c=1,u=a,f=function(){var m=r==null?void 0:r[l];if(m===void 0)return{v:yj(r,c)};var g=l,p,O=()=>(p===void 0&&(p=n(m,g)),p),w=m.coordinate,v=l===0||s0(t,w,O,u,s);v||(l=0,u=a,c+=1),v&&(u=w+t*(O()/2+i),l+=c)},d;c<=o.length;)if(d=f(),d)return d.v;return[]}function vj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function zn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vj(Object(n),!0).forEach(function(r){qwe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function qwe(t,e,n){return(e=Wwe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wwe(t){var e=Uwe(t,"string");return typeof e=="symbol"?e:e+""}function Uwe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Hwe(t,e,n,r,i){for(var o=(r||[]).slice(),a=o.length,{start:s}=e,{end:l}=e,c=function(d){var h=o[d],m,g=()=>(m===void 0&&(m=n(h,d)),m);if(d===a-1){var p=t*(h.coordinate+t*g()/2-l);o[d]=h=zn(zn({},h),{},{tickCoord:p>0?h.coordinate-p*t:h.coordinate})}else o[d]=h=zn(zn({},h),{},{tickCoord:h.coordinate});var O=s0(t,h.tickCoord,g,s,l);O&&(l=h.tickCoord-t*(g()/2+i),o[d]=zn(zn({},h),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return o}function Gwe(t,e,n,r,i,o){var a=(r||[]).slice(),s=a.length,{start:l,end:c}=e;if(o){var u=r[s-1],f=n(u,s-1),d=t*(u.coordinate+t*f/2-c);a[s-1]=u=zn(zn({},u),{},{tickCoord:d>0?u.coordinate-d*t:u.coordinate});var h=s0(t,u.tickCoord,()=>f,l,c);h&&(c=u.tickCoord-t*(f/2+i),a[s-1]=zn(zn({},u),{},{isShow:!0}))}for(var m=o?s-1:s,g=function(w){var v=a[w],b,y=()=>(b===void 0&&(b=n(v,w)),b);if(w===0){var x=t*(v.coordinate-t*y()/2-l);a[w]=v=zn(zn({},v),{},{tickCoord:x<0?v.coordinate-x*t:v.coordinate})}else a[w]=v=zn(zn({},v),{},{tickCoord:v.coordinate});var _=s0(t,v.tickCoord,y,l,c);_&&(l=v.tickCoord+t*(y()/2+i),a[w]=zn(zn({},v),{},{isShow:!0}))},p=0;p<m;p++)g(p);return a}function t5(t,e,n){var{tick:r,ticks:i,viewBox:o,minTickGap:a,orientation:s,interval:l,tickFormatter:c,unit:u,angle:f}=t;if(!i||!i.length||!r)return[];if(ue(l)||qa.isSsr){var d;return(d=Fwe(i,ue(l)?l:0))!==null&&d!==void 0?d:[]}var h=[],m=s==="top"||s==="bottom"?"width":"height",g=u&&m==="width"?hd(u,{fontSize:e,letterSpacing:n}):{width:0,height:0},p=(v,b)=>{var y=typeof c=="function"?c(v.value,b):v.value;return m==="width"?Xwe(hd(y,{fontSize:e,letterSpacing:n}),g,f):hd(y,{fontSize:e,letterSpacing:n})[m]},O=i.length>=2?On(i[1].coordinate-i[0].coordinate):1,w=Vwe(o,O,m);return l==="equidistantPreserveStart"?Ywe(O,w,p,i,a):(l==="preserveStart"||l==="preserveStartEnd"?h=Gwe(O,w,p,i,a,l==="preserveStartEnd"):h=Hwe(O,w,p,i,a),h.filter(v=>v.isShow))}var Kwe=["viewBox"],Jwe=["viewBox"];function Nc(){return Nc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Nc.apply(null,arguments)}function bj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function un(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?bj(Object(n),!0).forEach(function(r){n5(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):bj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function wj(t,e){if(t==null)return{};var n,r,i=exe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function exe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function n5(t,e,n){return(e=txe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function txe(t){var e=nxe(t,"string");return typeof e=="symbol"?e:e+""}function nxe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class ns extends k.Component{constructor(e){super(e),this.tickRefs=P.createRef(),this.tickRefs.current=[],this.state={fontSize:"",letterSpacing:""}}shouldComponentUpdate(e,n){var{viewBox:r}=e,i=wj(e,Kwe),o=this.props,{viewBox:a}=o,s=wj(o,Jwe);return!e5(r,a)||!e5(i,s)||!e5(n,this.state)}getTickLineCoord(e){var{x:n,y:r,width:i,height:o,orientation:a,tickSize:s,mirror:l,tickMargin:c}=this.props,u,f,d,h,m,g,p=l?-1:1,O=e.tickSize||s,w=ue(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":u=f=e.coordinate,h=r+ +!l*o,d=h-p*O,g=d-p*c,m=w;break;case"left":d=h=e.coordinate,f=n+ +!l*i,u=f-p*O,m=u-p*c,g=w;break;case"right":d=h=e.coordinate,f=n+ +l*i,u=f+p*O,m=u+p*c,g=w;break;default:u=f=e.coordinate,h=r+ +l*o,d=h+p*O,g=d+p*c,m=w;break}return{line:{x1:u,y1:d,x2:f,y2:h},tick:{x:m,y:g}}}getTickTextAnchor(){var{orientation:e,mirror:n}=this.props,r;switch(e){case"left":r=n?"start":"end";break;case"right":r=n?"end":"start";break;default:r="middle";break}return r}getTickVerticalAnchor(){var{orientation:e,mirror:n}=this.props;switch(e){case"left":case"right":return"middle";case"top":return n?"start":"end";default:return n?"end":"start"}}renderAxisLine(){var{x:e,y:n,width:r,height:i,orientation:o,mirror:a,axisLine:s}=this.props,l=un(un(un({},Re(this.props,!1)),Re(s,!1)),{},{fill:"none"});if(o==="top"||o==="bottom"){var c=+(o==="top"&&!a||o==="bottom"&&a);l=un(un({},l),{},{x1:e,y1:n+c*i,x2:e+r,y2:n+c*i})}else{var u=+(o==="left"&&!a||o==="right"&&a);l=un(un({},l),{},{x1:e+u*r,y1:n,x2:e+u*r,y2:n+i})}return P.createElement("line",Nc({},l,{className:Ye("recharts-cartesian-axis-line",Xa(s,"className"))}))}static renderTickItem(e,n,r){var i,o=Ye(n.className,"recharts-cartesian-axis-tick-value");if(P.isValidElement(e))i=P.cloneElement(e,un(un({},n),{},{className:o}));else if(typeof e=="function")i=e(un(un({},n),{},{className:o}));else{var a="recharts-cartesian-axis-tick-value";typeof e!="boolean"&&(a=Ye(a,e.className)),i=P.createElement(Hm,Nc({},n,{className:a}),r)}return i}renderTicks(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],{tickLine:i,stroke:o,tick:a,tickFormatter:s,unit:l}=this.props,c=t5(un(un({},this.props),{},{ticks:r}),e,n),u=this.getTickTextAnchor(),f=this.getTickVerticalAnchor(),d=Re(this.props,!1),h=Re(a,!1),m=un(un({},d),{},{fill:"none"},Re(i,!1)),g=c.map((p,O)=>{var{line:w,tick:v}=this.getTickLineCoord(p),b=un(un(un(un({textAnchor:u,verticalAnchor:f},d),{},{stroke:"none",fill:o},h),v),{},{index:O,payload:p,visibleTicksCount:c.length,tickFormatter:s});return P.createElement(jt,Nc({className:"recharts-cartesian-axis-tick",key:"tick-".concat(p.value,"-").concat(p.coordinate,"-").concat(p.tickCoord)},Qf(this.props,p,O)),i&&P.createElement("line",Nc({},m,w,{className:Ye("recharts-cartesian-axis-tick-line",Xa(i,"className"))})),a&&ns.renderTickItem(a,b,"".concat(typeof s=="function"?s(p.value,O):p.value).concat(l||"")))});return g.length>0?P.createElement("g",{className:"recharts-cartesian-axis-ticks"},g):null}render(){var{axisLine:e,width:n,height:r,className:i,hide:o}=this.props;if(o)return null;var{ticks:a}=this.props;return n!=null&&n<=0||r!=null&&r<=0?null:P.createElement(jt,{className:Ye("recharts-cartesian-axis",i),ref:s=>{if(s){var l=s.getElementsByClassName("recharts-cartesian-axis-tick-value");this.tickRefs.current=Array.from(l);var c=l[0];if(c){var u=window.getComputedStyle(c).fontSize,f=window.getComputedStyle(c).letterSpacing;(u!==this.state.fontSize||f!==this.state.letterSpacing)&&this.setState({fontSize:window.getComputedStyle(c).fontSize,letterSpacing:window.getComputedStyle(c).letterSpacing})}}}},e&&this.renderAxisLine(),this.renderTicks(this.state.fontSize,this.state.letterSpacing,a),jr.renderCallByParent(this.props))}}n5(ns,"displayName","CartesianAxis"),n5(ns,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var rxe=["x1","y1","x2","y2","key"],ixe=["offset"],oxe=["xAxisId","yAxisId"],axe=["xAxisId","yAxisId"];function xj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Xn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xj(Object(n),!0).forEach(function(r){sxe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function sxe(t,e,n){return(e=lxe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lxe(t){var e=cxe(t,"string");return typeof e=="symbol"?e:e+""}function cxe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ll(){return ll=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ll.apply(null,arguments)}function l0(t,e){if(t==null)return{};var n,r,i=uxe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function uxe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var fxe=t=>{var{fill:e}=t;if(!e||e==="none")return null;var{fillOpacity:n,x:r,y:i,width:o,height:a,ry:s}=t;return P.createElement("rect",{x:r,y:i,ry:s,width:o,height:a,stroke:"none",fill:e,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function _j(t,e){var n;if(P.isValidElement(t))n=P.cloneElement(t,e);else if(typeof t=="function")n=t(e);else{var{x1:r,y1:i,x2:o,y2:a,key:s}=e,l=l0(e,rxe),c=Re(l,!1),u=l0(c,ixe);n=P.createElement("line",ll({},u,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function dxe(t){var{x:e,width:n,horizontal:r=!0,horizontalPoints:i}=t;if(!r||!i||!i.length)return null;var o=l0(t,oxe),a=i.map((s,l)=>{var c=Xn(Xn({},o),{},{x1:e,y1:s,x2:e+n,y2:s,key:"line-".concat(l),index:l});return _j(r,c)});return P.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function hxe(t){var{y:e,height:n,vertical:r=!0,verticalPoints:i}=t;if(!r||!i||!i.length)return null;var o=l0(t,axe),a=i.map((s,l)=>{var c=Xn(Xn({},o),{},{x1:s,y1:e,x2:s,y2:e+n,key:"line-".concat(l),index:l});return _j(r,c)});return P.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function pxe(t){var{horizontalFill:e,fillOpacity:n,x:r,y:i,width:o,height:a,horizontalPoints:s,horizontal:l=!0}=t;if(!l||!e||!e.length)return null;var c=s.map(f=>Math.round(f+i-i)).sort((f,d)=>f-d);i!==c[0]&&c.unshift(0);var u=c.map((f,d)=>{var h=!c[d+1],m=h?i+a-f:c[d+1]-f;if(m<=0)return null;var g=d%e.length;return P.createElement("rect",{key:"react-".concat(d),y:f,x:r,height:m,width:o,stroke:"none",fill:e[g],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function mxe(t){var{vertical:e=!0,verticalFill:n,fillOpacity:r,x:i,y:o,width:a,height:s,verticalPoints:l}=t;if(!e||!n||!n.length)return null;var c=l.map(f=>Math.round(f+i-i)).sort((f,d)=>f-d);i!==c[0]&&c.unshift(0);var u=c.map((f,d)=>{var h=!c[d+1],m=h?i+a-f:c[d+1]-f;if(m<=0)return null;var g=d%n.length;return P.createElement("rect",{key:"react-".concat(d),x:f,y:o,width:m,height:s,stroke:"none",fill:n[g],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var gxe=(t,e)=>{var{xAxis:n,width:r,height:i,offset:o}=t;return dQ(t5(Xn(Xn(Xn({},ns.defaultProps),n),{},{ticks:hQ(n),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,e)},Oxe=(t,e)=>{var{yAxis:n,width:r,height:i,offset:o}=t;return dQ(t5(Xn(Xn(Xn({},ns.defaultProps),n),{},{ticks:hQ(n),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,e)},yxe={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function c0(t){var e=Fv(),n=Yv(),r=SQ(),i=Xn(Xn({},Qr(t,yxe)),{},{x:ue(t.x)?t.x:r.left,y:ue(t.y)?t.y:r.top,width:ue(t.width)?t.width:r.width,height:ue(t.height)?t.height:r.height}),{xAxisId:o,yAxisId:a,x:s,y:l,width:c,height:u,syncWithTicks:f,horizontalValues:d,verticalValues:h}=i,m=Bn(),g=ve(A=>vL(A,"xAxis",o,m)),p=ve(A=>vL(A,"yAxis",a,m));if(!ue(c)||c<=0||!ue(u)||u<=0||!ue(s)||s!==+s||!ue(l)||l!==+l)return null;var O=i.verticalCoordinatesGenerator||gxe,w=i.horizontalCoordinatesGenerator||Oxe,{horizontalPoints:v,verticalPoints:b}=i;if((!v||!v.length)&&typeof w=="function"){var y=d&&d.length,x=w({yAxis:p?Xn(Xn({},p),{},{ticks:y?d:p.ticks}):void 0,width:e,height:n,offset:r},y?!0:f);fd(Array.isArray(x),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof x,"]")),Array.isArray(x)&&(v=x)}if((!b||!b.length)&&typeof O=="function"){var _=h&&h.length,E=O({xAxis:g?Xn(Xn({},g),{},{ticks:_?h:g.ticks}):void 0,width:e,height:n,offset:r},_?!0:f);fd(Array.isArray(E),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof E,"]")),Array.isArray(E)&&(b=E)}return P.createElement("g",{className:"recharts-cartesian-grid"},P.createElement(fxe,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),P.createElement(pxe,ll({},i,{horizontalPoints:v})),P.createElement(mxe,ll({},i,{verticalPoints:b})),P.createElement(dxe,ll({},i,{offset:r,horizontalPoints:v,xAxis:g,yAxis:p})),P.createElement(hxe,ll({},i,{offset:r,verticalPoints:b,xAxis:g,yAxis:p})))}c0.displayName="CartesianGrid";var Sj=(t,e,n,r)=>hi(t,"xAxis",e,r),kj=(t,e,n,r)=>bo(t,"xAxis",e,r),Cj=(t,e,n,r)=>hi(t,"yAxis",n,r),Pj=(t,e,n,r)=>bo(t,"yAxis",n,r),vxe=Y([qe,Sj,Cj,kj,Pj],(t,e,n,r,i)=>go(t,"xAxis")?Ws(e,r,!1):Ws(n,i,!1)),bxe=(t,e,n,r,i)=>i,wxe=Y([od,bxe],(t,e)=>{if(t.some(n=>n.type==="line"&&e.dataKey===n.dataKey&&e.data===n.data))return e}),xxe=Y([qe,Sj,Cj,kj,Pj,wxe,vxe,Dm],(t,e,n,r,i,o,a,s)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:u}=s;if(!(o==null||e==null||n==null||r==null||i==null||r.length===0||i.length===0||a==null)){var{dataKey:f,data:d}=o,h;if(d!=null&&d.length>0?h=d:h=l==null?void 0:l.slice(c,u+1),h!=null)return Zxe({layout:t,xAxis:e,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:f,bandSize:a,displayedData:h})}}),_xe=["type","layout","connectNulls","needClip"],Sxe=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId"];function Ej(t,e){if(t==null)return{};var n,r,i=kxe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function kxe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Tj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ei(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Tj(Object(n),!0).forEach(function(r){u0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function u0(t,e,n){return(e=Cxe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Cxe(t){var e=Pxe(t,"string");return typeof e=="symbol"?e:e+""}function Pxe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Rc(){return Rc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Rc.apply(null,arguments)}var Exe=t=>{var{dataKey:e,name:n,stroke:r,legendType:i,hide:o}=t;return[{inactive:o,dataKey:e,type:i,color:r,value:Fa(n,e),payload:t}]};function Txe(t){var{dataKey:e,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=t;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:e,nameKey:void 0,name:Fa(a,e),hide:s,type:t.tooltipType,color:t.stroke,unit:l}}}var Aj=(t,e)=>"".concat(e,"px ").concat(t-e,"px");function Axe(t,e){for(var n=t.length%2!==0?[...t,0]:t,r=[],i=0;i<e;++i)r=[...r,...n];return r}var Mxe=(t,e,n)=>{var r=n.reduce((f,d)=>f+d);if(!r)return Aj(e,t);for(var i=Math.floor(t/r),o=t%r,a=e-t,s=[],l=0,c=0;l<n.length;c+=n[l],++l)if(c+n[l]>o){s=[...n.slice(0,l),o-c];break}var u=s.length%2===0?[0,a]:[a];return[...Axe(n,i),...s,...u].map(f=>"".concat(f,"px")).join(", ")};function Qxe(t,e){var n;if(P.isValidElement(t))n=P.cloneElement(t,e);else if(typeof t=="function")n=t(e);else{var r=Ye("recharts-line-dot",typeof t!="boolean"?t.className:"");n=P.createElement(Ib,Rc({},e,{className:r}))}return n}function Dxe(t,e){return t==null?!1:e?!0:t.length===1}function $xe(t){var{clipPathId:e,points:n,props:r}=t,{dot:i,dataKey:o,needClip:a}=r;if(!Dxe(n,i))return null;var s=S1(i),l=Re(r,!1),c=Re(i,!0),u=n.map((d,h)=>{var m=Ei(Ei(Ei({key:"dot-".concat(h),r:3},l),c),{},{index:h,cx:d.x,cy:d.y,dataKey:o,value:d.value,payload:d.payload,points:n});return Qxe(i,m)}),f={clipPath:a?"url(#clipPath-".concat(s?"":"dots-").concat(e,")"):null};return P.createElement(jt,Rc({className:"recharts-line-dots",key:"dots"},f),u)}function r5(t){var{clipPathId:e,pathRef:n,points:r,strokeDasharray:i,props:o,showLabels:a}=t,{type:s,layout:l,connectNulls:c,needClip:u}=o,f=Ej(o,_xe),d=Ei(Ei({},Re(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(e,")"):null,points:r,type:s,layout:l,connectNulls:c,strokeDasharray:i??o.strokeDasharray});return P.createElement(P.Fragment,null,(r==null?void 0:r.length)>1&&P.createElement(wc,Rc({},d,{pathRef:n})),P.createElement($xe,{points:r,clipPathId:e,props:o}),a&&fa.renderCallByParent(o,r))}function Lxe(t){try{return t&&t.getTotalLength&&t.getTotalLength()||0}catch{return 0}}function Ixe(t){var{clipPathId:e,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:o}=t,{points:a,strokeDasharray:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:f,animateNewValues:d,width:h,height:m,onAnimationEnd:g,onAnimationStart:p}=n,O=i.current,w=t0(n,"recharts-line-"),[v,b]=k.useState(!1),y=k.useCallback(()=>{typeof g=="function"&&g(),b(!1)},[g]),x=k.useCallback(()=>{typeof p=="function"&&p(),b(!0)},[p]),_=Lxe(r.current),E=o.current;return P.createElement(Jo,{begin:c,duration:u,isActive:l,easing:f,from:{t:0},to:{t:1},onAnimationEnd:y,onAnimationStart:x,key:w},A=>{var{t:I}=A,Q=Er(E,_+E),D=Math.min(Q(I),_),j;if(s){var R="".concat(s).split(/[,\s]+/gim).map(V=>parseFloat(V));j=Mxe(D,_,R)}else j=Aj(_,D);if(O){var B=O.length/a.length,X=I===1?a:a.map((V,K)=>{var ne=Math.floor(K*B);if(O[ne]){var L=O[ne],fe=Er(L.x,V.x),oe=Er(L.y,V.y);return Ei(Ei({},V),{},{x:fe(I),y:oe(I)})}if(d){var T=Er(h*2,V.x),W=Er(m/2,V.y);return Ei(Ei({},V),{},{x:T(I),y:W(I)})}return Ei(Ei({},V),{},{x:V.x,y:V.y})});return i.current=X,P.createElement(r5,{props:n,points:X,clipPathId:e,pathRef:r,showLabels:!v,strokeDasharray:j})}return I>0&&_>0&&(i.current=a,o.current=D),P.createElement(r5,{props:n,points:a,clipPathId:e,pathRef:r,showLabels:!v,strokeDasharray:j})})}function jxe(t){var{clipPathId:e,props:n}=t,{points:r,isAnimationActive:i}=n,o=k.useRef(null),a=k.useRef(0),s=k.useRef(null),l=o.current;return i&&r&&r.length&&l!==r?P.createElement(Ixe,{props:n,clipPathId:e,previousPointsRef:o,longestAnimatedLengthRef:a,pathRef:s}):P.createElement(r5,{props:n,points:r,clipPathId:e,pathRef:s,showLabels:!0})}var Nxe=(t,e)=>({x:t.x,y:t.y,value:t.value,errorVal:vt(t.payload,e)});class Rxe extends k.Component{constructor(){super(...arguments),u0(this,"id",Va("recharts-line-"))}render(){var e,{hide:n,dot:r,points:i,className:o,xAxisId:a,yAxisId:s,top:l,left:c,width:u,height:f,id:d,needClip:h,layout:m}=this.props;if(n)return null;var g=Ye("recharts-line",o),p=ut(d)?this.id:d,{r:O=3,strokeWidth:w=2}=(e=Re(r,!1))!==null&&e!==void 0?e:{r:3,strokeWidth:2},v=S1(r),b=O*2+w;return P.createElement(P.Fragment,null,P.createElement(jt,{className:g},h&&P.createElement("defs",null,P.createElement(Ub,{clipPathId:p,xAxisId:a,yAxisId:s}),!v&&P.createElement("clipPath",{id:"clipPath-dots-".concat(p)},P.createElement("rect",{x:c-b/2,y:l-b/2,width:u+b,height:f+b}))),P.createElement(jxe,{props:this.props,clipPathId:p}),P.createElement(ij,{direction:m==="horizontal"?"y":"x"},P.createElement(tj,{xAxisId:a,yAxisId:s,data:i,dataPointFormatter:Nxe,errorBarOffset:0},this.props.children))),P.createElement(Yb,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var Mj={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!qa.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0};function Bxe(t){var e=Qr(t,Mj),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,hide:c,isAnimationActive:u,label:f,legendType:d,xAxisId:h,yAxisId:m}=e,g=Ej(e,Sxe),{needClip:p}=i0(h,m),{height:O,width:w,x:v,y:b}=r0(),y=jf(),x=Bn(),_=k.useMemo(()=>({dataKey:t.dataKey,data:t.data}),[t.dataKey,t.data]),E=ve(A=>xxe(A,h,m,x,_));return y!=="horizontal"&&y!=="vertical"?null:P.createElement(Rxe,Rc({},g,{connectNulls:s,dot:l,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,isAnimationActive:u,hide:c,label:f,legendType:d,xAxisId:h,yAxisId:m,points:E,layout:y,height:O,width:w,left:v,top:b,needClip:p}))}function Zxe(t){var{layout:e,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,dataKey:a,bandSize:s,displayedData:l}=t;return l.map((c,u)=>{var f=vt(c,a);return e==="horizontal"?{x:im({axis:n,ticks:i,bandSize:s,entry:c,index:u}),y:ut(f)?null:r.scale(f),value:f,payload:c}:{x:ut(f)?null:n.scale(f),y:im({axis:r,ticks:o,bandSize:s,entry:c,index:u}),value:f,payload:c}})}class i5 extends k.PureComponent{render(){return P.createElement(qb,{type:"line",data:this.props.data,xAxisId:this.props.xAxisId,yAxisId:this.props.yAxisId,zAxisId:0,dataKey:this.props.dataKey,stackId:void 0,hide:this.props.hide,barSize:void 0},P.createElement(Vb,{legendPayload:Exe(this.props)}),P.createElement(e0,{fn:Txe,args:this.props}),P.createElement(Bxe,this.props))}}u0(i5,"displayName","Line"),u0(i5,"defaultProps",Mj);var Qj=(t,e,n,r)=>hi(t,"xAxis",e,r),Dj=(t,e,n,r)=>bo(t,"xAxis",e,r),$j=(t,e,n,r)=>hi(t,"yAxis",n,r),Lj=(t,e,n,r)=>bo(t,"yAxis",n,r),zxe=Y([qe,Qj,$j,Dj,Lj],(t,e,n,r,i)=>go(t,"xAxis")?Ws(e,r,!1):Ws(n,i,!1)),Xxe=(t,e,n,r,i)=>{var o,a=qe(t),s=go(a,"xAxis"),l;if(s?l=sd(t,"yAxis",n,r):l=sd(t,"xAxis",e,r),l!=null){var{dataKey:c,stackId:u}=i;if(u!=null){var f=(o=l[u])===null||o===void 0?void 0:o.stackedData;return f==null?void 0:f.find(d=>d.key===c)}}},Vxe=(t,e,n,r,i)=>i,Fxe=Y([od,Vxe],(t,e)=>{if(t.some(n=>n.type==="area"&&e.dataKey===n.dataKey&&Zv(e.stackId)===n.stackId&&e.data===n.data))return e}),Yxe=Y([qe,Qj,$j,Dj,Lj,Xxe,Dm,zxe,Fxe],(t,e,n,r,i,o,a,s,l)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:f}=a;if(!(l==null||t!=="horizontal"&&t!=="vertical"||e==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var{data:d}=l,h;if(d&&d.length>0?h=d:h=c==null?void 0:c.slice(u,f+1),h!=null){var m=void 0;return f_e({layout:t,xAxis:e,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:u,areaSettings:l,stackedData:o,displayedData:h,chartBaseValue:m,bandSize:s})}}}),qxe=["layout","type","stroke","connectNulls","isRange"],Wxe=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function Ij(t,e){if(t==null)return{};var n,r,i=Uxe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Uxe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function jj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function cl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?jj(Object(n),!0).forEach(function(r){f0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function f0(t,e,n){return(e=Hxe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Hxe(t){var e=Gxe(t,"string");return typeof e=="symbol"?e:e+""}function Gxe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function rs(){return rs=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},rs.apply(null,arguments)}function d0(t,e){return t&&t!=="none"?t:e}var Kxe=t=>{var{dataKey:e,name:n,stroke:r,fill:i,legendType:o,hide:a}=t;return[{inactive:a,dataKey:e,type:o,color:d0(r,i),value:Fa(n,e),payload:t}]};function Jxe(t){var{dataKey:e,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=t;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:e,nameKey:void 0,name:Fa(a,e),hide:s,type:t.tooltipType,color:d0(r,o),unit:l}}}var e_e=(t,e)=>{var n;if(P.isValidElement(t))n=P.cloneElement(t,e);else if(typeof t=="function")n=t(e);else{var r=Ye("recharts-area-dot",typeof t!="boolean"?t.className:"");n=P.createElement(Ib,rs({},e,{className:r}))}return n};function t_e(t,e){return t==null?!1:e?!0:t.length===1}function n_e(t){var{clipPathId:e,points:n,props:r}=t,{needClip:i,dot:o,dataKey:a}=r;if(!t_e(n,o))return null;var s=S1(o),l=Re(r,!1),c=Re(o,!0),u=n.map((d,h)=>{var m=cl(cl(cl({key:"dot-".concat(h),r:3},l),c),{},{index:h,cx:d.x,cy:d.y,dataKey:a,value:d.value,payload:d.payload,points:n});return e_e(o,m)}),f={clipPath:i?"url(#clipPath-".concat(s?"":"dots-").concat(e,")"):void 0};return P.createElement(jt,rs({className:"recharts-area-dots"},f),u)}function o5(t){var{points:e,baseLine:n,needClip:r,clipPathId:i,props:o,showLabels:a}=t,{layout:s,type:l,stroke:c,connectNulls:u,isRange:f}=o,d=Ij(o,qxe);return P.createElement(P.Fragment,null,(e==null?void 0:e.length)>1&&P.createElement(jt,{clipPath:r?"url(#clipPath-".concat(i,")"):void 0},P.createElement(wc,rs({},Re(d,!0),{points:e,connectNulls:u,type:l,baseLine:n,layout:s,stroke:"none",className:"recharts-area-area"})),c!=="none"&&P.createElement(wc,rs({},Re(o,!1),{className:"recharts-area-curve",layout:s,type:l,connectNulls:u,fill:"none",points:e})),c!=="none"&&f&&P.createElement(wc,rs({},Re(o,!1),{className:"recharts-area-curve",layout:s,type:l,connectNulls:u,fill:"none",points:n}))),P.createElement(n_e,{points:e,props:o,clipPathId:i}),a&&fa.renderCallByParent(o,e))}function r_e(t){var{alpha:e,baseLine:n,points:r,strokeWidth:i}=t,o=r[0].y,a=r[r.length-1].y;if(!An(o)||!An(a))return null;var s=e*Math.abs(o-a),l=Math.max(...r.map(c=>c.x||0));return ue(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.x||0),l)),ue(l)?P.createElement("rect",{x:0,y:o<a?o:o-s,width:l+(i?parseInt("".concat(i),10):1),height:Math.floor(s)}):null}function i_e(t){var{alpha:e,baseLine:n,points:r,strokeWidth:i}=t,o=r[0].x,a=r[r.length-1].x;if(!An(o)||!An(a))return null;var s=e*Math.abs(o-a),l=Math.max(...r.map(c=>c.y||0));return ue(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.y||0),l)),ue(l)?P.createElement("rect",{x:o<a?o:o-s,y:0,width:s,height:Math.floor(l+(i?parseInt("".concat(i),10):1))}):null}function o_e(t){var{alpha:e,layout:n,points:r,baseLine:i,strokeWidth:o}=t;return n==="vertical"?P.createElement(r_e,{alpha:e,points:r,baseLine:i,strokeWidth:o}):P.createElement(i_e,{alpha:e,points:r,baseLine:i,strokeWidth:o})}function a_e(t){var{needClip:e,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o}=t,{points:a,baseLine:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:f,onAnimationStart:d,onAnimationEnd:h}=r,m=t0(r,"recharts-area-"),[g,p]=k.useState(!0),O=k.useCallback(()=>{typeof h=="function"&&h(),p(!1)},[h]),w=k.useCallback(()=>{typeof d=="function"&&d(),p(!0)},[d]),v=i.current,b=o.current;return P.createElement(Jo,{begin:c,duration:u,isActive:l,easing:f,from:{t:0},to:{t:1},onAnimationEnd:O,onAnimationStart:w,key:m},y=>{var{t:x}=y;if(v){var _=v.length/a.length,E=x===1?a:a.map((I,Q)=>{var D=Math.floor(Q*_);if(v[D]){var j=v[D];return cl(cl({},I),{},{x:mc(j.x,I.x,x),y:mc(j.y,I.y,x)})}return I}),A;return ue(s)?A=mc(b,s,x):ut(s)||ur(s)?A=mc(b,0,x):A=s.map((I,Q)=>{var D=Math.floor(Q*_);if(Array.isArray(b)&&b[D]){var j=b[D];return cl(cl({},I),{},{x:mc(j.x,I.x,x),y:mc(j.y,I.y,x)})}return I}),x>0&&(i.current=E,o.current=A),P.createElement(o5,{points:E,baseLine:A,needClip:e,clipPathId:n,props:r,showLabels:!g})}return x>0&&(i.current=a,o.current=s),P.createElement(jt,null,P.createElement("defs",null,P.createElement("clipPath",{id:"animationClipPath-".concat(n)},P.createElement(o_e,{alpha:x,points:a,baseLine:s,layout:r.layout,strokeWidth:r.strokeWidth}))),P.createElement(jt,{clipPath:"url(#animationClipPath-".concat(n,")")},P.createElement(o5,{points:a,baseLine:s,needClip:e,clipPathId:n,props:r,showLabels:!0})))})}function s_e(t){var{needClip:e,clipPathId:n,props:r}=t,{points:i,baseLine:o,isAnimationActive:a}=r,s=k.useRef(null),l=k.useRef(),c=s.current,u=l.current;return a&&i&&i.length&&(c!==i||u!==o)?P.createElement(a_e,{needClip:e,clipPathId:n,props:r,previousPointsRef:s,previousBaselineRef:l}):P.createElement(o5,{points:i,baseLine:o,needClip:e,clipPathId:n,props:r,showLabels:!0})}class l_e extends k.PureComponent{constructor(){super(...arguments),f0(this,"id",Va("recharts-area-"))}render(){var e,{hide:n,dot:r,points:i,className:o,top:a,left:s,needClip:l,xAxisId:c,yAxisId:u,width:f,height:d,id:h,baseLine:m}=this.props;if(n)return null;var g=Ye("recharts-area",o),p=ut(h)?this.id:h,{r:O=3,strokeWidth:w=2}=(e=Re(r,!1))!==null&&e!==void 0?e:{r:3,strokeWidth:2},v=S1(r),b=O*2+w;return P.createElement(P.Fragment,null,P.createElement(jt,{className:g},l&&P.createElement("defs",null,P.createElement(Ub,{clipPathId:p,xAxisId:c,yAxisId:u}),!v&&P.createElement("clipPath",{id:"clipPath-dots-".concat(p)},P.createElement("rect",{x:s-b/2,y:a-b/2,width:f+b,height:d+b}))),P.createElement(s_e,{needClip:l,clipPathId:p,props:this.props})),P.createElement(Yb,{points:i,mainColor:d0(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}),this.props.isRange&&Array.isArray(m)&&P.createElement(Yb,{points:m,mainColor:d0(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}))}}var Nj={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:!qa.isSsr,legendType:"line",stroke:"#3182bd",xAxisId:0,yAxisId:0};function c_e(t){var e,n=Qr(t,Nj),{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,fill:c,fillOpacity:u,hide:f,isAnimationActive:d,legendType:h,stroke:m,xAxisId:g,yAxisId:p}=n,O=Ij(n,Wxe),w=jf(),v=YL(),{needClip:b}=i0(g,p),y=Bn(),x=k.useMemo(()=>({baseValue:t.baseValue,stackId:t.stackId,connectNulls:s,data:t.data,dataKey:t.dataKey}),[t.baseValue,t.stackId,s,t.data,t.dataKey]),{points:_,isRange:E,baseLine:A}=(e=ve(R=>Yxe(R,g,p,y,x)))!==null&&e!==void 0?e:{},{height:I,width:Q,x:D,y:j}=r0();return w!=="horizontal"&&w!=="vertical"||v!=="AreaChart"&&v!=="ComposedChart"?null:P.createElement(l_e,rs({},O,{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,baseLine:A,connectNulls:s,dot:l,fill:c,fillOpacity:u,height:I,hide:f,layout:w,isAnimationActive:d,isRange:E,legendType:h,needClip:b,points:_,stroke:m,width:Q,left:D,top:j,xAxisId:g,yAxisId:p}))}var u_e=(t,e,n,r,i)=>{var o=n??e;if(ue(o))return o;var a=t==="horizontal"?i:r,s=a.scale.domain();if(a.type==="number"){var l=Math.max(s[0],s[1]),c=Math.min(s[0],s[1]);return o==="dataMin"?c:o==="dataMax"||l<0?l:Math.max(Math.min(s[0],s[1]),0)}return o==="dataMin"?s[0]:o==="dataMax"?s[1]:s[0]};function f_e(t){var{areaSettings:{connectNulls:e,baseValue:n,dataKey:r},stackedData:i,layout:o,chartBaseValue:a,xAxis:s,yAxis:l,displayedData:c,dataStartIndex:u,xAxisTicks:f,yAxisTicks:d,bandSize:h}=t,m=i&&i.length,g=u_e(o,a,n,s,l),p=o==="horizontal",O=!1,w=c.map((b,y)=>{var x;m?x=i[u+y]:(x=vt(b,r),Array.isArray(x)?O=!0:x=[g,x]);var _=x[1]==null||m&&!e&&vt(b,r)==null;return p?{x:im({axis:s,ticks:f,bandSize:h,entry:b,index:y}),y:_?null:l.scale(x[1]),value:x,payload:b}:{x:_?null:s.scale(x[1]),y:im({axis:l,ticks:d,bandSize:h,entry:b,index:y}),value:x,payload:b}}),v;return m||O?v=w.map(b=>{var y=Array.isArray(b.value)?b.value[0]:null;return p?{x:b.x,y:y!=null&&b.y!=null?l.scale(y):null}:{x:y!=null?s.scale(y):null,y:b.y}}):v=p?l.scale(g):s.scale(g),{points:w,baseLine:v,isRange:O}}class a5 extends k.PureComponent{render(){return P.createElement(qb,{type:"area",data:this.props.data,dataKey:this.props.dataKey,xAxisId:this.props.xAxisId,yAxisId:this.props.yAxisId,zAxisId:0,stackId:this.props.stackId,hide:this.props.hide,barSize:void 0},P.createElement(Vb,{legendPayload:Kxe(this.props)}),P.createElement(e0,{fn:Jxe,args:this.props}),P.createElement(c_e,this.props))}}f0(a5,"displayName","Area"),f0(a5,"defaultProps",Nj);function Rj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Bj(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Rj(Object(n),!0).forEach(function(r){d_e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function d_e(t,e,n){return(e=h_e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h_e(t){var e=p_e(t,"string");return typeof e=="symbol"?e:e+""}function p_e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var m_e={xAxis:{},yAxis:{},zAxis:{}},Zj=li({name:"cartesianAxis",initialState:m_e,reducers:{addXAxis(t,e){t.xAxis[e.payload.id]=e.payload},removeXAxis(t,e){delete t.xAxis[e.payload.id]},addYAxis(t,e){t.yAxis[e.payload.id]=e.payload},removeYAxis(t,e){delete t.yAxis[e.payload.id]},addZAxis(t,e){t.zAxis[e.payload.id]=e.payload},removeZAxis(t,e){delete t.zAxis[e.payload.id]},updateYAxisWidth(t,e){var{id:n,width:r}=e.payload;t.yAxis[n]&&(t.yAxis[n]=Bj(Bj({},t.yAxis[n]),{},{width:r}))}}}),{addXAxis:g_e,removeXAxis:O_e,addYAxis:y_e,removeYAxis:v_e,addZAxis:$Ce,removeZAxis:LCe,updateYAxisWidth:b_e}=Zj.actions,w_e=Zj.reducer,x_e=["children"],__e=["dangerouslySetInnerHTML","ticks"];function zj(t,e,n){return(e=S_e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function S_e(t){var e=k_e(t,"string");return typeof e=="symbol"?e:e+""}function k_e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function s5(){return s5=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s5.apply(null,arguments)}function Xj(t,e){if(t==null)return{};var n,r,i=C_e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function C_e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function P_e(t){var e=Dt(),n=k.useMemo(()=>{var o=Xj(t,x_e);return o},[t]),r=ve(o=>la(o,n.id)),i=n===r;return k.useEffect(()=>(e(g_e(n)),()=>{e(O_e(n))}),[n,e]),i?t.children:null}var E_e=t=>{var{xAxisId:e,className:n}=t,r=ve(_Q),i=Bn(),o="xAxis",a=ve(f=>Dc(f,o,e,i)),s=ve(f=>bL(f,o,e,i)),l=ve(f=>pL(f,e)),c=ve(f=>k5e(f,e));if(l==null||c==null)return null;var u=Xj(t,__e);return P.createElement(ns,s5({},u,{scale:a,x:c.x,y:c.y,width:l.width,height:l.height,className:Ye("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:s}))},T_e=t=>{var e,n,r,i,o;return P.createElement(P_e,{interval:(e=t.interval)!==null&&e!==void 0?e:"preserveEnd",id:t.xAxisId,scale:t.scale,type:t.type,padding:t.padding,allowDataOverflow:t.allowDataOverflow,domain:t.domain,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,includeHidden:(n=t.includeHidden)!==null&&n!==void 0?n:!1,reversed:t.reversed,ticks:t.ticks,height:t.height,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:(r=t.angle)!==null&&r!==void 0?r:0,minTickGap:(i=t.minTickGap)!==null&&i!==void 0?i:5,tick:(o=t.tick)!==null&&o!==void 0?o:!0,tickFormatter:t.tickFormatter},P.createElement(E_e,t))};let l5=class extends k.Component{render(){return P.createElement(T_e,this.props)}};zj(l5,"displayName","XAxis"),zj(l5,"defaultProps",{allowDataOverflow:Lr.allowDataOverflow,allowDecimals:Lr.allowDecimals,allowDuplicatedCategory:Lr.allowDuplicatedCategory,height:Lr.height,hide:!1,mirror:Lr.mirror,orientation:Lr.orientation,padding:Lr.padding,reversed:Lr.reversed,scale:Lr.scale,tickCount:Lr.tickCount,type:Lr.type,xAxisId:0});var A_e=t=>{var{ticks:e,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:o=0}=t,a=0;if(e){e.forEach(u=>{if(u){var f=u.getBoundingClientRect();f.width>a&&(a=f.width)}});var s=n?n.getBoundingClientRect().width:0,l=i+o,c=a+l+s+(n?r:0);return Math.round(c)}return 0},M_e=["dangerouslySetInnerHTML","ticks"];function Vj(t,e,n){return(e=Q_e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Q_e(t){var e=D_e(t,"string");return typeof e=="symbol"?e:e+""}function D_e(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function c5(){return c5=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c5.apply(null,arguments)}function $_e(t,e){if(t==null)return{};var n,r,i=L_e(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function L_e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function I_e(t){var e=Dt();return k.useEffect(()=>(e(y_e(t)),()=>{e(v_e(t))}),[t,e]),null}var j_e=t=>{var e,{yAxisId:n,className:r,width:i,label:o}=t,a=k.useRef(null),s=k.useRef(null),l=ve(_Q),c=Bn(),u=Dt(),f="yAxis",d=ve(O=>Dc(O,f,n,c)),h=ve(O=>mL(O,n)),m=ve(O=>C5e(O,n)),g=ve(O=>bL(O,f,n,c));if(k.useLayoutEffect(()=>{var O;if(!(i!=="auto"||!h||$b(o)||k.isValidElement(o))){var w=a.current,v=w==null||(O=w.tickRefs)===null||O===void 0?void 0:O.current,{tickSize:b,tickMargin:y}=w.props,x=A_e({ticks:v,label:s.current,labelGapWithTick:5,tickSize:b,tickMargin:y});Math.round(h.width)!==Math.round(x)&&u(b_e({id:n,width:x}))}},[a,a==null||(e=a.current)===null||e===void 0||(e=e.tickRefs)===null||e===void 0?void 0:e.current,h==null?void 0:h.width,h,u,o,n,i]),h==null||m==null)return null;var p=$_e(t,M_e);return P.createElement(ns,c5({},p,{ref:a,labelRef:s,scale:d,x:m.x,y:m.y,width:h.width,height:h.height,className:Ye("recharts-".concat(f," ").concat(f),r),viewBox:l,ticks:g}))},N_e=t=>{var e,n,r,i,o;return P.createElement(P.Fragment,null,P.createElement(I_e,{interval:(e=t.interval)!==null&&e!==void 0?e:"preserveEnd",id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:(n=t.includeHidden)!==null&&n!==void 0?n:!1,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:(r=t.angle)!==null&&r!==void 0?r:0,minTickGap:(i=t.minTickGap)!==null&&i!==void 0?i:5,tick:(o=t.tick)!==null&&o!==void 0?o:!0,tickFormatter:t.tickFormatter}),P.createElement(j_e,t))},R_e={allowDataOverflow:Ir.allowDataOverflow,allowDecimals:Ir.allowDecimals,allowDuplicatedCategory:Ir.allowDuplicatedCategory,hide:!1,mirror:Ir.mirror,orientation:Ir.orientation,padding:Ir.padding,reversed:Ir.reversed,scale:Ir.scale,tickCount:Ir.tickCount,type:Ir.type,width:Ir.width,yAxisId:0};let u5=class extends k.Component{render(){return P.createElement(N_e,this.props)}};Vj(u5,"displayName","YAxis"),Vj(u5,"defaultProps",R_e);var f5={};/**
818
818
  * @license React
819
819
  * use-sync-external-store-with-selector.production.js
820
820
  *
@@ -822,4 +822,4 @@ Expecting `+ne.join(", ")+", got '"+(this.terminals_[Q]||Q)+"'":L="Parse error o
822
822
  *
823
823
  * This source code is licensed under the MIT license found in the
824
824
  * LICENSE file in the root directory of this source tree.
825
- */var Fj;function B_e(){if(Fj)return f5;Fj=1;var t=k;function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,o=t.useEffect,a=t.useMemo,s=t.useDebugValue;return f5.useSyncExternalStoreWithSelector=function(l,c,u,f,d){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=a(function(){function p(y){if(!O){if(O=!0,w=y,y=f(y),d!==void 0&&m.hasValue){var x=m.value;if(d(x,y))return v=x}return v=y}if(x=v,n(w,y))return x;var _=f(y);return d!==void 0&&d(x,_)?(w=y,x):(w=y,v=_)}var O=!1,w,v,b=u===void 0?null:u;return[function(){return p(c())},b===null?void 0:function(){return p(b())}]},[c,u,f,d]);var g=r(l,h[0],h[1]);return o(function(){m.hasValue=!0,m.value=g},[g]),s(g),g},f5}B_e();function Z_e(t){t()}function z_e(){let t=null,e=null;return{clear(){t=null,e=null},notify(){Z_e(()=>{let n=t;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=t;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=e={callback:n,next:null,prev:e};return i.prev?i.prev.next=i:t=i,function(){!r||t===null||(r=!1,i.next?i.next.prev=i.prev:e=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var Yj={notify(){},get:()=>[]};function X_e(t,e){let n,r=Yj,i=0,o=!1;function a(g){u();const p=r.subscribe(g);let O=!1;return()=>{O||(O=!0,p(),f())}}function s(){r.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return o}function u(){i++,n||(n=t.subscribe(l),r=z_e())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=Yj)}function d(){o||(o=!0,u())}function h(){o&&(o=!1,f())}const m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:d,tryUnsubscribe:h,getListeners:()=>r};return m}var V_e=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",F_e=V_e(),Y_e=()=>typeof navigator<"u"&&navigator.product==="ReactNative",q_e=Y_e(),W_e=()=>F_e||q_e?P.useLayoutEffect:P.useEffect,U_e=W_e(),d5=Symbol.for("react-redux-context"),h5=typeof globalThis<"u"?globalThis:{};function H_e(){if(!P.createContext)return{};const t=h5[d5]??(h5[d5]=new Map);let e=t.get(P.createContext);return e||(e=P.createContext(null),t.set(P.createContext,e)),e}var G_e=H_e();function K_e(t){const{children:e,context:n,serverState:r,store:i}=t,o=P.useMemo(()=>{const l=X_e(i);return{store:i,subscription:l,getServerState:r?()=>r:void 0}},[i,r]),a=P.useMemo(()=>i.getState(),[i]);U_e(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,a]);const s=n||G_e;return P.createElement(s.Provider,{value:o},e)}var J_e=K_e,eSe=(t,e)=>e,p5=Y([eSe,qe,Rbe,bn,NL,ca,E9e,ln],D9e),m5=t=>{var e=t.currentTarget.getBoundingClientRect(),n=e.width/t.currentTarget.offsetWidth,r=e.height/t.currentTarget.offsetHeight;return{chartX:Math.round((t.clientX-e.left)/n),chartY:Math.round((t.clientY-e.top)/r)}},qj=si("mouseClick"),Wj=If();Wj.startListening({actionCreator:qj,effect:(t,e)=>{var n=t.payload,r=p5(e.getState(),m5(n));(r==null?void 0:r.activeIndex)!=null&&e.dispatch(R5e({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var g5=si("mouseMove"),Uj=If();Uj.startListening({actionCreator:g5,effect:(t,e)=>{var n=t.payload,r=e.getState(),i=Ob(r,r.tooltip.settings.shared),o=p5(r,m5(n));i==="axis"&&((o==null?void 0:o.activeIndex)!=null?e.dispatch(EL({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):e.dispatch(PL()))}});function tSe(t,e){return e instanceof HTMLElement?"HTMLElement <".concat(e.tagName,' class="').concat(e.className,'">'):e===window?"global.window":e}var Hj={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},Gj=li({name:"rootProps",initialState:Hj,reducers:{updateOptions:(t,e)=>{var n;t.accessibilityLayer=e.payload.accessibilityLayer,t.barCategoryGap=e.payload.barCategoryGap,t.barGap=(n=e.payload.barGap)!==null&&n!==void 0?n:Hj.barGap,t.barSize=e.payload.barSize,t.maxBarSize=e.payload.maxBarSize,t.stackOffset=e.payload.stackOffset,t.syncId=e.payload.syncId,t.syncMethod=e.payload.syncMethod,t.className=e.payload.className}}}),nSe=Gj.reducer,{updateOptions:rSe}=Gj.actions,Kj=li({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(t,e)=>e.payload}}),{updatePolarOptions:iSe}=Kj.actions,oSe=Kj.reducer,Jj=si("keyDown"),eN=si("focus"),O5=If();O5.startListening({actionCreator:Jj,effect:(t,e)=>{var n=e.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip,o=t.payload;if(!(o!=="ArrowRight"&&o!=="ArrowLeft"&&o!=="Enter")){var a=Number(bb(i,al(n))),s=ca(n);if(o==="Enter"){var l=Ym(n,"axis","hover",String(i.index));e.dispatch(vb({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=A5e(n),u=c==="left-to-right"?1:-1,f=o==="ArrowRight"?1:-1,d=a+f*u;if(!(s==null||d>=s.length||d<0)){var h=Ym(n,"axis","hover",String(d));e.dispatch(vb({active:!0,activeIndex:d.toString(),activeDataKey:void 0,activeCoordinate:h}))}}}}}),O5.startListening({actionCreator:eN,effect:(t,e)=>{var n=e.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var o="0",a=Ym(n,"axis","hover",String(o));e.dispatch(vb({activeDataKey:void 0,active:!0,activeIndex:o,activeCoordinate:a}))}}}});var pi=si("externalEvent"),tN=If();tN.startListening({actionCreator:pi,effect:(t,e)=>{if(t.payload.handler!=null){var n=e.getState(),r={activeCoordinate:v9e(n),activeDataKey:zL(n),activeIndex:ts(n),activeLabel:ZL(n),activeTooltipIndex:ts(n),isTooltipActive:b9e(n)};t.payload.handler(r,t.payload.reactEvent)}}});var aSe=Y([$c],t=>t.tooltipItemPayloads),sSe=Y([aSe,cd,(t,e,n)=>e,(t,e,n)=>n],(t,e,n,r)=>{var i=t.find(s=>s.settings.dataKey===r);if(i!=null){var{positions:o}=i;if(o!=null){var a=e(o,n);return a}}}),nN=si("touchMove"),rN=If();rN.startListening({actionCreator:nN,effect:(t,e)=>{var n=t.payload,r=e.getState(),i=Ob(r,r.tooltip.settings.shared);if(i==="axis"){var o=p5(r,m5({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));(o==null?void 0:o.activeIndex)!=null&&e.dispatch(EL({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if(i==="item"){var a,s=n.touches[0],l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(bQ),u=(a=l.getAttribute(wQ))!==null&&a!==void 0?a:void 0,f=sSe(e.getState(),c,u);e.dispatch(CL({activeDataKey:u,activeIndex:c,activeCoordinate:f}))}}});var lSe=EM({brush:Qwe,cartesianAxis:w_e,chartData:W9e,graphicalItems:S8e,layout:N3e,legend:S6e,options:X9e,polarAxis:l8e,polarOptions:oSe,referenceElements:Bwe,rootProps:nSe,tooltip:B5e}),cSe=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return c3e({reducer:lSe,preloadedState:e,middleware:r=>r({serializableCheck:!1}).concat([Wj.middleware,Uj.middleware,O5.middleware,tN.middleware,rN.middleware]),devTools:{serialize:{replacer:tSe},name:"recharts-".concat(n)}})};function iN(t){var{preloadedState:e,children:n,reduxStoreName:r}=t,i=Bn(),o=k.useRef(null);if(i)return n;o.current==null&&(o.current=cSe(e,r));var a=xv;return P.createElement(J_e,{context:a,store:o.current},n)}function oN(t){var{layout:e,width:n,height:r,margin:i}=t,o=Dt(),a=Bn();return k.useEffect(()=>{a||(o(L3e(e)),o(I3e({width:n,height:r})),o($3e(i)))},[o,a,e,n,r,i]),null}function aN(t){var e=Dt();return k.useEffect(()=>{e(rSe(t))},[e,t]),null}var uSe=["children"];function fSe(t,e){if(t==null)return{};var n,r,i=dSe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function dSe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function h0(){return h0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},h0.apply(null,arguments)}var hSe={width:"100%",height:"100%"},pSe=k.forwardRef((t,e)=>{var n=Fv(),r=Yv(),i=DQ();if(!bc(n)||!bc(r))return null;var{children:o,otherAttributes:a,title:s,desc:l}=t,c,u;return typeof a.tabIndex=="number"?c=a.tabIndex:c=i?0:void 0,typeof a.role=="string"?u=a.role:u=i?"application":void 0,P.createElement(Wy,h0({},a,{title:s,desc:l,role:u,tabIndex:c,width:n,height:r,style:hSe,ref:e}),o)}),mSe=t=>{var{children:e}=t,n=ve(sm);if(!n)return null;var{width:r,height:i,y:o,x:a}=n;return P.createElement(Wy,{width:r,height:i,x:a,y:o},e)},sN=k.forwardRef((t,e)=>{var{children:n}=t,r=fSe(t,uSe),i=Bn();return i?P.createElement(mSe,null,n):P.createElement(pSe,h0({ref:e},r),n)});function gSe(){var t=Dt(),[e,n]=k.useState(null),r=ve(d6e);return k.useEffect(()=>{if(e!=null){var i=e.getBoundingClientRect(),o=i.width/e.offsetWidth;An(o)&&o!==r&&t(j3e(o))}},[e,t,r]),n}function lN(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function OSe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?lN(Object(n),!0).forEach(function(r){ySe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ySe(t,e,n){return(e=vSe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vSe(t){var e=bSe(t,"string");return typeof e=="symbol"?e:e+""}function bSe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var wSe=k.forwardRef((t,e)=>{var{children:n,className:r,height:i,onClick:o,onContextMenu:a,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:f,onMouseUp:d,onTouchEnd:h,onTouchMove:m,onTouchStart:g,style:p,width:O}=t,w=Dt(),[v,b]=k.useState(null),[y,x]=k.useState(null);G9e();var _=gSe(),E=k.useCallback(oe=>{_(oe),typeof e=="function"&&e(oe),b(oe),x(oe)},[_,e,b,x]),A=k.useCallback(oe=>{w(qj(oe)),w(pi({handler:o,reactEvent:oe}))},[w,o]),I=k.useCallback(oe=>{w(g5(oe)),w(pi({handler:c,reactEvent:oe}))},[w,c]),Q=k.useCallback(oe=>{w(PL()),w(pi({handler:u,reactEvent:oe}))},[w,u]),D=k.useCallback(oe=>{w(g5(oe)),w(pi({handler:f,reactEvent:oe}))},[w,f]),j=k.useCallback(()=>{w(eN())},[w]),R=k.useCallback(oe=>{w(Jj(oe.key))},[w]),B=k.useCallback(oe=>{w(pi({handler:a,reactEvent:oe}))},[w,a]),X=k.useCallback(oe=>{w(pi({handler:s,reactEvent:oe}))},[w,s]),V=k.useCallback(oe=>{w(pi({handler:l,reactEvent:oe}))},[w,l]),K=k.useCallback(oe=>{w(pi({handler:d,reactEvent:oe}))},[w,d]),ne=k.useCallback(oe=>{w(pi({handler:g,reactEvent:oe}))},[w,g]),L=k.useCallback(oe=>{w(nN(oe)),w(pi({handler:m,reactEvent:oe}))},[w,m]),fe=k.useCallback(oe=>{w(pi({handler:h,reactEvent:oe}))},[w,h]);return P.createElement(KL.Provider,{value:v},P.createElement(xA.Provider,{value:y},P.createElement("div",{className:Ye("recharts-wrapper",r),style:OSe({position:"relative",cursor:"default",width:O,height:i},p),onClick:A,onContextMenu:B,onDoubleClick:X,onFocus:j,onKeyDown:R,onMouseDown:V,onMouseEnter:I,onMouseLeave:Q,onMouseMove:D,onMouseUp:K,onTouchEnd:fe,onTouchMove:L,onTouchStart:ne,ref:E},n)))}),xSe=["children","className","width","height","style","compact","title","desc"];function _Se(t,e){if(t==null)return{};var n,r,i=SSe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function SSe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var cN=k.forwardRef((t,e)=>{var{children:n,className:r,width:i,height:o,style:a,compact:s,title:l,desc:c}=t,u=_Se(t,xSe),f=Re(u,!1);return s?P.createElement(sN,{otherAttributes:f,title:l,desc:c},n):P.createElement(wSe,{className:r,style:a,width:i,height:o,onClick:t.onClick,onMouseLeave:t.onMouseLeave,onMouseEnter:t.onMouseEnter,onMouseMove:t.onMouseMove,onMouseDown:t.onMouseDown,onMouseUp:t.onMouseUp,onContextMenu:t.onContextMenu,onDoubleClick:t.onDoubleClick,onTouchStart:t.onTouchStart,onTouchMove:t.onTouchMove,onTouchEnd:t.onTouchEnd},P.createElement(sN,{otherAttributes:f,title:l,desc:c,ref:e},P.createElement(zwe,null,n)))}),kSe=["width","height"];function y5(){return y5=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},y5.apply(null,arguments)}function CSe(t,e){if(t==null)return{};var n,r,i=PSe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function PSe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var ESe={top:5,right:5,bottom:5,left:5},TSe={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:ESe,reverseStackOrder:!1,syncMethod:"index"},v5=k.forwardRef(function(e,n){var r,i=Qr(e.categoricalChartProps,TSe),{width:o,height:a}=i,s=CSe(i,kSe);if(!bc(o)||!bc(a))return null;var{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,categoricalChartProps:d}=e,h={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,eventEmitter:void 0};return P.createElement(iN,{preloadedState:{options:h},reduxStoreName:(r=d.id)!==null&&r!==void 0?r:l},P.createElement(gj,{chartData:d.data}),P.createElement(oN,{width:o,height:a,layout:i.layout,margin:i.margin}),P.createElement(aN,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),P.createElement(cN,y5({},s,{width:o,height:a,ref:n})))}),ASe=["axis"],MSe=k.forwardRef((t,e)=>P.createElement(v5,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:ASe,tooltipPayloadSearcher:Wm,categoricalChartProps:t,ref:e})),QSe=["axis","item"],DSe=k.forwardRef((t,e)=>P.createElement(v5,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:QSe,tooltipPayloadSearcher:Wm,categoricalChartProps:t,ref:e}));function $Se(t){var e=Dt();return k.useEffect(()=>{e(iSe(t))},[e,t]),null}var LSe=["width","height","layout"];function b5(){return b5=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},b5.apply(null,arguments)}function ISe(t,e){if(t==null)return{};var n,r,i=jSe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function jSe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var NSe={top:5,right:5,bottom:5,left:5},RSe={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:NSe,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},BSe=k.forwardRef(function(e,n){var r,i=Qr(e.categoricalChartProps,RSe),{width:o,height:a,layout:s}=i,l=ISe(i,LSe);if(!bc(o)||!bc(a))return null;var{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d}=e,h={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d,eventEmitter:void 0};return P.createElement(iN,{preloadedState:{options:h},reduxStoreName:(r=i.id)!==null&&r!==void 0?r:c},P.createElement(gj,{chartData:i.data}),P.createElement(oN,{width:o,height:a,layout:s,margin:i.margin}),P.createElement(aN,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),P.createElement($Se,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),P.createElement(cN,b5({width:o,height:a},l,{ref:n})))}),ZSe=["item"],zSe={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},XSe=k.forwardRef((t,e)=>{var n=Qr(t,zSe);return P.createElement(BSe,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:ZSe,tooltipPayloadSearcher:Wm,categoricalChartProps:n,ref:e})}),VSe=["axis"],FSe=k.forwardRef((t,e)=>P.createElement(v5,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:VSe,tooltipPayloadSearcher:Wm,categoricalChartProps:t,ref:e}));const p0=({withPadding:t=!1})=>{const e=n=>F.jsx("span",{style:{color:mi.labelColor},children:n});return F.jsx(lm,{formatter:e,wrapperStyle:{fontSize:mi.fontSize,fontFamily:mi.fontFamily,padding:t?"1rem 0":"0"}})},m0=()=>F.jsx(o4e,{contentStyle:{backgroundColor:mi.tooltipBg,borderRadius:mi.tooltipBorderRadius,color:mi.tooltipColor}}),w5=({dataKey:t,hide:e=!1})=>F.jsx(l5,{dataKey:t,hide:e,tick:{fill:mi.labelColor,fontSize:mi.fontSize}}),x5=()=>F.jsx(u5,{tick:{fill:mi.labelColor,fontSize:mi.fontSize}}),YSe={area:t=>{const{data:e,xKey:n,yKeys:r}=t;return F.jsx(Um,{width:"100%",height:400,children:F.jsxs(FSe,{data:e,children:[F.jsx(c0,{strokeDasharray:"3 3"}),F.jsx(w5,{dataKey:n}),F.jsx(x5,{}),F.jsx(m0,{}),F.jsx(p0,{}),r.map((i,o)=>F.jsx(a5,{type:"monotone",dataKey:i,stroke:wo[o%wo.length],fill:wo[o%wo.length]},i))]})})},bar:t=>{const{data:e,yKeys:n,xKey:r}=t;return F.jsx(Um,{width:"100%",height:400,children:F.jsxs(DSe,{data:e,children:[F.jsx(c0,{strokeDasharray:"3 3"}),F.jsx(w5,{hide:!0,dataKey:r}),F.jsx(x5,{}),F.jsx(m0,{}),F.jsx(p0,{withPadding:!0}),n.map((i,o)=>F.jsx(Gb,{dataKey:i,fill:wo[o%wo.length]},i))]})})},line:t=>{const{data:e,xKey:n,yKeys:r}=t;return F.jsx(Um,{width:"100%",height:400,children:F.jsxs(MSe,{data:e,children:[F.jsx(c0,{strokeDasharray:"3 3"}),F.jsx(w5,{dataKey:n}),F.jsx(x5,{}),F.jsx(m0,{}),F.jsx(p0,{}),r.map((i,o)=>F.jsx(i5,{type:"monotone",dataKey:i,stroke:wo[o%wo.length],strokeWidth:2,dot:!1},i))]})})},pie:t=>{const{data:e,xKey:n,yKeys:r}=t,i=({cx:o,cy:a,midAngle:s,innerRadius:l,outerRadius:c,value:u})=>{const f=Math.PI/180,d=25+l+(c-l),h=o+d*Math.cos(-(s??0)*f),m=a+d*Math.sin(-(s??0)*f);return F.jsx("text",{x:h,y:m,fill:mi.labelColor,color:mi.labelColor,textAnchor:"middle",dominantBaseline:"central",children:u})};return F.jsx(Um,{width:"100%",height:400,children:F.jsxs(XSe,{children:[F.jsx(m0,{}),F.jsx(p0,{}),F.jsx(Fb,{data:e,dataKey:r[0],nameKey:n,label:i,outerRadius:120,children:e.map((o,a)=>F.jsx(dd,{fill:wo[a%wo.length]},`cell-${a}`))})]})})}},wo=["var(--color-primitive-palette-1-50)","var(--color-primitive-palette-2-50)","var(--color-primitive-palette-3-50)","var(--color-primitive-palette-4-50)","var(--color-primitive-palette-5-50)","var(--color-primitive-palette-6-50)","var(--color-primitive-palette-7-50)","var(--color-primitive-palette-8-50)","var(--color-primitive-palette-9-50)","var(--color-primitive-palette-10-50)","var(--color-primitive-palette-11-50)","var(--color-primitive-palette-12-50)","var(--color-primitive-palette-13-50)","var(--color-primitive-palette-14-50)","var(--color-primitive-palette-15-50)","var(--color-primitive-palette-16-50)","var(--color-primitive-palette-17-50)"],mi={fontFamily:"Roboto, sans-serif",fontSize:12,labelColor:"var(--color-neutral-90)",tooltipBg:"#fff",tooltipColor:"#000",tooltipBorderRadius:"4px"},uN=t=>{const{component:e,userFlow:n,hash:r,responseKey:i,dataSource:o,...a}=t,s=YSe[a.type];if(!s)return F.jsx("div",{children:"Not supported chart type"});const{fetchDataSource:l}=bi(),[c,u]=k.useState(!1),[f,d]=k.useState([]),h=async()=>{var g,p;try{u(!0);const{jsonPathData:O,mapperData:w}=o,v=Ry(o,1),b=await l(v,n,!1),y=O?(g=fA(b==null?void 0:b.data,O,w))==null?void 0:g.items:(p=b==null?void 0:b.data)==null?void 0:p.data;d(y),u(!1)}catch(O){alert(JSON.stringify(O)),u(!1)}};k.useEffect(()=>{o?h():d(a.data)},[]);const m={...a,data:f};return c?F.jsx(Mw,{height:400}):f.length>0?s(m):F.jsx(Sd,{state:"info",title:"Sin registros",children:"No hay datos disponibles para mostrar en este momento"})},fN={header:"_header_g1eri_1",header_content:"_header_content_g1eri_5"},qSe=({components:t=[]})=>F.jsx("section",{className:b1(fN.header,"avocado-dark-theme"),children:F.jsx("div",{className:fN.header_content,children:t.map((e,n)=>F.jsx(k.Fragment,{children:e},n))})}),Nr=(t,e,n)=>{var o;const r={accordion:a=>F.jsx(hke,{...a,userFlow:t,pageId:e}),breadcrumbs:a=>F.jsx(Oae,{...a,userFlow:t,pageId:e}),button:a=>F.jsx(yae,{...a,userFlow:t,pageId:e}),cardNotification:a=>F.jsx(bae,{...a}),chart:a=>F.jsx(uN,{...a,userFlow:t}),checkbox:a=>F.jsx(wae,{...a,userFlow:t,pageId:e}),code:a=>F.jsx(ige,{...a,userFlow:t,pageId:e}),divider:a=>F.jsx(sge,{...a}),drawer:a=>F.jsx(pke,{...a,userFlow:t,pageId:e}),heading:a=>Ww(a),pill:a=>F.jsx(KSe,{...a}),modal:a=>F.jsx(USe,{...a,userFlow:t,pageId:e}),roundButton:a=>F.jsx(JSe,{...a,userFlow:t,pageId:e}),row:a=>F.jsx(dN,{...a,userFlow:t,pageId:e}),select:a=>F.jsx(rke,{...a,userFlow:t,pageId:e}),switch:a=>F.jsx(oke,{...a,userFlow:t,pageId:e}),spacing:a=>F.jsx(ike,{...a,userFlow:t,pageId:e}),table:a=>F.jsx(cke,{...a,userFlow:t,pageId:e}),text:a=>Uw(a),textField:a=>F.jsx(fke,{...a,userFlow:t,pageId:e}),toast:a=>F.jsx(dke,{...a,userFlow:t,pageId:e})};return(o=n==null?void 0:n.filter(Boolean))==null?void 0:o.map(a=>{const s=r[a.component];return s?s({...a,userFlow:t,pageId:e}):null})},WSe={modalContent:"_modalContent_1ynhd_1"},USe=({userFlow:t,pageId:e,responseKey:n,header:r,body:i,footer:o,headerStatusColor:a,...s})=>{const l=pt(O=>{var w;return(w=O[t])==null?void 0:w.isModalOpen}),c=pt(O=>{var w;return(w=O[t])==null?void 0:w.isLoading}),u=l&&!c,f={...s},d=(f==null?void 0:f.headerStatusColor)??a,h=k.useCallback(()=>{gO(t),OO(t,!1)},[t,n]),m=Array.isArray(r)?Nr(t,e,r):r,g=Nr(t,e,i),p=Nr(t,e,o);return F.jsx(Aq,{...f,headerStatusColor:d,header:typeof m=="string"?m:F.jsx(F.Fragment,{children:m.map((O,w)=>F.jsx(k.Fragment,{children:O},`modal-header-${w}`))}),children:F.jsx("section",{className:WSe.modalContent,children:g.map((O,w)=>F.jsx(k.Fragment,{children:O},`modal-body-${w}`))}),actions:F.jsx(F.Fragment,{children:p.map((O,w)=>F.jsx(k.Fragment,{children:O},`modal-footer-${w}`))}),open:u,onClose:h})},HSe=({userFlow:t,pageId:e})=>{var o,a;const n=Fie(t);if(!n)return null;const r=[...(n==null?void 0:n.components)||[],...((o=n==null?void 0:n.header)==null?void 0:o.components)||[],...((a=n==null?void 0:n.body)==null?void 0:a.components)||[]],i=Nr(t,e,r);return F.jsx(F.Fragment,{children:i==null?void 0:i.map((s,l)=>{const c=`overlay-${l}-${Date.now()}`;return F.jsx(k.Fragment,{children:s},c)})})},GSe={success:{color:"success-opacity",textColor:"success-60",iconColor:"success-50"},warning:{color:"warning-opacity",textColor:"warning-60",iconColor:"warning-50"},error:{color:"error-opacity",textColor:"error-60",iconColor:"error-50"},info:{color:"primary-10",textColor:"primary-70",iconColor:"primary-70"},neutral:{color:"neutral-10",textColor:"neutral-70",iconColor:"neutral-70"}},KSe=t=>{const{content:e,variant:n="neutral",...r}=t,i=GSe[n],o={...r,children:e,color:(r==null?void 0:r.color)??i.color,textColor:(r==null?void 0:r.textColor)??i.textColor,iconColor:(r==null?void 0:r.iconColor)??i.iconColor};return F.jsx(Ag,{...o})},JSe=t=>{const{userFlow:e,pageId:n,responseKey:r,actionType:i,dataSource:o,dependencies:a,onClick:s,...l}=t,{getNextUI:c,fetchAndGetNextUI:u}=bi(),{disabled:f}=Io(e,a),d={...l},h=(d==null?void 0:d.disabled)??f,m=k.useCallback(async()=>{var g;try{const p={...(g=pt.getState()[e])==null?void 0:g.entries,[r]:{status:200}};Wr(e,p);const O=async w=>{const v=await w(e,n,p,r,o);v!=null&&v.data&&yi(e,v==null?void 0:v.data)};switch(i){case"GO_TO_NEXT_UI":await O(c);break;case"FETCH_AND_GO_TO_NEXT_UI":await O(u);break;case"CLOSE_MODAL":OO(e,!1);break;case"CLOSE_DRAWER":bu(e,!1);break;case"OPEN_DRAWER":bu(e,!0);break;default:console.warn(`Unhandled actionType: ${i}`);break}}catch(p){alert(JSON.stringify(p))}},[i,n,r,e]);return F.jsx(nh,{...d,disabled:h,onClick:()=>!h&&(s??m)()})},is={row:"_row_1bqj4_1","row__gap-none":"_row__gap-none_1bqj4_5","row__gap-xxs":"_row__gap-xxs_1bqj4_8","row__gap-xs":"_row__gap-xs_1bqj4_11","row__gap-sm":"_row__gap-sm_1bqj4_14","row__gap-md":"_row__gap-md_1bqj4_17","row__gap-lg":"_row__gap-lg_1bqj4_20","row__gap-xl":"_row__gap-xl_1bqj4_23","row__gap-xxl":"_row__gap-xxl_1bqj4_26","row__gap-xxxl":"_row__gap-xxxl_1bqj4_29","row__justify-start":"_row__justify-start_1bqj4_32","row__justify-end":"_row__justify-end_1bqj4_35","row__justify-center":"_row__justify-center_1bqj4_38","row__justify-space-between":"_row__justify-space-between_1bqj4_41","row__justify-space-around":"_row__justify-space-around_1bqj4_44","row__justify-space-evenly":"_row__justify-space-evenly_1bqj4_47","row__align-start":"_row__align-start_1bqj4_50","row__align-end":"_row__align-end_1bqj4_53","row__align-center":"_row__align-center_1bqj4_56","row__align-stretch":"_row__align-stretch_1bqj4_59","row__align-baseline":"_row__align-baseline_1bqj4_62",row_column:"_row_column_1bqj4_65","row_column__gap-none":"_row_column__gap-none_1bqj4_72","row_column__gap-xxs":"_row_column__gap-xxs_1bqj4_75","row_column__gap-xs":"_row_column__gap-xs_1bqj4_78","row_column__gap-sm":"_row_column__gap-sm_1bqj4_81","row_column__gap-md":"_row_column__gap-md_1bqj4_84","row_column__gap-lg":"_row_column__gap-lg_1bqj4_87","row_column__gap-xl":"_row_column__gap-xl_1bqj4_90","row_column__gap-xxl":"_row_column__gap-xxl_1bqj4_93","row_column__gap-xxxl":"_row_column__gap-xxxl_1bqj4_96","row_column__justify-start":"_row_column__justify-start_1bqj4_99","row_column__justify-end":"_row_column__justify-end_1bqj4_102","row_column__justify-center":"_row_column__justify-center_1bqj4_105","row_column__justify-space-between":"_row_column__justify-space-between_1bqj4_108","row_column__justify-space-around":"_row_column__justify-space-around_1bqj4_111","row_column__justify-space-evenly":"_row_column__justify-space-evenly_1bqj4_114","row_column__align-start":"_row_column__align-start_1bqj4_117","row_column__align-end":"_row_column__align-end_1bqj4_120","row_column__align-center":"_row_column__align-center_1bqj4_123","row_column__align-stretch":"_row_column__align-stretch_1bqj4_126","row_column__align-baseline":"_row_column__align-baseline_1bqj4_129"},dN=t=>{const{userFlow:e,pageId:n,columnWidth:r,columns:i,gap:o="md",justifyContent:a="start",alignItems:s="stretch"}=t,l=Array.isArray(i)?i.map((c,u)=>{const f=`col_${u}`,d=`col_${u}`;if(Array.isArray(c))return{gap:"md",justifyContent:"start",alignItems:"start",items:c,hash:f,responseKey:d};const h=c;return{gap:(h==null?void 0:h.gap)??"md",justifyContent:(h==null?void 0:h.justifyContent)??"start",alignItems:(h==null?void 0:h.alignItems)??"start",items:(h==null?void 0:h.items)??[],hash:(h==null?void 0:h.hash)??f,responseKey:(h==null?void 0:h.responseKey)??d}}):[];return l.length===0?null:F.jsx("div",{className:b1(is.row,is[`row__gap-${o}`],is[`row__justify-${a}`],is[`row__align-${s}`]),children:l==null?void 0:l.map((c,u)=>{const f=(r==null?void 0:r[u])||`${100/l.length}%`,d=Nr(e,n,c.items);return!d||d.length===0?null:F.jsx("div",{className:b1(is.row_column,is[`row_column__gap-${c.gap}`],is[`row_column__justify-${c.justifyContent}`],is[`row_column__align-${c.alignItems}`]),style:{width:f},children:d},c.hash||u)})})},eke=(t,e,n,r)=>{const i=Wo.query(t,e);return(i==null?void 0:i.map(o=>{var l,c;const a=(l=Wo.query(o,n))==null?void 0:l[0],s=r?(c=Wo.query(o,r))==null?void 0:c[0]:o;return{label:a,value:s}}))??[]},hN={selectNotFront:"_selectNotFront_1yw9q_1"},tke=({userFlow:t,pageId:e,responseKey:n,required:r,dataSource:i,actionType:o,dependencies:a,...s})=>{const l={...s},{getNextUI:c,fetchDataSource:u}=bi(),[f,d]=k.useState((l==null?void 0:l.value)??""),{disabled:h}=Io(t,a),m=(l==null?void 0:l.disabled)??h,g=k.useMemo(()=>r&&(l!=null&&l.label)?`${l==null?void 0:l.label} *`:(l==null?void 0:l.label)??"",[l==null?void 0:l.label,r]),p=k.useCallback(async w=>{var b;d(w);const v={...(b=pt.getState()[t])==null?void 0:b.entries,[n]:w};if(Wr(t,v),o&&o==="GO_TO_NEXT_UI")try{const y=await c(t,e,v,n);y!=null&&y.data&&yi(t,y.data)}catch(y){console.error("[SelectPaginationNotFront] Failed to fetch next UI",y)}},[t,e,n,o,c]),O=async(w,v,{page:b})=>{const{jsonPathLabel:y,jsonPathOptions:x,jsonPathValue:_}=i,E=Ry(i,b,w),A=await u(E,t,!1),I=A==null?void 0:A.data,Q=I?eke(I,x,y,_):[],D=I==null?void 0:I.meta,j=D?Math.ceil(D.total/10)>b:!1;return{options:Q,hasMore:j,additional:{page:w?1:b+1}}};return F.jsx(Pne,{...l,className:hN.selectNotFront,label:g,value:f,disabled:m,noOptionsMessage:()=>F.jsx(F.Fragment,{children:"Sin opciones"}),onChange:w=>!m&&p(w),loadOptions:O,additional:{page:1}})},nke=({userFlow:t,pageId:e,responseKey:n,dataSource:r,required:i,actionType:o,dependencies:a,...s})=>{const l={...s},{getNextUI:c}=bi(),[u,f]=k.useState(l.value||""),{disabled:d}=Io(t,a),h=(l==null?void 0:l.disabled)??d,m=k.useMemo(()=>i&&(l!=null&&l.label)?`${l==null?void 0:l.label} *`:(l==null?void 0:l.label)??"",[l==null?void 0:l.label,i]),g=k.useCallback(async p=>{var w;f(p);const O={...(w=pt.getState()[t])==null?void 0:w.entries,[n]:p};if(Wr(t,O),o&&o==="GO_TO_NEXT_UI")try{const v=await c(t,e,O,n);v!=null&&v.data&&yi(t,v.data)}catch(v){console.error("[SelectSimpleNotFront] Failed to fetch next UI",v)}},[t,e,n,o,c]);return F.jsx(V8,{...l,className:hN.selectNotFront,label:m,value:u,disabled:h,onChange:p=>!h&&g(p)})},rke=t=>{const{dataSource:e}=t;return e?F.jsx(tke,{...t}):F.jsx(nke,{...t})},pN={spacing:"_spacing_19hqa_1",spacing__xxs:"_spacing__xxs_19hqa_1",spacing__xs:"_spacing__xs_19hqa_4",spacing__sm:"_spacing__sm_19hqa_7",spacing__md:"_spacing__md_19hqa_10",spacing__lg:"_spacing__lg_19hqa_13",spacing__xl:"_spacing__xl_19hqa_16",spacing__xxl:"_spacing__xxl_19hqa_19",spacing__xxxl:"_spacing__xxxl_19hqa_22"},ike=t=>{const{size:e}=t,n=b1(pN.spacing,pN[`spacing__${e}`]);return F.jsx("div",{className:n})},oke=t=>{const{userFlow:e,pageId:n,responseKey:r,actionType:i,label:o,value:a,required:s,dependencies:l,...c}=t,u={...c},{getNextUI:f}=bi(),[d,h]=k.useState(a||!1),{disabled:m}=Io(e,l),g=(u==null?void 0:u.disabled)??m,p=k.useMemo(()=>s&&o?`${o} *`:o??"",[o,s]),O=k.useCallback(async()=>{var w;try{const v=!d;h(v);const b={...(w=pt.getState()[e])==null?void 0:w.entries,[r]:v};switch(Wr(e,b),i){case"GO_TO_NEXT_UI":const y=await f(e,n,b,r);y!=null&&y.data&&yi(e,y==null?void 0:y.data);break;default:console.warn(`Unhandled actionType: ${i}`);break}}catch(v){console.error("Error in switch action:",v),alert(JSON.stringify(v))}},[e,n,r,i,d]);return F.jsx(Nne,{...u,label:p,checked:d,disabled:g,onChange:()=>!g&&O()})},mN={tableSkeleton:"_tableSkeleton_3nr9n_1",tableArrayPills:"_tableArrayPills_3nr9n_7"},ake=({values:t})=>{const n=t==null?void 0:t.slice(0,4),r=(t==null?void 0:t.length)-4;return F.jsxs("div",{className:mN.tableArrayPills,children:[n.map((i,o)=>F.jsx(Ag,{children:String(i)},o)),r>0&&F.jsxs(Ag,{outlined:!0,children:["+",r]})]})},ske=({userFlow:t,pageId:e,tableResponseKey:n,component:r,rowData:i})=>{const{getNextUI:o,fetchAndGetNextUI:a,fetchDataSource:s}=bi(),l=Nr(t,e,[{...r}]),c=(l==null?void 0:l[0])||null;if(!c)return null;const{actionType:u,responseKey:f,dataSource:d}=c.props,h=k.useCallback(async()=>{var m,g,p;try{const O={...(m=pt.getState()[t])==null?void 0:m.entries,[f]:{status:200},[n]:[{...i}]};Wr(t,O);const w=async v=>{const b=await v(t,e,O,f,d);b!=null&&b.data&&yi(t,b==null?void 0:b.data)};switch(u){case"GO_TO_NEXT_UI":await w(o);break;case"FETCH_AND_GO_TO_NEXT_UI":await w(a);break;case"GET_DATA_SOURCE":{const v=await o(t,e,O,f),b=(g=v==null?void 0:v.data)==null?void 0:g.content;if((b==null?void 0:b.type)!=="fetch")break;const y=b==null?void 0:b.dataSource,x=await s(y,t,!1),_={...(p=pt.getState()[t])==null?void 0:p.entries,[f]:{status:x==null?void 0:x.status,content:x==null?void 0:x.data}};Wr(t,_);const E=await o(t,e,_,f);E!=null&&E.data&&yi(t,E==null?void 0:E.data);break}default:console.warn(`Unhandled actionType: ${u}`);break}}catch(O){alert(JSON.stringify(O))}},[u,e,f,t]);return k.cloneElement(c,{onClick:h})},lke=()=>F.jsx("div",{className:mN.tableSkeleton,children:[...Array(10)].map((t,e)=>F.jsx(Mw,{maxWidth:"100%",height:42,radius:8},`tableSkeletonBase${e}`))}),cke=({userFlow:t,pageId:e,responseKey:n,component:r,dataSource:i,rightActions:o,...a})=>{var v,b,y;const{fetchDataSource:s}=bi(),[l,c]=k.useState(!1),[u,f]=k.useState(1),[d,h]=k.useState(null),m=k.useMemo(()=>{if(o!=null&&o.length)return o.map((x,_)=>({renderContent:E=>F.jsx(ske,{userFlow:t,pageId:e,tableResponseKey:n,component:x,rowData:E},`tableRowAction${_}`)}))},[o,t,e]),g=async(x=1)=>{try{c(!0);const{jsonPathData:_,mapperData:E,jsonPathPagination:A}=i,I=Ry(i,x),Q=await s(I,t,!1);h(fA(Q==null?void 0:Q.data,_,E,A)),c(!1)}catch(_){alert(JSON.stringify(_)),c(!1)}},p=x=>{f(x),g(x)};k.useEffect(()=>{g()},[]);const O=k.useMemo(()=>!(d!=null&&d.items)||!(a!=null&&a.columns)?a==null?void 0:a.columns:a.columns.map(x=>{var E;return((E=d==null?void 0:d.items)==null?void 0:E.some(A=>Array.isArray(x!=null&&x.accessor?A[x==null?void 0:x.accessor]:void 0)))?{...x,renderCell:A=>{const I=x.accessor?A[x.accessor]:void 0;return Array.isArray(I)?F.jsx(ake,{values:I}):I}}:x}),[d==null?void 0:d.items,a==null?void 0:a.columns]),w={...a,data:d==null?void 0:d.items,columns:O,rightActions:m};return F.jsx(F.Fragment,{children:l?F.jsx(lke,{}):d&&((v=d==null?void 0:d.items)==null?void 0:v.length)>0?F.jsxs(F.Fragment,{children:[F.jsx(Oie,{...w}),(d==null?void 0:d.pagination)&&((b=d==null?void 0:d.pagination)==null?void 0:b.totalPages)>1&&F.jsx(Y8,{classname:{global:"row__end"},page:u,size:d==null?void 0:d.pagination.size,total:(y=d==null?void 0:d.pagination)==null?void 0:y.total,onChange:p})]}):F.jsx(Sd,{state:"info",title:"Sin registros",children:"No hay datos disponibles para mostrar en este momento"})})},uke={textFieldNotFront:"_textFieldNotFront_cps4i_1"},fke=t=>{const{userFlow:e,pageId:n,component:r,hash:i,responseKey:o,required:a,dependencies:s,...l}=t,c={...l},[u,f]=k.useState((c==null?void 0:c.value)??""),{disabled:d}=Io(e,s),h=(c==null?void 0:c.disabled)??d,m=k.useMemo(()=>a&&(c!=null&&c.label)?`${c==null?void 0:c.label} *`:(c==null?void 0:c.label)??"",[c==null?void 0:c.label,a]),g=p=>{var v;const O=(v=p==null?void 0:p.target)==null?void 0:v.value;f(O);const w={[o]:O};Wr(e,w)};return k.useEffect(()=>{f((c==null?void 0:c.value)??"")},[c==null?void 0:c.value]),F.jsx(Dw,{...c,className:uke.textFieldNotFront,allowClear:!1,label:m,value:u,disabled:h,onChange:p=>!h&&g(p)})},dke=({userFlow:t,pageId:e,responseKey:n,variant:r,content:i,actionType:o,redirectUrl:a})=>{const s=k.useCallback(async()=>{gO(t);try{switch(o){case"AUTOCLOSE_AND_REDIRECT":window.location.href=a;break;default:console.warn(`Unhandled actionType: ${o}`);break}}catch(l){console.error("Error in toast action:",l),alert(JSON.stringify(l))}},[o,e,n,t,a]);return k.useEffect(()=>{({info:dt.info,error:dt.error,success:dt.success,warning:dt.warning}[r]||dt.info)(i,{autoClose:o?!1:4e3,containerId:t,onClose:s})},[s,t]),null},gN={accordion:"_accordion_1ri2t_1",accordionBody:"_accordionBody_1ri2t_8"},hke=t=>{const{userFlow:e,pageId:n,responseKey:r,dependencies:i,customContent:o,actionContent:a,components:s,...l}=t,{getNextUI:c}=bi(),[u,f]=k.useState(l.checkboxChecked||!1),{disabled:d}=Io(e,i),h=Nr(e,n,s),m=a?Nr(e,n,a):void 0,g=o?Nr(e,n,o):void 0,p=k.useCallback(async v=>{var b;try{const y=v.target.checked;f(y);const x={...(b=pt.getState()[e])==null?void 0:b.entries,[r]:y};if(Wr(e,x),l.actionType==="GO_TO_NEXT_UI"){const _=await c(e,n,x,r);_!=null&&_.data&&yi(e,_==null?void 0:_.data)}}catch(y){console.error("Error in accordion checkbox action:",y),alert(JSON.stringify(y))}},[e,n,r,l.actionType,c]),O=l.disabled||d,w={...l,className:gN.accordion,disabled:O,checkboxChecked:u,onChanceCheckbox:l.hasCheckbox?p:void 0,actionContent:m?F.jsx(F.Fragment,{children:m.map((v,b)=>F.jsx(k.Fragment,{children:v},`accordion-action-${b}`))}):void 0,customContent:g?F.jsx(F.Fragment,{children:g.map((v,b)=>F.jsx(k.Fragment,{children:v},`accordion-custom-${b}`))}):void 0,children:h?F.jsx("section",{className:gN.accordionBody,children:h.map((v,b)=>F.jsx(k.Fragment,{children:v},`accordion-child-${b}`))}):void 0};return F.jsx(TZ,{...w})},_5={drawer:"_drawer_13pxo_1",drawerBody:"_drawerBody_13pxo_5",drawerFooter:"_drawerFooter_13pxo_11"},pke=({userFlow:t,pageId:e,responseKey:n,header:r,body:i,footer:o,...a})=>{const s=pt(g=>{var p;return(p=g[t])==null?void 0:p.isDrawerOpen}),l=pt(g=>{var p;return(p=g[t])==null?void 0:p.isLoading}),c=s&&!l,u={...a,isOpen:c,children:null},f=k.useCallback(()=>{gO(t),bu(t,!1)},[t]),d=Array.isArray(r)?Nr(t,e,r):r?F.jsx(da,{type:"h2",children:r}):void 0,h=Nr(t,e,i),m=o?Nr(t,e,o):void 0;return F.jsx(Aie,{...u,className:_5.drawer,isOpen:c,onClose:f,heightGap:0,title:d?F.jsx(F.Fragment,{children:Array.isArray(d)?d.map((g,p)=>F.jsx(k.Fragment,{children:g},`drawer-header-${p}`)):d}):void 0,children:F.jsx("section",{className:_5.drawerBody,children:h.map((g,p)=>F.jsx(k.Fragment,{children:g},`drawer-body-${p}`))}),footer:m?F.jsx("div",{className:_5.drawerFooter,children:m.map((g,p)=>F.jsx(k.Fragment,{children:g},`drawer-footer-${p}`))}):void 0})},ON=(t,e,n,r)=>{const i=Nr(t,e,(r==null?void 0:r.components)||null);switch(n){case"body":return F.jsx(Mie,{...r,inputs:i||[]},JSON.stringify(r==null?void 0:r.components));case"header":return F.jsx(qSe,{...r,components:i||[]},JSON.stringify(r==null?void 0:r.components));default:return null}},mke=(t,e,n)=>{var f,d,h;const[r,i]=k.useState(!1),o=pt(m=>m),a=(f=o[t])==null?void 0:f.currentPageId,s=a?ON(t,a,"header",((d=o[t].pages[a].page)==null?void 0:d.header)||null):null,l=a?ON(t,a,"body",((h=o[t].pages[a].page)==null?void 0:h.body)||null):null,c=k.useMemo(()=>{var m;return F.jsxs(F.Fragment,{children:[((m=o[t])==null?void 0:m.isLoading)&&F.jsx(WY,{}),s,l,a&&F.jsx(HSe,{userFlow:t,pageId:a}),o[t]&&F.jsx(Xw,{})]})},[s,l,a,t]),u=async()=>{var m;try{const g=await zx(e,t),p=(m=g==null?void 0:g.data)==null?void 0:m.content;(g==null?void 0:g.status)===200?mO(t,e,p):i(!0)}catch(g){console.error("[not-page]: API call failed",g),i(!0)}};return k.useEffect(()=>{e!=null&&e.api&&!n&&t?u():!(e!=null&&e.api)&&n&&t||e!=null&&e.api&&n&&t?mO(t,e,n):(!(e!=null&&e.api)&&!n||!t)&&(i(!0),console.error("[not-page]: API call failed","not api config","not userFlow"));const m="avocado-theme-mode-changed",g=p=>{const O=p.detail;Y5.setThemeMode(O)};return window.addEventListener(m,g),()=>{window.removeEventListener(m,g)}},[]),r&&console.error("[not-page]: No render page"),c};fn.Chart=uN,fn.Row=dN,fn.heading=Ww,fn.text=Uw,fn.usePage=mke,Object.defineProperty(fn,Symbol.toStringTag,{value:"Module"})});
825
+ */var Fj;function B_e(){if(Fj)return f5;Fj=1;var t=k;function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,o=t.useEffect,a=t.useMemo,s=t.useDebugValue;return f5.useSyncExternalStoreWithSelector=function(l,c,u,f,d){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=a(function(){function p(y){if(!O){if(O=!0,w=y,y=f(y),d!==void 0&&m.hasValue){var x=m.value;if(d(x,y))return v=x}return v=y}if(x=v,n(w,y))return x;var _=f(y);return d!==void 0&&d(x,_)?(w=y,x):(w=y,v=_)}var O=!1,w,v,b=u===void 0?null:u;return[function(){return p(c())},b===null?void 0:function(){return p(b())}]},[c,u,f,d]);var g=r(l,h[0],h[1]);return o(function(){m.hasValue=!0,m.value=g},[g]),s(g),g},f5}B_e();function Z_e(t){t()}function z_e(){let t=null,e=null;return{clear(){t=null,e=null},notify(){Z_e(()=>{let n=t;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=t;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=e={callback:n,next:null,prev:e};return i.prev?i.prev.next=i:t=i,function(){!r||t===null||(r=!1,i.next?i.next.prev=i.prev:e=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var Yj={notify(){},get:()=>[]};function X_e(t,e){let n,r=Yj,i=0,o=!1;function a(g){u();const p=r.subscribe(g);let O=!1;return()=>{O||(O=!0,p(),f())}}function s(){r.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return o}function u(){i++,n||(n=t.subscribe(l),r=z_e())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=Yj)}function d(){o||(o=!0,u())}function h(){o&&(o=!1,f())}const m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:d,tryUnsubscribe:h,getListeners:()=>r};return m}var V_e=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",F_e=V_e(),Y_e=()=>typeof navigator<"u"&&navigator.product==="ReactNative",q_e=Y_e(),W_e=()=>F_e||q_e?P.useLayoutEffect:P.useEffect,U_e=W_e(),d5=Symbol.for("react-redux-context"),h5=typeof globalThis<"u"?globalThis:{};function H_e(){if(!P.createContext)return{};const t=h5[d5]??(h5[d5]=new Map);let e=t.get(P.createContext);return e||(e=P.createContext(null),t.set(P.createContext,e)),e}var G_e=H_e();function K_e(t){const{children:e,context:n,serverState:r,store:i}=t,o=P.useMemo(()=>{const l=X_e(i);return{store:i,subscription:l,getServerState:r?()=>r:void 0}},[i,r]),a=P.useMemo(()=>i.getState(),[i]);U_e(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,a]);const s=n||G_e;return P.createElement(s.Provider,{value:o},e)}var J_e=K_e,eSe=(t,e)=>e,p5=Y([eSe,qe,Rbe,bn,NL,ca,E9e,ln],D9e),m5=t=>{var e=t.currentTarget.getBoundingClientRect(),n=e.width/t.currentTarget.offsetWidth,r=e.height/t.currentTarget.offsetHeight;return{chartX:Math.round((t.clientX-e.left)/n),chartY:Math.round((t.clientY-e.top)/r)}},qj=si("mouseClick"),Wj=If();Wj.startListening({actionCreator:qj,effect:(t,e)=>{var n=t.payload,r=p5(e.getState(),m5(n));(r==null?void 0:r.activeIndex)!=null&&e.dispatch(R5e({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var g5=si("mouseMove"),Uj=If();Uj.startListening({actionCreator:g5,effect:(t,e)=>{var n=t.payload,r=e.getState(),i=Ob(r,r.tooltip.settings.shared),o=p5(r,m5(n));i==="axis"&&((o==null?void 0:o.activeIndex)!=null?e.dispatch(EL({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):e.dispatch(PL()))}});function tSe(t,e){return e instanceof HTMLElement?"HTMLElement <".concat(e.tagName,' class="').concat(e.className,'">'):e===window?"global.window":e}var Hj={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},Gj=li({name:"rootProps",initialState:Hj,reducers:{updateOptions:(t,e)=>{var n;t.accessibilityLayer=e.payload.accessibilityLayer,t.barCategoryGap=e.payload.barCategoryGap,t.barGap=(n=e.payload.barGap)!==null&&n!==void 0?n:Hj.barGap,t.barSize=e.payload.barSize,t.maxBarSize=e.payload.maxBarSize,t.stackOffset=e.payload.stackOffset,t.syncId=e.payload.syncId,t.syncMethod=e.payload.syncMethod,t.className=e.payload.className}}}),nSe=Gj.reducer,{updateOptions:rSe}=Gj.actions,Kj=li({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(t,e)=>e.payload}}),{updatePolarOptions:iSe}=Kj.actions,oSe=Kj.reducer,Jj=si("keyDown"),eN=si("focus"),O5=If();O5.startListening({actionCreator:Jj,effect:(t,e)=>{var n=e.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip,o=t.payload;if(!(o!=="ArrowRight"&&o!=="ArrowLeft"&&o!=="Enter")){var a=Number(bb(i,al(n))),s=ca(n);if(o==="Enter"){var l=Ym(n,"axis","hover",String(i.index));e.dispatch(vb({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=A5e(n),u=c==="left-to-right"?1:-1,f=o==="ArrowRight"?1:-1,d=a+f*u;if(!(s==null||d>=s.length||d<0)){var h=Ym(n,"axis","hover",String(d));e.dispatch(vb({active:!0,activeIndex:d.toString(),activeDataKey:void 0,activeCoordinate:h}))}}}}}),O5.startListening({actionCreator:eN,effect:(t,e)=>{var n=e.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var o="0",a=Ym(n,"axis","hover",String(o));e.dispatch(vb({activeDataKey:void 0,active:!0,activeIndex:o,activeCoordinate:a}))}}}});var pi=si("externalEvent"),tN=If();tN.startListening({actionCreator:pi,effect:(t,e)=>{if(t.payload.handler!=null){var n=e.getState(),r={activeCoordinate:v9e(n),activeDataKey:zL(n),activeIndex:ts(n),activeLabel:ZL(n),activeTooltipIndex:ts(n),isTooltipActive:b9e(n)};t.payload.handler(r,t.payload.reactEvent)}}});var aSe=Y([$c],t=>t.tooltipItemPayloads),sSe=Y([aSe,cd,(t,e,n)=>e,(t,e,n)=>n],(t,e,n,r)=>{var i=t.find(s=>s.settings.dataKey===r);if(i!=null){var{positions:o}=i;if(o!=null){var a=e(o,n);return a}}}),nN=si("touchMove"),rN=If();rN.startListening({actionCreator:nN,effect:(t,e)=>{var n=t.payload,r=e.getState(),i=Ob(r,r.tooltip.settings.shared);if(i==="axis"){var o=p5(r,m5({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));(o==null?void 0:o.activeIndex)!=null&&e.dispatch(EL({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if(i==="item"){var a,s=n.touches[0],l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(bQ),u=(a=l.getAttribute(wQ))!==null&&a!==void 0?a:void 0,f=sSe(e.getState(),c,u);e.dispatch(CL({activeDataKey:u,activeIndex:c,activeCoordinate:f}))}}});var lSe=EM({brush:Qwe,cartesianAxis:w_e,chartData:W9e,graphicalItems:S7e,layout:N3e,legend:S6e,options:X9e,polarAxis:l7e,polarOptions:oSe,referenceElements:Bwe,rootProps:nSe,tooltip:B5e}),cSe=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return c3e({reducer:lSe,preloadedState:e,middleware:r=>r({serializableCheck:!1}).concat([Wj.middleware,Uj.middleware,O5.middleware,tN.middleware,rN.middleware]),devTools:{serialize:{replacer:tSe},name:"recharts-".concat(n)}})};function iN(t){var{preloadedState:e,children:n,reduxStoreName:r}=t,i=Bn(),o=k.useRef(null);if(i)return n;o.current==null&&(o.current=cSe(e,r));var a=xv;return P.createElement(J_e,{context:a,store:o.current},n)}function oN(t){var{layout:e,width:n,height:r,margin:i}=t,o=Dt(),a=Bn();return k.useEffect(()=>{a||(o(L3e(e)),o(I3e({width:n,height:r})),o($3e(i)))},[o,a,e,n,r,i]),null}function aN(t){var e=Dt();return k.useEffect(()=>{e(rSe(t))},[e,t]),null}var uSe=["children"];function fSe(t,e){if(t==null)return{};var n,r,i=dSe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function dSe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function h0(){return h0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},h0.apply(null,arguments)}var hSe={width:"100%",height:"100%"},pSe=k.forwardRef((t,e)=>{var n=Fv(),r=Yv(),i=DQ();if(!bc(n)||!bc(r))return null;var{children:o,otherAttributes:a,title:s,desc:l}=t,c,u;return typeof a.tabIndex=="number"?c=a.tabIndex:c=i?0:void 0,typeof a.role=="string"?u=a.role:u=i?"application":void 0,P.createElement(Wy,h0({},a,{title:s,desc:l,role:u,tabIndex:c,width:n,height:r,style:hSe,ref:e}),o)}),mSe=t=>{var{children:e}=t,n=ve(sm);if(!n)return null;var{width:r,height:i,y:o,x:a}=n;return P.createElement(Wy,{width:r,height:i,x:a,y:o},e)},sN=k.forwardRef((t,e)=>{var{children:n}=t,r=fSe(t,uSe),i=Bn();return i?P.createElement(mSe,null,n):P.createElement(pSe,h0({ref:e},r),n)});function gSe(){var t=Dt(),[e,n]=k.useState(null),r=ve(d6e);return k.useEffect(()=>{if(e!=null){var i=e.getBoundingClientRect(),o=i.width/e.offsetWidth;An(o)&&o!==r&&t(j3e(o))}},[e,t,r]),n}function lN(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function OSe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?lN(Object(n),!0).forEach(function(r){ySe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ySe(t,e,n){return(e=vSe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vSe(t){var e=bSe(t,"string");return typeof e=="symbol"?e:e+""}function bSe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var wSe=k.forwardRef((t,e)=>{var{children:n,className:r,height:i,onClick:o,onContextMenu:a,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:f,onMouseUp:d,onTouchEnd:h,onTouchMove:m,onTouchStart:g,style:p,width:O}=t,w=Dt(),[v,b]=k.useState(null),[y,x]=k.useState(null);G9e();var _=gSe(),E=k.useCallback(oe=>{_(oe),typeof e=="function"&&e(oe),b(oe),x(oe)},[_,e,b,x]),A=k.useCallback(oe=>{w(qj(oe)),w(pi({handler:o,reactEvent:oe}))},[w,o]),I=k.useCallback(oe=>{w(g5(oe)),w(pi({handler:c,reactEvent:oe}))},[w,c]),Q=k.useCallback(oe=>{w(PL()),w(pi({handler:u,reactEvent:oe}))},[w,u]),D=k.useCallback(oe=>{w(g5(oe)),w(pi({handler:f,reactEvent:oe}))},[w,f]),j=k.useCallback(()=>{w(eN())},[w]),R=k.useCallback(oe=>{w(Jj(oe.key))},[w]),B=k.useCallback(oe=>{w(pi({handler:a,reactEvent:oe}))},[w,a]),X=k.useCallback(oe=>{w(pi({handler:s,reactEvent:oe}))},[w,s]),V=k.useCallback(oe=>{w(pi({handler:l,reactEvent:oe}))},[w,l]),K=k.useCallback(oe=>{w(pi({handler:d,reactEvent:oe}))},[w,d]),ne=k.useCallback(oe=>{w(pi({handler:g,reactEvent:oe}))},[w,g]),L=k.useCallback(oe=>{w(nN(oe)),w(pi({handler:m,reactEvent:oe}))},[w,m]),fe=k.useCallback(oe=>{w(pi({handler:h,reactEvent:oe}))},[w,h]);return P.createElement(KL.Provider,{value:v},P.createElement(xA.Provider,{value:y},P.createElement("div",{className:Ye("recharts-wrapper",r),style:OSe({position:"relative",cursor:"default",width:O,height:i},p),onClick:A,onContextMenu:B,onDoubleClick:X,onFocus:j,onKeyDown:R,onMouseDown:V,onMouseEnter:I,onMouseLeave:Q,onMouseMove:D,onMouseUp:K,onTouchEnd:fe,onTouchMove:L,onTouchStart:ne,ref:E},n)))}),xSe=["children","className","width","height","style","compact","title","desc"];function _Se(t,e){if(t==null)return{};var n,r,i=SSe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function SSe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var cN=k.forwardRef((t,e)=>{var{children:n,className:r,width:i,height:o,style:a,compact:s,title:l,desc:c}=t,u=_Se(t,xSe),f=Re(u,!1);return s?P.createElement(sN,{otherAttributes:f,title:l,desc:c},n):P.createElement(wSe,{className:r,style:a,width:i,height:o,onClick:t.onClick,onMouseLeave:t.onMouseLeave,onMouseEnter:t.onMouseEnter,onMouseMove:t.onMouseMove,onMouseDown:t.onMouseDown,onMouseUp:t.onMouseUp,onContextMenu:t.onContextMenu,onDoubleClick:t.onDoubleClick,onTouchStart:t.onTouchStart,onTouchMove:t.onTouchMove,onTouchEnd:t.onTouchEnd},P.createElement(sN,{otherAttributes:f,title:l,desc:c,ref:e},P.createElement(zwe,null,n)))}),kSe=["width","height"];function y5(){return y5=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},y5.apply(null,arguments)}function CSe(t,e){if(t==null)return{};var n,r,i=PSe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function PSe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var ESe={top:5,right:5,bottom:5,left:5},TSe={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:ESe,reverseStackOrder:!1,syncMethod:"index"},v5=k.forwardRef(function(e,n){var r,i=Qr(e.categoricalChartProps,TSe),{width:o,height:a}=i,s=CSe(i,kSe);if(!bc(o)||!bc(a))return null;var{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,categoricalChartProps:d}=e,h={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,eventEmitter:void 0};return P.createElement(iN,{preloadedState:{options:h},reduxStoreName:(r=d.id)!==null&&r!==void 0?r:l},P.createElement(gj,{chartData:d.data}),P.createElement(oN,{width:o,height:a,layout:i.layout,margin:i.margin}),P.createElement(aN,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),P.createElement(cN,y5({},s,{width:o,height:a,ref:n})))}),ASe=["axis"],MSe=k.forwardRef((t,e)=>P.createElement(v5,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:ASe,tooltipPayloadSearcher:Wm,categoricalChartProps:t,ref:e})),QSe=["axis","item"],DSe=k.forwardRef((t,e)=>P.createElement(v5,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:QSe,tooltipPayloadSearcher:Wm,categoricalChartProps:t,ref:e}));function $Se(t){var e=Dt();return k.useEffect(()=>{e(iSe(t))},[e,t]),null}var LSe=["width","height","layout"];function b5(){return b5=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},b5.apply(null,arguments)}function ISe(t,e){if(t==null)return{};var n,r,i=jSe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function jSe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var NSe={top:5,right:5,bottom:5,left:5},RSe={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:NSe,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},BSe=k.forwardRef(function(e,n){var r,i=Qr(e.categoricalChartProps,RSe),{width:o,height:a,layout:s}=i,l=ISe(i,LSe);if(!bc(o)||!bc(a))return null;var{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d}=e,h={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d,eventEmitter:void 0};return P.createElement(iN,{preloadedState:{options:h},reduxStoreName:(r=i.id)!==null&&r!==void 0?r:c},P.createElement(gj,{chartData:i.data}),P.createElement(oN,{width:o,height:a,layout:s,margin:i.margin}),P.createElement(aN,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),P.createElement($Se,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),P.createElement(cN,b5({width:o,height:a},l,{ref:n})))}),ZSe=["item"],zSe={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},XSe=k.forwardRef((t,e)=>{var n=Qr(t,zSe);return P.createElement(BSe,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:ZSe,tooltipPayloadSearcher:Wm,categoricalChartProps:n,ref:e})}),VSe=["axis"],FSe=k.forwardRef((t,e)=>P.createElement(v5,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:VSe,tooltipPayloadSearcher:Wm,categoricalChartProps:t,ref:e}));const p0=({withPadding:t=!1})=>{const e=n=>F.jsx("span",{style:{color:mi.labelColor},children:n});return F.jsx(lm,{formatter:e,wrapperStyle:{fontSize:mi.fontSize,fontFamily:mi.fontFamily,padding:t?"1rem 0":"0"}})},m0=()=>F.jsx(o4e,{contentStyle:{backgroundColor:mi.tooltipBg,borderRadius:mi.tooltipBorderRadius,color:mi.tooltipColor}}),w5=({dataKey:t,hide:e=!1})=>F.jsx(l5,{dataKey:t,hide:e,tick:{fill:mi.labelColor,fontSize:mi.fontSize}}),x5=()=>F.jsx(u5,{tick:{fill:mi.labelColor,fontSize:mi.fontSize}}),YSe={area:t=>{const{data:e,xKey:n,yKeys:r}=t;return F.jsx(Um,{width:"100%",height:400,children:F.jsxs(FSe,{data:e,children:[F.jsx(c0,{strokeDasharray:"3 3"}),F.jsx(w5,{dataKey:n}),F.jsx(x5,{}),F.jsx(m0,{}),F.jsx(p0,{}),r.map((i,o)=>F.jsx(a5,{type:"monotone",dataKey:i,stroke:wo[o%wo.length],fill:wo[o%wo.length]},i))]})})},bar:t=>{const{data:e,yKeys:n,xKey:r}=t;return F.jsx(Um,{width:"100%",height:400,children:F.jsxs(DSe,{data:e,children:[F.jsx(c0,{strokeDasharray:"3 3"}),F.jsx(w5,{hide:!0,dataKey:r}),F.jsx(x5,{}),F.jsx(m0,{}),F.jsx(p0,{withPadding:!0}),n.map((i,o)=>F.jsx(Gb,{dataKey:i,fill:wo[o%wo.length]},i))]})})},line:t=>{const{data:e,xKey:n,yKeys:r}=t;return F.jsx(Um,{width:"100%",height:400,children:F.jsxs(MSe,{data:e,children:[F.jsx(c0,{strokeDasharray:"3 3"}),F.jsx(w5,{dataKey:n}),F.jsx(x5,{}),F.jsx(m0,{}),F.jsx(p0,{}),r.map((i,o)=>F.jsx(i5,{type:"monotone",dataKey:i,stroke:wo[o%wo.length],strokeWidth:2,dot:!1},i))]})})},pie:t=>{const{data:e,xKey:n,yKeys:r}=t,i=({cx:o,cy:a,midAngle:s,innerRadius:l,outerRadius:c,value:u})=>{const f=Math.PI/180,d=25+l+(c-l),h=o+d*Math.cos(-(s??0)*f),m=a+d*Math.sin(-(s??0)*f);return F.jsx("text",{x:h,y:m,fill:mi.labelColor,color:mi.labelColor,textAnchor:"middle",dominantBaseline:"central",children:u})};return F.jsx(Um,{width:"100%",height:400,children:F.jsxs(XSe,{children:[F.jsx(m0,{}),F.jsx(p0,{}),F.jsx(Fb,{data:e,dataKey:r[0],nameKey:n,label:i,outerRadius:120,children:e.map((o,a)=>F.jsx(dd,{fill:wo[a%wo.length]},`cell-${a}`))})]})})}},wo=["var(--color-primitive-palette-1-50)","var(--color-primitive-palette-2-50)","var(--color-primitive-palette-3-50)","var(--color-primitive-palette-4-50)","var(--color-primitive-palette-5-50)","var(--color-primitive-palette-6-50)","var(--color-primitive-palette-7-50)","var(--color-primitive-palette-8-50)","var(--color-primitive-palette-9-50)","var(--color-primitive-palette-10-50)","var(--color-primitive-palette-11-50)","var(--color-primitive-palette-12-50)","var(--color-primitive-palette-13-50)","var(--color-primitive-palette-14-50)","var(--color-primitive-palette-15-50)","var(--color-primitive-palette-16-50)","var(--color-primitive-palette-17-50)"],mi={fontFamily:"Roboto, sans-serif",fontSize:12,labelColor:"var(--color-neutral-90)",tooltipBg:"#fff",tooltipColor:"#000",tooltipBorderRadius:"4px"},uN=t=>{const{component:e,userFlow:n,hash:r,responseKey:i,dataSource:o,...a}=t,s=YSe[a.type];if(!s)return F.jsx("div",{children:"Not supported chart type"});const{fetchDataSource:l}=bi(),[c,u]=k.useState(!1),[f,d]=k.useState([]),h=async()=>{var g,p;try{u(!0);const{jsonPathData:O,mapperData:w}=o,v=Ry(o,1),b=await l(v,n,!1),y=O?(g=fA(b==null?void 0:b.data,O,w))==null?void 0:g.items:(p=b==null?void 0:b.data)==null?void 0:p.data;d(y),u(!1)}catch(O){alert(JSON.stringify(O)),u(!1)}};k.useEffect(()=>{o?h():d(a.data)},[]);const m={...a,data:f};return c?F.jsx(Mw,{height:400}):f.length>0?s(m):F.jsx(Sd,{state:"info",title:"Sin registros",children:"No hay datos disponibles para mostrar en este momento"})},fN={header:"_header_g1eri_1",header_content:"_header_content_g1eri_5"},qSe=({components:t=[]})=>F.jsx("section",{className:b1(fN.header,"avocado-dark-theme"),children:F.jsx("div",{className:fN.header_content,children:t.map((e,n)=>F.jsx(k.Fragment,{children:e},n))})}),Nr=(t,e,n)=>{var o;const r={accordion:a=>F.jsx(hke,{...a,userFlow:t,pageId:e}),breadcrumbs:a=>F.jsx(Oae,{...a,userFlow:t,pageId:e}),button:a=>F.jsx(yae,{...a,userFlow:t,pageId:e}),cardNotification:a=>F.jsx(bae,{...a}),chart:a=>F.jsx(uN,{...a,userFlow:t}),checkbox:a=>F.jsx(wae,{...a,userFlow:t,pageId:e}),code:a=>F.jsx(ige,{...a,userFlow:t,pageId:e}),divider:a=>F.jsx(sge,{...a}),drawer:a=>F.jsx(pke,{...a,userFlow:t,pageId:e}),heading:a=>Ww(a),pill:a=>F.jsx(KSe,{...a}),modal:a=>F.jsx(USe,{...a,userFlow:t,pageId:e}),roundButton:a=>F.jsx(JSe,{...a,userFlow:t,pageId:e}),row:a=>F.jsx(dN,{...a,userFlow:t,pageId:e}),select:a=>F.jsx(rke,{...a,userFlow:t,pageId:e}),switch:a=>F.jsx(oke,{...a,userFlow:t,pageId:e}),spacing:a=>F.jsx(ike,{...a,userFlow:t,pageId:e}),table:a=>F.jsx(cke,{...a,userFlow:t,pageId:e}),text:a=>Uw(a),textField:a=>F.jsx(fke,{...a,userFlow:t,pageId:e}),toast:a=>F.jsx(dke,{...a,userFlow:t,pageId:e})};return(o=n==null?void 0:n.filter(Boolean))==null?void 0:o.map(a=>{const s=r[a.component];return s?s({...a,userFlow:t,pageId:e}):null})},WSe={modalContent:"_modalContent_1ynhd_1"},USe=({userFlow:t,pageId:e,responseKey:n,header:r,body:i,footer:o,headerStatusColor:a,...s})=>{const l=pt(O=>{var w;return(w=O[t])==null?void 0:w.isModalOpen}),c=pt(O=>{var w;return(w=O[t])==null?void 0:w.isLoading}),u=l&&!c,f={...s},d=(f==null?void 0:f.headerStatusColor)??a,h=k.useCallback(()=>{gO(t),OO(t,!1)},[t,n]),m=Array.isArray(r)?Nr(t,e,r):r,g=Nr(t,e,i),p=Nr(t,e,o);return F.jsx(Aq,{...f,headerStatusColor:d,header:typeof m=="string"?m:F.jsx(F.Fragment,{children:m.map((O,w)=>F.jsx(k.Fragment,{children:O},`modal-header-${w}`))}),children:F.jsx("section",{className:WSe.modalContent,children:g.map((O,w)=>F.jsx(k.Fragment,{children:O},`modal-body-${w}`))}),actions:F.jsx(F.Fragment,{children:p.map((O,w)=>F.jsx(k.Fragment,{children:O},`modal-footer-${w}`))}),open:u,onClose:h})},HSe=({userFlow:t,pageId:e})=>{var o,a;const n=Fie(t);if(!n)return null;const r=[...(n==null?void 0:n.components)||[],...((o=n==null?void 0:n.header)==null?void 0:o.components)||[],...((a=n==null?void 0:n.body)==null?void 0:a.components)||[]],i=Nr(t,e,r);return F.jsx(F.Fragment,{children:i==null?void 0:i.map((s,l)=>{const c=`overlay-${l}-${Date.now()}`;return F.jsx(k.Fragment,{children:s},c)})})},GSe={success:{color:"success-opacity",textColor:"success-60",iconColor:"success-50"},warning:{color:"warning-opacity",textColor:"warning-60",iconColor:"warning-50"},error:{color:"error-opacity",textColor:"error-60",iconColor:"error-50"},info:{color:"primary-10",textColor:"primary-70",iconColor:"primary-70"},neutral:{color:"neutral-10",textColor:"neutral-70",iconColor:"neutral-70"}},KSe=t=>{const{content:e,variant:n="neutral",...r}=t,i=GSe[n],o={...r,children:e,color:(r==null?void 0:r.color)??i.color,textColor:(r==null?void 0:r.textColor)??i.textColor,iconColor:(r==null?void 0:r.iconColor)??i.iconColor};return F.jsx(Ag,{...o})},JSe=t=>{const{userFlow:e,pageId:n,responseKey:r,actionType:i,dataSource:o,dependencies:a,onClick:s,...l}=t,{getNextUI:c,fetchAndGetNextUI:u}=bi(),{disabled:f}=Io(e,a),d={...l},h=(d==null?void 0:d.disabled)??f,m=k.useCallback(async()=>{var g;try{const p={...(g=pt.getState()[e])==null?void 0:g.entries,[r]:{status:200}};Wr(e,p);const O=async w=>{const v=await w(e,n,p,r,o);v!=null&&v.data&&yi(e,v==null?void 0:v.data)};switch(i){case"GO_TO_NEXT_UI":await O(c);break;case"FETCH_AND_GO_TO_NEXT_UI":await O(u);break;case"CLOSE_MODAL":OO(e,!1);break;case"CLOSE_DRAWER":bu(e,!1);break;case"OPEN_DRAWER":bu(e,!0);break;default:console.warn(`Unhandled actionType: ${i}`);break}}catch(p){alert(JSON.stringify(p))}},[i,n,r,e]);return F.jsx(nh,{...d,disabled:h,onClick:()=>!h&&(s??m)()})},is={row:"_row_1bqj4_1","row__gap-none":"_row__gap-none_1bqj4_5","row__gap-xxs":"_row__gap-xxs_1bqj4_8","row__gap-xs":"_row__gap-xs_1bqj4_11","row__gap-sm":"_row__gap-sm_1bqj4_14","row__gap-md":"_row__gap-md_1bqj4_17","row__gap-lg":"_row__gap-lg_1bqj4_20","row__gap-xl":"_row__gap-xl_1bqj4_23","row__gap-xxl":"_row__gap-xxl_1bqj4_26","row__gap-xxxl":"_row__gap-xxxl_1bqj4_29","row__justify-start":"_row__justify-start_1bqj4_32","row__justify-end":"_row__justify-end_1bqj4_35","row__justify-center":"_row__justify-center_1bqj4_38","row__justify-space-between":"_row__justify-space-between_1bqj4_41","row__justify-space-around":"_row__justify-space-around_1bqj4_44","row__justify-space-evenly":"_row__justify-space-evenly_1bqj4_47","row__align-start":"_row__align-start_1bqj4_50","row__align-end":"_row__align-end_1bqj4_53","row__align-center":"_row__align-center_1bqj4_56","row__align-stretch":"_row__align-stretch_1bqj4_59","row__align-baseline":"_row__align-baseline_1bqj4_62",row_column:"_row_column_1bqj4_65","row_column__gap-none":"_row_column__gap-none_1bqj4_72","row_column__gap-xxs":"_row_column__gap-xxs_1bqj4_75","row_column__gap-xs":"_row_column__gap-xs_1bqj4_78","row_column__gap-sm":"_row_column__gap-sm_1bqj4_81","row_column__gap-md":"_row_column__gap-md_1bqj4_84","row_column__gap-lg":"_row_column__gap-lg_1bqj4_87","row_column__gap-xl":"_row_column__gap-xl_1bqj4_90","row_column__gap-xxl":"_row_column__gap-xxl_1bqj4_93","row_column__gap-xxxl":"_row_column__gap-xxxl_1bqj4_96","row_column__justify-start":"_row_column__justify-start_1bqj4_99","row_column__justify-end":"_row_column__justify-end_1bqj4_102","row_column__justify-center":"_row_column__justify-center_1bqj4_105","row_column__justify-space-between":"_row_column__justify-space-between_1bqj4_108","row_column__justify-space-around":"_row_column__justify-space-around_1bqj4_111","row_column__justify-space-evenly":"_row_column__justify-space-evenly_1bqj4_114","row_column__align-start":"_row_column__align-start_1bqj4_117","row_column__align-end":"_row_column__align-end_1bqj4_120","row_column__align-center":"_row_column__align-center_1bqj4_123","row_column__align-stretch":"_row_column__align-stretch_1bqj4_126","row_column__align-baseline":"_row_column__align-baseline_1bqj4_129"},dN=t=>{const{userFlow:e,pageId:n,columnWidth:r,columns:i,gap:o="md",justifyContent:a="start",alignItems:s="stretch"}=t,l=Array.isArray(i)?i.map((c,u)=>{const f=`col_${u}`,d=`col_${u}`;if(Array.isArray(c))return{gap:"md",justifyContent:"start",alignItems:"start",items:c,hash:f,responseKey:d};const h=c;return{gap:(h==null?void 0:h.gap)??"md",justifyContent:(h==null?void 0:h.justifyContent)??"start",alignItems:(h==null?void 0:h.alignItems)??"start",items:(h==null?void 0:h.items)??[],hash:(h==null?void 0:h.hash)??f,responseKey:(h==null?void 0:h.responseKey)??d}}):[];return l.length===0?null:F.jsx("div",{className:b1(is.row,is[`row__gap-${o}`],is[`row__justify-${a}`],is[`row__align-${s}`]),children:l==null?void 0:l.map((c,u)=>{const f=(r==null?void 0:r[u])||`${100/l.length}%`,d=Nr(e,n,c.items);return!d||d.length===0?null:F.jsx("div",{className:b1(is.row_column,is[`row_column__gap-${c.gap}`],is[`row_column__justify-${c.justifyContent}`],is[`row_column__align-${c.alignItems}`]),style:{width:f},children:d},c.hash||u)})})},eke=(t,e,n,r)=>{const i=Wo.query(t,e);return(i==null?void 0:i.map(o=>{var l,c;const a=(l=Wo.query(o,n))==null?void 0:l[0],s=r?(c=Wo.query(o,r))==null?void 0:c[0]:o;return{label:a,value:s}}))??[]},hN={selectNotFront:"_selectNotFront_1yw9q_1"},tke=({userFlow:t,pageId:e,responseKey:n,required:r,dataSource:i,actionType:o,dependencies:a,...s})=>{const l={...s},{getNextUI:c,fetchDataSource:u}=bi(),[f,d]=k.useState((l==null?void 0:l.value)??""),{disabled:h}=Io(t,a),m=(l==null?void 0:l.disabled)??h,g=k.useMemo(()=>r&&(l!=null&&l.label)?`${l==null?void 0:l.label} *`:(l==null?void 0:l.label)??"",[l==null?void 0:l.label,r]),p=k.useCallback(async w=>{var b;d(w);const v={...(b=pt.getState()[t])==null?void 0:b.entries,[n]:w};if(Wr(t,v),o&&o==="GO_TO_NEXT_UI")try{const y=await c(t,e,v,n);y!=null&&y.data&&yi(t,y.data)}catch(y){console.error("[SelectPaginationNotFront] Failed to fetch next UI",y)}},[t,e,n,o,c]),O=async(w,v,{page:b})=>{const{jsonPathLabel:y,jsonPathOptions:x,jsonPathValue:_}=i,E=Ry(i,b,w),A=await u(E,t,!1),I=A==null?void 0:A.data,Q=I?eke(I,x,y,_):[],D=I==null?void 0:I.meta,j=D?Math.ceil(D.total/10)>b:!1;return{options:Q,hasMore:j,additional:{page:w?1:b+1}}};return F.jsx(Pne,{...l,className:hN.selectNotFront,label:g,value:f,disabled:m,noOptionsMessage:()=>F.jsx(F.Fragment,{children:"Sin opciones"}),onChange:w=>!m&&p(w),loadOptions:O,additional:{page:1}})},nke=({userFlow:t,pageId:e,responseKey:n,dataSource:r,required:i,actionType:o,dependencies:a,...s})=>{const l={...s},{getNextUI:c}=bi(),[u,f]=k.useState(l.value||""),{disabled:d}=Io(t,a),h=(l==null?void 0:l.disabled)??d,m=k.useMemo(()=>i&&(l!=null&&l.label)?`${l==null?void 0:l.label} *`:(l==null?void 0:l.label)??"",[l==null?void 0:l.label,i]),g=k.useCallback(async p=>{var w;f(p);const O={...(w=pt.getState()[t])==null?void 0:w.entries,[n]:p};if(Wr(t,O),o&&o==="GO_TO_NEXT_UI")try{const v=await c(t,e,O,n);v!=null&&v.data&&yi(t,v.data)}catch(v){console.error("[SelectSimpleNotFront] Failed to fetch next UI",v)}},[t,e,n,o,c]);return F.jsx(V7,{...l,className:hN.selectNotFront,label:m,value:u,disabled:h,onChange:p=>!h&&g(p)})},rke=t=>{const{dataSource:e}=t;return e?F.jsx(tke,{...t}):F.jsx(nke,{...t})},pN={spacing:"_spacing_19hqa_1",spacing__xxs:"_spacing__xxs_19hqa_1",spacing__xs:"_spacing__xs_19hqa_4",spacing__sm:"_spacing__sm_19hqa_7",spacing__md:"_spacing__md_19hqa_10",spacing__lg:"_spacing__lg_19hqa_13",spacing__xl:"_spacing__xl_19hqa_16",spacing__xxl:"_spacing__xxl_19hqa_19",spacing__xxxl:"_spacing__xxxl_19hqa_22"},ike=t=>{const{size:e}=t,n=b1(pN.spacing,pN[`spacing__${e}`]);return F.jsx("div",{className:n})},oke=t=>{const{userFlow:e,pageId:n,responseKey:r,actionType:i,label:o,value:a,required:s,dependencies:l,...c}=t,u={...c},{getNextUI:f}=bi(),[d,h]=k.useState(a||!1),{disabled:m}=Io(e,l),g=(u==null?void 0:u.disabled)??m,p=k.useMemo(()=>s&&o?`${o} *`:o??"",[o,s]),O=k.useCallback(async()=>{var w;try{const v=!d;h(v);const b={...(w=pt.getState()[e])==null?void 0:w.entries,[r]:v};switch(Wr(e,b),i){case"GO_TO_NEXT_UI":const y=await f(e,n,b,r);y!=null&&y.data&&yi(e,y==null?void 0:y.data);break;default:console.warn(`Unhandled actionType: ${i}`);break}}catch(v){console.error("Error in switch action:",v),alert(JSON.stringify(v))}},[e,n,r,i,d]);return F.jsx(Nne,{...u,label:p,checked:d,disabled:g,onChange:()=>!g&&O()})},mN={tableSkeleton:"_tableSkeleton_3nr9n_1",tableArrayPills:"_tableArrayPills_3nr9n_7"},ake=({values:t})=>{const n=t==null?void 0:t.slice(0,4),r=(t==null?void 0:t.length)-4;return F.jsxs("div",{className:mN.tableArrayPills,children:[n.map((i,o)=>F.jsx(Ag,{children:String(i)},o)),r>0&&F.jsxs(Ag,{outlined:!0,children:["+",r]})]})},ske=({userFlow:t,pageId:e,tableResponseKey:n,component:r,rowData:i})=>{const{getNextUI:o,fetchAndGetNextUI:a,fetchDataSource:s}=bi(),l=Nr(t,e,[{...r}]),c=(l==null?void 0:l[0])||null;if(!c)return null;const{actionType:u,responseKey:f,dataSource:d}=c.props,h=k.useCallback(async()=>{var m,g,p;try{const O={...(m=pt.getState()[t])==null?void 0:m.entries,[f]:{status:200},[n]:[{...i}]};Wr(t,O);const w=async v=>{const b=await v(t,e,O,f,d);b!=null&&b.data&&yi(t,b==null?void 0:b.data)};switch(u){case"GO_TO_NEXT_UI":await w(o);break;case"FETCH_AND_GO_TO_NEXT_UI":await w(a);break;case"GET_DATA_SOURCE":{const v=await o(t,e,O,f),b=(g=v==null?void 0:v.data)==null?void 0:g.content;if((b==null?void 0:b.type)!=="fetch")break;const y=b==null?void 0:b.dataSource,x=await s(y,t,!1),_={...(p=pt.getState()[t])==null?void 0:p.entries,[f]:{status:x==null?void 0:x.status,content:x==null?void 0:x.data}};Wr(t,_);const E=await o(t,e,_,f);E!=null&&E.data&&yi(t,E==null?void 0:E.data);break}default:console.warn(`Unhandled actionType: ${u}`);break}}catch(O){alert(JSON.stringify(O))}},[u,e,f,t]);return k.cloneElement(c,{onClick:h})},lke=()=>F.jsx("div",{className:mN.tableSkeleton,children:[...Array(10)].map((t,e)=>F.jsx(Mw,{maxWidth:"100%",height:42,radius:8},`tableSkeletonBase${e}`))}),cke=({userFlow:t,pageId:e,responseKey:n,component:r,dataSource:i,rightActions:o,...a})=>{var v,b,y;const{fetchDataSource:s}=bi(),[l,c]=k.useState(!1),[u,f]=k.useState(1),[d,h]=k.useState(null),m=k.useMemo(()=>{if(o!=null&&o.length)return o.map((x,_)=>({renderContent:E=>F.jsx(ske,{userFlow:t,pageId:e,tableResponseKey:n,component:x,rowData:E},`tableRowAction${_}`)}))},[o,t,e]),g=async(x=1)=>{try{c(!0);const{jsonPathData:_,mapperData:E,jsonPathPagination:A}=i,I=Ry(i,x),Q=await s(I,t,!1);h(fA(Q==null?void 0:Q.data,_,E,A)),c(!1)}catch(_){alert(JSON.stringify(_)),c(!1)}},p=x=>{f(x),g(x)};k.useEffect(()=>{g()},[]);const O=k.useMemo(()=>!(d!=null&&d.items)||!(a!=null&&a.columns)?a==null?void 0:a.columns:a.columns.map(x=>{var E;return((E=d==null?void 0:d.items)==null?void 0:E.some(A=>Array.isArray(x!=null&&x.accessor?A[x==null?void 0:x.accessor]:void 0)))?{...x,renderCell:A=>{const I=x.accessor?A[x.accessor]:void 0;return Array.isArray(I)?F.jsx(ake,{values:I}):I}}:x}),[d==null?void 0:d.items,a==null?void 0:a.columns]),w={...a,data:d==null?void 0:d.items,columns:O,rightActions:m};return F.jsx(F.Fragment,{children:l?F.jsx(lke,{}):d&&((v=d==null?void 0:d.items)==null?void 0:v.length)>0?F.jsxs(F.Fragment,{children:[F.jsx(Oie,{...w}),(d==null?void 0:d.pagination)&&((b=d==null?void 0:d.pagination)==null?void 0:b.totalPages)>1&&F.jsx(Y7,{classname:{global:"row__end"},page:u,size:d==null?void 0:d.pagination.size,total:(y=d==null?void 0:d.pagination)==null?void 0:y.total,onChange:p})]}):F.jsx(Sd,{state:"info",title:"Sin registros",children:"No hay datos disponibles para mostrar en este momento"})})},uke={textFieldNotFront:"_textFieldNotFront_cps4i_1"},fke=t=>{const{userFlow:e,pageId:n,component:r,hash:i,responseKey:o,required:a,dependencies:s,...l}=t,c={...l},[u,f]=k.useState((c==null?void 0:c.value)??""),{disabled:d}=Io(e,s),h=(c==null?void 0:c.disabled)??d,m=k.useMemo(()=>a&&(c!=null&&c.label)?`${c==null?void 0:c.label} *`:(c==null?void 0:c.label)??"",[c==null?void 0:c.label,a]),g=p=>{var v;const O=(v=p==null?void 0:p.target)==null?void 0:v.value;f(O);const w={[o]:O};Wr(e,w)};return k.useEffect(()=>{f((c==null?void 0:c.value)??"")},[c==null?void 0:c.value]),F.jsx(Dw,{...c,className:uke.textFieldNotFront,allowClear:!1,label:m,value:u,disabled:h,onChange:p=>!h&&g(p)})},dke=({userFlow:t,pageId:e,responseKey:n,variant:r,content:i,actionType:o,redirectUrl:a})=>{const s=k.useCallback(async()=>{gO(t);try{switch(o){case"AUTOCLOSE_AND_REDIRECT":window.location.href=a;break;default:console.warn(`Unhandled actionType: ${o}`);break}}catch(l){console.error("Error in toast action:",l),alert(JSON.stringify(l))}},[o,e,n,t,a]);return k.useEffect(()=>{({info:dt.info,error:dt.error,success:dt.success,warning:dt.warning}[r]||dt.info)(i,{autoClose:o?!1:4e3,containerId:t,onClose:s})},[s,t]),null},gN={accordion:"_accordion_1ri2t_1",accordionBody:"_accordionBody_1ri2t_8"},hke=t=>{const{userFlow:e,pageId:n,responseKey:r,dependencies:i,customContent:o,actionContent:a,components:s,...l}=t,{getNextUI:c}=bi(),[u,f]=k.useState(l.checkboxChecked||!1),{disabled:d}=Io(e,i),h=Nr(e,n,s),m=a?Nr(e,n,a):void 0,g=o?Nr(e,n,o):void 0,p=k.useCallback(async v=>{var b;try{const y=v.target.checked;f(y);const x={...(b=pt.getState()[e])==null?void 0:b.entries,[r]:y};if(Wr(e,x),l.actionType==="GO_TO_NEXT_UI"){const _=await c(e,n,x,r);_!=null&&_.data&&yi(e,_==null?void 0:_.data)}}catch(y){console.error("Error in accordion checkbox action:",y),alert(JSON.stringify(y))}},[e,n,r,l.actionType,c]),O=l.disabled||d,w={...l,className:gN.accordion,disabled:O,checkboxChecked:u,onChanceCheckbox:l.hasCheckbox?p:void 0,actionContent:m?F.jsx(F.Fragment,{children:m.map((v,b)=>F.jsx(k.Fragment,{children:v},`accordion-action-${b}`))}):void 0,customContent:g?F.jsx(F.Fragment,{children:g.map((v,b)=>F.jsx(k.Fragment,{children:v},`accordion-custom-${b}`))}):void 0,children:h?F.jsx("section",{className:gN.accordionBody,children:h.map((v,b)=>F.jsx(k.Fragment,{children:v},`accordion-child-${b}`))}):void 0};return F.jsx(TZ,{...w})},_5={drawer:"_drawer_13pxo_1",drawerBody:"_drawerBody_13pxo_5",drawerFooter:"_drawerFooter_13pxo_11"},pke=({userFlow:t,pageId:e,responseKey:n,header:r,body:i,footer:o,...a})=>{const s=pt(g=>{var p;return(p=g[t])==null?void 0:p.isDrawerOpen}),l=pt(g=>{var p;return(p=g[t])==null?void 0:p.isLoading}),c=s&&!l,u={...a,isOpen:c,children:null},f=k.useCallback(()=>{gO(t),bu(t,!1)},[t]),d=Array.isArray(r)?Nr(t,e,r):r?F.jsx(da,{type:"h2",children:r}):void 0,h=Nr(t,e,i),m=o?Nr(t,e,o):void 0;return F.jsx(Aie,{...u,className:_5.drawer,isOpen:c,onClose:f,heightGap:0,title:d?F.jsx(F.Fragment,{children:Array.isArray(d)?d.map((g,p)=>F.jsx(k.Fragment,{children:g},`drawer-header-${p}`)):d}):void 0,children:F.jsx("section",{className:_5.drawerBody,children:h.map((g,p)=>F.jsx(k.Fragment,{children:g},`drawer-body-${p}`))}),footer:m?F.jsx("div",{className:_5.drawerFooter,children:m.map((g,p)=>F.jsx(k.Fragment,{children:g},`drawer-footer-${p}`))}):void 0})},ON=(t,e,n,r)=>{const i=Nr(t,e,(r==null?void 0:r.components)||null);switch(n){case"body":return F.jsx(Mie,{...r,inputs:i||[]},JSON.stringify(r==null?void 0:r.components));case"header":return F.jsx(qSe,{...r,components:i||[]},JSON.stringify(r==null?void 0:r.components));default:return null}},mke=(t,e,n)=>{var f,d,h;const[r,i]=k.useState(!1),o=pt(m=>m),a=(f=o[t])==null?void 0:f.currentPageId,s=a?ON(t,a,"header",((d=o[t].pages[a].page)==null?void 0:d.header)||null):null,l=a?ON(t,a,"body",((h=o[t].pages[a].page)==null?void 0:h.body)||null):null,c=k.useMemo(()=>{var m;return F.jsxs(F.Fragment,{children:[((m=o[t])==null?void 0:m.isLoading)&&F.jsx(WY,{}),s,l,a&&F.jsx(HSe,{userFlow:t,pageId:a}),o[t]&&F.jsx(Xw,{})]})},[s,l,a,t]),u=async()=>{var m;try{const g=await zx(e,t),p=(m=g==null?void 0:g.data)==null?void 0:m.content;(g==null?void 0:g.status)===200?mO(t,e,p):i(!0)}catch(g){console.error("[not-page]: API call failed",g),i(!0)}};return k.useEffect(()=>{e!=null&&e.api&&!n&&t?u():!(e!=null&&e.api)&&n&&t||e!=null&&e.api&&n&&t?mO(t,e,n):(!(e!=null&&e.api)&&!n||!t)&&(i(!0),console.error("[not-page]: API call failed","not api config","not userFlow"));const m="avocado-theme-mode-changed",g=p=>{const O=p.detail;Y5.setThemeMode(O)};return window.addEventListener(m,g),()=>{window.removeEventListener(m,g)}},[]),r&&console.error("[not-page]: No render page"),c};fn.Chart=uN,fn.Row=dN,fn.heading=Ww,fn.text=Uw,fn.usePage=mke,Object.defineProperty(fn,Symbol.toStringTag,{value:"Module"})});