@foris/avocado-not-front 1.4.3 → 1.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -646,14 +646,14 @@ 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"?mX(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 Vr(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=Vr(t,n),i=e?Vr(e,n):"";return"".concat(r," - ").concat(i)}function BF(t,e){if(!(t!=null&&t.length))return"";var n=t[0]?Vr(t[0],e):"";if(t.length===1)return n;if(t.length===2&&t[1]){var r=Vr(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 VF(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 Dd(t)}function J9(t){return Q0(t)}function e4(){return cs(ct())}function t4(t){return o9(t)}function zF(t){return bV(t)}function Ni(t,e){return t&&e?yz(t,e):!t&&!e}function qn(t,e){return t&&e?gz(t,e):!t&&!e}function Jd(t,e){return t&&e?Oz(t,e):!t&&!e}function Xe(t,e){return t&&e?mz(t,e):!t&&!e}function ms(t,e){return t&&e?pz(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 XF(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?Xe(t,u):Xe(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 Xe(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?Xe(t,o):Xe(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?yV(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?Dd(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=Dd(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&&$d(r,o)>0||i&&i.every(function(a){return $d(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&&$d(o,r)>0||i&&i.every(function(a){return $d(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=gV(l,Mi(c)),l=k0(l,Qi(c)),l=OV(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 Xe(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 Xe(n.props.day,va(n.props.day,n.props.locale,n.props.calendarStartDay))},n.isSameWeek=function(r){return n.props.showWeekPicker&&Xe(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?Xe(o,l):Xe(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?Xe(o,c):Xe(o,a)},n.isRangeStart=function(){var r=n.props,i=r.day,o=r.startDate,a=r.endDate;return!o||!a?!1:Xe(o,i)},n.isRangeEnd=function(){var r=n.props,i=r.day,o=r.startDate,a=r.endDate;return!o||!a?!1:Xe(a,i)},n.isWeekend=function(){var r=hz(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--"+VF(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?Xe(u,i):Xe(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)&&Xe(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&&!Xe(n.props.date,n.props.selected)&&Xe(n.props.date,n.props.preSelection)},n.getTabIndex=function(){return n.props.showWeekPicker&&n.props.showWeekNumber&&(n.isKeyboardSelected()||Xe(n.props.date,n.props.selected)&&Xe(n.props.preSelection,n.props.selected))?0:-1},n.handleFocusWeekNumber=function(r){var i=!1;n.getTabIndex()===0&&!(r!=null&&r.isInputFocused)&&Xe(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&&Xe(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&&!Xe(n.startOfWeek(),n.props.selected)&&Xe(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":Xe(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,$=E,j=A;switch(_){case de.ArrowRight:$=Oi(E,th),j=A===11?0:A+th;break;case de.ArrowLeft:$=gl(E,th),j=A===0?11:A-th;break;case de.ArrowUp:$=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:$=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:$,newCalculatedMonth:j}},v=function(_,E,A){for(var I=40,Q=_,$=!1,j=0,R=w(Q,E,A),B=R.newCalculatedDate,z=R.newCalculatedMonth;!$;){if(j>=I){B=E,z=A;break}if(f&&B<f){Q=de.ArrowRight;var X=w(Q,B,z);B=X.newCalculatedDate,z=X.newCalculatedMonth}if(d&&B>d){Q=de.ArrowLeft;var X=w(Q,B,z);B=X.newCalculatedDate,z=X.newCalculatedMonth}if(WF(B,n.props)){var X=w(Q,B,z);B=X.newCalculatedDate,z=X.newCalculatedMonth}else $=!0;j++}return{newCalculatedDate:B,newCalculatedMonth:z}};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 Xe(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&&!Xe(f,eu(r.props.selected))&&Xe(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?XF(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&&(!Xe(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&&!Xe(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:X9,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 $Y(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:DY});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&&!Xe(d,r.props.selected)&&(d=QX(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 Xe(A,c)});if(x){var _=p.filter(function(A){return!Xe(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):$X(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=zF(R);break}return B},_=function(j,R){for(var B=40,z=j,X=!1,K=0,ne=x(j,R);!X;){if(K>=B){ne=R;break}u&&ne<u&&(z=de.ArrowRight,ne=wa(u,r.props)?x(z,ne):u),f&&ne>f&&(z=de.ArrowLeft,ne=wa(f,r.props)?x(z,ne):f),wa(ne,r.props)?((z===de.PageUp||z===de.Home)&&(z=de.ArrowRight),(z===de.PageDown||z===de.End)&&(z=de.ArrowLeft),ne=x(z,ne)):X=!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),$=Be(E);A!==I||Q!==$?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(Vr(r.props.startDate,{dateFormat:c,locale:s}),". ").concat(r.props.endDate?"End date: "+Vr(r.props.endDate,{dateFormat:c,locale:s}):""):r.props.showTimeSelectOnly?u="Selected time: ".concat(Vr(r.props.selected,{dateFormat:a,locale:s})):r.props.showYearPicker?u="Selected year: ".concat(Vr(r.props.selected,{dateFormat:"yyyy",locale:s})):r.props.showMonthYearPicker?u="Selected month: ".concat(Vr(r.props.selected,{dateFormat:"MMMM yyyy",locale:s})):r.props.showQuarterYearPicker?u="Selected quarter: ".concat(Vr(r.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):u="Selected date: ".concat(Vr(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}):Vr(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&&$Y(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 DY="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"})]})}),VY="_cntLoading_1suxv_1",zY="_cntLoading__inline_1suxv_16",XY="_cntLoading_content_1suxv_20",FY="_title_1suxv_28",YY="_description_1suxv_31",qY="_cntLoading__darkMode_1suxv_34",Sl={cntLoading:VY,cntLoading__inline:zY,cntLoading_content:XY,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",zr={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=zr.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=[zr.modal,n,c&&zr.modal__isOpen,i&&zr[`modal__${i}`],f&&zr.modal__isClosing,h.mode==="dark"&&zr.modal__dark];return c?N.jsxs("div",{className:Ce(...p),children:[N.jsx("div",{className:zr.modal_overlay}),N.jsxs("div",{ref:l,className:zr.modal_content,onAnimationEndCapture:()=>f&&g(),children:[N.jsxs("header",{className:zr.modalHeader,children:[typeof r=="string"?N.jsx(da,{type:"h2",children:r}):r,N.jsx("button",{type:"button",className:zr.modalHeader_closeBtn,onClick:m,children:N.jsx(kt,{name:"close",color:"neutral-70"})})]}),o&&N.jsx("main",{className:zr.modalBody,children:o}),a&&N.jsx("footer",{className:zr.modalFooter,children:a})]})]}):null},Mq="_paginator_1bm60_1",Qq="_paginator__mobile_1bm60_1",$q="_paginator_rowsPerPage_1bm60_9",Dq="_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:$q,select:Dq,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 Vq(t){if(Array.isArray(t))return t}function zq(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 Xq(){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 $o(t,e){return Vq(t)||zq(t,e)||A4(t,e)||Xq()}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 Do(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=Do(t,Yq),g=k.useState(s!==void 0?s:n),p=$o(g,2),O=p[0],w=p[1],v=k.useState(l!==void 0?l:i),b=$o(v,2),y=b[0],x=b[1],_=k.useState(h!==void 0?h:a),E=$o(_,2),A=E[0],I=E[1],Q=k.useCallback(function(K,ne){typeof c=="function"&&c(K,ne),I(K)},[c]),$=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,z=l!==void 0?l:y,X=h!==void 0?h:A;return Ee(Ee({},m),{},{inputValue:B,menuIsOpen:z,onChange:Q,onInputChange:$,onMenuClose:R,onMenuOpen:j,value:X})}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:"7cf468e9979379bd",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.1.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}(),Dn="-ms-",ih="-moz-",et="-webkit-",$4="comm",ug="rule",fg="decl",sW="@import",D4="@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,$4,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 $4:return"";case D4: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 V4(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+Dn+t+t;case 6828:case 4268:return et+t+Dn+t+t;case 6165:return et+t+Dn+"flex-"+t+t;case 5187:return et+t+tt(t,/(\w+).+(:[^]+)/,et+"box-$1$2"+Dn+"flex-$1$2")+t;case 5443:return et+t+Dn+"flex-item-"+tt(t,/flex-|-self/,"")+t;case 4675:return et+t+Dn+"flex-line-pack"+tt(t,/align-content|flex-|-self/,"")+t;case 5548:return et+t+Dn+tt(t,"shrink","negative")+t;case 5292:return et+t+Dn+tt(t,"basis","preferred-size")+t;case 6060:return et+"box-"+tt(t,"-grow","")+et+t+Dn+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"+Dn+"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")?V4(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"+Dn+"$2box$3")+t}break;case 5936:switch(Sn(t,e+11)){case 114:return et+t+Dn+tt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return et+t+Dn+tt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return et+t+Dn+tt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return et+t+Dn+t+t}return t}var MW=function(t,e,n,r){if(t.length>-1&&!t.return)switch(t.type){case fg:t.return=V4(t.value,t.length);break;case D4: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+)/,Dn+"input-$1")]})],r)}return""})}},QW=[MW],$W=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},z4={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:"934be5f0fd28994c",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.1.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}(),Dn="-ms-",ih="-moz-",et="-webkit-",$4="comm",ug="rule",fg="decl",sW="@import",D4="@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,$4,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 $4:return"";case D4: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 V4(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+Dn+t+t;case 6828:case 4268:return et+t+Dn+t+t;case 6165:return et+t+Dn+"flex-"+t+t;case 5187:return et+t+tt(t,/(\w+).+(:[^]+)/,et+"box-$1$2"+Dn+"flex-$1$2")+t;case 5443:return et+t+Dn+"flex-item-"+tt(t,/flex-|-self/,"")+t;case 4675:return et+t+Dn+"flex-line-pack"+tt(t,/align-content|flex-|-self/,"")+t;case 5548:return et+t+Dn+tt(t,"shrink","negative")+t;case 5292:return et+t+Dn+tt(t,"basis","preferred-size")+t;case 6060:return et+"box-"+tt(t,"-grow","")+et+t+Dn+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"+Dn+"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")?V4(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"+Dn+"$2box$3")+t}break;case 5936:switch(Sn(t,e+11)){case 114:return et+t+Dn+tt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return et+t+Dn+tt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return et+t+Dn+tt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return et+t+Dn+t+t}return t}var MW=function(t,e,n,r){if(t.length>-1&&!t.return)switch(t.type){case fg:t.return=V4(t.value,t.length);break;case D4: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+)/,Dn+"input-$1")]})],r)}return""})}},QW=[MW],$W=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},z4={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 X4;function DW(){if(X4)return rt;X4=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}z4.exports=DW();var LW=z4.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 VW={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},zW={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:"7cf468e9979379bd",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.1.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"},XW=/[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(XW,"-$&").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 VW[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"&&zW.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:"7cf468e9979379bd",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.1.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"?$W({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=Do(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=$o(o,1),s=a[0];return!n.includes(s)});return i.reduce(function(o,a){var s=$o(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,$=160;switch(i){case"auto":case"bottom":if(_>=m)return{placement:"bottom",maxHeight:e};if(A>=m&&!a)return o&&mh(l,I,$),{placement:"bottom",maxHeight:e};if(!a&&A>=r||a&&_>=r){o&&mh(l,I,$);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,$),{placement:"top",maxHeight:e};if(!a&&E>=r||a&&x>=r){var z=e;return(!a&&E>=r||a&&x>=r)&&(z=a?x-y:E-y),o&&mh(l,Q,$),{placement:"top",maxHeight:z}}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=$o(f,2),h=d[0],m=d[1],g=k.useState(null),p=$o(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=Do(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=Do(t,bU);return Pe("div",Te({},Bt(Ee(Ee({},i),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},$U=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}},DU=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=$o(c,2),f=u[0],d=u[1],h=k.useMemo(function(){return{setPortalPlacement:d}},[]),m=k.useState(null),g=$o(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=X9(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"],VU=["innerProps","isRtl","size"],zU={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},u8=function(t){var e=t.size,n=Do(t,ZU);return Pe("svg",Te({height:e,width:e,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:zU},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}})},XU=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 X4;function DW(){if(X4)return rt;X4=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}z4.exports=DW();var LW=z4.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 VW={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},zW={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:"934be5f0fd28994c",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.1.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"},XW=/[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(XW,"-$&").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 VW[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"&&zW.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:"934be5f0fd28994c",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.1.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"?$W({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=Do(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=$o(o,1),s=a[0];return!n.includes(s)});return i.reduce(function(o,a){var s=$o(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,$=160;switch(i){case"auto":case"bottom":if(_>=m)return{placement:"bottom",maxHeight:e};if(A>=m&&!a)return o&&mh(l,I,$),{placement:"bottom",maxHeight:e};if(!a&&A>=r||a&&_>=r){o&&mh(l,I,$);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,$),{placement:"top",maxHeight:e};if(!a&&E>=r||a&&x>=r){var z=e;return(!a&&E>=r||a&&x>=r)&&(z=a?x-y:E-y),o&&mh(l,Q,$),{placement:"top",maxHeight:z}}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=$o(f,2),h=d[0],m=d[1],g=k.useState(null),p=$o(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=Do(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=Do(t,bU);return Pe("div",Te({},Bt(Ee(Ee({},i),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},$U=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}},DU=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=$o(c,2),f=u[0],d=u[1],h=k.useMemo(function(){return{setPortalPlacement:d}},[]),m=k.useState(null),g=$o(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=X9(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"],VU=["innerProps","isRtl","size"],zU={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},u8=function(t){var e=t.size,n=Do(t,ZU);return Pe("svg",Te({height:e,width:e,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:zU},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}})},XU=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([`
|
|
657
657
|
0%, 80%, 100% { opacity: 0; }
|
|
658
658
|
40% { opacity: 1; }
|
|
659
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=Do(t,VU);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=Do(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=Do(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:DU,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 $H(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 DH(t,e){e===void 0&&(e=$H);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,z=e.options,X=e.removedValue,K=e.removedValues,ne=e.value,L=function(we){return Array.isArray(we)?null:we},fe=X||B||L(ne),oe=fe?f(fe):"",T=z||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,z=!!(n&&a&&a.includes(n));if(B&&_.onFocus){var X={focused:B,label:f(B),isDisabled:m(B,a),isSelected:z,options:i,context:B===n?"menu":"value",selectValue:a,isAppleDevice:c};R=_.onFocus(X)}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",$=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"},$));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=DH(y8),v8=function(t){return t.replace(/^\s+|\s+$/g,"")},VH=function(t){return"".concat(t.label," ").concat(t.value)},zH=function(t){return function(e,n){if(e.data.__isNew__)return!0;var r=Ee({ignoreCase:!0,ignoreAccents:!0,stringify:VH,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}},XH=["innerRef"];function FH(t){var e=t.innerRef,n=Do(t,XH),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:XU,group:rH,groupHeading:oH,indicatorsContainer:RU,indicatorSeparator:WU,input:cH,loadingIndicator:GU,loadingMessage:AU,menu:_U,menuList:PU,menuPortal:$U,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:zH(),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=D8(t,e,n),o=L8(t,e,n),a=$8(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},$8=function(t,e){return t.getOptionLabel(e)},bh=function(t,e){return t.getOptionValue(e)};function D8(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 $8(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 D8(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,$=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,$e=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:$e,isFocused:te,innerRef:te?r.getFocusedOptionRef:void 0}),r.formatOptionLabel(fe.data,"menu"))},z;if(this.hasOptions())z=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 X=v({inputValue:O});if(X===null)return null;z=P.createElement(u,h,X)}else{var K=$({inputValue:O});if(K===null)return null;z=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}),z)}))});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"})})},V8=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})]})},z8=({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))}}},X8=({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}=z8({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(V8,{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(X8,{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)"}/*!
|
|
@@ -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&&Vl(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)&&Vl(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Vl(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 $se(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 Dse(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){!Xse(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,Vl(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(ze.allowMultipleSelections)&&Zse(e,n),this.dragging=zse(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 Vse(t,e){let n=t.state.facet(Y_);return n.length?n[0](e):me.mac?!e.altKey:!e.ctrlKey}function zse(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 Xse(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&&Vse(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 $S=["pre-wrap","normal","pre-line","break-spaces"];let Yl=!1;function DS(){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 $S.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=$S.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(Vu(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);DS(),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)),DS();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)||Vu(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)||Vu(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 Vu(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 Vu(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=>Vu(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},$3=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)),$3&&(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&&$u(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),$3&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),$3&&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&&Vl(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=VS(n,e.previousSibling||e.target.previousSibling,-1),i=VS(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 VS(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 zS(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 $u(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 zS(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?zS(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||ze.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(ze.phrases)!=this.state.facet(ze.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&&Vl(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),XS}}),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]!=XS)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[$a.find(o,e-i.from,-1,n)];return Du(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 z_(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||V_(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=De.define();const gle=4096,XS={};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 Da=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=Da={view:v,prefix:w,scope:a};return setTimeout(()=>{Da==b&&(Da=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,D3))}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 D3=null;function WS(t,e,n,r){D3=e;let i=Fae(e),o=ir(i,0),a=Wi(o)==i.length&&i!=" ",s="",l=!1,c=!1,u=!1;Da&&Da.view==n&&Da.scope==r&&(s=Da.prefix+" ",yS.indexOf(e.keyCode)<0&&(c=!0,Da=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(),D3=null,l}class zu{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 zu(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 zu(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,z,X,K){let ne=t.coordsAtPos(R,R==_.to?-2:2),L=t.coordsAtPos(z,z==_.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&&X?d:L.right):I.push(!o&&X?f:L.left,!o&&B?d:ne.right))}let $=y??_.from,j=x??_.to;for(let R of t.visibleRanges)if(R.to>$&&R.from<j)for(let B=Math.max(R.from,$),z=Math.min(R.to,j);;){let X=t.state.doc.lineAt(B);for(let K of t.bidiSpans(X)){let ne=K.from+X.from,L=K.to+X.from;if(ne>=z)break;L>B&&Q(Math.max(ne,B),y==null&&ne<=$,Math.min(L,z),x==null&&L>=j,K.dir)}if(B=X.to+1,B>=z)break}return I.length==0&&Q($,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 Xu=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[Xu.of(t),Ple,Ele,Tle,K_.of(!0)]}function KS(t){return t.startState.facet(Xu)!=t.state.facet(Xu)}const Ple=GS({above:!0,markers(t){let{state:e}=t,n=e.facet(Xu),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 zu.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(Xu).cursorBlinkRate+"ms"}const Ele=GS({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:zu.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=De.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 $le{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",Dle=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:Dle,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 $le({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 Vle((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 Vle 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 zle(){return Fle}const Xle=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(Xle.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=Du(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=De.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=De.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 Vo extends ks{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Vo.prototype.elementClass="",Vo.prototype.toDOM=void 0,Vo.prototype.mapMode=Cn.TrackBefore,Vo.prototype.startSide=Vo.prototype.endSide=-1,Vo.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 V3 extends Vo{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function z3(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 V3(z3(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 V3(z3(e,gk(e.state.doc.lines)))},updateSpacer(e,n){let r=z3(n.view,gk(n.view.state.doc.lines));return r==e.number?e:new V3(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 Vo{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 X3{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 X3(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 X3(n,n.length):n,l=r.types,c=0,u=0;function f(y,x,_,E,A,I){let{id:Q,start:$,end:j,size:R}=s,B=u,z=c;for(;R<0;)if(s.next(),R==-1){let fe=o[Q];_.push(fe),E.push($-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 X=l[Q],K,ne,L=$-y;if(j-$<=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,$,ee,s.end,we,W,B,z),ee=oe.length,we=s.end),s.next()):I>2500?d($,fe,oe,T):f($,fe,oe,T,W,I+1);if(W>=0&&ee>0&&ee<oe.length&&m(oe,T,$,ee,$,we,W,B,z),oe.reverse(),T.reverse(),W>-1&&ee>0){let Ze=h(X,z);K=q3(X,oe,T,0,oe.length,0,j-$,Ze,Ze)}else K=g(X,oe,T,j-$,B-j,z)}_.push(K),E.push(L)}function d(y,x,_,E){let A=[],I=0,Q=-1;for(;s.pos>x;){let{id:$,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($,j,R),I++,s.next()}}if(I){let $=new Uint16Array(I*4),j=A[A.length-2];for(let R=A.length-3,B=0;R>=0;R-=3)$[B++]=A[R],$[B++]=A[R+1]-j,$[B++]=A[R+2]-j,$[B++]=B;_.push(new La($,A[2]-j,r)),E.push(j-y)}}function h(y,x){return(_,E,A)=>{let I=0,Q=_.length-1,$,j;if(Q>=0&&($=_[Q])instanceof ot){if(!Q&&$.type==y&&$.length==A)return $;(j=$.prop(Qe.lookAhead))&&(I=E[Q]+$.length+j)}return g(y,_,E,A,I,x)}}function m(y,x,_,E,A,I,Q,$,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,$-I,j)),x.push(A-_)}function g(y,x,_,E,A,I,Q){if(I){let $=[Qe.contextHash,I];Q=Q?[$].concat(Q):[$]}if(A>25){let $=[Qe.lookAhead,A];Q=Q?[$].concat(Q):[$]}return new ot(y,x,_,E,Q)}function p(y,x){let _=s.fork(),E=0,A=0,I=0,Q=_.end-i,$={size:0,start:0,skip:0};e:for(let j=_.pos-y;_.pos>j;){let R=_.size;if(_.id==x&&R>=0){$.size=E,$.start=A,$.skip=I,I+=4,E+=4,_.next();continue}let B=_.pos-R;if(R<0||B<j||_.start<Q)break;let z=_.id>=a?4:0,X=_.start;for(_.next();_.pos>B;){if(_.size<0)if(_.size==-3)z+=4;else break e;else _.id>=a&&(z+=4);_.next()}A=X,E+=R,I+=z}return(x<0||E==y)&&($.size=E,$.start=A,$.skip=I),$.size>4?$:void 0}function O(y,x,_){let{id:E,start:A,end:I,size:Q}=s;if(s.next(),Q>=0&&E<a){let $=_;if(Q>4){let j=s.pos-(Q-4);for(;s.pos>j;)_=O(y,x,_)}x[--_]=$,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 zo{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 zo(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 zo(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 Dce(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||$ce(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 $ce(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 Dce=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 zo(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 zo(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 $k(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 Vce(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class Vce{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=zce(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 zce(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(),Dk=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:Dk,tagName:se(Dk),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)}$k([{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,ze.prototype.hasOwnProperty("tree")||Object.defineProperty(ze.prototype,"tree",{get(){return Ot(this)}}),this.parser=n,this.extension=[Na.of(this),ze.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=De.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 Xce{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 Xce(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(zo.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(zo.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=zo.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 zo.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 $p{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 $p(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 Dp(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 ze&&(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=Dp(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 ze.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(),Xo=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(Xo);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 Vk(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=De.define({map:Vk}),rf=De.define({map:Vk});function zk(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 Xk(t,e){return t.field(Qs,!1)?e:e.concat(De.appendConfig.of(qk()))}const oue=t=>{for(let e of zk(t)){let n=jp(t.state,e.from,e.to);if(n)return t.dispatch({effects:Xk(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 zk(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:Xk(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 Vo{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=$k(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($ue,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 $ue(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(),Due=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(Due);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 Vue(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=zue(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 zue(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,De.mapEffects(t.effects,e),a,t.startSelection.map(o),r)}const Xue=/^(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||Xue.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(De.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:Vue(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 Vp(t,e){return U.cursor(e?t.to:t.from)}function fC(t,e){return Si(t,n=>n.empty?t.moveByChar(n,e):Vp(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):Vp(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 zp(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=>zp(t.state,e,!Rn(t))),Hue=t=>Si(t,e=>zp(t.state,e,Rn(t)));function mC(t,e){return Si(t,n=>{if(!n.empty)return Vp(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):Vp(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=>zp(t.state,e,!Rn(t))),lfe=t=>ei(t,e=>zp(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),$C=({state:t,dispatch:e})=>(e(fo(t,{anchor:t.selection.main.anchor,head:0})),!0),DC=({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=Xp(t,l,!1)):l>a&&(n="delete.forward",l=Xp(t,l,!0)),a=Math.min(a,l),s=Math.max(s,l)}else a=Xp(t,a,!1),s=Xp(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 Xp(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%Dp(o)||Dp(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=VC(!1),Mfe=VC(!0);function VC(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},zC=({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),XC=({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-Dp(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),$fe=t=>(t.setTabFocusMode(),!0),Dfe=[{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:$C},{mac:"Ctrl-ArrowUp",run:bC,shift:TC},{key:"ArrowDown",run:OC,shift:PC,preventDefault:!0},{mac:"Cmd-ArrowDown",run:QC,shift:DC},{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:$C},{key:"End",run:Gue,shift:cfe,preventDefault:!0},{key:"Mod-End",run:QC,shift:DC},{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(Dfe.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:XC},{key:"Mod-]",run:zC},{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:$fe}].concat(Lfe),jfe={key:"Tab",run:zC,shift:XC};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=De.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(De.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},Vfe=pe.define({combine(t){return Gi(t,Zfe,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function zfe(t){return[Wfe,qfe]}const Xfe=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(Vfe),{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(Xfe.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:ze.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=De.define(),x6=De.define(),Va=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(Va))}update(t){let e=t.state.field(Va);(e!=t.startState.field(Va)||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(Va,!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(Va,!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)):De.appendConfig.of(fde)]});return!0},iP=t=>{let e=t.state.field(Va,!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(Va).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=[Va,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 $s(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=De.define(),ff=De.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",$s(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($s(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=$s(e.state);if(s>a||!i||n&2&&($s(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:$s(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=De.define({map(t,e){return t.map(n=>n.map(e))}}),pP=De.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,$de=1e3,Dde=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>$de){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=$s(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=$s(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 $6{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 $6(this.field,n,r)}}class D6{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 $6(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 D6(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=De.define({map(t,e){return t&&t.map(e)}}),Bde=De.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=D6.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(De.appendConfig.of([hf,zde,Xde,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 Vde=[{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]:Vde}}),zde=jo.highest(ql.compute([yP],t=>t.facet(yP)));function cr(t,e){return Object.assign(Object.assign({},e),{apply:Zde(t)})}const Xde=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:[]},Ds=De.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(Ds)&&(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:Ds.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:Ds.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:Ds.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:Ds.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:Ds.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:Ds.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),Dde,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(De.appendConfig.of(mhe))}const PP=De.define(),N6=De.define(),EP=De.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 $P=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(ze.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(zle()),e.highlightSelectionMatches!==!1&&i.push(zfe()),e.tabSize&&typeof e.tabSize=="number"&&i.push(Hl.of(" ".repeat(e.tabSize))),i.concat([ql.of(r.flat())]).filter(Boolean)};const ghe="#e5c07b",DP="#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:DP},{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:DP},{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($P()):l.unshift($P(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(ze.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,$]=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(X=>{if(X.docChanged&&typeof r=="function"&&!X.transactions.some(L=>L.annotation(RP))){var K=X.state.doc,ne=K.toString();r(ne,X)}i&&i(The(X))}),B=Ehe({theme:c,editable:O,readOnly:w,placeholder:p,indentWithTab:v,basicSetup:b}),z=[R,j,...B];return a&&typeof a=="function"&&z.push(ae.updateListener.of(a)),z=z.concat(s),k.useLayoutEffect(()=>{if(_&&!Q){var X={doc:e,selection:n,extensions:z},K=x?ze.fromJSON(x.json,X,x.fields):ze.create(X);if($(K),!A){var ne=new ae({state:K,parent:_,root:y});I(ne),o&&o(ne,K)}}return()=>{A&&($(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:De.reconfigure.of(z)})},[c,s,u,f,d,h,m,g,p,O,w,v,b,r,a]),k.useEffect(()=>{if(e!==void 0){var X=A?A.state.doc.toString():"";A&&e!==X&&A.dispatch({changes:{from:0,to:X.length,insert:e||""},annotations:[RP.of(!0)]})}},[e,A]),{state:Q,setState:$,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:$,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:$}),[I,j,Q,$]);var B=k.useCallback(X=>{I.current=X,R(X)},[R]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var z=typeof f=="string"?"cm-theme-"+f:"cm-theme";return F.jsx("div",QO({ref:B,className:""+z+(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:"4a19b6688ef2b051",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.3",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 VP(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 $he(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 VP(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 VP{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class $he{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 zP=new s1;class Dhe{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=zP,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=zP,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;XP(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(XP(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 XP(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 Dhe(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 V6=t=>t;class z6{constructor(e){this.start=e.start,this.shift=e.shift||V6,this.reduce=e.reduce||V6,this.reuse=e.reuse||V6,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}),Vhe=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}),zhe=lo.define({name:"json",parser:Vhe.configure({props:[Ba.add({Object:Ms({except:/^\s*\}/}),Array:Ms({except:/^\s*\]/})}),Xo.add({"Object Array":Ip})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function UP(){return new Ra(zhe)}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 Xhe{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||X6(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 X6(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(X6(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:ze.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=De.define(),x6=De.define(),Va=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(Va))}update(t){let e=t.state.field(Va);(e!=t.startState.field(Va)||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(Va,!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(Va,!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)):De.appendConfig.of(fde)]});return!0},iP=t=>{let e=t.state.field(Va,!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(Va).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=[Va,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 $s(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=De.define(),ff=De.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",$s(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($s(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=$s(e.state);if(s>a||!i||n&2&&($s(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:$s(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=De.define({map(t,e){return t.map(n=>n.map(e))}}),pP=De.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,$de=1e3,Dde=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>$de){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=$s(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=$s(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 $6{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 $6(this.field,n,r)}}class D6{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 $6(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 D6(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=De.define({map(t,e){return t&&t.map(e)}}),Bde=De.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=D6.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(De.appendConfig.of([hf,zde,Xde,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 Vde=[{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]:Vde}}),zde=jo.highest(ql.compute([yP],t=>t.facet(yP)));function cr(t,e){return Object.assign(Object.assign({},e),{apply:Zde(t)})}const Xde=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:[]},Ds=De.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(Ds)&&(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:Ds.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:Ds.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:Ds.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:Ds.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:Ds.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:Ds.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),Dde,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(De.appendConfig.of(mhe))}const PP=De.define(),N6=De.define(),EP=De.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 $P=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(ze.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(zle()),e.highlightSelectionMatches!==!1&&i.push(zfe()),e.tabSize&&typeof e.tabSize=="number"&&i.push(Hl.of(" ".repeat(e.tabSize))),i.concat([ql.of(r.flat())]).filter(Boolean)};const ghe="#e5c07b",DP="#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:DP},{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:DP},{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($P()):l.unshift($P(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(ze.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,$]=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(X=>{if(X.docChanged&&typeof r=="function"&&!X.transactions.some(L=>L.annotation(RP))){var K=X.state.doc,ne=K.toString();r(ne,X)}i&&i(The(X))}),B=Ehe({theme:c,editable:O,readOnly:w,placeholder:p,indentWithTab:v,basicSetup:b}),z=[R,j,...B];return a&&typeof a=="function"&&z.push(ae.updateListener.of(a)),z=z.concat(s),k.useLayoutEffect(()=>{if(_&&!Q){var X={doc:e,selection:n,extensions:z},K=x?ze.fromJSON(x.json,X,x.fields):ze.create(X);if($(K),!A){var ne=new ae({state:K,parent:_,root:y});I(ne),o&&o(ne,K)}}return()=>{A&&($(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:De.reconfigure.of(z)})},[c,s,u,f,d,h,m,g,p,O,w,v,b,r,a]),k.useEffect(()=>{if(e!==void 0){var X=A?A.state.doc.toString():"";A&&e!==X&&A.dispatch({changes:{from:0,to:X.length,insert:e||""},annotations:[RP.of(!0)]})}},[e,A]),{state:Q,setState:$,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:$,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:$}),[I,j,Q,$]);var B=k.useCallback(X=>{I.current=X,R(X)},[R]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var z=typeof f=="string"?"cm-theme-"+f:"cm-theme";return F.jsx("div",QO({ref:B,className:""+z+(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:"db1dc41ca9c3147c",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.4",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 VP(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 $he(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 VP(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 VP{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class $he{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 zP=new s1;class Dhe{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=zP,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=zP,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;XP(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(XP(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 XP(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 Dhe(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 V6=t=>t;class z6{constructor(e){this.start=e.start,this.shift=e.shift||V6,this.reduce=e.reduce||V6,this.reuse=e.reuse||V6,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}),Vhe=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}),zhe=lo.define({name:"json",parser:Vhe.configure({props:[Ba.add({Object:Ms({except:/^\s*\}/}),Array:Ms({except:/^\s*\]/})}),Xo.add({"Object Array":Ip})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function UP(){return new Ra(zhe)}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 Xhe{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||X6(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 X6(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(X6(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)=>X6(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 Xhe(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,$t=()=>{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}},$Oe=typeof WeakRef<"u"?WeakRef:QOe,DOe=0,OM=1;function R1(){return{s:DOe,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 $Oe(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=D1,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 VOe=typeof Symbol=="function"&&Symbol.observable||"@@observable",CM=VOe,kv=()=>Math.random().toString(36).substring(7).split("").join("."),zOe={INIT:`@@redux/INIT${kv()}`,REPLACE:`@@redux/REPLACE${kv()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${kv()}`},V1=zOe;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:V1.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:V1.INIT}),{dispatch:d,subscribe:f,getState:u,replaceReducer:h,[CM]:m}}function XOe(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:V1.INIT})>"u")throw new Error(Tn(12));if(typeof n(void 0,{type:V1.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{XOe(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 z1(...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=z1(...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 zs(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 X1(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 $M(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 Xs(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)||zs(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 Df;function DM(){return Df}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===Df&&(Df=t.parent_)}function IM(t){return Df=HOe(Df,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 X1(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),X1(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(zs(i)){const s=o&&e&&e.type_!==3&&!Pv(e.assigned_,r)?o.concat(r):void 0,l=U1(t,i,s);if($M(n,r,l),zs(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_:DM(),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=Xs(t);if(!Pv(n,e))return JOe(t,n,e);const r=n[e];return t.finalized_||!Uo(r)?r:r===$v(t.base_,e)?(Lv(t),t.copy_[e]=Iv(r,t)):r},has(t,e){return e in Xs(t)},ownKeys(t){return Reflect.ownKeys(Xs(t))},set(t,e,n){const r=RM(Xs(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=$v(Xs(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),Dv(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 $v(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,Lv(t),Dv(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=Xs(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={};X1(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 $v(t,e){const n=t[Tr];return(n?Xs(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 Dv(t){t.modified_||(t.modified_=!0,t.parent_&&Dv(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),zs(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 zs(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_:DM()).drafts_.push(n),n}function Ho(t){return zs(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 X1(n,(r,i)=>{$M(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 VM(t){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,t):i(o)}var t3e=VM(),n3e=VM,zM={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:"4a19b6688ef2b051",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.3",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"?z1:z1.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 XM=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 XM;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 XM(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=z1;i&&(u=r3e({trace:zM.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(zs(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"&&zM.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,$]of Object.entries(i.selectors??{}))I[Q]=O3e($,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 $3e={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},sQ=li({name:"chartLayout",initialState:$3e,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:D3e,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,V3e=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},z3e=(t,e)=>{var{x:n,y:r}=t,{x:i,y:o}=e;return Math.sqrt((n-i)**2+(r-o)**2)},X3e=(t,e)=>{var{x:n,y:r}=t,{cx:i,cy:o}=e,a=z3e({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:V3e(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}=X3e({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)?za(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,Vv=Y(t=>t.cartesianAxis.xAxis,t=>Object.values(t)),zv=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,Vv,zv,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]:za(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})),Xv=()=>{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 $6e(t){var e=$t();return k.useEffect(()=>{e(_6e(t))},[e,t]),null}function D6e(t){var e=$t();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($6e,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),P.createElement(D6e,{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}=_,$=I,j=Q;if(A){var R=A(I,Q,_,E,o);if(Array.isArray(R))[$,j]=R;else if(R!=null)$=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"},$),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 V6e(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 z6e(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 X6e(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=z6e({translateX:u,translateY:f,useTranslate3d:s})):c=Z6e,{cssProperties:c,cssClasses:V6e({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}=X6e({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()},$Q=()=>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 DQ(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?DQ(Object(n),!0).forEach(function(r){U6e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):DQ(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:Xge,curveBasisOpen:Fge,curveBasis:zge,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 VQ={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(){}t.noop=e})(VQ),function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=BQ,n=VQ;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,zQ=(t,e)=>[0,3*t,3*e-6*t,3*t-3*e+1],XQ=(t,e)=>t.map((n,r)=>n*e**r).reduce((n,r)=>n+r),FQ=(t,e)=>n=>{var r=zQ(t,e);return XQ(r,n)},Oye=(t,e)=>n=>{var r=zQ(t,e),i=[...r.map((o,a)=>o*a).slice(1),0];return XQ(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 $ye=["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 Dye(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=Dye(e,$ye),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,$t=()=>{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}},$Oe=typeof WeakRef<"u"?WeakRef:QOe,DOe=0,OM=1;function R1(){return{s:DOe,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 $Oe(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=D1,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 VOe=typeof Symbol=="function"&&Symbol.observable||"@@observable",CM=VOe,kv=()=>Math.random().toString(36).substring(7).split("").join("."),zOe={INIT:`@@redux/INIT${kv()}`,REPLACE:`@@redux/REPLACE${kv()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${kv()}`},V1=zOe;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:V1.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:V1.INIT}),{dispatch:d,subscribe:f,getState:u,replaceReducer:h,[CM]:m}}function XOe(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:V1.INIT})>"u")throw new Error(Tn(12));if(typeof n(void 0,{type:V1.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{XOe(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 z1(...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=z1(...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 zs(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 X1(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 $M(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 Xs(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)||zs(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 Df;function DM(){return Df}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===Df&&(Df=t.parent_)}function IM(t){return Df=HOe(Df,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 X1(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),X1(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(zs(i)){const s=o&&e&&e.type_!==3&&!Pv(e.assigned_,r)?o.concat(r):void 0,l=U1(t,i,s);if($M(n,r,l),zs(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_:DM(),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=Xs(t);if(!Pv(n,e))return JOe(t,n,e);const r=n[e];return t.finalized_||!Uo(r)?r:r===$v(t.base_,e)?(Lv(t),t.copy_[e]=Iv(r,t)):r},has(t,e){return e in Xs(t)},ownKeys(t){return Reflect.ownKeys(Xs(t))},set(t,e,n){const r=RM(Xs(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=$v(Xs(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),Dv(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 $v(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,Lv(t),Dv(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=Xs(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={};X1(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 $v(t,e){const n=t[Tr];return(n?Xs(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 Dv(t){t.modified_||(t.modified_=!0,t.parent_&&Dv(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),zs(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 zs(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_:DM()).drafts_.push(n),n}function Ho(t){return zs(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 X1(n,(r,i)=>{$M(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 VM(t){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,t):i(o)}var t3e=VM(),n3e=VM,zM={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:"db1dc41ca9c3147c",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.4",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"?z1:z1.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 XM=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 XM;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 XM(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=z1;i&&(u=r3e({trace:zM.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(zs(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"&&zM.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,$]of Object.entries(i.selectors??{}))I[Q]=O3e($,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 $3e={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},sQ=li({name:"chartLayout",initialState:$3e,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:D3e,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,V3e=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},z3e=(t,e)=>{var{x:n,y:r}=t,{x:i,y:o}=e;return Math.sqrt((n-i)**2+(r-o)**2)},X3e=(t,e)=>{var{x:n,y:r}=t,{cx:i,cy:o}=e,a=z3e({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:V3e(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}=X3e({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)?za(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,Vv=Y(t=>t.cartesianAxis.xAxis,t=>Object.values(t)),zv=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,Vv,zv,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]:za(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})),Xv=()=>{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 $6e(t){var e=$t();return k.useEffect(()=>{e(_6e(t))},[e,t]),null}function D6e(t){var e=$t();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($6e,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),P.createElement(D6e,{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}=_,$=I,j=Q;if(A){var R=A(I,Q,_,E,o);if(Array.isArray(R))[$,j]=R;else if(R!=null)$=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"},$),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 V6e(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 z6e(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 X6e(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=z6e({translateX:u,translateY:f,useTranslate3d:s})):c=Z6e,{cssProperties:c,cssClasses:V6e({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}=X6e({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()},$Q=()=>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 DQ(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?DQ(Object(n),!0).forEach(function(r){U6e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):DQ(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:Xge,curveBasisOpen:Fge,curveBasis:zge,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 VQ={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(){}t.noop=e})(VQ),function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=BQ,n=VQ;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,zQ=(t,e)=>[0,3*t,3*e-6*t,3*t-3*e+1],XQ=(t,e)=>t.map((n,r)=>n*e**r).reduce((n,r)=>n+r),FQ=(t,e)=>n=>{var r=zQ(t,e);return XQ(r,n)},Oye=(t,e)=>n=>{var r=zQ(t,e),i=[...r.map((o,a)=>o*a).slice(1),0];return XQ(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 $ye=["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 Dye(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=Dye(e,$ye),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,`
|