PageSourceSearch

https://loans.dynagenlending.com/account/heloc/assets/vendor-DARUOhqT.js

js dynagenlending.com collected 2026-09-29 16:53:49 UTC 3,468,480 bytes, 293 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-PaJ7c2l8.js","assets/rolldown-runtime-B0Z9INg1.js"])))=>i.map(i=>d[i]);
2import{a as __toESM,i as __toCommonJS,n as __esmMin,r as __exportAll,t as __commonJSMin}from"./rolldown-runtime-B0Z9INg1.js";var formatDistanceLocale={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{
2count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},formatDistance=(e,t,n)=>{let r,i=formatDistanceLocale[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function buildFormatLongFn(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var dateFormats={full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},timeFormats={full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},dateTimeFormats={full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:`full`}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:`full`}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:`full`})},formatRelativeLocale={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},formatRelative=(e,t,n,r)=>formatRelativeLocale[e];function buildLocalizeFn(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var eraValues={narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},quarterValues={narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},monthValues={narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},dayValues={narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},dayPeriodValues={narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},formattingDayPeriodValues={narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},ordinalNumber=(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},localize={ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:`wide`}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:buildLocalizeFn({values:monthValues,defaultWidth:`wide`}),day:buildLocalizeFn({values:dayValues,defaultWidth:`wide`}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:`wide`,formattingValues:formattingDayPeriodValues,defaultFormattingWidth:`wide`})};function buildMatchFn(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(c)?findIndex$1(c,e=>e.test(o)):findKey$1(c,e=>e.test(o)),K;K=e.valueCallback?e.valueCallback(u):u,K=n.valueCallback?n.valueCallback(K):K;let Y=t.slice(o.length);return{value:K,rest:Y}}}function findKey$1(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function findIndex$1(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function buildMatchPatternFn(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let c=t.slice(i.length);return{value:o,rest:c}}}var matchOrdinalNumberPattern=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:e=>parseInt(e,10)}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:`wide`,parsePatterns:parseEraPatterns,defaultParseWidth:`any`}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:`wide`,parsePatterns:parseQuarterPatterns,defaultParseWidth:`any`,valueCallback:e=>e+1}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:`wide`,parsePatterns:parseMonthPatterns,defaultParseWidth:`any`}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:`wide`,parsePatterns:parseDayPatterns,defaultParseWidth:`any`}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:`any`,parsePatterns:parseDayPeriodPatterns,defaultParseWidth:`any`})},enUS={code:`en-US`,formatDistance,formatLong,formatRelative,localize,match,options:{weekStartsOn:0,firstWeekContainsDate:1}},defaultOptions$1={};function getDefaultOptions$1(){return defaultOptions$1}var daysInYear=365.2425,maxTime=10**8*24*60*60*1e3,minTime=-maxTime,millisecondsInWeek=6048e5,millisecondsInDay=864e5,millisecondsInMinute=6e4,millisecondsInHour=36e5,millisecondsInSecond=1e3,minutesInYear=525600,minutesInMonth=43200,minutesInDay=1440,secondsInHour=3600,secondsInDay=secondsInHour*24,secondsInWeek=secondsInDay*7,secondsInYear=secondsInDay*daysInYear,secondsInMonth=secondsInYear/12,secondsInQuarter=secondsInMonth*3,constructFromSymbol=Symbol.for(`constructDateFrom`);function constructFrom(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&constructFromSymbol in e?e[constructFromSymbol](t):e instanceof Date?new e.constructor(t):new Date(t)}function toDate$1(e,t){return constructFrom(t||e,e)}function getTimezoneOffsetInMilliseconds$1(e){let t=toDate$1(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-n}function normalizeDates(e,...t){let n=constructFrom.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function startOfDay(e,t){let n=toDate$1(e,t?.in);return n.setHours(0,0,0,0),n}function differenceInCalendarDays(e,t,n){let[r,i]=normalizeDates(n?.in,e,t),a=startOfDay(r),o=startOfDay(i),c=+a-getTimezoneOffsetInMilliseconds$1(a),u=+o-getTimezoneOffsetInMilliseconds$1(o);return Math.round((c-u)/millisecondsInDay)}function startOfYear(e,t){let n=toDate$1(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function getDayOfYear(e,t){let n=toDate$1(e,t?.in);return differenceInCalendarDays(n,startOfYear(n))+1}function startOfWeek(e,t){let n=getDefaultOptions$1(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=toDate$1(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function startOfISOWeek(e,t){return startOfWeek(e,{...t,weekStartsOn:1}
vendor: 5,138 bytes, line 2
2)}function getISOWeekYear(e,t){let n=toDate$1(e,t?.in),r=n.getFullYear(),i=constructFrom(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=startOfISOWeek(i),o=constructFrom(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let c=startOfISOWeek(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function startOfISOWeekYear(e,t){let n=getISOWeekYear(e,t),r=constructFrom(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),startOfISOWeek(r)}function getISOWeek(e,t){let n=toDate$1(e,t?.in),r=+startOfISOWeek(n)-startOfISOWeekYear(n);return Math.round(r/millisecondsInWeek)+1}function getWeekYear(e,t){let n=toDate$1(e,t?.in),r=n.getFullYear(),i=getDefaultOptions$1(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=constructFrom(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let c=startOfWeek(o,t),u=constructFrom(t?.in||e,0);u.setFullYear(r,0,a),u.setHours(0,0,0,0);let K=startOfWeek(u,t);return+n>=+c?r+1:+n>=+K?r:r-1}function startOfWeekYear(e,t){let n=getDefaultOptions$1(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=getWeekYear(e,t),a=constructFrom(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),startOfWeek(a,t)}function getWeek(e,t){let n=toDate$1(e,t?.in),r=+startOfWeek(n,t)-startOfWeekYear(n,t);return Math.round(r/millisecondsInWeek)+1}function addLeadingZeros$1(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var lightFormatters={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return addLeadingZeros$1(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):addLeadingZeros$1(n+1,2)},d(e,t){return addLeadingZeros$1(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return addLeadingZeros$1(e.getHours()%12||12,t.length)},H(e,t){return addLeadingZeros$1(e.getHours(),t.length)},m(e,t){return addLeadingZeros$1(e.getMinutes(),t.length)},s(e,t){return addLeadingZeros$1(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return addLeadingZeros$1(Math.trunc(r*10**(n-3)),t.length)}},dayPeriodEnum={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},formatters$1={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return lightFormatters.y(e,t)},Y:function(e,t,n,r){let i=getWeekYear(e,r),a=i>0?i:1-i;return t===`YY`?addLeadingZeros$1(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):addLeadingZeros$1(a,t.length)},R:function(e,t){return addLeadingZeros$1(getISOWeekYear(e),t.length)},u:function(e,t){return addLeadingZeros$1(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return addLeadingZeros$1(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return addLeadingZeros$1(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return lightFormatters.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return addLeadingZeros$1(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=getWeek(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):addLeadingZeros$1(i,t.length)},I:function(e,t,n){let r=getISOWeek(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):addLeadingZeros$1(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):lightFormatters.d(e,t)},D:function(e,t,n){let r=getDayOfYear(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):addLeadingZeros$1(r,t.length)},E:function(e,t,n){let r=e.getDay();
vendor: 6,826 bytes, line 2
2switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return addLeadingZeros$1(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return addLeadingZeros$1(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return addLeadingZeros$1(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?dayPeriodEnum.noon:r===0?dayPeriodEnum.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?dayPeriodEnum.evening:r>=12?dayPeriodEnum.afternoon:r>=4?dayPeriodEnum.morning:dayPeriodEnum.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return lightFormatters.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):lightFormatters.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):addLeadingZeros$1(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):addLeadingZeros$1(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):lightFormatters.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):lightFormatters.s(e,t)},S:function(e,t){return lightFormatters.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return formatTimezoneWithOptionalMinutes$1(r);case`XXXX`:case`XX`:return formatTimezone$1(r);default:return formatTimezone$1(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return formatTimezoneWithOptionalMinutes$1(r);case`xxxx`:case`xx`:return formatTimezone$1(r);default:return formatTimezone$1(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+formatTimezoneShort$1(r,`:`);default:return`GMT`+formatTimezone$1(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+formatTimezoneShort$1(r,`:`);default:return`GMT`+formatTimezone$1(r,`:`)}},t:function(e,t,n){return addLeadingZeros$1(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return addLeadingZeros$1(+e,t.length)}};function formatTimezoneShort$1(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+addLeadingZeros$1(a,2)}function formatTimezoneWithOptionalMinutes$1(e,t){return e%60==0?(e>0?`-`:`+`)+addLeadingZeros$1(Math.abs(e)/60,2):formatTimezone$1(e,t)}function formatTimezone$1(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=addLeadingZeros$1(Math.trunc(r/60),2),a=addLeadingZeros$1(r%60,2);return n+i+t+a}var dateLongFormatter=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},timeLongFormatter=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},dateTimeLongFormatter=(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return dateLongFormatter(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`})}return a.replace(`{{date}}`,dateLongFormatter(r,t)).replace(`{{time}}`,timeLongFormatter(i,t))},longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter},dayOfYearTokenRE=/^D+$/,weekYearTokenRE=/^Y+$/,throwTokens=[`D`,`DD`,`YY`,`YYYY`];function isProtectedDayOfYearToken(e){return dayOfYearTokenRE.test(e)}function isProtectedWeekYearToken(e){return weekYearTokenRE.test(e)}function warnOrThrowProtectedError(e,t,n){let r=message(e,t,n);if(console.warn(r),throwTokens.includes(e))throw RangeError(r)}function message(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function isDate$2(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function isValid(e){return!(!isDate$2(e)&&typeof e!=`number`||isNaN(+toDate$1(e)))}var formattingTokensRegExp$1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp$1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp$1=/^'([^]*?)'?$/,doubleQuoteRegExp$1=/''/g,unescapedLatinCharacterRegExp$1=/[a-zA-Z]/;
vendor: 1,244 bytes, line 2
2function format$1(e,t,n){let r=getDefaultOptions$1(),i=n?.locale??r.locale??enUS,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,c=toDate$1(e,n?.in);if(!isValid(c))throw RangeError(`Invalid time value`);let u=t.match(longFormattingTokensRegExp$1).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=longFormatters[t];return n(e,i.formatLong)}return e}).join(``).match(formattingTokensRegExp$1).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:cleanEscapedString$1(e)};if(formatters$1[t])return{isToken:!0,value:e};if(t.match(unescapedLatinCharacterRegExp$1))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(u=i.localize.preprocessor(c,u));let K={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return u.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&isProtectedWeekYearToken(a)||!n?.useAdditionalDayOfYearTokens&&isProtectedDayOfYearToken(a))&&warnOrThrowProtectedError(a,t,
2String(e));let o=formatters$1[a[0]];return o(c,a,i.localize,K)}).join(``)}function cleanEscapedString$1(e){let t=e.match(escapedStringRegExp$1);return t?t[1].replace(doubleQuoteRegExp$1,`'`):e}function addDays(e,t,n){let r=toDate$1(e,n?.in);return isNaN(t)?constructFrom(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function addMonths(e,t,n){let r=toDate$1(e,n?.in);if(isNaN(t))return constructFrom(n?.in||e,NaN);if(!t)return r;let i=r.getDate(),a=constructFrom(n?.in||e,r.getTime());return a.setMonth(r.getMonth()+t+1,0),i>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function setISOWeekYear(e,t,n){let r=toDate$1(e,n?.in),i=differenceInCalendarDays(r,startOfISOWeekYear(r,n)),a=constructFrom(n?.in||e,0);return a.setFullYear(t,0,4),a.setHours(0,0,0,0),r=startOfISOWeekYear(a),r.setDate(r.getDate()+i),r}function addISOWeekYears(e,t,n){return setISOWeekYear(e,getISOWeekYear(e,n)+t,n)}function addMinutes(e,t,n){let r=toDate$1(e,n?.in);return r.setTime(r.getTime()+t*millisecondsInMinute),r}function addYears(e,t,n){return addMonths(e,t*12,n)}function compareAsc(e,t){let n=+toDate$1(e)-toDate$1(t);return n<0?-1:n>0?1:n}function constructNow(e){return constructFrom(e,Date.now())}function differenceInCalendarYears(e,t,n){let[r,i]=normalizeDates(n?.in,e,t);return r.getFullYear()-i.getFullYear()}function getRoundingMethod(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function subISOWeekYears(e,t,n){return addISOWeekYears(e,-t,n)}function endOfDay(e,t){let n=toDate$1(e,t?.in);return n.setHours(23,59,59,999),n}function differenceInYears(e,t,n){let[r,i]=normalizeDates(n?.in,e,t),a=compareAsc(r,i),o=Math.abs(differenceInCalendarYears(r,i));r.setFullYear(1584),i.setFullYear(1584);let c=a*(o-+(compareAsc(r,i)===-a));return c===0?0:c}function formatDistanceStrict(e,t,n){let r=getDefaultOptions$1(),i=n?.locale??r.locale??enUS,a=compareAsc(e,t);if(isNaN(a))throw RangeError(`Invalid time value`);let o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[c,u]=normalizeDates(n?.in,...a>0?[t,e]:[e,t]),K=getRoundingMethod(n?.roundingMethod??`round`),Y=u.getTime()-c.getTime(),X=Y/millisecondsInMinute,ee=(Y-(getTimezoneOffsetInMilliseconds$1(u)-getTimezoneOffsetInMilliseconds$1(c)))/millisecondsInMinute,te=n?.unit,ce;if(ce=te||(X<1?`second`:X<60?`minute`:X<1440?`hour`:ee<43200?`day`:ee<525600?`month`:`year`),ce===`second`){let e=K(Y/1e3);return i.formatDistance(`xSeconds`,e,o)}if(ce===`minute`){let e=K(X);return i.formatDistance(`xMinutes`,e,o)}if(ce===`hour`){let e=K(X/60);return i.formatDistance(`xHours`,e,o)}if(ce===`day`){let e=K(ee/minutesInDay);return i.formatDistance(`xDays`,e,o)}if(ce===`month`){let e=K(ee/minutesInMonth);return e===12&&te!==`month`?i.formatDistance(`xYears`,1,o):i.formatDistance(`xMonths`,e,o)}{let e=K(ee/minutesInYear);return i.formatDistance(`xYears`,e,o)}}function formatDistanceToNowStrict(e,t){return formatDistanceStrict(e,constructNow(e),t)}function getDefaultOptions(){return Object.assign({},getDefaultOptions$1())}function getISODay(e,t){let n=toDate$1(e,t?.in).getDay();return n===0?7:n}function isAfter(e,t){return+toDate$1(e)>+toDate$1(t)}function isBefore(e,t){return+toDate$1(e)<+toDate$1(t)}function isFuture(e){return+toDate$1(e)>Date.now()}function transpose(e,t){let n=isConstructor(t)?new t(0):constructFrom(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function isConstructor(e){return typeof e==`function`&&e.prototype?.constructor===e}function _typeof$4(e){"@babel/helpers - typeof";return _typeof$4=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},_typeof$4(e)}function toPrimitive$1(e,t){if(_typeof$4(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(_typeof$4(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function toPropertyKey$1(e){var t=toPrimitive$1(e,`string`);return _typeof$4(t)==`symbol`?t:t+``}function _defineProperty$6(e,t,n){return(t=toPropertyKey$1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var TIMEZONE_UNIT_PRIORITY=10,Setter=class{constructor(){_defineProperty$6(this,`subPriority`,0)}validate(e,t){return!0}},ValueSetter=class extends Setter{constructor(e,t,n,r,i){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}
vendor: 23,330 bytes, line 2
2set(e,t,n){return this.setValue(e,t,this.value,n)}},DateTimezoneSetter=class extends Setter{constructor(e,t){super(),_defineProperty$6(this,`priority`,TIMEZONE_UNIT_PRIORITY),_defineProperty$6(this,`subPriority`,-1),this.context=e||(e=>constructFrom(t,e))}set(e,t){return t.timestampIsSet?e:constructFrom(e,transpose(e,this.context))}},Parser$1=class{run(e,t,n,r){let i=this.parse(e,t,n,r);return i?{setter:new ValueSetter(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,t,n){return!0}},EraParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,140),_defineProperty$6(this,`incompatibleTokens`,[`R`,`u`,`t`,`T`])}parse(e,t,n){switch(t){case`G`:case`GG`:case`GGG`:return n.era(e,{width:`abbreviated`})||n.era(e,{width:`narrow`});case`GGGGG`:return n.era(e,{width:`narrow`});default:return n.era(e,{width:`wide`})||n.era(e,{width:`abbreviated`})||n.era(e,{width:`narrow`})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}},numericPatterns={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},timezonePatterns={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function mapValue(e,t){return e&&{value:t(e.value),rest:e.rest}}function parseNumericPattern(e,t){let n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function parseTimezonePattern(e,t){let n=t.match(e);if(!n)return null;if(n[0]===`Z`)return{value:0,rest:t.slice(1)};let r=n[1]===`+`?1:-1,i=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:r*(i*millisecondsInHour+a*millisecondsInMinute+o*millisecondsInSecond),rest:t.slice(n[0].length)}}function parseAnyDigitsSigned(e){return parseNumericPattern(numericPatterns.anyDigitsSigned,e)}function parseNDigits(e,t){switch(e){case 1:return parseNumericPattern(numericPatterns.singleDigit,t);case 2:return parseNumericPattern(numericPatterns.twoDigits,t);case 3:return parseNumericPattern(numericPatterns.threeDigits,t);case 4:return parseNumericPattern(numericPatterns.fourDigits,t);default:return parseNumericPattern(RegExp(`^\\d{1,`+e+`}`),t)}}function parseNDigitsSigned(e,t){switch(e){case 1:return parseNumericPattern(numericPatterns.singleDigitSigned,t);case 2:return parseNumericPattern(numericPatterns.twoDigitsSigned,t);case 3:return parseNumericPattern(numericPatterns.threeDigitsSigned,t);case 4:return parseNumericPattern(numericPatterns.fourDigitsSigned,t);default:return parseNumericPattern(RegExp(`^-?\\d{1,`+e+`}`),t)}}function dayPeriodEnumToHours(e){switch(e){case`morning`:return 4;case`evening`:return 17;case`pm`:case`noon`:case`afternoon`:return 12;default:return 0}}function normalizeTwoDigitYear(e,t){let n=t>0,r=n?t:1-t,i;if(r<=50)i=e||100;else{let t=r+50,n=Math.trunc(t/100)*100,a=e>=t%100;i=e+n-(a?100:0)}return n?i:1-i}function isLeapYearIndex$2(e){return e%400==0||e%4==0&&e%100!=0}var YearParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,130),_defineProperty$6(this,`incompatibleTokens`,[`Y`,`R`,`u`,`w`,`I`,`i`,`e`,`c`,`t`,`T`])}parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:t===`yy`});switch(t){case`y`:return mapValue(parseNDigits(4,e),r);case`yo`:return mapValue(n.ordinalNumber(e,{unit:`year`}),r);default:return mapValue(parseNDigits(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){let r=e.getFullYear();if(n.isTwoDigitYear){let t=normalizeTwoDigitYear(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}let i=!(`era`in t)||t.era===1?n.year:1-n.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},LocalWeekYearParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,130),_defineProperty$6(this,`incompatibleTokens`,[`y`,`R`,`u`,`Q`,`q`,`M`,`L`,`I`,`d`,`D`,`i`,`t`,`T`])}parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:t===`YY`});switch(t){case`Y`:return mapValue(parseNDigits(4,e),r);case`Yo`:return mapValue(n.ordinalNumber(e,{unit:`year`}),r);default:return mapValue(parseNDigits(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){let i=getWeekYear(e,r);if(n.isTwoDigitYear){let t=normalizeTwoDigitYear(n.year,i);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),startOfWeek(e,r)}let a=!(`era`in t)||t.era===1?n.year:1-n.year;return e.setFullYear(a,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),startOfWeek(e,r)}},ISOWeekYearParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,130),_defineProperty$6(this,`incompatibleTokens`,[`G`,`y`,`Y`,`u`,`Q`,`q`,`M`,`L`,`w`,`d`,`D`,`e`,`c`,`t`,`T`])}parse(e,t){return parseNDigitsSigned(t===`R`?4:t.length,e)}set(e,t,n){let r=constructFrom(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),startOfISOWeek(r)}},ExtendedYearParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,130),_defineProperty$6(this,`incompatibleTokens`,[`G`,`y`,`Y`,`R`,`w`,`I`,`i`,`e`,`c`,`t`,`T`])}parse(e,t){return parseNDigitsSigned(t===`u`?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}},QuarterParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,120),_defineProperty$6(this,`incompatibleTokens`,[`Y`,`R`,`q`,`M`,`L`,`w`,`I`,`d`,`D`,`i`,`e`,`c`,`t`,`T`])}parse(e,t,n){switch(t){case`Q`:case`QQ`:return parseNDigits(t.length,e);case`Qo`:return n.ordinalNumber(e,{unit:`quarter`});case`QQQ`:return n.quarter(e,{width:`abbreviated`,context:`formatting`})||n.quarter(e,{width:`narrow`,context:`formatting`});case`QQQQQ`:return n.quarter(e,{width:`narrow`,context:`formatting`});default:return n.quarter(e,{width:`wide`,context:`formatting`})||n.quarter(e,{width:`abbreviated`,context:`formatting`})||n.quarter(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}},StandAloneQuarterParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,120),_defineProperty$6(this,`incompatibleTokens`,[`Y`,`R`,`Q`,`M`,`L`,`w`,`I`,`d`,`D`,`i`,`e`,`c`,`t`,`T`])}parse(e,t,n){switch(t){case`q`:case`qq`:return parseNDigits(t.length,e);case`qo`:return n.ordinalNumber(e,{unit:`quarter`});case`qqq`:return n.quarter(e,{width:`abbreviated`,context:`standalone`})||n.quarter(e,{width:`narrow`,context:`standalone`});case`qqqqq`:return n.quarter(e,{width:`narrow`,context:`standalone`});default:return n.quarter(e,{width:`wide`,context:`standalone`})||n.quarter(e,{width:`abbreviated`,context:`standalone`})||n.quarter(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}},MonthParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`incompatibleTokens`,[`Y`,`R`,`q`,`Q`,`L`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`]),_defineProperty$6(this,`priority`,110)}parse(e,t,n){let r=e=>e-1;switch(t){case`M`:return mapValue(parseNumericPattern(numericPatterns.month,e),r);case`MM`:return mapValue(parseNDigits(2,e),r);case`Mo`:return mapValue(n.ordinalNumber(e,{unit:`month`}),r);case`MMM`:return n.month(e,{width:`abbreviated`,context:`formatting`})||n.month(e,{width:`narrow`,context:`formatting`});case`MMMMM`:return n.month(e,{width:`narrow`,context:`formatting`});default:return n.month(e,{width:`wide`,context:`formatting`})||n.month(e,{width:`abbreviated`,context:`formatting`})||n.month(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},StandAloneMonthParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,110),_defineProperty$6(this,`incompatibleTokens`,[`Y`,`R`,`q`,`Q`,`M`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`])}parse(e,t,n){let r=e=>e-1;switch(t){case`L`:return mapValue(parseNumericPattern(numericPatterns.month,e),r);case`LL`:return mapValue(parseNDigits(2,e),r);case`Lo`:return mapValue(n.ordinalNumber(e,{unit:`month`}),r);case`LLL`:return n.month(e,{width:`abbreviated`,context:`standalone`})||n.month(e,{width:`narrow`,context:`standalone`});case`LLLLL`:return n.month(e,{width:`narrow`,context:`standalone`});default:return n.month(e,{width:`wide`,context:`standalone`})||n.month(e,{width:`abbreviated`,context:`standalone`})||n.month(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}};function setWeek(e,t,n){let r=toDate$1(e,n?.in),i=getWeek(r,n)-t;return r.setDate(r.getDate()-i*7),toDate$1(r,n?.in)}var LocalWeekParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,100),_defineProperty$6(this,`incompatibleTokens`,[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`i`,`t`,`T`])}parse(e,t,n){switch(t){case`w`:return parseNumericPattern(numericPatterns.week,e);case`wo`:return n.ordinalNumber(e,{unit:`week`});default:return parseNDigits(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return startOfWeek(setWeek(e,n,r),r)}};function setISOWeek(e,t,n){let r=toDate$1(e,n?.in),i=getISOWeek(r,n)-t;return r.setDate(r.getDate()-i*7),r}var ISOWeekParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,100),_defineProperty$6(this,`incompatibleTokens`,[`y`,`Y`,`u`,`q`,`Q`,`M`,`L`,`w`,`d`,`D`,`e`,`c`,`t`,`T`])}parse(e,t,n){switch(t){case`I`:return parseNumericPattern(numericPatterns.week,e);case`Io`:return n.ordinalNumber(e,{unit:`week`});default:return parseNDigits(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return startOfISOWeek(setISOWeek(e,n))}},DAYS_IN_MONTH$1=[31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP_YEAR$1=[31,29,31,30,31,30,31,31,30,31,30,31],DateParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,90),_defineProperty$6(this,`subPriority`,1),_defineProperty$6(this,`incompatibleTokens`,[`Y`,`R`,`q`,`Q`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`])}parse(e,t,n){switch(t){case`d`:return parseNumericPattern(numericPatterns.date,e);case`do`:return n.ordinalNumber(e,{unit:`date`});default:return parseNDigits(t.length,e)}}validate(e,t){let n=isLeapYearIndex$2(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=DAYS_IN_MONTH_LEAP_YEAR$1[r]:t>=1&&t<=DAYS_IN_MONTH$1[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}},DayOfYearParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,90),_defineProperty$6(this,`subpriority`,1),_defineProperty$6(this,`incompatibleTokens`,[`Y`,`R`,`q`,`Q`,`M`,`L`,`w`,`I`,`d`,`E`,`i`,`e`,`c`,`t`,`T`])}parse(e,t,n){switch(t){case`D`:case`DD`:return parseNumericPattern(numericPatterns.dayOfYear,e);case`Do`:return n.ordinalNumber(e,{unit:`date`});default:return parseNDigits(t.length,e)}}validate(e,t){return isLeapYearIndex$2(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}};function setDay(e,t,n){let r=getDefaultOptions$1(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=toDate$1(e,n?.in),o=a.getDay(),c=(t%7+7)%7,u=7-i;return addDays(a,t<0||t>6?t-(o+u)%7:(c+u)%7-(o+u)%7,n)}var DayParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,90),_defineProperty$6(this,`incompatibleTokens`,[`D`,`i`,`e`,`c`,`t`,`T`])}parse(e,t,n){switch(t){case`E`:case`EE`:case`EEE`:return n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});case`EEEEE`:return n.day(e,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});default:return n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=setDay(e,n,r),e.setHours(0,0,0,0),e}},LocalDayParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,90),_defineProperty$6(this,`incompatibleTokens`,[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`E`,`i`,`c`,`t`,`T`])}parse(e,t,n,r){let i=e=>{let t=Math.floor((e-1)/7)*7;return(e+r.weekStartsOn+6)%7+t};switch(t){case`e`:case`ee`:return mapValue(parseNDigits(t.length,e),i);case`eo`:return mapValue(n.ordinalNumber(e,{unit:`day`}),i);case`eee`:return n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});case`eeeee`:return n.day(e,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});default:return n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=setDay(e,n,r),e.setHours(0,0,0,0),e}},StandAloneLocalDayParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,90),_defineProperty$6(this,`incompatibleTokens`,[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`E`,`i`,`e`,`t`,`T`])}parse(e,t,n,r){let i=e=>{let t=Math.floor((e-1)/7)*7;return(e+r.weekStartsOn+6)%7+t};switch(t){case`c`:case`cc`:return mapValue(parseNDigits(t.length,e),i);case`co`:return mapValue(n.ordinalNumber(e,{unit:`day`}),i);case`ccc`:return n.day(e,{width:`abbreviated`,context:`standalone`})||n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`});case`ccccc`:return n.day(e,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`});default:return n.day(e,{width:`wide`,context:`standalone`})||n.day(e,{width:`abbreviated`,context:`standalone`})||n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=setDay(e,n,r),e.setHours(0,0,0,0),e}};function setISODay(e,t,n){let r=toDate$1(e,n?.in);return addDays(r,t-getISODay(r,n),n)}var ISODayParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,90),_defineProperty$6(this,`incompatibleTokens`,[`y`,`Y`,`u`,`q`,`Q`,`M`,`L`,`w`,`d`,`D`,`E`,`e`,`c`,`t`,`T`])}parse(e,t,n){let r=e=>e===0?7:e;switch(t){case`i`:case`ii`:return parseNDigits(t.length,e);case`io`:return n.ordinalNumber(e,{unit:`day`});case`iii`:return mapValue(n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r);case`iiiii`:return mapValue(n.day(e,{width:`narrow`,context:`formatting`}),r);case`iiiiii`:return mapValue(n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r);default:return mapValue(n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return e=setISODay(e,n),e.setHours(0,0,0,0),e}},AMPMParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,80),_defineProperty$6(this,`incompatibleTokens`,[`b`,`B`,`H`,`k`,`t`,`T`])}parse(e,t,n){switch(t){case`a`:case`aa`:case`aaa`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`aaaaa`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(dayPeriodEnumToHours(n),0,0,0),e}},AMPMMidnightParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,80),_defineProperty$6(this,`incompatibleTokens`,[`a`,`B`,`H`,`k`,`t`,`T`])}parse(e,t,n){switch(t){case`b`:case`bb`:case`bbb`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`bbbbb`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(dayPeriodEnumToHours(n),0,0,0),e}},DayPeriodParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,80),_defineProperty$6(this,`incompatibleTokens`,[`a`,`b`,`t`,`T`])}parse(e,t,n){switch(t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`BBBBB`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(dayPeriodEnumToHours(n),0,0,0),e}},Hour1to12Parser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,70),_defineProperty$6(this,`incompatibleTokens`,[`H`,`K`,`k`,`t`,`T`])}parse(e,t,n){switch(t){case`h`:return parseNumericPattern(numericPatterns.hour12h,e);case`ho`:return n.ordinalNumber(e,{unit:`hour`});default:return parseNDigits(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){let r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):!r&&n===12?e.setHours(0,0,0,0):e.setHours(n,0,0,0),e}},Hour0to23Parser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,70),_defineProperty$6(this,`incompatibleTokens`,[`a`,`b`,`h`,`K`,`k`,`t`,`T`])}parse(e,t,n){switch(t){case`H`:return parseNumericPattern(numericPatterns.hour23h,e);case`Ho`:return n.ordinalNumber(e,{unit:`hour`});default:return parseNDigits(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}},Hour0To11Parser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,70),_defineProperty$6(this,`incompatibleTokens`,[`h`,`H`,`k`,`t`,`T`])}parse(e,t,n){switch(t){case`K`:return parseNumericPattern(numericPatterns.hour11h,e);case`Ko`:return n.ordinalNumber(e,{unit:`hour`});default:return parseNDigits(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}},Hour1To24Parser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,70),_defineProperty$6(this,`incompatibleTokens`,[`a`,`b`,`h`,`H`,`K`,`t`,`T`])}parse(e,t,n){switch(t){case`k`:return parseNumericPattern(numericPatterns.hour24h,e);case`ko`:return n.ordinalNumber(e,{unit:`hour`});default:return parseNDigits(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){let r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}},MinuteParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,60),_defineProperty$6(this,`incompatibleTokens`,[`t`,`T`])}parse(e,t,n){switch(t){case`m`:return parseNumericPattern(numericPatterns.minute,e);case`mo`:return n.ordinalNumber(e,{unit:`minute`});default:return parseNDigits(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}},SecondParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,50),_defineProperty$6(this,`incompatibleTokens`,[`t`,`T`])}parse(e,t,n){switch(t){case`s`:return parseNumericPattern(numericPatterns.second,e);case`so`:return n.ordinalNumber(e,{unit:`second`});default:return parseNDigits(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}},FractionOfSecondParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,30),_defineProperty$6(this,`incompatibleTokens`,[`t`,`T`])}parse(e,t){return mapValue(parseNDigits(t.length,e),e=>Math.trunc(e*10**(-t.length+3)))}set(e,t,n){return e.setMilliseconds(n),e}},ISOTimezoneWithZParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,10),_defineProperty$6(this,`incompatibleTokens`,[`t`,`T`,`x`])}parse(e,t){switch(t){case`X`:return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,e);case`XX`:return parseTimezonePattern(timezonePatterns.basic,e);case`XXXX`:return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,e);case`XXXXX`:return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,e);default:return parseTimezonePattern(timezonePatterns.extended,e)}}set(e,t,n){return t.timestampIsSet?e:constructFrom(e,e.getTime()-getTimezoneOffsetInMilliseconds$1(e)-n)}},ISOTimezoneParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,10),_defineProperty$6(this,`incompatibleTokens`,[`t`,`T`,`X`])}parse(e,t){switch(t){case`x`:return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,e);case`xx`:return parseTimezonePattern(timezonePatterns.basic,e);case`xxxx`:return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,e);case`xxxxx`:return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,e);default:return parseTimezonePattern(timezonePatterns.extended,e)}}set(e,t,n){return t.timestampIsSet?e:constructFrom(e,e.getTime()-getTimezoneOffsetInMilliseconds$1(e)-n)}},TimestampSecondsParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,40),_defineProperty$6(this,`incompatibleTokens`,`*`)}parse(e){return parseAnyDigitsSigned(e)}set(e,t,n){return[constructFrom(e,n*1e3),{timestampIsSet:!0}]}},TimestampMillisecondsParser=class extends Parser$1{constructor(...e){super(...e),_defineProperty$6(this,`priority`,20),_defineProperty$6(this,`incompatibleTokens`,`*`)}parse(e){return parseAnyDigitsSigned(e)}set(e,t,n){return[constructFrom(e,n),{timestampIsSet:!0}]}},parsers={G:new EraParser,y:new YearParser,Y:new LocalWeekYearParser,R:new ISOWeekYearParser,u:new ExtendedYearParser,Q:new QuarterParser,q:new StandAloneQuarterParser,M:new MonthParser,L:new StandAloneMonthParser,w:new LocalWeekParser,I:new ISOWeekParser,d:new DateParser,D:new DayOfYearParser,E:new DayParser,e:new LocalDayParser,c:new StandAloneLocalDayParser,i:new ISODayParser,a:new AMPMParser,b:new AMPMMidnightParser,B:new DayPeriodParser,h:new Hour1to12Parser,H:new Hour0to23Parser,K:new Hour0To11Parser,k:new Hour1To24Parser,m:ne
vendor: 16,021 bytes, line 2
2w MinuteParser,s:new SecondParser,S:new FractionOfSecondParser,X:new ISOTimezoneWithZParser,x:new ISOTimezoneParser,t:new TimestampSecondsParser,T:new TimestampMillisecondsParser},formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp=/^'([^]*?)'?$/,doubleQuoteRegExp=/''/g,notWhitespaceRegExp=/\S/,unescapedLatinCharacterRegExp=/[a-zA-Z]/;function parse$4(e,t,n,r){let i=()=>constructFrom(r?.in||n,NaN),a=getDefaultOptions(),o=r?.locale??a.locale??enUS,c=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,u=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(!t)return e?i():toDate$1(n,r?.in);let K={firstWeekContainsDate:c,weekStartsOn:u,locale:o},Y=[new DateTimezoneSetter(r?.in,n)],X=t.match(longFormattingTokensRegExp).map(e=>{let t=e[0];if(t in longFormatters){let n=longFormatters[t];return n(e,o.formatLong)}return e}).join(``).match(formattingTokensRegExp),ee=[];for(let n of X){!r?.useAdditionalWeekYearTokens&&isProtectedWeekYearToken(n)&&warnOrThrowProtectedError(n,t,e),!r?.useAdditionalDayOfYearTokens&&isProtectedDayOfYearToken(n)&&warnOrThrowProtectedError(n,t,e);let a=n[0],c=parsers[a];if(c){let{incompatibleTokens:t}=c;if(Array.isArray(t)){let e=ee.find(e=>t.includes(e.token)||e.token===a);if(e)throw RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${n}\` at the same time`)}else if(c.incompatibleTokens===`*`&&ee.length>0)throw RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);ee.push({token:a,fullToken:n});let r=c.run(e,n,o.match,K);if(!r)return i();Y.push(r.setter),e=r.rest}else{if(a.match(unescapedLatinCharacterRegExp))throw RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");if(n===`''`?n=`'`:a===`'`&&(n=cleanEscapedString(n)),e.indexOf(n)===0)e=e.slice(n.length);else return i()}}if(e.length>0&&notWhitespaceRegExp.test(e))return i();let te=Y.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>Y.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]),ce=toDate$1(n,r?.in);if(isNaN(+ce))return i();let ue={};for(let e of te){if(!e.validate(ce,K))return i();let t=e.set(ce,ue,K);Array.isArray(t)?(ce=t[0],Object.assign(ue,t[1])):ce=t}return ce}function cleanEscapedString(e){return e.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp,`'`)}function isPast(e){return+toDate$1(e)<Date.now()}function parseISO(e,t){let n=()=>constructFrom(t?.in,NaN),r=t?.additionalDigits??2,i=splitDateString$1(e),a;if(i.date){let e=parseYear$1(i.date,r);a=parseDate$1(e.restDateString,e.year)}if(!a||isNaN(+a))return n();let o=+a,c=0,u;if(i.time&&(c=parseTime$1(i.time),isNaN(c)))return n();if(i.timezone){if(u=parseTimezone(i.timezone),isNaN(u))return n()}else{let e=new Date(o+c),n=toDate$1(0,t?.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return toDate$1(o+c+u,t?.in)}var patterns$2={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},dateRegex=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,timeRegex=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,timezoneRegex=/^([+-])(\d{2})(?::?(\d{2}))?$/;function splitDateString$1(e){let t={},n=e.split(patterns$2.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],patterns$2.timeZoneDelimiter.test(t.date)&&(t.date=e.split(patterns$2.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){let e=patterns$2.timezone.exec(r);e?(t.time=r.replace(e[1],``),t.timezone=e[1]):t.time=r}return t}function parseYear$1(e,t){let n=RegExp(`^(?:(\\d{4}|[+-]\\d{`+(4+t)+`})|(\\d{2}|[+-]\\d{`+(2+t)+`})$)`),r=e.match(n);if(!r)return{year:NaN,restDateString:``};let i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function parseDate$1(e,t){if(t===null)return new Date(NaN);let n=e.match(dateRegex);if(!n)return new Date(NaN);let r=!!n[4],i=parseDateUnit(n[1]),a=parseDateUnit(n[2])-1,o=parseDateUnit(n[3]),c=parseDateUnit(n[4]),u=parseDateUnit(n[5])-1;if(r)return validateWeekDate$1(t,c,u)?dayOfISOWeekYear$1(t,c,u):new Date(NaN);{let e=new Date(0);return!validateDate$1(t,a,o)||!validateDayOfYearDate$1(t,i)?new Date(NaN):(e.setUTCFullYear(t,a,Math.max(i,o)),e)}}function parseDateUnit(e){return e?parseInt(e):1}function parseTime$1(e){let t=e.match(timeRegex);if(!t)return NaN;let n=parseTimeUnit(t[1]),r=parseTimeUnit(t[2]),i=parseTimeUnit(t[3]);return validateTime$1(n,r,i)?n*millisecondsInHour+r*millisecondsInMinute+i*1e3:NaN}function parseTimeUnit(e){return e&&parseFloat(e.replace(`,`,`.`))||0}function parseTimezone(e){if(e===`Z`)return 0;let t=e.match(timezoneRegex);if(!t)return 0;let n=t[1]===`+`?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return validateTimezone$1(r,i)?n*(r*millisecondsInHour+i*millisecondsInMinute):NaN}function dayOfISOWeekYear$1(e,t,n){let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var daysInMonths=[31,null,31,30,31,30,31,31,30,31,30,31];function isLeapYearIndex$1(e){return e%400==0||e%4==0&&e%100!=0}function validateDate$1(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(daysInMonths[t]||(isLeapYearIndex$1(e)?29:28))}function validateDayOfYearDate$1(e,t){return t>=1&&t<=(isLeapYearIndex$1(e)?366:365)}function validateWeekDate$1(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function validateTime$1(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function validateTimezone$1(e,t){return t>=0&&t<=59}function tzIntlTimeZoneName(e,t,n){let r=getDefaultOptions(),i=getDTF(e,n.timeZone,n.locale??r.locale);return`formatToParts`in i?partsTimeZone(i,t):hackyTimeZone(i,t)}function partsTimeZone(e,t){let n=e.formatToParts(t);for(let e=n.length-1;e>=0;--e)if(n[e].type===`timeZoneName`)return n[e].value}function hackyTimeZone(e,t){let n=e.format(t).replace(/\u200E/g,``),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):``}function getDTF(e,t,n){return new Intl.DateTimeFormat(n?[n.code,`en-US`]:void 0,{timeZone:t,timeZoneName:e})}function tzTokenizeDate(e,t){let n=getDateTimeFormat(t);return`formatToParts`in n?partsOffset(n,e):hackyOffset(n,e)}var typeToPos={year:0,month:1,day:2,hour:3,minute:4,second:5};function partsOffset(e,t){try{let n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){let t=typeToPos[n[e].type];t!==void 0&&(r[t]=parseInt(n[e].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function hackyOffset(e,t){let n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}var dtfCache={},testDateFormatted=new Intl.DateTimeFormat(`en-US`,{hourCycle:`h23`,timeZone:`America/New_York`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}).format(new Date(`2014-06-25T04:00:00.123Z`)),hourCycleSupported=testDateFormatted===`06/25/2014, 00:00:00`||testDateFormatted===`‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00`;function getDateTimeFormat(e){return dtfCache[e]||(dtfCache[e]=hourCycleSupported?new Intl.DateTimeFormat(`en-US`,{hourCycle:`h23`,timeZone:e,year:`numeric`,month:`numeric`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}):new Intl.DateTimeFormat(`en-US`,{hour12:!1,timeZone:e,year:`numeric`,month:`numeric`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`})),dtfCache[e]}function newDateUTC(e,t,n,r,i,a,o){let c=new Date(0);return c.setUTCFullYear(e,t,n),c.setUTCHours(r,i,a,o),c}var MILLISECONDS_IN_HOUR$1=36e5,MILLISECONDS_IN_MINUTE$2=6e4,patterns$1={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function tzParseTimezone(e,t,n){if(!e)return 0;let r=patterns$1.timezoneZ.exec(e);if(r)return 0;let i,a;if(r=patterns$1.timezoneHH.exec(e),r)return i=parseInt(r[1],10),validateTimezone(i)?-(i*MILLISECONDS_IN_HOUR$1):NaN;if(r=patterns$1.timezoneHHMM.exec(e),r){i=parseInt(r[2],10);let e=parseInt(r[3],10);return validateTimezone(i,e)?(a=Math.abs(i)*MILLISECONDS_IN_HOUR$1+e*MILLISECONDS_IN_MINUTE$2,r[1]===`+`?-a:a):NaN}if(isValidTimezoneIANAString(e)){t=new Date(t||Date.now());let r=calcOffset(n?t:toUtcDate(t),e);return-(n?r:fixOffset(t,r,e))}return NaN}function toUtcDate(e){return newDateUTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function calcOffset(e,t){let n=tzTokenizeDate(e,t),r=newDateUTC(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),i=e.getTime(),a=i%1e3;return i-=a>=0?a:1e3+a,r-i}function fixOffset(e,t,n){let r=e.getTime()-t,i=calcOffset(new Date(r),n);if(t===i)return t;r-=i-t;let a=calcOffset(new Date(r),n);return i===a?i:Math.max(i,a)}function validateTimezone(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var validIANATimezoneCache={};function isValidTimezoneIANAString(e){if(validIANATimezoneCache[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),validIANATimezoneCache[e]=!0,!0}catch{return!1}}var MILLISECONDS_IN_MINUTE$1=6e4,formatters={X:function(e,t,n){let r=getTimeZoneOffset(n.timeZone,e);if(r===0)return`Z`;switch(t){case`X`:return formatTimezoneWithOptionalMinutes(r);case`XXXX`:case`XX`:return formatTimezone(r);default:return formatTimezone(r,`:`)}},x:function(e,t,n){let r=getTimeZoneOffset(n.timeZone,e);switch(t){case`x`:return formatTimezoneWithOptionalMinutes(r);case`xxxx`:case`xx`:return formatTimezone(r);default:return formatTimezone(r,`:`)}},O:function(e,t,n){let r=getTimeZoneOffset(n.timeZone,e);switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+formatTimezoneShort(r,`:`);default:return`GMT`+formatTimezone(r,`:`)}},z:function(e,t,n){switch(t){case`z`:case`zz`:case`zzz`:return tzIntlTimeZoneName(`short`,e,n);default:return tzIntlTimeZoneName(`long`,e,n)}}};function getTimeZoneOffset(e,t){let n=e?tzParseTimezone(e,t,!0)/MILLISECONDS_IN_MINUTE$1:t?.getTimezoneOffset()??0;if(Number.isNaN(n))throw RangeError(`Invalid time zone specified: `+e);return n}function addLeadingZeros(e,t){let n=e<0?`-`:``,r=Math.abs(e).toString();for(;r.length<t;)r=`0`+r;return n+r}function formatTimezone(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=addLeadingZeros(Math.floor(r/60),2),a=addLeadingZeros(Math.floor(r%60),2);return n+i+t+a}function formatTimezoneWithOptionalMinutes(e,t){return e%60==0?(e>0?`-`:`+`)+addLeadingZeros(Math.abs(e)/60,2):formatTimezone(e,t)}function formatTimezoneShort(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.floor(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+addLeadingZeros(a,2)}function getTimezoneOffsetInMilliseconds(e){let t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-t}var tzPattern=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_MINUTE=6e4,DEFAULT_ADDITIONAL_DIGITS=2,patterns={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:tzPattern};function toDate(e,t={}){if(arguments.length<1)throw TypeError(`1 argument required, but only `+arguments.length+` present`);if(e===null)return new Date(NaN);let n=t.additionalDigits==null?DEFAULT_ADDITIONAL_DIGITS:Number(t.additionalDigits);if(n!==2&&n!==1&&n!==0)throw RangeError(`additionalDigits must be 0, 1 or 2`);if(e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`)return new Date(e.getTime());if(typeof e==`number`||Object.prototype.toString.call(e)===`[object Number]`)return new Date(e);if(Object.prototype.toString.call(e)!==`[object String]`)return new Date(NaN);let r=splitDateString(e),{year:i,restDateString:a}=parseYear(r.date,n),o=parseDate(a,i);if(o===null||isNaN(o.getTime()))return new Date(NaN);if(o){let e=o.getTime(),n=0,i;if(r.time&&(n=parseTime(r.time),n===null||isNaN(n)))return new Date(NaN);if(r.timeZone||t.timeZone){if(i=tzParseTimezone(r.timeZone||t.timeZone,new Date(e+n)),isNaN(i))return new Date(NaN)}else i=getTimezoneOffsetInMilliseconds(new Date(e+n)),i=getTimezoneOffsetInMilliseconds(new Date(e+n+i));return new Date(e+n+i)}return new Date(NaN)}function splitDateString(e){let t={},n=patterns.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=patterns.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){let e=patterns.timeZone.exec(r);e?(t.time=r.replace(e[1],``),t.timeZone=e[1].trim()):t.time=r}return t}function parseYear(e,t){if(e){let n=patterns.YYY[t],r=patterns.YYYYY[t],i=patterns.YYYY.exec(e)||r.exec(e);if(i){let t=i[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(i=patterns.YY.exec(e)||n.exec(e),i){let t=i[1];return{year:parseInt(t,10)*100,restDateString:e.slice(t.length)}}}return{year:null}}function parseDate(e,t){if(t===null)return null;let n,r,i;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let a=patterns.MM.exec(e);if(a)return n=new Date(0),r=parseInt(a[1],10)-1,validateDate(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=patterns.DDD.exec(e),a){n=new Date(0);let e=parseInt(a[1],10);return validateDayOfYearDate(t,e)?(n.setUTCFullYear(t,0,e),n):new Date(NaN)}if(a=patterns.MMDD.exec(e),a){n=new Date(0),r=parseInt(a[1],10)-1;let e=parseInt(a[2],10);return validateDate(t,r,e)?(n.setUTCFullYear(t,r,e),n):new Date(NaN)}if(a=patterns.Www.exec(e),a)return i=parseInt(a[1],10)-1,validateWeekDate(i)?dayOfISOWeekYear(t,i):new Date(NaN);if(a=patterns.WwwD.exec(e),a){i=parseInt(a[1],10)-1;let e=parseInt(a[2],10)-1;return validateWeekDate(i,e)?dayOfISOWeekYear(t,i,e):new Date(NaN)}return null}function parseTime(e){let t,n,r=patterns.HH.exec(e);if(r)return t=parseFloat(r[1].replace(`,`,`.`)),validateTime(t)?t%24*MILLISECONDS_IN_HOUR:NaN;if(r=patterns.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(`,`,`.`)),validateTime(t,n)?t%24*MILLISECONDS_IN_HOUR+n*MILLISECONDS_IN_MINUTE:NaN;if(r=patterns.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);let e=parseFloat(r[3].replace(`,`,`.`));return validateTime(t,n,e)?t%24*MILLISECONDS_IN_HOUR+n*MILLISECONDS_IN_MINUTE+e*1e3:NaN}return null}function dayOfISOWeekYear(e,t,n){t||=0,n||=0;let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7,a=t*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP_YEAR=[31,29,31,30,31,30,31,31,30,31,30,31];function isLeapYearIndex(e){return e%400==0||e%4==0&&e%100!=0}function validateDate(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;let r=isLeapYearIndex(e);if(r&&n>DAYS_IN_MONTH_LEAP_YEAR[t]||!r&&n>DAYS_IN_MONTH[t])return!1}return!0}function validateDayOfYearDate(e,t){if(t<1)return!1;let n=isLeapYearIndex(e);return!(n&&t>366||!n&&t>365)}function validateWeekDate(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function validateTime(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}var tzFormattingTokensRegExp=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function format(e,t,n={}){t=String(t);let r=t.match(tzFormattingTokensRegExp);if(r){let i=toDate(n.originalDate||e,n);t=r.reduce(function(e,t){if(t[0]===`'`)return e;let r=e.indexOf(t),a=e[r-1]===`'`,o=e.replace(t,`'`+formatters[t[0]](i,t,n)+`'`);return a?o.substring(0,r-1)+o.substring(r+1):o},t)}
2return format$1(e,t,n)}function toZonedTime(e,t,n){e=toDate(e,n);let r=tzParseTimezone(t,e,!0),i=new Date(e.getTime()-r),a=new Date(0);return a.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),a.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),a}function formatInTimeZone(e,t,n,r){return r={...r,timeZone:t,originalDate:e},format(toZonedTime(e,t,{timeZone:r.timeZone}),n,r)}var INUMBER=`INUMBER`,IOP1=`IOP1`,IOP2=`IOP2`,IOP3=`IOP3`,IVAR=`IVAR`,IVARNAME=`IVARNAME`,IFUNCALL=`IFUNCALL`,IFUNDEF=`IFUNDEF`,IEXPR=`IEXPR`,IEXPREVAL=`IEXPREVAL`,IMEMBER=`IMEMBER`,IENDSTATEMENT=`IENDSTATEMENT`,IARRAY=`IARRAY`;function Instruction(e,t){this.type=e,this.value=t??0}Instruction.prototype.toString=function(){switch(this.type){case INUMBER:case IOP1:case IOP2:case IOP3:case IVAR:case IVARNAME:case IENDSTATEMENT:return this.value;case IFUNCALL:return`CALL `+this.value;case IFUNDEF:return`DEF `+this.value;case IARRAY:return`ARRAY `+this.value;case IMEMBER:return`.`+this.value;default:return`Invalid Instruction`}};function unaryInstruction(e){return new Instruction(IOP1,e)}function binaryInstruction(e){return new Instruction(IOP2,e)}function ternaryInstruction(e){return new Instruction(IOP3,e)}function simplify(e,t,n,r,i){for(var a=[],o=[],c,u,K,Y,X=0;X<e.length;X++){var ee=e[X],te=ee.type;if(te===INUMBER||te===IVARNAME)Array.isArray(ee.value)?a.push.apply(a,simplify(ee.value.map(function(e){return new Instruction(INUMBER,e)}).concat(new Instruction(IARRAY,ee.value.length)),t,n,r,i)):a.push(ee);else if(te===IVAR&&Object.hasOwn(i,ee.value))ee=new Instruction(INUMBER,i[ee.value]),a.push(ee);else if(te===IOP2&&a.length>1)u=a.pop(),c=a.pop(),Y=n[ee.value],ee=new Instruction(INUMBER,Y(c.value,u.value)),a.push(ee);else if(te===IOP3&&a.length>2)K=a.pop(),u=a.pop(),c=a.pop(),ee.value===`?`?a.push(c.value?u.value:K.value):(Y=r[ee.value],ee=new Instruction(INUMBER,Y(c.value,u.value,K.value)),a.push(ee));else if(te===IOP1&&a.length>0)c=a.pop(),Y=t[ee.value],ee=new Instruction(INUMBER,Y(c.value)),a.push(ee);else if(te===IEXPR){for(;a.length>0;)o.push(a.shift());o.push(new Instruction(IEXPR,simplify(ee.value,t,n,r,i)))}else if(te===IMEMBER&&a.length>0)c=a.pop(),a.push(new Instruction(INUMBER,c.value[ee.value]));else{for(;a.length>0;)o.push(a.shift());o.push(ee)}}for(;a.length>0;)o.push(a.shift());return o}function substitute(e,t,n){for(var r=[],i=0;i<e.length;i++){var a=e[i],o=a.type;if(o===IVAR&&a.value===t)for(var c=0;c<n.tokens.length;c++){var u=n.tokens[c],K=u.type===IOP1?unaryInstruction(u.value):u.type===IOP2?binaryInstruction(u.value):u.type===IOP3?ternaryInstruction(u.value):new Instruction(u.type,u.value);r.push(K)}else o===IEXPR?r.push(new Instruction(IEXPR,substitute(a.value,t,n))):r.push(a)}return r}function isAllowedFunc(e,t,n){for(var r in t.functions)if(t.functions[r]===e)return!0;if(e.__expr_eval_safe_def)return!0;for(var i in n)if(typeof n[i]==`object`&&n[i]!==null){for(var a in n[i])if(n[i][a]===e)return!0}return!1}function evaluate(e,t,n){var r=[],i,a,o,c,u,K;if(isExpressionEvaluator(e))return resolveExpression(e,n);for(var Y=e.length,X=0;X<Y;X++){var ee=e[X],te=ee.type;if(te===INUMBER||te===IVARNAME)r.push(ee.value);else if(te===IOP2)a=r.pop(),i=r.pop(),ee.value===`and`?r.push(i?!!evaluate(a,t,n):!1):ee.value===`or`?r.push(i?!0:!!evaluate(a,t,n)):ee.value===`=`?(c=t.binaryOps[ee.value],r.push(c(i,evaluate(a,t,n),n))):(c=t.binaryOps[ee.value],r.push(c(resolveExpression(i,n),resolveExpression(a,n))));else if(te===IOP3)o=r.pop(),a=r.pop(),i=r.pop(),ee.value===`?`?r.push(evaluate(i?a:o,t,n)):(c=t.ternaryOps[ee.value],r.push(c(resolveExpression(i,n),resolveExpression(a,n),resolveExpression(o,n))));else if(te===IVAR){if(/^__proto__|prototype|constructor$/.test(ee.value))throw Error(`prototype access detected`);if(ee.value in t.functions)r.push(t.functions[ee.value]);else if(ee.value in t.unaryOps&&t.parser.isOperatorEnabled(ee.value))r.push(t.unaryOps[ee.value]);else{var ce=n[ee.value];if(ce!==void 0){if(typeof ce==`function`&&!isAllowedFunc(ce,t,n))throw Error(`Variable references an unallowed function: `+ee.value);r.push(ce)}else throw Error(`undefined variable: `+ee.value)}}else if(te===IOP1)i=r.pop(),c=t.unaryOps[ee.value],r.push(c(resolveExpression(i,n)));else if(te===IFUNCALL){for(K=ee.value,u=[];K-->0;)u.unshift(resolveExpression(r.pop(),n));
2if(c=r.pop(),!isAllowedFunc(c,t,n))throw Error(`Is not an allowed function.`);if(c.apply&&c.call)r.push(c.apply(void 0,u));else throw Error(c+` is not a function`)}else if(te===IFUNDEF)r.push((function(){for(var e=r.pop(),i=[],a=ee.value;a-->0;)i.unshift(r.pop());var o=r.pop(),c=function(){for(var r=Object.assign({},n),a=0,o=i.length;a<o;a++)r[i[a]]=arguments[a];return evaluate(e,t,r)};return Object.defineProperty(c,"name",{value:o,writable:!1}),Object.defineProperty(c,"__expr_eval_safe_def",{value:!0,writable:!1}),n[o]=c,c})());else if(te===IEXPR)r.push(createExpressionEvaluator(ee,t));else if(te===IEXPREVAL)r.push(ee);else if(te===IMEMBER)i=r.pop(),r.push(i[ee.value]);else if(te===IENDSTATEMENT)r.pop();else if(te===IARRAY){for(K=ee.value,u=[];K-->0;)u.unshift(r.pop());r.push(u)}else throw Error(`invalid Expression`)}if(r.length>1)throw Error(`invalid Expression (parity)`);return r[0]===0?0:resolveExpression(r[0],n)}function createExpressionEvaluator(e,t,n){return isExpressionEvaluator(e)?e:{type:IEXPREVAL,value:function(n){return evaluate(e.value,t,n)}}}function isExpressionEvaluator(e){return e&&e.type===IEXPREVAL}function resolveExpression(e,t){return isExpressionEvaluator(e)?e.value(t):e}function expressionToString(e,t){for(var n=[],r,i,a,o,c,u,K=0;K<e.length;K++){var Y=e[K],X=Y.type;if(X===INUMBER)typeof Y.value==`number`&&Y.value<0?n.push(`(`+Y.value+`)`):Array.isArray(Y.value)?n.push(`[`+Y.value.map(escapeValue).join(`, `)+`]`):n.push(escapeValue(Y.value));else if(X===IOP2)i=n.pop(),r=n.pop(),o=Y.value,t?o===`^`?n.push(`Math.pow(`+r+`, `+i+`)`):o===`and`?n.push(`(!!`+r+` && !!`+i+`)`):o===`or`?n.push(`(!!`+r+` || !!`+i+`)`):o===`||`?n.push(`(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }((`+r+`),(`+i+`)))`):o===`==`?n.push(`(`+r+` === `+i+`)`):o===`!=`?n.push(`(`+r+` !== `+i+`)`):o===`[`?n.push(r+`[(`+i+`) | 0]`):n.push(`(`+r+` `+o+` `+i+`)`):o===`[`?n.push(r+`[`+i+`]`):n.push(`(`+r+` `+o+` `+i+`)`);else if(X===IOP3){if(a=n.pop(),i=n.pop(),r=n.pop(),o=Y.value,o===`?`)n.push(`(`+r+` ? `+i+` : `+a+`)`);else throw Error(`invalid Expression`)}else if(X===IVAR||X===IVARNAME)n.push(Y.value);else if(X===IOP1)r=n.pop(),o=Y.value,o===`-`||o===`+`?n.push(`(`+o+r+`)`):t?o===`not`?n.push(`(!`+r+`)`):o===`!`?n.push(`fac(`+r+`)`):n.push(o+`(`+r+`)`):o===`!`?n.push(`(`+r+`!)`):n.push(`(`+o+` `+r+`)`);else if(X===IFUNCALL){for(u=Y.value,c=[];u-->0;)c.unshift(n.pop());o=n.pop(),n.push(o+`(`+c.join(`, `)+`)`)}else if(X===IFUNDEF){for(i=n.pop(),u=Y.value,c=[];u-->0;)c.unshift(n.pop());r=n.pop(),t?n.push(`(`+r+` = function(`+c.join(`, `)+`) { return `+i+` })`):n.push(`(`+r+`(`+c.join(`, `)+`) = `+i+`)`)}else if(X===IMEMBER)r=n.pop(),n.push(r+`.`+Y.value);else if(X===IARRAY){for(u=Y.value,c=[];u-->0;)c.unshift(n.pop());n.push(`[`+c.join(`, `)+`]`)}else if(X===IEXPR)n.push(`(`+expressionToString(Y.value,t)+`)`);else if(X!==IENDSTATEMENT)throw Error(`invalid Expression`)}return n.length>1&&(n=t?[n.join(`,`)]:[n.join(`;`)]),String(n[0])}function escapeValue(e){return typeof e==`string`?JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`):e}function contains(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return!0;return!1}function getSymbols$1(e,t,n){n||={};for(var r=!!n.withMembers,i=null,a=0;a<e.length;a++){var o=e[a];o.type===IVAR||o.type===IVARNAME?!r&&!contains(t,o.value)?t.push(o.value):(i===null||contains(t,i)||t.push(i),i=o.value):o.type===IMEMBER&&r&&i!==null?i+=`.`+o.value:o.type===IEXPR?getSymbols$1(o.value,t,n):i!==null&&(contains(t,i)||t.push(i),i=null)}i!==null&&!contains(t,i)&&t.push(i)}function Expression(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}Expression.prototype.simplify=function(e){return e||={},new Expression(simplify(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)},Expression.prototype.substitute=function(e,t){return t instanceof Expression||(t=this.parser.parse(String(t))),new Expression(substitute(this.tokens,e,t),this.parser)},Expression.prototype.evaluate=function(e){return e||={},evaluate(this.tokens,this,e)},Expression.prototype.toString=function(){return expressionToString(this.tokens,!1)},Expression.prototype.symbols=function(e){e||={};var t=[];
2return getSymbols$1(this.tokens,t,e),t},Expression.prototype.variables=function(e){e||={};var t=[];getSymbols$1(this.tokens,t,e);var n=this.functions;return t.filter(function(e){return!(e in n)})},Expression.prototype.toJSFunction=function(e,t){var n=this,r=Function(e,`with(this.functions) with (this.ternaryOps) with (this.binaryOps) with (this.unaryOps) { return `+expressionToString(this.simplify(t).tokens,!0)+`; }`);return function(){return r.apply(n,arguments)}};var TEOF=`TEOF`,TOP=`TOP`,TNUMBER=`TNUMBER`,TSTRING=`TSTRING`,TPAREN=`TPAREN`,TBRACKET=`TBRACKET`,TCOMMA=`TCOMMA`,TNAME=`TNAME`,TSEMICOLON=`TSEMICOLON`;function Token(e,t,n){this.type=e,this.value=t,this.index=n}Token.prototype.toString=function(){return this.type+`: `+this.value};function TokenStream(e,t){this.pos=0,this.current=null,this.unaryOps=e.unaryOps,this.binaryOps=e.binaryOps,this.ternaryOps=e.ternaryOps,this.consts=e.consts,this.expression=t,this.savedPosition=0,this.savedCurrent=null,this.options=e.options,this.parser=e}TokenStream.prototype.newToken=function(e,t,n){return new Token(e,t,n??this.pos)},TokenStream.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},TokenStream.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},TokenStream.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(TEOF,`EOF`);if(this.isWhitespace()||this.isComment())return this.next();if(this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst()||this.isName())return this.current;this.parseError(`Unknown character "`+this.expression.charAt(this.pos)+`"`)},TokenStream.prototype.isString=function(){var e=!1,t=this.pos,n=this.expression.charAt(t);if(n===`'`||n===`"`)for(var r=this.expression.indexOf(n,t+1);r>=0&&this.pos<this.expression.length;){if(this.pos=r+1,this.expression.charAt(r-1)!==`\\`){var i=this.expression.substring(t+1,r);this.current=this.newToken(TSTRING,this.unescape(i),t),e=!0;break}r=this.expression.indexOf(n,r+1)}return e},TokenStream.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return e===`(`||e===`)`?(this.current=this.newToken(TPAREN,e),this.pos++,!0):!1},TokenStream.prototype.isBracket=function(){var e=this.expression.charAt(this.pos);return(e===`[`||e===`]`)&&this.isOperatorEnabled(`[`)?(this.current=this.newToken(TBRACKET,e),this.pos++,!0):!1},TokenStream.prototype.isComma=function(){return this.expression.charAt(this.pos)===`,`&&(this.current=this.newToken(TCOMMA,`,`),this.pos++,!0)},TokenStream.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===`;`&&(this.current=this.newToken(TSEMICOLON,`;`),this.pos++,!0)},TokenStream.prototype.isConst=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var n=this.expression.charAt(t);if(n.toUpperCase()===n.toLowerCase()&&(t===this.pos||n!==`_`&&n!==`.`&&(n<`0`||n>`9`)))break}if(t>e){var r=this.expression.substring(e,t);if(r in this.consts)return this.current=this.newToken(TNUMBER,this.consts[r]),this.pos+=r.length,!0}return!1},TokenStream.prototype.isNamedOp=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var n=this.expression.charAt(t);if(n.toUpperCase()===n.toLowerCase()&&(t===this.pos||n!==`_`&&(n<`0`||n>`9`)))break}if(t>e){var r=this.expression.substring(e,t);if(this.isOperatorEnabled(r)&&(r in this.binaryOps||r in this.unaryOps||r in this.ternaryOps))return this.current=this.newToken(TOP,r),this.pos+=r.length,!0}return!1},TokenStream.prototype.isName=function(){for(var e=this.pos,t=e,n=!1;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()){if(t===this.pos&&(r===`$`||r===`_`)){r===`_`&&(n=!0);continue}if(t===this.pos||!n||r!==`_`&&(r<`0`||r>`9`))break}else n=!0}if(n){var i=this.expression.substring(e,t);return this.current=this.newToken(TNAME,i),this.pos+=i.length,!0}return!1},TokenStream.prototype.isWhitespace=function(){for(var e=!1,t=this.expression.charAt(this.pos);(t===` `||t===`	`||t===`
3`||t===`\r`)&&(e=!0,this.pos++,!(this.pos>=this.expression.length));)t=this.expression.charAt(this.pos);return e};var codePointPattern=/^[0-9a-f]{4}$/i;TokenStream.prototype.unescape=function(e){var t=e.indexOf(`\\`);if(t<0)return e;for(var n=e.substring(0,t);t>=0;){var r=e.charAt(++t);switch(r){case`'`:n+=`'`;break;case`"`:n+=`"`;break;case`\\`:n+=`\\`;break;case`/`:n+=`/`;break;case`b`:n+=`\b`;break;case`f`:n+=`\f`;break;case`n`:n+=`
4`;break;case`r`:n+=`\r`;break;case`t`:n+=`	`;break;case`u`:var i=e.substring(t+1,t+5);codePointPattern.test(i)||this.parseError(`Illegal escape sequence: \\u`+i),n+=String.fromCharCode(parseInt(i,16)),t+=4;break;default:throw this.parseError(`Illegal escape sequence: "\\`+r+`"`)}++t;var a=e.indexOf(`\\`,t);
4n+=e.substring(t,a<0?e.length:a),t=a}return n},TokenStream.prototype.isComment=function(){return this.expression.charAt(this.pos)===`/`&&this.expression.charAt(this.pos+1)===`*`&&(this.pos=this.expression.indexOf(`*/`,this.pos)+2,this.pos===1&&(this.pos=this.expression.length),!0)},TokenStream.prototype.isRadixInteger=function(){var e=this.pos;if(e>=this.expression.length-2||this.expression.charAt(e)!==`0`)return!1;++e;var t,n;if(this.expression.charAt(e)===`x`)t=16,n=/^[0-9a-f]$/i,++e;else if(this.expression.charAt(e)===`b`)t=2,n=/^[01]$/i,++e;else return!1;for(var r=!1,i=e;e<this.expression.length;){var a=this.expression.charAt(e);if(n.test(a))e++,r=!0;else break}return r&&(this.current=this.newToken(TNUMBER,parseInt(this.expression.substring(i,e),t)),this.pos=e),r},TokenStream.prototype.isNumber=function(){for(var e=!1,t=this.pos,n=t,r=t,i=!1,a=!1,o;t<this.expression.length&&(o=this.expression.charAt(t),o>=`0`&&o<=`9`||!i&&o===`.`);)o===`.`?i=!0:a=!0,t++,e=a;if(e&&(r=t),o===`e`||o===`E`){t++;for(var c=!0,u=!1;t<this.expression.length;){if(o=this.expression.charAt(t),c&&(o===`+`||o===`-`))c=!1;else if(o>=`0`&&o<=`9`)u=!0,c=!1;else break;t++}u||(t=r)}return e?(this.current=this.newToken(TNUMBER,parseFloat(this.expression.substring(n,t))),this.pos=t):this.pos=r,e},TokenStream.prototype.isOperator=function(){var e=this.pos,t=this.expression.charAt(this.pos);if(t===`+`||t===`-`||t===`*`||t===`/`||t===`%`||t===`^`||t===`?`||t===`:`||t===`.`)this.current=this.newToken(TOP,t);else if(t===`∙`||t===`•`)this.current=this.newToken(TOP,`*`);else if(t===`>`)this.expression.charAt(this.pos+1)===`=`?(this.current=this.newToken(TOP,`>=`),this.pos++):this.current=this.newToken(TOP,`>`);else if(t===`<`)this.expression.charAt(this.pos+1)===`=`?(this.current=this.newToken(TOP,`<=`),this.pos++):this.current=this.newToken(TOP,`<`);else if(t===`|`){if(this.expression.charAt(this.pos+1)===`|`)this.current=this.newToken(TOP,`||`),this.pos++;else return!1}else if(t===`=`)this.expression.charAt(this.pos+1)===`=`?(this.current=this.newToken(TOP,`==`),this.pos++):this.current=this.newToken(TOP,t);else if(t===`!`)this.expression.charAt(this.pos+1)===`=`?(this.current=this.newToken(TOP,`!=`),this.pos++):this.current=this.newToken(TOP,t);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=e,!1)},TokenStream.prototype.isOperatorEnabled=function(e){return this.parser.isOperatorEnabled(e)},TokenStream.prototype.getCoordinates=function(){var e=0,t,n=-1;do e++,t=this.pos-n,n=this.expression.indexOf(`
5`,n+1);while(n>=0&&n<this.pos);return{line:e,column:t}},TokenStream.prototype.parseError=function(e){var t=this.getCoordinates();throw Error(`parse error [`+t.line+`:`+t.column+`]: `+e)};function ParserState(e,t,n){this.parser=e,this.tokens=t,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=n.allowMemberAccess!==!1}ParserState.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},ParserState.prototype.tokenMatches=function(e,t){return t===void 0?!0:Array.isArray(t)?contains(t,e.value):typeof t==`function`?t(e):e.value===t},ParserState.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},ParserState.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},ParserState.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},ParserState.prototype.expect=function(e,t){if(!this.accept(e,t)){var n=this.tokens.getCoordinates();throw Error(`parse error [`+n.line+`:`+n.column+`]: Expected `+(t||e))}},ParserState.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function n(e){return e.value in t}if(this.accept(TNAME)||this.accept(TOP,n))e.push(new Instruction(IVAR,this.current.value));else if(this.accept(TNUMBER))e.push(new Instruction(INUMBER,this.current.value));else if(this.accept(TSTRING))e.push(new Instruction(INUMBER,this.current.value));else if(this.accept(TPAREN,`(`))this.parseExpression(e),this.expect(TPAREN,`)`);else if(this.accept(TBRACKET,`[`)){if(this.accept(TBRACKET,`]`))e.push(new Instruction(IARRAY,0));else{var r=this.parseArrayList(e);e.push(new Instruction(IARRAY,r))}}else throw Error(`unexpected `+this.nextToken)},ParserState.prototype.parseExpression=function(e){var t=[];
5this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},ParserState.prototype.pushExpression=function(e,t){for(var n=0,r=t.length;n<r;n++)e.push(t[n])},ParserState.prototype.parseUntilEndStatement=function(e,t){return this.accept(TSEMICOLON)?(this.nextToken&&this.nextToken.type!==TEOF&&(this.nextToken.type!==TPAREN||this.nextToken.value!==`)`)&&t.push(new Instruction(IENDSTATEMENT)),this.nextToken.type!==TEOF&&this.parseExpression(t),e.push(new Instruction(IEXPR,t)),!0):!1},ParserState.prototype.parseArrayList=function(e){for(var t=0;!this.accept(TBRACKET,`]`);)for(this.parseExpression(e),++t;this.accept(TCOMMA);)this.parseExpression(e),++t;return t},ParserState.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(TOP,`=`);){var t=e.pop(),n=[],r=e.length-1;if(t.type===IFUNCALL){if(!this.tokens.isOperatorEnabled(`()=`))throw Error(`function definition is not permitted`);for(var i=0,a=t.value+1;i<a;i++){var o=r-i;e[o].type===IVAR&&(e[o]=new Instruction(IVARNAME,e[o].value))}this.parseVariableAssignmentExpression(n),e.push(new Instruction(IEXPR,n)),e.push(new Instruction(IFUNDEF,t.value));continue}if(t.type!==IVAR&&t.type!==IMEMBER)throw Error(`expected variable for assignment`);this.parseVariableAssignmentExpression(n),e.push(new Instruction(IVARNAME,t.value)),e.push(new Instruction(IEXPR,n)),e.push(binaryInstruction(`=`))}},ParserState.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(TOP,`?`);){var t=[],n=[];this.parseConditionalExpression(t),this.expect(TOP,`:`),this.parseConditionalExpression(n),e.push(new Instruction(IEXPR,t)),e.push(new Instruction(IEXPR,n)),e.push(ternaryInstruction(`?`))}},ParserState.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(TOP,`or`);){var t=[];this.parseAndExpression(t),e.push(new Instruction(IEXPR,t)),e.push(binaryInstruction(`or`))}},ParserState.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(TOP,`and`);){var t=[];this.parseComparison(t),e.push(new Instruction(IEXPR,t)),e.push(binaryInstruction(`and`))}};var COMPARISON_OPERATORS=[`==`,`!=`,`<`,`<=`,`>=`,`>`,`in`];ParserState.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(TOP,COMPARISON_OPERATORS);){var t=this.current;this.parseAddSub(e),e.push(binaryInstruction(t.value))}};var ADD_SUB_OPERATORS=[`+`,`-`,`||`];ParserState.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(TOP,ADD_SUB_OPERATORS);){var t=this.current;this.parseTerm(e),e.push(binaryInstruction(t.value))}};var TERM_OPERATORS=[`*`,`/`,`%`];ParserState.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(TOP,TERM_OPERATORS);){var t=this.current;this.parseFactor(e),e.push(binaryInstruction(t.value))}},ParserState.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function n(e){return e.value in t}if(this.save(),this.accept(TOP,n)){if(this.current.value!==`-`&&this.current.value!==`+`){if(this.nextToken.type===TPAREN&&this.nextToken.value===`(`){this.restore(),this.parseExponential(e);return}if(this.nextToken.type===TSEMICOLON||this.nextToken.type===TCOMMA||this.nextToken.type===TEOF||this.nextToken.type===TPAREN&&this.nextToken.value===`)`){this.restore(),this.parseAtom(e);return}}var r=this.current;this.parseFactor(e),e.push(unaryInstruction(r.value))}else this.parseExponential(e)},ParserState.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(TOP,`^`);)this.parseFactor(e),e.push(binaryInstruction(`^`))},ParserState.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(TOP,`!`);)e.push(unaryInstruction(`!`))},ParserState.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function n(e){return e.value in t}if(this.accept(TOP,n)){var r=this.current;this.parseAtom(e),e.push(unaryInstruction(r.value))}
5else for(this.parseMemberExpression(e);this.accept(TPAREN,`(`);)if(this.accept(TPAREN,`)`))e.push(new Instruction(IFUNCALL,0));else{var i=this.parseArgumentList(e);e.push(new Instruction(IFUNCALL,i))}},ParserState.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(TPAREN,`)`);)for(this.parseExpression(e),++t;this.accept(TCOMMA);)this.parseExpression(e),++t;return t},ParserState.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(TOP,`.`)||this.accept(TBRACKET,`[`);){var t=this.current;if(t.value===`.`){if(!this.allowMemberAccess)throw Error(`unexpected ".", member access is not permitted`);this.expect(TNAME),e.push(new Instruction(IMEMBER,this.current.value))}else if(t.value===`[`){if(!this.tokens.isOperatorEnabled(`[`))throw Error(`unexpected "[]", arrays are disabled`);this.parseExpression(e),this.expect(TBRACKET,`]`),e.push(binaryInstruction(`[`))}else throw Error(`unexpected symbol: `+t.value)}};function add(e,t){return Number(e)+Number(t)}function sub(e,t){return e-t}function mul(e,t){return e*t}function div(e,t){return e/t}function mod(e,t){return e%t}function concat(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):``+e+t}function equal(e,t){return e===t}function notEqual(e,t){return e!==t}function greaterThan(e,t){return e>t}function lessThan(e,t){return e<t}function greaterThanEqual(e,t){return e>=t}function lessThanEqual(e,t){return e<=t}function andOperator(e,t){return!!(e&&t)}function orOperator(e,t){return!!(e||t)}function inOperator(e,t){return contains(t,e)}function sinh(e){return(Math.exp(e)-Math.exp(-e))/2}function cosh(e){return(Math.exp(e)+Math.exp(-e))/2}function tanh(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function asinh(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function acosh(e){return Math.log(e+Math.sqrt(e*e-1))}function atanh(e){return Math.log((1+e)/(1-e))/2}function log10(e){return Math.log(e)*Math.LOG10E}function neg(e){return-e}function not(e){return!e}function trunc(e){return e<0?Math.ceil(e):Math.floor(e)}function random(e){return Math.random()*(e||1)}function factorial(e){return gamma(e+1)}function isInteger$2(e){return isFinite(e)&&e===Math.round(e)}var GAMMA_G=4.7421875,GAMMA_P=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function gamma(e){var t,n;if(isInteger$2(e)){if(e<=0)return isFinite(e)?1/0:NaN;if(e>171)return 1/0;for(var r=e-2,i=e-1;r>1;)i*=r,r--;return i===0&&(i=1),i}if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*gamma(1-e));if(e>=171.35)return 1/0;if(e>85){var a=e*e,o=a*e,c=o*e,u=c*e;return Math.sqrt(2*Math.PI/e)*(e/Math.E)**e*(1+1/(12*e)+1/(288*a)-139/(51840*o)-571/(2488320*c)+163879/(209018880*u)+5246819/(75246796800*u*e))}--e,n=GAMMA_P[0];for(var K=1;K<GAMMA_P.length;++K)n+=GAMMA_P[K]/(e+K);return t=e+GAMMA_G+.5,Math.sqrt(2*Math.PI)*t**+(e+.5)*Math.exp(-t)*n}function stringOrArrayLength(e){return Array.isArray(e)?e.length:String(e).length}function hypot(){for(var e=0,t=0,n=0;n<arguments.length;n++){var r=Math.abs(arguments[n]),i;t<r?(i=t/r,e=e*i*i+1,t=r):r>0?(i=r/t,e+=i*i):e+=r}return t===1/0?1/0:t*Math.sqrt(e)}function condition(e,t,n){return e?t:n}function roundTo(e,t){return t===void 0||+t==0?Math.round(e):(e=+e,t=-+t,isNaN(e)||typeof t!=`number`||t%1!=0?NaN:(e=e.toString().split(`e`),e=Math.round(+(e[0]+`e`+(e[1]?+e[1]-t:-t))),e=e.toString().split(`e`),+(e[0]+`e`+(e[1]?+e[1]+t:t))))}function setVar(e,t,n){return n&&(n[e]=t),t}function arrayIndex(e,t){return e[t|0]}function max$1(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function min$1(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function arrayMap$1(e,t){if(typeof e!=`function`)throw Error(`First argument to map is not a function`);if(!Array.isArray(t))throw Error(`Second argument to map is not an array`);return t.map(function(t,n){return e(t,n)})}function arrayFold(e,t,n){if(typeof e!=`function`)throw Error(`First argument to fold is not a function`);if(!Array.isArray(n))throw Error(`Second argument to fold is not an array`);return n.reduce(function(t,n,r){return e(t,n,r)},t)}function arrayFilter$1(e,t){if(typeof e!=`function`)throw Error(`First argument to filter is not a function`);if(!Array.isArray(t))throw Error(`Second argument to filter is not an array`);return t.filter(function(t,n){return e(t,n)})}function stringOrArrayIndexOf(e,t){if(!(Array.isArray(t)||typeof t==`string`))throw Error(`Second argument to indexOf is not a string or array`);return t.indexOf(e)}function arrayJoin(e,t){if(!Array.isArray(t))throw Error(`Second argument to join is not an array`);return t.join(e)}function sign(e){return(e>0)-(e<0)||+e}var ONE_THIRD=1/3;
5function cbrt(e){return e<0?-((-e)**+ONE_THIRD):e**+ONE_THIRD}function expm1(e){return Math.exp(e)-1}function log1p(e){return Math.log(1+e)}function log2(e){return Math.log(e)/Math.LN2}function sum$1(e){if(!Array.isArray(e))throw Error(`Sum argument is not an array`);return e.reduce(function(e,t){return e+Number(t)},0)}function Parser(e){this.options=e||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||sinh,cosh:Math.cosh||cosh,tanh:Math.tanh||tanh,asinh:Math.asinh||asinh,acosh:Math.acosh||acosh,atanh:Math.atanh||atanh,sqrt:Math.sqrt,cbrt:Math.cbrt||cbrt,log:Math.log,log2:Math.log2||log2,ln:Math.log,lg:Math.log10||log10,log10:Math.log10||log10,expm1:Math.expm1||expm1,log1p:Math.log1p||log1p,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||trunc,"-":neg,"+":Number,exp:Math.exp,not,length:stringOrArrayLength,"!":factorial,sign:Math.sign||sign},this.binaryOps={"+":add,"-":sub,"*":mul,"/":div,"%":mod,"^":Math.pow,"||":concat,"==":equal,"!=":notEqual,">":greaterThan,"<":lessThan,">=":greaterThanEqual,"<=":lessThanEqual,and:andOperator,or:orOperator,in:inOperator,"=":setVar,"[":arrayIndex},this.ternaryOps={"?":condition},this.functions={random,fac:factorial,min:min$1,max:max$1,hypot:Math.hypot||hypot,pyt:Math.hypot||hypot,pow:Math.pow,atan2:Math.atan2,if:condition,gamma,roundTo,map:arrayMap$1,fold:arrayFold,filter:arrayFilter$1,indexOf:stringOrArrayIndexOf,join:arrayJoin,sum:sum$1},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}Parser.prototype.parse=function(e){var t=[],n=new ParserState(this,new TokenStream(this,e),{allowMemberAccess:this.options.allowMemberAccess});return n.parseExpression(t),n.expect(TEOF,`EOF`),new Expression(t,this)},Parser.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var sharedParser=new Parser;Parser.parse=function(e){return sharedParser.parse(e)},Parser.evaluate=function(e,t){return sharedParser.parse(e).evaluate(t)};var optionNameMap={"+":`add`,"-":`subtract`,"*":`multiply`,"/":`divide`,"%":`remainder`,"^":`power`,"!":`factorial`,"<":`comparison`,">":`comparison`,"<=":`comparison`,">=":`comparison`,"==":`comparison`,"!=":`comparison`,"||":`concatenate`,and:`logical`,or:`logical`,not:`logical`,"?":`conditional`,":":`conditional`,"=":`assignment`,"[":`array`,"()=":`fndef`};function getOptionName(e){return Object.hasOwn(optionNameMap,e)?optionNameMap[e]:e}Parser.prototype.isOperatorEnabled=function(e){var t=getOptionName(e),n=this.options.operators||{};return!(t in n)||!!n[t]};var require_cloneDeep=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"cloneDeep",{enumerable:!0,get:function(){return t}});function t(e){return Array.isArray(e)?e.map(e=>t(e)):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)])):e}})),require_config_full=__commonJSMin(((e,t)=>{t.exports={content:[],presets:[],darkMode:`media`,theme:{accentColor:({theme:e})=>({...e(`colors`),auto:`auto`}),animation:{none:`none`,spin:`spin 1s linear infinite`,ping:`ping 1s cubic-bezier(0, 0, 0.2, 1) infinite`,pulse:`pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite`,bounce:`bounce 1s infinite`},aria:{busy:`busy="true"`,checked:`checked="true"`,disabled:`disabled="true"`,expanded:`expanded="true"`,hidden:`hidden="true"`,pressed:`pressed="true"`,readonly:`readonly="true"`,required:`required="true"`,selected:`selected="true"`},aspectRatio:{auto:`auto`,square:`1 / 1`,video:`16 / 9`},backdropBlur:({theme:e})=>e(`blur`),backdropBrightness:({theme:e})=>e(`brightness`),backdropContrast:({theme:e})=>e(`contrast`),backdropGrayscale:({theme:e})=>e(`grayscale`),backdropHueRotate:({theme:e})=>e(`hueRotate`),backdropInvert:({theme:e})=>e(`invert`),backdropOpacity:({theme:e})=>e(`opacity`),backdropSaturate:({theme:e})=>e(`saturate`),backdropSepia:({theme:e})=>e(`sepia`),backgroundColor:({theme:e})=>e(`colors`),backgroundImage:{none:`none`,"gradient-to-t":`linear-gradient(to top, var(--tw-gradient-stops))`,"gradient-to-tr":`linear-gradient(to top right, var(--tw-gradient-stops))`,"gradient-to-r":`linear-gradient(to right, var(--tw-gradient-stops))`,"gradient-to-br":`linear-gradient(to bottom right, var(--tw-gradient-stops))`,"gradient-to-b":`linear-gradient(to bottom, var(--tw-gradient-stops))`,"gradient-to-bl":`linear-gradient(to bottom left, var(--tw-gradient-stops))`,"gradient-to-l"
vendor: 4,395 bytes, line 5
5:`linear-gradient(to left, var(--tw-gradient-stops))`,"gradient-to-tl":`linear-gradient(to top left, var(--tw-gradient-stops))`},backgroundOpacity:({theme:e})=>e(`opacity`),backgroundPosition:{bottom:`bottom`,center:`center`,left:`left`,"left-bottom":`left bottom`,"left-top":`left top`,right:`right`,"right-bottom":`right bottom`,"right-top":`right top`,top:`top`},backgroundSize:{auto:`auto`,cover:`cover`,contain:`contain`},blur:{0:`0`,none:``,sm:`4px`,DEFAULT:`8px`,md:`12px`,lg:`16px`,xl:`24px`,"2xl":`40px`,"3xl":`64px`},borderColor:({theme:e})=>({...e(`colors`),DEFAULT:e(`colors.gray.200`,`currentColor`)}),borderOpacity:({theme:e})=>e(`opacity`),borderRadius:{none:`0px`,sm:`0.125rem`,DEFAULT:`0.25rem`,md:`0.375rem`,lg:`0.5rem`,xl:`0.75rem`,"2xl":`1rem`,"3xl":`1.5rem`,full:`9999px`},borderSpacing:({theme:e})=>({...e(`spacing`)}),borderWidth:{DEFAULT:`1px`,0:`0px`,2:`2px`,4:`4px`,8:`8px`},boxShadow:{sm:`0 1px 2px 0 rgb(0 0 0 / 0.05)`,DEFAULT:`0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)`,md:`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`,lg:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,xl:`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`,"2xl":`0 25px 50px -12px rgb(0 0 0 / 0.25)`,inner:`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`,none:`none`},boxShadowColor:({theme:e})=>e(`colors`),brightness:{0:`0`,50:`.5`,75:`.75`,90:`.9`,95:`.95`,100:`1`,105:`1.05`,110:`1.1`,125:`1.25`,150:`1.5`,200:`2`},caretColor:({theme:e})=>e(`colors`),colors:({colors:e})=>({inherit:e.inherit,current:e.current,transparent:e.transparent,black:e.black,white:e.white,slate:e.slate,gray:e.gray,zinc:e.zinc,neutral:e.neutral,stone:e.stone,red:e.red,orange:e.orange,amber:e.amber,yellow:e.yellow,lime:e.lime,green:e.green,emerald:e.emerald,teal:e.teal,cyan:e.cyan,sky:e.sky,blue:e.blue,indigo:e.indigo,violet:e.violet,purple:e.purple,fuchsia:e.fuchsia,pink:e.pink,rose:e.rose}),columns:{auto:`auto`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,"3xs":`16rem`,"2xs":`18rem`,xs:`20rem`,sm:`24rem`,md:`28rem`,lg:`32rem`,xl:`36rem`,"2xl":`42rem`,"3xl":`48rem`,"4xl":`56rem`,"5xl":`64rem`,"6xl":`72rem`,"7xl":`80rem`},container:{},content:{none:`none`},contrast:{0:`0`,50:`.5`,75:`.75`,100:`1`,125:`1.25`,150:`1.5`,200:`2`},cursor:{auto:`auto`,default:`default`,pointer:`pointer`,wait:`wait`,text:`text`,move:`move`,help:`help`,"not-allowed":`not-allowed`,none:`none`,"context-menu":`context-menu`,progress:`progress`,cell:`cell`,crosshair:`crosshair`,"vertical-text":`vertical-text`,alias:`alias`,copy:`copy`,"no-drop":`no-drop`,grab:`grab`,grabbing:`grabbing`,"all-scroll":`all-scroll`,"col-resize":`col-resize`,"row-resize":`row-resize`,"n-resize":`n-resize`,"e-resize":`e-resize`,"s-resize":`s-resize`,"w-resize":`w-resize`,"ne-resize":`ne-resize`,"nw-resize":`nw-resize`,"se-resize":`se-resize`,"sw-resize":`sw-resize`,"ew-resize":`ew-resize`,"ns-resize":`ns-resize`,"nesw-resize":`nesw-resize`,"nwse-resize":`nwse-resize`,"zoom-in":`zoom-in`,"zoom-out":`zoom-out`},divideColor:({theme:e})=>e(`borderColor`),divideOpacity:({theme:e})=>e(`borderOpacity`),divideWidth:({theme:e})=>e(`borderWidth`),dropShadow:{sm:`0 1px 1px rgb(0 0 0 / 0.05)`,DEFAULT:[`0 1px 2px rgb(0 0 0 / 0.1)`,`0 1px 1px rgb(0 0 0 / 0.06)`],md:[`0 4px 3px rgb(0 0 0 / 0.07)`,`0 2px 2px rgb(0 0 0 / 0.06)`],lg:[`0 10px 8px rgb(0 0 0 / 0.04)`,`0 4px 3px rgb(0 0 0 / 0.1)`],xl:[`0 20px 13px rgb(0 0 0 / 0.03)`,`0 8px 5px rgb(0 0 0 / 0.08)`],"2xl":`0 25px 25px rgb(0 0 0 / 0.15)`,none:`0 0 #0000`},fill:({theme:e})=>({none:`none`,...e(`colors`)}),flex:{1:`1 1 0%`,auto:`1 1 auto`,initial:`0 1 auto`,none:`none`},flexBasis:({theme:e})=>({auto:`auto`,...e(`spacing`),"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/6":`16.666667%`,"2/6":`33.333333%`,"3/6":`50%`,"4/6":`66.666667%`,"5/6":`83.333333%`,"1/12":`8.333333%`,"2/12":`16.666667%`,"3/12":`25%`,"4/12":`33.333333%`,"5/12":`41.666667%`,"6/12":`50%`,"7/12":`58.333333%`,"8/12":`66.666667%`,"9/12":`75%`,"10/12":`83.333333%`,"11/12":`91.666667%`,full:`100%`}),flexGrow:{0:`0`,DEFAULT:`1`},flexShrink:{0:`0`,DEFAULT:`1`},fontFamily:{sans:[`ui-sans-serif`,`system-ui`,`sans-serif`,`"Apple Color Emoji"`,`"Segoe UI Emoji"`,`"Segoe UI Symbol"`,`"Noto Color Emoji"`],serif:[`ui-serif`,`Georgia`,`C
5ambria`,`"Times New Roman"`,`Times`,`serif`],mono:[`ui-monospace`,`SFMono-Regular`,`Menlo`,`Monaco`,`Consolas`,`"Liberation Mono"`,`"Courier New"`,`monospace`]},fontSize:{xs:[`0.75rem`,{lineHeight:`1rem`}],sm:[`0.875rem`,{lineHeight:`1.25rem`}],base:[`1rem`,{lineHeight:`1.5rem`}],lg:[`1.125rem`,{lineHeight:`1.75rem`}],xl:[`1.25rem`,{lineHeight:`1.75rem`}],"2xl":[`1.5rem`,{lineHeight:`2rem`}],"3xl":[`1.875rem`,{lineHeight:`2.25rem`}],"4xl":[`2.25rem`,{lineHeight:`2.5rem`}],"5xl":[`3rem`,{lineHeight:`1`}],"6xl":[`3.75rem`,{lineHeight:`1`}],"7xl":[`4.5rem`,{lineHeight:`1`}],"8xl":[`6rem`,{lineHeight:`1`}],"9xl":[`8rem`,{lineHeight:`1`}]},fontWeight:{thin:`100`,extralight:`200`,light:`300`,normal:`400`,medium:`500`,semibold:`600`,bold:`700`,extrabold:`800`,black:`900`},gap:({theme:e})=>e(`spacing`),gradientColorStops:({theme:e})=>e(`colors`),gradientColorStopPositions:{"0%":`0%`,"5%":`5%`,"10%":`10%`,"15%":`15%`,"20%":`20%`,"25%":`25%`,"30%":`30%`,"35%":`35%`,"40%":`40%`,"45%":`45%`,"50%":`50%`,"55%":`55%`,"60%":`60%`,"65%":`65%`,"70%":`70%`,"75%":`75%`,"80%":`80%`,"85%":`85%`,"90%":`90%`,"95%":`95%`,"100%":`100%`},grayscale:{0:`0`,DEFAULT:`100%`},gridAutoColumns:{auto:`auto`,min:`min-content`,max:`max-content`,fr:`minmax(0, 1fr)`},gridAutoRows:{auto:`auto`,min:`min-content`,max:`max-content`,fr:`minmax(0, 1fr)`},gridColumn:{auto:`auto`,"span-1":`span 1 / span 1`,"span-2":`span 2 / span 2`,"span-3":`span 3 / span 3`,"span-4":`span 4 / span 4`,"span-5":`span 5 / span 5`,"span-6":`span 6 / span 6`,"span-7":`span 7 / span 7`,"span-8":`span 8 / span 8`,"span-9":`span 9 / span 9`,"span-10":`span 10 / span 10`,"span-11":`span 11 / span 11`,"span-12":`span 12 / span 12`,"span-full":`1 / -1`},gridColumnEnd:{auto:`auto`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,13:`13`},gridColumnStart:{auto:`auto`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,13:`13`},gridRow:{auto:`auto`,"span-1":`span 1 / span 1`,"span-2":`span 2 / span 2`,"span-3":`span 3 / span 3`,"span-4":`span 4 / span 4`,"span-5":`span 5 / span 5`,"span-6":`span 6 / span 6`,"span-7":`span 7 / span 7`,"span-8":`span 8 / span 8`,"span-9":`span 9 / span 9`,"span-10":`span 10 / span 10`,"span-11":`span 11 / span 11`,"span-12":`span 12 / span 12`,"span-full":`1 / -1`},gridRowEnd:{auto:`auto`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,13:`13`},gridRowStart:{auto:`auto`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,13:`13`},gridTemplateColumns:{none:`none`,subgrid:`subgrid`,1:`repeat(1, minmax(0, 1fr))`,2:`repeat(2, minmax(0, 1fr))`,3:`repeat(3, minmax(0, 1fr))`,4:`repeat(4, minmax(0, 1fr))`,5:`repeat(5, minmax(0, 1fr))`,6:`repeat(6, minmax(0, 1fr))`,7:`repeat(7, minmax(0, 1fr))`,8:`repeat(8, minmax(0, 1fr))`,9:`repeat(9, minmax(0, 1fr))`,10:`repeat(10, minmax(0, 1fr))`,11:`repeat(11, minmax(0, 1fr))`,12:`repeat(12, minmax(0, 1fr))`},gridTemplateRows:{none:`none`,subgrid:`subgrid`,1:`repeat(1, minmax(0, 1fr))`,2:`repeat(2, minmax(0, 1fr))`,3:`repeat(3, minmax(0, 1fr))`,4:`repeat(4, minmax(0, 1fr))`,5:`repeat(5, minmax(0, 1fr))`,6:`repeat(6, minmax(0, 1fr))`,7:`repeat(7, minmax(0, 1fr))`,8:`repeat(8, minmax(0, 1fr))`,9:`repeat(9, minmax(0, 1fr))`,10:`repeat(10, minmax(0, 1fr))`,11:`repeat(11, minmax(0, 1fr))`,12:`repeat(12, minmax(0, 1fr))`},height:({theme:e})=>({auto:`auto`,...e(`spacing`),"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/6":`16.666667%`,"2/6":`33.333333%`,"3/6":`50%`,"4/6":`66.666667%`,"5/6":`83.333333%`,full:`100%`,screen:`100vh`,svh:`100svh`,lvh:`100lvh`,dvh:`100dvh`,min:`min-content`,max:`max-content`,fit:`fit-content`}),hueRotate:{0:`0deg`,15:`15deg`,30:`30deg`,60:`60deg`,90:`90deg`,180:`180deg`},inset:({theme:e})=>({auto:`auto`,...e(`spacing`),"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,full:`100%`}),invert:{0:`0`,DEFAULT:`100%`},keyframes:{spin:{to:{transform:`rotate(360deg)`}},ping:{"75%, 100%":{transform:`scale(2)`,opacity:`0`}},pulse:{"50%":{opacity:`.5`}},bounce:{"0%, 100%":{transform:`translateY(-25%)`,animationTimingFunction:`cubic-bezier(0.8,0,1,1)`},"50%":{transform:`none`,animationTimingFunction:`cubic-bezier(0,0,0.2,1)`}}},letterSpacing:{tighter:`-0.05em`,tight:`-0.025em`,normal:`0em`,wide:`0.025em`,wider:`0.05em`,widest:`0.1em`}
vendor: 6,036 bytes, line 5
5,lineHeight:{none:`1`,tight:`1.25`,snug:`1.375`,normal:`1.5`,relaxed:`1.625`,loose:`2`,3:`.75rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,7:`1.75rem`,8:`2rem`,9:`2.25rem`,10:`2.5rem`},listStyleType:{none:`none`,disc:`disc`,decimal:`decimal`},listStyleImage:{none:`none`},margin:({theme:e})=>({auto:`auto`,...e(`spacing`)}),lineClamp:{1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`},maxHeight:({theme:e})=>({...e(`spacing`),none:`none`,full:`100%`,screen:`100vh`,svh:`100svh`,lvh:`100lvh`,dvh:`100dvh`,min:`min-content`,max:`max-content`,fit:`fit-content`}),maxWidth:({theme:e,breakpoints:t})=>({...e(`spacing`),none:`none`,xs:`20rem`,sm:`24rem`,md:`28rem`,lg:`32rem`,xl:`36rem`,"2xl":`42rem`,"3xl":`48rem`,"4xl":`56rem`,"5xl":`64rem`,"6xl":`72rem`,"7xl":`80rem`,full:`100%`,min:`min-content`,max:`max-content`,fit:`fit-content`,prose:`65ch`,...t(e(`screens`))}),minHeight:({theme:e})=>({...e(`spacing`),full:`100%`,screen:`100vh`,svh:`100svh`,lvh:`100lvh`,dvh:`100dvh`,min:`min-content`,max:`max-content`,fit:`fit-content`}),minWidth:({theme:e})=>({...e(`spacing`),full:`100%`,min:`min-content`,max:`max-content`,fit:`fit-content`}),objectPosition:{bottom:`bottom`,center:`center`,left:`left`,"left-bottom":`left bottom`,"left-top":`left top`,right:`right`,"right-bottom":`right bottom`,"right-top":`right top`,top:`top`},opacity:{0:`0`,5:`0.05`,10:`0.1`,15:`0.15`,20:`0.2`,25:`0.25`,30:`0.3`,35:`0.35`,40:`0.4`,45:`0.45`,50:`0.5`,55:`0.55`,60:`0.6`,65:`0.65`,70:`0.7`,75:`0.75`,80:`0.8`,85:`0.85`,90:`0.9`,95:`0.95`,100:`1`},order:{first:`-9999`,last:`9999`,none:`0`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`},outlineColor:({theme:e})=>e(`colors`),outlineOffset:{0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`},outlineWidth:{0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`},padding:({theme:e})=>e(`spacing`),placeholderColor:({theme:e})=>e(`colors`),placeholderOpacity:({theme:e})=>e(`opacity`),ringColor:({theme:e})=>({DEFAULT:e(`colors.blue.500`,`#3b82f6`),...e(`colors`)}),ringOffsetColor:({theme:e})=>e(`colors`),ringOffsetWidth:{0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`},ringOpacity:({theme:e})=>({DEFAULT:`0.5`,...e(`opacity`)}),ringWidth:{DEFAULT:`3px`,0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`},rotate:{0:`0deg`,1:`1deg`,2:`2deg`,3:`3deg`,6:`6deg`,12:`12deg`,45:`45deg`,90:`90deg`,180:`180deg`},saturate:{0:`0`,50:`.5`,100:`1`,150:`1.5`,200:`2`},scale:{0:`0`,50:`.5`,75:`.75`,90:`.9`,95:`.95`,100:`1`,105:`1.05`,110:`1.1`,125:`1.25`,150:`1.5`},screens:{sm:`640px`,md:`768px`,lg:`1024px`,xl:`1280px`,"2xl":`1536px`},scrollMargin:({theme:e})=>({...e(`spacing`)}),scrollPadding:({theme:e})=>e(`spacing`),sepia:{0:`0`,DEFAULT:`100%`},skew:{0:`0deg`,1:`1deg`,2:`2deg`,3:`3deg`,6:`6deg`,12:`12deg`},space:({theme:e})=>({...e(`spacing`)}),spacing:{px:`1px`,0:`0px`,.5:`0.125rem`,1:`0.25rem`,1.5:`0.375rem`,2:`0.5rem`,2.5:`0.625rem`,3:`0.75rem`,3.5:`0.875rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,7:`1.75rem`,8:`2rem`,9:`2.25rem`,10:`2.5rem`,11:`2.75rem`,12:`3rem`,14:`3.5rem`,16:`4rem`,20:`5rem`,24:`6rem`,28:`7rem`,32:`8rem`,36:`9rem`,40:`10rem`,44:`11rem`,48:`12rem`,52:`13rem`,56:`14rem`,60:`15rem`,64:`16rem`,72:`18rem`,80:`20rem`,96:`24rem`},stroke:({theme:e})=>({none:`none`,...e(`colors`)}),strokeWidth:{0:`0`,1:`1`,2:`2`},supports:{},data:{},textColor:({theme:e})=>e(`colors`),textDecorationColor:({theme:e})=>e(`colors`),textDecorationThickness:{auto:`auto`,"from-font":`from-font`,0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`},textIndent:({theme:e})=>({...e(`spacing`)}),textOpacity:({theme:e})=>e(`opacity`),textUnderlineOffset:{auto:`auto`,0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`},transformOrigin:{center:`center`,top:`top`,"top-right":`top right`,right:`right`,"bottom-right":`bottom right`,bottom:`bottom`,"bottom-left":`bottom left`,left:`left`,"top-left":`top left`},transitionDelay:{0:`0s`,75:`75ms`,100:`100ms`,150:`150ms`,200:`200ms`,300:`300ms`,500:`500ms`,700:`700ms`,1e3:`1000ms`},transitionDuration:{DEFAULT:`150ms`,0:`0s`,75:`75ms`,100:`100ms`,150:`150ms`,200:`200ms`,300:`300ms`,500:`500ms`,700:`700ms`,1e3:`1000ms`},transitionProperty:{none:`none`,all:`all`,DEFAULT:`color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter`,colors:`color, background-color, border-color, text-decoration-color, fill, stroke`,opacity:`opacity`,shadow:`box-shadow`,transform:`transform`},transitionTimingFunction:{DEFAULT:`cubic-bezier(0.4, 0, 0.2, 1)`,linear:`linear`,in:`cubic-bezier(0.4, 0, 1, 1)`,out:`cubic-bezier(0, 0, 0.2, 1)`,"in-out":`cubic-bezier(0.4, 0, 0.2, 1)`},translate:({theme:e})=>({...e(`spacing`),"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,full:`100%`}),size:({theme:e})=>({auto:`auto`,...e(`spacing`),"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/6":`16.666667%`,"2/6":`33.333333%`,"3/6":`50%`,"4/6":`66.666667%`,"5/6":`83.333333%`,"1/12":`8.333333%`,"2/12":`16.666667%`,"3/12":`25%`,"4/12":`33.333333%`,"5/12":`41.666667%`,"6/12":`50%`,"7/12":`58.333333%`,"8/12":`66.666667%`,"9/12":`75%`,"10/12":`83.333333%`,"11/12":`91.666667%`,full:`100%`,min:`min-content`,max:`max-content`,fit:`fit-content`}),width:({theme:e})=>({auto:`auto`,...e(`spacing`),"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/6":`16.666667%`,"2/6":`33.333333%`,"3/6":`50%`,"4/6":`66.666667%`,"5/6":`83.333333%`,"1/12":`8.333333%`,"2/12":`16.666667%`,"3/12":`25%`,"4/12":`33.333333%`,"5/12":`41.666667%`,"6/12":`50%`,"7/12":`58.333333%`,"8/12":`66.666667%`,"9/12":`75%`,"10/12":`83.333333%`,"11/12":`91.666667%`,full:`100%`,screen:`100vw`,svw:`100svw`,lvw:`100lvw`,dvw:`100dvw`,min:`min-content`,max:`max-content`,fit:`fit-content`}),willChange:{auto:`auto`,scroll:`scroll-position`,contents:`contents`,transform:`transform`},zIndex:{auto:`auto`,0:`0`,10:`10`,20:`20`,30:`30`,40:`40`,50:`50`}},plugins:[]}})),require_default_theme=__commonJSMin((e=>
vendor: 4,362 bytes, line 5
5{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i}});var t=require_cloneDeep(),n=r(require_config_full());function r(e){return e&&e.__esModule?e:{default:e}}var i=(0,t.cloneDeep)(n.default.theme)})),require_defaultTheme=__commonJSMin(((e,t)=>{var n=require_default_theme();t.exports=(n.__esModule?n:{default:n}).default})),CLASS_PART_SEPARATOR=`-`,createClassGroupUtils=e=>{let t=createClassMap(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{let n=e.split(CLASS_PART_SEPARATOR);return n[0]===``&&n.length!==1&&n.shift(),getGroupRecursive(n,t)||getGroupIdForArbitraryProperty(e)},getConflictingClassGroupIds:(e,t)=>{let i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},getGroupRecursive=(e,t)=>{if(e.length===0)return t.classGroupId;let n=e[0],r=t.nextPart.get(n),i=r?getGroupRecursive(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let a=e.join(CLASS_PART_SEPARATOR);return t.validators.find(({validator:e})=>e(a))?.classGroupId},arbitraryPropertyRegex=/^\[(.+)\]$/,getGroupIdForArbitraryProperty=e=>{if(arbitraryPropertyRegex.test(e)){let t=arbitraryPropertyRegex.exec(e)[1],n=t?.substring(0,t.indexOf(`:`));if(n)return`arbitrary..`+n}},createClassMap=e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return getPrefixedClassGroupEntries(Object.entries(e.classGroups),n).forEach(([e,n])=>{processClassesRecursively(n,r,e,t)}),r},processClassesRecursively=(e,t,n,r)=>{e.forEach(e=>{if(typeof e==`string`){let r=e===``?t:getPart(t,e);r.classGroupId=n;return}if(typeof e==`function`){if(isThemeGetter(e)){processClassesRecursively(e(r),t,n,r);return}t.validators.push({validator:e,classGroupId:n});return}Object.entries(e).forEach(([e,i])=>{processClassesRecursively(i,getPart(t,e),n,r)})})},getPart=(e,t)=>{let n=e;return t.split(CLASS_PART_SEPARATOR).forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},isThemeGetter=e=>e.isThemeGetter,getPrefixedClassGroupEntries=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>typeof e==`string`?t+e:typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,createLruCache=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=new Map,r=new Map,i=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);if(t!==void 0)return t;if((t=r.get(e))!==void 0)return i(e,t),t},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},IMPORTANT_MODIFIER=`!`,createParseClassName=e=>{let{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=e=>{let n=[],o=0,c=0,u;for(let K=0;K<e.length;K++){let Y=e[K];if(o===0){if(Y===i&&(r||e.slice(K,K+a)===t)){n.push(e.slice(c,K)),c=K+a;continue}if(Y===`/`){u=K;continue}}Y===`[`?o++:Y===`]`&&o--}let K=n.length===0?e:e.substring(c),Y=K.startsWith(IMPORTANT_MODIFIER);return{modifiers:n,hasImportantModifier:Y,baseClassName:Y?K.substring(1):K,maybePostfixModifierPosition:u&&u>c?u-c:void 0}};return n?e=>n({className:e,parseClassName:o}):o},sortModifiers=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(e=>{e[0]===`[`?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},createConfigUtils=e=>({cache:createLruCache(e.cacheSize),parseClassName:createParseClassName(e),...createClassGroupUtils(e)}),SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(SPLIT_CLASSES_REGEX),c=``;for(let e=o.length-1;e>=0;--e){let t=o[e],{modifiers:u,hasImportantModifier:K,baseClassName:Y,maybePostfixModifierPosition:X}=n(t),ee=!!X,te=r(ee?Y.substring(0,X):Y);if(!te){if(!ee){c=t+(c.length>0?` `+c:c);continue}if(te=r(Y),!te){c=t+(c.length>0?` `+c:c);continue}ee=!1}let ce=sortModifiers(u).join(`:`),ue=K?ce+IMPORTANT_MODIFIER:ce,de=ue+te;if(a.includes(de))continue;a.push(de);let fe=i(te,ee);for(let e=0;e<fe.length;++e){let t=fe[e];a.push(ue+t)}c=t+(c.length>0?` `+c:c)}return c};function twJoin(){let e=0,t,n,r=``;for(;e<arguments.length;)(t=arguments[e++])&&(n=toValue(t))&&(r&&(r+=` `),r+=n);return r}var toValue=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=toValue(e[r]))&&(n&&(n+=` `),n+=t);return n};function createTailwindMerge(e,...t){let n,r,i,a=o;function o(o){return n=createConfigUtils(t.reduce((e,t)=>
vendor: 4,054 bytes, line 5
5t(e),e())),r=n.cache.get,i=n.cache.set,a=c,c(o)}function c(e){let t=r(e);if(t)return t;let a=mergeClassList(e,n);return i(e,a),a}return function(){return a(twJoin.apply(null,arguments))}}var fromTheme=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},arbitraryValueRegex=/^\[(?:([a-z-]+):)?(.+)\]$/i,fractionRegex=/^\d+\/\d+$/,stringLengths=new Set([`px`,`full`,`screen`]),tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isLength$1=e=>isNumber$2(e)||stringLengths.has(e)||fractionRegex.test(e),isArbitraryLength=e=>getIsArbitraryValue(e,`length`,isLengthOnly),isNumber$2=e=>!!e&&!Number.isNaN(Number(e)),isArbitraryNumber=e=>getIsArbitraryValue(e,`number`,isNumber$2),isInteger$1=e=>!!e&&Number.isInteger(Number(e)),isPercent=e=>e.endsWith(`%`)&&isNumber$2(e.slice(0,-1)),isArbitraryValue=e=>arbitraryValueRegex.test(e),isTshirtSize=e=>tshirtUnitRegex.test(e),sizeLabels=new Set([`length`,`size`,`percentage`]),isArbitrarySize=e=>getIsArbitraryValue(e,sizeLabels,isNever),isArbitraryPosition=e=>getIsArbitraryValue(e,`position`,isNever),imageLabels=new Set([`image`,`url`]),isArbitraryImage=e=>getIsArbitraryValue(e,imageLabels,isImage),isArbitraryShadow=e=>getIsArbitraryValue(e,``,isShadow),isAny=()=>!0,getIsArbitraryValue=(e,t,n)=>{let r=arbitraryValueRegex.exec(e);return r?r[1]?typeof t==`string`?r[1]===t:t.has(r[1]):n(r[2]):!1},isLengthOnly=e=>lengthUnitRegex.test(e)&&!colorFunctionRegex.test(e),isNever=()=>!1,isShadow=e=>shadowRegex.test(e),isImage=e=>imageRegex.test(e),getDefaultConfig=()=>{let e=fromTheme(`colors`),t=fromTheme(`spacing`),n=fromTheme(`blur`),r=fromTheme(`brightness`),i=fromTheme(`borderColor`),a=fromTheme(`borderRadius`),o=fromTheme(`borderSpacing`),c=fromTheme(`borderWidth`),u=fromTheme(`contrast`),K=fromTheme(`grayscale`),Y=fromTheme(`hueRotate`),X=fromTheme(`invert`),ee=fromTheme(`gap`),te=fromTheme(`gradientColorStops`),ce=fromTheme(`gradientColorStopPositions`),ue=fromTheme(`inset`),de=fromTheme(`margin`),fe=fromTheme(`opacity`),me=fromTheme(`padding`),ge=fromTheme(`saturate`),Te=fromTheme(`scale`),Oe=fromTheme(`sepia`),Ae=fromTheme(`skew`),ze=fromTheme(`space`),qe=fromTheme(`translate`),Ye=()=>[`auto`,`contain`,`none`],Ze=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],Qe=()=>[`auto`,isArbitraryValue,t],et=()=>[isArbitraryValue,t],nt=()=>[``,isLength$1,isArbitraryLength],rt=()=>[`auto`,isNumber$2,isArbitraryValue],it=()=>[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`],at=()=>[`solid`,`dashed`,`dotted`,`double`,`none`],ot=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],st=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`],ct=()=>[``,`0`,isArbitraryValue],lt=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],ut=()=>[isNumber$2,isArbitraryValue];return{cacheSize:500,separator:`:`,theme:{colors:[isAny],spacing:[isLength$1,isArbitraryLength],blur:[`none`,``,isTshirtSize,isArbitraryValue],brightness:ut(),borderColor:[e],borderRadius:[`none`,``,`full`,isTshirtSize,isArbitraryValue],borderSpacing:et(),borderWidth:nt(),contrast:ut(),grayscale:ct(),hueRotate:ut(),invert:ct(),gap:et(),gradientColorStops:[e],gradientColorStopPositions:[isPercent,isArbitraryLength],inset:Qe(),margin:Qe(),opacity:ut(),padding:et(),saturate:ut(),scale:ut(),sepia:ct(),skew:ut(),space:et(),translate:et()},classGroups:{aspect:[{aspect:[`auto`,`square`,`video`,isArbitraryValue]}],container:[`container`],columns:[{columns:[isTshirtSize]}],"break-after":[{"break-after":lt()}],"break-before":[{"break-before":lt()}
vendor: 11,919 bytes, line 5
5],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:[...it(),isArbitraryValue]}],overflow:[{overflow:Ze()}],"overflow-x":[{"overflow-x":Ze()}],"overflow-y":[{"overflow-y":Ze()}],overscroll:[{overscroll:Ye()}],"overscroll-x":[{"overscroll-x":Ye()}],"overscroll-y":[{"overscroll-y":Ye()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:[ue]}],"inset-x":[{"inset-x":[ue]}],"inset-y":[{"inset-y":[ue]}],start:[{start:[ue]}],end:[{end:[ue]}],top:[{top:[ue]}],right:[{right:[ue]}],bottom:[{bottom:[ue]}],left:[{left:[ue]}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[`auto`,isInteger$1,isArbitraryValue]}],basis:[{basis:Qe()}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`wrap`,`wrap-reverse`,`nowrap`]}],flex:[{flex:[`1`,`auto`,`initial`,`none`,isArbitraryValue]}],grow:[{grow:ct()}],shrink:[{shrink:ct()}],order:[{order:[`first`,`last`,`none`,isInteger$1,isArbitraryValue]}],"grid-cols":[{"grid-cols":[isAny]}],"col-start-end":[{col:[`auto`,{span:[`full`,isInteger$1,isArbitraryValue]},isArbitraryValue]}],"col-start":[{"col-start":rt()}],"col-end":[{"col-end":rt()}],"grid-rows":[{"grid-rows":[isAny]}],"row-start-end":[{row:[`auto`,{span:[isInteger$1,isArbitraryValue]},isArbitraryValue]}],"row-start":[{"row-start":rt()}],"row-end":[{"row-end":rt()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":[`auto`,`min`,`max`,`fr`,isArbitraryValue]}],"auto-rows":[{"auto-rows":[`auto`,`min`,`max`,`fr`,isArbitraryValue]}],gap:[{gap:[ee]}],"gap-x":[{"gap-x":[ee]}],"gap-y":[{"gap-y":[ee]}],"justify-content":[{justify:[`normal`,...st()]}],"justify-items":[{"justify-items":[`start`,`end`,`center`,`stretch`]}],"justify-self":[{"justify-self":[`auto`,`start`,`end`,`center`,`stretch`]}],"align-content":[{content:[`normal`,...st(),`baseline`]}],"align-items":[{items:[`start`,`end`,`center`,`baseline`,`stretch`]}],"align-self":[{self:[`auto`,`start`,`end`,`center`,`stretch`,`baseline`]}],"place-content":[{"place-content":[...st(),`baseline`]}],"place-items":[{"place-items":[`start`,`end`,`center`,`baseline`,`stretch`]}],"place-self":[{"place-self":[`auto`,`start`,`end`,`center`,`stretch`]}],p:[{p:[me]}],px:[{px:[me]}],py:[{py:[me]}],ps:[{ps:[me]}],pe:[{pe:[me]}],pt:[{pt:[me]}],pr:[{pr:[me]}],pb:[{pb:[me]}],pl:[{pl:[me]}],m:[{m:[de]}],mx:[{mx:[de]}],my:[{my:[de]}],ms:[{ms:[de]}],me:[{me:[de]}],mt:[{mt:[de]}],mr:[{mr:[de]}],mb:[{mb:[de]}],ml:[{ml:[de]}],"space-x":[{"space-x":[ze]}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":[ze]}],"space-y-reverse":[`space-y-reverse`],w:[{w:[`auto`,`min`,`max`,`fit`,`svw`,`lvw`,`dvw`,isArbitraryValue,t]}],"min-w":[{"min-w":[isArbitraryValue,t,`min`,`max`,`fit`]}],"max-w":[{"max-w":[isArbitraryValue,t,`none`,`full`,`min`,`max`,`fit`,`prose`,{screen:[isTshirtSize]},isTshirtSize]}],h:[{h:[isArbitraryValue,t,`auto`,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"min-h":[{"min-h":[isArbitraryValue,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"max-h":[{"max-h":[isArbitraryValue,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],size:[{size:[isArbitraryValue,t,`auto`,`min`,`max`,`fit`]}],"font-size":[{text:[`base`,isTshirtSize,isArbitraryLength]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`,isArbitraryNumber]}],"font-family":[{font:[isAny]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`,isArbitraryValue]}],"line-clamp":[{"line-clamp":[`none`,isNumber$2,isArbitraryNumber]}],leading:[{leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`,isLength$1,isArbitraryValue]}],"list-image":[{"list-image":[`none`,isArbitraryValue]}],"list-style-type":[{list:[`none`,`disc`,`decimal`,isArbitraryValue]}],"list-style-position":[{list:[`inside`,`outside`]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[fe]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[fe]}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...at(),`wavy`]}],"text-decoration-thickness":[{decoration:[`auto`,`from-font`,isLength$1,isArbitraryLength]}],"underline-offset":[{"underline-offset":[`auto`,isLength$1,isArbitraryValue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:et()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,isArbitraryValue]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,isArbitraryValue]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-opacity":[{"bg-opacity":[fe]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:[...it(),isArbitraryPosition]}],"bg-repeat":[{bg:[`no-repeat`,{repeat:[``,`x`,`y`,`round`,`space`]}]}],"bg-size":[{bg:[`auto`,`cover`,`contain`,isArbitrarySize]}],"bg-image":[{bg:[`none`,{"gradient-to":[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},isArbitraryImage]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[ce]}],"gradient-via-pos":[{via:[ce]}],"gradient-to-pos":[{to:[ce]}],"gradient-from":[{from:[te]}],"gradient-via":[{via:[te]}],"gradient-to":[{to:[te]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[fe]}],"border-style":[{border:[...at(),`hidden`]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":[`divide-y-reverse`],"divide-opacity":[{"divide-opacity":[fe]}],"divide-style":[{divide:at()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:[``,...at()]}],"outline-offset":[{"outline-offset":[isLength$1,isArbitraryValue]}],"outline-w":[{outline:[isLength$1,isArbitraryLength]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:nt()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[fe]}],"ring-offset-w":[{"ring-offset":[isLength$1,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:[``,`inner`,`none`,isTshirtSize,isArbitraryShadow]}],"shadow-color":[{shadow:[isAny]}],opacity:[{opacity:[fe]}],"mix-blend":[{"mix-blend":[...ot(),`plus-lighter`,`plus-darker`]}],"bg-blend":[{"bg-blend":ot()}],filter:[{filter:[``,`none`]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":[``,`none`,isTshirtSize,isArbitraryValue]}],grayscale:[{grayscale:[K]}],"hue-rotate":[{"hue-rotate":[Y]}],invert:[{invert:[X]}],saturate:[{saturate:[ge]}],sepia:[{sepia:[Oe]}],"backdrop-filter":[{"backdrop-filter":[``,`none`]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Y]}],"backdrop-invert":[{"backdrop-invert":[X]}],"backdrop-opacity":[{"backdrop-opacity":[fe]}],"backdrop-saturate":[{"backdrop-saturate":[ge]}],"backdrop-sepia":[{"backdrop-sepia":[Oe]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[`none`,`all`,``,`colors`,`opacity`,`shadow`,`transform`,isArbitraryValue]}],duration:[{duration:ut()}],ease:[{ease:[`linear`,`in`,`out`,`in-out`,isArbitraryValue]}],delay:[{delay:ut()}],animate:[{animate:[`none`,`spin`,`ping`,`pulse`,`bounce`,isArbitraryValue]}],transform:[{transform:[``,`gpu`,`none`]}],scale:[{scale:[Te]}],"scale-x":[{"scale-x":[Te]}],"scale-y":[{"scale-y":[Te]}],rotate:[{rotate:[isInteger$1,isArbitraryValue]}],"translate-x":[{"translate-x":[qe]}],"translate-y":[{"translate-y":[qe]}],"skew-x":[{"skew-x":[Ae]}],"skew-y":[{"skew-y":[Ae]}],"transform-origin":[{origin:[`center`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`,`top-left`,isArbitraryValue]}],accent:[{accent:[`auto`,e]}],appearance:[{appearance:[`none`,`auto`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,isArbitraryValue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":[`none`,`auto`]}],resize:[{resize:[`none`,`y`,`x`,``]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":et()}],"scroll-mx":[{"scroll-mx":et()}],"scroll-my":[{"scroll-my":et()}],"scroll-ms":[{"scroll-ms":et()}],"scroll-me":[{"scroll-me":et()}],"scroll-mt":[{"scroll-mt":et()}],"scroll-mr":[{"scroll-mr":et()}],"scroll-mb":[{"scroll-mb":et()}],"scroll-ml":[{"scroll-ml":et()}],"scroll-p":[{"scroll-p":et()}],"scroll-px":[{"scroll-px":et()}],"scroll-py":[{"scroll-py":et()}],"scroll-ps":[{"scroll-ps":et()}],"scroll-pe":[{"scroll-pe":et()}],"scroll-pt":[{"scroll-pt":et()}],"scroll-pr":[{"scroll-pr":et()}],"scroll-pb":[{"scroll-pb":et()}],"scroll-pl":[{"scroll-pl":et()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}
5],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,isArbitraryValue]}],fill:[{fill:[e,`none`]}],"stroke-w":[{stroke:[isLength$1,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:[e,`none`]}],sr:[`sr-only`,`not-sr-only`],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]}}},mergeConfigs=(e,{cacheSize:t,prefix:n,separator:r,experimentalParseClassName:i,extend:a={},override:o={}})=>{overrideProperty(e,`cacheSize`,t),overrideProperty(e,`prefix`,n),overrideProperty(e,`separator`,r),overrideProperty(e,`experimentalParseClassName`,i);for(let t in o)overrideConfigProperties(e[t],o[t]);for(let t in a)mergeConfigProperties(e[t],a[t]);return e},overrideProperty=(e,t,n)=>{n!==void 0&&(e[t]=n)},overrideConfigProperties=(e,t)=>{if(t)for(let n in t)overrideProperty(e,n,t[n])},mergeConfigProperties=(e,t)=>{if(t)for(let n in t){let r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}},extendTailwindMerge=(e,...t)=>typeof e==`function`?createTailwindMerge(getDefaultConfig,e,...t):createTailwindMerge(()=>mergeConfigs(getDefaultConfig(),e),...t),require_negateValue=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});function t(e){if(e=`${e}`,e===`0`)return`0`;if(/^[+-]?(\d+|\d*\.\d+)(e[+-]?\d+)?(%|\w+)?$/.test(e))return e.replace(/^[+-]?/,e=>e===`-`?``:`-`);for(let t of[`var`,`calc`,`min`,`max`,`clamp`])if(e.includes(`${t}(`))return`calc(${e} * -1)`}})),require_corePluginList=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=`preflight.container.accessibility.pointerEvents.visibility.position.inset.isolation.zIndex.order.gridColumn.gridColumnStart.gridColumnEnd.gridRow.gridRowStart.gridRowEnd.float.clear.margin.boxSizing.lineClamp.display.aspectRatio.size.height.maxHeight.minHeight.width.minWidth.maxWidth.flex.flexShrink.flexGrow.flexBasis.tableLayout.captionSide.borderCollapse.borderSpacing.transformOrigin.translate.rotate.skew.scale.transform.animation.cursor.touchAction.userSelect.resize.scrollSnapType.scrollSnapAlign.scrollSnapStop.scrollMargin.scrollPadding.listStylePosition.listStyleType.listStyleImage.appearance.columns.breakBefore.breakInside.breakAfter.gridAutoColumns.gridAutoFlow.gridAutoRows.gridTemplateColumns.gridTemplateRows.flexDirection.flexWrap.placeContent.placeItems.alignContent.alignItems.justifyContent.justifyItems.gap.space.divi
5deWidth.divideStyle.divideColor.divideOpacity.placeSelf.alignSelf.justifySelf.overflow.overscrollBehavior.scrollBehavior.textOverflow.hyphens.whitespace.textWrap.wordBreak.borderRadius.borderWidth.borderStyle.borderColor.borderOpacity.backgroundColor.backgroundOpacity.backgroundImage.gradientColorStops.boxDecorationBreak.backgroundSize.backgroundAttachment.backgroundClip.backgroundPosition.backgroundRepeat.backgroundOrigin.fill.stroke.strokeWidth.objectFit.objectPosition.padding.textAlign.textIndent.verticalAlign.fontFamily.fontSize.fontWeight.textTransform.fontStyle.fontVariantNumeric.lineHeight.letterSpacing.textColor.textOpacity.textDecoration.textDecorationColor.textDecorationStyle.textDecorationThickness.textUnderlineOffset.fontSmoothing.placeholderColor.placeholderOpacity.caretColor.accentColor.opacity.backgroundBlendMode.mixBlendMode.boxShadow.boxShadowColor.outlineStyle.outlineWidth.outlineOffset.outlineColor.ringWidth.ringColor.ringOpacity.ringOffsetWidth.ringOffsetColor.blur.brightness.contrast.dropShadow.grayscale.hueRotate.invert.saturate.sepia.filter.backdropBlur.backdropBrightness.backdropContrast.backdropGrayscale.backdropHueRotate.backdropInvert.backdropOpacity.backdropSaturate.backdropSepia.backdropFilter.transitionProperty.transitionDelay.transitionDuration.transitionTimingFunction.willChange.contain.content.forcedColorAdjust`.split(`.`)})),require_configurePlugins=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});function t(e,t){return e===void 0?t:Array.isArray(e)?e:[...new Set(t.filter(t=>e!==!1&&e[t]!==!1).concat(Object.keys(e).filter(t=>e[t]!==!1)))]}})),require_picocolors_browser=__commonJSMin(((e,t)=>{var n=String,r=function(){return{isColorSupported:!1,reset:n,bold:n,dim:n,italic:n,underline:n,inverse:n,hidden:n,strikethrough:n,black:n,red:n,green:n,yellow:n,blue:n,magenta:n,cyan:n,white:n,gray:n,bgBlack:n,bgRed:n,bgGreen:n,bgYellow:n,bgBlue:n,bgMagenta:n,bgCyan:n,bgWhite:n,blackBright:n,redBright:n,greenBright:n,yellowBright:n,blueBright:n,magentaBright:n,cyanBright:n,whiteBright:n,bgBlackBright:n,bgRedBright:n,bgGreenBright:n,bgYellowBright:n,bgBlueBright:n,bgMagentaBright:n,bgCyanBright:n,bgWhiteBright:n}};t.exports=r(),t.exports.createColors=r})),require_log$1=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{dim:function(){return o},default:function(){return c}});var n=r(require_picocolors_browser());function r(e){return e&&e.__esModule?e:{default:e}}var i=new Set;function a(e,t,n){typeof process<`u`&&{}.JEST_WORKER_ID||n&&i.has(n)||(n&&i.add(n),console.warn(``),t.forEach(t=>console.warn(e,`-`,t)))}function o(e){return n.default.dim(e)}var c={info(e,t){a(n.default.bold(n.default.cyan(`info`)),...Array.isArray(e)?[e]:[t,e])},warn(e,t){a(n.default.bold(n.default.yellow(`warn`)),...Array.isArray(e)?[e]:[t,e])},risk(e,t){a(n.default.bold(n.default.magenta(`risk`)),...Array.isArray(e)?[e]:[t,e])}}})),require_colors=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i}});var t=n(require_log$1());function n(e){return e&&e.__esModule?e:{default:e}}function r({version:e,from:n,to:r}){t.default.warn(`${n}-color-renamed`,[`As of Tailwind CSS ${e}, \`${n}\` has been renamed to \`${r}\`.`,`Update your configuration file to silence this warning.`])}var i={inherit:`inherit`,current:`currentColor`,transparent:`transparent`,black:`#000`,white:`#fff`,slate:{50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,900:`#0f172a`,950:`#020617`},gray:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#1f2937`,900:`#111827`,950:`#030712`},zinc:{50:`#fafafa`,100:`#f4f4f5`,200:`#e4e4e7`,300:`#d4d4d8`,400:`#a1a1aa`,500:`#71717a`,600:`#52525b`,700:`#3f3f46`,800:`#27272a`,900:`#18181b`,950:`#09090b`},neutral:{50:`#fafafa`,100:`#f5f5f5`,200:`#e5e5e5`,300:`#d4d4d4`,400:`#a3a3a3`,500:`#737373`,600:`#525252`,700:`#404040`,800:`#262626`,900:`#171717`,950:`#0a0a0a`},stone:{50:`#fafaf9`,100:`#f5f5f4`,200:`#e7e5e4`,300:`#d6d3d1`,400:`#a8a29e`,500:`#78716c`,600:`#57534e`,700:`#44403c`,800:`#292524`,900:`#1c1917`,950:`#0c0a09`},red:{50:`#fef2f2`,100:`#fee2e2`,200:`#fecaca`,300:`#fca5a5`,400:`#f87171`,500:`#ef4444`,600:`#dc2626`,700:`#b91c1c`,800:`#991b1b`,900:`#7f1d1d`,950:`#450a0a`},orange:{50:`#fff7ed`,100:`#ffedd5`,200:`#fed7aa`,300:`#fdba74`,400:`#fb923c`,500:`#f97316`,600:`#ea580c`,700:`#c2410c`,800:`#9a3412`,900:`#7c2d12`,950:`#431407`},amber:{50:`#fffbeb`,100:`#fef3c7`,200:`#fde68a`,300:`#fcd34d`,400:`#fbbf24`,500:`#f59e0b`,600:`#d97706`,700:`#b45309`,800:`#92400e`,900:`#78350f`,950:`#451a03`},yellow:{50:`#fefce8`,100:`#fef9c3`,200:`#fef08a`,300:`#fde047`,400:`#facc15`,500:`#eab308`,600:`#ca8a04`,700:`#a16207`,800:`#854d0e`,900:`#713f12`,950:`#422006`},lime:{50:`#f7fee7`,100:`#ecfccb`,200:`#d9f99d`,300:`#bef264`,400:`#a3e635`,500:`#84cc16`,600:`#65a30d`,700:`#4d7c0f`,800:`#3f6212`,900:`#365314`,950:`#1a2e05`},green:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`,950:`#052e16`},emerald:{50:`#ecfdf5`,100:`#d1fae5`,200:`#a7f3d0`,300:`#6ee7b7`,400:`#34d399`,500:`#10b981`,600:`#059669`,700:`#047857`,800:`#065f46`,900:`#064e3b`,950:`#022c22`},teal:{50:`#f0fdfa`,100:`#ccfbf1`,200:`#99f6e4`,300:`#5eead4`,400:`#2dd4bf`,500:`#14b8a6`,600:`#0d9488`,700:`#0f766e`,800:`#115e59`,900:`#134e4a`,950:`#042f2e`},cyan:{50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0e7490`,800:`#155e75`,900:`#164e63`,950:`#083344`},sky:{50:`#f0f9ff`,100:`#e0f2fe`,200:`#bae6fd`,300:`#7dd3fc`,400:`#38bdf8`,500:`#0ea5e9`,600:`#0284c7`,700:`#0369a1`,800:`#075985`,900:`#0c4a6e`,950:`#082f49`},blue:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`,950:`#172554`},indigo:{50:`#eef2ff`,100:`#e0e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`,950:`#1e1b4b`},violet:{50:`#f5f3ff`,100:`#ede9fe`,200:`#ddd6fe`,300:`#c4b5fd`,400:`#a78bfa`,500:`#8b5cf6`,600:`#7c3aed`,700:`#6d28d9`,800:`#5b21b6`,900:`#4c1d95`,950:`#2e1065`},purple:{50:`#faf5ff`,100:`#f3e8ff`,200:`#e9d5ff`,300:`#d8b4fe`,400:`#c084fc`,500:`#a855f7`,600:`#9333ea`,700:`#7e22ce`,800:`#6b21a8`,900:`#581c87`,950:`#3b0764`},fuchsia:{50:`#fdf4ff`,100:`#fae8ff`,200:`#f5d0fe`,300:`#f0abfc`,400:`#e879f9`,500:`#d946ef`,600:`#c026d3`,700:`#a21caf`,800:`#86198f`,900:`#701a75`,950:`#4a044e`},pink:{50:`#fdf2f8`,100:`#fce7f3`,200:`#fbcfe8`,300:`#f9a8d4`,400:`#f472b6`,500:`#ec4899`,600:`#db2777`,700:`#be185d`,800:`#9d174d`,900:`#831843`,950:`#500724`},rose:{50:`#fff1f2`,100:`#ffe4e6`,200:`#fecdd3`,300:`#fda4af`,400:`#fb7185`,500:`#f43f5e`,600:`#e11d48`,700:`#be123c`,800:`#9f1239`,900:`#881337`,950:`#4c0519`},get lightBlue(){return r({version:`v2.2`,from:`lightBlue`,to:`sky`}),this.sky},get warmGray(){return r({version:`v3.0`,from:`warmGray`,to:`stone`}),this.stone},get trueGray(){return r({version:`v3.0`,from:`trueGray`,to:`neutral`}),this.neutral}
5,get coolGray(){return r({version:`v3.0`,from:`coolGray`,to:`gray`}),this.gray},get blueGray(){return r({version:`v3.0`,from:`blueGray`,to:`slate`}),this.slate}}})),require_defaults=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"defaults",{enumerable:!0,get:function(){return t}});function t(e,...t){for(let i of t){for(let t in i){var n;e!=null&&e.hasOwnProperty?.call(e,t)||(e[t]=i[t])}for(let t of Object.getOwnPropertySymbols(i)){var r;e!=null&&e.hasOwnProperty?.call(e,t)||(e[t]=i[t])}}return e}})),require_toPath=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"toPath",{enumerable:!0,get:function(){return t}});function t(e){if(Array.isArray(e))return e;if(e.split(`[`).length-1!=e.split(`]`).length-1)throw Error(`Path is invalid. Has unbalanced brackets: ${e}`);return e.split(/\.(?![^\[]*\])|[\[\]]/g).filter(Boolean)}})),require_featureFlags=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{flagEnabled:function(){return c},issueFlagNotices:function(){return K},default:function(){return Y}});var n=i(require_picocolors_browser()),r=i(require_log$1());function i(e){return e&&e.__esModule?e:{default:e}}var a={optimizeUniversalDefaults:!1,generalizedModifiers:!0,disableColorOpacityUtilitiesByDefault:!1,relativeContentPathsByDefault:!1},o={future:[`hoverOnlyWhenSupported`,`respectDefaultRingColorOpacity`,`disableColorOpacityUtilitiesByDefault`,`relativeContentPathsByDefault`],experimental:[`optimizeUniversalDefaults`,`generalizedModifiers`]};function c(e,t){if(o.future.includes(t)){var n,r,i;return e.future===`all`||(e?.future?.[t]??a[t]??!1)}if(o.experimental.includes(t)){var c,u,K;return e.experimental===`all`||(e?.experimental?.[t]??a[t]??!1)}return!1}function u(e){if(e.experimental===`all`)return o.experimental;var t;return Object.keys(e?.experimental??{}).filter(t=>o.experimental.includes(t)&&e.experimental[t])}function K(e){if({}.JEST_WORKER_ID===void 0&&u(e).length>0){let t=u(e).map(e=>n.default.yellow(e)).join(`, `);r.default.warn(`experimental-flags-enabled`,[`You have enabled experimental features: ${t}`,`Experimental features in Tailwind CSS are not covered by semver, may introduce breaking changes, and can change at any time.`])}}var Y=o})),require_normalizeConfig=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"normalizeConfig",{enumerable:!0,get:function(){return a}});var t=require_featureFlags(),n=i(require_log$1());function r(e){if(typeof WeakMap!=`function`)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}function i(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!=`object`&&typeof e!=`function`)return{default:e};var n=r(t);if(n&&n.has(e))return n.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var c=a?Object.getOwnPropertyDescriptor(e,o):null;c&&(c.get||c.set)?Object.defineProperty(i,o,c):i[o]=e[o]}return i.default=e,n&&n.set(e,i),i}function a(e){if((()=>{if(e.purge||!e.content||!Array.isArray(e.content)&&(typeof e.content!=`object`||e.content===null))return!1;if(Array.isArray(e.content))return e.content.every(e=>typeof e==`string`||!(typeof e?.raw!=`string`||e?.extension&&typeof e?.extension!=`string`));if(typeof e.content==`object`&&e.content!==null){if(Object.keys(e.content).some(e=>![`files`,`relative`,`extract`,`transform`].includes(e)))return!1;if(Array.isArray(e.content.files)){if(!e.content.files.every(e=>typeof e==`string`||!(typeof e?.raw!=`string`||e?.extension&&typeof e?.extension!=`string`)))return!1;if(typeof e.content.extract==`object`){for(let t of Object.values(e.content.extract))if(typeof t!=`function`)return!1}else if(e.content.extract!==void 0&&typeof e.content.extract!=`function`)return!1;if(typeof e.content.transform==`object`){for(let t of Object.values(e.content.transform))if(typeof t!=`function`)return!1}else if(e.content.transform!==void 0&&typeof e.content.transform!=`function`)return!1;if(typeof e.content.relative!=`boolean`&&e.content.relative!==void 0)return!1}return!0}return!1})()||n.default.warn(`purge-deprecation`,["The `purge`/`content` options have changed in Tailwind CSS v3.0.",`Update your configuration file to eliminate this warning.`,`https://tailwindcss.com/docs/upgrade-guide#configure-content-sources`]),e.safelist=(()=>{var t;let{content:n,purge:r,safelist:i}=e;return Array.isArray(i)?i:Array.isArray(n?.safelist)?n.safelist:Array.isArray(r?.safelist)?r.safelist:Array.isArray(r?.options?.safelist)?r.options.safelist:[]})(),e.blocklist=(()=>
5{let{blocklist:t}=e;if(Array.isArray(t)){if(t.every(e=>typeof e==`string`))return t;n.default.warn(`blocklist-invalid`,["The `blocklist` option must be an array of strings.",`https://tailwindcss.com/docs/content-configuration#discarding-classes`])}return[]})(),typeof e.prefix==`function`)n.default.warn(`prefix-function`,["As of Tailwind CSS v3.0, `prefix` cannot be a function.","Update `prefix` in your configuration to be a string to eliminate this warning.",`https://tailwindcss.com/docs/upgrade-guide#prefix-cannot-be-a-function`]),e.prefix=``;else{var r;e.prefix=e.prefix??``}e.content={relative:(()=>{let{content:n}=e;return n?.relative?n.relative:(0,t.flagEnabled)(e,`relativeContentPathsByDefault`)})(),files:(()=>{let{content:t,purge:n}=e;return Array.isArray(n)?n:Array.isArray(n?.content)?n.content:Array.isArray(t)?t:Array.isArray(t?.content)?t.content:Array.isArray(t?.files)?t.files:[]})(),extract:(()=>{let t=(()=>{var t,n,r,i,a,o,c,u,K,Y;return e.purge?.extract?e.purge.extract:e.content?.extract?e.content.extract:(r=e.purge)!=null&&r.extract?.DEFAULT?e.purge.extract.DEFAULT:(a=e.content)!=null&&a.extract?.DEFAULT?e.content.extract.DEFAULT:(c=e.purge)!=null&&c.options?.extractors?e.purge.options.extractors:(K=e.content)!=null&&K.options?.extractors?e.content.options.extractors:{}})(),n={},r=(()=>{var t,n,r,i;if((t=e.purge)!=null&&t.options?.defaultExtractor)return e.purge.options.defaultExtractor;if((r=e.content)!=null&&r.options?.defaultExtractor)return e.content.options.defaultExtractor})();if(r!==void 0&&(n.DEFAULT=r),typeof t==`function`)n.DEFAULT=t;else if(Array.isArray(t))for(let{extensions:e,extractor:r}of t??[])for(let t of e)n[t]=r;else typeof t==`object`&&t&&Object.assign(n,t);return n})(),transform:(()=>{let t=(()=>{var t,n,r,i,a,o;return e.purge?.transform?e.purge.transform:e.content?.transform?e.content.transform:(r=e.purge)!=null&&r.transform?.DEFAULT?e.purge.transform.DEFAULT:(a=e.content)!=null&&a.transform?.DEFAULT?e.content.transform.DEFAULT:{}})(),n={};return typeof t==`function`?n.DEFAULT=t:typeof t==`object`&&t&&Object.assign(n,t),n})()};for(let t of e.content.files)if(typeof t==`string`&&/{([^,]*?)}/g.test(t)){n.default.warn(`invalid-glob-braces`,[`The glob pattern ${(0,n.dim)(t)} in your Tailwind CSS configuration is invalid.`,`Update it to ${(0,n.dim)(t.replace(/{([^,]*?)}/g,`$1`))} to silence this warning.`]);break}return e}})),require_isPlainObject=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});function t(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}})),require_escapeCommas=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});function t(e){return e.replace(/\\,/g,`\\2c `)}})),require_colorNames=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],ol
5ive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}})),require_color=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{parseColor:function(){return ee},formatColor:function(){return te}});var n=r(require_colorNames());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,a=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,o=/(?:\d+|\d*\.\d+)%?/,c=/(?:\s*,\s*|\s+)/,u=/\s*[,/]\s*/,K=/var\(--(?:[^ )]*?)(?:,(?:[^ )]*?|var\(--[^ )]*?\)))?\)/,Y=RegExp(`^(rgba?)\\(\\s*(${o.source}|${K.source})(?:${c.source}(${o.source}|${K.source}))?(?:${c.source}(${o.source}|${K.source}))?(?:${u.source}(${o.source}|${K.source}))?\\s*\\)$`),X=RegExp(`^(hsla?)\\(\\s*((?:${o.source})(?:deg|rad|grad|turn)?|${K.source})(?:${c.source}(${o.source}|${K.source}))?(?:${c.source}(${o.source}|${K.source}))?(?:${u.source}(${o.source}|${K.source}))?\\s*\\)$`);function ee(e,{loose:t=!1}={}){var r,o;if(typeof e!=`string`)return null;if(e=e.trim(),e===`transparent`)return{mode:`rgb`,color:[`0`,`0`,`0`],alpha:`0`};if(e in n.default)return{mode:`rgb`,color:n.default[e].map(e=>e.toString())};let c=e.replace(a,(e,t,n,r,i)=>[`#`,t,t,n,n,r,r,i?i+i:``].join(``)).match(i);if(c!==null)return{mode:`rgb`,color:[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)].map(e=>e.toString()),alpha:c[4]?(parseInt(c[4],16)/255).toString():void 0};var u;let K=e.match(Y)??e.match(X);if(K===null)return null;let ee=[K[2],K[3],K[4]].filter(Boolean).map(e=>e.toString());return ee.length===2&&ee[0].startsWith(`var(`)?{mode:K[1],color:[ee[0]],alpha:ee[1]}:!t&&ee.length!==3||ee.length<3&&!ee.some(e=>/^var\(.*?\)$/.test(e))?null:{mode:K[1],color:ee,alpha:(r=K[5])?.toString?.call(r)}}function te({mode:e,color:t,alpha:n}){let r=n!==void 0;return e===`rgba`||e===`hsla`?`${e}(${t.join(`, `)}${r?`, ${n}`:``})`:`${e}(${t.join(` `)}${r?` / ${n}`:``})`}})),require_withAlphaVariable=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{withAlphaValue:function(){return r},default:function(){return i}});var n=require_color();function r(e,t,r){if(typeof e==`function`)return e({opacityValue:t});let i=(0,n.parseColor)(e,{loose:!0});return i===null?r:(0,n.formatColor)({...i,alpha:t})}function i({color:e,property:t,variable:r}){let i=[].concat(t);if(typeof e==`function`)return{[r]:`1`,...Object.fromEntries(i.map(t=>[t,e({opacityVariable:r,opacityValue:`var(${r}, 1)`})]))};let a=(0,n.parseColor)(e);return a===null||a.alpha!==void 0?Object.fromEntries(i.map(t=>[t,e])):{[r]:`1`,...Object.fromEntries(i.map(e=>[e,(0,n.formatColor)({...a,alpha:`var(${r}, 1)`})]))}}})),require_splitAtTopLevelOnly=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"splitAtTopLevelOnly",{enumerable:!0,get:function(){return t}});function t(e,t){let n=[],r=[],i=0,a=!1;for(let o=0;o<e.length;o++){let c=e[o];n.length===0&&c===t[0]&&!a&&(t.length===1||e.slice(o,o+t.length)===t)&&(r.push(e.slice(i,o)),i=o+t.length),a=!a&&c===`\\`,c===`(`||c===`[`||c===`{`?n.push(c):(c===`)`&&n[n.length-1]===`(`||c===`]`&&n[n.length-1]===`[`||c===`}`&&n[n.length-1]===`{`)&&n.pop()}return r.push(e.slice(i)),r}})),require_parseBoxShadowValue=__commonJSMin((e=>
5{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{parseBoxShadowValue:function(){return o},formatBoxShadowValue:function(){return c}});var n=require_splitAtTopLevelOnly(),r=new Set([`inset`,`inherit`,`initial`,`revert`,`unset`]),i=/\ +(?![^(]*\))/g,a=/^-?(\d+|\.\d+)(.*?)$/g;function o(e){return(0,n.splitAtTopLevelOnly)(e,`,`).map(e=>{let t=e.trim(),n={raw:t},o=t.split(i),c=new Set;for(let e of o)a.lastIndex=0,!c.has(`KEYWORD`)&&r.has(e)?(n.keyword=e,c.add(`KEYWORD`)):a.test(e)?c.has(`X`)?c.has(`Y`)?c.has(`BLUR`)?c.has(`SPREAD`)||(n.spread=e,c.add(`SPREAD`)):(n.blur=e,c.add(`BLUR`)):(n.y=e,c.add(`Y`)):(n.x=e,c.add(`X`)):n.color?(n.unknown||=[],n.unknown.push(e)):n.color=e;return n.valid=n.x!==void 0&&n.y!==void 0,n})}function c(e){return e.map(e=>e.valid?[e.keyword,e.x,e.y,e.blur,e.spread,e.color].filter(Boolean).join(` `):e.raw).join(`, `)}})),require_dataTypes=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{normalize:function(){return u},normalizeAttributeSelectors:function(){return K},url:function(){return X},number:function(){return ee},percentage:function(){return te},length:function(){return ue},lineWidth:function(){return fe},shadow:function(){return me},color:function(){return ge},image:function(){return Te},gradient:function(){return Ae},position:function(){return qe},familyName:function(){return Ye},genericName:function(){return Qe},absoluteSize:function(){return nt},relativeSize:function(){return it}});var n=require_color(),r=require_parseBoxShadowValue(),i=require_splitAtTopLevelOnly(),a=[`min`,`max`,`clamp`,`calc`];function o(e){return a.some(t=>RegExp(`^${t}\\(.*\\)`).test(e))}var c=new Set([`scroll-timeline-name`,`timeline-scope`,`view-timeline-name`,`font-palette`,`anchor-name`,`anchor-scope`,`position-anchor`,`position-try-options`,`scroll-timeline`,`animation-timeline`,`view-timeline`,`position-try`]);function u(e,t=null,n=!0){let r=t&&c.has(t.property);return e.startsWith(`--`)&&!r?`var(${e})`:e.includes(`url(`)?e.split(/(url\(.*?\))/g).filter(Boolean).map(e=>/^url\(.*?\)$/.test(e)?e:u(e,t,!1)).join(``):(e=e.replace(/([^\\])_+/g,(e,t)=>t+` `.repeat(e.length-1)).replace(/^_/g,` `).replace(/\\_/g,`_`),n&&(e=e.trim()),e=Y(e),e)}function K(e){return e.includes(`=`)&&(e=e.replace(/(=.*)/g,(e,t)=>{if(t[1]===`'`||t[1]===`"`)return t;if(t.length>2){let e=t[t.length-1];if(t[t.length-2]===` `&&(e===`i`||e===`I`||e===`s`||e===`S`))return`="${t.slice(1,-2)}" ${t[t.length-1]}`}return`="${t.slice(1)}"`})),e}function Y(e){let t=[`theme`],n=[`min-content`,`max-content`,`fit-content`,`safe-area-inset-top`,`safe-area-inset-right`,`safe-area-inset-bottom`,`safe-area-inset-left`,`titlebar-area-x`,`titlebar-area-y`,`titlebar-area-width`,`titlebar-area-height`,`keyboard-inset-top`,`keyboard-inset-right`,`keyboard-inset-bottom`,`keyboard-inset-left`,`keyboard-inset-width`,`keyboard-inset-height`,`radial-gradient`,`linear-gradient`,`conic-gradient`,`repeating-radial-gradient`,`repeating-linear-gradient`,`repeating-conic-gradient`,`anchor-size`];return e.replace(/(calc|min|max|clamp)\(.+\)/g,e=>{let r=``;function i(){let e=r.trimEnd();return e[e.length-1]}for(let a=0;a<e.length;a++){function o(t){return t.split(``).every((t,n)=>e[a+n]===t)}function c(t){let n=1/0;for(let r of t){let t=e.indexOf(r,a);t!==-1&&t<n&&(n=t)}let r=e.slice(a,n);return a+=r.length-1,r}let u=e[a];if(o(`var`))r+=c([`)`,`,`]);else if(n.some(e=>o(e))){let e=n.find(e=>o(e));r+=e,a+=e.length-1}else t.some(e=>o(e))?r+=c([`)`]):o(`[`)?r+=c([`]`]):[`+`,`-`,`*`,`/`].includes(u)&&![`(`,`+`,`-`,`*`,`/`,`,`].includes(i())?r+=` ${u} `:r+=u}return r.replace(/\s+/g,` `)})}function X(e){return e.startsWith(`url(`)}function ee(e){return!isNaN(Number(e))||o(e)}function te(e){return e.endsWith(`%`)&&ee(e.slice(0,-1))||o(e)}var ce=`(?:${`cm.mm.Q.in.pc.pt.px.em.ex.ch.rem.lh.rlh.vw.vh.vmin.vmax.vb.vi.svw.svh.lvw.lvh.dvw.dvh.cqw.cqh.cqi.cqb.cqmin.cqmax`.split(`.`).join(`|`)})`;function ue(e){return e===`0`||RegExp(`^[+-]?[0-9]*\.?[0-9]+(?:[eE][+-]?[0-9]+)?${ce}$`).test(e)||o(e)}var de=new Set([`thin`,`medium`,`thick`]);function fe(e){return de.has(e)}function me(e){let t=(0,r.parseBoxShadowValue)(u(e));for(let e of t)if(!e.valid)return!1;return!0}function ge(e){let t=0;return(0,i.splitAtTopLevelOnly)(e,`_`).every(e=>(e=u(e),e.startsWith(`var(`)?!0:(0,n.parseColor)(e,{loose:!0})!==null&&(t++,!0)))?t>0:!1}function Te(e){let t=0;return(0,i.splitAtTopLevelOnly)(e,`,`).every(e=>
5(e=u(e),e.startsWith(`var(`)?!0:X(e)||Ae(e)||[`element(`,`image(`,`cross-fade(`,`image-set(`].some(t=>e.startsWith(t))?(t++,!0):!1))?t>0:!1}var Oe=new Set([`conic-gradient`,`linear-gradient`,`radial-gradient`,`repeating-conic-gradient`,`repeating-linear-gradient`,`repeating-radial-gradient`]);function Ae(e){e=u(e);for(let t of Oe)if(e.startsWith(`${t}(`))return!0;return!1}var ze=new Set([`center`,`top`,`right`,`bottom`,`left`]);function qe(e){let t=0;return(0,i.splitAtTopLevelOnly)(e,`_`).every(e=>(e=u(e),e.startsWith(`var(`)?!0:ze.has(e)||ue(e)||te(e)?(t++,!0):!1))?t>0:!1}function Ye(e){let t=0;return(0,i.splitAtTopLevelOnly)(e,`,`).every(e=>(e=u(e),e.startsWith(`var(`)?!0:e.includes(` `)&&!/(['"])([^"']+)\1/g.test(e)||/^\d/g.test(e)?!1:(t++,!0)))?t>0:!1}var Ze=new Set([`serif`,`sans-serif`,`monospace`,`cursive`,`fantasy`,`system-ui`,`ui-serif`,`ui-sans-serif`,`ui-monospace`,`ui-rounded`,`math`,`emoji`,`fangsong`]);function Qe(e){return Ze.has(e)}var et=new Set([`xx-small`,`x-small`,`small`,`medium`,`large`,`x-large`,`xx-large`,`xxx-large`]);function nt(e){return et.has(e)}var rt=new Set([`larger`,`smaller`]);function it(e){return rt.has(e)}})),require_validateFormalSyntax=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"backgroundSize",{enumerable:!0,get:function(){return r}});var t=require_dataTypes(),n=require_splitAtTopLevelOnly();function r(e){let r=[`cover`,`contain`];return(0,n.splitAtTopLevelOnly)(e,`,`).every(e=>{let i=(0,n.splitAtTopLevelOnly)(e,`_`).filter(Boolean);return i.length===1&&r.includes(i[0])?!0:i.length!==1&&i.length!==2?!1:i.every(e=>(0,t.length)(e)||(0,t.percentage)(e)||e===`auto`)})}})),require_pluginUtils=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{updateAllClasses:function(){return K},asValue:function(){return ee},parseColorFormat:function(){return ue},asColor:function(){return fe},asLookupValue:function(){return me},typeMap:function(){return Te},coerceValue:function(){return ze},getMatchingTypes:function(){return qe}});var n=u(require_escapeCommas()),r=require_withAlphaVariable(),i=require_dataTypes(),a=u(require_negateValue()),o=require_validateFormalSyntax(),c=require_featureFlags();function u(e){return e&&e.__esModule?e:{default:e}}function K(e,t){e.walkClasses(e=>{e.value=t(e.value),e.raws&&e.raws.value&&(e.raws.value=(0,n.default)(e.raws.value))})}function Y(e,t){if(!te(e))return;let n=e.slice(1,-1);if(t(n))return(0,i.normalize)(n)}function X(e,t={},n){let r=t[e];if(r!==void 0)return(0,a.default)(r);if(te(e)){let t=Y(e,n);return t===void 0?void 0:(0,a.default)(t)}}function ee(e,t={},{validate:n=()=>!0}={}){var r;let i=t.values?.[e];return i===void 0?t.supportsNegativeValues&&e.startsWith(`-`)?X(e.slice(1),t.values,n):Y(e,n):i}function te(e){return e.startsWith(`[`)&&e.endsWith(`]`)}function ce(e){let t=e.lastIndexOf(`/`),n=e.lastIndexOf(`[`,t),r=e.indexOf(`]`,t);return e[t-1]!==`]`&&e[t+1]!==`[`&&n!==-1&&r!==-1&&n<t&&t<r&&(t=e.lastIndexOf(`/`,n)),t===-1||t===e.length-1||te(e)&&!e.includes(`]/[`)?[e,void 0]:[e.slice(0,t),e.slice(t+1)]}function ue(e){if(typeof e==`string`&&e.includes(`<alpha-value>`)){let t=e;return({opacityValue:e=1})=>t.replace(/<alpha-value>/g,e)}return e}function de(e){return(0,i.normalize)(e.slice(1,-1))}function fe(e,t={},{tailwindConfig:n={}}={}){var a;if(t.values?.[e]!==void 0){var o;return ue(t.values?.[e])}let[c,u]=ce(e);if(u!==void 0){var K,Y,X,fe;let e=t.values?.[c]??(te(c)?c.slice(1,-1):void 0);return e===void 0?void 0:(e=ue(e),te(u)?(0,r.withAlphaValue)(e,de(u)):n.theme?.opacity?.[u]===void 0?void 0:(0,r.withAlphaValue)(e,n.theme.opacity[u]))}return ee(e,t,{validate:i.color})}function me(e,t={}){var n;return t.values?.[e]}function ge(e){return(t,n)=>ee(t,n,{validate:e})}var Te={any:ee,color:fe,url:ge(i.url),image:ge(i.image),length:ge(i.length),percentage:ge(i.percentage),position:ge(i.position),lookup:me,"generic-name":ge(i.genericName),"family-name":ge(i.familyName),number:ge(i.number),"line-width":ge(i.lineWidth),"absolute-size":ge(i.absoluteSize),"relative-size":ge(i.relativeSize),shadow:ge(i.shadow),size:ge(o.backgroundSize)},Oe=Object.keys(Te);function Ae(e,t){let n=e.indexOf(t);return n===-1?[void 0,e]:[e.slice(0,n),e.slice(n+1)]}function ze(e,t,n,r){if(n.values&&t in n.values)for(let{type:i}of e??[]){let e=Te[i](t,n,{tailwindConfig:r});if(e!==void 0)return[e,i,null]}if(te(t)){let e=t.slice(1,-1),[r,i]=Ae(e,`:`);if(!/^[\w-_]+$/g.test(r))i=e;
5else if(r!==void 0&&!Oe.includes(r))return[];if(i.length>0&&Oe.includes(r))return[ee(`[${i}]`,n),r,null]}let i=qe(e,t,n,r);for(let e of i)return e;return[]}function*qe(e,t,n,r){let i=(0,c.flagEnabled)(r,`generalizedModifiers`),[a,o]=ce(t);if(i&&n.modifiers!=null&&(n.modifiers===`any`||typeof n.modifiers==`object`&&(o&&te(o)||o in n.modifiers))||(a=t,o=void 0),o!==void 0&&a===``&&(a=`DEFAULT`),o!==void 0&&typeof n.modifiers==`object`){var u,K;let e=n.modifiers?.[o]??null;e===null?te(o)&&(o=de(o)):o=e}for(let{type:t}of e??[]){let e=Te[t](a,n,{tailwindConfig:r});e!==void 0&&(yield[e,t,o??null])}}})),require_toColorValue=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});function t(e){return typeof e==`function`?e({}):e}})),require_resolveConfig$1=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return Qe}});var t=te(require_negateValue()),n=te(require_corePluginList()),r=te(require_configurePlugins()),i=te(require_colors()),a=require_defaults(),o=require_toPath(),c=require_normalizeConfig(),u=te(require_isPlainObject()),K=require_cloneDeep(),Y=require_pluginUtils(),X=require_withAlphaVariable(),ee=te(require_toColorValue());function te(e){return e&&e.__esModule?e:{default:e}}function ce(e){return typeof e==`function`}function ue(e,...t){let n=t.pop();for(let r of t)for(let t in r){let i=n(e[t],r[t]);e[t]=i===void 0?(0,u.default)(e[t])&&(0,u.default)(r[t])?ue({},e[t],r[t],n):r[t]:i}return e}var de={colors:i.default,negative(e){return Object.keys(e).filter(t=>e[t]!==`0`).reduce((n,r)=>{let i=(0,t.default)(e[r]);return i!==void 0&&(n[`-${r}`]=i),n},{})},breakpoints(e){return Object.keys(e).filter(t=>typeof e[t]==`string`).reduce((t,n)=>({...t,[`screen-${n}`]:e[n]}),{})}};function fe(e,...t){return ce(e)?e(...t):e}function me(e){return e.reduce((e,{extend:t})=>ue(e,t,(e,t)=>e===void 0?[t]:Array.isArray(e)?[t,...e]:[t,e]),{})}function ge(e){return{...e.reduce((e,t)=>(0,a.defaults)(e,t),{}),extend:me(e)}}function Te(e,t){if(Array.isArray(e)&&(0,u.default)(e[0]))return e.concat(t);if(Array.isArray(t)&&(0,u.default)(t[0])&&(0,u.default)(e))return[e,...t];if(Array.isArray(t))return t}function Oe({extend:e,...t}){return ue(t,e,(e,t)=>!ce(e)&&!t.some(ce)?ue({},e,...t,Te):(n,r)=>ue({},...[e,...t].map(e=>fe(e,n,r)),Te))}function*Ae(e){let t=(0,o.toPath)(e);if(t.length===0||(yield t,Array.isArray(e)))return;let n=e.match(/^(.*?)\s*\/\s*([^/]+)$/);if(n!==null){let[,e,t]=n,r=(0,o.toPath)(e);r.alpha=t,yield r}}function ze(e){let t=(n,r)=>{for(let r of Ae(n)){let n=0,i=e;for(;i!=null&&n<r.length;)i=i[r[n++]],i=ce(i)&&(r.alpha===void 0||n<=r.length-1)?i(t,de):i;if(i!==void 0){if(r.alpha!==void 0){let e=(0,Y.parseColorFormat)(i);return(0,X.withAlphaValue)(e,r.alpha,(0,ee.default)(e))}return(0,u.default)(i)?(0,K.cloneDeep)(i):i}}return r};return Object.assign(t,{theme:t,...de}),Object.keys(e).reduce((n,r)=>(n[r]=ce(e[r])?e[r](t,de):e[r],n),{})}function qe(e){let t=[];return e.forEach(e=>{t=[...t,e];var n;let r=e?.plugins??[];r.length!==0&&r.forEach(e=>{e.__isOptionsFunction&&(e=e());var n;t=[...t,...qe([e?.config??{}])]})}),t}function Ye(e){return[...e].reduceRight((e,t)=>ce(t)?t({corePlugins:e}):(0,r.default)(t,e),n.default)}function Ze(e){return[...e].reduceRight((e,t)=>[...e,...t],[])}function Qe(e){let t=[...qe(e),{prefix:``,important:!1,separator:`:`}];var n,r;return(0,c.normalizeConfig)((0,a.defaults)({theme:ze(Oe(ge(t.map(e=>e?.theme??{})))),corePlugins:Ye(t.map(e=>e.corePlugins)),plugins:Ze(e.map(e=>e?.plugins??[]))},...t))}})),require_getAllConfigs=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i}});var t=r(require_config_full()),n=require_featureFlags();function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var r;let a=(e?.presets??[t.default]).slice().reverse().flatMap(e=>i(e instanceof Function?e():e)),o={respectDefaultRingColorOpacity:{theme:{ringColor:({theme:e})=>({DEFAULT:`#3b82f67f`,...e(`colors`)})}},disableColorOpacityUtilitiesByDefault:{corePlugins:{backgroundOpacity:!1,borderOpacity:!1,divideOpacity:!1,placeholderOpacity:!1,ringOpacity:!1,textOpacity:!1}}};return[e,...Object.keys(o).filter(t=>(0,n.flagEnabled)(e,t)).map(e=>o[e]),...a]}})),require_resolve_config=__commonJSMin((e=>
vendor: 4,611 bytes, line 5
5{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i}});var t=r(require_resolveConfig$1()),n=r(require_getAllConfigs());function r(e){return e&&e.__esModule?e:{default:e}}function i(...e){let[,...r]=(0,n.default)(e[0]);return(0,t.default)([...e,...r])}})),require_resolveConfig=__commonJSMin(((e,t)=>{var n=require_resolve_config();t.exports=(n.__esModule?n:{default:n}).default})),require_react_production_min=__commonJSMin((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),c=Symbol.for(`react.context`),u=Symbol.for(`react.forward_ref`),K=Symbol.for(`react.suspense`),Y=Symbol.for(`react.memo`),X=Symbol.for(`react.lazy`),ee=Symbol.iterator;function te(e){return typeof e!=`object`||!e?null:(e=ee&&e[ee]||e[`@@iterator`],typeof e==`function`?e:null)}var ce={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ue=Object.assign,de={};function fe(e,t,n){this.props=e,this.context=t,this.refs=de,this.updater=n||ce}fe.prototype.isReactComponent={},fe.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},fe.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function me(){}me.prototype=fe.prototype;function ge(e,t,n){this.props=e,this.context=t,this.refs=de,this.updater=n||ce}var Te=ge.prototype=new me;Te.constructor=ge,ue(Te,fe.prototype),Te.isPureReactComponent=!0;var Oe=Array.isArray,Ae=Object.prototype.hasOwnProperty,ze={current:null},qe={key:!0,ref:!0,__self:!0,__source:!0};function Ye(e,n,r){var i,a={},o=null,c=null;if(n!=null)for(i in n.ref!==void 0&&(c=n.ref),n.key!==void 0&&(o=``+n.key),n)Ae.call(n,i)&&!qe.hasOwnProperty(i)&&(a[i]=n[i]);var u=arguments.length-2;if(u===1)a.children=r;else if(1<u){for(var K=Array(u),Y=0;Y<u;Y++)K[Y]=arguments[Y+2];a.children=K}if(e&&e.defaultProps)for(i in u=e.defaultProps,u)a[i]===void 0&&(a[i]=u[i]);return{$$typeof:t,type:e,key:o,ref:c,props:a,_owner:ze.current}}function Ze(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function Qe(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function et(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var nt=/\/+/g;function rt(e,t){return typeof e==`object`&&e&&e.key!=null?et(``+e.key):t.toString(36)}function it(e,r,i,a,o){var c=typeof e;(c===`undefined`||c===`boolean`)&&(e=null);var u=!1;if(e===null)u=!0;else switch(c){case`string`:case`number`:u=!0;break;case`object`:switch(e.$$typeof){case t:case n:u=!0}}if(u)return u=e,o=o(u),e=a===``?`.`+rt(u,0):a,Oe(o)?(i=``,e!=null&&(i=e.replace(nt,`$&/`)+`/`),it(o,r,i,``,function(e){return e})):o!=null&&(Qe(o)&&(o=Ze(o,i+(!o.key||u&&u.key===o.key?``:(``+o.key).replace(nt,`$&/`)+`/`)+e)),r.push(o)),1;if(u=0,a=a===``?`.`:a+`:`,Oe(e))for(var K=0;K<e.length;K++){c=e[K];var Y=a+rt(c,K);u+=it(c,r,i,Y,o)}else if(Y=te(e),typeof Y==`function`)for(e=Y.call(e),K=0;!(c=e.next()).done;)c=c.value,Y=a+rt(c,K++),u+=it(c,r,i,Y,o);else if(c===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return u}function at(e,t,n){if(e==null)return e;var r=[],i=0;return it(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ot(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var st={current:null},ct={transition:null},lt={ReactCurrentDispatcher:st,ReactCurrentBatchConfig:ct,ReactCurrentOwner:ze};e.Children={map:at,forEach:function(e,t,n){at(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return at(e,function(){t++}),t},toArray:function(e){return at(e,function(e){return e})||[]},only:function(e){if(!Qe(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=fe,e.Fragment=r,e.Profiler=a,e.PureComponent=ge,e.StrictMode=i,e.Suspense=K,e.__SECRET_INT
5ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lt,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=ue({},e.props),a=e.key,o=e.ref,c=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,c=ze.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(K in n)Ae.call(n,K)&&!qe.hasOwnProperty(K)&&(i[K]=n[K]===void 0&&u!==void 0?u[K]:n[K])}var K=arguments.length-2;if(K===1)i.children=r;else if(1<K){u=Array(K);for(var Y=0;Y<K;Y++)u[Y]=arguments[Y+2];i.children=u}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:c}},e.createContext=function(e){return e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=Ye,e.createFactory=function(e){var t=Ye.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:u,render:e}},e.isValidElement=Qe,e.lazy=function(e){return{$$typeof:X,_payload:{_status:-1,_result:e},_init:ot}},e.memo=function(e,t){return{$$typeof:Y,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=ct.transition;ct.transition={};try{e()}finally{ct.transition=t}},e.unstable_act=function(){throw Error(`act(...) is not supported in production builds of React.`)},e.useCallback=function(e,t){return st.current.useCallback(e,t)},e.useContext=function(e){return st.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return st.current.useDeferredValue(e)},e.useEffect=function(e,t){return st.current.useEffect(e,t)},e.useId=function(){return st.current.useId()},e.useImperativeHandle=function(e,t,n){return st.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return st.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return st.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return st.current.useMemo(e,t)},e.useReducer=function(e,t,n){return st.current.useReducer(e,t,n)},e.useRef=function(e){return st.current.useRef(e)},e.useState=function(e){return st.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return st.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return st.current.useTransition()},e.version=`18.2.0`})),require_react=__commonJSMin(((e,t)=>{t.exports=require_react_production_min()})),require_react_jsx_runtime_production_min=__commonJSMin((e=>{var t=require_react(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var c,u={},K=null,Y=null;for(c in r!==void 0&&(K=``+r),t.key!==void 0&&(K=``+t.key),t.ref!==void 0&&(Y=t.ref),t)i.call(t,c)&&!o.hasOwnProperty(c)&&(u[c]=t[c]);if(e&&e.defaultProps)for(c in t=e.defaultProps,t)u[c]===void 0&&(u[c]=t[c]);return{$$typeof:n,type:e,key:K,ref:Y,props:u,_owner:a.current}}e.Fragment=r,e.jsx=c,e.jsxs=c})),require_jsx_runtime=__commonJSMin(((e,t)=>{t.exports=require_react_jsx_runtime_production_min()}));function $2b4dce13dd5a17fa$export$842a2cf37af977e1(e,t){return e-t*Math.floor(e/t)}var $3b62074eb05584b2$var$EPOCH=1721426;function $3b62074eb05584b2$export$f297eb839006d339(e,t,n,r){t=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(e,t);let i=t-1,a=-2;return n<=2?a=0:$3b62074eb05584b2$export$553d7fa8e3805fc0(t)&&(a=-1),1721425+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function $3b62074eb05584b2$export$553d7fa8e3805fc0(e){return e%4==0&&(e%100!=0||e%400==0)}function $3b62074eb05584b2$export$c36e0ecb2d4fa69d(e,t){return e===`BC`?1-t:t}function $3b62074eb05584b2$export$4475b7e617eb123c(e){let t=`AD`;return e<=0&&(t=`BC`,e=1-e),[t,e]}var $3b62074eb05584b2$var$daysInMonth={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},$3b62074eb05584b2$export$80ee6245ec4f29ec=class{fromJulianDay(e){let t=e,n=t-$3b62074eb05584b2$var$EPOCH,r=Math.floor(n/146097),i=$2b4dce13dd5a17fa$export$842a2cf37af977e1(n,146097),a=Math.floor(i/36524),o=$2b4dce13dd5a17fa$export$842a2cf37af977e1(i,36524),c=Math.floor(o/1461),u=$2b4dce13dd5a17fa$export$842a2cf37af977e1(o,1461),K=Math.floor(u/365),[Y,X]=$3b62074eb05584b2$export$4475b7e617eb123c(r*400+a
vendor: 7,326 bytes, line 5
5*100+c*4+K+ +(a!==4&&K!==4)),ee=t-$3b62074eb05584b2$export$f297eb839006d339(Y,X,1,1),te=2;t<$3b62074eb05584b2$export$f297eb839006d339(Y,X,3,1)?te=0:$3b62074eb05584b2$export$553d7fa8e3805fc0(X)&&(te=1);let ce=Math.floor(((ee+te)*12+373)/367);return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(Y,X,ce,t-$3b62074eb05584b2$export$f297eb839006d339(Y,X,ce,1)+1)}toJulianDay(e){return $3b62074eb05584b2$export$f297eb839006d339(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(e.year)?`leapyear`:`standard`][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return $3b62074eb05584b2$export$553d7fa8e3805fc0(e.year)?366:365}getYearsInEra(e){return 9999}getEras(){return[`BC`,`AD`]}isInverseEra(e){return e.era===`BC`}balanceDate(e){e.year<=0&&(e.era=e.era===`BC`?`AD`:`BC`,e.year=1-e.year)}constructor(){this.identifier=`gregory`}};function $14e0f24ef4ac5c92$export$461939dd4422153(e){return $11d87f3f76e88657$export$1b96692a1ba042ac(Date.now(),e)}function $14e0f24ef4ac5c92$export$68781ddf31c0090f(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(e,t){return $14e0f24ef4ac5c92$var$timeToMs(e)-$14e0f24ef4ac5c92$var$timeToMs(t)}function $14e0f24ef4ac5c92$var$timeToMs(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var $14e0f24ef4ac5c92$var$localTimeZone=null;function $14e0f24ef4ac5c92$export$aa8b41735afcabd2(){return $14e0f24ef4ac5c92$var$localTimeZone??=new Intl.DateTimeFormat().resolvedOptions().timeZone,$14e0f24ef4ac5c92$var$localTimeZone}function $14e0f24ef4ac5c92$export$5412ac11713b72ad(e){return e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1}function $14e0f24ef4ac5c92$export$b2f4953d301981d5(e){return e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1}function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(e){return e=$11d87f3f76e88657$export$b4a036af3fc0b032(e,new $3b62074eb05584b2$export$80ee6245ec4f29ec),$11d87f3f76e88657$var$epochFromParts($3b62074eb05584b2$export$c36e0ecb2d4fa69d(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function $11d87f3f76e88657$var$epochFromParts(e,t,n,r,i,a,o){let c=new Date;return c.setUTCHours(r,i,a,o),c.setUTCFullYear(e,t-1,n),c.getTime()}function $11d87f3f76e88657$export$59c99f3515d3493f(e,t){if(t===`UTC`)return 0;if(e>0&&t===$14e0f24ef4ac5c92$export$aa8b41735afcabd2())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:c}=$11d87f3f76e88657$var$getTimeZoneParts(e,t);return $11d87f3f76e88657$var$epochFromParts(n,r,i,a,o,c,0)-Math.floor(e/1e3)*1e3}var $11d87f3f76e88657$var$formattersByTimeZone=new Map;function $11d87f3f76e88657$var$getTimeZoneParts(e,t){let n=$11d87f3f76e88657$var$formattersByTimeZone.get(t);n||(n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),$11d87f3f76e88657$var$formattersByTimeZone.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)e.type!==`literal`&&(i[e.type]=e.value);return{year:i.era===`BC`||i.era===`B`?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour===`24`?0:+i.hour,minute:+i.minute,second:+i.second}}var $11d87f3f76e88657$var$DAYMILLIS=864e5;function $11d87f3f76e88657$var$getValidWallTimes(e,t,n,r){return(n===r?[n]:[n,r]).filter(n=>$11d87f3f76e88657$var$isValidWallTime(e,t,n))}function $11d87f3f76e88657$var$isValidWallTime(e,t,n){let r=$11d87f3f76e88657$var$getTimeZoneParts(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function $11d87f3f76e88657$export$5107c82f94518f5c(e,t,n=`compatible`){let r=$11d87f3f76e88657$export$b21e0b124e224484(e);if(t===`UTC`)return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(r);if(t===$14e0f24ef4ac5c92$export$aa8b41735afcabd2()&&n===`compatible`){r=$11d87f3f76e88657$export$b4a036af3fc0b032(r,new $3b62074eb05584b2$export$80ee6245ec4f29ec);let e=new Date,t=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(r.era,r.year);return e.setFullYear(t,r.month-1,r.day),e.setHours(r.hour,r.minute,r.second,r.millisecond),e.getTime()}let i=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(r),a=$11d87f3f76e88657$export$59c99f3515d3493f(i-$11d87f3f76e88657$var$DAYMILLIS,t),o=$11d87f3f76e88657$export$59c99f3515d3493f(i+$11d87f3f76e88657$var$DAYMILLIS,t),c=$11d87f3f76e88657$var$getValidWallTimes(r,t,i-a,i-o);if(c.length===1)return c[0];if(c.length>1)switch(n){case`compatible`:case`earlier`:return c[0];case`later`:return c[c.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(n){case`earlier`:return Math.min(i-a,i-o);case`compatible`:case`later`:return Math.max(i-a,i-o);case`reject`:throw RangeError(`No such absolute time found`)}}function $11d87f3f76e88657$export$e67a095c620b86fe(e,t,n=`compatible`){return new Date($11d87f3f76e88657$export$5107c82f94518f5c(e,t,n))}function $11d87f3f76e88657$export$1b96692a1ba042ac(e,t){let n=$11d87f3f76e88657$export$59c99f3515d3493f(e,t),r=new Date(e+n);return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),t,n,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function $11d87f3f76e88657$export$93522d1a439f3617(e){return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(e.calendar,e.era,e.year,e.month,e.day)}function $11d87f3f76e88657$export$b21e0b124e224484(e,t){let n=0,r=0,i=0,a=0;if(`timeZone`in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if(`hour`in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function $11d87f3f76e88657$export$b4a036af3fc0b032(e,t){if(e.calendar.identifier===t.identifier)return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,$735220c2d4774dd3$export$c4e2ecac49351ef2(r),r}function $11d87f3f76e88657$export$84c95a83c799e074(e,t,n){return e instanceof $35ea8db9cb2ccb90$export$d3b7288e7994edea?e.timeZone===t?e:$11d87f3f76e88657$export$538b00033cc11c75(e,t):$11d87f3f76e88657$export$1b96692a1ba042ac($11d87f3f76e88657$export$5107c82f94518f5c(e,t,n),t)}function $11d87f3f76e88657$export$83aac07b4c37b25(e){let t=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(e)-e.offset;return new Date(t)}function $11d87f3f76e88657$export$538b00033cc11c75(e,t){return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac($11d87f3f76e88657$export$bd4fb2bc8bb06fb(e)-e.offset,t),e.calendar)}var $735220c2d4774dd3$var$ONE_HOUR=36e5;function $735220c2d4774dd3$export$e16d8520af44a096(e,t){let n=e.copy(),r=`hour`in n?$735220c2d4774dd3$var$addTimeFields(n,t):0;$735220c2d4774dd3$var$addYears(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,$735220c2d4774dd3$var$balanceYearMonth(n),$735220c2d4774dd3$var$constrainMonthDay(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,$735220c2d4774dd3$var$balanceDay(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a,o;let e=(o=n.calendar).isInverseEra?.call(o,n);
vendor: 8,619 bytes, line 5
5n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let c=n.calendar.getMonthsInYear(n);return n.month>c&&(n.month=c,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function $735220c2d4774dd3$var$addYears(e,t){var n,r;(r=e.calendar).isInverseEra?.call(r,e)&&(t=-t),e.year+=t}function $735220c2d4774dd3$var$balanceYearMonth(e){for(;e.month<1;)$735220c2d4774dd3$var$addYears(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,$735220c2d4774dd3$var$addYears(e,1)}function $735220c2d4774dd3$var$balanceDay(e){for(;e.day<1;)e.month--,$735220c2d4774dd3$var$balanceYearMonth(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,$735220c2d4774dd3$var$balanceYearMonth(e)}function $735220c2d4774dd3$var$constrainMonthDay(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function $735220c2d4774dd3$export$c4e2ecac49351ef2(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),$735220c2d4774dd3$var$constrainMonthDay(e)}function $735220c2d4774dd3$export$3e2544e88a25bff8(e){let t={};for(let n in e)typeof e[n]==`number`&&(t[n]=-e[n]);return t}function $735220c2d4774dd3$export$4e2d2ead65e5f7e3(e,t){return $735220c2d4774dd3$export$e16d8520af44a096(e,$735220c2d4774dd3$export$3e2544e88a25bff8(t))}function $735220c2d4774dd3$export$adaa4cf7ef1b65be(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),$735220c2d4774dd3$export$c4e2ecac49351ef2(n),n}function $735220c2d4774dd3$export$e5d5e1c1822b6e56(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),$735220c2d4774dd3$export$7555de1e070510cb(n),n}function $735220c2d4774dd3$var$balanceTime(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=$735220c2d4774dd3$var$nonNegativeMod(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=$735220c2d4774dd3$var$nonNegativeMod(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=$735220c2d4774dd3$var$nonNegativeMod(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=$735220c2d4774dd3$var$nonNegativeMod(e.hour,24),t}function $735220c2d4774dd3$export$7555de1e070510cb(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function $735220c2d4774dd3$var$nonNegativeMod(e,t){let n=e%t;return n<0&&(n+=t),n}function $735220c2d4774dd3$var$addTimeFields(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,$735220c2d4774dd3$var$balanceTime(e)}function $735220c2d4774dd3$export$d52ced6badfb9a4c(e,t,n,r){let i=e.copy();switch(t){case`era`:{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error(`Invalid era: `+e.era);a=$735220c2d4774dd3$var$cycleValue(a,n,0,t.length-1,r?.round),i.era=t[a],$735220c2d4774dd3$export$c4e2ecac49351ef2(i);break}case`year`:var a,o;(o=i.calendar).isInverseEra?.call(o,i)&&(n=-n),i.year=$735220c2d4774dd3$var$cycleValue(e.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case`month`:i.month=$735220c2d4774dd3$var$cycleValue(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case`day`:i.day=$735220c2d4774dd3$var$cycleValue(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error(`Unsupported field `+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),$735220c2d4774dd3$export$c4e2ecac49351ef2(i),i}function $735220c2d4774dd3$export$dd02b3e0007dfe28(e,t,n,r){let i=e.copy();switch(t){case`hour`:{let t=e.hour,a=0,o=23;if(r?.hourCycle===12){let e=t>=12;a=e?12:0,o=e?23:11}i.hour=$735220c2d4774dd3$var$cycleValue(t,n,a,o,r?.round);break}case`minute`:i.minute=$735220c2d4774dd3$var$cycleValue(e.minute,n,0,59,r?.round);break;case`second`:i.second=$735220c2d4774dd3$var$cycleValue(e.second,n,0,59,r?.round);break;case`millisecond`:i.millisecond=$735220c2d4774dd3$var$cycleValue(e.millisecond,n,0,999,r?.round);break;default:throw Error(`Unsupported field `+t)}return i}function $735220c2d4774dd3$var$cycleValue(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e<n&&(e=r);let i=Math.abs(t);e=t>0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,e<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function $735220c2d4774dd3$export$96b1d28349274637(e,t){let n;return n=t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?$11d87f3f76e88657$export$5107c82f94518f5c($735220c2d4774dd3$export$e16d8520af44a096($11d87f3f76e88657$export$b21e0b124e224484(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):$11d87f3f76e88657$export$bd4fb2bc8bb06fb(e)-e.offset,n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5,$11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(n,e.timeZone),e.calendar)}function $735220c2d4774dd3$export$6814caac34ca03c7(e,t){return $735220c2d4774dd3$export$96b1d28349274637(e,$735220c2d4774dd3$export$3e2544e88a25bff8(t))}function $735220c2d4774dd3$export$9a297d111fc86b79(e,t,n,r){switch(t){case`hour`:{let t=0,i=23;if(r?.hourCycle===12){let n=e.hour>=12;t=n?12:0,i=n?23:11}let a=$11d87f3f76e88657$export$b21e0b124e224484(e),o=$11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(a,{hour:t}),new $3b62074eb05584b2$export$80ee6245ec4f29ec),c=[$11d87f3f76e88657$export$5107c82f94518f5c(o,e.timeZone,`earlier`),$11d87f3f76e88657$export$5107c82f94518f5c(o,e.timeZone,`later`)].filter(t=>$11d87f3f76e88657$export$1b96692a1ba042ac(t,e.timeZone).day===o.day)[0],u=$11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(a,{hour:i}),new $3b62074eb05584b2$export$80ee6245ec4f29ec),K=[$11d87f3f76e88657$export$5107c82f94518f5c(u,e.timeZone,`earlier`),$11d87f3f76e88657$export$5107c82f94518f5c(u,e.timeZone,`later`)].filter(t=>$11d87f3f76e88657$export$1b96692a1ba042ac(t,e.timeZone).day===u.day).pop(),Y=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(e)-e.offset,X=Math.floor(Y/$735220c2d4774dd3$var$ONE_HOUR),ee=Y%$735220c2d4774dd3$var$ONE_HOUR;return Y=$735220c2d4774dd3$var$cycleValue(X,n,Math.floor(c/$735220c2d4774dd3$var$ONE_HOUR),Math.floor(K/$735220c2d4774dd3$var$ONE_HOUR),r?.round)*$735220c2d4774dd3$var$ONE_HOUR+ee,$11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(Y,e.timeZone),e.calendar)}case`minute`:case`second`:case`millisecond`:return $735220c2d4774dd3$export$dd02b3e0007dfe28(e,t,n,r);case`era`:case`year`:case`month`:case`day`:return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac($11d87f3f76e88657$export$5107c82f94518f5c($735220c2d4774dd3$export$d52ced6badfb9a4c($11d87f3f76e88657$export$b21e0b124e224484(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error(`Unsupported field `+t)}}function $735220c2d4774dd3$export$31b5430eb18be4f8(e,t,n){let r=$11d87f3f76e88657$export$b21e0b124e224484(e),i=$735220c2d4774dd3$export$e5d5e1c1822b6e56($735220c2d4774dd3$export$adaa4cf7ef1b65be(r,t),t);return i.compare(r)===0?e:$11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac($11d87f3f76e88657$export$5107c82f94518f5c(i,e.timeZone,n),e.timeZone),e.calendar)}var $fae977aafc393c5c$var$DATE_RE=/^(\d{4})-(\d{2})-(\d{2})$/,$fae977aafc393c5c$var$requiredDurationTimeGroups=[`hours`,`minutes`,`seconds`],$fae977aafc393c5c$var$requiredDurationGroups=[`years`,`months`,`weeks`,`days`,...$fae977aafc393c5c$var$requiredDurationTimeGroups];function $fae977aafc393c5c$export$6b862160d295c8e(e){let t=e.match($fae977aafc393c5c$var$DATE_RE);if(!t)throw Error(`Invalid ISO 8601 date string: `+e);let n=new $35ea8db9cb2ccb90$export$99faa760c7908e4f($fae977aafc393c5c$var$parseNumber(t[1],0,9999),$fae977aafc393c5c$var$parseNumber(t[2],1,12),1);return n.day=$fae977aafc393c5c$var$parseNumber(t[3],0,n.calendar.getDaysInMonth(n)),n}function $fae977aafc393c5c$var$parseNumber(e,t,n){let r=Number(e);if(r<t||r>n)throw RangeError(`Value out of range: ${t} <= ${r} <= ${n}`);return r}function $fae977aafc393c5c$export$f59dee82248f5ad4(e){return`${String(e.hour).padStart(2,`0`)}
5:${String(e.minute).padStart(2,`0`)}:${String(e.second).padStart(2,`0`)}${e.millisecond?String(e.millisecond/1e3).slice(1):``}`}function $fae977aafc393c5c$export$60dfd74aa96791bd(e){let t=$11d87f3f76e88657$export$b4a036af3fc0b032(e,new $3b62074eb05584b2$export$80ee6245ec4f29ec);return`${String(t.year).padStart(4,`0`)}-${String(t.month).padStart(2,`0`)}-${String(t.day).padStart(2,`0`)}`}function $fae977aafc393c5c$export$4223de14708adc63(e){return`${$fae977aafc393c5c$export$60dfd74aa96791bd(e)}T${$fae977aafc393c5c$export$f59dee82248f5ad4(e)}`}function $fae977aafc393c5c$var$offsetToString(e){let t=Math.sign(e)<0?`-`:`+`;e=Math.abs(e);let n=Math.floor(e/36e5),r=e%36e5/6e4;return`${t}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`}function $fae977aafc393c5c$export$bf79f1ebf4b18792(e){return`${$fae977aafc393c5c$export$4223de14708adc63(e)}${$fae977aafc393c5c$var$offsetToString(e.offset)}[${e.timeZone}]`}var import_react=__toESM(require_react(),1);function _check_private_redeclaration(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function _class_private_field_init(e,t,n){_check_private_redeclaration(e,t),t.set(e,n)}function $35ea8db9cb2ccb90$var$shiftArgs(e){let t=typeof e[0]==`object`?e.shift():new $3b62074eb05584b2$export$80ee6245ec4f29ec,n;if(typeof e[0]==`string`)n=e.shift();else{let e=t.getEras();n=e[e.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var $35ea8db9cb2ccb90$var$_type=new WeakMap,$35ea8db9cb2ccb90$export$99faa760c7908e4f=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(e){return $735220c2d4774dd3$export$e16d8520af44a096(this,e)}subtract(e){return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this,e)}set(e){return $735220c2d4774dd3$export$adaa4cf7ef1b65be(this,e)}cycle(e,t,n){return $735220c2d4774dd3$export$d52ced6badfb9a4c(this,e,t,n)}toDate(e){return $11d87f3f76e88657$export$e67a095c620b86fe(this,e)}toString(){return $fae977aafc393c5c$export$60dfd74aa96791bd(this)}compare(e){return $14e0f24ef4ac5c92$export$68781ddf31c0090f(this,e)}constructor(...e){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type,{writable:!0,value:void 0});let[t,n,r,i,a]=$35ea8db9cb2ccb90$var$shiftArgs(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}},$35ea8db9cb2ccb90$var$_type2=new WeakMap,$35ea8db9cb2ccb90$export$ca871e8dbb80966f=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return $735220c2d4774dd3$export$e16d8520af44a096(this,e)}subtract(e){return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this,e)}set(e){return $735220c2d4774dd3$export$adaa4cf7ef1b65be($735220c2d4774dd3$export$e5d5e1c1822b6e56(this,e),e)}cycle(e,t,n){switch(e){case`era`:case`year`:case`month`:case`day`:return $735220c2d4774dd3$export$d52ced6badfb9a4c(this,e,t,n);default:return $735220c2d4774dd3$export$dd02b3e0007dfe28(this,e,t,n)}}toDate(e,t){return $11d87f3f76e88657$export$e67a095c620b86fe(this,e,t)}toString(){return $fae977aafc393c5c$export$4223de14708adc63(this)}compare(e){let t=$14e0f24ef4ac5c92$export$68781ddf31c0090f(this,e);return t===0?$14e0f24ef4ac5c92$export$c19a80a9721b80f6(this,$11d87f3f76e88657$export$b21e0b124e224484(e)):t}constructor(...e){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type2,{writable:!0,value:void 0});let[t,n,r,i,a]=$35ea8db9cb2ccb90$var$shiftArgs(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}},$35ea8db9cb2ccb90$var$_type3=new WeakMap,$35ea8db9cb2ccb90$export$d3b7288e7994edea=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return $735220c2d4774dd3$export$96b1d28349274637(this,e)}subtract(e){return $735220c2d4774dd3$export$6814caac34ca03c7(this,e)}set(e,t){return $735220c2d4774dd3$export$31b5430eb18be4f8(this,e,t)}cycle(e,t,n){return $735220c2d4774dd3$export$9a297d111fc86b79(this,e,t,n)}toDate(){return $11d87f3f76e88657$export$83aac07b4c37b25(this)}toString(){return $fae977aafc393c5c$export$bf79f1ebf4b18792(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-$11d87f3f76e88657$export$84c95a83c799e074(e,this.timeZone).toDate().getTime()}constructor(...e){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type3,{writable:!0,value:void 0});let[t,n,r,i,a]=$35ea8db9cb2ccb90$var$shiftArgs(e),o=e.shift(),c=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.timeZone=o,this.offset=c,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}},$fb18d541ea1ad717$var$formatterCache=new Map,$fb18d541ea1ad717$export$ad991b66133851cf=class{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange==`function`)return this.formatter.formatRange(e,t);if(t<e)throw RangeError(`End date must be >= start date`);return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts==`function`)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError(`End date must be >= start date`);let n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return $fb18d541ea1ad717$var$hasBuggyResolvedHourCycle()&&(this.resolvedHourCycle||=$fb18d541ea1ad717$var$getResolvedHourCycle(e.locale,this.options),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle===`h11`||this.resolvedHourCycle===`h12`),e.calendar===`ethiopic-amete-alem`&&(e.calendar=`ethioaa`),e}constructor(e,t={}){this.formatter=$fb18d541ea1ad717$var$getCachedDateFormatter(e,t),this.options=t}},$fb18d541ea1ad717$var$hour12Preferences={true:{ja:`h11`},false:{}};function $fb18d541ea1ad717$var$getCachedDateFormatter(e,t={}){if(typeof t.hour12==`boolean`&&$fb18d541ea1ad717$var$hasBuggyHour12Behavior()){t={...t};
5let n=$fb18d541ea1ad717$var$hour12Preferences[String(t.hour12)][e.split(`-`)[0]],r=t.hour12?`h12`:`h23`;t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if($fb18d541ea1ad717$var$formatterCache.has(n))return $fb18d541ea1ad717$var$formatterCache.get(n);let r=new Intl.DateTimeFormat(e,t);return $fb18d541ea1ad717$var$formatterCache.set(n,r),r}var $fb18d541ea1ad717$var$_hasBuggyHour12Behavior=null;function $fb18d541ea1ad717$var$hasBuggyHour12Behavior(){return $fb18d541ea1ad717$var$_hasBuggyHour12Behavior??=new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,hour12:!1}).format(new Date(2020,2,3,0))===`24`,$fb18d541ea1ad717$var$_hasBuggyHour12Behavior}var $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle=null;function $fb18d541ea1ad717$var$hasBuggyResolvedHourCycle(){return $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle??=new Intl.DateTimeFormat(`fr`,{hour:`numeric`,hour12:!1}).resolvedOptions().hourCycle===`h12`,$fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle}function $fb18d541ea1ad717$var$getResolvedHourCycle(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,``),e+=(e.includes(`-u-`)?``:`-u`)+`-nu-latn`;let n=$fb18d541ea1ad717$var$getCachedDateFormatter(e,{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(e=>e.type===`hour`).value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>e.type===`hour`).value,10);if(r===0&&i===23)return`h23`;if(r===24&&i===23)return`h24`;if(r===0&&i===11)return`h11`;if(r===12&&i===11)return`h12`;throw Error(`Unexpected hour cycle result`)}function $458b0a5536c1a7cf$export$40bfa8c7b0832715(e,t,n){let[r,i]=(0,import_react.useState)(e||t),a=(0,import_react.useRef)(e!==void 0),o=e!==void 0;(0,import_react.useEffect)(()=>{let e=a.current;e!==o&&console.warn(`WARN: A component changed from ${e?`controlled`:`uncontrolled`} to ${o?`controlled`:`uncontrolled`}.`),a.current=o},[o]);let c=o?e:r,u=(0,import_react.useCallback)((e,...t)=>{let r=(e,...t)=>{n&&(Object.is(c,e)||n(e,...t)),o||(c=e)};typeof e==`function`?(console.warn(`We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320`),i((n,...i)=>{let a=e(o?c:n,...i);return r(a,...t),o?n:a})):(o||i(e),r(e,...t))},[o,c,n]);return[c,u]}function $9446cca9a3875146$export$7d15b64cf5a3a4c4(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function $9446cca9a3875146$export$e1a7b8e69ef6c52f(e,t){let n=e,r=t.toString(),i=r.indexOf(`.`),a=i>
vendor: 9,177 bytes, line 5
5=0?r.length-i:0;if(a>0){let e=10**a;n=Math.round(n*e)/e}return n}function $9446cca9a3875146$export$cb6e0bb50bc19463(e,t,n,r){t=Number(t),n=Number(n);let i=(e-(isNaN(t)?0:t))%r,a=$9446cca9a3875146$export$e1a7b8e69ef6c52f(Math.abs(i)*2>=r?e+Math.sign(i)*(r-Math.abs(i)):e-i,r);return isNaN(t)?!isNaN(n)&&a>n&&(a=Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f(n/r,r))*r):a<t?a=t:!isNaN(n)&&a>n&&(a=t+Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f((n-t)/r,r))*r),a=$9446cca9a3875146$export$e1a7b8e69ef6c52f(a,r),a}var $e5be200c675c3b3a$export$aca958c65c314e6c={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},$e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE={...$e5be200c675c3b3a$export$aca958c65c314e6c,customError:!0,valid:!1},$e5be200c675c3b3a$export$dad6ae84456c676a={isInvalid:!1,validationDetails:$e5be200c675c3b3a$export$aca958c65c314e6c,validationErrors:[]},$e5be200c675c3b3a$export$571b5131b7e65c11=(0,import_react.createContext)({}),$e5be200c675c3b3a$export$a763b9476acd3eb=`__formValidationState`+Date.now();function $e5be200c675c3b3a$export$fc1a364ae1f3ff10(e){if(e[$e5be200c675c3b3a$export$a763b9476acd3eb]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[$e5be200c675c3b3a$export$a763b9476acd3eb];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return $e5be200c675c3b3a$var$useFormValidationStateImpl(e)}function $e5be200c675c3b3a$var$useFormValidationStateImpl(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:o,validationBehavior:c=`aria`}=e;n&&(t||=n===`invalid`);let u=t===void 0?null:{isInvalid:t,validationErrors:[],validationDetails:$e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE},K=(0,import_react.useMemo)(()=>$e5be200c675c3b3a$var$getValidationResult($e5be200c675c3b3a$var$runValidate(o,i)),[o,i]);a?.validationDetails.valid&&(a=null);let Y=(0,import_react.useContext)($e5be200c675c3b3a$export$571b5131b7e65c11),X=(0,import_react.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>$e5be200c675c3b3a$var$asArray(Y[e])):$e5be200c675c3b3a$var$asArray(Y[r]):[],[Y,r]),[ee,te]=(0,import_react.useState)(Y),[ce,ue]=(0,import_react.useState)(!1);Y!==ee&&(te(Y),ue(!1));let de=(0,import_react.useMemo)(()=>$e5be200c675c3b3a$var$getValidationResult(ce?[]:X),[ce,X]),fe=(0,import_react.useRef)($e5be200c675c3b3a$export$dad6ae84456c676a),[me,ge]=(0,import_react.useState)($e5be200c675c3b3a$export$dad6ae84456c676a),Te=(0,import_react.useRef)($e5be200c675c3b3a$export$dad6ae84456c676a),Oe=()=>{if(!Ae)return;ze(!1);let e=K||a||fe.current;$e5be200c675c3b3a$var$isEqualValidation(e,Te.current)||(Te.current=e,ge(e))},[Ae,ze]=(0,import_react.useState)(!1);return(0,import_react.useEffect)(Oe),{realtimeValidation:u||de||K||a||$e5be200c675c3b3a$export$dad6ae84456c676a,displayValidation:c===`native`?u||de||me:u||de||K||a||me,updateValidation(e){c===`aria`&&!$e5be200c675c3b3a$var$isEqualValidation(me,e)?ge(e):fe.current=e},resetValidation(){let e=$e5be200c675c3b3a$export$dad6ae84456c676a;$e5be200c675c3b3a$var$isEqualValidation(e,Te.current)||(Te.current=e,ge(e)),c===`native`&&ze(!1),ue(!0)},commitValidation(){c===`native`&&ze(!0),ue(!0)}}}function $e5be200c675c3b3a$var$asArray(e){return e?Array.isArray(e)?e:[e]:[]}function $e5be200c675c3b3a$var$runValidate(e,t){if(typeof e==`function`){let n=e(t);if(n&&typeof n!=`boolean`)return $e5be200c675c3b3a$var$asArray(n)}return[]}function $e5be200c675c3b3a$var$getValidationResult(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:$e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE}:null}function $e5be200c675c3b3a$var$isEqualValidation(e,t){return e===t||e&&t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,n)=>e===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([e,n])=>t.validationDetails[e]===n)}var $5b160d28a433310d$var$localeSymbol$1=Symbol.for(`react-aria.i18n.locale`),$5b160d28a433310d$var$stringsSymbol$1=Symbol.for(`react-aria.i18n.strings`),$5b160d28a433310d$var$cachedGlobalStrings$1=void 0,$5b160d28a433310d$export$c17fa47878dc55b6$1=class e{getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=$5b160d28a433310d$var$getStringsForLocale$1(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(t){if(typeof window>`u`)return null;let n=window[$5b160d28a433310d$var$localeSymbol$1];if($5b160d28a433310d$var$cachedGlobalStrings$1===void 0){let t=window[$5b160d28a433310d$var$stringsSymbol$1];if(!t)return null;$5b160d28a433310d$var$cachedGlobalStrings$1={};for(let r in t)$5b160d28a433310d$var$cachedGlobalStrings$1[r]=new e({[n]:t[r]},n)}let r=$5b160d28a433310d$var$cachedGlobalStrings$1?.[t];if(!r)throw Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,t=`en-US`){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}};function $5b160d28a433310d$var$getStringsForLocale$1(e,t,n=`en-US`){if(t[e])return t[e];let r=$5b160d28a433310d$var$getLanguage$1(e);if(t[r])return t[r];for(let e in t)if(e.startsWith(r+`-`))return t[e];return t[n]}function $5b160d28a433310d$var$getLanguage$1(e){return Intl.Locale?new Intl.Locale(e).language:e.split(`-`)[0]}var $6db58dc88e78b024$var$pluralRulesCache$1=new Map,$6db58dc88e78b024$var$numberFormatCache$1=new Map,$6db58dc88e78b024$export$2f817fcdc4b89ae0$1=class{format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return typeof n==`function`?n(t,this):n}plural(e,t,n=`cardinal`){let r=t[`=`+e];if(r)return typeof r==`function`?r():r;let i=this.locale+`:`+n,a=$6db58dc88e78b024$var$pluralRulesCache$1.get(i);return a||(a=new Intl.PluralRules(this.locale,{type:n}),$6db58dc88e78b024$var$pluralRulesCache$1.set(i,a)),r=t[a.select(e)]||t.other,typeof r==`function`?r():r}number(e){let t=$6db58dc88e78b024$var$numberFormatCache$1.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),$6db58dc88e78b024$var$numberFormatCache$1.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return typeof n==`function`?n():n}constructor(e,t){this.locale=e,this.strings=t}},$488c6ddbf4ef74c2$var$formatterCache=new Map,$488c6ddbf4ef74c2$var$supportsSignDisplay=!1;try{$488c6ddbf4ef74c2$var$supportsSignDisplay=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}var $488c6ddbf4ef74c2$var$supportsUnit=!1;try{$488c6ddbf4ef74c2$var$supportsUnit=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}var $488c6ddbf4ef74c2$var$UNITS={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}},$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5=class{format(e){let t=``;if(t=!$488c6ddbf4ef74c2$var$supportsSignDisplay&&this.options.signDisplay!=null?$488c6ddbf4ef74c2$export$711b50b3c525e0f2(this.numberFormatter,this.options.signDisplay,e):this.numberFormatter.format(e),this.options.style===`unit`&&!$488c6ddbf4ef74c2$var$supportsUnit){var n;let{unit:e,unitDisplay:r=`short`,locale:i}=this.resolvedOptions();if(!e)return t;let a=$488c6ddbf4ef74c2$var$UNITS[e]?.[r];t+=a[i]||a.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(e,t);if(t<e)throw RangeError(`End date must be >= start date`);return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw RangeError(`End date must be >= start date`);let n=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!$488c6ddbf4ef74c2$var$supportsSignDisplay&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!$488c6ddbf4ef74c2$var$supportsUnit&&this.options.style===`unit`&&(e={...e,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=$488c6ddbf4ef74c2$var$getCachedNumberFormatter(e,t),this.options=t}};function $488c6ddbf4ef74c2$var$getCachedNumberFormatter(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes(`-nu-`)&&(e.includes(`-u-`)||(e+=`-u-`),e+=`-nu-${n}`),t.style===`unit`&&!$488c6ddbf4ef74c2$var$supportsUnit){var r;let{unit:e,unitDisplay:n=`short`}=t;if(!e)throw Error(`unit option must be provided with style: "unit"`);if(!$488c6ddbf4ef74c2$var$UNITS[e]?.[n])throw Error(`Unsupported unit ${e} with unitDisplay = ${n}`);t={...t,style:`decimal`}}let i=e+(t?Object.entries(t).sort((e,t)=>
vendor: 4,506 bytes, line 5
5e[0]<t[0]?-1:1).join():``);if($488c6ddbf4ef74c2$var$formatterCache.has(i))return $488c6ddbf4ef74c2$var$formatterCache.get(i);let a=new Intl.NumberFormat(e,t);return $488c6ddbf4ef74c2$var$formatterCache.set(i,a),a}function $488c6ddbf4ef74c2$export$711b50b3c525e0f2(e,t,n){if(t===`auto`)return e.format(n);if(t===`never`)return e.format(Math.abs(n));{let r=!1;if(t===`always`?r=n>0||Object.is(n,0):t===`exceptZero`&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let t=e.format(-n),r=e.format(n),i=t.replace(r,``).replace(/\u200e|\u061C/,``);return[...i].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`),t.replace(r,`!!!`).replace(i,`+`).replace(`!!!`,r)}return e.format(n)}}var $6c7bd7858deea686$var$CURRENCY_SIGN_REGEX=RegExp(`^.*\\(.*\\).*$`),$6c7bd7858deea686$var$NUMBERING_SYSTEMS=[`latn`,`arab`,`hanidec`],$6c7bd7858deea686$export$cd11ab140839f11d=class{parse(e){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}},$6c7bd7858deea686$var$numberParserCache=new Map;function $6c7bd7858deea686$var$getNumberParserImpl(e,t,n){let r=$6c7bd7858deea686$var$getCachedNumberParser(e,t);if(!e.includes(`-nu-`)&&!r.isValidPartialNumber(n)){for(let i of $6c7bd7858deea686$var$NUMBERING_SYSTEMS)if(i!==r.options.numberingSystem){let r=$6c7bd7858deea686$var$getCachedNumberParser(e+(e.includes(`-u-`)?`-nu-`:`-u-nu-`)+i,t);if(r.isValidPartialNumber(n))return r}}return r}function $6c7bd7858deea686$var$getCachedNumberParser(e,t){let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``),r=$6c7bd7858deea686$var$numberParserCache.get(n);return r||(r=new $6c7bd7858deea686$var$NumberParserImpl(e,t),$6c7bd7858deea686$var$numberParserCache.set(n,r)),r}var $6c7bd7858deea686$var$NumberParserImpl=class{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=$6c7bd7858deea686$var$replaceAll(t,this.symbols.group,``)),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,`.`)),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,`-`)),t=t.replace(this.symbols.numeral,this.symbols.index),this.options.style===`percent`){let e=t.indexOf(`-`);t=t.replace(`-`,``);let n=t.indexOf(`.`);n===-1&&(n=t.length),t=t.replace(`.`,``),t=n-2==0?`0.${t}`:n-2==-1?`0.0${t}`:n-2==-2?`0.00`:`${t.slice(0,n-2)}.${t.slice(n-2)}`,e>-1&&(t=`-${t}`)}let n=t?+t:NaN;if(isNaN(n))return NaN;if(this.options.style===`percent`){var r,i;let e={...this.options,style:`decimal`,minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new $6c7bd7858deea686$export$cd11ab140839f11d(this.locale,e).parse(new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(this.locale,e).format(n))}return this.options.currencySign===`accounting`&&$6c7bd7858deea686$var$CURRENCY_SIGN_REGEX.test(e)&&(n=-1*n),n}sanitize(e){return e=e.replace(this.symbols.literals,``),this.symbols.minusSign&&(e=e.replace(`-`,this.symbols.minusSign)),this.options.numberingSystem===`arab`&&(this.symbols.decimal&&(e=e.replace(`,`,this.symbols.decimal),e=e.replace(`،`,this.symbols.decimal)),this.symbols.group&&(e=$6c7bd7858deea686$var$replaceAll(e,`.`,this.symbols.group))),this.options.locale===`fr-FR`&&(e=$6c7bd7858deea686$var$replaceAll(e,`.`,` `)),e}isValidPartialNumber(e,t=-1/0,n=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=$6c7bd7858deea686$var$replaceAll(e,this.symbols.group,``)),e=e.replace(this.symbols.numeral,``),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,``)),e.length===0)}constructor(e,t={}){this.locale=e,this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=$6c7bd7858deea686$var$getSymbols(e,this.formatter,this.options,t);var n,r;this.options.style===`percent`&&((this.options.minimumFractionDigits??
50)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn(`NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.`)}},$6c7bd7858deea686$var$nonLiteralParts=new Set([`decimal`,`fraction`,`integer`,`minusSign`,`plusSign`,`group`]),$6c7bd7858deea686$var$pluralNumbers=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function $6c7bd7858deea686$var$getSymbols(e,t,n,r){var i,a,o,c;let u=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21}),K=u.formatToParts(-10000.111),Y=u.formatToParts(10000.111),X=$6c7bd7858deea686$var$pluralNumbers.map(e=>u.formatToParts(e));var ee;let te=K.find(e=>e.type===`minusSign`)?.value??`-`,ce=Y.find(e=>e.type===`plusSign`)?.value;!ce&&(r?.signDisplay===`exceptZero`||r?.signDisplay===`always`)&&(ce=`+`);let ue=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>e.type===`decimal`)?.value,de=K.find(e=>e.type===`group`)?.value,fe=K.filter(e=>!$6c7bd7858deea686$var$nonLiteralParts.has(e.type)).map(e=>$6c7bd7858deea686$var$escapeRegex(e.value)),me=X.flatMap(e=>e.filter(e=>!$6c7bd7858deea686$var$nonLiteralParts.has(e.type)).map(e=>$6c7bd7858deea686$var$escapeRegex(e.value))),ge=[...new Set([...fe,...me])].sort((e,t)=>t.length-e.length),Te=ge.length===0?RegExp(`[\\p{White_Space}]`,`gu`):RegExp(`${ge.join(`|`)}|[\\p{White_Space}]`,`gu`),Oe=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),Ae=new Map(Oe.map((e,t)=>[e,t])),ze=RegExp(`[${Oe.join(``)}]`,`g`);return{minusSign:te,plusSign:ce,decimal:ue,group:de,literals:Te,numeral:ze,index:e=>String(Ae.get(e))}}function $6c7bd7858deea686$var$replaceAll(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function $6c7bd7858deea686$var$escapeRegex(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}var $28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE=0,$28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE=100,$28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE=1;function $28f99e3e86e6ec45$export$e5fda3247f5d67f9(e){let{isDisabled:t=!1,minValue:n=$28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE,maxValue:r=$28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE,numberFormatter:i,step:a=$28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE,orientation:o=`horizontal`}=e,c=(0,import_react.useMemo)(()=>{let e=(r-n)/10;return e=$9446cca9a3875146$export$cb6e0bb50bc19463(e,0,e+a,a),Math.max(e,a)},[a,r,n]),u=(0,import_react.useCallback)(e=>e?.map((t,i)=>$9446cca9a3875146$export$cb6e0bb50bc19463(t,i===0?n:t[i-1],i===e.length-1?r:t[i+1],a)),[n,r,a]),K=(0,import_react.useMemo)(()=>u($28f99e3e86e6ec45$var$convertValue(e.value)),[e.value]),Y=(0,import_react.useMemo)(()=>{var t;return u($28f99e3e86e6ec45$var$convertValue(e.defaultValue)??[n])},[e.defaultValue,n]),X=$28f99e3e86e6ec45$var$createOnChange(e.value,e.defaultValue,e.onChange),ee=$28f99e3e86e6ec45$var$createOnChange(e.value,e.defaultValue,e.onChangeEnd),[te,ce]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(K,Y,X),[ue,de]=(0,import_react.useState)(Array(te.length).fill(!1)),fe=(0,import_react.useRef)(Array(te.length).fill(!0)),[me,ge]=(0,import_react.useState)(void 0),Te=(0,import_react.useRef)(te),Oe=(0,import_react.useRef)(ue),Ae=e=>{Te.current=e,ce(e)},ze=e=>{Oe.current=e,de(e)};function qe(e){return(e-n)/(r-n)}function Ye(e){return e===0?n:te[e-1]}function Ze(e){return e===te.length-1?r:te[e+1]}function Qe(e){return fe.current[e]}function et(e,t){fe.current[e]=t}function nt(e,n){if(t||!Qe(e))return;let r=Ye(e),i=Ze(e);n=$9446cca9a3875146$export$cb6e0bb50bc19463(n,r,i,a);let o=$28f99e3e86e6ec45$var$replaceIndex(Te.current,e,n);Ae(o)}function rt(e,n){if(t||!Qe(e))return;n&&(Te.current=te);let r=Oe.current[e];Oe.current=$28f99e3e86e6ec45$var$replaceIndex(Oe.current,e,n),ze(Oe.current),ee&&r&&!Oe.current.some(Boolean)&&ee(Te.current)}function it(e){return i.format(e)}function at(e,t){nt(e,st(t))}function ot(e){return Math.round((e-n)/a)*a+n}function st(e){return $9446cca9a3875146$export$7d15b64cf5a3a4c4(ot(e*(r-n)+n),n,r)}function ct(e,t=1){let i=Math.max(t,a);nt(e,$9446cca9a3875146$export$cb6e0bb50bc19463(te[e]+i,n,r,a))}function lt(e,t=1){let i=Math.max(t,a);nt(e,$9446cca9a3875146$export$cb6e0bb50bc19463(te[e]-i,n,r,a))}return{values:te,getThumbValue:e=>te[e],setThumbValue:nt,setThumbPercent:at,isThumbDragging:e=>ue[e],setThumbDragging:rt,focusedThumb:me,setFocusedThumb:ge,getThumbPercent:e=>qe(te[e]),getValuePercent:qe,getThumbValueLabel:e=>it(te[e]),getFormattedValue:it,getThumbMinValue:Ye,getThumbMaxValue:Ze,getPercentValue:st,isThumbEditable:Qe,setThumbEditable:et,incrementThumb:ct,decrementThumb:lt,step:a,pageSize:c,orientation:o,isDisabled:t}}function $28f99e3e86e6ec45$var$replaceIndex(e,t,n){return e[t]===n?e:[...e.slice(0,t),n,...e.slice(t+1)]}function $28f99e3e86e6ec45$var$convertValue(e){if(e!=null)return Array.isArray(e)?e:[e]}function $28f99e3e86e6ec45$var$createOnChange(e,t,n){return r=>{typeof e==`number`||typeof t==`number`?n?.(r[0]):n?.(r)}}function $de67e98908f0c6ee$export$7f629e9dc1ecf37c(e){let{minValue:t,maxValue:n,step:r,formatOptions:i,value:a,defaultValue:o=NaN,onChange:c,locale:u,isDisabled:K,isReadOnly:Y}=e;a===null&&(a=NaN),a!==void 0&&!isNaN(a)&&(a=r!==void 0&&!isNaN(r)?$9446cca9a3875146$export$cb6e0bb50bc19463(a,t,n,r):$9446cca9a3875146$export$7d15b64cf5a3a4c4(a,t,n)),isNaN(o)||(o=r!==void 0&&!isNaN(r)?$9446cca9a3875146$export$cb6e0bb50bc19463(o,t,n,r):$9446cca9a3875146$export$7d15b64cf5a3a4c4(o,t,n));let[X,ee]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(a,isNaN(o)?NaN:o,c),[te,ce]=(0,import_react.useState)(()=>isNaN(X)?``:new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(u,i).format(X)),ue=(0,import_react.useMemo)(()=>new $6c7bd7858deea686$export$cd11ab140839f11d(u,i),[u,i]),de=(0,import_react.useMemo)(()=>ue.getNumberingSystem(te),[ue,te]),fe=(0,import_react.useMemo)(()=>new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(u,{...i,numberingSystem:de}),[u,i,de]),me=(0,import_react.useMemo)(()=>fe.resolvedOptions(),[fe]),ge=(0,import_react.useCallback)(e=>isNaN(e)||e===null?``:fe.format(e),[fe]),Te=$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:X}),Oe=r!==void 0&&!isNaN(r)?r:1;me.style===`percent`&&(r===void 0||isNaN(r))&&(Oe=.01);let[Ae,ze]=(0,import_react.useState)(X),[qe,Ye]=(0,import_react.useState)(u),[Ze,Qe]=(0,import_react.useState)(i);
vendor: 2,235 bytes, line 5
5(!Object.is(X,Ae)||u!==qe||i!==Ze)&&(ce(ge(X)),ze(X),Ye(u),Qe(i));let et=(0,import_react.useMemo)(()=>ue.parse(te),[ue,te]),nt=()=>{if(!te.length){ee(NaN),ce(a===void 0?``:ge(X));return}if(isNaN(et)){ce(ge(X));return}let e;e=r===void 0||isNaN(r)?$9446cca9a3875146$export$7d15b64cf5a3a4c4(et,t,n):$9446cca9a3875146$export$cb6e0bb50bc19463(et,t,n,r),e=ue.parse(ge(e)),ee(e),ce(ge(a===void 0?e:X))},rt=(e,r=0)=>{let i=et;if(isNaN(i))return $9446cca9a3875146$export$cb6e0bb50bc19463(isNaN(r)?0:r,t,n,Oe);{let r=$9446cca9a3875146$export$cb6e0bb50bc19463(i,t,n,Oe);return e===`+`&&r>i||e===`-`&&r<i?r:$9446cca9a3875146$export$cb6e0bb50bc19463($de67e98908f0c6ee$var$handleDecimalOperation(e,i,Oe),t,n,Oe)}},it=()=>{let e=rt(`+`,t);e===X&&ce(ge(e)),ee(e),Te.commitValidation()},at=()=>{let e=rt(`-`,n);e===X&&ce(ge(e)),ee(e),Te.commitValidation()},ot=()=>{n!=null&&(ee($9446cca9a3875146$export$cb6e0bb50bc19463(n,t,n,Oe)),Te.commitValidation())},st=()=>{t!=null&&(ee(t),Te.commitValidation())},ct=(0,import_react.useMemo)(()=>!K&&!Y&&(isNaN(et)||n===void 0||isNaN(n)||$9446cca9a3875146$export$cb6e0bb50bc19463(et,t,n,Oe)>et||$de67e98908f0c6ee$var$handleDecimalOperation(`+`,et,Oe)<=n),[K,Y,t,n,Oe,et]),lt=(0,import_react.useMemo)(()=>!K&&!Y&&(isNaN(et)||t===void 0||isNaN(t)||$9446cca9a3875146$export$cb6e0bb50bc19463(et,t,n,Oe)<et||$de67e98908f0c6ee$var$handleDecimalOperation(`-`,et,Oe)>=t),[K,Y,t,n,Oe,et]),ut=e=>ue.isValidPartialNumber(e,t,n);return{...Te,validate:ut,increment:it,incrementToMax:ot,decrement:at,decrementToMin:st,canIncrement:ct,canDecrement:lt,minValue:t,maxValue:n,numberValue:et,setNumberValue:ee,setInputValue:ce,inputValue:te,commit:nt}}function $de67e98908f0c6ee$var$handleDecimalOperation(e,t,n){let r=e===`+`?t+n:t-n;if(t%1!=0||n%1!=0){let i=t.toString().split(`.`),a=n.toString().split(`.`),o=i[1]&&i[1].length||0,c=a[1]&&a[1].length||0,u=10**Math.max(o,c);t=Math.round(t*u),n=Math.round(n*u),r=e===`+`?t+n:t-n,r/=u}return r}function $c1d7fb2ec91bae71$var$Item(e){return null}$c1d7fb2ec91bae71$var$Item.getCollectionNode=function*(e,t){let{childItems:n,title:r,children:i}=e,a=e.title||e.children,o=e.textValue||(typeof a==`string`?a:``)||e[`aria-label`]||``;!o&&!t?.suppressTextValueWarning&&console.warn("<Item>
5 with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop."),yield{type:`item`,props:e,rendered:a,textValue:o,"aria-label":e[`aria-label`],hasChildNodes:$c1d7fb2ec91bae71$var$hasChildItems(e),*childNodes(){if(n)for(let e of n)yield{type:`item`,value:e};else if(r){let e=[];import_react.Children.forEach(i,t=>{e.push({type:`item`,element:t})}),yield*e}}}};function $c1d7fb2ec91bae71$var$hasChildItems(e){return e.hasChildItems==null?!!(e.childItems||e.title&&import_react.Children.count(e.children)>0):e.hasChildItems}var $c1d7fb2ec91bae71$export$6d08773d2e66f8f2=$c1d7fb2ec91bae71$var$Item,$eb2240fc39a57fa5$export$bf788dd355e3a401=class{build(e,t){return this.context=t,$eb2240fc39a57fa5$var$iterable(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(import_react.isValidElement(t)&&t.type===import_react.Fragment)yield*this.iterateCollection({children:t.props.children,items:n});else if(typeof t==`function`){if(!n)throw Error(`props.children was a function but props.items is missing`);for(let n of e.items)yield*this.getFullNode({value:n},{renderer:t})}else{let e=[];import_react.Children.forEach(t,t=>{e.push(t)});let n=0;for(let t of e){let e=this.getFullNode({element:t,index:n},{});for(let t of e)n++,yield t}}}
vendor: 13,483 bytes, line 5
5getKey(e,t,n,r){if(e.key!=null)return e.key;if(t.type===`cell`&&t.key!=null)return`${r}${t.key}`;let i=t.value;if(i!=null){var a;let e=i.key??i.id;if(e==null)throw Error(`No key found for item`);return e}return r?`${r}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,r){if(import_react.isValidElement(e.element)&&e.element.type===import_react.Fragment){let i=[];import_react.Children.forEach(e.element.props.children,e=>{i.push(e)});let a=e.index;for(let e of i)yield*this.getFullNode({element:e,index:a++},t,n,r);return}let i=e.element;if(!i&&e.value&&t&&t.renderer){let n=this.cache.get(e.value);if(n&&(!n.shouldInvalidate||!n.shouldInvalidate(this.context))){n.index=e.index,n.parentKey=r?r.key:null,yield n;return}i=t.renderer(e.value)}if(import_react.isValidElement(i)){let a=i.type;if(typeof a!=`function`&&typeof a.getCollectionNode!=`function`){let e=typeof i.type==`function`?i.type.name:i.type;throw Error(`Unknown element <${e}> in collection.`)}let o=a.getCollectionNode(i.props,this.context),c=e.index,u=o.next();for(;!u.done&&u.value;){let a=u.value;e.index=c;let K=a.key;K||=a.element?null:this.getKey(i,e,t,n);let Y=[...this.getFullNode({...a,key:K,index:c,wrapper:$eb2240fc39a57fa5$var$compose(e.wrapper,a.wrapper)},this.getChildState(t,a),n?`${n}${i.key}`:i.key,r)];for(let t of Y){if(t.value=a.value||e.value,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${$eb2240fc39a57fa5$var$capitalize(t.type)}> in <${$eb2240fc39a57fa5$var$capitalize(r.type)}>. Only <${$eb2240fc39a57fa5$var$capitalize(e.type)}> is supported.`);c++,yield t}u=o.next(Y)}return}if(e.key==null)return;let a=this,o={type:e.type,props:e.props,key:e.key,parentKey:r?r.key:null,value:e.value,level:r?r.level+1:0,index:e.index,rendered:e.rendered,textValue:e.textValue,"aria-label":e[`aria-label`],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes,childNodes:$eb2240fc39a57fa5$var$iterable(function*(){if(!e.hasChildNodes)return;let n=0;for(let r of e.childNodes()){r.key!=null&&(r.key=`${o.key}${r.key}`),r.index=n;let e=a.getFullNode(r,a.getChildState(t,r),o.key,o);for(let t of e)n++,yield t}})};yield o}constructor(){this.cache=new WeakMap}};function $eb2240fc39a57fa5$var$iterable(e){let t=[],n=null;return{*[Symbol.iterator](){for(let e of t)yield e;n||=e();for(let e of n)t.push(e),yield e}}}function $eb2240fc39a57fa5$var$compose(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function $eb2240fc39a57fa5$var$capitalize(e){return e[0].toUpperCase()+e.slice(1)}function $7613b1592d41b092$export$6cd28814d92fa9c9(e,t,n){let r=(0,import_react.useMemo)(()=>new $eb2240fc39a57fa5$export$bf788dd355e3a401,[]),{children:i,items:a,collection:o}=e;return(0,import_react.useMemo)(()=>o||t(r.build({children:i,items:a},n)),[r,i,a,o,n,t])}function $c5a24bc478652b5f$export$1005530eda016c13(e,t){return typeof t.getChildren==`function`?t.getChildren(e.key):e.childNodes}function $c5a24bc478652b5f$export$fbdeaa6a76694f71(e){return $c5a24bc478652b5f$export$5f3398f8733f90e2(e,0)}function $c5a24bc478652b5f$export$5f3398f8733f90e2(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function $c5a24bc478652b5f$export$8c434b3a7a4dad6(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...$c5a24bc478652b5f$var$getAncestors(e,t),t],i=[...$c5a24bc478652b5f$var$getAncestors(e,n),n],a=r.slice(0,i.length).findIndex((e,t)=>e!==i[t]);return a===-1?r.findIndex(e=>e===n)>=0?1:(i.findIndex(e=>e===t),-1):(t=r[a],n=i[a],t.index-n.index)}function $c5a24bc478652b5f$var$getAncestors(e,t){let n=[];for(;t?.parentKey!=null;)t=e.getItem(t.parentKey),n.unshift(t);return n}var $453cc9f0df89c0a5$var$cache=new WeakMap;function $453cc9f0df89c0a5$export$77d5aafae4e095b2(e){let t=$453cc9f0df89c0a5$var$cache.get(e);if(t!=null)return t;t=0;let n=r=>{for(let i of r)i.type===`section`?n($c5a24bc478652b5f$export$1005530eda016c13(i,e)):t++};return n(e),$453cc9f0df89c0a5$var$cache.set(e,t),t}var $a02d57049d202695$export$d085fb9e920b5ca7=class{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);var n;return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);var n;return t?t.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var t;return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){return this.keyMap.get(e)?.childNodes||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let t=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&e.type===`section`)for(let n of e.childNodes)t(n)};for(let n of e)t(n);let n=null,r=0;for(let[e,t]of this.keyMap)n?(n.nextKey=e,t.prevKey=n.key):(this.firstKey=e,t.prevKey=void 0),t.type===`item`&&(t.index=r++),n=t,n.nextKey=void 0;var i;this.lastKey=n?.key??null}},$e40ea825a81a3709$export$52baac22726c72bf=class e extends Set{constructor(t,n,r){super(t),t instanceof e?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function $7af3f5b51489e0b5$var$equalSets(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function $7af3f5b51489e0b5$export$253fe78d46329472(e){let{selectionMode:t=`none`,disallowEmptySelection:n,allowDuplicateSelectionEvents:r,selectionBehavior:i=`toggle`,disabledBehavior:a=`all`}=e,o=(0,import_react.useRef)(!1),[,c]=(0,import_react.useState)(!1),u=(0,import_react.useRef)(null),K=(0,import_react.useRef)(null),[,Y]=(0,import_react.useState)(null),[X,ee]=$458b0a5536c1a7cf$export$40bfa8c7b0832715((0,import_react.useMemo)(()=>$7af3f5b51489e0b5$var$convertSelection(e.selectedKeys),[e.selectedKeys]),(0,import_react.useMemo)(()=>$7af3f5b51489e0b5$var$convertSelection(e.defaultSelectedKeys,new $e40ea825a81a3709$export$52baac22726c72bf),[e.defaultSelectedKeys]),e.onSelectionChange),te=(0,import_react.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[ce,ue]=(0,import_react.useState)(i);i===`replace`&&ce===`toggle`&&typeof X==`object`&&X.size===0&&ue(`replace`);let de=(0,import_react.useRef)(i);return(0,import_react.useEffect)(()=>{i!==de.current&&(ue(i),de.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:ce,setSelectionBehavior:ue,get isFocused(){return o.current},setFocused(e){o.current=e,c(e)},get focusedKey(){return u.current},get childFocusStrategy(){return K.current},setFocusedKey(e,t=`first`){u.current=e,K.current=t,Y(e)},selectedKeys:X,setSelectedKeys(e){(r||!$7af3f5b51489e0b5$var$equalSets(e,X))&&ee(e)},disabledKeys:te,disabledBehavior:a}}function $7af3f5b51489e0b5$var$convertSelection(e,t){return e?e===`all`?`all`:new $e40ea825a81a3709$export$52baac22726c72bf(e):t}var $d496c0a20b6e58ec$export$6c8a5aaad13c9852=class{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return this.state.selectedKeys===`all`?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){return this.state.selectionMode!==`none`&&(e=this.getKey(e),this.state.selectedKeys===`all`?this.canSelectItem(e):this.state.selectedKeys.has(e))}get isEmpty(){return this.state.selectedKeys!==`all`&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys===`all`)return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&$c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection,n,e)<0)&&(e=n)}return e?.key}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&$c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection,n,e)>0)&&(e=n)}return e?.key}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`){this.replaceSelection(e);return}e=this.getKey(e);let t;if(this.state.selectedKeys===`all`)t=new $e40ea825a81a3709$export$52baac22726c72bf([e],e,e);else{let i=this.state.selectedKeys;var n;let a=i.anchorKey??e;t=new $e40ea825a81a3709$export$52baac22726c72bf(i,a,e);var r;for(let n of this.getKeyRange(a,i.currentKey??e))t.delete(n);for(let n of this.getKeyRange(e,a))this.canSelectItem(n)&&t.add(n)}this.state.setSelectedKeys(t)}getKeyRange(e,t){let n=this.collection.getItem(e),r=this.collection.getItem(t);return n&&r?$c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection,n,r)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){var n;if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let r=[],i=e;for(;i!=null;){let e=this.collection.getItem(i);if((e&&e.type===`item`||e.type===`cell`&&this.allowsCellSelection)&&r.push(i),i===t)return r;i=this.collection.getKeyAfter(i)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type===`cell`&&this.allowsCellSelection)return e;for(;t.type!==`item`&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!==`item`?null:t.key}toggleSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`&&!this.isSelected(e)){this.replaceSelection(e);return}if(e=this.getKey(e),e==null)return;let t=new $e40ea825a81a3709$export$52baac22726c72bf(this.state.selectedKeys===`all`?this.getSelectAllKeys():this.state.selectedKeys);t.has(e)?t.delete(e):this.canSelectItem(e)&&(t.add(e),t.anchorKey=e,t.currentKey=e),!(this.disallowEmptySelection&&t.size===0)&&this.state.setSelectedKeys(t)}replaceSelection(e){if(this.selectionMode===`none`||(e=this.getKey(e),e==null))return;let t=this.canSelectItem(e)?new $e40ea825a81a3709$export$52baac22726c72bf([e],e,e):new $e40ea825a81a3709$export$52baac22726c72bf;this.state.setSelectedKeys(t)}setSelectedKeys(e){if(this.selectionMode===`none`)return;let t=new $e40ea825a81a3709$export$52baac22726c72bf;for(let n of e)if(n=this.getKey(n),n!=null&&(t.add(n),this.selectionMode===`single`))break;this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=[],t=n=>{for(;n!=null;){if(this.canSelectItem(n)){let r=this.collection.getItem(n);r.type===`item`&&e.push(n),r.hasChildNodes&&(this.allowsCellSelection||r.type!==`item`)&&t($c5a24bc478652b5f$export$fbdeaa6a76694f71($c5a24bc478652b5f$export$1005530eda016c13(r,this.collection)).key)}n=this.collection.getKeyAfter(n)}};return t(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode===`multiple`&&this.state.setSelectedKeys(`all`)}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys===`all`||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new $e40ea825a81a3709$export$52baac22726c72bf)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!==`none`&&(this.selectionMode===`single`?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior===`toggle`||t&&(t.pointerType===`touch`||t.pointerType===`virtual`)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){var t;if(this.state.selectionMode===`none`||this.state.disabledKeys.has(e))return!1;let n=this.collection.getItem(e);return!(!n||n!=null&&n.props?.isDisabled||n.type===`cell`&&!this.allowsCellSelection)}isDisabled(e){var t,n;return this.state.disabledBehavior===`all`&&(this.state.disabledKeys.has(e)||!!((n=this.collection.getItem(e))!=null&&n.props?.isDisabled))}isLink(e){var t,n;return!!((n=this.collection.getItem(e))!=null&&n.props?.href)}getItemProps(e){var t;return this.collection.getItem(e)?.props}constructor(e,t,n){this.collection=e,this.state=t;var r;this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null}};function $e72dd72e1c76a225$export$2f645645f7bca764(e){let{filter:t,layoutDelegate:n}=e,r=$7af3f5b51489e0b5$export$253fe78d46329472(e),i=(0,import_react.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=$7613b1592d41b092$export$6cd28814d92fa9c9(e,(0,import_react.useCallback)(e=>t?new $a02d57049d202695$export$d085fb9e920b5ca7(t(e)):new $a02d57049d202695$export$d085fb9e920b5ca7(e),[t]),(0,import_react.useMemo)(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning])),o=(0,import_react.useMemo)(()=>new $d496c0a20b6e58ec$export$6c8a5aaad13c9852(a,r,{layoutDelegate:n}),[a,r,n]),c=(0,import_react.useRef)(null);return(0,import_react.useEffect)(()=>
5{if(r.focusedKey!=null&&!a.getItem(r.focusedKey)&&c.current){let X=c.current.getItem(r.focusedKey),ee=[...c.current.getKeys()].map(e=>{let t=c.current.getItem(e);return t?.type===`item`?t:null}).filter(e=>e!==null),te=[...a.getKeys()].map(e=>{let t=a.getItem(e);return t?.type===`item`?t:null}).filter(e=>e!==null);var e,t;let ce=(ee?.length??0)-(te?.length??0);var n,i,u;let ue=Math.min(ce>1?Math.max((X?.index??0)-ce+1,0):X?.index??0,(te?.length??0)-1),de=null,fe=!1;for(;ue>=0;){if(!o.isDisabled(te[ue].key)){de=te[ue];break}if(ue<te.length-1&&!fe)ue++;else{fe=!0;var K,Y;ue>(X?.index??0)&&(ue=X?.index??0),ue--}}r.setFocusedKey(de?de.key:null)}c.current=a},[a,o,r,r.focusedKey]),{collection:a,disabledKeys:i,selectionManager:o}}function $a0d645289fe9b86b$export$e7f05e985daf4b5f(e){var t;let[n,r]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(e.selectedKey,e.defaultSelectedKey??null,e.onSelectionChange),i=(0,import_react.useMemo)(()=>n==null?[]:[n],[n]),{collection:a,disabledKeys:o,selectionManager:c}=$e72dd72e1c76a225$export$2f645645f7bca764({...e,selectionMode:`single`,disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:t=>{if(t===`all`)return;var i;let a=t.values().next().value??null;a===n&&e.onSelectionChange&&e.onSelectionChange(a),r(a)}});return{collection:a,disabledKeys:o,selectionManager:c,selectedKey:n,setSelectedKey:r,selectedItem:n==null?null:a.getItem(n)}}function $fc909762b330b746$export$61c6a8c84e605fb6(e){let[t,n]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(e.isOpen,e.defaultOpen||!1,e.onOpenChange);return{isOpen:t,setOpen:n,open:(0,import_react.useCallback)(()=>{n(!0)},[n]),close:(0,import_react.useCallback)(()=>{n(!1)},[n]),toggle:(0,import_react.useCallback)(()=>{n(!t)},[n,t])}}var $b3427c06585c22a0$exports={};$b3427c06585c22a0$exports={rangeOverflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:`تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.`,rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:`البيانات المحددة غير متاحة.`};var $d282528f459122b9$exports={};$d282528f459122b9$exports={rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:`Началната дата трябва да е преди крайната.`,rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:`Избраната дата не е налична.`};var $2d5eecd634a9ca45$exports={};$2d5eecd634a9ca45$exports={rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:`Datum zahájení musí předcházet datu ukončení.`,rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:`Vybrané datum není k dispozici.`};var $c8e2288226c24a67$exports={};$c8e2288226c24a67$exports={rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:`Startdatoen skal være før slutdatoen.`,rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:`Den valgte dato er ikke tilgængelig.`};var $6f5745e389c346d7$exports={};$6f5745e389c346d7$exports={rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:`Das Anfangsdatum muss vor dem Enddatum liegen.`,rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:`Das ausgewählte Datum ist nicht verfügbar.`};var $8c882ccf4300d1da$exports={};
5$8c882ccf4300d1da$exports={rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:`Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.`,rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:`Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη.`};var $22195056771860be$exports={};$22195056771860be$exports={rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:`Start date must be before end date.`,unavailableDate:`Selected date unavailable.`};var $cedfa43b4e2a5906$exports={};$cedfa43b4e2a5906$exports={rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:`La fecha de inicio debe ser anterior a la fecha de finalización.`,rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:`Fecha seleccionada no disponible.`};var $eeeaa8daee3601c7$exports={};$eeeaa8daee3601c7$exports={rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:`Alguskuupäev peab olema enne lõppkuupäeva.`,rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:`Valitud kuupäev pole saadaval.`};var $35e0614a49b3bb40$exports={};$35e0614a49b3bb40$exports={rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:`Aloituspäivän on oltava ennen lopetuspäivää.`,rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:`Valittu päivämäärä ei ole käytettävissä.`};var $929bc63f7705a78f$exports={};$929bc63f7705a78f$exports={rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:`La date de début doit être antérieure à la date de fin.`,rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:`La date sélectionnée n’est pas disponible.`};var $9a28d073b034d183$exports={};$9a28d073b034d183$exports={rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:`תאריך ההתחלה חייב להיות לפני תאריך הסיום.`,rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:`התאריך הנבחר אינו זמין.`};var $7743e79780ebcca3$exports={};$7743e79780ebcca3$exports={rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:`Datum početka mora biti prije datuma završetka.`,rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:`Odabrani datum nije dostupan.`};var $3351817a04898858$exports={};$3351817a04898858$exports={rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:`A kezdő dátumnak a befejező dátumnál korábbinak kell lennie.`,rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:`A kiválasztott dátum nem érhető el.`};var $4120bdb1d03484db$exports={};$4120bdb1d03484db$exports={rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:`La data di inizio deve essere antecedente alla data di fine.`,rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:`Data selezionata non disponibile.`};var $65e5e1569f34ea4f$exports={};$65e5e1569f34ea4f$exports={rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}
5`,rangeReversed:`開始日は終了日より前にする必要があります。`,rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:`選択した日付は使用できません。`};var $d34552a7550967e7$exports={};$d34552a7550967e7$exports={rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:`시작일은 종료일 이전이어야 합니다.`,rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{C0C1}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:`선택한 날짜를 사용할 수 없습니다.`};var $8f855bffe63f6eca$exports={};$8f855bffe63f6eca$exports={rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:`Pradžios data turi būti ankstesnė nei pabaigos data.`,rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:`Pasirinkta data nepasiekiama.`};var $ce40f46d09034645$exports={};$ce40f46d09034645$exports={rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:`Sākuma datumam ir jābūt pirms beigu datuma.`,rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:`Atlasītais datums nav pieejams.`};var $dd1a9a73340c793e$exports={};$dd1a9a73340c793e$exports={rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:`Startdatoen må være før sluttdatoen.`,rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:`Valgt dato utilgjengelig.`};var $4ee1fb3f0cbe6f59$exports={};$4ee1fb3f0cbe6f59$exports={rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:`De startdatum moet voor de einddatum liggen.`,rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:`Geselecteerde datum niet beschikbaar.`};var $c85829aebb0bc94b$exports={};$c85829aebb0bc94b$exports={rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:`Data rozpoczęcia musi być wcześniejsza niż data zakończenia.`,rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:`Wybrana data jest niedostępna.`};var $27f5cd2291ca8a02$exports={};$27f5cd2291ca8a02$exports={rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:`A data inicial deve ser anterior à data final.`,rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:`Data selecionada indisponível.`};var $e046fdccd69bea8e$exports={};$e046fdccd69bea8e$exports={rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:`A data de início deve ser anterior à data de fim.`,rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:`Data selecionada indisponível.`};var $fa5f88e804986547$exports={};$fa5f88e804986547$exports={rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:`Data de început trebuie să fie anterioară datei de sfârșit.`,rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:`Data selectată nu este disponibilă.`};var $28e4714602d1b568$exports={};$28e4714602d1b568$exports={rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:`Дата начала должна предшествовать дате окончания.`,rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:`Выбранная дата недоступна.`};var $4e3bc8cf783ad569$exports={};$4e3bc8cf783ad569$exports={rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:`Dátum začiatku musí byť skorší ako dátum konca.`,rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:`Vybratý dátum je nedostupný.`};var $bee07513333bdc15$exports={};$bee07513333bdc15$exports={rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:`Začetni datum mora biti pred končnim datumom.`,rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:`Izbrani datum ni na voljo.`};var $7ed9c6fad16a15ec$exports={};$7ed9c6fad16a15ec$exports={rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:`Datum početka mora biti pre datuma završetka.`,rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:`Izabrani datum nije dostupan.`};var $8bef6d5a236de86c$exports={};$8bef6d5a236de86c$exports={rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:`Startdatumet måste vara före slutdatumet.`,rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:`Det valda datumet är inte tillgängligt.`};var $098b9a2d2340cfc5$exports={};$098b9a2d2340cfc5$exports={rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:`Başlangıç tarihi bitiş tarihinden önce olmalıdır.`,rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:`Seçilen tarih kullanılamıyor.`};var $54a862ea7fad7419$exports={};$54a862ea7fad7419$exports={rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:`Дата початку має передувати даті завершення.`,rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:`Вибрана дата недоступна.`};var $e6cc491d590dfda5$exports={};$e6cc491d590dfda5$exports={rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:`开始日期必须早于结束日期。`,rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:`所选日期不可用。`};var $9aebf53181a474bd$exports={};$9aebf53181a474bd$exports={rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}
5`,rangeReversed:`開始日期必須在結束日期之前。`,rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:`所選日期無法使用。`};var $452ac34de8c2444e$exports={};$452ac34de8c2444e$exports={"ar-AE":$b3427c06585c22a0$exports,"bg-BG":$d282528f459122b9$exports,"cs-CZ":$2d5eecd634a9ca45$exports,"da-DK":$c8e2288226c24a67$exports,"de-DE":$6f5745e389c346d7$exports,"el-GR":$8c882ccf4300d1da$exports,"en-US":$22195056771860be$exports,"es-ES":$cedfa43b4e2a5906$exports,"et-EE":$eeeaa8daee3601c7$exports,"fi-FI":$35e0614a49b3bb40$exports,"fr-FR":$929bc63f7705a78f$exports,"he-IL":$9a28d073b034d183$exports,"hr-HR":$7743e79780ebcca3$exports,"hu-HU":$3351817a04898858$exports,"it-IT":$4120bdb1d03484db$exports,"ja-JP":$65e5e1569f34ea4f$exports,"ko-KR":$d34552a7550967e7$exports,"lt-LT":$8f855bffe63f6eca$exports,"lv-LV":$ce40f46d09034645$exports,"nb-NO":$dd1a9a73340c793e$exports,"nl-NL":$4ee1fb3f0cbe6f59$exports,"pl-PL":$c85829aebb0bc94b$exports,"pt-BR":$27f5cd2291ca8a02$exports,"pt-PT":$e046fdccd69bea8e$exports,"ro-RO":$fa5f88e804986547$exports,"ru-RU":$28e4714602d1b568$exports,"sk-SK":$4e3bc8cf783ad569$exports,"sl-SI":$bee07513333bdc15$exports,"sr-SP":$7ed9c6fad16a15ec$exports,"sv-SE":$8bef6d5a236de86c$exports,"tr-TR":$098b9a2d2340cfc5$exports,"uk-UA":$54a862ea7fad7419$exports,"zh-CN":$e6cc491d590dfda5$exports,"zh-TW":$9aebf53181a474bd$exports};function $parcel$interopDefault$8(e){return e&&e.__esModule?e.default:e}var $35a22f14a1f04b11$var$dictionary=new $5b160d28a433310d$export$c17fa47878dc55b6$1($parcel$interopDefault$8($452ac34de8c2444e$exports));function $35a22f14a1f04b11$var$getLocale(){return typeof navigator<`u`&&(navigator.language||navigator.userLanguage)||`en-US`}function $35a22f14a1f04b11$export$f18627323ab57ac0(e,t,n,r,i){let a=e!=null&&n!=null&&e.compare(n)>0,o=e!=null&&t!=null&&e.compare(t)<0,c=e!=null&&r?.(e)||!1,u=a||o||c,K=[];if(u){let e=$35a22f14a1f04b11$var$getLocale(),r=new $6db58dc88e78b024$export$2f817fcdc4b89ae0$1(e,$5b160d28a433310d$export$c17fa47878dc55b6$1.getGlobalDictionaryForPackage(`@react-stately/datepicker`)||$35a22f14a1f04b11$var$dictionary),u=new $fb18d541ea1ad717$export$ad991b66133851cf(e,$35a22f14a1f04b11$export$7e319ea407e63bc0({},i)),Y=u.resolvedOptions().timeZone;o&&K.push(r.format(`rangeUnderflow`,{minValue:u.format(t.toDate(Y))})),a&&K.push(r.format(`rangeOverflow`,{maxValue:u.format(n.toDate(Y))})),c&&K.push(r.format(`unavailableDate`))}return{isInvalid:u,validationErrors:K,validationDetails:{badInput:c,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:o,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!u}}}var $35a22f14a1f04b11$var$DEFAULT_FIELD_OPTIONS={year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`},$35a22f14a1f04b11$var$TWO_DIGIT_FIELD_OPTIONS={year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`};function $35a22f14a1f04b11$export$7e319ea407e63bc0(e,t){e={...t.shouldForceLeadingZeros?$35a22f14a1f04b11$var$TWO_DIGIT_FIELD_OPTIONS:$35a22f14a1f04b11$var$DEFAULT_FIELD_OPTIONS,...e};let n=t.granularity||`minute`,r=Object.keys(e);var i;let a=r.indexOf(t.maxGranularity??`year`);a<0&&(a=0);let o=r.indexOf(n);if(o<0&&(o=2),a>o)throw Error(`maxGranularity must be greater than granularity`);let c=r.slice(a,o+1).reduce((t,n)=>(t[n]=e[n],t),{});return t.hourCycle!=null&&(c.hour12=t.hourCycle===12),c.timeZone=t.timeZone||`UTC`,(n===`hour`||n===`minute`||n===`second`)&&t.timeZone&&!t.hideTimeZone&&(c.timeZoneName=`short`),t.showEra&&a===0&&(c.era=`short`),c}function $35a22f14a1f04b11$export$61a490a80c552550(e,t){if(e===null)return null;if(e)return $11d87f3f76e88657$export$b4a036af3fc0b032(e,t)}function $35a22f14a1f04b11$export$66aa2b09de4b1ea5(e,t,n,r){if(e)return $35a22f14a1f04b11$export$61a490a80c552550(e,n);let i=$11d87f3f76e88657$export$b4a036af3fc0b032($14e0f24ef4ac5c92$export$461939dd4422153(r).set({hour:0,minute:0,second:0,millisecond:0}),n);return t===`year`||t===`month`||t===`day`?$11d87f3f76e88657$export$93522d1a439f3617(i):r?i:$11d87f3f76e88657$export$b21e0b124e224484(i)}function $35a22f14a1f04b11$export$2440da353cedad43(e,t){let n=e&&`timeZone`in e?e.timeZone:void 0,r=e&&`minute`in e?`minute`:`day`;if(e&&t&&!(t in e))throw Error(`Invalid granularity `+t+` for value `+e.toString());let[i,a]=(0,import_react.useState)([r,n]);e&&(i[0]!==r||i[1]!==n)&&a([r,n]),t||=e?r:i[0];let o=e?n:i[1];return[t,o]}var $3e3ed55ab2966714$var$placeholders=new $5b160d28a433310d$export$c17fa47878dc55b6$1({ach:{year:`mwaka`,month:`dwe`,day:`nino`},af:{year:`jjjj`,month:`mm`,day:`dd`},am:{year:`ዓዓዓዓ`,month:`ሚሜ`,day:`ቀቀ`},an:{year:`aaaa`,month:`mm`,day:`dd`},ar:{year:`سنة`,month:`شهر`,day:`يوم`},ast:{year:`aaaa`,month:`mm`,day:`dd`},az:{year:`iiii`,month:`aa`,day:`gg`},be:{year:`гггг`,month:`мм`,day:`дд`},bg:{year:`гггг`,month:`мм`,day:`дд`},bn:{year:`yyyy`,month:`মিমি`,day:`dd`},br:{year:`bbbb`,month:`mm`,day:`dd`},bs:{year:`gggg`,month:`mm`,day:`dd`},ca:{year:`aaaa`,month:`mm`,day:`dd`},cak:{year:`jjjj`,month:`ii`,day:`q'q'`},ckb:{year:`ساڵ`,month:`مانگ`,day:`ڕۆژ`},cs:{year:`rrrr`,month:`mm`,day:`dd`},cy:{year:`bbbb`,month:`mm`,day:`dd`},da:{year:`åååå`,month:`mm`,day:`dd`},de:{year:`jjjj`,month:`mm`,day:`tt`},dsb:{year:`llll`,month:`mm`,day:`źź`},el:{year:`εεεε`,month:`μμ`,day:`ηη`},en:{year:`yyyy`,month:`mm`,day:`dd`},eo:{year:`jjjj`,month:`mm`,day:`tt`},es:{year:`aaaa`,month:`mm`,day:`dd`},et:{year:`aaaa`,month:`kk`,day:`pp`},eu:{year:`uuuu`,month:`hh`,day:`ee`},fa:{year:`سال`,month:`ماه`,day:`روز`},ff:{year:`hhhh`,month:`ll`,day:`ññ`},fi:{year:`vvvv`,month:`kk`,day:`pp`},fr:{year:`aaaa`,month:`mm`,day:`jj`},fy:{year:`jjjj`,month:`mm`,day:`dd`},ga:{year:`bbbb`,month:`mm`,day:`ll`},gd:{year:`bbbb`,month:`mm`,day:`ll`},gl:{year:`aaaa`,month:`mm`,day:`dd`},he:{year:`שנה`,month:`חודש`,day:`יום`},hr:{year:`gggg`,month:`mm`,day:`dd`},hsb:{year:`llll`,month:`mm`,day:`dd`},hu:{year:`éééé`,month:`hh`,day:`nn`},ia:{year:`aaaa`,month:`mm`,day:`dd`},id:{year:`tttt`,month:`bb`,day:`hh`},it:{year:`aaaa`,month:`mm`,day:`gg`},ja:{year:` 年 `,month:`月`,day:`日`},ka:{year:`წწწწ`,month:`თთ`,day:`რრ`},kk:{year:`жжжж`,month:`аа`,day:`кк`},kn:{year:`ವವವವ`,month:`ಮಿಮೀ`,day:`ದಿದಿ`},ko:{year:`연도`,month:`월`,day:`일`},lb:{year:`jjjj`,month:`mm`,day:`dd`},lo:{year:`ປປປປ`,month:`ດດ`,day:`ວວ`},lt:{year:`mmmm`,month:`mm`,day:`dd`},lv:{year:`gggg`,month:`mm`,day:`dd`},meh:{year:`aaaa`,month:`mm`,day:`dd`},ml:{year:`വർഷം`,month:`മാസം`,day:`തീയതി`},ms:{year:`tttt`,month:`mm`,day:`hh`},nl:{year:`jjjj`,month:`mm`,day:`dd`},nn:{year:`åååå`,month:`mm`,day:`dd`},no:{year:`åååå`,month:`mm`,day:`dd`},oc:{year:`aaaa`,month:`mm`,day:`jj`},pl:{year:`rrrr`,month:`mm`,day:`dd`},pt:{year:`aaaa`,month:`mm`,day:`dd`},rm:{year:`oooo`,month:`mm`,day:`dd`},ro:{year:`aaaa`,month:`ll`,day:`zz`},ru:{year:`гггг`,month:`мм`,day:`дд`}
5,sc:{year:`aaaa`,month:`mm`,day:`dd`},scn:{year:`aaaa`,month:`mm`,day:`jj`},sk:{year:`rrrr`,month:`mm`,day:`dd`},sl:{year:`llll`,month:`mm`,day:`dd`},sr:{year:`гггг`,month:`мм`,day:`дд`},sv:{year:`åååå`,month:`mm`,day:`dd`},szl:{year:`rrrr`,month:`mm`,day:`dd`},tg:{year:`сссс`,month:`мм`,day:`рр`},th:{year:`ปปปป`,month:`ดด`,day:`วว`},tr:{year:`yyyy`,month:`aa`,day:`gg`},uk:{year:`рррр`,month:`мм`,day:`дд`},"zh-CN":{year:`年`,month:`月`,day:`日`},"zh-TW":{year:`年`,month:`月`,day:`日`}},`en`);function $3e3ed55ab2966714$export$d3f5c5e0a5023fa0(e,t,n){return e===`era`||e===`dayPeriod`?t:e===`year`||e===`month`||e===`day`?$3e3ed55ab2966714$var$placeholders.getStringForLocale(e,n):`––`}var $3c0fc76039f1c516$var$EDITABLE_SEGMENTS={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},$3c0fc76039f1c516$var$PAGE_STEP={year:5,month:2,day:7,hour:2,minute:15,second:15},$3c0fc76039f1c516$var$TYPE_MAPPING={dayperiod:`dayPeriod`};function $3c0fc76039f1c516$export$60e84778edff6d26(e){let{locale:t,createCalendar:n,hideTimeZone:r,isDisabled:i,isReadOnly:a,isRequired:o,minValue:c,maxValue:u,isDateUnavailable:K}=e,Y=e.value||e.defaultValue||e.placeholderValue,[X,ee]=$35a22f14a1f04b11$export$2440da353cedad43(Y,e.granularity),te=ee||`UTC`;if(Y&&!(X in Y))throw Error(`Invalid granularity `+X+` for value `+Y.toString());let ce=(0,import_react.useMemo)(()=>new $fb18d541ea1ad717$export$ad991b66133851cf(t),[t]),ue=(0,import_react.useMemo)(()=>n(ce.resolvedOptions().calendar),[n,ce]),[de,fe]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(e.value,e.defaultValue,e.onChange),me=(0,import_react.useMemo)(()=>$35a22f14a1f04b11$export$61a490a80c552550(de,ue),[de,ue]),[ge,Te]=(0,import_react.useState)(()=>$35a22f14a1f04b11$export$66aa2b09de4b1ea5(e.placeholderValue,X,ue,ee)),Oe=me||ge,Ae=ue.identifier===`gregory`&&Oe.era===`BC`,ze=(0,import_react.useMemo)(()=>{var t;return{granularity:X,maxGranularity:e.maxGranularity??`year`,timeZone:ee,hideTimeZone:r,hourCycle:e.hourCycle,showEra:Ae,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,X,e.hourCycle,e.shouldForceLeadingZeros,ee,r,Ae]),qe=(0,import_react.useMemo)(()=>$35a22f14a1f04b11$export$7e319ea407e63bc0({},ze),[ze]),Ye=(0,import_react.useMemo)(()=>new $fb18d541ea1ad717$export$ad991b66133851cf(t,qe),[t,qe]),Ze=(0,import_react.useMemo)(()=>Ye.resolvedOptions(),[Ye]),Qe=(0,import_react.useMemo)(()=>Ye.formatToParts(new Date).filter(e=>$3c0fc76039f1c516$var$EDITABLE_SEGMENTS[e.type]).reduce((e,t)=>(e[t.type]=!0,e),{}),[Ye]),[et,nt]=(0,import_react.useState)(()=>e.value||e.defaultValue?{...Qe}:{}),rt=(0,import_react.useRef)(void 0),it=(0,import_react.useRef)(ue.identifier);(0,import_react.useEffect)(()=>{ue.identifier!==it.current&&(it.current=ue.identifier,Te(t=>Object.keys(et).length>0?$11d87f3f76e88657$export$b4a036af3fc0b032(t,ue):$35a22f14a1f04b11$export$66aa2b09de4b1ea5(e.placeholderValue,X,ue,ee)))},[ue,X,et,ee,e.placeholderValue]),de&&Object.keys(et).length<Object.keys(Qe).length&&(et={...Qe},nt(et)),de==null&&Object.keys(et).length===Object.keys(Qe).length&&(et={},nt(et),Te($35a22f14a1f04b11$export$66aa2b09de4b1ea5(e.placeholderValue,X,ue,ee)));let at=me&&Object.keys(et).length>=Object.keys(Qe).length?me:ge,ot=t=>{if(e.isDisabled||e.isReadOnly)return;let n=Object.keys(et),r=Object.keys(Qe);t==null?(fe(null),Te($35a22f14a1f04b11$export$66aa2b09de4b1ea5(e.placeholderValue,X,ue,ee)),nt({})):n.length>=r.length||n.length===r.length-1&&Qe.dayPeriod&&!et.dayPeriod&&rt.current!==`dayPeriod`?(t=$11d87f3f76e88657$export$b4a036af3fc0b032(t,Y?.calendar||new $3b62074eb05584b2$export$80ee6245ec4f29ec),fe(t)):Te(t),rt.current=null},st=(0,import_react.useMemo)(()=>at.toDate(te),[at,te]),ct=(0,import_react.useMemo)(()=>Ye.formatToParts(st).map(e=>{let n=$3c0fc76039f1c516$var$EDITABLE_SEGMENTS[e.type];e.type===`era`&&ue.getEras().length===1&&(n=!1);let r=$3c0fc76039f1c516$var$EDITABLE_SEGMENTS[e.type]&&!et[e.type],i=$3c0fc76039f1c516$var$EDITABLE_SEGMENTS[e.type]?$3e3ed55ab2966714$export$d3f5c5e0a5023fa0(e.type,e.value,t):null;return{type:$3c0fc76039f1c516$var$TYPE_MAPPING[e.type]||e.type,text:r?i:e.value,...$3c0fc76039f1c516$var$getSegmentLimits(at,e.type,Ze),isPlaceholder:r,placeholder:i,isEditable:n}}),[st,et,Ye,Ze,at,ue,t]);Qe.era&&et.year&&!et.era?(et.era=!0,nt({...et})):!Qe.era&&et.era&&(delete et.era,nt({...et}));let lt=e=>{et[e]=!0,e===`year`&&Qe.era&&(et.era=!0),nt({...et})},ut=(e,t)=>{if(et[e])ot($3c0fc76039f1c516$var$addSegment(at,e,t,Ze));else{lt(e);let t=Object.keys(et),n=Object.keys(Qe);(t.length>=n.length||t.length===n.length-1&&Qe.dayPeriod&&!et.dayPeriod)&&ot(at)}},dt=(0,import_react.useMemo)(()=>$35a22f14a1f04b11$export$f18627323ab57ac0(de,c,u,K,ze),[de,c,u,K,ze]),ft=$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:de,builtinValidation:dt}),pt=ft.displayValidation.isInvalid,mt=e.validationState||(pt?`invalid`:null);var ht;return{...ft,value:me,dateValue:st,calendar:ue,setValue:ot,segments:ct,dateFormatter:Ye,validationState:mt,isInvalid:pt,granularity:X,maxGranularity:e.maxGranularity??`year`,isDisabled:i,isReadOnly:a,isRequired:o,increment(e){ut(e,1)}
5,decrement(e){ut(e,-1)},incrementPage(e){ut(e,$3c0fc76039f1c516$var$PAGE_STEP[e]||1)},decrementPage(e){ut(e,-($3c0fc76039f1c516$var$PAGE_STEP[e]||1))},setSegment(e,t){lt(e),ot($3c0fc76039f1c516$var$setSegment(at,e,t,Ze))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(et),n=Object.keys(Qe);t.length===n.length-1&&Qe.dayPeriod&&!et.dayPeriod&&(et={...Qe},nt(et),ot(at.copy()))},clearSegment(t){delete et[t],rt.current=t,nt({...et});let n=$35a22f14a1f04b11$export$66aa2b09de4b1ea5(e.placeholderValue,X,ue,ee),r=at;if(t===`dayPeriod`&&`hour`in at&&`hour`in n){let e=at.hour>=12,t=n.hour>=12;e&&!t?r=at.set({hour:at.hour-12}):!e&&t&&(r=at.set({hour:at.hour+12}))}else t in at&&(r=at.set({[t]:n[t]}));fe(null),ot(r)},formatValue(e){if(!me)return``;let n=$35a22f14a1f04b11$export$7e319ea407e63bc0(e,ze);return new $fb18d541ea1ad717$export$ad991b66133851cf(t,n).format(st)},getDateFormatter(e,t){return new $fb18d541ea1ad717$export$ad991b66133851cf(e,$35a22f14a1f04b11$export$7e319ea407e63bc0({},{...ze,...t}))}}}function $3c0fc76039f1c516$var$getSegmentLimits(e,t,n){switch(t){case`era`:{let t=e.calendar.getEras();return{value:t.indexOf(e.era),minValue:0,maxValue:t.length-1}}case`year`:return{value:e.year,minValue:1,maxValue:e.calendar.getYearsInEra(e)};case`month`:return{value:e.month,minValue:$14e0f24ef4ac5c92$export$5412ac11713b72ad(e),maxValue:e.calendar.getMonthsInYear(e)};case`day`:return{value:e.day,minValue:$14e0f24ef4ac5c92$export$b2f4953d301981d5(e),maxValue:e.calendar.getDaysInMonth(e)}}if(`hour`in e)switch(t){case`dayPeriod`:return{value:e.hour>=12?12:0,minValue:0,maxValue:12};case`hour`:if(n.hour12){let t=e.hour>=12;return{value:e.hour,minValue:t?12:0,maxValue:t?23:11}}return{value:e.hour,minValue:0,maxValue:23};case`minute`:return{value:e.minute,minValue:0,maxValue:59};case`second`:return{value:e.second,minValue:0,maxValue:59}}return{}}function $3c0fc76039f1c516$var$addSegment(e,t,n,r){switch(t){case`era`:case`year`:case`month`:case`day`:return e.cycle(t,n,{round:t===`year`})}if(`hour`in e)switch(t){case`dayPeriod`:{let t=e.hour,n=t>=12;return e.set({hour:n?t-12:t+12})}case`hour`:case`minute`:case`second`:return e.cycle(t,n,{round:t!==`hour`,hourCycle:r.hour12?12:24})}}function $3c0fc76039f1c516$var$setSegment(e,t,n,r){switch(t){case`day`:case`month`:case`year`:case`era`:return e.set({[t]:n})}if(`hour`in e)switch(t){case`dayPeriod`:{let t=e.hour,r=t>=12;return n>=12===r?e:e.set({hour:r?t-12:t+12})}case`hour`:if(r.hour12){let t=e.hour>=12;!t&&n===12&&(n=0),t&&n<12&&(n+=12)}case`minute`:case`second`:return e.set({[t]:n})}}function $0d86e9c8f07f9a7b$export$79c0c687a5963b0a(e,t){let{cursor:n,getKey:r}=e;return{setSelectedKeys(e){t(t=>({...t,selectedKeys:e}))},setFilterText(e){t(t=>({...t,filterText:e}))},insert(e,...n){t(t=>$0d86e9c8f07f9a7b$var$insert(t,e,...n))},insertBefore(e,...n){t(t=>{let i=t.items.findIndex(t=>r(t)===e);if(i===-1){if(t.items.length===0)i=0;else return t}return $0d86e9c8f07f9a7b$var$insert(t,i,...n)})},insertAfter(e,...n){t(t=>{let i=t.items.findIndex(t=>r(t)===e);if(i===-1){if(t.items.length===0)i=0;else return t}return $0d86e9c8f07f9a7b$var$insert(t,i+1,...n)})},prepend(...e){t(t=>$0d86e9c8f07f9a7b$var$insert(t,0,...e))},append(...e){t(t=>$0d86e9c8f07f9a7b$var$insert(t,t.items.length,...e))},remove(...e){t(t=>{let i=new Set(e),a=t.items.filter(e=>!i.has(r(e))),o=`all`;if(t.selectedKeys!==`all`){o=new Set(t.selectedKeys);for(let t of e)o.delete(t)}return n==null&&a.length===0&&(o=new Set),{...t,items:a,selectedKeys:o}})},removeSelectedItems(){t(e=>{if(e.selectedKeys===`all`)return{...e,items:[],selectedKeys:new Set};let t=e.selectedKeys,n=e.items.filter(e=>!t.has(r(e)));return{...e,items:n,selectedKeys:new Set}})},move(e,n){t(t=>{let i=t.items.findIndex(t=>r(t)===e);if(i===-1)return t;let a=t.items.slice(),[o]=a.splice(i,1);return a.splice(n,0,o),{...t,items:a}})},moveBefore(e,n){t(t=>{let i=t.items.findIndex(t=>r(t)===e);return i===-1?t:$0d86e9c8f07f9a7b$var$move(t,(Array.isArray(n)?n:[...n]).map(e=>t.items.findIndex(t=>r(t)===e)).sort((e,t)=>e-t),i)})},moveAfter(e,n){t(t=>{let i=t.items.findIndex(t=>r(t)===e);return i===-1?t:$0d86e9c8f07f9a7b$var$move(t,(Array.isArray(n)?n:[...n]).map(e=>t.items.findIndex(t=>r(t)===e)).sort((e,t)=>
5e-t),i+1)})},update(e,n){t(t=>{let i=t.items.findIndex(t=>r(t)===e);return i===-1?t:{...t,items:[...t.items.slice(0,i),n,...t.items.slice(i+1)]}})}}}function $0d86e9c8f07f9a7b$var$insert(e,t,...n){return{...e,items:[...e.items.slice(0,t),...n,...e.items.slice(t)]}}function $0d86e9c8f07f9a7b$var$move(e,t,n){n-=t.filter(e=>e<n).length;let r=t.map(e=>({from:e,to:n++}));for(let e=0;e<r.length;e++){let t=r[e].from;for(let n=e;n<r.length;n++)r[n].from>t&&r[n].from--}for(let e=0;e<r.length;e++){let t=r[e];for(let n=r.length-1;n>e;n--){let e=r[n];e.from<t.to?t.to++:e.from++}}let i=e.items.slice();for(let e of r){let[t]=i.splice(e.from,1);i.splice(e.to,0,t)}return{...e,items:i}}function $f86e6c1ec7da6ebb$var$reducer(e,t){let n;switch(e.state){case`idle`:case`error`:switch(t.type){case`loading`:case`loadingMore`:case`sorting`:case`filtering`:var r,i;return{...e,filterText:t.filterText??e.filterText,state:t.type,items:t.type===`loading`?[]:e.items,sortDescriptor:t.sortDescriptor??e.sortDescriptor,abortController:t.abortController};case`update`:return{...e,...t.updater(e)};case`success`:case`error`:return e;default:throw Error(`Invalid action "${t.type}" in state "${e.state}"`)}case`loading`:case`sorting`:case`filtering`:switch(t.type){case`success`:if(t.abortController!==e.abortController)return e;var a;n=t.selectedKeys??e.selectedKeys;var o,c;return{...e,filterText:t.filterText??e.filterText,state:`idle`,items:[...t.items],selectedKeys:n===`all`?`all`:new Set(n),sortDescriptor:t.sortDescriptor??e.sortDescriptor,abortController:null,cursor:t.cursor};case`error`:return t.abortController===e.abortController?{...e,state:`error`,error:t.error,abortController:null}:e;case`loading`:case`loadingMore`:case`sorting`:case`filtering`:e.abortController.abort();var u;return{...e,filterText:t.filterText??e.filterText,state:t.type,items:t.type===`loading`?[]:e.items,abortController:t.abortController};case`update`:return{...e,...t.updater(e)};default:throw Error(`Invalid action "${t.type}" in state "${e.state}"`)}case`loadingMore`:switch(t.type){case`success`:var K;n=e.selectedKeys===`all`||t.selectedKeys===`all`?`all`:new Set([...e.selectedKeys,...t.selectedKeys??[]]);var Y;return{...e,state:`idle`,items:[...e.items,...t.items],selectedKeys:n,sortDescriptor:t.sortDescriptor??e.sortDescriptor,abortController:null,cursor:t.cursor};case`error`:return t.abortController===e.abortController?{...e,state:`error`,error:t.error}:e;case`loading`:case`sorting`:case`filtering`:e.abortController.abort();var X;return{...e,filterText:t.filterText??e.filterText,state:t.type,items:t.type===`loading`?[]:e.items,abortController:t.abortController};case`loadingMore`:return t.abortController.abort(),e;case`update`:return{...e,...t.updater(e)};default:throw Error(`Invalid action "${t.type}" in state "${e.state}"`)}default:throw Error(`Invalid state "${e.state}"`)}}function $f86e6c1ec7da6ebb$export$bc3384a35de93d66(e){let{load:t,sort:n,initialSelectedKeys:r,initialSortDescriptor:i,getKey:a=e=>e.id||e.key,initialFilterText:o=``}=e,[c,u]=(0,import_react.useReducer)($f86e6c1ec7da6ebb$var$reducer,{state:`idle`,error:null,items:[],selectedKeys:r===`all`?`all`:new Set(r),sortDescriptor:i,filterText:o}),K=async(e,n)=>{let r=new AbortController;try{u({...e,abortController:r});var i;let Y=e.filterText??c.filterText;var a;let X=await n({items:c.items.slice(),selectedKeys:c.selectedKeys,sortDescriptor:e.sortDescriptor??c.sortDescriptor,signal:r.signal,cursor:e.type===`loadingMore`?c.cursor:null,filterText:Y});var o;let ee=X.filterText??Y;u({type:`success`,...X,abortController:r}),ee&&ee!==Y&&!r.signal.aborted&&K({type:`filtering`,filterText:ee},t)}catch(e){u({type:`error`,error:e,abortController:r})}},Y=(0,import_react.useRef)(!1);return(0,import_react.useEffect)(()=>{Y.current||=(K({type:`loading`},t),!0)},[]),{items:c.items,selectedKeys:c.selectedKeys,sortDescriptor:c.sortDescriptor,isLoading:c.state===`loading`||c.state===`loadingMore`||c.state===`sorting`||c.state===`filtering`,loadingState:c.state,error:c.error,filterText:c.filterText,getItem(e){return c.items.find(t=>a(t)===e)},reload(){K({type:`loading`},t)},loadMore(){c.state!==`loadingMore`&&c.state!==`filtering`&&c.cursor!=null&&K({type:`loadingMore`},t)},sort(e){K({type:`sorting`,sortDescriptor:e},n||t)},...$0d86e9c8f07f9a7b$export$79c0c687a5963b0a({...e,getKey:a,cursor:c.cursor},e=>{u({type:`update`,updater:e})}),setFilterText(e){K({type:`filtering`,filterText:e},t)}}}function $a28c903ee9ad8dc5$export$79fefeb1c2091ac3(e){let t=$fc909762b330b746$export$61c6a8c84e605fb6(e),[n,r]=(0,import_react.useState)(null),[i,a]=(0,import_react.useState)([]),o=()=>{a([]),t.close()},c=(e,t)=>{a(n=>t>n.length?n:[...n.slice(0,t),e])},u=(e,t)=>
5{a(n=>n[t]===e?n.slice(0,t):n)};return{focusStrategy:n,...t,open(e=null){r(e),t.open()},toggle(e=null){r(e),t.toggle()},close(){o()},expandedKeysStack:i,openSubmenu:c,closeSubmenu:u}}var $a54cdc5c1942b639$var$instance=Math.round(Math.random()*1e10),$a54cdc5c1942b639$var$i=0;function $a54cdc5c1942b639$export$bca9d026f8e704eb(e){let t=(0,import_react.useMemo)(()=>e.name||`radio-group-${$a54cdc5c1942b639$var$instance}-${++$a54cdc5c1942b639$var$i}`,[e.name]);var n;let[r,i]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(e.value,e.defaultValue??null,e.onChange),[a,o]=(0,import_react.useState)(null),c=$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:r}),u=t=>{!e.isReadOnly&&!e.isDisabled&&(i(t),c.commitValidation())},K=c.displayValidation.isInvalid;return{...c,name:t,selectedValue:r,setSelectedValue:u,lastFocusedValue:a,setLastFocusedValue:o,isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1,validationState:e.validationState||(K?`invalid`:null),isInvalid:K}}function $76f919a04c5a7d14$export$4ba071daf4e486(e){var t;let n=$a0d645289fe9b86b$export$e7f05e985daf4b5f({...e,suppressTextValueWarning:!0,defaultSelectedKey:e.defaultSelectedKey??$76f919a04c5a7d14$var$findDefaultSelectedKey(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)}),{selectionManager:r,collection:i,selectedKey:a}=n,o=(0,import_react.useRef)(a);return(0,import_react.useEffect)(()=>{let e=a;(r.isEmpty||!i.getItem(e))&&(e=$76f919a04c5a7d14$var$findDefaultSelectedKey(i,n.disabledKeys),e!=null&&r.setSelectedKeys([e])),(e!=null&&r.focusedKey==null||!r.isFocused&&e!==o.current)&&r.setFocusedKey(e),o.current=e}),{...n,isDisabled:e.isDisabled||!1}}function $76f919a04c5a7d14$var$findDefaultSelectedKey(e,t){let n=null;if(e){var r,i,a,o;for(n=e.getFirstKey();(t.has(n)||(i=e.getItem(n))!=null&&i.props?.isDisabled)&&n!==e.getLastKey();)n=e.getKeyAfter(n);(t.has(n)||(o=e.getItem(n))!=null&&o.props?.isDisabled)&&n===e.getLastKey()&&(n=e.getFirstKey())}return n}function $3017fa7ffdddec74$export$8042c6c013fd5226(e={}){let{isReadOnly:t}=e,[n,r]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(e.isSelected,e.defaultSelected||!1,e.onChange);function i(e){t||r(e)}function a(){t||r(!n)}return{isSelected:n,setSelected:i,toggle:a}}var $05ca4cd7c4a5a999$export$863faf230ee2118a=class{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}constructor(e,{expandedKeys:t}={}){this.keyMap=new Map,this.iterable=e,t||=new Set;let n=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&(e.type===`section`||t.has(e.key)))for(let t of e.childNodes)n(t)};for(let t of e)n(t);let r,i=0;for(let[e,t]of this.keyMap)r?(r.nextKey=e,t.prevKey=r.key):(this.firstKey=e,t.prevKey=void 0),t.type===`item`&&(t.index=i++),r=t,r.nextKey=void 0;this.lastKey=r?.key}};function $875d6693e12af071$export$728d6ba534403756(e){let{onExpandedChange:t}=e,[n,r]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=$7af3f5b51489e0b5$export$253fe78d46329472(e),a=(0,import_react.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=$7613b1592d41b092$export$6cd28814d92fa9c9(e,(0,import_react.useCallback)(e=>new $05ca4cd7c4a5a999$export$863faf230ee2118a(e,{expandedKeys:n}),[n]),null);return(0,import_react.useEffect)(()=>{i.focusedKey!=null&&!o.getItem(i.focusedKey)&&i.setFocusedKey(null)},[o,i.focusedKey]),{collection:o,expandedKeys:n,disabledKeys:a,toggleKey:e=>{r($875d6693e12af071$var$toggleKey(n,e))},setExpandedKeys:r,selectionManager:new $d496c0a20b6e58ec$export$6c8a5aaad13c9852(o,i)}}function $875d6693e12af071$var$toggleKey(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}var $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2=typeof document<`u`?import_react.useLayoutEffect:()=>{};function $8ae05eaa5c114e9c$export$7f54fc3180508a52$1(e){let t=(0,import_react.useRef)(null);return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{t.current=e},[e]),(0,import_react.useCallback)((...e)=>{let n=t.current;return n?.(...e)},[])}function $1dbecbe27a04f9af$export$14d238f342723f25$1(e){let[t,n]=(0,import_react.useState)(e),r=(0,import_react.useRef)(null),i=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1(()=>
5{if(!r.current)return;let e=r.current.next();if(e.done){r.current=null;return}t===e.value?i():n(e.value)});return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{r.current&&i()}),[t,$8ae05eaa5c114e9c$export$7f54fc3180508a52$1(e=>{r.current=e(t),i()})]}var $b5e257d569688ac6$var$defaultContext$1={prefix:String(Math.round(Math.random()*1e10)),current:0},$b5e257d569688ac6$var$SSRContext$1=import_react.createContext($b5e257d569688ac6$var$defaultContext$1),$b5e257d569688ac6$var$IsSSRContext$1=import_react.createContext(!1),$b5e257d569688ac6$var$canUseDOM=!!(typeof window<`u`&&window.document&&window.document.createElement),$b5e257d569688ac6$var$componentIds$1=new WeakMap;function $b5e257d569688ac6$var$useCounter$1(e=!1){let t=(0,import_react.useContext)($b5e257d569688ac6$var$SSRContext$1),n=(0,import_react.useRef)(null);if(n.current===null&&!e){var r,i;let e=import_react.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let n=$b5e257d569688ac6$var$componentIds$1.get(e);n==null?$b5e257d569688ac6$var$componentIds$1.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,$b5e257d569688ac6$var$componentIds$1.delete(e))}n.current=++t.current}return n.current}function $b5e257d569688ac6$var$useLegacySSRSafeId$1(e){let t=(0,import_react.useContext)($b5e257d569688ac6$var$SSRContext$1);t===$b5e257d569688ac6$var$defaultContext$1&&!$b5e257d569688ac6$var$canUseDOM&&console.warn(`When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.`);let n=$b5e257d569688ac6$var$useCounter$1(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function $b5e257d569688ac6$var$useModernSSRSafeId$1(e){let t=import_react.useId(),[n]=(0,import_react.useState)($b5e257d569688ac6$export$535bd6ca7f90a273$1()),r=n?`react-aria`:`react-aria${$b5e257d569688ac6$var$defaultContext$1.prefix}`;return e||`${r}-${t}`}var $b5e257d569688ac6$export$619500959fc48b26$1=typeof import_react.useId==`function`?$b5e257d569688ac6$var$useModernSSRSafeId$1:$b5e257d569688ac6$var$useLegacySSRSafeId$1;function $b5e257d569688ac6$var$getSnapshot$1(){return!1}function $b5e257d569688ac6$var$getServerSnapshot$1(){return!0}function $b5e257d569688ac6$var$subscribe$1(e){return()=>{}}function $b5e257d569688ac6$export$535bd6ca7f90a273$1(){return typeof import_react.useSyncExternalStore==`function`?import_react.useSyncExternalStore($b5e257d569688ac6$var$subscribe$1,$b5e257d569688ac6$var$getSnapshot$1,$b5e257d569688ac6$var$getServerSnapshot$1):(0,import_react.useContext)($b5e257d569688ac6$var$IsSSRContext$1)}var $bdb11010cef70236$var$canUseDOM$1=!!(typeof window<`u`&&window.document&&window.document.createElement),$bdb11010cef70236$var$idsUpdaterMap=new Map;function $bdb11010cef70236$export$f680877a34711e37$1(e){let[t,n]=(0,import_react.useState)(e),r=(0,import_react.useRef)(null),i=$b5e257d569688ac6$export$619500959fc48b26$1(t),a=(0,import_react.useCallback)(e=>{r.current=e},[]);return $bdb11010cef70236$var$canUseDOM$1&&($bdb11010cef70236$var$idsUpdaterMap.has(i)&&!$bdb11010cef70236$var$idsUpdaterMap.get(i).includes(a)?$bdb11010cef70236$var$idsUpdaterMap.set(i,[...$bdb11010cef70236$var$idsUpdaterMap.get(i),a]):$bdb11010cef70236$var$idsUpdaterMap.set(i,[a])),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{let e=i;return()=>{$bdb11010cef70236$var$idsUpdaterMap.delete(e)}},[i]),(0,import_react.useEffect)(()=>{let e=r.current;e&&(r.current=null,n(e))}),i}function $bdb11010cef70236$export$cd8c9cb68f842629$1(e,t){if(e===t)return e;let n=$bdb11010cef70236$var$idsUpdaterMap.get(e);if(n)return n.forEach(e=>e(t)),t;let r=$bdb11010cef70236$var$idsUpdaterMap.get(t);return r?(r.forEach(t=>t(e)),e):t}function $bdb11010cef70236$export$b4cc09c592e8fdb8$1(e=[]){let t=$bdb11010cef70236$export$f680877a34711e37$1(),[n,r]=$1dbecbe27a04f9af$export$14d238f342723f25$1(t),i=(0,import_react.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(i,[t,i,...e]),n}function $ff5963eb1fccf552$export$e08e3b67e392101e$1(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}var $431fbd86ca7dc216$export$b204af158042fbac$1=e=>{var t;return e?.ownerDocument??document},$431fbd86ca7dc216$export$f21a1ffae260145a$1=e=>e&&`window`in e&&e.window===e?e:$431fbd86ca7dc216$export$b204af158042fbac$1(e).defaultView||window;function r$13(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r$13(e[t]))&&(r&&(r+=` `),r+=n);else for(t in e)e[t]&&(r&&(r+=` `),r+=t)}return r}function clsx(){for(var e,t,n=0,r=``;n<arguments.length;)(e=arguments[n++])&&(t=r$13(e))&&(r&&(r+=` `),r+=t);return r}function $3ef42575df84b30b$export$9d1611c77c2fe928$1(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],i=r[e];typeof n==`function`&&typeof i==`function`&&e[0]===`o`&&e[1]===`n`&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=$ff5963eb1fccf552$export$e08e3b67e392101e$1(n,i):(e===`className`||e===`UNSAFE_className`)&&typeof n==`string`&&typeof i==`string`?t[e]=clsx(n,i):e===`id`&&n&&i?t.id=$bdb11010cef70236$export$cd8c9cb68f842629$1(n,i):t[e]=i===void 0?n:i}}return t}function $5dc95899b306f630$export$c9058316764c140e(...e){return e.length===1&&e[0]?e[0]:t=>{for(let n of e)typeof n==`function`?n(t):n!=null&&(n.current=t)}}var $65484d02dcb7eb3e$var$DOMPropNames$1=new Set([`id`]),$65484d02dcb7eb3e$var$labelablePropNames$1=new Set([`aria-label`,`aria-labelledby`,`aria-describedby`,`aria-details`]),$65484d02dcb7eb3e$var$linkPropNames$1=new Set([`href`,`hrefLang`,`target`,`rel`,`download`,`ping`,`referrerPolicy`]),$65484d02dcb7eb3e$var$propRe$1=/^(data-.*)$/;
vendor: 8,862 bytes, line 5
5function $65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,a={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&($65484d02dcb7eb3e$var$DOMPropNames$1.has(t)||n&&$65484d02dcb7eb3e$var$labelablePropNames$1.has(t)||r&&$65484d02dcb7eb3e$var$linkPropNames$1.has(t)||i?.has(t)||$65484d02dcb7eb3e$var$propRe$1.test(t))&&(a[t]=e[t]);return a}function $7215afc6de606d6b$export$de79e2c695e052f3$1(e){if($7215afc6de606d6b$var$supportsPreventScroll$1())e.focus({preventScroll:!0});else{let t=$7215afc6de606d6b$var$getScrollableElements$1(e);e.focus(),$7215afc6de606d6b$var$restoreScrollPosition$1(t)}}var $7215afc6de606d6b$var$supportsPreventScrollCached$1=null;function $7215afc6de606d6b$var$supportsPreventScroll$1(){if($7215afc6de606d6b$var$supportsPreventScrollCached$1==null){$7215afc6de606d6b$var$supportsPreventScrollCached$1=!1;try{document.createElement(`div`).focus({get preventScroll(){return $7215afc6de606d6b$var$supportsPreventScrollCached$1=!0,!0}})}catch{}}return $7215afc6de606d6b$var$supportsPreventScrollCached$1}function $7215afc6de606d6b$var$getScrollableElements$1(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function $7215afc6de606d6b$var$restoreScrollPosition$1(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function $c87311424ea30a05$var$testUserAgent$1(e){var t;return typeof window>`u`||window.navigator==null?!1:window.navigator.userAgentData?.brands.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function $c87311424ea30a05$var$testPlatform$1(e){var t;return typeof window<`u`&&window.navigator!=null&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function $c87311424ea30a05$var$cached$1(e){let t=null;return()=>(t??=e(),t)}var $c87311424ea30a05$export$9ac100e40613ea10$1=$c87311424ea30a05$var$cached$1(function(){return $c87311424ea30a05$var$testPlatform$1(/^Mac/i)}),$c87311424ea30a05$export$186c6964ca17d99$1=$c87311424ea30a05$var$cached$1(function(){return $c87311424ea30a05$var$testPlatform$1(/^iPhone/i)}),$c87311424ea30a05$export$7bef049ce92e4224$1=$c87311424ea30a05$var$cached$1(function(){return $c87311424ea30a05$var$testPlatform$1(/^iPad/i)||$c87311424ea30a05$export$9ac100e40613ea10$1()&&navigator.maxTouchPoints>1}),$c87311424ea30a05$export$fedb369cb70207f1$1=$c87311424ea30a05$var$cached$1(function(){return $c87311424ea30a05$export$186c6964ca17d99$1()||$c87311424ea30a05$export$7bef049ce92e4224$1()}),$c87311424ea30a05$export$e1865c3bedcd822b$1=$c87311424ea30a05$var$cached$1(function(){return $c87311424ea30a05$export$9ac100e40613ea10$1()||$c87311424ea30a05$export$fedb369cb70207f1$1()}),$c87311424ea30a05$export$78551043582a6a98$1=$c87311424ea30a05$var$cached$1(function(){return $c87311424ea30a05$var$testUserAgent$1(/AppleWebKit/i)&&!$c87311424ea30a05$export$6446a186d09e379e$1()}),$c87311424ea30a05$export$6446a186d09e379e$1=$c87311424ea30a05$var$cached$1(function(){return $c87311424ea30a05$var$testUserAgent$1(/Chrome/i)}),$c87311424ea30a05$export$a11b0059900ceec8$1=$c87311424ea30a05$var$cached$1(function(){return $c87311424ea30a05$var$testUserAgent$1(/Android/i)}),$c87311424ea30a05$export$b7d78993b74f766d$1=$c87311424ea30a05$var$cached$1(function(){return $c87311424ea30a05$var$testUserAgent$1(/Firefox/i)}),$ea8dcbcb9ea1b556$var$RouterContext=(0,import_react.createContext)({isNative:!0,open:$ea8dcbcb9ea1b556$var$openSyntheticLink,useHref:e=>e});function $ea8dcbcb9ea1b556$export$9a302a45f65d0572(){return(0,import_react.useContext)($ea8dcbcb9ea1b556$var$RouterContext)}function $ea8dcbcb9ea1b556$export$efa8c9099e530235(e,t){let n=e.getAttribute(`target`);return(!n||n===`_self`)&&e.origin===location.origin&&!e.hasAttribute(`download`)&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(e,t,n=!0){var r,i;let{metaKey:a,ctrlKey:o,altKey:c,shiftKey:u}=t;$c87311424ea30a05$export$b7d78993b74f766d$1()&&(i=window.event)!=null&&i.type?.startsWith(`key`)&&e.target===`_blank`&&($c87311424ea30a05$export$9ac100e40613ea10$1()?a=!0:o=!0);let K=$c87311424ea30a05$export$78551043582a6a98$1()&&$c87311424ea30a05$export$9ac100e40613ea10$1()&&!$c87311424ea30a05$export$7bef049ce92e4224$1()?new KeyboardEvent(`keydown`,{keyIdentifier:`Enter`,metaKey:a,ctrlKey:o,altKey:c,shiftKey:u}):new MouseEvent(`click`,{metaKey:a,ctrlKey:o,altKey:c,shiftKey:u,bubbles:!0,cancelable:!0});$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening=n,$7215afc6de606d6b$export$de79e2c695e052f3$1(e),e.dispatchEvent(K),$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening=!1}$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening=!1;function $ea8dcbcb9ea1b556$var$getSyntheticLink(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute(`data-href`)){let n=document.createElement(`a`);n.href=e.getAttribute(`data-href`),e.hasAttribute(`data-target`)&&(n.target=e.getAttribute(`data-target`)),e.hasAttribute(`data-rel`)&&(n.rel=e.getAttribute(`data-rel`)),e.hasAttribute(`data-download`)&&(n.download=e.getAttribute(`data-download`)),e.hasAttribute(`data-ping`)&&(n.ping=e.getAttribute(`data-ping`)),e.hasAttribute(`data-referrer-policy`)&&(n.referrerPolicy=e.getAttribute(`data-referrer-policy`)),e.appendChild(n),t(n),e.removeChild(n)}}function $ea8dcbcb9ea1b556$var$openSyntheticLink(e,t){$ea8dcbcb9ea1b556$var$getSyntheticLink(e,e=>$ea8dcbcb9ea1b556$export$95185d699e05d4d7(e,t))}function $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(e){let t=$ea8dcbcb9ea1b556$export$9a302a45f65d0572();var n;let r=t.useHref(e?.href??``);return{href:e?.href?r:void 0,target:e?.target,rel:e?.rel,download:e?.download,ping:e?.ping,referrerPolicy:e?.referrerPolicy}}var $bbed8b41f857bcc0$var$transitionsByElement=new Map,$bbed8b41f857bcc0$var$transitionCallbacks=new Set;function $bbed8b41f857bcc0$var$setupGlobalEvents(){if(typeof window>`u`)return;function e(e){return`propertyName`in e}let t=t=>{if(!e(t)||!t.target)return;let r=$bbed8b41f857bcc0$var$transitionsByElement.get(t.target);r||(r=new Set,$bbed8b41f857bcc0$var$transitionsByElement.set(t.target,r),t.target.addEventListener(`transitioncancel`,n,{once:!0})),r.add(t.propertyName)},n=t=>{if(!e(t)||!t.target)return;let r=$bbed8b41f857bcc0$var$transitionsByElement.get(t.target);if(r&&(r.delete(t.propertyName),r.size===0&&(t.target.removeEventListener(`transitioncancel`,n),$bbed8b41f857bcc0$var$transitionsByElement.delete(t.target)),$bbed8b41f857bcc0$var$transitionsByElement.size===0)){for(let e of $bbed8b41f857bcc0$var$transitionCallbacks)e();$bbed8b41f857bcc0$var$transitionCallbacks.clear()}};document.body.addEventListener(`transitionrun`,t),document.body.addEventListener(`transitionend`,n)}typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,$bbed8b41f857bcc0$var$setupGlobalEvents):$bbed8b41f857bcc0$var$setupGlobalEvents());function $bbed8b41f857bcc0$export$24490316f764c430(e){requestAnimationFrame(()=>{$bbed8b41f857bcc0$var$transitionsByElement.size===0?e():$bbed8b41f857bcc0$var$transitionCallbacks.add(e)})}function $03deb23ff14920c4$export$4eaf04e54aa8eed6$1(){let e=(0,import_react.useRef)(new Map),t=(0,import_react.useCallback)((t,n,r,i)=>{let a=i?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,r,i)},[]),n=(0,import_react.useCallback)((t,n,r,i)=>{var a;let o=e.current.get(r)?.fn||r;t.removeEventListener(n,o,i),e.current.delete(r)},[]),r=(0,import_react.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,import_react.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function $313b98861ee5dd6c$export$d6875122194c7b44(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=$bdb11010cef70236$export$f680877a34711e37$1(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(` `):i&&=i.trim().split(/\s+/).join(` `),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function $df56164dff5785e2$export$4338b53315abf666(e){let t=(0,import_react.useRef)(null);return(0,import_react.useMemo)(()=>({get current(){return t.current},set current(n){t.current=n,typeof e==`function`?e(n):e&&(e.current=n)}}),[e])}function $9daab02d461809db$var$hasResizeObserver(){return window.ResizeObserver!==void 0}function $9daab02d461809db$export$683480f191c0e3ea(e){let{ref:t,box:n,onResize:r}=e;(0,import_react.useEffect)(()=>{let e=t?.current;if(e){if($9daab02d461809db$var$hasResizeObserver()){let t=new window.ResizeObserver(e=>{e.length&&r()});return t.observe(e,{box:n}
5),()=>{e&&t.unobserve(e)}}return window.addEventListener(`resize`,r,!1),()=>{window.removeEventListener(`resize`,r,!1)}}},[r,t,n])}function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(e,t){$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function $cc38e7bd3fc7b213$export$2bb74740c4e19def(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function $62d8ded9296f3872$export$cfa2225e87938781(e,t){let n=e;for($cc38e7bd3fc7b213$export$2bb74740c4e19def(n,t)&&(n=n.parentElement);n&&!$cc38e7bd3fc7b213$export$2bb74740c4e19def(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(e,t){let n=[];for(;e&&e!==document.documentElement;)$cc38e7bd3fc7b213$export$2bb74740c4e19def(e,t)&&n.push(e),e=e.parentElement;return n}var $ef06256079686ba0$var$descriptionId=0,$ef06256079686ba0$var$descriptionNodes=new Map;function $ef06256079686ba0$export$f8aeda7b10753fa1(e){let[t,n]=(0,import_react.useState)();return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{if(!e)return;let t=$ef06256079686ba0$var$descriptionNodes.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${$ef06256079686ba0$var$descriptionId++}`;n(r);let i=document.createElement(`div`);i.id=r,i.style.display=`none`,i.textContent=e,document.body.appendChild(i),t={refCount:0,element:i},$ef06256079686ba0$var$descriptionNodes.set(e,t)}return t.refCount++,()=>{t&&--t.refCount===0&&(t.element.remove(),$ef06256079686ba0$var$descriptionNodes.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function $e9faafb641e167db$export$90fc3a17d93f704c(e,t,n,r){let i=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1(n),a=n==null;(0,import_react.useEffect)(()=>{if(a||!e.current)return;let n=e.current;return n.addEventListener(t,i,r),()=>{n.removeEventListener(t,i,r)}},[e,t,r,a,i])}function $2f04cbc44ee30ce0$export$53a0910f038337bd(e,t){let n=$2f04cbc44ee30ce0$var$relativeOffset(e,t,`left`),r=$2f04cbc44ee30ce0$var$relativeOffset(e,t,`top`),i=t.offsetWidth,a=t.offsetHeight,o=e.scrollLeft,c=e.scrollTop,{borderTopWidth:u,borderLeftWidth:K}=getComputedStyle(e),Y=e.scrollLeft+parseInt(K,10),X=e.scrollTop+parseInt(u,10),ee=Y+e.clientWidth,te=X+e.clientHeight;n<=o?o=n-parseInt(K,10):n+i>ee&&(o+=n+i-ee),r<=X?c=r-parseInt(u,10):r+a>te&&(c+=r+a-te),e.scrollLeft=o,e.scrollTop=c}function $2f04cbc44ee30ce0$var$relativeOffset(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function $2f04cbc44ee30ce0$export$c826860796309d1b(e,t){if(document.contains(e)){let o=document.scrollingElement||document.documentElement;if(window.getComputedStyle(o).overflow!==`hidden`){var n;let{left:o,top:c}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)==null||n.call(e,{block:`nearest`});let{left:u,top:K}=e.getBoundingClientRect();if(Math.abs(o-u)>1||Math.abs(c-K)>1){var r,i,a;t==null||(i=t.containingElement)==null||(r=i.scrollIntoView)==null||r.call(i,{block:`center`,inline:`center`}),(a=e.scrollIntoView)==null||a.call(e,{block:`nearest`})}}else{let t=$a40c673dc9f6d9c7$export$94ed1c92c7beeb22(e);for(let n of t)$2f04cbc44ee30ce0$export$53a0910f038337bd(n,e)}}}function $6a7db85432448f7f$export$60278871457622de$1(e){return e.mozInputSource===0&&e.isTrusted?!0:$c87311424ea30a05$export$a11b0059900ceec8$1()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function $6a7db85432448f7f$export$29bf1b5f2c56cf63(e){return!$c87311424ea30a05$export$a11b0059900ceec8$1()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`}function $5a387cc49350e6db$export$722debc0e56fea39(e,t){let n=(0,import_react.useRef)(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}function $99facab73266f662$export$5add1d006293d136(e,t,n){let r=(0,import_react.useRef)(t),i=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1(()=>{n&&n(r.current)});(0,import_react.useEffect)(()=>{var t;let n=e?.current?.form;return n?.addEventListener(`reset`,i),()=>{n?.removeEventListener(`reset`,i)}},[e,i])}var $14c0b72509d70225$var$state=`default`,$14c0b72509d70225$var$savedUserSelect=``,$14c0b72509d70225$var$modifiedElementMap=new WeakMap;function $14c0b72509d70225$export$16a4697467175487(e){if($c87311424ea30a05$export$fedb369cb70207f1$1()){if($14c0b72509d70225$var$state==="default"){let t=$431fbd86ca7dc216$export$b204af158042fbac$1(e);$14c0b72509d70225$var$savedUserSelect=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect=`none`}$14c0b72509d70225$var$state=`disabled`}else(e instanceof HTMLElement||e instanceof SVGElement)&&($14c0b72509d70225$var$modifiedElementMap.set(e,e.style.userSelect),e.style.userSelect=`none`)}function $14c0b72509d70225$export$b0d6fa1ab32e3295(e){if($c87311424ea30a05$export$fedb369cb70207f1$1()){if($14c0b72509d70225$var$state!==`disabled`)return;$14c0b72509d70225$var$state=`restoring`,setTimeout(()=>{$bbed8b41f857bcc0$export$24490316f764c430(()=>
vendor: 1,580 bytes, line 5
5{if($14c0b72509d70225$var$state===`restoring`){let t=$431fbd86ca7dc216$export$b204af158042fbac$1(e);t.documentElement.style.webkitUserSelect===`none`&&(t.documentElement.style.webkitUserSelect=$14c0b72509d70225$var$savedUserSelect||``),$14c0b72509d70225$var$savedUserSelect=``,$14c0b72509d70225$var$state=`default`}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&$14c0b72509d70225$var$modifiedElementMap.has(e)){let t=$14c0b72509d70225$var$modifiedElementMap.get(e);e.style.userSelect===`none`&&(e.style.userSelect=t),e.getAttribute(`style`)===``&&e.removeAttribute(`style`),$14c0b72509d70225$var$modifiedElementMap.delete(e)}}var $ae1eeba8b9eafd08$export$5165eccb35aaadb5=import_react.createContext({register:()=>{}});$ae1eeba8b9eafd08$export$5165eccb35aaadb5.displayName=`PressResponderContext`;function _class_apply_descriptor_get(e,t){return t.get?t.get.call(e):t.value}function _class_extract_field_descriptor(e,t,n){if(!t.has(e))throw TypeError(`attempted to `+n+` private field on non-instance`);return t.get(e)}function _class_private_field_get(e,t){return _class_apply_descriptor_get(e,_class_extract_field_descriptor(e,t,`get`))}function _class_apply_descriptor_set(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw TypeError(`attempted to set read only private field`);t.value=n}}function _class_private_field_set(e,t,n){return _class_apply_descriptor_set(e,_class_extract_field_descriptor(e,t,`set`),n),n}function $f6c31cce2adf654f$var$usePressResponderContext(e){let t=(0,import_react.useContext)($ae1eeba8b9eafd08$export$5165eccb35aa
5adb5);if(t){let{register:n,...r}=t;e=$3ef42575df84b30b$export$9d1611c77c2fe928$1(r,e),n()}return $e7801be82b4b2a53$export$4debdb1a3f0fa79e(t,e.ref),e}var $f6c31cce2adf654f$var$_shouldStopPropagation=new WeakMap,$f6c31cce2adf654f$var$PressEvent=class{continuePropagation(){_class_private_field_set(this,$f6c31cce2adf654f$var$_shouldStopPropagation,!1)}get shouldStopPropagation(){return _class_private_field_get(this,$f6c31cce2adf654f$var$_shouldStopPropagation)}constructor(e,t,n,r){_class_private_field_init(this,$f6c31cce2adf654f$var$_shouldStopPropagation,{writable:!0,value:void 0}),_class_private_field_set(this,$f6c31cce2adf654f$var$_shouldStopPropagation,!0);var i;let a=(r?.target??n.currentTarget)?.getBoundingClientRect(),o,c=0,u,K=null;n.clientX!=null&&n.clientY!=null&&(u=n.clientX,K=n.clientY),a&&(u!=null&&K!=null?(o=u-a.left,c=K-a.top):(o=a.width/2,c=a.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=o,this.y=c}},$f6c31cce2adf654f$var$LINK_CLICKED=Symbol(`linkClicked`);function $f6c31cce2adf654f$export$45712eceda6fad21(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:a,isDisabled:o,isPressed:c,preventFocusOnPress:u,shouldCancelOnPointerExit:K,allowTextSelectionOnPress:Y,ref:X,...ee}=$f6c31cce2adf654f$var$usePressResponderContext(e),[te,ce]=(0,import_react.useState)(!1),ue=(0,import_react.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:de,removeAllGlobalListeners:fe}=$03deb23ff14920c4$export$4eaf04e54aa8eed6$1(),me=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1((e,t)=>{let i=ue.current;if(o||i.didFirePressStart)return!1;let a=!0;if(i.isTriggeringEvent=!0,r){let n=new $f6c31cce2adf654f$var$PressEvent(`pressstart`,t,e);r(n),a=n.shouldStopPropagation}return n&&n(!0),i.isTriggeringEvent=!1,i.didFirePressStart=!0,ce(!0),a}),ge=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1((e,r,a=!0)=>{let c=ue.current;if(!c.didFirePressStart)return!1;c.ignoreClickAfterPress=!0,c.didFirePressStart=!1,c.isTriggeringEvent=!0;let u=!0;if(i){let t=new $f6c31cce2adf654f$var$PressEvent(`pressend`,r,e);i(t),u=t.shouldStopPropagation}if(n&&n(!1),ce(!1),t&&a&&!o){let n=new $f6c31cce2adf654f$var$PressEvent(`press`,r,e);t(n),u&&=n.shouldStopPropagation}return c.isTriggeringEvent=!1,u}),Te=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1((e,t)=>{let n=ue.current;if(o)return!1;if(a){n.isTriggeringEvent=!0;let r=new $f6c31cce2adf654f$var$PressEvent(`pressup`,t,e);return a(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),Oe=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1(e=>{let t=ue.current;t.isPressed&&t.target&&(t.isOverTarget&&t.pointerType!=null&&ge($f6c31cce2adf654f$var$createEvent(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,fe(),Y||$14c0b72509d70225$export$b0d6fa1ab32e3295(t.target))}),Ae=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1(e=>{K&&Oe(e)}),ze=(0,import_react.useMemo)(()=>{let e=ue.current,t={onKeyDown(t){if($f6c31cce2adf654f$var$isValidKeyboardEvent(t.nativeEvent,t.currentTarget)&&t.currentTarget.contains(t.target)){var r;$f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(t.target,t.key)&&t.preventDefault();let i=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,i=me(t,`keyboard`);let r=t.currentTarget;de($431fbd86ca7dc216$export$b204af158042fbac$1(t.currentTarget),`keyup`,$ff5963eb1fccf552$export$e08e3b67e392101e$1(t=>{$f6c31cce2adf654f$var$isValidKeyboardEvent(t,r)&&!t.repeat&&r.contains(t.target)&&e.target&&Te($f6c31cce2adf654f$var$createEvent(e.target,t),`keyboard`)},n),!0)}i&&t.stopPropagation(),t.metaKey&&$c87311424ea30a05$export$9ac100e40613ea10$1()&&((r=e.metaKeyEvents)==null||r.set(t.key,t.nativeEvent))}else t.key===`Meta`&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||t.currentTarget.contains(t.target))&&t&&t.button===0&&!e.isTriggeringEvent&&!$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening){let n=!0;if(o&&t.preventDefault(),!e.ignoreClickAfterPress&&!e.ignoreEmulatedMouseEvents&&!e.isPressed&&(e.pointerType===`virtual`||$6a7db85432448f7f$export$60278871457622de$1(t.nativeEvent))){!o&&!u&&$7215afc6de606d6b$export$de79e2c695e052f3$1(t.currentTarget);let e=me(t,`virtual`),r=Te(t,`virtual`),i=ge(t,`virtual`);n=e&&r&&i}e.ignoreEmulatedMouseEvents=!1,e.ignoreClickAfterPress=!1,n&&t.stopPropagation()}}},n=t=>{var n;if(e.isPressed&&e.target&&$f6c31cce2adf654f$var$isValidKeyboardEvent(t,e.target)){var r;$f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(t.target,t.key)&&t.preventDefault();let n=t.target;ge($f6c31cce2adf654f$var$createEvent(e.target,t),`keyboard`,e.target.contains(n)),fe(),t.key!==`Enter`&&$f6c31cce2adf654f$var$isHTMLAnchorLink(e.target)&&e.target.contains(n)&&!t[$f6c31cce2adf654f$var$LINK_CLICKED]&&(t[$f6c31cce2adf654f$var$LINK_CLICKED]=!0,$ea8dcbcb9ea1b556$export$95185d699e05d4d7(e.target,t,!1)),e.
5isPressed=!1,(r=e.metaKeyEvents)==null||r.delete(t.key)}else if(t.key===`Meta`&&e.metaKeyEvents?.size){var i;let t=e.metaKeyEvents;e.metaKeyEvents=void 0;for(let n of t.values())(i=e.target)==null||i.dispatchEvent(new KeyboardEvent(`keyup`,n))}};if(typeof PointerEvent<`u`){t.onPointerDown=t=>{if(t.button!==0||!t.currentTarget.contains(t.target))return;if($6a7db85432448f7f$export$29bf1b5f2c56cf63(t.nativeEvent)){e.pointerType=`virtual`;return}$f6c31cce2adf654f$var$shouldPreventDefaultDown(t.currentTarget)&&t.preventDefault(),e.pointerType=t.pointerType;let i=!0;e.isPressed||(e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,!o&&!u&&$7215afc6de606d6b$export$de79e2c695e052f3$1(t.currentTarget),Y||$14c0b72509d70225$export$16a4697467175487(e.target),i=me(t,e.pointerType),de($431fbd86ca7dc216$export$b204af158042fbac$1(t.currentTarget),`pointermove`,n,!1),de($431fbd86ca7dc216$export$b204af158042fbac$1(t.currentTarget),`pointerup`,r,!1),de($431fbd86ca7dc216$export$b204af158042fbac$1(t.currentTarget),`pointercancel`,a,!1)),i&&t.stopPropagation()},t.onMouseDown=e=>{e.currentTarget.contains(e.target)&&e.button===0&&($f6c31cce2adf654f$var$shouldPreventDefaultDown(e.currentTarget)&&e.preventDefault(),e.stopPropagation())},t.onPointerUp=t=>{t.currentTarget.contains(t.target)&&e.pointerType!==`virtual`&&t.button===0&&$f6c31cce2adf654f$var$isOverTarget(t,t.currentTarget)&&Te(t,e.pointerType||t.pointerType)};let n=t=>{t.pointerId===e.activePointerId&&(e.target&&$f6c31cce2adf654f$var$isOverTarget(t,e.target)?!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,me($f6c31cce2adf654f$var$createEvent(e.target,t),e.pointerType)):e.target&&e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,ge($f6c31cce2adf654f$var$createEvent(e.target,t),e.pointerType,!1),Ae(t)))},r=t=>{t.pointerId===e.activePointerId&&e.isPressed&&t.button===0&&e.target&&($f6c31cce2adf654f$var$isOverTarget(t,e.target)&&e.pointerType!=null?ge($f6c31cce2adf654f$var$createEvent(e.target,t),e.pointerType):e.isOverTarget&&e.pointerType!=null&&ge($f6c31cce2adf654f$var$createEvent(e.target,t),e.pointerType,!1),e.isPressed=!1,e.isOverTarget=!1,e.activePointerId=null,e.pointerType=null,fe(),Y||$14c0b72509d70225$export$b0d6fa1ab32e3295(e.target),`ontouchend`in e.target&&t.pointerType!==`mouse`&&de(e.target,`touchend`,i,{once:!0}))},i=e=>{$f6c31cce2adf654f$var$shouldPreventDefaultUp(e.currentTarget)&&e.preventDefault()},a=e=>{Oe(e)};t.onDragStart=e=>{e.currentTarget.contains(e.target)&&Oe(e)}}else{t.onMouseDown=t=>{if(t.button===0&&t.currentTarget.contains(t.target)){if($f6c31cce2adf654f$var$shouldPreventDefaultDown(t.currentTarget)&&t.preventDefault(),e.ignoreEmulatedMouseEvents){t.stopPropagation();return}e.isPressed=!0,e.isOverTarget=!0,e.target=t.currentTarget,e.pointerType=$6a7db85432448f7f$export$60278871457622de$1(t.nativeEvent)?`virtual`:`mouse`,!o&&!u&&$7215afc6de606d6b$export$de79e2c695e052f3$1(t.currentTarget),me(t,e.pointerType)&&t.stopPropagation(),de($431fbd86ca7dc216$export$b204af158042fbac$1(t.currentTarget),`mouseup`,n,!1)}},t.onMouseEnter=t=>{if(!t.currentTarget.contains(t.target))return;let n=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&e.pointerType!=null&&(e.isOverTarget=!0,n=me(t,e.pointerType)),n&&t.stopPropagation()},t.onMouseLeave=t=>{if(!t.currentTarget.contains(t.target))return;let n=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&e.pointerType!=null&&(e.isOverTarget=!1,n=ge(t,e.pointerType,!1),Ae(t)),n&&t.stopPropagation()},t.onMouseUp=t=>{t.currentTarget.contains(t.target)&&!e.ignoreEmulatedMouseEvents&&t.button===0&&Te(t,e.pointerType||`mouse`)};let n=t=>{if(t.button===0){if(e.isPressed=!1,fe(),e.ignoreEmulatedMouseEvents){e.ignoreEmulatedMouseEvents=!1;return}e.target&&$f6c31cce2adf654f$var$isOverTarget(t,e.target)&&e.pointerType!=null?ge($f6c31cce2adf654f$var$createEvent(e.target,t),e.pointerType):e.target&&e.isOverTarget&&e.pointerType!=null&&ge($f6c31cce2adf654f$var$createEvent(e.target,t),e.pointerType,!1),e.isOverTarget=!1}};t.onTouchStart=t=>{if(!t.currentTarget.contains(t.target))return;let n=$f6c31cce2adf654f$var$getTouchFromEvent(t.nativeEvent);n&&(e.activePointerId=n.identifier,e.ignoreEmulatedMouseEvents=!0,e.isOverTarget=!0,e.isPressed=!0,e.target=t.currentTarget,e.pointerType=`touch`,!o&&!u&&$7215afc6de606d6b$export$de79e2c695e052f3$1(t.currentTarget),Y||$14c0b72509d70225$export$16a4697467175487(e.target),me($f6c31cce2adf654f$var$createTouchEvent(e.target,t),e.pointerType)&&t.stopPropagation(),de($431fbd86ca7dc216$export$f21a1ffae260145a$1(t.currentTarget),`scroll`,r,!0))},t.onTouchMove=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let n=$f6c31cce2adf654f$var$getTouchById(t.nativeEvent,e.activePointerId),r=!0;n&&$f6c31cce2adf654f$var$isOverTarget(n,t.currentTarget)?!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,r=me($f6c31cce2adf654f$var$createTouchEvent(e.target,t),e.pointerType)):e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,r=ge($f6c31cce2adf654f$var$createTouchEvent(e.target,t),e.pointerType,!1),Ae($f6c31cce2adf654f$var$createTouchEvent(e.target,t))),r&&t.stopPropagation()},t.onTouchEnd=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let n=$f6c31cce2adf654f$var$getTouchById(t.nativeEvent,e.activePointerId),r=!0;n&&$f6c31cce2adf654f$var$isOverTarget(n,t.currentTarget)&&e.pointerType!=null?(Te($f6c31cce2adf654f$var$createTouchEvent(e.target,t),e.pointerType),r=ge($f6c31cce2adf654f$var$createTouchEvent(e.target,t),e.pointerType)):e.isOverTarget&&e.pointerType!=null&&(r=ge($f6c31cce2adf654f$var$createTouchEvent(e.target,t),e.pointerType,!1)),r&&t.stopPropagation(),e.isPressed=!1,e.activePointerId=null,e.isOverTarget=!1,e.ignoreEmulatedMouseEvents=!0,e.target&&!Y&&$14c0b72509d70225$export$b0d6fa1ab32e3295(e.target),fe()},t.onTouchCancel=t=>{t.currentTarget.contains(t.target)&&(t.stopPropagation(),e.isPressed&&Oe($f6c31cce2adf654f$var$createTouchEvent(e.target,t)))};let r=t=>{e.isPressed&&t.target.contains(e.target)&&Oe({currentTarget:e.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};t.onDragStart=e=>{e.currentTarget.contains(e.target)&&Oe(e)}}return t},[de,o,u,fe,Y,Oe,Ae,ge,me,Te]);return(0,import_react.useEffect)(()=>()=>{var e;Y||$14c0b72509d70225$export$b0d6fa1ab32e3295(ue.current.target??void 0)},[Y]),{isPressed:c||te,pressProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(ee,ze)}}function $f6c31cce2adf654f$var$isHTMLAnchorLink(e){return e.tagName===`A`&&e.hasAttribute(`href`)}function $f6c31cce2adf654f$var$isValidKeyboardEvent(e,t){let{key:n,code:r}=e,i=t,a=i.getAttribute(`role`);return(n===`Enter`||n===` `||n===`Spacebar`||r===`Space`)&&!(i instanceof $431fbd86ca7dc216$export$f21a1ffae260145a$1(i).HTMLInputElement&&!$f6c31cce2adf654f$var$isValidInputKey(i,n)||i instanceof $431fbd86ca7dc216$export$f21a1ffae260145a$1(i).HTMLTextAreaElement||i.isContentEditable)&&!((a===`link`||!a&&$f6c31cce2adf654f$var$isHTMLAnchorLink(i))&&n!==`Enter`)}function $f6c31cce2adf654f$var$getTouchFromEvent(e){let{targetTouches:t}=e;return t.length>0?t[0]:null}function $f6c31cce2adf654f$var$getTouchById(e,t){let n=e.changedTouches;for(let e=0;e<n.length;e++){let r=n[e];if(r.identifier===t)return r}return null}function $f6c31cce2adf654f$var$createTouchEvent(e,t){let n=0,r=0;return t.targetTouches&&t.targetTouches.length===1&&(n=t.targetTouches[0].clientX,r=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function $f6c31cce2adf654f$var$createEvent(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function $f6c31cce2adf654f$var$getPointClientRect(e){let t=0,n=0;
5return e.width===void 0?e.radiusX!==void 0&&(t=e.radiusX):t=e.width/2,e.height===void 0?e.radiusY!==void 0&&(n=e.radiusY):n=e.height/2,{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function $f6c31cce2adf654f$var$areRectanglesOverlapping(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function $f6c31cce2adf654f$var$isOverTarget(e,t){return $f6c31cce2adf654f$var$areRectanglesOverlapping(t.getBoundingClientRect(),$f6c31cce2adf654f$var$getPointClientRect(e))}function $f6c31cce2adf654f$var$shouldPreventDefaultDown(e){return!(e instanceof HTMLElement)||!e.hasAttribute(`draggable`)}function $f6c31cce2adf654f$var$shouldPreventDefaultUp(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!==`submit`&&e.type!==`reset`:!$f6c31cce2adf654f$var$isHTMLAnchorLink(e)}function $f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(e,t){return e instanceof HTMLInputElement?!$f6c31cce2adf654f$var$isValidInputKey(e,t):$f6c31cce2adf654f$var$shouldPreventDefaultUp(e)}var $f6c31cce2adf654f$var$nonTextInputTypes=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function $f6c31cce2adf654f$var$isValidInputKey(e,t){return e.type===`checkbox`||e.type===`radio`?t===` `:$f6c31cce2adf654f$var$nonTextInputTypes.has(e.type)}function $f1ab8c75478c6f73$export$cf75428e0b9ed1ea({children:e}){let t=(0,import_react.useMemo)(()=>({register:()=>{}}),[]);return import_react.createElement($ae1eeba8b9eafd08$export$5165eccb35aa
vendor: 4,558 bytes, line 5
5adb5.Provider,{value:t},e)}var $8a9cb279dc87e130$export$905e7fc544a71f36=class{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}};function $8a9cb279dc87e130$export$715c682d09d639cc$1(e){let t=(0,import_react.useRef)({isFocused:!1,observer:null});$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{let e=t.current;return()=>{e.observer&&=(e.observer.disconnect(),null)}},[]);let n=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1(t=>{e?.(t)});return(0,import_react.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target;r.addEventListener(`focusout`,e=>{t.current.isFocused=!1,r.disabled&&n(new $8a9cb279dc87e130$export$905e7fc544a71f36(`blur`,e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;(e=t.current.observer)==null||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:n})),r.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:[`disabled`]})}},[n])}function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e,a=(0,import_react.useCallback)(e=>{if(e.target===e.currentTarget)return r&&r(e),i&&i(!1),!0},[r,i]),o=$8a9cb279dc87e130$export$715c682d09d639cc$1(a),c=(0,import_react.useCallback)(e=>{let t=$431fbd86ca7dc216$export$b204af158042fbac$1(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(n&&n(e),i&&i(!0),o(e))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?c:void 0,onBlur:!t&&(r||i)?a:void 0}}}var $507fabe10e71c6fb$var$currentModality$1=null,$507fabe10e71c6fb$var$changeHandlers$1=new Set,$507fabe10e71c6fb$export$d90243b58daecda7$1=new Map,$507fabe10e71c6fb$var$hasEventBeforeFocus$1=!1,$507fabe10e71c6fb$var$hasBlurredWindowRecently$1=!1,$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS={Tab:!0,Escape:!0};function $507fabe10e71c6fb$var$triggerChangeHandlers$1(e,t){for(let n of $507fabe10e71c6fb$var$changeHandlers$1)n(e,t)}function $507fabe10e71c6fb$var$isValidKey$1(e){return!(e.metaKey||!$c87311424ea30a05$export$9ac100e40613ea10$1()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}function $507fabe10e71c6fb$var$handleKeyboardEvent$1(e){$507fabe10e71c6fb$var$hasEventBeforeFocus$1=!0,$507fabe10e71c6fb$var$isValidKey$1(e)&&($507fabe10e71c6fb$var$currentModality$1=`keyboard`,$507fabe10e71c6fb$var$triggerChangeHandlers$1(`keyboard`,e))}function $507fabe10e71c6fb$var$handlePointerEvent$1(e){$507fabe10e71c6fb$var$currentModality$1=`pointer`,(e.type===`mousedown`||e.type===`pointerdown`)&&($507fabe10e71c6fb$var$hasEventBeforeFocus$1=!0,$507fabe10e71c6fb$var$triggerChangeHandlers$1(`pointer`,e))}function $507fabe10e71c6fb$var$handleClickEvent$1(e){$6a7db85432448f7f$export$60278871457622de$1(e)&&($507fabe10e71c6fb$var$hasEventBeforeFocus$1=!0,$507fabe10e71c6fb$var$currentModality$1=`virtual`)}function $507fabe10e71c6fb$var$handleFocusEvent$1(e){e.target!==window&&e.target!==document&&(!$507fabe10e71c6fb$var$hasEventBeforeFocus$1&&!$507fabe10e71c6fb$var$hasBlurredWindowRecently$1&&($507fabe10e71c6fb$var$currentModality$1=`virtual`,$507fabe10e71c6fb$var$triggerChangeHandlers$1(`virtual`,e)),$507fabe10e71c6fb$var$hasEventBeforeFocus$1=!1,$507fabe10e71c6fb$var$hasBlurredWindowRecently$1=!1)}function $507fabe10e71c6fb$var$handleWindowBlur$1(){$507fabe10e71c6fb$var$hasEventBeforeFocus$1=!1,$507fabe10e71c6fb$var$hasBlurredWindowRecently$1=!0}function $507fabe10e71c6fb$var$setupGlobalFocusEvents$1(e){if(typeof window>`u`||$507fabe10e71c6fb$export$d90243b58daecda7$1.get($431fbd86ca7dc216$export$f21a1ffae260145a$1(e)))return;let t=$431fbd86ca7dc216$export$f21a1ffae260145a$1(e),n=$431fbd86ca7dc216$export$b204af158042fbac$1(e),r=t.HTMLElement.prototype.focu
5s;t.HTMLElement.prototype.focus=function(){$507fabe10e71c6fb$var$hasEventBeforeFocus$1=!0,r.apply(this,arguments)},n.addEventListener(`keydown`,$507fabe10e71c6fb$var$handleKeyboardEvent$1,!0),n.addEventListener(`keyup`,$507fabe10e71c6fb$var$handleKeyboardEvent$1,!0),n.addEventListener(`click`,$507fabe10e71c6fb$var$handleClickEvent$1,!0),t.addEventListener(`focus`,$507fabe10e71c6fb$var$handleFocusEvent$1,!0),t.addEventListener(`blur`,$507fabe10e71c6fb$var$handleWindowBlur$1,!1),typeof PointerEvent<`u`?(n.addEventListener(`pointerdown`,$507fabe10e71c6fb$var$handlePointerEvent$1,!0),n.addEventListener(`pointermove`,$507fabe10e71c6fb$var$handlePointerEvent$1,!0),n.addEventListener(`pointerup`,$507fabe10e71c6fb$var$handlePointerEvent$1,!0)):(n.addEventListener(`mousedown`,$507fabe10e71c6fb$var$handlePointerEvent$1,!0),n.addEventListener(`mousemove`,$507fabe10e71c6fb$var$handlePointerEvent$1,!0),n.addEventListener(`mouseup`,$507fabe10e71c6fb$var$handlePointerEvent$1,!0)),t.addEventListener(`beforeunload`,()=>{$507fabe10e71c6fb$var$tearDownWindowFocusTracking$1(e)},{once:!0}),$507fabe10e71c6fb$export$d90243b58daecda7$1.set(t,{focus:r})}var $507fabe10e71c6fb$var$tearDownWindowFocusTracking$1=(e,t)=>{let n=$431fbd86ca7dc216$export$f21a1ffae260145a$1(e),r=$431fbd86ca7dc216$export$b204af158042fbac$1(e);t&&r.removeEventListener(`DOMContentLoaded`,t),$507fabe10e71c6fb$export$d90243b58daecda7$1.has(n)&&(n.HTMLElement.prototype.focus=$507fabe10e71c6fb$export$d90243b58daecda7$1.get(n).focus,r.removeEventListener(`keydown`,$507fabe10e71c6fb$var$handleKeyboardEvent$1,!0),r.removeEventListener(`keyup`,$507fabe10e71c6fb$var$handleKeyboardEvent$1,!0),r.removeEventListener(`click`,$507fabe10e71c6fb$var$handleClickEvent$1,!0),n.removeEventListener(`focus`,$507fabe10e71c6fb$var$handleFocusEvent$1,!0),n.removeEventListener(`blur`,$507fabe10e71c6fb$var$handleWindowBlur$1,!1),typeof PointerEvent<`u`?(r.removeEventListener(`pointerdown`,$507fabe10e71c6fb$var$handlePointerEvent$1,!0),r.removeEventListener(`pointermove`,$507fabe10e71c6fb$var$handlePointerEvent$1,!0),r.removeEventListener(`pointerup`,$507fabe10e71c6fb$var$handlePointerEvent$1,!0)):(r.removeEventListener(`mousedown`,$507fabe10e71c6fb$var$handlePointerEvent$1,!0),r.removeEventListener(`mousemove`,$507fabe10e71c6fb$var$handlePointerEvent$1,!0),r.removeEventListener(`mouseup`,$507fabe10e71c6fb$var$handlePointerEvent$1,!0)),$507fabe10e71c6fb$export$d90243b58daecda7$1.delete(n))};function $507fabe10e71c6fb$export$2f1888112f558a7d$1(e){let t=$431fbd86ca7dc216$export$b204af158042fbac$1(e),n;return t.readyState===`loading`?(n=()=>{$507fabe10e71c6fb$var$setupGlobalFocusEvents$1(e)},t.addEventListener(`DOMContentLoaded`,n)):$507fabe10e71c6fb$var$setupGlobalFocusEvents$1(e),()=>$507fabe10e71c6fb$var$tearDownWindowFocusTracking$1(e,n)}typeof document<`u`&&$507fabe10e71c6fb$export$2f1888112f558a7d$1();function $507fabe10e71c6fb$export$b9b3dfddab17db27(){return $507fabe10e71c6fb$var$currentModality$1!==`pointer`}function $507fabe10e71c6fb$export$630ff653c5ada6a9$1(){return $507fabe10e71c6fb$var$currentModality$1}function $507fabe10e71c6fb$export$8397ddfc504fdb9a(e){$507fabe10e71c6fb$var$currentModality$1=e,$507fabe10e71c6fb$var$triggerChangeHandlers$1(e,null)}var $507fabe10e71c6fb$var$nonTextInputTypes=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function $507fabe10e71c6fb$var$isKeyboardFocusEvent(e,t,n){var r;let i=typeof window<`u`?$431fbd86ca7dc216$export$f21a1ffae260145a$1(n?.target).HTMLInputElement:HTMLInputElement,a=typeof window<`u`?$431fbd86ca7dc216$export$f21a1ffae260145a$1(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window<`u`?$431fbd86ca7dc216$export$f21a1ffae260145a$1(n?.target).HTMLElement:HTMLElement,c=typeof window<`u`?$431fbd86ca7dc216$export$f21a1ffae260145a$1(n?.target).KeyboardEvent:KeyboardEvent;return e=e||n?.target instanceof i&&!$507fabe10e71c6fb$var$nonTextInputTypes.has(n?.target?.type)||n?.target instanceof a||n?.target instanceof o&&n?.target.isContentEditable,!(e&&t===`keyboard`&&n instanceof c&&!$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[n.key])}function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(e,t,n){$507fabe10e71c6fb$var$setupGlobalFocusEvents$1(),(0,import_react.useEffect)(()=>{let t=(t,r)=>{$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!n?.isTextInput,t,r)&&e($507fabe10e71c6fb$export$b9b3dfddab17db27())};return $507fabe10e71c6fb$var$changeHandlers$1.add(t),()=>{$507fabe10e71c6fb$var$changeHandlers$1.delete(t)}},t)}function $9ab94262bd0047c7$export$420e68273165f4ec$1(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=(0,import_react.useRef)({isFocusWithin:!1}),o=(0,import_react.useCallback)(e=>{a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,n&&n(e),i&&i(!1))},[n,i,a]),c=$8a9cb279dc87e130$export$715c682d09d639cc$1(o),u=(0,import_react.useCallback)(e=>{!a.current.isFocusWithin&&document.activeElement===e.target&&(r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,c(e))},[r,i,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}
5:{focusWithinProps:{onFocus:u,onBlur:o}}}var $6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents$1=!1,$6179b936705e76d3$var$hoverCount$1=0;function $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents$1(){$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents$1=!0,setTimeout(()=>{$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents$1=!1},50)}function $6179b936705e76d3$var$handleGlobalPointerEvent$1(e){e.pointerType===`touch`&&$6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents$1()}function $6179b936705e76d3$var$setupGlobalTouchEvents$1(){if(typeof document<`u`)return typeof PointerEvent<`u`?document.addEventListener(`pointerup`,$6179b936705e76d3$var$handleGlobalPointerEvent$1):document.addEventListener(`touchend`,$6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents$1),$6179b936705e76d3$var$hoverCount$1++,()=>{$6179b936705e76d3$var$hoverCount$1--,!($6179b936705e76d3$var$hoverCount$1>0)&&(typeof PointerEvent<`u`?document.removeEventListener(`pointerup`,$6179b936705e76d3$var$handleGlobalPointerEvent$1):document.removeEventListener(`touchend`,$6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents$1))}}function $6179b936705e76d3$export$ae780daf29e6d456$1(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,o]=(0,import_react.useState)(!1),c=(0,import_react.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:``,target:null}).current;(0,import_react.useEffect)($6179b936705e76d3$var$setupGlobalTouchEvents$1,[]);let{hoverProps:u,triggerHoverEnd:K}=(0,import_react.useMemo)(()=>{let e=(e,r)=>{if(c.pointerType=r,i||r===`touch`||c.isHovered||!e.currentTarget.contains(e.target))return;c.isHovered=!0;let a=e.currentTarget;c.target=a,t&&t({type:`hoverstart`,target:a,pointerType:r}),n&&n(!0),o(!0)},a=(e,t)=>{if(c.pointerType=``,c.target=null,t===`touch`||!c.isHovered)return;c.isHovered=!1;let i=e.currentTarget;r&&r({type:`hoverend`,target:i,pointerType:t}),n&&n(!1),o(!1)},u={};return typeof PointerEvent<`u`?(u.onPointerEnter=t=>{$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents$1&&t.pointerType===`mouse`||e(t,t.pointerType)},u.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&a(e,e.pointerType)}):(u.onTouchStart=()=>{c.ignoreEmulatedMouseEvents=!0},u.onMouseEnter=t=>{!c.ignoreEmulatedMouseEvents&&!$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents$1&&e(t,`mouse`),c.ignoreEmulatedMouseEvents=!1},u.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&a(e,`mouse`)}),{hoverProps:u,triggerHoverEnd:a}},[t,n,r,i,c]);return(0,import_react.useEffect)(()=>{i&&K({currentTarget:c.target},c.pointerType)},[i]),{hoverProps:u,isHovered:a}}function $e0b6e0b68ec7f50f$export$872b660ac5a1ff98(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,a=(0,import_react.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),o=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1(e=>{n&&$e0b6e0b68ec7f50f$var$isValidEvent(e,t)&&(i&&i(e),a.current.isPointerDown=!0)}),c=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1(e=>{n&&n(e)});(0,import_react.useEffect)(()=>{let e=a.current;if(r)return;let n=t.current,i=$431fbd86ca7dc216$export$b204af158042fbac$1(n);if(typeof PointerEvent<`u`){let n=n=>{e.isPointerDown&&$e0b6e0b68ec7f50f$var$isValidEvent(n,t)&&c(n),e.isPointerDown=!1};return i.addEventListener(`pointerdown`,o,!0),i.addEventListener(`pointerup`,n,!0),()=>{i.removeEventListener(`pointerdown`,o,!0),i.removeEventListener(`pointerup`,n,!0)}}{let n=n=>{e.ignoreEmulatedMouseEvents?e.ignoreEmulatedMouseEvents=!1:e.isPointerDown&&$e0b6e0b68ec7f50f$var$isValidEvent(n,t)&&c(n),e.isPointerDown=!1},r=n=>{e.ignoreEmulatedMouseEvents=!0,e.isPointerDown&&$e0b6e0b68ec7f50f$var$isValidEvent(n,t)&&c(n),e.isPointerDown=!1};return i.addEventListener(`mousedown`,o,!0),i.addEventListener(`mouseup`,n,!0),i.addEventListener(`touchstart`,o,!0),i.addEventListener(`touchend`,r,!0),()=>{i.removeEventListener(`mousedown`,o,!0),i.removeEventListener(`mouseup`,n,!0),i.removeEventListener(`touchstart`,o,!0),i.removeEventListener(`touchend`,r,!0)}}},[t,r,o,c])}function $e0b6e0b68ec7f50f$var$isValidEvent(e,t){if(e.button>0)return!1;if(e.target){let t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target)||e.target.closest(`[data-react-aria-top-layer]`))return!1}return t.current&&!t.current.contains(e.target)}function $93925083ecbb358c$export$48d1ea6320830260(e){if(!e)return;let t=!0;return n=>{e({...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error(`stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.`)},continuePropagation(){t=!1}}),t&&n.stopPropagation()}}function $46d819fcbaf35654$export$8f71654801c2f7cd(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:$93925083ecbb358c$export$48d1ea6320830260(e.onKeyDown),onKeyUp:$93925083ecbb358c$export$48d1ea6320830260(e.onKeyUp)}}}function $e8a7022cf87cba2a$export$36da96379f79f245(e){let{onMoveStart:t,onMove:n,onMoveEnd:r}=e,i=(0,import_react.useRef)({didMove:!1,lastPosition:null,id:null}),{addGlobalListener:a,removeGlobalListener:o}=$03deb23ff14920c4$export$4eaf04e54aa8eed6$1(),c=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1((e,r,a,o)=>{(a!==0||o!==0)&&(i.current.didMove||(i.current.didMove=!0,t?.({type:`movestart`,pointerType:r,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})),n?.({type:`move`,pointerType:r,deltaX:a,deltaY:o,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey}))}),u=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1((e,t)=>{$14c0b72509d70225$export$b0d6fa1ab32e3295(),i.current.didMove&&r?.({type:`moveend`,pointerType:t,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})});return{moveProps:(0,import_react.useMemo)(()=>{let e={},t=()=>{$14c0b72509d70225$export$16a4697467175487(),i.current.didMove=!1};if(typeof PointerEvent>`u`){let n=e=>{if(e.button===0){var t,n,r,a;c(e,`mouse`,e.pageX-(i.current.lastPosition?.pageX??0),e.pageY-(i.current.lastPosition?.pageY??0)),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY}}},r=e=>
5{e.button===0&&(u(e,`mouse`),o(window,`mousemove`,n,!1),o(window,`mouseup`,r,!1))};e.onMouseDown=e=>{e.button===0&&(t(),e.stopPropagation(),e.preventDefault(),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY},a(window,`mousemove`,n,!1),a(window,`mouseup`,r,!1))};let K=e=>{let t=[...e.changedTouches].findIndex(({identifier:e})=>e===i.current.id);if(t>=0){var n,r;let{pageX:u,pageY:K}=e.changedTouches[t];var a,o;c(e,`touch`,u-(i.current.lastPosition?.pageX??0),K-(i.current.lastPosition?.pageY??0)),i.current.lastPosition={pageX:u,pageY:K}}},Y=e=>{[...e.changedTouches].findIndex(({identifier:e})=>e===i.current.id)>=0&&(u(e,`touch`),i.current.id=null,o(window,`touchmove`,K),o(window,`touchend`,Y),o(window,`touchcancel`,Y))};e.onTouchStart=e=>{if(e.changedTouches.length===0||i.current.id!=null)return;let{pageX:n,pageY:r,identifier:o}=e.changedTouches[0];t(),e.stopPropagation(),e.preventDefault(),i.current.lastPosition={pageX:n,pageY:r},i.current.id=o,a(window,`touchmove`,K,!1),a(window,`touchend`,Y,!1),a(window,`touchcancel`,Y,!1)}}else{let n=e=>{if(e.pointerId===i.current.id){var t,n;let o=e.pointerType||`mouse`;var r,a;c(e,o,e.pageX-(i.current.lastPosition?.pageX??0),e.pageY-(i.current.lastPosition?.pageY??0)),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY}}},r=e=>{if(e.pointerId===i.current.id){let t=e.pointerType||`mouse`;u(e,t),i.current.id=null,o(window,`pointermove`,n,!1),o(window,`pointerup`,r,!1),o(window,`pointercancel`,r,!1)}};e.onPointerDown=e=>{e.button===0&&i.current.id==null&&(t(),e.stopPropagation(),e.preventDefault(),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY},i.current.id=e.pointerId,a(window,`pointermove`,n,!1),a(window,`pointerup`,r,!1),a(window,`pointercancel`,r,!1))}}let n=(e,n,r)=>{t(),c(e,`keyboard`,n,r),u(e,`keyboard`)};return e.onKeyDown=e=>{switch(e.key){case`Left`:case`ArrowLeft`:e.preventDefault(),e.stopPropagation(),n(e,-1,0);break;case`Right`:case`ArrowRight`:e.preventDefault(),e.stopPropagation(),n(e,1,0);break;case`Up`:case`ArrowUp`:e.preventDefault(),e.stopPropagation(),n(e,0,-1);break;case`Down`:case`ArrowDown`:e.preventDefault(),e.stopPropagation(),n(e,0,1)}},e},[i,a,o,c,u])}}function $7d0a636d7a4dcefd$export$2123ff2b87c81ca(e,t){let{onScroll:n,isDisabled:r}=e,i=(0,import_react.useCallback)(e=>{e.ctrlKey||(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);$e9faafb641e167db$export$90fc3a17d93f704c(t,`wheel`,r?void 0:i)}var $8a26561d2877236e$var$DEFAULT_THRESHOLD=500;function $8a26561d2877236e$export$c24ed0104d07eab9(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:a=$8a26561d2877236e$var$DEFAULT_THRESHOLD,accessibilityDescription:o}=e,c=(0,import_react.useRef)(void 0),{addGlobalListener:u,removeGlobalListener:K}=$03deb23ff14920c4$export$4eaf04e54aa8eed6$1(),{pressProps:Y}=$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:t,onPressStart(e){if(e.continuePropagation(),(e.pointerType===`mouse`||e.pointerType===`touch`)&&(n&&n({...e,type:`longpressstart`}),c.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent(`pointercancel`,{bubbles:!0})),i&&i({...e,type:`longpress`}),c.current=void 0},a),e.pointerType===`touch`)){let t=e=>{e.preventDefault()};u(e.target,`contextmenu`,t,{once:!0}),u(window,`pointerup`,()=>{setTimeout(()=>{K(e.target,`contextmenu`,t)},30)},{once:!0})}},onPressEnd(e){c.current&&clearTimeout(c.current),r&&(e.pointerType===`mouse`||e.pointerType===`touch`)&&r({...e,type:`longpressend`})}});return{longPressProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(Y,$ef06256079686ba0$export$f8aeda7b10753fa1(i&&!t?o:void 0))}}function $6a99195332edec8b$export$80f3e147d781571c(e){let t=$431fbd86ca7dc216$export$b204af158042fbac$1(e);if($507fabe10e71c6fb$export$630ff653c5ada6a9$1()===`virtual`){let n=t.activeElement;$bbed8b41f857bcc0$export$24490316f764c430(()=>{t.activeElement===n&&e.isConnected&&$7215afc6de606d6b$export$de79e2c695e052f3$1(e)})}else $7215afc6de606d6b$export$de79e2c695e052f3$1(e)}function $645f2e67b85a24c9$var$isStyleVisible(e){let t=$431fbd86ca7dc216$export$f21a1ffae260145a$1(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!==`none`&&r!==`hidden`&&r!==`collapse`;if(i){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);i=n!==`none`&&r!==`hidden`&&r!==`collapse`}return i}function $645f2e67b85a24c9$var$isAttributeVisible(e,t){return!e.hasAttribute(`hidden`)&&!e.hasAttribute(`data-react-aria-prevent-focus`)&&(e.nodeName===`DETAILS`&&t&&t.nodeName!==`SUMMARY`?e.hasAttribute(`open`):!0)}function $645f2e67b85a24c9$export$e989c0fffaa6b27a(e,t){return e.no
vendor: 18,447 bytes, line 5
5deName!==`#comment`&&$645f2e67b85a24c9$var$isStyleVisible(e)&&$645f2e67b85a24c9$var$isAttributeVisible(e,t)&&(!e.parentElement||$645f2e67b85a24c9$export$e989c0fffaa6b27a(e.parentElement,e))}var $9bf71ea28793e738$var$FocusContext=import_react.createContext(null),$9bf71ea28793e738$var$RESTORE_FOCUS_EVENT=`react-aria-focus-scope-restore`,$9bf71ea28793e738$var$activeScope=null;function $9bf71ea28793e738$export$20e40289641fbbb6(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,a=(0,import_react.useRef)(null),o=(0,import_react.useRef)(null),c=(0,import_react.useRef)([]),{parentNode:u}=(0,import_react.useContext)($9bf71ea28793e738$var$FocusContext)||{},K=(0,import_react.useMemo)(()=>new $9bf71ea28793e738$var$TreeNode({scopeRef:c}),[c]);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{let e=u||$9bf71ea28793e738$export$d06fae2ee68b101e.root;if($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(e.scopeRef)&&$9bf71ea28793e738$var$activeScope&&!$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope,e.scopeRef)){let t=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);t&&(e=t)}e.addChild(K),$9bf71ea28793e738$export$d06fae2ee68b101e.addNode(K)},[K,u]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{let e=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(c);e&&(e.contain=!!n)},[n]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{var e;let t=a.current?.nextSibling,n=[],r=e=>e.stopPropagation();for(;t&&t!==o.current;)n.push(t),t.addEventListener($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT,r),t=t.nextSibling;return c.current=n,()=>{for(let e of n)e.removeEventListener($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT,r)}},[t]),$9bf71ea28793e738$var$useActiveScopeTracker(c,r,n),$9bf71ea28793e738$var$useFocusContainment(c,n),$9bf71ea28793e738$var$useRestoreFocus(c,r,n),$9bf71ea28793e738$var$useAutoFocus(c,i),(0,import_react.useEffect)(()=>{let e=$431fbd86ca7dc216$export$b204af158042fbac$1(c.current?c.current[0]:void 0).activeElement,t=null;if($9bf71ea28793e738$var$isElementInScope(e,c.current)){for(let n of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse())n.scopeRef&&$9bf71ea28793e738$var$isElementInScope(e,n.scopeRef.current)&&(t=n);t===$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(c)&&($9bf71ea28793e738$var$activeScope=t.scopeRef)}},[c]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>()=>{var e,t,n;let r=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(c)?.parent?.scopeRef??null;(c===$9bf71ea28793e738$var$activeScope||$9bf71ea28793e738$var$isAncestorScope(c,$9bf71ea28793e738$var$activeScope))&&(!r||$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(r))&&($9bf71ea28793e738$var$activeScope=r),$9bf71ea28793e738$export$d06fae2ee68b101e.removeTreeNode(c)},[c]);let Y=(0,import_react.useMemo)(()=>$9bf71ea28793e738$var$createFocusManagerForScope(c),[]),X=(0,import_react.useMemo)(()=>({focusManager:Y,parentNode:K}),[K,Y]);return import_react.createElement($9bf71ea28793e738$var$FocusContext.Provider,{value:X},import_react.createElement(`span`,{"data-focus-scope-start":!0,hidden:!0,ref:a}),t,import_react.createElement(`span`,{"data-focus-scope-end":!0,hidden:!0,ref:o}))}function $9bf71ea28793e738$export$10c5169755ce7bd7(){var e;return(0,import_react.useContext)($9bf71ea28793e738$var$FocusContext)?.focusManager}function $9bf71ea28793e738$var$createFocusManagerForScope(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,c=r||$431fbd86ca7dc216$export$b204af158042fbac$1(n[0]).activeElement,u=n[0].previousElementSibling,K=$9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(n),{tabbable:i,accept:o},n);K.currentNode=$9bf71ea28793e738$var$isElementInScope(c,n)?c:u;let Y=K.nextNode();return!Y&&a&&(K.currentNode=u,Y=K.nextNode()),Y&&$9bf71ea28793e738$var$focusElement(Y,!0),Y},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,c=r||$431fbd86ca7dc216$export$b204af158042fbac$1(n[0]).activeElement,u=n[n.length-1].nextElementSibling,K=$9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(n),{tabbable:i,accept:o},n);K.currentNode=$9bf71ea28793e738$var$isElementInScope(c,n)?c:u;let Y=K.previousNode();return!Y&&a&&(K.currentNode=u,Y=K.previousNode()),Y&&$9bf71ea28793e738$var$focusElement(Y,!0),Y},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=$9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(n),{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let o=a.nextNode();return o&&$9bf71ea28793e738$var$focusElement(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=$9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(n),{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let o=a.previousNode();return o&&$9bf71ea28793e738$var$focusElement(o,!0),o}}}var $9bf71ea28793e738$var$focusableElements=[`input:not([disabled]):not([type=hidden])`,`select:not([disabled])`,`textarea:not([disabled])`,`button:not([disabled])`,`a[href]`,`area[href]`,`summary`,`iframe`,`object`,`embed`,`audio[controls]`,`video[controls]`,`[contenteditable]`],$9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR=$9bf71ea28793e738$var$focusableElements.join(`:not([hidden]),`)+`,[tabindex]:not([disabled]):not([hidden])`;$9bf71ea28793e738$var$focusableElements.push(`[tabindex]:not([tabindex="-1"]):not([disabled])`);var $9bf71ea28793e738$var$TABBABLE_ELEMENT_SELECTOR=$9bf71ea28793e738$var$focusableElements.join(`:not([hidden]):not([tabindex="-1"]),`);function $9bf71ea28793e738$var$getScopeRoot(e){return e[0].parentElement}function $9bf71ea28793e738$var$shouldContainFocus(e){let t=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function $9bf71ea28793e738$var$useFocusContainment(e,t){let n=(0,import_react.useRef)(void 0),r=(0,import_react.useRef)(void 0);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{let i=e.current;if(!t){r.current&&=(cancelAnimationFrame(r.current),void 0);return}let a=$431fbd86ca7dc216$export$b204af158042fbac$1(i?i[0]:void 0),o=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!$9bf71ea28793e738$var$shouldContainFocus(e)||t.isComposing)return;let n=a.activeElement,r=e.current;if(!r||!$9bf71ea28793e738$var$isElementInScope(n,r))return;let i=$9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(r),{tabbable:!0},r);if(!n)return;i.currentNode=n;let o=t.shiftKey?i.previousNode():i.nextNode();o||=(i.currentNode=t.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,t.shiftKey?i.previousNode():i.nextNode()),t.preventDefault(),o&&$9bf71ea28793e738$var$focusElement(o,!0)},c=t=>{(!$9bf71ea28793e738$var$activeScope||$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope,e))&&$9bf71ea28793e738$var$isElementInScope(t.target,e.current)?($9bf71ea28793e738$var$activeScope=e,n.current=t.target):$9bf71ea28793e738$var$shouldContainFocus(e)&&!$9bf71ea28793e738$var$isElementInChildScope(t.target,e)?n.current?n.current.focus():$9bf71ea28793e738$var$activeScope&&$9bf71ea28793e738$var$activeScope.current&&$9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current):$9bf71ea28793e738$var$shouldContainFocus(e)&&(n.current=t.target)},u=t=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{if(a.activeElement&&$9bf71ea28793e738$var$shouldContainFocus(e)&&!$9bf71ea28793e738$var$isElementInChildScope(a.activeElement,e)){if($9bf71ea28793e738$var$activeScope=e,a.body.contains(t.target)){var r;n.current=t.target,(r=n.current)==null||r.focus()}else $9bf71ea28793e738$var$activeScope.current&&$9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current)}})};return a.addEventListener(`keydown`,o,!1),a.addEventListener(`focusin`,c,!1),i?.forEach(e=>e.addEventListener(`focusin`,c,!1)),i?.forEach(e=>e.addEventListener(`focusout`,u,!1)),()=>{a.removeEventListener(`keydown`,o,!1),a.removeEventListener(`focusin`,c,!1),i?.forEach(e=>e.removeEventListener(`focusin`,c,!1)),i?.forEach(e=>e.removeEventListener(`focusout`,u,!1))}},[e,t]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function $9bf71ea28793e738$var$isElementInAnyScope(e){return $9bf71ea28793e738$var$isElementInChildScope(e)}function $9bf71ea28793e738$var$isElementInScope(e,t){return!e||!t?!1:t.some(t=>t.contains(e))}function $9bf71ea28793e738$var$isElementInChildScope(e,t=null){if(e instanceof Element&&e.closest(`[data-react-aria-top-layer]`))return!0;for(let{scopeRef:n}of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(t)))if(n&&$9bf71ea28793e738$var$isElementInScope(e,n.current))return!0;return!1}function $9bf71ea28793e738$export$1258395f99bf9cbf(e){return $9bf71ea28793e738$var$isElementInChildScope(e,$9bf71ea28793e738$var$activeScope)}function $9bf71ea28793e738$var$isAncestorScope(e,t){var n;let r=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(t)?.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function $9bf71ea28793e738$var$focusElement(e,t=!1){if(e!=null&&!t)try{$6a99195332edec8b$export$80f3e147d781571c(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function $9bf71ea28793e738$var$getFirstInScope(e,t=!0){let n=e[0].previousElementSibling,r=$9bf71ea28793e738$var$getScopeRoot(e),i=$9bf71ea28793e738$export$2d6ec8fc375ceafa(r,{tabbable:t},e);i.currentNode=n;let a=i.nextNode();return t&&!a&&(r=$9bf71ea28793e738$var$getScopeRoot(e),i=$9bf71ea28793e738$export$2d6ec8fc375ceafa(r,{tabbable:!1},e),i.currentNode=n,a=i.nextNode()),a}function $9bf71ea28793e738$var$focusFirstInScope(e,t=!0){$9bf71ea28793e738$var$focusElement($9bf71ea28793e738$var$getFirstInScope(e,t))}function $9bf71ea28793e738$var$useAutoFocus(e,t){let n=import_react.useRef(t);(0,import_react.useEffect)(()=>{n.current&&($9bf71ea28793e738$var$activeScope=e,!$9bf71ea28793e738$var$isElementInScope($431fbd86ca7dc216$export$b204af158042fbac$1(e.current?e.current[0]:void 0).activeElement,$9bf71ea28793e738$var$activeScope.current)&&e.current&&$9bf71ea28793e738$var$focusFirstInScope(e.current)),n.current=!1},[e])}function $9bf71ea28793e738$var$useActiveScopeTracker(e,t,n){$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{if(t||n)return;let r=e.current,i=$431fbd86ca7dc216$export$b204af158042fbac$1(r?r[0]:void 0),a=t=>{let n=t.target;$9bf71ea28793e738$var$isElementInScope(n,e.current)?$9bf71ea28793e738$var$activeScope=e:$9bf71ea28793e738$var$isElementInAnyScope(n)||($9bf71ea28793e738$var$activeScope=null)};return i.addEventListener(`focusin`,a,!1),r?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),r?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,t,n])}function $9bf71ea28793e738$var$shouldRestoreFocus(e){let t=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function $9bf71ea28793e738$var$useRestoreFocus(e,t,n){let r=(0,import_react.useRef)(typeof document<`u`?$431fbd86ca7dc216$export$b204af158042fbac$1(e.current?e.current[0]:void 0).activeElement:null);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{let r=e.current,i=$431fbd86ca7dc216$export$b204af158042fbac$1(r?r[0]:void 0);if(!t||n)return;let a=()=>{(!$9bf71ea28793e738$var$activeScope||$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope,e))&&$9bf71ea28793e738$var$isElementInScope(i.activeElement,e.current)&&($9bf71ea28793e738$var$activeScope=e)};return i.addEventListener(`focusin`,a,!1),r?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),r?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,n]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{let r=$431fbd86ca7dc216$export$b204af158042fbac$1(e.current?e.current[0]:void 0);if(!t)return;let i=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!$9bf71ea28793e738$var$shouldContainFocus(e)||t.isComposing)return;let n=r.activeElement;if(!$9bf71ea28793e738$var$isElementInScope(n,e.current))return;let i=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(e);if(!i)return;let a=i.nodeToRestore,o=$9bf71ea28793e738$export$2d6ec8fc375ceafa(r.body,{tabbable:!0});o.currentNode=n;let c=t.shiftKey?o.previousNode():o.nextNode();if((!a||!r.body.contains(a)||a===r.body)&&(a=void 0,i.nodeToRestore=void 0),(!c||!$9bf71ea28793e738$var$isElementInScope(c,e.current))&&a){o.currentNode=a;do c=t.shiftKey?o.previousNode():o.nextNode();while($9bf71ea28793e738$var$isElementInScope(c,e.current));t.preventDefault(),t.stopPropagation(),c?$9bf71ea28793e738$var$focusElement(c,!0):$9bf71ea28793e738$var$isElementInAnyScope(a)?$9bf71ea28793e738$var$focusElement(a,!0):n.blur()}};return n||r.addEventListener(`keydown`,i,!0),()=>{n||r.removeEventListener(`keydown`,i,!0)}},[e,t,n]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{let n=$431fbd86ca7dc216$export$b204af158042fbac$1(e.current?e.current[0]:void 0);if(!t)return;let i=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(e);if(i){var a;return i.nodeToRestore=r.current??void 0,()=>{let r=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(e);if(!r)return;let i=r.nodeToRestore;if(t&&i&&($9bf71ea28793e738$var$isElementInScope(n.activeElement,e.current)||n.activeElement===n.body&&$9bf71ea28793e738$var$shouldRestoreFocus(e))){let t=$9bf71ea28793e738$export$d06fae2ee68b101e.clone();requestAnimationFrame(()=>{if(n.activeElement===n.body){let n=t.getTreeNode(e);for(;n;){if(n.nodeToRestore&&n.nodeToRestore.isConnected){$9bf71ea28793e738$var$restoreFocusToElement(n.nodeToRestore);return}n=n.parent}for(n=t.getTreeNode(e);n;){if(n.scopeRef&&n.scopeRef.current&&$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(n.scopeRef)){$9bf71ea28793e738$var$restoreFocusToElement($9bf71ea28793e738$var$getFirstInScope(n.scopeRef.current,!0));return}n=n.parent}}})}}}},[e,t])}function $9bf71ea28793e738$var$restoreFocusToElement(e){e.dispatchEvent(new CustomEvent($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT,{bubbles:!0,cancelable:!0}))&&$9bf71ea28793e738$var$focusElement(e)}function $9bf71ea28793e738$export$2d6ec8fc375ceafa(e,t,n){let r=t?.tabbable?$9bf71ea28793e738$var$TABBABLE_ELEMENT_SELECTOR:$9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR,i=$431fbd86ca7dc216$export$b204af158042fbac$1(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){var i;return t!=null&&t.from?.contains(e)?NodeFilter.FILTER_REJECT:e.matches(r)&&$645f2e67b85a24c9$export$e989c0fffaa6b27a(e)&&(!n||$9bf71ea28793e738$var$isElementInScope(e,n))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(i.currentNode=t.from),i}function $9bf71ea28793e738$export$c5251b9e124bf29(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:c=t.accept}=n,u=i||$431fbd86ca7dc216$export$b204af158042fbac$1(r).activeElement,K=$9bf71ea28793e738$export$2d6ec8fc375ceafa(r,{tabbable:a,accept:c});r.contains(u)&&(K.currentNode=u);let Y=K.nextNode();return!Y&&o&&(K.currentNode=r,Y=K.nextNode()),Y&&$9bf71ea28793e738$var$focusElement(Y,!0),Y},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:c=t.accept}=n,u=i||$431fbd86ca7dc216$export$b204af158042fbac$1(r).activeElement,K=$9bf71ea28793e738$export$2d6ec8fc375ceafa(r,{tabbable:a,accept:c});if(r.contains(u))K.currentNode=u;else{let e=$9bf71ea28793e738$var$last(K);return e&&$9bf71ea28793e738$var$focusElement(e,!0),e??null}let Y=K.previousNode();if(!Y&&o){K.currentNode=r;let e=$9bf71ea28793e738$var$last(K);if(!e)return null;Y=e}return Y&&$9bf71ea28793e738$var$focusElement(Y,!0),Y??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,o=$9bf71ea28793e738$export$2d6ec8fc375ceafa(r,{tabbable:i,accept:a}).nextNode();return o&&$9bf71ea28793e738$var$focusElement(o,!0),o},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,o=$9bf71ea28793e738$var$last($9bf71ea28793e738$export$2d6ec8fc375ceafa(r,{tabbable:i,accept:a}));return o&&$9bf71ea28793e738$var$focusElement(o,!0),o??null}}}function $9bf71ea28793e738$var$last(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}var $9bf71ea28793e738$var$Tree=class e{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(t??null);if(!r)return;let i=new $9bf71ea28793e738$var$TreeNode({scopeRef:e});r.addChild(i),i.parent=r,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&$9bf71ea28793e738$var$isElementInScope(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var t;let n=new e;var r;for(let e of this.traverse())n.addTreeNode(e.scopeRef,e.parent?.scopeRef??null,e.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new $9bf71ea28793e738$var$TreeNode({scopeRef:null}),this.fastMap.set(null,this.root)}},$9bf71ea28793e738$var$TreeNode=class{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}},$9bf71ea28793e738$export$d06fae2ee68b101e=new $9bf71ea28793e738$var$Tree;function $f7dceffc5ad7768b$export$4e328f61c538687f(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=(0,import_react.useRef)({isFocused:!1,isFocusVisible:t||$507fabe10e71c6fb$export$b9b3dfddab17db27()}),[a,o]=(0,import_react.useState)(!1),[c,u]=(0,import_react.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),K=(0,import_react.useCallback)(()=>u(i.current.isFocused&&i.current.isFocusVisible),[]),Y=(0,import_react.useCallback)(e=>{i.current.isFocused=e,o(e),K()},[K]);$507fabe10e71c6fb$export$ec71b4b83ac08ec3(e=>{i.current.isFocusVisible=e,K()},[],{isTextInput:n});let{focusProps:X}
5=$a1ea59d68270f0dd$export$f8168d8dd8fd66e6({isDisabled:r,onFocusChange:Y}),{focusWithinProps:ee}=$9ab94262bd0047c7$export$420e68273165f4ec$1({isDisabled:!r,onFocusWithinChange:Y});return{isFocused:a,isFocusVisible:c,focusProps:r?ee:X}}var $e6afbd83fe6ebbd2$var$FocusableContext=import_react.createContext(null);function $e6afbd83fe6ebbd2$var$useFocusableContext(e){let t=(0,import_react.useContext)($e6afbd83fe6ebbd2$var$FocusableContext)||{};$e7801be82b4b2a53$export$4debdb1a3f0fa79e(t,e);let{ref:n,...r}=t;return r}function $e6afbd83fe6ebbd2$export$4c014de7c8940b4c(e,t){let{focusProps:n}=$a1ea59d68270f0dd$export$f8168d8dd8fd66e6(e),{keyboardProps:r}=$46d819fcbaf35654$export$8f71654801c2f7cd(e),i=$3ef42575df84b30b$export$9d1611c77c2fe928$1(n,r),a=$e6afbd83fe6ebbd2$var$useFocusableContext(t),o=e.isDisabled?{}:a,c=(0,import_react.useRef)(e.autoFocus);return(0,import_react.useEffect)(()=>{c.current&&t.current&&$6a99195332edec8b$export$80f3e147d781571c(t.current),c.current=!1},[t]),{focusableProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},o)}}function $83013635b024ae3d$export$eac1895992b9f3d6(e,t){let n=t?.isDisabled,[r,i]=(0,import_react.useState)(!1);return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{if(e?.current&&!n){let t=()=>{if(e.current){let t=$9bf71ea28793e738$export$2d6ec8fc375ceafa(e.current,{tabbable:!0});i(!!t.nextNode())}};t();let n=new MutationObserver(t);return n.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`tabIndex`,`disabled`]}),()=>{n.disconnect()}}}),!n&&r}function $298d61e98472621b$export$dcf14c9974fe2767(e,t){let{elementType:n=`a`,onPress:r,onPressStart:i,onPressEnd:a,onClick:o,isDisabled:c,...u}=e,K={};n!==`a`&&(K={role:`link`,tabIndex:c?void 0:0});let{focusableProps:Y}=$e6afbd83fe6ebbd2$export$4c014de7c8940b4c(e,t),{pressProps:X,isPressed:ee}=$f6c31cce2adf654f$export$45712eceda6fad21({onPress:r,onPressStart:i,onPressEnd:a,isDisabled:c,ref:t}),te=$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(u,{labelable:!0}),ce=$3ef42575df84b30b$export$9d1611c77c2fe928$1(Y,X),ue=$ea8dcbcb9ea1b556$export$9a302a45f65d0572();return{isPressed:ee,linkProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(te,$ea8dcbcb9ea1b556$export$7e924b3091a3bd18(e),{...ce,...K,"aria-disabled":c||void 0,"aria-current":e[`aria-current`],onClick:t=>{var n;(n=X.onClick)==null||n.call(X,t),o&&(o(t),console.warn(`onClick is deprecated, please use onPress`)),!ue.isNative&&t.currentTarget instanceof HTMLAnchorElement&&t.currentTarget.href&&!t.isDefaultPrevented()&&$ea8dcbcb9ea1b556$export$efa8c9099e530235(t.currentTarget,t)&&e.href&&(t.preventDefault(),ue.open(t.currentTarget,t,e.href,e.routerOptions))}})}}var $148a7a147e38ea7f$var$RTL_SCRIPTS$1=new Set([`Arab`,`Syrc`,`Samr`,`Mand`,`Thaa`,`Mend`,`Nkoo`,`Adlm`,`Rohg`,`Hebr`]),$148a7a147e38ea7f$var$RTL_LANGS$1=new Set([`ae`,`ar`,`arc`,`bcc`,`bqi`,`ckb`,`dv`,`fa`,`glk`,`he`,`ku`,`mzn`,`nqo`,`pnb`,`ps`,`sd`,`ug`,`ur`,`yi`]);function $148a7a147e38ea7f$export$702d680b21cbd764$1(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n=typeof t.getTextInfo==`function`?t.getTextInfo():t.textInfo;if(n)return n.direction===`rtl`;if(t.script)return $148a7a147e38ea7f$var$RTL_SCRIPTS$1.has(t.script)}let t=e.split(`-`)[0];return $148a7a147e38ea7f$var$RTL_LANGS$1.has(t)}var $1e5a04cdaf7d1af8$var$localeSymbol$1=Symbol.for(`react-aria.i18n.locale`);function $1e5a04cdaf7d1af8$export$f09106e7c6677ec5$1(){let e=typeof window<`u`&&window[$1e5a04cdaf7d1af8$var$localeSymbol$1]||typeof navigator<`u`&&(navigator.language||navigator.userLanguage)||`en-US`;try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e=`en-US`}return{locale:e,direction:$148a7a147e38ea7f$export$702d680b21cbd764$1(e)?`rtl`:`ltr`}}var $1e5a04cdaf7d1af8$var$currentLocale$1=$1e5a04cdaf7d1af8$export$f09106e7c6677ec5$1(),$1e5a04cdaf7d1af8$var$listeners$1=new Set;function $1e5a04cdaf7d1af8$var$updateLocale$1(){$1e5a04cdaf7d1af8$var$currentLocale$1=$1e5a04cdaf7d1af8$export$f09106e7c6677ec5$1();for(let e of $1e5a04cdaf7d1af8$var$listeners$1)e($1e5a04cdaf7d1af8$var$currentLocale$1)}function $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a$1(){let e=$b5e257d569688ac6$export$535bd6ca7f90a273$1(),[t,n]=(0,import_react.useState)($1e5a04cdaf7d1af8$var$currentLocale$1);return(0,import_react.useEffect)(()=>($1e5a04cdaf7d1af8$var$listeners$1.size===0&&window.addEventListener(`languagechange`,$1e5a04cdaf7d1af8$var$updateLocale$1),$1e5a04cdaf7d1af8$var$listeners$1.add(n),()=>{$1e5a04cdaf7d1af8$var$listeners$1.delete(n),$1e5a04cdaf7d1af8$var$listeners$1.size===0&&window.removeEventListener(`languagechange`,$1e5a04cdaf7d1af8$var$updateLocale$1)}),[]),e?{locale:`en-US`,direction:`ltr`}:t}var $18f2051aff69b9bf$var$I18nContext$1=import_react.createContext(null);function $18f2051aff69b9bf$export$43bb16f9c6d9e3f7$1(){let e=$1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a$1();return(0,import_react.useContext)($18f2051aff69b9bf$var$I18nContext$1)||e}var $fca6afa0e843324b$var$cache$1=new WeakMap;function $fca6afa0e843324b$var$getCachedDictionary$1(e){let t=$fca6afa0e843324b$var$cache$1.get(e);return t||(t=new $5b160d28a433310d$export$c17fa47878dc55b6$1(e),$fca6afa0e843324b$var$cache$1.set(e,t)),t}function $fca6afa0e843324b$export$87b761675e8eaa10$1(e,t){return t&&$5b160d28a433310d$export$c17fa47878dc55b6$1.getGlobalDictionaryForPackage(t)||$fca6afa0e843324b$var$getCachedDictionary$1(e)}function $fca6afa0e843324b$export$f12b703ca79dfbb1$1(e,t){let{locale:n}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7$1(),r=$fca6afa0e843324b$export$87b761675e8eaa10$1(e,t);return(0,import_react.useMemo)(()=>new $6db58dc88e78b024$export$2f817fcdc4b89ae0$1(n,r),[n,r])}function $896ba0a80a8f4d36$export$85fd5fdf27bacc79(e){e=$5a387cc49350e6db$export$722debc0e56fea39(e??{},$896ba0a80a8f4d36$var$isEqual);let{locale:t}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7$1();return(0,import_react.useMemo)(()=>new $fb18d541ea1ad717$export$ad991b66133851cf(t,e),[t,e])}function $896ba0a80a8f4d36$var$isEqual(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(t[r]!==e[r])return!1;return!0}function $a916eb452884faea$export$b7a616150fdb9f44(e={}){let{locale:t}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7$1();return(0,import_react.useMemo)(()=>new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(t,e),[t,e])}var $325a3faab7a68acd$var$cache=new Map;function $325a3faab7a68acd$export$a16aca283550c30d(e){let{locale:t}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7$1(),n=t+(e?Object.entries(e).sort((e,t)=>
vendor: 6,032 bytes, line 5
5e[0]<t[0]?-1:1).join():``);if($325a3faab7a68acd$var$cache.has(n))return $325a3faab7a68acd$var$cache.get(n);let r=new Intl.Collator(t,e);return $325a3faab7a68acd$var$cache.set(n,r),r}function $bb77f239b46e8c72$export$3274cf84b703fff(e){let t=$325a3faab7a68acd$export$a16aca283550c30d({usage:`search`,...e}),n=(0,import_react.useCallback)((e,n)=>n.length===0||(e=e.normalize(`NFC`),n=n.normalize(`NFC`),t.compare(e.slice(0,n.length),n)===0),[t]),r=(0,import_react.useCallback)((e,n)=>n.length===0||(e=e.normalize(`NFC`),n=n.normalize(`NFC`),t.compare(e.slice(-n.length),n)===0),[t]),i=(0,import_react.useCallback)((e,n)=>{if(n.length===0)return!0;e=e.normalize(`NFC`),n=n.normalize(`NFC`);let r=0,i=n.length;for(;r+i<=e.length;r++){let a=e.slice(r,r+i);if(t.compare(n,a)===0)return!0}return!1},[t]);return(0,import_react.useMemo)(()=>({startsWith:n,endsWith:r,contains:i}),[n,r,i])}function $701a24aa0da5b062$export$ea18c227d4417cc3(e,t){let{elementType:n=`button`,isDisabled:r,onPress:i,onPressStart:a,onPressEnd:o,onPressUp:c,onPressChange:u,preventFocusOnPress:K,allowFocusWhenDisabled:Y,onClick:X,href:ee,target:te,rel:ce,type:ue=`button`}=e,de;de=n===`button`?{type:ue,disabled:r}:{role:`button`,tabIndex:r?void 0:0,href:n===`a`&&r?void 0:ee,target:n===`a`?te:void 0,type:n===`input`?ue:void 0,disabled:n===`input`?r:void 0,"aria-disabled":!r||n===`input`?void 0:r,rel:n===`a`?ce:void 0};let{pressProps:fe,isPressed:me}=$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:a,onPressEnd:o,onPressChange:u,onPress:i,onPressUp:c,isDisabled:r,preventFocusOnPress:K,ref:t}),{focusableProps:ge}=$e6afbd83fe6ebbd2$export$4c014de7c8940b4c(e,t);Y&&(ge.tabIndex=r?-1:ge.tabIndex);let Te=$3ef42575df84b30b$export$9d1611c77c2fe928$1(ge,fe,$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(e,{labelable:!0}));return{isPressed:me,buttonProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(de,Te,{"aria-haspopup":e[`aria-haspopup`],"aria-expanded":e[`aria-expanded`],"aria-controls":e[`aria-controls`],"aria-pressed":e[`aria-pressed`],onClick:e=>{X&&(X(e),console.warn(`onClick is deprecated, please use onPress`))}})}}var $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY=7e3,$319e236875307eab$var$liveAnnouncer=null;function $319e236875307eab$export$a9b970dcc4ae71a9(e,t=`assertive`,n=$319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY){$319e236875307eab$var$liveAnnouncer?$319e236875307eab$var$liveAnnouncer.announce(e,t,n):($319e236875307eab$var$liveAnnouncer=new $319e236875307eab$var$LiveAnnouncer,(typeof IS_REACT_ACT_ENVIRONMENT==`boolean`?IS_REACT_ACT_ENVIRONMENT:typeof jest<`u`)?$319e236875307eab$var$liveAnnouncer.announce(e,t,n):setTimeout(()=>{$319e236875307eab$var$liveAnnouncer?.isAttached()&&$319e236875307eab$var$liveAnnouncer?.announce(e,t,n)},100))}function $319e236875307eab$export$d10ae4f68404609a(e){$319e236875307eab$var$liveAnnouncer&&$319e236875307eab$var$liveAnnouncer.clear(e)}var $319e236875307eab$var$LiveAnnouncer=class{isAttached(){var e;return this.node?.isConnected}createLog(e){let t=document.createElement(`div`);return t.setAttribute(`role`,`log`),t.setAttribute(`aria-live`,e),t.setAttribute(`aria-relevant`,`additions`),t}destroy(){this.node&&=(document.body.removeChild(this.node),null)}announce(e,t=`assertive`,n=$319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY){var r,i;if(!this.node)return;let a=document.createElement(`div`);typeof e==`object`?(a.setAttribute(`role`,`img`),a.setAttribute(`aria-labelledby`,e[`aria-labelledby`])):a.textContent=e,t===`assertive`?(r=this.assertiveLog)==null||r.appendChild(a):(i=this.politeLog)==null||i.appendChild(a),e!==``&&setTimeout(()=>{a.remove()},n)}clear(e){this.node&&((!e||e===`assertive`)&&this.assertiveLog&&(this.assertiveLog.innerHTML=``),(!e||e===`polite`)&&this.politeLog&&(this.politeLog.innerHTML=``))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<`u`&&(this.node=document.createElement(`div`),this.node.dataset.liveAnnouncer=`true`,Object.assign(this.node.style,{border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`}),this.assertiveLog=this.createLog(`assertive`),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog(`polite`),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}};function $e93e671b31057976$export$b8473d3665f3a75a(e,t,n){let{validationBehavior:r,focus:i}=e;$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{if(r===`native`&&n?.current){let e=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(` `)||`Invalid value.`:``;n.current.setCustomValidity(e),n.current.hasAttribute(`title`)||(n.current.title=``),t.realtimeValidation.isInvalid||t.updateValidation($e93e671b31057976$var$getNativeValidity(n.current))}});let a=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1(()=>{t.resetValidation()}),o=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1(e=>{var r;t.displayValidation.isInvalid||t.commitValidation();let a=n?.current?.form;if(!e.defaultPrevented&&n&&a&&$e93e671b31057976$var$getFirstInvalidInput(a)===n.current){var o;i?i():(o=n.current)==null||o.focus(),$507fabe10e71c6fb$export$8397ddfc504fdb9a(`keyboard`)}e.preventDefault()}),c=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1(()=>{t.commitValidation()});(0,import_react.useEffect)(()=>{let e=n?.current;if(!e)return;let t=e.form;return e.addEventListener(`invalid`,o),e.addEventListener(`change`,c),t?.addEventListener(`reset`,a),()=>{e.removeEventListener(`invalid`,o),e.removeEventListener(`change`,c),t?.removeEventListener(`reset`,a)}},[n,o,c,a,r])}function $e93e671b31057976$var$getValidity(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function $e93e671b31057976$var$getNativeValidity(e){return{isInvalid:!e.validity.valid,val
5idationDetails:$e93e671b31057976$var$getValidity(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function $e93e671b31057976$var$getFirstInvalidInput(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}function $d2c8e2b0480f3f34$export$cbe85ee05b554577(e,t,n){let{isDisabled:r=!1,isReadOnly:i=!1,value:a,name:o,children:c,"aria-label":u,"aria-labelledby":K,validationState:Y=`valid`,isInvalid:X}=e,ee=e=>{e.stopPropagation(),t.setSelected(e.target.checked)};c==null&&u==null&&K==null&&console.warn(`If you do not provide children, you must specify an aria-label for accessibility`);let{pressProps:te,isPressed:ce}=$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:r}),{pressProps:ue,isPressed:de}=$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:r||i,onPress(){t.toggle()}}),{focusableProps:fe}=$e6afbd83fe6ebbd2$export$4c014de7c8940b4c(e,n),me=$3ef42575df84b30b$export$9d1611c77c2fe928$1(te,fe),ge=$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(e,{labelable:!0});return $99facab73266f662$export$5add1d006293d136(n,t.isSelected,t.setSelected),{labelProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(ue,{onClick:e=>e.preventDefault()}),inputProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(ge,{"aria-invalid":X||Y===`invalid`||void 0,"aria-errormessage":e[`aria-errormessage`],"aria-controls":e[`aria-controls`],"aria-readonly":i||void 0,onChange:ee,disabled:r,...a==null?{}:{value:a},name:o,type:`checkbox`,...me}),isSelected:t.isSelected,isPressed:ce||de,isDisabled:r,isReadOnly:i,isInvalid:X||Y===`invalid`}}function $406796ff087fe49b$export$e375f10ce42261c5(e,t,n){let r=$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:t.isSelected}),{isInvalid:i,validationErrors:a,validationDetails:o}=r.displayValidation,{labelProps:c,inputProps:u,isSelected:K,isPressed:Y,isDisabled:X,isReadOnly:ee}=$d2c8e2b0480f3f34$export$cbe85ee05b554577({...e,isInvalid:i},t,n);$e93e671b31057976$export$b8473d3665f3a75a(e,r,n);let{isIndeterminate:te,isRequired:ce,validationBehavior:ue=`aria`}=e;return(0,import_react.useEffect)(()=>{n.current&&(n.current.indeterminate=!!te)}),{labelProps:c,inputProps:{...u,checked:K,"aria-required":ce&&ue===`aria`||void 0,required:ce&&ue===`native`},isSelected:K,isPressed:Y,isDisabled:X,isReadOnly:ee,isInvalid:i,validationErrors:a,validationDetails:o}}function $d191a55c9702f145$export$8467354a121f1b9f(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a=`label`}=e;t=$bdb11010cef70236$export$f680877a34711e37$1(t);let o=$bdb11010cef70236$export$f680877a34711e37$1(),c={};n?(r=r?`${o} ${r}`:o,c={id:o,htmlFor:a===`label`?t:void 0}):!r&&!i&&console.warn(`If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility`);let u=$313b98861ee5dd6c$export$d6875122194c7b44({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:c,fieldProps:u}}function $2baaea4c71418dea$export$294aa081a6c6f55d(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:o}=$d191a55c9702f145$export$8467354a121f1b9f(e),c=$bdb11010cef70236$export$b4cc09c592e8fdb8$1([!!t,!!n,r,i]),u=$bdb11010cef70236$export$b4cc09c592e8fdb8$1([!!t,!!n,r,i]);return o=$3ef42575df84b30b$export$9d1611c77c2fe928$1(o,{"aria-describedby":[c,u,e[`aria-describedby`]].filter(Boolean).join(` `)||void 0}),{labelProps:a,fieldProps:o,descriptionProps:{id:c},errorMessageProps:{id:u}}}var $5c3e21d68f1c4674$var$styles={border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`};function $5c3e21d68f1c4674$export$a966af930f325cab(e={}){let{style:t,isFocusable:n}=e,[r,i]=(0,import_react.useState)(!1),{focusWithinProps:a}=$9ab94262bd0047c7$export$420e68273165f4ec$1({isDisabled:!n,onFocusWithinChange:e=>i(e)}),o=(0,import_react.useMemo)(()=>r?t:t?{...$5c3e21d68f1c4674$var$styles,...t}:$5c3e21d68f1c4674$var$styles,[r]);return{visuallyHiddenProps:{...a,style:o}}}function $5c3e21d68f1c4674$export$439d29a4e110a164(e){let{children:t,elementType:n=`div`,isFocusable:r,style:i,...a}=e,{visuallyHiddenProps:o}=$5c3e21d68f1c4674$export$a966af930f325cab(e);return import_react.createElement(n,$3ef42575df84b30b$export$9d1611c77c2fe928$1(a,o),t)}var $aa519ee6cf463259$export$d6c8d9636a3dc49c=new WeakMap;function $aa519ee6cf463259$export$68e648cbec363a18(e,t){let n=$aa519ee6cf463259$export$d6c8d9636a3dc49c.get(e);if(!n)throw Error(`Unknown slider state`);return`${n.id}-${t}`}
5function $bcca50147b47f54d$export$56b2c08e277f365(e,t,n){let{labelProps:r,fieldProps:i}=$d191a55c9702f145$export$8467354a121f1b9f(e),a=e.orientation===`vertical`;var o;$aa519ee6cf463259$export$d6c8d9636a3dc49c.set(t,{id:r.id??i.id,"aria-describedby":e[`aria-describedby`],"aria-details":e[`aria-details`]});let{direction:c}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7$1(),{addGlobalListener:u,removeGlobalListener:K}=$03deb23ff14920c4$export$4eaf04e54aa8eed6$1(),Y=(0,import_react.useRef)(null),X=c===`rtl`,ee=(0,import_react.useRef)(null),{moveProps:te}=$e8a7022cf87cba2a$export$36da96379f79f245({onMoveStart(){ee.current=null},onMove({deltaX:e,deltaY:r}){let{height:i,width:o}=n.current.getBoundingClientRect(),c=a?i:o;ee.current??=t.getThumbPercent(Y.current)*c;let u=a?r:e;if((a||X)&&(u=-u),ee.current+=u,Y.current!=null&&n.current){let e=$9446cca9a3875146$export$7d15b64cf5a3a4c4(ee.current/c,0,1);t.setThumbPercent(Y.current,e)}},onMoveEnd(){Y.current!=null&&(t.setThumbDragging(Y.current,!1),Y.current=null)}}),ce=(0,import_react.useRef)(void 0),ue=(r,i,o,K)=>{if(n.current&&!e.isDisabled&&t.values.every((e,n)=>!t.isThumbDragging(n))){let{height:e,width:X,top:ee,left:te}=n.current.getBoundingClientRect(),ue=a?e:X,fe=((a?K:o)-(a?ee:te))/ue;(c===`rtl`||a)&&(fe=1-fe);let me=t.getPercentValue(fe),ge,Te=t.values.findIndex(e=>me-e<0);if(Te===0)ge=Te;else if(Te===-1)ge=t.values.length-1;else{let e=t.values[Te-1],n=t.values[Te];ge=Math.abs(e-me)<Math.abs(n-me)?Te-1:Te}ge>=0&&t.isThumbEditable(ge)?(r.preventDefault(),Y.current=ge,t.setFocusedThumb(ge),ce.current=i,t.setThumbDragging(Y.current,!0),t.setThumbValue(ge,me),u(window,`mouseup`,de,!1),u(window,`touchend`,de,!1),u(window,`pointerup`,de,!1)):Y.current=null}},de=e=>{var n,r;(e.pointerId??e.changedTouches?.[0].identifier)===ce.current&&(Y.current!=null&&(t.setThumbDragging(Y.current,!1),Y.current=null),K(window,`mouseup`,de,!1),K(window,`touchend`,de,!1),K(window,`pointerup`,de,!1))};return`htmlFor`in r&&r.htmlFor&&(delete r.htmlFor,r.onClick=()=>{var e;(e=document.getElementById($aa519ee6cf463259$export$68e648cbec363a18(t,0)))==null||e.focus(),$507fabe10e71c6fb$export$8397ddfc504fdb9a(`keyboard`)}),{labelProps:r,groupProps:{role:`group`,...i},trackProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1({onMouseDown(e){e.button!==0||e.altKey||e.ctrlKey||e.metaKey||ue(e,void 0,e.clientX,e.clientY)},onPointerDown(e){e.pointerType===`mouse`&&(e.button!==0||e.altKey||e.ctrlKey||e.metaKey)||ue(e,e.pointerId,e.clientX,e.clientY)},onTouchStart(e){ue(e,e.changedTouches[0].identifier,e.changedTouches[0].clientX,e.changedTouches[0].clientY)},style:{position:`relative`,touchAction:`none`}},te),outputProps:{htmlFor:t.values.map((e,n)=>$aa519ee6cf463259$export$68e648cbec363a18(t,n)).join(` `),"aria-live":`off`}}}function $47b897dc8cdb026b$export$8d15029008292ae(e,t){let{index:n=0,isRequired:r,validationState:i,isInvalid:a,trackRef:o,inputRef:c,orientation:u=t.orientation,name:K}=e,Y=e.isDisabled||t.isDisabled,X=u===`vertical`,{direction:ee}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7$1(),{addGlobalListener:te,removeGlobalListener:ce}=$03deb23ff14920c4$export$4eaf04e54aa8eed6$1(),ue=$aa519ee6cf463259$export$d6c8d9636a3dc49c.get(t);var de;let{labelProps:fe,fieldProps:me}=$d191a55c9702f145$export$8467354a121f1b9f({...e,id:$aa519ee6cf463259$export$68e648cbec363a18(t,n),"aria-labelledby":`${ue.id} ${e[`aria-labelledby`]??``}`.trim()}),ge=t.values[n],Te=(0,import_react.useCallback)(()=>{c.current&&$7215afc6de606d6b$export$de79e2c695e052f3$1(c.current)},[c]),Oe=t.focusedThumb===n;(0,import_react.useEffect)(()=>{Oe&&Te()},[Oe,Te]);let Ae=ee===`rtl`,ze=(0,import_react.useRef)(null),{keyboardProps:qe}=$46d819fcbaf35654$export$8f71654801c2f7cd({onKeyDown(e){let{getThumbMaxValue:r,getThumbMinValue:i,decrementThumb:a,incrementThumb:o,setThumbValue:c,setThumbDragging:u,pageSize:K}=t;if(!/^(PageUp|PageDown|Home|End)$/.test(e.key)){e.continuePropagation();return}switch(e.preventDefault(),u(n,!0),e.key){case`PageUp`:o(n,K);break;case`PageDown`:a(n,K);break;case`Home`:c(n,i(n));break;case`End`:c(n,r(n))}u(n,!1)}}),{moveProps:Ye}=$e8a7022cf87cba2a$export$36da96379f79f245({onMoveStart(){ze.current=null,t.setThumbDragging(n,!0)},onMove({deltaX:e,deltaY:r,pointerType:i,shiftKey:a}){let{getThumbPercent:c,setThumbPercent:u,decrementThumb:K,incrementThumb:Y,step:ee,pageSize:te}=t,{width:ce,height:ue}=o.current.getBoundingClientRect(),de=X?ue:ce;if(ze.current??=c(n)*de,i===`keyboard`)e>0&&Ae||e<0&&!Ae||r>0?K(n,a?te:ee):Y(n,a?te:ee);else{let t=X?r:e;(X||Ae)&&(t=-t),ze.current+=t,u(n,$9446cca9a3875146$export$7d15b64cf5a3a4c4(ze.current/de,0,1))}},onMoveEnd(){t.setThumbDragging(n,!1)}});t.setThumbEditable(n,!Y);let{focusableProps:Ze}=$e6afbd83fe6ebbd2$export$4c014de7c8940b4c($3ef42575df84b30b$export$9d1611c77c2fe928$1(e,{onFocus:()=>t.setFocusedThumb(n),onBlur:()=>t.setFocusedThumb(void 0)}),c),Qe=(0,import_react.useRef)(void 0),et=e=>{Te(),Qe.current=e,t.setThumbDragging(n,!0),te(window,`mouseup`,nt,!1),te(window,`touchend`,nt,!1),te(window,`pointerup`,nt,!1)},nt=e=>{var r,i;(e.pointerId??e.changedTouches?.[0].identifier)===Qe.current&&(Te(),t.setThumbDragging(n,!1),ce(window,`mouseup`,nt,!1),ce(window,`touchend`,nt,!1),ce(window,`pointerup`,nt,!1))},rt=t.getThumbPercent(n);(X||ee===`rtl`)&&(rt=1-rt);let it=Y?{}:$3ef42575df84b30b$export$9d1611c77c2fe928$1(qe,Ye,{onMouseDown:e=>{e.button!==0||e.altKey||e.ctrlKey||e.metaKey||et()},onPointerDown:e=>{e.button!==0||e.altKey||e.ctrlKey||e.metaKey||et(e.pointerId)},onTouchStart:e=>{et(e.changedTouches[0].identifier)}});return $99facab73266f662$export$5add1d006293d136(c,ge,e=>{t.setThumbValue(n,e)}),{inputProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(Ze,me,{type:`range`,tabIndex:Y?void 0:0,min:t.getThumbMinValue(n),max:t.getThumbMaxValue(n),step:t.step,value:ge,name:K,disabled:Y,"aria-orientation":u,"aria-valuetext":t.getThumbValueLabel(n),"aria-required":r||void 0,"aria-invalid":a||i===`invali
5d`||void 0,"aria-errormessage":e[`aria-errormessage`],"aria-describedby":[ue[`aria-describedby`],e[`aria-describedby`]].filter(Boolean).join(` `),"aria-details":[ue[`aria-details`],e[`aria-details`]].filter(Boolean).join(` `),onChange:e=>{t.setThumbValue(n,parseFloat(e.target.value))}}),thumbProps:{...it,style:{position:`absolute`,[X?`top`:`left`]:`${rt*100}%`,transform:`translate(-50%, -50%)`,touchAction:`none`}},labelProps:fe,isDragging:t.isThumbDragging(n),isDisabled:Y,isFocused:Oe}}function $2d73ec29415bd339$export$712718f7aec83d5(e,t){let{inputElementType:n=`input`,isDisabled:r=!1,isRequired:i=!1,isReadOnly:a=!1,type:o=`text`,validationBehavior:c=`aria`}=e,[u,K]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(e.value,e.defaultValue||``,e.onChange),{focusableProps:Y}=$e6afbd83fe6ebbd2$export$4c014de7c8940b4c(e,t),X=$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:u}),{isInvalid:ee,validationErrors:te,validationDetails:ce}=X.displayValidation,{labelProps:ue,fieldProps:de,descriptionProps:fe,errorMessageProps:me}=$2baaea4c71418dea$export$294aa081a6c6f55d({...e,isInvalid:ee,errorMessage:e.errorMessage||te}),ge=$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(e,{labelable:!0}),Te={type:o,pattern:e.pattern};return $99facab73266f662$export$5add1d006293d136(t,u,K),$e93e671b31057976$export$b8473d3665f3a75a(e,X,t),(0,import_react.useEffect)(()=>{if(t.current instanceof $431fbd86ca7dc216$export$f21a1ffae260145a$1(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:ue,inputProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(ge,n===`input`?Te:void 0,{disabled:r,readOnly:a,required:i&&c===`native`,"aria-required":i&&c===`aria`||void 0,"aria-invalid":ee||void 0,"aria-errormessage":e[`aria-errormessage`],"aria-activedescendant":e[`aria-activedescendant`],"aria-autocomplete":e[`aria-autocomplete`],"aria-haspopup":e[`aria-haspopup`],value:u,onChange:e=>K(e.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...Y,...de}),descriptionProps:fe,errorMessageProps:me,isInvalid:ee,validationErrors:te,validationDetails:ce}}function $d841c8010a73d545$var$supportsNativeBeforeInputEvent(){return typeof window<`u`&&window.InputEvent&&typeof InputEvent.prototype.getTargetRanges==`function`}function $d841c8010a73d545$export$4f384c9210e583c3(e,t,n){let r=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1(e=>{let r=n.current,i;switch(e.inputType){case`historyUndo`:case`historyRedo`:return;case`insertLineBreak`:return;case`deleteContent`:case`deleteByCut`:case`deleteByDrag`:i=r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case`deleteContentForward`:i=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd+1):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case`deleteContentBackward`:i=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart-1)+r.value.slice(r.selectionStart):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case`deleteSoftLineBackward`:case`deleteHardLineBackward`:i=r.value.slice(r.selectionStart);break;default:e.data!=null&&(i=r.value.slice(0,r.selectionStart)+e.data+r.value.slice(r.selectionEnd))}(i==null||!t.validate(i))&&e.preventDefault()});(0,import_react.useEffect)(()=>{if(!$d841c8010a73d545$var$supportsNativeBeforeInputEvent())return;let e=n.current;return e.addEventListener(`beforeinput`,r,!1),()=>{e.removeEventListener(`beforeinput`,r,!1)}},[n,r]);let i=$d841c8010a73d545$var$supportsNativeBeforeInputEvent()?null:e=>{let n=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);t.validate(n)||e.preventDefault()},{labelProps:a,inputProps:o,descriptionProps:c,errorMessageProps:u,...K}=$2d73ec29415bd339$export$712718f7aec83d5(e,n),Y=(0,import_react.useRef)(null);return{inputProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(o,{onBeforeInput:i,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:r}=n.current;Y.current={value:e,selectionStart:t,selectionEnd:r}},onCompositionEnd(){if(!t.validate(n.current.value)){let{value:e,selectionStart:r,selectionEnd:i}=Y.current;n.current.value=e,n.current.setSelectionRange(r,i),t.setInputValue(e)}}}),labelProps:a,descriptionProps:c,errorMessageProps:u,...K}}var $ed6aae4e5f766f1e$exports={};$ed6aae4e5f766f1e$exports={Empty:`فارغ`};var $38854e2b175151fa$exports={};$38854e2b175151fa$exports={Empty:`Изпразни`};var $15b25ab20f3945b2$exports={};$15b25ab20f3945b2$exports={Empty:`Prázdné`};var $692a4298b6b649a2$exports={};$692a4298b6b649a2$exports={Empty:`Tom`};var $1c6e1539193f1243$exports={};$1c6e1539193f1243$exports={Empty:`Leer`};var $1e8678632c464b6d$exports={};$1e8678632c464b6d$exports={Empty:`Άδειο`};var $4adc85d9bf5b9eed$exports={};
vendor: 7,670 bytes, line 5
5$4adc85d9bf5b9eed$exports={Empty:`Empty`};var $41c4b2bb61dafbca$exports={};$41c4b2bb61dafbca$exports={Empty:`Vacío`};var $405f8b24f5dd2a60$exports={};$405f8b24f5dd2a60$exports={Empty:`Tühjenda`};var $7efe3ed02b9b9dd4$exports={};$7efe3ed02b9b9dd4$exports={Empty:`Tyhjä`};var $99fc4c101d92daf3$exports={};$99fc4c101d92daf3$exports={Empty:`Vide`};var $f9e155e6e8cacaa2$exports={};$f9e155e6e8cacaa2$exports={Empty:`ריק`};var $c31b5e8e9a249fd5$exports={};$c31b5e8e9a249fd5$exports={Empty:`Prazno`};var $9c5435bc17499bd9$exports={};$9c5435bc17499bd9$exports={Empty:`Üres`};var $6d1fc8e84d8165e1$exports={};$6d1fc8e84d8165e1$exports={Empty:`Vuoto`};var $46ea6b3641b83e71$exports={};$46ea6b3641b83e71$exports={Empty:`空`};var $0e3cc9a288289dc5$exports={};$0e3cc9a288289dc5$exports={Empty:`비어 있음`};var $4ff2bb25c0089ffb$exports={};$4ff2bb25c0089ffb$exports={Empty:`Tuščias`};var $6cf33cd4c010a2fb$exports={};$6cf33cd4c010a2fb$exports={Empty:`Tukšs`};var $5a9f8486f8b8837e$exports={};$5a9f8486f8b8837e$exports={Empty:`Tom`};var $583f94d807f6ecea$exports={};$583f94d807f6ecea$exports={Empty:`Leeg`};var $cc4dcfeea2b4050d$exports={};$cc4dcfeea2b4050d$exports={Empty:`Pusty`};var $68ac2954d56e12b4$exports={};$68ac2954d56e12b4$exports={Empty:`Vazio`};var $fdb0616f309780b0$exports={};$fdb0616f309780b0$exports={Empty:`Vazio`};var $fe1eccf4ee1d6f52$exports={};$fe1eccf4ee1d6f52$exports={Empty:`Gol`};var $a38b6c4e18725976$exports={};$a38b6c4e18725976$exports={Empty:`Не заполнено`};var $6c14ae2b766b652c$exports={};$6c14ae2b766b652c$exports={Empty:`Prázdne`};var $8f1c9692e16dc5eb$exports={};$8f1c9692e16dc5eb$exports={Empty:`Prazen`};var $d2aa7abea627cafa$exports={};$d2aa7abea627cafa$exports={Empty:`Prazno`};var $676b82e4b56408e6$exports={};$676b82e4b56408e6$exports={Empty:`Tomt`};var $14c9042552d7ce08$exports={};$14c9042552d7ce08$exports={Empty:`Boş`};var $393254ebcb66c9f5$exports={};$393254ebcb66c9f5$exports={Empty:`Пусто`};var $d49d621f310cf6ce$exports={};$d49d621f310cf6ce$exports={Empty:`空`};var $94b60c866ca5dfe6$exports={};$94b60c866ca5dfe6$exports={Empty:`空白`};var $a99895ee3dc79e61$exports={};$a99895ee3dc79e61$exports={"ar-AE":$ed6aae4e5f766f1e$exports,"bg-BG":$38854e2b175151fa$exports,"cs-CZ":$15b25ab20f3945b2$exports,"da-DK":$692a4298b6b649a2$exports,"de-DE":$1c6e1539193f1243$exports,"el-GR":$1e8678632c464b6d$exports,"en-US":$4adc85d9bf5b9eed$exports,"es-ES":$41c4b2bb61dafbca$exports,"et-EE":$405f8b24f5dd2a60$exports,"fi-FI":$7efe3ed02b9b9dd4$exports,"fr-FR":$99fc4c101d92daf3$exports,"he-IL":$f9e155e6e8cacaa2$exports,"hr-HR":$c31b5e8e9a249fd5$exports,"hu-HU":$9c5435bc17499bd9$exports,"it-IT":$6d1fc8e84d8165e1$exports,"ja-JP":$46ea6b3641b83e71$exports,"ko-KR":$0e3cc9a288289dc5$exports,"lt-LT":$4ff2bb25c0089ffb$exports,"lv-LV":$6cf33cd4c010a2fb$exports,"nb-NO":$5a9f8486f8b8837e$exports,"nl-NL":$583f94d807f6ecea$exports,"pl-PL":$cc4dcfeea2b4050d$exports,"pt-BR":$68ac2954d56e12b4$exports,"pt-PT":$fdb0616f309780b0$exports,"ro-RO":$fe1eccf4ee1d6f52$exports,"ru-RU":$a38b6c4e18725976$exports,"sk-SK":$6c14ae2b766b652c$exports,"sl-SI":$8f1c9692e16dc5eb$exports,"sr-SP":$d2aa7abea627cafa$exports,"sv-SE":$676b82e4b56408e6$exports,"tr-TR":$14c9042552d7ce08$exports,"uk-UA":$393254ebcb66c9f5$exports,"zh-CN":$d49d621f310cf6ce$exports,"zh-TW":$94b60c866ca5dfe6$exports};function $parcel$interopDefault$7(e){return e&&e.__esModule?e.default:e}function $d2e8511e6f209edf$export$e908e06f4b8e3402(e){let t=(0,import_react.useRef)(void 0),{value:n,textValue:r,minValue:i,maxValue:a,isDisabled:o,isReadOnly:c,isRequired:u,onIncrement:K,onIncrementPage:Y,onDecrement:X,onDecrementPage:ee,onDecrementToMin:te,onIncrementToMax:ce}=e,ue=$fca6afa0e843324b$export$f12b703ca79dfbb1$1($parcel$interopDefault$7($a99895ee3dc79e61$exports),`@react-aria/spinbutton`),de=()=>clearTimeout(t.current);(0,import_react.useEffect)(()=>()=>de(),[]);let fe=e=>{if(!(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||c))switch(e.key){case`PageUp`:if(Y){e.preventDefault(),Y?.();break}case`ArrowUp`:case`Up`:K&&(e.preventDefault(),K?.());break;case`PageDown`:if(ee){e.preventDefault(),ee?.();break}case`ArrowDown`:case`Down`:X&&(e.preventDefault(),X?.());break;case`Home`:te&&(e.preventDefault(),te?.());break;case`End`:ce&&(e.preventDefault(),ce?.())}},me=(0,import_react.useRef)(!1),ge=()=>{me.current=!0},Te=()=>{me.current=!1},Oe=r===``?ue.format(`Empty`):(r||`${n}`).replace(`-`,`−`);(0,import_react.useEffect)(()=>{me.current&&($319e236875307eab$export$d10ae4f68404609a(`assertive`),$319e236875307eab$export$a9b970dcc4ae71a9(Oe,`assertive`))},[Oe]);let Ae=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1(e=>{de(),K?.(),t.current=window.setTimeout(()=>{(a===void 0||isNaN(a)||n===void 0||isNaN(n)||n<a)&&Ae(60)},e)}),ze=$8ae05eaa5c114e9c$export$7f54fc3180508a52$1(e=>{de(),X?.(),t.current=window.setTimeout(()=>{(i===void 0||isNaN(i)||n===void 0||isNaN(n)||n>i)&&ze(60)},e)}),qe=e=>{e.preventDefault()},{addGlobalListener:Ye,removeAllGlobalListeners:Ze}=$03deb23ff14920c4$export$4eaf04e54aa8eed6$1();return{spinButtonProps:{role:`spinbutton`,"aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":Oe,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":o||void 0,"aria-readonly":c||void 0,"aria-required":u||void 0,onKeyDown:fe,onFocus:ge,onBlur:Te},incrementButtonProps:{onPressStart:()=>{Ae(400),Ye(window,`contextmenu`,qe)},onPressEnd:()=>{de(),Ze()},onFocus:ge,onBlur:Te},decrementButtonProps:{onPressStart:()=>{ze(400),Ye(window,`contextmenu`,qe)},onPressEnd:()=>{de(),Ze()},onFocus:ge,onBlur:Te}}}var $fb78e0f6ab6349ed$exports={};$fb78e0f6ab6349ed$exports={decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:`حقل رقمي`};var $2776acdd9959a647$exports={};$2776acdd9959a647$exports={decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:`Номер на полето`};var $741954410a365ad3$exports={};$741954410a365ad3$exports={decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:`Číselné pole`};var $8321ed0f8ab642f0$exports={};$8321ed0f8ab642f0$exports={decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:`Talfelt`};var $92978e0c4ecafa32$exports={};$92978e0c4ecafa32$exports={decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:`Nummernfeld`};var $ac5ff71962864a84$exports={};$ac5ff71962864a84$exports={decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:`Πεδίο αριθμού`};var $efe4685e2440d8be$exports={};$efe4685e2440d8be$exports={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:`Number field`};var $e50a9a48739b90e1$exports={};$e50a9a48739b90e1$exports={decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo de número`};var $6e0d5294ecbb8ab6$exports={};$6e0d5294ecbb8ab6$exports={decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:`Numbri väli`};var $e7129d65f607f77f$exports={};$e7129d65f607f77f$exports={decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:`Numerokenttä`};var $d72adf5b20573e34$exports={};$d72adf5b20573e34$exports={decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:`Champ de nombre`};var $a25c707e88b844a7$exports={};
5$a25c707e88b844a7$exports={decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:`שדה מספר`};var $69b41140b9a4ca54$exports={};$69b41140b9a4ca54$exports={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:`Polje broja`};var $81dab28f37f59d1a$exports={};$81dab28f37f59d1a$exports={decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:`Számmező`};var $866555b31f2d7711$exports={};$866555b31f2d7711$exports={decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:`Campo numero`};var $dafcd55d52b9d371$exports={};$dafcd55d52b9d371$exports={decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:`数値フィールド`};var $f090c1f8c5da0145$exports={};$f090c1f8c5da0145$exports={decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:`번호 필드`};var $6f10f3a13360a75c$exports={};$6f10f3a13360a75c$exports={decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:`Numerio laukas`};var $47432cefd4b7bd1b$exports={};$47432cefd4b7bd1b$exports={decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:`Skaitļu lauks`};var $dc578a950a2bf23d$exports={};$dc578a950a2bf23d$exports={decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:`Tallfelt`};var $353f1bfca4dc395a$exports={};$353f1bfca4dc395a$exports={decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:`Getalveld`};var $241bc0bbd870e982$exports={};$241bc0bbd870e982$exports={decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:`Pole numeru`};var $da3005c7bd72b0a8$exports={};$da3005c7bd72b0a8$exports={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo de número`};var $cf48bfc540882310$exports={};$cf48bfc540882310$exports={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo numérico`};var $b63a28c481ab9ee3$exports={};$b63a28c481ab9ee3$exports={decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:`Câmp numeric`};var $19f9df95c2464ab6$exports={};$19f9df95c2464ab6$exports={decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:`Числовое поле`};var $b272932a685e8482$exports={};$b272932a685e8482$exports={decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:`Číselné pole`};var $cbaf8b5b61f9e544$exports={};$cbaf8b5b61f9e544$exports={decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:`Številčno polje`};var $e0a3af6ac1449b2f$exports={};$e0a3af6ac1449b2f$exports={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:`Polje broja`};var $71e167d2458a6019$exports={};$71e167d2458a6019$exports={decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:`Nummerfält`};var $3719245abc082946$exports={};$3719245abc082946$exports={decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:`Sayı alanı`};var $2ccc589e2f51824d$exports={};$2ccc589e2f51824d$exports={decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:`Поле номера`};var $e1103cb9b4c13942$exports={};$e1103cb9b4c13942$exports={decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:`数字字段`};var $448607634f80dccb$exports={};$448607634f80dccb$exports={decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:`數字欄位`};var $280a227d7cb94b92$exports={};$280a227d7cb94b92$exports={"ar-AE":$fb78e0f6ab6349ed$exports,"bg-BG":$2776acdd9959a647$exports,"cs-CZ":$741954410a365ad3$exports,"da-DK":$8321ed0f8ab642f0$exports,"de-DE":$92978e0c4ecafa32$exports,"el-GR":$ac5ff71962864a84$exports,"en-US":$efe4685e2440d8be$exports,"es-ES":$e50a9a48739b90e1$exports,"et-EE":$6e0d5294ecbb8ab6$exports,"fi-FI":$e7129d65f607f77f$exports,"fr-FR":$d72adf5b20573e34$exports,"he-IL":$a25c707e88b844a7$exports,"hr-HR":$69b41140b9a4ca54$exp
5orts,"hu-HU":$81dab28f37f59d1a$exports,"it-IT":$866555b31f2d7711$exports,"ja-JP":$dafcd55d52b9d371$exports,"ko-KR":$f090c1f8c5da0145$exports,"lt-LT":$6f10f3a13360a75c$exports,"lv-LV":$47432cefd4b7bd1b$exports,"nb-NO":$dc578a950a2bf23d$exports,"nl-NL":$353f1bfca4dc395a$exports,"pl-PL":$241bc0bbd870e982$exports,"pt-BR":$da3005c7bd72b0a8$exports,"pt-PT":$cf48bfc540882310$exports,"ro-RO":$b63a28c481ab9ee3$exports,"ru-RU":$19f9df95c2464ab6$exports,"sk-SK":$b272932a685e8482$exports,"sl-SI":$cbaf8b5b61f9e544$exports,"sr-SP":$e0a3af6ac1449b2f$exports,"sv-SE":$71e167d2458a6019$exports,"tr-TR":$3719245abc082946$exports,"uk-UA":$2ccc589e2f51824d$exports,"zh-CN":$e1103cb9b4c13942$exports,"zh-TW":$448607634f80dccb$exports};function $parcel$interopDefault$6(e){return e&&e.__esModule?e.default:e}function $81397a9303501bda$export$23f548e970bdf099(e,t,n){let{id:r,decrementAriaLabel:i,incrementAriaLabel:a,isDisabled:o,isReadOnly:c,isRequired:u,minValue:K,maxValue:Y,autoFocus:X,label:ee,formatOptions:te,onBlur:ce=()=>{},onFocus:ue,onF
vendor: 4,559 bytes, line 5
5ocusChange:de,onKeyDown:fe,onKeyUp:me,description:ge,errorMessage:Te,isWheelDisabled:Oe,...Ae}=e,{increment:ze,incrementToMax:qe,decrement:Ye,decrementToMin:Ze,numberValue:Qe,inputValue:et,commit:nt,commitValidation:rt}=t,it=$fca6afa0e843324b$export$f12b703ca79dfbb1$1($parcel$interopDefault$6($280a227d7cb94b92$exports),`@react-aria/numberfield`),at=$bdb11010cef70236$export$f680877a34711e37$1(r),{focusProps:ot}=$a1ea59d68270f0dd$export$f8168d8dd8fd66e6({onBlur(){nt()}}),st=$a916eb452884faea$export$b7a616150fdb9f44(te),ct=(0,import_react.useMemo)(()=>st.resolvedOptions(),[st]),lt=$a916eb452884faea$export$b7a616150fdb9f44({...te,currencySign:void 0}),{spinButtonProps:ut,incrementButtonProps:dt,decrementButtonProps:ft}=$d2e8511e6f209edf$export$e908e06f4b8e3402({isDisabled:o,isReadOnly:c,isRequired:u,maxValue:Y,minValue:K,onIncrement:ze,onIncrementToMax:qe,onDecrement:Ye,onDecrementToMin:Ze,value:Qe,textValue:(0,import_react.useMemo)(()=>isNaN(Qe)?``:lt.format(Qe),[lt,Qe])}),[pt,mt]=(0,import_react.useState)(!1),{focusWithinProps:ht}=$9ab94262bd0047c7$export$420e68273165f4ec$1({isDisabled:o,onFocusWithinChange:mt});$7d0a636d7a4dcefd$export$2123ff2b87c81ca({onScroll:(0,import_react.useCallback)(e=>{Math.abs(e.deltaY)<=Math.abs(e.deltaX)||(e.deltaY>0?ze():e.deltaY<0&&Ye())},[Ye,ze]),isDisabled:Oe||o||c||!pt},n);var gt;let _t=(ct.maximumFractionDigits??0)>0,vt=t.minValue===void 0||isNaN(t.minValue)||t.minValue<0,yt=`numeric`;$c87311424ea30a05$export$186c6964ca17d99$1()?vt?yt=`text`:_t&&(yt=`decimal`):$c87311424ea30a05$export$a11b0059900ceec8$1()&&(vt?yt=`numeric`:_t&&(yt=`decimal`));let bt=e=>{t.validate(e)&&t.setInputValue(e)},xt=$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(e),St=(0,import_react.useCallback)(e=>{e.key===`Enter`?(nt(),rt()):e.continuePropagation()},[nt,rt]),{isInvalid:Ct,validationErrors:wt,validationDetails:Tt}=t.displayValidation,{labelProps:Et,inputProps:Dt,descriptionProps:Ot,errorMessageProps:kt}=$d841c8010a73d545$export$4f384c9210e583c3({...Ae,...xt,name:void 0,label:ee,autoFocus:X,isDisabled:o,isReadOnly:c,isRequired:u,validate:void 0,[$e5be200c675c3b3a$export$a763b9476acd3eb]:t,value:et,defaultValue:void 0,autoComplete:`off`,"aria-label":e[`aria-label`]||void 0,"aria-labelledby":e[`aria-labelledby`]||void 0,id:at,type:`text`,inputMode:yt,onChange:bt,onBlur:ce,onFocus:ue,onFocusChange:de,onKeyDown:(0,import_react.useMemo)(()=>$ff5963eb1fccf552$export$e08e3b67e392101e$1(St,fe),[St,fe]),onKeyUp:me,description:ge,errorMessage:Te},t,n);$99facab73266f662$export$5add1d006293d136(n,t.numberValue,t.setNumberValue);let At=$3ef42575df84b30b$export$9d1611c77c2fe928$1(ut,ot,Dt,{role:null,"aria-roledescription":$c87311424ea30a05$export$fedb369cb70207f1$1()?null:it.format(`numberField`),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:`off`,spellCheck:`false`});e.validationBehavior===`native`&&(At[`aria-required`]=void 0);let jt=e=>{var t;document.activeElement!==n.current&&(e.pointerType===`mouse`?(t=n.current)==null||t.focus():e.target.focus())},Mt=e[`aria-label`]||(typeof e.label==`string`?e.label:``),Nt;Mt||(Nt=e.label==null?e[`aria-labelledby`]:Et.id);let Pt=$bdb11010cef70236$export$f680877a34711e37$1(),Ft=$bdb11010cef70236$export$f680877a34711e37$1(),It=$3ef42575df84b30b$export$9d1611c77c2fe928$1(dt,{"aria-label":a||it.format(`increase`,{fieldLabel:Mt}).trim(),id:Nt&&!a?Pt:null,"aria-labelledby":Nt&&!a?`${Pt} ${Nt}`:null,"aria-controls":at,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:jt}),Rt=$3ef42575df84b30b$export$9d1611c77c2fe928$1(ft,{"aria-label":i||it.format(`decrease`,{fieldLabel:Mt}).trim(),id:Nt&&!i?Ft:null,"aria-labelledby":Nt&&!i?`${Ft} ${Nt}`:null,"aria-controls":at,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:jt});return{groupProps:{...ht,role:`group`,"aria-disabled":o,"aria-invalid":Ct?`true`:void 0},labelProps:Et,inputProps:At,incrementButtonProps:It,decrementButtonProps:Rt,errorMessageProps:kt,descriptionProps:Ot,isInvalid:Ct,validationErrors:wt,validationDetails:Tt}}var $edcf132a9284368a$var$AXIS={top:`top`,bottom:`top`,left:`left`,right:`left`},$edcf132a9284368a$var$FLIPPED_DIRECTION={top:`bottom`,bottom:`top`,left:`right`,right:`left`},$edcf132a9284368a$var$CROSS_AXIS={top:`left`,left:`top`},$edcf132a9284368a$var$AXIS_SIZE={top:`height`,left:`width`},$edcf132a9284368a$var$TOTAL_SIZE={width:`totalWidth`,height:`totalHeight`},$edcf132a9284368a$var$PARSED_PLACEMENT_CACHE={}
5,$edcf132a9284368a$var$visualViewport=typeof document<`u`&&window.visualViewport;function $edcf132a9284368a$var$getContainerDimensions(e){let t=0,n=0,r=0,i=0,a=0,o=0,c={},u=$edcf132a9284368a$var$visualViewport?.scale>1;if(e.tagName===`BODY`){let u=document.documentElement;r=u.clientWidth,i=u.clientHeight;var K;t=$edcf132a9284368a$var$visualViewport?.width??r;var Y;n=$edcf132a9284368a$var$visualViewport?.height??i,c.top=u.scrollTop||e.scrollTop,c.left=u.scrollLeft||e.scrollLeft,$edcf132a9284368a$var$visualViewport&&(a=$edcf132a9284368a$var$visualViewport.offsetTop,o=$edcf132a9284368a$var$visualViewport.offsetLeft)}else({width:t,height:n,top:a,left:o}=$edcf132a9284368a$var$getOffset(e)),c.top=e.scrollTop,c.left=e.scrollLeft,r=t,i=n;return $c87311424ea30a05$export$78551043582a6a98$1()&&(e.tagName===`BODY`||e.tagName===`HTML`)&&u&&(c.top=0,c.left=0,a=$edcf132a9284368a$var$visualViewport.pageTop,o=$edcf132a9284368a$var$visualViewport.pageLeft),{width:t,height:n,totalWidth:r,totalHeight:i,scroll:c,top:a,left:o}}function $edcf132a9284368a$var$getScroll(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function $edcf132a9284368a$var$getDelta(e,t,n,r,i,a,o){let c=i.scroll[e],u=r[$edcf132a9284368a$var$AXIS_SIZE[e]],K=r.scroll[$edcf132a9284368a$var$AXIS[e]]+a,Y=u+r.scroll[$edcf132a9284368a$var$AXIS[e]]-a,X=t-c+o[e]-r[$edcf132a9284368a$var$AXIS[e]],ee=t-c+n+o[e]-r[$edcf132a9284368a$var$AXIS[e]];return X<K?K-X:ee>Y?Math.max(Y-ee,K-X):0}function $edcf132a9284368a$var$getMargins(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function $edcf132a9284368a$var$parsePlacement(e){if($edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[e])return $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[e];let[t,n]=e.split(` `),r=$edcf132a9284368a$var$AXIS[t]||`right`,i=$edcf132a9284368a$var$CROSS_AXIS[r];$edcf132a9284368a$var$AXIS[n]||(n=`center`);let a=$edcf132a9284368a$var$AXIS_SIZE[r],o=$edcf132a9284368a$var$AXIS_SIZE[i];return $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[e]={placement:t,crossPlacement:n,axis:r,crossAxis:i,size:a,crossSize:o},$edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[e]}function $edcf132a9284368a$var$computePosition(e,t,n,r,i,a,o,c,u,K){let{placement:Y,crossPlacement:X,axis:ee,crossAxis:te,size:ce,crossSize:ue}=r,de={};de[te]=e[te],X===`center`?de[te]+=(e[ue]-n[ue])/2:X!==te&&(de[te]+=e[ue]-n[ue]),de[te]+=a;let fe=e[te]-n[ue]+u+K,me=e[te]+e[ue]-u-K;if(de[te]=$9446cca9a3875146$export$7d15b64cf5a3a4c4(de[te],fe,me),Y===ee){let n=c?o[ce]:t[$edcf132a9284368a$var$TOTAL_SIZE[ce]];de[$edcf132a9284368a$var$FLIPPED_DIRECTION[ee]]=Math.floor(n-e[ee]+i)}else de[ee]=Math.floor(e[ee]+e[ce]+i);return de}function $edcf132a9284368a$var$getMaxHeight(e,t,n,r,i,a,o,c){let u=r?n.height:t[$edcf132a9284368a$var$TOTAL_SIZE.height],K=e.top==null?n.top+(u-e.bottom-o):n.top+e.top,Y=c===`top`?Math.max(0,K+o-(t.top+t.scroll.top)-(i.top+i.bottom+a)):Math.max(0,t.height+t.top+t.scroll.top-K-(i.top+i.bottom+a));return Math.min(t.height-a*2,Y)}function $edcf132a9284368a$var$getAvailableSpace(e,t,n,r,i,a){let{placement:o,axis:c,size:u}=a;return o===c?Math.max(0,n[c]-e[c]-e.scroll[c]+t[c]-r[c]-r[$edcf132a9284368a$var$FLIPPED_DIRECTION[c]]-i):Math.max(0,e[u]+e[c]+e.scroll[c]-t[c]-n[c]-n[u]-r[c]-r[$edcf132a9284368a$var$FLIPPED_DIRECTION[c]]-i)}function $edcf132a9284368a$export$6839422d1f33cee9(e,t,n,r,i,a,o,c,u,K,Y,X,ee,te,ce,ue){let de=$edcf132a9284368a$var$parsePlacement(e),{size:fe,crossAxis:me,crossSize:ge,placement:Te,crossPlacement:Oe}=de,Ae=$edcf132a9284368a$var$computePosition(t,c,n,de,Y,X,K,ee,ce,ue),ze=Y,qe=$edcf132a9284368a$var$getAvailableSpace(c,K,t,i,a+Y,de);if(o&&r[fe]>qe){let e=$edcf132a9284368a$var$parsePlacement(`${$edcf132a9284368a$var$FLIPPED_DIRECTION[Te]} ${Oe}`),r=$edcf132a9284368a$var$computePosition(t,c,n,e,Y,X,K,ee,ce,ue);$edcf132a9284368a$var$getAvailableSpace(c,K,t,i,a+Y,e)>qe&&(de=e,Ae=r,ze=Y)}let Ye=`bottom`;de.axis===`top`?de.placement===`top`?Ye=`top`:de.placement===`bottom`&&(Ye=`bottom`):de.crossAxis===`top`&&(de.crossPlacement===`top`?Ye=`bottom`:de.crossPlacement===`bottom`&&(Ye=`top`));let Ze=$edcf132a9284368a$var$getDelta(me,Ae[me],n[ge],c,u,a,K);Ae[me]+=Ze;let Qe=$edcf132a9284368a$var$getMaxHeight(Ae,c,K,ee,i,a,n.height,Ye);te&&te<Qe&&(Qe=te),n.height=Math.min(n.height,Qe),Ae=$edcf132a9284368a$var$computePosition(t,c,n,de,ze,X,K,ee,ce,ue),Ze=$edcf132a9284368a$var$getDelta(me,Ae[me],n[ge],c,u,a,K),Ae[me]+=Ze;let et={},nt=t[me]+.5*t[ge]-Ae[me]-i[$edcf132a9284368a$var$AXIS[me]],rt=ce/2+ue,it=$edcf132a9284368a$var$AXIS[me]===`left`?i.left+i.right:i.top+i.bottom,at=n[ge]-it-ce/2-ue;return et[me]=$9446cca9a3875146$export$7d15b64cf5a3a4c4($9446cca9a3875146$export$7d15b64cf5a3a4c4(nt,t[me]+ce/2-(Ae[me]+i[$edcf132a9284368a$var$AXIS[me]]),t[me]+t[ge]-ce/2-(Ae[me]+i[$edcf132a9284368a$var$AXIS[me]])),rt,at),{position:Ae,maxHeight:Qe,arrowOffsetLeft:et.left,arrowOffsetTop:et.top,placement:de.placement}}function $edcf132a9284368a$export$b3ceb0cbf1056d98(e){let{placement:t,targetNode:n,overlayNode:r,scrollNode:i,padding:a,shouldFlip:o,boundaryElement:c,offset:u,crossOffset:K,maxHeight:Y,arrowSize:X=0,arrowBoundaryOffset:ee=0}=e,te=r instanceof HTMLElement?$edcf132a9284368a$var$getContainingBlock(r):document.documentElement,ce=te===document.documentElement,ue=window.getComputedStyle(te).position,de=!!ue&&ue!==`static`,fe=ce?$edcf132a9284368a$var$getOffset(n):$edcf132a9284368a$var$getPosition(n,te);if(!ce){let{marginTop:e,marginLeft:t}=window.getComputedStyle(n);fe.top+=parseInt(e,10)||0,fe.left+=parseInt(t,10)||0}let me=$edcf132a9284368a$var$getOffset(r),ge=$edcf132a9284368a$var$getMargins(r);me.width+=ge.left+ge.right,me.height+=ge.top+ge.bottom;let Te=$edcf132a9284368a$var$getScroll(i),Oe=$edcf132a9284368a$var$getContainerDimensions(c),Ae=$edcf132a9284368a$var$getContainerDimensions(te),ze=c.tagName===`BODY`?$edcf132a9284368a$var$getOffset(te):$edcf132a9284368a$var$getPosition(te,c);return te.tagName===`HTML`&&c.tagName===`BODY`&&(Ae.scroll.top=0,Ae.scroll.left=0),$edcf132a9284368a$export$6839422d1f33cee9(t,fe,me,Te,ge,a,o,Oe,Ae,ze,u,K,de,Y,X,ee)}function $edcf132a9284368a$var$getOffset(e){let{top:t,left:n,width:r,height:i}=e.getBoundingClientRect(),{scrollTop:a,scrollLeft:o,clientTop:c,clientLeft:u}=document.documentElement;return{top:t+a-c,left:n+o-u,width:r,height:i}}function $edcf132a9284368a$var$getPosition(e,t){let n=window.getComputedStyle(e),r;if(n.position===`fixed`){let{top:t,left:n,width:i,height:a}=e.getBoundingClientRect();r={top:t,left:n,width:i,height:a}}else{r=$edcf132a9284368a$var$getOffset(e);let n=$edcf132a9284368a$var$getOffset(t),i=window.getComputedStyle(t);n.top+=(parseInt(i.borderTopWidth,10)||0)-t.scrollTop,n.left+=(parseInt(i.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=n.top,r.left-=n.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function $edcf132a9284368a$var$getContainingBlock(e){let t=e.offsetParent;if(t&&t===document.body&&window.getComputedStyle(t).position===`static`&&!$edcf132a9284368a$var$isContainingBlock(t)&&(t=document.documentElement),t==null)for(t=e.parentElement;t&&!$edcf132a9284368a$var$isContainingBlock(t);)t=t.parentElement;return t||document.documentElement}function $edcf132a9284368a$var$isContainingBlock(e){let t=window.getComputedStyle(e);return t.transform!==`none`||/transform|perspective/.test(t.willChange)||t.filter!==`none`||t.contain===`paint`||`backdropFilter`in t&&t.backdropFilter!==`none`||`WebkitBackdropFilter`in t&&t.WebkitBackdropFilter!==`none`}var $dd149f63282afbbf$export$f6211563215e3b37=new WeakMap;function $dd149f63282afbbf$export$18fc8428861184da(e){let{triggerRef:t,isOpen:n,onClose:r}=e;(0,import_react.useEffect)(()=>
5{if(!n||r===null)return;let e=e=>{let n=e.target;if(!t.current||n instanceof Node&&!n.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let i=r||$dd149f63282afbbf$export$f6211563215e3b37.get(t.current);i&&i()};return window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`scroll`,e,!0)}},[n,r,t])}var $2a41e45df1593e64$var$visualViewport=typeof document<`u`&&window.visualViewport;function $2a41e45df1593e64$export$d39e1813b3bdd0e1(e){let{direction:t}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7$1(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:a=i,placement:o=`bottom`,containerPadding:c=12,shouldFlip:u=!0,boundaryElement:K=typeof document<`u`?document.body:null,offset:Y=0,crossOffset:X=0,shouldUpdatePosition:ee=!0,isOpen:te=!0,onClose:ce,maxHeight:ue,arrowBoundaryOffset:de=0}=e,[fe,me]=(0,import_react.useState)({position:{},arrowOffsetLeft:void 0,arrowOffsetTop:void 0,maxHeight:void 0,placement:void 0}),ge=[ee,o,i.current,r.current,a.current,c,u,K,Y,X,te,t,ue,de,n],Te=(0,import_react.useRef)($2a41e45df1593e64$var$visualVie
5wport?.scale);(0,import_react.useEffect)(()=>{te&&(Te.current=$2a41e45df1593e64$var$visualViewport?.scale)},[te]);let Oe=(0,import_react.useCallback)(()=>{if(ee===!1||!te||!i.current||!r.current||!K||$2a41e45df1593e64$var$visualViewport?.scale!==Te.current)return;let e=null;if(a.current&&a.current.contains(document.activeElement)){let t=document.activeElement.getBoundingClientRect(),n=a.current.getBoundingClientRect();e={type:`top`,offset:t.top-n.top},e.offset>n.height/2&&(e.type=`bottom`,e.offset=t.bottom-n.bottom)}let ce=i.current;if(!ue&&i.current){var fe;ce.style.top=`0px`,ce.style.bottom=``;var ge;ce.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+`px`}let Oe=$edcf132a9284368a$export$b3ceb0cbf1056d98({placement:$2a41e45df1593e64$var$translateRTL(o,t),overlayNode:i.current,targetNode:r.current,scrollNode:a.current||i.current,padding:c,shouldFlip:u,boundaryElement:K,offset:Y,crossOffset:X,maxHeight:ue,arrowSize:n,arrowBoundaryOffset:de});if(ce.style.top=``,ce.style.bottom=``,ce.style.left=``,ce.style.right=``,Object.keys(Oe.position).forEach(e=>ce.style[e]=Oe.position[e]+`px`),ce.style.maxHeight=Oe.maxHeight==null?void 0:Oe.maxHeight+`px`,e){let t=document.activeElement.getBoundingClientRect(),n=a.current.getBoundingClientRect(),r=t[e.type]-n[e.type];a.current.scrollTop+=r-e.offset}me(Oe)},ge);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(Oe,ge),$2a41e45df1593e64$var$useResize(Oe),$9daab02d461809db$export$683480f191c0e3ea({ref:i,onResize:Oe}),$9daab02d461809db$export$683480f191c0e3ea({ref:r,onResize:Oe});let Ae=(0,import_react.useRef)(!1);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{let e,t=()=>{Ae.current=!0,clearTimeout(e),e=setTimeout(()=>{Ae.current=!1},500),Oe()},n=()=>{Ae.current&&t()};
5return $2a41e45df1593e64$var$visualViewport?.addEventListener(`resize`,t),$2a41e45df1593e64$var$visualViewport?.addEventListener(`scroll`,n),()=>{$2a41e45df1593e64$var$visualViewport?.removeEventListener(`resize`,t),$2a41e45df1593e64$var$visualViewport?.removeEventListener(`scroll`,n)}},[Oe]);let ze=(0,import_react.useCallback)(()=>{Ae.current||ce()},[ce,Ae]);$dd149f63282afbbf$export$18fc8428861184da({triggerRef:r,isOpen:te,onClose:ce&&ze});var qe;return{overlayProps:{style:{position:`absolute`,zIndex:1e5,...fe.position,maxHeight:fe.maxHeight??`100vh`}},placement:fe.placement,arrowProps:{"aria-hidden":`true`,role:`presentation`,style:{left:fe.arrowOffsetLeft,top:fe.arrowOffsetTop}},updatePosition:Oe}}function $2a41e45df1593e64$var$useResize(e){$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>(window.addEventListener(`resize`,e,!1),()=>{window.removeEventListener(`resize`,e,!1)}),[e])}function $2a41e45df1593e64$var$translateRTL(e,t){return t===`rtl`?e.replace(`start`,`right`).replace(`end`,`left`):e.replace(`start`,`left`).replace(`end`,`right`)}var $a11501f3d1d39e6c$var$visibleOverlays=[];function $a11501f3d1d39e6c$export$ea8f71083e90600f(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:a=!1,isKeyboardDismissDisabled:o=!1,shouldCloseOnInteractOutside:c}=e;(0,import_react.useEffect)(()=>(i&&$a11501f3d1d39e6c$var$visibleOverlays.push(t),()=>{let e=$a11501f3d1d39e6c$var$visibleOverlays.indexOf(t);e>=0&&$a11501f3d1d39e6c$var$visibleOverlays.splice(e,1)}),[i,t]);let u=()=>{$a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length-1]===t&&n&&n()},K=e=>{(!c||c(e.target))&&$a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length-1]===t&&(e.stopPropagation(),e.preventDefault())},Y=e=>{(!c||c(e.target))&&($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length-1]===t&&(e.stopPropagation(),e.preventDefault()),u())},X=e=>{e.key===`Escape`&&!o&&!e.nativeEvent.isComposing&&(e.stopPropagation(),e.preventDefault(),u())};$e0b6e0b68ec7f50f$export$872b660ac5a1ff98({ref:t,onInteractOutside:a&&i?Y:null,onInteractOutsideStart:K});let{focusWithinProps:ee}=$9ab94262bd0047c7$export$420e68273165f4ec$1({isDisabled:!r,onBlurWithin:e=>{e.relatedTarget&&!$9bf71ea28793e738$export$1258395f99bf9cbf(e.relatedTarget)&&(!c||c(e.relatedTarget))&&n()}}),te=e=>{e.target===e.currentTarget&&e.preventDefault()};return{overlayProps:{onKeyDown:X,...ee},underlayProps:{onPointerDown:te}}}function $628037886ba31236$export$f9d5c8beee7d008d(e,t,n){let{type:r}=e,{isOpen:i}=t;(0,import_react.useEffect)(()=>{n&&n.current&&$dd149f63282afbbf$export$f6211563215e3b37.set(n.current,t.close)});let a;r===`menu`?a=!0:r===`listbox`&&(a=`listbox`);let o=$bdb11010cef70236$export$f680877a34711e37$1();return{triggerProps:{"aria-haspopup":a,"aria-expanded":i,"aria-controls":i?o:null,onPress:t.toggle},overlayProps:{id:o}}}
5var $49c51c25361d4cd2$var$visualViewport=typeof document<`u`&&window.visualViewport,$49c51c25361d4cd2$var$nonTextInputTypes=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]),$49c51c25361d4cd2$var$preventScrollCount=0,$49c51c25361d4cd2$var$restore;function $49c51c25361d4cd2$export$ee0f7cc6afcd1c18(e={}){let{isDisabled:t}=e;$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{if(!t)return $49c51c25361d4cd2$var$preventScrollCount++,$49c51c25361d4cd2$var$preventScrollCount===1&&($49c51c25361d4cd2$var$restore=$c87311424ea30a05$export$fedb369cb70207f1$1()?$49c51c25361d4cd2$var$preventScrollMobileSafari():$49c51c25361d4cd2$var$preventScrollStandard()),()=>{$49c51c25361d4cd2$var$preventScrollCount--,$49c51c25361d4cd2$var$preventScrollCount===0&&$49c51c25361d4cd2$var$restore()}},[t])}function $49c51c25361d4cd2$var$preventScrollStandard(){return $ff5963eb1fccf552$export$e08e3b67e392101e$1($49c51c25361d4cd2$var$setStyle(document.documentElement,`paddingRight`,`${window.innerWidth-document.documentElement.clientWidth}px`),$49c51c25361d4cd2$var$setStyle(document.documentElement,`overflow`,`hidden`))}function $49c51c25361d4cd2$var$preventScrollMobileSafari(){let e,t,n=n=>{e=$62d8ded9296f3872$export$cfa2225e87938781(n.target,!0),(e!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior===`auto`&&(t=$49c51c25361d4cd2$var$setStyle(e,`overscrollBehavior`,`contain`))},r=t=>{if(!e||e===document.documentElement||e===document.body){t.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault()},i=e=>{let n=e.target;$49c51c25361d4cd2$var$willOpenKeyboard(n)&&n!==document.activeElement&&(e.preventDefault(),c(),n.style.transform=`translateY(-2000px)`,n.focus(),requestAnimationFrame(()=>{n.style.transform=``})),t&&t()},a=e=>{let t=e.target;$49c51c25361d4cd2$var$willOpenKeyboard(t)&&(c(),t.style.transform=`translateY(-2000px)`,requestAnimationFrame(()=>
vendor: 5,947 bytes, line 5
5{t.style.transform=``,$49c51c25361d4cd2$var$visualViewport&&($49c51c25361d4cd2$var$visualViewport.height<window.innerHeight?requestAnimationFrame(()=>{$49c51c25361d4cd2$var$scrollIntoView(t)}):$49c51c25361d4cd2$var$visualViewport.addEventListener(`resize`,()=>$49c51c25361d4cd2$var$scrollIntoView(t),{once:!0}))}))},o=null,c=()=>{if(o)return;let e=()=>{window.scrollTo(0,0)},t=window.pageXOffset,n=window.pageYOffset;o=$ff5963eb1fccf552$export$e08e3b67e392101e$1($49c51c25361d4cd2$var$addEvent(window,`scroll`,e),$49c51c25361d4cd2$var$setStyle(document.documentElement,`paddingRight`,`${window.innerWidth-document.documentElement.clientWidth}px`),$49c51c25361d4cd2$var$setStyle(document.documentElement,`overflow`,`hidden`),$49c51c25361d4cd2$var$setStyle(document.body,`marginTop`,`-${n}px`),()=>{window.scrollTo(t,n)}),window.scrollTo(0,0)},u=$ff5963eb1fccf552$export$e08e3b67e392101e$1($49c51c25361d4cd2$var$addEvent(document,`touchstart`,n,{passive:!1,capture:!0}),$49c51c25361d4cd2$var$addEvent(document,`touchmove`,r,{passive:!1,capture:!0}),$49c51c25361d4cd2$var$addEvent(document,`touchend`,i,{passive:!1,capture:!0}),$49c51c25361d4cd2$var$addEvent(document,`focus`,a,!0));return()=>{t?.(),o?.(),u()}}function $49c51c25361d4cd2$var$setStyle(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function $49c51c25361d4cd2$var$addEvent(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function $49c51c25361d4cd2$var$scrollIntoView(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=$62d8ded9296f3872$export$cfa2225e87938781(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;r>n+e.clientHeight&&(t.scrollTop+=r-n)}e=t.parentElement}}function $49c51c25361d4cd2$var$willOpenKeyboard(e){return e instanceof HTMLInputElement&&!$49c51c25361d4cd2$var$nonTextInputTypes.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}var require_scheduler_production_min=__commonJSMin((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var c=2*(r+1)-1,u=e[c],K=c+1,Y=e[K];if(0>i(u,n))K<a&&0>i(Y,u)?(e[r]=Y,e[K]=n,r=K):(e[r]=u,e[c]=n,r=c);else if(K<a&&0>i(Y,n))e[r]=Y,e[K]=n,r=K;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,c=o.now();e.unstable_now=function(){return o.now()-c}}var u=[],K=[],Y=1,X=null,ee=3,te=!1,ce=!1,ue=!1,de=typeof setTimeout==`function`?setTimeout:null,fe=typeof clearTimeout==`function`?clearTimeout:null,me=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ge(e){for(var i=n(K);i!==null;){if(i.callback===null)r(K);else if(i.startTime<=e)r(K),i.sortIndex=i.expirationTime,t(u,i);else break;i=n(K)}}function Te(e){if(ue=!1,ge(e),!ce){if(n(u)!==null)ce=!0,at(Oe);else{var t=n(K);t!==null&&ot(Te,t.startTime-e)}}}function Oe(t,i){ce=!1,ue&&(ue=!1,fe(qe),qe=-1),te=!0;var a=ee;try{for(ge(i),X=n(u);X!==null&&(!(X.expirationTime>i)||t&&!Qe());){var o=X.callback;if(typeof o==`function`){X.callback=null,ee=X.priorityLevel;var c=o(X.expirationTime<=i);i=e.unstable_now(),typeof c==`function`?X.callback=c:X===n(u)&&r(u),ge(i)}else r(u);X=n(u)}if(X!==null)var Y=!0;else{var de=n(K);de!==null&&ot(Te,de.startTime-i),Y=!1}return Y}finally{X=null,ee=a,te=!1}}var Ae=!1,ze=null,qe=-1,Ye=5,Ze=-1;function Qe(){return!(e.unstable_now()-Ze<Ye)}function et(){if(ze!==null){var t=e.unstable_now();Ze=t;var n=!0;try{n=ze(!0,t)}finally{n?nt():(Ae=!1,ze=null)}}else Ae=!1}var nt;if(typeof me==`function`)nt=function(){me(et)};else if(typeof MessageChannel<`u`){var rt=new MessageChannel,it=rt.port2;rt.port1.onmessage=et,nt=function(){it.postMessage(null)}}else nt=function(){de(et,0)};function at(e){ze=e,Ae||(Ae=!0,nt())}function ot(t,n){qe=de(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){ce||te||(ce=!0,at(Oe))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):Ye=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return ee},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(e){switch(ee){case 1:case 2:case 3:var t=3;break;default:t=ee}var n=ee;ee=t;try{return e()}finally{ee=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=ee;ee=e;try{return t()}finally{ee=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var c=-1;break;case 2:c=250;break;case 5:c=1073741823;break;case 4:c=1e4;break;default:c=5e3}return c=a+c,r={id:Y++,callback:i,priorityLevel:r,startTime:a,expirationTime:c,sortIndex:-1},a>o?(r.sortIndex=a,t(K,r),n(u)===null&&r===n(K)&&(ue?(fe(qe),qe=-1):ue=!0,ot(Te,a-o))):(r.sortIndex=c,t(u,r),ce||te||(ce=!0,at(Oe))),r},e.unstable_shouldYield=Qe,e.unstable_wrapCallback=function(e){var t=ee;return function(){var n=ee;ee=t;try{return e.apply(this,arguments)}finally{ee=n}}}}
vendor: 4,103 bytes, line 5
5)),require_scheduler=__commonJSMin(((e,t)=>{t.exports=require_scheduler_production_min()})),require_react_dom_production_min=__commonJSMin((e=>{var t=require_react(),n=require_scheduler();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=new Set,a={};function o(e,t){c(e,t),c(e+`Capture`,t)}function c(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var u=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,K=Object.prototype.hasOwnProperty,Y=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,X={},ee={};function te(e){return K.call(ee,e)?!0:K.call(X,e)?!1:Y.test(e)?ee[e]=!0:(X[e]=!0,!1)}function ce(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function ue(e,t,n,r){if(t==null||ce(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function de(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var fe={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){fe[e]=new de(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];fe[t]=new de(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){fe[e]=new de(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){fe[e]=new de(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){fe[e]=new de(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){fe[e]=new de(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){fe[e]=new de(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){fe[e]=new de(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){fe[e]=new de(e,5,!1,e.toLowerCase(),null,!1,!1)});var me=/[\-:]([a-z])/g;function ge(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode
5-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(me,ge);fe[t]=new de(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(me,ge);fe[t]=new de(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(me,ge);fe[t]=new de(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){fe[e]=new de(e,1,!1,e.toLowerCase(),null,!1,!1)}),fe.xlinkHref=new de(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){fe[e]=new de(e,1,!1,e.toLowerCase(),null,!0,!0)});function Te(e,t,n,r){var i=fe.hasOwnProperty(t)?fe[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(ue(t,n,i,r)&&(n=null),r||i===null?te(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type!==3&&``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Oe=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ae=Symbol.for(`react.element`),ze=Symbol.for(`react.portal`),qe=Symbol.for(`react.fragment`),Ye=Symbol.for(`react.strict_mode`),Ze=Symbol.for(`react.profiler`),Qe=Symbol.for(`react.provider`),et=Symbol.for(`react.context`),nt=Symbol.for(`react.forward_ref`),rt=Symbol.for(`react.suspense`),it=Symbol.for(`react.suspense_list`),at=Symbol.for(`react.memo`),ot=Symbol.for(`react.lazy`),st=Symbol.for(`react.offscreen`),ct=Symbol.iterator;function lt(e){return typeof e!=`object`||!e?null:(e=ct&&e[ct]||e[`@@iterator`],typeof e==`function`?e:null)}var ut=Object.assign,dt;function ft(e){if(dt===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);dt=t&&t[1]||``}return`
6`+dt+e}var pt=!1;function mt(e,t){if(!e||pt)return``;pt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t){if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
7`),a=r.stack.split(`
8`),o=i.length-1,c=a.length-1;1<=o&&0<=c&&i[o]!==a[c];)c--;for(;1<=o&&0<=c;o--,c--)if(i[o]!==a[c]){if(o!==1||c!==1)do if(o--,c--,0>c||i[o]!==a[c]){var u=`
9`+i[o].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=o&&0<=c);break}}}finally{pt=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?ft(e):``}function ht(e){switch(e.tag){case 5:return ft(e.type);case 16:return ft(`Lazy`);case 13:return ft(`Suspense`);case 19:return ft(`SuspenseList`);case 0:case 2:case 15:return e=mt(e.type,!1),e;case 11:return e=mt(e.type.render,!1),e;case 1:return e=mt(e.type,!0),e;default:return``}}function gt(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case qe:return`Fragment`;case ze:return`Portal`;case Ze:return`Profiler`;case Ye:return`StrictMode`;case rt:return`Suspense`;case it:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case et:return(e.displayName||`Context`)+`.Consumer`;case Qe:return(e._context.displayName||`Context`)+`.Provider`;case nt:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case at:return t=e.displayName||null,t===null?gt(e.type)||`Memo`:t;case ot:t=e._payload,e=e._init;try{return gt(e(t))}catch{}}return null}function _t(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;
vendor: 4,794 bytes, line 9
9case 16:return gt(t);case 8:return t===Ye?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function vt(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function yt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function bt(e){var t=yt(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xt(e){e._valueTracker||=bt(e)}function St(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=yt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Ct(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function wt(e,t){var n=t.checked;return ut({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Tt(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=vt(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function Et(e,t){t=t.checked,t!=null&&Te(e,`checked`,t,!1)}function Dt(e,t){Et(e,t);var n=vt(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?kt(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&kt(e,t.type,vt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ot(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function kt(e,t,n){(t!==`number`||Ct(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var At=Array.isArray;function jt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+vt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Mt(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return ut({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function Nt(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(At(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:vt(n)}}function Pt(e,t){var n=vt(t.value),r=vt(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function Ft(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function It(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function Rt(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?It(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var zt,Bt=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(zt||=document.createElement(`div`),zt.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=zt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Vt(e,t){if(t){var n=e.firstChild;
vendor: 5,254 bytes, line 9
9if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ht={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ut=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Ht).forEach(function(e){Ut.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ht[t]=Ht[e]})});function Wt(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Ht.hasOwnProperty(e)&&Ht[e]?(``+t).trim():t+`px`}function Gt(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Wt(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Kt=ut({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function qt(e,t){if(t){if(Kt[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Jt(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Yt=null;function Xt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zt=null,Qt=null,$t=null;function en(e){if(e=no(e)){if(typeof Zt!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=io(t),Zt(e.stateNode,e.type,t))}}function tn(e){Qt?$t?$t.push(e):$t=[e]:Qt=e}function nn(){if(Qt){var e=Qt,t=$t;if($t=Qt=null,en(e),t)for(e=0;e<t.length;e++)en(t[e])}}function rn(e,t){return e(t)}function an(){}var on=!1;function sn(e,t,n){if(on)return e(t,n);on=!0;try{return rn(e,t,n)}finally{on=!1,(Qt!==null||$t!==null)&&(an(),nn())}}function cn(e,t){var n=e.stateNode;if(n===null)return null;var i=io(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var ln=!1;if(u)try{var un={};Object.defineProperty(un,"passive",{get:function(){ln=!0}}),window.addEventListener(`test`,un,un),window.removeEventListener(`test`,un,un)}catch{ln=!1}function dn(e,t,n,r,i,a,o,c,u){var K=Array.prototype.slice.call(arguments,3);try{t.apply(n,K)}catch(e){this.onError(e)}}var fn=!1,pn=null,mn=!1,hn=null,gn={onError:function(e){fn=!0,pn=e}};function _n(e,t,n,r,i,a,o,c,u){fn=!1,pn=null,dn.apply(gn,arguments)}function vn(e,t,n,i,a,o,c,u,K){if(_n.apply(this,arguments),fn){if(fn){var Y=pn;fn=!1,pn=null}else throw Error(r(198));mn||(mn=!0,hn=Y)}}function yn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function bn(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function xn(e){if(yn(e)!==e)throw Error(r(188))}function Sn(e){var t=e.alternate;if(!t){if(t=yn(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return xn(a),e;if(o===i)return xn(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,i=o;break}if(u===i){c=!0,i=a,n=o;break}u=u.sibling}if(!c){for(u=o.child;u;){if(u===n){c=!0,n=o,i=a;break}if(u===i){c=!0,i=o,n=a;break}u=u.sibling}if(!c)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function Cn(e){return e=Sn(e),e===null?null:wn(e)}function wn(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=wn(e);if(t!==null)return t;e=e.sibling}return null}var Tn=n.unstable_scheduleCallback,En=n.unstable_cancelCallback,Dn=n.unstable_shouldYield,On=n.unstable_requestPaint,kn=n.unstable_now,An=n.unstable_getCurrentPriorityLevel,jn=n.unstable_ImmediatePriority,Mn=n.unstable_UserBlockingPriority,Nn=n.unstable_NormalPriority,Pn=n.unstable_LowPriority,Fn=n.unstable_IdlePriority,In=null,Ln=null;
vendor: 6,512 bytes, line 9
9function Rn(e){if(Ln&&typeof Ln.onCommitFiberRoot==`function`)try{Ln.onCommitFiberRoot(In,e,void 0,(e.current.flags&128)==128)}catch{}}var zn=Math.clz32?Math.clz32:Hn,Bn=Math.log,Vn=Math.LN2;function Hn(e){return e>>>=0,e===0?32:31-(Bn(e)/Vn|0)|0}var Un=64,Wn=4194304;function Gn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Kn(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var c=o&~i;c===0?(a&=o,a!==0&&(r=Gn(a))):r=Gn(c)}else o=n&~i,o===0?a!==0&&(r=Gn(a)):r=Gn(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-zn(t),i=1<<n,r|=e[n],t&=~i;return r}function qn(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Jn(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-zn(a),c=1<<o,u=i[o];u===-1?((c&n)===0||(c&r)!==0)&&(i[o]=qn(c,t)):u<=t&&(e.expiredLanes|=c),a&=~c}}function Yn(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Xn(){var e=Un;return Un<<=1,!(Un&4194240)&&(Un=64),e}function Zn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-zn(t),e[t]=n}function $n(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-zn(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function er(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-zn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var tr=0;function nr(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var rr,ir,ar,or,sr,cr=!1,lr=[],ur=null,dr=null,fr=null,pr=new Map,mr=new Map,hr=[],gr=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit`.split(` `);function _r(e,t){switch(e){case`focusin`:case`focusout`:ur=null;break;case`dragenter`:case`dragleave`:dr=null;break;case`mouseover`:case`mouseout`:fr=null;break;case`pointerover`:case`pointerout`:pr.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:mr.delete(t.pointerId)}}function vr(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=no(t),t!==null&&ir(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function yr(e,t,n,r,i){switch(t){case`focusin`:return ur=vr(ur,e,t,n,r,i),!0;case`dragenter`:return dr=vr(dr,e,t,n,r,i),!0;case`mouseover`:return fr=vr(fr,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return pr.set(a,vr(pr.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,mr.set(a,vr(mr.get(a)||null,e,t,n,r,i)),!0}return!1}function br(e){var t=to(e.target);if(t!==null){var n=yn(t);if(n!==null){if(t=n.tag,t===13){if(t=bn(n),t!==null){e.blockedOn=t,sr(e.priority,function(){ar(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Mr(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Yt=r,n.target.dispatchEvent(r),Yt=null}else return t=no(n),t!==null&&ir(t),e.blockedOn=n,!1;t.shift()}return!0}function Sr(e,t,n){xr(e)&&n.delete(t)}function Cr(){cr=!1,ur!==null&&xr(ur)&&(ur=null),dr!==null&&xr(dr)&&(dr=null),fr!==null&&xr(fr)&&(fr=null),pr.forEach(Sr),mr.forEach(Sr)}function wr(e,t){e.blockedOn===t&&(e.blockedOn=null,cr||(cr=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Cr)))}function Tr(e){function t(t){return wr(t,e)}if(0<lr.length){wr(lr[0],e);for(var n=1;n<lr.length;n++){var r=lr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ur!==null&&wr(ur,e),dr!==null&&wr(dr,e),fr!==null&&wr(fr,e),pr.forEach(t),mr.forEach(t),n=0;n<hr.length;n++)r=hr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<hr.length&&(n=hr[0],n.blockedOn===null);)br(n),n.blockedOn===null&&hr.shift()}var Er=Oe.ReactCurrentBatchConfig,Dr=!0;function Or(e,t,n,r){var i=tr,a=Er.transition;Er.transition=null;try{tr=1,Ar(e,t,n,r)}finally{tr=i,Er.transition=a}}function kr(e,t,n,r){var i=tr,a=Er.transition;Er.transition=null;try{tr=4,Ar(e,t,n,r)}finally{tr=i,Er.transition=a}}function Ar(e,t,n,r){if(Dr){var i=Mr(e,t,n,r);if(i===null)Da(e,t,r,jr,n),_r(e,r);else if(yr(i,e,t,n,r))r.stopPropagation();else if(_r(e,r),t&4&&-1<gr.indexOf(e)){for(;i!==null;){var a=no(i);if(a!==null&&rr(a),a=Mr(e,t,n,r),a===null&&Da(e,t,r,jr,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Da(e,t,r,null,n)}}var jr=null;function Mr(e,t,n,r){if(jr=null,e=Xt(r),e=to(e),e!==null){if(t=yn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=bn(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}return jr=e,null}function Nr(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`
vendor: 4,743 bytes, line 9
9:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(An()){case jn:return 1;case Mn:return 4;case Nn:case Pn:return 16;case Fn:return 536870912;default:return 16}default:return 16}}var Pr=null,Fr=null,Ir=null;function Lr(){if(Ir)return Ir;var e,t=Fr,n=t.length,r,i=`value`in Pr?Pr.value:Pr.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Ir=i.slice(e,1<r?1-r:void 0)}function Rr(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function zr(){return!0}function Br(){return!1}function Vr(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?zr:Br,this.isPropagationStopped=Br,this}return ut(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=zr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=zr)},persist:function(){},isPersistent:zr}),t}var Hr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ur=Vr(Hr),Wr=ut({},Hr,{view:0,detail:0}),Gr=Vr(Wr),Kr,qr,Jr,Yr=ut({},Wr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oi,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Jr&&(Jr&&e.type===`mousemove`?(Kr=e.screenX-Jr.screenX,qr=e.screenY-Jr.screenY):qr=Kr=0,Jr=e),Kr)},movementY:function(e){return`movementY`in e?e.movementY:qr}}),Xr=Vr(Yr),Zr=Vr(ut({},Yr,{dataTransfer:0})),Qr=Vr(ut({},Wr,{relatedTarget:0})),$r=Vr(ut({},Hr,{animationName:0,elapsedTime:0,pseudoElement:0})),ei=Vr(ut({},Hr,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),ti=Vr(ut({},Hr,{data:0})),ni={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},ri={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},ii={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function ai(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ii[e])?!!t[e]:!1}function oi(){return ai}var si=Vr(ut({},Wr,{key:function(e){if(e.key){var t=ni[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Rr(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?ri[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oi,charCode:function(e){return e.type===`keypress`?Rr(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Rr(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),ci=Vr(ut({},Yr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),li=Vr(ut({},Wr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oi}
vendor: 23,062 bytes, lines 9-10
9)),ui=Vr(ut({},Hr,{propertyName:0,elapsedTime:0,pseudoElement:0})),di=Vr(ut({},Yr,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),fi=[9,13,27,32],pi=u&&`CompositionEvent`in window,mi=null;u&&`documentMode`in document&&(mi=document.documentMode);var hi=u&&`TextEvent`in window&&!mi,gi=u&&(!pi||mi&&8<mi&&11>=mi),_i=` `,vi=!1;function yi(e,t){switch(e){case`keyup`:return fi.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function bi(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var xi=!1;function Si(e,t){switch(e){case`compositionend`:return bi(t);case`keypress`:return t.which===32?(vi=!0,_i):null;case`textInput`:return e=t.data,e===_i&&vi?null:e;default:return null}}function Ci(e,t){if(xi)return e===`compositionend`||!pi&&yi(e,t)?(e=Lr(),Ir=Fr=Pr=null,xi=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return gi&&t.locale!==`ko`?null:t.data;default:return null}}var wi={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ti(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!wi[e.type]:t===`textarea`}function Ei(e,t,n,r){tn(r),t=ka(t,`onChange`),0<t.length&&(n=new Ur(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Di=null,Oi=null;function ki(e){xa(e,0)}function Ai(e){if(St(ro(e)))return e}function ji(e,t){if(e===`change`)return t}var Mi=!1;if(u){var Ni;if(u){var Pi=`oninput`in document;if(!Pi){var Fi=document.createElement(`div`);Fi.setAttribute(`oninput`,`return;`),Pi=typeof Fi.oninput==`function`}Ni=Pi}else Ni=!1;Mi=Ni&&(!document.documentMode||9<document.documentMode)}function Ii(){Di&&(Di.detachEvent(`onpropertychange`,Li),Oi=Di=null)}function Li(e){if(e.propertyName===`value`&&Ai(Oi)){var t=[];Ei(t,Oi,e,Xt(e)),sn(ki,t)}}function Ri(e,t,n){e===`focusin`?(Ii(),Di=t,Oi=n,Di.attachEvent(`onpropertychange`,Li)):e===`focusout`&&Ii()}function zi(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Ai(Oi)}function Bi(e,t){if(e===`click`)return Ai(t)}function Vi(e,t){if(e===`input`||e===`change`)return Ai(t)}function Hi(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ui=typeof Object.is==`function`?Object.is:Hi;function Wi(e,t){if(Ui(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!K.call(t,i)||!Ui(e[i],t[i]))return!1}return!0}function Gi(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ki(e,t){var n=Gi(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Gi(n)}}function qi(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qi(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ji(){for(var e=window,t=Ct();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ct(e.document)}return t}function Yi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function Xi(e){var t=Ji(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&qi(n.ownerDocument.documentElement,n)){if(r!==null&&Yi(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Ki(n,a);var o=Ki(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Zi=u&&`documentMode`in document&&11>=document.documentMode,Qi=null,$i=null,ea=null,ta=!1;function na(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ta||Qi==null||Qi!==Ct(r)||(r=Qi,`selectionStart`in r&&Yi(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ea&&Wi(ea,r)||(ea=r,r=ka($i,`onSelect`),0<r.length&&(t=new Ur(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Qi)))}function ra(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ia={animationend:ra(`Animation`,`AnimationEnd`),animationiteration:ra(`Animation`,`AnimationIteration`),animationstart:ra(`Animation`,`AnimationStart`),transitionend:ra(`Transition`,`TransitionEnd`)},aa={},oa={};u&&(oa=document.createElement(`div`).style,`AnimationEvent`in window||(delete ia.animationend.animation,delete ia.animationiteration.animation,delete ia.animationstart.animation),`TransitionEvent`in window||delete ia.transitionend.transition);function sa(e){if(aa[e])return aa[e];if(!ia[e])return e;var t=ia[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in oa)return aa[e]=t[n];return e}var ca=sa(`animationend`),la=sa(`animationiteration`),ua=sa(`animationstart`),da=sa(`transitionend`),fa=new Map,pa=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function ma(e,t){fa.set(e,t),o(t,[e])}for(var ha=0;ha<pa.length;ha++){var ga=pa[ha];ma(ga.toLowerCase(),`on`+(ga[0].toUpperCase()+ga.slice(1)))}ma(ca,`onAnimationEnd`),ma(la,`onAnimationIteration`),ma(ua,`onAnimationStart`),ma(`dblclick`,`onDoubleClick`),ma(`focusin`,`onFocus`),ma(`focusout`,`onBlur`),ma(da,`onTransitionEnd`),c(`onMouseEnter`,[`mouseout`,`mouseover`]),c(`onMouseLeave`,[`mouseout`,`mouseover`]),c(`onPointerEnter`,[`pointerout`,`pointerover`]),c(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var va=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),ya=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(va));function ba(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,vn(r,t,void 0,e),e.currentTarget=null}function xa(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var c=r[o],u=c.instance,K=c.currentTarget;if(c=c.listener,u!==a&&i.isPropagationStopped())break a;ba(i,c,K),a=u}else for(o=0;o<r.length;o++){if(c=r[o],u=c.instance,K=c.currentTarget,c=c.listener,u!==a&&i.isPropagationStopped())break a;ba(i,c,K),a=u}}}if(mn)throw e=hn,mn=!1,hn=null,e}function Sa(e,t){var n=t[Qa];n===void 0&&(n=t[Qa]=new Set);var r=e+`__bubble`;n.has(r)||(Ea(t,e,2,!1),n.add(r))}function Ca(e,t,n){var r=0;t&&(r|=4),Ea(n,e,r,t)}var wa=`_reactListening`+Math.random().toString(36).slice(2);function Ta(e){if(!e[wa]){e[wa]=!0,i.forEach(function(t){t!==`selectionchange`&&(ya.has(t)||Ca(t,!1,e),Ca(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wa]||(t[wa]=!0,Ca(`selectionchange`,!1,t))}}function Ea(e,t,n,r){switch(Nr(t)){case 1:var i=Or;break;case 4:i=kr;break;default:i=Ar}n=i.bind(null,t,n,e),i=void 0,!ln||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Da(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i||c.nodeType===8&&c.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var u=o.tag;if((u===3||u===4)&&(u=o.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;o=o.return}for(;c!==null;){if(o=to(c),o===null)return;if(u=o.tag,u===5||u===6){r=a=o;continue a}c=c.parentNode}}r=r.return}sn(function(){var r=a,i=Xt(n),o=[];a:{var c=fa.get(e);if(c!==void 0){var u=Ur,K=e;switch(e){case`keypress`:if(Rr(n)===0)break a;case`keydown`:case`keyup`:u=si;break;case`focusin`:K=`focus`,u=Qr;break;case`focusout`:K=`blur`,u=Qr;break;case`beforeblur`:case`afterblur`:u=Qr;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:u=Xr;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:u=Zr;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:u=li;break;case ca:case la:case ua:u=$r;break;case da:u=ui;break;case`scroll`:u=Gr;break;case`wheel`:u=di;break;case`copy`:case`cut`:case`paste`:u=ei;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:u=ci}var Y=!!(t&4),X=!Y&&e===`scroll`,ee=Y?c===null?null:c+`Capture`:c;Y=[];for(var te=r,ce;te!==null;){ce=te;var ue=ce.stateNode;if(ce.tag===5&&ue!==null&&(ce=ue,ee!==null&&(ue=cn(te,ee),ue!=null&&Y.push(Oa(te,ue,ce)))),X)break;te=te.return}0<Y.length&&(c=new u(c,K,null,n,i),o.push({event:c,listeners:Y}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,u=e===`mouseout`||e===`pointerout`,c&&n!==Yt&&(K=n.relatedTarget||n.fromElement)&&(to(K)||K[Za]))break a;if((u||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,u?(K=n.relatedTarget||n.toElement,u=r,K=K?to(K):null,K!==null&&(X=yn(K),K!==X||K.tag!==5&&K.tag!==6)&&(K=null)):(u=null,K=r),u!==K)){if(Y=Xr,ue=`onMouseLeave`,ee=`onMouseEnter`,te=`mouse`,(e===`pointerout`||e===`pointerover`)&&(Y=ci,ue=`onPointerLeave`,ee=`onPointerEnter`,te=`pointer`),X=u==null?c:ro(u),ce=K==null?c:ro(K),c=new Y(ue,te+`leave`,u,n,i),c.target=X,c.relatedTarget=ce,ue=null,to(i)===r&&(Y=new Y(ee,te+`enter`,K,n,i),Y.target=ce,Y.relatedTarget=X,ue=Y),X=ue,u&&K)b:{for(Y=u,ee=K,te=0,ce=Y;ce;ce=Aa(ce))te++;for(ce=0,ue=ee;ue;ue=Aa(ue))ce++;for(;0<te-ce;)Y=Aa(Y),te--;for(;0<ce-te;)ee=Aa(ee),ce--;for(;te--;){if(Y===ee||ee!==null&&Y===ee.alternate)break b;Y=Aa(Y),ee=Aa(ee)}Y=null}else Y=null;u!==null&&ja(o,c,u,Y,!1),K!==null&&X!==null&&ja(o,X,K,Y,!0)}}a:{if(c=r?ro(r):window,u=c.nodeName&&c.nodeName.toLowerCase(),u===`select`||u===`input`&&c.type===`file`)var de=ji;else if(Ti(c)){if(Mi)de=Vi;else{de=zi;var fe=Ri}}else(u=c.nodeName)&&u.toLowerCase()===`input`&&(c.type===`checkbox`||c.type===`radio`)&&(de=Bi);if(de&&=de(e,r)){Ei(o,de,n,i);break a}fe&&fe(e,c,r),e===`focusout`&&(fe=c._wrapperState)&&fe.controlled&&c.type===`number`&&kt(c,`number`,c.value)}switch(fe=r?ro(r):window,e){case`focusin`:(Ti(fe)||fe.contentEditable===`true`)&&(Qi=fe,$i=r,ea=null);break;case`focusout`:ea=$i=Qi=null;break;case`mousedown`:ta=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ta=!1,na(o,n,i);break;case`selectionchange`:if(Zi)break;case`keydown`:case`keyup`:na(o,n,i)}var me;if(pi)b:{switch(e){case`compositionstart`:var ge=`onCompositionStart`;break b;case`compositionend`:ge=`onCompositionEnd`;break b;case`compositionupdate`:ge=`onCompositionUpdate`;break b}ge=void 0}else xi?yi(e,n)&&(ge=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(ge=`onCompositionStart`);ge&&(gi&&n.locale!==`ko`&&(xi||ge!==`onCompositionStart`?ge===`onCompositionEnd`&&xi&&(me=Lr()):(Pr=i,Fr=`value`in Pr?Pr.value:Pr.textContent,xi=!0)),fe=ka(r,ge),0<fe.length&&(ge=new ti(ge,e,null,n,i),o.push({event:ge,listeners:fe}),me?ge.data=me:(me=bi(n),me!==null&&(ge.data=me)))),(me=hi?Si(e,n):Ci(e,n))&&(r=ka(r,`onBeforeInput`),0<r.length&&(i=new ti(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=me))}xa(o,t)})}function Oa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ka(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=cn(e,n),a!=null&&r.unshift(Oa(e,a,i)),a=cn(e,t),a!=null&&r.push(Oa(e,a,i))),e=e.return}return r}function Aa(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ja(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var c=n,u=c.alternate,K=c.stateNode;if(u!==null&&u===r)break;c.tag===5&&K!==null&&(c=K,i?(u=cn(n,a),u!=null&&o.unshift(Oa(n,u,c))):i||(u=cn(n,a),u!=null&&o.push(Oa(n,u,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ma=/\r\n?/g,Na=/\u0000|\uFFFD/g;function Pa(e){return(typeof e==`string`?e:``+e).replace(Ma,`
10`).replace(Na,``)}function Fa(e,t,n){if(t=Pa(t),Pa(e)!==t&&n)throw Error(r(425))}function Ia(){}var La=null,Ra=null;function za(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ba=typeof setTimeout==`function`?setTimeout:void 0,Va=typeof clearTimeout==`function`?clearTimeout:void 0,Ha=typeof Promise==`function`?Promise:void 0,Ua=typeof queueMicrotask==`function`?queueMicrotask:Ha===void 0?Ba:function(e){return Ha.resolve(null).then(e).catch(Wa)};function Wa(e){setTimeout(function(){throw e})}function Ga(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),Tr(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++}n=i}while(n);Tr(t)}function Ka(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function qa(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var Ja=Math.random().toString(36).slice(2),Ya=`__reactFiber$`+Ja,Xa=`__reactProps$`+Ja,Za=`__reactContainer$`+Ja,Qa=`__reactEvents$`+Ja,$a=`__reactListeners$`+Ja,eo=`__reactHandles$`+Ja;function to(e){var t=e[Ya];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Za]||n[Ya]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=qa(e);e!==null;){if(n=e[Ya])return n;e=qa(e)}return t}e=n,n=e.parentNode}return null}function no(e){return e=e[Ya]||e[Za],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ro(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function io(e){return e[Xa]||null}var ao=[],oo=-1;function so(e){return{current:e}}function co(e){0>oo||(e.current=ao[oo],ao[oo]=null,oo--)}function lo(e,t){oo++,ao[oo]=e.current,e.current=t}var uo={},fo=so(uo),po=so(!1),mo=uo;function ho(e,t){var n=e.type.contextTypes;if(!n)return uo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function go(e){return e=e.childContextTypes,e!=null}function _o(){co(po),co(fo)}function vo(e,t,n){if(fo.current!==uo)throw Error(r(168));lo(fo,t),lo(po,n)}function yo(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,_t(e)||`Unknown`,a));return ut({},n,i)}function bo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||uo,mo=fo.current,lo(fo,e),lo(po,po.current),!0}function xo(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=yo(e,t,mo),i.__reactInternalMemoizedMergedChildContext=e,co(po),co(fo),lo(fo,e)):co(po),lo(po,n)}var So=null,Co=!1,wo=!1;function To(e){So===null?So=[e]:So.push(e)}function Eo(e){Co=!0,To(e)}function Do(){if(!wo&&So!==null){wo=!0;var e=0,t=tr;try{var n=So;for(tr=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}So=null,Co=!1}catch(t){throw So!==null&&(So=So.slice(e+1)),Tn(jn,Do),t}finally{tr=t,wo=!1}}return null}var Oo=[],ko=0,Ao=null,jo=0,Mo=[],No=0,Po=null,Fo=1,Io=``;function Lo(e,t){Oo[ko++]=jo,Oo[ko++]=Ao,Ao=e,jo=t}function Ro(e,t,n){Mo[No++]=Fo,Mo[No++]=Io,Mo[No++]=Po,Po=e;var r=Fo;e=Io;var i=32-zn(r)-1;r&=~(1<<i),n+=1;var a=32-zn(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Fo=1<<32-zn(t)+i|n<<i|r,Io=a+e}else Fo=1<<a|n<<i|r,Io=e}function zo(e){e.return!==null&&(Lo(e,1),Ro(e,1,0))}function Bo(e){for(;e===Ao;)Ao=Oo[--ko],Oo[ko]=null,jo=Oo[--ko],Oo[ko]=null;for(;e===Po;)Po=Mo[--No],Mo[No]=null,Io=Mo[--No],Mo[No]=null,Fo=Mo[--No],Mo[No]=null}var Vo=null,Ho=null,Uo=!1,Wo=null;function Go(e,t){var n=bd(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ko(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null&&(e.stateNode=t,Vo=e,Ho=Ka(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t!==null&&(e.stateNode=t,Vo=e,Ho=null,!0);case 13:return t=t.nodeType===8?t:null,t!==null&&(n=Po===null?null:{id:Fo,overflow:Io},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=bd(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Vo=e,Ho=null,!0);default:return!1}}function qo(e){return!!(e.mode&1)&&!(e.flags&128)}function Jo(e){if(Uo){var t=Ho;if(t){var n=t;if(!Ko(e,t)){if(qo(e))throw Error(r(418));t=Ka(n.nextSibling);var i=Vo;t&&Ko(e,t)?Go(i,n):(e.flags=e.flags&-4097|2,Uo=!1,Vo=e)}}else{if(qo(e))throw Error(r(418));e.flags=e.flags&-4097|2,Uo=!1,Vo=e}}}function Yo(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Vo=e}function Xo(e){if(e!==Vo)return!1;if(!Uo)return Yo(e),Uo=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!za(e.type,e.memoizedProps)),t&&=Ho){if(qo(e))throw Zo(),Error(r(418));for(;t;)Go(e,t),t=Ka(t.nextSibling)}if(Yo(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Ho=Ka(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Ho=null}}else Ho=Vo?Ka(e.stateNode.nextSibling):null;return!0}function Zo(){for(var e=Ho;e;)e=Ka(e.nextSibling)}function Qo(){Ho=Vo=null,Uo=!1}function $o(e){Wo===null?Wo=[e]:Wo.push(e)}var es=Oe.ReactCurrentBatchConfig;function ts(e,t){if(e&&e.defaultProps){for(var n in t=ut({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var ns=so(null),rs=null,is=null,as=null;function os(){as=is=rs=null}function ss(e){var t=ns.current;co(ns),e._currentValue=t}function cs(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ls(e,t){rs=e,as=is=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(il=!0),e.firstContext=null)}function us(e){var t=e._currentValue;if(as!==e){if(e={context:e,memoizedValue:t,next:null},is===null){if(rs===null)throw Error(r(308));is=e,rs.dependencies={lanes:0,firstContext:e}}else is=is.next=e}return t}var ds=null;function fs(e){ds===null?ds=[e]:ds.push(e)}function ps(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,fs(t)):(n.next=i.next,i.next=n),t.interleaved=n,ms(e,r)}function ms(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var hs=!1;function gs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _s(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function vs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ys(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,mu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ms(e,n)}return i=r.interleaved,i===null?(t.next=t,fs(r)):(t.next=i.next,i.next=t),r.interleaved=t,ms(e,n)}function bs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,er(e,n)}}function xs(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ss(e,t,n,r){var i=e.updateQueue;hs=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,c=i.shared.pending;if(c!==null){i.shared.pending=null;var u=c,K=u.next;u.next=null,o===null?a=K:o.next=K,o=u;var Y=e.alternate;
vendor: 6,102 bytes, line 10
10Y!==null&&(Y=Y.updateQueue,c=Y.lastBaseUpdate,c!==o&&(c===null?Y.firstBaseUpdate=K:c.next=K,Y.lastBaseUpdate=u))}if(a!==null){var X=i.baseState;o=0,Y=K=u=null,c=a;do{var ee=c.lane,te=c.eventTime;if((r&ee)===ee){Y!==null&&(Y=Y.next={eventTime:te,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});a:{var ce=e,ue=c;switch(ee=t,te=n,ue.tag){case 1:if(ce=ue.payload,typeof ce==`function`){X=ce.call(te,X,ee);break a}X=ce;break a;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=ue.payload,ee=typeof ce==`function`?ce.call(te,X,ee):ce,ee==null)break a;X=ut({},X,ee);break a;case 2:hs=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,ee=i.effects,ee===null?i.effects=[c]:ee.push(c))}else te={eventTime:te,lane:ee,tag:c.tag,payload:c.payload,callback:c.callback,next:null},Y===null?(K=Y=te,u=X):Y=Y.next=te,o|=ee;if(c=c.next,c===null){if(c=i.shared.pending,c===null)break;ee=c,c=ee.next,ee.next=null,i.lastBaseUpdate=ee,i.shared.pending=null}}while(1);if(Y===null&&(u=X),i.baseState=u,i.firstBaseUpdate=K,i.lastBaseUpdate=Y,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Su|=o,e.lanes=o,e.memoizedState=X}}function Cs(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var ws=new t.Component().refs;function Ts(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ut({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Es={isMounted:function(e){return(e=e._reactInternals)?yn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Bu(),i=Vu(e),a=vs(r,i);a.payload=t,n!=null&&(a.callback=n),t=ys(e,a,i),t!==null&&(Hu(t,e,i,r),bs(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Bu(),i=Vu(e),a=vs(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=ys(e,a,i),t!==null&&(Hu(t,e,i,r),bs(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Bu(),r=Vu(e),i=vs(n,r);i.tag=2,t!=null&&(i.callback=t),t=ys(e,i,r),t!==null&&(Hu(t,e,r,n),bs(t,e,r))}};function Ds(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Wi(n,r)||!Wi(i,a):!0}function Os(e,t,n){var r=!1,i=uo,a=t.contextType;return typeof a==`object`&&a?a=us(a):(i=go(t)?mo:fo.current,r=t.contextTypes,a=(r=r!=null)?ho(e,i):uo),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Es,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function ks(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Es.enqueueReplaceState(t,t.state,null)}function As(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=ws,gs(e);var a=t.contextType;typeof a==`object`&&a?i.context=us(a):(a=go(t)?mo:fo.current,i.context=ho(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(Ts(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&Es.enqueueReplaceState(i,i.state,null),Ss(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function js(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;t===ws&&(t=a.refs={}),e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Ms(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Ns(e){var t=e._init;return t(e._payload)}function Ps(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=Cd(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function c(t){return e&&t.alternate===null&&(t.flags|=2),t}function u(e,t,n,r){return t===null||t.tag!==6?(t=Dd(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function K(e,t,n,r){var i=n.type;return i===qe?X(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ot&&Ns(i)===t.type)?(r=a(t,n.props),r.ref=js(e,t,n),r.return=e,r):(r=wd(n.type,n.key,n.props,null,e.mode,r),r.ref=js(e,t,n),r.return=e,r)}function Y(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Od(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function X(e,t,n,r,i){return t===null||t.tag!==7?(t=Td(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function ee(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=Dd(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case Ae:return n=wd(t.type,t.key,t.props,null,e.mode,n),n.ref=js(e,null,t),n.return=e,n;case ze:return t=Od(t,e.mode,n),t.return=e,t;case ot:var r=t._init;return ee(e,r(t._payload),n)}if(At(t)||lt(t))return t=Td(t,e.mode,n,null),t.return=e,t;Ms(e,t)}return null}function te(e,t,n,r){var i=t===null?null:t.key;
vendor: 26,501 bytes, lines 10-12
10if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?u(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case Ae:return n.key===i?K(e,t,n,r):null;case ze:return n.key===i?Y(e,t,n,r):null;case ot:return i=n._init,te(e,t,i(n._payload),r)}if(At(n)||lt(n))return i===null?X(e,t,n,r,null):null;Ms(e,n)}return null}function ce(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,u(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case Ae:return e=e.get(r.key===null?n:r.key)||null,K(t,e,r,i);case ze:return e=e.get(r.key===null?n:r.key)||null,Y(t,e,r,i);case ot:var a=r._init;return ce(e,t,n,a(r._payload),i)}if(At(r)||lt(r))return e=e.get(n)||null,X(t,e,r,i,null);Ms(t,r)}return null}function ue(r,a,c,u){for(var K=null,Y=null,X=a,ue=a=0,de=null;X!==null&&ue<c.length;ue++){X.index>ue?(de=X,X=null):de=X.sibling;var fe=te(r,X,c[ue],u);if(fe===null){X===null&&(X=de);break}e&&X&&fe.alternate===null&&t(r,X),a=o(fe,a,ue),Y===null?K=fe:Y.sibling=fe,Y=fe,X=de}if(ue===c.length)return n(r,X),Uo&&Lo(r,ue),K;if(X===null){for(;ue<c.length;ue++)X=ee(r,c[ue],u),X!==null&&(a=o(X,a,ue),Y===null?K=X:Y.sibling=X,Y=X);return Uo&&Lo(r,ue),K}for(X=i(r,X);ue<c.length;ue++)de=ce(X,r,ue,c[ue],u),de!==null&&(e&&de.alternate!==null&&X.delete(de.key===null?ue:de.key),a=o(de,a,ue),Y===null?K=de:Y.sibling=de,Y=de);return e&&X.forEach(function(e){return t(r,e)}),Uo&&Lo(r,ue),K}function de(a,c,u,K){var Y=lt(u);if(typeof Y!=`function`)throw Error(r(150));if(u=Y.call(u),u==null)throw Error(r(151));for(var X=Y=null,ue=c,de=c=0,fe=null,me=u.next();ue!==null&&!me.done;de++,me=u.next()){ue.index>de?(fe=ue,ue=null):fe=ue.sibling;var ge=te(a,ue,me.value,K);if(ge===null){ue===null&&(ue=fe);break}e&&ue&&ge.alternate===null&&t(a,ue),c=o(ge,c,de),X===null?Y=ge:X.sibling=ge,X=ge,ue=fe}if(me.done)return n(a,ue),Uo&&Lo(a,de),Y;if(ue===null){for(;!me.done;de++,me=u.next())me=ee(a,me.value,K),me!==null&&(c=o(me,c,de),X===null?Y=me:X.sibling=me,X=me);return Uo&&Lo(a,de),Y}for(ue=i(a,ue);!me.done;de++,me=u.next())me=ce(ue,a,de,me.value,K),me!==null&&(e&&me.alternate!==null&&ue.delete(me.key===null?de:me.key),c=o(me,c,de),X===null?Y=me:X.sibling=me,X=me);return e&&ue.forEach(function(e){return t(a,e)}),Uo&&Lo(a,de),Y}function fe(e,r,i,o){if(typeof i==`object`&&i&&i.type===qe&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case Ae:a:{for(var u=i.key,K=r;K!==null;){if(K.key===u){if(u=i.type,u===qe){if(K.tag===7){n(e,K.sibling),r=a(K,i.props.children),r.return=e,e=r;break a}}else if(K.elementType===u||typeof u==`object`&&u&&u.$$typeof===ot&&Ns(u)===K.type){n(e,K.sibling),r=a(K,i.props),r.ref=js(e,K,i),r.return=e,e=r;break a}n(e,K);break}t(e,K),K=K.sibling}i.type===qe?(r=Td(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=wd(i.type,i.key,i.props,null,e.mode,o),o.ref=js(e,r,i),o.return=e,e=o)}return c(e);case ze:a:{for(K=i.key;r!==null;){if(r.key===K){if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}n(e,r);break}t(e,r),r=r.sibling}r=Od(i,e.mode,o),r.return=e,e=r}return c(e);case ot:return K=i._init,fe(e,r,K(i._payload),o)}if(At(i))return ue(e,r,i,o);if(lt(i))return de(e,r,i,o);Ms(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=Dd(i,e.mode,o),r.return=e,e=r),c(e)):n(e,r)}return fe}var Fs=Ps(!0),Is=Ps(!1),Ls={},Rs=so(Ls),zs=so(Ls),Bs=so(Ls);function Vs(e){if(e===Ls)throw Error(r(174));return e}function Hs(e,t){switch(lo(Bs,t),lo(zs,e),lo(Rs,Ls),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Rt(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Rt(t,e)}co(Rs),lo(Rs,t)}function Us(){co(Rs),co(zs),co(Bs)}function Ws(e){Vs(Bs.current);var t=Vs(Rs.current),n=Rt(t,e.type);t!==n&&(lo(zs,e),lo(Rs,n))}function Gs(e){zs.current===e&&(co(Rs),co(zs))}var Ks=so(0);function qs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Js=[];function Ys(){for(var e=0;e<Js.length;e++)Js[e]._workInProgressVersionPrimary=null;Js.length=0}var Xs=Oe.ReactCurrentDispatcher,Zs=Oe.ReactCurrentBatchConfig,Qs=0,$s=null,ec=null,tc=null,nc=!1,rc=!1,ic=0,ac=0;function oc(){throw Error(r(321))}function sc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ui(e[n],t[n]))return!1;return!0}function cc(e,t,n,i,a,o){if(Qs=o,$s=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xs.current=e===null||e.memoizedState===null?Gc:Kc,e=n(i,a),rc){o=0;do{if(rc=!1,ic=0,25<=o)throw Error(r(301));o+=1,tc=ec=null,t.updateQueue=null,Xs.current=qc,e=n(i,a)}while(rc)}if(Xs.current=Wc,t=ec!==null&&ec.next!==null,Qs=0,tc=ec=$s=null,nc=!1,t)throw Error(r(300));return e}function lc(){var e=ic!==0;return ic=0,e}function uc(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tc===null?$s.memoizedState=tc=e:tc=tc.next=e,tc}function dc(){if(ec===null){var e=$s.alternate;e=e===null?null:e.memoizedState}else e=ec.next;var t=tc===null?$s.memoizedState:tc.next;if(t!==null)tc=t,ec=e;else{if(e===null)throw Error(r(310));ec=e,e={memoizedState:ec.memoizedState,baseState:ec.baseState,baseQueue:ec.baseQueue,queue:ec.queue,next:null},tc===null?$s.memoizedState=tc=e:tc=tc.next=e}return tc}function fc(e,t){return typeof t==`function`?t(e):t}function pc(e){var t=dc(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=ec,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var c=a.next;a.next=o.next,o.next=c}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var u=c=null,K=null,Y=o;do{var X=Y.lane;if((Qs&X)===X)K!==null&&(K=K.next={lane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),i=Y.hasEagerState?Y.eagerState:e(i,Y.action);else{var ee={lane:X,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};K===null?(u=K=ee,c=i):K=K.next=ee,$s.lanes|=X,Su|=X}Y=Y.next}while(Y!==null&&Y!==o);K===null?c=i:K.next=u,Ui(i,t.memoizedState)||(il=!0),t.memoizedState=i,t.baseState=c,t.baseQueue=K,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,$s.lanes|=o,Su|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function mc(e){var t=dc(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var c=a=a.next;do o=e(o,c.action),c=c.next;while(c!==a);Ui(o,t.memoizedState)||(il=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function hc(){}function gc(e,t){var n=$s,i=dc(),a=t(),o=!Ui(i.memoizedState,a);if(o&&(i.memoizedState=a,il=!0),i=i.queue,Oc(yc.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||tc!==null&&tc.memoizedState.tag&1){if(n.flags|=2048,Cc(9,vc.bind(null,n,i,a,t),void 0,null),hu===null)throw Error(r(349));Qs&30||_c(n,t,a)}return a}function _c(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=$s.updateQueue,t===null?(t={lastEffect:null,stores:null},$s.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function vc(e,t,n,r){t.value=n,t.getSnapshot=r,bc(t)&&xc(e)}function yc(e,t,n){return n(function(){bc(t)&&xc(e)})}function bc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ui(e,n)}catch{return!0}}function xc(e){var t=ms(e,1);t!==null&&Hu(t,e,1,-1)}function Sc(e){var t=uc();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:fc,lastRenderedState:e},t.queue=e,e=e.dispatch=Bc.bind(null,$s,e),[t.memoizedState,e]}function Cc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=$s.updateQueue,t===null?(t={lastEffect:null,stores:null},$s.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function wc(){return dc().memoizedState}function Tc(e,t,n,r){var i=uc();$s.flags|=e,i.memoizedState=Cc(1|t,n,void 0,r===void 0?null:r)}function Ec(e,t,n,r){var i=dc();r=r===void 0?null:r;var a=void 0;if(ec!==null){var o=ec.memoizedState;if(a=o.destroy,r!==null&&sc(r,o.deps)){i.memoizedState=Cc(t,n,a,r);return}}$s.flags|=e,i.memoizedState=Cc(1|t,n,a,r)}function Dc(e,t){return Tc(8390656,8,e,t)}function Oc(e,t){return Ec(2048,8,e,t)}function kc(e,t){return Ec(4,2,e,t)}function Ac(e,t){return Ec(4,4,e,t)}function jc(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Mc(e,t,n){return n=n==null?null:n.concat([e]),Ec(4,4,jc.bind(null,t,e),n)}function Nc(){}function Pc(e,t){var n=dc();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&sc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Fc(e,t){var n=dc();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&sc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ic(e,t,n){return Qs&21?(Ui(n,t)||(n=Xn(),$s.lanes|=n,Su|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,il=!0),e.memoizedState=n)}function Lc(e,t){var n=tr;tr=n!==0&&4>n?n:4,e(!0);var r=Zs.transition;Zs.transition={};try{e(!1),t()}finally{tr=n,Zs.transition=r}}function Rc(){return dc().memoizedState}function zc(e,t,n){var r=Vu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Vc(e))Hc(t,n);else if(n=ps(e,t,n,r),n!==null){var i=Bu();Hu(n,e,r,i),Uc(n,t,r)}}function Bc(e,t,n){var r=Vu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vc(e))Hc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,c=a(o,n);if(i.hasEagerState=!0,i.eagerState=c,Ui(c,o)){var u=t.interleaved;u===null?(i.next=i,fs(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}n=ps(e,t,i,r),n!==null&&(i=Bu(),Hu(n,e,r,i),Uc(n,t,r))}}function Vc(e){var t=e.alternate;return e===$s||t!==null&&t===$s}function Hc(e,t){rc=nc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Uc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,er(e,n)}}var Wc={readContext:us,useCallback:oc,useContext:oc,useEffect:oc,useImperativeHandle:oc,useInsertionEffect:oc,useLayoutEffect:oc,useMemo:oc,useReducer:oc,useRef:oc,useState:oc,useDebugValue:oc,useDeferredValue:oc,useTransition:oc,useMutableSource:oc,useSyncExternalStore:oc,useId:oc,unstable_isNewReconciler:!1},Gc={readContext:us,useCallback:function(e,t){return uc().memoizedState=[e,t===void 0?null:t],e},useContext:us,useEffect:Dc,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),Tc(4194308,4,jc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Tc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Tc(4,2,e,t)},useMemo:function(e,t){var n=uc();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=uc();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zc.bind(null,$s,e),[r.memoizedState,e]},useRef:function(e){var t=uc();return e={current:e},t.memoizedState=e},useState:Sc,useDebugValue:Nc,useDeferredValue:function(e){return uc().memoizedState=e},useTransition:function(){var e=Sc(!1),t=e[0];return e=Lc.bind(null,e[1]),uc().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=$s,a=uc();if(Uo){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),hu===null)throw Error(r(349));Qs&30||_c(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Dc(yc.bind(null,i,o,e),[e]),i.flags|=2048,Cc(9,vc.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=uc(),t=hu.identifierPrefix;if(Uo){var n=Io,r=Fo;n=(r&~(1<<32-zn(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=ic++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=ac++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},Kc={readContext:us,useCallback:Pc,useContext:us,useEffect:Oc,useImperativeHandle:Mc,useInsertionEffect:kc,useLayoutEffect:Ac,useMemo:Fc,useReducer:pc,useRef:wc,useState:function(){return pc(fc)},useDebugValue:Nc,useDeferredValue:function(e){return Ic(dc(),ec.memoizedState,e)},useTransition:function(){return[pc(fc)[0],dc().memoizedState]},useMutableSource:hc,useSyncExternalStore:gc,useId:Rc,unstable_isNewReconciler:!1},qc={readContext:us,useCallback:Pc,useContext:us,useEffect:Oc,useImperativeHandle:Mc,useInsertionEffect:kc,useLayoutEffect:Ac,useMemo:Fc,useReducer:mc,useRef:wc,useState:function(){return mc(fc)},useDebugValue:Nc,useDeferredValue:function(e){var t=dc();return ec===null?t.memoizedState=e:Ic(t,ec.memoizedState,e)},useTransition:function(){return[mc(fc)[0],dc().memoizedState]},useMutableSource:hc,useSyncExternalStore:gc,useId:Rc,unstable_isNewReconciler:!1};function Jc(e,t){try{var n=``,r=t;do n+=ht(r),r=r.return;while(r);var i=n}catch(e){i=`
11Error generating stack: `+e.message+`
12`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Yc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Xc(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Zc=typeof WeakMap==`function`?WeakMap:Map;function Qc(e,t,n){n=vs(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Au||(Au=!0,ju=r),Xc(e,t)},n}function $c(e,t,n){n=vs(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Xc(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Xc(e,t),typeof r!=`function`&&(Mu===null?Mu=new Set([this]):Mu.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function el(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Zc;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=pd.bind(null,e,t,n),t.then(e,e))}function tl(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null||t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function nl(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=vs(-1,1),t.tag=2,ys(n,t,1))),n.lanes|=1),e)}var rl=Oe.ReactCurrentOwner,il=!1;function al(e,t,n,r){t.child=e===null?Is(t,null,n,r):Fs(t,e.child,n,r)}function ol(e,t,n,r,i){n=n.render;var a=t.ref;return ls(t,i),r=cc(e,t,n,r,a,i),n=lc(),e!==null&&!il?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,El(e,t,i)):(Uo&&n&&zo(t),t.flags|=1,al(e,t,r,i),t.child)}function sl(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!xd(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,cl(e,t,a,r,i)):(e=wd(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Wi:n,n(o,r)&&e.ref===t.ref)return El(e,t,i)}return t.flags|=1,e=Cd(a,r),e.ref=t.ref,e.return=t,t.child=e}function cl(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Wi(a,r)&&e.ref===t.ref){if(il=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(il=!0);else return t.lanes=e.lanes,El(e,t,i)}}return dl(e,t,n,r,i)}function ll(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`){if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},lo(yu,vu),vu|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,lo(yu,vu),vu|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,lo(yu,vu),vu|=r}}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),lo(yu,vu),vu|=r;return al(e,t,i,n),t.child}function ul(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function dl(e,t,n,r,i){var a=go(n)?mo:fo.current;return a=ho(t,a),ls(t,i),n=cc(e,t,n,r,a,i),r=lc(),e!==null&&!il?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,El(e,t,i)):(Uo&&r&&zo(t),t.flags|=1,al(e,t,n,i),t.child)}function fl(e,t,n,r,i){if(go(n)){var a=!0;bo(t)}else a=!1;if(ls(t,i),t.stateNode===null)Tl(e,t),Os(t,n,r),As(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,c=t.memoizedProps;o.props=c;var u=o.context,K=n.contextType;typeof K==`object`&&K?K=us(K):(K=go(n)?mo:fo.current,K=ho(t,K));var Y=n.getDerivedStateFromProps,X=typeof Y==`function`||typeof o.getSnapshotBeforeUpdate==`function`;X||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(c!==r||u!==K)&&ks(t,o,r,K),hs=!1;var ee=t.memoizedState;o.state=ee,Ss(t,r,o,i),u=t.memoizedState,c!==r||ee!==u||po.current||hs?(typeof Y==`function`&&(Ts(t,n,Y,r),u=t.memoizedState),(c=hs||Ds(t,n,c,r,ee,u,K))?(X||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=K,r=c):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,_s(e,t),c=t.memoizedProps,K=t.type===t.elementType?c:ts(t.type,c),o.props=K,X=t.pendingProps,ee=o.context,u=n.contextType,typeof u==`object`&&u?u=us(u):(u=go(n)?mo:fo.current,u=ho(t,u));var te=n.getDerivedStateFromProps;(Y=typeof te==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(c!==X||ee!==u)&&ks(t,o,r,u),hs=!1,ee=t.memoizedState,o.state=ee,Ss(t,r,o,i);var ce=t.memoizedState;c!==X||ee!==ce||po.current||hs?(typeof te==`function`&&(Ts(t,n,te,r),ce=t.memoizedState),(K=hs||Ds(t,n,K,r,ee,ce,u)||!1)?(Y||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,ce,u),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,ce,u)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||c===e.memoizedProps&&ee===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||c===e.memoizedProps&&ee===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=ce),o.props=r,o.state=ce,o.context=u,r=K):(typeof o.componentDidUpdate!=`function`||c===e.memoizedProps&&ee===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||c===e.memoizedProps&&ee===e.memoizedState||(t.flags|=1024),r=!1)}return pl(e,t,n,r,a,i)}function pl(e,t,n,r,i,a){ul(e,t);var o=!!(t.flags&128);if(!r&&!o)return i&&xo(t,n,!1),El(e,t,a);r=t.stateNode,rl.current=t;var c=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Fs(t,e.child,null,a),t.child=Fs(t,null,c,a)):al(e,t,c,a),t.memoizedState=r.state,i&&xo(t,n,!0),t.child}function ml(e){var t=e.stateNode;t.pendingContext?vo(e,t.pendingContext,t.pendingContext!==t.context):t.context&&vo(e,t.context,!1),Hs(e,t.containerInfo)}function hl(e,t,n,r,i){return Qo(),$o(i),t.flags|=256,al(e,t,n,r),t.child}var gl={dehydrated:null,treeContext:null,retryLane:0};function _l(e){return{baseLanes:e,cachePool:null,transitions:null}}function vl(e,t,n){var r=t.pendingProps,i=Ks.current,a=!1,o=!!(t.flags&128),c;if((c=o)||(c=e!==null&&e.memoizedState===null?!1:!!(i&2)),c?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),lo(Ks,i&1),e===null)return Jo(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.lanes=t.mode&1?e.data===`$!`?8:1073741824:1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Ed(o,r,0,null),e=Td(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=_l(n),t.memoizedState=gl,e):yl(t,o));if(i=e.memoizedState,i!==null&&(c=i.dehydrated,c!==null))return xl(e,t,o,r,c,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,c=i.sibling;var u={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Cd(i,u),r.subtreeFlags=i.subtreeFlags&14680064),c===null?(a=Td(a,o,n,null),a.flags|=2):a=Cd(c,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?_l(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=gl,r}return a=e.child,e=a.sibling,r=Cd(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function yl(e,t){return t=Ed({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function bl(e,t,n,r){return r!==null&&$o(r),Fs(t,e.child,null,n),e=yl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xl(e,t,n,i,a,o,c){if(n)return t.flags&256?(t.flags&=-257,i=Yc(Error(r(422))),bl(e,t,c,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=Ed({mode:`visible`,children:i.children},a,0,null),o=Td(o,a,c,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Fs(t,e.child,null,c),t.child.memoizedState=_l(c),t.memoizedState=gl,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return bl(e,t,c,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var u=i.dgst;return i=u,o=Error(r(419)),i=Yc(o,i,void 0),bl(e,t,c,i)}if(u=(c&e.childLanes)!==0,il||u){if(i=hu,i!==null){switch(c&-c){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|c))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,ms(e,a),Hu(i,e,a,-1))}return nd(),i=Yc(Error(r(421))),bl(e,t,c,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=hd.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Ho=Ka(a.nextSibling),Vo=t,Uo=!0,Wo=null,e!==null&&(Mo[No++]=Fo,Mo[No++]=Io,Mo[No++]=Po,Fo=e.id,Io=e.overflow,Po=t),t=yl(t,i.children),t.flags|=4096,t)}function Sl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),cs(e.return,t,n)}function Cl(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function wl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(al(e,t,r.children,n),r=Ks.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sl(e,n,t);else if(e.tag===19)Sl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(lo(Ks,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&qs(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cl(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&qs(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cl(t,!0,n,null,a);break;case`together`:Cl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Tl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function El(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Su|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=Cd(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Cd(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Dl(e,t,n){switch(t.tag){case 3:ml(t),Qo();break;case 5:Ws(t);break;case 1:go(t.type)&&bo(t);break;case 4:Hs(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;lo(ns,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(lo(Ks,Ks.current&1),e=El(e,t,n),e===null?null:e.sibling):vl(e,t,n):(lo(Ks,Ks.current&1),t.flags|=128,null);lo(Ks,Ks.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return wl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),lo(Ks,Ks.current),r)break;return null;case 22:case 23:return t.lanes=0,ll(e,t,n)}return El(e,t,n)}var Ol=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},kl=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Vs(Rs.current);var o=null;switch(n){case`input`:i=wt(e,i),r=wt(e,r),o=[];break;case`select`:i=ut({},i,{value:void 0}),r=ut({},r,{value:void 0}),o=[];break;case`textarea`:i=Mt(e,i),r=Mt(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Ia)}qt(n,r);var c;for(Y in n=null,i)if(!r.hasOwnProperty(Y)&&i.hasOwnProperty(Y)&&i[Y]!=null){if(Y===`style`){var u=i[Y];for(c in u)u.hasOwnProperty(c)&&(n||={},n[c]=``)}else Y!==`dangerouslySetInnerHTML`&&Y!==`children`&&Y!==`suppressContentEditableWarning`&&Y!==`
12suppressHydrationWarning`&&Y!==`autoFocus`&&(a.hasOwnProperty(Y)?o||=[]:(o||=[]).push(Y,null))}for(Y in r){var K=r[Y];if(u=i?.[Y],r.hasOwnProperty(Y)&&K!==u&&(K!=null||u!=null)){if(Y===`style`){if(u){for(c in u)!u.hasOwnProperty(c)||K&&K.hasOwnProperty(c)||(n||={},n[c]=``);for(c in K)K.hasOwnProperty(c)&&u[c]!==K[c]&&(n||={},n[c]=K[c])}else n||(o||=[],o.push(Y,n)),n=K}else Y===`dangerouslySetInnerHTML`?(K=K?K.__html:void 0,u=u?u.__html:void 0,K!=null&&u!==K&&(o||=[]).push(Y,K)):Y===`children`?typeof K!=`string`&&typeof K!=`number`||(o||=[]).push(Y,``+K):Y!==`suppressContentEditableWarning`&&Y!==`suppressHydrationWarning`&&(a.hasOwnProperty(Y)?(K!=null&&Y===`onScroll`&&Sa(`scroll`,e),o||u===K||(o=[])):(o||=[]).push(Y,K))}}n&&(o||=[]).push(`style`,n);var Y=o;(t.updateQueue=Y)&&(t.flags|=4)}},Al=function(e,t,n,r){n!==r&&(t.flags|=4)};function jl(e,t){if(!Uo)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ml(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Nl(e,t,n){var i=t.pendingProps;switch(Bo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ml(t),null;case 1:return go(t.type)&&_o(),Ml(t),null;case 3:return i=t.stateNode,Us(),co(po),co(fo),Ys(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Xo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Wo!==null&&(Ku(Wo),Wo=null))),Ml(t),null;case 5:Gs(t);var o=Vs(Bs.current);if(n=t.type,e!==null&&t.stateNode!=null)kl(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return Ml(t),null}if(e=Vs(Rs.current),Xo(t)){i=t.stateNode,n=t.type;var c=t.memoizedProps;switch(i[Ya]=t,i[Xa]=c,e=!!(t.mode&1),n){case`dialog`:Sa(`cancel`,i),Sa(`close`,i);break;case`iframe`:case`object`:case`embed`:Sa(`load`,i);break;case`video`:case`audio`:for(o=0;o<va.length;o++)Sa(va[o],i);break;case`source`:Sa(`error`,i);break;case`img`:case`image`:case`link`:Sa(`error`,i),Sa(`load`,i);break;case`details`:Sa(`toggle`,i);break;case`input`:Tt(i,c),Sa(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!c.multiple},Sa(`invalid`,i);break;case`textarea`:Nt(i,c),Sa(`invalid`,i)}for(var u in qt(n,c),o=null,c)if(c.hasOwnProperty(u)){var K=c[u];u===`children`?typeof K==`string`?i.textContent!==K&&(!0!==c.suppressHydrationWarning&&Fa(i.textContent,K,e),o=[`children`,K]):typeof K==`number`&&i.textContent!==``+K&&(!0!==c.suppressHydrationWarning&&Fa(i.textContent,K,e),o=[`children`,``+K]):a.hasOwnProperty(u)&&K!=null&&u===`onScroll`&&Sa(`scroll`,i)}switch(n){case`input`:xt(i),Ot(i,c,!0);break;case`textarea`:xt(i),Ft(i);break;case`select`:case`option`:break;default:typeof c.onClick==`function`&&(i.onclick=Ia)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{u=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=It(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=u.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=u.createElement(n,{is:i.is}):(e=u.createElement(n),n===`select`&&(u=e,i.multiple?u.multiple=!0:i.size&&(u.size=i.size))):e=u.createElementNS(e,n),e[Ya]=t,e[Xa]=i,Ol(e,t,!1,!1),t.stateNode=e;a:{switch(u=Jt(n,i),n){case`dialog`:Sa(`cancel`,e),Sa(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:Sa(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<va.length;o++)Sa(va[o],e);o=i;break;case`source`:Sa(`error`,e),o=i;break;case`img`:case`image`:case`link`:Sa(`error`,e),Sa(`load`,e),o=i;break;case`details`:Sa(`toggle`,e),o=i;break;
vendor: 31,343 bytes, line 12
12case`input`:Tt(e,i),o=wt(e,i),Sa(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=ut({},i,{value:void 0}),Sa(`invalid`,e);break;case`textarea`:Nt(e,i),o=Mt(e,i),Sa(`invalid`,e);break;default:o=i}for(c in qt(n,o),K=o,K)if(K.hasOwnProperty(c)){var Y=K[c];c===`style`?Gt(e,Y):c===`dangerouslySetInnerHTML`?(Y=Y?Y.__html:void 0,Y!=null&&Bt(e,Y)):c===`children`?typeof Y==`string`?(n!==`textarea`||Y!==``)&&Vt(e,Y):typeof Y==`number`&&Vt(e,``+Y):c!==`suppressContentEditableWarning`&&c!==`suppressHydrationWarning`&&c!==`autoFocus`&&(a.hasOwnProperty(c)?Y!=null&&c===`onScroll`&&Sa(`scroll`,e):Y!=null&&Te(e,c,Y,u))}switch(n){case`input`:xt(e),Ot(e,i,!1);break;case`textarea`:xt(e),Ft(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+vt(i.value));break;case`select`:e.multiple=!!i.multiple,c=i.value,c==null?i.defaultValue!=null&&jt(e,!!i.multiple,i.defaultValue,!0):jt(e,!!i.multiple,c,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Ia)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ml(t),null;case 6:if(e&&t.stateNode!=null)Al(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=Vs(Bs.current),Vs(Rs.current),Xo(t)){if(i=t.stateNode,n=t.memoizedProps,i[Ya]=t,(c=i.nodeValue!==n)&&(e=Vo,e!==null))switch(e.tag){case 3:Fa(i.nodeValue,n,!!(e.mode&1));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Fa(i.nodeValue,n,!!(e.mode&1))}c&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Ya]=t,t.stateNode=i}return Ml(t),null;case 13:if(co(Ks),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Uo&&Ho!==null&&t.mode&1&&!(t.flags&128))Zo(),Qo(),t.flags|=98560,c=!1;else if(c=Xo(t),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=t.memoizedState,c=c===null?null:c.dehydrated,!c)throw Error(r(317));c[Ya]=t}else Qo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ml(t),c=!1}else Wo!==null&&(Ku(Wo),Wo=null),c=!0;if(!c)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||Ks.current&1?bu===0&&(bu=3):nd())),t.updateQueue!==null&&(t.flags|=4),Ml(t),null);case 4:return Us(),e===null&&Ta(t.stateNode.containerInfo),Ml(t),null;case 10:return ss(t.type._context),Ml(t),null;case 17:return go(t.type)&&_o(),Ml(t),null;case 19:if(co(Ks),c=t.memoizedState,c===null)return Ml(t),null;if(i=!!(t.flags&128),u=c.rendering,u===null){if(i)jl(c,!1);else{if(bu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(u=qs(e),u!==null){for(t.flags|=128,jl(c,!1),i=u.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)c=n,e=i,c.flags&=14680066,u=c.alternate,u===null?(c.childLanes=0,c.lanes=e,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=u.childLanes,c.lanes=u.lanes,c.child=u.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=u.memoizedProps,c.memoizedState=u.memoizedState,c.updateQueue=u.updateQueue,c.type=u.type,e=u.dependencies,c.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return lo(Ks,Ks.current&1|2),t.child}e=e.sibling}c.tail!==null&&kn()>Ou&&(t.flags|=128,i=!0,jl(c,!1),t.lanes=4194304)}}else{if(!i){if(e=qs(u),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),jl(c,!0),c.tail===null&&c.tailMode===`hidden`&&!u.alternate&&!Uo)return Ml(t),null}else 2*kn()-c.renderingStartTime>Ou&&n!==1073741824&&(t.flags|=128,i=!0,jl(c,!1),t.lanes=4194304)}c.isBackwards?(u.sibling=t.child,t.child=u):(n=c.last,n===null?t.child=u:n.sibling=u,c.last=u)}return c.tail===null?(Ml(t),null):(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=kn(),t.sibling=null,n=Ks.current,lo(Ks,i?n&1|2:n&1),t);case 22:case 23:return Qu(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?vu&1073741824&&(Ml(t),t.subtreeFlags&6&&(t.flags|=8192)):Ml(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function Pl(e,t){switch(Bo(t),t.tag){case 1:return go(t.type)&&_o(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Us(),co(po),co(fo),Ys(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Gs(t),null;case 13:if(co(Ks),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Qo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return co(Ks),null;case 4:return Us(),null;case 10:return ss(t.type._context),null;case 22:case 23:return Qu(),null;case 24:return null;default:return null}}var Fl=!1,Il=!1,Ll=typeof WeakSet==`function`?WeakSet:Set,Rl=null;function zl(e,t){var n=e.ref;if(n!==null){if(typeof n==`function`)try{n(null)}catch(n){fd(e,t,n)}else n.current=null}}function Bl(e,t,n){try{n()}catch(n){fd(e,t,n)}}var Vl=!1;function Hl(e,t){if(La=Dr,e=Ji(),Yi(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var c=0,u=-1,K=-1,Y=0,X=0,ee=e,te=null;b:for(;;){for(var ce;ee!==n||a!==0&&ee.nodeType!==3||(u=c+a),ee!==o||i!==0&&ee.nodeType!==3||(K=c+i),ee.nodeType===3&&(c+=ee.nodeValue.length),(ce=ee.firstChild)!==null;)te=ee,ee=ce;for(;;){if(ee===e)break b;if(te===n&&++Y===a&&(u=c),te===o&&++X===i&&(K=c),(ce=ee.nextSibling)!==null)break;ee=te,te=ee.parentNode}ee=ce}n=u===-1||K===-1?null:{start:u,end:K}}else n=null}n||={start:0,end:0}}else n=null;for(Ra={focusedElem:e,selectionRange:n},Dr=!1,Rl=t;Rl!==null;)if(t=Rl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Rl=e;else for(;Rl!==null;){t=Rl;try{var ue=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ue!==null){var de=ue.memoizedProps,fe=ue.memoizedState,me=t.stateNode;me.__reactInternalSnapshotBeforeUpdate=me.getSnapshotBeforeUpdate(t.elementType===t.type?de:ts(t.type,de),fe)}break;case 3:var ge=t.stateNode.containerInfo;ge.nodeType===1?ge.textContent=``:ge.nodeType===9&&ge.documentElement&&ge.removeChild(ge.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){fd(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,Rl=e;break}Rl=t.return}return ue=Vl,Vl=!1,ue}function Ul(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Bl(t,n,a)}i=i.next}while(i!==r)}}function Wl(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Gl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Kl(e){var t=e.alternate;t!==null&&(e.alternate=null,Kl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ya],delete t[Xa],delete t[Qa],delete t[$a],delete t[eo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ql(e){return e.tag===5||e.tag===3||e.tag===4}function Jl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||ql(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Yl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ia));else if(r!==4&&(e=e.child,e!==null))for(Yl(e,t,n),e=e.sibling;e!==null;)Yl(e,t,n),e=e.sibling}function Xl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Xl(e,t,n),e=e.sibling;e!==null;)Xl(e,t,n),e=e.sibling}var Zl=null,Ql=!1;function $l(e,t,n){for(n=n.child;n!==null;)eu(e,t,n),n=n.sibling}function eu(e,t,n){if(Ln&&typeof Ln.onCommitFiberUnmount==`function`)try{Ln.onCommitFiberUnmount(In,n)}catch{}switch(n.tag){case 5:Il||zl(n,t);case 6:var r=Zl,i=Ql;Zl=null,$l(e,t,n),Zl=r,Ql=i,Zl!==null&&(Ql?(e=Zl,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Zl.removeChild(n.stateNode));break;case 18:Zl!==null&&(Ql?(e=Zl,n=n.stateNode,e.nodeType===8?Ga(e.parentNode,n):e.nodeType===1&&Ga(e,n),Tr(e)):Ga(Zl,n.stateNode));break;case 4:r=Zl,i=Ql,Zl=n.stateNode.containerInfo,Ql=!0,$l(e,t,n),Zl=r,Ql=i;break;case 0:case 11:case 14:case 15:if(!Il&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Bl(n,t,o),i=i.next}while(i!==r)}$l(e,t,n);break;case 1:if(!Il&&(zl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){fd(n,t,e)}$l(e,t,n);break;case 21:$l(e,t,n);break;case 22:n.mode&1?(Il=(r=Il)||n.memoizedState!==null,$l(e,t,n),Il=r):$l(e,t,n);break;default:$l(e,t,n)}}function tu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ll),t.forEach(function(t){var r=gd.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function nu(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,c=t,u=c;a:for(;u!==null;){switch(u.tag){case 5:Zl=u.stateNode,Ql=!1;break a;case 3:Zl=u.stateNode.containerInfo,Ql=!0;break a;case 4:Zl=u.stateNode.containerInfo,Ql=!0;break a}u=u.return}if(Zl===null)throw Error(r(160));eu(o,c,a),Zl=null,Ql=!1;var K=a.alternate;K!==null&&(K.return=null),a.return=null}catch(e){fd(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ru(t,e),t=t.sibling}function ru(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(nu(t,e),iu(e),i&4){try{Ul(3,e,e.return),Wl(3,e)}catch(t){fd(e,e.return,t)}try{Ul(5,e,e.return)}catch(t){fd(e,e.return,t)}}break;case 1:nu(t,e),iu(e),i&512&&n!==null&&zl(n,n.return);break;case 5:if(nu(t,e),iu(e),i&512&&n!==null&&zl(n,n.return),e.flags&32){var a=e.stateNode;try{Vt(a,``)}catch(t){fd(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,c=n===null?o:n.memoizedProps,u=e.type,K=e.updateQueue;if(e.updateQueue=null,K!==null)try{u===`input`&&o.type===`radio`&&o.name!=null&&Et(a,o),Jt(u,c);var Y=Jt(u,o);for(c=0;c<K.length;c+=2){var X=K[c],ee=K[c+1];X===`style`?Gt(a,ee):X===`dangerouslySetInnerHTML`?Bt(a,ee):X===`children`?Vt(a,ee):Te(a,X,ee,Y)}switch(u){case`input`:Dt(a,o);break;case`textarea`:Pt(a,o);break;case`select`:var te=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var ce=o.value;ce==null?te!==!!o.multiple&&(o.defaultValue==null?jt(a,!!o.multiple,o.multiple?[]:``,!1):jt(a,!!o.multiple,o.defaultValue,!0)):jt(a,!!o.multiple,ce,!1)}a[Xa]=o}catch(t){fd(e,e.return,t)}}break;case 6:if(nu(t,e),iu(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){fd(e,e.return,t)}}break;case 3:if(nu(t,e),iu(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{Tr(t.containerInfo)}catch(t){fd(e,e.return,t)}break;case 4:nu(t,e),iu(e);break;case 13:nu(t,e),iu(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(Du=kn())),i&4&&tu(e);break;case 22:if(X=n!==null&&n.memoizedState!==null,e.mode&1?(Il=(Y=Il)||X,nu(t,e),Il=Y):nu(t,e),iu(e),i&8192){if(Y=e.memoizedState!==null,(e.stateNode.isHidden=Y)&&!X&&e.mode&1)for(Rl=e,X=e.child;X!==null;){for(ee=Rl=X;Rl!==null;){switch(te=Rl,ce=te.child,te.tag){case 0:case 11:case 14:case 15:Ul(4,te,te.return);break;case 1:zl(te,te.return);var ue=te.stateNode;if(typeof ue.componentWillUnmount==`function`){i=te,n=te.return;try{t=i,ue.props=t.memoizedProps,ue.state=t.memoizedState,ue.componentWillUnmount()}catch(e){fd(i,n,e)}}break;case 5:zl(te,te.return);break;case 22:if(te.memoizedState!==null){cu(ee);continue}}ce===null?cu(ee):(ce.return=te,Rl=ce)}X=X.sibling}a:for(X=null,ee=e;;){if(ee.tag===5){if(X===null){X=ee;try{a=ee.stateNode,Y?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(u=ee.stateNode,K=ee.memoizedProps.style,c=K!=null&&K.hasOwnProperty(`display`)?K.display:null,u.style.display=Wt(`display`,c))}catch(t){fd(e,e.return,t)}}}else if(ee.tag===6){if(X===null)try{ee.stateNode.nodeValue=Y?``:ee.memoizedProps}catch(t){fd(e,e.return,t)}}else if((ee.tag!==22&&ee.tag!==23||ee.memoizedState===null||ee===e)&&ee.child!==null){ee.child.return=ee,ee=ee.child;continue}if(ee===e)break a;for(;ee.sibling===null;){if(ee.return===null||ee.return===e)break a;X===ee&&(X=null),ee=ee.return}X===ee&&(X=null),ee.sibling.return=ee.return,ee=ee.sibling}}break;case 19:nu(t,e),iu(e),i&4&&tu(e);break;case 21:break;default:nu(t,e),iu(e)}}function iu(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(ql(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Vt(a,``),i.flags&=-33),Xl(e,Jl(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Yl(e,Jl(e),o);break;default:throw Error(r(161))}}catch(t){fd(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function au(e,t,n){Rl=e,ou(e,t,n)}function ou(e,t,n){for(var r=!!(e.mode&1);Rl!==null;){var i=Rl,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Fl;if(!o){var c=i.alternate,u=c!==null&&c.memoizedState!==null||Il;c=Fl;var K=Il;if(Fl=o,(Il=u)&&!K)for(Rl=i;Rl!==null;)o=Rl,u=o.child,o.tag===22&&o.memoizedState!==null||u===null?lu(i):(u.return=o,Rl=u);for(;a!==null;)Rl=a,ou(a,t,n),a=a.sibling;Rl=i,Fl=c,Il=K}su(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,Rl=a):su(e,t,n)}}function su(e){for(;Rl!==null;){var t=Rl;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Il||Wl(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Il){if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:ts(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}}var o=t.updateQueue;o!==null&&Cs(t,o,i);break;case 3:var c=t.updateQueue;if(c!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Cs(t,c,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var K=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:K.autoFocus&&n.focus();break;case`img`:K.src&&(n.src=K.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var Y=t.alternate;if(Y!==null){var X=Y.memoizedState;if(X!==null){var ee=X.dehydrated;ee!==null&&Tr(ee)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Il||t.flags&512&&Gl(t)}catch(e){fd(t,t.return,e)}}if(t===e){Rl=null;break}if(n=t.sibling,n!==null){n.return=t.return,Rl=n;break}Rl=t.return}}function cu(e){for(;Rl!==null;){var t=Rl;if(t===e){Rl=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Rl=n;break}Rl=t.return}}function lu(e){for(;Rl!==null;){var t=Rl;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Wl(4,t)}catch(e){fd(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){fd(t,i,e)}}var a=t.return;try{Gl(t)}catch(e){fd(t,a,e)}break;case 5:var o=t.return;try{Gl(t)}catch(e){fd(t,o,e)}}}catch(e){fd(t,t.return,e)}if(t===e){Rl=null;break}var c=t.sibling;if(c!==null){c.return=t.return,Rl=c;break}Rl=t.return}}var uu=Math.ceil,du=Oe.ReactCurrentDispatcher,fu=Oe.ReactCurrentOwner,pu=Oe.ReactCurrentBatchConfig,mu=0,hu=null,gu=null,_u=0,vu=0,yu=so(0),bu=0,xu=null,Su=0,Cu=0,wu=0,Tu=null,Eu=null,Du=0,Ou=1/0,ku=null,Au=!1,ju=null,Mu=null,Nu=!1,Pu=null,Fu=0,Iu=0,Lu=null,Ru=-1,zu=0;function Bu(){return mu&6?kn():Ru===-1?Ru=kn():Ru}function Vu(e){return e.mode&1?mu&2&&_u!==0?_u&-_u:es.transition===null?(e=tr,e===0?(e=window.event,e=e===void 0?16:Nr(e.type),e):e):(zu===0&&(zu=Xn()),zu):1}function Hu(e,t,n,i){if(50<Iu)throw Iu=0,Lu=null,Error(r(185));Qn(e,n,i),(!(mu&2)||e!==hu)&&(e===hu&&(!(mu&2)&&(Cu|=n),bu===4&&Ju(e,_u)),Uu(e,i),n===1&&mu===0&&!(t.mode&1)&&(Ou=kn()+500,Co&&Do()))}function Uu(e,t){var n=e.callbackNode;Jn(e,t);var r=Kn(e,e===hu?_u:0);if(r===0)n!==null&&En(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&En(n),t===1)e.tag===0?Eo(Yu.bind(null,e)):To(Yu.bind(null,e)),Ua(function(){!(mu&6)&&Do()}),n=null;else{switch(nr(r)){case 1:n=jn;break;case 4:n=Mn;break;case 16:n=Nn;break;case 536870912:n=Fn;break;default:n=Nn}n=vd(n,Wu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Wu(e,t){if(Ru=-1,zu=0,mu&6)throw Error(r(327));var n=e.callbackNode;if(ud()&&e.callbackNode!==n)return null;var i=Kn(e,e===hu?_u:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=rd(e,i);else{t=i;var a=mu;mu|=2;var o=td();(hu!==e||_u!==t)&&(ku=null,Ou=kn()+500,$u(e,t));do try{ad();break}catch(t){ed(e,t)}while(1);os(),du.current=o,mu=a,gu===null?(hu=null,_u=0,t=bu):t=0}if(t!==0){if(t===2&&(a=Yn(e),a!==0&&(i=a,t=Gu(e,a))),t===1)throw n=xu,$u(e,0),Ju(e,i),Uu(e,kn()),n;if(t===6)Ju(e,i);else{if(a=e.current.alternate,!(i&30)&&!qu(a)&&(t=rd(e,i),t===2&&(o=Yn(e),o!==0&&(i=o,t=Gu(e,o))),t===1))throw n=xu,$u(e,0),Ju(e,i),Uu(e,kn()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:cd(e,Eu,ku);break;case 3:if(Ju(e,i),(i&130023424)===i&&(t=Du+500-kn(),10<t)){if(Kn(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){Bu(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Ba(cd.bind(null,e,Eu,ku),t);break}cd(e,Eu,ku);break;case 4:if(Ju(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var c=31-zn(i);o=1<<c,c=t[c],c>a&&(a=c),i&=~o}if(i=a,i=kn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*uu(i/1960))-i,10<i){e.timeoutHandle=Ba(cd.bind(null,e,Eu,ku),i);break}cd(e,Eu,ku);break;case 5:cd(e,Eu,ku);break;default:throw Error(r(329))}}}return Uu(e,kn()),e.callbackNode===n?Wu.bind(null,e):null}function Gu(e,t){var n=Tu;return e.current.memoizedState.isDehydrated&&($u(e,t).flags|=256),e=rd(e,t),e!==2&&(t=Eu,Eu=n,t!==null&&Ku(t)),e}function Ku(e){Eu===null?Eu=e:Eu.push.apply(Eu,e)}function qu(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ui(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ju(e,t){for(t&=~wu,t&=~Cu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-zn(t),r=1<<n;e[n]=-1,t&=~r}}function Yu(e){if(mu&6)throw Error(r(327));ud();var t=Kn(e,0);if(!(t&1))return Uu(e,kn()),null;var n=rd(e,t);if(e.tag!==0&&n===2){var i=Yn(e);i!==0&&(t=i,n=Gu(e,i))}if(n===1)throw n=xu,$u(e,0),Ju(e,t),Uu(e,kn()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,cd(e,Eu,ku),Uu(e,kn()),null}function Xu(e,t){var n=mu;mu|=1;try{return e(t)}finally{mu=n,mu===0&&(Ou=kn()+500,Co&&Do())}}function Zu(e){Pu!==null&&Pu.tag===0&&!(mu&6)&&ud();var t=mu;mu|=1;var n=pu.transition,r=tr;try{if(pu.transition=null,tr=1,e)return e()}finally{tr=r,pu.transition=n,mu=t,!(mu&6)&&Do()}}function Qu(){vu=yu.current,co(yu)}function $u(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Va(n)),gu!==null)for(n=gu.return;n!==null;){var r=n;switch(Bo(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&_o();break;case 3:Us(),co(po),co(fo),Ys();break;case 5:Gs(r);break;case 4:Us();break;case 13:co(Ks);break;case 19:co(Ks);break;case 10:ss(r.type._context);break;case 22:case 23:Qu()}n=n.return}if(hu=e,gu=e=Cd(e.current,null),_u=vu=t,bu=0,xu=null,wu=Cu=Su=0,Eu=Tu=null,ds!==null){for(t=0;t<ds.length;t++)if(n=ds[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}ds=null}return e}function ed(e,t){do{var n=gu;try{if(os(),Xs.current=Wc,nc){for(var i=$s.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}nc=!1}if(Qs=0,tc=ec=$s=null,rc=!1,ic=0,fu.current=null,n===null||n.return===null){bu=1,xu=t,gu=null;break}a:{var o=e,c=n.return,u=n,K=t;if(t=_u,u.flags|=32768,typeof K==`object`&&K&&typeof K.then==`function`){var Y=K,X=u,ee=X.tag;if(!(X.mode&1)&&(ee===0||ee===11||ee===15)){var te=X.alternate;te?(X.updateQueue=te.updateQueue,X.memoizedState=te.memoizedState,X.lanes=te.lanes):(X.updateQueue=null,X.memoizedState=null)}var ce=tl(c);if(ce!==null){ce.flags&=-257,nl(ce,c,u,o,t),ce.mode&1&&el(o,Y,t),t=ce,K=Y;var ue=t.updateQueue;if(ue===null){var de=new Set;de.add(K),t.updateQueue=de}else ue.add(K);break a}if(!(t&1)){el(o,Y,t),nd();break a}K=Error(r(426))}else if(Uo&&u.mode&1){var fe=tl(c);if(fe!==null){!(fe.flags&65536)&&(fe.flags|=256),nl(fe,c,u,o,t),$o(Jc(K,u));break a}}o=K=Jc(K,u),bu!==4&&(bu=2),Tu===null?Tu=[o]:Tu.push(o),o=c;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var me=Qc(o,K,t);xs(o,me);break a;case 1:u=K;var ge=o.type,Te=o.stateNode;if(!(o.flags&128)&&(typeof ge.getDerivedStateFromError==`function`||Te!==null&&typeof Te.componentDidCatch==`function`&&(Mu===null||!Mu.has(Te)))){o.flags|=65536,t&=-t,o.lanes|=t;var Oe=$c(o,u,t);xs(o,Oe);break a}}o=o.return}while(o!==null)}sd(n)}catch(e){t=e,gu===n&&n!==null&&(gu=n=n.return);continue}break}while(1)}function td(){var e=du.current;return du.current=Wc,e===null?Wc:e}function nd(){(bu===0||bu===3||bu===2)&&(bu=4),hu===null||!(Su&268435455)&&!(Cu&268435455)||Ju(hu,_u)}function rd(e,t){var n=mu;mu|=2;var i=td();(hu!==e||_u!==t)&&(ku=null,$u(e,t));do try{id();break}catch(t){ed(e,t)}while(1);if(os(),mu=n,du.current=i,gu!==null)throw Error(r(261));return hu=null,_u=0,bu}function id(){for(;gu!==null;)od(gu)}function ad(){for(;gu!==null&&!Dn();)od(gu)}function od(e){var t=_d(e.alternate,e,vu);e.memoizedProps=e.pendingProps,t===null?sd(e):gu=t,fu.current=null}function sd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Pl(n,t),n!==null){n.flags&=32767,gu=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{bu=6,gu=null;return}}else if(n=Nl(n,t,vu),n!==null){gu=n;return}if(t=t.sibling,t!==null){gu=t;return}gu=t=e}while(t!==null);bu===0&&(bu=5)}function cd(e,t,n){var r=tr,i=pu.transition;try{pu.transition=null,tr=1,ld(e,t,n,r)}finally{pu.transition=i,tr=r}return null}function ld(e,t,n,i){do ud();while(Pu!==null);if(mu&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if($n(e,o),e===hu&&(gu=hu=null,_u=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Nu||(Nu=!0,vd(Nn,function(){return ud(),null})),o=!!(n.flags&15990),n.subtreeFlags&15990||o){o=pu.transition,pu.transition=null;var c=tr;tr=1;var u=mu;mu|=4,fu.current=null,Hl(e,n),ru(n,e),Xi(Ra),Dr=!!La,Ra=La=null,e.current=n,au(n,e,a),On(),mu=u,tr=c,pu.transition=o}else e.current=n;if(Nu&&(Nu=!1,Pu=e,Fu=a),o=e.pendingLanes,o===0&&(Mu=null),Rn(n.stateNode,i),Uu(e,kn()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(Au)throw Au=!1,e=ju,ju=null,e;return Fu&1&&e.tag!==0&&ud(),o=e.pendingLanes,o&1?e===Lu?Iu++:(Iu=0,Lu=e):Iu=0,Do(),null}function ud(){if(Pu!==null){var e=nr(Fu),t=pu.transition,n=tr;try{if(pu.transition=null,tr=16>e?16:e,Pu===null)var i=!1;else{if(e=Pu,Pu=null,Fu=0,mu&6)throw Error(r(331));var a=mu;for(mu|=4,Rl=e.current;Rl!==null;){var o=Rl,c=o.child;if(Rl.flags&16){var u=o.deletions;if(u!==null){for(var K=0;K<u.length;K++){var Y=u[K];for(Rl=Y;Rl!==null;){var X=Rl;switch(X.tag){case 0:case 11:case 15:Ul(8,X,o)}var ee=X.child;if(ee!==null)ee.return=X,Rl=ee;else for(;Rl!==null;){X=Rl;var te=X.sibling,ce=X.return;if(Kl(X),X===Y){Rl=null;break}if(te!==null){te.return=ce,Rl=te;break}Rl=ce}}}var ue=o.alternate;if(ue!==null){var de=ue.child;if(de!==null){ue.child=null;do{var fe=de.sibling;de.sibling=null,de=fe}while(de!==null)}}Rl=o}}if(o.subtreeFlags&2064&&c!==null)c.return=o,Rl=c;else b:for(;Rl!==null;){if(o=Rl,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Ul(9,o,o.return)}var me=o.sibling;if(me!==null){me.return=o.return,Rl=me;break b}Rl=o.return}}var ge=e.current;for(Rl=ge;Rl!==null;){c=Rl;var Te=c.child;if(c.subtreeFlags&2064&&Te!==null)Te.return=c,Rl=Te;else b:for(c=ge;Rl!==null;){if(u=Rl,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:Wl(9,u)}}catch(e){fd(u,u.return,e)}if(u===c){Rl=null;break b}var Oe=u.sibling;if(Oe!==null){Oe.return=u.return,Rl=Oe;break b}Rl=u.return}}if(mu=a,Do(),Ln&&typeof Ln.onPostCommitFiberRoot==`function`)try{Ln.onPostCommitFiberRoot(In,e)}catch{}i=!0}return i}finally{tr=n,pu.transition=t}}return!1}function dd(e,t,n){t=Jc(n,t),t=Qc(e,t,1),e=ys(e,t,1),t=Bu(),e!==null&&(Qn(e,1,t),Uu(e,t))}function fd(e,t,n){if(e.tag===3)dd(e,e,n);else for(;t!==null;){if(t.tag===3){dd(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Mu===null||!Mu.has(r))){e=Jc(n,e),e=$c(t,e,1),t=ys(t,e,1),e=Bu(),t!==null&&(Qn(t,1,e),Uu(t,e));break}}t=t.return}}function pd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Bu(),e.pingedLanes|=e.suspendedLanes&n,hu===e&&(_u&n)===n&&(bu===4||bu===3&&(_u&130023424)===_u&&500>kn()-Du?$u(e,0):wu|=n),Uu(e,t)}function md(e,t){t===0&&(e.mode&1?(t=Wn,Wn<<=1,!(Wn&130023424)&&(Wn=4194304)):t=1);var n=Bu();e=ms(e,t),e!==null&&(Qn(e,t,n),Uu(e,n))}function hd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),md(e,n)}function gd(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),md(e,n)}var _d=function(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps||po.current)il=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return il=!1,Dl(e,t,n);il=!!(e.flags&131072)}}else il=!1,Uo&&t.flags&1048576&&Ro(t,jo,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Tl(e,t),e=t.pendingProps;var a=ho(t,fo.current);ls(t,n),a=cc(null,t,i,e,a,n);var o=lc();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,go(i)?(o=!0,bo(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,gs(t),a.updater=Es,t.stateNode=a,a._reactInternals=t,As(t,i,e,n),t=pl(null,t,i,!0,o,n)):(t.tag=0,Uo&&o&&zo(t),al(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(Tl(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Sd(i),e=ts(i,e),a){case 0:t=dl(null,t,i,e,n);break a;case 1:t=fl(null,t,i,e,n);break a;case 11:t=ol(null,t,i,e,n);break a;case 14:t=sl(null,t,i,ts(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ts(i,a),dl(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ts(i,a),fl(e,t,i,a,n);case 3:a:{if(ml(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,_s(e,t),Ss(t,i,null,n);var c=t.memoizedState;if(i=c.element,o.isDehydrated){if(o={element:i,isDehydrated:!1,cache:c.cache,pendingSuspenseBoundaries:c.pendingSuspenseBoundaries,transitions:c.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Jc(Error(r(423)),t),t=hl(e,t,i,n,a);break a}if(i!==a){a=Jc(Error(r(424)),t),t=hl(e,t,i,n,a);break a}for(Ho=Ka(t.stateNode.containerInfo.firstChild),Vo=t,Uo=!0,Wo=null,n=Is(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Qo(),i===a){t=El(e,t,n);break a}al(e,t,i,n)}t=t.child}return t;case 5:return Ws(t),e===null&&Jo(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,c=a.children,za(i,a)?c=null:o!==null&&za(i,o)&&(t.flags|=32),ul(e,t),al(e,t,c,n),t.child;case 6:return e===null&&Jo(t),null;case 13:return vl(e,t,n);case 4:return Hs(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Fs(t,null,i,n):al(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ts(i,a),ol(e,t,i,a,n);case 7:return al(e,t,t.pendingProps,n),t.child;case 8:return al(e,t,t.pendingProps.children,n),t.child;case 12:return al(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,c=a.value,lo(ns,i._currentValue),i._currentValue=c,o!==null){if(Ui(o.value,c)){if(o.children===a.children&&!po.current){t=El(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){c=o.child;for(var K=u.firstContext;K!==null;){if(K.context===i){if(o.tag===1){K=vs(-1,n&-n),K.tag=2;var Y=o.updateQueue;if(Y!==null){Y=Y.shared;var X=Y.pending;X===null?K.next=K:(K.next=X.next,X.next=K),Y.pending=K}}o.lanes|=n,K=o.alternate,K!==null&&(K.lanes|=n),cs(o.return,n,t),u.lanes|=n;break}K=K.next}}else if(o.tag===10)c=o.type===t.type?null:o.child;else if(o.tag===18){if(c=o.return,c===null)throw Error(r(341));c.lanes|=n,u=c.alternate,u!==null&&(u.lanes|=n),cs(c,n,t),c=o.sibling}else c=o.child;if(c!==null)c.return=o;else for(c=o;c!==null;){if(c===t){c=null;break}if(o=c.sibling,o!==null){o.return=c.return,c=o;break}c=c.return}o=c}}al(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,ls(t,n),a=us(a),i=i(a),t.flags|=1,al(e,t,i,n),t.child;case 14:return i=t.type,a=ts(i,t.pendingProps),a=ts(i.type,a),sl(e,t,i,a,n);case 15:return cl(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ts(i,a),Tl(e,t),t.tag=1,go(i)?(e=!0,bo(t)):e=!1,ls(t,n),Os(t,i,a),As(t,i,a,n),pl(null,t,i,!0,e,n);case 19:return wl(e,t,n);case 22:return ll(e,t,n)}throw Error(r(156,t.tag))};function vd(e,t){return Tn(e,t)}function yd(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bd(e,t,n,r){return new yd(e,t,n,r)}function xd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Sd(e){if(typeof e==`function`)return+!!xd(e);if(e!=null){if(e=e.$$typeof,e===nt)return 11;if(e===at)return 14}return 2}function Cd(e,t){var n=e.alternate;return n===null?(n=bd(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deleti
vendor: 5,192 bytes, line 12
12ons=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function wd(e,t,n,i,a,o){var c=2;if(i=e,typeof e==`function`)xd(e)&&(c=1);else if(typeof e==`string`)c=5;else a:switch(e){case qe:return Td(n.children,a,o,t);case Ye:c=8,a|=8;break;case Ze:return e=bd(12,n,t,a|2),e.elementType=Ze,e.lanes=o,e;case rt:return e=bd(13,n,t,a),e.elementType=rt,e.lanes=o,e;case it:return e=bd(19,n,t,a),e.elementType=it,e.lanes=o,e;case st:return Ed(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case Qe:c=10;break a;case et:c=9;break a;case nt:c=11;break a;case at:c=14;break a;case ot:c=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=bd(c,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function Td(e,t,n,r){return e=bd(7,e,r,t),e.lanes=n,e}function Ed(e,t,n,r){return e=bd(22,e,r,t),e.elementType=st,e.lanes=n,e.stateNode={isHidden:!1},e}function Dd(e,t,n){return e=bd(6,e,null,t),e.lanes=n,e}function Od(e,t,n){return t=bd(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function kd(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zn(0),this.expirationTimes=Zn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zn(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ad(e,t,n,r,i,a,o,c,u){return e=new kd(e,t,n,c,u),t===1?(t=1,!0===a&&(t|=8)):t=0,a=bd(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},gs(a),e}function jd(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ze,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function Md(e){if(!e)return uo;e=e._reactInternals;a:{if(yn(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(go(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(go(n))return yo(e,n,t)}return t}function Nd(e,t,n,r,i,a,o,c,u){return e=Ad(n,r,!0,e,i,a,o,c,u),e.context=Md(null),n=e.current,r=Bu(),i=Vu(n),a=vs(r,i),a.callback=t??null,ys(n,a,i),e.current.lanes=i,Qn(e,i,r),Uu(e,r),e}function Pd(e,t,n,r){var i=t.current,a=Bu(),o=Vu(i);return n=Md(n),t.context===null?t.context=n:t.pendingContext=n,t=vs(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ys(i,t,o),e!==null&&(Hu(e,i,o,a),bs(e,i,o)),o}function Fd(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Id(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ld(e,t){Id(e,t),(e=e.alternate)&&Id(e,t)}function Rd(){return null}var zd=typeof reportError==`function`?reportError:function(e){console.error(e)};function Bd(e){this._internalRoot=e}Vd.prototype.render=Bd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));Pd(e,t,null,null)},Vd.prototype.unmount=Bd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zu(function(){Pd(null,e,null,null)}),t[Za]=null}};function Vd(e){this._internalRoot=e}Vd.prototype.unstable_scheduleHydration=function(e){if(e){var t=or();e={blockedOn:null,target:e,priority:t};for(var n=0;n<hr.length&&t!==0&&t<hr[n].priority;n++);hr.splice(n,0,e),n===0&&br(e)}};function Hd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ud(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function Wd(){}function Gd(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=Fd(o);a.call(e)}}var o=Nd(t,r,e,0,null,!1,!1,``,Wd);return e._reactRootContainer=o,e[Za]=o.current,Ta(e.nodeType===8?e.parentNode:e),Zu(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var c=r;r=function(){var e=Fd(u);c.call(e)}}var u=Ad(e,0,!1,null,null,!1,!1,``,Wd);return e._reactRootContainer=u,e[Za]=u.current,Ta(e.nodeType===8?e.parentNode:e),Zu(function(){Pd(t,u,n,r)}),u}function Kd(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var c=i;i=function(){var e=Fd(o);c.call(e)}}Pd(t,o,e,i)}else o=Gd(n,t,e,i,r);return Fd(o)}rr=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Gn(t.pendingLanes);n!==0&&(er(t,n|1),Uu(t,kn()),!(mu&6)&&(Ou=kn()+500,Do()))}break;case 13:Zu(function(){var t=ms(e,1);
vendor: 7,940 bytes, line 12
12t!==null&&Hu(t,e,1,Bu())}),Ld(e,1)}},ir=function(e){if(e.tag===13){var t=ms(e,134217728);t!==null&&Hu(t,e,134217728,Bu()),Ld(e,134217728)}},ar=function(e){if(e.tag===13){var t=Vu(e),n=ms(e,t);n!==null&&Hu(n,e,t,Bu()),Ld(e,t)}},or=function(){return tr},sr=function(e,t){var n=tr;try{return tr=e,t()}finally{tr=n}},Zt=function(e,t,n){switch(t){case`input`:if(Dt(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=io(i);if(!a)throw Error(r(90));St(i),Dt(i,a)}}}break;case`textarea`:Pt(e,n);break;case`select`:t=n.value,t!=null&&jt(e,!!n.multiple,t,!1)}},rn=Xu,an=Zu;var qd={usingClientEntryPoint:!1,Events:[no,ro,io,tn,nn,Xu]},Jd={findFiberByHostInstance:to,bundleType:0,version:`18.2.0`,rendererPackageName:`react-dom`},Yd={bundleType:Jd.bundleType,version:Jd.version,rendererPackageName:Jd.rendererPackageName,rendererConfig:Jd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Oe.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Cn(e),e===null?null:e.stateNode},findFiberByHostInstance:Jd.findFiberByHostInstance||Rd,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.2.0-next-9e3b772b8-20220608`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xd.isDisabled&&Xd.supportsFiber)try{In=Xd.inject(Yd),Ln=Xd}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qd,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Hd(t))throw Error(r(200));return jd(e,t,null,n)},e.createRoot=function(e,t){if(!Hd(e))throw Error(r(299));var n=!1,i=``,a=zd;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=Ad(e,1,!1,null,null,n,!1,i,a),e[Za]=t.current,Ta(e.nodeType===8?e.parentNode:e),new Bd(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=Cn(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Zu(e)},e.hydrate=function(e,t,n){if(!Ud(t))throw Error(r(200));return Kd(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!Hd(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,c=zd;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(c=n.onRecoverableError)),t=Nd(t,null,e,1,n??null,a,!1,o,c),e[Za]=t.current,Ta(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new Vd(t)},e.render=function(e,t,n){if(!Ud(t))throw Error(r(200));return Kd(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!Ud(e))throw Error(r(40));return e._reactRootContainer?(Zu(function(){Kd(null,null,e,!1,function(){e._reactRootContainer=null,e[Za]=null})}),!0):!1},e.unstable_batchedUpdates=Xu,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Ud(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Kd(e,t,n,!1,i)},e.version=`18.2.0-next-9e3b772b8-20220608`})),require_react_dom=__commonJSMin(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=require_react_dom_production_min()})),$773d5888b972f1cf$exports={};$773d5888b972f1cf$exports={dismiss:`تجاهل`};var $d11f19852b941573$exports={};$d11f19852b941573$exports={dismiss:`Отхвърляне`};var $b983974c2ee1efb3$exports={};$b983974c2ee1efb3$exports={dismiss:`Odstranit`};var $5809cc9d4e92de73$exports={};$5809cc9d4e92de73$exports={dismiss:`Luk`};var $c68c2e4fc74398d1$exports={};$c68c2e4fc74398d1$exports={dismiss:`Schließen`};var $0898b4c153db2b77$exports={};$0898b4c153db2b77$exports={dismiss:`Απόρριψη`};var $6d74810286a15183$exports={};$6d74810286a15183$exports={dismiss:`Dismiss`};var $309d73dc65f78055$exports={};$309d73dc65f78055$exports={dismiss:`Descartar`};var $44ad94f7205cf593$exports={};$44ad94f7205cf593$exports={dismiss:`Lõpeta`};var $7c28f5687f0779a9$exports={};$7c28f5687f0779a9$exports={dismiss:`Hylkää`};var $e6d75df4b68bd73a$exports={};$e6d75df4b68bd73a$exports={dismiss:`Rejeter`};var $87505c9dab186d0f$exports={};$87505c9dab186d0f$exports={dismiss:`התעלם`};var $553439c3ffb3e492$exports={};$553439c3ffb3e492$exports={dismiss:`Odbaci`};var $74cf411061b983a2$exports={};$74cf411061b983a2$exports={dismiss:`Elutasítás`};var $e933f298574dc435$exports={};$e933f298574dc435$exports={dismiss:`Ignora`};var $ac91fc9fe02f71f6$exports={};$ac91fc9fe02f71f6$exports={dismiss:`閉じる`};var $52b96f86422025af$exports={};$52b96f86422025af$exports={dismiss:`무시`};var $c0d724c3e51dafa6$exports={};$c0d724c3e51dafa6$exports={dismiss:`Atmesti`};var $c92899672a3fe72e$exports={};$c92899672a3fe72e$exports={dismiss:`Nerādīt`};var $9f576b39d8e7a9d6$exports={};$9f576b39d8e7a9d6$exports={dismiss:`Lukk`};var $9d025808aeec81a7$exports={};$9d025808aeec81a7$exports={dismiss:`Negeren`};var $fce709921e2c0fa6$exports={};$fce709921e2c0fa6$exports={dismiss:`Zignoruj`};var $2599cf0c4ab37f59$exports={};$2599cf0c4ab37f59$exports={dismiss:`Descartar`};var $3c220ae7ef8a35fd$exports={};$3c220ae7ef8a35fd$exports={dismiss:`Dispensar`};var $93562b5094072f54$exports={};$93562b5094072f54$exports={dismiss:`Revocare`};var $cd9e2abd0d06c7b4$exports={};$cd9e2abd0d06c7b4$exports={dismiss:`Пропустить`};var $45375701f409adf1$exports={};$45375701f409adf1$exports={dismiss:`Zrušiť`};var $27fab53a576de9dd$exports={};$27fab53a576de9dd$exports={dismiss:`Opusti`};var $4438748d9952e7c7$exports={};$4438748d9952e7c7$exports={dismiss:`Odbaci`};var $0936d7347ef4da4c$exports={};$0936d7347ef4da4c$exports={dismiss:`Avvisa`};var $29700c92185d38f8$exports={};$29700c92185d38f8$exports={dismiss:`Kapat`};var $662ccaf2be4c25b3$exports={};$662ccaf2be4c25b3$exports={dismiss:`Скасувати`};var $d80a27deda7cdb3c$exports={};$d80a27deda7cdb3c$exports={dismiss:`取消`};var $2b2734393847c884$exports={};$2b2734393847c884$exports={dismiss:`關閉`};var $a2f21f5f14f60553$exports={};$a2f21f5f14f60553$exports={"ar-AE":$773d5888b972f1cf$exports,"bg-BG":$d11f19852b941573$exports,"cs-CZ":$b983974c2ee1efb3$exports,"da-DK":$5809cc9d4e92de73$exports,"de-DE":$c68c2e4fc74398d1$exports,"el-GR":$0898b4c153db2b77$exports,"en-US":$6d74810286a15183$exports,"es-ES":$309d73dc65f78055$exports,"et-EE":$44ad94f7205cf593$exports,"fi-FI":$7c28f5687f0779a9$exports,"fr-FR":$e6d75df4b68bd73a$exports,"he-IL":$87505c9dab186d0f$exports,"hr-HR":$553439c3ffb3e492$exports,"hu-HU":$74cf411061b983a2$exports,"it-IT":$e933f298574dc435$exports,"ja-JP":$ac91fc9fe02f71f6$exports,"ko-KR":$52b96f86422025af$exports,"lt-LT":$c0d724c3e51dafa6$exports,"lv-LV":$c92899672a3fe72e$exports,"nb-NO":$9f576b39d8e7a9d6$exports,"nl-NL":$9d025808aeec81a7$exports,"pl-PL":$fce709921e2c0fa6$exports,"pt-BR":$2599cf0c4ab37f59$exports,"pt-PT":$3c220ae7ef8a35fd$exports,"ro-RO":$93562b5094072f54$exports,"ru-RU":$cd9e2abd0d06c7b4$exports,"sk-SK":$45375701f409adf1$exports,"sl-SI":$27fab53a576de9dd$exports,"sr-SP":$4438748d9952e7c7$exports,"sv-SE":$0936d7347ef4da4c$exports,"tr-TR":$29700c92185d38f8$exports,"uk-UA":$662ccaf2be4c25b3$exports,"zh-CN":$d80a27deda7cdb3c$exports,"zh-TW":$2b2734393847c884$exports};
12function $parcel$interopDefault$5(e){return e&&e.__esModule?e.default:e}function $86ea4cb521eb2e37$export$2317d149ed6f78c4(e){let{onDismiss:t,...n}=e,r=$313b98861ee5dd6c$export$d6875122194c7b44(n,$fca6afa0e843324b$export$f12b703ca79dfbb1$1($parcel$interopDefault$5($a2f21f5f14f60553$exports),`@react-aria/overlays`).format(`dismiss`)),i=()=>{t&&t()};return import_react.createElement($5c3e21d68f1c4674$export$439d29a4e110a164,null,import_react.createElement(`button`,{...r,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}var $5e3802645cc19319$var$refCountMap=new WeakMap,$5e3802645cc19319$var$observerStack=[];function $5e3802645cc19319$export$1c3ebcada18427bf(e,t=document.body){let n=new Set(e),r=new Set,i=e=>{for(let t of e.querySelectorAll(`[data-live-announcer], [data-react-aria-top-layer]`))n.add(t);let t=e=>{if(n.has(e)||r.has(e.parentElement)&&e.parentElement.getAttribute(`role`)!==`row`)return NodeFilter.FILTER_REJECT;for(let t of n)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),o=t(e);if(o===NodeFilter.FILTER_ACCEPT&&a(e),o!==NodeFilter.FILTER_REJECT){let e=i.nextNode();for(;e!=null;)a(e),e=i.nextNode()}},a=e=>{var t;let n=$5e3802645cc19319$var$refCountMap.get(e)??0;(e.getAttribute(`aria-hidden`)!==`true`||n!==0)&&(n===0&&e.setAttribute(`aria-hidden`,`true`),r.add(e),$5e3802645cc19319$var$refCountMap.set(e,n+1))};$5e3802645cc19319$var$observerStack.length&&$5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length-1].disconnect(),i(t);let o=new MutationObserver(e=>{for(let t of e)if(t.type===`childList`&&t.addedNodes.length!==0&&![...n,...r].some(e=>e.contains(t.target))){for(let e of t.removedNodes)e instanceof Element&&(n.delete(e),r.delete(e));for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&(e.dataset.liveAnnouncer===`true`||e.dataset.reactAriaTopLayer===`true`)?n.add(e):e instanceof Element&&i(e)}});o.observe(t,{childList:!0,subtree:!0});let c={observe(){o.observe(t,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return $5e3802645cc19319$var$observerStack.push(c),()=>{o.disconnect();for(let e of r){let t=$5e3802645cc19319$var$refCountMap.get(e);t===1?(e.removeAttribute(`aria-hidden`),$5e3802645cc19319$var$refCountMap.delete(e)):$5e3802645cc19319$var$refCountMap.set(e,t-1)}c===$5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length-1]?($5e3802645cc19319$var$observerStack.pop(),$5e3802645cc19319$var$observerStack.length&&$5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length-1].observe()):$5e3802645cc19319$var$observerStack.splice($5e3802645cc19319$var$observerStack.indexOf(c),1)}}function $f2f8a6077418541e$export$542a6fd13ac93354(e,t){let{triggerRef:n,popoverRef:r,isNonModal:i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:o,...c}=e,{overlayProps:u,underlayProps:K}=$a11501f3d1d39e6c$export$ea8f71083e90600f({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:o},r),{overlayProps:Y,arrowProps:X,placement:ee}=$2a41e45df1593e64$export$d39e1813b3bdd0e1({...c,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:i?t.close:null});return $49c51c25361d4cd2$export$ee0f7cc6afcd1c18({isDisabled:i||!t.isOpen}),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{if(t.isOpen&&!i&&r.current)return $5e3802645cc19319$export$1c3ebcada18427bf([r.current])},[i,t.isOpen,r]),{popoverProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(u,Y),arrowProps:X,underlayProps:K,placement:ee}}var $96b38030c423d352$export$60d741e20e0aa309=(0,import_react.createContext)({});function $96b38030c423d352$export$574e9b0fb070c3b0(){var e;return(0,import_react.useContext)($96b38030c423d352$export$60d741e20e0aa309)??{}}var import_react_dom=__toESM(require_react_dom(),1),$337b884510726a0d$export$a2200b96afd16271=import_react.createContext(null);function $337b884510726a0d$export$c6fdb837b070b4ff(e){let t=$b5e257d569688ac6$export$535bd6ca7f90a273$1(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,a]=(0,import_react.useState)(!1),o=(0,import_react.useMemo)(()=>({contain:i,setContain:a}),[i,a]),{getContainer:c}=$96b38030c423d352$export$574e9b0fb070c3b0();if(!e.portalContainer&&c&&(n=c()),!n)return null;let u=e.children;return e.disableFocusManagement||(u=import_react.createElement($9bf71ea28793e738$export$20e40289641fbbb6,{restoreFocus:!0,contain:i&&!r},u)),u=import_react.createElement($337b884510726a0d$export$a2200b96afd16271.Provider,{value:o},import_react.createElement($f1ab8c75478c6f73$export$cf75428e0b9ed1ea,null,u)),import_react_dom.createPortal(u,n)}function $337b884510726a0d$export$14c98a7594375490(){let e=(0,import_react.useContext)($337b884510726a0d$export$a2200b96afd16271)?.setContain;$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{e?.(!0)},[e])}function $8ac8429251c45e4b$export$dbc0f175b25fb0fb(e,t,n){let{overlayProps:r,underlayProps:i}
12=$a11501f3d1d39e6c$export$ea8f71083e90600f({...e,isOpen:t.isOpen,onClose:t.close},n);return $49c51c25361d4cd2$export$ee0f7cc6afcd1c18({isDisabled:!t.isOpen}),$337b884510726a0d$export$14c98a7594375490(),(0,import_react.useEffect)(()=>{if(t.isOpen)return $5e3802645cc19319$export$1c3ebcada18427bf([n.current])},[t.isOpen,n]),{modalProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(r),underlayProps:i}}function $feb5ffebff200149$export$d3e3bd3e26688c04(e){return $c87311424ea30a05$export$e1865c3bedcd822b$1()?e.altKey:e.ctrlKey}function $feb5ffebff200149$export$16792effe837dba3(e){return $c87311424ea30a05$export$9ac100e40613ea10$1()?e.metaKey:e.ctrlKey}var $fb3050f43d946246$var$TYPEAHEAD_DEBOUNCE_WAIT_MS=1e3;function $fb3050f43d946246$export$e32c88dfddc6e1d8(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=(0,import_react.useRef)({search:``,timeout:null}).current;return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?e=>{let a=$fb3050f43d946246$var$getStringForKey(e.key);if(!a||e.ctrlKey||e.metaKey||!e.currentTarget.contains(e.target))return;a===` `&&i.search.trim().length>0&&(e.preventDefault(),`continuePropagation`in e||e.stopPropagation()),i.search+=a;let o=t.getKeyForSearch(i.search,n.focusedKey);o??=t.getKeyForSearch(i.search),o!=null&&(n.setFocusedKey(o),r&&r(o)),clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=``},$fb3050f43d946246$var$TYPEAHEAD_DEBOUNCE_WAIT_MS)}:null}}}function $fb3050f43d946246$var$getStringForKey(e){return e.length===1||!/^[A-Z]/i.test(e)?e:``}function $ae20dd8cbca75726$export$d6daf82dcd84e87c(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:a=!1,disallowEmptySelection:o=!1,disallowSelectAll:c=!1,selectOnFocus:u=t.selectionBehavior===`replace`,disallowTypeAhead:K=!1,shouldUseVirtualFocus:Y,allowsTabNavigation:X=!1,isVirtualized:ee,scrollRef:te=r,linkBehavior:ce=`action`}=e,{direction:ue}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7$1(),de=$ea8dcbcb9ea1b556$export$9a302a45f65d0572(),fe=e=>{if(e.altKey&&e.key===`Tab`&&e.preventDefault(),!r.current.contains(e.target))return;let i=(n,r)=>{if(n!=null){if(t.isLink(n)&&ce===`selection`&&u&&!$feb5ffebff200149$export$d3e3bd3e26688c04(e)){(0,import_react_dom.flushSync)(()=>{t.setFocusedKey(n,r)});let i=te.current.querySelector(`[data-key="${CSS.escape(n.toString())}"]`),a=t.getItemProps(n);de.open(i,e,a.href,a.routerOptions);return}if(t.setFocusedKey(n,r),t.isLink(n)&&ce===`override`)return;e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(n):u&&!$feb5ffebff200149$export$d3e3bd3e26688c04(e)&&t.replaceSelection(n)}};switch(e.key){case`ArrowDown`:if(n.getKeyBelow){var K,Y,ee;let r=t.focusedKey==null?n.getFirstKey?.call(n):n.getKeyBelow?.call(n,t.focusedKey);r==null&&a&&(r=n.getFirstKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r))}break;case`ArrowUp`:if(n.getKeyAbove){var fe,me,ge;let r=t.focusedKey==null?n.getLastKey?.call(n):n.getKeyAbove?.call(n,t.focusedKey);r==null&&a&&(r=n.getLastKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r))}break;case`ArrowLeft`:if(n.getKeyLeftOf){var Te,Oe,Ae;let r=n.getKeyLeftOf?.call(n,t.focusedKey);r==null&&a&&(r=ue===`rtl`?n.getFirstKey?.call(n,t.focusedKey):n.getLastKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r,ue===`rtl`?`first`:`last`))}break;case`ArrowRight`:if(n.getKeyRightOf){var ze,qe,Ye;let r=n.getKeyRightOf?.call(n,t.focusedKey);r==null&&a&&(r=ue===`rtl`?n.getLastKey?.call(n,t.focusedKey):n.getFirstKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r,ue===`rtl`?`last`:`first`))}break;case`Home`:if(n.getFirstKey){e.preventDefault();let r=n.getFirstKey(t.focusedKey,$feb5ffebff200149$export$16792effe837dba3(e));t.setFocusedKey(r),$feb5ffebff200149$export$16792effe837dba3(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):u&&t.replaceSelection(r)}break;case`End`:if(n.getLastKey){e.preventDefault();let r=n.getLastKey(t.focusedKey,$feb5ffebff200149$export$16792effe837dba3(e));t.setFocusedKey(r),$feb5ffebff200149$export$16792effe837dba3(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):u&&t.replaceSelection(r)}break;case`PageDown`:if(n.getKeyPageBelow){let r=n.getKeyPageBelow(t.focusedKey);r!=null&&(e.preventDefault(),i(r))}break;case`PageUp`:if(n.getKeyPageAbove){let r=n.getKeyPageAbove(t.focusedKey);r!=null&&(e.preventDefault(),i(r))}break;case`a`:$feb5ffebff200149$export$16792effe837dba3(e)&&t.selectionMode===`multiple`&&c!==!0&&(e.preventDefault(),t.selectAll());break;case`Escape`:!o&&t.selectedKeys.size!==0&&(e.stopPropagation(),e.preventDefault(),t.clearSelection());break;case`Tab`:if(!X){if(e.shiftKey)r.current.focus();else{let e=$9bf71ea28793e738$export$2d6ec8fc375ceafa(r.current,{tabbable:!0}),t,n;do n=e.lastChild(),n&&(t=n);while(n);t&&!t.contains(document.activeElement)&&$7215afc6de606d6b$export$de79e2c695e052f3$1(t)}break}}},me=(0,import_react.useRef)({top:0,left:0});$e9faafb641e167db$export$90fc3a17d93f704c(te,`scroll`,ee?null:()=>{me.current={top:te.current.scrollTop,left:te.current.scrollLeft}});let ge=e=>{if(t.isFocused){e.currentTarget.contains(e.target)||t.setFocused(!1);return}if(e.currentTarget.contains(e.target)){if(t.setFocused(!0),t.focusedKey==null){let r=e=>{e!=null&&(t.setFocusedKey(e),u&&t.replaceSelection(e))},o=e.relatedTarget;var i,a;o&&e.currentTarget.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?r(t.lastSelectedKey??n.getLastKey()):r(t.firstSelectedKey??n.getFirstKey())}else ee||(te.current.scrollTop=me.current.top,te.current.scrollLeft=me.current.left);if(t.focusedKey!=null){let e=te.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);e&&(e.contains(document.activeElement)||$7215afc6de606d6b$export$de79e2c695e052f3$1(e),$507fabe10e71c6fb$export$630ff653c5ada6a9$1()===`keyboard`&&$2f04cbc44ee30ce0$export$c826860796309d1b(e,{containingElement:r.current}))}}},Te=e=>{e.currentTarget.contains(e.relatedTarget)||t.setFocused(!1)},Oe=(0,import_react.useRef)(i);(0,import_react.useEffect)(()=>
12{if(Oe.current){let e=null;i===`first`&&(e=n.getFirstKey()),i===`last`&&(e=n.getLastKey());let a=t.selectedKeys;if(a.size){for(let n of a)if(t.canSelectItem(n)){e=n;break}}t.setFocused(!0),t.setFocusedKey(e),e==null&&!Y&&$6a99195332edec8b$export$80f3e147d781571c(r.current)}},[]);let Ae=(0,import_react.useRef)(t.focusedKey);(0,import_react.useEffect)(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==Ae.current||Oe.current)&&te?.current){let e=$507fabe10e71c6fb$export$630ff653c5ada6a9$1(),n=r.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);if(!n)return;(e===`keyboard`||Oe.current)&&($2f04cbc44ee30ce0$export$53a0910f038337bd(te.current,n),e!==`virtual`&&$2f04cbc44ee30ce0$export$c826860796309d1b(n,{containingElement:r.current}))}!Y&&t.isFocused&&t.focusedKey==null&&Ae.current!=null&&$6a99195332edec8b$export$80f3e147d781571c(r.current),Ae.current=t.focusedKey,Oe.current=!1}),$e9faafb641e167db$export$90fc3a17d93f704c(r,`react-aria-focus-scope-restore`,e=>{e.preventDefault(),t.setFocused(!0)});let ze={onKeyDown:fe,onFocus:ge,onBlur:Te,onMouseDown(e){te.current===e.target&&e.preventDefault()}},{typeSelectProps:qe}=$fb3050f43d946246$export$e32c88dfddc6e1d8({keyboardDelegate:n,selectionManager:t});K||(ze=$3ef42575df84b30b$export$9d1611c77c2fe928$1(qe,ze));let Ye;return Y||(Ye=t.focusedKey==null?0:-1),{collectionProps:{...ze,tabIndex:Ye}}}function $880e95eb8b93ba9a$export$ecf600387e221c37(e){let{selectionManager:t,key:n,ref:r,shouldSelectOnPressUp:i,shouldUseVirtualFocus:a,focus:o,isDisabled:c,onAction:u,allowsDifferentPressOrigin:K,linkBehavior:Y=`action`}=e,X=$ea8dcbcb9ea1b556$export$9a302a45f65d0572(),ee=e=>{if(e.pointerType===`keyboard`&&$feb5ffebff200149$export$d3e3bd3e26688c04(e))t.toggleSelection(n);else{if(t.selectionMode===`none`)return;if(t.isLink(n)){if(Y===`selection`){let i=t.getItemProps(n);X.open(r.current,e,i.href,i.routerOptions),t.setSelectedKeys(t.selectedKeys);return}if(Y===`override`||Y===`none`)return}t.selectionMode===`single`?t.isSelected(n)&&!t.disallowEmptySelection?t.toggleSelection(n):t.replaceSelection(n):e&&e.shiftKey?t.extendSelection(n):t.selectionBehavior===`toggle`||e&&($feb5ffebff200149$export$16792effe837dba3(e)||e.pointerType===`touch`||e.pointerType===`virtual`)?t.toggleSelection(n):t.replaceSelection(n)}};(0,import_react.useEffect)(()=>{n===t.focusedKey&&t.isFocused&&!a&&(o?o():document.activeElement!==r.current&&$6a99195332edec8b$export$80f3e147d781571c(r.current))},[r,n,t.focusedKey,t.childFocusStrategy,t.isFocused,a]),c||=t.isDisabled(n);let te={};!a&&!c?te={tabIndex:n===t.focusedKey?0:-1,onFocus(e){e.target===r.current&&t.setFocusedKey(n)}}:c&&(te.onMouseDown=e=>{e.preventDefault()});let ce=t.isLink(n)&&Y===`override`,ue=t.isLink(n)&&Y!==`selection`&&Y!==`none`,de=!c&&t.canSelectItem(n)&&!ce,fe=(u||ue)&&!c,me=fe&&(t.selectionBehavior===`replace`?!de:!de||t.isEmpty),ge=fe&&de&&t.selectionBehavior===`replace`,Te=me||ge,Oe=(0,import_react.useRef)(null),Ae=Te&&de,ze=(0,import_react.useRef)(!1),qe=(0,import_react.useRef)(!1),Ye=e=>{if(u&&u(),ue){let i=t.getItemProps(n);X.open(r.current,e,i.href,i.routerOptions)}},Ze={};i?(Ze.onPressStart=e=>{Oe.current=e.pointerType,ze.current=Ae,e.pointerType===`keyboard`&&(!Te||$880e95eb8b93ba9a$var$isSelectionKey())&&ee(e)},K?(Ze.onPressUp=me?null:e=>{e.pointerType!==`keyboard`&&de&&ee(e)},Ze.onPress=me?Ye:null):Ze.onPress=e=>{if(me||ge&&e.pointerType!==`mouse`){if(e.pointerType===`keyboard`&&!$880e95eb8b93ba9a$var$isActionKey())return;Ye(e)}else e.pointerType!==`keyboard`&&de&&ee(e)}):(Ze.onPressStart=e=>{Oe.current=e.pointerType,ze.current=Ae,qe.current=me,de&&(e.pointerType===`mouse`&&!me||e.pointerType===`keyboard`&&(!fe||$880e95eb8b93ba9a$var$isSelectionKey()))&&ee(e)},Ze.onPress=e=>{(e.pointerType===`touch`||e.pointerType===`pen`||e.pointerType===`virtual`||e.pointerType===`keyboard`&&Te&&$880e95eb8b93ba9a$var$isActionKey()||e.pointerType===`mouse`&&qe.current)&&(Te?Ye(e):de&&ee(e))}),te[`data-key`]=n,Ze.preventFocusOnPress=a;let{pressProps:Qe,isPressed:et}=$f6c31cce2adf654f$export$45712eceda6fad21(Ze),nt=ge?e=>{Oe.current===`mouse`&&(e.stopPropagation(),e.preventDefault(),Ye(e))}:void 0,{longPressProps:rt}=$8a26561d2877236e$export$c24ed0104d07eab9({isDisabled:!Ae,onLongPress(e){e.pointerType===`touch`&&(ee(e),t.setSelectionBehavior(`toggle`))}}),it=e=>{Oe.current===`touch`&&ze.current&&e.preventDefault()},at=t.isLink(n)?e=>{$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening||e.preventDefault()}:void 0;return{itemProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(te,de||me?Qe:{},Ae?rt:{},{onDoubleClick:nt,onDragStartCapture:it,onClick:at}),isPressed:et,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focu
vendor: 12,010 bytes, line 12
12sedKey===n,isDisabled:c,allowsSelection:de,hasAction:Te}}function $880e95eb8b93ba9a$var$isActionKey(){return window.event?.key===`Enter`}function $880e95eb8b93ba9a$var$isSelectionKey(){let e=window.event;return e?.key===` `||e?.code===`Space`}var $657e4dc4a6e88df0$export$8f5ed9ff9f511381=class{getItemRect(e){let t=this.ref.current,n=e==null?null:t.querySelector(`[data-key="${CSS.escape(e.toString())}"]`);if(!n)return null;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-r.left+t.scrollLeft,y:i.top-r.top+t.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:e.scrollWidth,height:e.scrollHeight}}getVisibleRect(){let e=this.ref.current;return{x:e.scrollLeft,y:e.scrollTop,width:e.offsetWidth,height:e.offsetHeight}}constructor(e){this.ref=e}},$2a25aae57d74318e$export$a05409b8bb224a5a=class{isDisabled(e){var t;return this.disabledBehavior===`all`&&(e.props?.isDisabled||this.disabledKeys.has(e.key))}findNextNonDisabled(e,t){for(;e!=null;){let n=this.collection.getItem(e);if(n?.type===`item`&&!this.isDisabled(n))return e;e=t(e)}return null}getNextKey(e){return e=this.collection.getKeyAfter(e),this.findNextNonDisabled(e,e=>this.collection.getKeyAfter(e))}getPreviousKey(e){return e=this.collection.getKeyBefore(e),this.findNextNonDisabled(e,e=>this.collection.getKeyBefore(e))}findKey(e,t,n){let r=this.layoutDelegate.getItemRect(e);if(!r)return null;let i=r;do e=t(e),r=this.layoutDelegate.getItemRect(e);while(r&&n(i,r));return e}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}getKeyBelow(e){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getNextKey(e),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getPreviousKey(e),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,t){return t?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let t=this.direction===`ltr`?`getKeyRightOf`:`getKeyLeftOf`;return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[t](e))):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`rtl`):this.findKey(e,e=>this.getNextColumn(e,this.direction===`rtl`),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`rtl`):null}getKeyLeftOf(e){let t=this.direction===`ltr`?`getKeyLeftOf`:`getKeyRightOf`;return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[t](e))):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`ltr`):this.findKey(e,e=>this.getNextColumn(e,this.direction===`ltr`),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`ltr`):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyAfter(e))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyBefore(e))}getKeyPageAbove(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(!$cc38e7bd3fc7b213$export$2bb74740c4e19def(t))return this.getFirstKey();if(this.orientation===`horizontal`){let t=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>t;)e=this.getKeyAbove(e),n=e==null?null:this.layoutDelegate.getItemRect(e)}else{let t=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>t;)e=this.getKeyAbove(e),n=e==null?null:this.layoutDelegate.getItemRect(e)}return e??this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(!$cc38e7bd3fc7b213$export$2bb74740c4e19def(t))return this.getLastKey();if(this.orientation===`horizontal`){let t=Math.min(this.layoutDelegate.getContentSize().width,n.y-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<t;)e=this.getKeyBelow(e),n=e==null?null:this.layoutDelegate.getItemRect(e)}else{let t=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<t;)e=this.getKeyBelow(e),n=e==null?null:this.layoutDelegate.getItemRect(e)}return e??this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let n=this.collection,r=t||this.getFirstKey();for(;r!=null;){let t=n.getItem(r),i=t.textValue.slice(0,e.length);if(t.textValue&&this.collator.compare(i,e)===0)return r;r=this.getNextKey(r)}return null}constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||`all`,this.orientation=t.orientation||`vertical`,this.direction=t.direction,this.layout=t.layout||`stack`,this.layoutDelegate=t.layoutDelegate||new $657e4dc4a6e88df0$export$8f5ed9ff9f511381(t.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout=`stack`,this.orientation=`vertical`,this.disabledBehavior=`all`,this.layoutDelegate=new $657e4dc4a6e88df0$export$8f5ed9ff9f511381(this.ref);this.layout===`stack`&&this.orientation===`vertical`&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}};function $982254629710d113$export$b95089534ab7c1fd(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:a,layoutDelegate:o}=e,c=$325a3faab7a68acd$export$a16aca283550c30d({usage:`search`,sensitivity:`base`}),u=t.disabledBehavior,K=(0,import_react.useMemo)(()=>a||new $2a25aae57d74318e$export$a05409b8bb224a5a({collection:n,disabledKeys:r,disabledBehavior:u,ref:i,collator:c,layoutDelegate:o}),[a,o,n,r,i,c,u]),{collectionProps:Y}=$ae20dd8cbca75726$export$d6daf82dcd84e87c({...e,ref:i,selectionManager:t,keyboardDelegate:K});return{listProps:Y}}var $c0398ad35c3639b7$exports={};$c0398ad35c3639b7$exports={longPressMessage:`اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة`};var $7af657c4165927c3$exports={};$7af657c4165927c3$exports={longPressMessage:`Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто`};var $d95d4da6d531ab81$exports={};$d95d4da6d531ab81$exports={longPressMessage:`Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku`};var $24ebda9c775dca17$exports={};$24ebda9c775dca17$exports={longPressMessage:`Langt tryk eller tryk på Alt + pil ned for at åbne menuen`};var $743e0dfca6cab1e9$exports={};$743e0dfca6cab1e9$exports={longPressMessage:`Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen`};var $a2f41026e05f1c84$exports={};$a2f41026e05f1c84$exports={longPressMessage:`Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού`};var $43b800e97c901737$exports={};$43b800e97c901737$exports={longPressMessage:`Long press or press Alt + ArrowDown to open menu`};var $442f5f6ac211e29f$exports={};$442f5f6ac211e29f$exports={longPressMessage:`Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú`};var $dff280acfeb2d8ac$exports={};$dff280acfeb2d8ac$exports={longPressMessage:`Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool`};var $51608325613944d7$exports={};$51608325613944d7$exports={longPressMessage:`Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli`};var $c4a1b1eabeaa87be$exports={};$c4a1b1eabeaa87be$exports={longPressMessage:`Appuyez de manière prolongée ou appuyez sur Alt\xA0+\xA0Flèche vers le bas pour ouvrir le menu.`};var $8c74815cdee18d1b$exports={};$8c74815cdee18d1b$exports={longPressMessage:`לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט`};var $fd0e9ef6a7fe0ec9$exports={};$fd0e9ef6a7fe0ec9$exports={longPressMessage:`Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika`};var $a89a74a39eba465a$exports={};$a89a74a39eba465a$exports={longPressMessage:`Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához`};var $edc7c66594a0ae8a$exports={};$edc7c66594a0ae8a$exports={longPressMessage:`Premere a lungo o premere Alt + Freccia giù per aprire il menu`};var $f1ab51510712db52$exports={};$f1ab51510712db52$exports={longPressMessage:`長押しまたは Alt+下矢印キーでメニューを開く`};var $f9b672d9b82fa3d6$exports={};$f9b672d9b82fa3d6$exports={longPressMessage:`길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기`};var $a385f3910feda499$exports={};$a385f3910feda499$exports={longPressMessage:`Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“.`};var $4f1bde932c441789$exports={};$4f1bde932c441789$exports={longPressMessage:`Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa`};var $914a51a8a594d5be$exports={};$914a51a8a594d5be$exports={longPressMessage:`Langt trykk eller trykk Alt + PilNed for å åpne menyen`};var $89aaf803103bb500$exports={};$89aaf803103bb500$exports={longPressMessage:`Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen`};var $c685891476dbaaca$exports={};$c685891476dbaaca$exports={longPressMessage:`Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu`};var $885879b9b10c2959$exports={};$885879b9b10c2959$exports={longPressMessage:`Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu`};var $6b39616688a51692$exports={};$6b39616688a51692$exports={longPressMessage:`Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu`};var $f26362aed63f47e2$exports={};$f26362aed63f47e2$exports={longPressMessage:`Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul`};var $06cbade644558bf0$exports={};$06cbade644558bf0$exports={longPressMessage:`Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню`};var $0a391ff68f9d59b1$exports={};$0a391ff68f9d59b1$exports={longPressMessage:`Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol`};var $8193cf0e649c7928$exports={};$8193cf0e649c7928$exports={longPressMessage:`Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol`};var $f398debcce5a5c55$exports={};$f398debcce5a5c55$exports={longPressMessage:`Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni`};var $9e9fef000aa4c013$exports={};$9e9fef000aa4c013$exports={longPressMessage:`Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn`};var $c016c8183bbe3d68$exports={};$c016c8183bbe3d68$exports={longPressMessage:`Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın`};var $ca4f6c8462244e62$exports={};$ca4f6c8462244e62$exports={longPressMessage:`Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню`};var $2d9960c02ccac927$exports={};$2d9960c02ccac927$exports={longPressMessage:`长按或按 Alt + 向下方向键以打开菜单`};var $f1b682a4c8c5631c$exports={};$f1b682a4c8c5631c$exports={longPressMessage:`長按或按 Alt+向下鍵以開啟功能表`};var $2cbb7ca666678a14$exports={};$2cbb7ca666678a14$exports={"ar-AE":$c0398ad35c3639b7$exports,"bg-BG":$7af657c4165927c3$exports,"cs-CZ":$d95d4da6d531ab81$exports,"da-DK":$24ebda9c775dca17$exports,"de-DE":$743e0dfca6cab1e9$exports,"el-GR":$a2f41026e05f1c84$exports,"en-US":$43b800e97c901737$exports,"es-ES":$442f5f6ac211e29f$exports,"et-EE":$dff280acfeb2d8ac$exports,"fi-FI":$51608325613944d7$exports,"fr-FR":$c4a1b1eabeaa87be$exports,"he-IL":$8c74815cdee18d1b$exports,"hr-HR":$fd0e9ef6a7fe0ec9$exports,"hu-HU":$a89a74a39eba465a$exports,"it-IT":$edc7c66594a0ae8a$exports,"ja-JP":$f1ab51510712db52$exp
12orts,"ko-KR":$f9b672d9b82fa3d6$exports,"lt-LT":$a385f3910feda499$exports,"lv-LV":$4f1bde932c441789$exports,"nb-NO":$914a51a8a594d5be$exports,"nl-NL":$89aaf803103bb500$exports,"pl-PL":$c685891476dbaaca$exports,"pt-BR":$885879b9b10c2959$exports,"pt-PT":$6b39616688a51692$exports,"ro-RO":$f26362aed63f47e2$exports,"ru-RU":$06cbade644558bf0$exports,"sk-SK":$0a391ff68f9d59b1$exports,"sl-SI":$8193cf0e649c7928$exports,"sr-SP":$f398debcce5a5c55$exports,"sv-SE":$9e9fef000aa4c013$exports,"tr-TR":$c016c8183bbe3d68$exports,"uk-UA":$ca4f6c8462244e62$exports,"zh-CN":$2d9960c02ccac927$exports,"zh-TW":$f1b682a4c8c5631c$exports};function $parcel$interopDefault$4(e){return e&&e.__esModule?e.default:e}function $168583247155ddda$export$dc9c12ed27dd1b49(e,t,n){let{type:r=`menu`,isDisabled:i,trigger:a=`press`}=e,o=$bdb11010cef70236$export$f680877a34711e37$1(),{triggerProps:c,overlayProps:u}=$628037886ba31236$export$f9d5c8beee7d008d({type:r},t,n),K=e=>{if(!i&&(a!==`longPress`||e.altKey)&&n&&n.current)switch(e.key){case`Enter`:case` `:if(a===`longPress`)return;case`ArrowDown`:`continuePropagation`in e||e.stopPropagation(),e.preventDefault(),t.toggle(`first`);break;case`ArrowUp`:`continuePropagation`in e||e.stopPropagation(),e.preventDefault(),t.toggle(`last`);break;default:`continuePropagation`in e&&e.continuePropagation()}},Y=$fca6afa0e843324b$export$f12b703ca79dfbb1$1($parcel$interopDefault$4($2cbb7ca666678a14$exports),`@react-aria/menu`),{longPressProps:X}=$8a26561d2877236e$export$c24ed0104d07eab9({isDisabled:i||a!==`longPress`,accessibilityDescription:Y.format(`longPressMessage`),onLongPressStart(){t.close()},onLongPress(){t.open(`first`)}}),ee={onPressStart(e){e.pointerType!==`touch`&&e.pointerType!==`keyboard`&&!i&&t.open(e.pointerType===`virtual`?`first`:null)},onPress(e){e.pointerType===`touch`&&!i&&t.toggle()}};return delete c.onPress,{menuTriggerProps:{...c,...a===`press`?ee:X,id:o,onKeyDown:K},menuProps:{...u,"aria-labelledby":o,autoFocus:t.focusStrategy||!0,onClose:t.close}}}var $d5336fe17ce95402$export$6f49b4016bfc8d56=new WeakMap;function $d5336fe17ce95402$export$38eaa17faae8f579(e,t,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:a,...o}=e;!e[`aria-label`]&&!e[`aria-labelledby`]&&console.warn(`An aria-label or aria-labelledby prop is required for accessibility.`);let c=$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(e,{labelable:!0}),{listProps:u}=$982254629710d113$export$b95089534ab7c1fd({...o,ref:n,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,shouldFocusWrap:r,linkBehavior:`override`});return $d5336fe17ce95402$export$6f49b4016bfc8d56.set(t,{onClose:e.onClose,onAction:e.onAction}),{menuProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(c,{onKeyDown:i,onKeyUp:a},{role:`menu`,...u,onKeyDown:e=>{e.key!==`Escape`&&u.onKeyDown(e)}})}}function $a2e5df62f93c7633$export$9d32628fc2aea7da(e,t,n){let{id:r,key:i,closeOnSelect:a,isVirtualized:o,"aria-haspopup":c,onPressStart:u,onPressUp:K,onPress:Y,onPressChange:X,onPressEnd:ee,onHoverStart:te,onHoverChange:ce,onHoverEnd:ue,onKeyDown:de,onKeyUp:fe,onFocus:me,onFocusChange:ge,onBlur:Te}=e,Oe=!!c;var Ae;let ze=e.isDisabled??t.selectionManager.isDisabled(i);var qe;let Ye=e.isSelected??t.selectionManager.isSelected(i),Ze=$d5336fe17ce95402$export$6f49b4016bfc8d56.get(t),Qe=t.collection.getItem(i),et=e.onClose||Ze.onClose,nt=$ea8dcbcb9ea1b556$export$9a302a45f65d0572(),rt=t=>{var n;if(!Oe){if(Qe!=null&&Qe.props?.onAction?Qe.props.onAction():e.onAction&&e.onAction(i),Ze.onAction){let e=Ze.onAction;e(i)}t.target instanceof HTMLAnchorElement&&nt.open(t.target,t,Qe.props.href,Qe.props.routerOptions)}},it=`menuitem`;Oe||(t.selectionManager.selectionMode===`single`?it=`menuitemradio`:t.selectionManager.selectionMode===`multiple`&&(it=`menuitemcheckbox`));let at=$bdb11010cef70236$export$b4cc09c592e8fdb8$1(),ot=$bdb11010cef70236$export$b4cc09c592e8fdb8$1(),st=$bdb11010cef70236$export$b4cc09c592e8fdb8$1(),ct={id:r,"aria-disabled":ze||void 0,role:it,"aria-label":e[`aria-label`],"aria-labelledby":at,"aria-describedby":[ot,st].filter(Boolean).join(` `)||void 0,"aria-controls":e[`aria-controls`],"aria-haspopup":c,"aria-expanded":e[`aria-expanded`]};t.selectionManager.selectionMode!==`none`&&!Oe&&(ct[`aria-checked`]=Ye),o&&(ct[`aria-posinset`]=Qe?.index,ct[`aria-setsize`]=$453cc9f0df89c0a5$export$77d5aafae4e095b2(t.collection));let lt=e=>{e.pointerType===`keyboard`&&rt(e),u?.(e)},ut=e=>{e.pointerType!==`keyboard`&&(rt(e),!Oe&&et&&(a??(t.selectionManager.selectionMode!==`multiple`||t.selectionManager.isLink(i)))&&et()),K?.(e)},{itemProps:dt,isFocused:ft}=$880e95eb8b93ba9a$export$ecf600387e221c37({selectionManager:t.selectionManager,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:`none`}),{pressProps:pt,isPressed:mt}=$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:lt,onPress:Y,onPressUp:ut,onPressChange:X,onPressEnd:ee,isDisabled:ze}),{hoverProps:ht}=$6179b936705e76d3$export$ae780daf29e6d456$1({isDisabled:ze,onHoverStart(e){$507fabe10e71c6fb$export$b9b3dfddab17db27()||(t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(i)),te?.(e)},onHoverChange:ce,onHoverEnd:ue}),{keyboardProps:gt}=$46d819fcbaf35654$export$8f71654801c2f7cd({onKeyDown:e=>{if(e.repeat){e.continuePropagation();return}switch(e.key){case` `:!ze&&t.selectionManager.selectionMode===`none`&&!Oe&&a!==!1&&et&&et();break;case`Enter`:!ze&&a!==!1&&!Oe&&et&&et();break;default:Oe||e.continuePropagation(),de?.(e)}},onKeyUp:fe}),{focusProps:_t}=$a1ea59d68270f0dd$export$f8168d8dd8fd66e6({onBlur:Te,onFocus:me,onF
12ocusChange:ge}),vt=$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(Qe.props);delete vt.id;let yt=$ea8dcbcb9ea1b556$export$7e924b3091a3bd18(Qe.props);return{menuItemProps:{...ct,...$3ef42575df84b30b$export$9d1611c77c2fe928$1(vt,yt,Oe?{onFocus:dt.onFocus,"data-key":dt[`data-key`]}:dt,pt,ht,gt,_t),tabIndex:dt.tabIndex==null?void 0:-1},labelProps:{id:at},descriptionProps:{id:ot},keyboardShortcutProps:{id:st},isFocused:ft,isSelected:Ye,isPressed:mt,isDisabled:ze}}function $3e5eb2498db5b506$export$73f7a44322579622(e){let{heading:t,"aria-label":n}=e,r=$bdb11010cef70236$export$f680877a34711e37$1();return{itemProps:{role:`presentation`},headingProps:t?{id:r,role:`presentation`}:{},groupProps:{role:`group`,"aria-label":n,"aria-labelledby":t?r:void 0}}}var $f23889fffbde9058$exports={};$f23889fffbde9058$exports={calendar:`التقويم`,day:`يوم`,dayPeriod:`ص/م`,endDate:`تاريخ الانتهاء`,era:`العصر`,hour:`الساعات`,minute:`الدقائق`,month:`الشهر`,second:`الثواني`,selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:`تاريخ البدء`,timeZoneName:`التوقيت`,weekday:`اليوم`,year:`السنة`};var $09d9badaa8903929$exports={};$09d9badaa8903929$exports={calendar:`Календар`,day:`ден`,dayPeriod:`пр.об./сл.об.`,endDate:`Крайна дата`,era:`ера`,hour:`час`,minute:`минута`,month:`месец`,second:`секунда`,selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:`Начална дата`,timeZoneName:`часова зона`,weekday:`ден от седмицата`,year:`година`};var $151b77e0fd711730$exports={};$151b77e0fd711730$exports={calendar:`Kalendář`,day:`den`,dayPeriod:`část dne`,endDate:`Konečné datum`,era:`letopočet`,hour:`hodina`,minute:`minuta`,month:`měsíc`,second:`sekunda`,selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:`Počáteční datum`,timeZoneName:`časové pásmo`,weekday:`den v týdnu`,year:`rok`};var $61915aa8630b90a2$exports={};$61915aa8630b90a2$exports={calendar:`Kalender`,day:`dag`,dayPeriod:`AM/PM`,endDate:`Slutdato`,era:`æra`,hour:`time`,minute:`minut`,month:`måned`,second:`sekund`,selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:`Startdato`,timeZoneName:`tidszone`,weekday:`ugedag`,year:`år`};var $35cea00159787840$exports={};$35cea00159787840$exports={calendar:`Kalender`,day:`Tag`,dayPeriod:`Tageshälfte`,endDate:`Enddatum`,era:`Epoche`,hour:`Stunde`,minute:`Minute`,month:`Monat`,second:`Sekunde`,selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:`Anfangsdatum`,timeZoneName:`Zeitzone`,weekday:`Wochentag`,year:`Jahr`};var $518b4e82b9eacafd$exports={};$518b4e82b9eacafd$exports={calendar:`Ημερολόγιο`,day:`ημέρα`,dayPeriod:`π.μ./μ.μ.`,endDate:`Ημερομηνία λήξης`,era:`περίοδος`,hour:`ώρα`,minute:`λεπτό`,month:`μήνας`,second:`δευτερόλεπτο`,selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}
12: ${e.time}`,startDate:`Ημερομηνία έναρξης`,timeZoneName:`ζώνη ώρας`,weekday:`καθημερινή`,year:`έτος`};var $1c2b297f7e2cf474$exports={};$1c2b297f7e2cf474$exports={era:`era`,year:`year`,month:`month`,day:`day`,hour:`hour`,minute:`minute`,second:`second`,dayPeriod:`AM/PM`,calendar:`Calendar`,startDate:`Start Date`,endDate:`End Date`,weekday:`day of the week`,timeZoneName:`time zone`,selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`};var $07f628a707cf9b18$exports={};$07f628a707cf9b18$exports={calendar:`Calendario`,day:`día`,dayPeriod:`a.\xA0m./p.\xA0m.`,endDate:`Fecha final`,era:`era`,hour:`hora`,minute:`minuto`,month:`mes`,second:`segundo`,selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:`Fecha de inicio`,timeZoneName:`zona horaria`,weekday:`día de la semana`,year:`año`};var $db553ffe17c7f4db$exports={};$db553ffe17c7f4db$exports={calendar:`Kalender`,day:`päev`,dayPeriod:`enne/pärast lõunat`,endDate:`Lõppkuupäev`,era:`ajastu`,hour:`tund`,minute:`minut`,month:`kuu`,second:`sekund`,selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:`Alguskuupäev`,timeZoneName:`ajavöönd`,weekday:`nädalapäev`,year:`aasta`};var $4afcfe00cd703f83$exports={};$4afcfe00cd703f83$exports={calendar:`Kalenteri`,day:`päivä`,dayPeriod:`vuorokaudenaika`,endDate:`Päättymispäivä`,era:`aikakausi`,hour:`tunti`,minute:`minuutti`,month:`kuukausi`,second:`sekunti`,selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:`Alkamispäivä`,timeZoneName:`aikavyöhyke`,weekday:`viikonpäivä`,year:`vuosi`};var $1d2645d18d4c5be0$exports={};$1d2645d18d4c5be0$exports={calendar:`Calendrier`,day:`jour`,dayPeriod:`cadran`,endDate:`Date de fin`,era:`ère`,hour:`heure`,minute:`minute`,month:`mois`,second:`seconde`,selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:`Date de début`,timeZoneName:`fuseau horaire`,weekday:`jour de la semaine`,year:`année`};var $64cb6a9be1f6fa48$exports={};$64cb6a9be1f6fa48$exports={calendar:`לוח שנה`,day:`יום`,dayPeriod:`לפנה״צ/אחה״צ`,endDate:`תאריך סיום`,era:`תקופה`,hour:`שעה`,minute:`דקה`,month:`חודש`,second:`שנייה`,selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:`תאריך התחלה`,timeZoneName:`אזור זמן`,weekday:`יום בשבוע`,year:`שנה`};var $2a1ef2e8050be27a$exports={};$2a1ef2e8050be27a$exports={calendar:`Kalendar`,day:`dan`,dayPeriod:`AM/PM`,endDate:`Datum završetka`,era:`era`,hour:`sat`,minute:`minuta`,month:`mjesec`,second:`sekunda`,selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:`Datum početka`,timeZoneName:`vremenska zona`,weekday:`dan u tjednu`,year:`godina`};var $ad429dca102acd0e$exports={};$ad429dca102acd0e$exports={calendar:`Naptár`,day:`nap`,dayPeriod:`napszak`,endDate:`Befejező dátum`,era:`éra`,hour:`óra`,minute:`perc`,month:`hónap`,second:`másodperc`,selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}
12: ${e.time}`,startDate:`Kezdő dátum`,timeZoneName:`időzóna`,weekday:`hét napja`,year:`év`};var $6e68cb5d1cb97bd2$exports={};$6e68cb5d1cb97bd2$exports={calendar:`Calendario`,day:`giorno`,dayPeriod:`AM/PM`,endDate:`Data finale`,era:`era`,hour:`ora`,minute:`minuto`,month:`mese`,second:`secondo`,selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:`Data iniziale`,timeZoneName:`fuso orario`,weekday:`giorno della settimana`,year:`anno`};var $a82ee9af063ee069$exports={};$a82ee9af063ee069$exports={calendar:`カレンダー`,day:`日`,dayPeriod:`午前/午後`,endDate:`終了日`,era:`時代`,hour:`時`,minute:`分`,month:`月`,second:`秒`,selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:`開始日`,timeZoneName:`タイムゾーン`,weekday:`曜日`,year:`年`};var $67e9091dbf37d4eb$exports={};$67e9091dbf37d4eb$exports={calendar:`달력`,day:`일`,dayPeriod:`오전/오후`,endDate:`종료일`,era:`연호`,hour:`시`,minute:`분`,month:`월`,second:`초`,selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:`시작일`,timeZoneName:`시간대`,weekday:`요일`,year:`년`};var $75834f9729f653d1$exports={};$75834f9729f653d1$exports={calendar:`Kalendorius`,day:`diena`,dayPeriod:`iki pietų / po pietų`,endDate:`Pabaigos data`,era:`era`,hour:`valanda`,minute:`minutė`,month:`mėnuo`,second:`sekundė`,selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:`Pradžios data`,timeZoneName:`laiko juosta`,weekday:`savaitės diena`,year:`metai`};var $a2df2c2520b4a7f0$exports={};$a2df2c2520b4a7f0$exports={calendar:`Kalendārs`,day:`diena`,dayPeriod:`priekšpusdienā/pēcpusdienā`,endDate:`Beigu datums`,era:`ēra`,hour:`stundas`,minute:`minūtes`,month:`mēnesis`,second:`sekundes`,selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:`Sākuma datums`,timeZoneName:`laika josla`,weekday:`nedēļas diena`,year:`gads`};var $aedcd71db4933ed5$exports={};$aedcd71db4933ed5$exports={calendar:`Kalender`,day:`dag`,dayPeriod:`a.m./p.m.`,endDate:`Sluttdato`,era:`tidsalder`,hour:`time`,minute:`minutt`,month:`måned`,second:`sekund`,selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:`Startdato`,timeZoneName:`tidssone`,weekday:`ukedag`,year:`år`};var $3b2df9e54353046c$exports={};$3b2df9e54353046c$exports={calendar:`Kalender`,day:`dag`,dayPeriod:`a.m./p.m.`,endDate:`Einddatum`,era:`tijdperk`,hour:`uur`,minute:`minuut`,month:`maand`,second:`seconde`,selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:`Startdatum`,timeZoneName:`tijdzone`,weekday:`dag van de week`,year:`jaar`};
12var $c03fe977fcfafe93$exports={};$c03fe977fcfafe93$exports={calendar:`Kalendarz`,day:`dzień`,dayPeriod:`rano / po południu / wieczorem`,endDate:`Data końcowa`,era:`era`,hour:`godzina`,minute:`minuta`,month:`miesiąc`,second:`sekunda`,selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:`Data początkowa`,timeZoneName:`strefa czasowa`,weekday:`dzień tygodnia`,year:`rok`};var $569f006fc292345f$exports={};$569f006fc292345f$exports={calendar:`Calendário`,day:`dia`,dayPeriod:`AM/PM`,endDate:`Data final`,era:`era`,hour:`hora`,minute:`minuto`,month:`mês`,second:`segundo`,selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:`Data inicial`,timeZoneName:`fuso horário`,weekday:`dia da semana`,year:`ano`};var $7c2494e14452f2dd$exports={};$7c2494e14452f2dd$exports={calendar:`Calendário`,day:`dia`,dayPeriod:`am/pm`,endDate:`Data de Término`,era:`era`,hour:`hora`,minute:`minuto`,month:`mês`,second:`segundo`,selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:`Data de Início`,timeZoneName:`fuso horário`,weekday:`dia da semana`,year:`ano`};var $eb82ef981b5592bf$exports={};$eb82ef981b5592bf$exports={calendar:`Calendar`,day:`zi`,dayPeriod:`a.m/p.m.`,endDate:`Dată final`,era:`eră`,hour:`oră`,minute:`minut`,month:`lună`,second:`secundă`,selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:`Dată început`,timeZoneName:`fus orar`,weekday:`ziua din săptămână`,year:`an`};var $6efa0e119f396950$exports={};$6efa0e119f396950$exports={calendar:`Календарь`,day:`день`,dayPeriod:`AM/PM`,endDate:`Дата окончания`,era:`эра`,hour:`час`,minute:`минута`,month:`месяц`,second:`секунда`,selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:`Дата начала`,timeZoneName:`часовой пояс`,weekday:`день недели`,year:`год`};var $7f5e57085d7f5049$exports={};$7f5e57085d7f5049$exports={calendar:`Kalendár`,day:`deň`,dayPeriod:`AM/PM`,endDate:`Dátum ukončenia`,era:`letopočet`,hour:`hodina`,minute:`minúta`,month:`mesiac`,second:`sekunda`,selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:`Dátum začatia`,timeZoneName:`časové pásmo`,weekday:`deň tý
12ždňa`,year:`rok`};var $578ee7c11dcdde7a$exports={};$578ee7c11dcdde7a$exports={calendar:`Koledar`,day:`dan`,dayPeriod:`dop/pop`,endDate:`Datum konca`,era:`doba`,hour:`ura`,minute:`minuta`,month:`mesec`,second:`sekunda`,selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:`Datum začetka`,timeZoneName:`časovni pas`,weekday:`dan v tednu`,year:`leto`};var $bbc3fd6cd0bc9d50$exports={};$bbc3fd6cd0bc9d50$exports={calendar:`Kalendar`,day:`дан`,dayPeriod:`пре подне/по подне`,endDate:`Datum završetka`,era:`ера`,hour:`сат`,minute:`минут`,month:`месец`,second:`секунд`,selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:`Datum početka`,timeZoneName:`временска зона`,weekday:`дан у недељи`,year:`година`};var $0b04512118591d2a$exports={};$0b04512118591d2a$exports={calendar:`Kalender`,day:`dag`,dayPeriod:`fm/em`,endDate:`Slutdatum`,era:`era`,hour:`timme`,minute:`minut`,month:`månad`,second:`sekund`,selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:`Startdatum`,timeZoneName:`tidszon`,weekday:`veckodag`,year:`år`};var $3a49d121fe4c9e1d$exports={};$3a49d121fe4c9e1d$exports={calendar:`Takvim`,day:`gün`,dayPeriod:`ÖÖ/ÖS`,endDate:`Bitiş Tarihi`,era:`çağ`,hour:`saat`,minute:`dakika`,month:`ay`,second:`saniye`,selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:`Başlangıç Tarihi`,timeZoneName:`saat dilimi`,weekday:`haftanın günü`,year:`yıl`};var $5ba21dbb8914919d$exports={};$5ba21dbb8914919d$exports={calendar:`Календар`,day:`день`,dayPeriod:`дп/пп`,endDate:`Дата завершення`,era:`ера`,hour:`година`,minute:`хвилина`,month:`місяць`,second:`секунда`,selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:`Дата початку`,timeZoneName:`часовий пояс`,weekday:`день тижня`,year:`рік`};var $51078838e1b16cd7$exports={};$51078838e1b16cd7$exports={calendar:`日历`,day:`日`,dayPeriod:`上午/下午`,endDate:`结束日期`,era:`纪元`,hour:`小时`,minute:`分钟`,month:`月`,second:`秒`,selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:`开始日期`,timeZoneName:`时区`,weekday:`工作日`,year:`年`};var $33fab8219207655a$exports={};$33fab8219207655a$exports={calendar:`日曆`,day:`日`,dayPeriod:`上午/下午`,endDate:`結束日期`,era:`纪元`,hour:`小时`,minute:`分钟`,month:`月`,second:`秒`,selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:`開始日期`,timeZoneName:`时区`,weekday:`工作日`,year:`年`};var $dfb4eba373ed9493$exports={};$dfb4eba373ed9493$exports={"ar-AE":$f23889fffbde9058$exports,"bg-BG":$09d9badaa8903929$exports,"cs-CZ":$151b77e0fd711730$exports,"da-DK":$61915aa8630b90a2$exports,"de-DE":$35cea00159787840$exports,"el-GR":$518b4e82b9eacafd$exports,"en-US":$1c2b297f7e2cf474$exports,"es-ES":$07f628a707cf9b18$exports,"et-EE":$db553ffe17c7f4db$exports,"fi-FI":$4afcfe00cd703f83$exports,"fr-FR":$1d2645d18d4c5be0$exports,"he-IL":$64cb6a9be1f6fa48$exports,"hr-HR":$2a1ef2e8050be27a$exports,"hu-HU":$ad429dca102acd0e$exports,"it-IT":$6e68cb5d1cb97bd2$exports,"ja-JP":$a82ee9af063ee069$exports,"ko-KR":$67e9091dbf37d4eb$exports,"lt-LT":$75834f9729f653d1$exports,"lv-LV":$a2df2c2520b4a7f0$exports,"nb-NO":$aedcd71db4933ed5$exports,"nl-NL":$3b2df9e54353046c$exports,"pl-PL":$c03fe977fcfafe93$exp
vendor: 11,801 bytes, line 12
12orts,"pt-BR":$569f006fc292345f$exports,"pt-PT":$7c2494e14452f2dd$exports,"ro-RO":$eb82ef981b5592bf$exports,"ru-RU":$6efa0e119f396950$exports,"sk-SK":$7f5e57085d7f5049$exports,"sl-SI":$578ee7c11dcdde7a$exports,"sr-SP":$bbc3fd6cd0bc9d50$exports,"sv-SE":$0b04512118591d2a$exports,"tr-TR":$3a49d121fe4c9e1d$exports,"uk-UA":$5ba21dbb8914919d$exports,"zh-CN":$51078838e1b16cd7$exports,"zh-TW":$33fab8219207655a$exports};function $3dfb0f96be0d6a08$export$4a931266a3838b86(e,t,n){let{direction:r}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7$1(),i=(0,import_react.useMemo)(()=>$9bf71ea28793e738$export$c5251b9e124bf29(t),[t]),a=t=>{if(t.currentTarget.contains(t.target)&&(t.altKey&&(t.key===`ArrowDown`||t.key===`ArrowUp`)&&`setOpen`in e&&(t.preventDefault(),t.stopPropagation(),e.setOpen(!0)),!n))switch(t.key){case`ArrowLeft`:t.preventDefault(),t.stopPropagation(),r===`rtl`?i.focusNext():i.focusPrevious();break;case`ArrowRight`:t.preventDefault(),t.stopPropagation(),r===`rtl`?i.focusPrevious():i.focusNext()}},o=()=>{var e;let n=window.event?.target,r=$9bf71ea28793e738$export$2d6ec8fc375ceafa(t.current,{tabbable:!0});if(n&&=(r.currentNode=n,r.previousNode()),!n){let e;do e=r.lastChild(),e&&(n=e);while(e)}for(;n?.hasAttribute(`data-placeholder`);){let e=r.previousNode();if(e&&e.hasAttribute(`data-placeholder`))n=e;else break}n&&n.focus()},{pressProps:c}=$f6c31cce2adf654f$export$45712eceda6fad21({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){e.pointerType===`mouse`&&o()},onPress(e){e.pointerType!==`mouse`&&o()}});return $3ef42575df84b30b$export$9d1611c77c2fe928$1(c,{onKeyDown:a})}function $parcel$interopDefault$3(e){return e&&e.__esModule?e.default:e}var $16f0b7bb276bc17e$export$653eddfc964b0f8a=new WeakMap,$16f0b7bb276bc17e$export$300019f83c56d282=`__role_`+Date.now(),$16f0b7bb276bc17e$export$7b3062cd49e80452=`__focusManager_`+Date.now();function $16f0b7bb276bc17e$export$5591b0b878c1a989(e,t,n){var r;let{isInvalid:i,validationErrors:a,validationDetails:o}=t.displayValidation,{labelProps:c,fieldProps:u,descriptionProps:K,errorMessageProps:Y}=$2baaea4c71418dea$export$294aa081a6c6f55d({...e,labelElementType:`span`,isInvalid:i,errorMessage:e.errorMessage||a}),X=(0,import_react.useRef)(null),{focusWithinProps:ee}=$9ab94262bd0047c7$export$420e68273165f4ec$1({...e,onFocusWithin(n){var r;X.current=t.value,(r=e.onFocus)==null||r.call(e,n)},onBlurWithin:n=>{var r;t.confirmPlaceholder(),t.value!==X.current&&t.commitValidation(),(r=e.onBlur)==null||r.call(e,n)},onFocusWithinChange:e.onFocusChange}),te=$fca6afa0e843324b$export$f12b703ca79dfbb1$1($parcel$interopDefault$3($dfb4eba373ed9493$exports),`@react-aria/datepicker`),ce=t.maxGranularity===`hour`?`selectedTimeDescription`:`selectedDateDescription`,ue=t.maxGranularity===`hour`?`time`:`date`,de=$ef06256079686ba0$export$f8aeda7b10753fa1(t.value?te.format(ce,{[ue]:t.formatValue({month:`long`})}):``),fe=e[$16f0b7bb276bc17e$export$300019f83c56d282]===`presentation`?u[`aria-describedby`]:[de[`aria-describedby`],u[`aria-describedby`]].filter(Boolean).join(` `)||void 0,me=e[$16f0b7bb276bc17e$export$7b3062cd49e80452],ge=(0,import_react.useMemo)(()=>me||$9bf71ea28793e738$export$c5251b9e124bf29(n),[me,n]),Te=$3dfb0f96be0d6a08$export$4a931266a3838b86(t,n,e[$16f0b7bb276bc17e$export$300019f83c56d282]===`presentation`);$16f0b7bb276bc17e$export$653eddfc964b0f8a.set(t,{ariaLabel:e[`aria-label`],ariaLabelledBy:[c.id,e[`aria-labelledby`]].filter(Boolean).join(` `)||void 0,ariaDescribedBy:fe,focusManager:ge});let Oe=(0,import_react.useRef)(e.autoFocus),Ae;Ae=e[$16f0b7bb276bc17e$export$300019f83c56d282]===`presentation`?{role:`presentation`}:$3ef42575df84b30b$export$9d1611c77c2fe928$1(u,{role:`group`,"aria-disabled":e.isDisabled||void 0,"aria-describedby":fe}),(0,import_react.useEffect)(()=>{Oe.current&&ge.focusFirst(),Oe.current=!1},[ge]),$99facab73266f662$export$5add1d006293d136(e.inputRef,t.value,t.setValue),$e93e671b31057976$export$b8473d3665f3a75a({...e,focus(){ge.focusFirst()}},t,e.inputRef);let ze={type:`hidden`,name:e.name,value:t.value?.toString()||``,disabled:e.isDisabled};e.validationBehavior===`native`&&(ze.type=`text`,ze.hidden=!0,ze.required=e.isRequired,ze.onChange=()=>{});let qe=$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(e);return{labelProps:{...c,onClick:()=>{ge.focusFirst()}},fieldProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(qe,Ae,Te,ee,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)}}),inputProps:ze,descriptionProps:K,errorMessageProps:Y,isInvalid:i,validationErrors:a,validationDetails:o}}function $parcel$interopDefault$2(e){return e&&e.__esModule?e.default:e}function $3aeceb3a64eb8358$export$d42c60378c8168f8(){let{locale:e}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7$1(),t=$fca6afa0e843324b$export$87b761675e8eaa10$1($parcel$interopDefault$2($dfb4eba373ed9493$exports),`@react-aria/datepicker`);return(0,import_react.useMemo)(()=>{try{return new Intl.DisplayNames(e,{type:`dateTimeField`})}catch{return new $3aeceb3a64eb8358$var$DisplayNamesPolyfill(e,t)}},[e,t])}var $3aeceb3a64eb8358$var$DisplayNamesPolyfill=class{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}};function $32489daedd52963e$export$1315d136e6f7581(e,t,n){let r=(0,import_react.useRef)(``),{locale:i}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7$1(),a=$3aeceb3a64eb8358$export$d42c60378c8168f8(),{ariaLabel:o,ariaLabelledBy:c,ariaDescribedBy:u,focusManager:K}=$16f0b7bb276bc17e$export$653eddfc964b0f8a.get(t),Y=e.isPlaceholder?``:e.text,X=(0,import_react.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),ee=$896ba0a80a8f4d36$export$85fd5fdf27bacc79({month:`long`,timeZone:X.timeZone}),te=$896ba0a80a8f4d36$export$85fd5fdf27bacc79({hour:`numeric`,hour12:X.hour12,timeZone:X.timeZone});if(e.type===`month`&&!e.isPlaceholder){let e=ee.format(t.dateValue);Y=e===Y?e:`${Y} \u{2013} ${e}`}else e.type===`hour`&&!e.isPlaceholder&&(Y=te.format(t.dateValue));let{spinButtonProps:ce}=$d2e8511e6f209edf$export$e908e06f4b8e3402({value:e.value,textValue:Y,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{r.current=``,t.increment(e.type)},onDecrement:()=>{r.current=``,t.decrement(e.type)},onIncrementPage:()=>{r.current=``,t.incrementPage(e.type)},onDecrementPage:()=>{r.current=``,t.decrementPage(e.type)},onIncrementToMax:()=>{r.current=``,t.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{r.current=``,t.setSegment(e.type,e.minValue)}}),ue=(0,import_react.useMemo)(()=>new $6c7bd7858deea686$export$cd11ab140839f11d(i,{maximumFractionDigits:0}),[i]),de=()=>{if(e.text===e.placeholder&&K.focusPrevious(),ue.isValidPartialNumber(e.text)&&!t.isReadOnly&&!e.isPlaceholder){let n=e.text.slice(0,-1),i=ue.parse(n);n=i===0?``:n,n.length===0||i===0?t.clearSegment(e.type):t.setSegment(e.type,i),r.current=n}else e.type===`dayPeriod`&&t.clearSegment(e.type)},fe=e=>{if(e.key===`a`&&($c87311424ea30a05$export$9ac100e40613ea10$1()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))switch(e.key){case`Backspace`:case`Delete`:e.preventDefault(),e.stopPropagation(),de()}},{startsWith:me}=$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:`base`}),ge=$896ba0a80a8f4d36$export$85fd5fdf27bacc79({hour:`numeric`,hour12:!0}),Te=(0,import_react.useMemo)(()=>{let e=new Date;return e.setHours(0),ge.formatToParts(e).find(e=>e.type===`dayPeriod`).value},[ge]),Oe=(0,import_react.useMemo)(()=>{let e=new Date;return e.setHours(12),ge.formatToParts(e).find(e=>e.type===`dayPeriod`).value},[ge]),Ae=$896ba0a80a8f4d36$export$85fd5fdf27bacc79({year:`numeric`,era:`narrow`,timeZone:`UTC`}),ze=(0,import_react.useMemo)(()=>{if(e.type!==`era`)return[];let n=$11d87f3f76e88657$export$b4a036af3fc0b032(new $35ea8db9cb2ccb90$export$99faa760c7908e4f(1,1,1),t.calendar),r=t.calendar.getEras().map(e=>{let t=n.set({year:1,month:1,day:1,era:e}).toDate(`UTC`);return{era:e,formatted:Ae.formatToParts(t).find(e=>e.type===`era`).value}}),i=$32489daedd52963e$var$commonPrefixLength(r.map(e=>e.formatted));if(i)for(let e of r)e.formatted=e.formatted.slice(i);return r},[Ae,t.calendar,e.type]),qe=n=>{if(t.isDisabled||t.isReadOnly)return;let i=r.current+n;switch(e.type){case`dayPeriod`:if(me(Te,n))t.setSegment(`dayPeriod`,0);else if(me(Oe,n))t.setSegment(`dayPeriod`,12);else break;K.focusNext();break;case`era`:{let e=ze.find(e=>me(e.formatted,n));e&&(t.setSegment(`era`,e.era),K.focusNext());break}case`day`:case`hour`:case`minute`:case`second`:case`month`:case`year`:{if(!ue.isValidPartialNumber(i))return;let a=ue.parse(i),o=a,c=e.minValue===0;if(e.type===`hour`&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case`h11`:a>11&&(o=ue.parse(n));break;case`h12`:c=!1,a>12&&(o=ue.parse(n))}e.value>=12&&a>1&&(a+=12)}else a>e.maxValue&&(o=ue.parse(n));if(isNaN(a))return;let u=o!==0||c;u&&t.setSegment(e.type,o),Number(a+`0`)>e.maxValue||i.length>=String(e.maxValue).length?(r.current=``,u&&K.focusNext()):r.current=i;break}}},Ye=()=>{r.current=``,$2f04cbc44ee30ce0$export$c826860796309d1b(n.current,{containingElement:$62d8ded9296f3872$export$cfa2225e87938781(n.current)}),window.getSelection().collapse(n.current)};$e9faafb641e167db$export$90fc3a17d93f704c((0,import_react.useRef)(typeof document<`u`?document:null),`selectionchange`,()=>{let e=window.getSelection();n.current&&n.current.contains(e.anchorNode)&&e.collapse(n.current)});let Ze=(0,import_react.useRef)(``);$e9faafb641e167db$export$90fc3a17d93f704c(n,`beforeinput`,r=>{switch(r.preventDefault(),r.inputType){case`deleteContentBackward`:case`deleteContentForward`:ue.isValidPartialNumber(e.text)&&!t.isReadOnly&&de();break;case`insertCompositionText`:Ze.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:r.data!=null&&qe(r.data)}}),$e9faafb641e167db$export$90fc3a17d93f704c(n,`input`,e=>{let{inputType:t,data:r}=e;t===`insertCompositionText`&&(n.current.textContent=Ze.current,(me(Te,r)||me(Oe,r))&&qe(r))}),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>{let e=n.current;return()=>{document.activeElement===e&&(K.focusPrevious()||K.focusNext())}},[n,K]);let Qe=$c87311424ea30a05$export$fedb369cb70207f1$1()||e.type===`timeZoneName`?{role:`textbox`,"aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e!==(0,import_react.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])&&!t.isInvalid&&(u=void 0);let et=$bdb11010cef70236$export$f680877a34711e37$1(),nt=!t.isDisabled&&!t.isReadOnly&&e.isEditable,rt=$313b98861ee5dd6c$export$d6875122194c7b44({"aria-label":`${e.type===`literal`?``:a.of(e.type)}${o?`, ${o}`:``}${c?`, `:``}`,"aria-labelledby":c});return e.type===`literal`?{segmentProps:{"aria-hidden":!0}}:{segmentProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(ce,rt,{id:et,...Qe,"aria-invalid":t.isInvalid?`true`:void 0,"aria-describedby":u,"aria-readonly":t.isReadOnly||!e.isEditable?`true`:void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:nt,suppressContentEditableWarning:nt,spellCheck:nt?`false`:void 0,autoCorrect:nt?`off`:void 0,enterKeyHint:nt?`next`:void 0,inputMode:t.isDisabled||e.type===`dayPeriod`||e.type===`era`||!nt?void 0:`numeric`,tabIndex:t.isDisabled?void 0:0,onKeyDown:fe,onFocus:Ye,style:{caretColor:`transparent`},onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}function $32489daedd52963e$var$commonPrefixLength(e){e.sort();let t=e[0],n=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==n[e])return e;return 0}function $40df3f8667284809$export$d55e7ee900f34e93(e,t){let{role:n=`dialog`}=e,r=$bdb11010cef70236$export$b4cc09c592e8fdb8$1();r=e[`aria-label`]?void 0:r;let i=(0,import_react.useRef)(!1);return(0,import_react.useEffect)(()=>
12{if(t.current&&!t.current.contains(document.activeElement)){$6a99195332edec8b$export$80f3e147d781571c(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),$6a99195332edec8b$export$80f3e147d781571c(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),$337b884510726a0d$export$14c98a7594375490(),{dialogProps:{...$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e[`aria-labelledby`]||r,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:r}}}function $204d9ebcedfb8806$export$ed5abd763a836edc(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:a,formatOptions:o={style:`percent`}}=e,c=$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(e,{labelable:!0}),{labelProps:u,fieldProps:K}=$d191a55c9702f145$export$8467354a121f1b9f({...e,labelElementType:`span`});t=$9446cca9a3875146$export$7d15b64cf5a3a4c4(t,n,r);let Y=(t-n)/(r-n),X=$a916eb452884faea$export$b7a616150fdb9f44(o);if(!a&&!i){let e=o.style===`percent`?Y:t;i=X.format(e)}return{progressBarProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(c,{...K,"aria-valuenow":a?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":a?void 0:i,role:`progressbar`}),labelProps:u}}var $884aeceb3d67f00f$export$37b65e5b5444d35c=new WeakMap;function $0d5c49892c1215da$export$37b0961d2f4751e2(e,t,n){let{value:r,children:i,"aria-label":a,"aria-labelledby":o}=e,c=e.isDisabled||t.isDisabled;i==null&&a==null&&o==null&&console.warn(`If you do not provide children, you must specify an aria-label for accessibility`);let u=t.selectedValue===r,K=e=>{e.stopPropagation(),t.setSelectedValue(r)},{pressProps:Y,isPressed:X}=$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:c}),{pressProps:ee,isPressed:te}=$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:c,onPress(){t.setSelectedValue(r)}}),{focusableProps:ce}=$e6afbd83fe6ebbd2$export$4c014de7c8940b4c($3ef42575df84b30b$export$9d1611c77c2fe928$1(e,{onFocus:()=>t.setLastFocusedValue(r)}),n),ue=$3ef42575df84b30b$export$9d1611c77c2fe928$1(Y,ce),de=$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(e,{labelable:!0}),fe=-1;t.selectedValue==null?(t.lastFocusedValue===r||t.lastFocusedValue==null)&&(fe=0):t.selectedValue===r&&(fe=0),c&&(fe=void 0);let{name:me,descriptionId:ge,errorMessageId:Te,validationBehavior:Oe}=$884aeceb3d67f00f$export$37b65e5b5444d35c.get(t);return $99facab73266f662$export$5add1d006293d136(n,t.selectedValue,t.setSelectedValue),$e93e671b31057976$export$b8473d3665f3a75a({validationBehavior:Oe},t,n),{labelProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(ee,{onClick:e=>e.preventDefault()}),inputProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(de,{...ue,type:`radio`,name:me,tabIndex:fe,disabled:c,required:t.isRequired&&Oe===`native`,checked:u,value:r,onChange:K,"aria-describedby":[e[`aria-describedby`],t.isInvalid?Te:null,ge].filter(
12Boolean).join(` `)||void 0}),isDisabled:c,isSelected:u,isPressed:X||te}}function $430f30ed08ec25fa$export$62b9571f283ff5c2(e,t){let{name:n,isReadOnly:r,isRequired:i,isDisabled:a,orientation:o=`vertical`,validationBehavior:c=`aria`}=e,{direction:u}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7$1(),{isInvalid:K,validationErrors:Y,validationDetails:X}=t.displayValidation,{labelProps:ee,fieldProps:te,descriptionProps:ce,errorMessageProps:ue}=$2baaea4c71418dea$export$294aa081a6c6f55d({...e,labelElementType:`span`,isInvalid:t.isInvalid,errorMessage:e.errorMessage||Y}),de=$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(e,{labelable:!0}),{focusWithinProps:fe}=$9ab94262bd0047c7$export$420e68273165f4ec$1({onBlurWithin(n){var r;(r=e.onBlur)==null||r.call(e,n),t.selectedValue||t.setLastFocusedValue(null)},onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange}),me=e=>{let n;switch(e.key){case`ArrowRight`:n=u===`rtl`&&o!==`vertical`?`prev`:`next`;break;case`ArrowLeft`:n=u===`rtl`&&o!==`vertical`?`next`:`prev`;break;case`ArrowDown`:n=`next`;break;case`ArrowUp`:n=`prev`;break;default:return}e.preventDefault();let r=$9bf71ea28793e738$export$2d6ec8fc375ceafa(e.currentTarget,{from:e.target}),i;n===`next`?(i=r.nextNode(),i||=(r.currentNode=e.currentTarget,r.firstChild())):(i=r.previousNode(),i||=(r.currentNode=e.currentTarget,r.lastChild())),i&&(i.focus(),t.setSelectedValue(i.value))},ge=$bdb11010cef70236$export$f680877a34711e37$1(n);return $884aeceb3d67f00f$export$37b65e5b5444d35c.set(t,{name:ge,descriptionId:ce.id,errorMessageId:ue.id,validationBehavior:c}),{radioGroupProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(de,{role:`radiogroup`,onKeyDown:me,"aria-invalid":t.isInvalid||void 0,"aria-errormessage":e[`aria-errormessage`],"aria-readonly":r||void 0,"aria-required":i||void 0,"aria-disabled":a||void 0,"aria-orientation":o,...te,...fe}),labelProps:ee,descriptionProps:ce,errorMessageProps:ue,isInvalid:K,validationErrors:Y,validationDetails:X}}function $f4b273590fab9f93$export$52210f68a14655d0(e){let t=$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(e,{labelable:!0}),n;return e.orientation===`vertical`&&(n=`vertical`),e.elementType===`hr`?{separatorProps:t}:{separatorProps:{...t,role:`separator`,"aria-orientation":n}}}var $99b62ae3ff97ec45$export$c5f62239608282b6=new WeakMap;function $99b62ae3ff97ec45$export$567fc7097e064344(e,t,n){return e?(typeof t==`string`&&(t=t.replace(/\s+/g,``)),`${$99b62ae3ff97ec45$export$c5f62239608282b6.get(e)}-${n}-${t}`):``}function $0175d55c2a017ebc$export$fdf4756d5b8ef90a(e,t,n){let{key:r,isDisabled:i,shouldSelectOnPressUp:a}=e,{selectionManager:o,selectedKey:c}=t,u=r===c,K=i||t.isDisabled||t.selectionManager.isDisabled(r),{itemProps:Y,isPressed:X}=$880e95eb8b93ba9a$export$ecf600387e221c37({selectionManager:o,key:r,ref:n,isDisabled:K,shouldSelectOnPressUp:a,linkBehavior:`selection`}),ee=$99b62ae3ff97ec45$export$567fc7097e064344(t,r,`tab`),te=$99b62ae3ff97ec45$export$567fc7097e064344(t,r,`tabpanel`),{tabIndex:ce}=Y,ue=t.collection.getItem(r),de=$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(ue?.props,{labelable:!0});return delete de.id,{tabProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1(de,$ea8dcbcb9ea1b556$export$7e924b3091a3bd18(ue?.props),Y,{id:ee,"aria-selected":u,"aria-disabled":K||void 0,"aria-controls":u?te:void 0,tabIndex:K?void 0:ce,role:`tab`}),isSelected:u,isDisabled:K,isPressed:X}}function $34bce698202e07cb$export$fae0121b5afe572d(e,t,n){let r=$83013635b024ae3d$export$eac1895992b9f3d6(n)?void 0:0;var i;let a=$99b62ae3ff97ec45$export$567fc7097e064344(t,e.id??t?.selectedKey,`tabpanel`);return{tabPanelProps:$3ef42575df84b30b$export$9d1611c77c2fe928$1($313b98861ee5dd6c$export$d6875122194c7b44({...e,id:a,"aria-labelledby":$99b62ae3ff97ec45$export$567fc7097e064344(t,t?.selectedKey,`tab`)}),{tabIndex:r,role:`tabpanel`,"aria-describedby":e[`aria-describedby`],"aria-details":e[`aria-details`]})}}var $bfc6f2d60b8a4c40$export$15010ca3c1abe90b=class{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){var t,n;return this.disabledKeys.has(e)||!!((n=this.collection.getItem(e))!=null&&n.props?.isDisabled)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}
12getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){do e=this.collection.getKeyAfter(e),e??=this.collection.getFirstKey();while(this.isDisabled(e));return e}getPreviousKey(e){do e=this.collection.getKeyBefore(e),e??=this.collection.getLastKey();while(this.isDisabled(e));return e}constructor(e,t,n,r=new Set){this.collection=e,this.flipDirection=t===`rtl`&&n===`horizontal`,this.disabledKeys=r,this.tabDirection=n===`horizontal`}};function $58d314389b21fa3f$export$773e389e644c5874(e,t,n){let{orientation:r=`horizontal`,keyboardActivation:i=`automatic`}=e,{collection:a,selectionManager:o,disabledKeys:c}=t,{direction:u}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7$1(),{collectionProps:K}=$ae20dd8cbca75726$export$d6daf82dcd84e87c({ref:n,selectionManager:o,keyboardDelegate:(0,import_react.useMemo)(()=>new $bfc6f2d60b8a4c40$export$15010ca3c1abe90b(a,u,r,c),[a,c,r,u]),selectOnFocus:i===`automatic`,disallowEmptySelection:!0,scrollRef:n,linkBehavior:`selection`}),Y=$bdb11010cef70236$export$f680877a34711e37$1();return $99b62ae3ff97ec45$export$c5f62239608282b6.set(t,Y),{tabListProps:{...$3ef42575df84b30b$export$9d1611c77c2fe928$1(K,$313b98861ee5dd6c$export$d6875122194c7b44({...e,id:Y})),role:`tablist`,"aria-orientation":r,tabIndex:void 0}}}var require_lottie=__commonJSMin(((exports,module)=>{typeof document<`u`&&typeof navigator<`u`&&(function(e,t){typeof exports==`object`&&module!==void 0?module.exports=t():typeof define==`function`&&define.amd?define(t):(e=typeof globalThis<`u`?globalThis:e||self,e.lottie=t())})(exports,(function(){var svgNS=`http://www.w3.org/2000/svg`,locationHref=``,_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var n,r=e.length,i;for(n=0;n<r;n+=1)for(var a in i=e[n].prototype,i)Object.prototype.hasOwnProperty.call(i,a)&&(t.prototype[a]=i[a])}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(e){this.audios.push(e)},pause:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].pause()},resume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].resume()},setRate:function(e){var t,n=this.audios.length;for(t=0;t<n;t+=1)this.audios[t].setRate(e)},createAudio:function(e){return this.audioFactory?this.audioFactory(e):window.Howl?new window.Howl({src:[e]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(e){this.audioFactory=e},setVolume:function(e){this._volume=e,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].volume(this._volume*+!this._isMuted)}},function(){return new e}}(),createTypedArray=function(){function e(e,t){var n=0,r=[],i;switch(e){case`int16`:case`uint8c`:i=1;break;default:i=1.1}for(n=0;n<t;n+=1)r.push(i);return r}function t(t,n){return t===`float32`?new Float32Array(n):t===`int16`?new Int16Array(n):t===`uint8c`?new Uint8ClampedArray(n):e(t,n)}return typeof Uint8ClampedArray==`function`&&typeof Float32Array==`function`?t:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){"@babel/helpers - typeof";return _typeof$6=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},_typeof$6(e)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1=``,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var e=`abs.acos.acosh.asin.asinh.atan.atanh.atan2.ceil.cbrt.expm1.clz32.cos.cosh.exp.floor.fround.hypot.imul.log.log1p.log2.log10.max.min.pow.random.round.sign.sin.sinh.sqrt.tan.tanh.trunc.E.LN10.LN2.LOG10E.LOG2E.PI.SQRT1_2.SQRT2`.split(`.`),t,n=e.length;for(t=0;t<n;t+=1)BMMath[e[t]]=Math[e[t]]})();function ProjectInterface$1(){return{}}BMMath.random=Math.random,BMMath.abs=function(e){if(_typeof$6(e)===`object`&&e.length){var t=createSizedArray(e.length),n,r=e.length;for(n=0;n<r;n+=1)t[n]=Math.abs(e[n]);return t}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(e){_shouldRoundValues=!!e}function bmRnd(e){return _shouldRoundValues?Math.round(e):e}function styleDiv(e){e.style.position=`absolute`,e.style.top=0,e.style.left=0,e.style.display=`block`,e.style.transformOrigin=`0 0`,e.style.webkitTransformOrigin=`0 0`,e.style.backfaceVisibility=`visible`,e.style.webkitBackfaceVisibility=`visible`,e.style.transformStyle=`preserve-3d`,e.style.webkitTransformStyle=`preserve-3d`,e.style.mozTransformStyle=`preserve-3d`}function BMEnterFrameEvent(e,t,n,r){this.type=e,this.currentTime=t,this.totalTime=n,this.direction=r<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,n,r){this.type=e,this.currentLoop=n,this.totalLoops=t,this.direction=r<0?-1:1}function BMSegmentStartEvent(e,t,n){this.type=e,this.firstFrame=t,this.totalFrames=n}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type=`renderFrameError`,this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type=`configError`,this.nativeError=e}function BMAnimationConfigErrorEvent(e,t){this.type=e,this.nativeError=t}var createElementID=function(){var e=0;return function(){return e+=1,idPrefix$1+`__lottie_element_`+e}}();function HSVtoRGB(e,t,n){var r,i,a,o=Math.floor(e*6),c=e*6-o,u=n*(1-t),K=n*(1-c*t),Y=n*(1-(1-c)*t);switch(o%6){case 0:r=n,i=Y,a=u;break;case 1:r=K,i=n,a=u;break;case 2:r=u,i=n,a=Y;break;case 3:r=u,i=K,a=n;break;case 4:r=Y,i=u,a=n;break;case 5:r=n,i=u,a=K}return[r,i,a]}
vendor: 39,749 bytes, lines 12-13
12function RGBtoHSV(e,t,n){var r=Math.max(e,t,n),i=Math.min(e,t,n),a=r-i,o,c=r===0?0:a/r,u=r/255;switch(r){case i:o=0;break;case e:o=t-n+a*(t<n?6:0),o/=6*a;break;case t:o=n-e+a*2,o/=6*a;break;case n:o=e-t+a*4,o/=6*a}return[o,c,u]}function addSaturationToRGB(e,t){var n=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return n[1]+=t,n[1]>1?n[1]=1:n[1]<=0&&(n[1]=0),HSVtoRGB(n[0],n[1],n[2])}function addBrightnessToRGB(e,t){var n=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return n[2]+=t,n[2]>1?n[2]=1:n[2]<0&&(n[2]=0),HSVtoRGB(n[0],n[1],n[2])}function addHueToRGB(e,t){var n=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return n[0]+=t/360,n[0]>1?--n[0]:n[0]<0&&(n[0]+=1),HSVtoRGB(n[0],n[1],n[2])}var rgbToHex=function(){for(var e=[],t=0,n;t<256;t+=1)n=t.toString(16),e[t]=n.length===1?`0`+n:n;return function(t,n,r){return t<0&&(t=0),n<0&&(n=0),r<0&&(r=0),`#`+e[t]+e[n]+e[r]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e},getIdPrefix=function(){return idPrefix$1};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){"@babel/helpers - typeof";return _typeof$5=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},_typeof$5(e)}var dataManager=function(){var e=1,t=[],n,r,i={onmessage:function(){},postMessage:function(e){n({data:e})}},a={postMessage:function(e){i.onmessage({data:e})}};function o(e){if(window.Worker&&window.Blob&&getWebWorker()){var t=new Blob([`var _workerSelf = self; self.onmessage = `,e.toString()],{type:`text/javascript`}),r=URL.createObjectURL(t);return new Worker(r)}return n=e,i}function c(){r||(r=o(function(e){function t(){function e(t,n){var o,c,u=t.length,K,Y,X,ee;for(c=0;c<u;c+=1)if(o=t[c],`ks`in o&&!o.completed){if(o.completed=!0,o.hasMask){var ce=o.masksProperties;for(Y=ce.length,K=0;K<Y;K+=1)if(ce[K].pt.k.i)a(ce[K].pt.k);else for(ee=ce[K].pt.k.length,X=0;X<ee;X+=1)ce[K].pt.k[X].s&&a(ce[K].pt.k[X].s[0]),ce[K].pt.k[X].e&&a(ce[K].pt.k[X].e[0])}o.ty===0?(o.layers=r(o.refId,n),e(o.layers,n)):o.ty===4?i(o.shapes):o.ty===5&&te(o)}}function t(t,n){if(t){var i=0,a=t.length;for(i=0;i<a;i+=1)t[i].t===1&&(t[i].data.layers=r(t[i].data.refId,n),e(t[i].data.layers,n))}}function n(e,t){for(var n=0,r=t.length;n<r;){if(t[n].id===e)return t[n];n+=1}return null}function r(e,t){var r=n(e,t);return r?r.layers.__used?JSON.parse(JSON.stringify(r.layers)):(r.layers.__used=!0,r.layers):null}function i(e){var t,n=e.length,r,o;for(t=n-1;t>=0;--t)if(e[t].ty===`sh`){if(e[t].ks.k.i)a(e[t].ks.k);else for(o=e[t].ks.k.length,r=0;r<o;r+=1)e[t].ks.k[r].s&&a(e[t].ks.k[r].s[0]),e[t].ks.k[r].e&&a(e[t].ks.k[r].e[0])}else e[t].ty===`gr`&&i(e[t].it)}function a(e){var t,n=e.i.length;for(t=0;t<n;t+=1)e.i[t][0]+=e.v[t][0],e.i[t][1]+=e.v[t][1],e.o[t][0]+=e.v[t][0],e.o[t][1]+=e.v[t][1]}function o(e,t){var n=t?t.split(`.`):[100,100,100];return e[0]>n[0]?!0:n[0]>e[0]?!1:e[1]>n[1]?!0:n[1]>e[1]?!1:e[2]>n[2]?!0:n[2]>e[2]?!1:null}var c=function(){var e=[4,4,14];function t(e){var t=e.t.d;e.t.d={k:[{s:t,t:0}]}}function n(e){var n,r=e.length;for(n=0;n<r;n+=1)e[n].ty===5&&t(e[n])}return function(t){if(o(e,t.v)&&(n(t.layers),t.assets)){var r,i=t.assets.length;for(r=0;r<i;r+=1)t.assets[r].layers&&n(t.assets[r].layers)}}}(),u=function(){var e=[4,7,99];return function(t){if(t.chars&&!o(e,t.v)){var n,r=t.chars.length;for(n=0;n<r;n+=1){var a=t.chars[n];a.data&&a.data.shapes&&(i(a.data.shapes),a.data.ip=0,a.data.op=99999,a.data.st=0,a.data.sr=1,a.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},t.chars[n].t||(a.data.shapes.push({ty:`no`}),a.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:`tr`})))}}}}(),K=function(){var e=[5,7,15];function t(e){var t=e.t.p;typeof t.a==`number`&&(t.a={a:0,k:t.a}),typeof t.p==`number`&&(t.p={a:0,k:t.p}),typeof t.r==`number`&&(t.r={a:0,k:t.r})}function n(e){var n,r=e.length;for(n=0;n<r;n+=1)e[n].ty===5&&t(e[n])}return function(t){if(o(e,t.v)&&(n(t.layers),t.assets)){var r,i=t.assets.length;for(r=0;r<i;r+=1)t.assets[r].layers&&n(t.assets[r].layers)}}}(),Y=function(){var e=[4,1,9];function t(e){var n,r=e.length,i,a;for(n=0;n<r;n+=1)if(e[n].ty===`gr`)t(e[n].it);else if(e[n].ty===`fl`||e[n].ty===`st`){if(e[n].c.k&&e[n].c.k[0].i)for(a=e[n].c.k.length,i=0;i<a;i+=1)e[n].c.k[i].s&&(e[n].c.k[i].s[0]/=255,e[n].c.k[i].s[1]/=255,e[n].c.k[i].s[2]/=255,e[n].c.k[i].s[3]/=255),e[n].c.k[i].e&&(e[n].c.k[i].e[0]/=255,e[n].c.k[i].e[1]/=255,e[n].c.k[i].e[2]/=255,e[n].c.k[i].e[3]/=255);else e[n].c.k[0]/=255,e[n].c.k[1]/=255,e[n].c.k[2]/=255,e[n].c.k[3]/=255}}function n(e){var n,r=e.length;for(n=0;n<r;n+=1)e[n].ty===4&&t(e[n].shapes)}return function(t){if(o(e,t.v)&&(n(t.layers),t.assets)){var r,i=t.assets.length;for(r=0;r<i;r+=1)t.assets[r].layers&&n(t.assets[r].layers)}}}(),X=function(){var e=[4,4,18];function t(e){var n,r=e.length,i,a;for(n=r-1;n>=0;--n)if(e[n].ty===`sh`){if(e[n].ks.k.i)e[n].ks.k.c=e[n].closed;else for(a=e[n].ks.k.length,i=0;i<a;i+=1)e[n].ks.k[i].s&&(e[n].ks.k[i].s[0].c=e[n].closed),e[n].ks.k[i].e&&(e[n].ks.k[i].e[0].c=e[n].closed)}else e[n].ty===`gr`&&t(e[n].it)}function n(e){var n,r,i=e.length,a,o,c,u;for(r=0;r<i;r+=1){if(n=e[r],n.hasMask){var K=n.masksProperties;for(o=K.length,a=0;a<o;a+=1)if(K[a].pt.k.i)K[a].pt.k.c=K[a].cl;else for(u=K[a].pt.k.length,c=0;c<u;c+=1)K[a].pt.k[c].s&&(K[a].pt.k[c].s[0].c=K[a].cl),K[a].pt.k[c].e&&(K[a].pt.k[c].e[0].c=K[a].cl)}n.ty===4&&t(n.shapes)}}return function(t){if(o(e,t.v)&&(n(t.layers),t.assets)){var r,i=t.assets.length;for(r=0;r<i;r+=1)t.assets[r].layers&&n(t.assets[r].layers)}}}();function ee(n){n.__complete||=(Y(n),c(n),u(n),K(n),X(n),e(n.layers,n.assets),t(n.chars,n.assets),!0)}function te(e){e.t.a.length===0&&`m`in e.t.p}var ce={};return ce.completeData=ee,ce.checkColors=Y,ce.checkChars=u,ce.checkPathProperties=K,ce.checkShapes=X,ce.completeLayers=e,ce}if(a.dataManager||=t(),a.assetLoader||=function(){function e(e){var t=e.getResponseHeader(`content-type`);return t&&e.responseType===`json`&&t.indexOf(`json`)!==-1||e.response&&_typeof$5(e.response)===`object`?e.response:e.response&&typeof e.response==`string`?JSON.parse(e.response):e.responseText?JSON.parse(e.responseText):null}function t(t,n,r,i){var a,o=new XMLHttpRequest;try{o.responseType=`json`}catch{}o.onreadystatechange=function(){if(o.readyState===4){if(o.status===200)a=e(o),r(a);else try{a=e(o),r(a)}catch(e){i&&i(e)}}};try{o.open([`G`,`E`,`T`].join(``),t,!0)}catch{o.open([`G`,`E`,`T`].join(``),n+`/`+t,!0)}o.send()}return{load:t}}(),e.data.type===`loadAnimation`)a.assetLoader.load(e.data.path,e.data.fullPath,function(t){a.dataManager.completeData(t),a.postMessage({id:e.data.id,payload:t,status:`success`})},function(){a.postMessage({id:e.data.id,status:`error`})});else if(e.data.type===`complete`){var n=e.data.animation;a.dataManager.completeData(n),a.postMessage({id:e.data.id,payload:n,status:`success`})}else e.data.type===`loadData`&&a.assetLoader.load(e.data.path,e.data.fullPath,function(t){a.postMessage({id:e.data.id,payload:t,status:`success`})},function(){a.postMessage({id:e.data.id,status:`error`})})}),r.onmessage=function(e){var n=e.data,r=n.id,i=t[r];t[r]=null,n.status===`success`?i.onComplete(n.payload):i.onError&&i.onError()})}function u(n,r){e+=1;var i=`processId_`+e;return t[i]={onComplete:n,onError:r},i}function K(e,t,n){c();var i=u(t,n);r.postMessage({type:`loadAnimation`,path:e,fullPath:window.location.origin+window.location.pathname,id:i})}function Y(e,t,n){c();var i=u(t,n);r.postMessage({type:`loadData`,path:e,fullPath:window.location.origin+window.location.pathname,id:i})}function X(e,t,n){c();var i=u(t,n);r.postMessage({type:`complete`,animation:e,id:i})}return{loadAnimation:K,loadData:Y,completeAnimation:X}}(),ImagePreloader=function(){var e=function(){var e=createTag(`canvas`);e.width=1,e.height=1;var t=e.getContext(`2d`);return t.fillStyle=`rgba(0,0,0,0)`,t.fillRect(0,0,1,1),e}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(e,t,n){var r=``;if(e.e)r=e.p;else if(t){var i=e.p;i.indexOf(`images/`)!==-1&&(i=i.split(`/`)[1]),r=t+i}else r=n,r+=e.u?e.u:``,r+=e.p;return r}function i(e){var t=0,n=setInterval(function(){(e.getBBox().width||t>500)&&(this._imageLoaded(),clearInterval(n)),t+=1}.bind(this),50)}function a(t){var n=r(t,this.assetsPath,this.path),i=createNS(`image`);isSafari?this.testImageLoaded(i):i.addEventListener(`load`,this._imageLoaded,!1),i.addEventListener(`error`,function(){a.img=e,this._imageLoaded()}.bind(this),!1),i.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,n),this._elementHelper.append?this._elementHelper.append(i):this._elementHelper.appendChild(i);var a={img:i,assetData:t};return a}function o(t){var n=r(t,this.assetsPath,this.path),i=createTag(`img`);i.crossOrigin=`anonymous`,i.addEventListener(`load`,this._imageLoaded,!1),i.addEventListener(`error`,function(){a.img=e,this._imageLoaded()}.bind(this),!1),i.src=n;var a={img:i,assetData:t};return a}function c(e){var t={assetData:e},n=r(e,this.assetsPath,this.path);return dataManager.loadData(n,function(e){t.img=e,this._footageLoaded()}.bind(this),function(){t.img={},this._footageLoaded()}.bind(this)),t}function u(e,t){this.imagesLoadedCb=t;var n,r=e.length;for(n=0;n<r;n+=1)e[n].layers||(!e[n].t||e[n].t===`seq`?(this.totalImages+=1,this.images.push(this._createImageData(e[n]))):e[n].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(e[n]))))}function K(e){this.path=e||``}function Y(e){this.assetsPath=e||``}function X(e){for(var t=0,n=this.images.length;t<n;){if(this.images[t].assetData===e)return this.images[t].img;t+=1}return null}function ee(){this.imagesLoadedCb=null,this.images.length=0}function te(){return this.totalImages===this.loadedAssets}function ce(){return this.totalFootages===this.loadedFootagesCount}function ue(e,t){e===`svg`?(this._elementHelper=t,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function de(){this._imageLoaded=t.bind(this),this._footageLoaded=n.bind(this),this.testImageLoaded=i.bind(this),this.createFootageData=c.bind(this),this.assetsPath=``,this.path=``,this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return de.prototype={loadAssets:u,setAssetsPath:Y,setPath:K,loadedImages:te,loadedFootages:ce,destroy:ee,getAsset:X,createImgData:o,createImageData:a,imageLoaded:t,footageLoaded:n,setCacheType:ue},de}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(e,t){if(this._cbs[e])for(var n=this._cbs[e],r=0;r<n.length;r+=1)n[r](t)},addEventListener:function(e,t){return this._cbs[e]||(this._cbs[e]=[]),this._cbs[e].push(t),function(){this.removeEventListener(e,t)}.bind(this)},removeEventListener:function(e,t){if(!t)this._cbs[e]=null;else if(this._cbs[e]){for(var n=0,r=this._cbs[e].length;n<r;)this._cbs[e][n]===t&&(this._cbs[e].splice(n,1),--n,--r),n+=1;this._cbs[e].length||(this._cbs[e]=null)}}};var markerParser=function(){function e(e){for(var t=e.split(`\r
13`),n={},r,i=0,a=0;a<t.length;a+=1)r=t[a].split(`:`),r.length===2&&(n[r[0]]=r[1].trim(),i+=1);if(i===0)throw Error();return n}return function(t){for(var n=[],r=0;r<t.length;r+=1){var i=t[r],a={time:i.tm,duration:i.dr};try{a.payload=JSON.parse(t[r].cm)}catch{try{a.payload=e(t[r].cm)}catch{a.payload={name:t[r].cm}}}n.push(a)}return n}}(),ProjectInterface=function(){function e(e){this.compositions.push(e)}return function(){function t(e){for(var t=0,n=this.compositions.length;t<n;){if(this.compositions[t].data&&this.compositions[t].data.nm===e)return this.compositions[t].prepareFrame&&this.compositions[t].data.xt&&this.compositions[t].prepareFrame(this.currentFrame),this.compositions[t].compInterface;t+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(e,t){renderers[e]=t};function getRenderer(e){return renderers[e]}function getRegisteredRenderer(){if(renderers.canvas)return`canvas`;for(var e in renderers)if(renderers[e])return e;return``}function _typeof$4(e){"@babel/helpers - typeof";return _typeof$4=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},_typeof$4(e)}var AnimationItem=function(){this._cbs=[],this.name=``,this.path=``,this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath=``,this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent(`drawnFrame`,0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t=`svg`;e.animType?t=e.animType:e.renderer&&(t=e.renderer);var n=getRenderer(t);this.renderer=new n(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,this.loop=e.loop===``||e.loop===null||e.loop===void 0||e.loop===!0||e.loop!==!1&&parseInt(e.loop,10),this.autoplay=`autoplay`in e?e.autoplay:!0,this.name=e.name?e.name:``,this.autoloadSegments=!Object.prototype.hasOwnProperty.call(e,`autoloadSegments`)||e.autoloadSegments,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(this.path=e.path.lastIndexOf(`\\`)===-1?e.path.substr(0,e.path.lastIndexOf(`/`)+1):e.path.substr(0,e.path.lastIndexOf(`\\`)+1),this.fileName=e.path.substr(e.path.lastIndexOf(`/`)+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(`.json`)),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger(`data_failed`)},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&_typeof$4(t)!==`object`&&(t=JSON.parse(t));var n={wrapper:e,animationData:t},r=e.attributes;n.path=r.getNamedItem(`data-animation-path`)?r.getNamedItem(`data-animation-path`).value:r.getNamedItem(`data-bm-path`)?r.getNamedItem(`data-bm-path`).value:r.getNamedItem(`bm-path`)?r.getNamedItem(`bm-path`).value:``,n.animType=r.getNamedItem(`data-anim-type`)?r.getNamedItem(`data-anim-type`).value:r.getNamedItem(`data-bm-type`)?r.getNamedItem(`data-bm-type`).value:r.getNamedItem(`bm-type`)?r.getNamedItem(`bm-type`).value:r.getNamedItem(`data-bm-renderer`)?r.getNamedItem(`data-bm-renderer`).value:r.getNamedItem(`bm-renderer`)?r.getNamedItem(`bm-renderer`).value:getRegisteredRenderer()||`canvas`;var i=r.getNamedItem(`data-anim-loop`)?r.getNamedItem(`data-anim-loop`).value:r.getNamedItem(`data-bm-loop`)?r.getNamedItem(`data-bm-loop`).value:r.getNamedItem(`bm-loop`)?r.getNamedItem(`bm-loop`).value:``;i===`false`?n.loop=!1:i===`true`?n.loop=!0:i!==``&&(n.loop=parseInt(i,10)),n.autoplay=(r.getNamedItem(`data-anim-autoplay`)?r.getNamedItem(`data-anim-autoplay`).value:r.getNamedItem(`data-bm-autoplay`)?r.getNamedItem(`data-bm-autoplay`).value:!r.getNamedItem(`bm-autoplay`)||r.getNamedItem(`bm-autoplay`).value)!==`false`,n.name=r.getNamedItem(`data-name`)?r.getNamedItem(`data-name`).value:r.getNamedItem(`data-bm-name`)?r.getNamedItem(`data-bm-name`).value:r.getNamedItem(`bm-name`)?r.getNamedItem(`bm-name`).value:``,(r.getNamedItem(`data-anim-prerender`)?r.getNamedItem(`data-anim-prerender`).value:r.getNamedItem(`data-bm-prerender`)?r.getNamedItem(`data-bm-prerender`).value:r.getNamedItem(`bm-prerender`)?r.getNamedItem(`bm-prerender`).value:``)===`false`&&(n.prerender=!1),n.path?this.setParams(n):this.trigger(`destroy`)},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t=this.animationData.layers,n,r=t.length,i=e.layers,a,o=i.length;for(a=0;a<o;a+=1)for(n=0;n<r;){if(t[n].id===i[a].id){t[n]=i[a];break}n+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(r=e.assets.length,n=0;n<r;n+=1)this.animationData.assets.push(e.assets[n]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(e){this.animationData=e;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||e.length===0||!this.autoloadSegments){this.trigger(`data_ready`),this.timeCompleted=this.totalFrames;return}var t=e.shift();this.timeCompleted=t.time*this.frameRate;var n=this.path+this.fileName+`_`+this.segmentPos+`.json`;this.segmentPos+=1,dataManager.loadData(n,this.includeLayers.bind(this),function(){this.trigger(`data_failed`)}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger(`loaded_images`),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||=[],this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=markerParser(e.markers||[]),this.trigger(`config_ready`),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(e){this.triggerConfigError(e)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!==`canvas`)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger(`DOMLoaded`)}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(e,t){var n=typeof e==`number`?e:void 0,r=typeof t==`number`?t:void 0;this.renderer.updateContainerSize(n,r)},AnimationItem.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger(`enterFrame`),this.renderFrame(),this.trigger(`drawnFrame`)},AnimationItem.prototype.renderFrame=function(){if(this.isLoaded!==!1&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||this.isPaused===!0&&(this.isPaused=!1,this.trigger(`_play`),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger(`_active`)))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||this.isPaused===!1&&(this.isPaused=!0,this.trigger(`_pause`),this._idle=!0,this.trigger(`_idle`),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,n=0;n<this.markers.length;n+=1)if(t=this.markers[n],t.payload&&t.payload.name===e)return t;return null},AnimationItem.prototype.goToAndStop=function(e,t,n){if(!(n&&this.name!==n)){var r=Number(e);if(isNaN(r)){var i=this.getMarkerData(e);i&&this.goToAndStop(i.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(e,t,n){if(!(n&&this.name!==n)){var r=Number(e);if(isNaN(r)){var i=this.getMarkerData(e);i&&(i.duration?this.playSegments([i.time,i.time+i.duration],!0):this.goToAndStop(i.time,!0))}else this.goToAndStop(r,t,n);this.play()}},AnimationItem.prototype.advanceTime=function(e){if(this.isPaused!==!0&&this.isLoaded!==!1){var t=this.currentRawFrame+e*this.frameModifier,n=!1;t>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(n=!0,t=this.totalFrames-1):t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger(`loopComplete`))):this.setCurrentRawFrameValue(t):t<0?this.checkSegments(t%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger(`loopComplete`):this._completedLoop=!0):(n=!0,t=0)):this.setCurrentRawFrameValue(t),n&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger(`complete`))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger(`segmentStart`)},AnimationItem.prototype.setSegment=function(e,t){var n=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?n=e:this.currentRawFrame+this.firstFrame>t&&(n=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,n!==-1&&this.goToAndStop(n,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),_typeof$4(e[0])===`object`){var n,r=e.length;for(n=0;n<r;n+=1)this.segments.push(e[n])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(e){return this.segments.length?(this.adjustSegment(this.segments.shift(),e),!0):!1},AnimationItem.prototype.destroy=function(e){e&&this.name!==e||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger(`destroy`),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(e){this.currentRawFrame=e,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(e){this.loop=e},AnimationItem.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},AnimationItem.prototype.unmute=function(e){e&&this.name!==e||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(e){var t=``;if(e.e)t=e.p;else if(this.assetsPath){var n=e.p;n.indexOf(`images/`)!==-1&&(n=n.split(`/`)[1]),t=this.assetsPath+n}else t=this.path,t+=e.u?e.u:``,t+=e.p;return t},AnimationItem.prototype.getAssetData=function(e){for(var t=0,n=this.assets.length;t<n;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(e,t,n){try{this.renderer.getElementByPath(e).updateDocumentData(t,n)}catch{}},AnimationItem.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case`enterFrame`:this.triggerEvent(e,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameModifier));break;case`drawnFrame`:this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(e,this.drawnFrameEvent);break;case`loopComplete`:this.triggerEvent(e,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult));break;case`complete`:this.triggerEvent(e,new BMCompleteEvent(e,this.frameMult));break;case`segmentStart`:this.triggerEvent(e,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames));break;case`destroy`:this.triggerEvent(e,new BMDestroyEvent(e,this));break;default:this.triggerEvent(e)}e===`enterFrame`&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameMult)),e===`loopComplete`&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult)),e===`complete`&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(e,this.frameMult)),e===`segmentStart`&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames)),e===`destroy`&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(e,this))},AnimationItem.prototype.triggerRenderFrameError=function(e){var t=new BMRenderFrameErrorEvent(e,this.currentFrame);this.triggerEvent(`error`,t),this.onError&&this.onError.call(this,t)},AnimationItem.prototype.triggerConfigError=function(e){var t=new BMConfigErrorEvent(e,this.currentFrame);this.triggerEvent(`error`,t),this.onError&&this.onError.call(this,t)};var animationManager=function(){var e={},t=[],n=0,r=0,i=0,a=!0,o=!1;function c(e){for(var n=0,i=e.target;n<r;)t[n].animation===i&&(t.splice(n,1),--n,--r,i.isPaused||X()),n+=1}function u(e,n){if(!e)return null;for(var i=0;i<r;){if(t[i].elem===e&&t[i].elem!==null)return t[i].animation;i+=1}var a=new AnimationItem;return ee(a,e),a.setData(e,n),a}function K(){var e,n=t.length,r=[];for(e=0;e<n;e+=1)r.push(t[e].animation);return r}function Y(){i+=1,Ze()}function X(){--i}function ee(e,n){e.addEventListener(`destroy`,c),e.addEventListener(`_active`,Y),e.addEventListener(`_idle`,X),t.push({elem:n,animation:e}),r+=1}function te(e){var t=new AnimationItem;return ee(t,null),t.setParams(e),t}function ce(e,n){for(var i=0;i<r;i+=1)t[i].animation.setSpeed(e,n)}function ue(e,n){for(var i=0;i<r;i+=1)t[i].animation.setDirection(e,n)}function de(e){for(var n=0;n<r;n+=1)t[n].animation.play(e)}function fe(e){for(var c=e-n,u=0;u<r;u+=1)t[u].animation.advanceTime(c);n=e,i&&!o?window.requestAnimationFrame(fe):a=!0}function me(e){n=e,window.requestAnimationFrame(fe)}function ge(e){for(var n=0;n<r;n+=1)t[n].animation.pause(e)}function Te(e,n,i){for(var a=0;a<r;a+=1)t[a].animation.goToAndStop(e,n,i)}function Oe(e){for(var n=0;n<r;n+=1)t[n].animation.stop(e)}function Ae(e){for(var n=0;n<r;n+=1)t[n].animation.togglePause(e)}function ze(e){for(var n=r-1;n>=0;--n)t[n].animation.destroy(e)}function qe(e,t,n){var r=[].concat([].slice.call(document.getElementsByClassName(`lottie`)),[].slice.call(document.getElementsByClassName(`bodymovin`))),i,a=r.length;for(i=0;i<a;i+=1)n&&r[i].setAttribute(`data-bm-type`,n),u(r[i],e);if(t&&a===0){n||=`svg`;var o=document.getElementsByTagName(`body`)[0];o.innerText=``;var c=createTag(`div`);c.style.width=`100%`,c.style.height=`100%`,c.setAttribute(`data-bm-type`,n),o.appendChild(c),u(c,e)}}function Ye(){for(var e=0;e<r;e+=1)t[e].animation.resize()}function Ze(){!o&&i&&(a&&=(window.requestAnimationFrame(me),!1))}function Qe(){o=!0}function et(){o=!1,Ze()}function nt(e,n){for(var i=0;i<r;i+=1)t[i].animation.setVolume(e,n)}function rt(e){for(var n=0;n<r;n+=1)t[n].animation.mute(e)}function it(e){for(var n=0;n<r;n+=1)t[n].animation.unmute(e)}return e.registerAnimation=u,e.loadAnimation=te,e.setSpeed=ce,e.setDirection=ue,e.play=de,e.pause=ge,e.stop=Oe,e.togglePause=Ae,e.searchAnimations=qe,e.resize=Ye,e.goToAndStop=Te,e.destroy=ze,e.freeze=Qe,e.unfreeze=et,e.setVolume=nt,e.mute=rt,e.unmute=it,e.getRegisteredAnimations=K,e}(),BezierFactory=function(){var e={};e.getBezierEasing=n;var t={};function n(e,n,r,i,a){var o=a||(`bez_`+e+`_`+n+`_`+r+`_`+i).replace(/\./g,`p`);if(t[o])return t[o];var c=new fe([e,n,r,i]);return t[o]=c,c}var r=4,i=.001,a=1e-7,o=10,c=11,u=1/(c-1),K=typeof Float32Array==`function`;function Y(e,t){return 1-3*t+3*e}function X(e,t){return 3*t-6*e}function ee(e){return 3*e}function te(e,t,n){return((Y(t,n)*e+X(t,n))*e+ee(t))*e}function ce(e,t,n){return 3*Y(t,n)*e*e+2*X(t,n)*e+ee(t)}function ue(e,t,n,r,i){var c,u,K=0;do u=t+(n-t)/2,c=te(u,r,i)-e,c>0?n=u:t=u;while(Math.abs(c)>a&&++K<o);return u}function de(e,t,n,i){for(var a=0;a<r;++a){var o=ce(t,n,i);if(o===0)return t;var c=te(t,n,i)-e;t-=c/o}return t}function fe(e){this._p=e,this._mSampleValues=K?new Float32Array(c):Array(c),this._precomputed=!1,this.get=this.get.bind(this)}return fe.prototype={get:function(e){var t=this._p[0],n=this._p[1],r=this._p[2],i=this._p[3];return this._precomputed||this._precompute(),t===n&&r===i?e:e===0?0:e===1?1:te(this._getTForX(e),n,i)},_precompute:function(){var e=this._p[0],t=this._p[1],n=this._p[2],r=this._p[3];this._precomputed=!0,(e!==t||n!==r)&&this._calcSampleValues()},_calcSampleValues:function(){for(var e=this._p[0],t=this._p[2],n=0;n<c;++n)this._mSampleValues[n]=te(n*u,e,t)},_getTForX:function(e){for(var t=this._p[0],n=this._p[2],r=this._mSampleValues,a=0,o=1,K=c-1;o!==K&&r[o]<=e;++o)a+=u;--o;var Y=(e-r[o])/(r[o+1]-r[o]),X=a+Y*u,ee=ce(X,t,n);return ee>=i?de(e,X,t,n):ee===0?X:ue(e,a,a+u,t,n)}},e}(),pooling=function(){function e(e){return e.concat(createSizedArray(e.length))}return{double:e}}(),poolFactory=function(){return function(e,t,n){var r=0,i=e,a=createSizedArray(i),o={newElement:c,release:u};function c(){var e;return r?(--r,e=a[r]):e=t(),e}function u(e){r===i&&(a=pooling.double(a),i*=2),n&&n(e),a[r]=e,r+=1}return o}}(),bezierLengthPool=function(){function e(){return{addedLength:0,percents:createTypedArray(`float32`,getDefaultCurveSegments()),lengths:createTypedArray(`float32`,getDefaultCurveSegments())}}return poolFactory(8,e)}(),segmentsLengthPool=function(){function e(){return{lengths:[],totalLength:0}}function t(e){var t,n=e.lengths.length;for(t=0;t<n;t+=1)bezierLengthPool.release(e.lengths[t]);e.lengths.length=0}return poolFactory(8,e,t)}();function bezFunction(){var e=Math;function t(e,t,n,r,i,a){var o=e*r+t*i+n*a-i*r-a*e-n*t;return o>-.001&&o<.001}function n(n,r,i,a,o,c,u,K,Y){if(i===0&&c===0&&Y===0)return t(n,r,a,o,u,K);var X=e.sqrt(e.pow(a-n,2)+e.pow(o-r,2)+e.pow(c-i,2)),ee=e.sqrt(e.pow(u-n,2)+e.pow(K-r,2)+e.pow(Y-i,2)),te=e.sqrt(e.pow(u-a,2)+e.pow(K-o,2)+e.pow(Y-c,2)),ce=X>ee?X>te?X-ee-te:te-ee-X:te>ee?te-ee-X:ee-X-te;return ce>-1e-4&&ce<1e-4}var r=function(){return function(e,t,n,r){var i=getDefaultCurveSegments(),a,o,c,u,K,Y=0,X,ee=[],te=[],ce=bezierLengthPool.newElement();for(c=n.length,a=0;a<i;a+=1){for(K=a/(i-1),X=0,o=0;o<c;o+=1)u=bmPow(1-K,3)*e[o]+3*bmPow(1-K,2)*K*n[o]+3*(1-K)*bmPow(K,2)*r[o]+bmPow(K,3)*t[o],ee[o]=u,te[o]!==null&&(X+=bmPow(ee[o]-te[o],2)),te[o]=ee[o];X&&(X=bmSqrt(X),Y+=X),ce.percents[a]=K,ce.lengths[a]=Y}return ce.addedLength=Y,ce}}();function i(e){var t=segmentsLengthPool.newElement(),n=e.c,i=e.v,a=e.o,o=e.i,c,u=e._length,K=t.lengths,Y=0;for(c=0;c<u-1;c+=1)K[c]=r(i[c],i[c+1],a[c],o[c+1]),Y+=K[c].addedLength;return n&&u&&(K[c]=r(i[c],i[0],a[c],o[0]),Y+=K[c].addedLength),t.totalLength=Y,t}function a(e){this.segmentLength=0,this.points=Array(e)}function o(e,t){this.partialLength=e,this.point=t}var c=function(){var e={};return function(n,r,i,c){var u=(n[0]+`_`+n[1]+`_`+r[0]+`_`+r[1]+`_`+i[0]+`_`+i[1]+`_`+c[0]+`_`+c[1]).replace(/\./g,`p`);if(!e[u]){var K=getDefaultCurveSegments(),Y,X,ee,te,ce,ue=0,de,fe,me=null;n.length===2&&(n[0]!==r[0]||n[1]!==r[1])&&t(n[0],n[1],r[0],r[1],n[0]+i[0],n[1]+i[1])&&t(n[0],n[1],r[0],r[1],r[0]+c[0],r[1]+c[1])&&(K=2);var ge=new a(K);for(ee=i.length,Y=0;Y<K;Y+=1){for(fe=createSizedArray(ee),ce=Y/(K-1),de=0,X=0;X<ee;X+=1)te=bmPow(1-ce,3)*n[X]+3*bmPow(1-ce,2)*ce*(n[X]+i[X])+3*(1-ce)*bmPow(ce,2)*(r[X]+c[X])+bmPow(ce,3)*r[X],fe[X]=te,me!==null&&(de+=bmPow(fe[X]-me[X],2));de=bmSqrt(de),ue+=de,ge.points[Y]=new o(de,fe),me=fe}ge.segmentLength=ue,e[u]=ge}return e[u]}}();function u(e,t){var n=t.percents,r=t.lengths,i=n.length,a=bmFloor((i-1)*e),o=e*t.addedLength,c=0;if(a===i-1||a===0||o===r[a])return n[a];for(var u=r[a]>o?-1:1,K=!0;K;)if(r[a]<=o&&r[a+1]>o?(c=(o-r[a])/(r[a+1]-r[a]),K=!1):a+=u,a<0||a>=i-1){if(a===i-1)return n[a];K=!1}return n[a]+(n[a+1]-n[a])*c}function K(t,n,r,i,a,o){var c=u(a,o),K=1-c;return[e.round((K*K*K*t[0]+(c*K*K+K*c*K+K*K*c)*r[0]+(c*c*K+K*c*c+c*K*c)*i[0]+c*c*c*n[0])*1e3)/1e3,e.round((K*K*K*t[1]+(c*K*K+K*c*K+K*K*c)*r[1]+(c*c*K+K*c*c+c*K*c)*i[1]+c*c*c*n[1])*1e3)/1e3]}var Y=createTypedArray(`float32`,8);function X(t,n,r,i,a,o,c){a<0?a=0:a>1&&(a=1);var K=u(a,c);o=o>1?1:o;var X=u(o,c),ee,te=t.length,ce=1-K,ue=1-X,de=ce*ce*ce,fe=K*ce*ce*3,me=K*K*ce*3,ge=K*K*K,Te=ce*ce*ue,Oe=K*ce*ue+ce*K*ue+ce*ce*X,Ae=K*K*ue+ce*K*X+K*ce*X,ze=K*K*X,qe=ce*ue*ue,Ye=K*ue*ue+ce*X*ue+ce*ue*X,Ze=K*X*ue+ce*X*X+K*ue*X,Qe=K*X*X,et=ue*ue*ue,nt=X*ue*ue+ue*X*ue+ue*ue*X,rt=X*X*ue+ue*X*X+X*ue*X,it=X*X*X;for(ee=0;ee<te;ee+=1)Y[ee*4]=e.round((de*t[ee]+fe*r[ee]+me*i[ee]+ge*n[ee])*1e3)/1e3,Y[ee*4+1]=e.round((Te*t[ee]+Oe*r[ee]+Ae*i[ee]+ze*n[ee])*1e3)/1e3,Y[ee*4+2]=e.round((qe*t[ee]+Ye*r[ee]+Ze*i[ee]+Qe*n[ee])*1e3)/1e3,Y[ee*4+3]=e.round((et*t[ee]+nt*r[ee]+rt*i[ee]+it*n[ee])*1e3)/1e3;return Y}return{getSegmentsLength:i,getNewSegment:X,getPointInSegment:K,buildBezierData:c,pointOnLine2D:t,pointOnLine3D:n}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(e,t){var n=this.offsetTime,r;this.propType===`multidimensional`&&(r=createTypedArray(`float32`,this.pv.length));for(var i=t.lastIndex,a=i,o=this.keyframes.length-1,c=!0,u,K,Y;c;){if(u=this.keyframes[a],K=this.keyframes[a+1],a===o-1&&e>=K.t-n){u.h&&(u=K),i=0;break}if(K.t-n>e){i=a;break}a<o-1?a+=1:(i=0,c=!1)}Y=this.keyframesMetadata[a]||{};var X,ee,te,ce,ue,de,fe=K.t-n,me=u.t-n,ge;if(u.to){Y.bezierData||(Y.bezierData=bez.buildBezierData(u.s,K.s||u.e,u.to,u.ti));var Te=Y.bezierData;if(e>=fe||e<me){var Oe=e>=fe?Te.points.length-1:0;for(ee=Te.points[Oe].point.length,X=0;X<ee;X+=1)r[X]=Te.points[Oe].point[X]}else{Y.__fnct?de=Y.__fnct:(de=BezierFactory.getBezierEasing(u.o.x,u.o.y,u.i.x,u.i.y,u.n).get,Y.__fnct=de),te=de((e-me)/(fe-me));var Ae=Te.segmentLength*te,ze,qe=t.lastFrame<e&&t._lastKeyframeIndex===a?t._lastAddedLength:0;for(ue=t.lastFrame<e&&t._lastKeyframeIndex===a?t._lastPoint:0,c=!0,ce=Te.points.length;c;){if(qe+=Te.points[ue].partialLength,Ae===0||te===0||ue===Te.points.length-1){for(ee=Te.points[ue].point.length,X=0;X<ee;X+=1)r[X]=Te.points[ue].point[X];break}if(Ae>=qe&&Ae<qe+Te.points[ue+1].partialLength){for(ze=(Ae-qe)/Te.points[ue+1].partialLength,ee=Te.points[ue].point.length,X=0;X<ee;X+=1)r[X]=Te.points[ue].point[X]+(Te.points[ue+1].point[X]-Te.points[ue].point[X])*ze;break}ue<ce-1?ue+=1:c=!1}t._lastPoint=ue,t._lastAddedLength=qe-Te.points[ue].partialLength,t._lastKeyframeIndex=a}}else{var Ye,Ze,Qe,et,nt;if(o=u.s.length,ge=K.s||u.e,this.sh&&u.h!==1){if(e>=fe)r[0]=ge[0],r[1]=ge[1],r[2]=ge[2];else if(e<=me)r[0]=u.s[0],r[1]=u.s[1],r[2]=u.s[2];else{var rt=createQuaternion(u.s),it=createQuaternion(ge),at=(e-me)/(fe-me);quaternionToEuler(r,slerp(rt,it,at))}}else for(a=0;a<o;a+=1)u.h!==1&&(e>=fe?te=1:e<me?te=0:(u.o.x.constructor===Array?(Y.__fnct||(Y.__fnct=[]),Y.__fnct[a]?de=Y.__fnct[a]:(Ye=u.o.x[a]===void 0?u.o.x[0]:u.o.x[a],Ze=u.o.y[a]===void 0?u.o.y[0]:u.o.y[a],Qe=u.i.x[a]===void 0?u.i.x[0]:u.i.x[a],et=u.i.y[a]===void 0?u.i.y[0]:u.i.y[a],de=BezierFactory.getBezierEasing(Ye,Ze,Qe,et).get,Y.__fnct[a]=de)):Y.__fnct?de=Y.__fnct:(Ye=u.o.x,Ze=u.o.y,Qe=u.i.x,et=u.i.y,de=BezierFactory.getBezierEasing(Ye,Ze,Qe,et).get,u.keyframeMetadata=de),te=de((e-me)/(fe-me)))),ge=K.s||u.e,nt=u.h===1?u.s[a]:u.s[a]+(ge[a]-u.s[a])*te,this.propType===`multidimensional`?r[a]=nt:r=nt}return t.lastIndex=i,r}function slerp(e,t,n){var r=[],i=e[0],a=e[1],o=e[2],c=e[3],u=t[0],K=t[1],Y=t[2],X=t[3],ee,te=i*u+a*K+o*Y+c*X,ce,ue,de;return te<0&&(te=-te,u=-u,K=-K,Y=-Y,X=-X),1-te>1e-6?(ee=Math.acos(te),ce=Math.sin(ee),ue=Math.sin((1-n)*ee)/ce,de=Math.sin(n*ee)/ce):(ue=1-n,de=n),r[0]=ue*i+de*u,r[1]=ue*a+de*K,r[2]=ue*o+de*Y,r[3]=ue*c+de*X,r}function quaternionToEuler(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=Math.atan2(2*r*a-2*n*i,1-2*r*r-2*i*i),c=Math.asin(2*n*r+2*i*a),u=Math.atan2(2*n*a-2*r*i,1-2*n*n-2*i*i);e[0]=o/degToRads,e[1]=c/degToRads,e[2]=u/degToRads}
vendor: 3,225 bytes, line 13
13function createQuaternion(e){var t=e[0]*degToRads,n=e[1]*degToRads,r=e[2]*degToRads,i=Math.cos(t/2),a=Math.cos(n/2),o=Math.cos(r/2),c=Math.sin(t/2),u=Math.sin(n/2),K=Math.sin(r/2),Y=i*a*o-c*u*K;return[c*u*o+i*a*K,c*a*o+i*u*K,i*u*o-c*a*K,Y]}function getValueAtCurrentTime(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,n=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=n&&e>=n||this._caching.lastFrame<t&&e<t))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var r=this.interpolateValue(e,this._caching);this.pv=r}return this._caching.lastFrame=e,this.pv}function setVValue(e){var t;if(this.propType===`unidimensional`)t=e*this.mult,mathAbs(this.v-t)>1e-5&&(this.v=t,this._mdf=!0);else for(var n=0,r=this.v.length;n<r;)t=e[n]*this.mult,mathAbs(this.v[n]-t)>1e-5&&(this.v[n]=t,this._mdf=!0),n+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var e,t=this.effectsSequence.length,n=this.kf?this.pv:this.data.k;for(e=0;e<t;e+=1)n=this.effectsSequence[e](n);this.setVValue(n),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function ValueProperty(e,t,n,r){this.propType=`unidimensional`,this.mult=n||1,this.data=t,this.v=n?t.k*n:t.k,this.pv=t.k,this._mdf=!1,this.elem=e,this.container=r,this.comp=e.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(e,t,n,r){this.propType=`multidimensional`,this.mult=n||1,this.data=t,this._mdf=!1,this.elem=e,this.container=r,this.comp=e.comp,this.k=!1,this.kf=!1,this.frameId=-1;var i,a=t.k.length;for(this.v=createTypedArray(`float32`,a),this.pv=createTypedArray(`float32`,a),this.vel=createTypedArray(`float32`,a),i=0;i<a;i+=1)this.v[i]=t.k[i]*this.mult,this.pv[i]=t.k[i];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(e,t,n,r){this.propType=`unidimensional`,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=t,this.mult=n||1,this.elem=e,this.container=r,this.comp=e.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(e,t,n,r){this.propType=`multidimensional`;var i,a=t.k.length,o,c,u,K;for(i=0;i<a-1;i+=1)t.k[i].to&&t.k[i].s&&t.k[i+1]&&t.k[i+1].s&&(o=t.k[i].s,c=t.k[i+1].s,u=t.k[i].to,K=t.k[i].ti,(o.length===2&&(o[0]!==c[0]||o[1]!==c[1])&&bez.pointOnLine2D(o[0],o[1],c[0],c[
vendor: 54,343 bytes, line 13
131],o[0]+u[0],o[1]+u[1])&&bez.pointOnLine2D(o[0],o[1],c[0],c[1],c[0]+K[0],c[1]+K[1])||o.length===3&&(o[0]!==c[0]||o[1]!==c[1]||o[2]!==c[2])&&bez.pointOnLine3D(o[0],o[1],o[2],c[0],c[1],c[2],o[0]+u[0],o[1]+u[1],o[2]+u[2])&&bez.pointOnLine3D(o[0],o[1],o[2],c[0],c[1],c[2],c[0]+K[0],c[1]+K[1],c[2]+K[2]))&&(t.k[i].to=null,t.k[i].ti=null),o[0]===c[0]&&o[1]===c[1]&&u[0]===0&&u[1]===0&&K[0]===0&&K[1]===0&&(o.length===2||o[2]===c[2]&&u[2]===0&&K[2]===0)&&(t.k[i].to=null,t.k[i].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=t,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=n||1,this.elem=e,this.container=r,this.comp=e.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var Y=t.k[0].s.length;for(this.v=createTypedArray(`float32`,Y),this.pv=createTypedArray(`float32`,Y),i=0;i<Y;i+=1)this.v[i]=initFrame,this.pv[i]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray(`float32`,Y)},this.addEffect=addEffect}var PropertyFactory=function(){function e(e,t,n,r,i){t.sid&&(t=e.globalData.slotManager.getProp(t));var a;if(!t.k.length)a=new ValueProperty(e,t,r,i);else if(typeof t.k[0]==`number`)a=new MultiDimensionalProperty(e,t,r,i);else switch(n){case 0:a=new KeyframedValueProperty(e,t,r,i);break;case 1:a=new KeyframedMultidimensionalProperty(e,t,r,i)}return a.effectsSequence.length&&i.addDynamicProperty(a),a}return{getProp:e}}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(e){this.dynamicProperties.indexOf(e)===-1&&(this.dynamicProperties.push(e),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var e,t=this.dynamicProperties.length;for(e=0;e<t;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(e){this.container=e,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=function(){function e(){return createTypedArray(`float32`,2)}return poolFactory(8,e)}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(e,t){this.c=e,this.setLength(t);for(var n=0;n<t;)this.v[n]=pointPool.newElement(),this.o[n]=pointPool.newElement(),this.i[n]=pointPool.newElement(),n+=1},ShapePath.prototype.setLength=function(e){for(;this._maxLength<e;)this.doubleArrayLength();this._length=e},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(e,t,n,r,i){var a;switch(this._length=Math.max(this._length,r+1),this._length>=this._maxLength&&this.doubleArrayLength(),n){case`v`:a=this.v;break;case`i`:a=this.i;break;case`o`:a=this.o;break;default:a=[]}(!a[r]||a[r]&&!i)&&(a[r]=pointPool.newElement()),a[r][0]=e,a[r][1]=t},ShapePath.prototype.setTripleAt=function(e,t,n,r,i,a,o,c){this.setXYAt(e,t,`v`,o,c),this.setXYAt(n,r,`o`,o,c),this.setXYAt(i,a,`i`,o,c)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,n=this.o,r=this.i,i=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],r[0][0],r[0][1],n[0][0],n[0][1],0,!1),i=1);for(var a=this._length-1,o=this._length,c=i;c<o;c+=1)e.setTripleAt(t[a][0],t[a][1],r[a][0],r[a][1],n[a][0],n[a][1],c,!1),--a;return e},ShapePath.prototype.length=function(){return this._length};var shapePool=function(){function e(){return new ShapePath}function t(e){for(var t=e._length,n=0;n<t;n+=1)pointPool.release(e.v[n]),pointPool.release(e.i[n]),pointPool.release(e.o[n]),e.v[n]=null,e.i[n]=null,e.o[n]=null;e._length=0,e.c=!1}function n(e){var t=r.newElement(),n,i=e._length===void 0?e.v.length:e._length;for(t.setLength(i),t.c=e.c,n=0;n<i;n+=1)t.setTripleAt(e.v[n][0],e.v[n][1],e.o[n][0],e.o[n][1],e.i[n][0],e.i[n][1],n);return t}var r=poolFactory(4,e,t);return r.clone=n,r}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(e){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=e,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){for(var e=0;e<this._length;e+=1)shapePool.release(this.shapes[e]);this._length=0};var shapeCollectionPool=function(){var e={newShapeCollection:i,release:a},t=0,n=4,r=createSizedArray(n);function i(){var e;return t?(--t,e=r[t]):e=new ShapeCollection,e}function a(e){var i,a=e._length;for(i=0;i<a;i+=1)shapePool.release(e.shapes[i]);e._length=0,t===n&&(r=pooling.double(r),n*=2),r[t]=e,t+=1}return e}(),ShapePropertyFactory=function(){var e=-999999;function t(e,t,n){var r=n.lastIndex,i,a,o,c,u,K,Y,X,ee,te=this.keyframes;if(e<te[0].t-this.offsetTime)i=te[0].s[0],o=!0,r=0;else if(e>=te[te.length-1].t-this.offsetTime)i=te[te.length-1].s?te[te.length-1].s[0]:te[te.length-2].e[0],o=!0;else{for(var ce=r,ue=te.length-1,de=!0,fe,me,ge;de&&(fe=te[ce],me=te[ce+1],!(me.t-this.offsetTime>e));)ce<ue-1?ce+=1:de=!1;if(ge=this.keyframesMetadata[ce]||{},o=fe.h===1,r=ce,!o){if(e>=me.t-this.offsetTime)X=1;else if(e<fe.t-this.offsetTime)X=0;else{var Te;ge.__fnct?Te=ge.__fnct:(Te=BezierFactory.getBezierEasing(fe.o.x,fe.o.y,fe.i.x,fe.i.y).get,ge.__fnct=Te),X=Te((e-(fe.t-this.offsetTime))/(me.t-this.offsetTime-(fe.t-this.offsetTime)))}a=me.s?me.s[0]:fe.e[0]}i=fe.s[0]}for(K=t._length,Y=i.i[0].length,n.lastIndex=r,c=0;c<K;c+=1)for(u=0;u<Y;u+=1)ee=o?i.i[c][u]:i.i[c][u]+(a.i[c][u]-i.i[c][u])*X,t.i[c][u]=ee,ee=o?i.o[c][u]:i.o[c][u]+(a.o[c][u]-i.o[c][u])*X,t.o[c][u]=ee,ee=o?i.v[c][u]:i.v[c][u]+(a.v[c][u]-i.v[c][u])*X,t.v[c][u]=ee}function n(){var t=this.comp.renderedFrame-this.offsetTime,n=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=this._caching.lastFrame;return i!==e&&(i<n&&t<n||i>r&&t>r)||(this._caching.lastIndex=i<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}function r(){this.paths=this.localShapeCollection}function i(e,t){if(e._length!==t._length||e.c!==t.c)return!1;var n,r=e._length;for(n=0;n<r;n+=1)if(e.v[n][0]!==t.v[n][0]||e.v[n][1]!==t.v[n][1]||e.o[n][0]!==t.o[n][0]||e.o[n][1]!==t.o[n][1]||e.i[n][0]!==t.i[n][0]||e.i[n][1]!==t.i[n][1])return!1;return!0}function a(e){i(this.v,e)||(this.v=shapePool.clone(e),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function o(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var e=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k,t,n=this.effectsSequence.length;for(t=0;t<n;t+=1)e=this.effectsSequence[t](e);this.setVValue(e),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function c(e,t,n){this.propType=`shape`,this.comp=e.comp,this.container=e,this.elem=e,this.data=t,this.k=!1,this.kf=!1,this._mdf=!1;var i=n===3?t.pt.k:t.ks.k;this.v=shapePool.clone(i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=r,this.effectsSequence=[]}function u(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}c.prototype.interpolateShape=t,c.prototype.getValue=o,c.prototype.setVValue=a,c.prototype.addEffect=u;function K(t,i,a){this.propType=`shape`,this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=a===3?i.pt.k:i.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var o=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,o),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=e,this.reset=r,this._caching={lastFrame:e,lastIndex:0},this.effectsSequence=[n.bind(this)]}K.prototype.getValue=o,K.prototype.interpolateShape=t,K.prototype.setVValue=a,K.prototype.addEffect=u;var Y=function(){var e=roundCorner;function t(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=t.d,this.elem=e,this.comp=e.comp,this.frameId=-1,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],n=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,a=this.d!==3,o=this.v;o.v[0][0]=t,o.v[0][1]=n-i,o.v[1][0]=a?t+r:t-r,o.v[1][1]=n,o.v[2][0]=t,o.v[2][1]=n+i,o.v[3][0]=a?t-r:t+r,o.v[3][1]=n,o.i[0][0]=a?t-r*e:t+r*e,o.i[0][1]=n-i,o.i[1][0]=a?t+r:t-r,o.i[1][1]=n-i*e,o.i[2][0]=a?t+r*e:t-r*e,o.i[2][1]=n+i,o.i[3][0]=a?t-r:t+r,o.i[3][1]=n+i*e,o.o[0][0]=a?t+r*e:t-r*e,o.o[0][1]=n-i,o.o[1][0]=a?t+r:t-r,o.o[1][1]=n+i*e,o.o[2][0]=a?t-r*e:t+r*e,o.o[2][1]=n+i,o.o[3][0]=a?t-r:t+r,o.o[3][1]=n-i*e}},extendPrototype([DynamicPropertyContainer],t),t}(),X=function(){function e(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=e,this.comp=e.comp,this.data=t,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),t.sy===1?(this.ir=PropertyFactory.getProp(e,t.ir,0,0,this),this.is=PropertyFactory.getProp(e,t.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(e,t.pt,0,0,this),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,degToRads,this),this.or=PropertyFactory.getProp(e,t.or,0,0,this),this.os=PropertyFactory.getProp(e,t.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return e.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var e=Math.floor(this.pt.v)*2,t=Math.PI*2/e,n=!0,r=this.or.v,i=this.ir.v,a=this.os.v,o=this.is.v,c=2*Math.PI*r/(e*2),u=2*Math.PI*i/(e*2),K,Y,X,ee,te=-Math.PI/2;te+=this.r.v;var ce=this.data.d===3?-1:1;for(this.v._length=0,K=0;K<e;K+=1){Y=n?r:i,X=n?a:o,ee=n?c:u;var ue=Y*Math.cos(te),de=Y*Math.sin(te),fe=ue===0&&de===0?0:de/Math.sqrt(ue*ue+de*de),me=ue===0&&de===0?0:-ue/Math.sqrt(ue*ue+de*de);ue+=+this.p.v[0],de+=+this.p.v[1],this.v.setTripleAt(ue,de,ue-fe*ee*X*ce,de-me*ee*X*ce,ue+fe*ee*X*ce,de+me*ee*X*ce,K,!0),n=!n,te+=t*ce}},convertPolygonToPath:function(){var e=Math.floor(this.pt.v),t=Math.PI*2/e,n=this.or.v,r=this.os.v,i=2*Math.PI*n/(e*4),a,o=-Math.PI*.5,c=this.data.d===3?-1:1;for(o+=this.r.v,this.v._length=0,a=0;a<e;a+=1){var u=n*Math.cos(o),K=n*Math.sin(o),Y=u===0&&K===0?0:K/Math.sqrt(u*u+K*K),X=u===0&&K===0?0:-u/Math.sqrt(u*u+K*K);u+=+this.p.v[0],K+=+this.p.v[1],this.v.setTripleAt(u,K,u-Y*i*r*c,K-X*i*r*c,u+Y*i*r*c,K+X*i*r*c,a,!0),o+=t*c}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],e),e}(),ee=function(){function e(e,t){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=e,this.comp=e.comp,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return e.prototype={convertRectToPath:function(){var e=this.p.v[0],t=this.p.v[1],n=this.s.v[0]/2,r=this.s.v[1]/2,i=bmMin(n,r,this.r.v),a=i*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(e+n,t-r+i,e+n,t-r+i,e+n,t-r+a,0,!0),this.v.setTripleAt(e+n,t+r-i,e+n,t+r-a,e+n,t+r-i,1,!0),i===0?(this.v.setTripleAt(e-n,t+r,e-n+a,t+r,e-n,t+r,2),this.v.setTripleAt(e-n,t-r,e-n,t-r+a,e-n,t-r,3)):(this.v.setTripleAt(e+n-i,t+r,e+n-i,t+r,e+n-a,t+r,2,!0),this.v.setTripleAt(e-n+i,t+r,e-n+a,t+r,e-n+i,t+r,3,!0),this.v.setTripleAt(e-n,t+r-i,e-n,t+r-i,e-n,t+r-a,4,!0),this.v.setTripleAt(e-n,t-r+i,e-n,t-r+a,e-n,t-r+i,5,!0),this.v.setTripleAt(e-n+i,t-r,e-n+i,t-r,e-n+a,t-r,6,!0),this.v.setTripleAt(e+n-i,t-r,e+n-a,t-r,e+n-i,t-r,7,!0))):(this.v.setTripleAt(e+n,t-r+i,e+n,t-r+a,e+n,t-r+i,0,!0),i===0?(this.v.setTripleAt(e-n,t-r,e-n+a,t-r,e-n,t-r,1,!0),this.v.setTripleAt(e-n,t+r,e-n,t+r-a,e-n,t+r,2,!0),this.v.setTripleAt(e+n,t+r,e+n-a,t+r,e+n,t+r,3,!0)):(this.v.setTripleAt(e+n-i,t-r,e+n-i,t-r,e+n-a,t-r,1,!0),this.v.setTripleAt(e-n+i,t-r,e-n+a,t-r,e-n+i,t-r,2,!0),this.v.setTripleAt(e-n,t-r+i,e-n,t-r+i,e-n,t-r+a,3,!0),this.v.setTripleAt(e-n,t+r-i,e-n,t+r-a,e-n,t+r-i,4,!0),this.v.setTripleAt(e-n+i,t+r,e-n+i,t+r,e-n+a,t+r,5,!0),this.v.setTripleAt(e+n-i,t+r,e+n-a,t+r,e+n-i,t+r,6,!0),this.v.setTripleAt(e+n,t+r-i,e+n,t+r-i,e+n,t+r-a,7,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:r},extendPrototype([DynamicPropertyContainer],e),e}();function te(e,t,n){var r;return n===3||n===4?r=(n===3?t.pt:t.ks).k.length?new K(e,t,n):new c(e,t,n):n===5?r=new ee(e,t):n===6?r=new Y(e,t):n===7&&(r=new X(e,t)),r.k&&e.addDynamicProperty(r),r}function ce(){return c}function ue(){return K}var de={};return de.getShapeProp=te,de.getConstructorFunction=ce,de.getKeyframedConstructorFunction=ue,de}(),Matrix=function(){var e=Math.cos,t=Math.sin,n=Math.tan,r=Math.round;function i(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function a(n){if(n===0)return this;var r=e(n),i=t(n);return this._t(r,-i,0,0,i,r,0,0,0,0,1,0,0,0,0,1)}function o(n){if(n===0)return this;var r=e(n),i=t(n);return this._t(1,0,0,0,0,r,-i,0,0,i,r,0,0,0,0,1)}function c(n){if(n===0)return this;var r=e(n),i=t(n);return this._t(r,0,i,0,0,1,0,0,-i,0,r,0,0,0,0,1)}function u(n){if(n===0)return this;var r=e(n),i=t(n);return this._t(r,-i,0,0,i,r,0,0,0,0,1,0,0,0,0,1)}function K(e,t){return this._t(1,t,e,1,0,0)}function Y(e,t){return this.shear(n(e),n(t))}function X(r,i){var a=e(i),o=t(i);return this._t(a,o,0,0,-o,a,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(r),1,0,0,0,0,1,0,0,0,0,1)._t(a,-o,0,0,o,a,0,0,0,0,1,0,0,0,0,1)}function ee(e,t,n){return!n&&n!==0&&(n=1),e===1&&t===1&&n===1?this:this._t(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1)}function te(e,t,n,r,i,a,o,c,u,K,Y,X,ee,te,ce,ue){return this.props[0]=e,this.props[1]=t,this.props[2]=n,this.props[3]=r,this.props[4]=i,this.props[5]=a,this.props[6]=o,this.props[7]=c,this.props[8]=u,this.props[9]=K,this.props[10]=Y,this.props[11]=X,this.props[12]=ee,this.props[13]=te,this.props[14]=ce,this.props[15]=ue,this}function ce(e,t,n){return n||=0,e!==0||t!==0||n!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,e,t,n,1):this}function ue(e,t,n,r,i,a,o,c,u,K,Y,X,ee,te,ce,ue){var de=this.props;if(e===1&&t===0&&n===0&&r===0&&i===0&&a===1&&o===0&&c===0&&u===0&&K===0&&Y===1&&X===0)return de[12]=de[12]*e+de[15]*ee,de[13]=de[13]*a+de[15]*te,de[14]=de[14]*Y+de[15]*ce,de[15]*=ue,this._identityCalculated=!1,this;var fe=de[0],me=de[1],ge=de[2],Te=de[3],Oe=de[4],Ae=de[5],ze=de[6],qe=de[7],Ye=de[8],Ze=de[9],Qe=de[10],et=de[11],nt=de[12],rt=de[13],it=de[14],at=de[15];return de[0]=fe*e+me*i+ge*u+Te*ee,de[1]=fe*t+me*a+ge*K+Te*te,de[2]=fe*n+me*o+ge*Y+Te*ce,de[3]=fe*r+me*c+ge*X+Te*ue,de[4]=Oe*e+Ae*i+ze*u+qe*ee,de[5]=Oe*t+Ae*a+ze*K+qe*te,de[6]=Oe*n+Ae*o+ze*Y+qe*ce,de[7]=Oe*r+Ae*c+ze*X+qe*ue,de[8]=Ye*e+Ze*i+Qe*u+et*ee,de[9]=Ye*t+Ze*a+Qe*K+et*te,de[10]=Ye*n+Ze*o+Qe*Y+et*ce,de[11]=Ye*r+Ze*c+Qe*X+et*ue,de[12]=nt*e+rt*i+it*u+at*ee,de[13]=nt*t+rt*a+it*K+at*te,de[14]=nt*n+rt*o+it*Y+at*ce,de[15]=nt*r+rt*c+it*X+at*ue,this._identityCalculated=!1,this}function de(e){var t=e.props;return this.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function fe(){return this._identityCalculated||=(this._identity=this.props[0]===1&&this.props[1]===0&&this.props[2]===0&&this.props[3]===0&&this.props[4]===0&&this.props[5]===1&&this.props[6]===0&&this.props[7]===0&&this.props[8]===0&&this.props[9]===0&&this.props[10]===1&&this.props[11]===0&&this.props[12]===0&&this.props[13]===0&&this.props[14]===0&&this.props[15]===1,!0),this._identity}function me(e){for(var t=0;t<16;){if(e.props[t]!==this.props[t])return!1;t+=1}return!0}function ge(e){for(var t=0;t<16;t+=1)e.props[t]=this.props[t];return e}function Te(e){for(var t=0;t<16;t+=1)this.props[t]=e[t]}function Oe(e,t,n){return{x:e*this.props[0]+t*this.props[4]+n*this.props[8]+this.props[12],y:e*this.props[1]+t*this.props[5]+n*this.props[9]+this.props[13],z:e*this.props[2]+t*this.props[6]+n*this.props[10]+this.props[14]}}function Ae(e,t,n){return e*this.props[0]+t*this.props[4]+n*this.props[8]+this.props[12]}function ze(e,t,n){return e*this.props[1]+t*this.props[5]+n*this.props[9]+this.props[13]}function qe(e,t,n){return e*this.props[2]+t*this.props[6]+n*this.props[10]+this.props[14]}function Ye(){var e=this.props[0]*this.props[5]-this.props[1]*this.props[4],t=this.props[5]/e,n=-this.props[1]/e,r=-this.props[4]/e,i=this.props[0]/e,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/e,o=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/e,c=new Matrix;return c.props[0]=t,c.props[1]=n,c.props[4]=r,c.props[5]=i,c.props[12]=a,c.props[13]=o,c}function Ze(e){return this.getInverseMatrix().applyToPointArray(e[0],e[1],e[2]||0)}function Qe(e){var t,n=e.length,r=[];for(t=0;t<n;t+=1)r[t]=Ze(e[t]);return r}function et(e,t,n){var r=createTypedArray(`float32`,6);if(this.isIdentity())r[0]=e[0],r[1]=e[1],r[2]=t[0],r[3]=t[1],r[4]=n[0],r[5]=n[1];else{var i=this.props[0],a=this.props[1],o=this.props[4],c=this.props[5],u=this.props[12],K=this.props[13];r[0]=e[0]*i+e[1]*o+u,r[1]=e[0]*a+e[1]*c+K,r[2]=t[0]*i+t[1]*o+u,r[3]=t[0]*a+t[1]*c+K,r[4]=n[0]*i+n[1]*o+u,r[5]=n[0]*a+n[1]*c+K}return r}function nt(e,t,n){return this.isIdentity()?[e,t,n]:[e*this.props[0]+t*this.props[4]+n*this.props[8]+this.props[12],e*this.props[1]+t*this.props[5]+n*this.props[9]+this.props[13],e*this.props[2]+t*this.props[6]+n*this.props[10]+this.props[14]]}function rt(e,t){if(this.isIdentity())return e+`,`+t;var n=this.props;return Math.round((e*n[0]+t*n[4]+n[12])*100)/100+`,`+Math.round((e*n[1]+t*n[5]+n[13])*100)/100}function it(){for(var e=0,t=this.props,n=`matrix3d(`,i=1e4;e<16;)n+=r(t[e]*i)/i,n+=e===15?`)`:`,`,e+=1;return n}function at(e){var t=1e4;return e<1e-6&&e>0||e>-1e-6&&e<0?r(e*t)/t:e}function ot(){var e=this.props,t=at(e[0]),n=at(e[1]),r=at(e[4]),i=at(e[5]),a=at(e[12]),o=at(e[13]);return`matrix(`+t+`,`+n+`,`+r+`,`+i+`,`+a+`,`+o+`)`}return function(){this.reset=i,this.rotate=a,this.rotateX=o,this.rotateY=c,this.rotateZ=u,this.skew=Y,this.skewFromAxis=X,this.shear=K,this.scale=ee,this.setTransform=te,this.translate=ce,this.transform=ue,this.multiply=de,this.applyToPoint=Oe,this.applyToX=Ae,this.applyToY=ze,this.applyToZ=qe,this.applyToPointArray=nt,this.applyToTriplePoints=et,this.applyToPointStringified=rt,this.toCSS=it,this.to2dCSS=ot,this.clone=ge,this.cloneFromProps=Te,this.equals=me,this.inversePoints=Qe,this.inversePoint=Ze,this.getInverseMatrix=Ye,this._t=this.transform,this.isIdentity=fe,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray(`float32`,16),this.reset()}}();function _typeof$3(e){"@babel/helpers - typeof";return _typeof$3=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},_typeof$3(e)}var lottie={},standalone=`__[STANDALONE]__`,animationData=`__[ANIMATIONDATA]__`,renderer=``;function setLocation(e){setLocationHref(e)}function searchAnimations(){standalone===!0?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(e){setSubframeEnabled(e)}function setPrefix(e){setIdPrefix(e)}function loadAnimation(e){return standalone===!0&&(e.animationData=JSON.parse(animationData)),animationManager.loadAnimation(e)}function setQuality(e){if(typeof e==`string`)switch(e){case`high`:setDefaultCurveSegments(200);break;default:case`medium`:setDefaultCurveSegments(50);break;case`low`:setDefaultCurveSegments(10)}else!isNaN(e)&&e>1&&setDefaultCurveSegments(e);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return typeof navigator<`u`}function installPlugin(e,t){e===`expressions`&&setExpressionsPlugin(t)}function getFactory(e){switch(e){case`propertyFactory`:return PropertyFactory;case`shapePropertyFactory`:return ShapePropertyFactory;case`matrix`:return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version=`5.13.0`;function checkReady(){document.readyState===`complete`&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(e){for(var t=queryString.split(`&`),n=0;n<t.length;n+=1){var r=t[n].split(`=`);if(decodeURIComponent(r[0])==e)return decodeURIComponent(r[1])}return null}var queryString=``;if(standalone){var scripts=document.getElementsByTagName(`script`),myScript=scripts[scripts.length-1]||{src:``};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,``):``,renderer=getQueryVariable(`renderer`)}var readyStateCheckInterval=setInterval(checkReady,100);try{((exports===void 0?`undefined`:_typeof$3(exports))!==`object`||module===void 0)&&!(typeof define==`function`&&define.amd)&&(window.bodymovin=lottie)}catch{}var ShapeModifiers=function(){var e={},t={};e.registerModifier=n,e.getModifier=r;function n(e,n){t[e]||(t[e]=n)}function r(e,n,r){return new t[e](n,r)}return e}();function ShapeModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(e){if(!this.closed){e.sh.container.addDynamicProperty(e.sh);var t={shape:e.sh,data:e,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(t),this.addShapeToModifier(t),this._isAnimated&&e.setAsAnimated()}},ShapeModifier.prototype.init=function(e,t){this.shapes=[],this.elem=e,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier);function TrimModifier(){}extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(e,t){this.s=PropertyFactory.getProp(e,t.s,0,.01,this),this.e=PropertyFactory.getProp(e,t.e,0,.01,this),this.o=PropertyFactory.getProp(e,t.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=t.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(e){e.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(e,t,n,r,i){var a=[];t<=1?a.push({s:e,e:t}):e>=1?a.push({s:e-1,e:t-1}):(a.push({s:e,e:1}),a.push({s:0,e:t-1}));var o=[],c,u=a.length,K;for(c=0;c<u;c+=1)if(K=a[c],!(K.e*i<r||K.s*i>r+n)){var Y=K.s*i<=r?0:(K.s*i-r)/n,X=K.e*i>=r+n?1:(K.e*i-r)/n;o.push([Y,X])}return o.length||o.push([0,0]),o},TrimModifier.prototype.releasePathsData=function(e){var t,n=e.length;for(t=0;t<n;t+=1)segmentsLengthPool.release(e[t]);return e.length=0,e},TrimModifier.prototype.processShapes=function(e){var t,n;if(this._mdf||e){var r=this.o.v%360/360;if(r<0&&(r+=1),t=this.s.v>1?1+r:this.s.v<0?0+r:this.s.v+r,n=this.e.v>1?1+r:this.e.v<0?0+r:this.e.v+r,t>n){var i=t;t=n,n=i}t=Math.round(t*1e4)*1e-4,n=Math.round(n*1e4)*1e-4,this.sValue=t,this.eValue=n}else t=this.sValue,n=this.eValue;var a,o,c=this.shapes.length,u,K,Y,X,ee,te=0;if(n===t)for(o=0;o<c;o+=1)this.shapes[o].localShapeCollection.releaseShapes(),this.shapes[o].shape._mdf=!0,this.shapes[o].shape.paths=this.shapes[o].localShapeCollection,this._mdf&&(this.shapes[o].pathsData.length=0);else if(!(n===1&&t===0||n===0&&t===1)){var ce=[],ue,de;for(o=0;o<c;o+=1)if(ue=this.shapes[o],!ue.shape._mdf&&!this._mdf&&!e&&this.m!==2)ue.shape.paths=ue.localShapeCollection;else{if(a=ue.shape.paths,K=a._length,ee=0,!ue.shape._mdf&&ue.pathsData.length)ee=ue.totalShapeLength;else{for(Y=this.releasePathsData(ue.pathsData),u=0;u<K;u+=1)X=bez.getSegmentsLength(a.shapes[u]),Y.push(X),ee+=X.totalLength;ue.totalShapeLength=ee,ue.pathsData=Y}te+=ee,ue.shape._mdf=!0}var fe=t,me=n,ge=0,Te;for(o=c-1;o>=0;--o)if(ue=this.shapes[o],ue.shape._mdf){for(de=ue.localShapeCollection,de.releaseShapes(),this.m===2&&c>1?(Te=this.calculateShapeEdges(t,n,ue.totalShapeLength,ge,te),ge+=ue.totalShapeLength):Te=[[fe,me]],K=Te.length,u=0;u<K;u+=1){fe=Te[u][0],me=Te[u][1],ce.length=0,me<=1?ce.push({s:ue.totalShapeLength*fe,e:ue.totalShapeLength*me}):fe>=1?ce.push({s:ue.totalShapeLength*(fe-1),e:ue.totalShapeLength*(me-1)}):(ce.push({s:ue.totalShapeLength*fe,e:ue.totalShapeLength}),ce.push({s:0,e:ue.totalShapeLength*(me-1)}));var Oe=this.addShapes(ue,ce[0]);if(ce[0].s!==ce[0].e){if(ce.length>1){if(ue.shape.paths.shapes[ue.shape.paths._length-1].c){var Ae=Oe.pop();this.addPaths(Oe,de),Oe=this.addShapes(ue,ce[1],Ae)}else this.addPaths(Oe,de),Oe=this.addShapes(ue,ce[1])}this.addPaths(Oe,de)}}ue.shape.paths=de}}else if(this._mdf)for(o=0;o<c;o+=1)this.shapes[o].pathsData.length=0,this.shapes[o].shape._mdf=!0},TrimModifier.prototype.addPaths=function(e,t){var n,r=e.length;for(n=0;n<r;n+=1)t.addShape(e[n])},TrimModifier.prototype.addSegment=function(e,t,n,r,i,a,o){i.setXYAt(t[0],t[1],`o`,a),i.setXYAt(n[0],n[1],`i`,a+1),o&&i.setXYAt(e[0],e[1],`v`,a),i.setXYAt(r[0],r[1],`v`,a+1)},TrimModifier.prototype.addSegmentFromArray=function(e,t,n,r){t.setXYAt(e[1],e[5],`o`,n),t.setXYAt(e[2],e[6],`i`,n+1),r&&t.setXYAt(e[0],e[4],`v`,n),t.setXYAt(e[3],e[7],`v`,n+1)},TrimModifier.prototype.addShapes=function(e,t,n){var r=e.pathsData,i=e.shape.paths.shapes,a,o=e.shape.paths._length,c,u,K=0,Y,X,ee,te,ce=[],ue,de=!0;for(n?(X=n._length,ue=n._length):(n=shapePool.newElement(),X=0,ue=0),ce.push(n),a=0;a<o;a+=1){for(ee=r[a].lengths,n.c=i[a].c,u=i[a].c?ee.length:ee.length+1,c=1;c<u;c+=1)if(Y=ee[c-1],K+Y.addedLength<t.s)K+=Y.addedLength,n.c=!1;else if(K>t.e){n.c=!1;break}else t.s<=K&&t.e>=K+Y.addedLength?(this.addSegment(i[a].v[c-1],i[a].o[c-1],i[a].i[c],i[a].v[c],n,X,de),de=!1):(te=bez.getNewSegment(i[a].v[c-1],i[a].v[c],i[a].o[c-1],i[a].i[c],(t.s-K)/Y.addedLength,(t.e-K)/Y.addedLength,ee[c-1]),this.addSegmentFromArray(te,n,X,de),de=!1,n.c=!1),K+=Y.addedLength,X+=1;if(i[a].c&&ee.length){if(Y=ee[c-1],K<=t.e){var fe=ee[c-1].addedLength;t.s<=K&&t.e>=K+fe?(this.addSegment(i[a].v[c-1],i[a].o[c-1],i[a].i[0],i[a].v[0],n,X,de),de=!1):(te=bez.getNewSegment(i[a].v[c-1],i[a].v[0],i[a].o[c-1],i[a].i[0],(t.s-K)/fe,(t.e-K)/fe,ee[c-1]),this.addSegmentFromArray(te,n,X,de),de=!1,n.c=!1)}else n.c=!1;K+=Y.addedLength,X+=1}if(n._length&&(n.setXYAt(n.v[ue][0],n.v[ue][1],`i`,ue),n.setXYAt(n.v[n._length-1][0],n.v[n._length-1][1],`o`,n._length-1)),K>t.e)break;a<o-1&&(n=shapePool.newElement(),de=!0,ce.push(n),X=0)}return ce};function PuckerAndBloatModifier(){}extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(e,t){var n=t/100,r=[0,0],i=e._length,a=0;for(a=0;a<i;a+=1)r[0]+=e.v[a][0],r[1]+=e.v[a][1];r[0]/=i,r[1]/=i;var o=shapePool.newElement();o.c=e.c;var c,u,K,Y,X,ee;for(a=0;a<i;a+=1)c=e.v[a][0]+(r[0]-e.v[a][0])*n,u=e.v[a][1]+(r[1]-e.v[a][1])*n,K=e.o[a][0]+(r[0]-e.o[a][0])*-n,Y=e.o[a][1]+(r[1]-e.o[a][1])*-n,X=e.i[a][0]+(r[0]-e.i[a][0])*-n,ee=e.i[a][1]+(r[1]-e.i[a][1])*-n,o.setTripleAt(c,u,K,Y,X,ee,a);return o},PuckerAndBloatModifier.prototype.processShapes=function(e){var t,n,r=this.shapes.length,i,a,o=this.amount.v;if(o!==0){var c,u;for(n=0;n<r;n+=1){if(c=this.shapes[n],u=c.localShapeCollection,c.shape._mdf||this._mdf||e)for(u.releaseShapes(),c.shape._mdf=!0,t=c.shape.paths.shapes,a=c.shape.paths._length,i=0;i<a;i+=1)u.addShape(this.processPath(t[i],o));c.shape.paths=c.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var e=[0,0];function t(e){var t=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||t,this.a&&e.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&e.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&e.skewFromAxis(-this.sk.v,this.sa.v),this.r?e.rotate(-this.r.v):e.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?e.translate(this.px.v,this.py.v,-this.pz.v):e.translate(this.px.v,this.py.v,0):e.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function n(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&=(this.precalculateMatrix(),!1),this.iterateDynamicProperties(),this._mdf||t){var n;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var r,i;if(n=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(r=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/n,0),i=this.p.getValueAtTime(this.p.keyframes[0].t/n,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/n,0),i=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/n,0)):(r=this.p.pv,i=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/n,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){r=[],i=[];var a=this.px,o=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(r[0]=a.getValueAtTime((a.keyframes[0].t+.01)/n,0),r[1]=o.getValueAtTime((o.keyframes[0].t+.01)/n,0),i[0]=a.getValueAtTime(a.keyframes[0].t/n,0),i[1]=o.getValueAtTime(o.keyframes[0].t/n,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(r[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/n,0),r[1]=o.getValueAtTime(o.keyframes[o.keyframes.length-1].t/n,0),i[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/n,0),i[1]=o.getValueAtTime((o.keyframes[o.keyframes.length-1].t-.01)/n,0)):(r=[a.pv,o.pv],i[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/n,a.offsetTime),i[1]=o.getValueAtTime((o._caching.lastFrame+o.offsetTime-.01)/n,o.offsetTime))}else i=e,r=i;this.v.rotate(-Math.atan2(r[1]-i[1],r[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function r(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk){if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}function i(){}function a(e){this._addDynamicProperty(e),this.elem.addDynamicProperty(e),this._isDirty=!0}function o(e,t,n){if(this.elem=e,this.frameId=-1,this.propType=`transform`,this.data=t,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(n||e),t.p&&t.p.s?(this.px=PropertyFactory.getProp(e,t.p.x,0,0,this),this.py=PropertyFactory.getProp(e,t.p.y,0,0,this),t.p.z&&(this.pz=PropertyFactory.getProp(e,t.p.z,0,0,this))):this.p=PropertyFactory.getProp(e,t.p||{k:[0,0,0]},1,0,this),t.rx){if(this.rx=PropertyFactory.getProp(e,t.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(e,t.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(e,t.rz,0,degToRads,this),t.or.k[0].ti){var r,i=t.or.k.length;for(r=0;r<i;r+=1)t.or.k[r].to=null,t.or.k[r].ti=null}this.or=PropertyFactory.getProp(e,t.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(e,t.r||{k:0},0,degToRads,this);t.sk&&(this.sk=PropertyFactory.getProp(e,t.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(e,t.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(e,t.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(e,t.s||{k:[100,100,100]},1,.01,this),this.o=t.o?PropertyFactory.getProp(e,t.o,0,.01,e):{_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}o.prototype={applyToMatrix:t,getValue:n,precalculateMatrix:r,autoOrient:i},extendPrototype([DynamicPropertyContainer],o),o.prototype.addDynamicProperty=a,o.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty;function c(e,t,n){return new o(e,t,n)}return{getTransformProperty:c}}();function RepeaterModifier(){}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(e,t.c,0,null,this),this.o=PropertyFactory.getProp(e,t.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(e,t.tr,this),this.so=PropertyFactory.getProp(e,t.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(e,t.tr.eo,0,.01,this),this.data=t,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(e,t,n,r,i,a){var o=a?-1:1,c=r.s.v[0]+(1-r.s.v[0])*(1-i),u=r.s.v[1]+(1-r.s.v[1])*(1-i);e.translate(r.p.v[0]*o*i,r.p.v[1]*o*i,r.p.v[2]),t.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),t.rotate(-r.r.v*o*i),t.translate(r.a.v[0],r.a.v[1],r.a.v[2]),n.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),n.scale(a?1/c:c,a?1/u:u),n.translate(r.a.v[0],r.a.v[1],r.a.v[2])},RepeaterModifier.prototype.init=function(e,t,n,r){for(this.elem=e,this.arr=t,this.pos=n,this.elemsData=r,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t[n]);n>0;)--n,this._elements.unshift(t[n]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,n=e.length;for(t=0;t<n;t+=1)e[t]._processed=!1,e[t].ty===`gr`&&this.resetElements(e[t].it)},RepeaterModifier.prototype.cloneElements=function(e){var t=JSON.parse(JSON.stringify(e));return this.resetElements(t),t},RepeaterModifier.prototype.changeGroupRender=function(e,t){var n,r=e.length;for(n=0;n<r;n+=1)e[n]._render=t,e[n].ty===`gr`&&this.changeGroupRender(e[n].it,t)},RepeaterModifier.prototype.processShapes=function(e){var t,n,r,i,a,o=!1;if(this._mdf||e){var c=Math.ceil(this.c.v);if(this._groups.length<c){for(;this._groups.length<c;){var u={it:this.cloneElements(this._elements),ty:`gr`};u.it.push({a:{a:0,ix:1,k:[0,0]},nm:`Transform`,o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:`tr`}),this.arr.splice(0,0,u),this._groups.splice(0,0,u),this._currentCopies+=1}this.elem.reloadShapes(),o=!0}a=0;var K;for(r=0;r<=this._groups.length-1;r+=1){if(K=a<c,this._groups[r]._render=K,this.changeGroupRender(this._groups[r].it,K),!K){var Y=this.elemsData[r].it,X=Y[Y.length-1];X.transform.op.v===0?X.transform.op._mdf=!1:(X.transform.op._mdf=!0,X.transform.op.v=0)}a+=1}this._currentCopies=c;var ee=this.o.v,te=ee%1,ce=ee>0?Math.floor(ee):Math.ceil(ee),ue=this.pMatrix.props,de=this.rMatrix.props,fe=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var me=0;if(ee>0){for(;me<ce;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),me+=1;te&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,te,!1),me+=te)}else if(ee<0){for(;me>ce;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),--me;te&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-te,!0),me-=te)}r=this.data.m===1?0:this._currentCopies-1,i=this.data.m===1?1:-1,a=this._currentCopies;for(var ge,Te;a;){if(t=this.elemsData[r].it,n=t[t.length-1].transform.mProps.v.props,Te=n.length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(r/(this._currentCopies-1)),me!==0){for((r!==0&&i===1||r!==this._currentCopies-1&&i===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(de[0],de[1],de[2],de[3],de[4],de[5],de[6],de[7],de[8],de[9],de[10],de[11],de[12],de[13],de[14],de[15]),this.matrix.transform(fe[0],fe[1],fe[2],fe[3],fe[4],fe[5],fe[6],fe[7],fe[8],fe[9],fe[10],fe[11],fe[12],fe[13],fe[14],fe[15]),this.matrix.transform(ue[0],ue[1],ue[2],ue[3],ue[4],ue[5],ue[6],ue[7],ue[8],ue[9],ue[10],ue[11],ue[12],ue[13],ue[14],ue[15]),ge=0;ge<Te;ge+=1)n[ge]=this.matrix.props[ge];this.matrix.reset()}else for(this.matrix.reset(),ge=0;ge<Te;ge+=1)n[ge]=this.matrix.props[ge];me+=1,--a,r+=i}}else for(a=this._currentCopies,r=0,i=1;a;)t=this.elemsData[r].it,n=t[t.length-1].transform.mProps.v.props,t[t.length-1].transform.mProps._mdf=!1,t[t.length-1].transform.op._mdf=!1,--a,r+=i;return o},RepeaterModifier.prototype.addShape=function(){};function RoundCornersModifier(){}extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(e,t.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(e,t){var n=shapePool.newElement();n.c=e.c;var r,i=e._length,a,o,c,u,K,Y,X=0,ee,te,ce,ue,de,fe;for(r=0;r<i;r+=1)a=e.v[r],c=e.o[r],o=e.i[r],a[0]===c[0]&&a[1]===c[1]&&a[0]===o[0]&&a[1]===o[1]?(r===0||r===i-1)&&!e.c?(n.setTripleAt(a[0],a[1],c[0],c[1],o[0],o[1],X),X+=1):(u=r===0?e.v[i-1]:e.v[r-1],K=Math.sqrt((a[0]-u[0])**2+(a[1]-u[1])**2),Y=K?Math.min(K/2,t)/K:0,de=a[0]+(u[0]-a[0])*Y,ee=de,fe=a[1]-(a[1]-u[1])*Y,te=fe,ce=ee-(ee-a[0])*roundCorner,ue=te-(te-a[1])*roundCorner,n.setTripleAt(ee,te,ce,ue,de,fe,X),X+=1,u=r===i-1?e.v[0]:e.v[r+1],K=Math.sqrt((a[0]-u[0])**2+(a[1]-u[1])**2),Y=K?Math.min(K/2,t)/K:0,ce=a[0]+(u[0]-a[0])*Y,ee=ce,ue=a[1]+(u[1]-a[1])*Y,te=ue,de=ee-(ee-a[0])*roundCorner,fe=te-(te-a[1])*roundCorner,n.setTripleAt(ee,te,ce,ue,de,fe,X),X+=1):(n.setTripleAt(e.v[r][0],e.v[r][1],e.o[r][0],e.o[r][1],e.i[r][0],e.i[r][1],X),X+=1);return n},RoundCornersModifier.prototype.processShapes=function(e){var t,n,r=this.shapes.length,i,a,o=this.rd.v;if(o!==0){var c,u;for(n=0;n<r;n+=1){if(c=this.shapes[n],u=c.localShapeCollection,c.shape._mdf||this._mdf||e)for(u.releaseShapes(),c.shape._mdf=!0,t=c.shape.paths.shapes,a=c.shape.paths._length,i=0;i<a;i+=1)u.addShape(this.processPath(t[i],o));c.shape.paths=c.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function floatEqual(e,t){return Math.abs(e-t)*1e5<=Math.min(Math.abs(e),Math.abs(t))}function floatZero(e){return Math.abs(e)<=1e-5}function lerp(e,t,n){return e*(1-n)+t*n}function lerpPoint(e,t,n){return[lerp(e[0],t[0],n),lerp(e[1],t[1],n)]}function quadRoots(e,t,n){if(e===0)return[];var r=t*t-4*e*n;if(r<0)return[];var i=-t/(2*e);if(r===0)return[i];var a=Math.sqrt(r)/(2*e);return[i-a,i+a]}function polynomialCoefficients(e,t,n,r){return[-e+3*t-3*n+r,3*e-6*t+3*n,-3*e+3*t,e]}function singlePoint(e){return new PolynomialBezier(e,e,e,e,!1)}function PolynomialBezier(e,t,n,r,i){i&&pointEqual(e,t)&&(t=lerpPoint(e,r,1/3)),i&&pointEqual(n,r)&&(n=lerpPoint(e,r,2/3));var a=polynomialCoefficients(e[0],t[0],n[0],r[0]),o=polynomialCoefficients(e[1],t[1],n[1],r[1]);this.a=[a[0],o[0]],this.b=[a[1],o[1]],this.c=[a[2],o[2]],this.d=[a[3],o[3]],this.points=[e,t,n,r]}PolynomialBezier.prototype.point=function(e){return[((this.a[0]*e+this.b[0])*e+this.c[0])*e+this.d[0],((this.a[1]*e+this.b[1])*e+this.c[1])*e+this.d[1]]},PolynomialBezier.prototype.derivative=function(e){return[(3*e*this.a[0]+2*this.b[0])*e+this.c[0],(3*e*this.a[1]+2*this.b[1])*e+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(e){var t=this.derivative(e);return Math.atan2(t[1],t[0])},PolynomialBezier.prototype.normalAngle=function(e){var t=this.derivative(e);return Math.atan2(t[0],t[1])},PolynomialBezier.prototype.inflectionPoints=function(){var e=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(e))return[];var t=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/e,n=t*t-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/e;if(n<0)return[];var r=Math.sqrt(n);return floatZero(r)?r>0&&r<1?[t]:[]:[t-r,t+r].filter(function(e){return e>0&&e<1})},PolynomialBezier.prototype.split=function(e){if(e<=0)return[singlePoint(this.points[0]),this];if(e>=1)return[this,singlePoint(this.points[this.points.length-1])];var t=lerpPoint(this.points[0],this.points[1],e),n=lerpPoint(this.points[1],this.points[2],e),r=lerpPoint(this.points[2],this.points[3],e),i=lerpPoint(t,n,e),a=lerpPoint(n,r,e),o=lerpPoint(i,a,e);return[new PolynomialBezier(this.points[0],t,i,o,!0),new PolynomialBezier(o,a,r,this.points[3],!0)]};function extrema(e,t){var n=e.points[0][t],r=e.points[e.points.length-1][t];if(n>r){var i=r;r=n,n=i}for(var a=quadRoots(3*e.a[t],2*e.b[t],e.c[t]),o=0;o<a.length;o+=1)if(a[o]>0&&a[o]<1){var c=e.point(a[o])[t];c<n?n=c:c>r&&(r=c)}return{min:n,max:r}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var e=this.bounds();return{left:e.x.min,right:e.x.max,top:e.y.min,bottom:e.y.max,width:e.x.max-e.x.min,height:e.y.max-e.y.min,cx:(e.x.max+e.x.min)/2,cy:(e.y.max+e.y.min)/2}};function intersectData(e,t,n){var r=e.boundingBox();return{cx:r.cx,cy:r.cy,width:r.width,height:r.height,bez:e,t:(t+n)/2,t1:t,t2:n}}function splitData(e){var t=e.bez.split(.5);return[intersectData(t[0],e.t1,e.t),intersectData(t[1],e.t,e.t2)]}function boxIntersect(e,t){return Math.abs(e.cx-t.cx)*2<e.width+t.width&&Math.abs(e.cy-t.cy)*2<e.height+t.height}function intersectsImpl(e,t,n,r,i,a){if(boxIntersect(e,t)){if(n>=a||e.width<=r&&e.height<=r&&t.width<=r&&t.height<=r){i.push([e.t,t.t]);return}var o=splitData(e),c=splitData(t);intersectsImpl(o[0],c[0],n+1,r,i,a),intersectsImpl(o[0],c[1],n+1,r,i,a),intersectsImpl(o[1],c[0],n+1,r,i,a),intersectsImpl(o[1],c[1],n+1,r,i,a)}}PolynomialBezier.prototype.intersections=function(e,t,n){t===void 0&&(t=2),n===void 0&&(n=7);var r=[];return intersectsImpl(intersectData(this,0,1),intersectData(e,0,1),0,t,r,n),r},PolynomialBezier.shapeSegment=function(e,t){var n=(t+1)%e.length();return new PolynomialBezier(e.v[t],e.o[t],e.i[n],e.v[n],!0)},PolynomialBezier.shapeSegmentInverted=function(e,t){var n=(t+1)%e.length();return new PolynomialBezier(e.v[n],e.i[n],e.o[t],e.v[t],!0)};function crossProduct(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function lineIntersection(e,t,n,r){var i=[e[0],e[1],1],a=[t[0],t[1],1],o=[n[0],n[1],1],c=[r[0],r[1],1],u=crossProduct(crossProduct(i,a),crossProduct(o,c));return floatZero(u[2])?null:[u[0]/u[2],u[1]/u[2]]}function polarOffset(e,t,n){return[e[0]+Math.cos(t)*n,e[1]-Math.sin(t)*n]}function pointDistance(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1])}function pointEqual(e,t){return floatEqual(e[0],t[0])&&floatEqual(e[1],t[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(e,t.s,0,null,this),this.frequency=PropertyFactory.getProp(e,t.r,0,null,this),this.pointsType=PropertyFactory.getProp(e,t.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(e,t,n,r,i,a,o){var c=n-Math.PI/2,u=n+Math.PI/2,K=t[0]+Math.cos(n)*r*i,Y=t[1]-Math.sin(n)*r*i;e.setTripleAt(K,Y,K+Math.cos(c)*a,Y-Math.sin(c)*a,K+Math.cos(u)*o,Y-Math.sin(u)*o,e.length())}function getPerpendicularVector(e,t){var n=[t[0]-e[0],t[1]-e[1]],r=-Math.PI*.5;return[Math.cos(r)*n[0]-Math.sin(r)*n[1],Math.sin(r)*n[0]+Math.cos(r)*n[1]]}function getProjectingAngle(e,t){var n=t===0?e.length()-1:t-1,r=(t+1)%e.length(),i=e.v[n],a=e.v[r],o=getPerpendicularVector(i,a);return Math.atan2(0,1)-Math.atan2(o[1],o[0])}function zigZagCorner(e,t,n,r,i,a,o){var c=getProjectingAngle(t,n),u=t.v[n%t._length],K=t.v[n===0?t._length-1:n-1],Y=t.v[(n+1)%t._length],X=a===2?Math.sqrt((u[0]-K[0])**2+(u[1]-K[1])**2):0,ee=a===2?Math.sqrt((u[0]-Y[0])**2+(u[1]-Y[1])**2):0;setPoint(e,t.v[n%t._length],c,o,r,ee/((i+1)*2),X/((i+1)*2),a)}function zigZagSegment(e,t,n,r,i,a){for(var o=0;o<r;o+=1){var c=(o+1)/(r+1),u=i===2?Math.sqrt((t.points[3][0]-t.points[0][0])**2+(t.points[3][1]-t.points[0][1])**2):0,K=t.normalAngle(c);setPoint(e,t.point(c),K,a,n,u/((r+1)*2),u/((r+1)*2),i),a=-a}return a}ZigZagModifier.prototype.processPath=function(e,t,n,r){var i=e._length,a=shapePool.newElement();if(a.c=e.c,e.c||--i,i===0)return a;var o=-1,c=PolynomialBezier.shapeSegment(e,0);zigZagCorner(a,e,0,t,n,r,o);for(var u=0;u<i;u+=1)o=zigZagSegment(a,c,t,n,r,-o),c=u===i-1&&!e.c?null:PolynomialBezier.shapeSegment(e,(u+1)%i),zigZagCorner(a,e,u+1,t,n,r,o);return a},ZigZagModifier.prototype.processShapes=function(e){var t,n,r=this.shapes.length,i,a,o=this.amplitude.v,c=Math.max(0,Math.round(this.frequency.v)),u=this.pointsType.v;if(o!==0){var K,Y;for(n=0;n<r;n+=1){if(K=this.shapes[n],Y=K.localShapeCollection,K.shape._mdf||this._mdf||e)for(Y.releaseShapes(),K.shape._mdf=!0,t=K.shape.paths.shapes,a=K.shape.paths._length,i=0;i<a;i+=1)Y.addShape(this.processPath(t[i],o,c,u));K.shape.paths=K.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function linearOffset(e,t,n){var r=Math.atan2(t[0]-e[0],t[1]-e[1]);return[polarOffset(e,r,n),polarOffset(t,r,n)]}function offsetSegment(e,t){var n,r,i,a,o,c,u=linearOffset(e.points[0],e.points[1],t);n=u[0],r=u[1],u=linearOffset(e.points[1],e.points[2],t),i=u[0],a=u[1],u=linearOffset(e.points[2],e.points[3],t),o=u[0],c=u[1];var K=lineIntersection(n,r,i,a);K===null&&(K=r);var Y=lineIntersection(o,c,i,a);return Y===null&&(Y=o),new PolynomialBezier(n,K,Y,c)}function joinLines(e,t,n,r,i){var a=t.points[3],o=n.points[0];if(r===3||pointEqual(a,o))return a;if(r===2){var c=-t.tangentAngle(1),u=-n.tangentAngle(0)+Math.PI,K=lineIntersection(a,polarOffset(a,c+Math.PI/2,100),o,polarOffset(o,c+Math.PI/2,100)),Y=K?pointDistance(K,a):pointDistance(a,o)/2,X=polarOffset(a,c,2*Y*roundCorner);return e.setXYAt(X[0],X[1],`o`,e.length()-1),X=polarOffset(o,u,2*Y*roundCorner),e.setTripleAt(o[0],o[1],o[0],o[1],X[0],X[1],e.length()),o}var ee=lineIntersection(pointEqual(a,t.points[2])?t.points[0]:t.points[2],a,o,pointEqual(o,n.points[1])?n.points[3]:n.points[1]);return ee&&pointDistance(ee,a)<i?(e.setTripleAt(ee[0],ee[1],ee[0],ee[1],ee[0],ee[1],e.length()),ee):a}function getIntersection(e,t){var n=e.intersections(t);return n.length&&floatEqual(n[0][0],1)&&n.shift(),n.length?n[0]:null}function pruneSegmentIntersection(e,t){var n=e.slice(),r=t.slice(),i=getIntersection(e[e.length-1],t[0]);return i&&(n[e.length-1]=e[e.length-1].split(i[0])[0],r[0]=t[0].split(i[1])[1]),e.length>1&&t.length>1&&(i=getIntersection(e[0],t[t.length-1]),i)?[[e[0].split(i[0])[0]],[t[t.length-1].split(i[1])[1]]]:[n,r]}function pruneIntersections(e){for(var t,n=1;n<e.length;n+=1)t=pruneSegmentIntersection(e[n-1],e[n]),e[n-1]=t[0],e[n]=t[1];return e.length>1&&(t=pruneSegmentIntersection(e[e.length-1],e[0]),e[e.length-1]=t[0],e[0]=t[1]),e}function offsetSegmentSplit(e,t){var n=e.inflectionPoints(),r,i,a,o;if(n.length===0)return[offsetSegment(e,t)];if(n.length===1||floatEqual(n[1],1))return a=e.split(n[0]),r=a[0],i=a[1],[offsetSegment(r,t),offsetSegment(i,t)];a=e.split(n[0]),r=a[0];var c=(n[1]-n[0])/(1-n[0]);return a=a[1].split(c),o=a[0],i=a[1],[offsetSegment(r,t),offsetSegment(o,t),offsetSegment(i,t)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this.miterLimit=PropertyFactory.getProp(e,t.ml,0,null,this),this.lineJoin=t.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(e,t,n,r){var i=shapePool.newElement();i.c=e.c;var a=e.length();e.c||--a;var o,c,u,K=[];for(o=0;o<a;o+=1)u=PolynomialBezier.shapeSegment(e,o),K.push(offsetSegmentSplit(u,t));if(!e.c)for(o=a-1;o>=0;--o)u=PolynomialBezier.shapeSegmentInverted(e,o),K.push(offsetSegmentSplit(u,t));K=pruneIntersections(K);var Y=null,X=null;for(o=0;o<K.length;o+=1){var ee=K[o];for(X&&(Y=joinLines(i,X,ee[0],n,r)),X=ee[ee.length-1],c=0;c<ee.length;c+=1)u=ee[c],Y&&pointEqual(u.points[0],Y)?i.setXYAt(u.points[1][0],u.points[1][1],`o`,i.length()-1):i.setTripleAt(u.points[0][0],u.points[0][1],u.points[1][0],u.points[1][1],u.points[0][0],u.points[0][1],i.length()),i.setTripleAt(u.points[3][0],u.points[3][1],u.points[3][0],u.points[3][1],u.points[2][0],u.points[2][1],i.length()),Y=u.points[3]}return K.length&&joinLines(i,X,K[0][0],n,r),i},OffsetPathModifier.prototype.processShapes=function(e){var t,n,r=this.shapes.length,i,a,o=this.amount.v,c=this.miterLimit.v,u=this.lineJoin;if(o!==0){var K,Y;for(n=0;n<r;n+=1){if(K=this.shapes[n],Y=K.localShapeCollection,K.shape._mdf||this._mdf||e)for(Y.releaseShapes(),K.shape._mdf=!0,t=K.shape.paths.shapes,a=K.shape.paths._length,i=0;i<a;i+=1)Y.addShape(this.processPath(t[i],o,u,c));K.shape.paths=K.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function getFontProperties(e){for(var t=e.fStyle?e.fStyle.split(` `):[],n=`normal`,r=`normal`,i=t.length,a,o=0;o<i;o+=1)switch(a=t[o].toLowerCase(),a){case`italic`:r=`italic`;break;case`bold`:n=`700`;break;case`black`:n=`900`;break;case`medium`:n=`500`;break;case`regular`:case`normal`:n=`400`;break;case`light`:case`thin`:n=`200`}return{style:r,weight:e.fWeight||n}}var FontManager=function(){var e=5e3,t={w:0,size:0,shapes:[],data:{shapes:[]}},n=[];n=n.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var r=127988,i=917631,a=917601,o=917626,c=65039,u=8205,K=127462,Y=127487,X=[`d83cdffb`,`d83cdffc`,`d83cdffd`,`d83cdffe`,`d83cdfff`];function ee(e){var t=e.split(`,`),n,r=t.length,i=[];for(n=0;n<r;n+=1)t[n]!==`sans-serif`&&t[n]!==`monospace`&&i.push(t[n]);return i.join(`,`)}function te(e,t){var n=createTag(`span`);n.setAttribute(`aria-hidden`,!0),n.style.fontFamily=t;var r=createTag(`span`);r.innerText=`giItT1WQy@!-/#`,n.style.position=`absolute`,n.style.left=`-10000px`,n.style.top=`-10000px`,n.style.fontSize=`3
1300px`,n.style.fontVariant=`normal`,n.style.fontStyle=`normal`,n.style.fontWeight=`normal`,n.style.letterSpacing=`0`,n.appendChild(r),document.body.appendChild(n);var i=r.offsetWidth;return r.style.fontFamily=ee(e)+`, `+t,{node:r,w:i,parent:n}}function ce(){var e,t=this.fonts.length,n,r,i=t;for(e=0;e<t;e+=1)this.fonts[e].loaded?--i:this.fonts[e].fOrigin===`n`||this.fonts[e].origin===0?this.fonts[e].loaded=!0:(n=this.fonts[e].monoCase.node,r=this.fonts[e].monoCase.w,n.offsetWidth===r?(n=this.fonts[e].sansCase.node,r=this.fonts[e].sansCase.w,n.offsetWidth!==r&&(--i,this.fonts[e].loaded=!0)):(--i,this.fonts[e].loaded=!0),this.fonts[e].loaded&&(this.fonts[e].sansCase.parent.parentNode.removeChild(this.fonts[e].sansCase.parent),this.fonts[e].monoCase.parent.parentNode.removeChild(this.fonts[e].monoCase.parent)));i!==0&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)}function ue(e,t){var n=document.body&&t?`svg`:`canvas`,r,i=getFontProperties(e);if(n===`svg`){var a=createNS(`text`);a.style.fontSize=`100px`,a.setAttribute(`font-family`,e.fFamily),a.setAttribute(`font-style`,i.style),a.setAttribute(`font-weight`,i.weight),a.textContent=`1`,e.fClass?(a.style.fontFamily=`
13inherit`,a.setAttribute(`class`,e.fClass)):a.style.fontFamily=e.fFamily,t.appendChild(a),r=a}else{var o=new OffscreenCanvas(500,500).getContext(`2d`);o.font=i.style+` `+i.weight+` 100px `+e.fFamily,r=o}function c(e){return n===`svg`?(r.textContent=e,r.getComputedTextLength()):r.measureText(e).width}return{measureText:c}}function de(e,t){if(!e){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=e.list;return}if(!document.body){this.isLoaded=!0,e.list.forEach(function(e){e.helper=ue(e),e.cache={}}),this.fonts=e.list;return}var n=e.list,r,i=n.length,a=i;for(r=0;r<i;r+=1){var o=!0,c,u;if(n[r].loaded=!1,n[r].monoCase=te(n[r].fFamily,`monospace`),n[r].sansCase=te(n[r].fFamily,`sans-serif`),!n[r].fPath)n[r].loaded=!0,--a;else if(n[r].fOrigin===`p`||n[r].origin===3){if(c=document.querySelectorAll(`style[f-forigin="p"][f-family="`+n[r].fFamily+`"], style[f-origin="3"][f-family="`+n[r].fFamily+`"]`),c.length>0&&(o=!1),o){var K=createTag(`style`);K.setAttribute(`f-forigin`,n[r].fOrigin),K.setAttribute(`f-origin`,n[r].origin),K.setAttribute(`f-family`,n[r].fFamily),K.type=`text/css`,K.innerText=`@font-face {font-family: `+n[r].fFamily+`; font-style: normal; src: url('`+n[r].fPath+`');}`,t.appendChild(K)}}else if(n[r].fOrigin===`g`||n[r].origin===1){for(c=document.querySelectorAll(`link[f-forigin="g"], link[f-origin="1"]`),u=0;u<c.length;u+=1)c[u].href.indexOf(n[r].fPath)!==-1&&(o=!1);if(o){var Y=createTag(`link`);Y.setAttribute(`f-forigin`,n[r].fOrigin),Y.setAttribute(`f-origin`,n[r].origin),Y.type=`text/css`,Y.rel=`stylesheet`,Y.href=n[r].fPath,document.body.appendChild(Y)}}else if(n[r].fOrigin===`t`||n[r].origin===2){for(c=document.querySelectorAll(`script[f-forigin="t"], script[f-origin="2"]`),u=0;u<c.length;u+=1)n[r].fPath===c[u].src&&(o=!1);if(o){var X=createTag(`link`);X.setAttribute(`f-forigin`,n[r].fOrigin),X.setAttribute(`f-origin`,n[r].origin),X.setAttribute(`rel`,`stylesheet`),X.setAttribute(`href`,n[r].fPath),t.appendChild(X)}}n[r].helper=ue(n[r],t),n[r].cache={},this.fonts.push(n[r])}a===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}function fe(e){if(e){this.chars||=[];var t,n=e.length,r,i=this.chars.length,a;for(t=0;t<n;t+=1){for(r=0,a=!1;r<i;)this.chars[r].style===e[t].style&&this.chars[r].fFamily===e[t].fFamily&&this.chars[r].ch===e[t].ch&&(a=!0),r+=1;a||(this.chars.push(e[t]),i+=1)}}}function me(e,n,r){for(var i=0,a=this.chars.length;i<a;){if(this.chars[i].ch===e&&this.chars[i].style===n&&this.chars[i].fFamily===r)return this.chars[i];i+=1}return(typeof e==`string`&&e.charCodeAt(0)!==13||!e)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn(`Missing character from exported characters list: `,e,n,r)),t}function ge(e,t,n){var r=this.getFontByName(t),i=e;if(!r.cache[i]){var a=r.helper;if(e===` `){var o=a.measureText(`|`+e+`|`),c=a.measureText(`||`);r.cache[i]=(o-c)/100}else r.cache[i]=a.measureText(e)/100}return r.cache[i]*n}function Te(e){for(var t=0,n=this.fonts.length;t<n;){if(this.fonts[t].fName===e)return this.fonts[t];t+=1}return this.fonts[0]}function Oe(e){var t=0,n=e.charCodeAt(0);if(n>=55296&&n<=56319){var r=e.charCodeAt(1);r>=56320&&r<=57343&&(t=(n-55296)*1024+r-56320+65536)}return t}function Ae(e,t){var n=e.toString(16)+t.toString(16);return X.indexOf(n)!==-1}function ze(e){return e===u}function qe(e){return e===c}function Ye(e){var t=Oe(e);return t>=K&&t<=Y}function Ze(e){return Ye(e.substr(0,2))&&Ye(e.substr(2,2))}function Qe(e){return n.indexOf(e)!==-1}function et(e,t){var n=Oe(e.substr(t,2));if(n!==r)return!1;var c=0;for(t+=2;c<5;){if(n=Oe(e.substr(t,2)),n<a||n>o)return!1;c+=1,t+=2}return Oe(e.substr(t,2))===i}function nt(){this.isLoaded=!0}var rt=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return rt.isModifier=Ae,rt.isZeroWidthJoiner=ze,rt.isFlagEmoji=Ze,rt.isRegionalCode=Ye,rt.isCombinedCharacter=Qe,rt.isRegionalFlag=et,rt.isVariationSelector=qe,rt.BLACK_FLAG_CODE_POINT=r,rt.prototype={addChars:fe,addFonts:de,getCharData:me,getFontByName:Te,measureText:ge,checkLoadedFonts:ce,setIsLoaded:nt},rt}();function SlotManager(e){this.animationData=e}SlotManager.prototype.getProp=function(e){return this.animationData.slots&&this.animationData.slots[e.sid]?Object.assign(e,this.animationData.slots[e.sid].p):e};function slotFactory(e){return new SlotManager(e)}
vendor: 17,216 bytes, line 13
13function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(e){this.renderableComponents.indexOf(e)===-1&&this.renderableComponents.push(e)},removeRenderableComponent:function(e){this.renderableComponents.indexOf(e)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(e),1)},prepareRenderableFrame:function(e){this.checkLayerLimits(e)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(e){this.data.ip-this.data.st<=e&&this.data.op-this.data.st>e?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,t=this.renderableComponents.length;for(e=0;e<t;e+=1)this.renderableComponents[e].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=function(){var e={0:`source-over`,1:`multiply`,2:`screen`,3:`overlay`,4:`darken`,5:`lighten`,6:`color-dodge`,7:`color-burn`,8:`hard-light`,9:`soft-light`,10:`difference`,11:`exclusion`,12:`hue`,13:`saturation`,14:`color`,15:`luminosity`};return function(t){return e[t]||``}}();function SliderEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function AngleEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function ColorEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,1,0,n)}function PointEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,1,0,n)}function LayerIndexEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function MaskIndexEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function CheckboxEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function NoValueEffect(){this.p={}}function EffectsManager(e,t){var n=e.ef||[];this.effectElements=[];var r,i=n.length,a;for(r=0;r<i;r+=1)a=new GroupEffect(n[r],t),this.effectElements.push(a)}function GroupEffect(e,t){this.init(e,t)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(e,t){this.data=e,this.effectElements=[],this.initDynamicPropertyContainer(t);var n,r=this.data.ef.length,i,a=this.data.ef;for(n=0;n<r;n+=1){switch(i=null,a[n].ty){case 0:i=new SliderEffect(a[n],t,this);break;case 1:i=new AngleEffect(a[n],t,this);break;case 2:i=new ColorEffect(a[n],t,this);break;case 3:i=new PointEffect(a[n],t,this);break;case 4:case 7:i=new CheckboxEffect(a[n],t,this);break;case 10:i=new LayerIndexEffect(a[n],t,this);break;case 11:i=new MaskIndexEffect(a[n],t,this);break;case 5:i=new EffectsManager(a[n],t,this);break;default:i=new NoValueEffect(a[n],t,this)}i&&this.effectElements.push(i)}};function BaseElement(){}BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var e=0,t=this.data.masksProperties.length;e<t;){if(this.data.masksProperties[e].mode!==`n`&&this.data.masksProperties[e].cl!==!1)return!0;e+=1}return!1},initExpressions:function(){var e=getExpressionInterfaces();if(e){var t=e(`layer`),n=e(`effects`),r=e(`shape`),i=e(`text`),a=e(`comp`);this.layerInterface=t(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var o=n.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(o),this.data.ty===0||this.data.xt?this.compInterface=a(this):this.data.ty===4?(this.layerInterface.shapeInterface=r(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=i(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var e=getBlendMode(this.data.bm),t=this.baseElement||this.layerElement;t.style[`mix-blend-mode`]=e},initBaseData:function(e,t,n){this.globalData=t,this.comp=n,this.data=e,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}};function FrameElement(){}FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(e,t){var n,r=this.dynamicProperties.length;for(n=0;n<r;n+=1)(t||this._isParent&&this.dynamicProperties[n].propType===`transform`)&&(this.dynamicProperties[n].getValue(),this.dynamicProperties[n]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(e){this.dynamicProperties.indexOf(e)===-1&&this.dynamicProperties.push(e)}};function FootageElement(e,t,n){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.footageData=t.imageLoader.getAsset(this.assetData),this.initBaseData(e,t,n)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var e=getExpressionInterfaces();if(e){var t=e(`footage`);this.layerInterface=t(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData};function AudioElement(e,t,n){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.initBaseData(e,t,n),this._isPlaying=!1,this._canPlay=!1;var r=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(r),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,e.au&&e.au.lv?e.au.lv:{k:[100]},1,.01,this)}AudioElement.prototype.prepareFrame=function(e){if(this.prepareRenderableFrame(e,!0),this.prepareProperties(e,!0),this.tm._placeholder)this._currentTime=e/this.data.sr;else{var t=this.tm.v;this._currentTime=t}this._volume=this.lv.v[0];var n=this._volume*this._volumeMultiplier;this._previousVolume!==n&&(this._previousVolume=n,this.audio.volume(n))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(e){var t,n=this.layers.length,r;for(this.completeLayers=!0,t=n-1;t>=0;--t)this.elements[t]||(r=this.layers[t],r.ip-r.st<=e-this.layers[t].st&&r.op-r.st>e-this.layers[t].st&&this.buildItem(t)),this.completeLayers=this.elements[t]?this.completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e);default:return this.createNull(e)}},BaseRenderer.prototype.createCamera=function(){throw Error(`You're using a 3d camera. Try the html renderer.`)},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.buildItem(e);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(e){this.completeLayers=!1;var t,n=e.length,r,i=this.layers.length;for(t=0;t<n;t+=1)for(r=0;r<i;){if(this.layers[r].id===e[t].id){this.layers[r]=e[t];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(e){this.globalData.projectInterface=e},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(e,t,n){for(var r=this.elements,i=this.layers,a=0,o=i.length;a<o;)i[a].ind==t&&(!r[a]||r[a]===!0?(this.buildItem(a),this.addPendingElement(e)):(n.push(r[a]),r[a].setAsParent(),i[a].parent===void 0?e.setHierarchy(n):this.buildElementParenting(e,i[a].parent,n))),a+=1},BaseRenderer.prototype.addPendingElement=function(e){this.pendingElements.push(e)},BaseRenderer.prototype.searchExtraCompositions=function(e){var t,n=e.length;for(t=0;t<n;t+=1)if(e[t].xt){var r=this.createComp(e[t]);r.initExpressions(),this.globalData.projectInterface.registerComposition(r)}},BaseRenderer.prototype.getElementById=function(e){var t,n=this.elements.length;for(t=0;t<n;t+=1)if(this.elements[t].data.ind===e)return this.elements[t];return null},BaseRenderer.prototype.getElementByPath=function(e){var t=e.shift(),n;if(typeof t==`number`)n=this.elements[t];else{var r,i=this.elements.length;for(r=0;r<i;r+=1)if(this.elements[r].data.nm===t){n=this.elements[r];break}}return e.length===0?n:n.getElementByPath(e)},BaseRenderer.prototype.setupGlobalData=function(e,t){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(e),this.globalData.fontManager.addChars(e.chars),this.globalData.fontManager.addFonts(e.fonts,t),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=e.fr,this.globalData.nm=e.nm,this.globalData.compSize={w:e.w,h:e.h}};var effectTypes={TRANSFORM_EFFECT:`transformEFfect`};function TransformElement(){}TransformElement.prototype={initTransform:function(){var e=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:e,localMat:e,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var e,t=this.finalTransform.mat,n=0,r=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;n<r;){if(this.hierarchy[n].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}n+=1}if(this.finalTransform._matMdf)for(e=this.finalTransform.mProp.v.props,t.cloneFromProps(e),n=0;n<r;n+=1)t.multiply(this.hierarchy[n].finalTransform.mProp.v)}(!this.localTransforms||this.finalTransform._matMdf)&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var e=0,t=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;e<t;)this.localTransforms[e]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[e]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),e+=1;if(this.finalTransform._localMatMdf){var n=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(n),e=1;e<t;e+=1){var r=this.localTransforms[e].matrix;n.multiply(r)}n.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var i=this.finalTransform.localOpacity;for(e=0;e<t;e+=1)i*=this.localTransforms[e].opacity*.01;this.finalTransform.localOpacity=i}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var e=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(e.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var t=0,n=e.length;for(t=0;t<n;t+=1)this.localTransforms.push(e[t])}}},globalToLocal:function(e){var t=[];t.push(this.finalTransform);for(var n=!0,r=this.comp;n;)r.finalTransform?(r.data.hasMask&&t.splice(0,0,r.finalTransform),r=r.comp):n=!1;var i,a=t.length,o;for(i=0;i<a;i+=1)o=t[i].mat.applyToPointArray(0,0,0),e=[e[0]-o[0],e[1]-o[1],0];return e},mHelper:new Matrix};function MaskElement(e,t,n){this.data=e,this.element=t,this.globalData=n,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var r=this.globalData.defs,i,a=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(a),this.solidPath=``;var o,c=this.masksProperties,u=0,K=[],Y,X,ee=createElementID(),te,ce,ue,de,fe=`clipPath`,me=`clip-path`;for(i=0;i<a;i+=1)if((c[i].mode!==`a`&&c[i].mode!==`n`||c[i].inv||c[i].o.k!==100||c[i].o.x)&&(fe=`mask`,me=`mask`),(c[i].mode===`s`||c[i].mode===`i`)&&u===0?(te=createNS(`rect`),te.setAttribute(`fill`,`#ffffff`),te.setAttribute(`width`,this.element.comp.data.w||0),te.setAttribute(`height`,this.element.comp.data.h||0),K.push(te)):te=null,o=createNS(`path`),c[i].mode===`n`)this.viewData[i]={op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),elem:o,lastPath:``},r.appendChild(o);else{u+=1,o.setAttribute(`fill`,c[i].mode===`s`?`#000000`:`#ffffff`),o.setAttribute(`clip-rule`,`nonzero`);var ge;if(c[i].x.k===0?(ue=null,de=null):(fe=`mask`,me=`mask`,de=PropertyFactory.getProp(this.element,c[i].x,0,null,this.element),ge=createElementID(),ce=createNS(`filter`),ce.setAttribute(`id`,ge),ue=createNS(`feMorphology`),ue.setAttribute(`operator`,`erode`),ue.setAttribute(`in`,`SourceGraphic`),ue.setAttribute(`radius`,`0`),ce.appendChild(ue),r.appendChild(ce),o.setAttribute(`stroke`,c[i].mode===`s`?`#000000`:`#ffffff`)),this.storedData[i]={elem:o,x:de,expan:ue,lastPath:``,lastOperator:``,filterId:ge,lastRadius:0},c[i].mode===`i`){X=K.length;var Te=createNS(`g`);for(Y=0;Y<X;Y+=1)Te.appendChild(K[Y]);var Oe=createNS(`mask`);Oe.setAttribute(`mask-type`,`alpha`),Oe.setAttribute(`id`,ee+`_`+u),Oe.appendChild(o),r.appendChild(Oe),Te.setAttribute(`mask`,`url(`+getLocationHref()+`#`+ee+`_`+u+`)`),K.length=0,K.push(Te)}else K.push(o);c[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:o,lastPath:``,op:PropertyFactory.getProp(this.element,c[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,c[i],3),invRect:te},this.viewData[i].prop.k||this.drawPath(c[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(fe),a=K.length,i=0;i<a;i+=1)this.maskElement.appendChild(K[i]);u>0&&(this.maskElement.setAttribute(`id`,ee),this.element.maskedElement.setAttribute(me,`url(`+getLocationHref()+`#`+ee+`)`),r.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(e){return this.viewData[e].prop},MaskElement.prototype.renderFrame=function(e){var t=this.element.finalTransform.mat,n,r=this.masksProperties.length;for(n=0;n<r;n+=1)if((this.viewData[n].prop._mdf||e)&&this.drawPath(this.masksProperties[n],this.viewData[n].prop.v,this.viewData[n]),(this.viewData[n].op._mdf||e)&&this.viewData[n].elem.setAttribute(`fill-opacity`,this.viewData[n].op.v),this.masksProperties[n].mode!==`n`&&(this.viewData[n].invRect&&(this.element.finalTransform.mProp._mdf||e)&&this.viewData[n].invRect.setAttribute(`transform`,t.getInverseMatrix().to2dCSS()),this.storedData[n].x&&(this.storedData[n].x._mdf||e))){var i=this.storedData[n].expan;this.storedData[n].x.v<0?(this.storedData[n].lastOperator!==`erode`&&(this.storedData[n].lastOperator=`erode`,this.storedData[n].elem.setAttribute(`filter`,`url(`+getLocationHref()+`#`+this.storedData[n].filterId+`)`)),i.setAttribute(`radiu
13s`,-this.storedData[n].x.v)):(this.storedData[n].lastOperator!==`dilate`&&(this.storedData[n].lastOperator=`dilate`,this.storedData[n].elem.setAttribute(`filter`,null)),this.storedData[n].elem.setAttribute(`stroke-width`,this.storedData[n].x.v*2))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var e=`M0,0 `;return e+=` h`+this.globalData.compSize.w,e+=` v`+this.globalData.compSize.h,e+=` h-`+this.globalData.compSize.w,e+=` v-`+this.globalData.compSize.h+` `,e},MaskElement.prototype.drawPath=function(e,t,n){var r=` M`+t.v[0][0]+`,`+t.v[0][1],i,a=t._length;for(i=1;i<a;i+=1)r+=` C`+t.o[i-1][0]+`,`+t.o[i-1][1]+` `+t.i[i][0]+`,`+t.i[i][1]+` `+t.v[i][0]+`,`+t.v[i][1];if(t.c&&a>1&&(r+=` C`+t.o[i-1][0]+`,`+t.o[i-1][1]+` `+t.i[0][0]+`,`+t.i[0][1]+` `+t.v[0][0]+`,`+t.v[0][1]),n.lastPath!==r){var o=``;n.elem&&(t.c&&(o=e.inv?this.solidPath+r:r),n.elem.setAttribute(`d`,o)),n.lastPath=r}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var e={};e.createFilter=t,e.createAlphaToLuminanceFilter=n;function t(e,t){var n=createNS(`filter`);return n.setAttribute(`id`,e),t!==!0&&(n.setAttribute(`filterUnits`,`objectBoundingBox`),n.setAttribute(`x`,`0%`),n.setAttribute(`y`,`0%`),n.setAttribute(`width`,`100%`),n.setAttribute(`height`,`100%`)),n}function n(){var e=createNS(`feColorMatrix`);return e.setAttribute(`type`,`matrix`),e.setAttribute(`color-interpolation-filters`,`sRGB`),e.setAttribute(`values`,`0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1`),e}return e}(),featureSupport=function(){var e={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<`u`};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),/firefox/i.test(navigator.userAgent)&&(e.svgLumaHidden=!1),e}(),registeredEffects$1={},idPrefix=`filter_result_`;function SVGEffects(e){var t,n=`SourceGraphic`,r=e.data.ef?e.data.ef.length:0,i=createElementID(),a=filtersFactory.createFilter(i,!0),o=0;this.filters=[];var c;for(t=0;t<r;t+=1){c=null;var u=e.data.ef[t].ty;if(registeredEffects$1[u]){var K=registeredEffects$1[u].effect;c=new K(a,e.effectsManager.effectElements[t],e,idPrefix+o,n),n=idPrefix+o,registeredEffects$1[u].countsAsEffect&&(o+=1)}c&&this.filters.push(c)}o&&(e.globalData.defs.appendChild(a),e.layerElement.setAttribute(`filter`,`url(`+getLocationHref()+`#`+i+`)`)),this.filters.length&&e.addRenderableComponent(this)}SVGEffects.prototype.renderFrame=function(e){var t,n=this.filters.length;for(t=0;t<n;t+=1)this.filters[t].renderFrame(e)},SVGEffects.prototype.getEffects=function(e){var t,n=this.filters.length,r=[];for(t=0;t<n;t+=1)this.filters[t].type===e&&r.push(this.filters[t]);return r};
vendor: 52,081 bytes, line 13
13function registerEffect$1(e,t,n){registeredEffects$1[e]={effect:t,countsAsEffect:n}}function SVGBaseElement(){}SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS(`g`)},createContainerElements:function(){this.matteElement=createNS(`g`),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var e=null;if(this.data.td){this.matteMasks={};var t=createNS(`g`);t.setAttribute(`id`,this.layerId),t.appendChild(this.layerElement),e=t,this.globalData.defs.appendChild(t)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),e=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute(`id`,this.data.ln),this.data.cl&&this.layerElement.setAttribute(`class`,this.data.cl),this.data.ty===0&&!this.data.hd){var n=createNS(`clipPath`),r=createNS(`path`);r.setAttribute(`d`,`M0,0 L`+this.data.w+`,0 L`+this.data.w+`,`+this.data.h+` L0,`+this.data.h+`z`);var i=createElementID();if(n.setAttribute(`id`,i),n.appendChild(r),this.globalData.defs.appendChild(n),this.checkMasks()){var a=createNS(`g`);a.setAttribute(`clip-path`,`url(`+getLocationHref()+`#`+i+`)`),a.appendChild(this.layerElement),this.transformedElement=a,e?e.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute(`clip-path`,`url(`+getLocationHref()+`#`+i+`)`)}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute(`transform`,this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute(`opacity`,this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(e){if(this.matteMasks||={},!this.matteMasks[e]){var t=this.layerId+`_`+e,n,r,i,a;if(e===1||e===3){var o=createNS(`mask`);o.setAttribute(`id`,t),o.setAttribute(`mask-type`,e===3?`luminance`:`alpha`),i=createNS(`use`),i.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,`#`+this.layerId),o.appendChild(i),this.globalData.defs.appendChild(o),!featureSupport.maskType&&e===1&&(o.setAttribute(`mask-type`,`luminance`),n=createElementID(),r=filtersFactory.createFilter(n),this.globalData.defs.appendChild(r),r.appendChild(filtersFactory.createAlphaToLuminanceFilter()),a=createNS(`g`),a.appendChild(i),o.appendChild(a),a.setAttribute(`filter`,`url(`+getLocationHref()+`#`+n+`)`))}else if(e===2){var c=createNS(`mask`);c.setAttribute(`id`,t),c.setAttribute(`mask-type`,`alpha`);var u=createNS(`g`);c.appendChild(u),n=createElementID(),r=filtersFactory.createFilter(n);var K=createNS(`feComponentTransfer`);K.setAttribute(`in`,`SourceGraphic`),r.appendChild(K);var Y=createNS(`feFuncA`);Y.setAttribute(`type`,`table`),Y.setAttribute(`tableValues`,`1.0 0.0`),K.appendChild(Y),this.globalData.defs.appendChild(r);var X=createNS(`rect`);X.setAttribute(`width`,this.comp.data.w),X.setAttribute(`height`,this.comp.data.h),X.setAttribute(`x`,`0`),X.setAttribute(`y`,`0`),X.setAttribute(`fill`,`#ffffff`),X.setAttribute(`opacity`,`0`),u.setAttribute(`filter`,`url(`+getLocationHref()+`#`+n+`)`),u.appendChild(X),i=createNS(`use`),i.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,`#`+this.layerId),u.appendChild(i),featureSupport.maskType||(c.setAttribute(`mask-type`,`luminance`),r.appendChild(filtersFactory.createAlphaToLuminanceFilter()),a=createNS(`g`),u.appendChild(X),a.appendChild(this.layerElement),u.appendChild(a)),this.globalData.defs.appendChild(c)}this.matteMasks[e]=t}return this.matteMasks[e]},setMatte:function(e){this.matteElement&&this.matteElement.setAttribute(`mask`,`url(`+getLocationHref()+`#`+e+`)`)}};function HierarchyElement(){}HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(e){this.hierarchy=e},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}};function RenderableDOMElement(){}(function(){extendPrototype([RenderableElement,createProxyFunction({initElement:function(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initTransform(e,t,n),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var e=this.baseElement||this.layerElement;e.style.display=`none`,this.hidden=!0}},show:function(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var e=this.baseElement||this.layerElement;e.style.display=`block`}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&=!1)},renderInnerContent:function(){},prepareFrame:function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement)})();function IImageElement(e,t,n){this.assetData=t.getAssetData(e.refId),this.assetData&&this.assetData.sid&&(this.assetData=t.slotManager.getProp(this.assetData)),this.initElement(e,t,n),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS(`image`),this.innerElem.setAttribute(`width`,this.assetData.w+`px`),this.innerElem.setAttribute(`height`,this.assetData.h+`px`),this.innerElem.setAttribute(`preserveAspectRatio`,this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,e),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect};function ProcessedElement(e,t){this.elem=e,this.pos=t}function IShapeElement(){}IShapeElement.prototype={addShapeToModifiers:function(e){var t,n=this.shapeModifiers.length;for(t=0;t<n;t+=1)this.shapeModifiers[t].addShape(e)},isShapeInAnimatedModifiers:function(e){for(var t=0,n=this.shapeModifiers.length;t<n;)if(this.shapeModifiers[t].isAnimatedWithShape(e))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var e,t=this.shapes.length;for(e=0;e<t;e+=1)this.shapes[e].sh.reset();t=this.shapeModifiers.length;var n;for(e=t-1;e>=0&&(n=this.shapeModifiers[e].processShapes(this._isFirstFrame),!n);--e);}},searchProcessedElement:function(e){for(var t=this.processedElements,n=0,r=t.length;n<r;){if(t[n].elem===e)return t[n].pos;n+=1}return 0},addProcessedElement:function(e,t){for(var n=this.processedElements,r=n.length;r;)if(--r,n[r].elem===e){n[r].pos=t;return}n.push(new ProcessedElement(e,t))},prepareFrame:function(e){this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)}};var lineCapEnum={1:`butt`,2:`round`,3:`square`},lineJoinEnum={1:`miter`,2:`round`,3:`bevel`};function SVGShapeData(e,t,n){this.caches=[],this.styles=[],this.transformers=e,this.lStr=``,this.sh=n,this.lvl=t,this._isAnimated=!!n.k;for(var r=0,i=e.length;r<i;){if(e[r].mProps.dynamicProperties.length){this._isAnimated=!0;break}r+=1}}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0};function SVGStyleData(e,t){this.data=e,this.type=e.ty,this.d=``,this.lvl=t,this._mdf=!1,this.closed=e.hd===!0,this.pElem=createNS(`path`),this.msElem=null}SVGStyleData.prototype.reset=function(){this.d=``,this._mdf=!1};function DashProperty(e,t,n,r){this.elem=e,this.frameId=-1,this.dataProps=createSizedArray(t.length),this.renderer=n,this.k=!1,this.dashStr=``,this.dashArray=createTypedArray(`float32`,t.length?t.length-1:0),this.dashoffset=createTypedArray(`float32`,1),this.initDynamicPropertyContainer(r);var i,a=t.length||0,o;for(i=0;i<a;i+=1)o=PropertyFactory.getProp(e,t[i].v,0,0,this),this.k=o.k||this.k,this.dataProps[i]={n:t[i].n,p:o};this.k||this.getValue(!0),this._isAnimated=this.k}DashProperty.prototype.getValue=function(e){if((this.elem.globalData.frameId!==this.frameId||e)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||e,this._mdf)){var t=0,n=this.dataProps.length;for(this.renderer===`svg`&&(this.dashStr=``),t=0;t<n;t+=1)this.dataProps[t].n===`o`?this.dashoffset[0]=this.dataProps[t].p.v:this.renderer===`svg`?this.dashStr+=` `+this.dataProps[t].p.v:this.dashArray[t]=this.dataProps[t].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty);function SVGStrokeStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},`svg`,this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=n,this._isAnimated=!!this._isAnimated}extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData);function SVGFillStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=n}extendPrototype([DynamicPropertyContainer],SVGFillStyleData);function SVGNoStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.style=n}extendPrototype([DynamicPropertyContainer],SVGNoStyleData);function GradientProperty(e,t,n){this.data=t,this.c=createTypedArray(`uint8c`,t.p*4);var r=t.k.k[0].s?t.k.k[0].s.length-t.p*4:t.k.k.length-t.p*4;this.o=createTypedArray(`float32`,r),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=r,this.initDynamicPropertyContainer(n),this.prop=PropertyFactory.getProp(e,t.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}GradientProperty.prototype.comparePoints=function(e,t){for(var n=0,r=this.o.length/2,i;n<r;){if(i=Math.abs(e[n*4]-e[t*4+n*2]),i>.01)return!1;n+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var e=0,t=this.data.k.k.length;e<t;){if(!this.comparePoints(this.data.k.k[e].s,this.data.p))return!1;e+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(e){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||e){var t,n=this.data.p*4,r,i;for(t=0;t<n;t+=1)r=t%4==0?100:255,i=Math.round(this.prop.v[t]*r),this.c[t]!==i&&(this.c[t]=i,this._cmdf=!e);if(this.o.length)for(n=this.prop.v.length,t=this.data.p*4;t<n;t+=1)r=t%2==0?100:1,i=t%2==0?Math.round(this.prop.v[t]*100):this.prop.v[t],this.o[t-this.data.p*4]!==i&&(this.o[t-this.data.p*4]=i,this._omdf=!e);this._mdf=!e}},extendPrototype([DynamicPropertyContainer],GradientProperty);function SVGGradientFillStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.initGradientData(e,t,n)}SVGGradientFillStyleData.prototype.initGradientData=function(e,t,n){this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.s=PropertyFactory.getProp(e,t.s,1,null,this),this.e=PropertyFactory.getProp(e,t.e,1,null,this),this.h=PropertyFactory.getProp(e,t.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(e,t.a||{k:0},0,degToRads,this),this.g=new GradientProperty(e,t.g,this),this.style=n,this.stops=[],this.setGradientData(n.pElem,t),this.setGradientOpacity(t,n),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(e,t){var n=createElementID(),r=createNS(t.t===1?`linearGradient`:`radialGradient`);r.setAttribute(`id`,n),r.setAttribute(`spreadMethod`,`pad`),r.setAttribute(`gradientUnits`,`userSpaceOnUse`);var i=[],a,o,c=t.g.p*4;for(o=0;o<c;o+=4)a=createNS(`stop`),r.appendChild(a),i.push(a);e.setAttribute(t.ty===`gf`?`fill`:`stroke`,`url(`+getLocationHref()+`#`+n+`)`),this.gf=r,this.cst=i},SVGGradientFillStyleData.prototype.setGradientOpacity=function(e,t){if(this.g._hasOpacity&&!this.g._collapsable){var n,r,i,a=createNS(`mask`),o=createNS(`path`);a.appendChild(o);var c=createElementID(),u=createElementID();a.setAttribute(`id`,u);var K=createNS(e.t===1?`linearGradient`:`radialGradient`);K.setAttribute(`id`,c),K.setAttribute(`spreadMethod`,`pad`),K.setAttribute(`gradientUnits`,`userSpaceOnUse`),i=e.g.k.k[0].s?e.g.k.k[0].s.length:e.g.k.k.length;var Y=this.stops;for(r=e.g.p*4;r<i;r+=2)n=createNS(`stop`),n.setAttribute(`stop-color`,`rgb(255,255,255)`),K.appendChild(n),Y.push(n);o.setAttribute(e.ty===`gf`?`fill`:`stroke`,`url(`+getLocationHref()+`#`+c+`)`),e.ty===`gs`&&(o.setAttribute(`stroke-linecap`,lineCapEnum[e.lc||2]),o.setAttribute(`stroke-linejoin`,lineJoinEnum[e.lj||2]),e.lj===1&&o.setAttribute(`stroke-miterlimit`,e.ml)),this.of=K,this.ms=a,this.ost=Y,this.maskId=u,t.msElem=o}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData);function SVGGradientStrokeStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},`svg`,this),this.initGradientData(e,t,n),this._isAnimated=!!this._isAnimated}extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS(`g`)}function SVGTransformData(e,t,n){this.transform={mProps:e,op:t,container:n},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}var buildShapeString=function(e,t,n,r){if(t===0)return``;var i=e.o,a=e.i,o=e.v,c,u=` M`+r.applyToPointStringified(o[0][0],o[0][1]);for(c=1;c<t;c+=1)u+=` C`+r.applyToPointStringified(i[c-1][0],i[c-1][1])+` `+r.applyToPointStringified(a[c][0],a[c][1])+` `+r.applyToPointStringified(o[c][0],o[c][1]);return n&&t&&(u+=` C`+r.applyToPointStringified(i[c-1][0],i[c-1][1])+` `+r.applyToPointStringified(a[0][0],a[0][1])+` `+r.applyToPointStringified(o[0][0],o[0][1]),u+=`z`),u},SVGElementsRenderer=function(){var e=new Matrix,t=new Matrix,n={createRenderFunction:r};function r(e){switch(e.ty){case`fl`:return c;case`gf`:return K;case`gs`:return u;case`st`:return Y;case`sh`:case`el`:case`rc`:case`sr`:return o;case`tr`:return i;case`no`:return a;default:return null}}function i(e,t,n){(n||t.transform.op._mdf)&&t.transform.container.setAttribute(`opacity`,t.transform.op.v),(n||t.transform.mProps._mdf)&&t.transform.container.setAttribute(`transform`,t.transform.mProps.v.to2dCSS())}function a(){}function o(n,r,i){var a,o,c,u,K,Y,X=r.styles.length,ee=r.lvl,te,ce,ue,de;for(Y=0;Y<X;Y+=1){if(u=r.sh._mdf||i,r.styles[Y].lvl<ee){for(ce=t.reset(),ue=ee-r.styles[Y].lvl,de=r.transformers.length-1;!u&&ue>0;)u=r.transformers[de].mProps._mdf||u,--ue,--de;if(u)for(ue=ee-r.styles[Y].lvl,de=r.transformers.length-1;ue>0;)ce.multiply(r.transformers[de].mProps.v),--ue,--de}else ce=e;if(te=r.sh.paths,o=te._length,u){for(c=``,a=0;a<o;a+=1)K=te.shapes[a],K&&K._length&&(c+=buildShapeString(K,K._length,K.c,ce));r.caches[Y]=c}else c=r.caches[Y];r.styles[Y].d+=n.hd===!0?``:c,r.styles[Y]._mdf=u||r.styles[Y]._mdf}}function c(e,t,n){var r=t.style;(t.c._mdf||n)&&r.pElem.setAttribute(`fill`,`rgb(`+bmFloor(t.c.v[0])+`,`+bmFloor(t.c.v[1])+`,`+bmFloor(t.c.v[2])+`)`),(t.o._mdf||n)&&r.pElem.setAttribute(`fill-opacity`,t.o.v)}function u(e,t,n){K(e,t,n),Y(e,t,n)}function K(e,t,n){var r=t.gf,i=t.g._hasOpacity,a=t.s.v,o=t.e.v;if(t.o._mdf||n){var c=e.ty===`gf`?`fill-opacity`:`stroke-opacity`;t.style.pElem.setAttribute(c,t.o.v)}if(t.s._mdf||n){var u=e.t===1?`x1`:`cx`,K=u===`x1`?`y1`:`cy`;r.setAttribute(u,a[0]),r.setAttribute(K,a[1]),i&&!t.g._collapsable&&(t.of.setAttribute(u,a[0]),t.of.setAttribute(K,a[1]))}var Y,X,ee,te;if(t.g._cmdf||n){Y=t.cst;var ce=t.g.c;for(ee=Y.length,X=0;X<ee;X+=1)te=Y[X],te.setAttribute(`offset`,ce[X*4]+`%`),te.setAttribute(`stop-color`,`rgb(`+ce[X*4+1]+`,`+ce[X*4+2]+`,`+ce[X*4+3]+`)`)}if(i&&(t.g._omdf||n)){var ue=t.g.o;for(Y=t.g._collapsable?t.cst:t.ost,ee=Y.length,X=0;X<ee;X+=1)te=Y[X],t.g._collapsable||te.setAttribute(`offset`,ue[X*2]+`%`),te.setAttribute(`stop-opacity`,ue[X*2+1])}if(e.t===1)(t.e._mdf||n)&&(r.setAttribute(`x2`,o[0]),r.setAttribute(`y2`,o[1]),i&&!t.g._collapsable&&(t.of.setAttribute(`x2`,o[0]),t.of.setAttribute(`y2`,o[1])));else{var de;if((t.s._mdf||t.e._mdf||n)&&(de=Math.sqrt((a[0]-o[0])**2+(a[1]-o[1])**2),r.setAttribute(`r`,de),i&&!t.g._collapsable&&t.of.setAttribute(`r`,de)),t.s._mdf||t.e._mdf||t.h._mdf||t.a._mdf||n){de||=Math.sqrt((a[0]-o[0])**2+(a[1]-o[1])**2);var fe=Math.atan2(o[1]-a[1],o[0]-a[0]),me=t.h.v;me>=1?me=.99:me<=-1&&(me=-.99);var ge=de*me,Te=Math.cos(fe+t.a.v)*ge+a[0],Oe=Math.sin(fe+t.a.v)*ge+a[1];r.setAttribute(`fx`,Te),r.setAttribute(`fy`,Oe),i&&!t.g._collapsable&&(t.of.setAttribute(`fx`,Te),t.of.setAttribute(`fy`,Oe))}}}function Y(e,t,n){var r=t.style,i=t.d;i&&(i._mdf||n)&&i.dashStr&&(r.pElem.setAttribute(`stroke-dasharray`,i.dashStr),r.pElem.setAttribute(`stroke-dashoffset`,i.dashoffset[0])),t.c&&(t.c._mdf||n)&&r.pElem.setAttribute(`stroke`,`rgb(`+bmFloor(t.c.v[0])+`,`+bmFloor(t.c.v[1])+`,`+bmFloor(t.c.v[2])+`)`),(t.o._mdf||n)&&r.pElem.setAttribute(`stroke-opacity`,t.o.v),(t.w._mdf||n)&&(r.pElem.setAttribute(`stroke-width`,t.w.v),r.msElem&&r.msElem.setAttribute(`stroke-width`,t.w.v))}return n}();function SVGShapeElement(e,t,n){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,n),this.prevViewData=[]}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var e,t=this.shapes.length,n,r,i=this.stylesList.length,a,o=[],c=!1;for(r=0;r<i;r+=1){for(a=this.stylesList[r],c=!1,o.length=0,e=0;e<t;e+=1)n=this.shapes[e],n.styles.indexOf(a)!==-1&&(o.push(n),c=n._isAnimated||c);o.length>1&&c&&this.setShapesAsAnimated(o)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,n=e.length;for(t=0;t<n;t+=1)e[t].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(e,t){var n,r=new SVGStyleData(e,t),i=r.pElem;return e.ty===`st`?n=new SVGStrokeStyleData(this,e,r):e.ty===`fl`?n=new SVGFillStyleData(this,e,r):e.ty===`gf`||e.ty===`gs`?(n=new(e.ty===`gf`?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,e,r),this.globalData.defs.appendChild(n.gf),n.maskId&&(this.globalData.defs.appendChild(n.ms),this.globalData.defs.appendChild(n.of),i.setAttribute(`mask`,`url(`+getLocationHref()+`#`+n.maskId+`)`))):e.ty===`no`&&(n=new SVGNoStyleData(this,e,r)),(e.ty===`st`||e.ty===`gs`)&&(i.setAttribute(`stroke-linecap`,lineCapEnum[e.lc||2]),i.setAttribute(`stroke-linejoin`,lineJoinEnum[e.lj||2]),i.setAttribute(`fill-opacity`,`0`),e.lj===1&&i.setAttribute(`stroke-miterlimit`,e.ml)),e.r===2&&i.setAttribute(`fill-rule`,`evenodd`),e.ln&&i.setAttribute(`id`,e.ln),e.cl&&i.setAttribute(`class`,e.cl),e.bm&&(i.style[`mix-blend-mode`]=getBlendMode(e.bm)),this.stylesList.push(r),this.addToAnimatedContents(e,n),n},SVGShapeElement.prototype.createGroupElement=function(e){var t=new ShapeGroupData;return e.ln&&t.gr.setAttribute(`id`,e.ln),e.cl&&t.gr.setAttribute(`class`,e.cl),e.bm&&(t.gr.style[`mix-blend-mode`]=getBlendMode(e.bm)),t},SVGShapeElement.prototype.createTransformElement=function(e,t){var n=TransformPropertyFactory.getTransformProperty(this,e,this),r=new SVGTransformData(n,n.o,t);return this.addToAnimatedContents(e,r),r},SVGShapeElement.prototype.createShapeElement=function(e,t,n){var r=4;e.ty===`rc`?r=5:e.ty===`el`?r=6:e.ty===`sr`&&(r=7);var i=new SVGShapeData(t,n,ShapePropertyFactory.getShapeProp(this,e,r,this));return this.shapes.push(i),this.addShapeToModifiers(i),this.addToAnimatedContents(e,i),i},SVGShapeElement.prototype.addToAnimatedContents=function(e,t){for(var n=0,r=this.animatedContents.length;n<r;){if(this.animatedContents[n].element===t)return;n+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(e),element:t,data:e})},SVGShapeElement.prototype.setElementStyles=function(e){var t=e.styles,n,r=this.stylesList.length;for(n=0;n<r;n+=1)t.indexOf(this.stylesList[n])===-1&&!this.stylesList[n].closed&&t.push(this.stylesList[n])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var e,t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(e,t,n,r,i,a,o){var c=[].concat(a),u,K=e.length-1,Y,X,ee=[],te=[],ce,ue,de;for(u=K;u>=0;--u){if(de=this.searchProcessedElement(e[u]),de?t[u]=n[de-1]:e[u]._render=o,e[u].ty===`fl`||e[u].ty===`st`||e[u].ty===`gf`||e[u].ty===`gs`||e[u].ty===`no`)de?t[u].style.closed=e[u].hd:t[u]=this.createStyleElement(e[u],i),e[u]._render&&t[u].style.pElem.parentNode!==r&&r.appendChild(t[u].style.pElem),ee.push(t[u].style);else if(e[u].ty===`gr`){if(!de)t[u]=this.createGroupElement(e[u]);else for(X=t[u].it.length,Y=0;Y<X;Y+=1)t[u].prevViewData[Y]=t[u].it[Y];this.searchShapes(e[u].it,t[u].it,t[u].prevViewData,t[u].gr,i+1,c,o),e[u]._render&&t[u].gr.parentNode!==r&&r.appendChild(t[u].gr)}else e[u].ty===`tr`?(de||(t[u]=this.createTransformElement(e[u],r)),ce=t[u].transform,c.push(ce)):e[u].ty===`sh`||e[u].ty===`rc`||e[u].ty===`el`||e[u].ty===`sr`?(de||(t[u]=this.createShapeElement(e[u],c,i)),this.setElementStyles(t[u])):e[u].ty===`tm`||e[u].ty===`rd`||e[u].ty===`ms`||e[u].ty===`pb`||e[u].ty===`zz`||e[u].ty===`op`?(de?(ue=t[u],ue.closed=!1):(ue=ShapeModifiers.getModifier(e[u].ty),ue.init(this,e[u]),t[u]=ue,this.shapeModifiers.push(ue)),te.push(ue)):e[u].ty===`rp`&&(de?(ue=t[u],ue.closed=!0):(ue=ShapeModifiers.getModifier(e[u].ty),t[u]=ue,ue.init(this,e,u,t),this.shapeModifiers.push(ue),o=!1),te.push(ue));this.addProcessedElement(e[u],u+1)}for(K=ee.length,u=0;u<K;u+=1)ee[u].closed=!0;for(K=te.length,u=0;u<K;u+=1)te[u].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].reset();for(this.renderShape(),e=0;e<t;e+=1)(this.stylesList[e]._mdf||this._isFirstFrame)&&(this.stylesList[e].msElem&&(this.stylesList[e].msElem.setAttribute(`d`,this.stylesList[e].d),this.stylesList[e].d=`M0 0`+this.stylesList[e].d),this.stylesList[e].pElem.setAttribute(`d`,this.stylesList[e].d||`M0 0`))},SVGShapeElement.prototype.renderShape=function(){var e,t=this.animatedContents.length,n;for(e=0;e<t;e+=1)n=this.animatedContents[e],(this._isFirstFrame||n.element._isAnimated)&&n.data!==!0&&n.fn(n.data,n.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};function LetterProps(e,t,n,r,i,a){this.o=e,this.sw=t,this.sc=n,this.fc=r,this.m=i,this.p=a,this._mdf={o:!0,sw:!!t,sc:!!n,fc:!!r,m:!0,p:!0}}LetterProps.prototype.update=function(e,t,n,r,i,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var o=!1;return this.o!==e&&(this.o=e,this._mdf.o=!0,o=!0),this.sw!==t&&(this.sw=t,this._mdf.sw=!0,o=!0),this.sc!==n&&(this.sc=n,this._mdf.sc=!0,o=!0),this.fc!==r&&(this.fc=r,this._mdf.fc=!0,o=!0),this.m!==i&&(this.m=i,this._mdf.m=!0,o=!0),a.length&&(this.p[0]!==a[0]||this.p[1]!==a[1]||this.p[4]!==a[4]||this.p[5]!==a[5]||this.p[12]!==a[12]||this.p[13]!==a[13])&&(this.p=a,this._mdf.p=!0,o=!0),o};function TextProperty(e,t){this._frameId=initialDefaultFrame,this.pv=``,this.v=``,this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,t.d&&t.d.sid&&(t.d=e.globalData.slotManager.getProp(t.d)),this.data=t,this.elem=e,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:``,fStyle:``,fWeight:``,fc:``,j:``,justifyOffset:``,l:[],lh:0,lineWidths:[],ls:``,of:``,s:``,sc:``,sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},TextProperty.prototype.setCurrentData=function(e){e.__complete||this.completeTextData(e),this.currentData=e,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||e){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,n=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var r,i=this.effectsSequence.length,a=e||this.data.d.k[this.keysIndex].s;for(r=0;r<i;r+=1)a=n===this.keysIndex?this.effectsSequence[r](this.currentData,a.t):this.effectsSequence[r](a,a.t);t!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},TextProperty.prototype.getKeyframeValue=function(){for(var e=this.data.d.k,t=this.elem.comp.renderedFrame,n=0,r=e.length;n<=r-1&&!(n===r-1||e[n+1].t>t);)n+=1;return this.keysIndex!==n&&(this.keysIndex=n),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t=[],n=0,r=e.length,i,a,o=!1,c=!1,u=``;n<r;)o=c,c=!1,i=e.charCodeAt(n),u=e.charAt(n),FontManager.isCombinedCharacter(i)?o=!0:i>=55296&&i<=56319?FontManager.isRegionalFlag(e,n)?u=e.substr(n,14):(a=e.charCodeAt(n+1),a>=56320&&a<=57343&&(FontManager.isModifier(i,a)?(u=e.substr(n,2),o=!0):u=FontManager.isFlagEmoji(e.substr(n,4))?e.substr(n,4):e.substr(n,2))):i>56319?(a=e.charCodeAt(n+1),FontManager.isVariationSelector(i)&&(o=!0)):FontManager.isZeroWidthJoiner(i)&&(o=!0,c=!0),o?(t[t.length-1]+=u,o=!1):t.push(u),n+=u.length;return t},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t=this.elem.globalData.fontManager,n=this.data,r=[],i,a,o,c=0,u,K=n.m.g,Y=0,X=0,ee=0,te=[],ce=0,ue=0,de,fe,me=t.getFontByName(e.f),ge,Te=0,Oe=getFontProperties(me);e.fWeight=Oe.weight,e.fStyle=Oe.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),a=e.finalText.length,e.finalLineHeight=e.lh;var Ae=e.tr/1e3*e.finalSize,ze;if(e.sz)for(var qe=!0,Ye=e.sz[0],Ze=e.sz[1],Qe,et;qe;){et=this.buildFinalText(e.t),Qe=0,ce=0,a=et.length,Ae=e.tr/1e3*e.finalSize;var nt=-1;for(i=0;i<a;i+=1)ze=et[i].charCodeAt(0),o=!1,et[i]===` `?nt=i:(ze===13||ze===3)&&(ce=0,o=!0,Qe+=e.finalLineHeight||e.finalSize*1.2),t.chars?(ge=t.getCharData(et[i],me.fStyle,me.fFamily),Te=o?0:ge.w*e.finalSize/100):Te=t.measureText(et[i],e.f,e.finalSize),ce+Te>Ye&&et[i]!==` `?(nt===-1?a+=1:i=nt,Qe+=e.finalLineHeight||e.finalSize*1.2,et.splice(i,+(nt===i),`\r`),nt=-1,ce=0):(ce+=Te,ce+=Ae);Qe+=me.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&Ze<Qe?(--e.finalSize,e.finalLineHeight=e.finalSize*e.lh/e.s):(e.finalText=et,a=e.finalText.length,qe=!1)}ce=-Ae,Te=0;var rt=0,it;for(i=0;i<a;i+=1)if(o=!1,it=e.finalText[i],ze=it.charCodeAt(0),ze===13||ze===3?(rt=0,te.push(ce),ue=ce>ue?ce:ue,ce=-2*Ae,u=``,o=!0,ee+=1):u=it,t.chars?(ge=t.getCharData(it,me.fStyle,t.getFontByName(e.f).fFamily),Te=o?0:ge.w*e.finalSize/100):Te=t.measureText(u,e.f,e.finalSize),it===` `?rt+=Te+Ae:(ce+=Te+Ae+rt,rt=0),r.push({l:Te,an:Te,add:Y,n:o,anIndexes:[],val:u,line:ee,animatorJustifyOffset:0}),K==2){if(Y+=Te,u===``||u===` `||i===a-1){for((u===``||u===` `)&&(Y-=Te);X<=i;)r[X].an=Y,r[X].ind=c,r[X].extra=Te,X+=1;c+=1,Y=0}}else if(K==3){if(Y+=Te,u===``||i===a-1){for(u===``&&(Y-=Te);X<=i;)r[X].an=Y,r[X].ind=c,r[X].extra=Te,X+=1;Y=0,c+=1}}else r[c].ind=c,r[c].extra=0,c+=1;if(e.l=r,ue=ce>ue?ce:ue,te.push(ce),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=ue,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=te;var at=n.a,ot,st;fe=at.length;var ct,lt,ut=[];for(de=0;de<fe;de+=1){for(ot=at[de],ot.a.sc&&(e.strokeColorAnim=!0),ot.a.sw&&(e.strokeWidthAnim=!0),(ot.a.fc||ot.a.fh||ot.a.fs||ot.a.fb)&&(e.fillColorAnim=!0),lt=0,ct=ot.s.b,i=0;i<a;i+=1)st=r[i],st.anIndexes[de]=lt,(ct==1&&st.val!==``||ct==2&&st.val!==``&&st.val!==` `||ct==3&&(st.n||st.val==` `||i==a-1)||ct==4&&(st.n||i==a-1))&&(ot.s.rn===1&&ut.push(lt),lt+=1);n.a[de].s.totalChars=lt;var dt=-1,ft;if(ot.s.rn===1)for(i=0;i<a;i+=1)st=r[i],dt!=st.anIndexes[de]&&(dt=st.anIndexes[de],ft=ut.splice(Math.floor(Math.random()*ut.length),1)[0]),st.anIndexes[de]=ft}e.yOffset=e.finalLineHeight||e.finalSize*1.2,e.ls=e.ls||0,e.ascent=me.ascent*e.finalSize/100},TextProperty.prototype.updateDocumentData=function(e,t){t=t===void 0?this.keysIndex:t;var n=this.copyData({},this.data.d.k[t].s);n=this.copyData(n,e),this.data.d.k[t].s=n,this.recalculate(t),this.setCurrentData(n),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(e){var t=this.data.d.k[e].s;t.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(t)},TextProperty.prototype.canResizeFont=function(e){this.canResize=e,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(e){this.minimumFontSize=Math.floor(e)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var e=Math.max,t=Math.min,n=Math.floor;function r(e,t){this._currentTextLength=-1,this.k=!1,this.data=t,this.elem=e,this.comp=e.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(e),this.s=PropertyFactory.getProp(e,t.s||{k:0},0,0,this),this.e=`e`in t?PropertyFactory.getProp(e,t.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(e,t.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(e,t.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(e,t.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(e,t.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(e,t.a,0,.01,this),this.dynamicProperties.length||this.getValue()}r.prototype={getMult:function(r){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var i=0,a=0,o=1,c=1;this.ne.v>0?i=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?o=1-this.xe.v/100:c=1+this.xe.v/100;var u=BezierFactory.getBezierEasing(i,a,o,c).get,K=0,Y=this.finalS,X=this.finalE,ee=this.data.sh;if(ee===2)K=X===Y?+(r>=X):e(0,t(.5/(X-Y)+(r-Y)/(X-Y),1)),K=u(K);else if(ee===3)K=X===Y?r>=X?0:1:1-e(0,t(.5/(X-Y)+(r-Y)/(X-Y),1)),K=u(K);else if(ee===4)X===Y?K=0:(K=e(0,t(.5/(X-Y)+(r-Y)/(X-Y),1)),K<.5?K*=2:K=1-2*(K-.5)),K=u(K);else if(ee===5){if(X===Y)K=0;else{var te=X-Y;r=t(e(0,r+.5-Y),X-Y);var ce=-te/2+r,ue=te/2;K=Math.sqrt(1-ce*ce/(ue*ue))}K=u(K)}else ee===6?(X===Y?K=0:(r=t(e(0,r+.5-Y),X-Y),K=(1+Math.cos(Math.PI+Math.PI*2*r/(X-Y)))/2),K=u(K)):(r>=n(Y)&&(K=r-Y<0?e(0,t(t(X,1)-(Y-r),1)):e(0,t(X-r,1))),K=u(K));if(this.sm.v!==100){var de=this.sm.v*.01;de===0&&(de=1e-8);var fe=.5-de*.5;K<fe?K=0:(K=(K-fe)/de,K>1&&(K=1))}return K*this.a.v},getValue:function(e){this.iterateDynamicProperties(),this._mdf=e||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,e&&this.data.r===2&&(this.e.v=this._currentTextLength);var t=this.data.r===2?1:100/this.data.totalChars,n=this.o.v/t,r=this.s.v/t+n,i=this.e.v/t+n;if(r>i){var a=r;r=i,i=a}this.finalS=r,this.finalE=i}},extendPrototype([DynamicPropertyContainer],r);function i(e,t,n){return new r(e,t,n)}return{getTextSelectorProp:i}}();function TextAnimatorDataProperty(e,t,n){var r={propType:!1},i=PropertyFactory.getProp,a=t.a;this.a={r:a.r?i(e,a.r,0,degToRads,n):r,rx:a.rx?i(e,a.rx,0,degToRads,n):r,ry:a.ry?i(e,a.ry,0,degToRads,n):r,sk:a.sk?i(e,a.sk,0,degToRads,n):r,sa:a.sa?i(e,a.sa,0,degToRads,n):r,s:a.s?i(e,a.s,1,.01,n):r,a:a.a?i(e,a.a,1,0,n):r,o:a.o?i(e,a.o,0,.01,n):r,p:a.p?i(e,a.p,1,0,n):r,sw:a.sw?i(e,a.sw,0,0,n):r,sc:a.sc?i(e,a.sc,1,0,n):r,fc:a.fc?i(e,a.fc,1,0,n):r,fh:a.fh?i(e,a.fh,0,0,n):r,fs:a.fs?i(e,a.fs,0,.01,n):r,fb:a.fb?i(e,a.fb,0,.01,n):r,t:a.t?i(e,a.t,0,0,n):r},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,n),this.s.t=t.s.t}function TextAnimatorProperty(e,t,n){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=n,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(n)}TextAnimatorProperty.prototype.searchProperties=function(){var e,t=this._textData.a.length,n,r=PropertyFactory.getProp;for(e=0;e<t;e+=1)n=this._textData.a[e],this._animatorsData[e]=new TextAnimatorDataProperty(this._elem,n,this);this._textData.p&&`m`in this._textData.p?(this._pathData={a:r(this._elem,this._textData.p.a,0,0,this),f:r(this._elem,this._textData.p.f,0,0,this),l:r(this._elem,this._textData.p.l,0,0,this),r:r(this._elem,this._textData.p.r,0,0,this),p:r(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=r(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(e,t){if(this.lettersChangedFlag=t,this._mdf||this._isFirstFrame||t||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var n=this._moreOptions.alignment.v,r=this._animatorsData,i=this._textData,a=this.mHelper,o=this._renderType,c=this.renderedLetters.length,u,K,Y,X,ee=e.l,te,ce,ue,de,fe,me,ge,Te,Oe,Ae,ze,qe,Ye,Ze,Qe;if(this._hasMaskedPath){if(Qe=this._pathData.m,!this._pathData.n||this._pathData._mdf){var et=Qe.v;this._pathData.r.v&&(et=et.reverse()),te={tLength:0,segments:[]},X=et._length-1;var nt;for(qe=0,Y=0;Y<X;Y+=1)nt=bez.buildBezierData(et.v[Y],et.v[Y+1],[et.o[Y][0]-et.v[Y][0],et.o[Y][1]-et.v[Y][1]],[et.i[Y+1][0]-et.v[Y+1][0],et.i[Y+1][1]-et.v[Y+1][1]]),te.tLength+=nt.segmentLength,te.segments.push(nt),qe+=nt.segmentLength;Y=X,Qe.v.c&&(nt=bez.buildBezierData(et.v[Y],et.v[0],[et.o[Y][0]-et.v[Y][0],et.o[Y][1]-et.v[Y][1]],[et.i[0][0]-et.v[0][0],et.i[0][1]-et.v[0][1]]),te.tLength+=nt.segmentLength,te.segments.push(nt),qe+=nt.segmentLength),this._pathData.pi=te}if(te=this._pathData.pi,ce=this._pathData.f.v,ge=0,me=1,de=0,fe=!0,Ae=te.segments,ce<0&&Qe.v.c)for(te.tLength<Math.abs(ce)&&(ce=-Math.abs(ce)%te.tLength),ge=Ae.length-1,Oe=Ae[ge].points,me=Oe.length-1;ce<0;)ce+=Oe[me].partialLength,--me,me<0&&(--ge,Oe=Ae[ge].points,me=Oe.length-1);Oe=Ae[ge].points,Te=Oe[me-1],ue=Oe[me],ze=ue.partialLength}X=ee.length,u=0,K=0;var rt=e.finalSize*1.2*.714,it=!0,at,ot,st,ct=r.length,lt,ut,dt=-1,ft,pt,mt,ht=ce,gt=ge,_t=me,vt=-1,yt,bt,xt,St,Ct,wt,Tt,Et,Dt=``,Ot=this.defaultPropsArray,kt;if(e.j===2||e.j===1){var At=0,jt=0,Mt=e.j===2?-.5:-1,Nt=0,Pt=!0;for(Y=0;Y<X;Y+=1)if(ee[Y].n){for(At&&(At+=jt);Nt<Y;)ee[Nt].animatorJustifyOffset=At,Nt+=1;At=0,Pt=!0}else{for(st=0;st<ct;st+=1)at=r[st].a,at.t.propType&&(Pt&&e.j===2&&(jt+=at.t.v*Mt),ot=r[st].s,ut=ot.getMult(ee[Y].anIndexes[st],i.a[st].s.totalChars),ut.length?At+=at.t.v*ut[0]*Mt:At+=at.t.v*ut*Mt);Pt=!1}for(At&&(At+=jt);Nt<Y;)ee[Nt].animatorJustifyOffset=At,Nt+=1}for(Y=0;Y<X;Y+=1){if(a.reset(),yt=1,ee[Y].n)u=0,K+=e.yOffset,K+=+!!it,ce=ht,it=!1,this._hasMaskedPath&&(ge=gt,me=_t,Oe=Ae[ge].points,Te=Oe[me-1],ue=Oe[me],ze=ue.partialLength,de=0),Dt=``,Et=``,wt=``,kt=``,Ot=this.defaultPropsArray;else{if(this._hasMaskedPath){if(vt!==ee[Y].line){switch(e.j){case 1:ce+=qe-e.lineWidths[ee[Y].line];break;case 2:ce+=(qe-e.lineWidths[ee[Y].line])/2}vt=ee[Y].line}dt!==ee[Y].ind&&(ee[dt]&&(ce+=ee[dt].extra),ce+=ee[Y].an/2,dt=ee[Y].ind),ce+=n[0]*ee[Y].an*.005;var Ft=0;for(st=0;st<ct;st+=1)at=r[st].a,at.p.propType&&(ot=r[st].s,ut=ot.getMult(ee[Y].anIndexes[st],i.a[st].s.totalChars),ut.length?Ft+=at.p.v[0]*ut[0]:Ft+=at.p.v[0]*ut),at.a.propType&&(ot=r[st].s,ut=ot.getMult(ee[Y].anIndexes[st],i.a[st].s.totalChars),ut.length?Ft+=at.a.v[0]*ut[0]:Ft+=at.a.v[0]*ut);for(fe=!0,this._pathData.a.v&&(ce=ee[0].an*.5+(qe-this._pathData.f.v-ee[0].an*.5-ee[ee.length-1].an*.5)*dt/(X-1),ce+=this._pathData.f.v);fe;)de+ze>=ce+Ft||!Oe?(Ye=(ce+Ft-de)/ue.partialLength,pt=Te.point[0]+(ue.point[0]-Te.point[0])*Ye,mt=Te.point[1]+(ue.point[1]-Te.point[1])*Ye,a.translate(-n[0]*ee[Y].an*.005,-(n[1]*rt)*.01),fe=!1):Oe&&(de+=ue.partialLength,me+=1,me>=Oe.length&&(me=0,ge+=1,Ae[ge]?Oe=Ae[ge].points:Qe.v.c?(me=0,ge=0,Oe=Ae[ge].points):(de-=ue.partialLength,Oe=null)),Oe&&(Te=ue,ue=Oe[me],ze=ue.partialLength));ft=ee[Y].an/2-ee[Y].add,a.translate(-ft,0,0)}else ft=ee[Y].an/2-ee[Y].add,a.translate(-ft,0,0),a.translate(-n[0]*ee[Y].an*.005,-n[1]*rt*.01,0);for(st=0;st<ct;st+=1)at=r[st].a,at.t.propType&&(ot=r[st].s,ut=ot.getMult(ee[Y].anIndexes[st],i.a[st].s.totalChars),(u!==0||e.j!==0)&&(this._hasMaskedPath?ut.length?ce+=at.t.v*ut[0]:ce+=at.t.v*ut:ut.length?u+=at.t.v*ut[0]:u+=at.t.v*ut));for(e.strokeWidthAnim&&(xt=e.sw||0),e.strokeColorAnim&&(bt=e.sc?[e.sc[0],e.sc[1],e.sc[2]]:[0,0,0]),e.fillColorAnim&&e.fc&&(St=[e.fc[0],e.fc[1],e.fc[2]]),st=0;st<ct;st+=1)at=r[st].a,at.a.propType&&(ot=r[st].s,ut=ot.getMult(ee[Y].anIndexes[st],i.a[st].s.totalChars),ut.length?a.translate(-at.a.v[0]*ut[0],-at.a.v[1]*ut[1],at.a.v[2]*ut[2]):a.translate(-at.a.v[0]*ut,-at.a.v[1]*ut,at.a.v[2]*ut));for(st=0;st<ct;st+=1)at=r[st].a,at.s.propType&&(ot=r[st].s,ut=ot.getMult(ee[Y].anIndexes[st],i.a[st].s.totalChars),ut.length?a.scale(1+(at.s.v[0]-1)*ut[0],1+(at.s.v[1]-1)*ut[1],1):a.scale(1+(at.s.v[0]-1)*ut,1+(at.s.v[1]-1)*ut,1));for(st=0;st<ct;st+=1){if(at=r[st].a,ot=r[st].s,ut=ot.getMult(ee[Y].anIndexes[st],i.a[st].s.totalChars),at.sk.propType&&(ut.length?a.skewFromAxis(-at.sk.v*ut[0],at.sa.v*ut[1]):a.skewFromAxis(-at.sk.v*ut,at.sa.v*ut)),at.r.propType&&(ut.length?a.rotateZ(-at.r.v*ut[2]):a.rotateZ(-at.r.v*ut)),at.ry.propType&&(ut.length?a.rotateY(at.ry.v*ut[1]):a.rotateY(at.ry.v*ut)),at.rx.propType&&(ut.length?a.rotateX(at.rx.v*ut[0]):a.rotateX(at.rx.v*ut)),at.o.propType&&(ut.length?yt+=(at.o.v*ut[0]-yt)*ut[0]:yt+=(at.o.v*ut-yt)*ut),e.strokeWidthAnim&&at.sw.propType&&(ut.length?xt+=at.sw.v*ut[0]:xt+=at.sw.v*ut),e.strokeColorAnim&&at.sc.propType)for(Ct=0;Ct<3;Ct+=1)ut.length?bt[Ct]+=(at.sc.v[Ct]-bt[Ct])*ut[0]:bt[Ct]+=(at.sc.v[Ct]-bt[Ct])*ut;if(e.fillColorAnim&&e.fc){if(at.fc.propType)for(Ct=0;Ct<3;Ct+=1)ut.length?St[Ct]+=(at.fc.v[Ct]-St[Ct])*ut[0]:St[Ct]+=(at.fc.v[Ct]-St[Ct])*ut;at.fh.propType&&(St=ut.length?addHueToRGB(St,at.fh.v*ut[0]):addHueToRGB(St,at.fh.v*ut)),at.fs.propType&&(St=ut.length?addSaturationToRGB(St,at.fs.v*ut[0]):addSaturationToRGB(St,at.fs.v*ut)),at.fb.propType&&(St=ut.length?addBrightnessToRGB(St,at.fb.v*ut[0]):addBrightnessToRGB(St,at.fb.v*ut))}}for(st=0;st<ct;st+=1)at=r[st].a,at.p.propType&&(ot=r[st].s,ut=ot.getMult(ee[Y].anIndexes[st],i.a[st].s.totalChars),this._hasMaskedPath?ut.length?a.translate(0,at.p.v[1]*ut[0],-at.p.v[2]*ut[1]):a.translate(0,at.p.v[1]*ut,-at.p.v[2]*ut):ut.length?a.translate(at.p.v[0]*ut[0],at.p.v[1]*ut[1],-at.p.v[2]*ut[2]):a.translate(at.p.v[0]*ut,at.p.v[1]*ut,-at.p.v[2]*ut));if(e.strokeWidthAnim&&(wt=xt<0?0:xt),e.strokeColorAnim&&(Tt=`rgb(`+Math.round(bt[0]*255)+`,`+Math.round(bt[1]*255)+`,`+Math.round(bt[2]*255)+`)`),e.fillColorAnim&&e.fc&&(Et=`rgb(`+Math.round(St[0]*255)+`,`+Math.round(St[1]*255)+`,`+Math.round(St[2]*255)+`)`),this._hasMaskedPath){if(a.translate(0,-e.ls),a.translate(0,n[1]*rt*.01+K,0),this._pathData.p.v){Ze=(ue.point[1]-Te.point[1])/(ue.point[0]-Te.point[0]);var It=Math.atan(Ze)*180/Math.PI;ue.point[0]<Te.point[0]&&(It+=180),a.rotate(-It*Math.PI/180)}a.translate(pt,mt,0),ce-=n[0]*ee[Y].an*.005,ee[Y+1]&&dt!==ee[Y+1].ind&&(ce+=ee[Y].an/2,ce+=e.tr*.001*e.finalSize)}else{switch(a.translate(u,K,0),e.ps&&a.translate(e.ps[0],e.ps[1]+e.ascent,0),e.j){case 1:a.translate(ee[Y].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[ee[Y].line]),0,0);break;case 2:a.translate(ee[Y].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[ee[Y].line])/2,0,0)}a.translate(0,-e.ls),a.translate(ft,0,0),a.translate(n[0]*ee[Y].an*.005,n[1]*rt*.01,0),u+=ee[Y].l+e.tr*.001*e.finalSize}o===`html`?Dt=a.toCSS():o===`svg`?Dt=a.to2dCSS():Ot=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5],a.props[6],a.props[7],a.props[8],a.props[9],a.props[10],a.props[11],a.props[12],a.props[13],a.props[14],a.props[15]],kt=yt}c<=Y?(lt=new LetterProps(kt,wt,Tt,Et,Dt,Ot),this.renderedLetters.push(lt),c+=1,this.lettersChangedFlag=!0):(lt=this.renderedLetters[Y],this.lettersChangedFlag=lt.update(kt,wt,Tt,Et,Dt,Ot)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty);function ITextElement(){}ITextElement.prototype.initElement=function(e,t,n){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(e,t,n),this.textProperty=new TextProperty(this,e.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(e.t,this.renderType,this),this.initTransform(e,t,n),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)},ITextElement.prototype.createPathShape=function(e,t){var n,r=t.length,i,a=``;for(n=0;n<r;n+=1)t[n].ty===`sh`&&(i=t[n].ks.k,a+=buildShapeString(i,i.i.length,!0,e));return a},ITextElement.prototype.updateDocumentData=function(e,t){this.textProperty.updateDocumentData(e,t)},ITextElement.prototype.canResizeFont=function(e){this.textProperty.canResizeFont(e)},ITextElement.prototype.setMinimumFontSize=function(e){this.textProperty.setMinimumFontSize(e)},ITextElement.prototype.applyTextPropertiesToMatrix=function(e,t,n,r,i){switch(e.ps&&t.translate(e.ps[0],e.ps[1]+e.ascent,0),t.translate(0,-e.ls,0),e.j){case 1:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[n]),0,0);break;case 2:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[n])/2,0,0)}t.translate(r,i,0)},ITextElement.prototype.buildColor=function(e){return`rgb(`+Math.round(e[0]*255)+`,`+Math.round(e[1]*255)+`,`+Math.round(e[2]*255)+`)`},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(e,t,n){this.textSpans=[],this.renderType=`svg`,this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS(`text`))},SVGTextLottieElement.prototype.buildTextContents=function(e){for(var t=0,n=e.length,r=[],i=``;t<n;)e[t]===`\r`||e[t]===`�`?(r.push(i),i=``):i+=e[t],t+=1;return r.push(i),r},SVGTextLottieElement.prototype.buildShapeData=function(e,t){if(e.shapes&&e.shapes.length){var n=e.shapes[0];if(n.it){var r=n.it[n.it.length-1];r.s&&(r.s.k[0]=t,r.s.k[1]=t)}}return e},SVGTextLottieElement.prototype.buildNewText=function(){this.addDynamicProperty(this);var e,t,n=this.textProperty.currentData;this.renderedLetters=createSizedArray(n?n.l.length:0),n.fc?this.layerElement.setAttribute(`fill`,this.buildColor(n.fc)):this.layerElement.setAttribute(`fill`,`rgba(0,0,0,0)`),n.sc&&(this.layerElement.setAttribute(`stroke`,this.buildColor(n.sc)),this.layerElement.setAttribute(`stroke-width`,n.sw)),this.layerElement.setAttribute(`font-size`,n.finalSize);var r=this.globalData.fontManager.getFontByName(n.f);if(r.fClass)this.layerElement.setAttribute(`class`,r.fClass);else{this.layerElement.setAttribute(`font-family`,r.fFamily);var i=n.fWeight,a=n.fStyle;this.layerElement.setAttribute(`font-style`,a),this.layerElement.setAttribute(`font-weight`,i)}this.layerElement.setAttribute(`aria-label`,n.t);var o=n.l||[],c=!!this.globalData.fontManager.chars;t=o.length;var u,K=this.mHelper,Y=``,X=this.data.singleShape,ee=0,te=0,ce=!0,ue=n.tr*.001*n.finalSize;if(X&&!c&&!n.sz){var de=this.textContainer,fe=`start`;switch(n.j){case 1:fe=`end`;break;case 2:fe=`middle`;break;default:fe=`start`}de.setAttribute(`text-anchor`,fe),de.setAttribute(`letter-spacing`,ue);var me=this.buildTextContents(n.finalText);for(t=me.length,te=n.ps?n.ps[1]+n.ascent:0,e=0;e<t;e+=1)u=this.textSpans[e].span||createNS(`tspan`),u.textContent=me[e],u.setAttribute(`x`,0),u.setAttribute(`y`,te),u.style.display=`inherit`,de.appendChild(u),this.textSpans[e]||(this.textSpans[e]={span:null,glyph:null}),this.textSpans[e].span=u,te+=n.finalLineHeight;this.layerElement.appendChild(de)}else{var ge=this.textSpans.length,Te;for(e=0;e<t;e+=1){if(this.textSpans[e]||(this.textSpans[e]={span:null,childSpan:null,glyph:null}),!c||!X||e===0){if(u=ge>e?this.textSpans[e].span:createNS(c?`g`:`text`),ge<=e){if(u.setAttribute(`stroke-linecap`,`butt`),u.setAttribute(`stroke-linejoin`,`round`),u.setAttribute(`stroke-miterlimit`,`4`),this.textSpans[e].span=u,c){var Oe=createNS(`g`);u.appendChild(Oe),this.textSpans[e].childSpan=Oe}this.textSpans[e].span=u,this.layerElement.appendChild(u)}u.style.display=`inherit`}if(K.reset(),X&&(o[e].n&&(ee=-ue,te+=n.yOffset,te+=+!!ce,ce=!1),this.applyTextPropertiesToMatrix(n,K,o[e].line,ee,te),ee+=o[e].l||0,ee+=ue),c){Te=this.globalData.fontManager.getCharData(n.finalText[e],r.fStyle,this.globalData.fontManager.getFontByName(n.f).fFamily);var Ae;if(Te.t===1)Ae=new SVGCompElement(Te.data,this.globalData,this);else{var ze=emptyShapeData;Te.data&&Te.data.shapes&&(ze=this.buildShapeData(Te.data,n.finalSize)),Ae=new SVGShapeElement(ze,this.globalData,this)}if(this.textSpans[e].glyph){var qe=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(qe.layerElement),qe.destroy()}this.textSpans[e].glyph=Ae,Ae._debug=!0,Ae.prepareFrame(0),Ae.renderFrame(),this.textSpans[e].childSpan.appendChild(Ae.layerElement),Te.t===1&&this.textSpans[e].childSpan.setAttribute(`transform`,`scale(`+n.finalSize/100+`,`+n.finalSize/100+`)`)}else X&&u.setAttribute(`transform`,`translate(`+K.props[12]+`,`+K.props[13]+`)`),u.textContent=o[e].val,u.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`)}X&&u&&u.setAttribute(`d`,Y)}for(;e<this.textSpans.length;)this.textSpans[e].span.style.display=`none`,e+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var e,t=this.textSpans.length,n;for(this.renderedFrame=this.comp.renderedFrame,e=0;e<t;e+=1)n=this.textSpans[e].glyph,n&&(n.prepareFrame(this.comp.renderedFrame-this.data.st),n._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var e,t,n=this.textAnimator.renderedLetters,r=this.textProperty.currentData.l;t=r.length;var i,a,o;for(e=0;e<t;e+=1)r[e].n||(i=n[e],a=this.textSpans[e].span,o=this.textSpans[e].glyph,o&&o.renderFrame(),i._mdf.m&&a.setAttribute(`transform`,i.m),i._mdf.o&&a.setAttribute(`opacity`,i.o),i._mdf.sw&&a.setAttribute(`stroke-width`,i.sw),i._mdf.sc&&a.setAttribute(`stroke`,i.sc),i._mdf.fc&&a.setAttribute(`fill`,i.fc))}};function ISolidElement(e,t,n){this.initElement(e,t,n)}extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var e=createNS(`rect`);e.setAttribute(`width`,this.data.sw),e.setAttribute(`height`,this.data.sh),e.setAttribute(`fill`,this.data.sc),this.layerElement.appendChild(e)};function NullElement(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initFrame(),this.initTransform(e,t,n),this.initHierarchy()}NullElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement);function SVGRendererBase(){}extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(e){return new NullElement(e,this.globalData,this)},SVGRendererBase.prototype.createShape=function(e){return new SVGShapeElement(e,this.globalData,this)},SVGRendererBase.prototype.createText=function(e){return new SVGTextLottieElement(e,this.globalData,this)},SVGRendererBase.prototype.createImage=function(e){return new IImageElement(e,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(e){return new ISolidElement(e,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(e){this.svgElement.setAttribute(`xmlns`,`http://www.w3.org/2000/svg`),this.svgElement.setAttribute(`xmlns:xlink`,`http://www.w3.org/1999/xlink`),this.renderConfig.viewBoxSize?this.svgElement.setAttribute(`viewBox`,this.renderConfig.viewBoxSize):this.svgElement.setAttribute(`viewBox`,`0 0 `+e.w+` `+e.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute(`width`,e.w),this.svgElement.setAttribute(`height`,e.h),this.svgElement.style.width=`100%`,this.svgElement.style.height=`100%`,this.svgElement.style.transform=`translate3d(0,0,0)`,this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute(`width`,this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute(`height`,this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute(`class`,this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute(`id`,this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute(`focu
13sable`,this.renderConfig.focusable),this.svgElement.setAttribute(`preserveAspectRatio`,this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var t=this.globalData.defs;this.setupGlobalData(e,t),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=e;var n=createNS(`clipPath`),r=createNS(`rect`);r.setAttribute(`width`,e.w),r.setAttribute(`height`,e.h),r.setAttribute(`x`,0),r.setAttribute(`y`,0);var i=createElementID();n.setAttribute(`id`,i),n.appendChild(r),this.layerElement.setAttribute(`clip-path`,`url(`+getLocationHref()+`#`+i+`)`),t.appendChild(n),this.layers=e.layers,this.elements=createSizedArray(e.layers.length)},SVGRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=``),this.layerElement=null,this.globalData.defs=null;var e,t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(e){var t=0,n=this.layers.length;for(t=0;t<n;t+=1)if(this.layers[t].ind===e)return t;return-1},SVGRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!(t[e]||this.layers[e].ty===99)){t[e]=!0;var n=this.createItem(this.layers[e]);if(t[e]=n,getExpressionsPlugin()&&(this.layers[e].ty===0&&this.globalData.projectInterface.registerComposition(n),n.initExpressions()),this.appendElementInPos(n,e),this.layers[e].tt){var r=`tp`in this.layers[e]?this.findIndexByInd(this.layers[e].tp):e-1;if(r===-1)return;if(!this.elements[r]||this.elements[r]===!0)this.buildItem(r),this.addPendingElement(n);else{var i=t[r].getMatte(this.layers[e].tt);n.setMatte(i)}}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();if(e.checkParenting(),e.data.tt)for(var t=0,n=this.elements.length;t<n;){if(this.elements[t]===e){var r=`tp`in e.data?this.findIndexByInd(e.data.tp):t-1,i=this.elements[r].getMatte(this.layers[t].tt);e.setMatte(i);break}t+=1}}},SVGRendererBase.prototype.renderFrame=function(e){if(!(this.renderedFrame===e||this.destroyed)){e===null?e=this.renderedFrame:this.renderedFrame=e,this.globalData.frameNum=e,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=e,this.globalData._mdf=!1;var t,n=this.layers.length;for(this.completeLayers||this.checkLayers(e),t=n-1;t>=0;--t)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t<n;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(e,t){var n=e.getBaseElement();if(n){for(var r=0,i;r<t;)this.elements[r]&&this.elements[r]!==!0&&this.elements[r].getBaseElement()&&(i=this.elements[r].getBaseElement()),r+=1;i?this.layerElement.insertBefore(n,i):this.layerElement.appendChild(n)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display=`none`},SVGRendererBase.prototype.show=function(){this.layerElement.style.display=`block`};function ICompElement(){}extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initTransform(e,t,n),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!t.progressiveLoad)&&this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(e){if(this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=e/this.data.sr;else{var t=this.tm.v;t===this.data.op&&(t=this.data.op-1),this.renderedFrame=t}var n,r=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),n=r-1;n>=0;--n)(this.completeLayers||this.elements[n])&&(this.elements[n].prepareFrame(this.renderedFrame-this.layers[n].st),this.elements[n]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},ICompElement.prototype.setElements=function(e){this.elements=e},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()};function SVGCompElement(e,t,n){this.layers=e.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,n),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)};function SVGRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS(`svg`);var n=``;if(t&&t.title){var r=createNS(`title`),i=createElementID();r.setAttribute(`id`,i),r.textContent=t.title,this.svgElement.appendChild(r),n+=i}if(t&&t.description){var a=createNS(`desc`),o=createElementID();a.setAttribute(`id`,o),a.textContent=t.description,this.svgElement.appendChild(a),n+=` `+o}n&&this.svgElement.setAttribute(`aria-labelledby`,n);var c=createNS(`defs`);this.svgElement.appendChild(c);var u=createNS(`g`);this.svgElement.appendChild(u),this.layerElement=u,this.renderConfig={preserveAspectRatio:t&&t.preserveAspectRatio||`xMidYMid meet`,imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||`xMidYMid slice`,contentVisibility:t&&t.contentVisibility||`visible`,progressiveLoad:t&&t.progressiveLoad||!1,hideOnTransparent:!(t&&t.hideOnTransparent===!1),viewB
vendor: 123,097 bytes, line 13
13oxOnly:t&&t.viewBoxOnly||!1,viewBoxSize:t&&t.viewBoxSize||!1,className:t&&t.className||``,id:t&&t.id||``,focusable:t&&t.focusable,filterSize:{width:t&&t.filterSize&&t.filterSize.width||`100%`,height:t&&t.filterSize&&t.filterSize.height||`100%`,x:t&&t.filterSize&&t.filterSize.x||`0%`,y:t&&t.filterSize&&t.filterSize.y||`0%`},width:t&&t.width,height:t&&t.height,runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:c,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType=`svg`}extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)};function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}ShapeTransformManager.prototype={addTransformSequence:function(e){var t,n=e.length,r=`_`;for(t=0;t<n;t+=1)r+=e[t].transform.key+`_`;var i=this.sequences[r];return i||(i={transforms:[].concat(e),finalTransform:new Matrix,_mdf:!1},this.sequences[r]=i,this.sequenceList.push(i)),i},processSequence:function(e,t){for(var n=0,r=e.transforms.length,i=t;n<r&&!t;){if(e.transforms[n].transform.mProps._mdf){i=!0;break}n+=1}if(i)for(e.finalTransform.reset(),n=r-1;n>=0;--n)e.finalTransform.multiply(e.transforms[n].transform.mProps.v);e._mdf=i},processSequences:function(e){var t,n=this.sequenceList.length;for(t=0;t<n;t+=1)this.processSequence(this.sequenceList[t],e)},getNewKey:function(){return this.transform_key_count+=1,`_`+this.transform_key_count}};var lumaLoader=function(){var e=`__lottie_element_luma_buffer`,t=null,n=null,r=null;function i(){var t=createNS(`svg`),n=createNS(`filter`),r=createNS(`feColorMatrix`);return n.setAttribute(`id`,e),r.setAttribute(`type`,`matrix`),r.setAttribute(`color-interpolation-filters`,`sRGB`),r.setAttribute(`values`,`0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0`),n.appendChild(r),t.appendChild(n),t.setAttribute(`id`,e+`_svg`),featureSupport.svgLumaHidden&&(t.style.display=`none`),t}function a(){t||(r=i(),document.body.appendChild(r),t=createTag(`canvas`),n=t.getContext(`2d`),n.filter=`url(#`+e+`)`,n.fillStyle=`rgba(0,0,0,0)`,n.fillRect(0,0,1,1))}function o(r){return t||a(),t.width=r.width,t.height=r.height,n.filter=`url(#`+e+`)`,t}return{load:a,get:o}};function createCanvas(e,t){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(e,t);var n=createTag(`canvas`);return n.width=e,n.height=t,n}var assetLoader=function(){return{loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas}}(),registeredEffects={};function CVEffects(e){var t,n=e.data.ef?e.data.ef.length:0;this.filters=[];var r;for(t=0;t<n;t+=1){r=null;var i=e.data.ef[t].ty;if(registeredEffects[i]){var a=registeredEffects[i].effect;r=new a(e.effectsManager.effectElements[t],e)}r&&this.filters.push(r)}this.filters.length&&e.addRenderableComponent(this)}CVEffects.prototype.renderFrame=function(e){var t,n=this.filters.length;for(t=0;t<n;t+=1)this.filters[t].renderFrame(e)},CVEffects.prototype.getEffects=function(e){var t,n=this.filters.length,r=[];for(t=0;t<n;t+=1)this.filters[t].type===e&&r.push(this.filters[t]);return r};function registerEffect(e,t){registeredEffects[e]={effect:t}}function CVMaskElement(e,t){this.data=e,this.element=t,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var n,r=this.masksProperties.length,i=!1;for(n=0;n<r;n+=1)this.masksProperties[n].mode!==`n`&&(i=!0),this.viewData[n]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[n],3);this.hasMasks=i,i&&this.element.addRenderableComponent(this)}CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var e=this.element.finalTransform.mat,t=this.element.canvasContext,n,r=this.masksProperties.length,i,a,o;for(t.beginPath(),n=0;n<r;n+=1)if(this.masksProperties[n].mode!==`n`){this.masksProperties[n].inv&&(t.moveTo(0,0),t.lineTo(this.element.globalData.compSize.w,0),t.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),t.lineTo(0,this.element.globalData.compSize.h),t.lineTo(0,0)),o=this.viewData[n].v,i=e.applyToPointArray(o.v[0][0],o.v[0][1],0),t.moveTo(i[0],i[1]);var c,u=o._length;for(c=1;c<u;c+=1)a=e.applyToTriplePoints(o.o[c-1],o.i[c],o.v[c]),t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);a=e.applyToTriplePoints(o.o[c-1],o.i[0],o.v[0]),t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5])}this.element.globalData.renderer.save(!0),t.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};function CVBaseElement(){}var operationsMap={1:`source-in`,2:`source-out`,3:`source-in`,4:`source-out`};CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var e=this.globalData.canvasContext,t=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(t);var n=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(n),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var t=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=t}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){!this.hidden&&(!this.isInRange||this.isTransparent)&&(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0].getContext(`2d`);this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],t=e.getContext(`2d`);if(this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById(`tp`in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var n=assetLoader.getLumaCanvas(this.canvasContext.canvas);n.getContext(`2d`).drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(n,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation=`destination-over`,this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation=`source-over`}},renderFrame:function(e){if(!(this.hidden||this.data.hd)&&(this.data.td!==1||e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var t=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(t),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&=!1}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement;function CVShapeData(e,t,n,r){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var i=4;t.ty===`rc`?i=5:t.ty===`el`?i=6:t.ty===`sr`&&(i=7),this.sh=ShapePropertyFactory.getShapeProp(e,t,i,e);var a,o=n.length,c;for(a=0;a<o;a+=1)n[a].closed||(c={transforms:r.addTransformSequence(n[a].transforms),trNodes:[]},this.styledShapes.push(c),n[a].elements.push(c))}CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated;function CVShapeElement(e,t,n){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(e,t){var n={data:e,type:e.ty,preTransforms:this.transformsManager.addTransformSequence(t),transforms:[],elements:[],closed:e.hd===!0},r={};return e.ty===`fl`||e.ty===`st`?(r.c=PropertyFactory.getProp(this,e.c,1,255,this),r.c.k||(n.co=`rgb(`+bmFloor(r.c.v[0])+`,`+bmFloor(r.c.v[1])+`,`+bmFloor(r.c.v[2])+`)`)):(e.ty===`gf`||e.ty===`gs`)&&(r.s=PropertyFactory.getProp(this,e.s,1,null,this),r.e=PropertyFactory.getProp(this,e.e,1,null,this),r.h=PropertyFactory.getProp(this,e.h||{k:0},0,.01,this),r.a=PropertyFactory.getProp(this,e.a||{k:0},0,degToRads,this),r.g=new GradientProperty(this,e.g,this)),r.o=PropertyFactory.getProp(this,e.o,0,.01,this),e.ty===`st`||e.ty===`gs`?(n.lc=lineCapEnum[e.lc||2],n.lj=lineJoinEnum[e.lj||2],e.lj==1&&(n.ml=e.ml),r.w=PropertyFactory.getProp(this,e.w,0,null,this),r.w.k||(n.wi=r.w.v),e.d&&(r.d=new DashProperty(this,e.d,`canvas`,this),r.d.k||(n.da=r.d.dashArray,n.do=r.d.dashoffset[0]))):n.r=e.r===2?`evenodd`:`nonzero`,this.stylesList.push(n),r.style=n,r},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(e){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,e.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,e,this)}}},CVShapeElement.prototype.createShapeElement=function(e){var t=new CVShapeData(this,e,this.stylesList,this.transformsManager);return this.shapes.push(t),this.addShapeToModifiers(t),t},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var e,t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(e){var t,n=this.stylesList.length;for(t=0;t<n;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.push(e)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.pop()},CVShapeElement.prototype.closeStyles=function(e){var t,n=e.length;for(t=0;t<n;t+=1)e[t].closed=!0},CVShapeElement.prototype.searchShapes=function(e,t,n,r,i){var a,o=e.length-1,c,u,K=[],Y=[],X,ee,te,ce=[].concat(i);for(a=o;a>=0;--a){if(X=this.searchProcessedElement(e[a]),X?t[a]=n[X-1]:e[a]._shouldRender=r,e[a].ty===`fl`||e[a].ty===`st`||e[a].ty===`gf`||e[a].ty===`gs`)X?t[a].style.closed=!1:t[a]=this.createStyleElement(e[a],ce),K.push(t[a].style);else if(e[a].ty===`gr`){if(!X)t[a]=this.createGroupElement(e[a]);else for(u=t[a].it.length,c=0;c<u;c+=1)t[a].prevViewData[c]=t[a].it[c];this.searchShapes(e[a].it,t[a].it,t[a].prevViewData,r,ce)}else e[a].ty===`tr`?(X||(te=this.createTransformElement(e[a]),t[a]=te),ce.push(t[a]),this.addTransformToStyleList(t[a])):e[a].ty===`sh`||e[a].ty===`rc`||e[a].ty===`el`||e[a].ty===`sr`?X||(t[a]=this.createShapeElement(e[a])):e[a].ty===`tm`||e[a].ty===`rd`||e[a].ty===`pb`||e[a].ty===`zz`||e[a].ty===`op`?(X?(ee=t[a],ee.closed=!1):(ee=ShapeModifiers.getModifier(e[a].ty),ee.init(this,e[a]),t[a]=ee,this.shapeModifiers.push(ee)),Y.push(ee)):e[a].ty===`rp`&&(X?(ee=t[a],ee.closed=!0):(ee=ShapeModifiers.getModifier(e[a].ty),t[a]=ee,ee.init(this,e,a,t),this.shapeModifiers.push(ee),r=!1),Y.push(ee));this.addProcessedElement(e[a],a+1)}for(this.removeTransformFromStyleList(),this.closeStyles(K),o=Y.length,a=0;a<o;a+=1)Y[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(e,t){(e._opMdf||t.op._mdf||this._isFirstFrame)&&(t.opacity=e.opacity,t.opacity*=t.op.v,t._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var e,t=this.stylesList.length,n,r,i,a,o,c,u=this.globalData.renderer,K=this.globalData.canvasContext,Y,X;for(e=0;e<t;e+=1)if(X=this.stylesList[e],Y=X.type,(Y!==`st`&&Y!==`gs`||X.wi!==0)&&X.data._shouldRender&&X.coOp!==0&&this.globalData.currentGlobalAlpha!==0){for(u.save(),o=X.elements,Y===`st`||Y===`gs`?(u.ctxStrokeStyle(Y===`st`?X.co:X.grd),u.ctxLineWidth(X.wi),u.ctxLineCap(X.lc),u.ctxLineJoin(X.lj),u.ctxMiterLimit(X.ml||0)):u.ctxFillStyle(Y===`fl`?X.co:X.grd),u.ctxOpacity(X.coOp),Y!==`st`&&Y!==`gs`&&K.beginPath(),u.ctxTransform(X.preTransforms.finalTransform.props),r=o.length,n=0;n<r;n+=1){for((Y===`st`||Y===`gs`)&&(K.beginPath(),X.da&&(K.setLineDash(X.da),K.lineDashOffset=X.do)),c=o[n].trNodes,a=c.length,i=0;i<a;i+=1)c[i].t===`m`?K.moveTo(c[i].p[0],c[i].p[1]):c[i].t===`c`?K.bezierCurveTo(c[i].pts[0],c[i].pts[1],c[i].pts[2],c[i].pts[3],c[i].pts[4],c[i].pts[5]):K.closePath();(Y===`st`||Y===`gs`)&&(u.ctxStroke(),X.da&&K.setLineDash(this.dashResetter))}Y!==`st`&&Y!==`gs`&&this.globalData.renderer.ctxFill(X.r),u.restore()}},CVShapeElement.prototype.renderShape=function(e,t,n,r){var i,a=t.length-1,o=e;for(i=a;i>=0;--i)t[i].ty===`tr`?(o=n[i].transform,this.renderShapeTransform(e,o)):t[i].ty===`sh`||t[i].ty===`el`||t[i].ty===`rc`||t[i].ty===`sr`?this.renderPath(t[i],n[i]):t[i].ty===`fl`?this.renderFill(t[i],n[i],o):t[i].ty===`st`?this.renderStroke(t[i],n[i],o):t[i].ty===`gf`||t[i].ty===`gs`?this.renderGradientFill(t[i],n[i],o):t[i].ty===`gr`?this.renderShape(o,t[i].it,n[i].it):t[i].ty;r&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var n=e.trNodes,r=t.paths,i,a,o,c=r._length;n.length=0;var u=e.transforms.finalTransform;for(o=0;o<c;o+=1){var K=r.shapes[o];if(K&&K.v){for(a=K._length,i=1;i<a;i+=1)i===1&&n.push({t:`m`,p:u.applyToPointArray(K.v[0][0],K.v[0][1],0)}),n.push({t:`c`,pts:u.applyToTriplePoints(K.o[i-1],K.i[i],K.v[i])});a===1&&n.push({t:`m`,p:u.applyToPointArray(K.v[0][0],K.v[0][1],0)}),K.c&&a&&(n.push({t:`c`,pts:u.applyToTriplePoints(K.o[i-1],K.i[0],K.v[0])}),n.push({t:`z`}))}}e.trNodes=n}},CVShapeElement.prototype.renderPath=function(e,t){if(e.hd!==!0&&e._shouldRender){var n,r=t.styledShapes.length;for(n=0;n<r;n+=1)this.renderStyledShape(t.styledShapes[n],t.sh)}},CVShapeElement.prototype.renderFill=function(e,t,n){var r=t.style;(t.c._mdf||this._isFirstFrame)&&(r.co=`rgb(`+bmFloor(t.c.v[0])+`,`+bmFloor(t.c.v[1])+`,`+bmFloor(t.c.v[2])+`)`),(t.o._mdf||n._opMdf||this._isFirstFrame)&&(r.coOp=t.o.v*n.opacity)},CVShapeElement.prototype.renderGradientFill=function(e,t,n){var r=t.style,i;if(!r.grd||t.g._mdf||t.s._mdf||t.e._mdf||e.t!==1&&(t.h._mdf||t.a._mdf)){var a=this.globalData.canvasContext,o=t.s.v,c=t.e.v;if(e.t===1)i=a.createLinearGradient(o[0],o[1],c[0],c[1]);else{var u=Math.sqrt((o[0]-c[0])**2+(o[1]-c[1])**2),K=Math.atan2(c[1]-o[1],c[0]-o[0]),Y=t.h.v;Y>=1?Y=.99:Y<=-1&&(Y=-.99);var X=u*Y,ee=Math.cos(K+t.a.v)*X+o[0],te=Math.sin(K+t.a.v)*X+o[1];i=a.createRadialGradient(ee,te,0,o[0],o[1],u)}var ce,ue=e.g.p,de=t.g.c,fe=1;for(ce=0;ce<ue;ce+=1)t.g._hasOpacity&&t.g._collapsable&&(fe=t.g.o[ce*2+1]),i.addColorStop(de[ce*4]/100,`rgba(`+de[ce*4+1]+`,`+de[ce*4+2]+`,`+de[ce*4+3]+`,`+fe+`)`);r.grd=i}r.coOp=t.o.v*n.opacity},CVShapeElement.prototype.renderStroke=function(e,t,n){var r=t.style,i=t.d;i&&(i._mdf||this._isFirstFrame)&&(r.da=i.dashArray,r.do=i.dashoffset[0]),(t.c._mdf||this._isFirstFrame)&&(r.co=`rgb(`+bmFloor(t.c.v[0])+`,`+bmFloor(t.c.v[1])+`,`+bmFloor(t.c.v[2])+`)`),(t.o._mdf||n._opMdf||this._isFirstFrame)&&(r.coOp=t.o.v*n.opacity),(t.w._mdf||this._isFirstFrame)&&(r.wi=t.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0};function CVTextElement(e,t,n){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType=`canvas`,this.values={fill:`rgba(0,0,0,0)`,stroke:`rgba(0,0,0,0)`,sWidth:0,fValue:``},this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag(`canvas`).getContext(`2d`),CVTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=!1;e.fc?(t=!0,this.values.fill=this.buildColor(e.fc)):this.values.fill=`rgba(0,0,0,0)`,this.fill=t;var n=!1;e.sc&&(n=!0,this.values.stroke=this.buildColor(e.sc),this.values.sWidth=e.sw);var r=this.globalData.fontManager.getFontByName(e.f),i,a,o=e.l,c=this.mHelper;this.stroke=n,this.values.fValue=e.finalSize+`px `+this.globalData.fontManager.getFontByName(e.f).fFamily,a=e.finalText.length;var u,K,Y,X,ee,te,ce,ue,de,fe,me=this.data.singleShape,ge=e.tr*.001*e.finalSize,Te=0,Oe=0,Ae=!0,ze=0;for(i=0;i<a;i+=1){u=this.globalData.fontManager.getCharData(e.finalText[i],r.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily),K=u&&u.data||{},c.reset(),me&&o[i].n&&(Te=-ge,Oe+=e.yOffset,Oe+=+!!Ae,Ae=!1),ee=K.shapes?K.shapes[0].it:[],ce=ee.length,c.scale(e.finalSize/100,e.finalSize/100),me&&this.applyTextPropertiesToMatrix(e,c,o[i].line,Te,Oe),de=createSizedArray(ce-1);var qe=0;for(te=0;te<ce;te+=1)if(ee[te].ty===`sh`){for(X=ee[te].ks.k.i.length,ue=ee[te].ks.k,fe=[],Y=1;Y<X;Y+=1)Y===1&&fe.push(c.applyToX(ue.v[0][0],ue.v[0][1],0),c.applyToY(ue.v[0][0],ue.v[0][1],0)),fe.push(c.applyToX(ue.o[Y-1][0],ue.o[Y-1][1],0),c.applyToY(ue.o[Y-1][0],ue.o[Y-1][1],0),c.applyToX(ue.i[Y][0],ue.i[Y][1],0),c.applyToY(ue.i[Y][0],ue.i[Y][1],0),c.applyToX(ue.v[Y][0],ue.v[Y][1],0),c.applyToY(ue.v[Y][0],ue.v[Y][1],0));fe.push(c.applyToX(ue.o[Y-1][0],ue.o[Y-1][1],0),c.applyToY(ue.o[Y-1][0],ue.o[Y-1][1],0),c.applyToX(ue.i[0][0],ue.i[0][1],0),c.applyToY(ue.i[0][0],ue.i[0][1],0),c.applyToX(ue.v[0][0],ue.v[0][1],0),c.applyToY(ue.v[0][0],ue.v[0][1],0)),de[qe]=fe,qe+=1}me&&(Te+=o[i].l,Te+=ge),this.textSpans[ze]?this.textSpans[ze].elem=de:this.textSpans[ze]={elem:de},ze+=1}},CVTextElement.prototype.renderInnerContent=function(){this.validateText();var e=this.canvasContext;e.font=this.values.fValue,this.globalData.renderer.ctxLineCap(`butt`),this.globalData.renderer.ctxLineJoin(`miter`),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var t,n,r,i,a,o,c=this.textAnimator.renderedLetters,u=this.textProperty.currentData.l;n=u.length;var K,Y=null,X=null,ee=null,te,ce,ue=this.globalData.renderer;for(t=0;t<n;t+=1)if(!u[t].n){if(K=c[t],K&&(ue.save(),ue.ctxTransform(K.p),ue.ctxOpacity(K.o)),this.fill){for(K&&K.fc?Y!==K.fc&&(ue.ctxFillStyle(K.fc),Y=K.fc):Y!==this.values.fill&&(Y=this.values.fill,ue.ctxFillStyle(this.values.fill)),te=this.textSpans[t].elem,i=te.length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(ce=te[r],o=ce.length,this.globalData.canvasContext.moveTo(ce[0],ce[1]),a=2;a<o;a+=6)this.globalData.canvasContext.bezierCurveTo(ce[a],ce[a+1],ce[a+2],ce[a+3],ce[a+4],ce[a+5]);this.globalData.canvasContext.closePath(),ue.ctxFill()}if(this.stroke){for(K&&K.sw?ee!==K.sw&&(ee=K.sw,ue.ctxLineWidth(K.sw)):ee!==this.values.sWidth&&(ee=this.values.sWidth,ue.ctxLineWidth(this.values.sWidth)),K&&K.sc?X!==K.sc&&(X=K.sc,ue.ctxStrokeStyle(K.sc)):X!==this.values.stroke&&(X=this.values.stroke,ue.ctxStrokeStyle(this.values.stroke)),te=this.textSpans[t].elem,i=te.length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(ce=te[r],o=ce.length,this.globalData.canvasContext.moveTo(ce[0],ce[1]),a=2;a<o;a+=6)this.globalData.canvasContext.bezierCurveTo(ce[a],ce[a+1],ce[a+2],ce[a+3],ce[a+4],ce[a+5]);this.globalData.canvasContext.closePath(),ue.ctxStroke()}K&&this.globalData.renderer.restore()}};function CVImageElement(e,t,n){this.assetData=t.getAssetData(e.refId),this.img=t.imageLoader.getAsset(this.assetData),this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var e=createTag(`canvas`);e.width=this.assetData.w,e.height=this.assetData.h;var t=e.getContext(`2d`),n=this.img.width,r=this.img.height,i=n/r,a=this.assetData.w/this.assetData.h,o,c,u=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;i>a&&u===`xMidYMid slice`||i<a&&u!==`xMidYMid slice`?(c=r,o=c*a):(o=n,c=o/a),t.drawImage(this.img,(n-o)/2,(r-c)/2,o,c,0,0,this.assetData.w,this.assetData.h),this.img=e}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null};function CVSolidElement(e,t,n){this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)};function CanvasRendererBase(){}extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(e){return new CVShapeElement(e,this.globalData,this)},CanvasRendererBase.prototype.createText=function(e){return new CVTextElement(e,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(e){return new CVImageElement(e,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(e){return new CVSolidElement(e,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(e){(e[0]!==1||e[1]!==0||e[4]!==0||e[5]!==1||e[12]!==0||e[13]!==0)&&this.canvasContext.transform(e[0],e[1],e[4],e[5],e[12],e[13])},CanvasRendererBase.prototype.ctxOpacity=function(e){this.canvasContext.globalAlpha*=e<0?0:e},CanvasRendererBase.prototype.ctxFillStyle=function(e){this.canvasContext.fillStyle=e},CanvasRendererBase.prototype.ctxStrokeStyle=function(e){this.canvasContext.strokeStyle=e},CanvasRendererBase.prototype.ctxLineWidth=function(e){this.canvasContext.lineWidth=e},CanvasRendererBase.prototype.ctxLineCap=function(e){this.canvasContext.lineCap=e},CanvasRendererBase.prototype.ctxLineJoin=function(e){this.canvasContext.lineJoin=e},CanvasRendererBase.prototype.ctxMiterLimit=function(e){this.canvasContext.miterLimit=e},CanvasRendererBase.prototype.ctxFill=function(e){this.canvasContext.fill(e)},CanvasRendererBase.prototype.ctxFillRect=function(e,t,n,r){this.canvasContext.fillRect(e,t,n,r)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}this.contextData.reset()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(e){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}e&&(this.globalData.blendMode=`source-over`),this.contextData.restore(e)},CanvasRendererBase.prototype.configAnimation=function(e){if(this.animationItem.wrapper){this.animationItem.container=createTag(`canvas`);var t=this.animationItem.container.style;t.width=`100%`,t.height=`100%`;var n=`0px 0px 0px`;t.transformOrigin=n,t.mozTransformOrigin=n,t.webkitTransformOrigin=n,t[`-webkit-transform`]=n,t.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext(`2d`),this.renderConfig.className&&this.animationItem.container.setAttribute(`class`,this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute(`id`,this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=e,this.layers=e.layers,this.transformCanvas={w:e.w,h:e.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(e,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(e.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(e,t){this.reset();var n,r;e?(n=e,r=t,this.canvasContext.canvas.width=n,this.canvasContext.canvas.height=r):(this.animationItem.wrapper&&this.animationItem.container?(n=this.animationItem.wrapper.offsetWidth,r=this.animationItem.wrapper.offsetHeight):(n=this.canvasContext.canvas.width,r=this.canvasContext.canvas.height),this.canvasContext.canvas.width=n*this.renderConfig.dpr,this.canvasContext.canvas.height=r*this.renderConfig.dpr);var i,a;if(this.renderConfig.preserveAspectRatio.indexOf(`meet`)!==-1||this.renderConfig.preserveAspectRatio.indexOf(`slice`)!==-1){var o=this.renderConfig.preserveAspectRatio.split(` `),c=o[1]||`meet`,u=o[0]||`xMidYMid`,K=u.substr(0,4),Y=u.substr(4);i=n/r,a=this.transformCanvas.w/this.transformCanvas.h,a>i&&c===`meet`||a<i&&c===`slice`?(this.transformCanvas.sx=n/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=r/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.h/this.renderConfig.dpr)),K===`xMid`&&(a<i&&c===`meet`||a>i&&c===`slice`)?this.transformCanvas.tx=(n-this.transformCanvas.w*(r/this.transformCanvas.h))/2*this.renderConfig.dpr:K===`xMax`&&(a<i&&c===`meet`||a>i&&c===`slice`)?this.transformCanvas.tx=(n-this.transformCanvas.w*(r/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,Y===`YMid`&&(a>i&&c===`meet`||a<i&&c===`slice`)?this.transformCanvas.ty=(r-this.transformCanvas.h*(n/this.transformCanvas.w))/2*this.renderConfig.dpr:Y===`YMax`&&(a>i&&c===`meet`||a<i&&c===`slice`)?this.transformCanvas.ty=(r-this.transformCanvas.h*(n/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else this.renderConfig.preserveAspectRatio===`none`?(this.transformCanvas.sx=n/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=``);for(var e=(this.layers?this.layers.length:0)-1;e>=0;--e)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if(!(this.renderedFrame===e&&this.renderConfig.clearCanvas===!0&&!t||this.destroyed||e===-1)){this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var n,r=this.layers.length;for(this.completeLayers||this.checkLayers(e),n=r-1;n>=0;--n)(this.completeLayers||this.elements[n])&&this.elements[n].prepareFrame(e-this.layers[n].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),n=r-1;n>=0;--n)(this.completeLayers||this.elements[n])&&this.elements[n].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!(t[e]||this.layers[e].ty===99)){var n=this.createItem(this.layers[e],this,this.globalData);t[e]=n,n.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display=`none`},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display=`block`};function CanvasContext(){this.opacity=-1,this.transform=createTypedArray(`float32`,16),this.fillStyle=``,this.strokeStyle=``,this.lineWidth=``,this.lineCap=``,this.lineJoin=``,this.miterLimit=``,this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var e,t=15;for(e=0;e<t;e+=1){var n=new CanvasContext;this.stack[e]=n}this._length=t,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle=``,this.appliedFillStyle=``,this.currentStrokeStyle=``,this.appliedStrokeStyle=``,this.currentLineWidth=``,this.appliedLineWidth=``,this.currentLineCap=``,this.appliedLineCap=``,this.currentLineJoin=``,this.appliedLineJoin=``,this.appliedMiterLimit=``,this.currentMiterLimit=``}CVContextData.prototype.duplicate=function(){var e=this._length*2,t=0;for(t=this._length;t<e;t+=1)this.stack[t]=new CanvasContext;this._length=e},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(e){--this.cArrPos;var t=this.stack[this.cArrPos],n=t.transform,r,i=this.cTr.props;for(r=0;r<16;r+=1)i[r]=n[r];if(e){this.nativeContext.restore();var a=this.stack[this.cArrPos+1];this.appliedFillStyle=a.fillStyle,this.appliedStrokeStyle=a.strokeStyle,this.appliedLineWidth=a.lineWidth,this.appliedLineCap=a.lineCap,this.appliedLineJoin=a.lineJoin,this.appliedMiterLimit=a.miterLimit}this.nativeContext.setTransform(n[0],n[1],n[4],n[5],n[12],n[13]),(e||t.opacity!==-1&&this.currentOpacity!==t.opacity)&&(this.nativeContext.globalAlpha=t.opacity,this.currentOpacity=t.opacity),this.currentFillStyle=t.fillStyle,this.currentStrokeStyle=t.strokeStyle,this.currentLineWidth=t.lineWidth,this.currentLineCap=t.lineCap,this.currentLineJoin=t.lineJoin,this.currentMiterLimit=t.miterLimit},CVContextData.prototype.save=function(e){e&&this.nativeContext.save();var t=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();for(var n=this.stack[this.cArrPos],r=0;r<16;r+=1)n.transform[r]=t[r];this.cArrPos+=1;var i=this.stack[this.cArrPos];i.opacity=n.opacity,i.fillStyle=n.fillStyle,i.strokeStyle=n.strokeStyle,i.lineWidth=n.lineWidth,i.lineCap=n.lineCap,i.lineJoin=n.lineJoin,i.miterLimit=n.miterLimit},CVContextData.prototype.setOpacity=function(e){this.stack[this.cArrPos].opacity=e},CVContextData.prototype.setContext=function(e){this.nativeContext=e},CVContextData.prototype.fillStyle=function(e){this.stack[this.cArrPos].fillStyle!==e&&(this.currentFillStyle=e,this.stack[this.cArrPos].fillStyle=e)},CVContextData.prototype.strokeStyle=function(e){this.stack[this.cArrPos].strokeStyle!==e&&(this.currentStrokeStyle=e,this.stack[this.cArrPos].strokeStyle=e)},CVContextData.prototype.lineWidth=function(e){this.stack[this.cArrPos].lineWidth!==e&&(this.currentLineWidth=e,this.stack[this.cArrPos].lineWidth=e)},CVContextData.prototype.lineCap=function(e){this.stack[this.cArrPos].lineCap!==e&&(this.currentLineCap=e,this.stack[this.cArrPos].lineCap=e)},CVContextData.prototype.lineJoin=function(e){this.stack[this.cArrPos].lineJoin!==e&&(this.currentLineJoin=e,this.stack[this.cArrPos].lineJoin=e)},CVContextData.prototype.miterLimit=function(e){this.stack[this.cArrPos].miterLimit!==e&&(this.currentMiterLimit=e,this.stack[this.cArrPos].miterLimit=e)},CVContextData.prototype.transform=function(e){this.transformMat.cloneFromProps(e);var t=this.cTr;this.transformMat.multiply(t),t.cloneFromProps(this.transformMat.props);var n=t.props;this.nativeContext.setTransform(n[0],n[1],n[4],n[5],n[12],n[13])},CVContextData.prototype.opacity=function(e){var t=this.stack[this.cArrPos].opacity;t*=e<0?0:e,this.stack[this.cArrPos].opacity!==t&&(this.currentOpacity!==e&&(this.nativeContext.globalAlpha=e,this.currentOpacity=e),this.stack[this.cArrPos].opacity=t)},CVContextData.prototype.fill=function(e){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(e)},CVContextData.prototype.fillRect=function(e,t,n,r){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(e,t,n,r)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()};function CVCompElement(e,t,n){this.completeLayers=!1,this.layers=e.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(e,t,n),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var e=this.canvasContext;e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip();for(var t=this.layers.length-1;t>=0;--t)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){for(var e=this.layers.length-1;e>=0;--e)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)};function CanvasRenderer(e,t){this.animationItem=e,this.renderConfig={clearCanvas:t&&t.clearCanvas!==void 0?t.clearCanvas:!0,context:t&&t.context||null,progressiveLoad:t&&t.progressiveLoad||!1,preserveAspectRatio:t&&t.preserveAspectRatio||`xMidYMid meet`,imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||`xMidYMid slice`,contentVisibility:t&&t.contentVisibility||`visible`,className:t&&t.className||``,id:t&&t.id||``,runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.renderConfig.dpr=t&&t.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=t&&t.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType=`canvas`,this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||`div`),this.data.hasMask?(this.svgElement=createNS(`svg`),this.layerElement=createNS(`g`),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute(`id`,this.data.ln),this.data.cl&&this.layerElement.setAttribute(`class`,this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var t=this.finalTransform.mat.toCSS();e.transform=t,e.webkitTransform=t}this.finalTransform._opMdf&&(e.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&=!1)},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&=null,this.maskManager&&=(this.maskManager.destroy(),null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(e,t,n){this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var e;this.data.hasMask?(e=createNS(`rect`),e.setAttribute(`width`,this.data.sw),e.setAttribute(`height`,this.data.sh),e.setAttribute(`fill`,this.data.sc),this.svgElement.setAttribute(`width`,this.data.sw),this.svgElement.setAttribute(`height`,this.data.sh)):(e=createTag(`div`),e.style.width=this.data.sw+`px`,e.style.height=this.data.sh+`px`,e.style.backgroundColor=this.data.sc),this.layerElement.appendChild(e)};function HShapeElement(e,t,n){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS(`g`),this.initElement(e,t,n),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var e;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),e=this.svgElement;else{e=createNS(`svg`);var t=this.comp.data?this.comp.data:this.globalData.compSize;e.setAttribute(`width`,t.w),e.setAttribute(`height`,t.h),e.appendChild(this.shapesContainer),this.layerElement.appendChild(e)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=e},HShapeElement.prototype.getTransformedPoint=function(e,t){var n,r=e.length;for(n=0;n<r;n+=1)t=e[n].mProps.v.applyToPointArray(t[0],t[1],0);return t},HShapeElement.prototype.calculateShapeBoundingBox=function(e,t){var n=e.sh.v,r=e.transformers,i,a=n._length,o,c,u,K;if(!(a<=1)){for(i=0;i<a-1;i+=1)o=this.getTransformedPoint(r,n.v[i]),c=this.getTransformedPoint(r,n.o[i]),u=this.getTransformedPoint(r,n.i[i+1]),K=this.getTransformedPoint(r,n.v[i+1]),this.checkBounds(o,c,u,K,t);n.c&&(o=this.getTransformedPoint(r,n.v[i]),c=this.getTransformedPoint(r,n.o[i]),u=this.getTransformedPoint(r,n.i[0]),K=this.getTransformedPoint(r,n.v[0]),this.checkBounds(o,c,u,K,t))}},HShapeElement.prototype.checkBounds=function(e,t,n,r,i){this.getBoundsOfCurve(e,t,n,r);var a=this.shapeBoundingBox;i.x=bmMin(a.left,i.x),i.xMax=bmMax(a.right,i.xMax),i.y=bmMin(a.top,i.y),i.yMax=bmMax(a.bottom,i.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(e,t,n,r){for(var i=[[e[0],r[0]],[e[1],r[1]]],a,o,c,u,K,Y,X,ee=0;ee<2;++ee)o=6*e[ee]-12*t[ee]+6*n[ee],a=-3*e[ee]+9*t[ee]-9*n[ee]+3*r[ee],c=3*t[ee]-3*e[ee],o|=0,a|=0,c|=0,a===0&&o===0||(a===0?(u=-c/o,u>0&&u<1&&i[ee].push(this.calculateF(u,e,t,n,r,ee))):(K=o*o-4*c*a,K>=0&&(Y=(-o+bmSqrt(K))/(2*a),Y>0&&Y<1&&i[ee].push(this.calculateF(Y,e,t,n,r,ee)),X=(-o-bmSqrt(K))/(2*a),X>0&&X<1&&i[ee].push(this.calculateF(X,e,t,n,r,ee)))));this.shapeBoundingBox.left=bmMin.apply(null,i[0]),this.shapeBoundingBox.top=bmMin.apply(null,i[1]),this.shapeBoundingBox.right=bmMax.apply(null,i[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,i[1])},HShapeElement.prototype.calculateF=function(e,t,n,r,i,a){return bmPow(1-e,3)*t[a]+3*bmPow(1-e,2)*e*n[a]+3*(1-e)*bmPow(e,2)*r[a]+bmPow(e,3)*i[a]},HShapeElement.prototype.calculateBoundingBox=function(e,t){var n,r=e.length;for(n=0;n<r;n+=1)e[n]&&e[n].sh?this.calculateShapeBoundingBox(e[n],t):e[n]&&e[n].it?this.calculateBoundingBox(e[n].it,t):e[n]&&e[n].style&&e[n].w&&this.expandStrokeBoundingBox(e[n].w,t)},HShapeElement.prototype.expandStrokeBoundingBox=function(e,t){var n=0;if(e.keyframes){for(var r=0;r<e.keyframes.length;r+=1){var i=e.keyframes[r].s;i>n&&(n=i)}n*=e.mult}else n=e.v*e.mult;t.x-=n,t.xMax+=n,t.y-=n,t.yMax+=n},HShapeElement.prototype.currentBoxContains=function(e){return this.currentBBox.x<=e.x&&this.currentBBox.y<=e.y&&this.currentBBox.width+this.currentBBox.x>=e.x+e.width&&this.currentBBox.height+this.currentBBox.y>=e.y+e.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var e=this.tempBoundingBox,t=999999;if(e.x=t,e.xMax=-t,e.y=t,e.yMax=-t,this.calculateBoundingBox(this.itemsData,e),e.width=e.xMax<e.x?0:e.xMax-e.x,e.height=e.yMax<e.y?0:e.yMax-e.y,this.currentBoxContains(e))return;var n=!1;if(this.currentBBox.w!==e.width&&(this.currentBBox.w=e.width,this.shapeCont.setAttribute(`width`,e.width),n=!0),this.currentBBox.h!==e.height&&(this.currentBBox.h=e.height,this.shapeCont.setAttribute(`height`,e.height),n=!0),n||this.currentBBox.x!==e.x||this.currentBBox.y!==e.y){this.currentBBox.w=e.width,this.currentBBox.h=e.height,this.currentBBox.x=e.x,this.currentBBox.y=e.y,this.shapeCont.setAttribute(`viewBox`,this.currentBBox.x+` `+this.currentBBox.y+` `+this.currentBBox.w+` `+this.currentBBox.h);var r=this.shapeCont.style,i=`translate(`+this.currentBBox.x+`px,`+this.currentBBox.y+`px)`;r.transform=i,r.webkitTransform=i}}};function HTextElement(e,t,n){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType=`svg`,this.isMasked=!1,this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType=`svg`,this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute(`width`,this.compW),this.svgElement.setAttribute(`height`,this.compH);var e=createNS(`g`);this.maskedElement.appendChild(e),this.innerElem=e}else this.renderType=`html`,this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=this.innerElem.style,n=e.fc?this.buildColor(e.fc):`rgba(0,0,0,0)`;t.fill=n,t.color=n,e.sc&&(t.stroke=this.buildColor(e.sc),t.strokeWidth=e.sw+`px`);var r=this.globalData.fontManager.getFontByName(e.f);if(!this.globalData.fontManager.chars){if(t.fontSize=e.finalSize+`px`,t.lineHeight=e.finalSize+`px`,r.fClass)this.innerElem.className=r.fClass;else{t.fontFamily=r.fFamily;var i=e.fWeight;t.fontStyle=e.fStyle,t.fontWeight=i}}var a,o,c=e.l;o=c.length;var u,K,Y,X=this.mHelper,ee,te=``,ce=0;for(a=0;a<o;a+=1){if(this.globalData.fontManager.chars?(this.textPaths[ce]?u=this.textPaths[ce]:(u=createNS(`path`),u.setAttribute(`stroke-linecap`,lineCapEnum[1]),u.setAttribute(`stroke-linejoin`,lineJoinEnum[2]),u.setAttribute(`stroke-miterlimit`,`4`)),this.isMasked||(this.textSpans[ce]?(K=this.textSpans[ce],Y=K.children[0]):(K=createTag(`div`),K.style.lineHeight=0,Y=createNS(`svg`),Y.appendChild(u),styleDiv(K)))):this.isMasked?u=this.textPaths[ce]?this.textPaths[ce]:createNS(`text`):this.textSpans[ce]?(K=this.textSpans[ce],u=this.textPaths[ce]):(K=createTag(`span`),styleDiv(K),u=createTag(`span`),styleDiv(u),K.appendChild(u)),this.globalData.fontManager.chars){var ue=this.globalData.fontManager.getCharData(e.finalText[a],r.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily),de=ue?ue.data:null;if(X.reset(),de&&de.shapes&&de.shapes.length&&(ee=de.shapes[0].it,X.scale(e.finalSize/100,e.finalSize/100),te=this.createPathShape(X,ee),u.setAttribute(`d`,te)),this.isMasked)this.innerElem.appendChild(u);else{if(this.innerElem.appendChild(K),de&&de.shapes){document.body.appendChild(Y);var fe=Y.getBBox();Y.setAttribute(`width`,fe.width+2),Y.setAttribute(`height`,fe.height+2),Y.setAttribute(`viewBox`,fe.x-1+` `+(fe.y-1)+` `+(fe.width+2)+` `+(fe.height+2));var me=Y.style,ge=`translate(`+(fe.x-1)+`px,`+(fe.y-1)+`px)`;me.transform=ge,me.webkitTransform=ge,c[a].yOffset=fe.y-1}else Y.setAttribute(`width`,1),Y.setAttribute(`height`,1);K.appendChild(Y)}}else if(u.textContent=c[a].val,u.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),this.isMasked)this.innerElem.appendChild(u);else{this.innerElem.appendChild(K);var Te=u.style,Oe=`translate3d(0,`+-e.finalSize/1.2+`px,0)`;Te.transform=Oe,Te.webkitTransform=Oe}this.isMasked?this.textSpans[ce]=u:this.textSpans[ce]=K,this.textSpans[ce].style.display=`block`,this.textPaths[ce]=u,ce+=1}for(;ce<this.textSpans.length;)this.textSpans[ce].style.display=`none`,ce+=1},HTextElement.prototype.renderInnerContent=function(){this.validateText();var e;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute(`viewBox`,-this.finalTransform.mProp.p.v[0]+` `+-this.finalTransform.mProp.p.v[1]+` `+this.compW+` `+this.compH),e=this.svgElement.style;var t=`translate(`+-this.finalTransform.mProp.p.v[0]+`px,`+-this.finalTransform.mProp.p.v[1]+`px)`;e.transform=t,e.webkitTransform=t}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var n,r,i=0,a=this.textAnimator.renderedLetters,o=this.textProperty.currentData.l;r=o.length;var c,u,K;for(n=0;n<r;n+=1)o[n].n?i+=1:(u=this.textSpans[n],K=this.textPaths[n],c=a[i],i+=1,c._mdf.m&&(this.isMasked?u.setAttribute(`transform`,c.m):(u.style.webkitTransform=c.m,u.style.transform=c.m)),u.style.opacity=c.o,c.sw&&c._mdf.sw&&K.setAttribute(`stroke-width`,c.sw),c.sc&&c._mdf.sc&&K.setAttribute(`stroke`,c.sc),c.fc&&c._mdf.fc&&(K.setAttribute(`fill`,c.fc),K.style.color=c.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var Y=this.innerElem.getBBox();this.currentBBox.w!==Y.width&&(this.currentBBox.w=Y.width,this.svgElement.setAttribute(`width`,Y.width)),this.currentBBox.h!==Y.height&&(this.currentBBox.h=Y.height,this.svgElement.setAttribute(`height`,Y.height));var X=1;if(this.currentBBox.w!==Y.width+X*2||this.currentBBox.h!==Y.height+X*2||this.currentBBox.x!==Y.x-X||this.currentBBox.y!==Y.y-X){this.currentBBox.w=Y.width+X*2,this.currentBBox.h=Y.height+X*2,this.currentBBox.x=Y.x-X,this.currentBBox.y=Y.y-X,this.svgElement.setAttribute(`viewBox`,this.currentBBox.x+` `+this.currentBBox.y+` `+this.currentBBox.w+` `+this.currentBBox.h),e=this.svgElement.style;var ee=`translate(`+this.currentBBox.x+`px,`+this.currentBBox.y+`px)`;e.transform=ee,e.webkitTransform=ee}}}};function HCameraElement(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initHierarchy();var r=PropertyFactory.getProp;if(this.pe=r(this,e.pe,0,0,this),e.ks.p.s?(this.px=r(this,e.ks.p.x,1,0,this),this.py=r(this,e.ks.p.y,1,0,this),this.pz=r(this,e.ks.p.z,1,0,this)):this.p=r(this,e.ks.p,1,0,this),e.ks.a&&(this.a=r(this,e.ks.a,1,0,this)),e.ks.or.k.length&&e.ks.or.k[0].to){var i,a=e.ks.or.k.length;for(i=0;i<a;i+=1)e.ks.or.k[i].to=null,e.ks.or.k[i].ti=null}this.or=r(this,e.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=r(this,e.ks.rx,0,degToRads,this),this.ry=r(this,e.ks.ry,0,degToRads,this),this.rz=r(this,e.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var e,t=this.comp.threeDElements.length,n,r,i;for(e=0;e<t;e+=1)if(n=this.comp.threeDElements[e],n.type===`3d`){r=n.perspectiveElem.style,i=n.container.style;var a=this.pe.v+`px`,o=`0px 0px 0px`,c=`matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)`;r.perspective=a,r.webkitPerspective=a,i.transformOrigin=o,i.mozTransformOrigin=o,i.webkitTransformOrigin=o,r.transform=c,r.webkitTransform=c}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var e=this._isFirstFrame,t,n;if(this.hierarchy)for(n=this.hierarchy.length,t=0;t<n;t+=1)e=this.hierarchy[t].finalTransform.mProp._mdf||e;if(e||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(n=this.hierarchy.length-1,t=n;t>=0;--t){var r=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-r.p.v[0],-r.p.v[1],r.p.v[2]),this.mat.rotateX(-r.or.v[0]).rotateY(-r.or.v[1]).rotateZ(r.or.v[2]),this.mat.rotateX(-r.rx.v).rotateY(-r.ry.v).rotateZ(r.rz.v),this.mat.scale(1/r.s.v[0],1/r.s.v[1],1/r.s.v[2]),this.mat.translate(r.a.v[0],r.a.v[1],r.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var i=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]],a=Math.sqrt(i[0]**2+i[1]**2+i[2]**2),o=[i[0]/a,i[1]/a,i[2]/a],c=Math.sqrt(o[2]*o[2]+o[0]*o[0]),u=Math.atan2(o[1],c),K=Math.atan2(o[0],-o[2]);this.mat.rotateY(K).rotateX(-u)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var Y=!this._prevMat.equals(this.mat);if((Y||this.pe._mdf)&&this.comp.threeDElements){n=this.comp.threeDElements.length;var X,ee,te;for(t=0;t<n;t+=1)if(X=this.comp.threeDElements[t],X.type===`3d`){if(Y){var ce=this.mat.toCSS();te=X.container.style,te.transform=ce,te.webkitTransform=ce}this.pe._mdf&&(ee=X.perspectiveElem.style,ee.perspective=this.pe.v+`px`,ee.webkitPerspective=this.pe.v+`px`)}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null};function HImageElement(e,t,n){this.assetData=t.getAssetData(e.refId),this.initElement(e,t,n)}extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData),t=new Image;this.data.hasMask?(this.imageElem=createNS(`image`),this.imageElem.setAttribute(`width`,this.assetData.w+`px`),this.imageElem.setAttribute(`height`,this.assetData.h+`px`),this.imageElem.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,e),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute(`width`,this.assetData.w),this.baseElement.setAttribute(`height`,this.assetData.h)):this.layerElement.appendChild(t),t.crossOrigin=`anonymous`,t.src=e,this.data.ln&&this.baseElement.setAttribute(`id`,this.data.ln)};function HybridRendererBase(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||``,imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||`xMidYMid slice`,hideOnTransparent:!(t&&t.hideOnTransparent===!1),filterSize:{width:t&&t.filterSize&&t.filterSize.width||`400%`,height:t&&t.filterSize&&t.filterSize.height||`400%`,x:t&&t.filterSize&&t.filterSize.x||`-100%`,y:t&&t.filterSize&&t.filterSize.y||`-100%`}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType=`html`}extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},HybridRendererBase.prototype.appendElementInPos=function(e,t){var n=e.getBaseElement();if(n){var r=this.layers[t];if(!r.ddd||!this.supports3d){if(this.threeDElements)this.addTo3dContainer(n,t);else{for(var i=0,a,o,c;i<t;)this.elements[i]&&this.elements[i]!==!0&&this.elements[i].getBaseElement&&(o=this.elements[i],c=this.layers[i].ddd?this.getThreeDContainerByPos(i):o.getBaseElement(),a=c||a),i+=1;a?(!r.ddd||!this.supports3d)&&this.layerElement.insertBefore(n,a):(!r.ddd||!this.supports3d)&&this.layerElement.appendChild(n)}}else this.addTo3dContainer(n,t)}},HybridRendererBase.prototype.createShape=function(e){return this.supports3d?new HShapeElement(e,this.globalData,this):new SVGShapeElement(e,this.globalData,this)},HybridRendererBase.prototype.createText=function(e){return this.supports3d?new HTextElement(e,this.globalData,this):new SVGTextLottieElement(e,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(e){return this.camera=new HCameraElement(e,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(e){return this.supports3d?new HImageElement(e,this.globalData,this):new IImageElement(e,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(e){return this.supports3d?new HSolidElement(e,this.globalData,this):new ISolidElement(e,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(e){for(var t=0,n=this.threeDElements.length;t<n;){if(this.threeDElements[t].startPos<=e&&this.threeDElements[t].endPos>=e)return this.threeDElements[t].perspectiveElem;t+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(e,t){var n=createTag(`div`),r,i;styleDiv(n);var a=createTag(`div`);if(styleDiv(a),t===`3d`){r=n.style,r.width=this.globalData.compSize.w+`px`,r.height=this.globalData.compSize.h+`px`;var o=`50% 50%`;r.webkitTransformOrigin=o,r.mozTransformOrigin=o,r.transformOrigin=o,i=a.style;var c=`matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)`;i.transform=c,i.webkitTransform=c}n.appendChild(a);var u={container:a,perspectiveElem:n,startPos:e,endPos:e,type:t};return this.threeDElements.push(u),u},HybridRendererBase.prototype.build3dContainers=function(){var e,t=this.layers.length,n,r=``;for(e=0;e<t;e+=1)this.layers[e].ddd&&this.layers[e].ty!==3?(r!==`3d`&&(r=`3d`,n=this.createThreeDContainer(e,`3d`)),n.endPos=Math.max(n.endPos,e)):(r!==`2d`&&(r=`2d`,n=this.createThreeDContainer(e,`2d`)),n.endPos=Math.max(n.endPos,e));for(t=this.threeDElements.length,e=t-1;e>=0;--e)this.resizerElem.appendChild(this.threeDElements[e].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(e,t){for(var n=0,r=this.threeDElements.length;n<r;){if(t<=this.threeDElements[n].endPos){for(var i=this.threeDElements[n].startPos,a;i<t;)this.elements[i]&&this.elements[i].getBaseElement&&(a=this.elements[i].getBaseElement()),i+=1;a?this.threeDElements[n].container.insertBefore(e,a):this.threeDElements[n].container.appendChild(e);break}n+=1}},HybridRendererBase.prototype.configAnimation=function(e){var t=createTag(`div`),n=this.animationItem.wrapper,r=t.style;r.width=e.w+`px`,r.height=e.h+`px`,this.resizerElem=t,styleDiv(t),r.transformStyle=`flat`,r.mozTransformStyle=`flat`,r.webkitTransformStyle=`flat`,this.renderConfig.className&&t.setAttribute(`class`,this.renderConfig.className),n.appendChild(t),r.overflow=`hidden`;var i=createNS(`svg`);i.setAttribute(`width`,`1`),i.setAttribute(`height`,`1`),styleDiv(i),this.resizerElem.appendChild(i);var a=createNS(`defs`);i.appendChild(a),this.data=e,this.setupGlobalData(e,i),this.globalData.defs=a,this.layers=e.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=``),this.animationItem.container=null,this.globalData.defs=null;var e,t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var e=this.animationItem.wrapper.offsetWidth,t=this.animationItem.wrapper.offsetHeight,n=e/t,r=this.globalData.compSize.w/this.globalData.compSize.h,i,a,o,c;r>n?(i=e/this.globalData.compSize.w,a=e/this.globalData.compSize.w,o=0,c=(t-this.globalData.compSize.h*(e/this.globalData.compSize.w))/2):(i=t/this.globalData.compSize.h,a=t/this.globalData.compSize.h,o=(e-this.globalData.compSize.w*(t/this.globalData.compSize.h))/2,c=0);var u=this.resizerElem.style;u.webkitTransform=`matrix3d(`+i+`,0,0,0,0,`+a+`,0,0,0,0,1,0,`+o+`,`+c+`,0,1)`,u.transform=u.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display=`none`},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display=`block`},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var e=this.globalData.compSize.w,t=this.globalData.compSize.h,n,r=this.threeDElements.length;for(n=0;n<r;n+=1){var i=this.threeDElements[n].perspectiveElem.style;i.webkitPerspective=Math.sqrt(e**2+t**2)+`px`,i.perspective=i.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(e){var t,n=e.length,r=createTag(`div`);for(t=0;t<n;t+=1)if(e[t].xt){var i=this.createComp(e[t],r,this.globalData.comp,null);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}};function HCompElement(e,t,n){this.layers=e.layers,this.supports3d=!e.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,n),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute(`width`,this.data.w),this.svgElement.setAttribute(`height`,this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(e,t){for(var n=0,r;n<t;)this.elements[n]&&this.elements[n].getBaseElement&&(r=this.elements[n].getBaseElement()),n+=1;r?this.layerElement.insertBefore(e,r):this.layerElement.appendChild(e)},HCompElement.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};function HybridRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||``,imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||`xMidYMid slice`,hideOnTransparent:!(t&&t.hideOnTransparent===!1),filterSize:{width:t&&t.filterSize&&t.filterSize.width||`400%`,height:t&&t.filterSize&&t.filterSize.height||`400%`,x:t&&t.filterSize&&t.filterSize.x||`-100%`,y:t&&t.filterSize&&t.filterSize.y||`-100%`},runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType=`html`}extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};var CompExpressionInterface=function(){return function(e){function t(t){for(var n=0,r=e.layers.length;n<r;){if(e.layers[n].nm===t||e.layers[n].ind===t)return e.elements[n].layerInterface;n+=1}return null}return Object.defineProperty(t,"_name",{value:e.data.nm}),t.layer=t,t.pixelAspect=1,t.height=e.data.h||e.globalData.compSize.h,t.width=e.data.w||e.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/e.globalData.frameRate,t.displayStartTime=0,t.numLayers=e.layers.length,t}}();function _typeof$2(e){"@babel/helpers - typeof";return _typeof$2=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},_typeof$2(e)}function seedRandom(e,t){var n=this,r=256,i=6,a=52,o=`random`,c=t.pow(r,i),u=t.pow(2,a),K=u*2,Y=r-1,X;function ee(n,a,Y){var X=[];a=a===!0?{entropy:!0}:a||{};var ee=de(ue(a.entropy?[n,me(e)]:n===null?fe():n,3),X),ge=new te(X),Te=function(){for(var e=ge.g(i),t=c,n=0;e<u;)e=(e+n)*r,t*=r,n=ge.g(1);for(;e>=K;)e/=2,t/=2,n>>>=1;return(e+n)/t};return Te.int32=function(){return ge.g(4)|0},Te.quick=function(){return ge.g(4)/4294967296},Te.double=Te,de(me(ge.S),e),(a.pass||Y||function(e,n,r,i){return i&&(i.S&&ce(i,ge),e.state=function(){return ce(ge,{})}),r?(t[o]=e,n):e})(Te,ee,`global`in a?a.global:this==t,a.state)}t[`seed`+o]=ee;function te(e){var t,n=e.length,i=this,a=0,o=i.i=i.j=0,c=i.S=[];for(n||(e=[n++]);a<r;)c[a]=a++;for(a=0;a<r;a++)c[a]=c[o=Y&o+e[a%n]+(t=c[a])],c[o]=t;i.g=function(e){for(var t,n=0,a=i.i,o=i.j,c=i.S;e--;)t=c[a=Y&a+1],n=n*r+c[Y&(c[a]=c[o=Y&o+t])+(c[o]=t)];return i.i=a,i.j=o,n}}function ce(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function ue(e,t){var n=[],r=_typeof$2(e),i;if(t&&r==`object`)for(i in e)try{n.push(ue(e[i],t-1))}catch{}return n.length?n:r==`string`?e:e+`\0`}function de(e,t){for(var n=e+``,r,i=0;i<n.length;)t[Y&i]=Y&(r^=t[Y&i]*19)+n.charCodeAt(i++);return me(t)}function fe(){try{if(X)return me(X.randomBytes(r));var t=new Uint8Array(r);return(n.crypto||n.msCrypto).getRandomValues(t),me(t)}catch{var i=n.navigator,a=i&&i.plugins;return[+new Date,n,a,n.screen,me(e)]}}function me(e){return String.fromCharCode.apply(0,e)}de(t.random(),e)}function initialize$2(e){seedRandom([],e)}var propTypes={SHAPE:`shape`};function _typeof$1(e){"@babel/helpers - typeof";return _typeof$1=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},_typeof$1(e)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};initialize$2(BMMath);function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(e){return e.constructor===Array||e.constructor===Float32Array}function isNumerable(e,t){return e===`number`||t instanceof Number||e===`boolean`||e===`string`}function $bm_neg(e){var t=_typeof$1(e);if(t===`number`||e instanceof Number||t===`boolean`)return-e;if($bm_isInstanceOfArray(e)){var n,r=e.length,i=[];for(n=0;n<r;n+=1)i[n]=-e[n];return i}return e.propType?e.v:-e}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,`easeIn`).get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,`easeOut`).get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,`easeInOut`).get;function sum(e,t){var n=_typeof$1(e),r=_typeof$1(t);if(isNumerable(n,e)&&isNumerable(r,t)||n===`string`||r===`string`)return e+t;if($bm_isInstanceOfArray(e)&&isNumerable(r,t))return e=e.slice(0),e[0]+=t,e;if(isNumerable(n,e)&&$bm_isInstanceOfArray(t))return t=t.slice(0),t[0]=e+t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var i=0,a=e.length,o=t.length,c=[];i<a||i<o;)(typeof e[i]==`number`||e[i]instanceof Number)&&(typeof t[i]==`number`||t[i]instanceof Number)?c[i]=e[i]+t[i]:c[i]=t[i]===void 0?e[i]:e[i]||t[i],i+=1;return c}return 0}var add=sum;function sub(e,t){var n=_typeof$1(e),r=_typeof$1(t);if(isNumerable(n,e)&&isNumerable(r,t))return n===`string`&&(e=parseInt(e,10)),r===`string`&&(t=parseInt(t,10)),e-t;if($bm_isInstanceOfArray(e)&&isNumerable(r,t))return e=e.slice(0),e[0]-=t,e;if(isNumerable(n,e)&&$bm_isInstanceOfArray(t))return t=t.slice(0),t[0]=e-t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var i=0,a=e.length,o=t.length,c=[];i<a||i<o;)(typeof e[i]==`number`||e[i]instanceof Number)&&(typeof t[i]==`number`||t[i]instanceof Number)?c[i]=e[i]-t[i]:c[i]=t[i]===void 0?e[i]:e[i]||t[i],i+=1;return c}return 0}function mul(e,t){var n=_typeof$1(e),r=_typeof$1(t),i;if(isNumerable(n,e)&&isNumerable(r,t))return e*t;var a,o;if($bm_isInstanceOfArray(e)&&isNumerable(r,t)){for(o=e.length,i=createTypedArray(`float32`,o),a=0;a<o;a+=1)i[a]=e[a]*t;return i}if(isNumerable(n,e)&&$bm_isInstanceOfArray(t)){for(o=t.length,i=createTypedArray(`float32`,o),a=0;a<o;a+=1)i[a]=e*t[a];return i}return 0}function div(e,t){var n=_typeof$1(e),r=_typeof$1(t),i;if(isNumerable(n,e)&&isNumerable(r,t))return e/t;var a,o;if($bm_isInstanceOfArray(e)&&isNumerable(r,t)){for(o=e.length,i=createTypedArray(`float32`,o),a=0;a<o;a+=1)i[a]=e[a]/t;return i}if(isNumerable(n,e)&&$bm_isInstanceOfArray(t)){for(o=t.length,i=createTypedArray(`float32`,o),a=0;a<o;a+=1)i[a]=e/t[a];return i}return 0}function mod(e,t){return typeof e==`string`&&(e=parseInt(e,10)),typeof t==`string`&&(t=parseInt(t,10)),e%t}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(e,t,n){if(t>n){var r=n;n=t,t=r}return Math.min(Math.max(e,t),n)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if(typeof e==`number`||e instanceof Number)return t||=0,Math.abs(e-t);t||=helperLengthArray;var n,r=Math.min(e.length,t.length),i=0;for(n=0;n<r;n+=1)i+=Math.pow(t[n]-e[n],2);return Math.sqrt(i)}function normalize(e){return div(e,length(e))}function rgbToHsl(e){var t=e[0],n=e[1],r=e[2],i=Math.max(t,n,r),a=Math.min(t,n,r),o,c,u=(i+a)/2;if(i===a)o=0,c=0;else{var K=i-a;switch(c=u>.5?K/(2-i-a):K/(i+a),i){case t:o=(n-r)/K+(n<r?6:0);break;case n:o=(r-t)/K+2;break;case r:o=(t-n)/K+4}o/=6}return[o,c,u,e[3]]}function hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslToRgb(e){var t=e[0],n=e[1],r=e[2],i,a,o;if(n===0)i=r,o=r,a=r;else{var c=r<.5?r*(1+n):r+n-r*n,u=2*r-c;i=hue2rgb(u,c,t+1/3),a=hue2rgb(u,c,t),o=hue2rgb(u,c,t-1/3)}return[i,a,o,e[3]]}function linear(e,t,n,r,i){if((r===void 0||i===void 0)&&(r=t,i=n,t=0,n=1),n<t){var a=n;n=t,t=a}if(e<=t)return r;if(e>=n)return i;var o=n===t?0:(e-t)/(n-t);if(!r.length)return r+(i-r)*o;var c,u=r.length,K=createTypedArray(`float32`,u);for(c=0;c<u;c+=1)K[c]=r[c]+(i[c]-r[c])*o;return K}function random(e,t){if(t===void 0&&(e===void 0?(e=0,t=1):(t=e,e=void 0)),t.length){var n,r=t.length;e||=createTypedArray(`float32`,r);var i=createTypedArray(`float32`,r),a=BMMath.random();for(n=0;n<r;n+=1)i[n]=e[n]+a*(t[n]-e[n]);return i}e===void 0&&(e=0);var o=BMMath.random();return e+o*(t-e)}function createPath(e,t,n,r){var i,a=e.length,o=shapePool.newElement();o.setPathData(!!r,a);var c=[0,0],u,K;for(i=0;i<a;i+=1)u=t&&t[i]?t[i]:c,K=n&&n[i]?n[i]:c,o.setTripleAt(e[i][0],e[i][1],K[0]+e[i][0],K[1]+e[i][1],u[0]+e[i][0],u[1]+e[i][1],i,!0);return o}function initiateExpression(elem,data,property){function noOp(e){return e}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf(`random`)!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty._name=elem.data.nm,thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval(`[function _expression_function(){`+val+`;scoped_bm_rt=$bm_rt}]`)[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=function(e,t){var n,r,i=this.pv.length?this.pv.length:1,a=createTypedArray(`float32`,i);e=5;var o=Math.floor(time*e);for(n=0,r=0;n<o;){for(r=0;r<i;r+=1)a[r]+=-t+t*2*BMMath.random();n+=1}var c=time*e,u=c-Math.floor(c),K=createTypedArray(`float32`,i);if(i>1){for(r=0;r<i;r+=1)K[r]=this.pv[r]+a[r]+(-t+t*2*BMMath.random())*u;return K}return this.pv+a[0]+(-t+t*2*BMMath.random())*u}.bind(this);thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty));function loopInDuration(e,t){return loopIn(e,t,!0)}function loopOutDuration(e,t){return loopOut(e,t,!0)}this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);function lookAt(e,t){var n=[t[0]-e[0],t[1]-e[1],t[2]-e[2]],r=Math.atan2(n[0],Math.sqrt(n[1]*n[1]+n[2]*n[2]))/degToRads;return[-Math.atan2(n[1],n[2])/degToRads,r,0]}function easeOut(e,t,n,r,i){return applyEase(easeOutBez,e,t,n,r,i)}function easeIn(e,t,n,r,i){return applyEase(easeInBez,e,t,n,r,i)}function ease(e,t,n,r,i){return applyEase(easeInOutBez,e,t,n,r,i)}function applyEase(e,t,n,r,i,a){i===void 0?(i=n,a=r):t=(t-n)/(r-n),t>1?t=1:t<0&&(t=0);var o=e(t);if($bm_isInstanceOfArray(i)){var c,u=i.length,K=createTypedArray(`float32`,u);for(c=0;c<u;c+=1)K[c]=(a[c]-i[c])*o+i[c];return K}return(a-i)*o+i}function nearestKey(e){var t,n=data.k.length,r,i;if(!data.k.length||typeof data.k[0]==`number`)r=0,i=0;else if(r=-1,e*=elem.comp.globalData.frameRate,e<data.k[0].t)r=1,i=data.k[0].t;else{for(t=0;t<n-1;t+=1)if(e===data.k[t].t){r=t+1,i=data.k[t].t;break}else if(e>data.k[t].t&&e<data.k[t+1].t){e-data.k[t].t>data.k[t+1].t-e?(r=t+2,i=data.k[t+1].t):(r=t+1,i=data.k[t].t);break}r===-1&&(r=t+1,i=data.k[t].t)}var a={};return a.index=r,a.time=i/elem.comp.globalData.frameRate,a}function key(e){var t,n,r;if(!data.k.length||typeof data.k[0]==`number`)throw Error(`The property has no keyframe at index `+e);--e,t={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]};var i=Object.prototype.hasOwnProperty.call(data.k[e],`s`)?data.k[e].s:data.k[e-1].e;for(r=i.length,n=0;n<r;n+=1)t[n]=i[n],t.value[n]=i[n];return t}function framesToTime(e,t){return t||=elem.comp.globalData.frameRate,e/t}function timeToFrames(e,t){return!e&&e!==0&&(e=time),t||=elem.comp.globalData.frameRate,e*t}function seedRandom(e){BMMath.seedrandom(randSeed+e)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(e,t){return typeof value==`string`?t===void 0?value.substring(e):value.substring(e,t):``}function substr(e,t){return typeof value==`string`?t===void 0?value.substr(e):value.substr(e,t):``}function posterizeTime(e){time=e===0?0:Math.floor(time*e)/e,value=valueAtTime(time)}var time,velocity,value,text,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!!(elem.hierarchy&&elem.hierarchy.length),parent,randSeed=Math.floor(Math.random()*1e6),globalData=elem.globalData;function executeExpression(e){return value=e,this.frameExpressionId===elem.globalData.frameId&&this.propType!==`textSelector`?value:(this.propType===`textSelector`&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface(`ADBE Transform Group`),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),elemType===4&&!content&&(content=thisLayer(`ADBE Root Vectors Group`)),effect||=thisLayer(4),hasParent=!!(elem.hierarchy&&elem.hierarchy.length),hasParent&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt,scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var e={};e.initExpressions=t,e.resetFrame=ExpressionManager.resetFrame;function t(e){var t=0,n=[];function r(){t+=1}function i(){--t,t===0&&o()}function a(e){n.indexOf(e)===-1&&n.push(e)}function o(){var e,t=n.length;for(e=0;e<t;e+=1)n[e].release();n.length=0}e.renderer.compInterface=CompExpressionInterface(e.renderer),e.renderer.globalData.projectInterface.registerComposition(e.renderer),e.renderer.globalData.pushExpression=r,e.renderer.globalData.popExpression=i,e.renderer.globalData.registerExpressionProperty=a}return e}(),MaskManagerInterface=function(){function e(e,t){this._mask=e,this._data=t}return Object.defineProperty(e.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(e.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),this._mask.op.v*100}}),function(t){var n=createSizedArray(t.viewData.length),r,i=t.viewData.length;for(r=0;r<i;r+=1)n[r]=new e(t.viewData[r],t.masksProperties[r]);return function(e){for(r=0;r<i;){if(t.masksProperties[r].nm===e)return n[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var e={pv:0,v:0,mult:1},t={pv:[0,0,0],v:[0,0,0],mult:1};function n(e,t,n){Object.defineProperty(e,"velocity",{get:function(){return t.getVelocityAtTime(t.comp.currentFrame)}}),e.numKeys=t.keyframes?t.keyframes.length:0,e.key=function(r){if(!e.numKeys)return 0;var i=``;i=`s`in t.keyframes[r-1]?t.keyframes[r-1].s:`e`in t.keyframes[r-2]?t.keyframes[r-2].e:t.keyframes[r-2].s;var a=n===`unidimensional`?new Number(i):Object.assign({},i);return a.time=t.keyframes[r-1].t/t.elem.comp.globalData.frameRate,a.value=n===`unidimensional`?i[0]:i,a},e.valueAtTime=t.getValueAtTime,e.speedAtTime=t.getSpeedAtTime,e.velocityAtTime=t.getVelocityAtTime,e.propertyGroup=t.propertyGroup}function r(t){(!t||!(`pv`in t))&&(t=e);var r=1/t.mult,i=t.pv*r,a=new Number(i);return a.value=i,n(a,t,`unidimensional`),function(){return t.k&&t.getValue(),i=t.v*r,a.value!==i&&(a=new Number(i),a.value=i,a[0]=i,n(a,t,`unidimensional`)),a}}function i(e){(!e||!(`pv`in e))&&(e=t);var r=1/e.mult,i=e.data&&e.data.l||e.pv.length,a=createTypedArray(`float32`,i),o=createTypedArray(`float32`,i);return a.value=o,n(a,e,`multidimensional`),function(){e.k&&e.getValue();for(var t=0;t<i;t+=1)o[t]=e.v[t]*r,a[t]=o[t];return a}}function a(){return e}return function(e){return e?e.propType===`unidimensional`?r(e):i(e):a}}(),TransformExpressionInterface=function(){return function(e){function t(e){switch(e){case`scale`:case`Scale`:case`ADBE Scale`:case 6:return t.scale;case`rotation`:case`Rotation`:case`ADBE Rotation`:case`ADBE Rotate Z`:case 10:return t.rotation;case`ADBE Rotate X`:return t.xRotation;case`ADBE Rotate Y`:return t.yRotation;case`position`:case`Position`:case`ADBE Position`:case 2:return t.position;case`ADBE Position_0`:return t.xPosition;case`ADBE Position_1`:return t.yPosition;case`ADBE Position_2`:return t.zPosition;case`anchorPoint`:case`AnchorPoint`:case`Anchor Point`:case`ADBE AnchorPoint`:case 1:return t.anchorPoint;case`opacity`:case`Opacity`:case 11:return t.opacity;default:return null}}Object.defineProperty(t,"rotation",{get:ExpressionPropertyInterface(e.r||e.rz)}),Object.defineProperty(t,"zRotation",{get:ExpressionPropertyInterface(e.rz||e.r)}),Object.defineProperty(t,"xRotation",{get:ExpressionPropertyInterface(e.rx)}),Object.defineProperty(t,"yRotation",{get:ExpressionPropertyInterface(e.ry)}),Object.defineProperty(t,"scale",{get:ExpressionPropertyInterface(e.s)});var n,r,i,a;return e.p?a=ExpressionPropertyInterface(e.p):(n=ExpressionPropertyInterface(e.px),r=ExpressionPropertyInterface(e.py),e.pz&&(i=ExpressionPropertyInterface(e.pz))),Object.defineProperty(t,"position",{get:function(){return e.p?a():[n(),r(),i?i():0]}}),Object.defineProperty(t,"xPosition",{get:ExpressionPropertyInterface(e.px)}),Object.defineProperty(t,"yPosition",{get:ExpressionPropertyInterface(e.py)}),Object.defineProperty(t,"zPosition",{get:ExpressionPropertyInterface(e.pz)}),Object.defineProperty(t,"anchorPoint",{get:ExpressionPropertyInterface(e.a)}),Object.defineProperty(t,"opacity",{get:ExpressionPropertyInterface(e.o)}),Object.defineProperty(t,"skew",{get:ExpressionPropertyInterface(e.sk)}),Object.defineProperty(t,"skewAxis",{get:ExpressionPropertyInterface(e.sa)}),Object.defineProperty(t,"orientation",{get:ExpressionPropertyInterface(e.or)}),t}}(),LayerExpressionInterface=function(){function e(e){var t=new Matrix;return e===void 0?this._elem.finalTransform.mProp.applyToMatrix(t):this._elem.finalTransform.mProp.getValueAtTime(e).clone(t),t}function t(e,t){var n=this.getMatrix(t);return n.props[12]=0,n.props[13]=0,n.props[14]=0,this.applyPoint(n,e)}function n(e,t){var n=this.getMatrix(t);return this.applyPoint(n,e)}function r(e,t){var n=this.getMatrix(t);return n.props[12]=0,n.props[13]=0,n.props[14]=0,this.invertPoint(n,e)}function i(e,t){var n=this.getMatrix(t);return this.invertPoint(n,e)}function a(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var n,r=this._elem.hierarchy.length;for(n=0;n<r;n+=1)this._elem.hierarchy[n].finalTransform.mProp.applyToMatrix(e)}return e.applyToPointArray(t[0],t[1],t[2]||0)}function o(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var n,r=this._elem.hierarchy.length;for(n=0;n<r;n+=1)this._elem.hierarchy[n].finalTransform.mProp.applyToMatrix(e)}return e.inversePoint(t)}function c(e){var t=new Matrix;if(t.reset(),this._elem.finalTransform.mProp.applyToMatrix(t),this._elem.hierarchy&&this._elem.hierarchy.length){var n,r=this._elem.hierarchy.length;for(n=0;n<r;n+=1)this._elem.hierarchy[n].finalTransform.mProp.applyToMatrix(t);return t.inversePoint(e)}return t.inversePoint(e)}function u(){return[1,1,1,1]}return function(K){var Y;function X(e){te.mask=new MaskManagerInterface(e,K)}function ee(e){te.effect=e}function te(e){switch(e){case`ADBE Root Vectors Group`:case`Contents`:case 2:return te.shapeInterface;case 1:case 6:case`Transform`:case`transform`:case`ADBE Transform Group`:return Y;case 4:case`ADBE Effect Parade`:case`effects`:case`Effects`:return te.effect;case`ADBE Text Properties`:return te.textInterface;default:return null}}te.getMatrix=e,te.invertPoint=o,te.applyPoint=a,te.toWorld=n,te.toWorldVec=t,te.fromWorld=i,te.fromWorldVec=r,te.toComp=n,te.fromComp=c,te.sampleImage=u,te.sourceRectAtTime=K.sourceRectAtTime.bind(K),te._elem=K,Y=TransformExpressionInterface(K.finalTransform.mProp);var ce=getDescriptor(Y,`anchorPoint`);return Object.defineProperties(te,{hasParent:{get:function(){return K.hierarchy.length}},parent:{get:function(){return K.hierarchy[0].layerInterface}},rotation:getDescriptor(Y,`rotation`),scale:getDescriptor(Y,`scale`),position:getDescriptor(Y,`position`),opacity:getDescriptor(Y,`opacity`),anchorPoint:ce,anchor_point:ce,transform:{get:function(){return Y}},active:{get:function(){return K.isInRange}}}),te.startTime=K.data.st,te.index=K.data.ind,te.source=K.data.refId,te.height=K.data.ty===0?K.data.h:100,te.width=K.data.ty===0?K.data.w:100,te.inPoint=K.data.ip/K.comp.globalData.frameRate,te.outPoint=K.data.op/K.comp.globalData.frameRate,te._name=K.data.nm,te.registerMaskInterface=X,te.registerEffectsInterface=ee,te}}(),propertyGroupFactory=function(){return function(e,t){return function(n){return n=n===void 0?1:n,n<=0?e:t(n-1)}}}(),PropertyInterface=function(){return function(e,t){var n={_name:e};function r(e){return e=e===void 0?1:e,e<=0?n:t(e-1)}return r}}(),EffectsExpressionInterface=function(){var e={createEffectsInterface:t};function t(e,t){if(e.effectsManager){var r=[],i=e.data.ef,a,o=e.effectsManager.effectElements.length;for(a=0;a<o;a+=1)r.push(n(i[a],e.effectsManager.effectElements[a],t,e));var c=e.data.ef||[],u=function(e){for(a=0,o=c.length;a<o;){if(e===c[a].nm||e===c[a].mn||e===c[a].ix)return r[a];a+=1}return null};return Object.defineProperty(u,"numProperties",{get:function(){return c.length}}),u}return null}function n(e,t,i,a){function o(t){for(var n=e.ef,r=0,i=n.length;r<i;){if(t===n[r].nm||t===n[r].mn||t===n[r].ix)return n[r].ty===5?u[r]:u[r]();r+=1}throw Error()}var c=propertyGroupFactory(o,i),u=[],K,Y=e.ef.length;for(K=0;K<Y;K+=1)e.ef[K].ty===5?u.push(n(e.ef[K],t.effectElements[K],t.effectElements[K].propertyGroup,a)):u.push(r(t.effectElements[K],e.ef[K].ty,a,c));return e.mn===`ADBE Color Control`&&Object.defineProperty(o,"color",{get:function(){return u[0]()}}),Object.defineProperties(o,{numProperties:{get:function(){return e.np}},_name:{value:e.nm},propertyGroup:{value:c}}),o.enabled=e.en!==0,o.active=o.enabled,o}function r(e,t,n,r){var i=ExpressionPropertyInterface(e.p);function a(){return t===10?n.comp.compInterface(e.p.v):i()}return e.p.setGroupProperty&&e.p.setGroupProperty(PropertyInterface(``,r)),a}return e}(),ShapePathInterface=function(){return function(e,t,n){var r=t.sh;function i(e){return e===`Shape`||e===`shape`||e===`Path`||e===`path`||e===`ADBE Vector Shape`||e===2?i.path:null}var a=propertyGroupFactory(i,n);return r.setGroupProperty(PropertyInterface(`Path`,a)),Object.defineProperties(i,{path:{get:function(){return r.k&&r.getValue(),r}},shape:{get:function(){return r.k&&r.getValue(),r}},_name:{value:e.nm},ix:{value:e.ix},propertyIndex:{value:e.ix},mn:{value:e.mn},propertyGroup:{value:n}}),i}}(),ShapeExpressionInterface=function(){function e(e,t,u){var ce=[],ue,de=e?e.length:0;for(ue=0;ue<de;ue+=1)e[ue].ty===`gr`?ce.push(n(e[ue],t[ue],u)):e[ue].ty===`fl`?ce.push(r(e[ue],t[ue],u)):e[ue].ty===`st`?ce.push(o(e[ue],t[ue],u)):e[ue].ty===`tm`?ce.push(c(e[ue],t[ue],u)):e[ue].ty===`tr`||(e[ue].ty===`el`?ce.push(K(e[ue],t[ue],u)):e[ue].ty===`sr`?ce.push(Y(e[ue],t[ue],u)):e[ue].ty===`sh`?ce.push(ShapePathInterface(e[ue],t[ue],u)):e[ue].ty===`rc`?ce.push(X(e[ue],t[ue],u)):e[ue].ty===`rd`?ce.push(ee(e[ue],t[ue],u)):e[ue].ty===`rp`?ce.push(te(e[ue],t[ue],u)):e[ue].ty===`gf`?ce.push(i(e[ue],t[ue],u)):ce.push(a(e[ue],t[ue],u)));return ce}function t(t,n,r){var i,a=function(e){for(var t=0,n=i.length;t<n;){if(i[t]._name===e||i[t].mn===e||i[t].propertyIndex===e||i[t].ix===e||i[t].ind===e)return i[t];t+=1}return typeof e==`number`?i[e-1]:null};return a.propertyGroup=propertyGroupFactory(a,r),i=e(t.it,n.it,a.propertyGroup),a.numProperties=i.length,a.transform=u(t.it[t.it.length-1],n.it[n.it.length-1],a.propertyGroup),a.propertyIndex=t.cix,a._name=t.nm,a}function n(e,n,r){var i=function(e){switch(e){case`ADBE Vectors Group`:case`Contents`:case 2:return i.content;default:return i.transform}};i.propertyGroup=propertyGroupFactory(i,r);var a=t(e,n,i.propertyGroup),o=u(e.it[e.it.length-1],n.it[n.it.length-1],i.propertyGroup);return i.content=a,i.transform=o,Object.defineProperty(i,"_name",{get:function(){return e.nm}}),i.numProperties=e.np,i.propertyIndex=e.ix,i.nm=e.nm,i.mn=e.mn,i}function r(e,t,n){function r(e){return e===`Color`||e===`color`?r.color:e===`Opacity`||e===`opacity`?r.opacity:null}return Object.defineProperties(r,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface(`Color`,n)),t.o.setGroupProperty(PropertyInterface(`Opacity`,n)),r}function i(e,t,n){function r(e){return e===`Start Point`||e===`start point`?r.startPoint:e===`End Point`||e===`end point`?r.endPoint:e===`Opacity`||e===`opacity`?r.opacity:null}return Object.defineProperties(r,{startPoint:{get:ExpressionPropertyInterface(t.s)},endPoint:{get:ExpressionPropertyInterface(t.e)},opacity:{get:ExpressionPropertyInterface(t.o)},type:{get:function(){return`a`}},_name:{value:e.nm},mn:{value:e.mn}}),t.s.setGroupProperty(PropertyInterface(`Start Point`,n)),t.e.setGroupProperty(PropertyInterface(`End Point`,n)),t.o.setGroupProperty(PropertyInterface(`Opacity`,n)),r}function a(){function e(){return null}return e}function o(e,t,n){var r=propertyGroupFactory(K,n),i=propertyGroupFactory(u,r);function a(n){Object.defineProperty(u,e.d[n].nm,{get:ExpressionPropertyInterface(t.d.dataProps[n].p)})}var o,c=e.d?e.d.length:0,u={};for(o=0;o<c;o+=1)a(o),t.d.dataProps[o].p.setGroupProperty(i);function K(e){return e===`Color`||e===`color`?K.color:e===`Opacity`||e===`opacity`?K.opacity:e===`Stroke Width`||e===`stroke width`?K.strokeWidth:null}return Object.defineProperties(K,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},strokeWidth:{get:ExpressionPropertyInterface(t.w)},dash:{get:function(){return u}},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface(`Color`,r)),t.o.setGroupProperty(PropertyInterface(`Opacity`,r)),t.w.setGroupProperty(PropertyInterface(`Stroke Width`,r)),K}function c(e,t,n){function r(t){return t===e.e.ix||t===`End`||t===`end`?r.end:t===e.s.ix?r.start:t===e.o.ix?r.offset:null}var i=propertyGroupFactory(r,n);return r.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface(`Start`,i)),t.e.setGroupProperty(PropertyInterface(`End`,i)),t.o.setGroupProperty(PropertyInterface(`Offset`,i)),r.propertyIndex=e.ix,r.propertyGroup=n,Object.defineProperties(r,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),r.mn=e.mn,r}function u(e,t,n){function r(t){return e.a.ix===t||t===`Anchor Point`?r.anchorPoint:e.o.ix===t||t===`Opacity`?r.opacity:e.p.ix===t||t===`Position`?r.position:e.r.ix===t||t===`Rotation`||t===`ADBE Vector Rotation`?r.rotation:e.s.ix===t||t===`Scale`?r.scale:e.sk&&e.sk.ix===t||t===`Skew`?r.skew:e.sa&&e.sa.ix===t||t===`Skew Axis`?r.skewAxis:null}var i=propertyGroupFactory(r,n);return t.transform.mProps.o.setGroupProperty(PropertyInterface(`Opacity`,i)),t.transform.mProps.p.setGroupProperty(PropertyInterface(`Position`,i)),t.transform.mProps.a.setGroupProperty(PropertyInterface(`Anchor Point`,i)),t.transform.mProps.s.setGroupProperty(PropertyInterface(`Scale`,i)),t.transform.mProps.r.setGroupProperty(PropertyInterface(`Rotation`,i)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface(`Skew`,i)),t.transform.mProps.sa.setGroupProperty(PropertyInterface(`Skew Angle`,i))),t.transform.op.setGroupProperty(PropertyInterface(`Opacity`,i)),Object.defineProperties(r,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),r.ty=`tr`,r.mn=e.mn,r.propertyGroup=n,r}function K(e,t,n){function r(t){return e.p.ix===t?r.position:e.s.ix===t?r.size:null}var i=propertyGroupFactory(r,n);r.propertyIndex=e.ix;var a=t.sh.ty===`tm`?t.sh.prop:t.sh;return a.s.setGroupProperty(PropertyInterface(`Size`,i)),a.p.setGroupProperty(PropertyInterface(`Position`,i)),Object.defineProperties(r,{size:{get:ExpressionPropertyInterface(a.s)},position:{get:ExpressionPropertyInterface(a.p)},_name:{value:e.nm}}),r.mn=e.mn,r}function Y(e,t,n){function r(t){return e.p.ix===t?r.position:e.r.ix===t?r.rotation:e.pt.ix===t?r.points:e.or.ix===t||t===`ADBE Vector Star Outer Radius`?r.outerRadius:e.os.ix===t?r.outerRoundness:e.ir&&(e.ir.ix===t||t===`ADBE Vector Star Inner Radius`)?r.innerRadius:e.is&&e.is.ix===t?r.innerRoundness:null}var i=propertyGroupFactory(r,n),a=t.sh.ty===`tm`?t.sh.prop:t.sh;return r.propertyIndex=e.ix,a.or.setGroupProperty(PropertyInterface(`Outer Radius`,i)),a.os.setGroupProperty(PropertyInterface(`Outer Roundness`,i)),a.pt.setGroupProperty(PropertyInterface(`Points`,i)),a.p.setGroupProperty(PropertyInterface(`Position`,i)),a.r.setGroupProperty(PropertyInterface(`Rotation`,i)),e.ir&&(a.ir.setGroupProperty(PropertyInterface(`Inner Radius`,i)),a.is.setGroupProperty(PropertyInterface(`Inner Roundness`,i))),Object.defineProperties(r,{position:{get:ExpressionPropertyInterface(a.p)},rotation:{get:ExpressionPropertyInterface(a.r)},points:{get:ExpressionPropertyInterface(a.pt)},outerRadius:{get:ExpressionPropertyInterface(a.or)},outerRoundness:{get:ExpressionPropertyInterface(a.os)},innerRadius:{get:ExpressionPropertyInterface(a.ir)},innerRoundness:{get:ExpressionPropertyInterface(a.is)},_name:{value:e.nm}}),r.mn=e.mn,r}function X(e,t,n){function r(t){return e.p.ix===t?r.position:e.r.ix===t?r.roundness:e.s.ix===t||t===`Size`||t===`ADBE Vector Rect Size`?r.size:null}var i=propertyGroupFactory(r,n),a=t.sh.ty===`tm`?t.sh.prop:t.sh;return r.propertyIndex=e.ix,a.p.setGroupProperty(PropertyInterface(`Position`,i)),a.s.setGroupProperty(PropertyInterface(`Size`,i)),a.r.setGroupProperty(PropertyInterface(`Rotation`,i)),Object.defineProperties(r,{position:{get:ExpressionPropertyInterface(a.p)},roundness:{get:ExpressionPropertyInterface(a.r)},size:{get:ExpressionPropertyInterface(a.s)},_name:{value:e.nm}}),r.mn=e.mn,r}function ee(e,t,n){function r(t){return e.r.ix===t||t===`Round Corners 1`?r.radius:null}var i=propertyGroupFactory(r,n),a=t;return r.propertyIndex=e.ix,a.rd.setGroupProperty(PropertyInterface(`Radius`,i)),Object.defineProperties(r,{radius:{get:ExpressionPropertyInterface(a.rd)},_name:{value:e.nm}}),r.mn=e.mn,r}function te(e,t,n){function r(t){return e.c.ix===t||t===`Copies`?r.copies:e.o.ix===t||t===`Offset`?r.offset:null}var i=propertyGroupFactory(r,n),a=t;return r.propertyIndex=e.ix,a.c.setGroupProperty(PropertyInterface(`Copies`,i)),a.o.setGroupProperty(PropertyInterface(`Offset`,i)),Object.defineProperties(r,{copies:{get:ExpressionPropertyInterface(a.c)},offset:{get:ExpressionPropertyInterface(a.o)},_name:{value:e.nm}}),r.mn=e.mn,r}return function(t,n,r){var i;function a(e){if(typeof e==`number`)return e=e===void 0?1:e,e===0?r:i[e-1];for(var t=0,n=i.length;t<n;){if(i[t]._name===e)return i[t];t+=1}return null}function o(){return r}return a.propertyGroup=propertyGroupFactory(a,o),i=e(t,n,a.propertyGroup),a.numProperties=i.length,a._name=`Contents`,a}}(),TextExpressionInterface=function(){return function(e){var t;function n(e){switch(e){case`ADBE Text Document`:return n.sourceText;default:return null}}return Object.defineProperty(n,"sourceText",{get:function(){e.textProperty.getValue();var n=e.textProperty.currentData.t;return(!t||n!==t.value)&&(t=new String(n),t.value=n||new String(n),Object.defineProperty(t,"style",{get:function(){return{fillColor:e.textProperty.currentData.fc}}})),t}}),n}}();function _typeof(e){"@babel/helpers - typeof";return _typeof=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},_typeof(e)}var FootageInterface=function(){var e=function(e){var t=``,n=e.getFootageData();function r(){return t=``,n=e.getFootageData(),i}function i(e){if(n[e])return t=e,n=n[e],_typeof(n)===`object`?i:n;var r=e.indexOf(t);if(r!==-1){var a=parseInt(e.substr(r+t.length),10);return n=n[a],_typeof(n)===`object`?i:n}return``}return r},t=function(t){function n(e){return e===`Outline`?n.outlineInterface():null}return n._name=`Outline`,n.outlineInterface=e(t),n};return function(e){function n(e){return e===`Data`?n.dataInterface:null}return n._name=`Data`,n.dataInterface=t(e),n}}(),interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(e){return interfaces[e]||null}var expressionHelpers=function(){function e(e,t,n){t.x&&(n.k=!0,n.x=!0,n.initiateExpression=ExpressionManager.initiateExpression,n.effectsSequence.push(n.initiateExpression(e,t,n).bind(n)))}function t(e){return e*=this.elem.globalData.frameRate,e-=this.offsetTime,e!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<e?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(e,this._cachingAtTime),this._cachingAtTime.lastFrame=e),this._cachingAtTime.value}function n(e){var t=-.01,n=this.getValueAtTime(e),r=this.getValueAtTime(e+t),i=0;if(n.length){for(var a=0;a<n.length;a+=1)i+=(r[a]-n[a])**2;i=Math.sqrt(i)*100}else i=0;return i}function r(e){if(this.vel!==void 0)return this.vel;var t=-.001,n=this.getValueAtTime(e),r=this.getValueAtTime(e+t),i;if(n.length){i=createTypedArray(`float32`,n.length);for(var a=0;a<n.length;a+=1)i[a]=(r[a]-n[a])/t}else i=(r-n)/t;return i}function i(){return this.pv}function a(e){this.propertyGroup=e}return{searchExpressions:e,getSpeedAtTime:n,getVelocityAtTime:r,getValueAtTime:t,getStaticValueAtTime:i,setGroupProperty:a}}();function addPropertyDecorator(){function e(e,t,n){if(!this.k||!this.keyframes)return this.pv;e=e?e.toLowerCase():``;var r=this.comp.renderedFrame,i=this.keyframes,a=i[i.length-1].t;if(r<=a)return this.pv;var o,c;n?(o=t?Math.abs(a-this.elem.comp.globalData.frameRate*t):Math.max(0,a-this.elem.data.ip),c=a-o):((!t||t>i.length-1)&&(t=i.length-1),c=i[i.length-1-t].t,o=a-c);var u,K,Y;if(e===`pingpong`){if(Math.floor((r-c)/o)%2!=0)return this.getValueAtTime((o-(r-c)%o+c)/this.comp.globalData.frameRate,0)}else if(e===`offset`){var X=this.getValueAtTime(c/this.comp.globalData.frameRate,0),ee=this.getValueAtTime(a/this.comp.globalData.frameRate,0),te=this.getValueAtTime(((r-c)%o+c)/this.comp.globalData.frameRate,0),ce=Math.floor((r-c)/o);if(this.pv.length){for(Y=Array(X.length),K=Y.length,u=0;u<K;u+=1)Y[u]=(ee[u]-X[u])*ce+te[u];return Y}return(ee-X)*ce+te}else if(e===`continue`){var ue=this.getValueAtTime(a/this.comp.globalData.frameRate,0),de=this.getValueAtTime((a-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(Y=Array(ue.length),K=Y.length,u=0;u<K;u+=1)Y[u]=ue[u]+(ue[u]-de[u])*((r-a)/this.comp.globalData.frameRate)/5e-4;return Y}return ue+(ue-de)*((r-a)/.001)}return this.getValueAtTime(((r-c)%o+c)/this.comp.globalData.frameRate,0)}function t(e,t,n){if(!this.k)return this.pv;e=e?e.toLowerCase():``;var r=this.comp.renderedFrame,i=this.keyframes,a=i[0].t;if(r>=a)return this.pv;var o,c;n?(o=t?Math.abs(this.elem.comp.globalData.frameRate*t):Math.max(0,this.elem.data.op-a),c=a+o):((!t||t>i.length-1)&&(t=i.length-1),c=i[t].t,o=c-a);var u,K,Y;if(e===`pingpong`){if(Math.floor((a-r)/o)%2==0)return this.getValueAtTime(((a-r)%o+a)/this.comp.globalData.frameRate,0)}else if(e===`offset`){var X=this.getValueAtTime(a/this.comp.globalData.frameRate,0),ee=this.getValueAtTime(c/this.comp.globalData.frameRate,0),te=this.getValueAtTime((o-(a-r)%o+a)/this.comp.globalData.frameRate,0),ce=Math.floor((a-r)/o)+1;if(this.pv.length){for(Y=Array(X.length),K=Y.length,u=0;u<K;u+=1)Y[u]=te[u]-(ee[u]-X[u])*ce;return Y}return te-(ee-X)*ce}else if(e===`continue`){var ue=this.getValueAtTime(a/this.comp.globalData.frameRate,0),de=this.getValueAtTime((a+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(Y=Array(ue.length),K=Y.length,u=0;u<K;u+=1)Y[u]=ue[u]+(ue[u]-de[u])*(a-r)/.001;return Y}return ue+(ue-de)*(a-r)/.001}return this.getValueAtTime((o-((a-r)%o+a))/this.comp.globalData.frameRate,0)}function n(e,t){if(!this.k||(e=(e||.4)*.5,t=Math.floor(t||5),t<=1))return this.pv;for(var n=this.comp.renderedFrame/this.comp.globalData.frameRate,r=n-e,i=n+e,a=t>1?(i-r)/(t-1):1,o=0,c=0,u=this.pv.length?createTypedArray(`float32`,this.pv.length):0,K;o<t;){if(K=this.getValueAtTime(r+o*a),this.pv.length)for(c=0;c<this.pv.length;c+=1)u[c]+=K[c];else u+=K;o+=1}if(this.pv.length)for(c=0;c<this.pv.length;c+=1)u[c]/=t;else u/=t;return u}function r(e){this._transformCachingAtTime||={v:new Matrix};var t=this._transformCachingAtTime.v;if(t.cloneFromProps(this.pre.props),this.appliedTransformations<1){var n=this.a.getValueAtTime(e);t.translate(-n[0]*this.a.mult,-n[1]*this.a.mult,n[2]*this.a.mult)}if(this.appliedTransformations<2){var r=this.s.getValueAtTime(e);t.scale(r[0]*this.s.mult,r[1]*this.s.mult,r[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var i=this.sk.getValueAtTime(e),a=this.sa.getValueAtTime(e);t.skewFromAxis(-i*this.sk.mult,a*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var o=this.r.getValueAtTime(e);t.rotate(-o*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var c=this.rz.getValueAtTime(e),u=this.ry.getValueAtTime(e),K=this.rx.getValueAtTime(e),Y=this.or.getValueAtTime(e);t.rotateZ(-c*this.rz.mult).rotateY(u*this.ry.mult).rotateX(K*this.rx.mult).rotateZ(-Y[2]*this.or.mult).rotateY(Y[1]*this.or.mult).rotateX(Y[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var X=this.px.getValueAtTime(e),ee=this.py.getValueAtTime(e);if(this.data.p.z){var te=this.pz.getValueAtTime(e);t.translate(X*this.px.mult,ee*this.py.mult,-te*this.pz.mult)}else t.translate(X*this.px.mult,ee*this.py.mult,0)}else{var ce=this.p.getValueAtTime(e);t.translate(ce[0]*this.p.mult,ce[1]*this.p.mult,-ce[2]*this.p.mult)}return t}function i(){return this.v.clone(new Matrix)}var a=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(e,t,n){var o=a(e,t,n);return o.getValueAtTime=o.dynamicProperties.length?r.bind(o):i.bind(o),o.setGroupProperty=expressionHelpers.setGroupProperty,o};var o=PropertyFactory.getProp;PropertyFactory.getProp=function(r,i,a,c,u){var K=o(r,i,a,c,u);K.getValueAtTime=K.kf?expressionHelpers.getValueAtTime.bind(K):expressionHelpers.getStaticValueAtTime.bind(K),K.setGroupProperty=expressionHelpers.setGroupProperty,K.loopOut=e,K.loopIn=t,K.smooth=n,K.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(K),K.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(K),K.numKeys=i.a===1?i.k.length:0,K.propertyIndex=i.ix;var Y=0;return a!==0&&(Y=createTypedArray(`float32`,i.a===1?i.k[0].s.length:i.k.length)),K._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:Y},expressionHelpers.searchExpressions(r,i,K),K.k&&u.addDynamicProperty(K),K};function c(e){return this._cachingAtTime||={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame},e*=this.elem.globalData.frameRate,e-=this.offsetTime,e!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<e?this._caching.lastIndex:0,this._cachingAtTime.lastTime=e,this.interpolateShape(e,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue}var u=ShapePropertyFactory.getConstructorFunction(),K=ShapePropertyFactory.getKeyframedConstructorFunction();function Y(){}Y.prototype={vertices:function(e,t){this.k&&this.getValue();var n=this.v;t!==void 0&&(n=this.getValueAtTime(t,0));var r,i=n._length,a=n[e],o=n.v,c=createSizedArray(i);for(r=0;r<i;r+=1)e===`i`||e===`o`?c[r]=[a[r][0]-o[r][0],a[r][1]-o[r][1]]:c[r]=[a[r][0],a[r][1]];return c},points:function(e){return this.vertices(`v`,e)},inTangents:function(e){return this.vertices(`i`,e)},outTangents:function(e){return this.vertices(`o`,e)},isClosed:function(){return this.v.c},pointOnPath:function(e,t){var n=this.v;t!==void 0&&(n=this.getValueAtTime(t,0)),this._segmentsLength||=bez.getSegmentsLength(n);for(var r=this._segmentsLength,i=r.lengths,a=r.totalLength*e,o=0,c=i.length,u=0,K;o<c;){if(u+i[o].addedLength>a){var Y=o,X=n.c&&o===c-1?0:o+1,ee=(a-u)/i[o].addedLength;K=bez.getPointInSegment(n.v[Y],n.v[X],n.o[Y],n.i[X],ee,i[o]);break}u+=i[o].addedLength,o+=1}return K||=n.c?[n.v[0][0],n.v[0][1]]:[n.v[n._length-1][0],n.v[n._length-1][1]],K},vectorOnPath:function(e,t,n){e==1?e=this.v.c:e==0&&(e=.999);var r=this.pointOnPath(e,t),i=this.pointOnPath(e+.001,t),a=i[0]-r[0],o=i[1]-r[1],c=Math.sqrt(a**2+o**2);return c===0?[0,0]:n===`tangent`?[a/c,o/c]:[-o/c,a/c]},tangentOnPath:function(e,t){return this.vectorOnPath(e,t,`tangent`)},normalOnPath:function(e,t){return this.vectorOnPath(e,t,`normal`)},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([Y],u),extendPrototype([Y],K),K.prototype.getValueAtTime=c,K.prototype.initiateExpression=ExpressionManager.initiateExpression;var X=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(e,t,n,r,i){var a=X(e,t,n,r,i);return a.propertyIndex=t.ix,a.lock=!1,n===3?expressionHelpers.searchExpressions(e,t.pt,a):n===4&&expressionHelpers.searchExpressions(e,t.ks,a),a.k&&e.addDynamicProperty(a),a}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function e(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(e,t){var n=this.calculateExpression(t);if(e.t!==n){var r={};return this.copyData(r,e),r.t=n.toString(),r.__complete=!1,r}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),t=this.searchExpressions();return this.kf=e||t,this.kf},TextProperty.prototype.searchExpressions=e}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function(e,t){var n=createNS(`feMerge`);n.setAttribute(`result`,e);for(var r,i=0;i<t.length;i+=1)r=createNS(`feMergeNode`),r.setAttribute(`in`,t[i]),n.appendChild(r),n.appendChild(r);return n}};var linearFilterValue=`0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0`;function SVGTintFilter(e,t,n,r,i){this.filterManager=t;var a=createNS(`feColorMatrix`);a.setAttribute(`type`,`matrix`),a.setAttribute(`color-interpolation-filters`,`linearRGB`),a.setAttribute(`values`,linearFilterValue+` 1 0`),this.linearFilter=a,a.setAttribute(`result`,r+`_tint_1`),e.appendChild(a),a=createNS(`feColorMatrix`),a.setAttribute(`type`,`matrix`),a.setAttribute(`color-interpolation-filters`,`sRGB`),a.setAttribute(`values`,`1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0`),a.setAttribute(`result`,r+`_tint_2`),e.appendChild(a),this.matrixFilter=a;var o=this.createMergeNode(r,[i,r+`_tint_1`,r+`_tint_2`]);e.appendChild(o)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,n=this.filterManager.effectElements[1].p.v,r=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute(`values`,linearFilterValue+` `+r+` 0`),this.matrixFilter.setAttribute(`values`,n[0]-t[0]+` 0 0 0 `+t[0]+` `+(n[1]-t[1])+` 0 0 0 `+t[1]+` `+(n[2]-t[2])+` 0 0 0 `+t[2]+` 0 0 0 1 0`)}};function SVGFillFilter(e,t,n,r){this.filterManager=t;var i=createNS(`feColorMatrix`);i.setAttribute(`type`,`matrix`),i.setAttribute(`color-interpolation-filters`,`sRGB`),i.setAttribute(`values`,`1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0`),i.setAttribute(`result`,r),e.appendChild(i),this.matrixFilter=i}SVGFillFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[2].p.v,n=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute(`values`,`0 0 0 0 `+t[0]+` 0 0 0 0 `+t[1]+` 0 0 0 0 `+t[2]+` 0 0 0 `+n+` 0`)}};function SVGStrokeEffect(e,t,n){this.initialized=!1,this.filterManager=t,this.elem=n,this.paths=[]}SVGStrokeEffect.prototype.initialize=function(){var e=this.elem.layerElement.children||this.elem.layerElement.childNodes,t,n,r,i;for(this.filterManager.effectElements[1].p.v===1?(i=this.elem.maskManager.masksProperties.length,r=0):(r=this.filterManager.effectElements[0].p.v-1,i=r+1),n=createNS(`g`),n.setAttribute(`fill`,`none`),n.setAttribute(`stroke-linecap`,`round`),n.setAttribute(`stroke-dashoffset`,1);r<i;r+=1)t=createNS(`path`),n.appendChild(t),this.paths.push({p:t,m:r});if(this.filterManager.effectElements[10].p.v===3){var a=createNS(`mask`),o=createElementID();a.setAttribute(`id`,o),a.setAttribute(`mask-type`,`alpha`),a.appendChild(n),this.elem.globalData.defs.appendChild(a);var c=createNS(`g`);for(c.setAttribute(`mask`,`url(`+getLocationHref()+`#`+o+`)`);e[0];)c.appendChild(e[0]);this.elem.layerElement.appendChild(c),this.masker=a,n.setAttribute(`stroke`,`#fff`)}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2)for(e=this.elem.layerElement.children||this.elem.layerElement.childNodes;e.length;)this.elem.layerElement.removeChild(e[0]);this.elem.layerElement.appendChild(n),this.elem.layerElement.removeAttribute(`mask`),n.setAttribute(`stroke`,`#fff`)}this.initialized=!0,this.pathMasker=n},SVGStrokeEffect.prototype.renderFrame=function(e){this.initialized||this.initialize();var t,n=this.paths.length,r,i;for(t=0;t<n;t+=1)if(this.paths[t].m!==-1&&(r=this.elem.maskManager.viewData[this.paths[t].m],i=this.paths[t].p,(e||this.filterManager._mdf||r.prop._mdf)&&i.setAttribute(`d`,r.lastPath),e||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf)){var a;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var o=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,c=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,u=i.getTotalLength();a=`0 0 0 `+u*o+` `;for(var K=u*(c-o),Y=1+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01,X=Math.floor(K/Y),ee=0;ee<X;ee+=1)a+=`1 `+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01+` `;a+=`0 `+u*10+` 0 0`}else a=`1 `+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01;i.setAttribute(`stroke-dasharray`,a)}if((e||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute(`stroke-width`,this.filterManager.effectElements[4].p.v*2),(e||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute(`opacity`,this.filterManager.effectElements[6].p.v),(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2)&&(e||this.filterManager.effectElements[3].p._mdf)){var te=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute(`stroke`,`rgb(`+bmFloor(te[0]*255)+`,`+bmFloor(te[1]*255)+`,`+bmFloor(te[2]*255)+`)`)}};function SVGTritoneFilter(e,t,n,r){this.filterManager=t;var i=createNS(`feColorMatrix`);i.setAttribute(`type`,`matrix`),i.setAttribute(`color-interpolation-filters`,`linearRGB`),i.setAttribute(`values`,`0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0`),e.appendChild(i);var a=createNS(`feComponentTransfer`);a.setAttribute(`color-interpolation-filters`,`sRGB`),a.setAttribute(`result`,r),this.matrixFilter=a;var o=createNS(`feFuncR`);o.setAttribute(`type`,`table`),a.appendChild(o),this.feFuncR=o;var c=createNS(`feFuncG`);c.setAttribute(`type`,`table`),a.appendChild(c),this.feFuncG=c;var u=createNS(`feFuncB`);u.setAttribute(`type`,`table`),a.appendChild(u),this.feFuncB=u,e.appendChild(a)}SVGTritoneFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,n=this.filterManager.effectElements[1].p.v,r=this.filterManager.effectElements[2].p.v,i=r[0]+` `+n[0]+` `+t[0],a=r[1]+` `+n[1]+` `+t[1],o=r[2]+` `+n[2]+` `+t[2];this.feFuncR.setAttribute(`tableValues`,i),this.feFuncG.setAttribute(`tableValues`,a),this.feFuncB.setAttribute(`tableValues`,o)}};function SVGProLevelsFilter(e,t,n,r){this.filterManager=t;var i=this.filterManager.effectElements,a=createNS(`feComponentTransfer`);(i[10].p.k||i[10].p.v!==0||i[11].p.k||i[11].p.v!==1||i[12].p.k||i[12].p.v!==1||i[13].p.k||i[13].p.v!==0||i[14].p.k||i[14].p.v!==1)&&(this.feFuncR=this.createFeFunc(`feFuncR`,a)),(i[17].p.k||i[17].p.v!==0||i[18].p.k||i[18].p.v!==1||i[19].p.k||i[19].p.v!==1||i[20].p.k||i[20].p.v!==0||i[21].p.k||i[21].p.v!==1)&&(this.feFuncG=this.createFeFunc(`feFuncG`,a)),(i[24].p.k||i[24].p.v!==0||i[25].p.k||i[25].p.v!==1||i[26].p.k||i[26].p.v!==1||i[27].p.k||i[27].p.v!==0||i[28].p.k||i[28].p.v!==1)&&(this.feFuncB=this.createFeFunc(`feFuncB`,a)),(i[31].p.k||i[31].p.v!==0||i[32].p.k||i[32].p.v!==1||i[33].p.k||i[33].p.v!==1||i[34].p.k||i[34].p.v!==0||i[35].p.k||i[35].p.v!==1)&&(this.feFuncA=this.createFeFunc(`feFuncA`,a)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(a.setAttribute(`color-interpolation-filters`,`sRGB`),e.appendChild(a)),(i[3].p.k||i[3].p.v!==0||i[4].p.k||i[4].p.v!==1||i[5].p.k||i[5].p.v!==1||i[6].p.k||i[6].p.v!==0||i[7].p.k||i[7].p.v!==1)&&(a=createNS(`feComponentTransfer`),a.setAttribute(`color-interpolation-filters`,`sRGB`),a.setAttribute(`result`,r),e.appendChild(a),this.feFuncRComposed=this.createFeFunc(`feFuncR`,a),this.feFuncGComposed=this.createFeFunc(`feFuncG`,a),this.feFuncBComposed=this.createFeFunc(`feFuncB`,a))}SVGProLevelsFilter.prototype.createFeFunc=function(e,t){var n=createNS(e);return n.setAttribute(`type`,`table`),t.appendChild(n),n},SVGProLevelsFilter.prototype.getTableValue=function(e,t,n,r,i){for(var a=0,o=256,c,u=Math.min(e,t),K=Math.max(e,t),Y=Array.call(null,{length:o}),X,ee=0,te=i-r,ce=t-e;a<=256;)c=a/256,X=c<=u?ce<0?i:r:c>=K?ce<0?r:i:r+te*((c-e)/ce)**(1/n),Y[ee]=X,ee+=1,a+=256/(o-1);return Y.join(` `)},SVGProLevelsFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t,n=this.filterManager.effectElements;this.feFuncRComposed&&(e||n[3].p._mdf||n[4].p._mdf||n[5].p._mdf||n[6].p._mdf||n[7].p._mdf)&&(t=this.getTableValue(n[3].p.v,n[4].p.v,n[5].p.v,n[6].p.v,n[7].p.v),this.feFuncRComposed.setAttribute(`tableValues`,t),this.feFuncGComposed.setAttribute(`tableValues`,t),this.feFuncBComposed.setAttribute(`tableValues`,t)),this.feFuncR&&(e||n[10].p._mdf||n[11].p._mdf||n[12].p._mdf||n[13].p._mdf||n[14].p._mdf)&&(t=this.getTableValue(n[10].p.v,n[11].p.v,n[12].p.v,n[13].p.v,n[14].p.v),this.feFuncR.setAttribute(`tableValues`,t)),this.feFuncG&&(e||n[17].p._mdf||n[18].p._mdf||n[19].p._mdf||n[20].p._mdf||n[21].p._mdf)&&(t=this.getTableValue(n[17].p.v,n[18].p.v,n[19].p.v,n[20].p.v,n[21].p.v),this.feFuncG.setAttribute(`tableValues`,t)),this.feFuncB&&(e||n[24].p._mdf||n[25].p._mdf||n[26].p._mdf||n[27].p._mdf||n[28].p._mdf)&&(t=this.getTableValue(n[24].p.v,n[25].p.v,n[26].p.v,n[27].p.v,n[28].p.v),this.feFuncB.setAttribute(`tableValues`,t)),this.feFuncA&&(e||n[31].p._mdf||n[32].p._mdf||n[33].p._mdf||n[34].p._mdf||n[35].p._mdf)&&(t=this.getTableValue(n[31].p.v,n[32].p.v,n[33].p.v,n[34].p.v,n[35].p.v),this.feFuncA.setAttribute(`tableValues`,t))}};function SVGDropShadowEffect(e,t,n,r,i){var a=t.container.globalData.renderConfig.filterSize,o=t.data.fs||a;e.setAttribute(`x`,o.x||a.x),e.setAttribute(`y`,o.y||a.y),e.setAttribute(`width`,o.width||a.width),e.setAttribute(`height`,o.height||a.height),this.filterManager=t;var c=createNS(`feGaussianBlur`);c.setAttribute(`in`,`SourceAlpha`),c.setAttribute(`result`,r+`_drop_shadow_1`),c.setAttribute(`stdDeviation`,`0`),this.feGaussianBlur=c,e.appendChild(c);var u=createNS(`feOffset`);u.setAttribute(`dx`,`25`),u.setAttribute(`dy`,`0`),u.setAttribute(`in`,r+`_drop_shadow_1`),u.setAttribute(`result`,r+`_drop_shadow_2`),this.feOffset=u,e.appendChild(u);var K=createNS(`feFlood`);K.setAttribute(`flood-color`,`#00ff00`),K.setAttribute(`flood-opacity`,`1`),K.setAttribute(`result`,r+`_drop_shadow_3`),this.feFlood=K,e.appendChild(K);var Y=createNS(`feComposite`);Y.setAttribute(`in`,r+`_drop_shadow_3`),Y.setAttribute(`in2`,r+`_drop_shadow_2`),Y.setAttribute(`operator`,`in`),Y.setAttribute(`result`,r+`_drop_shadow_4`),e.appendChild(Y);var X=this.createMergeNode(r,[r+`_drop_shadow_4`,i]);e.appendChild(X)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){if((e||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute(`stdDeviation`,this.filterManager.effectElements[4].p.v/4),e||this.filterManager.effectElements[0].p._mdf){var t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute(`flood-color`,rgbToHex(Math.round(t[0]*255),Math.round(t[1]*255),Math.round(t[2]*255)))}if((e||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute(`flood-opacity`,this.filterManager.effectElements[1].p.v/255),e||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var n=this.filterManager.effectElements[3].p.v,r=(this.filterManager.effectElements[2].p.v-90)*degToRads,i=n*Math.cos(r),a=n*Math.sin(r);this.feOffset.setAttribute(`dx`,i),this.feOffset.setAttribute(`dy`,a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(e,t,n){this.initialized=!1,this.filterManager=t,this.filterElem=e,this.elem=n,n.matteElement=createNS(`g`),n.matteElement.appendChild(n.layerElement),n.matteElement.appendChild(n.transformedElement),n.baseElement=n.matteElement}SVGMatte3Effect.prototype.findSymbol=function(e){for(var t=0,n=_svgMatteSymbols.length;t<n;){if(_svgMatteSymbols[t]===e)return _svgMatteSymbols[t];t+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(e,t){var n=e.layerElement.parentNode;if(n){for(var r=n.children,i=0,a=r.length;i<a&&r[i]!==e.layerElement;)i+=1;var o;i<=a-2&&(o=r[i+1]);var c=createNS(`use`);c.setAttribute(`href`,`#`+t),o?n.insertBefore(c,o):n.appendChild(c)}},SVGMatte3Effect.prototype.setElementAsMask=function(e,t){if(!this.findSymbol(t)){var n=createElementID(),r=createNS(`mask`);r.setAttribute(`id`,t.layerId),r.setAttribute(`mask-type`,`alpha`),_svgMatteSymbols.push(t);var i=e.globalData.defs;i.appendChild(r);var a=createNS(`symbol`);a.setAttribute(`id`,n),this.replaceInParent(t,n),a.appendChild(t.layerElement),i.appendChild(a);var o=createNS(`use`);o.setAttribute(`href`,`#`+n),r.appendChild(o),t.data.hd=!1,t.show()}e.setMatte(t.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var e=this.filterManager.effectElements[0].p.v,t=this.elem.comp.elements,n=0,r=t.length;n<r;)t[n]&&t[n].data.ind===e&&this.setElementAsMask(this.elem,t[n]),n+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()};function SVGGaussianBlurEffect(e,t,n,r){e.setAttribute(`x`,`-100%`),e.setAttribute(`y`,`-100%`),e.setAttribute(`width`,`300%`),e.setAttribute(`height`,`300%`),this.filterManager=t;var i=createNS(`feGaussianBlur`);i.setAttribute(`result`,r),e.appendChild(i),this.feGaussianBlur=i}SVGGaussianBlurEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v*.3,n=this.filterManager.effectElements[1].p.v,r=n==3?0:t,i=n==2?0:t;this.feGaussianBlur.setAttribute(`stdDeviation`,r+` `+i);var a=this.filterManager.effectElements[2].p.v==1?`wrap`:`duplicate`;this.feGaussianBlur.setAttribute(`edgeMode`,a)}};function TransformEffect(){}TransformEffect.prototype.init=function(e){this.effectsManager=e,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(e){if(this._opMdf=!1,this._mdf=!1,e||this.effectsManager._mdf){var t=this.effectsManager.effectElements,n=t[0].p.v,r=t[1].p.v,i=t[2].p.v===1,a=t[3].p.v,o=i?a:t[4].p.v,c=t[5].p.v,u=t[6].p.v,K=t[7].p.v;this.matrix.reset(),this.matrix.translate(-n[0],-n[1],n[2]),this.matrix.scale(o*.01,a*.01,1),this.matrix.rotate(-K*degToRads),this.matrix.skewFromAxis(-c*degToRads,(u+90)*degToRads),this.matrix.translate(r[0],r[1],0),this._mdf=!0,this.opacity!==t[8].p.v&&(this.opacity=t[8].p.v,this._opMdf=!0)}};function SVGTransformEffect(e,t){this.init(t)}extendPrototype([TransformEffect],SVGTransformEffect);function CVTransformEffect(e){this.init(e)}return extendPrototype([TransformEffect],CVTransformEffect),registerRenderer(`canvas`,CanvasRenderer),registerRenderer(`html`,HybridRenderer),registerRenderer(`svg`,SVGRenderer),ShapeModifiers.registerModifier(`tm`,TrimModifier),ShapeModifiers.registerModifier(`pb`,PuckerAndBloatModifier),ShapeModifiers.registerModifier(`rp`,RepeaterModifier),ShapeModifiers.registerModifier(`rd`,RoundCornersModifier),ShapeModifiers.registerModifier(`zz`,ZigZagModifier),ShapeModifiers.registerModifier(`op`,OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie}))})),metadata_min_json_default={version:4,country_calling_codes:{1:[`US`,`AG`,`AI`,`AS`,`BB`,`BM`,`BS`,`CA`,`DM`,`DO`,`GD`,`GU`,`JM`,`KN`,`KY`,`LC`,`MP`,`MS`,`PR`,`SX`,`TC`,`TT`,`VC`,`VG`,`VI`],7:[`RU`,`KZ`],20:[`EG`],27:[`ZA`],30:[`GR`],31:[`NL`],32:[`BE`],33:[`FR`],34:[`ES`],36:[`HU`],39:[`IT`,`VA`],40:[`RO`],41:[`CH`],43:[`AT`],44:[`GB`,`GG`,`IM`,`JE`],45:[`DK`],46:[`SE`],47:[`NO`,`SJ`],48:[`PL`],49:[`DE`],51:[`PE`],52:[`MX`],53:[`CU`],54:[`AR`],55:[`BR`],56:[`CL`],57:[`CO`],58:[`VE`],60:[`MY`],61:[`AU`,`CC`,`CX`],62:[`ID`],63:[`PH`],64:[`NZ`],65:[`SG`],66:[`TH`],81:[`JP`],82:[`KR`],84:[`VN`],86:[`CN`],90:[`TR`],91:[`IN`],92:[`PK`],93:[`AF`],94:[`LK`],95:[`MM`],98:[`IR`],211:[`SS`],212:[`MA`,`EH`],213:[`DZ`],216:[`TN`],218:[`LY`],220:[`GM`],221:[`SN`],222:[`MR`],223:[`ML`],224:[`G
13N`],225:[`CI`],226:[`BF`],227:[`NE`],228:[`TG`],229:[`BJ`],230:[`MU`],231:[`LR`],232:[`SL`],233:[`GH`],234:[`NG`],235:[`TD`],236:[`CF`],237:[`CM`],238:[`CV`],239:[`ST`],240:[`GQ`],241:[`GA`],242:[`CG`],243:[`CD`],244:[`AO`],245:[`GW`],246:[`IO`],247:[`AC`],248:[`SC`],249:[`SD`],250:[`RW`],251:[`ET`],252:[`SO`],253:[`DJ`],254:[`KE`],255:[`TZ`],256:[`UG`],257:[`BI`],258:[`MZ`],260:[`ZM`],261:[`MG`],262:[`RE`,`YT`],263:[`ZW`],264:[`NA`],265:[`MW`],266:[`LS`],267:[`BW`],268:[`SZ`],269:[`KM`],290:[`SH`,`TA`],291:[`ER`],297:[`AW`],298:[`FO`],299:[`GL`],350:[`GI`],351:[`PT`],352:[`LU`],353:[`IE`],354:[`IS`],355:[`AL`],356:[`MT`],357:[`CY`],358:[`FI`,`AX`],359:[`BG`],370:[`LT`],371:[`LV`],372:[`EE`],373:[`MD`],374:[`AM`],375:[`BY`],376:[`AD`],377:[`MC`],378:[`SM`],380:[`UA`],381:[`RS`],382:[`ME`],383:[`XK`],385:[`HR`],386:[`SI`],387:[`BA`],389:[`MK`],420:[`CZ`],421:[`SK`],423:[`LI`],500:[`FK`],501:[`BZ`],502:[`GT`],503:[`SV`],504:[`HN`],505:[`NI`],506:[`CR`],507:[`PA`],508:[`PM`],509:[`HT`],590:[`GP`,`BL`,`MF`],591:[`BO`],592:[`GY`],593:[`EC`],594:[`GF`],595:[`PY`],596:[`MQ`],597:[`SR`],598:[`UY`],599:[`CW`,`BQ`],670:[`TL`],672:[`NF`],673:[`BN`],674:[`NR`],675:[`PG`],676:[`TO`],677:[`SB`],678:[`VU`],679:[`FJ`],680:[`PW`],681:[`WF`],682:[`CK`],683:[`NU`],685:[`WS`],686:[`KI`],687:[`NC`],688:[`TV`],689:[`PF`],690:[`TK`],691:[`FM`],692:[`MH`],850:[`KP`],852:[`HK`],853:[`MO`],855:[`KH`],856:[`LA`],880:[`BD`],886:[`TW`],960:[`MV`],961:[`LB`],962:[`JO`],963:[`SY`],964:[`IQ`],965:[`KW`],966:[`SA`],967:[`YE`],968:[`OM`],970:[`PS`],971:[`AE`],972:[`IL`],973:[`BH`],974:[`QA`],975:[`BT`],976:[`MN`],977:[`NP`],992:[`TJ`],993:[`TM`],994:[`AZ`],995:[`GE`],996:[`KG`],998:[`UZ`]},countries:{AC:[`247`,`00`,`(?:[01589]\\d|[46])\\d{4}`,[5,6]],AD:[`376`,`00`,`(?:1|6\\d)\\d{7}|[135-9]\\d{5}`,[6,8,9],[[`(\\d{3})(\\d{3})`,`$1 $2`,[`[135-9]`]],[`(\\d{4})(\\d{4})`,`$1 $2`,[`1`]],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`6`]]]],AE:[`971`,`00`,`(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}`,[5,6,7,8,9,10,11,12],[[`(\\d{3})(\\d{2,9})`,`$1 $2`,[`60|8`]],[`(\\d)(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[236]|[479][2-8]`],`0$1`],[`(\\d{3})(\\d)(\\d{5})`,`$1 $2 $3`,[`[479]`]],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`5`],`0$1`]],`0`],AF:[`93`,`00`,`[2-7]\\d{8}`,[9],[[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[2-7]`],`0$1`]],`0`],AG:[`1`,`011`,`(?:268|[58]\\d\\d|900)\\d{7}`,[10],0,`1`,0,`([457]\\d{6})$|1`,`268$1`,0,`268`],AI:[`1`,`011`,`(?:264|[58]\\d\\d|900)\\d{7}`,[10],0,`1`,0,`([2457]\\d{6})$|1`,`264$1`,0,`264`],AL:[`355`,`00`,`(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}`,[6,7,8,9],[[`(\\d{3})(\\d{3,4})`,`$1 $2`,[`80|9`],`0$1`],[`(\\d)(\\d{3})(\\d{4})`,`$1 $2 $3`,[`4[2-6]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[2358][2-5]|4`],`0$1`],[`(\\d{3})(\\d{5})`,`$1 $2`,[`[23578]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`6`],`0$1`]],`0`],AM:[`374`,`00`,`(?:[1-489]\\d|55|60|77)\\d{6}`,[8],[[`(\\d{3})(\\d{2})(\\d{3})`,`$1 $2 $3`,[`[89]0`],`0 $1`],[`(\\d{3})(\\d{5})`,`$1 $2`,[`2|3[12]`],`(0$1)`],[`(\\d{2})(\\d{6})`,`$1 $2`,[`1|47`],`(0$1)`],[`(\\d{2})(\\d{6})`,`$1 $2`,[`[3-9]`],`0$1`]],`0`],AO:[`244`,`00`,`[29]\\d{8}`,[9],[[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[29]`]]]],AR:[`54`,`00`,`(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}`,[10,11],[[`(\\d{4})(\\d{2})(\\d{4})`,`$1 $2-$3`,[`2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])`,`2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)`,`2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]`,`2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]`],`0$1`,1],[`(\\d{2})(\\d{4})(\\d{4})`,`$1 $2-$3`,[`1`],`0$1`,1],[`(\\d{3})(\\d{3})(\\d{4})`,`$1-$2-$3`,[`[68]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2-$3`,[`[23]`],`0$1`,1],[`(\\d)(\\d{4})(\\d{2})(\\d{4})`,`$2 15-$3-$4`,[`9(?:2[2-469]|3[3-578])`,`9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))`,`9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)`,`9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]`,`9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]`],`0$1`,0,`$1 $2 $3-$4`],[`(\\d)(\\d{2})(\\d{4})(\\d{4})`,`$2 15-$3-$4`,[`91`],`0$1`,0,`$1 $2 $3-$4`],[`(\\d{3})(\\d{3})(\\d{5})`,`$1-$2-$3`,[`8`],`0$1`],[`(\\d)(\\d{3})(\\d{3})(\\d{4})`,`$2 15-$3-$4`,[`9`],`0$1`,0,`$1 $2 $3-$4`]],`0`,0,`0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-4
136-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?`,`9$1`],AS:[`1`,`011`,`(?:[58]\\d\\d|684|900)\\d{7}`,[10],0,`1`,0,`([267]\\d{6})$|1`,`684$1`,0,`684`],AT:[`43`,`00`,`1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}`,[4,5,6,7,8,9,10,11,12,13],[[`(\\d)(\\d{3,12})`,`$1 $2`,[`1(?:11|[2-9])`],`0$1`],[`(\\d{3})(\\d{2})`,`$1 $2`,[`517`],`0$1`],[`(\\d{2})(\\d{3,5})`,`$1 $2`,[`5[079]`],`0$1`],[`(\\d{3})(\\d{3,10})`,`$1 $2`,[`(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]`],`0$1`],[`(\\d{4})(\\d{3,9})`,`$1 $2`,[`[2-467]|5[2-6]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`5`],`0$1`],[`(\\d{2})(\\d{4})(\\d{4,7})`,`$1 $2 $3`,[`5`],`0$1`]],`0`],AU:[`61`,`001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011`,`1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}`,[5,6,7,8,9,10,12],[[`(\\d{2})(\\d{3,4})`,`$1 $2`,[`16`],`0$1`],[`(\\d{2})(\\d{3})(\\d{2,4})`,`$1 $2 $3`,[`16`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`14|4`],`0$1`],[`(\\d)(\\d{4})(\\d{4})`,`$1 $2 $3`,[`[2378]`],`(0$1)`],[`(\\d{4})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`1(?:30|[89])`]]],`0`,0,`(183[12])|0`,0,0,0,[[`(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}`,[9]],[`4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}`,[9]],[`180(?:0\\d{3}|2)\\d{3}`,[7,10]],[`190[0-26]\\d{6}`,[10]],0,0,0,[`163\\d{2,6}`,[5,6,7,8,9]],[`14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}`,[9]],[`13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}`,[6,8,10,12]]],`0011`],AW:[`297`,`00`,`(?:[25-79]\\d\\d|800)\\d{4}`,[7],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[25-9]`]]]],AX:[`358`,`00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))`,`2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}`,[5,6,7,8,9,10,11,12],0,`0`,0,0,0,0,`18`,0,`00`],AZ:[`994`,`00`,`365\\d{6}|(?:[124579]\\d|60|88)\\d{7}`,[9],[[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`90`],`0$1`],[`(\\d{2})(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`1[28]|2|365|46`,`1[28]|2|365[45]|46`,`1[28]|2|365(?:4|5[02])|46`],`(0$1)`],[`(\\d{2})(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[13-9]`],`0$1`]],`0`],BA:[`387`,`00`,`6\\d{8}|(?:[35689]\\d|49|70)\\d{6}`,[8,9],[[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`6[1-3]|[7-9]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2-$3`,[`[3-5]|6[56]`],`0$1`],[`(\\d{2})(\\d{2})(\\d{2})(\\d{3})`,`$1 $2 $3 $4`,[`6`],`0$1`]],`0`],BB:[`1`,`011`,`(?:246|[58]\\d\\d|900)\\d{7}`,[10],0,`1`,0,`([2-9]\\d{6})$|1`,`246$1`,0,`246`],BD:[`880`,`00`,`[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}`,[6,7,8,9,10],[[`(\\d{2})(\\d{4,6})`,`$1-$2`,[`31[5-8]|[459]1`],`0$1`],[`(\\d{3})(\\d{3,7})`,`$1-$2`,[`3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]`],`0$1`],[`(\\d{4})(\\d{3,6})`,`$1-$2`,[`[13-9]|2[23]`],`0$1`],[`(\\d)(\\d{7,8})`,`$1-$2`,[`2`],`0$1`]],`0`],BE:[`32`,`00`,`4\\d{8}|[1-9]\\d{7}`,[8,9],[[`(\\d{3})(\\d{2})(\\d{3})`,`$1 $2 $3`,[`(?:80|9)0`],`0$1`],[`(\\d)(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[239]|4[23]`],`0$1`],[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[15-8]`],`0$1`],[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`4`],`0$1`]],`0`],BF:[`226`,`00`,`[025-7]\\d{7}`,[8],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[025-7]`]]]],BG:[`359`,`00`,`00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}`,[6,7,8,9,12],[[`(\\d)(\\d)(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`2`],`0$1`],[`(\\d{3})(\\d{4})`,`$1 $2`,[`43[1-6]|70[1-9]`],`0$1`],[`(\\d)(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`2`],`0$1`],[`(\\d{2})(\\d{3})(\\d{2,3})`,`$1 $2 $3`,[`[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]`],`0$1`],[`(\\d{3})(\\d{2})(\\d{3})`,`$1 $2 $3`,[`(?:70|8)0`],`0$1`],[`(\\d{3})(\\d{3})(\\d{2})`,`$1 $2 $3`,[`43[1-7]|7`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[48]|9[08]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`9`],`0$1`]],`0`],BH:[`973`,`00`,`[136-9]\\d{7}`,[8],[[`(\\d{4})(\\d{4})`,`$1 $2`,[`[13679]|8[02-4679]`]]]],BI:[`257`,`00`,`(?:[267]\\d|31)\\d{6}`,[8],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[2367]`]]]],BJ:[`229`,`00`,`[24-689]\\d{7}`,[8],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[24-689]`]]]],BL:[`590`,`00`,`590\\d{6}|(?:69|80|9\\d)\\d{7}`,[9],0,`0`,0,0,0,0,0,[[`590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}`],[`69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}`],[`80[0-5]\\d{6}`],0,0,0,0,0,[`9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}`]]],BM:[`1`,`011`,`(?:441|[58]\\d\\d|900)\\d{7}`,[10],0,`1`,0,`([2-9]\\d{6})$|1`,`441$1`,0,`441`],BN:[`673`,`00`,`[2-578]\\d{6}`,[7],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[2-578]`]]]],BO:[`591`,`00(?:1\\d)?`,`8001\\d{5}|(?:[2-467]\\d|50)\\d{6}`,[8,9],[[`(\\d)(\\d{7})`,`$1 $2`,[`[235]|4[46]`]],[`(\\d{8})`,`$1`,[`[67]`]],[`(\\d{3})(\\d{2})(\\d{4})`,`$1 $2 $3`,[`8`]]],`0`,0,`0(1\\d)?`],BQ:[`599`,`00`,`(?:[34]1|7\\d)\\d{5}`,[7],0,0,0,0,0,0,`[347]`],BR:[`55`,`00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)`,`(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}`,[8,9,10,11],[[`(\\d{4})(\\d{4})`,`$1-$2`,[`300|4(?:0[02]|37)`,`4(?:02|37)0|[34]00`]],[`(\\d{3})(\\d{2,3})(\\d{4})`,`$1 $2 $3`,[`(?:[358]|90)0`],`0$1`],[`(\\d{2})(\\d{4})(\\d{4})`,`$1 $2-$3`,[`(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]`],`($1)`],[`(\\d{2})(\\d{5})(\\d{4})`,`$1 $2-$3`,[`[16][1-9]|[2-57-9]`],`($1)`]],`0`,0,`(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?`,`$2`],BS:[`1`,`011`,`(?:242|[58]\\d\\d|900)\\d{7}`,[10],0,`1`,0,`([3-8]\\d{6})$|1`,`242$1`,0,`242`],BT:[`975`,`00`,`[17]\\d{7}|[2-8]\\d{6}`,[7,8],[[`(\\d)(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[2-68]|7[246]`]],[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`1[67]|7`]]]],BW:[`267`,`00`,`(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}`,[7,8,10],[[`(\\d{2})(\\d{5})`,`$1 $2`,[`90`]],[`(\\d{3})(\\d{4})`,`$1 $2`,[`[24-6]|3[15-9]`]],[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[37]`]],[`(\\d{4})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`0`]],[`(\\d{3})(\\d{4})(\\d{3})`,`$1 $2 $3`,[`8`]]]],BY:[`375`,`810`,`(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}`,[6,7,8,9,10,11],[[`(\\d{3})(\\d{3})`,`$1 $2`,[`800`],`8 $1`],[`(\\d{3})(\\d{2})(\\d{2,4})`,`$1 $2 $3`,[`800`],`8 $1`],[`(\\d{4})(\\d{2})(\\d{3})`,`$1 $2-$3`,[`1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])`,`1(?
13:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])`],`8 0$1`],[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2-$3-$4`,[`1(?:[56]|7[467])|2[1-3]`],`8 0$1`],[`(\\d{2})(\\d{3})(\\d{2})(\\d{2})`,`$1 $2-$3-$4`,[`[1-4]`],`8 0$1`],[`(\\d{3})(\\d{3,4})(\\d{4})`,`$1 $2 $3`,[`[89]`],`8 $1`]],`8`,0,`0|80?`,0,0,0,0,`8~10`],BZ:[`501`,`00`,`(?:0800\\d|[2-8])\\d{6}`,[7,11],[[`(\\d{3})(\\d{4})`,`$1-$2`,[`[2-8]`]],[`(\\d)(\\d{3})(\\d{4})(\\d{3})`,`$1-$2-$3-$4`,[`0`]]]],CA:[`1`,`011`,`(?:[2-8]\\d|90)\\d{8}|3\\d{6}`,[7,10],0,`1`,0,0,0,0,0,[[`(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}`,[10]],[``,[10]],[`8(?:00|33|44|55|66|77|88)[2-9]\\d{6}`,[10]],[`900[2-9]\\d{6}`,[10]],[`52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}`,[10]],0,[`310\\d{4}`,[7]],0,[`600[2-9]\\d{6}`,[10]]]],CC:[`61`,`001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011`,`1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}`,[6,7,8,9,10,12],0,`0`,0,`([59]\\d{7})$|0`,`8$1`,0,0,[[`8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}`,[9]],[`4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}`,[9]],[`180(?:0\\d{3}|2)\\d{3}`,[7,10]],[`190[0-26]\\d{6}`,[10]],0,0,0,0,[`14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}`,[9]],[`13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}`,[6,8,10,12]]],`0011`],CD:[`243`,`00`,`[189]\\d{8}|[1-68]\\d{6}`,[7,9],[[`(\\d{2})(\\d{2})(\\d{3})`,`$1 $2 $3`,[`88`],`0$1`],[`(\\d{2})(\\d{5})`,`$1 $2`,[`[1-6]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`1`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[89]`],`0$1`]],`0`],CF:[`236`,`00`,`(?:[27]\\d{3}|8776)\\d{4}`,[8],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[278]`]]]],CG:[`242`,`00`,`222\\d{6}|(?:0\\d|80)\\d{7}`,[9],[[`(\\d)(\\d{4})(\\d{4})`,`$1 $2 $3`,[`8`]],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[02]`]]]],CH:[`41`,`00`,`8\\d{11}|[2-9]\\d{8}`,[9,12],[[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`8[047]|90`],`0$1`],[`(\\d{2})(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[2-79]|81`],`0$1`],[`(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3 $4 $5`,[`8`],`0$1`]],`0`],CI:[`225`,`00`,`[02]\\d{9}`,[10],[[`(\\d{2})(\\d{2})(\\d)(\\d{5})`,`$1 $2 $3 $4`,[`2`]],[`(\\d{2})(\\d{2})(\\d{2})(\\d{4})`,`$1 $2 $3 $4`,[`0`]]]],CK:[`682`,`00`,`[2-578]\\d{4}`,[5],[[`(\\d{2})(\\d{3})`,`$1 $2`,[`[2-578]`]]]],CL:[`56`,`(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0`,`12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}`,[9,10,11],[[`(\\d{5})(\\d{4})`,`$1 $2`,[`219`,`2196`],`($1)`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`44`]],[`(\\d)(\\d{4})(\\d{4})`,`$1 $2 $3`,[`2[1-36]`],`($1)`],[`(\\d)(\\d{4})(\\d{4})`,`$1 $2 $3`,[`9[2-9]`]],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])`],`($1)`],[`(\\d{3})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`60|8`]],[`(\\d{4})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`1`]],[`(\\d{3})(\\d{3})(\\d{2})(\\d{3})`,`$1 $2 $3 $4`,[`60`]]]],CM:[`237`,`00`,`[26]\\d{8}|88\\d{6,7}`,[8,9],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`88`]],[`(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4 $5`,[`[26]|88`]]]],CN:[`86`,`00|1(?:[12]\\d|79)\\d\\d00`,`(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}`,[7,8,9,10,11,12],[[`(\\d{2})(\\d{5,6})`,`$1 $2`,[`(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]`,`(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1`,`10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12`,`10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123`,`10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123`],`0$1`],[`(\\d{3})(\\d{5,6})`,`$1 $2`,[`3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]`,`(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]`,`85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])`,`85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])`],`0$1`],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`(?:4|80)0`]],[`(\\d{2})(\\d{4})(\\d{4})`,`$1 $2 $3`,[`10|2(?:[02-57-9]|1[1-9])`,`10|2(?:[02-57-9]|1[1-9])`,`10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])`],`0$1`,1],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]`],`0$1`,1],[`(\\d{3})(\\d{7,8})`,`$1 $2`,[`9`]],[`(\\d{4})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`80`],`0$1`,1],[`(\\d{3})(\\d{4})(\\d{4})`,`$1 $2 $3`,[`[3-578]`],`0$1`,1],[`(\\d{3})(\\d{4})(\\d{4})`,`$1 $2 $3`,[`1[3-9]`]],[`(\\d{2})(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3 $4`,[`[12]`],`0$1`,1]],`0`,0,`(1(?:[12]\\d|79)\\d\\d)|0`,0,0,0,0,`00`],CO:[`57`,`00(?:4(?:[14]4|56)|[579])`,`(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}`,[10,11],[[`(\\d{3})(\\d{7})`,`$1 $2`,[`6`],`($1)`],[`(\\d{3})(\\d{7})`,`$1 $2`,[`3[0-357]|91`]],[`(\\d)(\\d{3})(\\d{7})`,`$1-$2-$3`,[`1`],`0$1`,0,`$1 $2 $3`]],`0`,0,`0([3579]|4(?:[14]4|56))?`],CR:[`506`,`00`,`(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}`,[8,10],[[`(\\d{4})(\\d{4})`,`$1 $2`,[`[2-7]|8[3-9]`]],[`(\\d{3})(\\d{3})(\\d{4})`,`$1-$2-$3`,[`[89]`]]],0,0,`(19(?:0[0-2468]|1[09]|20|66|77|99))`],CU:[`53`,`119`,`(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}`,[6,7,8,10],[[`(\\d{2})(\\d{4,6})`,`$1 $2`,[`2[1-4]|[34]`],`(0$1)`],[`(\\d)(\\d{6,7})`,`$1 $2`,[`7`],`(0$1)`],[`(\\d)(\\d{7})`,`$1 $2`,[`[56]`],`0$1`],[`(\\d{3})(\\d{7})`,`$1 $2`,[`8`],`0$1`]],`0`],CV:[`238`,`0`,`(?:[2-59]\\d\\d|800)\\d{4}`,[7],[[`(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3`,[`[2-589]`]]]],CW:[`599`,`00`,`(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}`,[7,8],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[3467]`]],[`(\\d)(\\d{3})(\\d{4})`,`$1 $2 $3`,[`9[4-8]`]]],0,0,0,0,0,`[69]`],CX:[`61`,`001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011`,`1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}`,[6,7,8,9,10,12],0,`0`,0,`([59]\\d{7})$|0`,`8$1`,0,0,[[`8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}`,[9]],[`4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}`,[9]],[`180(?:0\\d{3}|2)\\d{3}`,[7,10]],[`190[0-26]\\d{6}`,[10]],0,0,0,0,[`14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}`,[9]],[`13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}`,[6,8,10,12]]],`0011`],CY:[`357`,`00`,`(?:[279]\\d|[58]0)\\d{6}`,[8],[[`(\\d{2})(\\d{6})`,`$1 $2`,[`[257-9]`]]]],CZ:[`420`,`00`,`(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}`,[9,10,11,12],[[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[2-8]|9[015-7]`]],[`(\\d{2})(\\d{3})(\\d{3})(\\d{2})`,`$1 $2 $3 $4`,[`96`]],[`(\\d{2})(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3 $4`,[`9`]],[`(\\d{3})(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3 $4`,[`9`]]]],DE:[`49`,`00`,`[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}`,[4,5,6,7,8,9,10,11,12,13,14,15],[[`(\\d{2})(\\d{3,13})`,`$1 $2`,[`3[02]|40|[68]9`],`0$1`],[`(\\d{3})(\\d{3,12})`,`$1 $2`,[`2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1`,`2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1`],`0$1`],[`(\\d{4})(\\d{2,11})`,`$1 $2`,[`[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]`,`[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]`],`0$1`],[`(\\d{3})(\\d{4})`,`$1 $2`,[`138`],`0$1`],[`(\\d{5})(\\d{2,10})`,`$1 $2`,[`3`],`0$1`],[`(\\d{3})(\\d{5,11})`,`$1 $2`,[`181`],`0$1`],[`(\\d{3})(\\d)(\\d{4,10})`,`$1 $2 $3`,[`1(?:3|80)|9`],`0$1`],[`(\\d{3})(\\d{7,8})`,`$1 $2`,[`1[67]`],`0$1`],[`(\\d{3})(\\d{7,12})`,`$1 $2`,[`8`],`0$1`],[`(\\d{5})(\\d{6})`,`$1 $2`,[`185`,`1850`,`18500`],`0$1`],[`(\\d{3})(\\d{4})(\\d{4})`,`$1 $2 $3`,[`7`],`0$1`],[`(\\d{4})(\\d{7})`,`$1 $2`,[`18[68]`],`0$1`],[`(\\d{4})(\\d{7})`,`$1 $2`,[`15[1279]`],`0$1`],[`(\\d{5})(\\d{6})`,`$1 $2`,[`15[03568]`,`15(?:[0568]|31)`],`0$1`],[`(\\d{3})(\\d{8})`,`$1 $2`,[`18`],`0$1`],[`(\\d{3})(\\d{2})(\\d{7,8})`,`$1 $2 $3`,[`1(?:6[023]|7)`],`0$1`],[`(\\d{4})(\\d{2})(\\d{7})`,`$1 $2 $3`,[`15[279]`],`0$1`],[`(\\d{3})(\\d{2})(\\d{8}
13)`,`$1 $2 $3`,[`15`],`0$1`]],`0`],DJ:[`253`,`00`,`(?:2\\d|77)\\d{6}`,[8],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[27]`]]]],DK:[`45`,`00`,`[2-9]\\d{7}`,[8],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[2-9]`]]]],DM:[`1`,`011`,`(?:[58]\\d\\d|767|900)\\d{7}`,[10],0,`1`,0,`([2-7]\\d{6})$|1`,`767$1`,0,`767`],DO:[`1`,`011`,`(?:[58]\\d\\d|900)\\d{7}`,[10],0,`1`,0,0,0,0,`8001|8[024]9`],DZ:[`213`,`00`,`(?:[1-4]|[5-79]\\d|80)\\d{7}`,[8,9],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[1-4]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`9`],`0$1`],[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[5-8]`],`0$1`]],`0`],EC:[`593`,`00`,`1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}`,[8,9,10,11],[[`(\\d)(\\d{3})(\\d{4})`,`$1 $2-$3`,[`[2-7]`],`(0$1)`,0,`$1-$2-$3`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`9`],`0$1`],[`(\\d{4})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`1`]]],`0`],EE:[`372`,`00`,`8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}`,[7,8,10],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88`,`[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88`]],[`(\\d{4})(\\d{3,4})`,`$1 $2`,[`[45]|8(?:00|[1-49])`,`[45]|8(?:00[1-9]|[1-49])`]],[`(\\d{2})(\\d{2})(\\d{4})`,`$1 $2 $3`,[`7`]],[`(\\d{4})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`8`]]]],EG:[`20`,`00`,`[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}`,[8,9,10],[[`(\\d)(\\d{7,8})`,`$1 $2`,[`[23]`],`0$1`],[`(\\d{2})(\\d{6,7})`,`$1 $2`,[`1[35]|[4-6]|8[2468]|9[235-7]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[89]`],`0$1`],[`(\\d{2})(\\d{8})`,`$1 $2`,[`1`],`0$1`]],`0`],EH:[`212`,`00`,`[5-8]\\d{8}`,[9],0,`0`,0,0,0,0,`528[89]`],ER:[`291`,`00`,`[178]\\d{6}`,[7],[[`(\\d)(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[178]`],`0$1`]],`0`],ES:[`34`,`00`,`[5-9]\\d{8}`,[9],[[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[89]00`]],[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[5-9]`]]]],ET:[`251`,`00`,`(?:11|[2-579]\\d)\\d{7}`,[9],[[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[1-579]`],`0$1`]],`0`],FI:[`358`,`00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))`,`[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}`,[5,6,7,8,9,10,11,12],[[`(\\d{5})`,`$1`,[`20[2-59]`],`0$1`],[`(\\d{3})(\\d{3,7})`,`$1 $2`,[`(?:[1-3]0|[68])0|70[07-9]`],`0$1`],[`(\\d{2})(\\d{4,8})`,`$1 $2`,[`[14]|2[09]|50|7[135]`],`0$1`],[`(\\d{2})(\\d{6,10})`,`$1 $2`,[`7`],`0$1`],[`(\\d)(\\d{4,9})`,`$1 $2`,[`(?:1[49]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9`],`0$1`]],`0`,0,0,0,0,`1[03-79]|[2-9]`,0,`00`],FJ:[`679`,`0(?:0|52)`,`45\\d{5}|(?:0800\\d|[235-9])\\d{6}`,[7,11],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[235-9]|45`]],[`(\\d{4})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`0`]]],0,0,0,0,0,0,0,`00`],FK:[`500`,`00`,`[2-7]\\d{4}`,[5]],FM:[`691`,`00`,`(?:[39]\\d\\d|820)\\d{4}`,[7],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[389]`]]]],FO:[`298`,`00`,`[2-9]\\d{5}`,[6],[[`(\\d{6})`,`$1`,[`[2-9]`]]],0,0,`(10(?:01|[12]0|88))`],FR:[`33`,`00`,`[1-9]\\d{8}`,[9],[[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`8`],`0 $1`],[`(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4 $5`,[`[1-79]`],`0$1`]],`0`],GA:[`241`,`00`,`(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}`,[7,8],[[`(\\d)(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[2-7]`],`0$1`],[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`0`]],[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`11|[67]`],`0$1`]],0,0,`0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})`,`$1`],GB:[`44`,`00`,`[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}`,[7,9,10],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`800`,`8001`,`80011`,`800111`,`8001111`],`0$1`],[`(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3`,[`845`,`8454`,`84546`,`845464`],`0$1`],[`(\\d{3})(\\d{6})`,`$1 $2`,[`800`],`0$1`],[`(\\d{5})(\\d{4,5})`,`$1 $2`,[`1(?:38|5[23]|69|76|94)`,`1(?:(?:38|69)7|5(?:24|39)|768|946)`,`1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)`],`0$1`],[`(\\d{4})(\\d{5,6})`,`$1 $2`,[`1(?:[2-69][02-9]|[78])`],`0$1`],[`(\\d{2})(\\d{4})(\\d{4})`,`$1 $2 $3`,[`[25]|7(?:0|6[02-9])`,`[25]|7(?:0|6(?:[03-9]|2[356]))`],`0$1`],[`(\\d{4})(\\d{6})`,`$1 $2`,[`7`],`0$1`],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[1389]`],`0$1`]],`0`,0,0,0,0,0,[[`(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])
13))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}`,[9,10]],[`7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}`,[10]],[`80[08]\\d{7}|800\\d{6}|8001111`],[`(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d`,[7,10]],[`70\\d{8}`,[10]],0,[`(?:3[0347]|55)\\d{8}`,[10]],[`76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}`,[10]],[`56\\d{8}`,[10]]],0,` x`],GD:[`1`,`011`,`(?:473|[58]\\d\\d|900)\\d{7}`,[10],0,`1`,0,`([2-9]\\d{6})$|1`,`473$1`,0,`473`],GE:[`995`,`00`,`(?:[3-57]\\d\\d|800)\\d{6}`,[9],[[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`70`],`0$1`],[`(\\d{2})(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`32`],`0$1`],[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[57]`]],[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[348]`],`0$1`]],`0`],GF:[`594`,`00`,`[56]94\\d{6}|(?:80|9\\d)\\d{7}`,[9],[[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[56]|9[47]`],`0$1`],[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[89]`],`0$1`]],`0`],GG:[`44`,`00`,`(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?`,[7,9,10],0,`0`,0,`([25-9]\\d{5})$|0`,`1481$1`,0,0,[[`1481[25-9]\\d{5}`,[10]],[`7(?:(?:781|839)\\d|911[17])\\d{5}`,[10]],[`80[08]\\d{7}|800\\d{6}|8001111`],[`(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d`,[7,10]],[`70\\d{8}`,[10]],0,[`(?:3[0347]|55)\\d{8}`,[10]],[`76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}`,[10]],[`56\\d{8}`,[10]]]],GH:[`233`,`00`,`(?:[235]\\d{3}|800)\\d{5}`,[8,9],[[`(\\d{3})(\\d{5})`,`$1 $2`,[`8`],`0$1`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[235]`],`0$1`]],`0`],GI:[`350`,`00`,`(?:[25]\\d|60)\\d{6}`,[8],[[`(\\d{3})(\\d{5})`,`$1 $2`,[`2`]]]],GL:[`299`,`00`,`(?:19|[2-689]\\d|70)\\d{4}`,[6],[[`(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3`,[`19|[2-9]`]]]],GM:[`220`,`00`,`[2-9]\\d{6}`,[7],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[2-9]`]]]],GN:[`224`,`00`,`722\\d{6}|(?:3|6\\d)\\d{7}`,[8,9],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`3`]],[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[67]`]]]],GP:[`590`,`00`,`590\\d{6}|(?:69|80|9\\d)\\d{7}`,[9],[[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[569]`],`0$1`],[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`8`],`0$1`]],`0`,0,0,0,0,0,[[`590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}`],[`69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}`],[`80[0-5]\\d{6}`],0,0,0,0,0,[`9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}`]]],GQ:[`240`,`00`,`222\\d{6}|(?:3\\d|55|[89]0)\\d{7}`,[9],[[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[235]`]],[`(\\d{3})(\\d{6})`,`$1 $2`,[`[89]`]]]],GR:[`30`,`00`,`5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}`,[10,11,12],[[`(\\d{2})(\\d{4})(\\d{4})`,`$1 $2 $3`,[`21|7`]],[`(\\d{4})(\\d{6})`,`$1 $2`,[`2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5`]],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[2689]`]],[`(\\d{3})(\\d{3,4})(\\d{5})`,`$1 $2 $3`,[`8`]]]],GT:[`502`,`00`,`80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}`,[8,11],[[`(\\d{4})(\\d{4})`,`$1 $2`,[`[2-8]`]],[`(\\d{4})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`1`]]]],GU:[`1`,`011`,`(?:[58]\\d\\d|671|900)\\d{7}`,[10],0,`1`,0,`([2-9]\\d{6})$|1`,`671$1`,0,`671`],GW:[`245`,`00`,`[49]\\d{8}|4\\d{6}`,[7,9],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`40`]],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[49]`]]]],GY:[`592`,`001`,`(?:[2-8]\\d{3}|9008)\\d{3}`,[7],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[2-9]`]]]],HK:[`852`,`00(?:30|5[09]|[126-9]?)`,`8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}`,[5,6,7,8,9,11],[[`(\\d{3})(\\d{2,5})`,`$1 $2`,[`900`,`9003`]],[`(\\d{4})(\\d{4})`,`$1 $2`,[`[2-7]|8[1-4]|9(?:0[1-9]|[1-8])`]],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`8`]],[`(\\d{3})(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3 $4`,[`9`]]],0,0,0,0,0,0,0,`00`],HN:[`504`,`00`,`8\\d{10}|[237-9]\\d{7}`,[8,11],[[`(\\d{4})(\\d{4})`,`$1-$2`,[`[237-9]`]]]],HR:[`385`,`00`,`(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}`,[6,7,8,9],[[`(\\d{2})(\\d{2})(\\d{2,3})`,`$1 $2 $3`,[`6[01]`],`0$1`],[`(\\d{3})(\\d{2})(\\d{2,3})`,`$1 $2 $3`,[`8`],`0$1`],[`(\\d)(\\d{4})(\\d{3})`,`$1 $2 $3`,[`1`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`6|7[245]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`9`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[2-57]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`8`],`0$1`]],`0`],HT:[`509`,`00`,`(?:[2-489]\\d|55)\\d{6}`,[8],[[`(\\d{2})(\\d{2})(\\d{4})`,`$1 $2 $3`,[`[2-589]`]]]],HU:[`36`,`00`,`[235-7]\\d{8}|[1-9]\\d{7}`,[8,9],[[`(\\d)(\\d{3})(\\d{4})`,`$1 $2 $3`,[`1`],`(06 $1)`],[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]`],`(06 $1)`],[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[2-9]`],`06 $1`]],`06`],ID:[`62`,`00[89]`,`(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}`,[7,8,9,10,11,12,13],[[`(\\d)(\\d{3})(\\d{3})`,`$1 $2 $3`,[`15`]],[`(\\d{2})(\\d{5,9})`,`$1 $2`,[`2[124]|[36]1`],`(0$1)`],[`(\\d{3})(\\d{5,7})`,`$1 $2`,[`800`],`0$1`],[`(\\d{3})(\\d{5,8})`,`$1 $2`,[`[2-79]`],`(0$1)`],[`(\\d{3})(\\d{3,4})(\\d{3})`,`$1-$2-$3`,[`8[1-35-9]`],`0$1`],[`(\\d{3})(\\d{6,8})`,`$1 $2`,[`1`],`0$1`],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`804`],`0$1`],[`(\\d{3})(\\d)(\\d{3})(\\d{3})`,`$1 $2 $3 $4`,[`80`],`0$1`],[`(\\d{3})(\\d{4})(\\d{4,5})`,`$1-$2-$3`,[`8`],`0$1`]],`0`],IE:[`353`,`00`,`(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}`,[7,8,9,10],[[`(\\d{2})(\\d{5})`,`$1 $2`,[`2[24-9]|47|58|6[237-9]|9[35-9]`],`(0$1)`],[`(\\d{3})(\\d{5})`,`$1 $2`,[`[45]0`],`(0$1)`],[`(\\d)(\\d{3,4})(\\d{4})`,`$1 $2 $3`,[`1`],`(0$1)`],[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[2569]|4[1-69]|7[14]`],`(0$1)`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`70`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`81`],`(0$1)`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[78]`],`0$1`],[`(\\d{4})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`1`]],[`(\\d{2})(\\d{4})(\\d{4})`,`$1 $2 $3`,[`4`],`(0$1)`],[`(\\d{2})(\\d)(\\d{3})(\\d{4})`,`$1 $2 $3 $4`,[`8`],`0$1`]],`0`],IL:[`972`,`0(?:0|1[2-9])`,`1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}`,[7,8,9,10,11,12],[[`(\\d{4})(\\d{3})`,`$1-$2`,[`125`]],[`(\\d{4})(\\d{2})(\\d{2})`,`$1-$2-$3`,[`121`]],[`(\\d)(\\d{3})(\\d{4})`,`$1-$2-$3`,[`[2-489]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1-$2-$3`,[`[57]`],`0$1`],[`(\\d{4})(\\d{3})(\\d{3})`,`$1-$2-$3`,[`12`]],[`(\\d{4})(\\d{6})`,`$1-$2`,[`159`]],[`(\\d)(\\d{3})(\\d{3})(\\d{3})`,`$1-$2-$3-$4`,[`1[7-9]`]],[`(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})`,`$1-$2 $3-$4`,[`15`]]],`0`],IM:[`44`,`00`,`1624\\d{6}|(?:[3578]\\d|90)\\d{8}`,[10],0,`0`,0,`([25-8]\\d{5})$|0`,`1624$1`,0,`74576|(?:16|7[56])24`],IN:[`91`,`00`,`(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}`,[8,9,10,11,12,13],[[`(\\d{8})`,`$1`,[`5(?:0|2[23]|3[03]|[67]1|88)`,`5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)`,`5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)`],0,1],[`(\\d{4})(\\d{4,5})`,`$1 $2`,[`180`,`1800`],0,1],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`140`],0,1],[`(\\d{2})(\\d{4})(\\d{4})`,`$1 $2 $3`,[`11|2[02]|33|4[04]|79[1-7]|80[2-46]`,`11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])`,`11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])`],`0$1`,1],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]`,`1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]`,`1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]`],`0$1`,1],[`(\\d{4})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2
13-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807`,`1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]`,`1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]`],`0$1`,1],[`(\\d{5})(\\d{5})`,`$1 $2`,[`[6-9]`],`0$1`,1],[`(\\d{4})(\\d{2,4})(\\d{4})`,`$1 $2 $3`,[`1(?:6|8[06])`,`1(?:6|8[06]0)`],0,1],[`(\\d{4})(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3 $4`,[`18`],0,1]],`0`],IO:[`246`,`00`,`3\\d{6}`,[7],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`3`]]]],IQ:[`964`,`00`,`(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}`,[8,9,10],[[`(\\d)(\\d{3})(\\d{4})`,`$1 $2 $3`,[`1`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[2-6]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`7`],`0$1`]],`0`],IR:[`98`,`00`,`[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}`,[4,5,6,7,10],[[`(\\d{4,5})`,`$1`,[`96`],`0$1`],[`(\\d{2})(\\d{4,5})`,`$1 $2`,[`(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`9`],`0$1`],[`(\\d{2})(\\d{4})(\\d{4})`,`$1 $2 $3`,[`[1-8]`],`0$1`]],`0`],IS:[`354`,`00|1(?:0(?:01|[12]0)|100)`,`(?:38\\d|[4-9])\\d{6}`,[7,9],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[4-9]`]],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`3`]]],0,0,0,0,0,0,0,`00`],IT:[`39`,`00`,`0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?`,[6,7,8,9,10,11,12],[[`(\\d{2})(\\d{4,6})`,`$1 $2`,[`0[26]`]],[`(\\d{3})(\\d{3,6})`,`$1 $2`,[`0[13-57-9][0159]|8(?:03|4[17]|9[2-5])`,`0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))`]],[`(\\d{4})(\\d{2,6})`,`$1 $2`,[`0(?:[13-579][2-46-8]|8[236-8])`]],[`(\\d{4})(\\d{4})`,`$1 $2`,[`894`]],[`(\\d{2})(\\d{3,4})(\\d{4})`,`$1 $2 $3`,[`0[26]|5`]],[`(\\d{3})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`1(?:44|[679])|[378]|43`]],[`(\\d{3})(\\d{3,4})(\\d{4})`,`$1 $2 $3`,[`0[13-57-9][0159]|14`]],[`(\\d{2})(\\d{4})(\\d{5})`,`$1 $2 $3`,[`0[26]`]],[`(\\d{4})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`0`]],[`(\\d{3})(\\d{4})(\\d{4,5})`,`$1 $2 $3`,[`3`]]],0,0,0,0,0,0,[[`0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}`,[6,7,8,9,10,11]],[`3[2-9]\\d{7,8}|(?:31|43)\\d{8}`,[9,10]],[`80(?:0\\d{3}|3)\\d{3}`,[6,9]],[`(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}`,[6,8,9,10]],[`1(?:78\\d|99)\\d{6}`,[9,10]],[`3[2-8]\\d{9,10}`,[11,12]],0,0,[`55\\d{8}`,[10]],[`84(?:[08]\\d{3}|[17])\\d{3}`,[6,9]]]],JE:[`44`,`00`,`1534\\d{6}|(?:[3578]\\d|90)\\d{8}`,[10],0,`0`,0,`([0-24-8]\\d{5})$|0`,`1534$1`,0,0,[[`1534[0-24-8]\\d{5}`],[`7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}`],[`80(?:07(?:35|81)|8901)\\d{4}`],[`(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}`],[`701511\\d{4}`],0,[`(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}`],[`76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}`],[`56\\d{8}`]]],JM:[`1`,`011`,`(?:[58]\\d\\d|658|900)\\d{7}`,[10],0,`1`,0,0,0,0,`658|876`],JO:[`962`,`00`,`(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}`,[8,9],[[`(\\d)(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[2356]|87`],`(0$1)`],[`(\\d{3})(\\d{5,6})`,`$1 $2`,[`[89]`],`0$1`],[`(\\d{2})(\\d{7})`,`$1 $2`,[`70`],`0$1`],[`(\\d)(\\d{4})(\\d{4})`,`$1 $2 $3`,[`7`],`0$1`]],`0`],JP:[`81`,`010`,`00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}`,[8,9,10,11,12,13,14,15,16,17],[[`(\\d{3})(\\d{3})(\\d{3})`,`$1-$2-$3`,[`(?:12|57|99)0`],`0$1`],[`(\\d{4})(\\d)(\\d{4})`,`$1-$2-$3`,[`1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])`,`1(?
13:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]`,`1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1-$2-$3`,[`60`],`0$1`],[`(\\d)(\\d{4})(\\d{4})`,`$1-$2-$3`,[`[36]|4(?:2[09]|7[01])`,`[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))`],`0$1`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1-$2-$3`,[`1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])`,`1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]`,`1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]`],`0$1`],[`(\\d{3})(\\d{2})(\\d{4})`,`$1-$2-$3`,[`[14]|[289][2-9]|5[3-9]|7[2-4679]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{4})`,`$1-$2-$3`,[`800`],`0$1`],[`(\\d{2})(\\d{4})(\\d{4})`,`$1-$2-$3`,[`[257-9]`],`0$1`]],`0`,0,`(000[259]\\d{6})$|(?:(?:003768)0?)|0`,`$1`],KE:[`254`,`000`,`(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}`,[7,8,9,10],[[`(\\d{2})(\\d{5,7})`,`$1 $2`,[`[24-6]`],`0$1`],[`(\\d{3})(\\d{6})`,`$1 $2`,[`[17]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[89]`],`0$1`]],`0`],KG:[`996`,`00`,`8\\d{9}|[235-9]\\d{8}`,[9,10],[[`(\\d{4})(\\d{5})`,`$1 $2`,[`3(?:1[346]|[24-79])`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[235-79]|88`],`0$1`],[`(\\d{3})(\\d{3})(\\d)(\\d{2,3})`,`$1 $2 $3 $4`,[`8`],`0$1`]],`0`],KH:[`855`,`00[14-9]`,`1\\d{9}|[1-9]\\d{7,8}`,[8,9,10],[[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[1-9]`],`0$1`],[`(\\d{4})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`1`]]],`0`],KI:[`686`,`00`,`(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}`,[5,8],0,`0`],KM:[`269`,`00`,`[3478]\\d{6}`,[7],[[`(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3`,[`[3478]`]]]],KN:[`1`,`011`,`(?:[58]\\d\\d|900)\\d{7}`,[10],0,`1`,0,`([2-7]\\d{6})$|1`,`869$1`,0,`869`],KP:[`850`,`00|99`,`85\\d{6}|(?:19\\d|[2-7])\\d{7}`,[8,10],[[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`8`],`0$1`],[`(\\d)(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[2-7]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`1`],`0$1`]],`0`],KR:[`82`,`00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))`,`00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}`,[5,6,8,9,10,11,12,13,14],[[`(\\d{2})(\\d{3,4})`,`$1-$2`,[`(?:3[1-3]|[46][1-4]|5[1-5])1`],`0$1`],[`(\\d{4})(\\d{4})`,`$1-$2`,[`1`]],[`(\\d)(\\d{3,4})(\\d{4})`,`$1-$2-$3`,[`2`],`0$1`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1-$2-$3`,[`[36]0|8`],`0$1`],[`(\\d{2})(\\d{3,4})(\\d{4})`,`$1-$2-$3`,[`[1346]|5[1-5]`],`0$1`],[`(\\d{2})(\\d{4})(\\d{4})`,`$1-$2-$3`,[`[57]`],`0$1`],[`(\\d{2})(\\d{5})(\\d{4})`,`$1-$2-$3`,[`5`],`0$1`]],`0`,0,`0(8(?:[1-46-8]|5\\d\\d))?`],KW:[`965`,`00`,`18\\d{5}
13|(?:[2569]\\d|41)\\d{6}`,[7,8],[[`(\\d{4})(\\d{3,4})`,`$1 $2`,[`[169]|2(?:[235]|4[1-35-9])|52`]],[`(\\d{3})(\\d{5})`,`$1 $2`,[`[245]`]]]],KY:[`1`,`011`,`(?:345|[58]\\d\\d|900)\\d{7}`,[10],0,`1`,0,`([2-9]\\d{6})$|1`,`345$1`,0,`345`],KZ:[`7`,`810`,`(?:33622|8\\d{8})\\d{5}|[78]\\d{9}`,[10,14],0,`8`,0,0,0,0,`33|7`,0,`8~10`],LA:[`856`,`00`,`[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}`,[8,9,10],[[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`2[13]|3[14]|[4-8]`],`0$1`],[`(\\d{2})(\\d{2})(\\d{2})(\\d{3})`,`$1 $2 $3 $4`,[`30[0135-9]`],`0$1`],[`(\\d{2})(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3 $4`,[`[23]`],`0$1`]],`0`],LB:[`961`,`00`,`[27-9]\\d{7}|[13-9]\\d{6}`,[7,8],[[`(\\d)(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[27-9]`]]],`0`],LC:[`1`,`011`,`(?:[58]\\d\\d|758|900)\\d{7}`,[10],0,`1`,0,`([2-8]\\d{6})$|1`,`758$1`,0,`758`],LI:[`423`,`00`,`[68]\\d{8}|(?:[2378]\\d|90)\\d{5}`,[7,9],[[`(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3`,[`[2379]|8(?:0[09]|7)`,`[2379]|8(?:0(?:02|9)|7)`]],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`8`]],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`69`]],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`6`]]],`0`,0,`(1001)|0`],LK:[`94`,`00`,`[1-9]\\d{8}`,[9],[[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`7`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[1-689]`],`0$1`]],`0`],LR:[`231`,`00`,`(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}`,[7,8,9],[[`(\\d)(\\d{3})(\\d{3})`,`$1 $2 $3`,[`4[67]|[56]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`2`],`0$1`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[2-578]`],`0$1`]],`0`],LS:[`266`,`00`,`(?:[256]\\d\\d|800)\\d{5}`,[8],[[`(\\d{4})(\\d{4})`,`$1 $2`,[`[2568]`]]]],LT:[`370`,`00`,`(?:[3469]\\d|52|[78]0)\\d{6}`,[8],[[`(\\d)(\\d{3})(\\d{4})`,`$1 $2 $3`,[`52[0-7]`],`(0-$1)`,1],[`(\\d{3})(\\d{2})(\\d{3})`,`$1 $2 $3`,[`[7-9]`],`0 $1`,1],[`(\\d{2})(\\d{6})`,`$1 $2`,[`37|4(?:[15]|6[1-8])`],`(0-$1)`,1],[`(\\d{3})(\\d{5})`,`$1 $2`,[`[3-6]`],`(0-$1)`,1]],`0`,0,`[08]`],LU:[`352`,`00`,`35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}`,[4,5,6,7,8,9,10,11],[[`(\\d{2})(\\d{3})`,`$1 $2`,[`2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])`]],[`(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3`,[`2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])`]],[`(\\d{2})(\\d{2})(\\d{3})`,`$1 $2 $3`,[`20[2-689]`]],[`(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})`,`$1 $2 $3 $4`,[`2(?:[0367]|4[3-8])`]],[`(\\d{3})(\\d{2})(\\d{3})`,`$1 $2 $3`,[`80[01]|90[015]`]],[`(\\d{2})(\\d{2})(\\d{2})(\\d{3})`,`$1 $2 $3 $4`,[`20`]],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`6`]],[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})`,`$1 $2 $3 $4 $5`,[`2(?:[0367]|4[3-8])`]],[`(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})`,`$1 $2 $3 $4`,[`[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]`]]],0,0,`(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)`],LV:[`371`,`00`,`(?:[268]\\d|90)\\d{6}`,[8],[[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[269]|8[01]`]]]],LY:[`218`,`00`,`[2-9]\\d{8}`,[9],[[`(\\d{2})(\\d{7})`,`$1-$2`,[`[2-9]`],`0$1`]],`0`],MA:[`212`,`00`,`[5-8]\\d{8}`,[9],[[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`5[45]`],`0$1`],[`(\\d{4})(\\d{5})`,`$1-$2`,[`5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)`],`0$1`],[`(\\d{2})(\\d{7})`,`$1-$2`,[`8`],`0$1`],[`(\\d{3})(\\d{6})`,`$1-$2`,[`[5-7]`],`0$1`]],`0`,0,0,0,0,0,[[`5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}`],[`(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}`],[`80[0-7]\\d{6}`],[`89\\d{7}`],0,0,0,0,[`(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}`]]],MC:[`377`,`00`,`(?:[3489]|6\\d)\\d{7}`,[8,9],[[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`4`],`0$1`],[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[389]`]],[`(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4 $5`,[`6`],`0$1`]],`0`],MD:[`373`,`00`,`(?:[235-7]\\d|[89]0)\\d{6}`,[8],[[`(\\d{3})(\\d{5})`,`$1 $2`,[`[89]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`22|3`],`0$1`],[`(\\d{3})(\\d{2})(\\d{3})`,`$1 $2 $3`,[`[25-7]`],`0$1`]],`0`],ME:[`382`,`00`,`(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}`,[8,9],[[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[2-9]`],`0$1`]],`0`],MF:[`590`,`00`,`590\\d{6}|(?:69|80|9\\d)\\d{7}`,[9],0,`0`,0,0,0,0,0,[[`590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}`],[`69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}`],[`80[0-5]\\d{6}`],0,0,0,0,0,[`9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}`]]],MG:[`261`,`00`,`[23]\\d{8}`,[9],[[`(\\d{2})(\\d{2})(\\d{3})(\\d{2})`,`$1 $2 $3 $4`,[`[23]`],`0$1`]],`0`,0,`([24-9]\\d{6})$|0`,`20$1`],MH:[`692`,`011`,`329\\d{4}|(?:[256]\\d|45)\\d{5}`,[7],[[`(\\d{3})(\\d{4})`,`$1-$2`,[`[2-6]`]]],`1`],MK:[`389`,`00`,`[2-578]\\d{7}`,[8],[[`(\\d)(\\d{3})(\\d{4})`,`$1 $2 $3`,[`2|34[47]|4(?:[37]7|5[47]|64)`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[347]`],`0$1`],[`(\\d{3})(\\d)(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[58]`],`0$1`]],`0`],ML:[`223`,`00`,`[24-9]\\d{7}`,[8],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[24-9]`]]]],MM:[`95`,`00`,`1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}`,[6,7,8,9,10],[[`(\\d)(\\d{2})(\\d{3})`,`$1 $2 $3`,[`16|2`],`0$1`],[`(\\d{2})(\\d{2})(\\d{3})`,`$1 $2 $3`,[`[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]`],`0$1`],[`(\\d)(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[12]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[4-7]|8[1-35]`],`0$1`],[`(\\d)(\\d{3})(\\d{4,6})`,`$1 $2 $3`,[`9(?:2[0-4]|[35-9]|4[137-9])`],`0$1`],[`(\\d)(\\d{4})(\\d{4})`,`$1 $2 $3`,[`2`],`0$1`],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`8`],`0$1`],[`(\\d)(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3 $4`,[`92`],`0$1`],[`(\\d)(\\d{5})(\\d{4})`,`$1 $2 $3`,[`9`],`0$1`]],`0`],MN:[`976`,`001`,`[12]\\d{7,9}|[5-9]\\d{7}`,[8,9,10],[[`(\\d{2})(\\d{2})(\\d{4})`,`$1 $2 $3`,[`[12]1`],`0$1`],[`(\\d{4})(\\d{4})`,`$1 $2`,[`[5-9]`]],[`(\\d{3})(\\d{5,6})`,`$1 $2`,[`[12]2[1-3]`],`0$1`],[`(\\d{4})(\\d{5,6})`,`$1 $2`,[`[12](?:27|3[2-8]|4[2-68]|5[1-4689])`,`[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]`],`0$1`],[`(\\d{5})(\\d{4,5})`,`$1 $2`,[`[12]`],`0$1`]],`0`],MO:[`853`,`00`,`0800\\d{3}|(?:28|[68]\\d)\\d{6}`,[7,8],[[`(\\d{4})(\\d{3})`,`$1 $2`,[`0`]],[`(\\d{4})(\\d{4})`,`$1 $2`,[`[268]`]]]],MP:[`1`,`011`,`[58]\\d{9}|(?:67|90)0\\d{7}`,[10],0,`1`,0,`([2-9]\\d{6})$|1`,`670$1`,0,`670`],MQ:[`596`,`00`,`596\\d{6}|(?:69|80|9\\d)\\d{7}`,[9],[[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[569]`],`0$1`],[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`8`],`0$1`]],`0`],MR:[`222`,`00`,`(?:[2-4]\\d\\d|800)\\d{5}`,[8],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[2-48]`]]]],MS:[`1`,`011`,`(?:[58]\\d\\d|664|900)\\d{7}`,[10],0,`1`,0,`([34]\\d{6})$|1`,`664$1`,0,`664`],MT:[`356`,`00`,`3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}`,[8],[[`(\\d{4})(\\d{4})`,`$1 $2`,[`[2357-9]`]]]],MU:[`230`,`0(?:0|[24-7]0|3[03])`,`(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}`,[7,8,10],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[2-46]|8[013]`]],[`(\\d{4})(\\d{4})`,`$1 $2`,[`[57]`]],[`(\\d{5})(\\d{5})`,`$1 $2`,[`8`]]],0,0,0,0,0,0,0,`020`],MV:[`960`,`0(?:0|19)`,`(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}`,[7,10],[[`(\\d{3})(\\d{4})`,`$1-$2`,[`[34679]`]],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[89]`]]],0,0,0,0,0,0,0,`00`],MW:[`265`,`00`,`(?:[1289]\\d|31|77)\\d{7}|1\\d{6}`,[7,9],[[`(\\d)(\\d{3})(\\d{3})`,`$1 $2 $3`,[`1[2-9]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`2`],`0$1`],[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[137-9]`],`0$1`]],`0`],MX:[`52`,`0[09]`,`[2-9]\\d{9}`,[10],[[`(\\d{2})(\\d{4})(\\d{4})`,`$1 $2 $3`,[`33|5[56]|81`]],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[2-9]`]]],0,0,0,0,0,0,0,`00`],MY:[`60`,`00`,`1\\d{8,9}|(?:3\\d|[4-9])\\d{7}`,[8,9,10],[[`(\\d)(\\d{3})(\\d{4})`,`$1-$2 $3`,[`[4-79]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1-$2 $3`,[`1(?:[02469]|[378][1-9]|53)|8`,`1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8`],`0$1`],[`(\\d)(\\d{4})(\\d{4})`,`$1-$2 $3`,[`3`],`0$1`],[`(\\d)(\\d{3})(\\d{2})(\\d{4})`,`$1-$2-$3-$4`,[`1(?:[367]|80)`]],[`(\\d{3})(\\d{3})(\\d{4})`,`$1-$2 $3`,[`15`],`0$1`],[`(\\d{2})(\\d{4})(\\d{4})`,`$1-$2 $3`,[`1`],`0$1`]],`0`],MZ:[`258`,`00`,`(?:2|8\\d)\\d{7}`,[8,9],[[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`2|8[2-79]`]],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`8`]]]],NA:[`264`,`00`,`[68]\\d{7,8}`,[8,9],[[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`88`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`6`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`87`],`0$1`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`8`],`0$1`]],`0`],NC:[`687`,`00`,`(?:050|[2-57-9]\\d\\d)\\d{3}`,[6],[[`(\\d{2})(\\d{2})(\\d{2})`,`$1.$2.$3`,[`[02-57-9]`]]]],NE:[`227`,`00`,`[027-9]\\d{7}`,[8],[[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`08`]],[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[089]|2[013]|7[0467]`]]]],NF:[`672`,`00`,`[13]\\d{5}`,[6],[[`(\\d{2})(\\d{4})`,`$1 $2`,[`1[0-3]`]],[`(\\d)(\\d{5})`,`$1 $2`,[`[13]`]]],0,0,`([0-258]\\d{4})$`,`3$1`],NG:[`234`,`009`,`2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}`,[7,8,10,11,12,13,14],[[`(\\d{2})(\\d{2})(\\d{3})`,`$1 $2 $3`,[`78`],`0$1`],[`(\\d)(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[12]|9(?:0[3-9]|[1-9])`],`0$1`],[`(\\d{2})(\\d{3})(\\d{2,3})`,`$1 $2 $3`,[`[3-6]|7(?:0[0-689]|[1-79])|8[2-9]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[7-9]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`20[129]`],`0$1`],[`(\\d{4})(\\d{2})(\\d{4})`,`$1 $2 $3`,[`2`],`0$1`],[`(\\d{3})(\\d{4})(\\d{4,5})`,`$1 $2 $3`,[`[78]`],`0$1`],[`(\\d{3})(\\d{5})(\\d{5,6})`,`$1 $2 $3`,[`[78]`],`0$1`]],`0`],NI:[`505`,`00`,`(?:1800|[25-8]\\d{3})\\d{4}`,[8],[[`(\\d{4})(\\d{4})`,`$1 $2`,[`[125-8]`]]]],NL:[`31`,`00`,`(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}`,[5,6,7,8,9,10,11],[[`(\\d{3})(\\d{4,7})`,`$1 $2`,[`[89]0`],`0$1`],[`(\\d{2})(\\d{7})`,`$1 $2`,[`66`],`0$1`],[`(\\d)(\\d{8})`,`$1 $2`,[`6`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`1[16-8]|2[259]|3[124]|4[17-9]|5[124679]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[1-578]|91`],`0$1`],[`(\\d{3})(\\d{3})(\\d{5})`,`$1 $2 $3`,[`9`],`0$1`]],`0`],NO:[`47`,`00`,`(?:0|[2-9]\\d{3})\\d{4}`,[5,8],[[`(\\d{3})(\\d{2})(\\d{3})`,`$1 $2 $3`,[`8`]],[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[2-79]`]]],0,0,0,0,0,`[02-689]|7[0-8]`],NP:[`977`,`00`,`(?:1\\d|9)\\d{9}|[1-9]\\d{7}`,[8,10,11],[[`(\\d)(\\d{7})`,`$1-$2`,[`1[2-6]`],`0$1`],[`(\\d{2})(\\d{6})`,`$1-$2`,[`1[01]|[2-8]|9(?:[1-59]|[67][2-6])`],`0$1`],[`(\\d{3})(\\d{7})`,`$1-$2`,[`9`]]],`0`],NR:[`674`,`00`,`(?:444|(?:55|8\\d)\\d|666)\\d{4}`,[7],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[4-68]`]]]],NU:[`683`,`00`,`(?:[4-7]|888\\d)\\d{3}`,[4,7],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`8`]]]],NZ:[`64`,`0(?:0|161)`,`[1289]\\d{9}|50\\d{5}
13(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}`,[5,6,7,8,9,10],[[`(\\d{2})(\\d{3,8})`,`$1 $2`,[`8[1-79]`],`0$1`],[`(\\d{3})(\\d{2})(\\d{2,3})`,`$1 $2 $3`,[`50[036-8]|8|90`,`50(?:[0367]|88)|8|90`],`0$1`],[`(\\d)(\\d{3})(\\d{4})`,`$1 $2 $3`,[`24|[346]|7[2-57-9]|9[2-9]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`2(?:10|74)|[589]`],`0$1`],[`(\\d{2})(\\d{3,4})(\\d{4})`,`$1 $2 $3`,[`1|2[028]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3,5})`,`$1 $2 $3`,[`2(?:[169]|7[0-35-9])|7`],`0$1`]],`0`,0,0,0,0,0,0,`00`],OM:[`968`,`00`,`(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}`,[7,8,9],[[`(\\d{3})(\\d{4,6})`,`$1 $2`,[`[58]`]],[`(\\d{2})(\\d{6})`,`$1 $2`,[`2`]],[`(\\d{4})(\\d{4})`,`$1 $2`,[`[179]`]]]],PA:[`507`,`00`,`(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}`,[7,8,10,11],[[`(\\d{3})(\\d{4})`,`$1-$2`,[`[1-57-9]`]],[`(\\d{4})(\\d{4})`,`$1-$2`,[`[68]`]],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`8`]]]],PE:[`51`,`00|19(?:1[124]|77|90)00`,`(?:[14-8]|9\\d)\\d{7}`,[8,9],[[`(\\d{3})(\\d{5})`,`$1 $2`,[`80`],`(0$1)`],[`(\\d)(\\d{7})`,`$1 $2`,[`1`],`(0$1)`],[`(\\d{2})(\\d{6})`,`$1 $2`,[`[4-8]`],`(0$1)`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`9`]]],`0`,0,0,0,0,0,0,`00`,` Anexo `],PF:[`689`,`00`,`4\\d{5}(?:\\d{2})?|8\\d{7,8}`,[6,8,9],[[`(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3`,[`44`]],[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`4|8[7-9]`]],[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`8`]]]],PG:[`675`,`00|140[1-3]`,`(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}`,[7,8],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`18|[2-69]|85`]],[`(\\d{4})(\\d{4})`,`$1 $2`,[`[78]`]]],0,0,0,0,0,0,0,`00`],PH:[`63`,`00`,`(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}`,[6,8,9,10,11,12,13],[[`(\\d)(\\d{5})`,`$1 $2`,[`2`],`(0$1)`],[`(\\d{4})(\\d{4,6})`,`$1 $2`,[`3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2`,`3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))`],`(0$1)`],[`(\\d{5})(\\d{4})`,`$1 $2`,[`346|4(?:27|9[35])|883`,`3469|4(?:279|9(?:30|56))|8834`],`(0$1)`],[`(\\d)(\\d{4})(\\d{4})`,`$1 $2 $3`,[`2`],`(0$1)`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[3-7]|8[2-8]`],`(0$1)`],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[89]`],`0$1`],[`(\\d{4})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`1`]],[`(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})`,`$1 $2 $3 $4`,[`1`]]],`0`],PK:[`92`,`00`,`122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}`,[8,9,10,11,12],[[`(\\d{3})(\\d{3})(\\d{2,7})`,`$1 $2 $3`,[`[89]0`],`0$1`],[`(\\d{4})(\\d{5})`,`$1 $2`,[`1`]],[`(\\d{3})(\\d{6,7})`,`$1 $2`,[`2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])`,`9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]`],`(0$1)`],[`(\\d{2})(\\d{7,8})`,`$1 $2`,[`(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]`],`(0$1)`],[`(\\d{5})(\\d{5})`,`$1 $2`,[`58`],`(0$1)`],[`(\\d{3})(\\d{7})`,`$1 $2`,[`3`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3 $4`,[`2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91`],`(0$1)`],[`(\\d{3})(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3 $4`,[`[24-9]`],`(0$1)`]],`0`],PL:[`48`,`00`,`(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}`,[6,7,8,9,10],[[`(\\d{5})`,`$1`,[`19`]],[`(\\d{3})(\\d{3})`,`$1 $2`,[`11|20|64`]],[`(\\d{2})(\\d{2})(\\d{3})`,`$1 $2 $3`,[`(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1`,`(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19`]],[`(\\d{3})(\\d{2})(\\d{2,3})`,`$1 $2 $3`,[`64`]],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)`]],[`(\\d{2})(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`1[2-8]|[2-7]|8[1-79]|9[145]`]],[`(\\d{3})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`8`]]]],PM:[`508`,`00`,`[45]\\d{5}|(?:708|80\\d)\\d{6}`,[6,9],[[`(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3`,[`[45]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`7`]],[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`8`],`0$1`]],`0`],PR:[`1`,`011`,`(?:[589]\\d\\d|787)\\d{7}`,[10],0,`1`,0,0,0,0,`787|939`],PS:[`970`,`00`,`[2489]2\\d{6}|(?:1\\d|5)\\d{8}`,[8,9,10],[[`(\\d)(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[2489]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`5`],`0$1`],[`(\\d{4})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`1`]]],`0`],PT:[`351`,`00`,`1693\\d{5}|(?:[26-9]\\d|30)\\d{7}`,[9],[[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`2[12]`]],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`16|[236-9]`]]]],PW:[`680`,`01[12]`,`(?:[24-8]\\d\\d|345|900)\\d{4}`,[7],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[2-9]`]]]],PY:[`595`,`00`,`59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}`,[6,7,8,9,10,11],[[`(\\d{3})(\\d{3,6})`,`$1 $2`,[`[2-9]0`],`0$1`],[`(\\d{2})(\\d{5})`,`$1 $2`,[`[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]`],`(0$1)`],[`(\\d{3})(\\d{4,5})`,`$1 $2`,[`2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85`],`(0$1)`],[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]`],`(0$1)`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`87`]],[`(\\d{3})(\\d{6})`,`$1 $2`,[`9(?:[5-79]|8[1-7])`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[2-8]`],`0$1`],[`(\\d{4})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`9`]]],`0`],QA:[`974`,`00`,`800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}`,[7,8,9,11],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`2[16]|8`]],[`(\\d{4})(\\d{4})`,`$1 $2`,[`[3-7]`]]]],RE:[`262`,`00`,`(?:26|[689]\\d)\\d{7}`,[9],[[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[2689]`],`0$1`]],`0`,0,0,0,0,0,[[`26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}`],[`69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}`],[`80\\d{7}`],[`89[1-37-9]\\d{6}`],0,0,0,0,[`9(?:399[0-3]|479[0-5]|76(?:2[278]|3[0-37]))\\d{4}`],[`8(?:1[019]|2[0156]|84|90)\\d{6}`]]],RO:[`40`,`00`,`(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}`,[6,9],[[`(\\d{3})(\\d{3})`,`$1 $2`,[`2[3-6]`,`2[3-6]\\d9`],`0$1`],[`(\\d{2})(\\d{4})`,`$1 $2`,[`219|31`],`0$1`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[23]1`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[236-9]`],`0$1`]],`0`,0,0,0,0,0,0,0,` int `],RS:[`381`,`00`,`38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}`,[6,7,8,9,10,11,12],[[`(\\d{3})(\\d{3,9}
13)`,`$1 $2`,[`(?:2[389]|39)0|[7-9]`],`0$1`],[`(\\d{2})(\\d{5,10})`,`$1 $2`,[`[1-36]`],`0$1`]],`0`],RU:[`7`,`810`,`8\\d{13}|[347-9]\\d{9}`,[10,14],[[`(\\d{4})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`7(?:1[0-8]|2[1-9])`,`7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))`,`7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2`],`8 ($1)`,1],[`(\\d{5})(\\d)(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`7(?:1[0-68]|2[1-9])`,`7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))`,`7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]`],`8 ($1)`,1],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`7`],`8 ($1)`,1],[`(\\d{3})(\\d{3})(\\d{2})(\\d{2})`,`$1 $2-$3-$4`,[`[349]|8(?:[02-7]|1[1-8])`],`8 ($1)`,1],[`(\\d{4})(\\d{4})(\\d{3})(\\d{3})`,`$1 $2 $3 $4`,[`8`],`8 ($1)`]],`8`,0,0,0,0,`3[04-689]|[489]`,0,`8~10`],RW:[`250`,`00`,`(?:06|[27]\\d\\d|[89]00)\\d{6}`,[8,9],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`0`]],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`2`]],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[7-9]`],`0$1`]],`0`],SA:[`966`,`00`,`92\\d{7}|(?:[15]|8\\d)\\d{8}`,[9,10],[[`(\\d{4})(\\d{5})`,`$1 $2`,[`9`]],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`1`],`0$1`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`5`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`81`],`0$1`],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`8`]]],`0`],SB:[`677`,`0[01]`,`[6-9]\\d{6}|[1-6]\\d{4}`,[5,7],[[`(\\d{2})(\\d{5})`,`$1 $2`,[`6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])`]]]],SC:[`248`,`010|0[0-2]`,`(?:[2489]\\d|64)\\d{5}`,[7],[[`(\\d)(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[246]|9[57]`]]],0,0,0,0,0,0,0,`00`],SD:[`249`,`00`,`[19]\\d{8}`,[9],[[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[19]`],`0$1`]],`0`],SE:[`46`,`00`,`(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}`,[6,7,8,9,10,12],[[`(\\d{2})(\\d{2,3})(\\d{2})`,`$1-$2 $3`,[`20`],`0$1`,0,`$1 $2 $3`],[`(\\d{3})(\\d{4})`,`$1-$2`,[`9(?:00|39|44|9)`],`0$1`,0,`$1 $2`],[`(\\d{2})(\\d{3})(\\d{2})`,`$1-$2 $3`,[`[12][136]|3[356]|4[0246]|6[03]|90[1-9]`],`0$1`,0,`$1 $2 $3`],[`(\\d)(\\d{2,3})(\\d{2})(\\d{2})`,`$1-$2 $3 $4`,[`8`],`0$1`,0,`$1 $2 $3 $4`],[`(\\d{3})(\\d{2,3})(\\d{2})`,`$1-$2 $3`,[`1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])`],`0$1`,0,`$1 $2 $3`],[`(\\d{3})(\\d{2,3})(\\d{3})`,`$1-$2 $3`,[`9(?:00|39|44)`],`0$1`,0,`$1 $2 $3`],[`(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})`,`$1-$2 $3 $4`,[`1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]`],`0$1`,0,`$1 $2 $3 $4`],[`(\\d{2})(\\d{3})(\\d{2})(\\d{2})`,`$1-$2 $3 $4`,[`10|7`],`0$1`,0,`$1 $2 $3 $4`],[`(\\d)(\\d{3})(\\d{3})(\\d{2})`,`$1-$2 $3 $4`,[`8`],`0$1`,0,`$1 $2 $3 $4`],[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1-$2 $3 $4`,[`[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])`],`0$1`,0,`$1 $2 $3 $4`],[`(\\d{3})(\\d{2})(\\d{2})(\\d{3})`,`$1-$2 $3 $4`,[`9`],`0$1`,0,`$1 $2 $3 $4`],[`(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})`,`$1-$2 $3 $4 $5`,[`[26]`],`0$1`,0,`$1 $2 $3 $4 $5`]],`0`],SG:[`65`,`0[0-3]\\d`,`(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}`,[8,10,11],[[`(\\d{4})(\\d{4})`,`$1 $2`,[`[369]|8(?:0[1-9]|[1-9])`]],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`8`]],[`(\\d{4})(\\d{4})(\\d{3})`,`$1 $2 $3`,[`7`]],[`(\\d{4})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`1`]]]],SH:[`290`,`00`,`(?:[256]\\d|8)\\d{3}`,[4,5],0,0,0,0,0,0,`[256]`],SI:[`386`,`00|10(?:22|66|88|99)`,`[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}`,[5,6,7,8],[[`(\\d{2})(\\d{3,6})`,`$1 $2`,[`8[09]|9`],`0$1`],[`(\\d{3})(\\d{5})`,`$1 $2`,[`59|8`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[37][01]|4[0139]|51|6`],`0$1`],[`(\\d)(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[1-57]`],`(0$1)`]],`0`,0,0,0,0,0,0,`00`],SJ:[`47`,`00`,`0\\d{4}|(?:[489]\\d|79)\\d{6}`,[5,8],0,0,0,0,0,0,`79`],SK:[`421`,`00`,`[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}`,[6,7,9],[[`(\\d)(\\d{2})(\\d{3,4})`,`$1 $2 $3`,[`21`],`0$1`],[`(\\d{2})(\\d{2})(\\d{2,3})`,`$1 $2 $3`,[`[3-5][1-8]1`,`[3-5][1-8]1[67]`],`0$1`],[`(\\d)(\\d{3})(\\d{3})(\\d{2})`,`$1/$2 $3 $4`,[`2`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[689]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{2})(\\d{2})`,`$1/$2 $3 $4`,[`[3-5]`],`0$1`]],`0`],SL:[`232`,`00`,`(?:[237-9]\\d|66)\\d{6}`,[8],[[`(\\d{2})(\\d{6})`,`$1 $2`,[`[236-9]`],`(0$1)`]],`0`],SM:[`378`,`00`,`(?:0549|[5-7]\\d)\\d{6}`,[8,10],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[5-7]`]],[`(\\d{4})(\\d{6})`,`$1 $2`,[`0`]]],0,0,`([89]\\d{5})$`,`0549$1`],SN:[`221`,`00`,`(?:[378]\\d|93)\\d{7}`,[9],[[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`8`]],[`(\\d{2})(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[379]`]]]],SO:[`252`,`00`,`[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}`,[6,7,8,9],[[`(\\d{2})(\\d{4})`,`$1 $2`,[`8[125]`]],[`(\\d{6})`,`$1`,[`[134]`]],[`(\\d)(\\d{6})`,`$1 $2`,[`[15]|2[0-79]|3[0-46-8]|4[0-7]`]],[`(\\d)(\\d{7}
13)`,`$1 $2`,[`(?:2|90)4|[67]`]],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[348]|64|79|90`]],[`(\\d{2})(\\d{5,7})`,`$1 $2`,[`1|28|6[0-35-9]|77|9[2-9]`]]],`0`],SR:[`597`,`00`,`(?:[2-5]|68|[78]\\d)\\d{5}`,[6,7],[[`(\\d{2})(\\d{2})(\\d{2})`,`$1-$2-$3`,[`56`]],[`(\\d{3})(\\d{3})`,`$1-$2`,[`[2-5]`]],[`(\\d{3})(\\d{4})`,`$1-$2`,[`[6-8]`]]]],SS:[`211`,`00`,`[19]\\d{8}`,[9],[[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[19]`],`0$1`]],`0`],ST:[`239`,`00`,`(?:22|9\\d)\\d{5}`,[7],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[29]`]]]],SV:[`503`,`00`,`[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?`,[7,8,11],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[89]`]],[`(\\d{4})(\\d{4})`,`$1 $2`,[`[267]`]],[`(\\d{3})(\\d{4})(\\d{4})`,`$1 $2 $3`,[`[89]`]]]],SX:[`1`,`011`,`7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}`,[10],0,`1`,0,`(5\\d{6})$|1`,`721$1`,0,`721`],SY:[`963`,`00`,`[1-39]\\d{8}|[1-5]\\d{7}`,[8,9],[[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[1-5]`],`0$1`,1],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`9`],`0$1`,1]],`0`],SZ:[`268`,`00`,`0800\\d{4}|(?:[237]\\d|900)\\d{6}`,[8,9],[[`(\\d{4})(\\d{4})`,`$1 $2`,[`[0237]`]],[`(\\d{5})(\\d{4})`,`$1 $2`,[`9`]]]],TA:[`290`,`00`,`8\\d{3}`,[4],0,0,0,0,0,0,`8`],TC:[`1`,`011`,`(?:[58]\\d\\d|649|900)\\d{7}`,[10],0,`1`,0,`([2-479]\\d{6})$|1`,`649$1`,0,`649`],TD:[`235`,`00|16`,`(?:22|[689]\\d|77)\\d{6}`,[8],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[26-9]`]]],0,0,0,0,0,0,0,`00`],TG:[`228`,`00`,`[279]\\d{7}`,[8],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[279]`]]]],TH:[`66`,`00[1-9]`,`(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}`,[8,9,10,13],[[`(\\d)(\\d{3})(\\d{4})`,`$1 $2 $3`,[`2`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[13-9]`],`0$1`],[`(\\d{4})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`1`]]],`0`],TJ:[`992`,`810`,`[0-57-9]\\d{8}`,[9],[[`(\\d{6})(\\d)(\\d{2})`,`$1 $2 $3`,[`331`,`3317`]],[`(\\d{3})(\\d{2})(\\d{4})`,`$1 $2 $3`,[`44[02-479]|[34]7`]],[`(\\d{4})(\\d)(\\d{4})`,`$1 $2 $3`,[`3(?:[1245]|3[12])`]],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[0-57-9]`]]],0,0,0,0,0,0,0,`8~10`],TK:[`690`,`00`,`[2-47]\\d{3,6}`,[4,5,6,7]],TL:[`670`,`00`,`7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}`,[7,8],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[2-489]|70`]],[`(\\d{4})(\\d{4})`,`$1 $2`,[`7`]]]],TM:[`993`,`810`,`(?:[1-6]\\d|71)\\d{6}`,[8],[[`(\\d{2})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2-$3-$4`,[`12`],`(8 $1)`],[`(\\d{3})(\\d)(\\d{2})(\\d{2})`,`$1 $2-$3-$4`,[`[1-5]`],`(8 $1)`],[`(\\d{2})(\\d{6})`,`$1 $2`,[`[67]`],`8 $1`]],`8`,0,0,0,0,0,0,`8~10`],TN:[`216`,`00`,`[2-57-9]\\d{7}`,[8],[[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[2-57-9]`]]]],TO:[`676`,`00`,`(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}`,[5,7],[[`(\\d{2})(\\d{3})`,`$1-$2`,[`[2-4]|50|6[09]|7[0-24-69]|8[05]`]],[`(\\d{4})(\\d{3})`,`$1 $2`,[`0`]],[`(\\d{3})(\\d{4})`,`$1 $2`,[`[5-9]`]]]],TR:[`90`,`00`,`4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}`,[7,10,12,13],[[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`512|8[01589]|90`],`0$1`,1],[`(\\d{3})(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`5(?:[0-59]|61)`,`5(?:[0-59]|61[06])`,`5(?:[0-59]|61[06]1)`],`0$1`,1],[`(\\d{3})(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[24][1-8]|3[1-9]`],`(0$1)`,1],[`(\\d{3})(\\d{3})(\\d{6,7})`,`$1 $2 $3`,[`80`],`0$1`,1]],`0`],TT:[`1`,`011`,`(?:[58]\\d\\d|900)\\d{7}`,[10],0,`1`,0,`([2-46-8]\\d{6})$|1`,`868$1`,0,`868`],TV:[`688`,`00`,`(?:2|7\\d\\d|90)\\d{4}`,[5,6,7],[[`(\\d{2})(\\d{3})`,`$1 $2`,[`2`]],[`(\\d{2})(\\d{4})`,`$1 $2`,[`90`]],[`(\\d{2})(\\d{5})`,`$1 $2`,[`7`]]]],TW:[`886`,`0(?:0[25-79]|19)`,`[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}`,[7,8,9,10,11],[[`(\\d{2})(\\d)(\\d{4})`,`$1 $2 $3`,[`202`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[258]0`],`0$1`],[`(\\d)(\\d{3,4})(\\d{4})`,`$1 $2 $3`,[`[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]`,`[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[49]`],`0$1`],[`(\\d{2})(\\d{4})(\\d{4,5})`,`$1 $2 $3`,[`7`],`0$1`]],`0`,0,0,0,0,0,0,0,`#`],TZ:[`255`,`00[056]`,`(?:[25-8]\\d|41|90)\\d{7}`,[9],[[`(\\d{3})(\\d{2})(\\d{4})`,`$1 $2 $3`,[`[89]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[24]`],`0$1`],[`(\\d{2})(\\d{7})`,`$1 $2`,[`5`]],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[67]`],`0$1`]],`0`],UA:[`380`,`00`,`[89]\\d{9}|[3-9]\\d{8}`,[9,10],[[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]`,`6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]`],`0$1`],[`(\\d{4})(\\d{5})`,`$1 $2`,[`3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])`,`3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])`],`0$1`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[3-7]|89|9[1-9]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[89]`],`0$1`]],`0`,0,0,0,0,0,0,`0~0`],UG:[`256`,`00[057]`,`800\\d{6}|(?:[29]0|[347]\\d)\\d{7}`,[9],[[`(\\d{4})(\\d{5})`,`$1 $2`,[`202`,`2024`],`0$1`],[`(\\d{3})(\\d{6})`,`$1 $2`,[`[27-9]|4(?:6[45]|[7-9])`],`0$1`],[`(\\d{2})(\\d{7})`,`$1 $2`,[`[34]`],`0$1`]],`0`],US:[`1`,`011`,`[2-9]\\d{9}|3\\d{6}`,[10],[[`(\\d{3})(\\d{4})`,`$1-$2`,[`310`],0,1],[`(\\d{3})(\\d{3})(\\d{4})`,`($1) $2-$3`,[`[2-9]`],0,1,`$1-$2-$3`]],`1`,0,0,0,0,0,[[`(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:305[3-9]|472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}`],[``],[`8(?:00|33|44|55|66|77|88)[2-9]\\d{6}`],[`900[2-9]\\d{6}`],[`52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}`],0,0,0,[`305209\\d{4}`]]],UY:[`598`,`0(?:0|1[3-9]\\d)`,`0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}`,[6,7,8,9,10,11,12,13],[[`(\\d{3})(\\d{3,4})`,`$1 $2`,[`0`]],[`(\\d{3})(\\d{4})`,`$1 $2`,[`[49]0|8`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`9`],`0$1`],[`(\\d{4})(\\d{4})`,`$1 $2`,[`[124]`]],[`(\\d{3})(\\d{3})(\\d{2,4})`,`$1 $2 $3`,[`0`]],[`(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})`,`$1 $2 $3 $4`,[`0`]]],`0`,0,0,0,0,0,0,`00`,` int. `],UZ:[`998`,`00`,`(?:20|33|[5-79]\\d|88)\\d{7}`,[9],[[`(\\d{2})(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`[235-9]`]]]],VA:[`39`,`00`,`0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}`,[6,7,8,9,10,11,12],0,0,0,0,0,0,`06698`],VC:[`1`,`011`,`(?:[58]\\d\\d|784|900)\\d{7}`,[10],0,`1`,0,`([2-7]\\d{6})$|1`,`784$1`,0,`784`],VE:[`58`,`00`,`[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}`,[10],[[`(\\d{3})(\\d{7})`,`$1-$2`,[`[24-689]`],`0$1`]],`0`],VG:[`1`,`011`,`(?:284|[58]\\d\\d|900)\\d{7}`,[10],0,`1`,0,`([2-578]\\d{6})$|1`,`284$1`,0,`284`],VI:[`1`,`011`,`[58]\\d{9}|(?:34|90)0\\d{7}`,[10],0,`1`,0,`([2-9]\\d{6})$|1`,`340$1`,0,`340`],VN:[`84`,`00`,`[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}`,[7,8,9,10],[[`(\\d{2})(\\d{5})`,`$1 $2`,[`80`],`0$1`,1],[`(\\d{4})(\\d{4,6})`,`$1 $2`,[`1`],0,1],[`(\\d{2})(\\d{3})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`6`],`0$1`,1],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[357-9]`],`0$1`,1],[`(\\d{2})(\\d{4})(\\d{4})`,`$1 $2 $3`,[`2[48]`],`0$1`,1],[`(\\d{3})(\\d{4})(\\d{3})`,`$1 $2 $3`,[`2`],`0$1`,1]],`0`],VU:[`678`,`00`,`[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}`,[5,7],[[`(\\d{3})(\\d{4})`,`$1 $2`,[`[57-9]`]]]],WF:[`681`,`00`,`(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?`,[6,9],[[`(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3`,[`[478]`]],[`(\\d{3})(\\d{2})(\\d{2})(\\d{2})`,`$1 $2 $3 $4`,[`8`]]]],WS:[`685`,`0`,`(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}`,[5,6,7,10],[[`(\\d{5})`,`$1`,[`[2-5]|6[1-9]`]],[`(\\d{3})(\\d{3,7})`,`$1 $2`,[`[68]`]],[`(\\d{2})(\\d{5})`,`$1 $2`,[`7`]]]],XK:[`383`,`00`,`2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}`,[8,9,10,11,12],[[`(\\d{3})(\\d{5})`,`$1 $2`,[`[89]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[2-4]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`2|39`],`0$1`],[`(\\d{2})(\\d{7,10})`,`$1 $2`,[`3`],`0$1`]],`0`],YE:[`967`,`00`,`(?:1|7\\d)\\d{7}|[1-7]\\d{6}`,[7,8,9],[[`(\\d)(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`[1-6]|7(?:[24-6]|8[0-7])`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`7`],`0$1`]],`0`],YT:[`262`,`00`,`(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}`,[9],0,`0`,0,0,0,0,0,[[`269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}`],[`639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}`],[`80\\d{7}`],0,0,0,0,0,[`9(?:(?:39|47)8[01]|769\\d)\\d{4}`]]],ZA:[`27`,`00`,`[1-79]\\d{8}|8\\d{4,9}`,[5,6,7,8,9,10],[[`(\\d{2})(\\d{3,4})`,`$1 $2`,[`8[1-4]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{2,3})`,`$1 $2 $3`,[`8[1-4]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`860`],`0$1`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`[1-9]`],`0$1`],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`8`],`0$1`]],`0`],ZM:[`260`,`00`,`800\\d{6}|(?:21|63|[79]\\d)\\d{7}`,[9],[[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[28]`],`0$1`],[`(\\d{2})(\\d{7})`,`$1 $2`,[`[79]`],`0$1`]],`0`],ZW:[`263`,`00`,`2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}`,[5,6,7,8,9,10],[[`(\\d{3})(\\d{3,5})`,`$1 $2`,[`2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]`],`0$1`],[`(\\d)(\\d{3})(\\d{2,4})`,`$1 $2 $3`,[`[49]`],`0$1`],[`(\\d{3})(\\d{4})`,`$1 $2`,[`80`],`0$1`],[`(\\d{2})(\\d{7})`,`$1 $2`,[`24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2`,`2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]`],`(0$1)`],[`(\\d{2})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`7`],`0$1`],[`(\\d{3})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)`,`2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)`],`0$1`],[`(\\d{4})(\\d{6})`,`$1 $2`,[`8`],`0$1`],[`(\\d{2})(\\d{3,5})`,`$1 $2`,[`1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]`],`0$1`],[`(\\d{2})(\\d{3})(\\d{3,4})`,`$1 $2 $3`,[`29[013-9]|39|54`],`0$1`],[`(\\d{4})(\\d{3,5}
13)`,`$1 $2`,[`(?:25|54)8`,`258|5483`],`0$1`]],`0`]},nonGeographic:{800:[`800`,0,`(?:00|[1-9]\\d)\\d{6}`,[8],[[`(\\d{4})(\\d{4})`,`$1 $2`,[`\\d`]]],0,0,0,0,0,0,[0,0,[`(?:00|[1-9]\\d)\\d{6}`]]],808:[`808`,0,`[1-9]\\d{7}`,[8],[[`(\\d{4})(\\d{4})`,`$1 $2`,[`[1-9]`]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,[`[1-9]\\d{7}`]]],870:[`870`,0,`7\\d{11}|[35-7]\\d{8}`,[9,12],[[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`[35-7]`]]],0,0,0,0,0,0,[0,[`(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}`]]],878:[`878`,0,`10\\d{10}`,[12],[[`(\\d{2})(\\d{5})(\\d{5})`,`$1 $2 $3`,[`1`]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,[`10\\d{10}`]]],881:[`881`,0,`6\\d{9}|[0-36-9]\\d{8}`,[9,10],[[`(\\d)(\\d{3})(\\d{5})`,`$1 $2 $3`,[`[0-37-9]`]],[`(\\d)(\\d{3})(\\d{5,6})`,`$1 $2 $3`,[`6`]]],0,0,0,0,0,0,[0,[`6\\d{9}|[0-36-9]\\d{8}`]]],882:[`882`,0,`[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?`,[7,8,9,10,11,12],[[`(\\d{2})(\\d{5})`,`$1 $2`,[`16|342`]],[`(\\d{2})(\\d{6})`,`$1 $2`,[`49`]],[`(\\d{2})(\\d{2})(\\d{4})`,`$1 $2 $3`,[`1[36]|9`]],[`(\\d{2})(\\d{4})(\\d{3})`,`$1 $2 $3`,[`3[23]`]],[`(\\d{2})(\\d{3,4})(\\d{4})`,`$1 $2 $3`,[`16`]],[`(\\d{2})(\\d{4})(\\d{4})`,`$1 $2 $3`,[`10|23|3(?:[15]|4[57])|4|51`]],[`(\\d{3})(\\d{4})(\\d{4})`,`$1 $2 $3`,[`34`]],[`(\\d{2})(\\d{4,5})(\\d{5})`,`$1 $2 $3`,[`[1-35]`]]],0,0,0,0,0,0,[0,[`342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}`,[7,8,9,10,12]],0,0,0,[`348[57]\\d{7}`,[11]],0,0,[`1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}`]]],883:[`883`,0,`(?:[1-4]\\d|51)\\d{6,10}`,[8,9,10,11,12],[[`(\\d{3})(\\d{3})(\\d{2,8})`,`$1 $2 $3`,[`[14]|2[24-689]|3[02-689]|51[24-9]`]],[`(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3`,[`510`]],[`(\\d{3})(\\d{3})(\\d{4})`,`$1 $2 $3`,[`21`]],[`(\\d{4})(\\d{4})(\\d{4})`,`$1 $2 $3`,[`51[13]`]],[`(\\d{3})(\\d{3})(\\d{3})(\\d{3})`,`$1 $2 $3 $4`,[`[235]`]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,[`(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}`]]],888:[`888`,0,`\\d{11}`,[11],[[`(\\d{3})(\\d{3})(\\d{5})`,`$1 $2 $3`]],0,0,0,0,0,0,[0,0,0,0,0,0,[`\\d{11}`]]],979:[`979`,0,`[1359]\\d{8}`,[9],[[`(\\d)(\\d{4})(\\d{4})`,`$1 $2 $3`,[`[1359]`]]],0,0,0,0,0,0,[0,0,0,[`[1359]\\d{8}`]]]}};function withMetadataArgument(e,t){var n=Array.prototype.slice.call(t);return n.push(metadata_min_json_default),e.apply(this,n)}function _typeof$3(e){"@babel/helpers - typeof";return _typeof$3=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},_typeof$3(e)}function _defineProperties$10(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$10(e,t,n){return t&&_defineProperties$10(e.prototype,t),n&&_defineProperties$10(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _classCallCheck$10(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function _inherits$2(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$2(e,t)}function _createSuper$2(e){var t=_isNativeReflectConstruct$3();return function(){var n=_getPrototypeOf$2(e),r;if(t){var i=_getPrototypeOf$2(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn$2(this,r)}}function _possibleConstructorReturn$2(e,t){if(t&&(_typeof$3(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return _assertThisInitialized$3(e)}function _assertThisInitialized$3(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function _wrapNativeSuper$1(e){var t=typeof Map==`function`?new Map:void 0;return _wrapNativeSuper$1=function(e){if(e===null||!_isNativeFunction$1(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return _construct$1(e,arguments,_getPrototypeOf$2(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$2(n,e)},_wrapNativeSuper$1(e)}
vendor: 13,983 bytes, lines 13-14
13function _construct$1(e,t,n){return _construct$1=_isNativeReflectConstruct$3()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&_setPrototypeOf$2(i,n.prototype),i},_construct$1.apply(null,arguments)}function _isNativeReflectConstruct$3(){if(typeof Reflect>`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _isNativeFunction$1(e){return Function.toString.call(e).indexOf(`[native code]`)!==-1}function _setPrototypeOf$2(e,t){return _setPrototypeOf$2=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_setPrototypeOf$2(e,t)}function _getPrototypeOf$2(e){return _getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$2(e)}var ParseError=function(e){_inherits$2(n,e);var t=_createSuper$2(n);function n(e){var r;return _classCallCheck$10(this,n),r=t.call(this,e),Object.setPrototypeOf(_assertThisInitialized$3(r),n.prototype),r.name=r.constructor.name,r}return _createClass$10(n)}(_wrapNativeSuper$1(Error)),VALID_DIGITS=`0-90-9٠-٩۰-۹`,DASHES=`-‐-―−ー-`,SLASHES=`//`,DOTS=`..`,WHITESPACE=` \xA0­​⁠ `,BRACKETS=`()()[]\\[\\]`,TILDES=`~⁓∼~`,VALID_PUNCTUATION=``.concat(DASHES,SLASHES,DOTS,WHITESPACE,BRACKETS,TILDES),PLUS_CHARS=`++`;function semver_compare_default(e,t){e=e.split(`-`),t=t.split(`-`);for(var n=e[0].split(`.`),r=t[0].split(`.`),i=0;i<3;i++){var a=Number(n[i]),o=Number(r[i]);if(a>o)return 1;if(o>a)return-1;if(!isNaN(a)&&isNaN(o))return 1;if(isNaN(a)&&!isNaN(o))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var objectConstructor={}.constructor;function isObject$6(e){return e!=null&&e.constructor===objectConstructor}function _typeof$2(e){"@babel/helpers - typeof";return _typeof$2=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},_typeof$2(e)}function _classCallCheck$9(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function _defineProperties$9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$9(e,t,n){return t&&_defineProperties$9(e.prototype,t),n&&_defineProperties$9(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var V3=`1.2.0`,V4=`1.7.35`,DEFAULT_EXT_PREFIX=` ext. `,CALLING_CODE_REG_EXP=/^\d+$/,Metadata$1=function(){function e(t){_classCallCheck$9(this,e),validateMetadata(t),this.metadata=t,setVersion.call(this,t)}return _createClass$9(e,[{key:`getCountries`,value:function(){return Object.keys(this.metadata.countries).filter(function(e){return e!==`001`})}},{key:`getCountryMetadata`,value:function(e){return this.metadata.countries[e]}},{key:`nonGeographic`,value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:`hasCountry`,value:function(e){return this.getCountryMetadata(e)!==void 0}},{key:`hasCallingCode`,value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&t.length===1&&t[0]===`001`)return!0}}},{key:`isNonGeographicCallingCode`,value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:`country`,value:function(e){return this.selectNumberingPlan(e)}},{key:`selectNumberingPlan`,value:function(e,t){if(e&&CALLING_CODE_REG_EXP.test(e)&&(t=e,e=null),e&&e!==`001`){if(!this.hasCountry(e))throw Error(`Unknown country: ${e}`);this.numberingPlan=new NumberingPlan(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw Error(`Unknown calling code: ${t}`);this.numberingPlan=new NumberingPlan(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:`getCountryCodesForCallingCode`,value:function(e){var t=this.countryCallingCodes()[e];if(t)return t.length===1&&t[0].length===3?void 0:t}},{key:`getCountryCodeForCallingCode`,value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:`getNumberingPlanMetadata`,value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&r.length===1&&r[0]===`001`)return this.metadata.countries[`001`]}}},{key:`countryCallingCode`,value:function(){return this.numberingPlan.callingCode()}},{key:`IDDPrefix`,value:function(){return this.numberingPlan.IDDPrefix()}},{key:`defaultIDDPrefix`,value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:`nationalNumberPattern`,value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:`possibleLengths`,value:function(){return this.numberingPlan.possibleLengths()}},{key:`formats`,value:function(){return this.numberingPlan.formats()}},{key:`nationalPrefixForParsing`,value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:`nationalPrefixTransformRule`,value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:`leadingDigits`,value:function(){return this.numberingPlan.leadingDigits()}},{key:`hasTypes`,value:function(){return this.numberingPlan.hasTypes()}},{key:`type`,value:function(e){return this.numberingPlan.type(e)}},{key:`ext`,value:function(){return this.numberingPlan.ext()}},{key:`countryCallingCodes`,value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:`chooseCountryByCountryCallingCode`,value:function(e){return this.selectNumberingPlan(e)}},{key:`hasSelectedNumberingPlan`,value:function(){return this.numberingPlan!==void 0}}]),e}(),NumberingPlan=function(){function e(t,n){_classCallCheck$9(this,e),this.globalMetadataObject=n,this.metadata=t,setVersion.call(this,n.metadata)}return _createClass$9(e,[{key:`callingCode`,value:function(){return this.metadata[0]}},{key:`getDefaultCountryMetadataForRegion`,value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:`IDDPrefix`,value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:`defaultIDDPrefix`,value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:`nationalNumberPattern`,value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:`possibleLengths`,value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:`_getFormats`,value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:`formats`,value:function(){var e=this;return(this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[]).map(function(t){return new Format(t,e)})}},{key:`nationalPrefix`,value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:`_getNationalPrefixFormattingRule`,value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:`nationalPrefixFormattingRule`,value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:`_nationalPrefixForParsing`,value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:`nationalPrefixForParsing`,value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:`nationalPrefixTransformRule`,value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:`_getNationalPrefixIsOptionalWhenFormatting`,value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:`nationalPrefixIsOptionalWhenFormattingInNationalFormat`,value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:`leadingDigits`,value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:`types`,value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:`hasTypes`,value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:`type`,value:function(e){if(this.hasTypes()&&getType$1(this.types(),e))return new Type(getType$1(this.types(),e),this)}},{key:`ext`,value:function(){return this.v1||this.v2?DEFAULT_EXT_PREFIX:this.metadata[13]||DEFAULT_EXT_PREFIX}}]),e}(),Format=function(){function e(t,n){_classCallCheck$9(this,e),this._format=t,this.metadata=n}return _createClass$9(e,[{key:`pattern`,value:function(){return this._format[0]}},{key:`format`,value:function(){return this._format[1]}},{key:`leadingDigitsPatterns`,value:function(){return this._format[2]||[]}},{key:`nationalPrefixFormattingRule`,value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:`nationalPrefixIsOptionalWhenFormattingInNationalFormat`,value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:`nationalPrefixIsMandatoryWhenFormattingInNationalFormat`,value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:`usesNationalPrefix`,value:function(){return!(!this.nationalPrefixFormattingRule()||FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule()))}},{key:`internationalFormat`,value:function(){return this._format[5]||this.format()}}]),e}(),FIRST_GROUP_ONLY_PREFIX_PATTERN=/^\(?\$1\)?$/,Type=function(){function e(t,n){_classCallCheck$9(this,e),this.type=t,this.metadata=n}return _createClass$9(e,[{key:`pattern`,value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:`possibleLengths`,value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),e}();function getType$1(e,t){switch(t){case`FIXED_LINE`:return e[0];case`MOBILE`:return e[1];case`TOLL_FREE`:return e[2];case`PREMIUM_RATE`:return e[3];case`PERSONAL_NUMBER`:return e[4];case`VOICEMAIL`:return e[5];case`UAN`:return e[6];case`PAGER`:return e[7];case`VOIP`:return e[8];case`SHARED_COST`:return e[9]}}function validateMetadata(e){if(!e)throw Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!isObject$6(e)||!isObject$6(e.countries))throw Error(`[libphonenumber-js] \`metadata\` argument was passed but it's not a valid metadata. Must be an object having \`.countries\` child object property. Got ${isObject$6(e)?`an object of shape: { `+Object.keys(e).join(`, `)+` }`:`a `+typeOf$1(e)+`: `+e}.`)}var typeOf$1=function(e){return _typeof$2(e)};function getCountryCallingCode(e,t){if(t=new Metadata$1(t),t.hasCountry(e))return t.country(e).countryCallingCode();throw Error(`Unknown country: ${e}`)}function setVersion(e){var t=e.version;typeof t==`number`?(this.v1=t===1,this.v2=t===2,this.v3=t===3,this.v4=t===4):t?semver_compare_default(t,V3)===-1?this.v2=!0:semver_compare_default(t,V4)===-1?this.v3=!0:this.v4=!0:this.v1=!0}var RFC3966_EXTN_PREFIX=`;ext=`,getExtensionDigitsPattern=function(e){return`([${VALID_DIGITS}]{1,${e}})`};function createExtensionPattern(e){var t=`20`,n=`15`,r=`9`,i=`6`,a=`[ \xA0\\t,]*`,o=`[:\\..]?[ \xA0\\t,-]*`,c=`#?`,u=`(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)`,K=`(?:[xx##~~]|int|int)`,Y=`[- ]+`,X=`[ \xA0\\t]*`,ee=`(?:,{2}|;)`,te=RFC3966_EXTN_PREFIX+getExtensionDigitsPattern(t),ce=a+u+o+getExtensionDigitsPattern(t)+c,ue=a+K+o+getExtensionDigitsPattern(r)+c,de=Y+getExtensionDigitsPattern(i)+`#`,fe=X+ee+o+getExtensionDigitsPattern(n)+c,me=X+`(?:,)+`+o+getExtensionDigitsPattern(r)+c;return te+`|`+ce+`|`+ue+`|`+de+`|`+fe+`|`+me}var MIN_LENGTH_PHONE_NUMBER_PATTERN=`[`+VALID_DIGITS+`]{2}`,VALID_PHONE_NUMBER=`[`+PLUS_CHARS+`]{0,1}(?:[`+VALID_PUNCTUATION+`]*[`+VALID_DIGITS+`]){3,}[`+VALID_PUNCTUATION+VALID_DIGITS+`]*`,VALID_PHONE_NUMBER_START_REG_EXP=RegExp(`^[`+PLUS_CHARS+`]{0,1}(?:[`+VALID_PUNCTUATION+`]*[`+VALID_DIGITS+`]){1,2}$`,`i`),VALID_PHONE_NUMBER_WITH_EXTENSION=VALID_PHONE_NUMBER+`(?:`+createExtensionPattern()+`)?`,VALID_PHONE_NUMBER_PATTERN=RegExp(`^`+MIN_LENGTH_PHONE_NUMBER_PATTERN+`$|^`+VALID_PHONE_NUMBER_WITH_EXTENSION+`$`,`i`);function isViablePhoneNumber(e){return e.length>=2&&VALID_PHONE_NUMBER_PATTERN.test(e)}function isViablePhoneNumberStart(e){return VALID_PHONE_NUMBER_START_REG_EXP.test(e)}var EXTN_PATTERN=RegExp(`(?:`+createExtensionPattern()+`)$`,`i`);function extractExtension(e){var t=e.search(EXTN_PATTERN);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(EXTN_PATTERN),i=1;i<r.length;){if(r[i])return{number:n,ext:r[i]};i++}}function _createForOfIteratorHelperLoose$8(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=_unsupportedIterableToArray$18(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
14In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$18(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$18(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$18(e,t)}}function _arrayLikeToArray$18(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var DIGITS={0:`0`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,"0":`0`,"1":`1`,"2":`2`,"3":`3`,"4":`4`,"5":`5`,"6":`6`,"7":`7`,"8":`8`,"9":`9`,"٠":`0`,"١":`1`,"٢":`2`,"٣"
vendor: 6,399 bytes, lines 14-17
14:`3`,"Ù¤":`4`,"Ù¥":`5`,"Ù¦":`6`,"Ù§":`7`,"Ù¨":`8`,"Ù©":`9`,"Û°":`0`,"Û±":`1`,"Û²":`2`,"Û³":`3`,"Û´":`4`,"Ûµ":`5`,"Û¶":`6`,"Û·":`7`,"Û¸":`8`,"Û¹":`9`};function parseDigit(e){return DIGITS[e]}function parseDigits(e){for(var t=``,n=_createForOfIteratorHelperLoose$8(e.split(``)),r;!(r=n()).done;){var i=r.value,a=parseDigit(i);a&&(t+=a)}return t}function _createForOfIteratorHelperLoose$7(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=_unsupportedIterableToArray$17(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
15In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$17(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$17(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$17(e,t)}}function _arrayLikeToArray$17(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function parseIncompletePhoneNumber(e){for(var t=``,n=_createForOfIteratorHelperLoose$7(e.split(``)),r;!(r=n()).done;){var i=r.value;t+=parsePhoneNumberCharacter(i,t)||``}return t}function parsePhoneNumberCharacter(e,t,n){if(e===`+`){if(t){typeof n==`function`&&n(`end`);return}return`+`}return parseDigit(e)}function _createForOfIteratorHelperLoose$6(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=_unsupportedIterableToArray$16(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
16In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$16(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$16(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$16(e,t)}}function _arrayLikeToArray$16(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mergeArrays(e,t){for(var n=e.slice(),r=_createForOfIteratorHelperLoose$6(t),i;!(i=r()).done;){var a=i.value;e.indexOf(a)<0&&n.push(a)}return n.sort(function(e,t){return e-t})}function checkNumberLength(e,t){return checkNumberLengthForType(e,void 0,t)}function checkNumberLengthForType(e,t,n){var r=n.type(t),i=r&&r.possibleLengths()||n.possibleLengths();if(!i)return`IS_POSSIBLE`;if(t===`FIXED_LINE_OR_MOBILE`){if(!n.type(`FIXED_LINE`))return checkNumberLengthForType(e,`MOBILE`,n);var a=n.type(`MOBILE`);a&&(i=mergeArrays(i,a.possibleLengths()))}else if(t&&!r)return`INVALID_LENGTH`;var o=e.length,c=i[0];return c===o?`IS_POSSIBLE`:c>o?`TOO_SHORT`:i[i.length-1]<o?`TOO_LONG`:i.indexOf(o,1)>=0?`IS_POSSIBLE`:`INVALID_LENGTH`}function isPossiblePhoneNumber(e,t,n){if(t===void 0&&(t={}),n=new Metadata$1(n),t.v2){if(!e.countryCallingCode)throw Error(`Invalid phone number object passed`);n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw Error(`Unknown country: ${e.country}`);n.country(e.country)}else{if(!e.countryCallingCode)throw Error(`Invalid phone number object passed`);n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return isPossibleNumber(e.phone||e.nationalNumber,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw Error(`Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.`)}function isPossibleNumber(e,t){switch(checkNumberLength(e,t)){case`IS_POSSIBLE`:return!0;default:return!1}}function matchesEntirely(e,t){return e||=``,RegExp(`^(?:`+t+`)$`).test(e)}function _createForOfIteratorHelperLoose$5(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=_unsupportedIterableToArray$15(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
17In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$15(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$15(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$15(e,t)}}function _arrayLikeToArray$15(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var NON_FIXED_LINE_PHONE_TYPES=[`MOBILE`,`PREMIUM_RATE`,`TOLL_FREE`,`SHARED_COST`,`VOIP`,`PERSONAL_NUMBER`,`PAGER`,`UAN`,`VOICEMAIL`];function getNumberType(e,t,n){if(t||={},e.country||e.countryCallingCode){n=new Metadata$1(n),n.selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(matchesEntirely(r,n.nationalNumberPattern())){if(isNumberTypeEqualTo(r,`FIXED_LINE`,n))return n.type(`MOBILE`)&&n.type(`MOBILE`).pattern()===``||!n.type(`MOBILE`)||isNumberTypeEqualTo(r,`MOBILE`,n)?`FIXED_LINE_OR_MOBILE`:`FIXED_LINE`;for(var i=_createForOfIteratorHelperLoose$5(NON_FIXED_LINE_PHONE_TYPES),a;!(a=i()).done;){var o=a.value;if(isNumberTypeEqualTo(r,o,n))return o}}}}function isNumberTypeEqualTo(e,t,n){return t=n.type(t),!t||!t.pattern()||t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0?!1:matchesEntirely(e,t.pattern())}function isValidNumber(e,t,n){return t||={},n=new Metadata$1(n),n.selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?getNumberType(e,t,n.metadata)!==void 0:matchesEntirely(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}function getPossibleCountriesForNumber(e,t,n){var r=new Metadata$1(n).getCountryCodesForCallingCode(e);
17return r?r.filter(function(e){return couldNationalNumberBelongToCountry(t,e,n)}):[]}function couldNationalNumberBelongToCountry(e,t,n){var r=new Metadata$1(n);return r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0}function applyInternationalSeparatorStyle(e){return e.replace(RegExp(`[${VALID_PUNCTUATION}]+`,`g`),` `).trim()}var FIRST_GROUP_PATTERN=/(\$\d)/;function formatNationalNumberUsingFormat(e,t,n){var r=n.useInternationalFormat,i=n.withNationalPrefix;n.carrierCode,n.metadata;var a=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():i&&t.nationalPrefixFormattingRule()?t.format().replace(FIRST_GROUP_PATTERN,t.nationalPrefixFormattingRule()):t.format());return r?applyInternationalSeparatorStyle(a):a}var SINGLE_IDD_PREFIX_REG_EXP=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function getIddPrefix(e,t,n){var r=new Metadata$1(n);if(r.selectNumberingPlan(e,t),r.defaultIDDPrefix())return r.defaultIDDPrefix();if(SINGLE_IDD_PREFIX_REG_EXP.test(r.IDDPrefix()))return r.IDDPrefix()}function formatRFC3966(e){var t=e.number,n=e.ext;if(!t)return``;if(t[0]!==`+`)throw Error(`"formatRFC3966()" expects "number" to be in E.164 format.`);return`tel:${t}${n?`;ext=`+n:``}`}function _createForOfIteratorHelperLoose$4(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=_unsupportedIterableToArray$14(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
18In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$14(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$14(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$14(e,t)}}function _arrayLikeToArray$14(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ownKeys$13(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$12(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys$13(Object(n),!0).forEach(function(t){_defineProperty$5(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$13(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _defineProperty$5(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var DEFAULT_OPTIONS={formatExtension:function(e,t,n){return`${e}${n.ext()}${t}`}};function formatNumber(e,t,n,r){if(n=n?_objectSpread$12(_objectSpread$12({},DEFAULT_OPTIONS),n):DEFAULT_OPTIONS,r=new Metadata$1(r),e.country&&e.country!==`001`){if(!r.hasCountry(e.country))throw Error(`Unknown country: ${e.country}`);r.country(e.country)}else if(e.countryCallingCode)r.selectNumberingPlan(e.countryCallingCode);else return e.phone||``;var i=r.countryCallingCode(),a=n.v2?e.nationalNumber:e.phone,o;switch(t){case`NATIONAL`:return a?(o=formatNationalNumber$1(a,e.carrierCode,`NATIONAL`,r,n),addExtension(o,e.ext,r,n.formatExtension)):``;case`INTERNATIONAL`:return a?(o=formatNationalNumber$1(a,null,`INTERNATIONAL`,r,n),o=`+${i} ${o}`,addExtension(o,e.ext,r,n.formatExtension)):`+${i}`;case`E.164`:return`+${i}${a}`;case`RFC3966`:return formatRFC3966({number:`+${i}${a}`,ext:e.ext});case`IDD`:return n.fromCountry?addExtension(formatIDD(a,e.carrierCode,i,n.fromCountry,r),e.ext,r,n.formatExtension):void 0;default:throw Error(`Unknown "format" argument passed to "formatNumber()": "${t}"`)}}function formatNationalNumber$1(e,t,n,r,i){var a=chooseFormatForNumber(r.formats(),e);return a?formatNationalNumberUsingFormat(e,a,{useInternationalFormat:n===`INTERNATIONAL`,withNationalPrefix:!(a.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&i&&i.nationalPrefix===!1),carrierCode:t,metadata:r}):e}function chooseFormatForNumber(e,t){for(var n=_createForOfIteratorHelperLoose$4(e),r;!(r=n()).done;){var i=r.value;if(i.leadingDigitsPatterns().length>0){var a=i.leadingDigitsPatterns()[i.leadingDigitsPatterns().length-1];if(t.search(a)!==0)continue}if(matchesEntirely(t,i.pattern()))return i}}function addExtension(e,t,n,r){return t?r(e,t,n):e}function formatIDD(e,t,n,r,i){if(getCountryCallingCode(r,i.metadata)===n){var a=formatNationalNumber$1(e,t,`NATIONAL`,i);return n===`1`?n+` `+a:a}var o=getIddPrefix(r,void 0,i.metadata);if(o)return`${o} ${n} ${formatNationalNumber$1(e,null,`INTERNATIONAL`,i)}`}function ownKeys$12(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$11(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
vendor: 5,078 bytes, line 18
18t%2?ownKeys$12(Object(n),!0).forEach(function(t){_defineProperty$4(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$12(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _defineProperty$4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _classCallCheck$8(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function _defineProperties$8(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$8(e,t,n){return t&&_defineProperties$8(e.prototype,t),n&&_defineProperties$8(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var USE_NON_GEOGRAPHIC_COUNTRY_CODE$3=!1,PhoneNumber=function(){function e(t,n,r){if(_classCallCheck$8(this,e),!t)throw TypeError("`country` or `countryCallingCode` not passed");if(!n)throw TypeError("`nationalNumber` not passed");if(!r)throw TypeError("`metadata` not passed");var i=getCountryAndCountryCallingCode(t,r),a=i.country,o=i.countryCallingCode;this.country=a,this.countryCallingCode=o,this.nationalNumber=n,this.number=`+`+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}}return _createClass$8(e,[{key:`setExt`,value:function(e){this.ext=e}},{key:`getPossibleCountries`,value:function(){return this.country?[this.country]:getPossibleCountriesForNumber(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:`isPossible`,value:function(){return isPossiblePhoneNumber(this,{v2:!0},this.getMetadata())}},{key:`isValid`,value:function(){return isValidNumber(this,{v2:!0},this.getMetadata())}},{key:`isNonGeographic`,value:function(){return new Metadata$1(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:`isEqual`,value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:`getType`,value:function(){return getNumberType(this,{v2:!0},this.getMetadata())}},{key:`format`,value:function(e,t){return formatNumber(this,e,t?_objectSpread$11(_objectSpread$11({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:`formatNational`,value:function(e){return this.format(`NATIONAL`,e)}},{key:`formatInternational`,value:function(e){return this.format(`INTERNATIONAL`,e)}},{key:`getURI`,value:function(e){return this.format(`RFC3966`,e)}}]),e}(),isCountryCode=function(e){return/^[A-Z]{2}$/.test(e)};function getCountryAndCountryCallingCode(e,t){var n,r,i=new Metadata$1(t);return isCountryCode(e)?(n=e,i.selectNumberingPlan(n),r=i.countryCallingCode()):(r=e,USE_NON_GEOGRAPHIC_COUNTRY_CODE$3&&i.isNonGeographicCallingCode(r)&&(n=`001`)),{country:n,countryCallingCode:r}}var CAPTURING_DIGIT_PATTERN=RegExp(`([`+VALID_DIGITS+`])`);function stripIddPrefix(e,t,n,r){if(t){var i=new Metadata$1(r);i.selectNumberingPlan(t,n);var a=new RegExp(i.IDDPrefix());if(e.search(a)===0){e=e.slice(e.match(a)[0].length);var o=e.match(CAPTURING_DIGIT_PATTERN);if(!(o&&o[1]!=null&&o[1].length>0&&o[1]===`0`))return e}}}function extractNationalNumberFromPossiblyIncompleteNumber(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=RegExp(`^(?:`+t.numberingPlan.nationalPrefixForParsing()+`)`),r=n.exec(e);if(r){var i,a,o=r.length-1,c=o>0&&r[o];if(t.nationalPrefixTransformRule()&&c)i=e.replace(n,t.nationalPrefixTransformRule()),o>1&&(a=r[1]);else{var u=r[0];i=e.slice(u.length),c&&(a=r[1])}var K;if(c){var Y=e.indexOf(r[1]);e.slice(0,Y)===t.numberingPlan.nationalPrefix()&&(K=t.numberingPlan.nationalPrefix())}else K=r[0];return{nationalNumber:i,nationalPrefix:K,carrierCode:a}}}return{nationalNumber:e}}function extractNationalNumber(e,t){var n=extractNationalNumberFromPossiblyIncompleteNumber(e,t),r=n.carrierCode,i=n.nationalNumber;return i!==e&&(!shouldHaveExtractedNationalPrefix(e,i,t)||t.possibleLengths()&&!isPossibleIncompleteNationalNumber(i,t))?{nationalNumber:e}:{nationalNumber:i,carrierCode:r}}function shouldHaveExtractedNationalPrefix(e,t,n){return!(matchesEntirely(e,n.nationalNumberPattern())&&!matchesEntirely(t,n.nationalNumberPattern()))}function isPossibleIncompleteNationalNumber(e,t){switch(checkNumberLength(e,t)){case`TOO_SHORT`:case`INVALID_LENGTH`:return!1;default:return!0}}function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(e,t,n,r){var i=t?getCountryCallingCode(t,r):n;if(e.indexOf(i)===0){r=new Metadata$1(r),r.selectNumberingPlan(t,n);var a=e.slice(i.length),o=extractNationalNumber(a,r).nationalNumber,c=extractNationalNumber(e,r).nationalNumber;if(!matchesEntirely(c,r.nationalNumberPattern())&&matchesEntirely(o,r.nationalNumberPattern())||checkNumberLength(c,r)===`TOO_LONG`)return{countryCallingCode:i,number:a}}return{number:e}}function extractCountryCallingCode(e,t,n,r){if(!e)return{};var i;if(e[0]!==`+`){var a=stripIddPrefix(e,t,n,r);if(a&&a!==e)i=!0,e=`+`+a;else{if(t||n){var o=extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(e,t,n,r),c=o.c
vendor: 4,299 bytes, lines 18-19
18ountryCallingCode,u=o.number;if(c)return{countryCallingCodeSource:`FROM_NUMBER_WITHOUT_PLUS_SIGN`,countryCallingCode:c,number:u}}return{number:e}}}if(e[1]===`0`)return{};r=new Metadata$1(r);for(var K=2;K-1<=3&&K<=e.length;){var Y=e.slice(1,K);if(r.hasCallingCode(Y))return r.selectNumberingPlan(Y),{countryCallingCodeSource:i?`FROM_NUMBER_WITH_IDD`:`FROM_NUMBER_WITH_PLUS_SIGN`,countryCallingCode:Y,number:e.slice(K)};K++}return{}}function _createForOfIteratorHelperLoose$3(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=_unsupportedIterableToArray$13(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
19In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$13(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$13(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$13(e,t)}}function _arrayLikeToArray$13(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function getCountryByNationalNumber(e,t){var n=t.countries,r=t.defaultCountry,i=t.metadata;i=new Metadata$1(i);for(var a=[],o=_createForOfIteratorHelperLoose$3(n),c;!(c=o()).done;){var u=c.value;if(i.country(u),i.leadingDigits()){if(e&&e.search(i.leadingDigits())===0)return u}else if(getNumberType({phone:e,country:u},void 0,i.metadata)){if(r){if(u===r)return u;a.push(u)}else return u}}if(a.length>0)return a[0]}var USE_NON_GEOGRAPHIC_COUNTRY_CODE$2=!1;function getCountryByCallingCode(e,t){var n=t.nationalNumber,r=t.defaultCountry,i=t.metadata;if(USE_NON_GEOGRAPHIC_COUNTRY_CODE$2&&i.isNonGeographicCallingCode(e))return`001`;var a=i.getCountryCodesForCallingCode(e);if(a)return a.length===1?a[0]:getCountryByNationalNumber(n,{countries:a,defaultCountry:r,metadata:i.metadata})}var PLUS_SIGN=`+`,RFC3966_PHONE_DIGIT_=`([`+VALID_DIGITS+`]|[\\-\\.\\(\\)]?)`,RFC3966_GLOBAL_NUMBER_DIGITS_=`^\\+`+RFC3966_PHONE_DIGIT_+`*[`+VALID_DIGITS+`]`+RFC3966_PHONE_DIGIT_+`*$`,RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_=new RegExp(RFC3966_GLOBAL_NUMBER_DIGITS_,`g`),ALPHANUM_=VALID_DIGITS,RFC3966_DOMAINLABEL_=`[`+ALPHANUM_+`]+((\\-)*[`+ALPHANUM_+`])*`,RFC3966_TOPLABEL_=`[a-zA-Z]+((\\-)*[`+ALPHANUM_+`])*`,RFC3966_DOMAINNAME_=`^(`+RFC3966_DOMAINLABEL_+`\\.)*`+RFC3966_TOPLABEL_+`\\.?$`,RFC3966_DOMAINNAME_PATTERN_=new RegExp(RFC3966_DOMAINNAME_,`g`),RFC3966_PREFIX_=`tel:`,RFC3966_PHONE_CONTEXT_=`;phone-context=`,RFC3966_ISDN_SUBADDRESS_=`;isub=`;function extractPhoneContext(e){var t=e.indexOf(RFC3966_PHONE_CONTEXT_);if(t<0)return null;var n=t+RFC3966_PHONE_CONTEXT_.length;if(n>=e.length)return``;var r=e.indexOf(`;`,n);return r>=0?e.substring(n,r):e.substring(n)}function isPhoneContextValid(e){return e===null?!0:e.length===0?!1:RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.test(e)||RFC3966_DOMAINNAME_PATTERN_.test(e)}function extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(e,t){var n=t.extractFormattedPhoneNumber,r=extractPhoneContext(e);if(!isPhoneContextValid(r))throw new ParseError(`NOT_A_NUMBER`);var i;if(r===null)i=n(e)||``;else{i=``,r.charAt(0)===`+`&&(i+=r);var a=e.indexOf(RFC3966_PREFIX_),o=a>=0?a+RFC3966_PREFIX_.length:0,c=e.indexOf(RFC3966_PHONE_CONTEXT_);i+=e.substring(o,c)}var u=i.indexOf(RFC3966_ISDN_SUBADDRESS_);if(u>0&&(i=i.substring(0,u)),i!==``)return i}var MAX_INPUT_STRING_LENGTH=250,PHONE_NUMBER_START_PATTERN=RegExp(`[`+PLUS_CHARS+VALID_DIGITS+`]`),AFTER_PHONE_NUMBER_END_PATTERN=RegExp(`[^`+VALID_DIGITS+`#]+$`),USE_NON_GEOGRAPHIC_COUNTRY_CODE$1=!1;function parse$3(e,t,n){if(t||={},n=new Metadata$1(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry))throw t.v2?new ParseError(`INVALID_COUNTRY`):Error(`Unknown country: ${t.defaultCountry}`);var r=parseInput(e,t.v2,t.extract),i=r.number,a=r.ext,o=r.error;if(!i){if(t.v2)throw o===`TOO_SHORT`?new ParseError(`TOO_SHORT`):new ParseError(`NOT_A_NUMBER`);return{}}var c=parsePhoneNumber(i,t.defaultCountry,t.defaultCallingCode,n),u=c.
vendor: 6,857 bytes, lines 19-20
19country,K=c.nationalNumber,Y=c.countryCallingCode,X=c.countryCallingCodeSource,ee=c.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new ParseError(`INVALID_COUNTRY`);return{}}if(!K||K.length<2){if(t.v2)throw new ParseError(`TOO_SHORT`);return{}}if(K.length>17){if(t.v2)throw new ParseError(`TOO_LONG`);return{}}if(t.v2){var te=new PhoneNumber(Y,K,n.metadata);return u&&(te.country=u),ee&&(te.carrierCode=ee),a&&(te.ext=a),te.__countryCallingCodeSource=X,te}var ce=(t.extended?n.hasSelectedNumberingPlan():u)?matchesEntirely(K,n.nationalNumberPattern()):!1;return t.extended?{country:u,countryCallingCode:Y,carrierCode:ee,valid:ce,possible:ce?!0:!!(t.extended===!0&&n.possibleLengths()&&isPossibleNumber(K,n)),phone:K,ext:a}:ce?result(u,K,a):{}}function _extractFormattedPhoneNumber(e,t,n){if(e){if(e.length>MAX_INPUT_STRING_LENGTH){if(n)throw new ParseError(`TOO_LONG`);return}if(t===!1)return e;var r=e.search(PHONE_NUMBER_START_PATTERN);if(!(r<0))return e.slice(r).replace(AFTER_PHONE_NUMBER_END_PATTERN,``)}}function parseInput(e,t,n){var r=extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(e,{extractFormattedPhoneNumber:function(e){return _extractFormattedPhoneNumber(e,n,t)}});if(!r)return{};if(!isViablePhoneNumber(r))return isViablePhoneNumberStart(r)?{error:`TOO_SHORT`}:{};var i=extractExtension(r);return i.ext?i:{number:r}}function result(e,t,n){var r={country:e,phone:t};return n&&(r.ext=n),r}function parsePhoneNumber(e,t,n,r){var i=extractCountryCallingCode(parseIncompletePhoneNumber(e),t,n,r.metadata),a=i.countryCallingCodeSource,o=i.countryCallingCode,c=i.number,u;if(o)r.selectNumberingPlan(o);else if(c&&(t||n))r.selectNumberingPlan(t,n),t?u=t:USE_NON_GEOGRAPHIC_COUNTRY_CODE$1&&r.isNonGeographicCallingCode(n)&&(u=`001`),o=n||getCountryCallingCode(t,r.metadata);else return{};if(!c)return{countryCallingCodeSource:a,countryCallingCode:o};var K=extractNationalNumber(parseIncompletePhoneNumber(c),r),Y=K.nationalNumber,X=K.carrierCode,ee=getCountryByCallingCode(o,{nationalNumber:Y,defaultCountry:t,metadata:r});return ee&&(u=ee,ee===`001`||r.country(u)),{country:u,countryCallingCode:o,countryCallingCodeSource:a,nationalNumber:Y,carrierCode:X}}function ownKeys$11(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$10(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys$11(Object(n),!0).forEach(function(t){_defineProperty$3(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$11(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _defineProperty$3(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function parsePhoneNumberWithError$2(e,t,n){return parse$3(e,_objectSpread$10(_objectSpread$10({},t),{},{v2:!0}),n)}function ownKeys$10(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys$10(Object(n),!0).forEach(function(t){_defineProperty$2(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$10(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _defineProperty$2(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _slicedToArray$3(e,t){return _arrayWithHoles$3(e)||_iterableToArrayLimit$3(e,t)||_unsupportedIterableToArray$12(e,t)||_nonIterableRest$3()}function _nonIterableRest$3(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
20In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$12(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$12(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$12(e,t)}}function _arrayLikeToArray$12(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _iterableToArrayLimit$3(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,c;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,c=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw c}}return r}}function _arrayWithHoles$3(e){if(Array.isArray(e))return e}function normalizeArguments(e){var t=_slicedToArray$3(Array.prototype.slice.call(e),4),n=t[0],r=t[1],i=t[2],a=t[3],o,c,u;if(typeof n==`string`)o=n;else throw TypeError(`A text for parsing must be a string.`);if(!r||typeof r==`string`)a?(c=i,u=a):(c=void 0,u=i),r&&(c=_objectSpread({defaultCountry:r},c));else if(isObject$6(r))i?(c=r,u=i):u=r;else throw Error(`Invalid second argument: ${r}`);return{text:o,options:c,metadata:u}}function parsePhoneNumberWithError$1(){var e=normalizeArguments(arguments),t=e.text,n=e.options,r=e.metadata;return parsePhoneNumberWithError$2(t,n,r)}function _classCallCheck$7(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function _defineProperties$7(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$7(e,t,n){return t&&_defineProperties$7(e.prototype,t),n&&_defineProperties$7(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var AsYouTypeState=function(){function e(t){var n=t.onCountryChange,r=t.onCallingCodeChange;_classCallCheck$7(this,e),this.onCountryChange=n,this.onCallingCodeChange=r}return _createClass$7(e,[{key:`reset`,value:function(e){var t=e.country,n=e.callingCode;this.international=!1,this.missingPlus=!1,this.IDDPrefix=void 0,this.callingCode=void 0,this.digits=``,this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(t,n)}},{key:`resetNationalSignificantNumber`,value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberMatchesInput=!0,this.nationalPrefix=void 0,this.carrierCode=void 0,this.complexPrefixBeforeNationalSignificantNumber=void 0}},{key:`update`,value:function(e){for(var t=0,n=Object.keys(e);t<n.length;t++){var r=n[t];this[r]=e[r]}}}
vendor: 5,907 bytes, lines 20-21
20,{key:`initCountryAndCallingCode`,value:function(e,t){this.setCountry(e),this.setCallingCode(t)}},{key:`setCountry`,value:function(e){this.country=e,this.onCountryChange(e)}},{key:`setCallingCode`,value:function(e){this.callingCode=e,this.onCallingCodeChange(e,this.country)}},{key:`startInternationalNumber`,value:function(e,t){this.international=!0,this.initCountryAndCallingCode(e,t)}},{key:`appendDigits`,value:function(e){this.digits+=e}},{key:`appendNationalSignificantNumberDigits`,value:function(e){this.nationalSignificantNumber+=e}},{key:`getNationalDigits`,value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:`getDigitsWithoutInternationalPrefix`,value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}]),e}();function _createForOfIteratorHelperLoose$2(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=_unsupportedIterableToArray$11(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
21In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$11(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$11(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$11(e,t)}}function _arrayLikeToArray$11(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var DIGIT_PLACEHOLDER=`x`,DIGIT_PLACEHOLDER_MATCHER=RegExp(`x`);function repeat(e,t){if(t<1)return``;for(var n=``;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function cutAndStripNonPairedParens(e,t){return e[t]===`)`&&t++,stripNonPairedParens(e.slice(0,t))}function stripNonPairedParens(e){for(var t=[],n=0;n<e.length;)e[n]===`(`?t.push(n):e[n]===`)`&&t.pop(),n++;var r=0,i=``;t.push(e.length);for(var a=0,o=t;a<o.length;a++){var c=o[a];i+=e.slice(r,c),r=c+1}return i}function populateTemplateWithDigits(e,t,n){for(var r=_createForOfIteratorHelperLoose$2(n.split(``)),i;!(i=r()).done;){var a=i.value;if(e.slice(t+1).search(DIGIT_PLACEHOLDER_MATCHER)<0)return;t=e.search(DIGIT_PLACEHOLDER_MATCHER),e=e.replace(DIGIT_PLACEHOLDER_MATCHER,a)}return[e,t]}function formatCompleteNumber(e,t,n){var r=n.metadata,i=n.shouldTryNationalPrefixFormattingRule,a=n.getSeparatorAfterNationalPrefix;if(RegExp(`^(?:${t.pattern()})\$`).test(e.nationalSignificantNumber))return formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(e,t,{metadata:r,shouldTryNationalPrefixFormattingRule:i,getSeparatorAfterNationalPrefix:a})}function canFormatCompleteNumber(e,t){return checkNumberLength(e,t)===`IS_POSSIBLE`}function formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(e,t,n){var r=n.metadata,i=n.shouldTryNationalPrefixFormattingRule,a=n.getSeparatorAfterNationalPrefix;if(e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode,i(t)){var o=formatNationalNumber(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:a,metadata:r});if(o)return o}return formatNationalNumber(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:a,metadata:r})}function formatNationalNumber(e,t,n){var r=n.metadata,i=n.useNationalPrefixFormattingRule,a=n.getSeparatorAfterNationalPrefix,o=formatNationalNumberUsingFormat(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:i,metadata:r});if(i||(e.nationalPrefix?o=e.nationalPrefix+a(t)+o:e.complexPrefixBeforeNationalSignificantNumber&&(o=e.complexPrefixBeforeNationalSignificantNumber+` `+o)),isValidFormattedNationalNumber(o,e))return o}function isValidFormattedNationalNumber(e,t){return parseDigits(e)===t.getNationalDigits()}function _classCallCheck$6(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function _defineProperties$6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$6(e,t,n){return t&&_defineProperties$6(e.prototype,t),n&&_defineProperties$6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var PatternParser=function(){function e(){_classCallCheck$6(this,e)}return _createClass$6(e,[{key:`parse`,value:function(e){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(e),this.context.length!==1)throw Error(`Non-finalized contexts left when pattern parse ended`);var t=this.context[0],n=t.branches,r=t.instructions;if(n)return{op:`|`,args:n.concat([expandSingleElementArray(r)])};if(r.length===0)throw Error(`Pattern is required`);return r.length===1?r[0]:r}},{key:`startContext`,value:function(e){this.context.push(e)}},{key:`endContext`,value:function(){this.context.pop()}},{key:`getContext`,value:function(){return this.context[this.context.length-1]}},{key:`parsePattern`,value:function(e){if(!e)throw Error(`Pattern is required`);var t=e.match(OPERATOR);if(!t){if(ILLEGAL_CHARACTER_REGEXP.test(e))throw Error(`Illegal characters found in a pattern: ${e}`);this.getContext().instructions=this.getContext().instructions.concat(e.split(``));return}var n=t[1],r=e.slice(0,t.index),i=e.slice(t.index+n.length);switch(n){case`(?:`:r&&this.parsePattern(r),this.startContext({or:!0,instructions:[],branches:[]});break;case`)`:if(!this.getContext().or)throw Error(`")" operator must be preceded by "(?:" operator`);if(r&&this.parsePattern(r),this.getContext().instructions.length===0)throw Error(`No instructions foun
21d after "|" operator in an "or" group`);var a=this.getContext().branches;a.push(expandSingleElementArray(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:`|`,args:a});break;case`|`:if(!this.getContext().or)throw Error(`"|" operator can only be used inside "or" groups`);if(r&&this.parsePattern(r),!this.getContext().branches){if(this.context.length===1)this.getContext().branches=[];else throw Error(`"branches" not found in an "or" group context`)}this.getContext().branches.push(expandSingleElementArray(this.getContext().instructions)),this.getContext().instructions=[];break;case`[`:r&&this.parsePattern(r),this.startContext({oneOfSet:!0});break;case`]`:if(!this.getContext().oneOfSet)throw Error(`"]" operator must be preceded by "[" operator`);this.endContext(),this.getContext().instructions.push({op:`[]`,args:parseOneOfSet(r)});break;default:throw Error(`Unknown operator: ${n}`)}i&&this.parsePattern(i)}}]),e}();function parseOneOfSet(e){for(var t=[],n=0;n<e.length;){if(e[n]===`-`){if(n===0||n===e.length-1)throw Error(`Couldn't parse a one-of set pattern: ${e}`);for(var r=e[n-1].charCodeAt(0)+1,i=e[n+1].charCodeAt(0)-1,a=r;a<=i;)t.push(String.fromCharCode(a)),a++}else t.push(e[n]);n++}return t}var ILLEGAL_CHARACTER_REGEXP=/[\(\)\[\]\?\:\|]/,OPERATOR=RegExp(`(\\||\\(\\?\\:|\\)|\\[|\\])`);function expandSingleElementArray(e){return e.length===1?e[0]:e}function _createForOfIteratorHelperLoose$1(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=_unsupportedIterableToArray$10(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
22In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$10(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$10(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$10(e,t)}}function _arrayLikeToArray$10(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _classCallCheck$5(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function _defineProperties$5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$5(e,t,n){return t&&_defineProperties$5(e.prototype,t),n&&_defineProperties$5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var PatternMatcher=function(){function e(t){_classCallCheck$5(this,e),this.matchTree=new PatternParser().parse(t)}return _createClass$5(e,[{key:`match`,value:function(e){var t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).allowOverflow;if(!e)throw Error(`String is required`);var n=_match(e.split(``),this.matchTree,!0);if(n&&n.match&&delete n.matchedChars,!(n&&n.overflow&&!t))return n}}]),e}();function _match(e,t,n){if(typeof t==`string`){var r=e.join(``);return t.indexOf(r)===0?e.length===t.length?{match:!0,matchedChars:e}:{partialMatch:!0}:r.indexOf(t)===0?n&&e.length>t.length?{overflow:!0}:{match:!0,matchedChars:e.slice(0,t.length)}:void 0}if(Array.isArray(t)){for(var i=e.slice(),a=0;a<t.length;){var o=t[a],c=_match(i,o,n&&a===t.length-1);if(!c)return;if(c.overflow)return c;if(c.match){if(i=i.slice(c.matchedChars.length),i.length===0)return a===t.length-1?{match:!0,matchedChars:e}:{partialMatch:!0}}else if(c.partialMatch)return{partialMatch:!0};else throw Error(`Unsupported match result:
23${JSON.stringify(c,null,2)}`);a++}return n?{overflow:!0}:{match:!0,matchedChars:e.slice(0,e.length-i.length)}}switch(t.op){case`|`:for(var u,K=_createForOfIteratorHelperLoose$1(t.args),Y;!(Y=K()).done;){var X=Y.value,ee=_match(e,X,n);if(ee){if(ee.overflow)return ee;if(ee.match)return{match:!0,matchedChars:ee.matchedChars};if(ee.partialMatch)u=!0;else throw Error(`Unsupported match result:
24${JSON.stringify(ee,null,2)}`)}}return u?{partialMatch:!0}:void 0;case`[]`:for(var te=_createForOfIteratorHelperLoose$1(t.args),ce;!(ce=te()).done;){var ue=ce.value;if(e[0]===ue)return e.length===1?{match:!0,matchedChars:e}:n?{overflow:!0}:{match:!0,matchedChars:[ue]}}return;default:throw Error(`Unsupported instruction tree: ${t}`)}}function _createForOfIteratorHelperLoose(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=_unsupportedIterableToArray$9(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
25In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$9(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$9(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$9(e,t)}}function _arrayLikeToArray$9(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _classCallCheck$4(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function _defineProperties$4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$4(e,t,n){return t&&_defineProperties$4(e.prototype,t),n&&_defineProperties$4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
vendor: 6,734 bytes, line 25
25var DUMMY_DIGIT=`9`,LONGEST_DUMMY_PHONE_NUMBER=repeat(DUMMY_DIGIT,15),NATIONAL_PREFIX_SEPARATORS_PATTERN=/[- ]/,SUPPORT_LEGACY_FORMATTING_PATTERNS=!0,CREATE_CHARACTER_CLASS_PATTERN=SUPPORT_LEGACY_FORMATTING_PATTERNS&&function(){return/\[([^\[\]])*\]/g},CREATE_STANDALONE_DIGIT_PATTERN=SUPPORT_LEGACY_FORMATTING_PATTERNS&&function(){return/\d(?=[^,}][^,}])/g},NON_ALTERING_FORMAT_REG_EXP=RegExp(`[`+VALID_PUNCTUATION+`]*\\$1[`+VALID_PUNCTUATION+`]*(\\$\\d[`+VALID_PUNCTUATION+`]*)*$`),MIN_LEADING_DIGITS_LENGTH=3,AsYouTypeFormatter=function(){function e(t){t.state;var n=t.metadata;_classCallCheck$4(this,e),this.metadata=n,this.resetFormat()}return _createClass$4(e,[{key:`resetFormat`,value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:`reset`,value:function(e,t){this.resetFormat(),e?(this.isNANP=e.callingCode()===`1`,this.matchingFormats=e.formats(),t.nationalSignificantNumber&&this.narrowDownMatchingFormats(t)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:`format`,value:function(e,t){var n=this;if(canFormatCompleteNumber(t.nationalSignificantNumber,this.metadata))for(var r=_createForOfIteratorHelperLoose(this.matchingFormats),i;!(i=r()).done;){var a=i.value,o=formatCompleteNumber(t,a,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(e){return n.shouldTryNationalPrefixFormattingRule(e,{international:t.international,nationalPrefix:t.nationalPrefix})},getSeparatorAfterNationalPrefix:function(e){return n.getSeparatorAfterNationalPrefix(e)}});if(o)return this.resetFormat(),this.chosenFormat=a,this.setNationalNumberTemplate(o.replace(/\d/g,`x`),t),this.populatedNationalNumberTemplate=o,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(`x`),o}return this.formatNationalNumberWithNextDigits(e,t)}},{key:`formatNationalNumberWithNextDigits`,value:function(e,t){var n=this.chosenFormat,r=this.chooseFormat(t);if(r)return r===n?this.formatNextNationalNumberDigits(e):this.formatNextNationalNumberDigits(t.getNationalDigits())}},{key:`narrowDownMatchingFormats`,value:function(e){var t=this,n=e.nationalSignificantNumber,r=e.nationalPrefix,i=e.international,a=n,o=a.length-MIN_LEADING_DIGITS_LENGTH;o<0&&(o=0),this.matchingFormats=this.matchingFormats.filter(function(e){return t.formatSuits(e,i,r)&&t.formatMatches(e,a,o)}),this.chosenFormat&&this.matchingFormats.indexOf(this.chosenFormat)===-1&&this.resetFormat()}},{key:`formatSuits`,value:function(e,t,n){return!(n&&!e.usesNationalPrefix()&&!e.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!t&&!n&&e.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:`formatMatches`,value:function(e,t,n){var r=e.leadingDigitsPatterns().length;if(r===0)return!0;n=Math.min(n,r-1);var i=e.leadingDigitsPatterns()[n];if(t.length<MIN_LEADING_DIGITS_LENGTH)try{return new PatternMatcher(i).match(t,{allowOverflow:!0})!==void 0}catch(e){return console.error(e),!0}return RegExp(`^(${i})`).test(t)}},{key:`getFormatFormat`,value:function(e,t){return t?e.internationalFormat():e.format()}},{key:`chooseFormat`,value:function(e){for(var t=this,n=function(){var n=i.value;return t.chosenFormat===n?`break`:NON_ALTERING_FORMAT_REG_EXP.test(t.getFormatFormat(n,e.international))?t.createTemplateForFormat(n,e)?(t.chosenFormat=n,`break`):(t.matchingFormats=t.matchingFormats.filter(function(e){return e!==n}),`continue`):`continue`},r=_createForOfIteratorHelperLoose(this.matchingFormats.slice()),i;!(i=r()).done&&n()!==`break`;);return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:`createTemplateForFormat`,value:function(e,t){if(!(SUPPORT_LEGACY_FORMATTING_PATTERNS&&e.pattern().indexOf(`|`)>=0)){var n=this.getTemplateForFormat(e,t);if(n)return this.setNationalNumberTemplate(n,t),!0}}},{key:`getSeparatorAfterNationalPrefix`,value:function(e){return this.isNANP||e&&e.nationalPrefixFormattingRule()&&NATIONAL_PREFIX_SEPARATORS_PATTERN.test(e.nationalPrefixFormattingRule())?` `:``}},{key:`getInternationalPrefixBeforeCountryCallingCode`,value:function(e,t){var n=e.IDDPrefix,r=e.missingPlus;return n?t&&t.spacing===!1?n:n+` `:r?``:`+`}},{key:`getTemplate`,value:function(e){if(this.template){for(var t=-1,n=0,r=e.international?this.getInternationalPrefixBeforeCountryCallingCode(e,{spacing:!1}):``;n<r.length+e.getDigitsWithoutInternationalPrefix().length;)t=this.template.indexOf(`x`,t+1),n++;return cutAndStripNonPairedParens(this.template,t+1)}}},{key:`setNationalNumberTemplate`,value:function(e,t){this.nationalNumberTemplate=e,this.populatedNationalNumberTemplate=e,this.populatedNationalNumberTemplatePosition=-1,this.template=t.international?this.getInternationalPrefixBeforeCountryCallingCode(t).replace(/[\d\+]/g,`x`)+repeat(`x`,t.callingCode.length)+` `+e:e}},{key:`getTemplateForFormat`,value:function(e,t){var n=t.nationalSignificantNumber,r=t.international,i=t.nationalPrefix,a=t.complexPrefixBeforeNationalSignificantNumber,o=e.pattern();SUPPORT_LEGACY_FORMATTING_PATTERNS&&(o=o.replace(CREATE_CHARACTER_CLASS_PATTERN(),`\\d`).replace(CREATE_STANDALONE_DIGIT_PATTERN(),`\\d`));var c=LONGEST_DUMMY_PHONE_NUMBER.match(o)[0];if(!(n.length>c.length)){var u=RegExp(`^`+o+`$`),K=n.replace(/\d/g,DUMMY_DIGIT);u.test(K)&&(c=K);var Y=this.getFormatFormat(e,r),X;if(this.shouldTryNationalPrefixFormattingRule(e,{international:r,nationalPrefix:i})){var ee=Y.replace(FIRST_GROUP_PATTERN,e.nationalPrefixFormattingRule());if(parseDigits(e.nationalPrefixFormattingRule())===(i||``)+parseDigits(`$1`)&&(Y=ee,X=!0,i))for(var te=i.length;te>0;)Y=Y.replace(/\d/,`x`),te--}var ce=c.replace(new RegExp(o),Y).replace(new RegExp(DUMMY_DIGIT,`g`),`x`);return X||(a?ce=repeat(`x`,a.length)+` `+ce:i&&(ce=repeat(`x`,i.length)+this.getSeparatorAfterNationalPrefix(e)+ce)),r&&(ce=applyInternationalSeparatorStyle(ce)),ce}}},{key:`formatNextNationalNumberDigits`,value:function(e){var t=populateTemplateWithDigits(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,e);if(!t){this.resetFormat();return}return this.populatedNationalNumberTemplate=t[0],this.populatedNationalNumberTemplatePosition=t[1],cutAndStripNonPairedParens(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1)}},{key:`shouldTryNationalPrefixFormattingRule`,value:function(e,t){var n=t.international,r=t.nationalPrefix;if(e.nationalPrefixFormattingRule()){var i=e.usesNationalPrefix();if(i&&r||!i&&!n)return!0}}}]),e}();function _slicedToArray$2(e,t){return _arrayWithHoles$2(e)||_iterableToArrayLimit$2(e,t)||_unsupportedIterableToArray$8(e,t)||_nonIterableRest$2()}function _nonIterableRest$2(){throw TypeError(`Invalid attempt to de
25structure non-iterable instance.
26In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$8(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$8(e,t)}}function _arrayLikeToArray$8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _iterableToArrayLimit$2(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,c;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,c=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw c}}return r}}function _arrayWithHoles$2(e){if(Array.isArray(e))return e}function _classCallCheck$3(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function _defineProperties$3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$3(e,t,n){return t&&_defineProperties$3(e.prototype,t),n&&_defineProperties$3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART=`[`+VALID_PUNCTUATION+VALID_DIGITS+`]+`,VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN=RegExp(`^`+VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART+`$`,`i`),VALID_FORMATTED_PHONE_NUMBER_PART=`(?:[`+PLUS_CHARS+`][`+VALID_PUNCTUATION+VALID_DIGITS+`]*|[`+VALID_PUNCTUATION+VALID_DIGITS+`]+)`,AFTER_PHONE_NUMBER_DIGITS_END_PATTERN=RegExp(`[^`+VALID_PUNCTUATION+VALID_DIGITS+`]+.*$`),COMPLEX_NATIONAL_PREFIX=/[^\d\[\]]/,AsYouTypeParser=function(){function e(t){var n=t.defaultCountry,r=t.defaultCallingCode,i=t.metadata,a=t.onNationalSignificantNumberChange;_classCallCheck$3(this,e),this.defaultCountry=n,this.defaultCallingCode=r,this.metadata=i,this.onNationalSignificantNumberChange=a}return _createClass$3(e,[{key:`input`,value:function(e,t){var n=_slicedToArray$2(extractFormattedDigitsAndPlus(e),2),r=n[0],i=n[1],a=parseDigits(r),o;return i&&(t.digits||(t.startInternationalNumber(),a||(o=!0))),a&&this.inputDigits(a,t),{digits:a,justLeadingPlus:o}}}
vendor: 4,539 bytes, line 26
26,{key:`inputDigits`,value:function(e,t){var n=t.digits,r=n.length<3&&n.length+e.length>=3;if(t.appendDigits(e),r&&this.extractIddPrefix(t),this.isWaitingForCountryCallingCode(t)){if(!this.extractCountryCallingCode(t))return}else t.appendNationalSignificantNumberDigits(e);t.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(t.getNationalDigits(),function(e){return t.update(e)})}},{key:`isWaitingForCountryCallingCode`,value:function(e){var t=e.international,n=e.callingCode;return t&&!n}},{key:`extractCountryCallingCode`,value:function(e){var t=extractCountryCallingCode(`+`+e.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),n=t.countryCallingCode,r=t.number;if(n)return e.setCallingCode(n),e.update({nationalSignificantNumber:r}),!0}},{key:`reset`,value:function(e){if(e){this.hasSelectedNumberingPlan=!0;var t=e._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=t&&COMPLEX_NATIONAL_PREFIX.test(t)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:`extractNationalSignificantNumber`,value:function(e,t){if(this.hasSelectedNumberingPlan){var n=extractNationalNumberFromPossiblyIncompleteNumber(e,this.metadata),r=n.nationalPrefix,i=n.nationalNumber,a=n.carrierCode;if(i!==e)return this.onExtractedNationalNumber(r,a,i,e,t),!0}}},{key:`extractAnotherNationalSignificantNumber`,value:function(e,t,n){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(e,n);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var r=extractNationalNumberFromPossiblyIncompleteNumber(e,this.metadata),i=r.nationalPrefix,a=r.nationalNumber,o=r.carrierCode;if(a!==t)return this.onExtractedNationalNumber(i,o,a,e,n),!0}}},{key:`onExtractedNationalNumber`,value:function(e,t,n,r,i){var a,o,c=r.lastIndexOf(n);if(c>=0&&c===r.length-n.length){o=!0;var u=r.slice(0,c);u!==e&&(a=u)}i({nationalPrefix:e,carrierCode:t,nationalSignificantNumber:n,nationalSignificantNumberMatchesInput:o,complexPrefixBeforeNationalSignificantNumber:a}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:`reExtractNationalSignificantNumber`,value:function(e){if(this.extractAnotherNationalSignificantNumber(e.getNationalDigits(),e.nationalSignificantNumber,function(t){return e.update(t)}))return!0;if(this.extractIddPrefix(e)||this.fixMissingPlus(e))return this.extractCallingCodeAndNationalSignificantNumber(e),!0}},{key:`extractIddPrefix`,value:function(e){var t=e.international,n=e.IDDPrefix,r=e.digits;if(e.nationalSignificantNumber,!(t||n)){var i=stripIddPrefix(r,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(i!==void 0&&i!==r)return e.update({IDDPrefix:r.slice(0,r.length-i.length)}),this.startInternationalNumber(e,{country:void 0,callingCode:void 0}),!0}}},{key:`fixMissingPlus`,value:function(e){if(!e.international){var t=extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(e.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),n=t.countryCallingCode;if(t.number,n)return e.update({missingPlus:!0}),this.startInternationalNumber(e,{country:e.country,callingCode:n}),!0}}},{key:`startInternationalNumber`,value:function(e,t){var n=t.country,r=t.callingCode;e.startInternationalNumber(n,r),e.nationalSignificantNumber&&(e.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:`extractCallingCodeAndNationalSignificantNumber`,value:function(e){this.extractCountryCallingCode(e)&&this.extractNationalSignificantNumber(e.getNationalDigits(),function(t){return e.update(t)})}}]),e}();function extractFormattedPhoneNumber(e){var t=e.search(VALID_FORMATTED_PHONE_NUMBER_PART);if(!(t<0)){e=e.slice(t);var n;return e[0]===`+`&&(n=!0,e=e.slice(1)),e=e.replace(AFTER_PHONE_NUMBER_DIGITS_END_PATTERN,``),n&&(e=`+`+e),e}}function _extractFormattedDigitsAndPlus(e){var t=extractFormattedPhoneNumber(e)||``;return t[0]===`+`?[t.slice(1),!0]:[t]}function extractFormattedDigitsAndPlus(e){var t=_slicedToArray$2(_extractFormattedDigitsAndPlus(e),2),n=t[0],r=t[1];return VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN.test(n)||(n=``),[n,r]}function _slicedToArray$1(e,t){return _arrayWithHoles$1(e)||_iterableToArrayLimit$1(e,t)||_unsupportedIterableToArray$7(e,t)||_nonIterableRest$1()}function _nonIterableRest$1(){throw TypeError(`Invalid attempt to de
26structure non-iterable instance.
27In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$7(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$7(e,t)}}function _arrayLikeToArray$7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _iterableToArrayLimit$1(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,c;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,c=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw c}}return r}}function _arrayWithHoles$1(e){if(Array.isArray(e))return e}function _classCallCheck$2(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function _defineProperties$2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$2(e,t,n){return t&&_defineProperties$2(e.prototype,t),n&&_defineProperties$2(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var USE_NON_GEOGRAPHIC_COUNTRY_CODE=!1,AsYouType$1=function(){function e(t,n){_classCallCheck$2(this,e),this.metadata=new Metadata$1(n);var r=_slicedToArray$1(this.getCountryAndCallingCode(t),2),i=r[0],a=r[1];this.defaultCountry=i,this.defaultCallingCode=a,this.reset()}return _createClass$2(e,[{key:`getCountryAndCallingCode`,value:function(e){var t,n;return e&&(isObject$6(e)?(t=e.defaultCountry,n=e.defaultCallingCode):t=e),t&&!this.metadata.hasCountry(t)&&(t=void 0),n&&USE_NON_GEOGRAPHIC_COUNTRY_CODE&&this.metadata.isNonGeographicCallingCode(n)&&(t=`001`),[t,n]}}
vendor: 4,091 bytes, line 27
27,{key:`input`,value:function(e){var t=this.parser.input(e,this.state),n=t.digits;if(t.justLeadingPlus)this.formattedOutput=`+`;else if(n){this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state);var r;if(this.metadata.hasSelectedNumberingPlan()&&(r=this.formatter.format(n,this.state)),r===void 0&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var i=this.state.getNationalDigits();i&&(r=this.formatter.format(i,this.state))}this.formattedOutput=r?this.getFullNumber(r):this.getNonFormattedNumber()}return this.formattedOutput}},{key:`reset`,value:function(){var e=this;return this.state=new AsYouTypeState({onCountryChange:function(t){e.country=t},onCallingCodeChange:function(t,n){e.metadata.selectNumberingPlan(n,t),e.formatter.reset(e.metadata.numberingPlan,e.state),e.parser.reset(e.metadata.numberingPlan)}}),this.formatter=new AsYouTypeFormatter({state:this.state,metadata:this.metadata}),this.parser=new AsYouTypeParser({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){e.determineTheCountryIfNeeded(),e.formatter.reset(e.metadata.numberingPlan,e.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput=``,this}},{key:`isInternational`,value:function(){return this.state.international}},{key:`getCallingCode`,value:function(){if(this.isInternational())return this.state.callingCode}},{key:`getCountryCallingCode`,value:function(){return this.getCallingCode()}},{key:`getCountry`,value:function(){if(this.state.digits)return this._getCountry()}},{key:`_getCountry`,value:function(){var e=this.state.country;if(!(USE_NON_GEOGRAPHIC_COUNTRY_CODE&&e===`001`))return e}},{key:`determineTheCountryIfNeeded`,value:function(){(!this.state.country||this.isCountryCallingCodeAmbiguous())&&this.determineTheCountry()}},{key:`getFullNumber`,value:function(e){var t=this;if(this.isInternational()){var n=function(e){return t.formatter.getInternationalPrefixBeforeCountryCallingCode(t.state,{spacing:!!e})+e},r=this.state.callingCode;return n(r?e?`${r} ${e}`:r:`${this.state.getDigitsWithoutInternationalPrefix()}`)}return e}},{key:`getNonFormattedNationalNumberWithPrefix`,value:function(){var e=this.state,t=e.nationalSignificantNumber,n=e.complexPrefixBeforeNationalSignificantNumber,r=e.nationalPrefix,i=t,a=n||r;return a&&(i=a+i),i}},{key:`getNonFormattedNumber`,value:function(){var e=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(e?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:`getNonFormattedTemplate`,value:function(){var e=this.getNonFormattedNumber();if(e)return e.replace(/[\+\d]/g,`x`)}},{key:`isCountryCallingCodeAmbiguous`,value:function(){var e=this.state.callingCode,t=this.metadata.getCountryCodesForCallingCode(e);return t&&t.length>1}},{key:`determineTheCountry`,value:function(){this.state.setCountry(getCountryByCallingCode(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,defaultCountry:this.defaultCountry,metadata:this.metadata}))}},{key:`getNumberValue`,value:function(){var e=this.state,t=e.digits,n=e.callingCode,r=e.country,i=e.nationalSignificantNumber;if(t){if(this.isInternational())return n?`+`+n+i:`+`+t;if(r||n)return`+`+(r?this.metadata.countryCallingCode():n)+i}}},{key:`getNumber`,value:function(){var e=this.state,t=e.nationalSignificantNumber,n=e.carrierCode,r=e.callingCode,i=this._getCountry();if(t&&(i||r)){if(i&&i===this.defaultCountry){var a=new Metadata$1(this.metadata.metadata);a.selectNumberingPlan(i);var o=a.numberingPlan.callingCode(),c=this.metadata.getCountryCodesForCallingCode(o);if(c.length>1){var u=getCountryByNationalNumber(t,{countries:c,defaultCountry:this.defaultCountry,metadata:this.metadata.metadata});u&&(i=u)}}var K=new PhoneNumber(i||r,t,this.metadata.metadata);return n&&(K.carrierCode=n),K}}}
27,{key:`isPossible`,value:function(){var e=this.getNumber();return e?e.isPossible():!1}},{key:`isValid`,value:function(){var e=this.getNumber();return e?e.isValid():!1}},{key:`getNationalNumber`,value:function(){return this.state.nationalSignificantNumber}},{key:`getChars`,value:function(){return(this.state.international?`+`:``)+this.state.digits}},{key:`getTemplate`,value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||``}}]),e}();function getExampleNumber$1(e,t,n){if(t[e])return new PhoneNumber(e,t[e],n)}function formatIncompletePhoneNumber$1(e,t,n){return n||(n=t,t=void 0),new AsYouType$1(t,n).input(e)}function parsePhoneNumberWithError(){return withMetadataArgument(parsePhoneNumberWithError$1,arguments)}function AsYouType(e){return AsYouType$1.call(this,e,metadata_min_json_default)}AsYouType.prototype=Object.create(AsYouType$1.prototype,{}),AsYouType.prototype.constructor=AsYouType;function getExampleNumber(){return withMetadataArgument(getExampleNumber$1,arguments)}function formatIncompletePhoneNumber(){return withMetadataArgument(formatIncompletePhoneNumber$1,arguments)}function createColumnHelper(){return{accessor:(e,t)=>typeof e==`function`?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function functionalUpdate$1(e,t){return typeof e==`function`?e(t):e}function makeStateUpdater(e,t){return n=>{t.setState(t=>({...t,[e]:functionalUpdate$1(n,t[e])}))}}function isFunction$6(e){return e instanceof Function}function isNumberArray(e){return Array.isArray(e)&&e.every(e=>typeof e==`number`)}function flattenBy(e,t){let n=[],r=e=>{e.forEach(e=>{n.push(e);let i=t(e);i!=null&&i.length&&r(i)})};return r(e),n}function memo(e,t,n){let r=[],i;return a=>{let o;n.key&&n.debug&&(o=Date.now());let c=e(a);if(!(c.length!==r.length||c.some((e,t)=>r[t]!==e)))return i;r=c;let u;if(n.key&&n.debug&&(u=Date.now()),i=t(...c),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){let e=Math.round((Date.now()-o)*100)/100,t=Math.round((Date.now()-u)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
28            font-size: .6rem;
29            font-weight: bold;
30            color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return i}}function getMemoOptions(e,t,n,r){return{debug:()=>{var n;return e?.debugAll??e[t]},key:!1,onChange:r}}function createCell(e,t,n,r){let i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return i.getValue()??e.options.renderFallbackValue},getContext:memo(()=>[e,n,t,i],(e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}),getMemoOptions(e.options,`debugCells`,`cell.getContext`))};return e._features.forEach(r=>{r.createCell==null||r.createCell(i,n,t,e)},{}),i}function createColumn(e,t,n,r){var i,a;let o={...e._getDefaultColumnDef(),...t}
vendor: 51,250 bytes, line 30
30,c=o.accessorKey,u=o.id??(c?typeof String.prototype.replaceAll==`function`?c.replaceAll(`.`,`_`):c.replace(/\./g,`_`):void 0)??(typeof o.header==`string`?o.header:void 0),K;if(o.accessorFn?K=o.accessorFn:c&&(K=c.includes(`.`)?e=>{let t=e;for(let e of c.split(`.`)){var n;t=t?.[e]}return t}:e=>e[o.accessorKey]),!u)throw Error();let Y={id:`${String(u)}`,accessorFn:K,parent:r,depth:n,columnDef:o,columns:[],getFlatColumns:memo(()=>[!0],()=>{var e;return[Y,...Y.columns?.flatMap(e=>e.getFlatColumns())]},getMemoOptions(e.options,`debugColumns`,`column.getFlatColumns`)),getLeafColumns:memo(()=>[e._getOrderColumnsFn()],e=>{var t;return(t=Y.columns)!=null&&t.length?e(Y.columns.flatMap(e=>e.getLeafColumns())):[Y]},getMemoOptions(e.options,`debugColumns`,`column.getLeafColumns`))};for(let t of e._features)t.createColumn==null||t.createColumn(Y,e);return Y}var debug=`debugHeaders`;function createHeader(e,t,n){var r;let i={id:n.id??t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(i),e},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(t=>{t.createHeader==null||t.createHeader(i,e)}),i}var Headers$1={createTable:e=>{e.getHeaderGroups=memo(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var a,o;let c=r?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],u=i?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],K=n.filter(e=>!(r!=null&&r.includes(e.id))&&!(i!=null&&i.includes(e.id)));return buildHeaderGroups(t,[...c,...K,...u],e)},getMemoOptions(e.options,debug,`getHeaderGroups`)),e.getCenterHeaderGroups=memo(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(e=>!(r!=null&&r.includes(e.id))&&!(i!=null&&i.includes(e.id))),buildHeaderGroups(t,n,e,`center`)),getMemoOptions(e.options,debug,`getCenterHeaderGroups`)),e.getLeftHeaderGroups=memo(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;return buildHeaderGroups(t,r?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],e,`left`)},getMemoOptions(e.options,debug,`getLeftHeaderGroups`)),e.getRightHeaderGroups=memo(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;return buildHeaderGroups(t,r?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],e,`right`)},getMemoOptions(e.options,debug,`getRightHeaderGroups`)),e.getFooterGroups=memo(()=>[e.getHeaderGroups()],e=>[...e].reverse(),getMemoOptions(e.options,debug,`getFooterGroups`)),e.getLeftFooterGroups=memo(()=>[e.getLeftHeaderGroups()],e=>[...e].reverse(),getMemoOptions(e.options,debug,`getLeftFooterGroups`)),e.getCenterFooterGroups=memo(()=>[e.getCenterHeaderGroups()],e=>[...e].reverse(),getMemoOptions(e.options,debug,`getCenterFooterGroups`)),e.getRightFooterGroups=memo(()=>[e.getRightHeaderGroups()],e=>[...e].reverse(),getMemoOptions(e.options,debug,`getRightFooterGroups`)),e.getFlatHeaders=memo(()=>[e.getHeaderGroups()],e=>e.map(e=>e.headers).flat(),getMemoOptions(e.options,debug,`getFlatHeaders`)),e.getLeftFlatHeaders=memo(()=>[e.getLeftHeaderGroups()],e=>e.map(e=>e.headers).flat(),getMemoOptions(e.options,debug,`getLeftFlatHeaders`)),e.getCenterFlatHeaders=memo(()=>[e.getCenterHeaderGroups()],e=>e.map(e=>e.headers).flat(),getMemoOptions(e.options,debug,`getCenterFlatHeaders`)),e.getRightFlatHeaders=memo(()=>[e.getRightHeaderGroups()],e=>e.map(e=>e.headers).flat(),getMemoOptions(e.options,debug,`getRightFlatHeaders`)),e.getCenterLeafHeaders=memo(()=>[e.getCenterFlatHeaders()],e=>e.filter(e=>{var t;return!((t=e.subHeaders)!=null&&t.length)}),getMemoOptions(e.options,debug,`getCenterLeafHeaders`)),e.getLeftLeafHeaders=memo(()=>[e.getLeftFlatHeaders()],e=>e.filter(e=>{var t;return!((t=e.subHeaders)!=null&&t.length)}),getMemoOptions(e.options,debug,`getLeftLeafHeaders`)),e.getRightLeafHeaders=memo(()=>[e.getRightFlatHeaders()],e=>e.filter(e=>{var t;return!((t=e.subHeaders)!=null&&t.length)}),getMemoOptions(e.options,debug,`getRightLeafHeaders`)),e.getLeafHeaders=memo(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(e,t,n)=>{var r,i,a,o,c,u;return[...e[0]?.headers??[],...t[0]?.headers??[],...n[0]?.headers??[]].map(e=>e.getLeafHeaders()).flat()},getMemoOptions(e.options,debug,`getLeafHeaders`))}};function buildHeaderGroups(e,t,n,r){var i,a;let o=0,c=function(e,t){t===void 0&&(t=1),o=Math.max(o,t),e.filter(e=>e.getIsVisible()).forEach(e=>{var n;(n=e.columns)!=null&&n.length&&c(e.columns,t+1)},0)};c(e);let u=[],K=(e,t)=>{let i={depth:t,id:[r,`${t}`].filter(Boolean).join(`_`),headers:[]},a=[];e.forEach(e=>{let o=[...a].reverse()[0],c=e.column.depth===i.depth,u,K=!1;if(c&&e.column.parent?u=e.column.parent:(u=e.column,K=!0),o&&o?.column===u)o.subHeaders.push(e);else{let i=createHeader(n,u,{id:[r,t,u.id,e?.id].filter(Boolean).join(`_`),isPlaceholder:K,placeholderId:K?`${a.filter(e=>e.column===u).length}`:void 0,depth:t,index:a.length});i.subHeaders.push(e),a.push(i)}i.headers.push(e),e.headerGroup=i}),u.push(i),t>0&&K(a,t-1)};K(t.map((e,t)=>createHeader(n,e,{depth:o,index:t})),o-1),u.reverse();let Y=e=>e.filter(e=>e.column.getIsVisible()).map(e=>{let t=0,n=0,r=[0];e.subHeaders&&e.subHeaders.length?(r=[],Y(e.subHeaders).forEach(e=>{let{colSpan:n,rowSpan:i}=e;t+=n,r.push(i)})):t=1;let i=Math.min(...r);return n+=i,e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}});return Y(u[0]?.headers??[]),u}var createRow=(e,t,n,r,i,a,o)=>{let c={id:t,index:r,original:n,depth:i,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(c._valuesCache.hasOwnProperty(t))return c._valuesCache[t];let n=e.getColumn(t);if(n!=null&&n.accessorFn)return c._valuesCache[t]=n.accessorFn(c.original,r),c._valuesCache[t]},getUniqueValues:t=>{if(c._uniqueValuesCache.hasOwnProperty(t))return c._uniqueValuesCache[t];let n=e.getColumn(t);if(n!=null&&n.accessorFn)return n.columnDef.getUniqueValues?(c._uniqueValuesCache[t]=n.columnDef.getUniqueValues(c.original,r),c._uniqueValuesCache[t]):(c._uniqueValuesCache[t]=[c.getValue(t)],c._uniqueValuesCache[t])},renderValue:t=>{var n;return c.getValue(t)??e.options.renderFallbackValue},subRows:a??[],getLeafRows:()=>flattenBy(c.subRows,e=>e.subRows),getParentRow:()=>c.parentId?e.getRow(c.parentId,!0):void 0,getParentRows:()=>{let e=[],t=c;for(;;){let n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:memo(()=>[e.getAllLeafColumns()],t=>t.map(t=>createCell(e,c,t,t.id)),getMemoOptions(e.options,`debugRows`,`getAllCells`)),_getAllCellsByColumnId:memo(()=>[c.getAllCells()],e=>e.reduce((e,t)=>(e[t.column.id]=t,e),{}),getMemoOptions(e.options,`debugRows`,`getAllCellsByColumnId`))};for(let t=0;t<e._features.length;t++){let n=e._features[t];n==null||n.createRow==null||n.createRow(c,e)}return c},ColumnFaceting={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},includesString=(e,t,n)=>{var r,i;let a=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!((i=e.getValue(t))!=null&&(i=i.toString())!=null&&(i=i.toLowerCase())!=null&&i.includes(a))};includesString.autoRemove=e=>testFalsey(e);var includesStringSensitive=(e,t,n)=>{var r;return!!((r=e.getValue(t))!=null&&(r=r.toString())!=null&&r.includes(n))};includesStringSensitive.autoRemove=e=>testFalsey(e);var equalsString=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};equalsString.autoRemove=e=>testFalsey(e);var arrIncludes=(e,t,n)=>{var r;return e.getValue(t)?.includes(n)};arrIncludes.autoRemove=e=>testFalsey(e);var arrIncludesAll=(e,t,n)=>!n.some(n=>{var r;return!((r=e.getValue(t))!=null&&r.includes(n))});arrIncludesAll.autoRemove=e=>testFalsey(e)||!(e!=null&&e.length);var arrIncludesSome=(e,t,n)=>n.some(n=>{var r;return e.getValue(t)?.includes(n)});arrIncludesSome.autoRemove=e=>testFalsey(e)||!(e!=null&&e.length);var equals=(e,t,n)=>e.getValue(t)===n;equals.autoRemove=e=>testFalsey(e);var weakEquals=(e,t,n)=>e.getValue(t)==n;weakEquals.autoRemove=e=>testFalsey(e);var inNumberRange=(e,t,n)=>{let[r,i]=n,a=e.getValue(t);return a>=r&&a<=i};inNumberRange.resolveFilterValue=e=>{let[t,n]=e,r=typeof t==`number`?t:parseFloat(t),i=typeof n==`number`?n:parseFloat(n),a=t===null||Number.isNaN(r)?-1/0:r,o=n===null||Number.isNaN(i)?1/0:i;if(a>o){let e=a;a=o,o=e}return[a,o]},inNumberRange.autoRemove=e=>testFalsey(e)||testFalsey(e[0])&&testFalsey(e[1]);var filterFns={includesString,includesStringSensitive,equalsString,arrIncludes,arrIncludesAll,arrIncludesSome,equals,weakEquals,inNumberRange};function testFalsey(e){return e==null||e===``}var ColumnFiltering={getDefaultColumnDef:()=>({filterFn:`auto`}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:makeStateUpdater(`columnFilters`,e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let n=t.getCoreRowModel().flatRows[0]?.getValue(e.id);return typeof n==`string`?filterFns.includesString:typeof n==`number`?filterFns.inNumberRange:typeof n==`boolean`||typeof n==`object`&&n?filterFns.equals:Array.isArray(n)?filterFns.arrIncludes:filterFns.weakEquals},e.getFilterFn=()=>{var n,r;return isFunction$6(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn===`auto`?e.getAutoFilterFn():t.options.filterFns?.[e.columnDef.filterFn]??filterFns[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return(e.columnDef.enableColumnFilter??!0)&&(t.options.enableColumnFilters??!0)&&(t.options.enableFilters??!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(t=>t.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return t.getState().columnFilters?.findIndex(t=>t.id===e.id)??-1},e.setFilterValue=n=>{t.setColumnFilters(t=>{let r=e.getFilterFn(),i=t?.find(t=>t.id===e.id),a=functionalUpdate$1(n,i?i.value:void 0);if(shouldAutoRemoveFilter(r,a,e)){var o;return t?.filter(t=>t.id!==e.id)??[]}let c={id:e.id,value:a};if(i){var u;return t?.map(t=>t.id===e.id?c:t)??[]}return t!=null&&t.length?[...t,c]:[c]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let n=e.getAllLeafColumns();e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(e=>{var r;return functionalUpdate$1(t,e)?.filter(e=>{let t=n.find(t=>t.id===e.id);return!(t&&shouldAutoRemoveFilter(t.getFilterFn(),e.value,t))})})},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:e.initialState?.columnFilters??[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function shouldAutoRemoveFilter(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||t===void 0||typeof t==`string`&&!t}var sum=(e,t,n)=>n.reduce((t,n)=>{let r=n.getValue(e);return t+(typeof r==`number`?r:0)},0),min=(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);n!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}),r},max=(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);n!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}),r},extent=(e,t,n)=>{let r,i;return n.forEach(t=>{let n=t.getValue(e);n!=null&&(r===void 0?n>=n&&(r=i=n):(r>n&&(r=n),i<n&&(i=n)))}),[r,i]},mean=(e,t)=>{let n=0,r=0;if(t.forEach(t=>{let i=t.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},median=(e,t)=>{if(!t.length)return;let n=t.map(t=>t.getValue(e));if(!isNumberArray(n))return;if(n.length===1)return n[0];let r=Math.floor(n.length/2),i=n.sort((e,t)=>e-t);return n.length%2==0?(i[r-1]+i[r])/2:i[r]},unique=(e,t)=>Array.from(new Set(t.map(t=>t.getValue(e))).values()),uniqueCount=(e,t)=>new Set(t.map(t=>t.getValue(e))).size,count$1=(e,t)=>t.length,aggregationFns={sum,min,max,extent,mean,median,unique,uniqueCount,count:count$1},ColumnGrouping={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return((n=e.getValue())==null||n.toString==null?void 0:n.toString())??null},aggregationFn:`auto`}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:makeStateUpdater(`grouping`,e),groupedColumnMode:`reorder`}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(t=>t!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var n,r;return(e.columnDef.enableGrouping??!0)&&(t.options.enableGrouping??!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return t.getState().grouping?.includes(e.id)},e.getGroupedIndex=()=>{var n;return t.getState().grouping?.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let n=t.getCoreRowModel().flatRows[0]?.getValue(e.id);if(typeof n==`number`)return aggregationFns.sum;if(Object.prototype.toString.call(n)===`[object Date]`)return aggregationFns.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw Error();return isFunction$6(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn===`auto`?e.getAutoAggregationFn():t.options.aggregationFns?.[e.columnDef.aggregationFn]??aggregationFns[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:e.initialState?.grouping??[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];let r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((t=n.subRows)!=null&&t.length)}}};function orderColumns(e,t,n){if(!(t!=null&&t.length)||!n)return e;let r=e.filter(e=>!t.includes(e.id));return n===`remove`?r:[...t.map(t=>e.find(e=>e.id===t)).filter(Boolean),...r]}var ColumnOrdering={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:makeStateUpdater(`columnOrder`,e)}),createColumn:(e,t)=>{e.getIndex=memo(e=>[_getVisibleLeafColumns(t,e)],t=>t.findIndex(t=>t.id===e.id),getMemoOptions(t.options,`debugColumns`,`getIndex`)),e.getIsFirstColumn=n=>{var r;return _getVisibleLeafColumns(t,n)[0]?.id===e.id},e.getIsLastColumn=n=>{var r;let i=_getVisibleLeafColumns(t,n);return i[i.length-1]?.id===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:e.initialState.columnOrder??[])},e._getOrderColumnsFn=memo(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(e,t,n)=>r=>{let i=[];if(!(e!=null&&e.length))i=r;else{let t=[...e],n=[...r];for(;n.length&&t.length;){let e=t.shift(),r=n.findIndex(t=>t.id===e);r>-1&&i.push(n.splice(r,1)[0])}i=[...i,...n]}return orderColumns(i,t,n)},getMemoOptions(e.options,`debugTable`,`_getOrderColumnsFn`))}},getDefaultColumnPinningState=()=>({left:[],right:[]}),ColumnPinning={getInitialState:e=>({columnPinning:getDefaultColumnPinningState(),...e}),getDefaultOptions:e=>({onColumnPinningChange:makeStateUpdater(`columnPinning`,e)}),createColumn:(e,t)=>{e.pin=n=>{let r=e.getLeafColumns().map(e=>e.id).filter(Boolean);t.setColumnPinning(e=>{var t,i;if(n===`right`){var a,o;return{left:(e?.left??[]).filter(e=>!(r!=null&&r.includes(e))),right:[...(e?.right??[]).filter(e=>!(r!=null&&r.includes(e))),...r]}}if(n===`left`){var c,u;return{left:[...(e?.left??[]).filter(e=>!(r!=null&&r.includes(e))),...r],right:(e?.right??[]).filter(e=>!(r!=null&&r.includes(e)))}}return{left:(e?.left??[]).filter(e=>!(r!=null&&r.includes(e))),right:(e?.right??[]).filter(e=>!(r!=null&&r.includes(e)))}})},e.getCanPin=()=>e.getLeafColumns().some(e=>{var n,r,i;return(e.columnDef.enablePinning??!0)&&(t.options.enableColumnPinning??t.options.enablePinning??!0)}),e.getIsPinned=()=>{let n=e.getLeafColumns().map(e=>e.id),{left:r,right:i}=t.getState().columnPinning,a=n.some(e=>r?.includes(e)),o=n.some(e=>i?.includes(e));return a?`left`:o?`right`:!1},e.getPinnedIndex=()=>{var n,r;let i=e.getIsPinned();return i?((r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))??-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=memo(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,t,n)=>{let r=[...t??[],...n??[]];return e.filter(e=>!r.includes(e.column.id))},getMemoOptions(t.options,`debugRows`,`getCenterVisibleCells`)),e.getLeftVisibleCells=memo(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(e,t)=>(t??[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:`left`})),getMemoOptions(t.options,`debugRows`,`getLeftVisibleCells`)),e.getRightVisibleCells=memo(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(e,t)=>(t??[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:`right`})),getMemoOptions(t.options,`debugRows`,`getRightVisibleCells`))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?getDefaultColumnPinningState():e.initialState?.columnPinning??getDefaultColumnPinningState())},e.getIsSomeColumnsPinned=t=>{var n;let r=e.getState().columnPinning;if(!t){var i,a;return!!(r.left?.length||r.right?.length)}return!!r[t]?.length},e.getLeftLeafColumns=memo(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(e,t)=>(t??[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),getMemoOptions(e.options,`debugColumns`,`getLeftLeafColumns`)),e.getRightLeafColumns=memo(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(e,t)=>(t??[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),getMemoOptions(e.options,`debugColumns`,`getRightLeafColumns`)),e.getCenterLeafColumns=memo(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(e,t,n)=>{let r=[...t??[],...n??[]];return e.filter(e=>!r.includes(e.id))},getMemoOptions(e.options,`debugColumns`,`getCenterLeafColumns`))}};function safelyAccessDocument(e){return e||(typeof document<`u`?document:null)}var defaultColumnSizing={size:150,minSize:20,maxSize:2**53-1},getDefaultColumnSizingInfoState=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),ColumnSizing={getDefaultColumnDef:()=>defaultColumnSizing,getInitialState:e=>({columnSizing:{},columnSizingInfo:getDefaultColumnSizingInfoState(),...e}),getDefaultOptions:e=>({columnResizeMode:`onEnd`,columnResizeDirection:`ltr`,onColumnSizingChange:makeStateUpdater(`columnSizing`,e),onColumnSizingInfoChange:makeStateUpdater(`columnSizingInfo`,e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;let a=t.getState().columnSizing[e.id];return Math.min(Math.max(e.columnDef.minSize??defaultColumnSizing.minSize,a??e.columnDef.size??defaultColumnSizing.size),e.columnDef.maxSize??defaultColumnSizing.maxSize)},e.getStart=memo(e=>[e,_getVisibleLeafColumns(t,e),t.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((e,t)=>e+t.getSize(),0),getMemoOptions(t.options,`debugColumns`,`getStart`)),e.getAfter=memo(e=>[e,_getVisibleLeafColumns(t,e),t.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((e,t)=>e+t.getSize(),0),getMemoOptions(t.options,`debugColumns`,`getAfter`)),e.resetSize=()=>{t.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>{var n,r;return(e.columnDef.enableResizing??!0)&&(t.options.enableColumnResizing??!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0,n=e=>{if(e.subHeaders.length)e.subHeaders.forEach(n);else{var r;t+=e.column.getSize()??0}};return n(e),t},e.getStart=()=>{if(e.index>0){let t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{let r=t.getColumn(e.column.id),i=r?.getCanResize();return a=>{if(!r||!i||(a.persist==null||a.persist(),isTouchStartEvent(a)&&a.touches&&a.touches.length>1))return;let o=e.getSize(),c=e?e.getLeafHeaders().map(e=>[e.column.id,e.column.getSize()]):[[r.id,r.getSize()]],u=isTouchStartEvent(a)?Math.round(a.touches[0].clientX):a.clientX,K={},Y=(e,n)=>{typeof n==`number`&&(t.setColumnSizingInfo(e=>{var r,i;let a=t.options.columnResizeDirection===`rtl`?-1:1,o=(n-(e?.startOffset??0))*a,c=Math.max(o/(e?.startSize??0),-.999999);return e.columnSizingStart.forEach(e=>{let[t,n]=e;K[t]=Math.round(Math.max(n+n*c,0)*100)/100}),{...e,deltaOffset:o,deltaPercentage:c}}),(t.options.columnResizeMode===`onChange`||e===`end`)&&t.setColumnSizing(e=>({...e,...K})))},X=e=>Y(`move`,e),ee=e=>{Y(`end`,e),t.setColumnSizingInfo(e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},te=safelyAccessDocument(n),ce={moveHandler:e=>X(e.clientX),upHandler:e=>{te?.removeEventListener(`mousemove`,ce.moveHandler),te?.removeEventListener(`mouseup`,ce.upHandler),ee(e.clientX)}},ue={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),X(e.touches[0].clientX),!1),upHandler:e=>{var t;te?.removeEventListener(`touchmove`,ue.moveHandler),te?.removeEventListener(`touchend`,ue.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),ee(e.touches[0]?.clientX)}},de=passiveEventSupported()?{passive:!1}:!1;isTouchStartEvent(a)?(te?.addEventListener(`touchmove`,ue.moveHandler,de),te?.addEventListener(`touchend`,ue.upHandler,de)):(te?.addEventListener(`mousemove`,ce.moveHandler,de),te?.addEventListener(`mouseup`,ce.upHandler,de)),t.setColumnSizingInfo(e=>({...e,startOffset:u,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:c,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:e.initialState.columnSizing??{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?getDefaultColumnSizingInfoState():e.initialState.columnSizingInfo??getDefaultColumnSizingInfoState())},e.getTotalSize=()=>{var t,n;return e.getHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0},e.getLeftTotalSize=()=>{var t,n;return e.getLeftHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0},e.getCenterTotalSize=()=>{var t,n;return e.getCenterHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0},e.getRightTotalSize=()=>{var t,n;return e.getRightHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0}}},passiveSupported=null;function passiveEventSupported(){if(typeof passiveSupported==`boolean`)return passiveSupported;let e=!1;try{let t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener(`test`,n,t),window.removeEventListener(`test`,n)}catch{e=!1}return passiveSupported=e,passiveSupported}function isTouchStartEvent(e){return e.type===`touchstart`}var ColumnVisibility={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:makeStateUpdater(`columnVisibility`,e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(t=>({...t,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;let i=e.columns;return(i.length?i.some(e=>e.getIsVisible()):t.getState().columnVisibility?.[e.id])??!0},e.getCanHide=()=>{var n,r;return(e.columnDef.enableHiding??!0)&&(t.options.enableHiding??!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=memo(()=>[e.getAllCells(),t.getState().columnVisibility],e=>e.filter(e=>e.column.getIsVisible()),getMemoOptions(t.options,`debugRows`,`_getAllVisibleCells`)),e.getVisibleCells=memo(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(e,t,n)=>[...e,...t,...n],getMemoOptions(t.options,`debugRows`,`getVisibleCells`))},createTable:e=>{let t=(t,n)=>memo(()=>[n(),n().filter(e=>e.getIsVisible()).map(e=>e.id).join(`_`)],e=>e.filter(e=>e.getIsVisible==null?void 0:e.getIsVisible()),getMemoOptions(e.options,`debugColumns`,t));e.getVisibleFlatColumns=t(`getVisibleFlatColumns`,()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t(`getVisibleLeafColumns`,()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t(`getLeftVisibleLeafColumns`,()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t(`getRightVisibleLeafColumns`,()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t(`getCenterVisibleLeafColumns`,()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:e.initialState.columnVisibility??{})},e.toggleAllColumnsVisible=t=>{var n;t??=!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((e,n)=>({...e,[n.id]:t||!(n.getCanHide!=null&&n.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(e=>!(e.getIsVisible!=null&&e.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(e=>e.getIsVisible==null?void 0:e.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(t.target?.checked)}}};function _getVisibleLeafColumns(e,t){return t?t===`center`?e.getCenterVisibleLeafColumns():t===`left`?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var GlobalFaceting={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,`__global__`),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,`__global__`),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,`__global__`),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},GlobalFiltering={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:makeStateUpdater(`globalFilter`,e),globalFilterFn:`auto`,getColumnCanGlobalFilter:t=>{var n;let r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r==`string`||typeof r==`number`}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,a;return(e.columnDef.enableGlobalFilter??!0)&&(t.options.enableGlobalFilter??!0)&&(t.options.enableFilters??!0)&&((t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))??!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>filterFns.includesString,e.getGlobalFilterFn=()=>{var t,n;let{globalFilterFn:r}=e.options;return isFunction$6(r)?r:r===`auto`?e.getGlobalAutoFilterFn():e.options.filterFns?.[r]??filterFns[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},RowExpanding={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:makeStateUpdater(`expanded`,e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if(e.options.autoResetAll??e.options.autoResetExpanded??!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=t=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{t??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,r;e.setExpanded(t?{}:e.initialState?.expanded??{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(e=>e.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>t=>{t.persist==null||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let t=e.getState().expanded;return t===!0||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{let t=e.getState().expanded;return typeof t==`boolean`?t===!0:!(!Object.keys(t).length||e.getRowModel().flatRows.some(e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(e=>{let n=e.split(`.`);t=Math.max(t,n.length)}),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;let a=r===!0||!!(r!=null&&r[e.id]),o={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(e=>{o[e]=!0}):o=r,n??=!a,!a&&n)return{...o,[e.id]:!0};if(a&&!n){let{[e.id]:t,...n}=o;return n}return r})},e.getIsExpanded=()=>{var n;let r=t.getState().expanded;return!!((t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))??(r===!0||r?.[e.id]))},e.getCanExpand=()=>{var n,r,i;return(t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))??((t.options.enableExpanding??!0)&&!!((i=e.subRows)!=null&&i.length))},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{let t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},defaultPageIndex=0,defaultPageSize=10,getDefaultPaginationState=()=>({pageIndex:defaultPageIndex,pageSize:defaultPageSize}),RowPagination={getInitialState:e=>({...e,pagination:{...getDefaultPaginationState(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:makeStateUpdater(`pagination`,e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=t=>e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(e=>functionalUpdate$1(t,e)),e.resetPagination=t=>{var n;e.setPagination(t?getDefaultPaginationState():e.initialState.pagination??getDefaultPaginationState())},e.setPageIndex=t=>{e.setPagination(n=>{let r=functionalUpdate$1(t,n.pageIndex),i=e.options.pageCount===void 0||e.options.pageCount===-1?2**53-1:e.options.pageCount-1;return r=Math.max(0,Math.min(r,i)),{...n,pageIndex:r}})},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?defaultPageIndex:((r=e.initialState)==null||(r=r.pagination)==null?void 0:r.pageIndex)??defaultPageIndex)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?defaultPageSize:((r=e.initialState)==null||(r=r.pagination)==null?void 0:r.pageSize)??defaultPageSize)},e.setPageSize=t=>{e.setPagination(e=>{let n=Math.max(1,functionalUpdate$1(t,e.pageSize)),r=e.pageSize*e.pageIndex,i=Math.floor(r/n);return{...e,pageIndex:i,pageSize:n}})},e.setPageCount=t=>e.setPagination(n=>{var r;let i=functionalUpdate$1(t,e.options.pageCount??-1);return typeof i==`number`&&(i=Math.max(-1,i)),{...n,pageCount:i}}),e.getPageOptions=memo(()=>[e.getPageCount()],e=>{let t=[];return e&&e>0&&(t=[...Array(e)].fill(null).map((e,t)=>t)),t},getMemoOptions(e.options,`debugTable`,`getPageOptions`)),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return n===-1||n!==0&&t<n-1},e.previousPage=()=>e.setPageIndex(e=>e-1),e.nextPage=()=>e.setPageIndex(e=>e+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return e.options.pageCount??Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return e.options.rowCount??e.getPrePaginationRowModel().rows.length}}},getDefaultRowPinningState=()=>({top:[],bottom:[]}),RowPinning={getInitialState:e=>({rowPinning:getDefaultRowPinningState(),...e}),getDefaultOptions:e=>({onRowPinningChange:makeStateUpdater(`rowPinning`,e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{let a=r?e.getLeafRows().map(e=>{let{id:t}=e;return t}):[],o=i?e.getParentRows().map(e=>{let{id:t}=e;return t}):[],c=new Set([...o,e.id,...a]);t.setRowPinning(e=>{var t,r;if(n===`bottom`){var i,a;return{top:(e?.top??[]).filter(e=>!(c!=null&&c.has(e))),bottom:[...(e?.bottom??[]).filter(e=>!(c!=null&&c.has(e))),...Array.from(c)]}}if(n===`top`){var o,u;return{top:[...(e?.top??[]).filter(e=>!(c!=null&&c.has(e))),...Array.from(c)],bottom:(e?.bottom??[]).filter(e=>!(c!=null&&c.has(e)))}}return{top:(e?.top??[]).filter(e=>!(c!=null&&c.has(e))),bottom:(e?.bottom??[]).filter(e=>!(c!=null&&c.has(e)))}})},e.getCanPin=()=>{var n;let{enableRowPinning:r,enablePinning:i}=t.options;return typeof r==`function`?r(e):r??i??!0},e.getIsPinned=()=>{let n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,a=n.some(e=>r?.includes(e)),o=n.some(e=>i?.includes(e));return a?`top`:o?`bottom`:!1},e.getPinnedIndex=()=>{var n,r;let i=e.getIsPinned();return i?((i===`top`?t.getTopRows():t.getBottomRows())?.map(e=>{let{id:t}=e;return t}))?.indexOf(e.id)??-1:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?getDefaultRowPinningState():e.initialState?.rowPinning??getDefaultRowPinningState())},e.getIsSomeRowsPinned=t=>{var n;let r=e.getState().rowPinning;if(!t){var i,a;return!!(r.top?.length||r.bottom?.length)}return!!r[t]?.length},e._getPinnedRows=(t,n,r)=>{var i;return(e.options.keepPinnedRows??!0?(n??[]).map(t=>{let n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null}):(n??[]).map(e=>t.find(t=>t.id===e))).filter(Boolean).map(e=>({...e,position:r}))},e.getTopRows=memo(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,`top`),getMemoOptions(e.options,`debugRows`,`getTopRows`)),e.getBottomRows=memo(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,`bottom`),getMemoOptions(e.options,`debugRows`,`getBottomRows`)),e.getCenterRows=memo(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(e,t,n)=>{let r=new Set([...t??[],...n??[]]);return e.filter(e=>!r.has(e.id))},getMemoOptions(e.options,`debugRows`,`getCenterRows`))}},RowSelection={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:makeStateUpdater(`rowSelection`,e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:e.initialState.rowSelection??{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=t===void 0?!e.getIsAllRowsSelected():t;let r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(e=>{e.getCanSelect()&&(r[e.id]=!0)}):i.forEach(e=>{delete r[e.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{let r=t===void 0?!e.getIsAllPageRowsSelected():t,i={...n};return e.getRowModel().rows.forEach(t=>{mutateRowIsSelected(i,t.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=memo(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?selectRowsFn(e,n):{rows:[],flatRows:[],rowsById:{}},getMemoOptions(e.options,`debugTable`,`getSelectedRowModel`)),e.getFilteredSelectedRowModel=memo(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?selectRowsFn(e,n):{rows:[],flatRows:[],rowsById:{}},getMemoOptions(e.options,`debugTable`,`getFilteredSelectedRowModel`)),e.getGroupedSelectedRowModel=memo(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?selectRowsFn(e,n):{rows:[],flatRows:[],rowsById:{}},getMemoOptions(e.options,`debugTable`,`getGroupedSelectedRowModel`)),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState(),r=!!(t.length&&Object.keys(n).length);return r&&t.some(e=>e.getCanSelect()&&!n[e.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(e=>e.getCanSelect()),{rowSelection:n}=e.getState(),r=!!t.length;return r&&t.some(e=>!n[e.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;let n=Object.keys(e.getState().rowSelection??{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter(e=>e.getCanSelect()).some(e=>e.getIsSelected()||e.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{let i=e.getIsSelected();t.setRowSelection(a=>{var o;if(n=n===void 0?!i:n,e.getCanSelect()&&i===n)return a;let c={...a};return mutateRowIsSelected(c,e.id,n,r?.selectChildren??!0,t),c})},e.getIsSelected=()=>{let{rowSelection:n}=t.getState();return isRowSelected(e,n)},e.getIsSomeSelected=()=>{let{rowSelection:n}=t.getState();return isSubRowSelected(e,n)===`some`},e.getIsAllSubRowsSelected=()=>{let{rowSelection:n}=t.getState();return isSubRowSelected(e,n)===`all`},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection==`function`?t.options.enableRowSelection(e):t.options.enableRowSelection??!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection==`function`?t.options.enableSubRowSelection(e):t.options.enableSubRowSelection??!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection==`function`?t.options.enableMultiRowSelection(e):t.options.enableMultiRowSelection??!0},e.getToggleSelectedHandler=()=>{let t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(n.target?.checked)}}}},mutateRowIsSelected=(e,t,n,r,i)=>{var a;let o=i.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(t=>delete e[t]),o.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(a=o.subRows)!=null&&a.length&&o.getCanSelectSubRows()&&o.subRows.forEach(t=>mutateRowIsSelected(e,t.id,n,r,i))};function selectRowsFn(e,t){let n=e.getState().rowSelection,r=[],i={},a=function(e,t){return e.map(e=>{var t;let o=isRowSelected(e,n);if(o&&(r.push(e),i[e.id]=e),(t=e.subRows)!=null&&t.length&&(e={...e,subRows:a(e.subRows)}),o)return e}).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:i}}function isRowSelected(e,t){var n;return t[e.id]??!1}function isSubRowSelected(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,a=!1;return e.subRows.forEach(e=>{if((!a||i)&&(e.getCanSelect()&&(isRowSelected(e,t)?a=!0:i=!1),e.subRows&&e.subRows.length)){let n=isSubRowSelected(e,t);n===`all`?a=!0:(n===`some`&&(a=!0),i=!1)}}),i?`all`:a?`some`:!1}var reSplitAlphaNumeric=/([0-9]+)/gm,alphanumeric=(e,t,n)=>compareAlphanumeric(toString$5(e.getValue(n)).toLowerCase(),toString$5(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive=(e,t,n)=>compareAlphanumeric(toString$5(e.getValue(n)),toString$5(t.getValue(n))),text$4=(e,t,n)=>compareBasic(toString$5(e.getValue(n)).toLowerCase(),toString$5(t.getValue(n)).toLowerCase()),textCaseSensitive=(e,t,n)=>compareBasic(toString$5(e.getValue(n)),toString$5(t.getValue(n))),datetime$2=(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},basic=(e,t,n)=>compareBasic(e.getValue(n),t.getValue(n));function compareBasic(e,t){return e===t?0:e>t?1:-1}function toString$5(e){return typeof e==`number`?isNaN(e)||e===1/0||e===-1/0?``:String(e):typeof e==`string`?e:``}function compareAlphanumeric(e,t){let n=e.split(reSplitAlphaNumeric).filter(Boolean),r=t.split(reSplitAlphaNumeric).filter(Boolean);for(;n.length&&r.length;){let e=n.shift(),t=r.shift(),i=parseInt(e,10),a=parseInt(t,10),o=[i,a].sort();if(isNaN(o[0])){if(e>t)return 1;if(t>e)return-1;continue}if(isNaN(o[1]))return isNaN(i)?-1:1;if(i>a)return 1;if(a>i)return-1}return n.length-r.length}var sortingFns={alphanumeric,alphanumericCaseSensitive,text:text$4,textCaseSensitive,datetime:datetime$2,basic},RowSorting={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:`auto`,sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:makeStateUpdater(`sorting`,e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let n=t.getFilteredRowModel().flatRows.slice(10),r=!1;for(let t of n){let n=t?.getValue(e.id);if(Object.prototype.toString.call(n)===`[object Date]`)return sortingFns.datetime;if(typeof n==`string`&&(r=!0,n.split(reSplitAlphaNumeric).length>1))return sortingFns.alphanumeric}return r?sortingFns.text:sortingFns.basic},e.getAutoSortDir=()=>typeof t.getFilteredRowModel().flatRows[0]?.getValue(e.id)==`string`?`asc`:`desc`,e.getSortingFn=()=>{var n,r;if(!e)throw Error();return isFunction$6(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn===`auto`?e.getAutoSortingFn():t.options.sortingFns?.[e.columnDef.sortingFn]??sortingFns[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{let i=e.getNextSortingOrder(),a=n!=null;t.setSorting(o=>{let c=o?.find(t=>t.id===e.id),u=o?.findIndex(t=>t.id===e.id),K=[],Y,X=a?n:i===`desc`;if(Y=o!=null&&o.length&&e.getCanMultiSort()&&r?c?`toggle`:`add`:o!=null&&o.length&&u!==o.length-1?`replace`:c?`toggle`:`replace`,Y===`toggle`&&(a||i||(Y=`remove`)),Y===`add`){var ee;K=[...o,{id:e.id,desc:X}],K.splice(0,K.length-(t.options.maxMultiSortColCount??2**53-1))}else K=Y===`toggle`?o.map(t=>t.id===e.id?{...t,desc:X}:t):Y===`remove`?o.filter(t=>t.id!==e.id):[{id:e.id,desc:X}];return K})},e.getFirstSortDir=()=>{var n,r;return e.columnDef.sortDescFirst??t.options.sortDescFirst??e.getAutoSortDir()===`desc`?`desc`:`asc`},e.getNextSortingOrder=n=>{var r,i;let a=e.getFirstSortDir(),o=e.getIsSorted();return o?o!==a&&(t.options.enableSortingRemoval??!0)&&(!n||(t.options.enableMultiRemove??!0))?!1:o===`desc`?`asc`:`desc`:a},e.getCanSort=()=>{var n,r;return(e.columnDef.enableSorting??!0)&&(t.options.enableSorting??!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return e.columnDef.enableMultiSort??t.options.enableMultiSort??!!e.accessorFn},e.getIsSorted=()=>{var n;let r=t.getState().sorting?.find(t=>t.id===e.id);return r?r.desc?`desc`:`asc`:!1},e.getSortIndex=()=>{var n,r;return t.getState().sorting?.findIndex(t=>t.id===e.id)??-1},e.clearSorting=()=>{t.setSorting(t=>t!=null&&t.length?t.filter(t=>t.id!==e.id):[])},e.getToggleSortingHandler=()=>{let n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:e.initialState?.sorting??[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},builtInFeatures=[Headers$1,ColumnVisibility,ColumnOrdering,ColumnPinning,ColumnFaceting,ColumnFiltering,GlobalFaceting,GlobalFiltering,RowSorting,ColumnGrouping,RowExpanding,RowPagination,RowPinning,RowSelection,ColumnSizing];function createTable(e){var t,n;let r=[...builtInFeatures,...e._features??[]],i={_features:r},a=i._features.reduce((e,t)=>Object.assign(e,t.getDefaultOptions==null?void 0:t.getDefaultOptions(i)),{}),o=e=>i.options.mergeOptions?i.options.mergeOptions(a,e):{...a,...e},c={...e.initialState??{}};i._features.forEach(e=>{var t;c=(e.getInitialState==null?void 0:e.getInitialState(c))??c});let u=[],K=!1,Y={_features:r,options:{...a,...e},initialState:c,_queue:e=>{u.push(e),K||(K=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();K=!1}).catch(e=>setTimeout(()=>{throw e})))},reset:()=>{i.setState(i.initialState)},setOptions:e=>{let t=functionalUpdate$1(e,i.options);i.options=o(t)},getState:()=>i.options.state,setState:e=>{i.options.onStateChange==null||i.options.onStateChange(e)},_getRowId:(e,t,n)=>{var r;return(i.options.getRowId==null?void 0:i.options.getRowId(e,t,n))??`${n?[n.id,t].join(`.`):t}`},getCoreRowModel:()=>(i._getCoreRowModel||=i.options.getCoreRowModel(i),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?i.getPrePaginationRowModel():i.getRowModel()).rowsById[e];if(!n&&(n=i.getCoreRowModel().rowsById[e],!n))throw Error();return n},_getDefaultColumnDef:memo(()=>[i.options.defaultColumn],e=>{var t;return e??={},{header:e=>{let t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return((n=e.renderValue())==null||n.toString==null?void 0:n.toString())??null},...i._features.reduce((e,t)=>Object.assign(e,t.getDefaultColumnDef==null?void 0:t.getDefaultColumnDef()),{}),...e}},getMemoOptions(e,`debugColumns`,`_getDefaultColumnDef`)),_getColumnDefs:()=>i.options.columns,getAllColumns:memo(()=>[i._getColumnDefs()],e=>{let t=function(e,n,r){return r===void 0&&(r=0),e.map(e=>{let a=createColumn(i,e,r,n),o=e;return a.columns=o.columns?t(o.columns,a,r+1):[],a})};return t(e)},getMemoOptions(e,`debugColumns`,`getAllColumns`)),getAllFlatColumns:memo(()=>[i.getAllColumns()],e=>e.flatMap(e=>e.getFlatColumns()),getMemoOptions(e,`debugColumns`,`getAllFlatColumns`)),_getAllFlatColumnsById:memo(()=>[i.getAllFlatColumns()],e=>e.reduce((e,t)=>(e[t.id]=t,e),{}),getMemoOptions(e,`debugColumns`,`getAllFlatColumnsById`)),getAllLeafColumns:memo(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(e,t)=>t(e.flatMap(e=>e.getLeafColumns())),getMemoOptions(e,`debugColumns`,`getAllLeafColumns`)),getColumn:e=>i._getAllFlatColumnsById()[e]};Object.assign(i,Y);for(let e=0;e<i._features.length;e++){let t=i._features[e];t==null||t.createTable==null||t.createTable(i)}return i}function getCoreRowModel(){return e=>memo(()=>[e.options.data],t=>{let n={rows:[],flatRows:[],rowsById:{}},r=function(t,i,a){i===void 0&&(i=0);let o=[];for(let u=0;u<t.length;u++){let K=createRow(e,e._getRowId(t[u],u,a),t[u],u,i,void 0,a?.id);if(n.flatRows.push(K),n.rowsById[K.id]=K,o.push(K),e.options.getSubRows){var c;K.originalSubRows=e.options.getSubRows(t[u],u),(c=K.originalSubRows)!=null&&c.length&&(K.subRows=r(K.originalSubRows,i+1,K))}}return o};return n.rows=r(t),n},getMemoOptions(e.options,`debugTable`,`getRowModel`,()=>e._autoResetPageIndex()))}function flexRender(e,t){return e?isReactComponent(e)?import_react.createElement(e,t):e:null}function isReactComponent(e){return isClassComponent(e)||typeof e==`function`||isExoticComponent(e)}function isClassComponent(e){return typeof e==`function`&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function isExoticComponent(e){return typeof e==`object`&&typeof e.$$typeof==`symbol`&&[`react.memo`,`react.forward_ref`].includes(e.$$typeof.description)}function useReactTable(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=import_react.useState(()=>({current:createTable(t)})),[r,i]=import_react.useState(()=>n.current.initialState);return n.current.setOptions(t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{i(t),e.onStateChange==null||e.onStateChange(t)}})),n.current}var require_browser$2=__commonJSMin(((e,t)=>{t.exports=function(e,t,n,r,i,a,o,c){if(!e){var u;if(t===void 0)u=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var K=[n,r,i,a,o,c],Y=0;u=Error(t.replace(/%s/g,function(){return K[Y++]})),u.name=`Invariant Violation`}throw u.framesToPop=1,u}}})),examples_mobile_json_default={AC:`40123`,AD:`312345`,AE:`501234567`,AF:`701234567`,AG:`2684641234`,AI:`2642351234`,AL:`672123456`,AM:`77123456`,AO:`923123456`,AR:`91123456789`,AS:`6847331234`,AT:`664123456`,AU:`412345678`,AW:`5601234`,AX:`412345678`,AZ:`401234567`,BA:`61123456`,BB:`2462501234`,BD:`1812345678`,BE:`470123456`,BF:`70123456`,BG:`43012345`,BH:`36001234`,BI:`79561234`,BJ:`90011234`,BL:`690001234`,BM:`4413701234`,BN:`7123456`,BO:`71234567`,BQ:`3181234`,BR:`11961234567`,BS:`2423591234`,BT:`17123456`,BW:`71123456`,BY:`294911911`,BZ:`6221234`,CA:`5062345678`,CC:`412345678`,CD:`991234567`,CF:`70012345`,CG:`061234567`,CH:`781234567`,CI:`0123456789`,CK:`71234`,CL:`221234567`,CM:`671234567`,CN:`13123456789`,CO:`3211234567`,CR:`83123456`,CU:`51234567`,CV:`9911234`,CW:`95181234`,CX:`412345678`,CY:`96123456`,CZ:`601123456`,DE:`15123456789`,DJ:`77831001`,DK:`34412345`,DM:`7672251234`,DO:`8092345678`,DZ:`551234567`,EC:`991234567`,EE:`51234567`,EG:`1001234567`,EH:`650123456`,ER:`7123456`,ES:`612345678`,ET:`911234567`,FI:`412345678`,FJ:`7012345`,FK:`51234`,FM:`3501234`,FO:`211234`,FR:`612345678`,GA:`06031234`,GB:`7400123456`,GD:`4734031234`,GE:`555123456`,GF:`694201234`,GG:`7781123456`,GH:`231234567`,GI:`57123456`,GL:`221234`,GM:`3012345`,GN:`601123456`,GP:`690001234`,GQ:`222123456`,GR:`6912345678`,GT:`51234567`,GU:`6713001234`,GW:`955012345`,GY:`6091234`,HK:`51234567`,HN:`91234567`,HR:`921234567`,HT:`34101234`,HU:`201234567`,ID:`8
3012345678`,IE:`850123456`,IL:`502345678`,IM:`7924123456`,IN:`8123456789`,IO:`3801234`,IQ:`7912345678`,IR:`9123456789`,IS:`6111234`,IT:`3123456789`,JE:`7797712345`,JM:`8762101234`,JO:`790123456`,JP:`9012345678`,KE:`712123456`,KG:`700123456`,KH:`91234567`,KI:`72001234`,KM:`3212345`,KN:`8697652917`,KP:`1921234567`,KR:`1020000000`,KW:`50012345`,KY:`3453231234`,KZ:`7710009998`,LA:`2023123456`,LB:`71123456`,LC:`7582845678`,LI:`660234567`,LK:`712345678`,LR:`770123456`,LS:`50123456`,LT:`61234567`,LU:`628123456`,LV:`21234567`,LY:`912345678`,MA:`650123456`,MC:`612345678`,MD:`62112345`,ME:`67622901`,MF:`690001234`,MG:`321234567`,MH:`2351234`,MK:`72345678`,ML:`65012345`,MM:`92123456`,MN:`88123456`,MO:`66123456`,MP:`6702345678`,MQ:`696201234`,MR:`22123456`,MS:`6644923456`,MT:`96961234`,MU:`52512345`,MV:`7712345`,MW:`991234567`,MX:`2221234567`,MY:`123456789`,MZ:`821234567`,NA:`811234567`,NC:`751234`,NE:`93123456`,NF:`381234`,NG:`8021234567`,NI:`81234567`,NL:`612345678`,NO:`40612345`,NP:`9841234567`,NR:`5551234`,NU:`8884012`,NZ:`211234567`,OM:`92123456`,PA:`61234567`,PE:`912345678`,PF:`87123456`,PG:`70123456`,PH:`9051234567`,PK:`3012345678`,PL:`512345678`,PM:`551234`,PR:`7872345678`,PS:`599123456`,PT:`912345678`,PW:`6201234`,PY:`961456789`,QA:`33123456`,RE:`692123456`,RO:`712034567`,RS:`601234567`,RU:`9123456789`,RW:`720123456`,SA:`512345678`,SB:`7421234`,SC:`2510123`,SD:`911231234`,SE:`701234567`,SG:`81234567`,SH:`51234`,SI:`31234567`,SJ:`41234567`,SK:`912123456`,SL:`25123456`,SM:`66661212`,SN:`701234567`,SO:`71123456`,SR:`7412345`,SS:`977123456`,ST:`9812345`,SV:`70123456`,SX:`7215205678`,SY:`944567890`,SZ:`76123456`,TA:`8999`,TC:`6492311234`,TD:`63012345`,TG:`90112345`,TH:`812345678`,TJ:`917123456`,TK:`7290`,TL:`77212345`,TM:`66123456`,TN:`20123456`,TO:`7715123`,TR:`5012345678`,TT:`8682911234`,TV:`901234`,TW:`912345678`,TZ:`621234567`,UA:`501234567`,UG:`712345678`,US:`2015550123`,UY:`94231234`,UZ:`912345678`,VA:`3123456789`,VC:`7844301234`,VE:`4121234567`,VG:`2843001234`,VI:`3406421234`,VN:`912345678`,VU:`5912345`,WF:`821234`,WS:`7212345`,XK:`43201234`,YE:`712345678`,YT:`639012345`,ZA:`711234567`,ZM:`955123456`,ZW:`712345678`},$23b9f4fcf0fe224b$export$d68d59712b04d9d1=class e{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let t=new e(this.type,this.key);return t.value=this.value,t.level=this.level,t.hasChildNodes=this.hasChildNodes,t.rendered=this.rendered,t.textValue=this.textValue,t[`aria-label`]=this[`aria-label`],t.index=this.index,t.parentKey=this.parentKey,t.prevKey=this.prevKey,t.nextKey=this.nextKey,t.firstChildKey=this.firstChildKey,t.lastChildKey=this.lastChildKey,t.props=this.props,t.render=this.render,t}constructor(e,t){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.type=e,this.key=t}},$23b9f4fcf0fe224b$export$408d25a4e12db025=class{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);var n;return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);var t;return e?.key??null}getItem(e){var t;return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}},$681cc3c98f569e39$export$410b0c854570d131=class{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return this.parentNode?.isConnected||!1}appendChild(e){this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index,this.firstChild===t?this.firstChild=e
30:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode;let n=t;for(;n;)n.index++,n=n.nextSibling;e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}removeChild(e){if(e.parentNode!==this||!this.ownerDocument.isMounted)return;this.ownerDocument.startTransaction();let t=e.nextSibling;for(;t;)t.index--,t=t.nextSibling;e.nextSibling&&(e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.removeNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}addEventListener(){}removeEventListener(){}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this.ownerDocument=e}},$681cc3c98f569e39$export$dc064fe9e59310fd=class e extends $681cc3c98f569e39$export$410b0c854570d131{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+ +(this.node.type===`item`):0}updateNode(){var t,n,r,i;let a=this.ownerDocument.getMutableNode(this);a.index=this.index,a.level=this.level,a.parentKey=this.parentNode instanceof e?this.parentNode.node.key:null;var o;a.prevKey=this.previousSibling?.node.key??null;var c;a.nextKey=this.nextSibling?.node.key??null,a.hasChildNodes=!!this.firstChild;var u;a.firstChildKey=this.firstChild?.node.key??null;var K;a.lastChildKey=this.lastChild?.node.key??null}setProps(e,t,n,r){let i=this.ownerDocument.getMutableNode(this),{value:a,textValue:o,id:c,...u}=e;if(u.ref=t,i.props=u,i.rendered=n,i.render=r,i.value=a,i.textValue=o||(typeof u.children==`string`?u.children:``)||e[`aria-label`]||``,c!=null&&c!==i.key){if(this.hasSetProps)throw Error(`Cannot change the id of an item`);i.key=c}this.hasSetProps||=(this.ownerDocument.addNode(this),this.ownerDocument.endTransaction(),!0),this.ownerDocument.queueUpdate()}get style(){return{}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this._index=0,this.hasSetProps=!1,this.node=new $23b9f4fcf0fe224b$export$d68d59712b04d9d1(e,`react-aria-${++t.nodeId}`),this.ownerDocument.startTransaction()}},$681cc3c98f569e39$export$b34a105447964f9f=class extends $681cc3c98f569e39$export$410b0c854570d131{get isConnected(){return this.isMounted}createElement(e){return new $681cc3c98f569e39$export$dc064fe9e59310fd(e,this)}getMutableNode(e){let t=e.node;return this.mutatedNodes.has(e)||(t=e.node.clone(),this.mutatedNodes.add(e),e.node=t),this.markDirty(e),t}getMutableCollection(){return!this.isSSR&&!this.collectionMutated&&(this.collection=this.collection.clone(),this.collectionMutated=!0),this.collection}markDirty(e){this.dirtyNodes.add(e)}startTransaction(){this.transactionCount++}endTransaction(){this.transactionCount--}addNode(e){let t=this.getMutableCollection();if(!t.getItem(e.node.key)){t.addNode(e.node);for(let t of e)this.addNode(t)}this.markDirty(e)}removeNode(e){for(let t of e)this.removeNode(t);this.getMutableCollection().removeNode(e.node.key),this.markDirty(e)}getCollection(){return this.transactionCount>0||this.updateCollection(),this.collection}updateCollection(){for(let e of this.dirtyNodes)e instanceof $681cc3c98f569e39$export$dc064fe9e59310fd&&e.isConnected&&e.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){var e,t;let i=this.getMutableCollection();for(let e of this.mutatedNodes)e.isConnected&&i.addNode(e.node);var n,r;i.commit(this.firstChild?.node.key??null,this.lastChild?.node.key??null,this.isSSR),this.mutatedNodes.clear()}this.collectionMutated=!1}queueUpdate(){if(!(this.dirtyNodes.size===0||this.transactionCount>0))for(let e of this.subscriptions)e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.mutatedNodes=new Set,this.subscriptions=new Set,this.transactionCount=0,this.collection=e,this.collectionMutated=!0}};function $e948873055cbafe4$export$727c8fc270210f13(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:a=[]}=e,o=(0,import_react.useMemo)(()=>new WeakMap,a);return(0,import_react.useMemo)(()=>
vendor: 5,827 bytes, line 30
30{if(n&&typeof t==`function`){let c=[];for(let u of n){let n=o.get(u);if(!n){n=t(u);var e,a;let c=n.props.id??u.key??u.id;if(c==null)throw Error(`Could not determine key for item`);r&&(c=r+`:`+c),n=(0,import_react.cloneElement)(n,i?{key:c,id:c,value:u}:{key:c}),o.set(u,n)}c.push(n)}return c}if(typeof t!=`function`)return t},[t,n,o,r,i])}if(typeof HTMLTemplateElement<`u`){let e=Object.getOwnPropertyDescriptor(Node.prototype,`firstChild`).get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}var $f39a9eba43920ace$export$94b6d0abf7d33e8c=(0,import_react.createContext)(!1),$f39a9eba43920ace$var$hiddenFragment=typeof DocumentFragment<`u`?new DocumentFragment:null;function $f39a9eba43920ace$export$8dc98ba7eadeaa56(e){let t=(0,import_react.useContext)($f39a9eba43920ace$export$94b6d0abf7d33e8c),n=$b5e257d569688ac6$export$535bd6ca7f90a273$1();if(t)return import_react.createElement(import_react.Fragment,null,e.children);let r=import_react.createElement($f39a9eba43920ace$export$94b6d0abf7d33e8c.Provider,{value:!0},e.children);return n?import_react.createElement(`template`,{"data-react-aria-hidden":!0},r):(0,import_react_dom.createPortal)(r,$f39a9eba43920ace$var$hiddenFragment)}function $f39a9eba43920ace$export$86427a43e3e48ebb(e){let t=(t,n)=>(0,import_react.useContext)($f39a9eba43920ace$export$94b6d0abf7d33e8c)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,import_react.forwardRef)(t)}var require_use_sync_external_store_shim_production_min=__commonJSMin((e=>{var t=require_react();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,c=t.useDebugValue;function u(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),u=r[0].inst,Y=r[1];return o(function(){u.value=n,u.getSnapshot=t,K(u)&&Y({inst:u})},[e,n,t]),a(function(){return K(u)&&Y({inst:u}),e(function(){K(u)&&Y({inst:u})})},[e]),c(n),n}function K(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function Y(e,t){return t()}var X=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?Y:u;e.useSyncExternalStore=t.useSyncExternalStore===void 0?X:t.useSyncExternalStore})),require_shim$2=__commonJSMin(((e,t)=>{t.exports=require_use_sync_external_store_shim_production_min()})),import_shim$2=require_shim$2(),$e1995378a142960e$var$ShallowRenderContext=(0,import_react.createContext)(!1),$e1995378a142960e$var$CollectionDocumentContext=(0,import_react.createContext)(null);function $e1995378a142960e$export$bf788dd355e3a401(e){if((0,import_react.useContext)($e1995378a142960e$var$CollectionDocumentContext))return e.content;let{collection:t,document:n}=$e1995378a142960e$var$useCollectionDocument(e.createCollection);return import_react.createElement(import_react.Fragment,null,import_react.createElement($f39a9eba43920ace$export$8dc98ba7eadeaa56,null,import_react.createElement($e1995378a142960e$var$CollectionDocumentContext.Provider,{value:n},e.content)),import_react.createElement($e1995378a142960e$var$CollectionInner,{render:e.children,collection:t}))}function $e1995378a142960e$var$CollectionInner({collection:e,render:t}){return t(e)}function $e1995378a142960e$var$useSyncExternalStoreFallback(e,t,n){let r=$b5e257d569688ac6$export$535bd6ca7f90a273$1(),i=(0,import_react.useRef)(r);i.current=r;let a=(0,import_react.useCallback)(()=>i.current?n():t(),[t,n]);return(0,import_shim$2.useSyncExternalStore)(e,a)}var $e1995378a142960e$var$useSyncExternalStore=typeof import_react.useSyncExternalStore==`function`?import_react.useSyncExternalStore:$e1995378a142960e$var$useSyncExternalStoreFallback;function $e1995378a142960e$var$useCollectionDocument(e){let[t]=(0,import_react.useState)(()=>new $681cc3c98f569e39$export$b34a105447964f9f(e?.()||new $23b9f4fcf0fe224b$export$408d25a4e12db025)),n=$e1995378a142960e$var$useSyncExternalStore((0,import_react.useCallback)(e=>t.subscribe(e),[t]),(0,import_react.useCallback)(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),(0,import_react.useCallback)(()=>(t.isSSR=!0,t.getCollection()),[t]));return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$2(()=>(t.isMounted=!0,()=>{t.isMounted=!1}),[t]),{collection:n,document:t}}var $e1995378a142960e$var$SSRContext=(0,import_react.createContext)(null);function $e1995378a142960e$var$useSSRCollectionNode(e,t,n,r,i,a){let o=(0,import_react.useCallback)(e=>{e?.setProps(t,n,r,a)},[t,n,r,a]),c=(0,import_react.useContext)($e1995378a142960e$var$SSRContext);if(c){let o=c.ownerDocument.nodesByProps.get(t);return o||(o=c.ownerDocument.createElement(e),o.setProps(t,n,r,a),c.appendChild(o),c.ownerDocument.updateCollection(),c.ownerDocument.nodesByProps.set(t,o)),i?import_react.createElement($e1995378a142960e$var$SSRContext.Provider,{value:o},i):null}return import_react.createElement(e,{ref:o},i)}function $e1995378a142960e$export$18af5c7a9e9b3664(e,t){let n=({node:e})=>t(e.props,e.props.ref,e),r=(0,import_react.forwardRef)((r,i)=>{if(!(0,import_react.useContext)($e1995378a142960e$var$ShallowRenderContext)){if(t.length>=3)throw Error(t.name+` cannot be rendered outside a collection.`);return t(r,i)}return $e1995378a142960e$var$useSSRCollectionNode(e,r,i,`children`in r?r.children:null,null,e=>import_react.createElement(n,{node:e}))});return r.displayName=t.name,r}function $e1995378a142960e$var$useCollectionChildren(e){return $e948873055cbafe4$export$727c8fc270210f13({...e,addIdAndValue:!0})}var $e1995378a142960e$var$CollectionContext=(0,import_react.createContext)(null);function $e1995378a142960e$export$fb8073518f34e6ec(e){let t=(0,import_react.useContext)($e1995378a142960e$var$CollectionContext),n=(t?.dependencies||[]).concat(e.depen
30dencies),r=e.idScope||t?.idScope,i=$e1995378a142960e$var$useCollectionChildren({...e,idScope:r,dependencies:n});return(0,import_react.useContext)($e1995378a142960e$var$CollectionDocumentContext)&&(i=import_react.createElement($e1995378a142960e$var$CollectionRoot,null,i)),t=(0,import_react.useMemo)(()=>({dependencies:n,idScope:r}),[r,...n]),import_react.createElement($e1995378a142960e$var$CollectionContext.Provider,{value:t},i)}function $e1995378a142960e$var$CollectionRoot({children:e}){let t=(0,import_react.useContext)($e1995378a142960e$var$CollectionDocumentContext),n=(0,import_react.useMemo)(()=>import_react.createElement($e1995378a142960e$var$CollectionDocumentContext.Provider,{value:null},import_react.createElement($e1995378a142960e$var$ShallowRenderContext.Provider,{value:!0},e)),[e]);return $b5e257d569688ac6$export$535bd6ca7f90a273$1()?import_react.createElement($e1995378a142960e$var$SSRContext.Provider,{value:t},n):(0,import_react_dom.createPortal)(n,t)}var $7135fc7d473fd974$export$a164736487e3f0ae={CollectionRoot({collection:e,renderDropIndicator:t}){return $7135fc7d473fd974$var$useCollectionRender(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return $7135fc7d473fd974$var$useCollectionRender(e,t,n)}};function $7135fc7d473fd974$var$useCollectionRender(e,t,n){return $e948873055cbafe4$export$727c8fc270210f13({items:t?e.getChildren(t.key):e,dependencies:[n],children(t){var r;let i=t.render(t);if(!n||t.type!==`item`)return i;let a=t.key,o=e.getKeyAfter(a);return import_react.createElement(import_react.Fragment,null,n({type:`item`,key:a,dropPosition:`before`}),i,(o==null||e.getItem(o)?.type!==`item`)&&n({type:`item`,key:a,dropPosition:`after`}))}})}var $7135fc7d473fd974$export$4feb769f8ddf26c5=(0,import_react.createContext)($7135fc7d473fd974$export$a164736487e3f0ae);function $7135fc7d473fd974$export$90e00781bc59d8f9(e){return(0,import_react.useMemo)(()=>e==null?null:new Set([e]),[e])}var $64fa3d84918910a7$export$c62b8e45d58ddad9=Symbol(`default`);function $64fa3d84918910a7$export$2881499e37b75b9a({values:e,children:t}){for(let[n,r]of e)t=import_react.createElement(n.Provider,{value:r},t);return t}function $64fa3d84918910a7$export$4d86445c2cf5e3(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:c}=e;return(0,import_react.useMemo)(()=>{let e,u,K;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,u=typeof n==`function`?n({...c,defaultStyle:o||{}}):n,K=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:u||o?{...o,...u}:void 0,children:K??a,"data-rac":``}},[t,n,r,i,a,o,c])}function $64fa3d84918910a7$export$fabf2dc03a41866e(e,t){let n=(0,import_react.useContext)(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`));if(!t&&!n.slots[$64fa3d84918910a7$export$c62b8e45d58ddad9])throw Error(`A slot prop is required. Valid slot names are ${e}.`);let r=t||$64fa3d84918910a7$export$c62b8e45d58ddad9;if(!n.slots[r])throw Error(`Invalid slot "${t}". Valid slot names are ${e}.`);return n.slots[r]}return n}function $64fa3d84918910a7$export$29f1550f4b0d4415(e,t,n){let{ref:r,...i}=$64fa3d84918910a7$export$fabf2dc03a41866e(n,e.slot)||{},a=$df56164dff5785e2$export$4338b53315abf666((0,import_react.useMemo)(()=>$5dc95899b306f630$export$c9058316764c140e(t,r),[t,r])),o=$3ef42575df84b30b$export$9d1611c77c2fe928$1(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(o.style=typeof i.style==`function`||typeof e.style==`function`?t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:{...i.style,...e.style}),[o,a]}var $5e8ad37a45e1c704$export$cfa7aa87c26e7d1f=(0,import_react.createContext)(null),$5e8ad37a45e1c704$export$364712098d2aa57c=(0,import_react.createContext)(null);function $5e8ad37a45e1c704$var$Tabs(e,t){[e,t]=$64fa3d84918910a7$export$29f1550f4b0d4415(e,t,$5e8ad37a45e1c704$export$cfa7aa87c26e7d1f);let{children:n,orientation:r=`horizontal`}=e;return n=(0,import_react.useMemo)(()=>typeof n==`function`?n({orientation:r,defaultChildren:null}):n,[n,r]),import_react.createElement($e1995378a142960e$export$bf788dd355e3a401,{content:n},n=>import_react.createElement($5e8ad37a45e1c704$var$TabsInner,{props:e,collection:n,tabsRef:t}))}function $5e8ad37a45e1c704$var$TabsInner({props:e,tabsRef:t,collection:n}){let{orientation:r=`horizontal`}=e,i=$76f919a04c5a7d14$export$4ba071daf4e486({...e,collection:n,children:void 0}),{focusProps:a,isFocused:o,isFocusVisible:c}=$f7dceffc5ad7768b$export$4e328f61c538687f({within:!0}),u=(0,import_react.useMemo)(()=>({orientation:r,isFocusWithin:o,isFocusVisible:c}
30),[r,o,c]),K=$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:`react-aria-Tabs`,values:u});return import_react.createElement(`div`,{...$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(e),...a,...K,ref:t,slot:e.slot||void 0,"data-focused":o||void 0,"data-orientation":r,"data-focus-visible":c||void 0,"data-disabled":i.isDisabled||void 0},import_react.createElement($64fa3d84918910a7$export$2881499e37b75b9a,{values:[[$5e8ad37a45e1c704$export$cfa7aa87c26e7d1f,e],[$5e8ad37a45e1c704$export$364712098d2aa57c,i]]},K.children))}var $5e8ad37a45e1c704$export$b2539bed5023c21c=(0,import_react.forwardRef)($5e8ad37a45e1c704$var$Tabs);function $5e8ad37a45e1c704$var$TabList(e,t){return(0,import_react.useContext)($5e8ad37a45e1c704$export$364712098d2aa57c)?import_react.createElement($5e8ad37a45e1c704$var$TabListInner,{props:e,forwardedRef:t}):import_react.createElement($e1995378a142960e$export$fb8073518f34e6ec,e)}function $5e8ad37a45e1c704$var$TabListInner({props:e,forwardedRef:t}){let n=(0,import_react.useContext)($5e8ad37a45e1c704$export$364712098d2aa57c),{CollectionRoot:r}=(0,import_react.useContext)($7135fc7d473fd974$export$4feb769f8ddf26c5),{orientation:i=`horizontal`,keyboardActivation:a=`automatic`}=$64fa3d84918910a7$export$fabf2dc03a41866e($5e8ad37a45e1c704$export$cfa7aa87c26e7d1f),o=$df56164dff5785e2$export$4338b53315abf666(t),{tabListProps:c}=$58d314389b21fa3f$export$773e389e644c5874({...e,orientation:i,keyboardActivation:a},n,o),u=$64fa3d84918910a7$export$4d86445c2cf5e3({...e,children:null,defaultClassName:`react-aria-TabList`,values:{orientation:i,state:n}}),K=$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(e);return delete K.id,import_react.createElement(`div`,{...K,...c,ref:o,...u,"data-orientation":i||void 0},import_react.createElement(r,{collection:n.collection,persistedKeys:$7135fc7d473fd974$export$90e00781bc59d8f9(n.selectionManager.focusedKey)}))}var $5e8ad37a45e1c704$export$e51a686c67fdaa2d=(0,import_react.forwardRef)($5e8ad37a45e1c704$var$TabList),$5e8ad37a45e1c704$export$3e41faf802a29e71=$e1995378a142960e$export$18af5c7a9e9b3664(`item`,(e,t,n)=>{let r=(0,import_react.useContext)($5e8ad37a45e1c704$export$364712098d2aa57c),i=$df56164dff5785e2$export$4338b53315abf666(t),{tabProps:a,isSelected:o,isDisabled:c,isPressed:u}=$0175d55c2a017ebc$export$fdf4756d5b8ef90a({key:n.key,...e},r,i),{focusProps:K,isFocused:Y,isFocusVisible:X}=$f7dceffc5ad7768b$export$4e328f61c538687f(),{hoverProps:ee,isHovered:te}=$6179b936705e76d3$export$ae780daf29e6d456$1({isDisabled:c,onHoverStart:e.onHoverStart,onHoverEnd:e.onHoverEnd,onHoverChange:e.onHoverChange}),ce=$64fa3d84918910a7$export$4d86445c2cf5e3({...e,id:void 0,defaultClassName:`react-aria-Tab`,values:{isSelected:o,isDisabled:c,isFocused:Y,isFocusVisible:X,isPressed:u,isHovered:te}}),ue=n.props.href?`a`:`div`;return import_react.createElement(ue,{...$3ef42575df84b30b$export$9d1611c77c2fe928$1(a,K,ee,ce),ref:i,"data-selected":o||void 0,"data-disabled":c||void 0,"data-focused":Y||void 0,"data-focus-visible":X||void 0,"data-pressed":u||void 0,"data-hovered":te||void 0})});function $5e8ad37a45e1c704$var$TabPanel(e,t){let n=(0,import_react.useContext)($5e8ad37a45e1c704$export$364712098d2aa57c),r=$df56164dff5785e2$export$4338b53315abf666(t),{tabPanelProps:i}=$34bce698202e07cb$export$fae0121b5afe572d(e,n,r),{focusProps:a,isFocused:o,isFocusVisible:c}=$f7dceffc5ad7768b$export$4e328f61c538687f(),u=n.selectedKey===e.id,K=$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:`react-aria-TabPanel`,values:{isFocused:o,isFocusVisible:c,isInert:!u,state:n}});if(!u&&!e.shouldForceMount)return null;let Y=$65484d02dcb7eb3e$export$457c3d6518dd4c6f$1(e);delete Y.id;let X=u?$3ef42575df84b30b$export$9d1611c77c2fe928$1(Y,i,a,K):K;return import_react.createElement(`div`,{...X,ref:r,"data-focused":o||void 0,"data-focus-visible":c||void 0,inert:u?void 0:`true`,"data-inert":u?void 0:`true`},import_react.createElement($64fa3d84918910a7$export$2881499e37b75b9a,{values:[[$5e8ad37a45e1c704$export$cfa7aa87c26e7d1f,null],[$5e8ad37a45e1c704$export$364712098d2aa57c,null]]},K.children))}var $5e8ad37a45e1c704$export$3d96ec278d3efce4=$f39a9eba43920ace$export$86427a43e3e48ebb($5e8ad37a45e1c704$var$TabPanel),require_use_sync_external_store_shim_production$1=__commonJSMin((e=>{var t=require_react();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,c=t.useDebugValue;function u(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),u=r[0].inst,Y=r[1];return o(function(){u.value=n,u.getSnapshot=t,K(u)&&Y({inst:u})},[e,n,t]),a(function(){return K(u)&&Y({inst:u}),e(function(){K(u)&&Y({inst:u})})},[e]),c(n),n}function K(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function Y(e,t){return t()}var X=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?Y:u;e.useSyncExternalStore=t.useSyncExternalStore===void 0?X:t.useSyncExternalStore})),require_shim$1=__commonJSMin(((e,t)=>{t.exports=require_use_sync_external_store_shim_production$1()})),import_shim$1=require_shim$1();function $77b352cf12efcf73$export$c7b26b20d3ced9c5(e={}){let{maxVisibleToasts:t=1,wrapUpdate:n}=e;return $77b352cf12efcf73$export$84726ef35ca2129a((0,import_react.useMemo)(()=>new $77b352cf12efcf73$export$f1f8569633bbbec4({maxVisibleToasts:t,wrapUpdate:n}),[t,n]))}function $77b352cf12efcf73$export$84726ef35ca2129a(e){let t=(0,import_react.useCallback)(t=>e.subscribe(t),[e]),n=(0,import_react.useCallback)(()=>e.visibleToasts,[e]);return{visibleToasts:(0,import_shim$1.useSyncExternalStore)(t,n,n),add:(t,n)=>e.add(t,n),close:t=>e.close(t),pauseAll:()=>e.pauseAll(),resumeAll:()=>e.resumeAll()}}var $77b352cf12efcf73$export$f1f8569633bbbec4=class{runWithWrapUpdate(e,t){this.wrapUpdate?this.wrapUpdate(e,t):e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}add(e,t={}){let n=`_`+Math.random().toString(36).slice(2),r={...t,content:e,key:n,timer:t.timeout?new $77b352cf12efcf73$var$Timer(()=>this.close(n),t.timeout):void 0};return this.queue.unshift(r),this.updateVisibleToasts(`add`),n}close(e){let t=this.queue.findIndex(t=>t.key===e);if(t>=0){var n,r;(n=(r=this.queue[t]).onClose)==null||n.call(r),this.queue.splice(t,1)}this.updateVisibleToasts(`remove`)}updateVisibleToasts(e){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let e of this.subscriptions)e()},e)}pauseAll(){for(let e of this.visibleToasts)e.timer&&e.timer.pause()}resumeAll(){for(let e of this.visibleToasts)e.timer&&e.timer.resume()}clear(){this.queue=[],this.updateVisibleToasts(`clear`)}constructor(e){this.queue=[],this.subscriptions=new Set,this.visibleToasts=[];var t;this.maxVisibleToasts=e?.maxVisibleToasts??1/0,this.wrapUpdate=e?.wrapUpdate}},$77b352cf12efcf73$var$Timer=class{reset(e){this.remaining=e,this.resume()}pause(){this.timerId!=null&&(clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime)}resume(){this.remaining<=0||(this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback()},this.remaining))}constructor(e,t){this.startTime=null,this.remaining=t,this.callback=e}},$ff9177efc58547ad$exports={};$ff9177efc58547ad$exports={close:`إغلاق`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{625}\u{634}\u{639}\u{627}\u{631}`,other:()=>`${t.number(e.count)} \u{625}\u{634}\u{639}\u{627}\u{631}\u{627}\u{62A}`})}.`};var $25eb7c0c0c45e544$exports={};$25eb7c0c0c45e544$exports={close:`Затвори`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{438}\u{437}\u{432}\u{435}\u{441}\u{442}\u{438}\u{435}`,other:()=>`${t.number(e.count)} \u{438}\u{437}\u{432}\u{435}\u{441}\u{442}\u{438}\u{44F}`})}.`};var $28feffc3d61a8691$exports={};$28feffc3d61a8691$exports={close:`Zavřít`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} ozn\xe1men\xed`,other:()=>`${t.number(e.count)} ozn\xe1men\xed`})}.`};var $390d441203d25ff4$exports={};$390d441203d25ff4$exports={close:`Luk`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} besked`,other:()=>`${t.number(e.count)} beskeder`})}.`};var $7063c2d0f14f979a$exports={};$7063c2d0f14f979a$exports={close:`Schließen`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)}
30 Benachrichtigung`,other:()=>`${t.number(e.count)} Benachrichtigungen`})}.`};var $2dfc1dbb6590af88$exports={};$2dfc1dbb6590af88$exports={close:`Κλείσιμο`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{3B5}\u{3B9}\u{3B4}\u{3BF}\u{3C0}\u{3BF}\u{3AF}\u{3B7}\u{3C3}\u{3B7}`,other:()=>`${t.number(e.count)} \u{3B5}\u{3B9}\u{3B4}\u{3BF}\u{3C0}\u{3BF}\u{3B9}\u{3AE}\u{3C3}\u{3B5}\u{3B9}\u{3C2}`})}.`};var $9a12ff1caae5a7a5$exports={};$9a12ff1caae5a7a5$exports={close:`Close`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notification`,other:()=>`${t.number(e.count)} notifications`})}.`};var $f4095fb5a72adbe6$exports={};$f4095fb5a72adbe6$exports={close:`Cerrar`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notificaci\xf3n`,other:()=>`${t.number(e.count)} notificaciones`})}.`};var $75bc5191b9d7826a$exports={};$75bc5191b9d7826a$exports={close:`Sule`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} teatis`,other:()=>`${t.number(e.count)} teatist`})}.`};var $e4b9aef18b0db8dc$exports={};$e4b9aef18b0db8dc$exports={close:`Sulje`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} ilmoitus`,other:()=>`${t.number(e.count)} ilmoitusta`})}.`};var $888756784d832bd7$exports={};$888756784d832bd7$exports={close:`Fermer`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notification`,other:()=>`${t.number(e.count)} notifications`})}.`};var $6835949b68a1fabf$exports={};$6835949b68a1fabf$exports={close:`סגור`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{5D4}\u{5EA}\u{5E8}\u{5D0}\u{5D4}`,other:()=>`${t.number(e.count)} \u{5D4}\u{5EA}\u{5E8}\u{5D0}\u{5D5}\u{5EA}`})}.`};var $87ffcbc0b651e40b$exports={};$87ffcbc0b651e40b$exports={close:`Zatvori`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} obavijest`,other:()=>`${t.number(e.count)} obavijesti`})}.`};var $dc6e3b2813600d69$exports={};$dc6e3b2813600d69$exports={close:`Bezárás`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} \xe9rtes\xedt\xe9s`,other:()=>`${t.number(e.count)} \xe9rtes\xedt\xe9s`})}.`};var $fe136bcbacfcfa14$exports={};$fe136bcbacfcfa14$exports={close:`Chiudi`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notifica`,other:()=>`${t.number(e.count)} notifiche`})}.`};var $8fb53a929b46df83$exports={};$8fb53a929b46df83$exports={close:`閉じる`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{500B}\u{306E}\u{901A}\u{77E5}`,other:()=>`${t.number(e.count)} \u{500B}\u{306E}\u{901A}\u{77E5}`})}\u{3002}`};var $2c38dbfaf041a865$exports={};$2c38dbfaf041a865$exports={close:`닫기`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)}\u{AC1C} \u{C54C}\u{B9BC}`,other:()=>`${t.number(e.count)}\u{AC1C} \u{C54C}\u{B9BC}`})}.`};var $48f3f33a29908d4c$exports={};$48f3f33a29908d4c$exports={close:`Uždaryti`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} prane\u{161}imas`,other:()=>`${t.number(e.count)} prane\u{161}imai`})}.`};var $9867160d996455a0$exports={};$9867160d996455a0$exports={close:`Aizvērt`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} pazi\u{146}ojums`,other:()=>`${t.number(e.count)} pazi\u{146}ojumi`})}.`};var $196258ea25c96487$exports={};$196258ea25c96487$exports={close:`Lukk`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} varsling`,other:()=>`${t.number(e.count)} varsler`})}.`};var $949061cb954e8000$exports={};$949061cb954e8000$exports={close:`Sluiten`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} melding`,other:()=>`${t.number(e.count)} meldingen`})}.`};var $8189bed27add1ad3$exports={};$8189bed27add1ad3$exports={close:`Zamknij`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} powiadomienie`,few:()=>`${t.number(e.count)} powiadomienia`,many:()=>`${t.number(e.count)} powiadomie\u{144}`,other:()=>`${t.number(e.count)} powiadomienia`})}.`};var $a361756a93b6e28c$exports={};$a361756a93b6e28c$exports={close:`Fechar`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notifica\xe7\xe3o`,other:()=>`${t.number(e.count)} notifica\xe7\xf5es`})}.`};var $034c7393857c8db0$exports={};$034c7393857c8db0$exports={close:`Fechar`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notifica\xe7\xe3o`,other:()=>`${t.number(e.count)} notifica\xe7\xf5es`})}.`};
30var $e33d3b3868478b04$exports={};$e33d3b3868478b04$exports={close:`Închideţi`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notificare`,other:()=>`${t.number(e.count)} notific\u{103}ri`})}.`};var $9a7dcb914b29cd9f$exports={};$9a7dcb914b29cd9f$exports={close:`Закрыть`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{443}\u{432}\u{435}\u{434}\u{43E}\u{43C}\u{43B}\u{435}\u{43D}\u{438}\u{435}`,other:()=>`${t.number(e.count)} \u{443}\u{432}\u{435}\u{434}\u{43E}\u{43C}\u{43B}\u{435}\u{43D}\u{438}\u{44F}`})}.`};var $e43d964a0c7f1266$exports={};$e43d964a0c7f1266$exports={close:`Zatvoriť`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} ozn\xe1menie`,few:()=>`${t.number(e.count)} ozn\xe1menia`,other:()=>`${t.number(e.count)} ozn\xe1men\xed`})}.`};var $0bc56cee3275bcaa$exports={};$0bc56cee3275bcaa$exports={close:`Zapri`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} obvestilo`,two:()=>`${t.number(e.count)} obvestili`,few:()=>`${t.number(e.count)} obvestila`,other:()=>`${t.number(e.count)} obvestil`})}.`};var $7dbdd7289c10d2ba$exports={};$7dbdd7289c10d2ba$exports={close:`Zatvori`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} obave\u{161}tenje`,other:()=>`${t.number(e.count)} obave\u{161}tenja`})}.`};var $ccbe6066c10b1e53$exports={};$ccbe6066c10b1e53$exports={close:`Stäng`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} meddelande`,other:()=>`${t.number(e.count)} meddelanden`})}.`};var $9d503476b9d858b7$exports={};$9d503476b9d858b7$exports={close:`Kapat`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} bildirim`,other:()=>`${t.number(e.count)} bildirim`})}.`};var $32ee419c7b9b7a83$exports={};$32ee419c7b9b7a83$exports={close:`Закрити`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{441}\u{43F}\u{43E}\u{432}\u{456}\u{449}\u{435}\u{43D}\u{43D}\u{44F}`,other:()=>`${t.number(e.count)} \u{441}\u{43F}\u{43E}\u{432}\u{456}\u{449}\u{435}\u{43D}\u{43D}\u{44F}`})}.`};var $122525af1cb737c7$exports={};$122525af1cb737c7$exports={close:`关闭`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{4E2A}\u{901A}\u{77E5}`,other:()=>`${t.number(e.count)} \u{4E2A}\u{901A}\u{77E5}`})}\u{3002}`};var $52e8b1b00094e5a3$exports={};$52e8b1b00094e5a3$exports={close:`關閉`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{500B}\u{901A}\u{77E5}`,other:()=>`${t.number(e.count)} \u{500B}\u{901A}\u{77E5}`})}\u{3002}`};var $7853651519a70071$exports={};$7853651519a70071$exports={"ar-AE":$ff9177efc58547ad$exports,"bg-BG":$25eb7c0c0c45e544$exports,"cs-CZ":$28feffc3d61a8691$exports,"da-DK":$390d441203d25ff4$exports,"de-DE":$7063c2d0f14f979a$exports,"el-GR":$2dfc1dbb6590af88$exports,"en-US":$9a12ff1caae5a7a5$exports,"es-ES":$f4095fb5a72adbe6$exports,"et-EE":$75bc5191b9d7826a$exports,"fi-FI":$e4b9aef18b0db8dc$exports,"fr-FR":$888756784d832bd7$exports,"he-IL":$6835949b68a1fabf$exports,"hr-HR":$87ffcbc0b651e40b$exports,"hu-HU":$dc6e3b2813600d69$exports,"it-IT":$fe136bcbacfcfa14$exports,"ja-JP":$8fb53a929b46df83$exports,"ko-KR":$2c38dbfaf041a865$exports,"lt-LT":$48f3f33a29908d4c$exports,"lv-LV":$9867160d996455a0$exports,"nb-NO":$196258ea25c96487$exports,"nl-NL":$949061cb954e8000$exports,"pl-PL":$8189bed27add1ad3$exports,"pt-BR":$a361756a93b6e28c$exports,"pt-PT":$034c7393857c8db0$exports,"ro-RO":$e33d3b3868478b04$exp
30orts,"ru-RU":$9a7dcb914b29cd9f$exports,"sk-SK":$e43d964a0c7f1266$exports,"sl-SI":$0bc56cee3275bcaa$exports,"sr-SP":$7dbdd7289c10d2ba$exports,"sv-SE":$ccbe6066c10b1e53$exports,"tr-TR":$9d503476b9d858b7$exports,"uk-UA":$32ee419c7b9b7a83$exports,"zh-CN":$122525af1cb737c7$exports,"zh-TW":$52e8b1b00094e5a3$exports};var $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$1=typeof document<`u`?import_react.useLayoutEffect:()=>{},$8ae05eaa5c114e9c$var$_React_useInsertionEffect,$8ae05eaa5c114e9c$var$useEarlyEffect=($8ae05eaa5c114e9c$var$_React_useInsertionEffect=import_react.useInsertionEffect)??$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$1;function $8ae05eaa5c114e9c$export$7f54fc3180508a52(e){let t=(0,import_react.useRef)(null);return $8ae05eaa5c114e9c$var$useEarlyEffect(()=>{t.current=e},[e]),(0,import_react.useCallback)((...e)=>{let n=t.current;return n?.(...e)},[])}function $1dbecbe27a04f9af$export$14d238f342723f25(e){let[t,n]=(0,import_react.useState)(e),r=(0,import_react.useRef)(null),i=$8ae05eaa5c114e9c$export$7f54fc3180508a52(()=>{if(!r.current)return;let e=r.current.next();if(e.done){r.current=null;return}t===e.value?i():n(e.value)});return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$1(()=>{r.current&&i()}),[t,$8ae05eaa5c114e9c$export$7f54fc3180508a52(e=>{r.current=e(t),i()})]}var $b5e257d569688ac6$var$defaultContext={prefix:String(Math.round(Math.random()*1e10)),current:0},$b5e257d569688ac6$var$SSRContext=import_react.createContext($b5e257d569688ac6$var$defaultContext),$b5e257d569688ac6$var$IsSSRContext=import_react.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement;var $b5e257d569688ac6$var$componentIds=new WeakMap;function $b5e257d569688ac6$var$useCounter(e=!1){let t=(0,import_react.useContext)($b5e257d569688ac6$var$SSRContext),n=(0,import_react.useRef)(null);if(n.current===null&&!e){var r,i;let e=import_react.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let n=$b5e257d569688ac6$var$componentIds.get(e);n==null?$b5e257d569688ac6$var$componentIds.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,$b5e257d569688ac6$var$componentIds.delete(e))}n.current=++t.current}return n.current}function $b5e257d569688ac6$var$useLegacySSRSafeId(e){let t=(0,import_react.useContext)($b5e257d569688ac6$var$SSRContext),n=$b5e257d569688ac6$var$useCounter(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function $b5e257d569688ac6$var$useModernSSRSafeId(e){let t=import_react.useId(),[n]=(0,import_react.useState)($b5e257d569688ac6$export$535bd6ca7f90a273()),r=n?`react-aria`:`react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;return e||`${r}-${t}`}var $b5e257d569688ac6$export$619500959fc48b26=typeof import_react.useId==`function`?$b5e257d569688ac6$var$useModernSSRSafeId:$b5e257d569688ac6$var$useLegacySSRSafeId;function $b5e257d569688ac6$var$getSnapshot(){return!1}function $b5e257d569688ac6$var$getServerSnapshot(){return!0}function $b5e257d569688ac6$var$subscribe(e){return()=>{}}function $b5e257d569688ac6$export$535bd6ca7f90a273(){return typeof import_react.useSyncExternalStore==`function`?import_react.useSyncExternalStore($b5e257d569688ac6$var$subscribe,$b5e257d569688ac6$var$getSnapshot,$b5e257d569688ac6$var$getServerSnapshot):(0,import_react.useContext)($b5e257d569688ac6$var$IsSSRContext)}var $bdb11010cef70236$var$canUseDOM=!!(typeof window<`u`&&window.document&&window.document.createElement),$bdb11010cef70236$export$d41a04c74483c6ef=new Map,$bdb11010cef70236$var$registry;typeof FinalizationRegistry<`u`&&($bdb11010cef70236$var$registry=new FinalizationRegistry(e=>{$bdb11010cef70236$export$d41a04c74483c6ef.delete(e)}));function $bdb11010cef70236$export$f680877a34711e37(e){let[t,n]=(0,import_react.useState)(e),r=(0,import_react.useRef)(null),i=$b5e257d569688ac6$export$619500959fc48b26(t),a=(0,import_react.useRef)(null);if($bdb11010cef70236$var$registry&&$bdb11010cef70236$var$registry.register(a,i),$bdb11010cef70236$var$canUseDOM){let e=$bdb11010cef70236$export$d41a04c74483c6ef.get(i);e&&!e.includes(r)?e.push(r):$bdb11010cef70236$export$d41a04c74483c6ef.set(i,[r])}return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$1(()=>{let e=i;return()=>{$bdb11010cef70236$var$registry&&$bdb11010cef70236$var$registry.unregister(a),$bdb11010cef70236$export$d41a04c74483c6ef.delete(e)}},[i]),(0,import_react.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),i}function $bdb11010cef70236$export$cd8c9cb68f842629(e,t){if(e===t)return e;let n=$bdb11010cef70236$export$d41a04c74483c6ef.get(e);
vendor: 13,298 bytes, line 30
30if(n)return n.forEach(e=>e.current=t),t;let r=$bdb11010cef70236$export$d41a04c74483c6ef.get(t);return r?(r.forEach(t=>t.current=e),e):t}function $bdb11010cef70236$export$b4cc09c592e8fdb8(e=[]){let t=$bdb11010cef70236$export$f680877a34711e37(),[n,r]=$1dbecbe27a04f9af$export$14d238f342723f25(t),i=(0,import_react.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$1(i,[t,i,...e]),n}function $ff5963eb1fccf552$export$e08e3b67e392101e(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}var $431fbd86ca7dc216$export$b204af158042fbac=e=>{var t;return e?.ownerDocument??document},$431fbd86ca7dc216$export$f21a1ffae260145a=e=>e&&`window`in e&&e.window===e?e:$431fbd86ca7dc216$export$b204af158042fbac(e).defaultView||window;function $431fbd86ca7dc216$var$isNode(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function $431fbd86ca7dc216$export$af51f0f06c0f328a(e){return $431fbd86ca7dc216$var$isNode(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&`host`in e}var $f4e2df6bd15f8569$var$_shadowDOM=!1;function $f4e2df6bd15f8569$export$98658e8c59125e6a(){return $f4e2df6bd15f8569$var$_shadowDOM}function $d4ee10de306f2510$export$4282f70798064fe0(e,t){if(!$f4e2df6bd15f8569$export$98658e8c59125e6a())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n=n.tagName===`SLOT`&&n.assignedSlot?n.assignedSlot.parentNode:$431fbd86ca7dc216$export$af51f0f06c0f328a(n)?n.host:n.parentNode}return!1}var $d4ee10de306f2510$export$cd4e5573fbe2b576=(e=document)=>{var t;if(!$f4e2df6bd15f8569$export$98658e8c59125e6a())return e.activeElement;let n=e.activeElement;for(;n&&`shadowRoot`in n&&n.shadowRoot?.activeElement;)n=n.shadowRoot.activeElement;return n};function $d4ee10de306f2510$export$e58f029f0fbfdb29(e){return $f4e2df6bd15f8569$export$98658e8c59125e6a()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function $3ef42575df84b30b$export$9d1611c77c2fe928(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],i=r[e];typeof n==`function`&&typeof i==`function`&&e[0]===`o`&&e[1]===`n`&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=$ff5963eb1fccf552$export$e08e3b67e392101e(n,i):(e===`className`||e===`UNSAFE_className`)&&typeof n==`string`&&typeof i==`string`?t[e]=clsx(n,i):e===`id`&&n&&i?t.id=$bdb11010cef70236$export$cd8c9cb68f842629(n,i):t[e]=i===void 0?n:i}}return t}var $65484d02dcb7eb3e$var$DOMPropNames=new Set([`id`]),$65484d02dcb7eb3e$var$labelablePropNames=new Set([`aria-label`,`aria-labelledby`,`aria-describedby`,`aria-details`]),$65484d02dcb7eb3e$var$linkPropNames=new Set([`href`,`hrefLang`,`target`,`rel`,`download`,`ping`,`referrerPolicy`]),$65484d02dcb7eb3e$var$globalAttrs=new Set([`dir`,`lang`,`hidden`,`inert`,`translate`]),$65484d02dcb7eb3e$var$globalEvents=new Set(`onClick.onAuxClick.onContextMenu.onDoubleClick.onMouseDown.onMouseEnter.onMouseLeave.onMouseMove.onMouseOut.onMouseOver.onMouseUp.onTouchCancel.onTouchEnd.onTouchMove.onTouchStart.onPointerDown.onPointerMove.onPointerUp.onPointerCancel.onPointerEnter.onPointerLeave.onPointerOver.onPointerOut.onGotPointerCapture.onLostPointerCapture.onScroll.onWheel.onAnimationStart.onAnimationEnd.onAnimationIteration.onTransitionCancel.onTransitionEnd.onTransitionRun.onTransitionStart`.split(`.`)),$65484d02dcb7eb3e$var$propRe=/^(data-.*)$/;function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,t={}){let{labelable:n,isLink:r,global:i,events:a=i,propNames:o}=t,c={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&($65484d02dcb7eb3e$var$DOMPropNames.has(t)||n&&$65484d02dcb7eb3e$var$labelablePropNames.has(t)||r&&$65484d02dcb7eb3e$var$linkPropNames.has(t)||i&&$65484d02dcb7eb3e$var$globalAttrs.has(t)||a&&$65484d02dcb7eb3e$var$globalEvents.has(t)||t.endsWith(`Capture`)&&$65484d02dcb7eb3e$var$globalEvents.has(t.slice(0,-7))||o?.has(t)||$65484d02dcb7eb3e$var$propRe.test(t))&&(c[t]=e[t]);return c}function $7215afc6de606d6b$export$de79e2c695e052f3(e){if($7215afc6de606d6b$var$supportsPreventScroll())e.focus({preventScroll:!0});else{let t=$7215afc6de606d6b$var$getScrollableElements(e);e.focus(),$7215afc6de606d6b$var$restoreScrollPosition(t)}}var $7215afc6de606d6b$var$supportsPreventScrollCached=null;function $7215afc6de606d6b$var$supportsPreventScroll(){if($7215afc6de606d6b$var$supportsPreventScrollCached==null){$7215afc6de606d6b$var$supportsPreventScrollCached=!1;try{document.createElement(`div`).focus({get preventScroll(){return $7215afc6de606d6b$var$supportsPreventScrollCached=!0,!0}})}catch{}}return $7215afc6de606d6b$var$supportsPreventScrollCached}function $7215afc6de606d6b$var$getScrollableElements(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function $7215afc6de606d6b$var$restoreScrollPosition(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function $c87311424ea30a05$var$testUserAgent(e){var t;if(typeof window>`u`||window.navigator==null)return!1;let n=window.navigator.userAgentData?.brands;return Array.isArray(n)&&n.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function $c87311424ea30a05$var$testPlatform(e){var t;return typeof window<`u`&&window.navigator!=null&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function $c87311424ea30a05$var$cached(e){let t=null;return()=>(t??=e(),t)}var $c87311424ea30a05$export$9ac100e40613ea10=$c87311424ea30a05$var$cached(function(){return $c87311424ea30a05$var$testPlatform(/^Mac/i)}),$c87311424ea30a05$export$186c6964ca17d99=$c87311424ea30a05$var$cached(function(){return $c87311424ea30a05$var$testPlatform(/^iPhone/i)}),$c87311424ea30a05$export$7bef049ce92e4224=$c87311424ea30a05$var$cached(function(){return $c87311424ea30a05$var$testPlatform(/^iPad/i)||$c87311424ea30a05$export$9ac100e40613ea10()&&navigator.maxTouchPoints>1}),$c87311424ea30a05$export$fedb369cb70207f1=$c87311424ea30a05$var$cached(function(){return $c87311424ea30a05$export$186c6964ca17d99()||$c87311424ea30a05$export$7bef049ce92e4224()}),$c87311424ea30a05$export$e1865c3bedcd822b=$c87311424ea30a05$var$cached(function(){return $c87311424ea30a05$export$9ac100e40613ea10()||$c87311424ea30a05$export$fedb369cb70207f1()}),$c87311424ea30a05$export$78551043582a6a98=$c87311424ea30a05$var$cached(function(){return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i)&&!$c87311424ea30a05$export$6446a186d09e379e()}),$c87311424ea30a05$export$6446a186d09e379e=$c87311424ea30a05$var$cached(function(){return $c87311424ea30a05$var$testUserAgent(/Chrome/i)}),$c87311424ea30a05$export$a11b0059900ceec8=$c87311424ea30a05$var$cached(function(){return $c87311424ea30a05$var$testUserAgent(/Android/i)}),$c87311424ea30a05$export$b7d78993b74f766d=$c87311424ea30a05$var$cached(function(){return $c87311424ea30a05$var$testUserAgent(/Firefox/i)});function $03deb23ff14920c4$export$4eaf04e54aa8eed6(){let e=(0,import_react.useRef)(new Map),t=(0,import_react.useCallback)((t,n,r,i)=>{let a=i?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,a,i)},[]),n=(0,import_react.useCallback)((t,n,r,i)=>{var a;let o=e.current.get(r)?.fn||r;t.removeEventListener(n,o,i),e.current.delete(r)},[]),r=(0,import_react.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,import_react.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function $6a7db85432448f7f$export$60278871457622de(e){return e.pointerType===``&&e.isTrusted?!0:$c87311424ea30a05$export$a11b0059900ceec8()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}var $148a7a147e38ea7f$var$RTL_SCRIPTS=new Set([`Arab`,`Syrc`,`Samr`,`Mand`,`Thaa`,`Mend`,`Nkoo`,`Adlm`,`Rohg`,`Hebr`]),$148a7a147e38ea7f$var$RTL_LANGS=new Set([`ae`,`ar`,`arc`,`bcc`,`bqi`,`ckb`,`dv`,`fa`,`glk`,`he`,`ku`,`mzn`,`nqo`,`pnb`,`ps`,`sd`,`ug`,`ur`,`yi`]);function $148a7a147e38ea7f$export$702d680b21cbd764(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n=typeof t.getTextInfo==`function`?t.getTextInfo():t.textInfo;if(n)return n.direction===`rtl`;if(t.script)return $148a7a147e38ea7f$var$RTL_SCRIPTS.has(t.script)}let t=e.split(`-`)[0];return $148a7a147e38ea7f$var$RTL_LANGS.has(t)}var $1e5a04cdaf7d1af8$var$localeSymbol=Symbol.for(`react-aria.i18n.locale`);function $1e5a04cdaf7d1af8$export$f09106e7c6677ec5(){let e=typeof window<`u`&&window[$1e5a04cdaf7d1af8$var$localeSymbol]||typeof navigator<`u`&&(navigator.language||navigator.userLanguage)||`en-US`;try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e=`en-US`}return{locale:e,direction:$148a7a147e38ea7f$export$702d680b21cbd764(e)?`rtl`:`ltr`}}var $1e5a04cdaf7d1af8$var$currentLocale=$1e5a04cdaf7d1af8$export$f09106e7c6677ec5(),$1e5a04cdaf7d1af8$var$listeners=new Set;function $1e5a04cdaf7d1af8$var$updateLocale(){$1e5a04cdaf7d1af8$var$currentLocale=$1e5a04cdaf7d1af8$export$f09106e7c6677ec5();for(let e of $1e5a04cdaf7d1af8$var$listeners)e($1e5a04cdaf7d1af8$var$currentLocale)}function $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a(){let e=$b5e257d569688ac6$export$535bd6ca7f90a273(),[t,n]=(0,import_react.useState)($1e5a04cdaf7d1af8$var$currentLocale);return(0,import_react.useEffect)(()=>($1e5a04cdaf7d1af8$var$listeners.size===0&&window.addEventListener(`languagechange`,$1e5a04cdaf7d1af8$var$updateLocale),$1e5a04cdaf7d1af8$var$listeners.add(n),()=>{$1e5a04cdaf7d1af8$var$listeners.delete(n),$1e5a04cdaf7d1af8$var$listeners.size===0&&window.removeEventListener(`languagechange`,$1e5a04cdaf7d1af8$var$updateLocale)}),[]),e?{locale:`en-US`,direction:`ltr`}:t}var $18f2051aff69b9bf$var$I18nContext=import_react.createContext(null);function $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(){let e=$1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a();return(0,import_react.useContext)($18f2051aff69b9bf$var$I18nContext)||e}var $5b160d28a433310d$var$localeSymbol=Symbol.for(`react-aria.i18n.locale`),$5b160d28a433310d$var$stringsSymbol=Symbol.for(`react-aria.i18n.strings`),$5b160d28a433310d$var$cachedGlobalStrings=void 0,$5b160d28a433310d$export$c17fa47878dc55b6=class e{getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=$5b160d28a433310d$var$getStringsForLocale(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(t){if(typeof window>`u`)return null;let n=window[$5b160d28a433310d$var$localeSymbol];if($5b160d28a433310d$var$cachedGlobalStrings===void 0){let t=window[$5b160d28a433310d$var$stringsSymbol];if(!t)return null;$5b160d28a433310d$var$cachedGlobalStrings={};for(let r in t)$5b160d28a433310d$var$cachedGlobalStrings[r]=new e({[n]:t[r]},n)}let r=$5b160d28a433310d$var$cachedGlobalStrings?.[t];if(!r)throw Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,t=`en-US`){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}};function $5b160d28a433310d$var$getStringsForLocale(e,t,n=`en-US`){if(t[e])return t[e];let r=$5b160d28a433310d$var$getLanguage(e);if(t[r])return t[r];for(let e in t)if(e.startsWith(r+`-`))return t[e];return t[n]}function $5b160d28a433310d$var$getLanguage(e){return Intl.Locale?new Intl.Locale(e).language:e.split(`-`)[0]}var $6db58dc88e78b024$var$pluralRulesCache=new Map,$6db58dc88e78b024$var$numberFormatCache=new Map,$6db58dc88e78b024$export$2f817fcdc4b89ae0=class{format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return typeof n==`function`?n(t,this):n}plural(e,t,n=`cardinal`){let r=t[`=`+e];if(r)return typeof r==`function`?r():r;let i=this.locale+`:`+n,a=$6db58dc88e78b024$var$pluralRulesCache.get(i);return a||(a=new Intl.PluralRules(this.locale,{type:n}),$6db58dc88e78b024$var$pluralRulesCache.set(i,a)),r=t[a.select(e)]||t.other,typeof r==`function`?r():r}number(e){let t=$6db58dc88e78b024$var$numberFormatCache.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),$6db58dc88e78b024$var$numberFormatCache.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return typeof n==`function`?n():n}constructor(e,t){this.locale=e,this.strings=t}},$fca6afa0e843324b$var$cache=new WeakMap;function $fca6afa0e843324b$var$getCachedDictionary(e){let t=$fca6afa0e843324b$var$cache.get(e);return t||(t=new $5b160d28a433310d$export$c17fa47878dc55b6(e),$fca6afa0e843324b$var$cache.set(e,t)),t}function $fca6afa0e843324b$export$87b761675e8eaa10(e,t){return t&&$5b160d28a433310d$export$c17fa47878dc55b6.getGlobalDictionaryForPackage(t)||$fca6afa0e843324b$var$getCachedDictionary(e)}function $fca6afa0e843324b$export$f12b703ca79dfbb1(e,t){let{locale:n}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),r=$fca6afa0e843324b$export$87b761675e8eaa10(e,t);return(0,import_react.useMemo)(()=>new $6db58dc88e78b024$export$2f817fcdc4b89ae0(n,r),[n,r])}
30function $parcel$interopDefault$1(e){return e&&e.__esModule?e.default:e}function $d6542812f0669241$export$a407b657d3044108(e,t,n){let{key:r,timer:i,timeout:a}=e.toast;(0,import_react.useEffect)(()=>{if(i!=null&&a!=null)return i.reset(a),()=>{i.pause()}},[i,a]);let o=$bdb11010cef70236$export$f680877a34711e37(),c=$bdb11010cef70236$export$b4cc09c592e8fdb8(),u=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$1($7853651519a70071$exports),`@react-aria/toast`),[K,Y]=(0,import_react.useState)(!1);return(0,import_react.useEffect)(()=>{Y(!0)},[]),{toastProps:{...$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0}),role:`alertdialog`,"aria-modal":`false`,"aria-labelledby":e[`aria-labelledby`]||o,"aria-describedby":e[`aria-describedby`]||c,tabIndex:0},contentProps:{role:`alert`,"aria-atomic":`true`,"aria-hidden":K?void 0:`true`},titleProps:{id:o},descriptionProps:{id:c},closeButtonProps:{"aria-label":u.format(`close`),onPress:()=>t.close(r)}}}function $8a9cb279dc87e130$export$525bc4921d56d4a(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function $8a9cb279dc87e130$export$c2b7abe5d61ec696(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function $8a9cb279dc87e130$export$715c682d09d639cc(e){let t=(0,import_react.useRef)({isFocused:!1,observer:null});$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$1(()=>{let e=t.current;return()=>{e.observer&&=(e.observer.disconnect(),null)}},[]);let n=$8ae05eaa5c114e9c$export$7f54fc3180508a52(t=>{e?.(t)});return(0,import_react.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target;r.addEventListener(`focusout`,e=>{if(t.current.isFocused=!1,r.disabled){let t=$8a9cb279dc87e130$export$525bc4921d56d4a(e);n(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;(e=t.current.observer)==null||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:n})),r.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:[`disabled`]})}},[n])}var $8a9cb279dc87e130$export$fda7da73ab5d4c48=!1,$507fabe10e71c6fb$var$currentModality=null,$507fabe10e71c6fb$var$changeHandlers=new Set,$507fabe10e71c6fb$export$d90243b58daecda7=new Map,$507fabe10e71c6fb$var$hasEventBeforeFocus=!1,$507fabe10e71c6fb$var$hasBlurredWindowRecently=!1;function $507fabe10e71c6fb$var$triggerChangeHandlers(e,t){for(let n of $507fabe10e71c6fb$var$changeHandlers)n(e,t)}function $507fabe10e71c6fb$var$isValidKey(e){return!(e.metaKey||!$c87311424ea30a05$export$9ac100e40613ea10()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}function $507fabe10e71c6fb$var$handleKeyboardEvent(e){$507fabe10e71c6fb$var$hasEventBeforeFocus=!0,$507fabe10e71c6fb$var$isValidKey(e)&&($507fabe10e71c6fb$var$currentModality=`keyboard`,$507fabe10e71c6fb$var$triggerChangeHandlers(`keyboard`,e))}function $507fabe10e71c6fb$var$handlePointerEvent(e){$507fabe10e71c6fb$var$currentModality=`pointer`,(e.type===`mousedown`||e.type===`pointerdown`)&&($507fabe10e71c6fb$var$hasEventBeforeFocus=!0,$507fabe10e71c6fb$var$triggerChangeHandlers(`pointer`,e))}function $507fabe10e71c6fb$var$handleClickEvent(e){$6a7db85432448f7f$export$60278871457622de(e)&&($507fabe10e71c6fb$var$hasEventBeforeFocus=!0,$507fabe10e71c6fb$var$currentModality=`virtual`)}function $507fabe10e71c6fb$var$handleFocusEvent(e){e.target!==window&&e.target!==document&&!$8a9cb279dc87e130$export$fda7da73ab5d4c48&&e.isTrusted&&(!$507fabe10e71c6fb$var$hasEventBeforeFocus&&!$507fabe10e71c6fb$var$hasBlurredWindowRecently&&($507fabe10e71c6fb$var$currentModality=`virtual`,$507fabe10e71c6fb$var$triggerChangeHandlers(`virtual`,e)),$507fabe10e71c6fb$var$hasEventBeforeFocus=!1,$507fabe10e71c6fb$var$hasBlurredWindowRecently=!1)}function $507fabe10e71c6fb$var$handleWindowBlur(){$8a9cb279dc87e130$export$fda7da73ab5d4c48||($507fabe10e71c6fb$var$hasEventBeforeFocus=!1,$507fabe10e71c6fb$var$hasBlurredWindowRecently=!0)}function $507fabe10e71c6fb$var$setupGlobalFocusEvents(e){if(typeof window>`u`||typeof document>`u`||$507fabe10e71c6fb$export$d90243b58daecda7.get($431fbd86ca7dc216$export$f21a1ffae260145a(e)))return;let t=$431fbd86ca7dc216$export$f21a1ffae260145a(e),n=$431fbd86ca7dc216$export$b204af158042fbac(e),r=t.HTMLElement.prototype.focu
30s;t.HTMLElement.prototype.focus=function(){$507fabe10e71c6fb$var$hasEventBeforeFocus=!0,r.apply(this,arguments)},n.addEventListener(`keydown`,$507fabe10e71c6fb$var$handleKeyboardEvent,!0),n.addEventListener(`keyup`,$507fabe10e71c6fb$var$handleKeyboardEvent,!0),n.addEventListener(`click`,$507fabe10e71c6fb$var$handleClickEvent,!0),t.addEventListener(`focus`,$507fabe10e71c6fb$var$handleFocusEvent,!0),t.addEventListener(`blur`,$507fabe10e71c6fb$var$handleWindowBlur,!1),typeof PointerEvent<`u`&&(n.addEventListener(`pointerdown`,$507fabe10e71c6fb$var$handlePointerEvent,!0),n.addEventListener(`pointermove`,$507fabe10e71c6fb$var$handlePointerEvent,!0),n.addEventListener(`pointerup`,$507fabe10e71c6fb$var$handlePointerEvent,!0)),t.addEventListener(`beforeunload`,()=>{$507fabe10e71c6fb$var$tearDownWindowFocusTracking(e)},{once:!0}),$507fabe10e71c6fb$export$d90243b58daecda7.set(t,{focus:r})}var $507fabe10e71c6fb$var$tearDownWindowFocusTracking=(e,t)=>{let n=$431fbd86ca7dc216$export$f21a1ffae260145a(e),r=$431fbd86ca7dc216$export$b204af158042fbac(e);t&&r.removeEventListener(`DOMContentLoaded`,t),$507fabe10e71c6fb$export$d90243b58daecda7.has(n)&&(n.HTMLElement.prototype.focus=$507fabe10e71c6fb$export$d90243b58daecda7.get(n).focus,r.removeEventListener(`keydown`,$507fabe10e71c6fb$var$handleKeyboardEvent,!0),r.removeEventListener(`keyup`,$507fabe10e71c6fb$var$handleKeyboardEvent,!0),r.removeEventListener(`click`,$507fabe10e71c6fb$var$handleClickEvent,!0),n.removeEventListener(`focus`,$507fabe10e71c6fb$var$handleFocusEvent,!0),n.removeEventListener(`blur`,$507fabe10e71c6fb$var$handleWindowBlur,!1),typeof PointerEvent<`u`&&(r.removeEventListener(`pointerdown`,$507fabe10e71c6fb$var$handlePointerEvent,!0),r.removeEventListener(`pointermove`,$507fabe10e71c6fb$var$handlePointerEvent,!0),r.removeEventListener(`pointerup`,$507fabe10e71c6fb$var$handlePointerEvent,!0)),$507fabe10e71c6fb$export$d90243b58daecda7.delete(n))};function $507fabe10e71c6fb$export$2f1888112f558a7d(e){let t=$431fbd86ca7dc216$export$b204af158042fbac(e),n;return t.readyState===`loading`?(n=()=>{$507fabe10e71c6fb$var$setupGlobalFocusEvents(e)},t.addEventListener(`DOMContentLoaded`,n)):$507fabe10e71c6fb$var$setupGlobalFocusEvents(e),()=>$507fabe10e71c6fb$var$tearDownWindowFocusTracking(e,n)}typeof document<`u`&&$507fabe10e71c6fb$export$2f1888112f558a7d();function $507fabe10e71c6fb$export$630ff653c5ada6a9(){return $507fabe10e71c6fb$var$currentModality}function $9ab94262bd0047c7$export$420e68273165f4ec(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=(0,import_react.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:c}=$03deb23ff14920c4$export$4eaf04e54aa8eed6(),u=(0,import_react.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,c(),n&&n(e),i&&i(!1))},[n,i,a,c]),K=$8a9cb279dc87e130$export$715c682d09d639cc(u),Y=(0,import_react.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=$431fbd86ca7dc216$export$b204af158042fbac(e.target),n=$d4ee10de306f2510$export$cd4e5573fbe2b576(t);if(!a.current.isFocusWithin&&n===$d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)){r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,K(e);let n=e.currentTarget;o(t,`focus`,e=>{if(a.current.isFocusWithin&&!$d4ee10de306f2510$export$4282f70798064fe0(n,e.target)){let r=new t.defaultView.FocusEvent(`blur`,{relatedTarget:e.target});$8a9cb279dc87e130$export$c2b7abe5d61ec696(r,n);let i=$8a9cb279dc87e130$export$525bc4921d56d4a(r);u(i)}},{capture:!0})}},[r,i,K,o,u]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:Y,onBlur:u}}}var $6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents=!1,$6179b936705e76d3$var$hoverCount=0;function $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents(){$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents=!0,setTimeout(()=>{$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents=!1},50)}function $6179b936705e76d3$var$handleGlobalPointerEvent(e){e.pointerType===`touch`&&$6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents()}function $6179b936705e76d3$var$setupGlobalTouchEvents(){if(typeof document<`u`)return $6179b936705e76d3$var$hoverCount===0&&typeof PointerEvent<`u`&&document.addEventListener(`pointerup`,$6179b936705e76d3$var$handleGlobalPointerEvent),$6179b936705e76d3$var$hoverCount++,()=>{$6179b936705e76d3$var$hoverCount--,!($6179b936705e76d3$var$hoverCount>0)&&typeof PointerEvent<`u`&&document.removeEventListener(`pointerup`,$6179b936705e76d3$var$handleGlobalPointerEvent)}}function $6179b936705e76d3$export$ae780daf29e6d456(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,o]=(0,import_react.useState)(!1),c=(0,import_react.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:``,target:null}).current;(0,import_react.useEffect)($6179b936705e76d3$var$setupGlobalTouchEvents,[]);let{addGlobalListener:u,removeAllGlobalListeners:K}=$03deb23ff14920c4$export$4eaf04e54aa8eed6(),{hoverProps:Y,triggerHoverEnd:X}=(0,import_react.useMemo)(()=>{let e=(e,r)=>{if(c.pointerType=r,i||r===`touch`||c.isHovered||!e.currentTarget.contains(e.target))return;c.isHovered=!0;let K=e.currentTarget;c.target=K,u($431fbd86ca7dc216$export$b204af158042fbac(e.target),`pointerover`,e=>{c.isHovered&&c.target&&!$d4ee10de306f2510$export$4282f70798064fe0(c.target,e.target)&&a(e,e.pointerType)},{capture:!0}),t&&t({type:`hoverstart`,target:K,pointerType:r}),n&&n(!0),o(!0)},a=(e,t)=>{let i=c.target;c.pointerType=``,c.target=null,t!==`touch`&&c.isHovered&&i&&(c.isHovered=!1,K(),r&&r({type:`hoverend`,target:i,pointerType:t}),n&&n(!1),o(!1))},Y={};return typeof PointerEvent<`u`&&(Y.onPointerEnter=t=>{$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents&&t.pointerType===`mouse`||e(t,t.pointerType)},Y.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&a(e,e.pointerType)}),{hoverProps:Y,triggerHoverEnd:a}},[t,n,r,i,c,u,K]);return(0,import_react.useEffect)(()=>{i&&X({currentTarget:c.target},c.pointerType)},[i]),{hoverProps:Y,isHovered:a}}var $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c=typeof document<`u`?import_react.useLayoutEffect:()=>{},require_use_sync_external_store_shim_production=__commonJSMin((e=>{var t=require_react();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,c=t.useDebugValue;function u(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),u=r[0].inst,Y=r[1];return o(function(){u.value=n,u.getSnapshot=t,K(u)&&Y({inst:u})},[e,n,t]),a(function(){return K(u)&&Y({inst:u}),e(function(){K(u)&&Y({inst:u})})},[e]),c(n),n}function K(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function Y(e,t){return t()}var X=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?Y:u;e.useSyncExternalStore=t.useSyncExternalStore===void 0?X:t.useSyncExternalStore})),require_shim=__commonJSMin(((e,t)=>{t.exports=require_use_sync_external_store_shim_production()})),import_shim=require_shim(),$a86207c5d7f7e1fb$var$LANDMARK_API_VERSION=1,$a86207c5d7f7e1fb$var$landmarkSymbol=Symbol.for(`react-aria-landmark-manager`);function $a86207c5d7f7e1fb$var$subscribe(e){return document.addEventListener(`react-aria-landmark-manager-change`,e),()=>document.removeEventListener(`react-aria-landmark-manager-change`,e)}function $a86207c5d7f7e1fb$var$getLandmarkManager(){if(typeof document>`u`)return null;let e=document[$a86207c5d7f7e1fb$var$landmarkSymbol];return e&&e.version>=$a86207c5d7f7e1fb$var$LANDMARK_API_VERSION?e:(document[$a86207c5d7f7e1fb$var$landmarkSymbol]=new $a86207c5d7f7e1fb$var$LandmarkManager,document.dispatchEvent(new CustomEvent(`react-aria-landmark-manager-change`)),document[$a86207c5d7f7e1fb$var$landmarkSymbol])}function $a86207c5d7f7e1fb$var$useLandmarkManager(){return(0,import_shim.useSyncExternalStore)($a86207c5d7f7e1fb$var$subscribe,$a86207c5d7f7e1fb$var$getLandmarkManager,$a86207c5d7f7e1fb$var$getLandmarkManager)}var $a86207c5d7f7e1fb$var$LandmarkManager=class{setupIfNeeded(){this.isListening||=(document.addEventListener(`ke
30ydown`,this.f6Handler,{capture:!0}),document.addEventListener(`focusin`,this.focusinHandler,{capture:!0}),document.addEventListener(`focusout`,this.focusoutHandler,{capture:!0}),!0)}teardownIfNeeded(){!this.isListening||this.landmarks.length>0||this.refCount>0||(document.removeEventListener(`keydown`,this.f6Handler,{capture:!0}),document.removeEventListener(`focusin`,this.focusinHandler,{capture:!0}),document.removeEventListener(`focusout`,this.focusoutHandler,{capture:!0}),this.isListening=!1)}focusLandmark(e,t){var n,r;(r=this.landmarks.find(t=>t.ref.current===e))==null||(n=r.focus)==null||n.call(r,t)}getLandmarksByRole(e){return new Set(this.landmarks.filter(t=>t.role===e))}getLandmarkByRole(e){return this.landmarks.find(t=>t.role===e)}addLandmark(e){if(this.setupIfNeeded(),this.landmarks.find(t=>t.ref===e.ref)||!e.ref.current)return;if(this.landmarks.filter(e=>e.role===`main`).length,this.landmarks.length===0){this.landmarks=[e],this.checkLabels(e.role);return}let t=0,n=this.landmarks.length-1;for(;t<=n;){let r=Math.floor((t+n)/2),i=e.ref.current.compareDocumentPosition(this.landmarks[r].ref.current);i&Node.DOCUMENT_POSITION_PRECEDING||i&Node.DOCUMENT_POSITION_CONTAINS?t=r+1:n=r-1}this.landmarks.splice(t,0,e),this.checkLabels(e.role)}updateLandmark(e){let t=this.landmarks.findIndex(t=>t.ref===e.ref);t>=0&&(this.landmarks[t]={...this.landmarks[t],...e},this.checkLabels(this.landmarks[t].role))}removeLandmark(e){this.landmarks=this.landmarks.filter(t=>t.ref!==e),this.teardownIfNeeded()}checkLabels(e){let t=this.getLandmarksByRole(e);t.size>1&&[...t].filter(e=>!e.label).length}closestLandmark(e){let t=new Map(this.landmarks.map(e=>[e.ref.current,e])),n=e;for(;n&&!t.has(n)&&n!==document.body&&n.parentElement;)n=n.parentElement;return t.get(n)}getNextLandmark(e,{backward:t}){var n;let r=this.closestLandmark(e),i=t?this.landmarks.length-1:0;r&&(i=this.landmarks.indexOf(r)+(t?-1:1));let a=()=>{if(i<0){if(!e.dispatchEvent(new CustomEvent(`react-aria-landmark-navigation`,{detail:{direction:`backward`},bubbles:!0,cancelable:!0})))return!0;i=this.landmarks.length-1}else if(i>=this.landmarks.length){if(!e.dispatchEvent(new CustomEvent(`react-aria-landmark-navigation`,{detail:{direction:`forward`},bubbles:!0,cancelable:!0})))return!0;i=0}return i<0||i>=this.landmarks.length};if(a())return;let o=i;for(;this.landmarks[i].ref.current?.closest(`[aria-hidden=true]`);){if(i+=t?-1:1,a())return;if(i===o)break}return this.landmarks[i]}f6Handler(e){e.key===`F6`&&(e.altKey?this.focusMain():this.navigate(e.target,e.shiftKey))&&(e.preventDefault(),e.stopPropagation())}focusMain(){let e=this.getLandmarkByRole(`main`);return e&&e.ref.current&&document.contains(e.ref.current)?(this.focusLandmark(e.ref.current,`forward`),!0):!1}navigate(e,t){let n=this.getNextLandmark(e,{backward:t});if(!n)return!1;if(n.lastFocused){let e=n.lastFocused;if(document.body.contains(e))return e.focus(),!0}return n.ref.current&&document.contains(n.ref.current)?(this.focusLandmark(n.ref.current,t?`backward`:`forward`),!0):!1}focusinHandler(e){let t=this.closestLandmark(e.target);t&&t.ref.current!==e.target&&this.updateLandmark({ref:t.ref,lastFocused:e.target});let n=e.relatedTarget;if(n){let e=this.closestLandmark(n);e&&e.ref.current===n&&e.blur()}}focusoutHandler(e){let t=e.target,n=e.relatedTarget;if(!n||n===document){let e=this.closestLandmark(t);e&&e.ref.current===t&&e.blur()}}createLandmarkController(){let e=this;return e.refCount++,e.setupIfNeeded(),{navigate(t,n){let r=n?.from||document.activeElement;return e.navigate(r,t===`backward`)},focusNext(t){let n=t?.from||document.activeElement;return e.navigate(n,!1)},focusPrevious(t){let n=t?.from||document.activeElement;return e.navigate(n,!0)},focusMain(){return e.focusMain()},dispose(){e&&=(e.refCount--,e.teardownIfNeeded(),null)}}}registerLandmark(e){return this.landmarks.find(t=>t.ref===e.ref)?this.updateLandmark(e):this.addLandmark(e),()=>this.removeLandmark(e.ref)}constructor(){this.landmarks=[],this.isListening=!1,this.refCount=0,this.version=$a86207c5d7f7e1fb$var$LANDMARK_API_VERSION,this.f6Handler=this.f6Handler.bind(this),this.focusinHandler=this.focusinHandler.bind(this),this.focusoutHandler=this.focusoutHandler.bind(this)}};function $a86207c5d7f7e1fb$export$4cc632584fd87fae(e,t){let{role:n,"aria-label":r,"aria-labelledby":i,focus:a}=e,o=$a86207c5d7f7e1fb$var$useLandmarkManager(),c=r||i,[u,K]=(0,import_react.useState)(!1),Y=(0,import_react.useCallback)(()=>{K(!0)},[K]),X=(0,import_react.useCallback)(()=>{K(!1)},[K]);return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>
30{if(o)return o.registerLandmark({ref:t,label:c,role:n,focus:a||Y,blur:X})},[o,c,t,n,a,Y,X]),(0,import_react.useEffect)(()=>{var e;u&&((e=t.current)==null||e.focus())},[u,t]),{landmarkProps:{role:n,tabIndex:u?-1:void 0,"aria-label":r,"aria-labelledby":i}}}function $parcel$interopDefault(e){return e&&e.__esModule?e.default:e}function $6cc546b19ee7130a$export$b8cbbb20a51697de(e,t,n){let r=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($7853651519a70071$exports),`@react-aria/toast`),{landmarkProps:i}=$a86207c5d7f7e1fb$export$4cc632584fd87fae({role:`region`,"aria-label":e[`aria-label`]||r.format(`notifications`,{count:t.visibleToasts.length})},n),a=(0,import_react.useRef)(!1),o=(0,import_react.useRef)(!1),c=$8ae05eaa5c114e9c$export$7f54fc3180508a52(()=>{a.current||o.current?t.pauseAll():t.resumeAll()}),{hoverProps:u}=$6179b936705e76d3$export$ae780daf29e6d456({onHoverStart:()=>{a.current=!0,c()},onHoverEnd:()=>{a.current=!1,c()}}),K=(0,import_react.useRef)([]),Y=(0,import_react.useRef)(t.visibleToasts),X=(0,import_react.useRef)(null);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c$1(()=>{if(X.current===-1||t.visibleToasts.length===0||!n.current){K.current=[],Y.current=t.visibleToasts;return}if(K.current=[...n.current.querySelectorAll(`[role="alertdialog"]`)],Y.current.length===t.visibleToasts.length&&t.visibleToasts.every((e,t)=>e.key===Y.current[t].key)){Y.current=t.visibleToasts;return}let e=Y.current.map((e,n)=>({...e,i:n,isRemoved:!t.visibleToasts.some(t=>e.key===t.key)})),r=e.findIndex(e=>e.i===X.current&&e.isRemoved);if(r>-1){var i;if($507fabe10e71c6fb$export$630ff653c5ada6a9()===`pointer`&&ee.current?.isConnected)$7215afc6de606d6b$export$de79e2c695e052f3(ee.current);else{let t=0,n,i;for(;t<=r;)e[t].isRemoved||(i=Math.max(0,t-1)),t++;for(;t<e.length;){if(!e[t].isRemoved){n=t-1;break}t++}i===void 0&&n===void 0&&(i=0),i>=0&&i<K.current.length?$7215afc6de606d6b$export$de79e2c695e052f3(K.current[i]):n>=0&&n<K.current.length&&$7215afc6de606d6b$export$de79e2c695e052f3(K.current[n])}}Y.current=t.visibleToasts},[t.visibleToasts,n,c]);let ee=(0,import_react.useRef)(null),{focusWithinProps:te}=$9ab94262bd0047c7$export$420e68273165f4ec({onFocusWithin:e=>{o.current=!0,ee.current=e.relatedTarget,c()},onBlurWithin:()=>{o.current=!1,ee.current=null,c()}});return(0,import_react.useEffect)(()=>{var e;t.visibleToasts.length===0&&ee.current?.isConnected&&($507fabe10e71c6fb$export$630ff653c5ada6a9()===`pointer`?$7215afc6de606d6b$export$de79e2c695e052f3(ee.current):ee.current.focus(),ee.current=null)},[n,t.visibleToasts.length]),(0,import_react.useEffect)(()=>()=>{var e;ee.current?.isConnected&&($507fabe10e71c6fb$export$630ff653c5ada6a9()===`pointer`?$7215afc6de606d6b$export$de79e2c695e052f3(ee.current):ee.current.focus(),ee.current=null)},[n]),{regionProps:$3ef42575df84b30b$export$9d1611c77c2fe928(i,u,te,{tabIndex:-1,"data-react-aria-top-layer":!0,onFocus:e=>{let t=e.target.closest(`[role="alertdialog"]`);X.current=K.current.findIndex(e=>e===t)},onBlur:()=>{X.current=-1}})}}var require_react_fast_compare$1=__commonJSMin(((e,t)=>{var n=typeof Element<`u`,r=typeof Map==`function`,i=typeof Set==`function`,a=typeof ArrayBuffer==`function`&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;var c,u,K;if(Array.isArray(e)){if(c=e.length,c!=t.length)return!1;for(u=c;u--!==0;)if(!o(e[u],t[u]))return!1;return!0}var Y;if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(Y=e.entries();!(u=Y.next()).done;)if(!t.has(u.value[0]))return!1;for(Y=e.entries();!(u=Y.next()).done;)if(!o(u.value[1],t.get(u.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(Y=e.entries();!(u=Y.next()).done;)if(!t.has(u.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(c=e.length,c!=t.length)return!1;for(u=c;u--!==0;)if(e[u]!==t[u])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==`function`&&typeof t.valueOf==`function`)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==`function`&&typeof t.toString==`function`)return e.toString()===t.toString();if(K=Object.keys(e),c=K.length,c!==Object.keys(t).length)return!1;for(u=c;u--!==0;)if(!Object.prototype.hasOwnProperty.call(t,K[u]))return!1;if(n&&e instanceof Element)return!1;for(u=c;u--!==0;)if((K[u]!==`_owner`&&K[u]!==`__v`&&K[u]!==`__o`||!e.$$typeof)&&!o(e[K[u]],t[K[u]]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||``).match(/stack|recursion/i))return console.warn(`react-fast-compare cannot handle circular refs`),!1;throw e}}}));function c$12(e,t,n){var r=this,i=(0,import_react.useRef)(null),a=(0,import_react.useRef)(0),o=(0,import_react.useRef)(null),c=(0,import_react.useRef)([]),u=(0,import_react.useRef)(),K=(0,import_react.useRef)(),Y=(0,import_react.useRef)(e),X=(0,import_react.useRef)(!0);Y.current=e;var ee=typeof window<`u`,te=!t&&t!==0&&ee;if(typeof e!=`function`)throw TypeError(`Expected a function`);t=+t||0;var ce=!!(n||={}).leading,ue=!(`trailing`in n)||!!n.trailing,de=`maxWait`in n,fe=`debounceOnServer`in n&&!!n.debounceOnServer,me=de?Math.max(+n.maxWait||0,t):null;return(0,import_react.useEffect)(function(){return X.current=!0,function(){X.current=!1}},[]),(0,import_react.useMemo)(function(){var e=function(e){var t=c.current,n=u.current;return c.current=u.current=null,a.current=e,K.current=Y.current.apply(n,t)},n=function(e,t){te&&cancelAnimationFrame(o.current),o.current=te?requestAnimationFrame(e):setTimeout(e,t)},ge=function(e){if(!X.current)return!1;var n=e-i.current;return!i.current||n>=t||n<0||de&&e-a.current>=me},Te=function(t){return o.current=null,ue&&c.current?e(t):(c.current=u.current=null,K.current)},Oe=function e(){var r=Date.now();if(ge(r))return Te(r);if(X.current){var o=t-(r-i.current);n(e,de?Math.min(o,me-(r-a.current)):o)}},Ae=function(){if(ee||fe){var Y=Date.now(),te=ge(Y);if(c.current=[].slice.call(arguments),u.current=r,i.current=Y,te){if(!o.current&&X.current)return a.current=i.current,n(Oe,t),ce?e(i.current):K.current;if(de)return n(Oe,t),e(i.current)}return o.current||n(Oe,t),K.current}};return Ae.cancel=function(){o.current&&(te?cancelAnimationFrame(o.current):clearTimeout(o.current)),a.current=0,c.current=i.current=u.current=o.current=null},Ae.isPending=function(){return!!o.current},Ae.flush=function(){return o.current?Te(Date.now()):K.current},Ae},[ce,de,t,me,ue,te,ee,fe])}var Subscribable=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){let t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},isServer=typeof window>`u`||`Deno`in window;function noop$3(){}function functionalUpdate(e,t){return typeof e==`function`?e(t):e}function isValidTimeout(e){return typeof e==`number`&&e>=0&&e!==1/0}function timeUntilStale(e,t){return Math.max(e+(t||0)-Date.now(),0)}function parseQueryArgs(e,t,n){return isQueryKey(e)?typeof t==`function`?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function parseMutationArgs(e,t,n){return isQueryKey(e)?typeof t==`function`?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:typeof e==`function`?{...t,mutationFn:e}:{...e}}function parseFilterArgs(e,t,n){return isQueryKey(e)?[{...t,queryKey:e},n]:[e||{},t]}function parseMutationFilterArgs(e,t,n){return isQueryKey(e)?[{...t,mutationKey:e},n]:[e||{},t]}function matchQuery(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:c}=e;if(isQueryKey(o)){if(r){if(t.queryHash!==hashQueryKeyByOptions(o,t.options))return!1}else if(!partialMatchKey(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof c==`boolean`&&t.isStale()!==c||i!==void 0&&i!==t.state.fetchStatus||a&&!a(t))}function matchMutation(e,t){let{exact:n,fetching:r,predicate:i,mutationKey:a}=e;if(isQueryKey(a)){if(!t.options.mutationKey)return!1;if(n){if(hashQueryKey(t.options.mutationKey)!==hashQueryKey(a))return!1}else if(!partialMatchKey(t.options.mutationKey,a))return!1}return!(typeof r==`boolean`&&t.state.status===`loading`!==r||i&&!i(t))}function hashQueryKeyByOptions(e,t){return(t?.queryKeyHashFn||hashQueryKey)(e)}function hashQueryKey(e){return JSON.stringify(e,(e,t)=>isPlainObject$6(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function partialMatchKey(e,t){return partialDeepEqual(e,t)}function partialDeepEqual(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?!Object.keys(t).some(n=>!partialDeepEqual(e[n],t[n])):!1}function replaceEqualDeep(e,t){if(e===t)return e;let n=isPlainArray(e)&&isPlainArray(t);if(n||isPlainObject$6(e)&&isPlainObject$6(t)){let r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),a=i.length,o=n?[]:{},c=0;for(let r=0;r<a;r++){let a=n?r:i[r];o[a]=replaceEqualDeep(e[a],t[a]),o[a]===e[a]&&c++}return r===a&&c===r?e:o}return t}function shallowEqualObjects(e,t){if(e&&!t||t&&!e)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function isPlainArray(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function isPlainObject$6(e){if(!hasObjectPrototype(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!hasObjectPrototype(n)||!n.hasOwnProperty(`isPrototypeOf`))}function hasObjectPrototype(e){return Object.prototype.toString.call(e)===`[object Object]`}function isQueryKey(e){return Array.isArray(e)}function sleep$1(e){return new Promise(t=>{setTimeout(t,e)})}function scheduleMicrotask(e){sleep$1(0).then(e)}function getAbortController(){if(typeof AbortController==`function`)return new AbortController}function replaceData(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:replaceEqualDeep(e,t)}var FocusManager=class extends Subscribable{constructor(){super(),this.setup=e=>{if(!isServer&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),window.addEventListener(`focus`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t),window.removeEventListener(`focus`,t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,(t=this.cleanup)==null||t.call(this),this.cleanup=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}
30onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused==`boolean`?this.focused:typeof document>`u`||[void 0,`visible`,`prerender`].includes(document.visibilityState)}},focusManager=new FocusManager,onlineEvents=[`online`,`offline`],OnlineManager=class extends Subscribable{constructor(){super(),this.setup=e=>{if(!isServer&&window.addEventListener){let t=()=>e();return onlineEvents.forEach(e=>{window.addEventListener(e,t,!1)}),()=>{onlineEvents.forEach(e=>{window.removeEventListener(e,t)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,(t=this.cleanup)==null||t.call(this),this.cleanup=e(e=>{typeof e==`boolean`?this.setOnline(e):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online==`boolean`?this.online:typeof navigator>`u`||navigator.onLine===void 0||navigator.onLine}},onlineManager=new OnlineManager;function defaultRetryDelay(e){return Math.min(1e3*2**e,3e4)}function canFetch(e){return(e??`online`)!==`online`||onlineManager.isOnline()}var CancelledError=class{constructor(e){this.revert=e?.revert,this.silent=e?.silent}};function isCancelledError(e){return e instanceof CancelledError}function createRetryer(e){let t=!1,n=0,r=!1,i,a,o,c=new Promise((e,t)=>{a=e,o=t}),u=t=>{r||(te(new CancelledError(t)),e.abort==null||e.abort())},K=()=>{t=!0},Y=()=>{t=!1},X=()=>!focusManager.isFocused()||e.networkMode!==`always`&&!onlineManager.isOnline(),ee=t=>{r||(r=!0,e.onSuccess==null||e.onSuccess(t),i?.(),a(t))},te=t=>{r||(r=!0,e.onError==null||e.onError(t),i?.(),o(t))},ce=()=>new Promise(t=>{i=e=>{let n=r||!X();return n&&t(e),n},e.onPause==null||e.onPause()}).then(()=>{i=void 0,r||e.onContinue==null||e.onContinue()}),ue=()=>{if(r)return;let i;try{i=e.fn()}catch(e){i=Promise.reject(e)}Promise.resolve(i).then(ee).catch(i=>{var a,o;if(r)return;let c=e.retry??3,u=e.retryDelay??defaultRetryDelay,K=typeof u==`function`?u(n,i):u,Y=c===!0||typeof c==`number`&&n<c||typeof c==`function`&&c(n,i);if(t||!Y){te(i);return}n++,e.onFail==null||e.onFail(n,i),sleep$1(K).then(()=>{if(X())return ce()}).then(()=>{t?te(i):ue()})})};return canFetch(e.networkMode)?ue():ce().then(ue),{promise:c,cancel:u,continue:()=>i?.()?c:Promise.resolve(),cancelRetry:K,continueRetry:Y}}var defaultLogger=console;function createNotifyManager(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=e=>{let n;t++;try{n=e()}finally{t--,t||c()}return n},a=r=>{t?e.push(r):scheduleMicrotask(()=>{n(r)})},o=e=>(...t)=>{a(()=>{e(...t)})},c=()=>{let t=e;e=[],t.length&&scheduleMicrotask(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:i,batchCalls:o,schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e}}}var notifyManager=createNotifyManager(),Removable=class{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),isValidTimeout(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(isServer?1/0:3e5))}clearGcTimeout(){this.gcTimeout&&=(clearTimeout(this.gcTimeout),void 0)}},Query=class extends Removable{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||defaultLogger,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||getDefaultState$1(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.cache.remove(this)}setData(e,t){let n=replaceData(this.state.data,e,this.options);return this.dispatch({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.dispatch({type:`setState`,state:e,setStateOptions:t})}cancel(e){var t;let n=this.promise;
30return(t=this.retryer)==null||t.cancel(e),n?n.then(noop$3).catch(noop$3):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!timeUntilStale(this.state.dataUpdatedAt,e)}onFocus(){var e;let t=this.observers.find(e=>e.shouldFetchOnWindowFocus());t&&t.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;let t=this.observers.find(e=>e.shouldFetchOnReconnect());t&&t.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:`invalidate`})}fetch(e,t){var n,r;if(this.state.fetchStatus!==`idle`){if(this.state.dataUpdatedAt&&t!=null&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let a=getAbortController(),o={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};c(o);let u={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(o)):Promise.reject(`Missing queryFn for queryKey '`+this.options.queryHash+`'`)};if(c(u),(n=this.options.behavior)==null||n.onFetch(u),this.revertState=this.state,this.state.fetchStatus===`idle`||this.state.fetchMeta!==u.fetchOptions?.meta){var K;this.dispatch({type:`fetch`,meta:u.fetchOptions?.meta})}let Y=e=>{if(isCancelledError(e)&&e.silent||this.dispatch({type:`error`,error:e}),!isCancelledError(e)){var t,n,r,i;(t=(n=this.cache.config).onError)==null||t.call(n,e,this),(r=(i=this.cache.config).onSettled)==null||r.call(i,this.state.data,e,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=createRetryer({fn:u.fetchFn,abort:a?.abort.bind(a),onSuccess:e=>{var t,n,r,i;if(e===void 0){Y(Error(this.queryHash+` data is undefined`));return}this.setData(e),(t=(n=this.cache.config).onSuccess)==null||t.call(n,e,this),(r=(i=this.cache.config).onSettled)==null||r.call(i,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:Y,onFail:(e,t)=>{this.dispatch({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.dispatch({type:`pause`})},onContinue:()=>{this.dispatch({type:`continue`})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){let t=t=>{var n,r;switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:e.meta??null,fetchStatus:canFetch(this.options.networkMode)?`fetching`:`paused`,...!t.dataUpdatedAt&&{error:null,status:`loading`}};case`success`:return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:`success`,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};case`error`:let n=e.error;return isCancelledError(n)&&n.revert&&this.revertState?{...this.revertState,fetchStatus:`idle`}
30:{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:`idle`,status:`error`};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),notifyManager.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate(e)}),this.cache.notify({query:this,type:`updated`,action:e})})}};function getDefaultState$1(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`loading`,fetchStatus:`idle`}}var QueryCache=class extends Subscribable{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,n){var r;let i=t.queryKey,a=t.queryHash??hashQueryKeyByOptions(i,t),o=this.get(a);return o||(o=new Query({cache:this,logger:e.getLogger(),queryKey:i,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:`added`,query:e}))}remove(e){let t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter(t=>t!==e),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:`removed`,query:e}))}clear(){notifyManager.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){let[n]=parseFilterArgs(e,t);return n.exact===void 0&&(n.exact=!0),this.queries.find(e=>matchQuery(n,e))}findAll(e,t){let[n]=parseFilterArgs(e,t);return Object.keys(n).length>0?this.queries.filter(e=>matchQuery(n,e)):this.queries}
30notify(e){notifyManager.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}onFocus(){notifyManager.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){notifyManager.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}},Mutation=class extends Removable{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||defaultLogger,this.observers=[],this.state=e.state||getDefaultState(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:`setState`,state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(t=>t!==e),this.scheduleGc(),this.mutationCache.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status===`loading`?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return this.retryer?.continue()??this.execute()}async execute(){let e=()=>{var e;return this.retryer=createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject(`No mutationFn found`),onFail:(e,t)=>{this.dispatch({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.dispatch({type:`pause`})},onContinue:()=>{this.dispatch({type:`continue`})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},t=this.state.status===`loading`;try{var n,r,i,a,o,c,u,K;if(!t){var Y,X,ee,te;this.dispatch({type:`loading`,variables:this.options.variables}),await(X=this.mutationCache.config).onMutate?.call(X,this.state.variables,this);let e=await(te=this.options).onMutate?.call(te,this.state.variables);e!==this.state.context&&this.dispatch({type:`loading`,context:e,variables:this.state.variables})}let ce=await e();return await(r=this.mutationCache.config).onSuccess?.call(r,ce,this.state.variables,this.state.context,this),await(a=this.options).onSuccess?.call(a,ce,this.state.variables,this.state.context),await(c=this.mutationCache.config).onSettled?.call(c,ce,null,this.state.variables,this.state.context,this),await(K=this.options).onSettled?.call(K,ce,null,this.state.variables,this.state.context),this.dispatch({type:`success`,data:ce}),ce}catch(e){try{var ce,ue,de,fe,me,ge,Te,Oe;throw await(ue=this.mutationCache.config).onError?.call(ue,e,this.state.variables,this.state.context,this),await(fe=this.options).onError?.call(fe,e,this.state.variables,this.state.context),await(ge=this.mutationCache.config).onSettled?.call(ge,void 0,e,this.state.variables,this.state.context,this),await(Oe=this.options).onSettled?.call(Oe,void 0,e,this.state.variables,this.state.context),e}finally{this.dispatch({type:`error`,error:e})}}}dispatch(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`loading`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!canFetch(this.options.networkMode),status:`loading`,variables:e.variables};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`};case`setState`:return{...t,...e.state}}};this.state=t(this.state),notifyManager.batch(()=>{this.observers.forEach(t=>{t.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:`updated`,action:e})})}};function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0}}var MutationCache=class extends Subscribable{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,n){let r=new Mutation({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(r),r}add(e){this.mutations.push(e),this.notify({type:`added`,mutation:e})}remove(e){this.mutations=this.mutations.filter(t=>t!==e),this.notify({type:`removed`,mutation:e})}clear(){notifyManager.batch(()=>
30{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return e.exact===void 0&&(e.exact=!0),this.mutations.find(t=>matchMutation(e,t))}findAll(e){return this.mutations.filter(t=>matchMutation(e,t))}notify(e){notifyManager.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}resumePausedMutations(){var e;return this.resuming=(this.resuming??Promise.resolve()).then(()=>{let e=this.mutations.filter(e=>e.state.isPaused);return notifyManager.batch(()=>e.reduce((e,t)=>e.then(()=>t.continue().catch(noop$3)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}};function infiniteQueryBehavior(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,a,o;let c=e.fetchOptions?.meta?.refetchPage,u=e.fetchOptions?.meta?.fetchMore,K=u?.pageParam,Y=u?.direction===`forward`,X=u?.direction===`backward`,ee=e.state.data?.pages||[],te=e.state.data?.pageParams||[],ce=te,ue=!1,de=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>{var t;if((t=e.signal)!=null&&t.aborted)ue=!0;else{var n;(n=e.signal)==null||n.addEventListener(`abort`,()=>{ue=!0})}return e.signal}})},fe=e.options.queryFn||(()=>Promise.reject(`Missing queryFn for queryKey '`+e.options.queryHash+`'`)),me=(e,t,n,r)=>(ce=r?[t,...ce]:[...ce,t],r?[n,...e]:[...e,n]),ge=(t,n,r,i)=>{if(ue)return Promise.reject(`Cancelled`);if(r===void 0&&!n&&t.length)return Promise.resolve(t);let a={queryKey:e.queryKey,pageParam:r,meta:e.options.meta};de(a);let o=fe(a);return Promise.resolve(o).then(e=>me(t,r,e,i))},Te;if(!ee.length)Te=ge([]);else if(Y){let t=K!==void 0;Te=ge(ee,t,t?K:getNextPageParam(e.options,ee))}else if(X){let t=K!==void 0;Te=ge(ee,t,t?K:getPreviousPageParam(e.options,ee),!0)}else{ce=[];let t=e.options.getNextPageParam===void 0;Te=!(c&&ee[0])||c(ee[0],0,ee)?ge([],t,te[0]):Promise.resolve(me([],te[0],ee[0]));for(let n=1;n<ee.length;n++)Te=Te.then(r=>{if(!(c&&ee[n])||c(ee[n],n,ee)){let i=t?te[n]:getNextPageParam(e.options,r);return ge(r,t,i)}return Promise.resolve(me(r,te[n],ee[n]))})}return Te.then(e=>({pages:e,pageParams:ce}))}}}}function getNextPageParam(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function getPreviousPageParam(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}var QueryClient=class{constructor(e={}){this.queryCache=e.queryCache||new QueryCache,this.mutationCache=e.mutationCache||new MutationCache,this.logger=e.logger||defaultLogger,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=focusManager.subscribe(()=>{focusManager.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=onlineManager.subscribe(()=>{onlineManager.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,t;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(t=this.unsubscribeOnline)==null||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){let[n]=parseFilterArgs(e,t);return n.fetchStatus=`fetching`,this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return this.queryCache.find(e,t)?.state.data}ensureQueryData(e,t,n){let r=parseQueryArgs(e,t,n),i=this.getQueryData(r.queryKey);return i?Promise.resolve(i):this.fetchQuery(r)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.queryCache.find(e)?.state.data,i=functionalUpdate(t,r);if(i===void 0)return;let a=parseQueryArgs(e),o=this.defaultQueryOptions(a);return this.queryCache.build(this,o).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return notifyManager.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e,t){var n;return this.queryCache.find(e,t)?.state}removeQueries(e,t){let[n]=parseFilterArgs(e,t),r=this.queryCache;notifyManager.batch(()=>
30{r.findAll(n).forEach(e=>{r.remove(e)})})}resetQueries(e,t,n){let[r,i]=parseFilterArgs(e,t,n),a=this.queryCache,o={type:`active`,...r};return notifyManager.batch(()=>(a.findAll(r).forEach(e=>{e.reset()}),this.refetchQueries(o,i)))}cancelQueries(e,t,n){let[r,i={}]=parseFilterArgs(e,t,n);i.revert===void 0&&(i.revert=!0);let a=notifyManager.batch(()=>this.queryCache.findAll(r).map(e=>e.cancel(i)));return Promise.all(a).then(noop$3).catch(noop$3)}invalidateQueries(e,t,n){let[r,i]=parseFilterArgs(e,t,n);return notifyManager.batch(()=>{var e,t;if(this.queryCache.findAll(r).forEach(e=>{e.invalidate()}),r.refetchType===`none`)return Promise.resolve();let n={...r,type:r.refetchType??r.type??`active`};return this.refetchQueries(n,i)})}refetchQueries(e,t,n){let[r,i]=parseFilterArgs(e,t,n),a=notifyManager.batch(()=>this.queryCache.findAll(r).filter(e=>!e.isDisabled()).map(e=>{var t;return e.fetch(void 0,{...i,cancelRefetch:i?.cancelRefetch??!0,meta:{refetchPage:r.refetchPage}})})),o=Promise.all(a).then(noop$3);return i!=null&&i.throwOnError||(o=o.catch(noop$3)),o}fetchQuery(e,t,n){let r=parseQueryArgs(e,t,n),i=this.defaultQueryOptions(r);i.retry===void 0&&(i.retry=!1);let a=this.queryCache.build(this,i);return a.isStaleByTime(i.staleTime)?a.fetch(i):Promise.resolve(a.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(noop$3).catch(noop$3)}fetchInfiniteQuery(e,t,n){let r=parseQueryArgs(e,t,n);return r.behavior=infiniteQueryBehavior(),this.fetchQuery(r)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(noop$3).catch(noop$3)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){let n=this.queryDefaults.find(t=>hashQueryKey(e)===hashQueryKey(t.queryKey));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){return e?this.queryDefaults.find(t=>partialMatchKey(e,t.queryKey))?.defaultOptions:void 0}setMutationDefaults(e,t){let n=this.mutationDefaults.find(t=>hashQueryKey(e)===hashQueryKey(t.mutationKey));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){return e?this.mutationDefaults.find(t=>partialMatchKey(e,t.mutationKey))?.defaultOptions:void 0}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;let t={...this.defaultOptions.queries,...this.getQueryDefaults(e?.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=hashQueryKeyByOptions(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.useErrorBoundary===void 0&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e?.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}},QueryObserver=class extends Subscribable{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),shouldFetchOnMount(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){let n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),shallowEqualObjects(n,this.options)||this.client.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.currentQuery,observer:this}),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`)throw Error(`Expected enabled to be a boolean`);this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();let i=this.hasListeners();i&&shouldFetchOptionally(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==r||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();let a=this.computeRefetchInterval();i&&(this.currentQuery!==r||this.options.enabled!==n.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(e){let t=this.client.getQueryCache().build(this.client,e),n=this.createResult(t,e);return shouldAssignObserverCurrentProperties(this,n,e)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(e){let t={};return Object.keys(e).forEach(n=>{Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){let t=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,t);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(noop$3)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),isServer||this.currentResult.isStale||!isValidTimeout(this.options.staleTime))return;let e=timeUntilStale(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},e)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.currentResult.data,this.currentQuery):this.options.refetchInterval??!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!isServer&&this.options.enabled!==!1&&isValidTimeout(this.currentRefetchInterval)&&this.currentRefetchInterval!==0&&(this.refetchIntervalId=setInterval(()=>
30{(this.options.refetchIntervalInBackground||focusManager.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&=(clearTimeout(this.staleTimeoutId),void 0)}clearRefetchInterval(){this.refetchIntervalId&&=(clearInterval(this.refetchIntervalId),void 0)}createResult(e,t){let n=this.currentQuery,r=this.options,i=this.currentResult,a=this.currentResultState,o=this.currentResultOptions,c=e!==n,u=c?e.state:this.currentQueryInitialState,K=c?this.currentResult:this.previousQueryResult,{state:Y}=e,{dataUpdatedAt:X,error:ee,errorUpdatedAt:te,fetchStatus:ce,status:ue}=Y,de=!1,fe=!1,me;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&shouldFetchOnMount(e,t),o=i&&shouldFetchOptionally(e,n,t,r);(a||o)&&(ce=canFetch(e.options.networkMode)?`fetching`:`paused`,X||(ue=`loading`)),t._optimisticResults===`isRestoring`&&(ce=`idle`)}if(t.keepPreviousData&&!Y.dataUpdatedAt&&K!=null&&K.isSuccess&&ue!==`error`)me=K.data,X=K.dataUpdatedAt,ue=K.status,de=!0;else if(t.select&&Y.data!==void 0){if(i&&Y.data===a?.data&&t.select===this.selectFn)me=this.selectResult;else try{this.selectFn=t.select,me=t.select(Y.data),me=replaceData(i?.data,me,t),this.selectResult=me,this.selectError=null}catch(e){this.selectError=e}}else me=Y.data;if(t.placeholderData!==void 0&&me===void 0&&ue===`loading`){let e;if(i!=null&&i.isPlaceholderData&&t.placeholderData===o?.placeholderData)e=i.data;else if(e=typeof t.placeholderData==`function`?t.placeholderData():t.placeholderData,t.select&&e!==void 0)try{e=t.select(e),this.selectError=null}catch(e){this.selectError=e}e!==void 0&&(ue=`success`,me=replaceData(i?.data,e,t),fe=!0)}this.selectError&&(ee=this.selectError,me=this.selectResult,te=Date.now(),ue=`error`);let ge=ce===`fetching`,Te=ue===`loading`,Oe=ue===`error`;return{status:ue,fetchStatus:ce,isLoading:Te,isSuccess:ue===`success`,isError:Oe,isInitialLoading:Te&&ge,data:me,dataUpdatedAt:X,error:ee,errorUpdatedAt:te,failureCount:Y.fetchFailureCount,failureReason:Y.fetchFailureReason,errorUpdateCount:Y.errorUpdateCount,isFetched:Y.dataUpdateCount>0||Y.errorUpdateCount>0,isFetchedAfterMount:Y.dataUpdateCount>u.dataUpdateCount||Y.errorUpdateCount>u.errorUpdateCount,isFetching:ge,isRefetching:ge&&!Te,isLoadingError:Oe&&Y.dataUpdatedAt===0,isPaused:ce===`paused`,isPlaceholderData:fe,isPreviousData:de,isRefetchError:Oe&&Y.dataUpdatedAt!==0,isStale:isStale(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){let t=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,shallowEqualObjects(n,t))return;this.currentResult=n;let r={cache:!0};e?.listeners!==!1&&(()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,n=typeof e==`function`?e():e;if(n===`all`||!n&&!this.trackedProps.size)return!0;let r=new Set(n??this.trackedProps);return this.options.useErrorBoundary&&r.add(`error`),Object.keys(this.currentResult).some(e=>{let n=e;return this.currentResult[n]!==t[n]&&r.has(n)})})()&&(r.listeners=!0),this.notify({...r,...e})}updateQuery(){let e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;let t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){let t={};e.type===`success`?t.onSuccess=!e.manual:e.type===`error`&&!isCancelledError(e.error)&&(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}
30notify(e){notifyManager.batch(()=>{if(e.onSuccess){var t,n,r,i;(t=(n=this.options).onSuccess)==null||t.call(n,this.currentResult.data),(r=(i=this.options).onSettled)==null||r.call(i,this.currentResult.data,null)}else if(e.onError){var a,o,c,u;(a=(o=this.options).onError)==null||a.call(o,this.currentResult.error),(c=(u=this.options).onSettled)==null||c.call(u,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:e})=>{e(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:`observerResultsUpdated`})})}};function shouldLoadOnMount(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&(e.state.status!==`error`||t.retryOnMount!==!1)}function shouldFetchOnMount(e,t){return shouldLoadOnMount(e,t)||e.state.dataUpdatedAt>0&&shouldFetchOn(e,t,t.refetchOnMount)}function shouldFetchOn(e,t,n){if(t.enabled!==!1){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&isStale(e,t)}return!1}function shouldFetchOptionally(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!==`error`)&&isStale(e,n)}function isStale(e,t){return e.isStaleByTime(t.staleTime)}function shouldAssignObserverCurrentProperties(e,t,n){return n.keepPreviousData?!1:n.placeholderData===void 0?!shallowEqualObjects(e.getCurrentResult(),t):t.isPlaceholderData}var MutationObserver$1=class extends Subscribable{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;let n=this.options;this.options=this.client.defaultMutationOptions(e),shallowEqualObjects(n,this.options)||this.client.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.currentMutation,observer:this}),(t=this.currentMutation)==null||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();let t={listeners:!0};e.type===`success`?t.onSuccess=!0:e.type===`error`&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:e===void 0?this.options.variables:e}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){let e=this.currentMutation?this.currentMutation.state:getDefaultState(),t=e.status===`loading`,n={...e,isLoading:t,isPending:t,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset};this.currentResult=n}
30notify(e){notifyManager.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var t,n,r,i;(t=(n=this.mutateOptions).onSuccess)==null||t.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(r=(i=this.mutateOptions).onSettled)==null||r.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var a,o,c,u;(a=(o=this.mutateOptions).onError)==null||a.call(o,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(c=(u=this.mutateOptions).onSettled)==null||c.call(u,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:e})=>{e(this.currentResult)})})}},useSyncExternalStore=import_shim$2.useSyncExternalStore,defaultContext=import_react.createContext(void 0),QueryClientSharingContext=import_react.createContext(!1);function getQueryClientContext(e,t){return e||(t&&typeof window<`u`?(window.ReactQueryClientContext||(window.ReactQueryClientContext=defaultContext),window.ReactQueryClientContext):defaultContext)}var useQueryClient=({context:e}={})=>{let t=import_react.useContext(getQueryClientContext(e,import_react.useContext(QueryClientSharingContext)));if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},QueryClientProvider=({client:e,children:t,context:n,contextSharing:r=!1})=>{import_react.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);let i=getQueryClientContext(n,r);return import_react.createElement(QueryClientSharingContext.Provider,{value:!n&&r},import_react.createElement(i.Provider,{value:e},t))},IsRestoringContext=import_react.createContext(!1),useIsRestoring=()=>import_react.useContext(IsRestoringContext),IsRestoringProvider=IsRestoringContext.Provider;function createValue(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var QueryErrorResetBoundaryContext=import_react.createContext(createValue()),useQueryErrorResetBoundary=()=>import_react.useContext(QueryErrorResetBoundaryContext);function shouldThrowError(e,t){return typeof e==`function`?e(...t):!!e}var ensurePreventErrorBoundaryRetry=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},useClearResetErrorBoundary=e=>{import_react.useEffect(()=>{e.clearReset()},[e])},getHasError=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&shouldThrowError(n,[e.error,r]),ensureStaleTime=e=>{e.suspense&&typeof e.staleTime!=`number`&&(e.staleTime=1e3)},willFetch=(e,t)=>e.isLoading&&e.isFetching&&!t,shouldSuspend=(e,t,n)=>e?.suspense&&willFetch(t,n),fetchOptimistic=(e,t,n)=>t.fetchOptimistic(e).then(({data:t})=>{e.onSuccess==null||e.onSuccess(t),e.onSettled==null||e.onSettled(t,null)}).catch(t=>{n.clearReset(),e.onError==null||e.onError(t),e.onSettled==null||e.onSettled(void 0,t)});function useBaseQuery(e,t){let n=useQueryClient({context:e.context}),r=useIsRestoring(),i=useQueryErrorResetBoundary(),a=n.defaultQueryOptions(e);a._optimisticResults=r?`isRestoring`:`optimistic`,a.onError&&=notifyManager.batchCalls(a.onError),a.onSuccess&&=notifyManager.batchCalls(a.onSuccess),a.onSettled&&=notifyManager.batchCalls(a.onSettled),ensureStaleTime(a),ensurePreventErrorBoundaryRetry(a,i),useClearResetErrorBoundary(i);let[o]=import_react.useState(()=>new t(n,a)),c=o.getOptimisticResult(a);if(useSyncExternalStore(import_react.useCallback(e=>{let t=r?()=>void 0:o.subscribe(notifyManager.batchCalls(e));return o.updateResult(),t},[o,r]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),import_react.useEffect(()=>{o.setOptions(a,{listeners:!1})},[a,o]),shouldSuspend(a,c,r))throw fetchOptimistic(a,o,i);if(getHasError({result:c,errorResetBoundary:i,useErrorBoundary:a.useErrorBoundary,query:o.getCurrentQuery()}))throw c.error;return a.notifyOnChangeProps?c:o.trackResult(c)}function useQuery(e,t,n){return useBaseQuery(parseQueryArgs(e,t,n),QueryObserver)}function useIsFetching(e,t,n){let[r,i={}]=parseFilterArgs(e,t,n),a=useQueryClient({context:i.context}),o=a.getQueryCache();return useSyncExternalStore(import_react.useCallback(e=>o.subscribe(notifyManager.batchCalls(e)),[o]),()=>a.isFetching(r),()=>a.isFetching(r))}function useIsMutating(e,t,n){let[r,i={}]=parseMutationFilterArgs(e,t,n),a=useQueryClient({context:i.context}),o=a.getMutationCache();return useSyncExternalStore(import_react.useCallback(e=>o.subscribe(notifyManager.batchCalls(e)),[o]),()=>a.isMutating(r),()=>a.isMutating(r))}function useMutation(e,t,n){let r=parseMutationArgs(e,t,n),i=useQueryClient({context:r.context}),[a]=import_react.useState(()=>new MutationObserver$1(i,r));import_react.useEffect(()=>{a.setOptions(r)},[a,r]);let o=useSyncExternalStore(import_react.useCallback(e=>a.subscribe(notifyManager.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),c=import_react.useCallback((e,t)=>{a.mutate(e,t).catch(noop$2)},[a]);if(o.error&&shouldThrowError(a.options.useErrorBoundary,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}function noop$2(){}var executeSnippet=function(){var e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).wnd,t=e===void 0?window:e;
30(function(e,t,n,r,i,a,o,c){if(!function(t){return t in e?(e.console&&e.console.log&&e.console.log(`FullStory namespace conflict. Please set window["_fs_namespace"].`),!1):!0}(n))return;function u(e){var t=[],n;function r(){n&&(t.forEach(function(e){var t;try{t=e[n[0]]&&e[n[0]](n[1])}catch(t){e[3]&&e[3](t);return}t&&t.then?t.then(e[2],e[3]):e[2]&&e[2](t)}),t.length=0)}function i(e){return function(t){n||(n=[e,t],r())}}e(i(0),i(1));function a(e,n){return u(function(i,a){t.push([e,n,i,a]),r()})}return{then:a}}o=e[n]=function(){var e=function(e,n,r,i){i||=2;function a(a,o){t(e,n,r,a,o,i)}var o=/Async$/;if(o.test(e))return e=e.replace(o,``),typeof Promise==`function`?new Promise(a):u(a);var c;return t(e,n,r,c,c,i)};function t(t,n,r,i,a,o){return e._api?e._api(t,n,r,i,a,o):(e.q&&e.q.push([t,n,r,i,a,o]),null)}return e.q=[],e}(),c=function(){return function(e){function t(t){typeof t[4]==`function`&&t[4](Error(e))}var n=o.q;if(n){for(var r=0;r<n.length;r++)t(n[r]);n.length=0,n.push=t}}}(),(function(){a=t.createElement(r),a.async=!0,a.crossOrigin=`anonymous`,a.src=`https://`+i,a.onerror=function(){c(`Error loading `+i)};var e=t.getElementsByTagName(r)[0];e&&e.parentNode?e.parentNode.insertBefore(a,e):t.head.appendChild(a)})(),(function(){function e(){}function t(e,t,n){o(e,t,n,1)}function n(e,n,r){t(`setProperties`,{type:e,properties:n},r)}function r(e,t){n(`user`,e,t)}function i(e,t,n){r({uid:e},n),t&&r(t,n)}o.identify=i,o.setUserVars=r,o.identifyAccount=e,o.clearUserCookie=e,o.setVars=n,o.event=function(e,n,r){t(`trackEvent`,{name:e,properties:n},r)},o.anonymize=function(){i(!1)},o.shutdown=function(){t(`shutdown`)},o.restart=function(){t(`restart`)},o.log=function(e,n){t(`log`,{level:e,msg:n})},o.consent=function(e){t(`setIdentity`,{consent:!arguments.length||e})}})(),(function(){var t=`fetch`,n=`XMLHttpRequest`;o._w={},o._w[n]=e[n],o._w[t]=e[t],e[t]&&(e[t]=function(){return o._w[t].apply(this,arguments)})})(),o._v=`2.0.0`})(t,t.document,t._fs_namespace,`script`,t._fs_script)},getDocumentVar=function(e){return e===`window`?`document`:`${e}.document`},toV1String=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.shouldInsertScript,n=t===void 0||t,r=e.globalVar,i=r===void 0?`window`:r,a=e.apiVersion;return`(function(m,n,e,t,l,o,g,y){
31    if (e in m) {if(m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].');} return;}
32    g=m[e]=function(a,b,s){g.q?g.q.push([a,b,s]):g._api(a,b,s);};g.q=[];${n?`
33    o=n.createElement(t);o.async=1;o.crossOrigin='anonymous';o.src='https://'+_fs_script;
34    y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y);`:``}
35    g.identify=function(i,v,s){g(l,{uid:i},s);if(v)g(l,v,s)};g.setUserVars=function(v,s){g(l,v,s)};g.event=function(i,v,s){g('event',{n:i,p:v},s)};
36    g.anonymize=function(){g.identify(!!0)};
37    g.shutdown=function(){g("rec",!1)};g.restart=function(){g("rec",!0)};
38    g.log = function(a,b){g("log",[a,b])};
39    g.consent=function(a){g("consent",!arguments.length||a)};
40    g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};
41    g.clearUserCookie=function(){};
42    g.setVars=function(n, p){g('setVars',[n,p]);};
43    g._w={};y='XMLHttpRequest';g._w[y]=m[y];y='fetch';g._w[y]=m[y];
44    if(m[y])m[y]=function(){return g._w[y].apply(this,arguments)};
45    g._v="${a===void 0?`1.3.0`:a}";
46})(${i},${getDocumentVar(i)},${i}['_fs_namespace'],'script','user');`},initFS=function(e){var t=e.orgId,n=e.namespace,r=n===void 0?`FS`:n,i=e.host,a=i===void 0?`fullstory.com`:i,o=e.script,c=o===void 0?`edge.fullstory.com/s/fs.js`:o;if(!t)throw Error(`FullStory orgId is a required parameter`);window._fs_host=a,window._fs_script=c,window._fs_org=t,window._fs_namespace=r,executeSnippet()},SnippetSrcV1=toV1String(),__assign=function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)},getFullStory=function(){if(window._fs_namespace)return window[window._fs_namespace]},ensureSnippetLoaded=function(){var e=getFullStory();if(!e)throw Error(`FullStory is not loaded, please ensure the init function is invoked before calling FullStory API functions`);return e},_init=function(e,t){var n=__assign({},e);if(getFullStory()){console.warn(`The FullStory snippet has already been defined elsewhere (likely in the <head> element)`);return}n.recordCrossDomainIFrames&&(window._fs_run_in_iframe=!0),n.appHost&&(window._fs_app_host=n.appHost),n.assetMapId&&(window._fs_asset_map_id=n.assetMapId),n.startCaptureManually&&(window._fs_capture_on_startup=!1),n.recordOnlyThisIFrame&&(window._fs_is_outer_script=!0),n.cookieDomain&&(window._fs_cookie_domain=n.cookieDomain),n.debug===!0&&(n.script?console.warn("Ignoring `debug = true` because `script` is set"):n.script=`edge.fullstory.com/s/fs-debug.js`),initFS(n);var r=getFullStory();if(!r){console.warn(`Failed to initialize FS snippet`);return}if(t&&r(`observe`,{type:`start`,callback:t}),n.devMode===!0){var i=`FullStory was initialized in devMode and will stop recording`;r(`trackEvent`,{name:`FullStory Dev Mode`,properties:{message:i}}),r(`shutdown`),window._fs_dev_mode=!0,console.warn(i)}},initOnce=function(e){return function(t,n){if(window._fs_initialized){e&&console.warn(e);return}_init(t,n),window._fs_initialized=!0}},init=initOnce(`FullStory init has already been called once, additional invocations are ignored`),isInitialized=function(){return!!window._fs_initialized},hasFullStoryWithFunction=function(){var e=[...arguments],t=ensureSnippetLoaded();return e.every(function(e){return t[e]})},guard=function(e){return function(){var t=[...arguments];if(window._fs_dev_mode){var n=`FullStory is in dev mode and is not capturing: ${e} method not executed`;return console.warn(n),n}
vendor: 6,055 bytes, line 46
46var r=getFullStory();return hasFullStoryWithFunction(e)&&r?r[e].apply(r,t):(console.warn(`FS.${e} not ready`),null)}},buildFullStoryShim=function(){var e=function(e,t,n){var r=ensureSnippetLoaded();if(window._fs_dev_mode){var i=`FullStory is in dev mode and is not capturing: ${e} not executed`;console.warn(i);return}return r(e,t,n)};return e.anonymize=guard(`anonymize`),e.consent=guard(`consent`),e.disableConsole=guard(`disableConsole`),e.enableConsole=guard(`enableConsole`),e.event=guard(`event`),e.getCurrentSessionURL=guard(`getCurrentSessionURL`),e.identify=guard(`identify`),e.log=guard(`log`),e.restart=guard(`restart`),e.setUserVars=guard(`setUserVars`),e.setVars=guard(`setVars`),e.shutdown=guard(`shutdown`),e},FullStory=buildFullStoryShim(),isCheckBoxInput=e=>e.type===`checkbox`,isDateObject=e=>e instanceof Date,isNullOrUndefined=e=>e==null,isObjectType=e=>typeof e==`object`,isObject$5=e=>!isNullOrUndefined(e)&&!Array.isArray(e)&&isObjectType(e)&&!isDateObject(e),getEventValue=e=>isObject$5(e)&&e.target?isCheckBoxInput(e.target)?e.target.checked:e.target.value:e,getNodeParentName=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,isNameInFieldArray=(e,t)=>e.has(getNodeParentName(t)),isPlainObject$5=e=>{let t=e.constructor&&e.constructor.prototype;return isObject$5(t)&&t.hasOwnProperty(`isPrototypeOf`)},isWeb=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function cloneObject(e){let t,n=Array.isArray(e),r=typeof FileList<`u`&&e instanceof FileList;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(isWeb&&(e instanceof Blob||r))&&(n||isObject$5(e))){if(t=n?[]:{},!n&&!isPlainObject$5(e))t=e;else for(let n in e)e.hasOwnProperty(n)&&(t[n]=cloneObject(e[n]))}else return e;return t}var compact=e=>Array.isArray(e)?e.filter(Boolean):[],isUndefined$1=e=>e===void 0,get$2=(e,t,n)=>{if(!t||!isObject$5(e))return n;let r=compact(t.split(/[,[\].]+?/)).reduce((e,t)=>isNullOrUndefined(e)?e:e[t],e);return isUndefined$1(r)||r===e?isUndefined$1(e[t])?n:e[t]:r},isBoolean$1=e=>typeof e==`boolean`,isKey=e=>/^\w*$/.test(e),stringToPath$1=e=>compact(e.replace(/["|']|\]/g,``).split(/\.|\[/)),set$2=(e,t,n)=>{let r=-1,i=isKey(t)?[t]:stringToPath$1(t),a=i.length,o=a-1;for(;++r<a;){let t=i[r],a=n;if(r!==o){let n=e[t];a=isObject$5(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if(t===`__proto__`||t===`constructor`||t===`prototype`)return;e[t]=a,e=e[t]}},EVENTS={BLUR:`blur`,FOCUS_OUT:`focusout`,CHANGE:`change`},VALIDATION_MODE={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},INPUT_VALIDATION_RULES={max:`max`,min:`min`,maxLength:`maxLength`,minLength:`minLength`,pattern:`pattern`,required:`required`,validate:`validate`},HookFormContext=import_react.createContext(null),useFormContext=()=>import_react.useContext(HookFormContext),FormProvider=e=>{let{children:t,...n}=e;return import_react.createElement(HookFormContext.Provider,{value:n},t)},getProxyFormState=(e,t,n,r=!0)=>{let i={defaultValues:t._defaultValues};for(let a in e)Object.defineProperty(i,a,{get:()=>{let i=a;return t._proxyFormState[i]!==VALIDATION_MODE.all&&(t._proxyFormState[i]=!r||VALIDATION_MODE.all),n&&(n[i]=!0),e[i]}});return i};function useFormState(e){let t=useFormContext(),{control:n=t.control,disabled:r,name:i,exact:a}=e||{},[o,c]=import_react.useState(n._formState),u=import_react.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),K=import_react.useRef(i);return K.current=i,import_react.useEffect(()=>n._subscribe({name:K.current,formState:u.current,exact:a,callback:e=>{!r&&c({...n._formState,...e})}}),[n,r,a]),import_react.useEffect(()=>{u.current.isValid&&n._setValid(!0)},[n]),import_react.useMemo(()=>getProxyFormState(o,n,u.current,!1),[o,n])}var isString$5=e=>typeof e==`string`,generateWatchOutput=(e,t,n,r,i)=>isString$5(e)?(r&&t.watch.add(e),get$2(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),get$2(n,e))):(r&&(t.watchAll=!0),n);function useWatch(e){let t=useFormContext(),{control:n=t.control,name:r,defaultValue:i,disabled:a,exact:o}=e||{},c=import_react.useRef(r),u=import_react.useRef(i);c.current=r,import_react.useEffect(()=>n._subscribe({name:c.current,formState:{values:!0},exact:o,callback:e=>!a&&Y(generateWatchOutput(c.current,n._names,e.values||n._formValues,!1,u.current))}),[n,a,o]);let[K,Y]=import_react.useState(n._getWatch(r,i));return import_react.useEffect(()=>n._removeUnmounted()),K}function useController(e){let t=useFormContext(),{name:n,disabled:r,control:i=t.control,shouldUnregister:a}=e,o=isNameInFieldArray(i._names.array,n),c=useWatch({control:i,name:n,defaultValue:get$2(i._formValues,n,get$2(i._defaultValues,n,e.defaultValue)),exact:!0}),u=useFormState({control:i,name:n,exact:!0}),K=import_react.useRef(e),Y=import_react.useRef(i.register(n,{...e.rules,value:c,...isBoolean$1(e.disabled)?{disabled:e.disabled}:{}})),X=import_react.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!get$2(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!get$2(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!get$2(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!get$2(u.validatingFields,n)},error:{enumerable:!0,get:()=>get$2(u.errors,n)}}),[u,n]),ee=import_react.useCallback(e=>Y.current.onChange({target:{value:getEventValue(e),name:n},type:EVENTS.CHANGE}),[n]),te=import_react.useCallback(()=>Y.current.onBlur({target:{value:get$2(i._formValues,n),name:n},type:EVENTS.BLUR}),[n,i._formValues]),ce=import_react.useCallback(e=>{let t=get$2(i._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})},[i._fields,n]),ue=import_react.useMemo(()=>({name:n,value:c,...isBoolean$1(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:ee,onBlur:te,ref:ce}),[n,r,u.disabled,ee,te,ce,c]);return import_react.useEffect(()=>{let e=i._options.shouldUnregister||a;i.register(n,{...K.current.rules,...isBoolean$1(K.current.disabled)?{disabled:K.
vendor: 5,286 bytes, line 46
46current.disabled}:{}});let t=(e,t)=>{let n=get$2(i._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){let e=cloneObject(get$2(i._options.defaultValues,n));set$2(i._defaultValues,n,e),isUndefined$1(get$2(i._formValues,n))&&set$2(i._formValues,n,e)}return!o&&i.register(n),()=>{(o?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}},[n,i,o,a]),import_react.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),import_react.useMemo(()=>({field:ue,formState:u,fieldState:X}),[ue,u,X])}var appendErrors=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},convertToArrayPayload=e=>Array.isArray(e)?e:[e],createSubject=()=>{let e=[];return{get observers(){return e},next:t=>{for(let n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},isPrimitive=e=>isNullOrUndefined(e)||!isObjectType(e);function deepEqual$1(e,t){if(isPrimitive(e)||isPrimitive(t))return e===t;if(isDateObject(e)&&isDateObject(t))return e.getTime()===t.getTime();let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n){let n=e[i];if(!r.includes(i))return!1;if(i!==`ref`){let e=t[i];if(isDateObject(n)&&isDateObject(e)||isObject$5(n)&&isObject$5(e)||Array.isArray(n)&&Array.isArray(e)?!deepEqual$1(n,e):n!==e)return!1}}return!0}var isEmptyObject$2=e=>isObject$5(e)&&!Object.keys(e).length,isFileInput=e=>e.type===`file`,isFunction$5=e=>typeof e==`function`,isHTMLElement=e=>{if(!isWeb)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},isMultipleSelect=e=>e.type===`select-multiple`,isRadioInput=e=>e.type===`radio`,isRadioOrCheckbox=e=>isRadioInput(e)||isCheckBoxInput(e),live=e=>isHTMLElement(e)&&e.isConnected;function baseGet(e,t){let n=t.slice(0,-1).length,r=0;for(;r<n;)e=isUndefined$1(e)?r++:e[t[r++]];return e}function isEmptyArray$1(e){for(let t in e)if(e.hasOwnProperty(t)&&!isUndefined$1(e[t]))return!1;return!0}function unset(e,t){let n=Array.isArray(t)?t:isKey(t)?[t]:stringToPath$1(t),r=n.length===1?e:baseGet(e,n),i=n.length-1,a=n[i];return r&&delete r[a],i!==0&&(isObject$5(r)&&isEmptyObject$2(r)||Array.isArray(r)&&isEmptyArray$1(r))&&unset(e,n.slice(0,-1)),e}var objectHasFunction=e=>{for(let t in e)if(isFunction$5(e[t]))return!0;return!1};function markFieldsDirty(e,t={}){let n=Array.isArray(e);if(isObject$5(e)||n)for(let n in e)Array.isArray(e[n])||isObject$5(e[n])&&!objectHasFunction(e[n])?(t[n]=Array.isArray(e[n])?[]:{},markFieldsDirty(e[n],t[n])):isNullOrUndefined(e[n])||(t[n]=!0);return t}function getDirtyFieldsFromDefaultValues(e,t,n){let r=Array.isArray(e);if(isObject$5(e)||r)for(let r in e)Array.isArray(e[r])||isObject$5(e[r])&&!objectHasFunction(e[r])?isUndefined$1(t)||isPrimitive(n[r])?n[r]=Array.isArray(e[r])?markFieldsDirty(e[r],[]):{...markFieldsDirty(e[r])}:getDirtyFieldsFromDefaultValues(e[r],isNullOrUndefined(t)?{}:t[r],n[r]):n[r]=!deepEqual$1(e[r],t[r]);return n}var getDirtyFields=(e,t)=>getDirtyFieldsFromDefaultValues(e,t,markFieldsDirty(t)),defaultResult={value:!1,isValid:!1},validResult={value:!0,isValid:!0},getCheckboxValue=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!isUndefined$1(e[0].attributes.value)?isUndefined$1(e[0].value)||e[0].value===``?validResult:{value:e[0].value,isValid:!0}:validResult:defaultResult}return defaultResult},getFieldValueAs=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>isUndefined$1(e)?e:t?e===``?NaN:e&&+e:n&&isString$5(e)?new Date(e):r?r(e):e,defaultReturn={isValid:!1,value:null},getRadioValue=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,defaultReturn):defaultReturn;function getFieldValue(e){let t=e.ref;return isFileInput(t)?t.files:isRadioInput(t)?getRadioValue(e.refs).value:isMultipleSelect(t)?[...t.selectedOptions].map(({value:e})=>e):isCheckBoxInput(t)?getCheckboxValue(e.refs).value:getFieldValueAs(isUndefined$1(t.value)?e.ref.value:t.value,e)}var getResolverOptions=(e,t,n,r)=>{let i={};for(let n of e){let e=get$2(t,n);e&&set$2(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},isRegex=e=>e instanceof RegExp,getRuleValue=e=>isUndefined$1(e)?e:isRegex(e)?e.source:isObject$5(e)?isRegex(e.value)?e.value.source:e.value:e,getValidationModes=e=>({isOnSubmit:!e||e===VALIDATION_MODE.onSubmit,isOnBlur:e===VALIDATION_MODE.onBlur,isOnChange:e===VALIDATION_MODE.onChange,isOnAll:e===VALIDATION_MODE.all,isOnTouch:e===VALIDATION_MODE.onTouched}),ASYNC_FUNCTION=`AsyncFunction`,hasPromiseValidation=e=>!!e&&!!e.validate&&!!(isFunction$5(e.validate)&&e.validate.constructor.name===ASYNC_FUNCTION||isObject$5(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===ASYNC_FUNCTION)),hasValidation=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),isWatched=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))),iterateFieldsByAction=(e,t,n,r)=>{for(let i of n||Object.keys(e)){let n=get$2(e,i);if(n){let{_f:e,...a}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r||e.ref&&t(e.ref,e.name)&&!r)return!0;
vendor: 6,067 bytes, line 46
46if(iterateFieldsByAction(a,t))break}else if(isObject$5(a)&&iterateFieldsByAction(a,t))break}}};function schemaErrorLookup(e,t,n){let r=get$2(e,n);if(r||isKey(n))return{error:r,name:n};let i=n.split(`.`);for(;i.length;){let r=i.join(`.`),a=get$2(t,r),o=get$2(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};i.pop()}return{name:n}}var shouldRenderFormState=(e,t,n,r)=>{n(e);let{name:i,...a}=e;return isEmptyObject$2(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!r||VALIDATION_MODE.all))},shouldSubscribeByName=(e,t,n)=>!e||!t||e===t||convertToArrayPayload(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),skipValidation=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e,unsetEmptyArray=(e,t)=>!compact(get$2(e,t)).length&&unset(e,t),updateFieldArrayRootError=(e,t,n)=>{let r=convertToArrayPayload(get$2(e,n));return set$2(r,`root`,t[n]),set$2(e,n,r),e},isMessage=e=>isString$5(e);function getValidateError(e,t,n=`validate`){if(isMessage(e)||Array.isArray(e)&&e.every(isMessage)||isBoolean$1(e)&&!e)return{type:n,message:isMessage(e)?e:``,ref:t}}var getValueAndMessage=e=>isObject$5(e)&&!isRegex(e)?e:{value:e,message:``},validateField=async(e,t,n,r,i,a)=>{let{ref:o,refs:c,required:u,maxLength:K,minLength:Y,min:X,max:ee,pattern:te,validate:ce,name:ue,valueAsNumber:de,mount:fe}=e._f,me=get$2(n,ue);if(!fe||t.has(ue))return{};let ge=c?c[0]:o,Te=e=>{i&&ge.reportValidity&&(ge.setCustomValidity(isBoolean$1(e)?``:e||``),ge.reportValidity())},Oe={},Ae=isRadioInput(o),ze=isCheckBoxInput(o),qe=Ae||ze,Ye=(de||isFileInput(o))&&isUndefined$1(o.value)&&isUndefined$1(me)||isHTMLElement(o)&&o.value===``||me===``||Array.isArray(me)&&!me.length,Ze=appendErrors.bind(null,ue,r,Oe),Qe=(e,t,n,r=INPUT_VALIDATION_RULES.maxLength,i=INPUT_VALIDATION_RULES.minLength)=>{let a=e?t:n;Oe[ue]={type:e?r:i,message:a,ref:o,...Ze(e?r:i,a)}};if(a?!Array.isArray(me)||!me.length:u&&(!qe&&(Ye||isNullOrUndefined(me))||isBoolean$1(me)&&!me||ze&&!getCheckboxValue(c).isValid||Ae&&!getRadioValue(c).isValid)){let{value:e,message:t}=isMessage(u)?{value:!!u,message:u}:getValueAndMessage(u);if(e&&(Oe[ue]={type:INPUT_VALIDATION_RULES.required,message:t,ref:ge,...Ze(INPUT_VALIDATION_RULES.required,t)},!r))return Te(t),Oe}if(!Ye&&(!isNullOrUndefined(X)||!isNullOrUndefined(ee))){let e,t,n=getValueAndMessage(ee),i=getValueAndMessage(X);if(!isNullOrUndefined(me)&&!isNaN(me)){let r=o.valueAsNumber||me&&+me;isNullOrUndefined(n.value)||(e=r>n.value),isNullOrUndefined(i.value)||(t=r<i.value)}else{let r=o.valueAsDate||new Date(me),a=e=>new Date(new Date().toDateString()+` `+e),c=o.type==`time`,u=o.type==`week`;isString$5(n.value)&&me&&(e=c?a(me)>a(n.value):u?me>n.value:r>new Date(n.value)),isString$5(i.value)&&me&&(t=c?a(me)<a(i.value):u?me<i.value:r<new Date(i.value))}if((e||t)&&(Qe(!!e,n.message,i.message,INPUT_VALIDATION_RULES.max,INPUT_VALIDATION_RULES.min),!r))return Te(Oe[ue].message),Oe}if((K||Y)&&!Ye&&(isString$5(me)||a&&Array.isArray(me))){let e=getValueAndMessage(K),t=getValueAndMessage(Y),n=!isNullOrUndefined(e.value)&&me.length>+e.value,i=!isNullOrUndefined(t.value)&&me.length<+t.value;if((n||i)&&(Qe(n,e.message,t.message),!r))return Te(Oe[ue].message),Oe}if(te&&!Ye&&isString$5(me)){let{value:e,message:t}=getValueAndMessage(te);if(isRegex(e)&&!me.match(e)&&(Oe[ue]={type:INPUT_VALIDATION_RULES.pattern,message:t,ref:o,...Ze(INPUT_VALIDATION_RULES.pattern,t)},!r))return Te(t),Oe}if(ce){if(isFunction$5(ce)){let e=getValidateError(await ce(me,n),ge);if(e&&(Oe[ue]={...e,...Ze(INPUT_VALIDATION_RULES.validate,e.message)},!r))return Te(e.message),Oe}else if(isObject$5(ce)){let e={};for(let t in ce){if(!isEmptyObject$2(e)&&!r)break;let i=getValidateError(await ce[t](me,n),ge,t);i&&(e={...i,...Ze(t,i.message)},Te(i.message),r&&(Oe[ue]=e))}if(!isEmptyObject$2(e)&&(Oe[ue]={ref:ge,...e},!r))return Oe}}return Te(!0),Oe},defaultOptions={mode:VALIDATION_MODE.onSubmit,reValidateMode:VALIDATION_MODE.onChange,shouldFocusError:!0};function createFormControl(e={}){let t={...defaultOptions,...e},n={submitCount:0,isDirty:!1,isLoading:isFunction$5(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=(isObject$5(t.defaultValues)||isObject$5(t.values))&&cloneObject(t.values||t.defaultValues)||{},a=t.shouldUnregister?{}:cloneObject(i),o={action:!1,mount:!1,watch:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},u,K=0,Y={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},X={...Y},ee={array:createSubject(),state:createSubject()},te=getValidationModes(t.mode),ce=getValidationModes(t.reValidateMode),ue=t.criteriaMode===VALIDATION_MODE.all,de=e=>t=>{clearTimeout(K),K=setTimeout(e,t)},fe=async e=>{if(!t.disabled&&(Y.isValid||X.isValid||e)){let e=t.resolver?isEmptyObject$2((await Ye()).errors):await Qe(r,!0);e!==n.isValid&&ee.state.next({isValid:e})}},me=(e,r)=>{!t.disabled&&(Y.isValidating||Y.validatingFields||X.isValidating||X.validatingFields)&&((e||Array.from(c.mount)).forEach(e=>{e&&(r?set$2(n.validatingFields,e,r):unset(n.validatingFields,e))}),ee.state.next({validatingFields:n.validatingFields,isValidating:!isEmptyObject$2(n.validatingFields)}))},ge=(e,c=[],u,K,te=!0,ce=!0)=>{if(K&&u&&!t.disabled){if(o.action=!0,ce&&Array.isArray(get$2(r,e))){let t=u(get$2(r,e),K.argA,K.argB);te&&set$2(r,e,t)}if(ce&&Array.isArray(get$2(n.errors,e))){let t=u(get$2(n.errors,e),K.argA,K.argB);te&&set$2(n.errors,e,t),unsetEmptyArray(n.errors,e)}if((Y.touchedFields||X.touchedFields)&&ce&&Array.isArray(get$2(n.touchedFields,e))){let t=u(get$2(n.touchedFields,e),K.argA,K.argB);te&&set$2(n.touchedFields,e,t)}(Y.dirtyFields||X.dirtyFields)&&(n.dirtyFields=getDirtyFields(i,a)),ee.state.next({name:e,isDirty:nt(e,c),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else set$2(a,e,c)},Te=(e,t)=>
vendor: 5,677 bytes, line 46
46{set$2(n.errors,e,t),ee.state.next({errors:n.errors})},Oe=e=>{n.errors=e,ee.state.next({errors:n.errors,isValid:!1})},Ae=(e,t,n,c)=>{let u=get$2(r,e);if(u){let r=get$2(a,e,isUndefined$1(n)?get$2(i,e):n);isUndefined$1(r)||c&&c.defaultChecked||t?set$2(a,e,t?r:getFieldValue(u._f)):at(e,r),o.mount&&fe()}},ze=(e,r,a,o,c)=>{let u=!1,K=!1,te={name:e};if(!t.disabled){if(!a||o){(Y.isDirty||X.isDirty)&&(K=n.isDirty,n.isDirty=te.isDirty=nt(),u=K!==te.isDirty);let t=deepEqual$1(get$2(i,e),r);K=!!get$2(n.dirtyFields,e),t?unset(n.dirtyFields,e):set$2(n.dirtyFields,e,!0),te.dirtyFields=n.dirtyFields,u||=(Y.dirtyFields||X.dirtyFields)&&K!==!t}if(a){let t=get$2(n.touchedFields,e);t||(set$2(n.touchedFields,e,a),te.touchedFields=n.touchedFields,u||=(Y.touchedFields||X.touchedFields)&&t!==a)}u&&c&&ee.state.next(te)}return u?te:{}},qe=(e,r,i,a)=>{let o=get$2(n.errors,e),c=(Y.isValid||X.isValid)&&isBoolean$1(r)&&n.isValid!==r;if(t.delayError&&i?(u=de(()=>Te(e,i)),u(t.delayError)):(clearTimeout(K),u=null,i?set$2(n.errors,e,i):unset(n.errors,e)),(i?!deepEqual$1(o,i):o)||!isEmptyObject$2(a)||c){let t={...a,...c&&isBoolean$1(r)?{isValid:r}:{},errors:n.errors,name:e};n={...n,...t},ee.state.next(t)}},Ye=async e=>{me(e,!0);let n=await t.resolver(a,t.context,getResolverOptions(e||c.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return me(e),n},Ze=async e=>{let{errors:t}=await Ye(e);if(e)for(let r of e){let e=get$2(t,r);e?set$2(n.errors,r,e):unset(n.errors,r)}else n.errors=t;return t},Qe=async(e,r,i={valid:!0})=>{for(let o in e){let u=e[o];if(u){let{_f:e,...K}=u;if(e){let K=c.array.has(e.name),X=u._f&&hasPromiseValidation(u._f);X&&Y.validatingFields&&me([o],!0);let ee=await validateField(u,c.disabled,a,ue,t.shouldUseNativeValidation&&!r,K);if(X&&Y.validatingFields&&me([o]),ee[e.name]&&(i.valid=!1,r))break;!r&&(get$2(ee,e.name)?K?updateFieldArrayRootError(n.errors,ee,e.name):set$2(n.errors,e.name,ee[e.name]):unset(n.errors,e.name))}!isEmptyObject$2(K)&&await Qe(K,r,i)}}return i.valid},et=()=>{for(let e of c.unMount){let t=get$2(r,e);t&&(t._f.refs?t._f.refs.every(e=>!live(e)):!live(t._f.ref))&&vt(e)}c.unMount=new Set},nt=(e,n)=>!t.disabled&&(e&&n&&set$2(a,e,n),!deepEqual$1(dt(),i)),rt=(e,t,n)=>generateWatchOutput(e,c,{...o.mount?a:isUndefined$1(t)?i:isString$5(e)?{[e]:t}:t},n,t),it=e=>compact(get$2(o.mount?a:i,e,t.shouldUnregister?get$2(i,e,[]):[])),at=(e,t,n={})=>{let i=get$2(r,e),o=t;if(i){let n=i._f;n&&(!n.disabled&&set$2(a,e,getFieldValueAs(t,n)),o=isHTMLElement(n.ref)&&isNullOrUndefined(t)?``:t,isMultipleSelect(n.ref)?[...n.ref.options].forEach(e=>e.selected=o.includes(e.value)):n.refs?isCheckBoxInput(n.ref)?n.refs.length>1?n.refs.forEach(e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find(t=>t===e.value):o===e.value)):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach(e=>e.checked=e.value===o):isFileInput(n.ref)?n.ref.value=``:(n.ref.value=o,n.ref.type||ee.state.next({name:e,values:cloneObject(a)})))}(n.shouldDirty||n.shouldTouch)&&ze(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&ut(e)},ot=(e,t,n)=>{for(let i in t){let a=t[i],o=`${e}.${i}`,u=get$2(r,o);(c.array.has(e)||isObject$5(a)||u&&!u._f)&&!isDateObject(a)?ot(o,a,n):at(o,a,n)}},st=(e,t,u={})=>{let K=get$2(r,e),te=c.array.has(e),ce=cloneObject(t);set$2(a,e,ce),te?(ee.array.next({name:e,values:cloneObject(a)}),(Y.isDirty||Y.dirtyFields||X.isDirty||X.dirtyFields)&&u.shouldDirty&&ee.state.next({name:e,dirtyFields:getDirtyFields(i,a),isDirty:nt(e,ce)})):K&&!K._f&&!isNullOrUndefined(ce)?ot(e,ce,u):at(e,ce,u),isWatched(e,c)&&ee.state.next({...n}),ee.state.next({name:o.mount?e:void 0,values:cloneObject(a)})},ct=async e=>{o.mount=!0;let i=e.target,K=i.name,de=!0,ge=get$2(r,K),Te=e=>{de=Number.isNaN(e)||isDateObject(e)&&isNaN(e.getTime())||deepEqual$1(e,get$2(a,K,e))};if(ge){let o,Oe,Ae=i.type?getFieldValue(ge._f):getEventValue(e),Ze=e.type===EVENTS.BLUR||e.type===EVENTS.FOCUS_OUT,et=!hasValidation(ge._f)&&!t.resolver&&!get$2(n.errors,K)&&!ge._f.deps||skipValidation(Ze,get$2(n.touchedFields,K),n.isSubmitted,ce,te),nt=isWatched(K,c,Ze);set$2(a,K,Ae),Ze?(ge._f.onBlur&&ge._f.onBlur(e),u&&u(0)):ge._f.onChange&&ge._f.onChange(e);let rt=ze(K,Ae,Ze),it=!isEmptyObject$2(rt)||nt;if(!Ze&&ee.state.next({name:K,type:e.type,values:cloneObject(a)}),et)return(Y.isValid||X.isValid)&&(t.mode===`onBlur`?Ze&&fe():Ze||fe()),it&&ee.state.next({name:K,...nt?{}:rt});if(!Ze&&nt&&ee.state.next({...n}),t.resolver){let{errors:e}=await Ye([K]);if(Te(Ae),de){let t=schemaErrorLookup(n.errors,r,K),i=schemaErrorLookup(e,r,t.name||K);o=i.error,K=i.name,Oe=isEmptyObject$2(e)}}else me([K],!0),o=(await validateField(ge,c.disabled,a,ue,t.shouldUseNativeValidation))[K],me([K]),Te(Ae),de&&(o?Oe=!1:(Y.isValid||X.isValid)&&(Oe=await Qe(r,!0)));de&&(ge._f.deps&&ut(ge._f.deps),qe(K,Oe,o,rt))}},lt=(e,t)=>{if(get$2(n.errors,t)&&e.focus)return e.focus(),1},ut=async(e,i={})=>{let a,o,u=convertToArrayPayload(e);if(t.resolver){let t=await Ze(isUndefined$1(e)?e:u);a=isEmptyObject$2(t),o=e?!u.some(e=>get$2(t,e)):a}else e?(o=(await Promise.all(u.map(async e=>{let t=get$2(r,e);return await Qe(t&&t._f?{[e]:t}:t)}))).every(Boolean),(o||n.isValid)&&fe()):o=a=await Qe(r);return ee.state.next({...!isString$5(e)||(Y.isValid||X.isValid)&&a!==n.isValid?{}:{name:e},...t.resolver||!e?{isValid:a}:{},errors:n.errors}),i.shouldFocus&&!o&&iterateFieldsByAction(r,lt,e?u:c.mount),o},dt=e=>{let t={...o.mount?a:i};return isUndefined$1(e)?t:isString$5(e)?get$2(t,e):e.map(e=>get$2(t,e))},ft=(e,t)=>({invalid:!!get$2((t||n).errors,e),isDirty:!!get$2((t||n).dirtyFields,e),error:get$2((t||n).errors,e),isValidating:!!get$2(n.validatingFields,e),isTouched:!!get$2((t||n).touchedFields,e)}),pt=e=>
vendor: 7,980 bytes, line 46
46{e&&convertToArrayPayload(e).forEach(e=>unset(n.errors,e)),ee.state.next({errors:e?n.errors:{}})},mt=(e,t,i)=>{let a=(get$2(r,e,{_f:{}})._f||{}).ref,{ref:o,message:c,type:u,...K}=get$2(n.errors,e)||{};set$2(n.errors,e,{...K,...t,ref:a}),ee.state.next({name:e,errors:n.errors,isValid:!1}),i&&i.shouldFocus&&a&&a.focus&&a.focus()},ht=(e,t)=>isFunction$5(e)?ee.state.subscribe({next:n=>e(rt(void 0,t),n)}):rt(e,t,!0),gt=e=>ee.state.subscribe({next:t=>{shouldSubscribeByName(e.name,t.name,e.exact)&&shouldRenderFormState(t,e.formState||Y,Ot,e.reRenderRoot)&&e.callback({values:{...a},...n,...t})}}).unsubscribe,_t=e=>(o.mount=!0,X={...X,...e.formState},gt({...e,formState:X})),vt=(e,o={})=>{for(let u of e?convertToArrayPayload(e):c.mount)c.mount.delete(u),c.array.delete(u),o.keepValue||(unset(r,u),unset(a,u)),!o.keepError&&unset(n.errors,u),!o.keepDirty&&unset(n.dirtyFields,u),!o.keepTouched&&unset(n.touchedFields,u),!o.keepIsValidating&&unset(n.validatingFields,u),!t.shouldUnregister&&!o.keepDefaultValue&&unset(i,u);ee.state.next({values:cloneObject(a)}),ee.state.next({...n,...o.keepDirty?{isDirty:nt()}:{}}),!o.keepIsValid&&fe()},yt=({disabled:e,name:t})=>{(isBoolean$1(e)&&o.mount||e||c.disabled.has(t))&&(e?c.disabled.add(t):c.disabled.delete(t))},bt=(e,n={})=>{let a=get$2(r,e),u=isBoolean$1(n.disabled)||isBoolean$1(t.disabled);return set$2(r,e,{...a||{},_f:{...a&&a._f?a._f:{ref:{name:e}},name:e,mount:!0,...n}}),c.mount.add(e),a?yt({disabled:isBoolean$1(n.disabled)?n.disabled:t.disabled,name:e}):Ae(e,!0,n.value),{...u?{disabled:n.disabled||t.disabled}:{},...t.progressive?{required:!!n.required,min:getRuleValue(n.min),max:getRuleValue(n.max),minLength:getRuleValue(n.minLength),maxLength:getRuleValue(n.maxLength),pattern:getRuleValue(n.pattern)}:{},name:e,onChange:ct,onBlur:ct,ref:u=>{if(u){bt(e,n),a=get$2(r,e);let t=isUndefined$1(u.value)&&u.querySelectorAll&&u.querySelectorAll(`input,select,textarea`)[0]||u,o=isRadioOrCheckbox(t),c=a._f.refs||[];if(o?c.find(e=>e===t):t===a._f.ref)return;set$2(r,e,{_f:{...a._f,...o?{refs:[...c.filter(live),t,...Array.isArray(get$2(i,e))?[{}]:[]],ref:{type:t.type,name:e}}:{ref:t}}}),Ae(e,!1,void 0,t)}else a=get$2(r,e,{}),a._f&&(a._f.mount=!1),(t.shouldUnregister||n.shouldUnregister)&&!(isNameInFieldArray(c.array,e)&&o.action)&&c.unMount.add(e)}}},xt=()=>t.shouldFocusError&&iterateFieldsByAction(r,lt,c.mount),St=e=>{isBoolean$1(e)&&(ee.state.next({disabled:e}),iterateFieldsByAction(r,(t,n)=>{let i=get$2(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},Ct=(e,i)=>async o=>{let u;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let K=cloneObject(a);if(ee.state.next({isSubmitting:!0}),t.resolver){let{errors:e,values:t}=await Ye();n.errors=e,K=t}else await Qe(r);if(c.disabled.size)for(let e of c.disabled)set$2(K,e,void 0);if(unset(n.errors,`root`),isEmptyObject$2(n.errors)){ee.state.next({errors:{}});try{await e(K,o)}catch(e){u=e}}else i&&await i({...n.errors},o),xt(),setTimeout(xt);if(ee.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:isEmptyObject$2(n.errors)&&!u,submitCount:n.submitCount+1,errors:n.errors}),u)throw u},wt=(e,t={})=>{get$2(r,e)&&(isUndefined$1(t.defaultValue)?st(e,cloneObject(get$2(i,e))):(st(e,t.defaultValue),set$2(i,e,cloneObject(t.defaultValue))),t.keepTouched||unset(n.touchedFields,e),t.keepDirty||(unset(n.dirtyFields,e),n.isDirty=t.defaultValue?nt(e,cloneObject(get$2(i,e))):nt()),t.keepError||(unset(n.errors,e),Y.isValid&&fe()),ee.state.next({...n}))},Tt=(e,u={})=>{let K=e?cloneObject(e):i,X=cloneObject(K),te=isEmptyObject$2(e),ce=te?i:X;if(u.keepDefaultValues||(i=K),!u.keepValues){if(u.keepDirtyValues){let e=new Set([...c.mount,...Object.keys(getDirtyFields(i,a))]);for(let t of Array.from(e))get$2(n.dirtyFields,t)?set$2(ce,t,get$2(a,t)):st(t,get$2(ce,t))}else{if(isWeb&&isUndefined$1(e))for(let e of c.mount){let t=get$2(r,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(isHTMLElement(e)){let t=e.closest(`form`);if(t){t.reset();break}}}}for(let e of c.mount)st(e,get$2(ce,e))}a=cloneObject(ce),ee.array.next({values:{...ce}}),ee.state.next({values:{...ce}})}c={mount:u.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:``},o.mount=!Y.isValid||!!u.keepIsValid||!!u.keepDirtyValues,o.watch=!!t.shouldUnregister,ee.state.next({submitCount:u.keepSubmitCount?n.submitCount:0,isDirty:te?!1:u.keepDirty?n.isDirty:!(!u.keepDefaultValues||deepEqual$1(e,i)),isSubmitted:u.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:te?{}:u.keepDirtyValues?u.keepDefaultValues&&a?getDirtyFields(i,a):n.dirtyFields:u.keepDefaultValues&&e?getDirtyFields(i,e):u.keepDirty?n.dirtyFields:{},touchedFields:u.keepTouched?n.touchedFields:{},errors:u.keepErrors?n.errors:{},isSubmitSuccessful:u.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Et=(e,t)=>Tt(isFunction$5(e)?e(a):e,t),Dt=(e,t={})=>{let n=get$2(r,e),i=n&&n._f;if(i){let e=i.refs?i.refs[0]:i.ref;e.focus&&(e.focus(),t.shouldSelect&&isFunction$5(e.select)&&e.select())}},Ot=e=>{n={...n,...e}},kt={control:{register:bt,unregister:vt,getFieldState:ft,handleSubmit:Ct,setError:mt,_subscribe:gt,_runSchema:Ye,_getWatch:rt,_getDirty:nt,_setValid:fe,_setFieldArray:ge,_setDisabledField:yt,_setErrors:Oe,_getFieldArray:it,_reset:Tt,_resetDefaultValues:()=>isFunction$5(t.defaultValues)&&t.defaultValues().then(e=>{Et(e,t.resetOptions),ee.state.next({isLoading:!1})}),_removeUnmounted:et,_disableForm:St,_subjects:ee,_proxyFormState:Y,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(e){o=e},get _defaultValues(){return i},get _names(){return c},set _names(e){c=e},get _formState(){return n},get _options(){return t},set _options(e){t={...t,...e}}},subscribe:_t,trigger:ut,register:bt,handleSubmit:Ct,watch:ht,setValue:st,getValues:dt,reset:Et,resetField:wt,clearErrors:pt,unregister:vt,setError:mt,setFocus:Dt,getFieldState:ft};return{...kt,formControl:kt}}function useForm(e={}){let t=import_react.useRef(void 0),n=import_react.useRef(void 0),[r,i]=import_react.useState({isDirty:!1,isValidating:!1,isLoading:isFunction$5(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:isFunction$5(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...e.formControl?e.formControl:createFormControl(e),formState:r},e.formControl&&e.defaultValues&&!isFunction$5(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions));let a=t.current.control;return a._options=e,import_react.useLayoutEffect(()=>a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0}),[a]),import_react.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),import_react.useEffect(()=>{if(a._proxyFormState.isDirty){let e=a._getDirty();e!==r.isDirty&&a._subjects.state.next({isDirty:e})}},[a,r.isDirty]),import_react.useEffect(()=>{e.values&&!deepEqual$1(e.values,n.current)?(a._reset(e.values,a._options.resetOptions),n.current=e.values,i(e=>({...e}))):a._resetDefaultValues()},[e.values,a]),import_react.useEffect(()=>{e.errors&&!isEmptyObject$2(e.errors)&&a._setErrors(e.errors)},[e.errors,a]),import_react.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),import_react.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[e.shouldUnregister,a]),t.current.formState=getProxyFormState(r,a),t.current}var r$11=(e,t,n)=>{if(e&&`reportValidity`in e){let r=get$2(n,t);e.setCustomValidity(r&&r.message||``),e.reportValidity()}},o$14=(e,t)=>{for(let n in t.fields){let r=t.fields[n];r&&r.ref&&`reportValidity`in r.ref?r$11(r.ref,n,e):r&&r.refs&&r.refs.forEach(t=>r$11(t,n,e))}},s$14=(e,t)=>
vendor: 6,875 bytes, line 46
46{t.shouldUseNativeValidation&&o$14(e,t);let n={};for(let r in e){let i=get$2(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(i$10(t.names||Object.keys(e),r)){let e=Object.assign({},get$2(n,r));set$2(e,`root`,a),set$2(n,r,e)}else set$2(n,r,a)}return n},i$10=(e,t)=>{let n=n$11(t);return e.some(e=>n$11(e).match(`^${n}\\.\\d+`))};function n$11(e){return e.replace(/\]|\[/g,``)}var NEVER=Object.freeze({status:`aborted`});function $constructor(e,t,n){function r(n,r){var i;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,r);for(let e in o.prototype)e in n||Object.defineProperty(n,e,{value:o.prototype[e].bind(n)});n._zod.constr=o,n._zod.def=r}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var $ZodAsyncError=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},globalConfig={};function config(e){return e&&Object.assign(globalConfig,e),globalConfig}function getEnumValues(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function jsonStringifyReplacer(e,t){return typeof t==`bigint`?t.toString():t}function cached(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function nullish(e){return e==null}function cleanRegex(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function floatSafeRemainder(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}function defineLazy(e,t,n){Object.defineProperty(e,t,{get(){{let r=n();return e[t]=r,r}},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function assignProp(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function esc(e){return JSON.stringify(e)}var captureStackTrace=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function isObject$4(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var allowsEval=cached(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function isPlainObject$4(e){if(isObject$4(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return isObject$4(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}var propertyKeyTypes=new Set([`string`,`number`,`symbol`]);function escapeRegex(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function clone$2(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function normalizeParams(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function optionalKeys(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var NUMBER_FORMAT_RANGES={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function pick(e,t){let n={},r=e._zod.def;for(let e in t){if(!(e in r.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&(n[e]=r.shape[e])}return clone$2(e,{...e._zod.def,shape:n,checks:[]})}function omit(e,t){let n={...e._zod.def.shape},r=e._zod.def;for(let e in t){if(!(e in r.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete n[e]}return clone$2(e,{...e._zod.def,shape:n,checks:[]})}function extend$2(e,t){if(!isPlainObject$4(t))throw Error(`Invalid input to extend: expected a plain object`);return clone$2(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return assignProp(this,`shape`,n),n},checks:[]})}function merge$2(e,t){return clone$2(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return assignProp(this,`shape`,n),n},catchall:t._zod.def.catchall,checks:[]})}function partial(e,t,n){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return clone$2(t,{...t._zod.def,shape:i,checks:[]})}function required(e,t,n){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return clone$2(t,{...t._zod.def,shape:i,checks:[]})}function aborted(e,t=0){for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function prefixIssues(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function unwrapMessage(e){return typeof e==`string`?e:e?.message}function finalizeIssue(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=unwrapMessage(e.inst?._zod.def?.error?.(e))??unwrapMessage(t?.error?.(e))??unwrapMessage(n.customError?.(e))??unwrapMessage(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function getSizableOrigin(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}function getLengthableOrigin(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function issue(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var initializer$1=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,jsonStringifyReplacer,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},$ZodError=$constructor(`$ZodError`,initializer$1),$ZodRealError=$constructor(`$ZodError`,initializer$1,{Parent:Error});function flattenError(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function formatError$1(e,t){let n=t||function(e){return e.message},r={_errors:[]},i=e=>
vendor: 6,470 bytes, line 46
46{for(let t of e.issues)if(t.code===`invalid_union`&&t.errors.length)t.errors.map(e=>i({issues:e}));else if(t.code===`invalid_key`)i({issues:t.issues});else if(t.code===`invalid_element`)i({issues:t.issues});else if(t.path.length===0)r._errors.push(n(t));else{let e=r,i=0;for(;i<t.path.length;){let r=t.path[i];i===t.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(n(t))):e[r]=e[r]||{_errors:[]},e=e[r],i++}}};return i(e),r}var _parse=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new $ZodAsyncError;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>finalizeIssue(e,a,config())));throw captureStackTrace(t,i?.callee),t}return o.value},parse$2=_parse($ZodRealError),_parseAsync=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>finalizeIssue(e,a,config())));throw captureStackTrace(t,i?.callee),t}return o.value},parseAsync$1=_parseAsync($ZodRealError),_safeParse=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new $ZodAsyncError;return a.issues.length?{success:!1,error:new(e??$ZodError)(a.issues.map(e=>finalizeIssue(e,i,config())))}:{success:!0,data:a.value}},safeParse$1=_safeParse($ZodRealError),_safeParseAsync=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>finalizeIssue(e,i,config())))}:{success:!0,data:a.value}},safeParseAsync$1=_safeParseAsync($ZodRealError),cuid=/^[cC][^\s-]{8,}$/,cuid2=/^[0-9a-z]+$/,ulid=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,xid=/^[0-9a-vA-V]{20}$/,ksuid=/^[A-Za-z0-9]{27}$/,nanoid=/^[a-zA-Z0-9_-]{21}$/,duration$1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,guid=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,uuid=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,email=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_emoji$1=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function emoji(){return new RegExp(_emoji$1,`u`)}var ipv4=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,cidrv4=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,cidrv6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,base64url=/^[A-Za-z0-9_-]*$/,hostname=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,e164=/^\+(?:[0-9]){6,14}[0-9]$/,dateSource=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,date$2=RegExp(`^${dateSource}$`);function timeSource(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function time$1(e){return RegExp(`^${timeSource(e)}$`)}function datetime$1(e){let t=timeSource({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-]\\d{2}:\\d{2})`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${dateSource}T(?:${r})$`)}var string$4=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},integer=/^\d+$/,number$3=/^-?\d+(?:\.\d+)?/i,boolean$3=/true|false/i,_undefined$2=/undefined/i,lowercase=/^[^A-Z]*$/,uppercase=/^[^a-z]*$/,$ZodCheck=$constructor(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),numericOriginMap={number:`number`,bigint:`bigint`,object:`date`},$ZodCheckLessThan=$constructor(`$ZodCheckLessThan`,(e,t)=>{$ZodCheck.init(e,t);let n=numericOriginMap[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),$ZodCheckGreaterThan=$constructor(`$ZodCheckGreaterThan`,(e,t)=>{$ZodCheck.init(e,t);let n=numericOriginMap[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),$ZodCheckMultipleOf=$constructor(`$ZodCheckMultipleOf`,(e,t)=>{$ZodCheck.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):floatSafeRemainder(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),$ZodCheckNumberFormat=$constructor(`$ZodCheckNumberFormat`,(e,t)=>{$ZodCheck.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=NUMBER_FORMAT_RANGES[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=integer)}),e._zod.check=o=>{let c=o.value;if(n){if(!Number.isInteger(c)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?o.issues.push({input:c,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,
vendor: 4,584 bytes, line 46
46inst:e,origin:r,continue:!t.abort}):o.issues.push({input:c,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,continue:!t.abort});return}}c<i&&o.issues.push({origin:`number`,input:c,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),c>a&&o.issues.push({origin:`number`,input:c,code:`too_big`,maximum:a,inst:e})}}),$ZodCheckMaxSize=$constructor(`$ZodCheckMaxSize`,(e,t)=>{var n;$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!nullish(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:getSizableOrigin(r),code:`too_big`,maximum:t.maximum,input:r,inst:e,continue:!t.abort})}}),$ZodCheckMinSize=$constructor(`$ZodCheckMinSize`,(e,t)=>{var n;$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!nullish(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:getSizableOrigin(r),code:`too_small`,minimum:t.minimum,input:r,inst:e,continue:!t.abort})}}),$ZodCheckSizeEquals=$constructor(`$ZodCheckSizeEquals`,(e,t)=>{var n;$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!nullish(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:getSizableOrigin(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),$ZodCheckMaxLength=$constructor(`$ZodCheckMaxLength`,(e,t)=>{var n;$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!nullish(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=getLengthableOrigin(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),$ZodCheckMinLength=$constructor(`$ZodCheckMinLength`,(e,t)=>{var n;$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!nullish(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=getLengthableOrigin(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),$ZodCheckLengthEquals=$constructor(`$ZodCheckLengthEquals`,(e,t)=>{var n;$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!nullish(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=getLengthableOrigin(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),$ZodCheckStringFormat=$constructor(`$ZodCheckStringFormat`,(e,t)=>{var n,r;$ZodCheck.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),$ZodCheckRegex=$constructor(`$ZodCheckRegex`,(e,t)=>{$ZodCheckStringFormat.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),$ZodCheckLowerCase=$constructor(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=lowercase,$ZodCheckStringFormat.init(e,t)}),$ZodCheckUpperCase=$constructor(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=uppercase,$ZodCheckStringFormat.init(e,t)}),$ZodCheckIncludes=$constructor(`$ZodCheckIncludes`,(e,t)=>{$ZodCheck.init(e,t);let n=escapeRegex(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>
vendor: 6,401 bytes, lines 46-48
46{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),$ZodCheckStartsWith=$constructor(`$ZodCheckStartsWith`,(e,t)=>{$ZodCheck.init(e,t);let n=RegExp(`^${escapeRegex(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),$ZodCheckEndsWith=$constructor(`$ZodCheckEndsWith`,(e,t)=>{$ZodCheck.init(e,t);let n=RegExp(`.*${escapeRegex(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),$ZodCheckOverwrite=$constructor(`$ZodCheckOverwrite`,(e,t)=>{$ZodCheck.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Doc=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
47`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>`  ${e}`)];return new e(...t,n.join(`
48`))}},version$2={major:4,minor:0,patch:0},$ZodType=$constructor(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=version$2;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=aborted(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new $ZodAsyncError;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=aborted(e,t))});else{if(e.issues.length===t)continue;r||=aborted(e,t)}}return i?i.then(()=>e):e};e._zod.run=(n,i)=>{let a=e._zod.parse(n,i);if(a instanceof Promise){if(i.async===!1)throw new $ZodAsyncError;return a.then(e=>t(e,r,i))}return t(a,r,i)}}e[`~standard`]={validate:t=>{try{let n=safeParse$1(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return safeParseAsync$1(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}}),$ZodString=$constructor(`$ZodString`,(e,t)=>{$ZodType.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??string$4(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),$ZodStringFormat=$constructor(`$ZodStringFormat`,(e,t)=>{$ZodCheckStringFormat.init(e,t),$ZodString.init(e,t)}),$ZodGUID=$constructor(`$ZodGUID`,(e,t)=>{t.pattern??=guid,$ZodStringFormat.init(e,t)}),$ZodUUID=$constructor(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=uuid(e)}else t.pattern??=uuid();$ZodStringFormat.init(e,t)}),$ZodEmail=$constructor(`$ZodEmail`,(e,t)=>{t.pattern??=email,$ZodStringFormat.init(e,t)}),$ZodURL=$constructor(`$ZodURL`,(e,t)=>{$ZodStringFormat.init(e,t),e._zod.check=n=>{try{let r=n.value,i=new URL(r),a=i.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=!r.endsWith(`/`)&&a.endsWith(`/`)?a.slice(0,-1):a;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),$ZodEmoji=$constructor(`$ZodEmoji`,(e,t)=>{t.pattern??=emoji(),$ZodStringFormat.init(e,t)}),$ZodNanoID=$constructor(`$ZodNanoID`,(e,t)=>{t.pattern??=nanoid,$ZodStringFormat.init(e,t)}),$ZodCUID=$constructor(`$ZodCUID`,(e,t)=>{t.pattern??=cuid,$ZodStringFormat.init(e,t)}),$ZodCUID2=$constructor(`$ZodCUID2`,(e,t)=>{t.pattern??=cuid2,$ZodStringFormat.init(e,t)}),$ZodULID=$constructor(`$ZodULID`,(e,t)=>{t.pattern??=ulid,$ZodStringFormat.init(e,t)}),$ZodXID=$constructor(`$ZodXID`,(e,t)=>{t.pattern??=xid,$ZodStringFormat.init(e,t)}),$ZodKSUID=$constructor(`$ZodKSUID`,(e,t)=>{t.pattern??=ksuid,$ZodStringFormat.init(e,t)}),$ZodISODateTime=$constructor(`$ZodISODateTime`,(e,t)=>{t.pattern??=datetime$1(t),$ZodStringFormat.init(e,t)}),$ZodISODate=$constructor(`$ZodISODate`,(e,t)=>{t.pattern??=date$2,$ZodStringFormat.init(e,t)}),$ZodISOTime=$constructor(`$ZodISOTime`,(e,t)=>{t.pattern??=time$1(t),$ZodStringFormat.init(e,t)}),$ZodISODuration=$constructor(`$ZodISODuration`,(e,t)=>{t.pattern??=duration$1,$ZodStringFormat.init(e,t)}),$ZodIPv4=$constructor(`$ZodIPv4`,(e,t)=>{t.pattern??=ipv4,$ZodStringFormat.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv4`})}),$ZodIPv6=$constructor(`$ZodIPv6`,(e,t)=>{t.pattern??=ipv6,$ZodStringFormat.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv6`}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),$ZodCIDRv4=$constructor(`$ZodCIDRv4`,(e,t)=>{t.pattern??=cidrv4,$ZodStringFormat.init(e,t)}),$ZodCIDRv6=$constructor(`$ZodCIDRv6`,(e,t)=>{t.pattern??=cidrv6,$ZodStringFormat.init(e,t),e._zod.check=n=>{let[r,i]=n.value.split(`/`);try{if(!i)throw Error();let e=Number(i);if(`${e}`!==i||e<0||e>128)throw Error();new URL(`http://[${r}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function isValidBase64(e){if(e===``)return!0;
vendor: 6,998 bytes, lines 48-71
48if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var $ZodBase64=$constructor(`$ZodBase64`,(e,t)=>{t.pattern??=base64,$ZodStringFormat.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64`}),e._zod.check=n=>{isValidBase64(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function isValidBase64URL(e){if(!base64url.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return isValidBase64(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var $ZodBase64URL=$constructor(`$ZodBase64URL`,(e,t)=>{t.pattern??=base64url,$ZodStringFormat.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64url`}),e._zod.check=n=>{isValidBase64URL(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),$ZodE164=$constructor(`$ZodE164`,(e,t)=>{t.pattern??=e164,$ZodStringFormat.init(e,t)});function isValidJWT(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var $ZodJWT=$constructor(`$ZodJWT`,(e,t)=>{$ZodStringFormat.init(e,t),e._zod.check=n=>{isValidJWT(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),$ZodNumber=$constructor(`$ZodNumber`,(e,t)=>{$ZodType.init(e,t),e._zod.pattern=e._zod.bag.pattern??number$3,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),$ZodNumberFormat=$constructor(`$ZodNumber`,(e,t)=>{$ZodCheckNumberFormat.init(e,t),$ZodNumber.init(e,t)}),$ZodBoolean=$constructor(`$ZodBoolean`,(e,t)=>{$ZodType.init(e,t),e._zod.pattern=boolean$3,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),$ZodUndefined=$constructor(`$ZodUndefined`,(e,t)=>{$ZodType.init(e,t),e._zod.pattern=_undefined$2,e._zod.values=new Set([void 0]),e._zod.optin=`optional`,e._zod.optout=`optional`,e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),$ZodAny=$constructor(`$ZodAny`,(e,t)=>{$ZodType.init(e,t),e._zod.parse=e=>e}),$ZodUnknown=$constructor(`$ZodUnknown`,(e,t)=>{$ZodType.init(e,t),e._zod.parse=e=>e}),$ZodNever=$constructor(`$ZodNever`,(e,t)=>{$ZodType.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function handleArrayResult(e,t,n){e.issues.length&&t.issues.push(...prefixIssues(n,e.issues)),t.value[n]=e.value}var $ZodArray=$constructor(`$ZodArray`,(e,t)=>{$ZodType.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],c=t.element._zod.run({value:o,issues:[]},r);c instanceof Promise?a.push(c.then(t=>handleArrayResult(t,n,e))):handleArrayResult(c,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function handleObjectResult(e,t,n){e.issues.length&&t.issues.push(...prefixIssues(n,e.issues)),t.value[n]=e.value}function handleOptionalObjectResult(e,t,n,r){e.issues.length?r[n]===void 0?n in r?t.value[n]=void 0:t.value[n]=e.value:t.issues.push(...prefixIssues(n,e.issues)):e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}var $ZodObject=$constructor(`$ZodObject`,(e,t)=>{$ZodType.init(e,t);let n=cached(()=>{let e=Object.keys(t.shape);for(let n of e)if(!(t.shape[n]instanceof $ZodType))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=optionalKeys(t.shape);return{shape:t.shape,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}});defineLazy(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=e=>{let t=new Doc([`shape`,`payload`,`ctx`]),r=n.value,i=e=>{let t=esc(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of r.keys)a[e]=`key_${o++}`;t.write(`const newResult = {}`);for(let e of r.keys)if(r.optionalKeys.has(e)){let n=a[e];t.write(`const ${n} = ${i(e)};`);let r=esc(e);t.write(`
49        if (${n}.issues.length) {
50          if (input[${r}] === undefined) {
51            if (${r} in input) {
52              newResult[${r}] = undefined;
53            }
54          } else {
55            payload.issues = payload.issues.concat(
56              ${n}.issues.map((iss) => ({
57                ...iss,
58                path: iss.path ? [${r}, ...iss.path] : [${r}],
59              }))
60            );
61          }
62        } else if (${n}.value === undefined) {
63          if (${r} in input) newResult[${r}] = undefined;
64        } else {
65          newResult[${r}] = ${n}.value;
66        }
67        `)}else{let n=a[e];t.write(`const ${n} = ${i(e)};`),t.write(`
68          if (${n}.issues.length) payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
69            ...iss,
70            path: iss.path ? [${esc(e)}, ...iss.path] : [${esc(e)}]
71          })));`),t.write(`newResult[${esc(e)}] = ${n}.value`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let c=t.compile();return(t,n)=>c(e,t,n)},i,a=isObject$4,o=!globalConfig.jitless,c=o&&allowsEval.value,u=t.catchall,K;e._zod.parse=(Y,X)=>{K??=n.value;let ee=Y.value;if(!a(ee))return Y.issues.push({expected:`object`,code:`invalid_type`,input:ee,inst:e}),Y;let te=[];if(o&&c&&X?.async===!1&&X.jitless!==!0)i||=r(t.shape),Y=i(Y,X);else{Y.value={};let e=K.shape;for(let t of K.keys){let n=e[t],r=n._zod.run({value:ee[t],issues:[]},X),i=n._zod.optin===`optional`&&n._zod.optout===`optional`;r instanceof Promise?te.push(r.then(e=>i?handleOptionalObjectResult(e,Y,t,ee):handleObjectResult(e,Y,t))):i?handleOptionalObjectResult(r,Y,t,ee):handleObjectResult(r,Y,t)}}if(!u)return te.length?Promise.all(te).then(()=>Y):Y;let ce=[],ue=K.keySet,de=u._zod,fe=de.def.type;for(let e of Object.keys(ee)){if(ue.has(e))continue;if(fe===`never`){ce.push(e);continue}let t=de.run({value:ee[e],issues:[]},X);t instanceof Promise?te.push(t.then(t=>handleObjectResult(t,Y,e))):handleObjectResult(t,Y,e)}return ce.length&&Y.issues.push({code:`unrecognized_keys`,keys:ce,input:ee,inst:e}),te.length?Promise.all(te).then(()=>Y):Y}});function handleUnionResults(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;return t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>finalizeIssue(e,r,config())))}),t}var $ZodUnion=$constructor(`$ZodUnion`,(e,t)=>
vendor: 4,166 bytes, line 71
71{$ZodType.init(e,t),defineLazy(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),defineLazy(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),defineLazy(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),defineLazy(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>cleanRegex(e.source)).join(`|`)})$`)}}),e._zod.parse=(n,r)=>{let i=!1,a=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},r);if(t instanceof Promise)a.push(t),i=!0;else{if(t.issues.length===0)return t;a.push(t)}}return i?Promise.all(a).then(t=>handleUnionResults(t,n,e,r)):handleUnionResults(a,n,e,r)}}),$ZodIntersection=$constructor(`$ZodIntersection`,(e,t)=>{$ZodType.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>handleIntersectionResults(e,t,n)):handleIntersectionResults(e,i,a)}});function mergeValues(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(isPlainObject$4(e)&&isPlainObject$4(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=mergeValues(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=mergeValues(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function handleIntersectionResults(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),aborted(e))return e;let r=mergeValues(t.value,n.value);if(!r.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}var $ZodRecord=$constructor(`$ZodRecord`,(e,t)=>{$ZodType.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!isPlainObject$4(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[];if(t.keyType._zod.values){let o=t.keyType._zod.values;n.value={};for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...prefixIssues(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...prefixIssues(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)o.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let c=t.keyType._zod.run({value:o,issues:[]},r);if(c instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(c.issues.length){n.issues.push({origin:`record`,code:`invalid_key`,issues:c.issues.map(e=>finalizeIssue(e,r,config())),input:o,path:[o],inst:e}),n.value[c.value]=c.value;continue}let u=t.valueType._zod.run({value:i[o],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...prefixIssues(o,e.issues)),n.value[c.value]=e.value})):(u.issues.length&&n.issues.push(...prefixIssues(o,u.issues)),n.value[c.value]=u.value)}}return a.length?Promise.all(a).then(()=>n):n}}),$ZodSet=$constructor(`$ZodSet`,(e,t)=>{$ZodType.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:`set`,code:`invalid_type`}),n;let a=[];n.value=new Set;for(let e of i){let i=t.valueType._zod.run({value:e,issues:[]},r);i instanceof Promise?a.push(i.then(e=>handleSetResult(e,n))):handleSetResult(i,n)}return a.length?Promise.all(a).then(()=>n):n}});function handleSetResult(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var $ZodEnum=$constructor(`$ZodEnum`,(e,t)=>
vendor: 4,419 bytes, line 71
71{$ZodType.init(e,t);let n=getEnumValues(t.entries);e._zod.values=new Set(n),e._zod.pattern=RegExp(`^(${n.filter(e=>propertyKeyTypes.has(typeof e)).map(e=>typeof e==`string`?escapeRegex(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,r)=>{let i=t.value;return e._zod.values.has(i)||t.issues.push({code:`invalid_value`,values:n,input:i,inst:e}),t}}),$ZodLiteral=$constructor(`$ZodLiteral`,(e,t)=>{$ZodType.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?escapeRegex(e):e?e.toString():String(e)).join(`|`)})$`),e._zod.parse=(n,r)=>{let i=n.value;return e._zod.values.has(i)||n.issues.push({code:`invalid_value`,values:t.values,input:i,inst:e}),n}}),$ZodTransform=$constructor(`$ZodTransform`,(e,t)=>{$ZodType.init(e,t),e._zod.parse=(e,n)=>{let r=t.transform(e.value,e);if(n.async)return(r instanceof Promise?r:Promise.resolve(r)).then(t=>(e.value=t,e));if(r instanceof Promise)throw new $ZodAsyncError;return e.value=r,e}}),$ZodOptional=$constructor(`$ZodOptional`,(e,t)=>{$ZodType.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,defineLazy(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),defineLazy(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${cleanRegex(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>t.innerType._zod.optin===`optional`?t.innerType._zod.run(e,n):e.value===void 0?e:t.innerType._zod.run(e,n)}),$ZodNullable=$constructor(`$ZodNullable`,(e,t)=>{$ZodType.init(e,t),defineLazy(e._zod,`optin`,()=>t.innerType._zod.optin),defineLazy(e._zod,`optout`,()=>t.innerType._zod.optout),defineLazy(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${cleanRegex(e.source)}|null)$`):void 0}),defineLazy(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),$ZodDefault=$constructor(`$ZodDefault`,(e,t)=>{$ZodType.init(e,t),e._zod.optin=`optional`,defineLazy(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>handleDefaultResult(e,t)):handleDefaultResult(r,t)}});function handleDefaultResult(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var $ZodPrefault=$constructor(`$ZodPrefault`,(e,t)=>{$ZodType.init(e,t),e._zod.optin=`optional`,defineLazy(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),$ZodNonOptional=$constructor(`$ZodNonOptional`,(e,t)=>{$ZodType.init(e,t),defineLazy(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>handleNonOptionalResult(t,e)):handleNonOptionalResult(i,e)}});function handleNonOptionalResult(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var $ZodCatch=$constructor(`$ZodCatch`,(e,t)=>{$ZodType.init(e,t),e._zod.optin=`optional`,defineLazy(e._zod,`optout`,()=>t.innerType._zod.optout),defineLazy(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>finalizeIssue(e,n,config()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>finalizeIssue(e,n,config()))},input:e.value}),e.issues=[]),e)}}),$ZodNaN=$constructor(`$ZodNaN`,(e,t)=>{$ZodType.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),$ZodPipe=$constructor(`$ZodPipe`,(e,t)=>{$ZodType.init(e,t),defineLazy(e._zod,`values`,()=>t.in._zod.values),defineLazy(e._zod,`optin`,()=>t.in._zod.optin),defineLazy(e._zod,`optout`,()=>t.out._zod.optout),e._zod.parse=(e,n)=>{let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>handlePipeResult(e,t,n)):handlePipeResult(r,t,n)}});function handlePipeResult(e,t,n){return aborted(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}var $ZodReadonly=$constructor(`$ZodReadonly`,(e,t)=>
vendor: 18,501 bytes, line 71
71{$ZodType.init(e,t),defineLazy(e._zod,`propValues`,()=>t.innerType._zod.propValues),defineLazy(e._zod,`values`,()=>t.innerType._zod.values),defineLazy(e._zod,`optin`,()=>t.innerType._zod.optin),defineLazy(e._zod,`optout`,()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(handleReadonlyResult):handleReadonlyResult(r)}});function handleReadonlyResult(e){return e.value=Object.freeze(e.value),e}var $ZodCustom=$constructor(`$ZodCustom`,(e,t)=>{$ZodCheck.init(e,t),$ZodType.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>handleRefineResult(t,n,r,e));handleRefineResult(i,n,r,e)}});function handleRefineResult(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(issue(e))}}var $ZodRegistry=class{constructor(){this._map=new Map,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==`object`&&`id`in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};function registry(){return new $ZodRegistry}var globalRegistry=registry();function _string(e,t){return new e({type:`string`,...normalizeParams(t)})}function _email(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _guid(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _uuid(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _uuidv4(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...normalizeParams(t)})}function _uuidv6(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...normalizeParams(t)})}function _uuidv7(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...normalizeParams(t)})}function _url(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _emoji(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _nanoid(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _cuid(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _cuid2(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _ulid(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _xid(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _ksuid(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _ipv4(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _ipv6(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _cidrv4(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _cidrv6(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _base64(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _base64url(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _e164(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _jwt(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...normalizeParams(t)})}function _isoDateTime(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...normalizeParams(t)})}function _isoDate(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...normalizeParams(t)})}function _isoTime(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...normalizeParams(t)})}function _isoDuration(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...normalizeParams(t)})}function _number(e,t){return new e({type:`number`,checks:[],...normalizeParams(t)})}function _int(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...normalizeParams(t)})}function _boolean(e,t){return new e({type:`boolean`,...normalizeParams(t)})}function _undefined$1(e,t){return new e({type:`undefined`,...normalizeParams(t)})}function _any(e){return new e({type:`any`})}function _unknown(e){return new e({type:`unknown`})}function _never(e,t){return new e({type:`never`,...normalizeParams(t)})}function _nan(e,t){return new e({type:`nan`,...normalizeParams(t)})}function _lt(e,t){return new $ZodCheckLessThan({check:`less_than`,...normalizeParams(t),value:e,inclusive:!1})}function _lte(e,t){return new $ZodCheckLessThan({check:`less_than`,...normalizeParams(t),value:e,inclusive:!0})}function _gt(e,t){return new $ZodCheckGreaterThan({check:`greater_than`,...normalizeParams(t),value:e,inclusive:!1})}function _gte(e,t){return new $ZodCheckGreaterThan({check:`greater_than`,...normalizeParams(t),value:e,inclusive:!0})}function _multipleOf(e,t){return new $ZodCheckMultipleOf({check:`multiple_of`,...normalizeParams(t),value:e})}function _maxSize$1(e,t){return new $ZodCheckMaxSize({check:`max_size`,...normalizeParams(t),maximum:e})}function _minSize(e,t){return new $ZodCheckMinSize({check:`min_size`,...normalizeParams(t),minimum:e})}function _size(e,t){return new $ZodCheckSizeEquals({check:`size_equals`,...normalizeParams(t),size:e})}function _maxLength(e,t){return new $ZodCheckMaxLength({check:`max_length`,...normalizeParams(t),maximum:e})}function _minLength(e,t){return new $ZodCheckMinLength({check:`min_length`,...normalizeParams(t),minimum:e})}function _length(e,t){return new $ZodCheckLengthEquals({check:`length_equals`,...normalizeParams(t),length:e})}function _regex$1(e,t){return new $ZodCheckRegex({check:`string_format`,format:`regex`,...normalizeParams(t),pattern:e})}function _lowercase(e){return new $ZodCheckLowerCase({check:`string_format`,format:`lowercase`,...normalizeParams(e)})}function _uppercase(e){return new $ZodCheckUpperCase({check:`string_format`,format:`uppercase`,...normalizeParams(e)})}function _includes(e,t){return new $ZodCheckIncludes({check:`string_format`,format:`includes`,...normalizeParams(t),includes:e})}function _startsWith(e,t){return new $ZodCheckStartsWith({check:`string_format`,format:`starts_with`,...normalizeParams(t),prefix:e})}function _endsWith(e,t){return new $ZodCheckEndsWith({check:`string_format`,format:`ends_with`,...normalizeParams(t),suffix:e})}function _overwrite(e){return new $ZodCheckOverwrite({check:`overwrite`,tx:e})}function _normalize(e){return _overwrite(t=>t.normalize(e))}function _trim(){return _overwrite(e=>e.trim())}function _toLowerCase(){return _overwrite(e=>e.toLowerCase())}function _toUpperCase(){return _overwrite(e=>e.toUpperCase())}function _array(e,t,n){return new e({type:`array`,element:t,...normalizeParams(n)})}function _refine(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...normalizeParams(n)})}function t$13(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function s$13(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(`.`);if(!n[o]){if(`unionErrors`in r){var c=r.unionErrors[0].errors[0];n[o]={message:c.message,type:c.code}}else n[o]={message:a,type:i}}if(`unionErrors`in r&&r.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var u=n[o].types,K=u&&u[r.code];n[o]=appendErrors(o,t,n,i,K?[].concat(K,r.message):r.message)}e.shift()}return n}function i$9(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(`.`);if(!n[o]){if(r.code===`invalid_union`&&r.errors.length>0){var c=r.errors[0][0];n[o]={message:c.message,type:c.code}}else n[o]={message:a,type:i}}if(r.code===`invalid_union`&&r.errors.forEach(function(t){return t.forEach(function(t){return e.push(t)})}),t){var u=n[o].types,K=u&&u[r.code];n[o]=appendErrors(o,t,n,i,K?[].concat(K,r.message):r.message)}e.shift()}return n}function a$7(e,t,n){if(n===void 0&&(n={}),function(e){return`_def`in e&&typeof e._def==`object`&&`typeName`in e._def}(e))return function(r,i,a){try{return Promise.resolve(t$13(function(){return Promise.resolve(e[n.mode===`sync`?`parse`:`parseAsync`](r,t)).then(function(e){return a.shouldUseNativeValidation&&o$14({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return Array.isArray(e?.issues)}(e))return{values:{},errors:s$14(s$13(e.errors,!a.shouldUseNativeValidation&&a.criteriaMode===`all`),a)};throw e}))}catch(e){return Promise.reject(e)}};if(function(e){return`_zod`in e&&typeof e._zod==`object`}(e))return function(r,i,a){try{return Promise.resolve(t$13(function(){return Promise.resolve((n.mode===`sync`?parse$2:parseAsync$1)(e,r,t)).then(function(e){return a.shouldUseNativeValidation&&o$14({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return e instanceof $ZodError}(e))return{values:{},errors:s$14(i$9(e.issues,!a.shouldUseNativeValidation&&a.criteriaMode===`all`),a)};throw e}))}catch(e){return Promise.reject(e)}};throw Error(`Invalid input: not a Zod schema`)}var ZodISODateTime=$constructor(`ZodISODateTime`,(e,t)=>{$ZodISODateTime.init(e,t),ZodStringFormat.init(e,t)});function datetime(e){return _isoDateTime(ZodISODateTime,e)}var ZodISODate=$constructor(`ZodISODate`,(e,t)=>{$ZodISODate.init(e,t),ZodStringFormat.init(e,t)});function date$1(e){return _isoDate(ZodISODate,e)}var ZodISOTime=$constructor(`ZodISOTime`,(e,t)=>{$ZodISOTime.init(e,t),ZodStringFormat.init(e,t)});function time(e){return _isoTime(ZodISOTime,e)}var ZodISODuration=$constructor(`ZodISODuration`,(e,t)=>{$ZodISODuration.init(e,t),ZodStringFormat.init(e,t)});function duration(e){return _isoDuration(ZodISODuration,e)}var initializer=(e,t)=>{$ZodError.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>formatError$1(e,t)},flatten:{value:t=>flattenError(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get(){return e.issues.length===0}}})},ZodError=$constructor(`ZodError`,initializer),ZodRealError=$constructor(`ZodError`,initializer,{Parent:Error}),parse$1=_parse(ZodRealError),parseAsync=_parseAsync(ZodRealError),safeParse=_safeParse(ZodRealError),safeParseAsync=_safeParseAsync(ZodRealError),ZodType=$constructor(`ZodType`,(e,t)=>($ZodType.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),e.clone=(t,n)=>clone$2(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>parse$1(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>safeParse(e,t,n),e.parseAsync=async(t,n)=>parseAsync(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>safeParseAsync(e,t,n),e.spa=e.safeParseAsync,e.refine=(t,n)=>e.check(refine(t,n)),e.superRefine=t=>e.check(superRefine(t)),e.overwrite=t=>e.check(_overwrite(t)),e.optional=()=>optional(e),e.nullable=()=>nullable(e),e.nullish=()=>optional(nullable(e)),e.nonoptional=t=>nonoptional(e,t),e.array=()=>array$1(e),e.or=t=>union([e,t]),e.and=t=>intersection(e,t),e.transform=t=>pipe(e,transform(t)),e.default=t=>_default(e,t),e.prefault=t=>prefault(e,t),e.catch=t=>_catch(e,t),e.pipe=t=>pipe(e,t),e.readonly=()=>readonly(e),e.describe=t=>{let n=e.clone();return globalRegistry.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return globalRegistry.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return globalRegistry.get(e);let n=e.clone();return globalRegistry.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),_ZodString=$constructor(`_ZodString`,(e,t)=>{$ZodString.init(e,t),ZodType.init(e,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(_regex$1(...t)),e.includes=(...t)=>e.check(_includes(...t)),e.startsWith=(...t)=>e.check(_startsWith(...t)),e.endsWith=(...t)=>e.check(_endsWith(...t)),e.min=(...t)=>e.check(_minLength(...t)),e.max=(...t)=>e.check(_maxLength(...t)),e.length=(...t)=>e.check(_length(...t)),e.nonempty=(...t)=>e.check(_minLength(1,...t)),e.lowercase=t=>e.check(_lowercase(t)),e.uppercase=t=>e.check(_uppercase(t)),e.trim=()=>e.check(_trim()),e.normalize=(...t)=>e.check(_normalize(...t)),e.toLowerCase=()=>e.check(_toLowerCase()),e.toUpperCase=()=>e.check(_toUpperCase())}),ZodString=$constructor(`ZodString`,(e,t)=>{$ZodString.init(e,t),_ZodString.init(e,t),e.email=t=>e.check(_email(ZodEmail,t)),e.url=t=>e.check(_url(ZodURL,t)),e.jwt=t=>e.check(_jwt(ZodJWT,t)),e.emoji=t=>e.check(_emoji(ZodEmoji,t)),e.guid=t=>e.check(_guid(ZodGUID,t)),e.uuid=t=>e.check(_uuid(ZodUUID,t)),e.uuidv4=t=>e.check(_uuidv4(ZodUUID,t)),e.uuidv6=t=>e.check(_uuidv6(ZodUUID,t)),e.uuidv7=t=>e.check(_uuidv7(ZodUUID,t)),e.nanoid=t=>e.check(_nanoid(ZodNanoID,t)),e.guid=t=>e.check(_guid(ZodGUID,t)),e.cuid=t=>e.check(_cuid(ZodCUID,t)),e.cuid2=t=>e.check(_cuid2(ZodCUID2,t)),e.ulid=t=>e.check(_ulid(ZodULID,t)),e.base64=t=>e.check(_base64(ZodBase64,t)),e.base64url=t=>e.check(_base64url(ZodBase64URL,t)),e.xid=t=>e.check(_xid(ZodXID,t)),e.ksuid=t=>e.check(_ksuid(ZodKSUID,t)),e.ipv4=t=>e.check(_ipv4(ZodIPv4,t)),e.ipv6=t=>e.check(_ipv6(ZodIPv6,t)),e.cidrv4=t=>e.check(_cidrv4(ZodCIDRv4,t)),e.cidrv6=t=>e.check(_cidrv6(ZodCIDRv6,t)),e.e164=t=>e.check(_e164(ZodE164,t)),e.datetime=t=>e.check(datetime(t)),e.date=t=>e.check(date$1(t)),e.time=t=>e.check(time(t)),e.duration=t=>e.check(duration(t))});function string$3(e){return _string(ZodString,e)}var ZodStringFormat=$constructor(`ZodStringFormat`,(e,t)=>{$ZodStringFormat.init(e,t),_ZodString.init(e,t)}),ZodEmail=$constructor(`ZodEmail`,(e,t)=>{$ZodEmail.init(e,t),ZodStringFormat.init(e,t)}),ZodGUID=$constructor(`ZodGUID`,(e,t)=>{$ZodGUID.init(e,t),ZodStringFormat.init(e,t)}),ZodUUID=$constructor(`ZodUUID`,(e,t)=>{$ZodUUID.init(e,t),ZodStringFormat.init(e,t)}),ZodURL=$constructor(`ZodURL`,(e,t)=>{$ZodURL.init(e,t),ZodStringFormat.init(e,t)}),ZodEmoji=$constructor(`ZodEmoji`,(e,t)=>{$ZodEmoji.init(e,t),ZodStringFormat.init(e,t)}),ZodNanoID=$constructor(`ZodNanoID`,(e,t)=>{$ZodNanoID.init(e,t),ZodStringFormat.init(e,t)}),ZodCUID=$constructor(`ZodCUID`,(e,t)=>{$ZodCUID.init(e,t),ZodStringFormat.init(e,t)}),ZodCUID2=$constructor(`ZodCUID2`,(e,t)=>{$ZodCUID2.init(e,t),ZodStringFormat.init(e,t)}),ZodULID=$constructor(`ZodULID`,(e,t)=>{$ZodULID.init(e,t),ZodStringFormat.init(e,t)}),ZodXID=$constructor(`ZodXID`,(e,t)=>{$ZodXID.init(e,t),ZodStringFormat.init(e,t)}),ZodKSUID=$constructor(`ZodKSUID`,(e,t)=>{$ZodKSUID.init(e,t),ZodStringFormat.init(e,t)}),ZodIPv4=$constructor(`ZodIPv4`,(e,t)=>{$ZodIPv4.init(e,t),ZodStringFormat.init(e,t)}),ZodIPv6=$constructor(`ZodIPv6`,(e,t)=>{$ZodIPv6.init(e,t),ZodStringFormat.init(e,t)}),ZodCIDRv4=$constructor(`ZodCIDRv4`,(e,t)=>{$ZodCIDRv4.init(e,t),ZodStringFormat.init(e,t)}),ZodCIDRv6=$constructor(`ZodCIDRv6`,(e,t)=>{$ZodCIDRv6.init(e,t),ZodStringFormat.init(e,t)}),ZodBase64=$constructor(`ZodBase64`,(e,t)=>{$ZodBase64.init(e,t),ZodStringFormat.init(e,t)}),ZodBase64URL=$constructor(`ZodBase64URL`,(e,t)=>{$ZodBase64URL.init(e,t),ZodStringFormat.init(e,t)}),ZodE164=$constructor(`ZodE164`,(e,t)=>{$ZodE164.init(e,t),ZodStringFormat.init(e,t)}),ZodJWT=$constructor(`ZodJWT`,(e,t)=>{$ZodJWT.init(e,t),ZodStringFormat.init(e,t)}),ZodNumber=$constructor(`ZodNumber`,(e,t)=>{$ZodNumber.init(e,t),ZodType.init(e,t),e.gt=(t,n)=>e.check(_gt(t,n)),e.gte=(t,n)=>e.check(_gte(t,n)),e.min=(t,n)=>e.check(_gte(t,n)),e.lt=(t,n)=>e.check(_lt(t,n)),e.lte=(t,n)=>e.check(_lte(t,n)),e.max=(t,n)=>e.check(_lte(t,n)),e.int=t=>e.check(int(t)),e.safe=t=>e.check(int(t)),e.positive=t=>e.check(_gt(0,t)),e.nonnegative=t=>e.check(_gte(0,t)),e.negative=t=>e.check(_lt(0,t)),e.nonpositive=t=>e.check(_lte(0,t)),e.multipleOf=(t,n)=>e.check(_multipleOf(t,n)),e.step=(t,n)=>e.check(_multipleOf(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function number$2(e){return _number(ZodNumber,e)}var ZodNumberFormat=$constructor(`ZodNumberFormat`,(e,t)=>{$ZodNumberFormat.init(e,t),ZodNumber.init(e,t)});function int(e){return _int(ZodNumberFormat,e)}var ZodBoolean=$constructor(`ZodBoolean`,(e,t)=>{$ZodBoolean.init(e,t),ZodType.init(e,t)});function boolean$2(e){return _boolean(ZodBoolean,e)}var ZodUndefined=$constructor(`ZodUndefined`,(e,t)=>{$ZodUndefined.init(e,t),ZodType.init(e,t)});function _undefined(e){return _undefined$1(ZodUndefined,e)}var ZodAny=$constructor(`ZodAny`,(e,t)=>{$ZodAny.init(e,t),ZodType.init(e,t)});function any(){return _any(ZodAny)}var ZodUnknown=$constructor(`ZodUnknown`,(e,t)=>{$ZodUnknown.init(e,t),ZodType.init(e,t)});function unknown$1(){return _unknown(ZodUnknown)}var ZodNever=$constructor(`ZodNever`,(e,t)=>{$ZodNever.init(e,t),ZodType.init(e,t)});function never(e){return _never(ZodNever,e)}var ZodArray=$constructor(`ZodArray`,(e,t)=>{$ZodArray.init(e,t),ZodType.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(_minLength(t,n)),e.nonempty=t=>e.check(_minLength(1,t)),e.max=(t,n)=>e.check(_maxLength(t,n)),e.length=(t,n)=>e.check(_length(t,n)),e.unwrap=()=>e.element});function array$1(e,t){return _array(ZodArray,e,t)}var ZodObject=$constructor(`ZodObject`,(e,t)=>{$ZodObject.init(e,t),ZodType.init(e,t),defineLazy(e,`shape`,()=>t.shape),e.keyof=()=>
vendor: 2,541 bytes, line 71
71_enum(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:unknown$1()}),e.loose=()=>e.clone({...e._zod.def,catchall:unknown$1()}),e.strict=()=>e.clone({...e._zod.def,catchall:never()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>extend$2(e,t),e.merge=t=>merge$2(e,t),e.pick=t=>pick(e,t),e.omit=t=>omit(e,t),e.partial=(...t)=>partial(ZodOptional,e,t[0]),e.required=(...t)=>required(ZodNonOptional,e,t[0])});function object$1(e,t){return new ZodObject({type:`object`,get shape(){return assignProp(this,`shape`,{...e}),this.shape},...normalizeParams(t)})}var ZodUnion=$constructor(`ZodUnion`,(e,t)=>{$ZodUnion.init(e,t),ZodType.init(e,t),e.options=t.options});function union(e,t){return new ZodUnion({type:`union`,options:e,...normalizeParams(t)})}var ZodIntersection=$constructor(`ZodIntersection`,(e,t)=>{$ZodIntersection.init(e,t),ZodType.init(e,t)});function intersection(e,t){return new ZodIntersection({type:`intersection`,left:e,right:t})}var ZodRecord=$constructor(`ZodRecord`,(e,t)=>{$ZodRecord.init(e,t),ZodType.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function record$1(e,t,n){return new ZodRecord({type:`record`,keyType:e,valueType:t,...normalizeParams(n)})}var ZodSet=$constructor(`ZodSet`,(e,t)=>{$ZodSet.init(e,t),ZodType.init(e,t),e.min=(...t)=>e.check(_minSize(...t)),e.nonempty=t=>e.check(_minSize(1,t)),e.max=(...t)=>e.check(_maxSize$1(...t)),e.size=(...t)=>e.check(_size(...t))});function set$1(e,t){return new ZodSet({type:`set`,valueType:e,...normalizeParams(t)})}var ZodEnum=$constructor(`ZodEnum`,(e,t)=>{$ZodEnum.init(e,t),ZodType.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new ZodEnum({...t,checks:[],...normalizeParams(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new ZodEnum({...t,checks:[],...normalizeParams(r),entries:i})}});function _enum(e,t){return new ZodEnum({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...normalizeParams(t)})}function nativeEnum(e,t){return new ZodEnum({type:`enum`,entries:e,...normalizeParams(t)})}var ZodLiteral=$constructor(`ZodLiteral`,(e,t)=>{$ZodLiteral.init(e,t),ZodType.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if
71(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function literal(e,t){return new ZodLiteral({type:`literal`,values:Array.isArray(e)?e:[e],...normalizeParams(t)})}var ZodTransform=$constructor(`ZodTransform`,(e,t)=>{$ZodTransform.init(e,t),ZodType.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=r=>{if(typeof r==`string`)n.issues.push(issue(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,t.continue??=!0,n.issues.push(issue(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function transform(e){return new ZodTransform({type:`transform`,transform:e})}var ZodOptional=$constructor(`ZodOptional`,(e,t)=>{$ZodOptional.init(e,t),ZodType.init(e,t),e.unwrap=()=>e._zod.def.innerType});function optional(e){return new ZodOptional({type:`optional`,innerType:e})}var ZodNullable=$constructor(`ZodNullable`,(e,t)=>{$ZodNullable.init(e,t),ZodType.init(e,t),e.unwrap=()=>e._zod.def.innerType});function nullable(e){return new ZodNullable({type:`nullable`,innerType:e})}var ZodDefault=$constructor(`ZodDefault`,(e,t)=>{$ZodDefault.init(e,t),ZodType.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function _default(e,t){return new ZodDefault({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():t}})}var ZodPrefault=$constructor(`ZodPrefault`,(e,t)=>{$ZodPrefault.init(e,t),ZodType.init(e,t),e.unwrap=()=>e._zod.def.innerType});function prefault(e,t){return new ZodPrefault({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():t}})}var ZodNonOptional=$constructor(`ZodNonOptional`,(e,t)=>{$ZodNonOptional.init(e,t),ZodType.init(e,t),e.unwrap=()=>e._zod.def.innerType});function nonoptional(e,t){return new ZodNonOptional({type:`nonoptional`,innerType:e,...normalizeParams(t)})}var ZodCatch=$constructor(`ZodCatch`,(e,t)=>{$ZodCatch.init(e,t),ZodType.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function _catch(e,t){return new ZodCatch({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var ZodNaN=$constructor(`ZodNaN`,(e,t)=>{$ZodNaN.init(e,t),ZodType.init(e,t)});function nan(e){return _nan(ZodNaN,e)}var ZodPipe=$constructor(`ZodPipe`,(e,t)=>{$ZodPipe.init(e,t),ZodType.init(e,t),e.in=t.in,e.out=t.out});function pipe(e,t){return new ZodPipe({type:`pipe`,in:e,out:t})}var ZodReadonly=$constructor(`ZodReadonly`,(e,t)=>{$ZodReadonly.init(e,t),ZodType.init(e,t)});function readonly(e){return new ZodReadonly({type:`readonly`,innerType:e})}var ZodCustom=$constructor(`ZodCustom`,(e,t)=>{$ZodCustom.init(e,t),ZodType.init(e,t)});function check(e){let t=new $ZodCheck({check:`custom`});return t._zod.check=e,t}function refine(e,t={}){return _refine(ZodCustom,e,t)}function superRefine(e){let t=check(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(issue(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(issue(r))}},e(n.value,n)));return t}function _instanceof(e,t={error:`Input not instance of ${e.name}`}){let n=new ZodCustom({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...normalizeParams(t)});return n._zod.bag.Class=e,n}var ZodIssueCode={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},require_fails=__commonJSMin(((e,t)=>{t.exports=function(e){try{return!!e()}catch{return!0}}})),require_function_bind_native=__commonJSMin(((e,t)=>{t.exports=!require_fails()(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})})),require_function_uncurry_this=__commonJSMin(((e,t)=>{var n=require_function_bind_native(),r=Function.prototype,i=r.call,a=n&&r.bind.bind(i,i);t.exports=n?a:function(e){return function(){return i.apply(e,arguments)}}})),require_classof_raw=__commonJSMin(((e,t)=>{var n=require_function_uncurry_this(),r=n({}.toString),i=n(``.slice);t.exports=function(e){return i(r(e),8,-1)}})),require_indexed_object=__commonJSMin(((e,t)=>{var n=require_function_uncurry_this(),r=require_fails(),i=require_classof_raw(),a=Object,o=n(``.split);t.exports=r(function(){return!a(`z`).propertyIsEnumerable(0)})?function(e){return i(e)===`String`?o(e,``):a(e)}:a})),require_is_null_or_undefined=__commonJSMin(((e,t)=>{t.exports=function(e){return e==null}})),require_require_object_coercible=__commonJSMin(((e,t)=>{var n=require_is_null_or_undefined(),r=TypeError;
vendor: 4,387 bytes, line 71
71t.exports=function(e){if(n(e))throw new r(`Can't call method on `+e);return e}})),require_to_indexed_object=__commonJSMin(((e,t)=>{var n=require_indexed_object(),r=require_require_object_coercible();t.exports=function(e){return n(r(e))}})),require_global_this=__commonJSMin(((e,t)=>{var n=function(e){return e&&e.Math===Math&&e};t.exports=n(typeof globalThis==`object`&&globalThis)||n(typeof window==`object`&&window)||n(typeof self==`object`&&self)||n(typeof global==`object`&&global)||n(typeof e==`object`&&e)||(function(){return this})()||Function(`return this`)()})),require_is_pure=__commonJSMin(((e,t)=>{t.exports=!1})),require_define_global_property=__commonJSMin(((e,t)=>{var n=require_global_this(),r=Object.defineProperty;t.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch{n[e]=t}return t}})),require_shared_store=__commonJSMin(((e,t)=>{var n=require_is_pure(),r=require_global_this(),i=require_define_global_property(),a=`__core-js_shared__`,o=t.exports=r[a]||i(a,{});(o.versions||=[]).push({version:`3.45.1`,mode:n?`pure`:`global`,copyright:`© 2014-2025 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE`,source:`https://github.com/zloirock/core-js`})})),require_shared=__commonJSMin(((e,t)=>{var n=require_shared_store();t.exports=function(e,t){return n[e]||(n[e]=t||{})}})),require_to_object=__commonJSMin(((e,t)=>{var n=require_require_object_coercible(),r=Object;t.exports=function(e){return r(n(e))}})),require_has_own_property=__commonJSMin(((e,t)=>{var n=require_function_uncurry_this(),r=require_to_object(),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return i(r(e),t)}})),require_uid=__commonJSMin(((e,t)=>{var n=require_function_uncurry_this(),r=0,i=Math.random(),a=n(1.1.toString);t.exports=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+a(++r+i,36)}})),require_environment_user_agent=__commonJSMin(((e,t)=>{var n=require_global_this().navigator,r=n&&n.userAgent;t.exports=r?String(r):``})),require_environment_v8_version=__commonJSMin(((e,t)=>{var n=require_global_this(),r=require_environment_user_agent(),i=n.process,a=n.Deno,o=i&&i.versions||a&&a.version,c=o&&o.v8,u,K;c&&(u=c.split(`.`),K=u[0]>0&&u[0]<4?1:+(u[0]+u[1])),!K&&r&&(u=r.match(/Edge\/(\d+)/),(!u||u[1]>=74)&&(u=r.match(/Chrome\/(\d+)/),u&&(K=+u[1]))),t.exports=K})),require_symbol_constructor_detection=__commonJSMin(((e,t)=>{var n=require_environment_v8_version(),r=require_fails(),i=require_global_this().String;t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol(`symbol detection`);return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})})),require_use_symbol_as_uid=__commonJSMin(((e,t)=>{t.exports=require_symbol_constructor_detection()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`})),require_well_known_symbol=__commonJSMin(((e,t)=>{var n=require_global_this(),r=require_shared(),i=require_has_own_property(),a=require_uid(),o=require_symbol_constructor_detection(),c=require_use_symbol_as_uid(),u=n.Symbol,K=r(`wks`),Y=c?u.for||u:u&&u.withoutSetter||a;t.exports=function(e){return i(K,e)||(K[e]=o&&i(u,e)?u[e]:Y(`Symbol.`+e)),K[e]}})),require_is_callable=__commonJSMin(((e,t)=>{var n=typeof document==`object`&&document.all;t.exports=n===void 0&&n!==void 0?function(e){return typeof e==`function`||e===n}:function(e){return typeof e==`function`}})),require_is_object=__commonJSMin(((e,t)=>{var n=require_is_callable();t.exports=function(e){return typeof e==`object`?e!==null:n(e)}})),require_an_object=__commonJSMin(((e,t)=>{var n=require_is_object(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not an object`)}})),require_descriptors=__commonJSMin(((e,t)=>{t.exports=!require_fails()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})})),require_v8_prototype_define_bug=__commonJSMin(((e,t)=>{var n=require_descriptors(),r=require_fails();t.exports=n&&r(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})})),require_document_create_element=__commonJSMin(((e,t)=>{var n=require_global_this(),r=require_is_object(),i=n.document,a=r(i)&&r(i.createElement);t.exports=function(e){return a?i.createElement(e):{}}})),require_ie8_dom_define=__commonJSMin(((e,t)=>{var n=require_descriptors(),r=require_fails(),i=require_document_create_element
vendor: 13,478 bytes, line 71
71();t.exports=!n&&!r(function(){return Object.defineProperty(i(`div`),"a",{get:function(){return 7}}).a!==7})})),require_function_call=__commonJSMin(((e,t)=>{var n=require_function_bind_native(),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}})),require_get_built_in=__commonJSMin(((e,t)=>{var n=require_global_this(),r=require_is_callable(),i=function(e){return r(e)?e:void 0};t.exports=function(e,t){return arguments.length<2?i(n[e]):n[e]&&n[e][t]}})),require_object_is_prototype_of=__commonJSMin(((e,t)=>{t.exports=require_function_uncurry_this()({}.isPrototypeOf)})),require_is_symbol=__commonJSMin(((e,t)=>{var n=require_get_built_in(),r=require_is_callable(),i=require_object_is_prototype_of(),a=require_use_symbol_as_uid(),o=Object;t.exports=a?function(e){return typeof e==`symbol`}:function(e){var t=n(`Symbol`);return r(t)&&i(t.prototype,o(e))}})),require_try_to_string=__commonJSMin(((e,t)=>{var n=String;t.exports=function(e){try{return n(e)}catch{return`Object`}}})),require_a_callable=__commonJSMin(((e,t)=>{var n=require_is_callable(),r=require_try_to_string(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a function`)}})),require_get_method=__commonJSMin(((e,t)=>{var n=require_a_callable(),r=require_is_null_or_undefined();t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}})),require_ordinary_to_primitive=__commonJSMin(((e,t)=>{var n=require_function_call(),r=require_is_callable(),i=require_is_object(),a=TypeError;t.exports=function(e,t){var o,c;if(t===`string`&&r(o=e.toString)&&!i(c=n(o,e))||r(o=e.valueOf)&&!i(c=n(o,e))||t!==`string`&&r(o=e.toString)&&!i(c=n(o,e)))return c;throw new a(`Can't convert object to primitive value`)}})),require_to_primitive=__commonJSMin(((e,t)=>{var n=require_function_call(),r=require_is_object(),i=require_is_symbol(),a=require_get_method(),o=require_ordinary_to_primitive(),c=require_well_known_symbol(),u=TypeError,K=c(`toPrimitive`);t.exports=function(e,t){if(!r(e)||i(e))return e;var c=a(e,K),Y;if(c){if(t===void 0&&(t=`default`),Y=n(c,e,t),!r(Y)||i(Y))return Y;throw new u(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),o(e,t)}})),require_to_property_key=__commonJSMin(((e,t)=>{var n=require_to_primitive(),r=require_is_symbol();t.exports=function(e){var t=n(e,`string`);return r(t)?t:t+``}})),require_object_define_property=__commonJSMin((e=>{var t=require_descriptors(),n=require_ie8_dom_define(),r=require_v8_prototype_define_bug(),i=require_an_object(),a=require_to_property_key(),o=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,K=`enumerable`,Y=`configurable`,X=`writable`;e.f=t?r?function(e,t,n){if(i(e),t=a(t),i(n),typeof e==`function`&&t===`prototype`&&`value`in n&&X in n&&!n[X]){var r=u(e,t);r&&r[X]&&(e[t]=n.value,n={configurable:Y in n?n[Y]:r[Y],enumerable:K in n?n[K]:r[K],writable:!1})}return c(e,t,n)}:c:function(e,t,r){if(i(e),t=a(t),i(r),n)try{return c(e,t,r)}catch{}if(`get`in r||`set`in r)throw new o(`Accessors not supported`);return`value`in r&&(e[t]=r.value),e}})),require_math_trunc=__commonJSMin(((e,t)=>{var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(e){var t=+e;return(t>0?r:n)(t)}})),require_to_integer_or_infinity=__commonJSMin(((e,t)=>{var n=require_math_trunc();t.exports=function(e){var t=+e;return t!==t||t===0?0:n(t)}})),require_to_absolute_index=__commonJSMin(((e,t)=>{var n=require_to_integer_or_infinity(),r=Math.max,i=Math.min;t.exports=function(e,t){var a=n(e);return a<0?r(a+t,0):i(a,t)}})),require_to_length=__commonJSMin(((e,t)=>{var n=require_to_integer_or_infinity(),r=Math.min;t.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}})),require_length_of_array_like=__commonJSMin(((e,t)=>{var n=require_to_length();t.exports=function(e){return n(e.length)}})),require_array_includes=__commonJSMin(((e,t)=>{var n=require_to_indexed_object(),r=require_to_absolute_index(),i=require_length_of_array_like(),a=function(e){return function(t,a,o){var c=n(t),u=i(c);if(u===0)return!e&&-1;var K=r(o,u),Y;if(e&&a!==a){for(;u>K;)if(Y=c[K++],Y!==Y)return!0}else for(;u>K;K++)if((e||K in c)&&c[K]===a)return e||K||0;return!e&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}})),require_hidden_keys=__commonJSMin(((e,t)=>{t.exports={}})),require_object_keys_internal=__commonJSMin(((e,t)=>{var n=require_function_uncurry_this(),r=require_has_own_property(),i=require_to_indexed_object(),a=require_array_includes().indexOf,o=require_hidden_keys(),c=n([].push);t.exports=function(e,t){var n=i(e),u=0,K=[],Y;for(Y in n)!r(o,Y)&&r(n,Y)&&c(K,Y);for(;t.length>u;)r(n,Y=t[u++])&&(~a(K,Y)||c(K,Y));return K}})),require_enum_bug_keys=__commonJSMin(((e,t)=>{t.exports=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]})),require_object_keys=__commonJSMin(((e,t)=>{var n=require_object_keys_internal(),r=require_enum_bug_keys();t.exports=Object.keys||function(e){return n(e,r)}})),require_object_define_properties=__commonJSMin((e=>{var t=require_descriptors(),n=require_v8_prototype_define_bug(),r=require_object_define_property(),i=require_an_object(),a=require_to_indexed_object(),o=require_object_keys();e.f=t&&!n?Object.defineProperties:function(e,t){i(e);for(var n=a(t),c=o(t),u=c.length,K=0,Y;u>K;)r.f(e,Y=c[K++],n[Y]);return e}})),require_html=__commonJSMin(((e,t)=>{t.exports=require_get_built_in()(`document`,`documentElement`)})),require_shared_key=__commonJSMin(((e,t)=>{var n=require_shared(),r=require_uid(),i=n(`keys`);t.exports=function(e){return i[e]||(i[e]=r(e))}})),require_object_create=__commonJSMin(((e,t)=>{var n=require_an_object(),r=require_object_define_properties(),i=require_enum_bug_keys(),a=require_hidden_keys(),o=require_html(),c=require_document_create_element(),u=require_shared_key(),K=`>`,Y=`<`,X=`prototype`,ee=`script`,te=u(`IE_PROTO`),ce=function(){},ue=function(e){return Y+ee+K+e+Y+`/`+ee+K},de=function(e){e.write(ue(``)),e.close();var t=e.parentWindow.Object;return e=null,t},fe=function(){var e=c(`iframe`),t=`java`+ee+`:`,n;return e.style.display=`none`,o.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(ue(`document.F=Object`)),n.close(),n.F},me,ge=function(){try{me=new ActiveXObject(`htmlfile`)}catch{}ge=typeof document<`u`?document.domain&&me?de(me):fe():de(me);for(var e=i.length;e--;)delete ge[X][i[e]];return ge()};a[te]=!0,t.exports=Object.create||function(e,t){var i;return e===null?i=ge():(ce[X]=n(e),i=new ce,ce[X]=null,i[te]=e),t===void 0?i:r.f(i,t)}})),require_add_to_unscopables=__commonJSMin(((e,t)=>{var n=require_well_known_symbol(),r=require_object_create(),i=require_object_define_property().f,a=n(`unscopables`),o=Array.prototype;o[a]===void 0&&i(o,a,{configurable:!0,value:r(null)}),t.exports=function(e){o[a][e]=!0}})),require_iterators=__commonJSMin(((e,t)=>{t.exports={}})),require_weak_map_basic_detection=__commonJSMin(((e,t)=>{var n=require_global_this(),r=require_is_callable(),i=n.WeakMap;t.exports=r(i)&&/native code/.test(String(i))})),require_create_property_descriptor=__commonJSMin(((e,t)=>{t.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}})),require_create_non_enumerable_property=__commonJSMin(((e,t)=>{var n=require_descriptors(),r=require_object_define_property(),i=require_create_property_descriptor();t.exports=n?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}})),require_internal_state=__commonJSMin(((e,t)=>{var n=require_weak_map_basic_detection(),r=require_global_this(),i=require_is_object(),a=require_create_non_enumerable_property(),o=require_has_own_property(),c=require_shared_store(),u=require_shared_key(),K=require_hidden_keys(),Y=`Object already initialized`,X=r.TypeError,ee=r.WeakMap,te,ce,ue,de=function(e){return ue(e)?ce(e):te(e,{})},fe=function(e){return function(t){var n;if(!i(t)||(n=ce(t)).type!==e)throw new X(`Incompatible receiver, `+e+` required`);return n}};if(n||c.state){var me=c.state||=new ee;me.get=me.get,me.has=me.has,me.set=me.set,te=function(e,t){if(me.has(e))throw new X(Y);return t.facade=e,me.set(e,t),t},ce=function(e){return me.get(e)||{}},ue=function(e){return me.has(e)}}else{var ge=u(`state`);K[ge]=!0,te=function(e,t){if(o(e,ge))throw new X(Y);return t.facade=e,a(e,ge,t),t},ce=function(e){return o(e,ge)?e[ge]:{}},ue=function(e){return o(e,ge)}}t.exports={set:te,get:ce,has:ue,enforce:de,getterFor:fe}})),require_object_property_is_enumerable=__commonJSMin((e=>{var t={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor;e.f=n&&!t.call({1:2},1)?function(e){var t=n(this,e);return!!t&&t.enumerable}:t})),require_object_get_own_property_descriptor=__commonJSMin((e=>{var t=require_descriptors(),n=require_function_call(),r=require_object_property_is_enumerable(),i=require_create_property_descriptor(),a=require_to_indexed_object(),o=require_to_property_key(),c=require_has_own_property(),u=require_ie8_dom_define(),K=Object.getOwnPropertyDescriptor;e.f=t?K:function(e,t){if(e=a(e),t=o(t),u)try{return K(e,t)}catch{}if(c(e,t))return i(!n(r.f,e,t),e[t])}})),require_function_name=__commonJSMin(((e,t)=>{var n=require_descriptors(),r=require_has_own_property(),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,o=r(i,`name`);t.exports={EXISTS:o,PROPER:o&&(function(){}).name===`something`,CONFIGURABLE:o&&(!n||n&&a(i,`name`).configurable)}})),require_inspect_source=__commonJSMin(((e,t)=>{var n=require_function_uncurry_this(),r=require_is_callable(),i=require_shared_store(),a=n(Function.toString);r(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),t.exports=i.inspectSource})),require_make_built_in=__commonJSMin(((e,t)=>{var n=require_function_uncurry_this(),r=require_fails(),i=require_is_callable(),a=require_has_own_property(),o=require_descriptors(),c=require_function_name().CONFIGURABLE,u=require_inspect_source(),K=require_internal_state(),Y=K.enforce,X=K.get,ee=String,te=Object.defineProperty,ce=n(``.slice),ue=n(``.replace),de=n([].join),fe=o&&!r(function(){return te(function(){},`length`,{value:8}).length!==8}),me=String(String).split(`String`),ge=t.exports=function(e,t,n){ce(ee(t),0,7)===`Symbol(`&&(t=`[`+ue(ee(t),/^Symbol\(([^)]*)\).*$/,`$1`)+`]`),n&&n.getter&&(t=`get `+t),n&&n.setter&&(t=`set `+t),(!a(e,`name`)||c&&e.name!==t)&&(o?te(e,`name`,{value:t,configurable:!0}):e.name=t),fe&&n&&a(n,`arity`)&&e.length!==n.arity&&te(e,`length`,{value:n.arity});try{n&&a(n,`constructor`)&&n.constructor?o&&te(e,`prototype`,{writable:!1}):e.prototype&&=void 0}catch{}var r=Y(e);return a(r,`source`)||(r.source=de(me,typeof t==`string`?t:``)),e};Function.prototype.toString=ge(function(){return i(this)&&X(this).source||u(this)},`toString`)})),require_define_built_in=__commonJSMin(((e,t)=>{var n=require_is_callable(),r=require_object_define_property(),i=require_make_built_in(),a=require_define_global_property();t.exports=function(e,t,o,c){c||={};var u=c.enumerable,K=c.name===void 0?t:c.name;if(n(o)&&i(o,K,c),c.global)u?e[t]=o:a(t,o);else{try{c.unsafe?e[t]&&(u=!0):delete e[t]}catch{}u?e[t]=o:r.f(e,t,{value:o,enumerable:!1,configurable:!c.nonConfigurable,writable:!c.nonWritable})}return e}})),require_object_get_own_property_names=__commonJSMin((e=>{var t=require_object_keys_internal(),n=require_enum_bug_keys().concat(`length`,`prototype`);e.f=Object.getOwnPropertyNames||function(e){return t(e,n)}})),require_object_get_own_property_symbols=__commonJSMin((e=>{e.f=Object.getOwnPropertySymbols})),require_own_keys=__commonJSMin(((e,t)=>{var n=require_get_built_in(),r=require_function_uncurry_this(),i=require_object_get_own_property_names(),a=require_object_get_own_property_symbols(),o=require_an_object(),c=r([].concat);t.exports=n(`Reflect`,`ownKeys`)||function(e){var t=i.f(o(e)),n=a.f;return n?c(t,n(e)):t}})),require_copy_constructor_properties=__commonJSMin(((e,t)=>{var n=require_has_own_property(),r=require_own_keys(),i=require_object_get_own_property_descriptor(),a=require_object_define_property();t.exports=function(e,t,o){for(var c=r(t),u=a.f,K=i.f,Y=0;Y<c.length;Y++){var X=c[Y];!n(e,X)&&!(o&&n(o,X))&&u(e,X,K(t,X))}}})),require_is_forced=__commonJSMin(((e,t)=>{var n=require_fails(),r=require_is_callable(),i=/#|\.prototype\./,a=function(e,t){var i=c[o(e)];return i===K?!0:i===u?!1:r(t)?n(t):!!t},o=a.normalize=function(e){return String(e).replace(i,`.`).toLowerCase()},c=a.data={},u=a.NATIVE=`N`,K=a.POLYFILL=`P`;t.exports=a})),require_export=__commonJSMin(((e,t)=>{var n=require_global_this(),r=require_object_get_own_property_descriptor().f,i=require_create_non_enumerable_property(),a=require_define_built_in(),o=require_define_global_property(),c=require_copy_constructor_properties(),u=require_is_forced();t.exports=function(e,t){var K=e.target,Y=e.global,X=e.stat,ee,te=Y?n:X?n[K]||o(K,{}):n[K]&&n[K].prototype,ce,ue,de,fe;if(te)for(ce in t){if(de=t[ce],e.dontCallGetSet?(fe=r(te,ce),ue=fe&&fe.value):ue=te[ce],ee=u(Y?ce:K+(X?`.`:`#`)+ce,e.forced),!ee&&ue!==void 0){if(typeof de==typeof ue)continue;c(de,ue)}(e.sham||ue&&ue.sham)&&i(de,`sham`,!0),a(te,ce,de,e)}}})),require_correct_prototype_getter=__commonJSMin(((e,t)=>{t.exports=!require_fails()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})})),require_object_get_prototype_of=__commonJSMin(((e,t)=>{var n=require_has_own_property(),r=require_is_callable(),i=require_to_object(),a=require_shared_key(),o=require_correct_prototype_getter(),c=a(`IE_PROTO`),u=Object,K=u.prototype;
vendor: 2,079 bytes, line 71
71t.exports=o?u.getPrototypeOf:function(e){var t=i(e);if(n(t,c))return t[c];var a=t.constructor;return r(a)&&t instanceof a?a.prototype:t instanceof u?K:null}})),require_iterators_core=__commonJSMin(((e,t)=>{var n=require_fails(),r=require_is_callable(),i=require_is_object(),a=require_object_create(),o=require_object_get_prototype_of(),c=require_define_built_in(),u=require_well_known_symbol(),K=require_is_pure(),Y=u(`iterator`),X=!1,ee,te,ce;[].keys&&(ce=[].keys(),`next`in ce?(te=o(o(ce)),te!==Object.prototype&&(ee=te)):X=!0),!i(ee)||n(function(){var e={};return ee[Y].call(e)!==e})?ee={}:K&&(ee=a(ee)),r(ee[Y])||c(ee,Y,function(){return this}),t.exports={IteratorPrototype:ee,BUGGY_SAFARI_ITERATORS:X}})),require_set_to_string_tag=__commonJSMin(((e,t)=>{var n=require_object_define_property().f,r=require_has_own_property(),i=require_well_known_symbol()(`toStringTag`);t.exports=function(e,t,a){e&&!a&&(e=e.prototype),e&&!r(e,i)&&n(e,i,{configurable:!0,value:t})}})),require_iterator_create_constructor=__commonJSMin(((e,t)=>{var n=require_iterators_core().IteratorPrototype,r=require_object_create(),i=require_create_property_descriptor(),a=require_set_to_string_tag(),o=require_iterators(),c=function(){return this};t.exports=function(e,t,u,K){var Y=t+` Iterator`;return e.prototype=r(n,{next:i(+!K,u)}),a(e,Y,!1,!0),o[Y]=c,e}})),require_function_uncurry_this_accessor=__commonJSMin(((e,t)=>{var n=require_function_uncurry_this(),r=require_a_callable();t.exports=function(e,t,i){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[i]))}catch{}}})),require_is_possible_prototype=__commonJSMin(((e,t)=>{var n=require_is_object();t.exports=function(e){return n(e)||e===null}})),require_a_possible_prototype=__commonJSMin(((e,t)=>{var n=require_is_possible_prototype(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(`Can't set `+r(e)+` as a prototype`)}})),require_object_set_prototype_of=__commonJSMin(((e,t)=>{var n=require_function_uncurry_this_accessor(),r=require_is_object(),i=require_require_object_coercible(),a=require_a_possible_prototype();
vendor: 5,507 bytes, line 71
71t.exports=Object.setPrototypeOf||(`__proto__`in{}?function(){var e=!1,t={},o;try{o=n(Object.prototype,`__proto__`,`set`),o(t,[]),e=t instanceof Array}catch{}return function(t,n){return i(t),a(n),r(t)&&(e?o(t,n):t.__proto__=n),t}}():void 0)})),require_iterator_define=__commonJSMin(((e,t)=>{var n=require_export(),r=require_function_call(),i=require_is_pure(),a=require_function_name(),o=require_is_callable(),c=require_iterator_create_constructor(),u=require_object_get_prototype_of(),K=require_object_set_prototype_of(),Y=require_set_to_string_tag(),X=require_create_non_enumerable_property(),ee=require_define_built_in(),te=require_well_known_symbol(),ce=require_iterators(),ue=require_iterators_core(),de=a.PROPER,fe=a.CONFIGURABLE,me=ue.IteratorPrototype,ge=ue.BUGGY_SAFARI_ITERATORS,Te=te(`iterator`),Oe=`keys`,Ae=`values`,ze=`entries`,qe=function(){return this};t.exports=function(e,t,a,te,ue,Ye,Ze){c(a,t,te);var Qe=function(e){if(e===ue&&at)return at;if(!ge&&e&&e in rt)return rt[e];switch(e){case Oe:return function(){return new a(this,e)};case Ae:return function(){return new a(this,e)};case ze:return function(){return new a(this,e)}}return function(){return new a(this)}},et=t+` Iterator`,nt=!1,rt=e.prototype,it=rt[Te]||rt[`@@iterator`]||ue&&rt[ue],at=!ge&&it||Qe(ue),ot=t===`Array`&&rt.entries||it,st,ct,lt;if(ot&&(st=u(ot.call(new e)),st!==Object.prototype&&st.next&&(!i&&u(st)!==me&&(K?K(st,me):o(st[Te])||ee(st,Te,qe)),Y(st,et,!0,!0),i&&(ce[et]=qe))),de&&ue===Ae&&it&&it.name!==Ae&&(!i&&fe?X(rt,`name`,Ae):(nt=!0,at=function(){return r(it,this)})),ue){if(ct={values:Qe(Ae),keys:Ye?at:Qe(Oe),entries:Qe(ze)},Ze)for(lt in ct)(ge||nt||!(lt in rt))&&ee(rt,lt,ct[lt]);else n({target:t,proto:!0,forced:ge||nt},ct)}return(!i||Ze)&&rt[Te]!==at&&ee(rt,Te,at,{name:ue}),ce[t]=at,ct}})),require_create_iter_result_object=__commonJSMin(((e,t)=>{t.exports=function(e,t){return{value:e,done:t}}})),require_es_array_iterator=__commonJSMin(((e,t)=>{var n=require_to_indexed_object(),r=require_add_to_unscopables(),i=require_iterators(),a=require_internal_state(),o=require_object_define_property().f,c=require_iterator_define(),u=require_create_iter_result_object(),K=require_is_pure(),Y=require_descriptors(),X=`Array Iterator`,ee=a.set,te=a.getterFor(X);t.exports=c(Array,`Array`,function(e,t){ee(this,{type:X,target:n(e),index:0,kind:t})},function(){var e=te(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,u(void 0,!0);switch(e.kind){case`keys`:return u(n,!1);case`values`:return u(t[n],!1)}return u([n,t[n]],!1)},`values`);var ce=i.Arguments=i.Array;if(r(`keys`),r(`values`),r(`entries`),!K&&Y&&ce.name!==`values`)try{o(ce,`name`,{value:`values`})}catch{}})),require_to_string_tag_support=__commonJSMin(((e,t)=>{var n=require_well_known_symbol()(`toStringTag`),r={};r[n]=`z`,t.exports=String(r)===`[object z]`})),require_classof=__commonJSMin(((e,t)=>{var n=require_to_string_tag_support(),r=require_is_callable(),i=require_classof_raw(),a=require_well_known_symbol()(`toStringTag`),o=Object,c=i(function(){return arguments}())===`Arguments`,u=function(e,t){try{return e[t]}catch{}};t.exports=n?i:function(e){var t,n,K;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=u(t=o(e),a))==`string`?n:c?i(t):(K=i(t))===`Object`&&r(t.callee)?`Arguments`:K}})),require_object_to_string=__commonJSMin(((e,t)=>{var n=require_to_string_tag_support(),r=require_classof();t.exports=n?{}.toString:function(){return`[object `+r(this)+`]`}})),require_es_object_to_string=__commonJSMin((()=>{var e=require_to_string_tag_support(),t=require_define_built_in(),n=require_object_to_string();e||t(Object.prototype,`toString`,n,{unsafe:!0})})),require_environment=__commonJSMin(((e,t)=>{var n=require_global_this(),r=require_environment_user_agent(),i=require_classof_raw(),a=function(e){return r.slice(0,e.length)===e};t.exports=(function(){return a(`Bun/`)?`BUN`:a(`Cloudflare-Workers`)?`CLOUDFLARE`:a(`Deno/`)?`DENO`:a(`Node.js/`)?`NODE`:n.Bun&&typeof Bun.version==`string`?`BUN`:n.Deno&&typeof Deno.version==`object`?`DENO`:i(n.process)===`process`?`NODE`:n.window&&n.document?`BROWSER`:`REST`})()})),require_environment_is_node=__commonJSMin(((e,t)=>{t.exports=require_environment()===`NODE`})),require_path=__commonJSMin(((e,t)=>{t.exports=require_global_this()})),require_define_built_in_accessor=__commonJSMin(((e,t)=>{var n=require_make_built_in(),r=require_object_define_property();t.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),r.f(e,t,i)}})),require_set_species=__commonJSMin(((e,t)=>{var n=require_get_built_in(),r=require_define_built_in_accessor(),i=require_well_known_symbol(),a=require_descriptors(),o=i(`species`);t.exports=function(e){var t=n(e);a&&t&&!t[o]&&r(t,o,{configurable:!0,get:function(){return this}})}})),require_an_instance=__commonJSMin(((e,t)=>{var n=require_object_is_prototype_of(),r=TypeError;t.exports=function(e,t){if(n(t,e))return e;throw new r(`Incorrect invocation`)}})),require_is_constructor=__commonJSMin(((e,t)=>{var n=require_function_uncurry_this(),r=require_fails(),i=require_is_callable(),a=require_classof(),o=require_get_built_in(),c=require_inspect_source(),u=function(){},K=o(`Reflect`,`construct`),Y=/^\s*(?:class|function)\b/,X=n(Y.exec),ee=!Y.test(u),te=function(e){if(!i(e))return!1;try{return K(u,[],e),!0}catch{return!1}},ce=function(e){if(!i(e))return!1;switch(a(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return ee||!!X(Y,c(e))}catch{return!0}};
vendor: 1,601 bytes, line 71
71ce.sham=!0,t.exports=!K||r(function(){var e;return te(te.call)||!te(Object)||!te(function(){e=!0})||e})?ce:te})),require_a_constructor=__commonJSMin(((e,t)=>{var n=require_is_constructor(),r=require_try_to_string(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a constructor`)}})),require_species_constructor=__commonJSMin(((e,t)=>{var n=require_an_object(),r=require_a_constructor(),i=require_is_null_or_undefined(),a=require_well_known_symbol()(`species`);t.exports=function(e,t){var o=n(e).constructor,c;return o===void 0||i(c=n(o)[a])?t:r(c)}})),require_function_apply=__commonJSMin(((e,t)=>{var n=require_function_bind_native(),r=Function.prototype,i=r.apply,a=r.call;t.exports=typeof Reflect==`object`&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})})),require_function_uncurry_this_clause=__commonJSMin(((e,t)=>{var n=require_classof_raw(),r=require_function_uncurry_this();t.exports=function(e){if(n(e)===`Function`)return r(e)}})),require_function_bind_context=__commonJSMin(((e,t)=>{var n=require_function_uncurry_this_clause(),r=require_a_callable(),i=require_function_bind_native(),a=n(n.bind);t.exports=function(e,t){return r(e),t===void 0?e:i?a(e,t):function(){return e.apply(t,arguments)}}})),require_array_slice=__commonJSMin(((e,t)=>{t.exports=require_function_uncurry_this()([].slice)})),require_validate_arguments_length=__commonJSMin(((e,t)=>{var n=TypeError;t.exports=function(e,t){if(e<t)throw new n(`Not enough arguments`);return e}})),require_environment_is_ios=__commonJSMin(((e,t)=>{var n=require_environment_user_agent();
vendor: 9,534 bytes, line 71
71t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)})),require_task=__commonJSMin(((e,t)=>{var n=require_global_this(),r=require_function_apply(),i=require_function_bind_context(),a=require_is_callable(),o=require_has_own_property(),c=require_fails(),u=require_html(),K=require_array_slice(),Y=require_document_create_element(),X=require_validate_arguments_length(),ee=require_environment_is_ios(),te=require_environment_is_node(),ce=n.setImmediate,ue=n.clearImmediate,de=n.process,fe=n.Dispatch,me=n.Function,ge=n.MessageChannel,Te=n.String,Oe=0,Ae={},ze=`onreadystatechange`,qe,Ye,Ze,Qe;c(function(){qe=n.location});var et=function(e){if(o(Ae,e)){var t=Ae[e];delete Ae[e],t()}},nt=function(e){return function(){et(e)}},rt=function(e){et(e.data)},it=function(e){n.postMessage(Te(e),qe.protocol+`//`+qe.host)};(!ce||!ue)&&(ce=function(e){X(arguments.length,1);var t=a(e)?e:me(e),n=K(arguments,1);return Ae[++Oe]=function(){r(t,void 0,n)},Ye(Oe),Oe},ue=function(e){delete Ae[e]},te?Ye=function(e){de.nextTick(nt(e))}:fe&&fe.now?Ye=function(e){fe.now(nt(e))}:ge&&!ee?(Ze=new ge,Qe=Ze.port2,Ze.port1.onmessage=rt,Ye=i(Qe.postMessage,Qe)):n.addEventListener&&a(n.postMessage)&&!n.importScripts&&qe&&qe.protocol!==`file:`&&!c(it)?(Ye=it,n.addEventListener(`message`,rt,!1)):Ye=ze in Y(`script`)?function(e){u.appendChild(Y(`script`))[ze]=function(){u.removeChild(this),et(e)}}:function(e){setTimeout(nt(e),0)}),t.exports={set:ce,clear:ue}})),require_safe_get_built_in=__commonJSMin(((e,t)=>{var n=require_global_this(),r=require_descriptors(),i=Object.getOwnPropertyDescriptor;t.exports=function(e){if(!r)return n[e];var t=i(n,e);return t&&t.value}})),require_queue=__commonJSMin(((e,t)=>{var n=function(){this.head=null,this.tail=null};n.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return(this.head=e.next)===null&&(this.tail=null),e.item}},t.exports=n})),require_environment_is_ios_pebble=__commonJSMin(((e,t)=>{var n=require_environment_user_agent();t.exports=/ipad|iphone|ipod/i.test(n)&&typeof Pebble<`u`})),require_environment_is_webos_webkit=__commonJSMin(((e,t)=>{var n=require_environment_user_agent();t.exports=/web0s(?!.*chrome)/i.test(n)})),require_microtask=__commonJSMin(((e,t)=>{var n=require_global_this(),r=require_safe_get_built_in(),i=require_function_bind_context(),a=require_task().set,o=require_queue(),c=require_environment_is_ios(),u=require_environment_is_ios_pebble(),K=require_environment_is_webos_webkit(),Y=require_environment_is_node(),X=n.MutationObserver||n.WebKitMutationObserver,ee=n.document,te=n.process,ce=n.Promise,ue=r(`queueMicrotask`),de,fe,me,ge,Te;if(!ue){var Oe=new o,Ae=function(){var e,t;for(Y&&(e=te.domain)&&e.exit();t=Oe.get();)try{t()}catch(e){throw Oe.head&&de(),e}e&&e.enter()};!c&&!Y&&!K&&X&&ee?(fe=!0,me=ee.createTextNode(``),new X(Ae).observe(me,{characterData:!0}),de=function(){me.data=fe=!fe}):!u&&ce&&ce.resolve?(ge=ce.resolve(void 0),ge.constructor=ce,Te=i(ge.then,ge),de=function(){Te(Ae)}):Y?de=function(){te.nextTick(Ae)}:(a=i(a,n),de=function(){a(Ae)}),ue=function(e){Oe.head||de(),Oe.add(e)}}t.exports=ue})),require_host_report_errors=__commonJSMin(((e,t)=>{t.exports=function(e,t){try{arguments.length===1?console.error(e):console.error(e,t)}catch{}}})),require_perform=__commonJSMin(((e,t)=>{t.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}})),require_promise_native_constructor=__commonJSMin(((e,t)=>{t.exports=require_global_this().Promise})),require_promise_constructor_detection=__commonJSMin(((e,t)=>{var n=require_global_this(),r=require_promise_native_constructor(),i=require_is_callable(),a=require_is_forced(),o=require_inspect_source(),c=require_well_known_symbol(),u=require_environment(),K=require_is_pure(),Y=require_environment_v8_version(),X=r&&r.prototype,ee=c(`species`),te=!1,ce=i(n.PromiseRejectionEvent);t.exports={CONSTRUCTOR:a(`Promise`,function(){var e=o(r),t=e!==String(r);if(!t&&Y===66||K&&!(X.catch&&X.finally))return!0;if(!Y||Y<51||!/native code/.test(e)){var n=new r(function(e){e(1)}),i=function(e){e(function(){},function(){})},a=n.constructor={};if(a[ee]=i,te=n.then(function(){})instanceof i,!te)return!0}return!t&&(u===`BROWSER`||u===`DENO`)&&!ce}),REJECTION_EVENT:ce,SUBCLASSING:te}})),require_new_promise_capability=__commonJSMin(((e,t)=>{var n=require_a_callable(),r=TypeError,i=function(e){var t,i;this.promise=new e(function(e,n){if(t!==void 0||i!==void 0)throw new r(`Bad Promise constructor`);t=e,i=n}),this.resolve=n(t),this.reject=n(i)};t.exports.f=function(e){return new i(e)}})),require_es_promise_constructor=__commonJSMin((()=>{var e=require_export(),t=require_is_pure(),n=require_environment_is_node(),r=require_global_this(),i=require_path(),a=require_function_call(),o=require_define_built_in(),c=require_object_set_prototype_of(),u=require_set_to_string_tag(),K=require_set_species(),Y=require_a_callable(),X=require_is_callable(),ee=require_is_object(),te=require_an_instance(),ce=require_species_constructor(),ue=require_task().set,de=require_microtask(),fe=require_host_report_errors(),me=require_perform(),ge=require_queue(),Te=require_internal_state(),Oe=require_promise_native_constructor(),Ae=require_promise_constructor_detection(),ze=require_new_promise_capability(),qe=`Promise`,Ye=Ae.CONSTRUCTOR,Ze=Ae.REJECTION_EVENT,Qe=Ae.SUBCLASSING,et=Te.getterFor(qe),nt=Te.set,rt=Oe&&Oe.prototype,it=Oe,at=rt,ot=r.TypeError,st=r.document,ct=r.process,lt=ze.f,ut=lt,dt=!!(st&&st.createEvent&&r.dispatchEvent),ft=`unhandledrejection`,pt=`rejectionhandled`,mt=0,ht=1,gt=2,_t=1,vt=2,yt,bt,xt,St,Ct=function(e){var t;return ee(e)&&X(t=e.then)?t:!1},wt=function(e,t){var n=t.value,r=t.state===ht,i=r?e.ok:e.fail,o=e.resolve,c=e.reject,u=e.domain,K,Y,X;try{i?(r||(t.rejection===vt&&kt(t),t.rejection=_t),i===!0?K=n:(u&&u.enter(),K=i(n),u&&(u.exit(),X=!0)),K===e.promise?c(new ot(`Promise-chain cycle`)):(Y=Ct(K))?a(Y,K,o,c):o(K)):c(n)}catch(e){u&&!X&&u.exit(),c(e)}},Tt=function(e,t){e.notified||(e.notified=!0,de(function(){for(var n=e.reactions,r;r=n.get();)wt(r,e);e.notified=!1,t&&!e.rejection&&Dt(e)}))},Et=function(e,t,n){var i,a;dt?(i=st.createEvent(`Event`),i.promise=t,i.reason=n,i.initEvent(e,!1,!0),r.dispatchEvent(i)):i={promise:t,reason:n},!Ze&&(a=r[`on`+e])?a(i):e===ft&&fe(`Unhandled promise rejection`,n)},Dt=function(e){a(ue,r,function(){var t=e.facade,r=e.value,i=Ot(e),a;if(i&&(a=me(function(){n?ct.emit(`unhandledRejection`,r,t):Et(ft,t,r)}),e.rejection=n||Ot(e)?vt:_t,a.error))throw a.value})},Ot=function(e){return e.rejection!==_t&&!e.parent},kt=function(e){a(ue,r,function(){var t=e.facade;n?ct.emit(`rejectionHandled`,t):Et(pt,t,e.value)})},At=function(e,t,n){return function(r){e(t,r,n)}},jt=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=gt,Tt(e,!0))},Mt=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new ot(`Promise can't be resolved itself`);var r=Ct(t);r?de(function(){var n={done:!1};try{a(r,t,At(Mt,n,e),At(jt,n,e))}catch(t){jt(n,t,e)}}):(e.value=t,e.state=ht,Tt(e,!1))}catch(t){jt({done:!1},t,e)}}};if(Ye&&(it=function(e){te(this,at),Y(e),a(yt,this);var t=et(this);try{e(At(Mt,t),At(jt,t))}catch(e){jt(t,e)}},at=it.prototype,yt=function(e){nt(this,{type:qe,done:!1,notified:!1,parent:!1,reactions:new ge,rejection:!1,state:mt,value:null})},yt.prototype=o(at,`then`,function(e,t){var r=et(this),i=lt(ce(this,it));return r.parent=!0,i.ok=!X(e)||e,i.fail=X(t)&&t,i.domain=n?ct.domain:void 0,r.state===mt?r.reactions.add(i):de(function(){wt(i,r)}),i.promise}),bt=function(){var e=new yt,t=et(e);this.promise=e,this.resolve=At(Mt,t),this.reject=At(jt,t)},ze.f=lt=function(e){return e===it||e===xt?new bt(e):ut(e)},!t&&X(Oe)&&rt!==Object.prototype)){St=rt.then,Qe||o(rt,`then`,function(e,t){var n=this;return new it(function(e,t){a(St,n,e,t)}).then(e,t)},{unsafe:!0});try{delete rt.constructor}catch{}c&&c(rt,at)}e({global:!0,constructor:!0,wrap:!0,forced:Ye},{Promise:it}),xt=i.Promise,u(it,qe,!1,!0),K(qe)})),require_is_array_iterator_method=__commonJSMin(((e,t)=>{var n=require_well_known_symbol(),r=require_iterators(),i=n(`iterator`),a=Array.prototype;t.exports=function(e){return e!==void 0&&(r.Array===e||a[i]===e)}})),require_get_iterator_method=__commonJSMin(((e,t)=>{var n=require_classof(),r=require_get_method(),i=require_is_null_or_undefined(),a=require_iterators(),o=require_well_known_symbol()(`iterator`);t.exports=function(e){if(!i(e))return r(e,o)||r(e,`@@iterator`)||a[n(e)]}})),require_get_iterator=__commonJSMin(((e,t)=>{var n=require_function_call(),r=require_a_callable(),i=require_an_object(),a=require_try_to_string(),o=require_get_iterator_method(),c=TypeError;t.exports=function(e,t){var u=arguments.length<2?o(e):t;if(r(u))return i(n(u,e));throw new c(a(e)+` is not iterable`)}})),require_iterator_close=__commonJSMin(((e,t)=>{var n=require_function_call(),r=require_an_object(),i=require_get_method();t.exports=function(e,t,a){var o,c;r(e);try{if(o=i(e,`return`),!o){if(t===`throw`)throw a;return a}o=n(o,e)}catch(e){c=!0,o=e}if(t===`throw`)throw a;if(c)throw o;return r(o),a}})),require_iterate=__commonJSMin(((e,t)=>{var n=require_function_bind_context(),r=require_function_call(),i=require_an_object(),a=require_try_to_string(),o=require_is_array_iterator_method(),c=require_length_of_array_like(),u=require_object_is_prototype_of(),K=require_get_iterator(),Y=require_get_iterator_method(),X=require_iterator_close(),ee=TypeError,te=function(e,t){this.stopped=e,this.result=t},ce=te.prototype;
vendor: 6,616 bytes, line 71
71t.exports=function(e,t,ue){var de=ue&&ue.that,fe=!!(ue&&ue.AS_ENTRIES),me=!!(ue&&ue.IS_RECORD),ge=!!(ue&&ue.IS_ITERATOR),Te=!!(ue&&ue.INTERRUPTED),Oe=n(t,de),Ae,ze,qe,Ye,Ze,Qe,et,nt=function(e){return Ae&&X(Ae,`normal`),new te(!0,e)},rt=function(e){return fe?(i(e),Te?Oe(e[0],e[1],nt):Oe(e[0],e[1])):Te?Oe(e,nt):Oe(e)};if(me)Ae=e.iterator;else if(ge)Ae=e;else{if(ze=Y(e),!ze)throw new ee(a(e)+` is not iterable`);if(o(ze)){for(qe=0,Ye=c(e);Ye>qe;qe++)if(Ze=rt(e[qe]),Ze&&u(ce,Ze))return Ze;return new te(!1)}Ae=K(e,ze)}for(Qe=me?e.next:Ae.next;!(et=r(Qe,Ae)).done;){try{Ze=rt(et.value)}catch(e){X(Ae,`throw`,e)}if(typeof Ze==`object`&&Ze&&u(ce,Ze))return Ze}return new te(!1)}})),require_check_correctness_of_iteration=__commonJSMin(((e,t)=>{var n=require_well_known_symbol()(`iterator`),r=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){r=!0}};a[n]=function(){return this},Array.from(a,function(){throw 2})}catch{}t.exports=function(e,t){try{if(!t&&!r)return!1}catch{return!1}var i=!1;try{var a={};a[n]=function(){return{next:function(){return{done:i=!0}}}},e(a)}catch{}return i}})),require_promise_statics_incorrect_iteration=__commonJSMin(((e,t)=>{var n=require_promise_native_constructor(),r=require_check_correctness_of_iteration();t.exports=require_promise_constructor_detection().CONSTRUCTOR||!r(function(e){n.all(e).then(void 0,function(){})})})),require_es_promise_all=__commonJSMin((()=>{var e=require_export(),t=require_function_call(),n=require_a_callable(),r=require_new_promise_capability(),i=require_perform(),a=require_iterate();e({target:`Promise`,stat:!0,forced:require_promise_statics_incorrect_iteration()},{all:function(e){var o=this,c=r.f(o),u=c.resolve,K=c.reject,Y=i(function(){var r=n(o.resolve),i=[],c=0,Y=1;a(e,function(e){var n=c++,a=!1;Y++,t(r,o,e).then(function(e){a||(a=!0,i[n]=e,--Y||u(i))},K)}),--Y||u(i)});return Y.error&&K(Y.value),c.promise}})})),require_es_promise_catch=__commonJSMin((()=>{var e=require_export(),t=require_is_pure(),n=require_promise_constructor_detection().CONSTRUCTOR,r=require_promise_native_constructor(),i=require_get_built_in(),a=require_is_callable(),o=require_define_built_in(),c=r&&r.prototype;if(e({target:`Promise`,proto:!0,forced:n,real:!0},{catch:function(e){return this.then(void 0,e)}}),!t&&a(r)){var u=i(`Promise`).prototype.catch;c.catch!==u&&o(c,`catch`,u,{unsafe:!0})}})),require_es_promise_race=__commonJSMin((()=>{var e=require_export(),t=require_function_call(),n=require_a_callable(),r=require_new_promise_capability(),i=require_perform(),a=require_iterate();e({target:`Promise`,stat:!0,forced:require_promise_statics_incorrect_iteration()},{race:function(e){var o=this,c=r.f(o),u=c.reject,K=i(function(){var r=n(o.resolve);a(e,function(e){t(r,o,e).then(c.resolve,u)})});return K.error&&u(K.value),c.promise}})})),require_es_promise_reject=__commonJSMin((()=>{var e=require_export(),t=require_new_promise_capability(),n=require_promise_constructor_detection().CONSTRUCTOR;e({target:`Promise`,stat:!0,forced:n},{reject:function(e){var n=t.f(this),r=n.reject;return r(e),n.promise}})})),require_promise_resolve=__commonJSMin(((e,t)=>{var n=require_an_object(),r=require_is_object(),i=require_new_promise_capability();t.exports=function(e,t){if(n(e),r(t)&&t.constructor===e)return t;var a=i.f(e),o=a.resolve;return o(t),a.promise}})),require_es_promise_resolve=__commonJSMin((()=>{var e=require_export(),t=require_get_built_in(),n=require_is_pure(),r=require_promise_native_constructor(),i=require_promise_constructor_detection().CONSTRUCTOR,a=require_promise_resolve(),o=t(`Promise`),c=n&&!i;e({target:`Promise`,stat:!0,forced:n||i},{resolve:function(e){return a(c&&this===o?r:this,e)}})})),require_es_promise=__commonJSMin((()=>{require_es_promise_constructor(),require_es_promise_all(),require_es_promise_catch(),require_es_promise_race(),require_es_promise_reject(),require_es_promise_resolve()})),require_es_promise_all_settled=__commonJSMin((()=>{var e=require_export(),t=require_function_call(),n=require_a_callable(),r=require_new_promise_capability(),i=require_perform(),a=require_iterate();e({target:`Promise`,stat:!0,forced:require_promise_statics_incorrect_iteration()},{allSettled:function(e){var o=this,c=r.f(o),u=c.resolve,K=c.reject,Y=i(function(){var r=n(o.resolve),i=[],c=0,K=1;a(e,function(e){var n=c++,a=!1;K++,t(r,o,e).then(function(e){a||(a=!0,i[n]={status:`fulfilled`,value:e},--K||u(i))},function(e){a||(a=!0,i[n]={status:`rejected`,reason:e},--K||u(i))})}),--K||u(i)});return Y.error&&K(Y.value),c.promise}})})),require_to_string=__commonJSMin(((e,t)=>{var n=require_classof(),r=String;t.exports=function(e){if(n(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return r(e)}})),require_string_multibyte=__commonJSMin(((e,t)=>{var n=require_function_uncurry_this(),r=require_to_integer_or_infinity(),i=require_to_string(),a=require_require_object_coercible(),o=n(``.charAt),c=n(``.charCodeAt),u=n(``.slice),K=function(e){return function(t,n){var K=i(a(t)),Y=r(n),X=K.length,ee,te;return Y<0||Y>=X?e?``:void 0:(ee=c(K,Y),ee<55296||ee>56319||Y+1===X||(te=c(K,Y+1))<56320||te>57343?e?o(K,Y):ee:e?u(K,Y,Y+2):(ee-55296<<10)+(te-56320)+65536)}};t.exports={codeAt:K(!1),charAt:K(!0)}})),require_es_string_iterator=__commonJSMin((()=>{var e=require_string_multibyte().charAt,t=require_to_string(),n=require_internal_state(),r=require_iterator_define(),i=require_create_iter_result_object(),a=`String Iterator`,o=n.set,c=n.getterFor(a);r(String,`String`,function(e){o(this,{type:a,string:t(e),index:0})},function(){var t=c(this),n=t.string,r=t.index,a;return r>=n.length?i(void 0,!0):(a=e(n,r),t.index+=a.length,i(a,!1))})})),require_all_settled$2=__commonJSMin(((e,t)=>{require_es_array_iterator(),require_es_object_to_string(),require_es_promise(),require_es_promise_all_settled(),require_es_string_iterator();var n=require_function_call(),r=require_is_callable(),i=require_path().Promise,a=i.allSettled;t.exports=function(e){return n(a,r(this)?this:i,e)}})),require_dom_iterables=__commonJSMin(((e,t)=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}})),require_dom_token_list_prototype=__commonJSMin(((e,t)=>
71{var n=require_document_create_element()(`span`).classList,r=n&&n.constructor&&n.constructor.prototype;t.exports=r===Object.prototype?void 0:r})),require_web_dom_collections_iterator=__commonJSMin((()=>{var e=require_global_this(),t=require_dom_iterables(),n=require_dom_token_list_prototype(),r=require_es_array_iterator(),i=require_create_non_enumerable_property(),a=require_set_to_string_tag(),o=require_well_known_symbol()(`iterator`),c=r.values,u=function(e,n){if(e){if(e[o]!==c)try{i(e,o,c)}catch{e[o]=c}if(a(e,n,!0),t[n]){for(var u in r)if(e[u]!==r[u])try{i(e,u,r[u])}catch{e[u]=r[u]}}}};for(var K in t)u(e[K]&&e[K].prototype,K);u(n,`DOMTokenList`)})),require_all_settled$1=__commonJSMin(((e,t)=>{var n=require_all_settled$2();require_web_dom_collections_iterator(),t.exports=n})),require_all_settled=__commonJSMin(((e,t)=>{t.exports=require_all_settled$1()})),require_es_promise_with_resolvers=__commonJSMin((()=>{var e=require_export(),t=require_new_promise_capability();e({target:`Promise`,stat:!0},{withResolvers:function(){var e=t.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}})})),require_with_resolvers$2=__commonJSMin(((e,t)=>{require_es_promise(),require_es_promise_with_resolvers();var n=require_function_call(),r=require_is_callable(),i=require_path().Promise,a=i.withResolvers;t.exports=function(){return n(a,r(this)?this:i)}})),require_with_resolvers$1=__commonJSMin(((e,t)=>{t.exports=require_with_resolvers$2()})),require_esnext_promise_with_resolvers=__commonJSMin((()=>{require_es_promise_with_resolvers()})),require_with_resolvers=__commonJSMin(((e,t)=>{var n=require_with_resolvers$1();require_esnext_promise_with_resolvers(),t.exports=n})),require_es_array_at=__commonJSMin((()=>{var e=require_export(),t=require_to_object(),n=require_length_of_array_like(),r=require_to_integer_or_infinity(),i=require_add_to_unscopables();e({target:`Array`,proto:!0},{at:function(e){var i=t(this),a=n(i),o=r(e),c=o>=0?o:a+o;return c<0||c>=a?void 0:i[c]}}),i(`at`)})),require_entry_unbind=__commonJSMin(((e,t)=>{var n=require_global_this(),r=require_function_uncurry_this();t.exports=function(e,t){return r(n[e].prototype[t])}})),require_at$2=__commonJSMin(((e,t)=>{require_es_array_at(),t.exports=require_entry_unbind()(`Array`,`at`)})),require_at$1=__commonJSMin(((e,t)=>{t.exports=require_at$2()})),require_at=__commonJSMin(((e,t)=>{t.exports=require_at$1()})),import_jsx_runtime=require_jsx_runtime();function _assertClassBrand(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function _classPrivateMethodInitSpec(e,t){_checkPrivateRedeclaration(e,t),t.add(e)}function _classPrivateFieldInitSpec(e,t,n){_checkPrivateRedeclaration(e,t),t.set(e,n)}function _classPrivateFieldSet2(e,t,n){return e.set(_assertClassBrand(e,t),n),n}function _classPrivateFieldGet2(e,t){return e.get(_assertClassBrand(e,t))}function _toSetter(e,t,n){t||=[];var r=t.length++;return Object.defineProperty({},"_",{set:function(i){t[r]=i,e.apply(n,t)}})}var scriptRel=`modulepreload`,assetsURL=function(e){return`/account/heloc/`+e},seen={},__vitePreload=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function c(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=assetsURL(t,n),t=c(t),t in seen)return;seen[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:scriptRel,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n
71)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},pdf_exports=__exportAll({AbortException:()=>__webpack_exports__AbortException,AnnotationEditorLayer:()=>__webpack_exports__AnnotationEditorLayer,AnnotationEditorParamsType:()=>__webpack_exports__AnnotationEditorParamsType,AnnotationEditorType:()=>__webpack_exports__AnnotationEditorType,AnnotationEditorUIManager:()=>__webpack_exports__AnnotationEditorUIManager,AnnotationLayer:()=>__webpack_exports__AnnotationLayer,AnnotationMode:()=>__webpack_exports__AnnotationMode,ColorPicker:()=>__webpack_exports__ColorPicker,DOMSVGFactory:()=>__webpack_exports__DOMSVGFactory,DrawLayer:()=>__webpack_exports__DrawLayer,FeatureTest:()=>__webpack_exports__FeatureTest,GlobalWorkerOptions:()=>__webpack_exports__GlobalWorkerOptions,ImageKind:()=>__webpack_exports__ImageKind,InvalidPDFException:()=>__webpack_exports__InvalidPDFException,MissingPDFException:()=>__webpack_exports__MissingPDFException,OPS:()=>__webpack_exports__OPS,OutputScale:()=>__webpack_exports__OutputScale,PDFDataRangeTransport:()=>__webpack_exports__PDFDataRangeTransport,PDFDateString:()=>__webpack_exports__PDFDateString,PDFWorker:()=>__webpack_exports__PDFWorker,PasswordResponses:()=>__webpack_exports__PasswordResponses,PermissionFlag:()=>__webpack_exports__PermissionFlag,PixelsPerInch:()=>__webpack_exports__PixelsPerInch,RenderingCancelledException:()=>__webpack_exports__RenderingCancelledException,TextLayer:()=>__webpack_exports__TextLayer,UnexpectedResponseException:()=>__webpack_exports__UnexpectedResponseException,Util:()=>__webpack_exports__Util,VerbosityLevel:()=>__webpack_exports__VerbosityLevel,XfaLayer:()=>__webpack_exports__XfaLayer,build:()=>__webpack_exports__build,createValidAbsoluteUrl:()=>__webpack_exports__createValidAbsoluteUrl,fetchData:()=>__webpack_exports__fetchData,getDocument:()=>__webpack_exports__getDocument,getFilenameFromUrl:()=>__webpack_exports__getFilenameFromUrl,getPdfFilenameFromUrl:()=>__webpack_exports__getPdfFilenameFromUrl,getXfaPageViewport:()=>__webpack_exports__getXfaPageViewport,isDataScheme:()=>__webpack_exports__isDataScheme,isPdfFile:()=>__webpack_exports__isPdfFile,noContextMenu:()=>__webpack_exports__noContextMenu,normalizeUnicode:()=>__webpack_exports__normalizeUnicode,setLayerDimensions:()=>__webpack_exports__setLayerDimensions,shadow:()=>__webpack_exports__shadow,version:()=>__webpack_exports__version}),_Util,_PixelsPerInch,_ImageManager,_AnnotationEditor,_TextLayer,_PDFWorker,_FreeTextEditor,_ColorPicker,_HighlightEditor,_InkEditor,_StampEditor,_DrawLayer,_Symbol$iterator,__webpack_require__={};__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var __webpack_exports__=globalThis.pdfjsLib={};__webpack_require__.d(__webpack_exports__,{AbortException:()=>AbortException,AnnotationEditorLayer:()=>AnnotationEditorLayer,AnnotationEditorParamsType:()=>AnnotationEditorParamsType,AnnotationEditorType:()=>AnnotationEditorType,AnnotationEditorUIManager:()=>AnnotationEditorUIManager,AnnotationLayer:()=>AnnotationLayer$1,AnnotationMode:()=>AnnotationMode,ColorPicker:()=>ColorPicker,DOMSVGFactory:()=>DOMSVGFactory,DrawLayer:()=>DrawLayer,FeatureTest:()=>util_FeatureTest,GlobalWorkerOptions:()=>GlobalWorkerOptions,ImageKind:()=>util_ImageKind,InvalidPDFException:()=>InvalidPDFException,MissingPDFException:()=>MissingPDFException,OPS:()=>OPS,OutputScale:()=>OutputScale,PDFDataRangeTransport:()=>PDFDataRangeTransport$1,PDFDateString:()=>PDFDateString,PDFWorker:()=>PDFWorker,PasswordResponses:()=>PasswordResponses$1,PermissionFlag:()=>PermissionFlag,PixelsPerInch:()=>PixelsPerInch,RenderingCancelledException:()=>RenderingCancelledException,TextLayer:()=>TextLayer$1,UnexpectedResponseException:()=>UnexpectedResponseException,Util:()=>Util,VerbosityLevel:()=>VerbosityLevel,XfaLayer:()=>XfaLayer,build:()=>build,createValidAbsoluteUrl:()=>createValidAbsoluteUrl,fetchData:()=>fetchData,getDocument:()=>getDocument$1,getFilenameFromUrl:()=>getFilenameFromUrl,getPdfFilenameFromUrl:()=>getPdfFilenameFromUrl,getXfaPageViewport:()=>getXfaPageViewport,isDataScheme:()=>isDataScheme,isPdfFile:()=>isPdfFile,noContextMenu:()=>noContextMenu,normalizeUnicode:()=>normalizeUnicode,setLayerDimensions:()=>setLayerDimensions,shadow:()=>shadow,version:()=>version$1});var isNodeJS=typeof process==`object`&&process+``==`[object process]`&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!==`browser`),IDENTITY_MATRIX=[1,0,0,1,0,0],FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],MAX_IMAGE_SIZE_TO_CACHE=1e7,LINE_FACTOR=1.35,Ren
vendor: 5,067 bytes, line 71
71deringIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},AnnotationEditorPrefix=`pdfjs_internal_editor_`,AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},util_ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},VerbosityLevel={ERRORS:0,WARNINGS:1,INFOS:5},OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},PasswordResponses$1={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},verbosity=VerbosityLevel.WARNINGS;function setVerbosityLevel(e){Number.isInteger(e)&&(verbosity=e)}function getVerbosityLevel(){return verbosity}function info(e){verbosity>=VerbosityLevel.INFOS&&console.log(`Info: ${e}`)}function warn(e){verbosity>=VerbosityLevel.WARNINGS&&console.log(`Warning: ${e}`)}function unreachable$1(e){throw Error(e)}function assert(e,t){e||unreachable$1(t)}function _isValidProtocol(e){switch(e?.protocol){case`http:`:case`https:`:case`ftp:`:case`mailto:`:case`tel:`:return!0;default:return!1}}function createValidAbsoluteUrl(e,t=null,n=null){if(!e)return null;try{if(n&&typeof e==`string`&&(n.addDefaultProtocol&&e.startsWith(`www.`)&&e.match(/\./g)?.length>=2&&(e=`http://${e}`),n.tryConvertEncoding))try{e=stringToUTF8String(e)}catch{}let r=t?new URL(e,t):new URL(e);if(_isValidProtocol(r))return r}catch{}return null}function shadow(e,t,n,r=!1){return Object.defineProperty(e,t,{value:n,enumerable:!r,configurable:!0,writable:!1}),n}var BaseException=function(){function e(e,t){this.message=e,this.name=t}return e.prototype=Error(),e.constructor=e,e}(),PasswordException=class extends BaseException{constructor(e,t){super(e,`PasswordException`),this.code=t}},UnknownErrorException=class extends BaseException{constructor(e,t){super(e,`UnknownErrorException`),this.details=t}},InvalidPDFException=class extends BaseException{constructor(e){super(e,`InvalidPDFException`)}},MissingPDFException=class extends BaseException{constructor(e){super(e,`MissingPDFException`)}},UnexpectedResponseException=class extends BaseException{constructor(e,t){super(e,`UnexpectedResponseException`),this.status=t}},FormatError=class extends BaseException{constructor(e){super(e,`FormatError`)}},AbortException=class extends BaseException{constructor(e){super(e,`AbortException`)}};function bytesToString(e){(typeof e!=`object`||e?.length===void 0)&&unreachable$1(`Invalid argument for bytesToString`);let t=e.length,n=8192;if(t<n)return String.fromCharCode.apply(null,e);let r=[];for(let i=0;i<t;i+=n){let a=Math.min(i+n,t),o=e.subarray(i,a);
71r.push(String.fromCharCode.apply(null,o))}return r.join(``)}function stringToBytes(e){typeof e!=`string`&&unreachable$1(`Invalid argument for stringToBytes`);let t=e.length,n=new Uint8Array(t);for(let r=0;r<t;++r)n[r]=e.charCodeAt(r)&255;return n}function string32(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255)}function objectFromMap(e){let t=Object.create(null);for(let[n,r]of e)t[n]=r;return t}function isLittleEndian(){let e=new Uint8Array(4);return e[0]=1,new Uint32Array(e.buffer,0,1)[0]===1}function isEvalSupported(){try{return Function(``),!0}catch{return!1}}var util_FeatureTest=class{static get isLittleEndian(){return shadow(this,`isLittleEndian`,isLittleEndian())}static get isEvalSupported(){return shadow(this,`isEvalSupported`,isEvalSupported())}static get isOffscreenCanvasSupported(){return shadow(this,`isOffscreenCanvasSupported`,typeof OffscreenCanvas<`u`)}static get platform(){return typeof navigator<`u`&&typeof navigator?.platform==`string`?shadow(this,`platform`,{isMac:navigator.platform.includes(`Mac`),isWindows:navigator.platform.includes(`Win`),isFirefox:typeof navigator?.userAgent==`string`&&navigator.userAgent.includes(`Firefox`)}):shadow(this,`platform`,{isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){return shadow(this,`isCSSRoundSupported`,globalThis.CSS?.supports?.(`width: round(1.5px, 1px)`))}},hexNumbers=Array.from(Array(256).keys(),e=>e.toString(16).padStart(2,`0`)),Util=class e{static makeHexColor(e,t,n){return`#${hexNumbers[e]}${hexNumbers[t]}${hexNumbers[n]}`}static scaleMinMax(e,t){let n;e[0]?(e[0]<0&&(n=t[0],t[0]=t[2],t[2]=n),t[0]*=e[0],t[2]*=e[0],e[3]<0&&(n=t[1],t[1]=t[3],t[3]=n),t[1]*=e[3],t[3]*=e[3]):(n=t[0],t[0]=t[1],t[1]=n,n=t[2],t[2]=t[3],t[3]=n,e[1]<0&&(n=t[1],t[1]=t[3],t[3]=n),t[1]*=e[1],t[3]*=e[1],e[2]<0&&(n=t[0],t[0]=t[2],t[2]=n),t[0]*=e[2],t[2]*=e[2]),t[0]+=e[4],t[1]+=e[5],t[2]+=e[4],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){let n=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/n,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/n]}static getAxialAlignedBoundingBox(e,t){let n=this.applyTransform(e,t),r=this.applyTransform(e.slice(2,4),t),i=this.applyTransform([e[0],e[3]],t),a=this.applyTransform([e[2],e[1]],t);return[Math.min(n[0],r[0],i[0],a[0]),Math.min(n[1],r[1],i[1],a[1]),Math.max(n[0],r[0],i[0],a[0]),Math.max(n[1],r[1],i[1],a[1])]}static inverseTransform(e){let t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){let t=[e[0],e[2],e[1],e[3]],n=e[0]*t[0]+e[1]*t[2],r=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],a=e[2]*t[1]+e[3]*t[3],o=(n+a)/2,c=Math.sqrt((n+a)**2-4*(n*a-i*r))/2,u=o+c||1,K=o-c||1;return[Math.sqrt(u),Math.sqrt(K)]}static normalizeRect(e){let t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){let n=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),r=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(n>r)return null;let i=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),a=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return i>a?null:[n,i,r,a]}static bezierBoundingBox(t,n,r,i,a,o,c,u,K){return K?(K[0]=Math.min(K[0],t,c),K[1]=Math.min(K[1],n,u),K[2]=Math.max(K[2],t,c),K[3]=Math.max(K[3],n,u)):K=[Math.min(t,c),Math.min(n,u),Math.max(t,c),Math.max(n,u)],_assertClassBrand(e,this,_getExtremum).call(this,t,r,a,c,n,i,o,u,3*(-t+3*(r-a)+c),6*(t-2*r+a),3*(r-t),K),_assertClassBrand(e,this,_getExtremum).call(this,t,r,a,c,n,i,o,u,3*(-n+3*(i-o)+u),6*(n-2*i+o),3*(i-n),K),K}};_Util=Util;function _getExtremumOnCurve(e,t,n,r,i,a,o,c,u,K){if(u<=0||u>=1)return;let Y=1-u,X=u*u,ee=X*u,te=Y*(Y*(Y*e+3*u*t)+3*X*n)+ee*r,ce=Y*(Y*(Y*i+3*u*a)+3*X*o)+ee*c;K[0]=Math.min(K[0],te),K[1]=Math.min(K[1],ce),K[2]=Math.max(K[2],te),K[3]=Math.max(K[3],ce)}function _getExtremum(e,t,n,r,i,a,o,c,u,K,Y,X){if(Math.abs(u)<1e-12){Math.abs(K)>=1e-12&&_assertClassBrand(_Util,this,_getExtremumOnCurve).call(this,e,t,n,r,i,a,o,c,-Y/K,X);return}let ee=K**2-4*Y*u;if(ee<0)return;let te=Math.sqrt(ee),ce=2*u;_assertClassBrand(_Util,this,_getExtremumOnCurve).call(this,e,t,n,r,i,a,o,c,(-K+te)/ce,X),_assertClassBrand(_Util,this,_getExtremumOnCurve).call(this,e,t,n,r,i,a,o,c,(-K-te)/ce,X)}function stringToUTF8String(e){return decodeURIComponent(escape(e))}var NormalizeRegex=null,NormalizationMap=null;function normalizeUnicode(e){return NormalizeRegex||(NormalizeRegex=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,NormalizationMap=new Map([[`ſt`,`ſt`]])),e.replaceAll(NormalizeRegex,(e,t,n)=>t?t.normalize(`NFKC`):NormalizationMap.get(n))}function getUuid(){if(typeof crypto<`u`&&typeof crypto?.randomUUID==`function`)return crypto.randomUUID();let e=new Uint8Array(32);if(typeof crypto<`u`&&typeof crypto?.getRandomValues==`function`)crypto.getRandomValues(e);else for(let t=0;t<32;t++)e[t]=Math.floor(Math.random()*255);return bytesToString(e)}var AnnotationPrefix=`pdfjs_internal_id_`,FontRenderOps={BEZIER_CURVE_TO:0,MOVE_TO:1,LINE_TO:2,QUADRATIC_CURVE_TO:3,RESTORE:4,SAVE:5,SCALE:6,TRANSFORM:7,TRANSLATE:8};function toBase64Util(e){return Uint8Array.prototype.toBase64?e.toBase64():btoa(bytesToString(e))}var SVG_NS=`http://www.w3.org/2000/svg`,PixelsPerInch=class{};_PixelsPerInch=PixelsPerInch,_defineProperty$6(PixelsPerInch,`CSS`,96),_defineProperty$6(PixelsPerInch,`PDF`,72),_defineProperty$6(PixelsPerInch,`PDF_TO_CSS_UNITS`,_PixelsPerInch.CSS/_PixelsPerInch.PDF);async function fetchData(e,t=`text`){if(isValidFetchUrl(e,document.baseURI)){let n=await fetch(e);if(!n.ok)throw Error(n.statusText);switch(t){case`arraybuffer`:return n.arrayBuffer();case`blob`:return n.blob();case`json`:return n.json()}return n.text()}return new Promise((n,r)=>{let i=new XMLHttpRequest;i.open(`GET`,e,!0),i.responseType=t,i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(i.status===200||i.status===0){switch(t){case`arraybuffer`:case`blob`:case`json`:n(i.response);return}n(i.responseText);return}r(Error(i.statusText))}},i.send(null)})}var PageViewport=class e{constructor({viewBox:e,scale:t,rotation:n,offsetX:r=0,offsetY:i=0,dontFlip:a=!1}){this.viewBox=e,this.scale=t,this.rotation=n,this.offsetX=r,this.offsetY=i;let o=(e[2]+e[0])/2,c=(e[3]+e[1])/2,u,K,Y,X;switch(n%=360,n<0&&(n+=360),n){case 180:u=-1,K=0,Y=0,X=1;break;case 90:u=0,K=1,Y=1,X=0;break;case 270:u=0,K=-1,Y=-1,X=0;break;case 0:u=1,K=0,Y=0,X=-1;break;default:throw Error(`PageViewport: Invalid rotation, must be a multiple of 90 degrees.`)}a&&(Y=-Y,X=-X);let ee,te,ce,ue;u===0?(ee=Math.abs(c-e[1])*t+r,te=Math.abs(o-e[0])*t+i,ce=(e[3]-e[1])*t,ue=(e[2]-e[0])*t):(ee=Math.abs(o-e[0])*t+r,te=Math.abs(c-e[1])*t+i,ce=(e[2]-e[0])*t,ue=(e[3]-e[1])*t),this.transform=[u*t,K*t,Y*t,X*t,ee-u*t*o-Y*t*c,te-K*t*o-X*t*c],this.width=ce,this.height=ue}get rawDims(){let{viewBox:e}=this;return shadow(this,`rawDims`,{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone({scale:t=this.scale,rotation:n=this.rotation,offsetX:r=this.offsetX,offsetY:i=this.offsetY,dontFlip:a=!1}={}){return new e({viewBox:this.viewBox.slice(),scale:t,rotation:n,offsetX:r,offsetY:i,dontFlip:a})}convertToViewportPoint(e,t){return Util.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){let t=Util.applyTransform([e[0],e[1]],this.transform),n=Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],n[0],n[1]]}convertToPdfPoint(e,t){return Util.applyInverseTransform([e,t],this.transform)}},RenderingCancelledException=class extends BaseException{constructor(e,t=0){super(e,`RenderingCancelledException`),this.extraDelay=t}};function isDataScheme(e){let t=e.length,n=0;for(;n<t&&e[n].trim()===``;)n++;return e.substring(n,n+5).toLowerCase()===`data:`}function isPdfFile(e){return typeof e==`string`&&/\.pdf$/i.test(e)}function getFilenameFromUrl(e){return[e]=e.split(/[#?]/,1),e.substring(e.lastIndexOf(`/`)+1)}function getPdfFilenameFromUrl(e,t=`document.pdf`){if(typeof e!=`string`)return t;if(isDataScheme(e))return warn(`getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.`),t;let n=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,r=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,i=n.exec(e),a=r.exec(i[1])||r.exec(i[2])||r.exec(i[3]);if(a&&(a=a[0],a.includes(`%`)))try{a=r.exec(decodeURIComponent(a))[0]}catch{}return a||t}var StatTimer=class{constructor(){_defineProperty$6(this,`started`,Object.create(null)),_defineProperty$6(this,`times`,[])}time(e){e in this.started&&warn(`Timer is already running for ${e}`),this.started[e]=Date.now()}timeEnd(e){e in this.started||warn(`Timer has not been started for ${e}`),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){let e=[],t=0;for(let{name:e}of this.times)t=Math.max(e.length,t);for(let{name:n,start:r,end:i}of this.times)e.push(`${n.padEnd(t)} ${i-r}ms\n`);return e.join(``)}};function isValidFetchUrl(e,t){try{let{protocol:n}=t?new URL(e,t):new URL(e);return n===`http:`||n===`https:`}catch{return!1}}function noContextMenu(e){e.preventDefault()}function deprecated(e){console.log(`Deprecated API usage: `+e)}var PDFDateString=class e{static toDateObject(t){if(!t||typeof t!=`string`)return null;_assertClassBrand(e,this,_regex)._||(_regex._=_assertClassBrand(e,this,RegExp(`^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?`)));let n=_assertClassBrand(e,this,_regex)._.exec(t);if(!n)return null;let r=parseInt(n[1],10),i=parseInt(n[2],10);i=i>=1&&i<=12?i-1:0;let a=parseInt(n[3],10);a=a>=1&&a<=31?a:1;let o=parseInt(n[4],10);o=o>=0&&o<=23?o:0;let c=parseInt(n[5],10);c=c>=0&&c<=59?c:0;let u=parseInt(n[6],10);u=u>=0&&u<=59?u:0;let K=n[7]||`Z`,Y=parseInt(n[8],10);Y=Y>=0&&Y<=23?Y:0;let X=parseInt(n[9],10)||0;return X=X>=0&&X<=59?X:0,K===`-`?(o+=Y,c+=X):K===`+`&&(o-=Y,c-=X),new Date(Date.UTC(r,i,a,o,c,u))}},_regex={_:void 0};function getXfaPageViewport(e,{scale:t=1,rotation:n=0}){let{width:r,height:i}=e.attributes.style;return new PageViewport({viewBox:[0,0,parseInt(r),parseInt(i)],scale:t,rotation:n})}function getRGB(e){if(e.startsWith(`#`)){let t=parseInt(e.slice(1),16);return[(t&16711680)>>16,(t&65280)>>8,t&255]}return e.startsWith(`rgb(`)?e.slice(4,-1).split(`,`).map(e=>parseInt(e)):e.startsWith(`rgba(`)?e.slice(5,-1).split(`,`).map(e=>parseInt(e)).slice(0,3):(warn(`Not a valid color format: "${e}"`),[0,0,0])}function getColorValues(e){let t=document.createElement(`span`);t.style.visibility=`hidden`,document.body.append(t);for(let n of e.keys()){t.style.color=n;let r=window.getComputedStyle(t).color;e.set(n,getRGB(r))}t.remove()}function getCurrentTransform(e){let{a:t,b:n,c:r,d:i,e:a,f:o}=e.getTransform();return[t,n,r,i,a,o]}function getCurrentTransformInverse(e){let{a:t,b:n,c:r,d:i,e:a,f:o}=e.getTransform().invertSelf();return[t,n,r,i,a,o]}function setLayerDimensions(e,t,n=!1,r=!0){if(t instanceof PageViewport){let{pageWidth:r,pageHeight:i}=t.rawDims,{style:a}=e,o=util_FeatureTest.isCSSRoundSupported,c=`var(--scale-factor) * ${r}px`,u=`var(--scale-factor) * ${i}px`,K=o?`round(down, ${c}, var(--scale-round-x, 1px))`:`calc(${c})`,Y=o?`round(down, ${u}, var(--scale-round-y, 1px))`:`calc(${u})`;!n||t.rotation%180==0?(a.width=K,a.height=Y):(a.width=Y,a.height=K)}r&&e.setAttribute(`data-main-rotation`,t.rotation)}var OutputScale=class{constructor(){let e=window.devicePixelRatio||1;this.sx=e,this.sy=e}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}}
71,_toolbar=new WeakMap,_colorPicker=new WeakMap,_editor=new WeakMap,_buttons=new WeakMap,_altText=new WeakMap,_EditorToolbar_brand=new WeakSet,EditorToolbar=class{constructor(e){_classPrivateMethodInitSpec(this,_EditorToolbar_brand),_classPrivateFieldInitSpec(this,_toolbar,null),_classPrivateFieldInitSpec(this,_colorPicker,null),_classPrivateFieldInitSpec(this,_editor,void 0),_classPrivateFieldInitSpec(this,_buttons,null),_classPrivateFieldInitSpec(this,_altText,null),_classPrivateFieldSet2(_editor,this,e),_l10nRemove._||=Object.freeze({freetext:`pdfjs-editor-remove-freetext-button`,highlight:`pdfjs-editor-remove-highlight-button`,ink:`pdfjs-editor-remove-ink-button`,stamp:`pdfjs-editor-remove-stamp-button`})}render(){let e=_classPrivateFieldSet2(_toolbar,this,document.createElement(`div`));e.classList.add(`editToolbar`,`hidden`),e.setAttribute(`role`,`toolbar`);let t=_classPrivateFieldGet2(_editor,this)._uiManager._signal;e.addEventListener(`contextmenu`,noContextMenu,{signal:t}),e.addEventListener(`pointerdown`,_pointerDown,{signal:t});let n=_classPrivateFieldSet2(_buttons,this,document.createElement(`div`));n.className=`buttons`,e.append(n);let r=_classPrivateFieldGet2(_editor,this).toolbarPosition;if(r){let{style:t}=e;t.insetInlineEnd=`${100*(_classPrivateFieldGet2(_editor,this)._uiManager.direction===`ltr`?1-r[0]:r[0])}%`,t.top=`calc(${100*r[1]}% + var(--editor-toolbar-vert-offset))`}return _assertClassBrand(_EditorToolbar_brand,this,_addDeleteButton).call(this),e}get div(){return _classPrivateFieldGet2(_toolbar,this)}hide(){_classPrivateFieldGet2(_toolbar,this).classList.add(`hidden`),_classPrivateFieldGet2(_colorPicker,this)?.hideDropdown()}show(){_classPrivateFieldGet2(_toolbar,this).classList.remove(`hidden`),_classPrivateFieldGet2(_altText,this)?.shown()}async addAltText(e){let t=await e.render();_assertClassBrand(_EditorToolbar_brand,this,_addListenersToElement).call(this,t),_classPrivateFieldGet2(_buttons,this).prepend(t,_get_divider.call(_assertClassBrand(_EditorToolbar_brand,this))),_classPrivateFieldSet2(_altText,this,e)}addColorPicker(e){_classPrivateFieldSet2(_colorPicker,this,e);let t=e.renderButton();_assertClassBrand(_EditorToolbar_brand,this,_addListenersToElement).call(this,t),_classPrivateFieldGet2(_buttons,this).prepend(t,_get_divider.call(_assertClassBrand(_EditorToolbar_brand,this)))}remove(){_classPrivateFieldGet2(_toolbar,this).remove(),_classPrivateFieldGet2(_colorPicker,this)?.destroy(),_classPrivateFieldSet2(_colorPicker,this,null)}};function _pointerDown(e){e.stopPropagation()}function _focusIn(e){_classPrivateFieldGet2(_editor,this)._focusEventsAllowed=!1,e.preventDefault(),e.stopPropagation()}function _focusOut(e){_classPrivateFieldGet2(_editor,this)._focusEventsAllowed=!0,e.preventDefault(),e.stopPropagation()}function _addListenersToElement(e){let t=_classPrivateFieldGet2(_editor,this)._uiManager._signal;e.addEventListener(`focusin`,_assertClassBrand(_EditorToolbar_brand,this,_focusIn).bind(this),{capture:!0,signal:t}),e.addEventListener(`focusout`,_assertClassBrand(_EditorToolbar_brand,this,_focusOut).bind(this),{capture:!0,signal:t}),e.addEventListener(`contextmenu`,noContextMenu,{signal:t})}function _addDeleteButton(){let{editorType:e,_uiManager:t}=_classPrivateFieldGet2(_editor,this),n=document.createElement(`button`);n.className=`delete`,n.tabIndex=0,n.setAttribute(`data-l10n-id`,_l10nRemove._[e]),_assertClassBrand(_EditorToolbar_brand,this,_addListenersToElement).call(this,n),n.addEventListener(`click`,e=>{t.delete()},{signal:t._signal}),_classPrivateFieldGet2(_buttons,this).append(n)}function _get_divider(){let e=document.createElement(`div`);return e.className=`divider`,e}var _l10nRemove={_:null},_buttons2=new WeakMap,_toolbar2=new WeakMap,_uiManager2=new WeakMap,_HighlightToolbar_brand=new WeakSet,HighlightToolbar=class{constructor(e){_classPrivateMethodInitSpec(this,_HighlightToolbar_brand),_classPrivateFieldInitSpec(this,_buttons2,null),_classPrivateFieldInitSpec(this,_toolbar2,null),_classPrivateFieldInitSpec(this,_uiManager2,void 0),_classPrivateFieldSet2(_uiManager2,this,e)}show(e,t,n){let[r,i]=_assertClassBrand(_HighlightToolbar_brand,this,_getLastPoint).call(this,t,n),{style:a}=_classPrivateFieldGet2(_toolbar2,this)||_classPrivateFieldSet2(_toolbar2,this,_assertClassBrand(_HighlightToolbar_brand,this,_render).call(this));e.append(_classPrivateFieldGet2(_toolbar2,this)),a.insetInlineEnd=`${100*r}%`,a.top=`calc(${100*i}% + var(--editor-toolbar-vert-offset))`}hide(){_classPrivateFieldGet2(_toolbar2,this).remove()}};function _render(){let e=_classPrivateFieldSet2(_toolbar2,this,document.createElement(`div`));e.className=`editToolbar`,e.setAttribute(`role`,`toolbar`),e.addEventListener(`contextmenu`,noContextMenu,{signal:_classPrivateFieldGet2(_uiManager2,this)._signal});let t=_classPrivateFieldSet2(_buttons2,this,document.createElement(`div`));return t.className=`buttons`,e.append(t),_assertClassBrand(_HighlightToolbar_brand,this,_addHighlightButton).call(this),e}function _getLastPoint(e,t){let n=0,r=0;for(let i of e){let e=i.y+i.height;if(e<n)continue;let a=i.x+(t?i.width:0);if(e>n){r=a,n=e;continue}t?a>r&&(r=a):a<r&&(r=a)}return[t?1-r:r,n]}function _addHighlightButton(){let e=document.createElement(`button`);e.className=`highlightButton`,e.tabIndex=0,e.setAttribute(`data-l10n-id`,`pdfjs-highlight-floating-button1`);let t=document.createElement(`span`);e.append(t),t.className=`visuallyHidden`,t.setAttribute(`data-l10n-id`,`pdfjs-highlight-floating-button-label`);let n=_classPrivateFieldGet2(_uiManager2,this)._signal;e.addEventListener(`contextmenu`,noContextMenu,{signal:n}),e.addEventListener(`click`,()=>{_classPrivateFieldGet2(_uiManager2,this).highlightSelection(`floating_button`)},{signal:n}),_classPrivateFieldGet2(_buttons2,this).append(e)}
71function bindEvents(e,t,n){for(let r of n)t.addEventListener(r,e[r].bind(e))}function opacityToHex(e){return Math.round(Math.min(255,Math.max(1,255*e))).toString(16).padStart(2,`0`)}var _id=new WeakMap,IdManager=class{constructor(){_classPrivateFieldInitSpec(this,_id,0)}get id(){var e,t;return`${AnnotationEditorPrefix}${_classPrivateFieldSet2(_id,this,(e=_classPrivateFieldGet2(_id,this),t=e++,e)),t}`}},_baseId=new WeakMap,_id2=new WeakMap,_cache=new WeakMap,_ImageManager_brand=new WeakSet,ImageManager=class{constructor(){_classPrivateMethodInitSpec(this,_ImageManager_brand),_classPrivateFieldInitSpec(this,_baseId,getUuid()),_classPrivateFieldInitSpec(this,_id2,0),_classPrivateFieldInitSpec(this,_cache,null)}static get _isSVGFittingCanvas(){let e=`data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>`,t=new OffscreenCanvas(1,3).getContext(`2d`,{willReadFrequently:!0}),n=new Image;n.src=`data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>`;let r=n.decode().then(()=>(t.drawImage(n,0,0,1,1,0,0,1,3),new Uint32Array(t.getImageData(0,0,1,1).data.buffer)[0]===0));return shadow(this,`_isSVGFittingCanvas`,r)}async getFromFile(e){let{lastModified:t,name:n,size:r,type:i}=e;return _assertClassBrand(_ImageManager_brand,this,_get).call(this,`${t}_${n}_${r}_${i}`,e)}async getFromUrl(e){return _assertClassBrand(_ImageManager_brand,this,_get).call(this,e,e)}async getFromBlob(e,t){let n=await t;return _assertClassBrand(_ImageManager_brand,this,_get).call(this,e,n)}async getFromId(e){_classPrivateFieldGet2(_cache,this)||_classPrivateFieldSet2(_cache,this,new Map);let t=_classPrivateFieldGet2(_cache,this).get(e);if(!t)return null;if(t.bitmap)return t.refCounter+=1,t;if(t.file)return this.getFromFile(t.file);if(t.blobPromise){let{blobPromise:e}=t;return delete t.blobPromise,this.getFromBlob(t.id,e)}return this.getFromUrl(t.url)}getFromCanvas(e,t){var n,r;_classPrivateFieldGet2(_cache,this)||_classPrivateFieldSet2(_cache,this,new Map);let i=_classPrivateFieldGet2(_cache,this).get(e);if(i?.bitmap)return i.refCounter+=1,i;let a=new OffscreenCanvas(t.width,t.height);return a.getContext(`2d`).drawImage(t,0,0),i={bitmap:a.transferToImageBitmap(),id:`image_${_classPrivateFieldGet2(_baseId,this)}_${_classPrivateFieldSet2(_id2,this,(n=_classPrivateFieldGet2(_id2,this),r=n++,n)),r}`,refCounter:1,isSvg:!1},_classPrivateFieldGet2(_cache,this).set(e,i),_classPrivateFieldGet2(_cache,this).set(i.id,i),i}getSvgUrl(e){let t=_classPrivateFieldGet2(_cache,this).get(e);return t?.isSvg?t.svgUrl:null}deleteId(e){_classPrivateFieldGet2(_cache,this)||_classPrivateFieldSet2(_cache,this,new Map);let t=_classPrivateFieldGet2(_cache,this).get(e);if(!t||(--t.refCounter,t.refCounter!==0))return;let{bitmap:n}=t;if(!t.url&&!t.file){let e=new OffscreenCanvas(n.width,n.height);e.getContext(`bitmaprenderer`).transferFromImageBitmap(n),t.blobPromise=e.convertToBlob()}n.close?.(),t.bitmap=null}isValidId(e){return e.startsWith(`image_${_classPrivateFieldGet2(_baseId,this)}_`)}};_ImageManager=ImageManager;async function _get(e,t){_classPrivateFieldGet2(_cache,this)||_classPrivateFieldSet2(_cache,this,new Map);let n=_classPrivateFieldGet2(_cache,this).get(e);if(n===null)return null;if(n?.bitmap)return n.refCounter+=1,n;try{var r,i;n||={bitmap:null,id:`image_${_classPrivateFieldGet2(_baseId,this)}_${_classPrivateFieldSet2(_id2,this,(r=_classPrivateFieldGet2(_id2,this),i=r++,r)),i}`,refCounter:0,isSvg:!1};let e;if(typeof t==`string`?(n.url=t,e=await fetchData(t,`blob`)):t instanceof File?e=n.file=t:t instanceof Blob&&(e=t),e.type===`image/svg+xml`){let t=_ImageManager._isSVGFittingCanvas,r=new FileReader,i=new Image,a=new Promise((e,a)=>{i.onload=()=>{n.bitmap=i,n.isSvg=!0,e()},r.onload=async()=>{let e=n.svgUrl=r.result;i.src=await t?`${e}#svgView(preserveAspectRatio(none))`:e},i.onerror=r.onerror=a});r.readAsDataURL(e),await a}else n.bitmap=await createImageBitmap(e);n.refCounter=1}catch(e){console.error(e),n=null}return _classPrivateFieldGet2(_cache,this).set(e,n),n&&_classPrivateFieldGet2(_cache,this).set(n.id,n),n}var _commands=new WeakMap,_locked=new WeakMap,_maxSize=new WeakMap,_position=new WeakMap,CommandManager=class{constructor(e=128){_classPrivateFieldInitSpec(this,_commands,[]),_classPrivateFieldInitSpec(this,_locked,!1),_classPrivateFieldInitSpec(this,_maxSize,void 0),_classPrivateFieldInitSpec(this,_position,-1),_classPrivateFieldSet2(_maxSize,this,e)}add({cmd:e,undo:t,post:n,mustExec:r,type:i=NaN,overwriteIfSameType:a=!1,keepUndo:o=!1}){if(r&&e(),_classPrivateFieldGet2(_locked,this))return;let c={cmd:e,undo:t,post:n,type:i};if(_classPrivateFieldGet2(_position,this)===-1){_classPrivateFieldGet2(_commands,this).length>0&&(_classPrivateFieldGet2(_commands,this).length=0),_classPrivateFieldSet2(_position,this,0),_classPrivateFieldGet2(_commands,this).push(c);return}if(a&&_classPrivateFieldGet2(_commands,this)[_classPrivateFieldGet2(_position,this)].type===i){o&&(c.undo=_classPrivateFieldGet2(_commands,this)[_classPrivateFieldGet2(_position,this)].und
71o),_classPrivateFieldGet2(_commands,this)[_classPrivateFieldGet2(_position,this)]=c;return}let u=_classPrivateFieldGet2(_position,this)+1;u===_classPrivateFieldGet2(_maxSize,this)?_classPrivateFieldGet2(_commands,this).splice(0,1):(_classPrivateFieldSet2(_position,this,u),u<_classPrivateFieldGet2(_commands,this).length&&_classPrivateFieldGet2(_commands,this).splice(u)),_classPrivateFieldGet2(_commands,this).push(c)}undo(){if(_classPrivateFieldGet2(_position,this)===-1)return;_classPrivateFieldSet2(_locked,this,!0);let{undo:e,post:t}=_classPrivateFieldGet2(_commands,this)[_classPrivateFieldGet2(_position,this)];e(),t?.(),_classPrivateFieldSet2(_locked,this,!1),_classPrivateFieldSet2(_position,this,_classPrivateFieldGet2(_position,this)-1)}redo(){if(_classPrivateFieldGet2(_position,this)<_classPrivateFieldGet2(_commands,this).length-1){_classPrivateFieldSet2(_position,this,_classPrivateFieldGet2(_position,this)+1),_classPrivateFieldSet2(_locked,this,!0);let{cmd:e,post:t}=_classPrivateFieldGet2(_commands,this)[_classPrivateFieldGet2(_position,this)];e(),t?.(),_classPrivateFieldSet2(_locked,this,!1)}}hasSomethingToUndo(){return _classPrivateFieldGet2(_position,this)!==-1}hasSomethingToRedo(){return _classPrivateFieldGet2(_position,this)<_classPrivateFieldGet2(_commands,this).length-1}destroy(){_classPrivateFieldSet2(_commands,this,null)}},_KeyboardManager_brand=new WeakSet,KeyboardManager=class{constructor(e){_classPrivateMethodInitSpec(this,_KeyboardManager_brand),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;let{isMac:t}=util_FeatureTest.platform;for(let[n,r,i={}]of e)for(let e of n){let n=e.startsWith(`mac+`);t&&n?(this.callbacks.set(e.slice(4),{callback:r,options:i}),this.allKeys.add(e.split(`+`).at(-1))):!t&&!n&&(this.callbacks.set(e,{callback:r,options:i}),this.allKeys.add(e.split(`+`).at(-1)))}}exec(e,t){if(!this.allKeys.has(t.key))return;let n=this.callbacks.get(_assertClassBrand(_KeyboardManager_brand,this,_serialize).call(this,t));if(!n)return;let{callback:r,options:{bubbles:i=!1,args:a=[],checker:o=null}}=n;(!o||o(e,t))&&(r.bind(e,...a,t)(),i||(t.stopPropagation(),t.preventDefault()))}};function _serialize(e){e.altKey&&this.buffer.push(`alt`),e.ctrlKey&&this.buffer.push(`ctrl`),e.metaKey&&this.buffer.push(`meta`),e.shiftKey&&this.buffer.push(`shift`),this.buffer.push(e.key);let t=this.buffer.join(`+`);return this.buffer.length=0,t}var ColorManager=class e{get _colors(){let e=new Map([[`CanvasText`,null],[`Canvas`,null]]);return getColorValues(e),shadow(this,`_colors`,e)}convert(t){let n=getRGB(t);if(!window.matchMedia(`(forced-colors: active)`).matches)return n;for(let[t,r]of this._colors)if(r.every((e,t)=>e===n[t]))return e._colorsMapping.get(t);return n}getHexCode(e){let t=this._colors.get(e);return t?Util.makeHexColor(...t):e}};_defineProperty$6(ColorManager,`_colorsMapping`,new Map([[`CanvasText`,[0,0,0]],[`Canvas`,[255,255,255]]]));var _abortController=new WeakMap,_activeEditor=new WeakMap,_allEditors=new WeakMap,_allLayers=new WeakMap,_altTextManager=new WeakMap,_annotationStorage=new WeakMap,_changedExistingAnnotations=new WeakMap,_commandManager=new WeakMap,_copyPasteAC=new WeakMap,_currentPageIndex=new WeakMap,_deletedAnnotationsElementIds=new WeakMap,_draggingEditors=new WeakMap,_editorTypes=new WeakMap,_editorsToRescale=new WeakMap,_enableHighlightFloatingButton=new WeakMap,_enableUpdatedAddImage=new WeakMap,_enableNewAltTextWhenAddingImage=new WeakMap,_filterFactory=new WeakMap,_focusMainContainerTimeoutId=new WeakMap,_focusManagerAC=new WeakMap,_highlightColors=new WeakMap,_highlightWhenShiftUp=new WeakMap,_highlightToolbar=new WeakMap,_idManager=new WeakMap,_isEnabled=new WeakMap,_isWaiting=new WeakMap,_keyboardManagerAC=new WeakMap,_lastActiveElement=new WeakMap,_mainHighlightColorPicker=new WeakMap,_mlManager=new WeakMap,_mode=new WeakMap,_selectedEditors=new WeakMap,_selectedTextNode=new WeakMap,_pageColors=new WeakMap,_showAllStates=new WeakMap,_previousStates=new WeakMap,_translation=new WeakMap,_translationTimeoutId=new WeakMap,_container=new WeakMap,_viewer=new WeakMap,_updateModeCapability=new WeakMap,_AnnotationEditorUIManager_brand=new WeakSet,AnnotationEditorUIManager=class e{static get _keyboardManager(){let t=e.prototype,n=e=>_classPrivateFieldGet2(_container,e).contains(document.activeElement)&&document.activeElement.tagName!==`BUTTON`&&e.hasSomethingToControl(),r=(e,{target:t})=>{if(t instanceof HTMLInputElement){let{type:e}=t;return e!==`text`&&e!==`number`}return!0},i=this.TRANSLATE_SMALL,a=this.TRANSLATE_BIG;return shadow(this,`_keyboardManager`,new KeyboardManager([[[`ctrl+a`,`mac+meta+a`],t.selectAll,{checker:r}],[[`ctrl+z`,`mac+meta+z`],t.undo,{checker:r}],[[`ctrl+y`,`ctrl+shift+z`,`mac+meta+shift+z`,`ctrl+shift+Z`,`mac+meta+shift+Z`],t.redo,{checker:r}],[[`Backspace`,`alt+Backspace`,`ctrl+Backspace`,`shift+Backspace`,`mac+Backspace`,`mac+alt+Backspace`,`mac+ctrl+Backspace`,`Delete`,`ctrl+Delete`,`shift+Delete`,`mac+Delete`],t.delete,{checker:r}],[[`Enter`,`mac+Enter`],t.addNewEditorFromKeyboard,{checker:(e,{target:t})=>!(t instanceof HTMLButtonElement)&&_classPrivateFieldGet2(_container,e).contains(t)&&!e.isEnterHandled}],[[` `,`mac+ `],t.addNewEditorFromKeyboard,{checker:(e,{target:t})=>!(t instanceof HTMLButtonElement)&&_classPrivateFieldGet2(_container,e).contains(document.activeElement)}],[[`Escape`,`mac+Escape`],t.unselectAll],[[`ArrowLeft`,`mac+ArrowLeft`],t.translateSelectedEditors,{args:[-i,0],checker:n}],[[`ctrl+ArrowLeft`,`mac+shift+ArrowLeft`],t.translateSelectedEditors,{args:[-a,0],checker:n}],[[`ArrowRight`,`mac+ArrowRight`],t.translateSelectedEditors,{args:[i,0],checker:n}],[[`ctrl+ArrowRight`,`mac+shift+ArrowRight`],t.translateSelectedEditors,{args:[a,0],checker:n}],[[`ArrowUp`,`mac+ArrowUp`],t.translateSelectedEditors,{args:[0,-i],checker:n}],[[`ctrl+ArrowUp`,`mac+shift+ArrowUp`],t.translateSelectedEditors,{args:[0,-a],checker:n}],[[`ArrowDown`,`mac+ArrowDown`],t.translateSelectedEditors,{args:[0,i],checker:n}],[[`ctrl+ArrowDown`,`mac+shift+ArrowDown`],t.translateSelectedEditors,{args:[0,a],checker:n}]]))}constructor(e,t,n,r,i,a,o,c,u,K,Y){_classPrivateMethodInitSpec(this,_AnnotationEditorUIManager_brand),_classPrivateFieldInitSpec(this,_abortController,new AbortController),_classPrivateFieldInitSpec(this,_activeEditor,null),_classPrivateFieldInitSpec(this,_allEditors,new Map),_classPrivateFieldInitSpec(this,_allLayers,new Map),_classPrivateFieldInitSpec(this,_altTextManager,null),_classPrivateFieldInitSpec(this,_annotationStorage,null),_classPrivateFieldInitSpec(this,_changedExistingAnnotations,null),_classPrivateFieldInitSpec(this,_commandManager,new CommandManager),_classPrivateFieldInitSpec(this,_copyPasteAC,null),_classPrivateFieldInitSpec(this,_currentPageIndex,0),_classPrivateFieldInitSpec(this,_deletedAnnotationsElementIds,new Set),_classPrivateFieldInitSpec(this,_draggingEditors,null),_classPrivateFieldInitSpec(this,_editorTypes,null),_classPrivateFieldInitSpec(this,_editorsToRescale,new Set),_classPrivateFieldInitSpec(this,_enableHighlightFloatingButton,!1),_classPrivateFieldInitSpec(this,_enableUpdatedAddImage,!1),_classPrivateFieldInitSpec(this,_enableNewAltTextWhenAddingImage,!1),_classPrivateFieldInitSpec(this,_filterFactory,null),_classPrivateFieldInitSpec(this,_focusMainContainerTimeoutId,null),_classPrivateFieldInitSpec(this,_focusManagerAC,null),_classPrivateFieldInitSpec(this,_highlightColors,null),_classPrivateFieldInitSpec(this,_highlightWhenShiftUp,!1),_classPrivateFieldInitSpec(this,_highlightToolbar,null),_classPrivateFieldInitSpec(this,_idManager,new IdManager),_classPrivateFieldInitSpec(this,_isEnabled,!1),_classPrivateFieldInitSpec(this,_isWaiting,!1),_classPrivateFieldInitSpec(this,_keyboardManagerAC,null),_classPrivateFieldInitSpec(this,_lastActiveElement,null),_classPrivateFieldInitSpec(this,_mainHighlightColorPicker,null),_classPrivateFieldInitSpec(this,_mlManager,null),_classPrivateFieldInitSpec(this,_mode,AnnotationEditorType.NONE),_classPrivateFieldInitSpec(this,_selectedEditors,new Set),_classPrivateFieldInitSpec(this,_selectedTextNode,null),_classPrivateFieldInitSpec(this,_pageColors,null),_classPrivateFieldInitSpec(this,_showAllStates,null),_classPrivateFieldInitSpec(this,_previousStates,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1}),_classPrivateFieldInitSpec(this,_translation,[0,0]),_classPrivateFieldInitSpec(this,_translationTimeoutId,null),_classPrivateFieldInitSpec(this,_container,null),_classPrivateFieldInitSpec(this,_viewer,null),_classPrivateFieldInitSpec(this,_updateModeCapability,null);let X=this._signal=_classPrivateFieldGet2(_abortController,this).signal;_classPrivateFieldSet2(_container,this,e),_classPrivateFieldSet2(_viewer,this,t),_classPrivateFieldSet2(_altTextManager,this,n),this._eventBus=r,r._on(`editingaction`,this.onEditingAction.bind(this),{signal:X}),r._on(`pagechanging`,this.onPageChanging.bind(this),{signal:X}),r._on(`scalechanging`,this.onScaleChanging.bind(this),{signal:X}),r._on(`rotationchanging`,this.onRotationChanging.bind(this),{signal:X}),r._on(`setpreference`,this.onSetPreference.bind(this),{signal:X}),r._on(`switchannotationeditorparams`,e=>this.updateParams(e.type,e.value),{signal:X}),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_addSelectionListener).call(this),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_addDragAndDropListeners).call(this),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_addKeyboardManager).call(this),_classPrivateFieldSet2(_annotationStorage,this,i.annotationStorage),_classPrivateFieldSet2(_filterFactory,this,i.filterFactory),_classPrivateFieldSet2(_pageColors,this,a),_classPrivateFieldSet2(_highlightColors,this,o||null),_classPrivateFieldSet2(_enableHighlightFloatingButton,this,c),_classPrivateFieldSet2(_enableUpdatedAddImage,this,u),_classPrivateFieldSet2(_enableNewAltTextWhenAddingImage,this,K),_classPrivateFieldSet2(_mlManager,this,Y||null),this.viewParameters={realScale:PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}destroy(){_classPrivateFieldGet2(_updateModeCapability,this)?.resolve(),_classPrivateFieldSet2(_updateModeCapability,this,null),_classPrivateFieldGet2(_abortController,this)?.abort(),_classPrivateFieldSet2(_abortController,this,null),this._signal=null;for(let e of _classPrivateFieldGet2(_allLayers,this).values())e.destroy();_classPrivateFieldGet2(_allLayers,this).clear(),_classPrivateFieldGet2(_allEditors,this).clear(),_classPrivateFieldGet2(_editorsToRescale,this).clear(),_classPrivateFieldSet2(_activeEditor,this,null),_classPrivateFieldGet2(_selectedEditors,this).clear(),_classPrivateFieldGet2(_commandManager,this).destroy(),_classPrivateFieldGet2(_altTextManager,this)?.destroy(),_classPrivateFieldGet2(_highlightToolbar,this)?.hide(),_classPrivateFieldSet2(_highlightToolbar,this,null),_classPrivateFieldGet2(_focusMainContainerTimeoutId,this)&&(clearTimeout(_classPrivateFieldGet2(_focusMainContainerTimeoutId,this)),_classPrivateFieldSet2(_focusMainContainerTimeoutId,this,null)),_classPrivateFieldGet2(_translationTimeoutId,this)&&(clearTimeout(_classPrivateFieldGet2(_translationTimeoutId,this)),_classPrivateFieldSet2(_translationTimeoutId,this,null))}combinedSignal(e){return AbortSignal.any([this._signal,e.signal])}get mlManager(){return _classPrivateFieldGet2(_mlManager,this)}get useNewAltTextFlow(){return _classPrivateFieldGet2(_enableUpdatedAddImage,this)}get useNewAltTextWhenAddingImage(){return _classPrivateFieldGet2(_enableNewAltTextWhenAddingImage,this)}get hcmFilter(){return shadow(this,`hcmFilter`,_classPrivateFieldGet2(_pageColors,this)?_classPrivateFieldGet2(_filterFactory,this).addHCMFilter(_classPrivateFieldGet2(_pageColors,this).foreground,_classPrivateFieldGet2(_pageColors,this).background):`none`)}get direction(){return shadow(this,`direction`,getComputedStyle(_classPrivateFieldGet2(_container,this)).direction)}get highlightColors(){return shadow(this,`highlightColors`,_classPrivateFieldGet2(_highlightColors,this)?new Map(_classPrivateFieldGet2(_highlightColors,this).split(`,`).map(e=>e.split(`=`).map(e=>e.trim()))):null)}get highlightColorNames(){return shadow(this,`highlightColorNames`,this.highlightColors?new Map(Array.from(this.highlightColors,e=>e.reverse())):null)}setMainHighlightColorPicker(e){_classPrivateFieldSet2(_mainHighlightColorPicker,this,e)}editAltText(e,t=!1){_classPrivateFieldGet2(_altTextManager,this)?.editAltText(this,e,t)}switchToMode(e,t){this._eventBus.on(`annotationeditormodechanged`,t,{once:!0,signal:this._signal}),this._eventBus.dispatch(`showannotationeditorui`,{source:this,mode:e})}setPreference(e,t){this._eventBus.dispatch(`setpreference`,{source:this,name:e,value:t})}onSetPreference({name:e,value:t}){e===`enableNewAltTextWhenAddingImage`&&_classPrivateFieldSet2(_enableNewAltTextWhenAddingImage,this,t)}onPageChanging({pageNumber:e}){_classPrivateFieldSet2(_currentPageIndex,this,e-1)}focusMainContainer(){_classPrivateFieldGet2(_container,this).focus()}findParent(e,t){for(let n of _classPrivateFieldGet2(_allLayers,this).values()){let{x:r,y:i,width:a,height:o}=n.div.getBoundingClientRect();if(e>=r&&e<=r+a&&t>=i&&t<=i+o)return n}return null}disableUserSelect(e=!1){_classPrivateFieldGet2(_viewer,this).classList.toggle(`noUserSelect`,e)}addShouldRescale(e){_classPrivateFieldGet2(_editorsToRescale,this).add(e)}removeShouldRescale(e){_classPrivateFieldGet2(_editorsToRescale,this).delete(e)}onScaleChanging({scale:e}
71){this.commitOrRemove(),this.viewParameters.realScale=e*PixelsPerInch.PDF_TO_CSS_UNITS;for(let e of _classPrivateFieldGet2(_editorsToRescale,this))e.onScaleChanging()}onRotationChanging({pagesRotation:e}){this.commitOrRemove(),this.viewParameters.rotation=e}highlightSelection(e=``){let t=document.getSelection();if(!t||t.isCollapsed)return;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=t,o=t.toString(),c=_assertClassBrand(_AnnotationEditorUIManager_brand,this,_getAnchorElementForSelection).call(this,t).closest(`.textLayer`),u=this.getSelectionBoxes(c);if(!u)return;t.empty();let K=_assertClassBrand(_AnnotationEditorUIManager_brand,this,_getLayerForTextLayer).call(this,c),Y=_classPrivateFieldGet2(_mode,this)===AnnotationEditorType.NONE,X=()=>{K?.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:u,anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a,text:o}),Y&&this.showAllEditors(`highlight`,!0,!0)};if(Y){this.switchToMode(AnnotationEditorType.HIGHLIGHT,X);return}X()}addToAnnotationStorage(e){!e.isEmpty()&&_classPrivateFieldGet2(_annotationStorage,this)&&!_classPrivateFieldGet2(_annotationStorage,this).has(e.id)&&_classPrivateFieldGet2(_annotationStorage,this).setValue(e.id,e)}blur(){if(this.isShiftKeyDown=!1,_classPrivateFieldGet2(_highlightWhenShiftUp,this)&&(_classPrivateFieldSet2(_highlightWhenShiftUp,this,!1),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_onSelectEnd).call(this,`main_toolbar`)),!this.hasSelection)return;let{activeElement:e}=document;for(let t of _classPrivateFieldGet2(_selectedEditors,this))if(t.div.contains(e)){_classPrivateFieldSet2(_lastActiveElement,this,[t,e]),t._focusEventsAllowed=!1;break}}focus(){if(!_classPrivateFieldGet2(_lastActiveElement,this))return;let[e,t]=_classPrivateFieldGet2(_lastActiveElement,this);_classPrivateFieldSet2(_lastActiveElement,this,null),t.addEventListener(`focusin`,()=>{e._focusEventsAllowed=!0},{once:!0,signal:this._signal}),t.focus()}addEditListeners(){_assertClassBrand(_AnnotationEditorUIManager_brand,this,_addKeyboardManager).call(this),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_addCopyPasteListeners).call(this)}removeEditListeners(){_assertClassBrand(_AnnotationEditorUIManager_brand,this,_removeKeyboardManager).call(this),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_removeCopyPasteListeners).call(this)}dragOver(e){for(let{type:t}of e.dataTransfer.items)for(let n of _classPrivateFieldGet2(_editorTypes,this))if(n.isHandlingMimeForPasting(t)){e.dataTransfer.dropEffect=`copy`,e.preventDefault();return}}drop(e){for(let t of e.dataTransfer.items)for(let n of _classPrivateFieldGet2(_editorTypes,this))if(n.isHandlingMimeForPasting(t.type)){n.paste(t,this.currentLayer),e.preventDefault();return}}copy(e){if(e.preventDefault(),_classPrivateFieldGet2(_activeEditor,this)?.commitOrRemove(),!this.hasSelection)return;let t=[];for(let e of _classPrivateFieldGet2(_selectedEditors,this)){let n=e.serialize(!0);n&&t.push(n)}t.length!==0&&e.clipboardData.setData(`application/pdfjs`,JSON.stringify(t))}cut(e){this.copy(e),this.delete()}async paste(e){e.preventDefault();let{clipboardData:t}=e;for(let e of t.items)for(let t of _classPrivateFieldGet2(_editorTypes,this))if(t.isHandlingMimeForPasting(e.type)){t.paste(e,this.currentLayer);return}let n=t.getData(`application/pdfjs`);if(!n)return;try{n=JSON.parse(n)}catch(e){warn(`paste: "${e.message}".`);return}if(!Array.isArray(n))return;this.unselectAll();let r=this.currentLayer;try{let e=[];for(let t of n){let n=await r.deserialize(t);if(!n)return;e.push(n)}this.addCommands({cmd:()=>{for(let t of e)_assertClassBrand(_AnnotationEditorUIManager_brand,this,_addEditorToLayer).call(this,t);_assertClassBrand(_AnnotationEditorUIManager_brand,this,_selectEditors).call(this,e)},undo:()=>{for(let t of e)t.remove()},mustExec:!0})}catch(e){warn(`paste: "${e.message}".`)}}keydown(t){!this.isShiftKeyDown&&t.key===`Shift`&&(this.isShiftKeyDown=!0),_classPrivateFieldGet2(_mode,this)!==AnnotationEditorType.NONE&&!this.isEditorHandlingKeyboard&&e._keyboardManager.exec(this,t)}keyup(e){this.isShiftKeyDown&&e.key===`Shift`&&(this.isShiftKeyDown=!1,_classPrivateFieldGet2(_highlightWhenShiftUp,this)&&(_classPrivateFieldSet2(_highlightWhenShiftUp,this,!1),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_onSelectEnd).call(this,`main_toolbar`)))}onEditingAction({name:e}){switch(e){case`undo`:case`redo`:case`delete`:case`selectAll`:this[e]();break;case`highlightSelection`:this.highlightSelection(`context_menu`)}}setEditingState(e){e?(_assertClassBrand(_AnnotationEditorUIManager_brand,this,_addFocusManager).call(this),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_addCopyPasteListeners).call(this),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateStates).call(this,{isEditing:_classPrivateFieldGet2(_mode,this)!==AnnotationEditorType.NONE,isEmpty:_assertClassBrand(_AnnotationEditorUIManager_brand,this,_isEmpty).call(this),hasSomethingToUndo:_classPrivateFieldGet2(_commandManager,this).hasSomethingToUndo(),hasSomethingToRedo:_classPrivateFieldGet2(_commandManager,this).hasSomethingToRedo(),hasSelectedEditor:!1})):(_assertClassBrand(_AnnotationEditorUIManager_brand,this,_removeFocusManager).call(this),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_removeCopyPasteListeners).call(this),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateStates).call(this,{isEditing:!1}),this.disableUserSelect(!1))}
71registerEditorTypes(e){if(!_classPrivateFieldGet2(_editorTypes,this)){_classPrivateFieldSet2(_editorTypes,this,e);for(let e of _classPrivateFieldGet2(_editorTypes,this))_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateUI).call(this,e.defaultPropertiesToUpdate)}}getId(){return _classPrivateFieldGet2(_idManager,this).id}get currentLayer(){return _classPrivateFieldGet2(_allLayers,this).get(_classPrivateFieldGet2(_currentPageIndex,this))}getLayer(e){return _classPrivateFieldGet2(_allLayers,this).get(e)}get currentPageIndex(){return _classPrivateFieldGet2(_currentPageIndex,this)}addLayer(e){_classPrivateFieldGet2(_allLayers,this).set(e.pageIndex,e),_classPrivateFieldGet2(_isEnabled,this)?e.enable():e.disable()}removeLayer(e){_classPrivateFieldGet2(_allLayers,this).delete(e.pageIndex)}async updateMode(e,t=null,n=!1){if(_classPrivateFieldGet2(_mode,this)!==e&&!(_classPrivateFieldGet2(_updateModeCapability,this)&&(await _classPrivateFieldGet2(_updateModeCapability,this).promise,!_classPrivateFieldGet2(_updateModeCapability,this)))){if(_classPrivateFieldSet2(_updateModeCapability,this,Promise.withResolvers()),_classPrivateFieldSet2(_mode,this,e),e===AnnotationEditorType.NONE){this.setEditingState(!1),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_disableAll).call(this),_classPrivateFieldGet2(_updateModeCapability,this).resolve();return}this.setEditingState(!0),await _assertClassBrand(_AnnotationEditorUIManager_brand,this,_enableAll).call(this),this.unselectAll();for(let t of _classPrivateFieldGet2(_allLayers,this).values())t.updateMode(e);if(!t){n&&this.addNewEditorFromKeyboard(),_classPrivateFieldGet2(_updateModeCapability,this).resolve();return}for(let e of _classPrivateFieldGet2(_allEditors,this).values())e.annotationElementId===t?(this.setSelected(e),e.enterInEditMode()):e.unselect();_classPrivateFieldGet2(_updateModeCapability,this).resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(e){e!==_classPrivateFieldGet2(_mode,this)&&this._eventBus.dispatch(`switchannotationeditormode`,{source:this,mode:e})}updateParams(e,t){if(_classPrivateFieldGet2(_editorTypes,this)){switch(e){case AnnotationEditorParamsType.CREATE:this.currentLayer.addNewEditor();return;case AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR:_classPrivateFieldGet2(_mainHighlightColorPicker,this)?.updateColor(t);break;case AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch(`reporttelemetry`,{source:this,details:{type:`editing`,data:{type:`highlight`,action:`toggle_visibility`}}}),(_classPrivateFieldGet2(_showAllStates,this)||_classPrivateFieldSet2(_showAllStates,this,new Map)).set(e,t),this.showAllEditors(`highlight`,t)}for(let n of _classPrivateFieldGet2(_selectedEditors,this))n.updateParams(e,t);for(let n of _classPrivateFieldGet2(_editorTypes,this))n.updateDefaultParams(e,t)}}showAllEditors(e,t,n=!1){for(let n of _classPrivateFieldGet2(_allEditors,this).values())n.editorType===e&&n.show(t);(_classPrivateFieldGet2(_showAllStates,this)?.get(AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL)??!0)!==t&&_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateUI).call(this,[[AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL,t]])}enableWaiting(e=!1){if(_classPrivateFieldGet2(_isWaiting,this)!==e){_classPrivateFieldSet2(_isWaiting,this,e);for(let t of _classPrivateFieldGet2(_allLayers,this).values())e?t.disableClick():t.enableClick(),t.div.classList.toggle(`waiting`,e)}}getEditors(e){let t=[];for(let n of _classPrivateFieldGet2(_allEditors,this).values())n.pageIndex===e&&t.push(n);return t}getEditor(e){return _classPrivateFieldGet2(_allEditors,this).get(e)}addEditor(e){_classPrivateFieldGet2(_allEditors,this).set(e.id,e)}removeEditor(e){e.div.contains(document.activeElement)&&(_classPrivateFieldGet2(_focusMainContainerTimeoutId,this)&&clearTimeout(_classPrivateFieldGet2(_focusMainContainerTimeoutId,this)),_classPrivateFieldSet2(_focusMainContainerTimeoutId,this,setTimeout(()=>{this.focusMainContainer(),_classPrivateFieldSet2(_focusMainContainerTimeoutId,this,null)},0))),_classPrivateFieldGet2(_allEditors,this).delete(e.id),this.unselect(e),(!e.annotationElementId||!_classPrivateFieldGet2(_deletedAnnotationsElementIds,this).has(e.annotationElementId))&&_classPrivateFieldGet2(_annotationStorage,this)?.remove(e.id)}addDeletedAnnotationElement(e){_classPrivateFieldGet2(_deletedAnnotationsElementIds,this).add(e.annotationElementId),this.addChangedExistingAnnotation(e),e.deleted=!0}
71isDeletedAnnotationElement(e){return _classPrivateFieldGet2(_deletedAnnotationsElementIds,this).has(e)}removeDeletedAnnotationElement(e){_classPrivateFieldGet2(_deletedAnnotationsElementIds,this).delete(e.annotationElementId),this.removeChangedExistingAnnotation(e),e.deleted=!1}setActiveEditor(e){_classPrivateFieldGet2(_activeEditor,this)!==e&&(_classPrivateFieldSet2(_activeEditor,this,e),e&&_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateUI).call(this,e.propertiesToUpdate))}updateUI(e){_get_lastSelectedEditor.call(_assertClassBrand(_AnnotationEditorUIManager_brand,this))===e&&_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateUI).call(this,e.propertiesToUpdate)}toggleSelected(e){if(_classPrivateFieldGet2(_selectedEditors,this).has(e)){_classPrivateFieldGet2(_selectedEditors,this).delete(e),e.unselect(),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateStates).call(this,{hasSelectedEditor:this.hasSelection});return}_classPrivateFieldGet2(_selectedEditors,this).add(e),e.select(),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateUI).call(this,e.propertiesToUpdate),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateStates).call(this,{hasSelectedEditor:!0})}setSelected(e){for(let t of _classPrivateFieldGet2(_selectedEditors,this))t!==e&&t.unselect();_classPrivateFieldGet2(_selectedEditors,this).clear(),_classPrivateFieldGet2(_selectedEditors,this).add(e),e.select(),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateUI).call(this,e.propertiesToUpdate),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateStates).call(this,{hasSelectedEditor:!0})}isSelected(e){return _classPrivateFieldGet2(_selectedEditors,this).has(e)}get firstSelectedEditor(){return _classPrivateFieldGet2(_selectedEditors,this).values().next().value}unselect(e){e.unselect(),_classPrivateFieldGet2(_selectedEditors,this).delete(e),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateStates).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return _classPrivateFieldGet2(_selectedEditors,this).size!==0}get isEnterHandled(){return _classPrivateFieldGet2(_selectedEditors,this).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){_classPrivateFieldGet2(_commandManager,this).undo(),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateStates).call(this,{hasSomethingToUndo:_classPrivateFieldGet2(_commandManager,this).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:_assertClassBrand(_AnnotationEditorUIManager_brand,this,_isEmpty).call(this)})}redo(){_classPrivateFieldGet2(_commandManager,this).redo(),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateStates).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:_classPrivateFieldGet2(_commandManager,this).hasSomethingToRedo(),isEmpty:_assertClassBrand(_AnnotationEditorUIManager_brand,this,_isEmpty).call(this)})}addCommands(e){_classPrivateFieldGet2(_commandManager,this).add(e),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateStates).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:_assertClassBrand(_AnnotationEditorUIManager_brand,this,_isEmpty).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;let e=[..._classPrivateFieldGet2(_selectedEditors,this)];this.addCommands({cmd:()=>{for(let t of e)t.remove()},undo:()=>{for(let t of e)_assertClassBrand(_AnnotationEditorUIManager_brand,this,_addEditorToLayer).call(this,t)},mustExec:!0})}commitOrRemove(){_classPrivateFieldGet2(_activeEditor,this)?.commitOrRemove()}hasSomethingToControl(){return _classPrivateFieldGet2(_activeEditor,this)||this.hasSelection}selectAll(){for(let e of _classPrivateFieldGet2(_selectedEditors,this))e.commit();_assertClassBrand(_AnnotationEditorUIManager_brand,this,_selectEditors).call(this,_classPrivateFieldGet2(_allEditors,this).values())}unselectAll(){if(!(_classPrivateFieldGet2(_activeEditor,this)&&(_classPrivateFieldGet2(_activeEditor,this).commitOrRemove(),_classPrivateFieldGet2(_mode,this)!==AnnotationEditorType.NONE))&&this.hasSelection){for(let e of _classPrivateFieldGet2(_selectedEditors,this))e.unselect();_classPrivateFieldGet2(_selectedEditors,this).clear(),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateStates).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(e,t,n=!1){if(n||this.commitOrRemove(),!this.hasSelection)return;
71_classPrivateFieldGet2(_translation,this)[0]+=e,_classPrivateFieldGet2(_translation,this)[1]+=t;let[r,i]=_classPrivateFieldGet2(_translation,this),a=[..._classPrivateFieldGet2(_selectedEditors,this)],o=1e3;_classPrivateFieldGet2(_translationTimeoutId,this)&&clearTimeout(_classPrivateFieldGet2(_translationTimeoutId,this)),_classPrivateFieldSet2(_translationTimeoutId,this,setTimeout(()=>{_classPrivateFieldSet2(_translationTimeoutId,this,null),_classPrivateFieldGet2(_translation,this)[0]=_classPrivateFieldGet2(_translation,this)[1]=0,this.addCommands({cmd:()=>{for(let e of a)_classPrivateFieldGet2(_allEditors,this).has(e.id)&&e.translateInPage(r,i)},undo:()=>{for(let e of a)_classPrivateFieldGet2(_allEditors,this).has(e.id)&&e.translateInPage(-r,-i)},mustExec:!1})},1e3));for(let n of a)n.translateInPage(e,t)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),_classPrivateFieldSet2(_draggingEditors,this,new Map);for(let e of _classPrivateFieldGet2(_selectedEditors,this))_classPrivateFieldGet2(_draggingEditors,this).set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!_classPrivateFieldGet2(_draggingEditors,this))return!1;this.disableUserSelect(!1);let e=_classPrivateFieldGet2(_draggingEditors,this);_classPrivateFieldSet2(_draggingEditors,this,null);let t=!1;for(let[{x:n,y:r,pageIndex:i},a]of e)a.newX=n,a.newY=r,a.newPageIndex=i,t||=n!==a.savedX||r!==a.savedY||i!==a.savedPageIndex;if(!t)return!1;let n=(e,t,n,r)=>{if(_classPrivateFieldGet2(_allEditors,this).has(e.id)){let i=_classPrivateFieldGet2(_allLayers,this).get(r);i?e._setParentAndPosition(i,t,n):(e.pageIndex=r,e.x=t,e.y=n)}};return this.addCommands({cmd:()=>{for(let[t,{newX:r,newY:i,newPageIndex:a}]of e)n(t,r,i,a)},undo:()=>{for(let[t,{savedX:r,savedY:i,savedPageIndex:a}]of e)n(t,r,i,a)},mustExec:!0}),!0}dragSelectedEditors(e,t){if(_classPrivateFieldGet2(_draggingEditors,this))for(let n of _classPrivateFieldGet2(_draggingEditors,this).keys())n.drag(e,t)}rebuild(e){if(e.parent===null){let t=this.getLayer(e.pageIndex);t?(t.changeParent(e),t.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild())}else e.parent.addOrRebuild(e)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||_classPrivateFieldGet2(_selectedEditors,this).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(e){return _classPrivateFieldGet2(_activeEditor,this)===e}getActive(){return _classPrivateFieldGet2(_activeEditor,this)}getMode(){return _classPrivateFieldGet2(_mode,this)}get imageManager(){return shadow(this,`imageManager`,new ImageManager)}getSelectionBoxes(e){if(!e)return null;let t=document.getSelection();for(let n=0,r=t.rangeCount;n<r;n++)if(!e.contains(t.getRangeAt(n).commonAncestorContainer))return null;let{x:n,y:r,width:i,height:a}=e.getBoundingClientRect(),o;switch(e.getAttribute(`data-main-rotation`)){case`90`:o=(e,t,o,c)=>({x:(t-r)/a,y:1-(e+o-n)/i,width:c/a,height:o/i});break;case`180`:o=(e,t,o,c)=>({x:1-(e+o-n)/i,y:1-(t+c-r)/a,width:o/i,height:c/a});break;case`270`:o=(e,t,o,c)=>({x:1-(t+c-r)/a,y:(e-n)/i,width:c/a,height:o/i});break;default:o=(e,t,o,c)=>({x:(e-n)/i,y:(t-r)/a,width:o/i,height:c/a})}let c=[];for(let e=0,n=t.rangeCount;e<n;e++){let n=t.getRangeAt(e);if(!n.collapsed)for(let{x:e,y:t,width:r,height:i}of n.getClientRects())r!==0&&i!==0&&c.push(o(e,t,r,i))}return c.length===0?null:c}addChangedExistingAnnotation({annotationElementId:e,id:t}){(_classPrivateFieldGet2(_changedExistingAnnotations,this)||_classPrivateFieldSet2(_changedExistingAnnotations,this,new Map)).set(e,t)}removeChangedExistingAnnotation({annotationElementId:e}){_classPrivateFieldGet2(_changedExistingAnnotations,this)?.delete(e)}renderAnnotationElement(e){let t=_classPrivateFieldGet2(_changedExistingAnnotations,this)?.get(e.data.id);if(!t)return;let n=_classPrivateFieldGet2(_annotationStorage,this).getRawValue(t);n&&(_classPrivateFieldGet2(_mode,this)!==AnnotationEditorType.NONE||n.hasBeenModified)&&n.renderAnnotationElement(e)}};function _getAnchorElementForSelection({anchorNode:e}
71){return e.nodeType===Node.TEXT_NODE?e.parentElement:e}function _getLayerForTextLayer(e){let{currentLayer:t}=this;if(t.hasTextLayer(e))return t;for(let t of _classPrivateFieldGet2(_allLayers,this).values())if(t.hasTextLayer(e))return t;return null}function _displayHighlightToolbar(){let e=document.getSelection();if(!e||e.isCollapsed)return;let t=_assertClassBrand(_AnnotationEditorUIManager_brand,this,_getAnchorElementForSelection).call(this,e).closest(`.textLayer`),n=this.getSelectionBoxes(t);n&&(_classPrivateFieldGet2(_highlightToolbar,this)||_classPrivateFieldSet2(_highlightToolbar,this,new HighlightToolbar(this)),_classPrivateFieldGet2(_highlightToolbar,this).show(t,n,this.direction===`ltr`))}function _selectionChange(){let e=document.getSelection();if(!e||e.isCollapsed){_classPrivateFieldGet2(_selectedTextNode,this)&&(_classPrivateFieldGet2(_highlightToolbar,this)?.hide(),_classPrivateFieldSet2(_selectedTextNode,this,null),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateStates).call(this,{hasSelectedText:!1}));return}let{anchorNode:t}=e;if(t===_classPrivateFieldGet2(_selectedTextNode,this))return;let n=_assertClassBrand(_AnnotationEditorUIManager_brand,this,_getAnchorElementForSelection).call(this,e).closest(`.textLayer`);if(!n){_classPrivateFieldGet2(_selectedTextNode,this)&&(_classPrivateFieldGet2(_highlightToolbar,this)?.hide(),_classPrivateFieldSet2(_selectedTextNode,this,null),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateStates).call(this,{hasSelectedText:!1}));return}if(_classPrivateFieldGet2(_highlightToolbar,this)?.hide(),_classPrivateFieldSet2(_selectedTextNode,this,t),_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateStates).call(this,{hasSelectedText:!0}),(_classPrivateFieldGet2(_mode,this)===AnnotationEditorType.HIGHLIGHT||_classPrivateFieldGet2(_mode,this)===AnnotationEditorType.NONE)&&(_classPrivateFieldGet2(_mode,this)===AnnotationEditorType.HIGHLIGHT&&this.showAllEditors(`highlight`,!0,!0),_classPrivateFieldSet2(_highlightWhenShiftUp,this,this.isShiftKeyDown),!this.isShiftKeyDown)){let e=_classPrivateFieldGet2(_mode,this)===AnnotationEditorType.HIGHLIGHT?_assertClassBrand(_AnnotationEditorUIManager_brand,this,_getLayerForTextLayer).call(this,n):null;e?.toggleDrawing();let t=new AbortController,r=this.combinedSignal(t),i=n=>{(n.type!==`pointerup`||n.button===0)&&(t.abort(),e?.toggleDrawing(!0),n.type===`pointerup`&&_assertClassBrand(_AnnotationEditorUIManager_brand,this,_onSelectEnd).call(this,`main_toolbar`))};window.addEventListener(`pointerup`,i,{signal:r}),window.addEventListener(`blur`,i,{signal:r})}}function _onSelectEnd(e=``){_classPrivateFieldGet2(_mode,this)===AnnotationEditorType.HIGHLIGHT?this.highlightSelection(e):_classPrivateFieldGet2(_enableHighlightFloatingButton,this)&&_assertClassBrand(_AnnotationEditorUIManager_brand,this,_displayHighlightToolbar).call(this)}function _addSelectionListener(){document.addEventListener(`selectionchange`,_assertClassBrand(_AnnotationEditorUIManager_brand,this,_selectionChange).bind(this),{signal:this._signal})}function _addFocusManager(){if(_classPrivateFieldGet2(_focusManagerAC,this))return;_classPrivateFieldSet2(_focusManagerAC,this,new AbortController);let e=this.combinedSignal(_classPrivateFieldGet2(_focusManagerAC,this));window.addEventListener(`focus`,this.focus.bind(this),{signal:e}),window.addEventListener(`blur`,this.blur.bind(this),{signal:e})}function _removeFocusManager(){_classPrivateFieldGet2(_focusManagerAC,this)?.abort(),_classPrivateFieldSet2(_focusManagerAC,this,null)}function _addKeyboardManager(){if(_classPrivateFieldGet2(_keyboardManagerAC,this))return;_classPrivateFieldSet2(_keyboardManagerAC,this,new AbortController);let e=this.combinedSignal(_classPrivateFieldGet2(_keyboardManagerAC,this));window.addEventListener(`keydown`,this.keydown.bind(this),{signal:e}),window.addEventListener(`keyup`,this.keyup.bind(this),{signal:e})}function _removeKeyboardManager(){_classPrivateFieldGet2(_keyboardManagerAC,this)?.abort(),_classPrivateFieldSet2(_keyboardManagerAC,this,null)}function _addCopyPasteListeners(){if(_classPrivateFieldGet2(_copyPasteAC,this))return;_classPrivateFieldSet2(_copyPasteAC,this,new AbortController);let e=this.combinedSignal(_classPrivateFieldGet2(_copyPasteAC,this));document.addEventListener(`copy`,this.copy.bind(this),{signal:e}),document.addEventListener(`cut`,this.cut.bind(this),{signal:e}),document.addEventListener(`paste`,this.paste.bind(this),{signal:e})}function _removeCopyPasteListeners(){_classPrivateFieldGet2(_copyPasteAC,this)?.abort(),_classPrivateFieldSet2(_copyPasteAC,this,null)}function _addDragAndDropListeners(){let e=this._signal;document.addEventListener(`dragover`,this.dragOver.bind(this),{signal:e}),document.addEventListener(`drop`,this.drop.bind(this),{signal:e})}function _dispatchUpdateStates(e){Object.entries(e).some(([e,t])=>_classPrivateFieldGet2(_previousStates,this)[e]!==t)&&(this._eventBus.dispatch(`annotationeditorstateschanged`,{source:this,details:Object.assign(_classPrivateFieldGet2(_previousStates,this),e)}),_classPrivateFieldGet2(_mode,this)===AnnotationEditorType.HIGHLIGHT&&e.hasSelectedEditor===!1&&_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateUI).c
71all(this,[[AnnotationEditorParamsType.HIGHLIGHT_FREE,!0]]))}function _dispatchUpdateUI(e){this._eventBus.dispatch(`annotationeditorparamschanged`,{source:this,details:e})}async function _enableAll(){if(!_classPrivateFieldGet2(_isEnabled,this)){_classPrivateFieldSet2(_isEnabled,this,!0);let e=[];for(let t of _classPrivateFieldGet2(_allLayers,this).values())e.push(t.enable());await Promise.all(e);for(let e of _classPrivateFieldGet2(_allEditors,this).values())e.enable()}}function _disableAll(){if(this.unselectAll(),_classPrivateFieldGet2(_isEnabled,this)){_classPrivateFieldSet2(_isEnabled,this,!1);for(let e of _classPrivateFieldGet2(_allLayers,this).values())e.disable();for(let e of _classPrivateFieldGet2(_allEditors,this).values())e.disable()}}function _addEditorToLayer(e){let t=_classPrivateFieldGet2(_allLayers,this).get(e.pageIndex);t?t.addOrRebuild(e):(this.addEditor(e),this.addToAnnotationStorage(e))}function _get_lastSelectedEditor(){let e=null;for(e of _classPrivateFieldGet2(_selectedEditors,this));return e}function _isEmpty(){if(_classPrivateFieldGet2(_allEditors,this).size===0)return!0;if(_classPrivateFieldGet2(_allEditors,this).size===1)for(let e of _classPrivateFieldGet2(_allEditors,this).values())return e.isEmpty();return!1}function _selectEditors(e){for(let e of _classPrivateFieldGet2(_selectedEditors,this))e.unselect();_classPrivateFieldGet2(_selectedEditors,this).clear();for(let t of e)t.isEmpty()||(_classPrivateFieldGet2(_selectedEditors,this).add(t),t.select());_assertClassBrand(_AnnotationEditorUIManager_brand,this,_dispatchUpdateStates).call(this,{hasSelectedEditor:this.hasSelection})}_defineProperty$6(AnnotationEditorUIManager,`TRANSLATE_SMALL`,1),_defineProperty$6(AnnotationEditorUIManager,`TRANSLATE_BIG`,10);var _altText2=new WeakMap,_altTextDecorative=new WeakMap,_altTextButton=new WeakMap,_altTextButtonLabel=new WeakMap,_altTextTooltip=new WeakMap,_altTextTooltipTimeout=new WeakMap,_altTextWasFromKeyBoard=new WeakMap,_badge=new WeakMap,_editor2=new WeakMap,_guessedText=new WeakMap,_textWithDisclaimer=new WeakMap,_useNewAltTextFlow=new WeakMap,_AltText_brand=new WeakSet,AltText=class e{constructor(e){_classPrivateMethodInitSpec(this,_AltText_brand),_classPrivateFieldInitSpec(this,_altText2,null),_classPrivateFieldInitSpec(this,_altTextDecorative,!1),_classPrivateFieldInitSpec(this,_altTextButton,null),_classPrivateFieldInitSpec(this,_altTextButtonLabel,null),_classPrivateFieldInitSpec(this,_altTextTooltip,null),_classPrivateFieldInitSpec(this,_altTextTooltipTimeout,null),_classPrivateFieldInitSpec(this,_altTextWasFromKeyBoard,!1),_classPrivateFieldInitSpec(this,_badge,null),_classPrivateFieldInitSpec(this,_editor2,null),_classPrivateFieldInitSpec(this,_guessedText,null),_classPrivateFieldInitSpec(this,_textWithDisclaimer,null),_classPrivateFieldInitSpec(this,_useNewAltTextFlow,!1),_classPrivateFieldSet2(_editor2,this,e),_classPrivateFieldSet2(_useNewAltTextFlow,this,e._uiManager.useNewAltTextFlow),_l10nNewButton._||=Object.freeze({added:`pdfjs-editor-new-alt-text-added-button`,"added-label":`pdfjs-editor-new-alt-text-added-button-label`,missing:`pdfjs-editor-new-alt-text-missing-button`,"missing-label":`pdfjs-editor-new-alt-text-missing-button-label`,review:`pdfjs-editor-new-alt-text-to-review-button`,"review-label":`pdfjs-editor-new-alt-text-to-review-button-label`})}static initialize(t){e._l10n??=t}async render(){let e=_classPrivateFieldSet2(_altTextButton,this,document.createElement(`button`));e.className=`altText`,e.tabIndex=`0`;let t=_classPrivateFieldSet2(_altTextButtonLabel,this,document.createElement(`span`));e.append(t),_classPrivateFieldGet2(_useNewAltTextFlow,this)?(e.classList.add(`new`),e.setAttribute(`data-l10n-id`,_l10nNewButton._.missing),t.setAttribute(`data-l10n-id`,_l10nNewButton._[`missing-label`])):(e.setAttribute(`data-l10n-id`,`pdfjs-editor-alt-text-button`),t.setAttribute(`data-l10n-id`,`pdfjs-editor-alt-text-button-label`));let n=_classPrivateFieldGet2(_editor2,this)._uiManager._signal;e.addEventListener(`contextmenu`,noContextMenu,{signal:n}),e.addEventListener(`pointerdown`,e=>e.stopPropagation(),{signal:n});let r=e=>{e.preventDefault(),_classPrivateFieldGet2(_editor2,this)._uiManager.editAltText(_classPrivateFieldGet2(_editor2,this)),_classPrivateFieldGet2(_useNewAltTextFlow,this)&&_classPrivateFieldGet2(_editor2,this)._reportTelemetry({action:`pdfjs.image.alt_text.image_status_label_clicked`,data:{label:_get_label.call(_assertClassBrand(_AltText_brand,this))}})};return e.addEventListener(`click`,r,{capture:!0,signal:n}
71),e.addEventListener(`keydown`,t=>{t.target===e&&t.key===`Enter`&&(_classPrivateFieldSet2(_altTextWasFromKeyBoard,this,!0),r(t))},{signal:n}),await _assertClassBrand(_AltText_brand,this,_setState).call(this),e}finish(){_classPrivateFieldGet2(_altTextButton,this)&&(_classPrivateFieldGet2(_altTextButton,this).focus({focusVisible:_classPrivateFieldGet2(_altTextWasFromKeyBoard,this)}),_classPrivateFieldSet2(_altTextWasFromKeyBoard,this,!1))}isEmpty(){return _classPrivateFieldGet2(_useNewAltTextFlow,this)?_classPrivateFieldGet2(_altText2,this)===null:!_classPrivateFieldGet2(_altText2,this)&&!_classPrivateFieldGet2(_altTextDecorative,this)}hasData(){return _classPrivateFieldGet2(_useNewAltTextFlow,this)?_classPrivateFieldGet2(_altText2,this)!==null||!!_classPrivateFieldGet2(_guessedText,this):this.isEmpty()}get guessedText(){return _classPrivateFieldGet2(_guessedText,this)}async setGuessedText(t){_classPrivateFieldGet2(_altText2,this)===null&&(_classPrivateFieldSet2(_guessedText,this,t),_classPrivateFieldSet2(_textWithDisclaimer,this,await e._l10n.get(`pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer`,{generatedAltText:t})),_assertClassBrand(_AltText_brand,this,_setState).call(this))}toggleAltTextBadge(e=!1){if(!_classPrivateFieldGet2(_useNewAltTextFlow,this)||_classPrivateFieldGet2(_altText2,this)){_classPrivateFieldGet2(_badge,this)?.remove(),_classPrivateFieldSet2(_badge,this,null);return}if(!_classPrivateFieldGet2(_badge,this)){let e=_classPrivateFieldSet2(_badge,this,document.createElement(`div`));e.className=`noAltTextBadge`,_classPrivateFieldGet2(_editor2,this).div.append(e)}_classPrivateFieldGet2(_badge,this).classList.toggle(`hidden`,!e)}serialize(e){let t=_classPrivateFieldGet2(_altText2,this);return!e&&_classPrivateFieldGet2(_guessedText,this)===t&&(t=_classPrivateFieldGet2(_textWithDisclaimer,this)),{altText:t,decorative:_classPrivateFieldGet2(_altTextDecorative,this),guessedText:_classPrivateFieldGet2(_guessedText,this),textWithDisclaimer:_classPrivateFieldGet2(_textWithDisclaimer,this)}}get data(){return{altText:_classPrivateFieldGet2(_altText2,this),decorative:_classPrivateFieldGet2(_altTextDecorative,this)}}set data({altText:e,decorative:t,guessedText:n,textWithDisclaimer:r,cancel:i=!1}){n&&(_classPrivateFieldSet2(_guessedText,this,n),_classPrivateFieldSet2(_textWithDisclaimer,this,r)),(_classPrivateFieldGet2(_altText2,this)!==e||_classPrivateFieldGet2(_altTextDecorative,this)!==t)&&(i||(_classPrivateFieldSet2(_altText2,this,e),_classPrivateFieldSet2(_altTextDecorative,this,t)),_assertClassBrand(_AltText_brand,this,_setState).call(this))}toggle(e=!1){_classPrivateFieldGet2(_altTextButton,this)&&(!e&&_classPrivateFieldGet2(_altTextTooltipTimeout,this)&&(clearTimeout(_classPrivateFieldGet2(_altTextTooltipTimeout,this)),_classPrivateFieldSet2(_altTextTooltipTimeout,this,null)),_classPrivateFieldGet2(_altTextButton,this).disabled=!e)}shown(){_classPrivateFieldGet2(_editor2,this)._reportTelemetry({action:`pdfjs.image.alt_text.image_status_label_displayed`,data:{label:_get_label.call(_assertClassBrand(_AltText_brand,this))}})}destroy(){_classPrivateFieldGet2(_altTextButton,this)?.remove(),_classPrivateFieldSet2(_altTextButton,this,null),_classPrivateFieldSet2(_altTextButtonLabel,this,null),_classPrivateFieldSet2(_altTextTooltip,this,null),_classPrivateFieldGet2(_badge,this)?.remove(),_classPrivateFieldSet2(_badge,this,null)}};function _get_label(){return _classPrivateFieldGet2(_altText2,this)&&`added`||_classPrivateFieldGet2(_altText2,this)===null&&this.guessedText&&`review`||`missing`}async function _setState(){let e=_classPrivateFieldGet2(_altTextButton,this);if(!e)return;if(_classPrivateFieldGet2(_useNewAltTextFlow,this)){if(e.classList.toggle(`done`,!!_classPrivateFieldGet2(_altText2,this)),e.setAttribute(`data-l10n-id`,_l10nNewButton._[_get_label.call(_assertClassBrand(_AltText_brand,this))]),_classPrivateFieldGet2(_altTextButtonLabel,this)?.setAttribute(`data-l10n-id`,_l10nNewButton._[`${_get_label.call(_assertClassBrand(_AltText_brand,this))}-label`]),!_classPrivateFieldGet2(_altText2,this)){_classPrivateFieldGet2(_altTextTooltip,this)?.remove();return}}else{if(!_classPrivateFieldGet2(_altText2,this)&&!_classPrivateFieldGet2(_altTextDecorative,this)){e.classList.remove(`done`),_classPrivateFieldGet2(_altTextTooltip,this)?.remove();return}e.classList.add(`done`),e.setAttribute(`data-l10n-id`,`pdfjs-editor-alt-text-edit-button`)}let t=_classPrivateFieldGet2(_altTextTooltip,this);if(!t){_classPrivateFieldSet2(_altTextTooltip,this,t=document.createElement(`span`)),t.className=`tooltip`,t.setAttribute(`role`,`tooltip`),t.id=`alt-text-tooltip-${_classPrivateFieldGet2(_editor2,this).id}`;let n=100,r=_classPrivateFieldGet2(_editor2,this)._uiManager._signal;r.addEventListener(`abort`,()=>{clearTimeout(_classPrivateFieldGet2(_altTextTooltipTimeout,this)),_classPrivateFieldSet2(_altTextTooltipTimeout,this,null)},{once:!0}),e.addEventListener(`mouseenter`,()=>{_classPrivateFieldSet2(_altTextTooltipTimeout,this,setTimeout(()=>{_classPrivateFieldSet2(_altTextTooltipTimeout,this,null),_classPrivateFieldGet2(_altTextTooltip,this).classList.add(`show`),_classPrivateFieldGet2(_editor2,this)._reportTelemetry({action:`alt_text_tooltip`})},100))},{signal:r}),e.addEventListener(`mouseleave`,()=>{_classPrivateFieldGet2(_altTextTooltipTimeout,this)&&(clearTimeout(_classPrivateFieldGet2(_altTextTooltipTimeout,this)),_classPrivateFieldSet2(_altTextTooltipTimeout,this,null)),_classPrivateFieldGet2(_altTextTooltip,this)?.classList.remove(`show`)},{signal:r})}_classPrivateFieldGet2(_altTextDecorative,this)?t.setAttribute(`data-l10n-id`,`pdfjs-editor-alt-text-decorative-tooltip`):(t.removeAttribute(`data-l10n-id`),t.textContent=_classPrivateFieldGet2(_altText2,this)),t.parentNode||e.append(t),_classPrivateFieldGet2(_editor2,this).getImageForAltText()?.setAttribute(`aria-describedby`,t.id)}var _l10nNewButton={_:null};_defineProperty$6(AltText,`_l10n`,null);var _accessibilityData=new WeakMap,_allResizerDivs=new WeakMap,_altText3=new WeakMap,_disabled=new WeakMap,_keepAspectRatio=new WeakMap,_resizersDiv=new WeakMap,_savedDimensions=new WeakMap,_focusAC=new WeakMap,_focusedResizerName=new WeakMap,_hasBeenClicked=new WeakMap,_initialPosition=new WeakMap,_isEditing=new WeakMap,_isInEditMode=new WeakMap,_isResizerEnabledForKeyboard=new WeakMap,_moveInDOMTimeout=new WeakMap,_prevDragX=new WeakMap,_prevDragY=new WeakMap,_telemetryTimeouts=new WeakMap,_isDraggable=new WeakMap,_zIndex=new WeakMap,_AnnotationEditor_brand=new WeakSet,AnnotationEditor=class e{static get _resizerKeyboardManager(){let t=e.prototype._resizeWithKeyboard,n=AnnotationEditorUIManager.TRANSLATE_SMALL,r=AnnotationEditorUIManager.TRANSLATE_BIG;return shadow(this,`_resizerKeyboardManager`,new KeyboardManager([[[`ArrowLeft`,`mac+ArrowLeft`],t,{args:[-n,0]}],[[`ctrl+ArrowLeft`,`mac+shift+ArrowLeft`],t,{args:[-r,0]}],[[`ArrowRight`,`mac+ArrowRight`],t,{args:[n,0]}],[[`ctrl+ArrowRight`,`mac+shift+ArrowRight`],t,{args:[r,0]}],[[`ArrowUp`,`mac+ArrowUp`],t,{args:[0,-n]}],[[`ctrl+ArrowUp`,`mac+shift+ArrowUp`],t,{args:[0,-r]}],[[`ArrowDown`,`mac+ArrowDown`],t,{args:[0,n]}],[[`ctrl+ArrowDown`,`mac+shift+ArrowDown`],t,{args:[0,r]}],[[`Escape`,`mac+Escape`],e.prototype._stopResizingWithKeyboard]]))}constructor(t){_classPrivateMethodInitSpec(this,_AnnotationEditor_brand),_classPrivateFieldInitSpec(this,_accessibilityData,null),_classPrivateFieldInitSpec(this,_allResizerDivs,null),_classPrivateFieldInitSpec(this,_altText3,null),_classPrivateFieldInitSpec(this,_disabled,!1),_classPrivateFieldInitSpec(this,_keepAspectRatio,!1),_classPrivateFieldInitSpec(this,_resizersDiv,null),_classPrivateFieldInitSpec(this,_savedDimensions,null),_classPrivateFieldInitSpec(this,_focusAC,null),_classPrivateFieldInitSpec(this,_focusedResizerName,``),_classPrivateFieldInitSpec(this,_hasBeenClicked,
71!1),_classPrivateFieldInitSpec(this,_initialPosition,null),_classPrivateFieldInitSpec(this,_isEditing,!1),_classPrivateFieldInitSpec(this,_isInEditMode,!1),_classPrivateFieldInitSpec(this,_isResizerEnabledForKeyboard,!1),_classPrivateFieldInitSpec(this,_moveInDOMTimeout,null),_classPrivateFieldInitSpec(this,_prevDragX,0),_classPrivateFieldInitSpec(this,_prevDragY,0),_classPrivateFieldInitSpec(this,_telemetryTimeouts,null),_defineProperty$6(this,`_editToolbar`,null),_defineProperty$6(this,`_initialOptions`,Object.create(null)),_defineProperty$6(this,`_initialData`,null),_defineProperty$6(this,`_isVisible`,!0),_defineProperty$6(this,`_uiManager`,null),_defineProperty$6(this,`_focusEventsAllowed`,!0),_classPrivateFieldInitSpec(this,_isDraggable,!1),_classPrivateFieldInitSpec(this,_zIndex,e._zIndex++),this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null;let{rotation:n,rawDims:{pageWidth:r,pageHeight:i,pageX:a,pageY:o}}=this.parent.viewport;this.rotation=n,this.pageRotation=(360+n-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[r,i],this.pageTranslation=[a,o];let[c,u]=this.parentDimensions;this.x=t.x/c,this.y=t.y/u,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return shadow(this,`_defaultLineColor`,this._colorManager.getHexCode(`CanvasText`))}static deleteAnnotationElement(e){let t=new FakeEditor({id:e.parent.getNextId(),parent:e.parent,uiManager:e._uiManager});t.annotationElementId=e.annotationElementId,t.deleted=!0,t._uiManager.addToAnnotationStorage(t)}static initialize(t,n){if(e._l10n??=t,e._l10nResizer||=Object.freeze({topLeft:`pdfjs-editor-resizer-top-left`,topMiddle:`pdfjs-editor-resizer-top-middle`,topRight:`pdfjs-editor-resizer-top-right`,middleRight:`pdfjs-editor-resizer-middle-right`,bottomRight:`pdfjs-editor-resizer-bottom-right`,bottomMiddle:`pdfjs-editor-resizer-bottom-middle`,bottomLeft:`pdfjs-editor-resizer-bottom-left`,middleLeft:`pdfjs-editor-resizer-middle-left`}),e._borderLineWidth!==-1)return;let r=getComputedStyle(document.documentElement);e._borderLineWidth=parseFloat(r.getPropertyValue(`--outline-width`))||0}static updateDefaultParams(e,t){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,t){unreachable$1(`Not implemented`)}get propertiesToUpdate(){return[]}get _isDraggable(){return _classPrivateFieldGet2(_isDraggable,this)}set _isDraggable(e){_classPrivateFieldSet2(_isDraggable,this,e),this.div?.classList.toggle(`draggable`,e)}get isEnterHandled(){return!0}center(){let[e,t]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*t/(e*2),this.y+=this.width*e/(t*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*t/(e*2),this.y-=this.width*e/(t*2);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=_classPrivateFieldGet2(_zIndex,this)}setParent(e){e===null?_assertClassBrand(_AnnotationEditor_brand,this,_stopResizing).call(this):(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions),this.parent=e}focusin(e){this._focusEventsAllowed&&(_classPrivateFieldGet2(_hasBeenClicked,this)?_classPrivateFieldSet2(_hasBeenClicked,this,!1):this.parent.setSelected(this))}focusout(e){this._focusEventsAllowed&&this.isAttachedToDOM&&(e.relatedTarget?.closest(`#${this.id}`)||(e.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove()))}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,t,n,r){let[i,a]=this.parentDimensions;[n,r]=this.screenToPageTranslation(n,r),this.x=(e+n)/i,this.y=(t+r)/a,this.fixAndSetPosition()}translate(e,t){_assertClassBrand(_AnnotationEditor_brand,this,_translate).call(this,this.parentDimensions,e,t)}translateInPage(e,t){_classPrivateFieldGet2(_initialPosition,this)||_classPrivateFieldSet2(_initialPosition,this,[this.x,this.y]),_assertClassBrand(_AnnotationEditor_brand,this,_translate).call(this,this.pageDimensions,e,t),this.div.scrollIntoView({block:`nearest`})}drag(e,t){_classPrivateFieldGet2(_initialPosition,this)||_classPrivateFieldSet2(_initialPosition,this,[this.x,this.y]);let[n,r]=this.parentDimensions;
vendor: 1,389 bytes, line 71
71if(this.x+=e/n,this.y+=t/r,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){let{x:e,y:t}=this.div.getBoundingClientRect();this.parent.findNewParent(this,e,t)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:i,y:a}=this,[o,c]=this.getBaseTranslation();i+=o,a+=c,this.div.style.left=`${(100*i).toFixed(2)}%`,this.div.style.top=`${(100*a).toFixed(2)}%`,this.div.scrollIntoView({block:`nearest`})}get _hasBeenMoved(){return!!_classPrivateFieldGet2(_initialPosition,this)&&(_classPrivateFieldGet2(_initialPosition,this)[0]!==this.x||_classPrivateFieldGet2(_initialPosition,this)[1]!==this.y)}getBaseTranslation(){let[t,n]=this.parentDimensions,{_borderLineWidth:r}=e,i=r/t,a=r/n;switch(this.rotation){case 90:return[-i,a];case 180:return[i,a];case 270:return[i,-a];default:return[-i,-a]}}get _mustFixPosition(){return!0}fixAndSetPosition(e=this.rotation){let[t,n]=this.pageDimensions,{x:r,y:i,width:a,height:o}=this;if(a*=t,o*=n,r*=t,i*=n,this._mustFixPosition)switch(e){case 0:r=Math.max(0,Math.min(t-a,r)),i=Math.max(0,Math.min(n-o,i));break;case 90:r=Math.max(0,Math.min(t-o,r)),i=Math.min(n,Math.max(a,i));break;case 180:r=Math.min(t,Math.max(a,r)),i=Math.min(n,Math.max(o,i));break;case 270:r=Math.min(t,Math.max(o,r)),i=Math.max(0,Math.min(n-a,i))}this.x=r/=t,this.y=i/=n;let[c,u]=this.getBaseTranslation();r+=c,i+=u;let{style:K}=this.div;K.left=`${(100*r).toFixed(2)}
71%`,K.top=`${(100*i).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(t,n){return _rotatePoint.call(e,t,n,this.parentRotation)}pageTranslationToScreen(t,n){return _rotatePoint.call(e,t,n,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){let{parentScale:e,pageDimensions:[t,n]}=this;return[t*e,n*e]}setDims(e,t){let[n,r]=this.parentDimensions;this.div.style.width=`${(100*e/n).toFixed(2)}%`,_classPrivateFieldGet2(_keepAspectRatio,this)||(this.div.style.height=`${(100*t/r).toFixed(2)}%`)}fixDims(){let{style:e}=this.div,{height:t,width:n}=e,r=n.endsWith(`%`),i=!_classPrivateFieldGet2(_keepAspectRatio,this)&&t.endsWith(`%`);if(r&&i)return;let[a,o]=this.parentDimensions;r||(e.width=`${(100*parseFloat(n)/a).toFixed(2)}%`),!_classPrivateFieldGet2(_keepAspectRatio,this)&&!i&&(e.height=`${(100*parseFloat(t)/o).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}altTextFinish(){_classPrivateFieldGet2(_altText3,this)?.finish()}async addEditToolbar(){return this._editToolbar||_classPrivateFieldGet2(_isInEditMode,this)?this._editToolbar:(this._editToolbar=new EditorToolbar(this),this.div.append(this._editToolbar.render()),_classPrivateFieldGet2(_altText3,this)&&await this._editToolbar.addAltText(_classPrivateFieldGet2(_altText3,this)),this._editToolbar)}removeEditToolbar(){this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,_classPrivateFieldGet2(_altText3,this)?.destroy())}addContainer(e){let t=this._editToolbar?.div;t?t.before(e):this.div.append(e)}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){_classPrivateFieldGet2(_altText3,this)||(AltText.initialize(e._l10n),_classPrivateFieldSet2(_altText3,this,new AltText(this)),_classPrivateFieldGet2(_accessibilityData,this)&&(_classPrivateFieldGet2(_altText3,this).data=_classPrivateFieldGet2(_accessibilityData,this),_classPrivateFieldSet2(_accessibilityData,this,null)),await this.addEditToolbar())}get altTextData(){return _classPrivateFieldGet2(_altText3,this)?.data}set altTextData(e){_classPrivateFieldGet2(_altText3,this)&&(_classPrivateFieldGet2(_altText3,this).data=e)}get guessedAltText(){return _classPrivateFieldGet2(_altText3,this)?.guessedText}async setGuessedAltText(e){await _classPrivateFieldGet2(_altText3,this)?.setGuessedText(e)}serializeAltText(e){return _classPrivateFieldGet2(_altText3,this)?.serialize(e)}hasAltText(){return!!_classPrivateFieldGet2(_altText3,this)&&!_classPrivateFieldGet2(_altText3,this).isEmpty()}hasAltTextData(){return _classPrivateFieldGet2(_altText3,this)?.hasData()??!1}render(){this.div=document.createElement(`div`),this.div.setAttribute(`data-editor-rotation`,(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute(`id`,this.id),this.div.tabIndex=_classPrivateFieldGet2(_disabled,this)?-1:0,this._isVisible||this.div.classList.add(`hidden`),this.setInForeground(),_assertClassBrand(_AnnotationEditor_brand,this,_addFocusListeners).call(this);let[e,t]=this.parentDimensions;this.parentRotation%180!=0&&(this.div.style.maxWidth=`${(100*t/e).toFixed(2)}%`,this.div.style.maxHeight=`${(100*e/t).toFixed(2)}%`);let[n,r]=this.getInitialTranslation();return this.translate(n,r),bindEvents(this,this.div,[`pointerdown`]),this.div}pointerdown(e){let{isMac:t}=util_FeatureTest.platform;if(e.button!==0||e.ctrlKey&&t){e.preventDefault();return}if(_classPrivateFieldSet2(_hasBeenClicked,this,!0),this._isDraggable){_assertClassBrand(_AnnotationEditor_brand,this,_setUpDragSession).call(this,e);return}_assertClassBrand(_AnnotationEditor_brand,this,_selectOnPointerEvent).call(this,e)}get isSelected(){return this._uiManager.isSelected(this)}moveInDOM(){_classPrivateFieldGet2(_moveInDOMTimeout,this)&&clearTimeout(_classPrivateFieldGet2(_moveInDOMTimeout,this)),_classPrivateFieldSet2(_moveInDOMTimeout,this,setTimeout(()=>{_classPrivateFieldSet2(_moveInDOMTimeout,this,null),this.parent?.moveEditorInDOM(this)},0))}_setParentAndPosition(e,t,n){e.changeParent(this),this.x=t,this.y=n,this.fixAndSetPosition()}getRect(e,t,n=this.rotation){let r=this.parentScale,[i,a]=this.pageDimensions,[o,c]=this.pageTranslation,u=e/r,K=t/r,Y=this.x*i,X=this.y*a,ee=this.width*i,te=this.height*a;switch(n){case 0:return[Y+u+o,a-X-K-te+c,Y+u+ee+o,a-X-K+c];case 90:return[Y+K+o,a-X+u+c,Y+K+te+o,a-X+u+ee+c];case 180:return[Y-u-ee+o,a-X+K+c,Y-u+o,a-X+K+te+c];case 270:return[Y-K-te+o,a-X-u-ee+c,Y-K+o,a-X-u+c];default:throw Error(`Invalid rotation`)}}getRectInCurrentCoords(e,t){let[n,r,i,a]=e,o=i-n,c=a-r;switch(this.rotation){case 0:return[n,t-a,o,c];case 90:return[n,t-r,c,o];case 180:return[i,t-r,o,c];case 270:return[i,t-a,c,o];default:throw Error(`Invalid rotation`)}}onceAdded(){}isEmpty(){return!1}enableEditMode(){_classPrivateFieldSet2(_isInEditMode,this,!0)}disableEditMode(){_classPrivateFieldSet2(_isInEditMode,this,!1)}isInEditMode(){return _classPrivateFieldGet2(_isInEditMode,this)}shouldGetKeyboardEvents(){return _classPrivateFieldGet2(_isResizerEnabledForKeyboard,this)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){_assertClassBrand(_AnnotationEditor_brand,this,_addFocusListeners).call(this)}rotate(e){}serializeDeleted(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:this._initialData?.popupRef||``}}serialize(e=!1,t=null){unreachable$1(`An editor must be serializable`)}static async deserialize(e,t,n){let r=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:n});r.rotation=e.rotation,_classPrivateFieldSet2(_accessibilityData,r,e.accessibilityData);let[i,a]=r.pageDimensions,[o,c,u,K]=r.getRectInCurrentCoords(e.rect,a);
71return r.x=o/i,r.y=c/a,r.width=u/i,r.height=K/a,r}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){if(_classPrivateFieldGet2(_focusAC,this)?.abort(),_classPrivateFieldSet2(_focusAC,this,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),_classPrivateFieldGet2(_moveInDOMTimeout,this)&&(clearTimeout(_classPrivateFieldGet2(_moveInDOMTimeout,this)),_classPrivateFieldSet2(_moveInDOMTimeout,this,null)),_assertClassBrand(_AnnotationEditor_brand,this,_stopResizing).call(this),this.removeEditToolbar(),_classPrivateFieldGet2(_telemetryTimeouts,this)){for(let e of _classPrivateFieldGet2(_telemetryTimeouts,this).values())clearTimeout(e);_classPrivateFieldSet2(_telemetryTimeouts,this,null)}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(_assertClassBrand(_AnnotationEditor_brand,this,_createResizers).call(this),_classPrivateFieldGet2(_resizersDiv,this).classList.remove(`hidden`),bindEvents(this,this.div,[`keydown`]))}get toolbarPosition(){return null}keydown(t){if(!this.isResizable||t.target!==this.div||t.key!==`Enter`)return;this._uiManager.setSelected(this),_classPrivateFieldSet2(_savedDimensions,this,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});let n=_classPrivateFieldGet2(_resizersDiv,this).children;if(!_classPrivateFieldGet2(_allResizerDivs,this)){_classPrivateFieldSet2(_allResizerDivs,this,Array.from(n));let t=_assertClassBrand(_AnnotationEditor_brand,this,_resizerKeydown).bind(this),r=_assertClassBrand(_AnnotationEditor_brand,this,_resizerBlur).bind(this),i=this._uiManager._signal;for(let n of _classPrivateFieldGet2(_allResizerDivs,this)){let a=n.getAttribute(`data-resizer-name`);n.setAttribute(`role`,`spinbutton`),n.addEventListener(`keydown`,t,{signal:i}),n.addEventListener(`blur`,r,{signal:i}),n.addEventListener(`focus`,_assertClassBrand(_AnnotationEditor_brand,this,_resizerFocus).bind(this,a),{signal:i}),n.setAttribute(`data-l10n-id`,e._l10nResizer[a])}}let r=_classPrivateFieldGet2(_allResizerDivs,this)[0],i=0;for(let e of n){if(e===r)break;i++}let a=(360-this.rotation+this.parentRotation)%360/90*(_classPrivateFieldGet2(_allResizerDivs,this).length/4);if(a!==i){if(a<i)for(let e=0;e<i-a;e++)_classPrivateFieldGet2(_resizersDiv,this).append(_classPrivateFieldGet2(_resizersDiv,this).firstChild);else if(a>i)for(let e=0;e<a-i;e++)_classPrivateFieldGet2(_resizersDiv,this).firstChild.before(_classPrivateFieldGet2(_resizersDiv,this).lastChild);let t=0;for(let r of n){let n=_classPrivateFieldGet2(_allResizerDivs,this)[t++].getAttribute(`data-resizer-name`);r.setAttribute(`data-l10n-id`,e._l10nResizer[n])}}_assertClassBrand(_AnnotationEditor_brand,this,_setResizerTabIndex).call(this,0),_classPrivateFieldSet2(_isResizerEnabledForKeyboard,this,!0),_classPrivateFieldGet2(_resizersDiv,this).firstChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}_resizeWithKeyboard(e,t){_classPrivateFieldGet2(_isResizerEnabledForKeyboard,this)&&_assertClassBrand(_AnnotationEditor_brand,this,_resizerPointermove).call(this,_classPrivateFieldGet2(_focusedResizerName,this),{movementX:e,movementY:t})}_stopResizingWithKeyboard(){_assertClassBrand(_AnnotationEditor_brand,this,_stopResizing).call(this),this.div.focus()}select(){if(this.makeResizable(),this.div?.classList.add(`selectedEditor`),!this._editToolbar){this.addEditToolbar().then(()=>{this.div?.classList.contains(`selectedEditor`)&&this._editToolbar?.show()});return}this._editToolbar?.show(),_classPrivateFieldGet2(_altText3,this)?.toggleAltTextBadge(!1)}unselect(){_classPrivateFieldGet2(_resizersDiv,this)?.classList.add(`hidden`),this.div?.classList.remove(`selectedEditor`),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this._editToolbar?.hide(),_classPrivateFieldGet2(_altText3,this)?.toggleAltTextBadge(!0)}updateParams(e,t){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return _classPrivateFieldGet2(_isEditing,this)}set isEditing(e){_classPrivateFieldSet2(_isEditing,this,e),this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(e,t){_classPrivateFieldSet2(_keepAspectRatio,this,!0);let n=e/t,{style:r}=this.div;r.aspectRatio=n,r.height=`auto`}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:`added`}}get telemetryFinalData(){return null}_reportTelemetry(t,n=!1){if(n){_classPrivateFieldGet2(_telemetryTimeouts,this)||_classPrivateFieldSet2(_telemetryTimeouts,this,new Map);let{action:n}=t,r=_classPrivateFieldGet2(_telemetryTimeouts,this).get(n);r&&clearTimeout(r),r=setTimeout(()=>{this._reportTelemetry(t),_classPrivateFieldGet2(_telemetryTimeouts,this).delete(n),_classPrivateFieldGet2(_telemetryTimeouts,this).size===0&&_classPrivateFieldSet2(_telemetryTimeouts,this,null)},e._telemetryTimeout),_classPrivateFieldGet2(_telemetryTimeouts,this).set(n,r);return}t.type||=this.editorType,this._uiManager._eventBus.dispatch(`reporttelemetry`,{source:this,details:{type:`editing`,data:t}})}
71show(e=this._isVisible){this.div.classList.toggle(`hidden`,!e),this._isVisible=e}enable(){this.div&&(this.div.tabIndex=0),_classPrivateFieldSet2(_disabled,this,!1)}disable(){this.div&&(this.div.tabIndex=-1),_classPrivateFieldSet2(_disabled,this,!0)}renderAnnotationElement(e){let t=e.container.querySelector(`.annotationContent`);if(!t)t=document.createElement(`div`),t.classList.add(`annotationContent`,this.editorType),e.container.prepend(t);else if(t.nodeName===`CANVAS`){let e=t;t=document.createElement(`div`),t.classList.add(`annotationContent`,this.editorType),e.before(t)}return t}resetAnnotationElement(e){let{firstChild:t}=e.container;t?.nodeName===`DIV`&&t.classList.contains(`annotationContent`)&&t.remove()}};_AnnotationEditor=AnnotationEditor;function _translate([e,t],n,r){[n,r]=this.screenToPageTranslation(n,r),this.x+=n/e,this.y+=r/t,this.fixAndSetPosition()}function _rotatePoint(e,t,n){switch(n){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}}function _getRotationMatrix(e){switch(e){case 90:{let[e,t]=this.pageDimensions;return[0,-e/t,t/e,0]}case 180:return[-1,0,0,-1];case 270:{let[e,t]=this.pageDimensions;return[0,e/t,-t/e,0]}default:return[1,0,0,1]}}function _createResizers(){if(_classPrivateFieldGet2(_resizersDiv,this))return;_classPrivateFieldSet2(_resizersDiv,this,document.createElement(`div`)),_classPrivateFieldGet2(_resizersDiv,this).classList.add(`resizers`);let e=this._willKeepAspectRatio?[`topLeft`,`topRight`,`bottomRight`,`bottomLeft`]:[`topLeft`,`topMiddle`,`topRight`,`middleRight`,`bottomRight`,`bottomMiddle`,`bottomLeft`,`middleLeft`],t=this._uiManager._signal;for(let n of e){let e=document.createElement(`div`);_classPrivateFieldGet2(_resizersDiv,this).append(e),e.classList.add(`resizer`,n),e.setAttribute(`data-resizer-name`,n),e.addEventListener(`pointerdown`,_assertClassBrand(_AnnotationEditor_brand,this,_resizerPointerdown).bind(this,n),{signal:t}),e.addEventListener(`contextmenu`,noContextMenu,{signal:t}),e.tabIndex=-1}this.div.prepend(_classPrivateFieldGet2(_resizersDiv,this))}function _resizerPointerdown(e,t){t.preventDefault();let{isMac:n}=util_FeatureTest.platform;if(t.button!==0||t.ctrlKey&&n)return;_classPrivateFieldGet2(_altText3,this)?.toggle(!1);let r=this._isDraggable;this._isDraggable=!1;let i=new AbortController,a=this._uiManager.combinedSignal(i);this.parent.togglePointerEvents(!1),window.addEventListener(`pointermove`,_assertClassBrand(_AnnotationEditor_brand,this,_resizerPointermove).bind(this,e),{passive:!0,capture:!0,signal:a}),window.addEventListener(`contextmenu`,noContextMenu,{signal:a});let o=this.x,c=this.y,u=this.width,K=this.height,Y=this.parent.div.style.cursor,X=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor;let ee=()=>{i.abort(),this.parent.togglePointerEvents(!0),_classPrivateFieldGet2(_altText3,this)?.toggle(!0),this._isDraggable=r,this.parent.div.style.cursor=Y,this.div.style.cursor=X,_assertClassBrand(_AnnotationEditor_brand,this,_addResizeToUndoStack).call(this,o,c,u,K)};window.addEventListener(`pointerup`,ee,{signal:a}),window.addEventListener(`blur`,ee,{signal:a})}function _addResizeToUndoStack(e,t,n,r){let i=this.x,a=this.y,o=this.width,c=this.height;(i!==e||a!==t||o!==n||c!==r)&&this.addCommands({cmd:()=>{this.width=o,this.height=c,this.x=i,this.y=a;let[e,t]=this.parentDimensions;this.setDims(e*o,t*c),this.fixAndSetPosition()},undo:()=>{this.width=n,this.height=r,this.x=e,this.y=t;let[i,a]=this.parentDimensions;this.setDims(i*n,a*r),this.fixAndSetPosition()},mustExec:!0})}function _resizerPointermove(e,t){let[n,r]=this.parentDimensions,i=this.x,a=this.y,o=this.width,c=this.height,u=_AnnotationEditor.MIN_SIZE/n,K=_AnnotationEditor.MIN_SIZE/r,Y=e=>Math.round(e*1e4)/1e4,X=_assertClassBrand(_AnnotationEditor_brand,this,_getRotationMatrix).call(this,this.rotation),ee=(e,t)=>[X[0]*e+X[2]*t,X[1]*e+X[3]*t],te=_assertClassBrand(_AnnotationEditor_brand,this,_getRotationMatrix).call(this,360-this.rotation),ce=(e,t)=>[te[0]*e+te[2]*t,te[1]*e+te[3]*t],ue,de,fe=!1,me=!1;switch(e){case`topLeft`:fe=!0,ue=(e,t)=>
71[0,0],de=(e,t)=>[e,t];break;case`topMiddle`:ue=(e,t)=>[e/2,0],de=(e,t)=>[e/2,t];break;case`topRight`:fe=!0,ue=(e,t)=>[e,0],de=(e,t)=>[0,t];break;case`middleRight`:me=!0,ue=(e,t)=>[e,t/2],de=(e,t)=>[0,t/2];break;case`bottomRight`:fe=!0,ue=(e,t)=>[e,t],de=(e,t)=>[0,0];break;case`bottomMiddle`:ue=(e,t)=>[e/2,t],de=(e,t)=>[e/2,0];break;case`bottomLeft`:fe=!0,ue=(e,t)=>[0,t],de=(e,t)=>[e,0];break;case`middleLeft`:me=!0,ue=(e,t)=>[0,t/2],de=(e,t)=>[e,t/2]}let ge=ue(o,c),Te=de(o,c),Oe=ee(...Te),Ae=Y(i+Oe[0]),ze=Y(a+Oe[1]),qe=1,Ye=1,[Ze,Qe]=this.screenToPageTranslation(t.movementX,t.movementY);if([Ze,Qe]=ce(Ze/n,Qe/r),fe){let e=Math.hypot(o,c);qe=Ye=Math.max(Math.min(Math.hypot(Te[0]-ge[0]-Ze,Te[1]-ge[1]-Qe)/e,1/o,1/c),u/o,K/c)}else me?qe=Math.max(u,Math.min(1,Math.abs(Te[0]-ge[0]-Ze)))/o:Ye=Math.max(K,Math.min(1,Math.abs(Te[1]-ge[1]-Qe)))/c;let et=Y(o*qe),nt=Y(c*Ye);Oe=ee(...de(et,nt));let rt=Ae-Oe[0],it=ze-Oe[1];this.width=et,this.height=nt,this.x=rt,this.y=it,this.setDims(n*et,r*nt),this.fixAndSetPosition()}function _selectOnPointerEvent(e){let{isMac:t}=util_FeatureTest.platform;e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)}function _setUpDragSession(e){let{isSelected:t}=this;this._uiManager.setUpDragSession();let n=new AbortController,r=this._uiManager.combinedSignal(n);t&&(this.div.classList.add(`moving`),_classPrivateFieldSet2(_prevDragX,this,e.clientX),_classPrivateFieldSet2(_prevDragY,this,e.clientY),window.addEventListener(`pointermove`,e=>{let{clientX:t,clientY:n}=e,[r,i]=this.screenToPageTranslation(t-_classPrivateFieldGet2(_prevDragX,this),n-_classPrivateFieldGet2(_prevDragY,this));_classPrivateFieldSet2(_prevDragX,this,t),_classPrivateFieldSet2(_prevDragY,this,n),this._uiManager.dragSelectedEditors(r,i)},{passive:!0,capture:!0,signal:r}));let i=()=>{n.abort(),t&&this.div.classList.remove(`moving`),_classPrivateFieldSet2(_hasBeenClicked,this,!1),this._uiManager.endDragSession()||_assertClassBrand(_AnnotationEditor_brand,this,_selectOnPointerEvent).call(this,e)};window.addEventListener(`pointerup`,i,{signal:r}),window.addEventListener(`blur`,i,{signal:r})}function _addFocusListeners(){if(_classPrivateFieldGet2(_focusAC,this)||!this.div)return;_classPrivateFieldSet2(_focusAC,this,new AbortController);let e=this._uiManager.combinedSignal(_classPrivateFieldGet2(_focusAC,this));this.div.addEventListener(`focusin`,this.focusin.bind(this),{signal:e}),this.div.addEventListener(`focusout`,this.focusout.bind(this),{signal:e})}function _resizerKeydown(e){_AnnotationEditor._resizerKeyboardManager.exec(this,e)}function _resizerBlur(e){_classPrivateFieldGet2(_isResizerEnabledForKeyboard,this)&&e.relatedTarget?.parentNode!==_classPrivateFieldGet2(_resizersDiv,this)&&_assertClassBrand(_AnnotationEditor_brand,this,_stopResizing).call(this)}function _resizerFocus(e){_classPrivateFieldSet2(_focusedResizerName,this,_classPrivateFieldGet2(_isResizerEnabledForKeyboard,this)?e:``)}function _setResizerTabIndex(e){if(_classPrivateFieldGet2(_allResizerDivs,this))for(let t of _classPrivateFieldGet2(_allResizerDivs,this))t.tabIndex=e}function _stopResizing(){if(_classPrivateFieldSet2(_isResizerEnabledForKeyboard,this,!1),_assertClassBrand(_AnnotationEditor_brand,this,_setResizerTabIndex).call(this,-1),_classPrivateFieldGet2(_savedDimensions,this)){let{savedX:e,savedY:t,savedWidth:n,savedHeight:r}=_classPrivateFieldGet2(_savedDimensions,this);_assertClassBrand(_AnnotationEditor_brand,this,_addResizeToUndoStack).call(this,e,t,n,r),_classPrivateFieldSet2(_savedDimensions,this,null)}}_defineProperty$6(AnnotationEditor,`_l10n`,null),_defineProperty$6(AnnotationEditor,`_l10nResizer`,null),_defineProperty$6(AnnotationEditor,`_borderLineWidth`,-1),_defineProperty$6(AnnotationEditor,`_colorManager`,new ColorManager),_defineProperty$6(AnnotationEditor,`_zIndex`,1),_defineProperty$6(AnnotationEditor,`_telemetryTimeout`,1e3);var FakeEditor=class extends AnnotationEditor{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}},SEED=3285377520,MASK_HIGH=4294901760,MASK_LOW=65535,MurmurHash3_64=class{constructor(e){this.h1=e?e&4294967295:SEED,this.h2=e?e&4294967295:SEED}update(e){let t,n;
71if(typeof e==`string`){t=new Uint8Array(e.length*2),n=0;for(let r=0,i=e.length;r<i;r++){let i=e.charCodeAt(r);i<=255?t[n++]=i:(t[n++]=i>>>8,t[n++]=i&255)}}else if(ArrayBuffer.isView(e))t=e.slice(),n=t.byteLength;else throw Error(`Invalid data format, must be a string or TypedArray.`);let r=n>>2,i=n-r*4,a=new Uint32Array(t.buffer,0,r),o=0,c=0,u=this.h1,K=this.h2,Y=3432918353,X=461845907,ee=11601,te=13715;for(let e=0;e<r;e++)e&1?(o=a[e],o=o*Y&MASK_HIGH|o*ee&MASK_LOW,o=o<<15|o>>>17,o=o*X&MASK_HIGH|o*te&MASK_LOW,u^=o,u=u<<13|u>>>19,u=u*5+3864292196):(c=a[e],c=c*Y&MASK_HIGH|c*ee&MASK_LOW,c=c<<15|c>>>17,c=c*X&MASK_HIGH|c*te&MASK_LOW,K^=c,K=K<<13|K>>>19,K=K*5+3864292196);switch(o=0,i){case 3:o^=t[r*4+2]<<16;case 2:o^=t[r*4+1]<<8;case 1:o^=t[r*4],o=o*Y&MASK_HIGH|o*ee&MASK_LOW,o=o<<15|o>>>17,o=o*X&MASK_HIGH|o*te&MASK_LOW,r&1?u^=o:K^=o}this.h1=u,this.h2=K}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=e*3981806797&MASK_HIGH|e*36045&MASK_LOW,t=t*4283543511&MASK_HIGH|((t<<16|e>>>16)*2950163797&MASK_HIGH)>>>16,e^=t>>>1,e=e*444984403&MASK_HIGH|e*60499&MASK_LOW,t=t*3301882366&MASK_HIGH|((t<<16|e>>>16)*3120437893&MASK_HIGH)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,`0`)+(t>>>0).toString(16).padStart(8,`0`)}},SerializableEmpty=Object.freeze({map:null,hash:``,transfer:void 0}),_modified=new WeakMap,_modifiedIds=new WeakMap,_storage=new WeakMap,_AnnotationStorage_brand=new WeakSet,AnnotationStorage=class{constructor(){_classPrivateMethodInitSpec(this,_AnnotationStorage_brand),_classPrivateFieldInitSpec(this,_modified,!1),_classPrivateFieldInitSpec(this,_modifiedIds,null),_classPrivateFieldInitSpec(this,_storage,new Map),this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){let n=_classPrivateFieldGet2(_storage,this).get(e);return n===void 0?t:Object.assign(t,n)}getRawValue(e){return _classPrivateFieldGet2(_storage,this).get(e)}remove(e){if(_classPrivateFieldGet2(_storage,this).delete(e),_classPrivateFieldGet2(_storage,this).size===0&&this.resetModified(),typeof this.onAnnotationEditor==`function`){for(let e of _classPrivateFieldGet2(_storage,this).values())if(e instanceof AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(e,t){let n=_classPrivateFieldGet2(_storage,this).get(e),r=!1;if(n!==void 0)for(let[e,i]of Object.entries(t))n[e]!==i&&(r=!0,n[e]=i);else r=!0,_classPrivateFieldGet2(_storage,this).set(e,t);r&&_assertClassBrand(_AnnotationStorage_brand,this,_setModified).call(this),t instanceof AnnotationEditor&&typeof this.onAnnotationEditor==`function`&&this.onAnnotationEditor(t.constructor._type)}has(e){return _classPrivateFieldGet2(_storage,this).has(e)}getAll(){return _classPrivateFieldGet2(_storage,this).size>0?objectFromMap(_classPrivateFieldGet2(_storage,this)):null}setAll(e){for(let[t,n]of Object.entries(e))this.setValue(t,n)}get size(){return _classPrivateFieldGet2(_storage,this).size}resetModified(){_classPrivateFieldGet2(_modified,this)&&(_classPrivateFieldSet2(_modified,this,!1),typeof this.onResetModified==`function`&&this.onResetModified())}get print(){return new PrintAnnotationStorage(this)}get serializable(){if(_classPrivateFieldGet2(_storage,this).size===0)return SerializableEmpty;let e=new Map,t=new MurmurHash3_64,n=[],r=Object.create(null),i=!1;for(let[n,a]of _classPrivateFieldGet2(_storage,this)){let o=a instanceof AnnotationEditor?a.serialize(!1,r):a;o&&(e.set(n,o),t.update(`${n}:${JSON.stringify(o)}`),i||=!!o.bitmap)}if(i)for(let t of e.values())t.bitmap&&n.push(t.bitmap);return e.size>0?{map:e,hash:t.hexdigest(),transfer:n}:SerializableEmpty}get editorStats(){let e=null,t=new Map;for(let n of _classPrivateFieldGet2(_storage,this).values()){if(!(n instanceof AnnotationEditor))continue;let r=n.telemetryFinalData;if(!r)continue;let{type:i}=r;t.has(i)||t.set(i,Object.getPrototypeOf(n).constructor),e||=Object.create(null);let a=e[i]||=new Map;for(let[e,t]of Object.entries(r)){if(e===`type`)continue;let n=a.get(e);n||(n=new Map,a.set(e,n));let r=n.get(t)??0;n.set(t,r+1)}}for(let[n,r]of t)e[n]=r.computeTelemetryFinalData(e[n]);return e}resetModifiedIds(){_classPrivateFieldSet2(_modifiedIds,this,null)}get modifiedIds(){if(_classPrivateFieldGet2(_modifiedIds,this))return _classPrivateFieldGet2(_modifiedIds,this);let e=[];for(let t of _classPrivateFieldGet2(_storage,this).values())t instanceof AnnotationEditor&&t.annotationElementId&&t.serialize()&&e.push(t.annotationElementId);return _classPrivateFieldSet2(_modifiedIds,this,{ids:new Set(e),hash:e.join(`,`)})}};function _setModified(){_classPrivateFieldGet2(_modified,this)||(_classPrivateFieldSet2(_modified,this,!0),typeof this.onSetModified==`function`&&this.onSetModified())}var _serializable=new WeakMap,PrintAnnotationStorage=class extends AnnotationStorage{constructor(e){super(),_classPrivateFieldInitSpec(this,_serializable,void 0);let{map:t,hash:n,transfer:r}=e.serializable,i=structuredClone(t,r?{transfer:r}:null);_classPrivateFieldSet2(_serializable,this,{map:i,hash:n,transfer:r})}get print(){unreachable$1(`Should not call PrintAnnotationStorage.print`)}get serializable(){return _classPrivateFieldGet2(_serializable,this)}get modifiedIds(){return shadow(this,`modifiedIds`,{ids:new Set,hash:``})}},_systemFonts=new WeakMap,FontLoader=class{constructor({ownerDocument:e=globalThis.document,styleElement:t=null}){_classPrivateFieldInitSpec(this,_systemFonts,new Set),this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement(`style`),this._document.documentElement.getElementsByTagName(`head`)[0].append(this.styleElement));let t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(let e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),_classPrivateFieldGet2(_systemFonts,this).clear(),this.styleElement&&=(this.styleElement.remove(),null)}async loadSystemFont({systemFontInfo:e,_inspectFont:t}){if(e&&!_classPrivateFieldGet2(_systemFonts,this).has(e.loadedName)){if(assert(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){let{loadedName:n,src:r,style:i}=e,a=new FontFace(n,r,i);
71this.addNativeFontFace(a);try{await a.load(),_classPrivateFieldGet2(_systemFonts,this).add(n),t?.(e)}catch{warn(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(a)}return}unreachable$1(`Not implemented: loadSystemFont without the Font Loading API.`)}}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo){await this.loadSystemFont(e);return}if(this.isFontLoadingAPISupported){let t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(n){throw warn(`Failed to load font '${t.family}': '${n}'.`),e.disableFontFace=!0,n}}return}let t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise(t=>{let n=this._queueLoadingCallback(t);this._prepareFontLoadEvent(e,n)})}}get isFontLoadingAPISupported(){let e=!!this._document?.fonts;return shadow(this,`isFontLoadingAPISupported`,e)}get isSyncFontLoadingSupported(){let e=!1;return(isNodeJS||typeof navigator<`u`&&typeof navigator?.userAgent==`string`&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),shadow(this,`isSyncFontLoadingSupported`,e)}_queueLoadingCallback(e){function t(){for(assert(!r.done,`completeRequest() cannot be called twice.`),r.done=!0;n.length>0&&n[0].done;){let e=n.shift();setTimeout(e.callback,0)}}let{loadingRequests:n}=this,r={done:!1,complete:t,callback:e};return n.push(r),r}get _loadTestFont(){let e=atob(`T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==`);return shadow(this,`_loadTestFont`,e)}_prepareFontLoadEvent(e,t){function n(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3)&255}function r(e,t,n,r){let i=e.substring(0,t),a=e.substring(t+n);return i+r+a}let i,a,o=this._document.createElement(`canvas`);o.width=1,o.height=1;let c=o.getContext(`2d`),u=0;function K(e,t){if(++u>30){warn(`Load test font never loaded.`),t();return}if(c.font=`30px `+e,c.fillText(`.`,0,20),c.getImageData(0,0,1,1).data[3]>0){t();return}setTimeout(K.bind(null,e,t))}let Y=`lt${Date.now()}${this.loadTestFontId++}`,X=this._loadTestFont;X=r(X,976,Y.length,Y);let ee=16,te=1482184792,ce=n(X,16);for(i=0,a=Y.length-3;i<a;i+=4)ce=ce-te+n(Y,i)|0;i<Y.length&&(ce=ce-te+n(Y+`XXX`,i)|0),X=r(X,16,4,string32(ce));let ue=`@font-face {font-family:"${Y}";src:${`url(data:font/opentype;base64,${btoa(X)});`}}`;this.insertRule(ue);let de=this._document.createElement(`div`);de.style.visibility=`hidden`,de.style.width=de.style.height=`10px`,de.style.position=`absolute`,de.style.top=de.style.left=`0px`;for(let t of[e.loadedName,Y]){let e=this._document.createElement(`span`);e.textContent=`Hi`,e.style.fontFamily=t,de.append(e)}this._document.body.append(de),K(Y,()=>{de.remove(),t.complete()})}},FontFaceObject=class{constructor(e,{disableFontFace:t=!1,inspectFont:n=null}){this.compiledGlyphs=Object.create(null);for(let t in e)this[t]=e[t];this.disableFontFace=t===!0,this._inspectFont=n}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let e;if(!this.cssFontInfo)e=new FontFace(this.loadedName,this.data,{});else{let t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,t)}return this._inspectFont?.(this),e}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;let e=`url(data:${this.mimetype};base64,${toBase64Util(this.data)});`,t;if(!this.cssFontInfo)t=`@font-face {font-family:"${this.loadedName}";src:${e}}`;else{let n=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(n+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),t=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${n}src:${e}}`}return this._inspectFont?.(this,e),t}getPathGenerator(e,t){if(this.compiledGlyphs[t]!==void 0)return this.compiledGlyphs[t];let n;try{n=e.get(this.loadedName+`_path_`+t)}catch(e){warn(`getPathGenerator - ignoring character: "${e}".`)}if(!Array.isArray(n)||n.length===0)return this.compiledGlyphs[t]=function(e,t){};let r=[];for(let e=0,t=n.length;e<t;)switch(n[e++]){case FontRenderOps.BEZIER_CURVE_TO:{let[t,i,a,o,c,u]=n.slice(e,e+6);r.push(e=>e.bezierCurveTo(t,i,a,o,c,u)),e+=6}break;case FontRenderOps.MOVE_TO:{let[t,i]=n.slice(e,e+2);r.push(e=>e.moveTo(t,i)),e+=2}break;case FontRenderOps.LINE_TO:{let[t,i]=n.slice(e,e+2);r.push(e=>e.lineTo(t,i)),e+=2}break;case FontRenderOps.QUADRATIC_CURVE_TO:{let[t,i,a,o]=n.slice(e,e+4);r.push(e=>e.quadraticCurveTo(t,i,a,o)),e+=4}break;case FontRenderOps.RESTORE:r.push(e=>
71e.restore());break;case FontRenderOps.SAVE:r.push(e=>e.save());break;case FontRenderOps.SCALE:assert(r.length===2,`Scale command is only valid at the third position.`);break;case FontRenderOps.TRANSFORM:{let[t,i,a,o,c,u]=n.slice(e,e+6);r.push(e=>e.transform(t,i,a,o,c,u)),e+=6}break;case FontRenderOps.TRANSLATE:{let[t,i]=n.slice(e,e+2);r.push(e=>e.translate(t,i)),e+=2}}return this.compiledGlyphs[t]=function(e,t){r[0](e),r[1](e),e.scale(t,-t);for(let t=2,n=r.length;t<n;t++)r[t](e)}}},_enableHWA=new WeakMap,BaseCanvasFactory=class{constructor({enableHWA:e=!1}){_classPrivateFieldInitSpec(this,_enableHWA,!1),_classPrivateFieldSet2(_enableHWA,this,e)}create(e,t){if(e<=0||t<=0)throw Error(`Invalid canvas size`);let n=this._createCanvas(e,t);return{canvas:n,context:n.getContext(`2d`,{willReadFrequently:!_classPrivateFieldGet2(_enableHWA,this)})}}reset(e,t,n){if(!e.canvas)throw Error(`Canvas is not specified`);if(t<=0||n<=0)throw Error(`Invalid canvas size`);e.canvas.width=t,e.canvas.height=n}destroy(e){if(!e.canvas)throw Error(`Canvas is not specified`);e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){unreachable$1("Abstract method `_createCanvas` called.")}},DOMCanvasFactory=class extends BaseCanvasFactory{constructor({ownerDocument:e=globalThis.document,enableHWA:t=!1}){super({enableHWA:t}),this._document=e}_createCanvas(e,t){let n=this._document.createElement(`canvas`);return n.width=e,n.height=t,n}},BaseCMapReaderFactory=class{constructor({baseUrl:e=null,isCompressed:t=!0}){this.baseUrl=e,this.isCompressed=t}async fetch({name:e}){if(!this.baseUrl)throw Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!e)throw Error(`CMap name must be specified.`);let t=this.baseUrl+e+(this.isCompressed?`.bcmap`:``);return this._fetch(t).then(e=>({cMapData:e,isCompressed:this.isCompressed})).catch(e=>{throw Error(`Unable to load ${this.isCompressed?`binary `:``}CMap at: ${t}`)})}async _fetch(e){unreachable$1("Abstract method `_fetch` called.")}},DOMCMapReaderFactory=class extends BaseCMapReaderFactory{async _fetch(e){let t=await fetchData(e,this.isCompressed?`arraybuffer`:`text`);return t instanceof ArrayBuffer?new Uint8Array(t):stringToBytes(t)}},BaseFilterFactory=class{addFilter(e){return`none`}addHCMFilter(e,t){return`none`}addAlphaFilter(e){return`none`}addLuminosityFilter(e){return`none`}addHighlightHCMFilter(e,t,n,r,i){return`none`}destroy(e=!1){}},_baseUrl=new WeakMap,_cache2=new WeakMap,_defs=new WeakMap,_docId=new WeakMap,_document=new WeakMap,_hcmCache=new WeakMap,_id3=new WeakMap,_DOMFilterFactory_brand=new WeakSet,DOMFilterFactory=class extends BaseFilterFactory{constructor({docId:e,ownerDocument:t=globalThis.document}){super(),_classPrivateMethodInitSpec(this,_DOMFilterFactory_brand),_classPrivateFieldInitSpec(this,_baseUrl,void 0),_classPrivateFieldInitSpec(this,_cache2,void 0),_classPrivateFieldInitSpec(this,_defs,void 0),_classPrivateFieldInitSpec(this,_docId,void 0),_classPrivateFieldInitSpec(this,_document,void 0),_classPrivateFieldInitSpec(this,_hcmCache,void 0),_classPrivateFieldInitSpec(this,_id3,0),_classPrivateFieldSet2(_docId,this,e),_classPrivateFieldSet2(_document,this,t)}addFilter(e){var t,n;if(!e)return`none`;let r=_get_cache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).get(e);if(r)return r;let[i,a,o]=_assertClassBrand(_DOMFilterFactory_brand,this,_createTables).call(this,e),c=e.length===1?i:`${i}${a}${o}`;if(r=_get_cache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).get(c),r)return _get_cache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).set(e,r),r;let u=`g_${_classPrivateFieldGet2(_docId,this)}_transfer_map_${_classPrivateFieldSet2(_id3,this,(t=_classPrivateFieldGet2(_id3,this),n=t++,t)),n}`,K=_assertClassBrand(_DOMFilterFactory_brand,this,_createUrl).call(this,u);_get_cache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).set(e,K),_get_cache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).set(c,K);let Y=_assertClassBrand(_DOMFilterFactory_brand,this,_createFilter).call(this,u);return _assertClassBrand(_DOMFilterFactory_brand,this,_addTransferMapConversion).call(this,i,a,o,Y),K}addHCMFilter(e,t){let n=`${e}-${t}
71`,r=`base`,i=_get_hcmCache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).get(r);if(i?.key===n||(i?(i.filter?.remove(),i.key=n,i.url=`none`,i.filter=null):(i={key:n,url:`none`,filter:null},_get_hcmCache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).set(r,i)),!e||!t))return i.url;let a=_assertClassBrand(_DOMFilterFactory_brand,this,_getRGB).call(this,e);e=Util.makeHexColor(...a);let o=_assertClassBrand(_DOMFilterFactory_brand,this,_getRGB).call(this,t);if(t=Util.makeHexColor(...o),_get_defs.call(_assertClassBrand(_DOMFilterFactory_brand,this)).style.color=``,e===`#000000`&&t===`#ffffff`||e===t)return i.url;let c=Array(256);for(let e=0;e<=255;e++){let t=e/255;c[e]=t<=.03928?t/12.92:((t+.055)/1.055)**2.4}let u=c.join(`,`),K=`g_${_classPrivateFieldGet2(_docId,this)}_hcm_filter`,Y=i.filter=_assertClassBrand(_DOMFilterFactory_brand,this,_createFilter).call(this,K);_assertClassBrand(_DOMFilterFactory_brand,this,_addTransferMapConversion).call(this,u,u,u,Y),_assertClassBrand(_DOMFilterFactory_brand,this,_addGrayConversion).call(this,Y);let X=(e,t)=>{let n=a[e]/255,r=o[e]/255,i=Array(t+1);for(let e=0;e<=t;e++)i[e]=n+e/t*(r-n);return i.join(`,`)};return _assertClassBrand(_DOMFilterFactory_brand,this,_addTransferMapConversion).call(this,X(0,5),X(1,5),X(2,5),Y),i.url=_assertClassBrand(_DOMFilterFactory_brand,this,_createUrl).call(this,K),i.url}addAlphaFilter(e){var t,n;let r=_get_cache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).get(e);if(r)return r;let[i]=_assertClassBrand(_DOMFilterFactory_brand,this,_createTables).call(this,[e]),a=`alpha_${i}`;if(r=_get_cache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).get(a),r)return _get_cache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).set(e,r),r;let o=`g_${_classPrivateFieldGet2(_docId,this)}_alpha_map_${_classPrivateFieldSet2(_id3,this,(t=_classPrivateFieldGet2(_id3,this),n=t++,t)),n}`,c=_assertClassBrand(_DOMFilterFactory_brand,this,_createUrl).call(this,o);_get_cache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).set(e,c),_get_cache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).set(a,c);let u=_assertClassBrand(_DOMFilterFactory_brand,this,_createFilter).call(this,o);return _assertClassBrand(_DOMFilterFactory_brand,this,_addTransferMapAlphaConversion).call(this,i,u),c}addLuminosityFilter(e){var t,n;let r=_get_cache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).get(e||`luminosity`);if(r)return r;let i,a;if(e?([i]=_assertClassBrand(_DOMFilterFactory_brand,this,_createTables).call(this,[e]),a=`luminosity_${i}`):a=`luminosity`,r=_get_cache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).get(a),r)return _get_cache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).set(e,r),r;let o=`g_${_classPrivateFieldGet2(_docId,this)}_luminosity_map_${_classPrivateFieldSet2(_id3,this,(t=_classPrivateFieldGet2(_id3,this),n=t++,t)),n}`,c=_assertClassBrand(_DOMFilterFactory_brand,this,_createUrl).call(this,o);_get_cache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).set(e,c),_get_cache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).set(a,c);let u=_assertClassBrand(_DOMFilterFactory_brand,this,_createFilter).call(this,o);return _assertClassBrand(_DOMFilterFactory_brand,this,_addLuminosityConversion).call(this,u),e&&_assertClassBrand(_DOMFilterFactory_brand,this,_addTransferMapAlphaConversion).call(this,i,u),c}addHighlightHCMFilter(e,t,n,r,i){let a=`${t}-${n}-${r}-${i}`,o=_get_hcmCache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).get(e);if(o?.key===a||(o?(o.filter?.remove(),o.key=a,o.url=`none`,o.filter=null):(o={key:a,url:`none`,filter:null},_get_hcmCache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).set(e,o)),!t||!n))return o.url;let[c,u]=[t,n].map(_assertClassBrand(_DOMFilterFactory_brand,this,_getRGB).bind(this)),K=Math.round(.2126*c[0]+.7152*c[1]+.0722*c[2]),Y=Math.round(.2126*u[0]+.7152*u[1]+.0722*u[2]),[X,ee]=[r,i].map(_assertClassBrand(_DOMFilterFactory_brand,this,_getRGB).bind(this));Y<K&&([K,Y,X,ee]=[Y,K,ee,X]),_get_defs.call(_assertClassBrand(_DOMFilterFactory_brand,this)).style.color=``;
71let te=(e,t,n)=>{let r=Array(256),i=(Y-K)/n,a=e/255,o=(t-e)/(255*n),c=0;for(let e=0;e<=n;e++){let t=Math.round(K+e*i),n=a+e*o;for(let e=c;e<=t;e++)r[e]=n;c=t+1}for(let e=c;e<256;e++)r[e]=r[c-1];return r.join(`,`)},ce=`g_${_classPrivateFieldGet2(_docId,this)}_hcm_${e}_filter`,ue=o.filter=_assertClassBrand(_DOMFilterFactory_brand,this,_createFilter).call(this,ce);return _assertClassBrand(_DOMFilterFactory_brand,this,_addGrayConversion).call(this,ue),_assertClassBrand(_DOMFilterFactory_brand,this,_addTransferMapConversion).call(this,te(X[0],ee[0],5),te(X[1],ee[1],5),te(X[2],ee[2],5),ue),o.url=_assertClassBrand(_DOMFilterFactory_brand,this,_createUrl).call(this,ce),o.url}destroy(e=!1){e&&_get_hcmCache.call(_assertClassBrand(_DOMFilterFactory_brand,this)).size!==0||(_classPrivateFieldGet2(_defs,this)&&(_classPrivateFieldGet2(_defs,this).parentNode.parentNode.remove(),_classPrivateFieldSet2(_defs,this,null)),_classPrivateFieldGet2(_cache2,this)&&(_classPrivateFieldGet2(_cache2,this).clear(),_classPrivateFieldSet2(_cache2,this,null)),_classPrivateFieldSet2(_id3,this,0))}};function _get_cache(){return _classPrivateFieldGet2(_cache2,this)||_classPrivateFieldSet2(_cache2,this,new Map)}function _get_hcmCache(){return _classPrivateFieldGet2(_hcmCache,this)||_classPrivateFieldSet2(_hcmCache,this,new Map)}function _get_defs(){if(!_classPrivateFieldGet2(_defs,this)){let e=_classPrivateFieldGet2(_document,this).createElement(`div`),{style:t}=e;t.visibility=`hidden`,t.contain=`strict`,t.width=t.height=0,t.position=`absolute`,t.top=t.left=0,t.zIndex=-1;let n=_classPrivateFieldGet2(_document,this).createElementNS(SVG_NS,`svg`);n.setAttribute(`width`,0),n.setAttribute(`height`,0),_classPrivateFieldSet2(_defs,this,_classPrivateFieldGet2(_document,this).createElementNS(SVG_NS,`defs`)),e.append(n),n.append(_classPrivateFieldGet2(_defs,this)),_classPrivateFieldGet2(_document,this).body.append(e)}return _classPrivateFieldGet2(_defs,this)}function _createTables(e){if(e.length===1){let t=e[0],n=Array(256);for(let e=0;e<256;e++)n[e]=t[e]/255;let r=n.join(`,`);return[r,r,r]}let[t,n,r]=e,i=Array(256),a=Array(256),o=Array(256);for(let e=0;e<256;e++)i[e]=t[e]/255,a[e]=n[e]/255,o[e]=r[e]/255;return[i.join(`,`),a.join(`,`),o.join(`,`)]}function _createUrl(e){if(_classPrivateFieldGet2(_baseUrl,this)===void 0){_classPrivateFieldSet2(_baseUrl,this,``);let e=_classPrivateFieldGet2(_document,this).URL;e!==_classPrivateFieldGet2(_document,this).baseURI&&(isDataScheme(e)?warn(`#createUrl: ignore "data:"-URL for performance reasons.`):_classPrivateFieldSet2(_baseUrl,this,e.split(`#`,1)[0]))}return`url(${_classPrivateFieldGet2(_baseUrl,this)}#${e})`}function _addLuminosityConversion(e){let t=_classPrivateFieldGet2(_document,this).createElementNS(SVG_NS,`feColorMatrix`);t.setAttribute(`type`,`matrix`),t.setAttribute(`values`,`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0`),e.append(t)}function _addGrayConversion(e){let t=_classPrivateFieldGet2(_document,this).createElementNS(SVG_NS,`feColorMatrix`);t.setAttribute(`type`,`matrix`),t.setAttribute(`values`,`0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0`),e.append(t)}function _createFilter(e){let t=_classPrivateFieldGet2(_document,this).createElementNS(SVG_NS,`filter`);return t.setAttribute(`color-interpolation-filters`,`sRGB`),t.setAttribute(`id`,e),_get_defs.call(_assertClassBrand(_DOMFilterFactory_brand,this)).append(t),t}function _appendFeFunc(e,t,n){let r=_classPrivateFieldGet2(_document,this).createElementNS(SVG_NS,t);r.setAttribute(`type`,`discrete`),r.setAttribute(`tableValues`,n),e.append(r)}function _addTransferMapConversion(e,t,n,r){let i=_classPrivateFieldGet2(_document,this).createElementNS(SVG_NS,`feComponentTransfer`);r.append(i),_assertClassBrand(_DOMFilterFactory_brand,this,_appendFeFunc).call(this,i,`feFuncR`,e),_assertClassBrand(_DOMFilterFactory_brand,this,_appendFeFunc).call(this,i,`feFuncG`,t),_assertClassBrand(_DOMFilterFactory_brand,this,_appendFeFunc).call(this,i,`feFuncB`,n)}function _addTransferMapAlphaConversion(e,t){let n=_classPrivateFieldGet2(_document,this).createElementNS(SVG_NS,`feComponentTransfer`);t.append(n),_assertClassBrand(_DOMFilterFactory_brand,this,_appendFeFunc).call(this,n,`feFuncA`,e)}function _getRGB(e){return _get_defs.call(_assertClassBrand(_DOMFilterFactory_brand,this)).style.color=e,getRGB(getComputedStyle(_get_defs.call(_assertClassBrand(_DOMFilterFactory_brand,this))).getPropertyValue(`color`))}var BaseStandardFontDataFactory=class{constructor({baseUrl:e=null}){this.baseUrl=e}async fetch({filename:e}){if(!this.baseUrl)throw Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!e)throw Error(`Font filename must be specified.`);let t=`${this.baseUrl}${e}`;
71return this._fetch(t).catch(e=>{throw Error(`Unable to load font data at: ${t}`)})}async _fetch(e){unreachable$1("Abstract method `_fetch` called.")}},DOMStandardFontDataFactory=class extends BaseStandardFontDataFactory{async _fetch(e){let t=await fetchData(e,`arraybuffer`);return new Uint8Array(t)}};if(isNodeJS){var packageCapability=Promise.withResolvers(),packageMap=null;(async()=>{let e=await __vitePreload(()=>import(`./__vite-browser-external-PaJ7c2l8.js`).then(e=>__toESM(e.default,1)),__vite__mapDeps([0,1])),t=await __vitePreload(()=>import(`./__vite-browser-external-PaJ7c2l8.js`).then(e=>__toESM(e.default,1)),__vite__mapDeps([0,1])),n=await __vitePreload(()=>import(`./__vite-browser-external-PaJ7c2l8.js`).then(e=>__toESM(e.default,1)),__vite__mapDeps([0,1])),r=await __vitePreload(()=>import(`./__vite-browser-external-PaJ7c2l8.js`).then(e=>__toESM(e.default,1)),__vite__mapDeps([0,1])),i,a;return new Map(Object.entries({fs:e,http:t,https:n,url:r,canvas:i,path2d:a}))})().then(e=>{packageMap=e,packageCapability.resolve()},e=>{warn(`loadPackages: ${e}`),packageMap=new Map,packageCapability.resolve()})}var NodePackages=class{static get promise(){return packageCapability.promise}static get(e){return packageMap?.get(e)}};async function node_utils_fetchData(e){let t=await NodePackages.get(`fs`).promises.readFile(e);return new Uint8Array(t)}var NodeFilterFactory=class extends BaseFilterFactory{},NodeCanvasFactory=class extends BaseCanvasFactory{_createCanvas(e,t){return NodePackages.get(`canvas`).createCanvas(e,t)}},NodeCMapReaderFactory=class extends BaseCMapReaderFactory{async _fetch(e){return node_utils_fetchData(e)}},NodeStandardFontDataFactory=class extends BaseStandardFontDataFactory{async _fetch(e){return node_utils_fetchData(e)}},PathType={FILL:`Fill`,STROKE:`Stroke`,SHADING:`Shading`};function applyBoundingBox(e,t){if(!t)return;let n=t[2]-t[0],r=t[3]-t[1],i=new Path2D;i.rect(t[0],t[1],n,r),e.clip(i)}var BaseShadingPattern=class{getPattern(){unreachable$1("Abstract method `getPattern` called.")}},RadialAxialShadingPattern=class extends BaseShadingPattern{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;this._type===`axial`?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type===`radial`&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(let e of this._colorStops)t.addColorStop(e[0],e[1]);return t}getPattern(e,t,n,r){let i;if(r===PathType.STROKE||r===PathType.FILL){let a=t.current.getClippedPathBoundingBox(r,getCurrentTransform(e))||[0,0,0,0],o=Math.ceil(a[2]-a[0])||1,c=Math.ceil(a[3]-a[1])||1,u=t.cachedCanvases.getCanvas(`pattern`,o,c),K=u.context;K.clearRect(0,0,K.canvas.width,K.canvas.height),K.beginPath(),K.rect(0,0,K.canvas.width,K.canvas.height),K.translate(-a[0],-a[1]),n=Util.transform(n,[1,0,0,1,a[0],a[1]]),K.transform(...t.baseTransform),this.matrix&&K.transform(...this.matrix),applyBoundingBox(K,this._bbox),K.fillStyle=this._createGradient(K),K.fill(),i=e.createPattern(u.canvas,`no-repeat`);let Y=new DOMMatrix(n);i.setTransform(Y)}else applyBoundingBox(e,this._bbox),i=this._createGradient(e);return i}};function drawTriangle(e,t,n,r,i,a,o,c){let u=t.coords,K=t.colors,Y=e.data,X=e.width*4,ee;u[n+1]>u[r+1]&&(ee=n,n=r,r=ee,ee=a,a=o,o=ee),u[r+1]>u[i+1]&&(ee=r,r=i,i=ee,ee=o,o=c,c=ee),u[n+1]>u[r+1]&&(ee=n,n=r,r=ee,ee=a,a=o,o=ee);let te=(u[n]+t.offsetX)*t.scaleX,ce=(u[n+1]+t.offsetY)*t.scaleY,ue=(u[r]+t.offsetX)*t.scaleX,de=(u[r+1]+t.offsetY)*t.scaleY,fe=(u[i]+t.offsetX)*t.scaleX,me=(u[i+1]+t.offsetY)*t.scaleY;if(ce>=me)return;let ge=K[a],Te=K[a+1],Oe=K[a+2],Ae=K[o],ze=K[o+1],qe=K[o+2],Ye=K[c],Ze=K[c+1],Qe=K[c+2],et=Math.round(ce),nt=Math.round(me),rt,it,at,ot,st,ct,lt,ut;for(let e=et;e<=nt;e++){if(e<de){let t=e<ce?0:(ce-e)/(ce-de);rt=te-(te-ue)*t,it=ge-(ge-Ae)*t,at=Te-(Te-ze)*t,ot=Oe-(Oe-qe)*t}else{let t;t=e>me?1:de===me?0:(de-e)/(de-me),rt=ue-(ue-fe)*t,it=Ae-(Ae-Ye)*t,at=ze-(ze-Ze)*t,ot=qe-(qe-Qe)*t}let t;t=e<ce?0:e>me?1:(ce-e)/(ce-me),st=te-(te-fe)*t,ct=ge-(ge-Ye)*t,lt=Te-(Te-Ze)*t,ut=Oe-(Oe-Qe)*t;let n=Math.round(Math.min(rt,st)),r=Math.round(Math.max(rt,st)),i=X*e+n*4;for(let e=n;e<=r;e++)t=(rt-e)/(rt-st),t<0?t=0:t>1&&(t=1),Y[i++]=it-(it-ct)*t|0,Y[i++]=at-(at-lt)*t|0,Y[i++]=ot-(ot-ut)*t|0,Y[i++]=255}}function drawFigure(e,t,n){let r=t.coords,i=t.colors,a,o;switch(t.type){case`lattice`:let c=t.verticesPerRow,u=Math.floor(r.length/c)-1,K=c-1;for(a=0;a<u;a++){let t=a*c;for(let a=0;a<K;a++,t++)drawTriangle(e,n,r[t],r[t+1],r[t+c],i[t],i[t+1],i[t+c]),drawTriangle(e,n,r[t+c+1],r[t+1],r[t+c],i[t+c+1],i[t+1],i[t+c])}break;
vendor: 4,566 bytes, line 71
71case`triangles`:for(a=0,o=r.length;a<o;a+=3)drawTriangle(e,n,r[a],r[a+1],r[a+2],i[a],i[a+1],i[a+2]);break;default:throw Error(`illegal figure`)}}var MeshShadingPattern=class extends BaseShadingPattern{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(e,t,n){let r=1.1,i=3e3,a=2,o=Math.floor(this._bounds[0]),c=Math.floor(this._bounds[1]),u=Math.ceil(this._bounds[2])-o,K=Math.ceil(this._bounds[3])-c,Y=Math.min(Math.ceil(Math.abs(u*e[0]*r)),i),X=Math.min(Math.ceil(Math.abs(K*e[1]*r)),i),ee=u/Y,te=K/X,ce={coords:this._coords,colors:this._colors,offsetX:-o,offsetY:-c,scaleX:1/ee,scaleY:1/te},ue=Y+4,de=X+4,fe=n.getCanvas(`mesh`,ue,de),me=fe.context,ge=me.createImageData(Y,X);if(t){let e=ge.data;for(let n=0,r=e.length;n<r;n+=4)e[n]=t[0],e[n+1]=t[1],e[n+2]=t[2],e[n+3]=255}for(let e of this._figures)drawFigure(ge,e,ce);return me.putImageData(ge,2,2),{canvas:fe.canvas,offsetX:o-2*ee,offsetY:c-2*te,scaleX:ee,scaleY:te}}getPattern(e,t,n,r){applyBoundingBox(e,this._bbox);let i;if(r===PathType.SHADING)i=Util.singularValueDecompose2dScale(getCurrentTransform(e));else if(i=Util.singularValueDecompose2dScale(t.baseTransform),this.matrix){let e=Util.singularValueDecompose2dScale(this.matrix);i=[i[0]*e[0],i[1]*e[1]]}let a=this._createMeshCanvas(i,r===PathType.SHADING?null:this._background,t.cachedCanvases);return r!==PathType.SHADING&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(a.offsetX,a.offsetY),e.scale(a.scaleX,a.scaleY),e.createPattern(a.canvas,`no-repeat`)}},DummyShadingPattern=class extends BaseShadingPattern{getPattern(){return`hotpink`}};function getShadingPattern(e){switch(e[0]){case`RadialAxial`:return new RadialAxialShadingPattern(e);case`Mesh`:return new MeshShadingPattern(e);case`Dummy`:return new DummyShadingPattern}throw Error(`Unknown IR type: ${e[0]}`)}var PaintType={COLORED:1,UNCOLORED:2},TilingPattern=class e{constructor(e,t,n,r,i){this.operatorList=e[2],this.matrix=e[3],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.ctx=n,this.canvasGraphicsFactory=r,this.baseTransform=i}createPatternCanvas(e){let{bbox:t,operatorList:n,paintType:r,tilingType:i,color:a,canvasGraphicsFactory:o}=this,{xstep:c,ystep:u}=this;c=Math.abs(c),u=Math.abs(u),info(`TilingType: `+i);let K=t[0],Y=t[1],X=t[2],ee=t[3],te=X-K,ce=ee-Y,ue=Util.singularValueDecompose2dScale(this.matrix),de=Util.singularValueDecompose2dScale(this.baseTransform),fe=ue[0]*de[0],me=ue[1]*de[1],ge=te,Te=ce,Oe=!1,Ae=!1,ze=Math.ceil(c*fe),qe=Math.ceil(u*me),Ye=Math.ceil(te*fe),Ze=Math.ceil(ce*me);ze>=Ye?ge=c:Oe=!0,qe>=Ze?Te=u:Ae=!0;let Qe=this.getSizeAndScale(ge,this.ctx.canvas.width,fe),et=this.getSizeAndScale(Te,this.ctx.canvas.height,me),nt=e.cachedCanvases.getCanvas(`pattern`,Qe.size,et.size),rt=nt.context,it=o.createCanvasGraphics(rt);if(it.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(it,r,a),rt.translate(-Qe.scale*K,-et.scale*Y),it.transform(Qe.scale,0,0,et.scale,0,0),rt.save(),this.clipBbox(it,K,Y,X,ee),it.baseTransform=getCurrentTransform(it.ctx),it.executeOperatorList(n),it.endDrawing(),rt.restore(),Oe||Ae){let t=nt.canvas;Oe&&(ge=c),Ae&&(Te=u);let n=this.getSizeAndScale(ge,this.ctx.canvas.width,fe),r=this.getSizeAndScale(Te,this.ctx.canvas.height,me),i=n.size,a=r.size,o=e.cachedCanvases.getCanvas(`pattern-workaround`,i,a),X=o.context,ee=Oe?Math.floor(te/c):0,ue=Ae?Math.floor(ce/u):0;for(let e=0;e<=ee;e++)for(let n=0;n<=ue;n++)X.drawImage(t,i*e,a*n,i,a,0,0,i,a);return{canvas:o.canvas,scaleX:n.scale,scaleY:r.scale,offsetX:K,offsetY:Y}}return{canvas:nt.canvas,scaleX:Qe.scale,scaleY:et.scale,offsetX:K,offsetY:Y}}getSizeAndScale(t,n,r){let i=Math.max(e.MAX_PATTERN_SIZE,n),a=Math.ceil(t*r);return a>=i?a=i:r=a/t,{scale:r,size:a}}clipBbox(e,t,n,r,i){let a=r-t,o=i-n;e.ctx.rect(t,n,a,o),e.current.updateRectMinMax(getCurrentTransform(e.ctx),[t,n,r,i]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,n){let r=e.ctx,i=e.current;switch(t){case PaintType.COLORED:let e=this.ctx;r.fillStyle=e.fillStyle,r.strokeStyle=e.strokeStyle,i.fillColor=e.fillStyle,i.strokeColor=e.strokeStyle;break;case PaintType.UNCOLORED:let a=Util.makeHexColor(n[0],n[1],n[2]);r.fillStyle=a,r.strokeStyle=a,i.fillColor=a,i.strokeColor=a;break;default:throw new FormatError(`Unsupported paint type: ${t}`)}}getPattern(e,t,n,r){let i=n;r!==PathType.SHADING&&(i=Util.transform(i,t.baseTransform),this.matrix&&(i=Util.transform(i,this.matrix
71)));let a=this.createPatternCanvas(t),o=new DOMMatrix(i);o=o.translate(a.offsetX,a.offsetY),o=o.scale(1/a.scaleX,1/a.scaleY);let c=e.createPattern(a.canvas,`repeat`);return c.setTransform(o),c}};_defineProperty$6(TilingPattern,`MAX_PATTERN_SIZE`,3e3);function convertBlackAndWhiteToRGBA({src:e,srcPos:t=0,dest:n,width:r,height:i,nonBlackColor:a=4294967295,inverseDecode:o=!1}){let c=util_FeatureTest.isLittleEndian?4278190080:255,[u,K]=o?[a,c]:[c,a],Y=r>>3,X=r&7,ee=e.length;n=new Uint32Array(n.buffer);let te=0;for(let r=0;r<i;r++){for(let r=t+Y;t<r;t++){let r=t<ee?e[t]:255;n[te++]=r&128?K:u,n[te++]=r&64?K:u,n[te++]=r&32?K:u,n[te++]=r&16?K:u,n[te++]=r&8?K:u,n[te++]=r&4?K:u,n[te++]=r&2?K:u,n[te++]=r&1?K:u}if(X===0)continue;let r=t<ee?e[t++]:255;for(let e=0;e<X;e++)n[te++]=r&1<<7-e?K:u}return{srcPos:t,destPos:te}}var MIN_FONT_SIZE=16,MAX_FONT_SIZE=100,EXECUTION_TIME=15,EXECUTION_STEPS=10,MAX_SIZE_TO_COMPILE=1e3,FULL_CHUNK_HEIGHT=16;function mirrorContextOperations(e,t){if(e._removeMirroring)throw Error(`Context is already forwarding operations.`);e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=()=>{e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,n){t.translate(e,n),this.__originalTranslate(e,n)},e.scale=function(e,n){t.scale(e,n),this.__originalScale(e,n)},e.transform=function(e,n,r,i,a,o){t.transform(e,n,r,i,a,o),this.__originalTransform(e,n,r,i,a,o)},e.setTransform=function(e,n,r,i,a,o){t.setTransform(e,n,r,i,a,o),this.__originalSetTransform(e,n,r,i,a,o)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,n){t.moveTo(e,n),this.__originalMoveTo(e,n)},e.lineTo=function(e,n){t.lineTo(e,n),this.__originalLineTo(e,n)},e.bezierCurveTo=function(e,n,r,i,a,o){t.bezierCurveTo(e,n,r,i,a,o),this.__originalBezierCurveTo(e,n,r,i,a,o)},e.rect=function(e,n,r,i){t.rect(e,n,r,i),this.__originalRect(e,n,r,i)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}var CachedCanvases=class{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,n){let r;return this.cache[e]===void 0?(r=this.canvasFactory.create(t,n),this.cache[e]=r):(r=this.cache[e],this.canvasFactory.reset(r,t,n)),r}delete(e){delete this.cache[e]}clear(){for(let e in this.cache){let t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}};function drawImageAtIntegerCoords(e,t,n,r,i,a,o,c,u,K){let[Y,X,ee,te,ce,ue]=getCurrentTransform(e);if(X===0&&ee===0){let de=o*Y+ce,fe=Math.round(de),me=c*te+ue,ge=Math.round(me),Te=(o+u)*Y+ce,Oe=Math.abs(Math.round(Te)-fe)||1,Ae=(c+K)*te+ue,ze=Math.abs(Math.round(Ae)-ge)||1;return e.setTransform(Math.sign(Y),0,0,Math.sign(te),fe,ge),e.drawImage(t,n,r,i,a,0,0,Oe,ze),e.setTransform(Y,X,ee,te,ce,ue),[Oe,ze]}if(Y===0&&te===0){let de=c*ee+ce,fe=Math.round(de),me=o*X+ue,ge=Math.round(me),Te=(c+K)*ee+ce,Oe=Math.abs(Math.round(Te)-fe)||1,Ae=(o+u)*X+ue,ze=Math.abs(Math.round(Ae)-ge)||
711;return e.setTransform(0,Math.sign(X),Math.sign(ee),0,fe,ge),e.drawImage(t,n,r,i,a,0,0,ze,Oe),e.setTransform(Y,X,ee,te,ce,ue),[ze,Oe]}e.drawImage(t,n,r,i,a,o,c,u,K);let de=Math.hypot(Y,X),fe=Math.hypot(ee,te);return[de*u,fe*K]}function compileType3Glyph(e){let{width:t,height:n}=e;if(t>MAX_SIZE_TO_COMPILE||n>MAX_SIZE_TO_COMPILE)return null;let r=1e3,i=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),a=t+1,o=new Uint8Array(a*(n+1)),c,u,K,Y=t+7&-8,X=new Uint8Array(Y*n),ee=0;for(let t of e.data){let e=128;for(;e>0;)X[ee++]=t&e?0:255,e>>=1}let te=0;for(ee=0,X[ee]!==0&&(o[0]=1,++te),u=1;u<t;u++)X[ee]!==X[ee+1]&&(o[u]=X[ee]?2:1,++te),ee++;for(X[ee]!==0&&(o[u]=2,++te),c=1;c<n;c++){ee=c*Y,K=c*a,X[ee-Y]!==X[ee]&&(o[K]=X[ee]?1:8,++te);let e=(X[ee]?4:0)+(X[ee-Y]?8:0);for(u=1;u<t;u++)e=(e>>2)+(X[ee+1]?4:0)+(X[ee-Y+1]?8:0),i[e]&&(o[K+u]=i[e],++te),ee++;if(X[ee-Y]!==X[ee]&&(o[K+u]=X[ee]?2:4,++te),te>r)return null}for(ee=Y*(n-1),K=c*a,X[ee]!==0&&(o[K]=8,++te),u=1;u<t;u++)X[ee]!==X[ee+1]&&(o[K+u]=X[ee]?4:8,++te),ee++;if(X[ee]!==0&&(o[K+u]=4,++te),te>r)return null;let ce=new Int32Array([0,a,-1,0,-a,0,0,0,1]),ue=new Path2D;for(c=0;te&&c<=n;c++){let e=c*a,n=e+t;for(;e<n&&!o[e];)e++;if(e===n)continue;ue.moveTo(e%a,c);let r=e,i=o[e];do{let t=ce[i];do e+=t;while(!o[e]);let n=o[e];n!==5&&n!==10?(i=n,o[e]=0):(i=n&51*i>>4,o[e]&=i>>2|i<<2),ue.lineTo(e%a,e/a|0),o[e]||--te}while(r!==e);--c}return X=null,o=null,function(e){e.save(),e.scale(1/t,-1/n),e.translate(0,-n),e.fill(ue),e.beginPath(),e.restore()}}var CanvasExtraState=class{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=TextRenderingMode.FILL,this.textRise=0,this.fillColor=`#000000`,this.strokeColor=`#000000`,this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps=`none`,this.startNewPathAndClipBox([0,0,e,t])}clone(){let e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,n){[t,n]=Util.applyTransform([t,n],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,n),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,n)}updateRectMinMax(e,t){let n=Util.applyTransform(t,e),r=Util.applyTransform(t.slice(2),e),i=Util.applyTransform([t[0],t[3]],e),a=Util.applyTransform([t[2],t[1]],e);this.minX=Math.min(this.minX,n[0],r[0],i[0],a[0]),this.minY=Math.min(this.minY,n[1],r[1],i[1],a[1]),this.maxX=Math.max(this.maxX,n[0],r[0],i[0],a[0]),this.maxY=Math.max(this.maxY,n[1],r[1],i[1],a[1])}updateScalingPathMinMax(e,t){Util.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.minY=Math.min(this.minY,t[1]),this.maxX=Math.max(this.maxX,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,n,r,i,a,o,c,u,K){let Y=Util.bezierBoundingBox(t,n,r,i,a,o,c,u,K);K||this.updateRectMinMax(e,Y)}getPathBoundingBox(e=PathType.FILL,t=null){let n=[this.minX,this.minY,this.maxX,this.maxY];if(e===PathType.STROKE){t||unreachable$1(`Stroke bounding box must include transform.`);let e=Util.singularValueDecompose2dScale(t),r=e[0]*this.lineWidth/2,i=e[1]*this.lineWidth/2;n[0]-=r,n[1]-=i,n[2]+=r,n[3]+=i}return n}updateClipFromPath(){let e=Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(e=PathType.FILL,t=null){return Util.intersect(this.clipBox,this.getPathBoundingBox(e,t))}};function putBinaryImageData(e,t){if(typeof ImageData<`u`&&t instanceof ImageData){e.putImageData(t,0,0);return}let n=t.height,r=t.width,i=n%FULL_CHUNK_HEIGHT,a=(n-i)/FULL_CHUNK_HEIGHT,o=i===0?a:a+1,c=e.createImageData(r,FULL_CHUNK_HEIGHT),u=0,K,Y=t.data,X=c.data,ee,te,ce,ue;if(t.kind===util_ImageKind.GRAYSCALE_1BPP){let t=Y.byteLength,n=new Uint32Array(X.buffer,0,X.byteLength>>2),ue=n.length,de=r+7>>3,fe=4294967295,me=util_FeatureTest.isLittleEndian?4278190080:255;for(ee=0;ee<o;ee++){for(ce=ee<a?FULL_CHUNK_HEIGHT:i,K=0,te=0;te<ce;te++){let e=t-u,i=0,a=e>de?r:e*8-7,o=a&-8,c=0,X=0;for(;i<o;i+=8)X=Y[u++],n[K++]=X&128?fe:me,n[K++]=X&64?fe:me,n[K++]=X&32?fe:me,n[K++]=X&16?fe:me,n[K++]=X&8?fe:me,n[K++]=X&4?fe:me,n[K++]=X&2?fe:me,n[K++]=X&1?fe:me;for(;i<a;i++)c===0&&(X=Y[u++],c=128),n[K++]=X&c?fe:me,c>>=1}for(;K<ue;)n[K++]=0;e.putImageData(c,0,ee*FULL_CHUNK_HEIGHT)}}else if(t.kind===util_ImageKind.RGBA_32BPP){for(te=0,ue=r*FULL_CHUNK_HEIGHT*4,ee=0;ee<a;ee++)X.set(Y.subarray(u,u+ue)),u+=ue,e.putImageData(c,0,te),te+=FULL_CHUNK_HEIGHT;ee<o&&(ue=r*i*4,X.set(Y.subarray(u,u+ue)),e.putImageData(c,0,te))}else if(t.kind===util_ImageKind.RGB_24BPP)for(ce=FULL_CHUNK_HEIGHT,ue=r*ce,ee=0;ee<o;ee++){for(ee>=a&&(ce=i,ue=r*ce),K=0,te=ue;te--;)X[K++]=Y[u++],X[K++]=Y[u++],X[K++]=Y[u++],X[K++]=255;e.putImageData(c,0,ee*FULL_CHUNK_HEIGHT)}else throw Error(`bad image kind: ${t.kind}`)}function putBinaryImageMask(e,t){if(t.bitmap){e.drawImage(t.bitmap,0,0);return}let n=t.height,r=t.width,i=n%FULL_CHUNK_HEIGHT,a=(n-i)/FULL_CHUNK_HEIGHT,o=i===0?a:a+1,c=e.createImageData(r,FULL_CHUNK_HEIGHT),u=0,K=t.data,Y=c.data;for(let t=0;t<o;t++){let n=t<a?FULL_CHUNK_HEIGHT:i;({srcPos:u}=convertBlackAndWhiteToRGBA({src:K,srcPos:u,dest:Y,width:r,height:n,nonBlackColor:0})),e.putImageData(c,0,t*FULL_CHUNK_HEIGHT)}}function copyCtxState(e,t){for(let n of[`strokeStyle`,`fillStyle`,`fillRule`,`globalAlpha`,`lineWidth`,`lineCap`,`lineJoin`,`miterLimit`,`globalCompositeOperation`,`font`,`filter`])e[n]!==void 0&&(t[n]=e[n]);e.setLineDash!==void 0&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function resetCtxToDefault(e){if(e.strokeStyle=e.fillStyle=`#000000`,e.fillRule=`nonzero`,e.globalAlpha=1,e.lineWidth=1,e.lineCap=`butt`,e.lineJoin=`miter`,e.miterLimit=10,e.globalCompositeOperation=`source-over`,e.font=`10px sans-serif`,e.setLineDash!==void 0&&(e.setLineDash([]),e.lineDashOffset=0),!isNodeJS){let{filter:t}=e;t!==`none`&&t!==``&&(e.filter=`none`)}}function getImageSmoothingEnabled(e,t){if(t)return!0;let n=Util.singularValueDecompose2dScale(e);n[0]=Math.fround(n[0]),n[1]=Math.fround(n[1]);let r=Math.fround((globalThis.devicePixelRatio||1)*PixelsPerInch.PDF_TO_CSS_UNITS);return n[0]<=r&&n[1]<=r}var LINE_CAP_STYLES=[`butt`,`round`,`square`],LINE_JOIN_STYLES=[`miter`,`round`,`bevel`],NORMAL_CLIP={},EO_CLIP={},_CanvasGraphics_brand=new WeakSet,CanvasGraphics=class e{constructor(e,t,n,r,i,{optionalContentConfig:a,markedContentStack:o=null},c,u){_classPrivateMethodInitSpec(this,_CanvasGraphics_brand),this.ctx=e,this.current=ne
71w CanvasExtraState(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=n,this.canvasFactory=r,this.filterFactory=i,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=o||[],this.optionalContentConfig=a,this.cachedCanvases=new CachedCanvases(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=c,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=u,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e,t=null){return typeof e==`string`?e.startsWith(`g_`)?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing({transform:e,viewport:t,transparency:n=!1,background:r=null}){let i=this.ctx.canvas.width,a=this.ctx.canvas.height,o=this.ctx.fillStyle;if(this.ctx.fillStyle=r||`#ffffff`,this.ctx.fillRect(0,0,i,a),this.ctx.fillStyle=o,n){let e=this.cachedCanvases.getCanvas(`transparent`,i,a);this.compositeCtx=this.ctx,this.transparentCanvas=e.canvas,this.ctx=e.context,this.ctx.save(),this.ctx.transform(...getCurrentTransform(this.compositeCtx))}this.ctx.save(),resetCtxToDefault(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...t.transform),this.viewportScale=t.scale,this.baseTransform=getCurrentTransform(this.ctx)}executeOperatorList(e,t,n,r){let i=e.argsArray,a=e.fnArray,o=t||0,c=i.length;if(c===o)return o;let u=c-o>EXECUTION_STEPS&&typeof n==`function`,K=u?Date.now()+EXECUTION_TIME:0,Y=0,X=this.commonObjs,ee=this.objs,te;for(;;){if(r!==void 0&&o===r.nextBreakPoint)return r.breakIt(o,n),o;if(te=a[o],te!==OPS.dependency)this[te].apply(this,i[o]);else for(let e of i[o]){let t=e.startsWith(`g_`)?X:ee;if(!t.has(e))return t.get(e,n),o}if(o++,o===c)return o;if(u&&++Y>EXECUTION_STEPS){if(Date.now()>K)return n(),o;Y=0}}}endDrawing(){_assertClassBrand(_CanvasGraphics_brand,this,_restoreInitialState).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(let e of this._cachedBitmapsMap.values()){for(let t of e.values())typeof HTMLCanvasElement<`u`&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),_assertClassBrand(_CanvasGraphics_brand,this,_drawFilter).call(this)}_scaleImage(e,t){let n=e.width??e.displayWidth,r=e.height??e.displayHeight,i=Math.max(Math.hypot(t[0],t[1]),1),a=Math.max(Math.hypot(t[2],t[3]),1),o=n,c=r,u=`prescale1`,K,Y;for(;i>2&&o>1||a>2&&c>1;){let t=o,n=c;i>2&&o>1&&(t=o>=16384?Math.floor(o/2)-1||1:Math.ceil(o/2),i/=o/t),a>2&&c>1&&(n=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c)/2,a/=c/n),K=this.cachedCanvases.getCanvas(u,t,n),Y=K.context,Y.clearRect(0,0,t,n),Y.drawImage(e,0,0,o,c,0,0,t,n),e=K.canvas,o=t,c=n,u=u===`prescale1`?`prescale2`:`prescale1`}return{img:e,paintWidth:o,paintHeight:c}}_createMaskCanvas(e){let t=this.ctx,{width:n,height:r}=e,i=this.current.fillColor,a=this.current.patternFill,o=getCurrentTransform(t),c,u,K,Y;if((e.bitmap||e.data)&&e.count>1){let t=e.bitmap||e.data.buffer;u=JSON.stringify(a?o:[o.slice(0,4),i]),c=this._cachedBitmapsMap.get(t),c||(c=new Map,this._cachedBitmapsMap.set(t,c));let n=c.get(u);if(n&&!a)return{canvas:n,offsetX:Math.round(Math.min(o[0],o[2])+o[4]),offsetY:Math.round(Math.min(o[1],o[3])+o[5])};K=n}K||(Y=this.cachedCanvases.getCanvas(`maskCanvas`,n,r),putBinaryImageMask(Y.context,e));let X=Util.transform(o,[1/n,0,0,-1/r,0,0]);X=Util.transform(X,[1,0,0,1,0,-r]);let[ee,te,ce,ue]=Util.getAxialAlignedBoundingBox([0,0,n,r],X),de=Math.round(ce-ee)||1,fe=Math.round(ue-te)||1,me=this.cachedCanvases.getCanvas(`fillCanvas`,de,fe),ge=me.context,Te=ee,Oe=te;ge.translate(-Te,-Oe),ge.transform(...X),K||(K=this._scaleImage(Y.canvas,getCurrentTransformInverse(ge)),K=K.img,c&&a&&c.set(u,K)),ge.imageSmoothingEnabled=getImageSmoothingEnabled(getCurrentTransform(ge),e.interpolate),drawImageAtIntegerCoords(ge,K,0,0,K.width,K.height,0,0,n,r),ge.globalCompositeOperation=`source-in`;let Ae=Util.transform(getCurrentTransformInverse(ge),[1,0,0,1,-Te,-Oe]);return ge.fillStyle=a?i.getPattern(t,this,Ae,PathType.FILL):i,ge.fillRect(0,0,n,r),c&&!a&&(this.cachedCanvases.delete(`fillCanvas`),c.set(u,me.canvas)),{canvas:me.canvas,offsetX:Math.round(Te),offsetY:Math.round(Oe)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=LINE_CAP_STYLES[e]}setLineJoin(e){this.ctx.lineJoin=LINE_JOIN_STYLES[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){let n=this.ctx;n.setLineDash!==void 0&&(n.setLineDash(e),n.lineDashOffset=t)}
vendor: 5,400 bytes, line 71
71setRenderingIntent(e){}setFlatness(e){}setGState(e){for(let[t,n]of e)switch(t){case`LW`:this.setLineWidth(n);break;case`LC`:this.setLineCap(n);break;case`LJ`:this.setLineJoin(n);break;case`ML`:this.setMiterLimit(n);break;case`D`:this.setDash(n[0],n[1]);break;case`RI`:this.setRenderingIntent(n);break;case`FL`:this.setFlatness(n);break;case`Font`:this.setFont(n[0],n[1]);break;case`CA`:this.current.strokeAlpha=n;break;case`ca`:this.current.fillAlpha=n,this.ctx.globalAlpha=n;break;case`BM`:this.ctx.globalCompositeOperation=n;break;case`SMask`:this.current.activeSMask=n?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case`TR`:this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(n)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){let e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw Error(`beginSMaskMode called while already in smask mode`);let e=this.ctx.canvas.width,t=this.ctx.canvas.height,n=`smaskGroupAt`+this.groupLevel,r=this.cachedCanvases.getCanvas(n,e,t);this.suspendedCtx=this.ctx,this.ctx=r.context;let i=this.ctx;i.setTransform(...getCurrentTransform(this.suspendedCtx)),copyCtxState(this.suspendedCtx,i),mirrorContextOperations(i,this.suspendedCtx),this.setGState([[`BM`,`source-over`],[`ca`,1],[`CA`,1]])}endSMaskMode(){if(!this.inSMaskMode)throw Error(`endSMaskMode called while not in smask mode`);this.ctx._removeMirroring(),copyCtxState(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];let t=this.current.activeSMask,n=this.suspendedCtx;this.composeSMask(n,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(e,t,n,r){let i=r[0],a=r[1],o=r[2]-i,c=r[3]-a;o!==0&&c!==0&&(this.genericComposeSMask(t.context,n,o,c,t.subtype,t.backdrop,t.transferMap,i,a,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation=`source-over`,e.setTransform(1,0,0,1,0,0),e.drawImage(n.canvas,0,0),e.restore())}genericComposeSMask(e,t,n,r,i,a,o,c,u,K,Y){let X=e.canvas,ee=c-K,te=u-Y;if(a){let t=Util.makeHexColor(...a);if(ee<0||te<0||ee+n>X.width||te+r>X.height){let e=this.cachedCanvases.getCanvas(`maskExtension`,n,r),i=e.context;i.drawImage(X,-ee,-te),i.globalCompositeOperation=`destination-atop`,i.fillStyle=t,i.fillRect(0,0,n,r),i.globalCompositeOperation=`source-over`,X=e.canvas,ee=te=0}else{e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);let i=new Path2D;i.rect(ee,te,n,r),e.clip(i),e.globalCompositeOperation=`destination-atop`,e.fillStyle=t,e.fillRect(ee,te,n,r),e.restore()}}t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0),i===`Alpha`&&o?t.filter=this.filterFactory.addAlphaFilter(o):i===`Luminosity`&&(t.filter=this.filterFactory.addLuminosityFilter(o));let ce=new Path2D;ce.rect(c,u,n,r),t.clip(ce),t.globalCompositeOperation=`destination-in`,t.drawImage(X,ee,te,n,r,c,u,n,r),t.restore()}save(){this.inSMaskMode?(copyCtxState(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();let e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),copyCtxState(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(e,t,n,r,i,a){this.ctx.transform(e,t,n,r,i,a),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,t,n){let r=this.ctx,i=this.current,a=i.x,o=i.y,c,u,K=getCurrentTransform(r),Y=K[0]===0&&K[3]===0||K[1]===0&&K[2]===0,X=Y?n.slice(0):null;for(let n=0,ee=0,te=e.length;n<te;n++)switch(e[n]|0){case OPS.rectangle:a=t[ee++],o=t[ee++];let e=t[ee++],n=t[ee++],te=a+e,ce=o+n;r.moveTo(a,o),e===0||n===0?r.lineTo(te,ce):(r.lineTo(te,o),r.lineTo(te,ce),r.lineTo(a,ce)),Y||i.updateRectMinMax(K,[a,o,te,ce]),r.closePath();break;case OPS.moveTo:a=t[ee++],o=t[ee++],r.moveTo(a,o),Y||i.updatePathMinMax(K,a,o);break;case OPS.lineTo:a=t[ee++],o=t[ee++],r.lineTo(a,o),Y||i.updatePathMinMax(K,a,o);break;case OPS.curveTo:c=a,u=o,a=t[ee+4],o=t[ee+5],r.bezierCurveTo(t[ee],t[ee+1],t[ee+2],t[ee+3],a,o),i.updateCurvePathMinMax(K,c,u,t[ee],t[ee+1],t[ee+2],t[ee+3],a,o,X),ee+=6;break;case OPS.curveTo2:c=a,u=o,r.bezierCurveTo(a,o,t[ee],t[ee+1],t[ee+2],t[ee+3]),i.updateCurvePathMinMax(K,c,u,a,o,t[ee],t[ee+1],t[ee+2],t[ee+3],X),a=t[ee+2],o=t[ee+3],ee+=4;break;case OPS.curveTo3:c=a,u=o,a=t[ee+2],o=t[ee+3],r.bezierCurveTo(t[ee],t[ee+1],a,o,a,o),i.updateCurvePathMinMax(K,c,u,t[ee],t[ee+1],a,o,a,o,X),ee+=4;break;case OPS.closePath:r.closePath()}Y&&i.updateScalingPathMinMax(K,X),i.setCurrentPoint(a,o)}closePath(){this.ctx.closePath()}stroke(e=!0){let t=this.ctx,n=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof n==`object`&&n?.getPattern?(t.save(),t.strokeStyle=n.getPattern(t,this,getCurrentTransformInverse(t),PathType.STROKE),this.rescaleAndStroke(!1),t.restore(
71)):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(e=!0){let t=this.ctx,n=this.current.fillColor,r=this.current.patternFill,i=!1;r&&(t.save(),t.fillStyle=n.getPattern(t,this,getCurrentTransformInverse(t),PathType.FILL),i=!0);let a=this.current.getClippedPathBoundingBox();this.contentVisible&&a!==null&&(this.pendingEOFill?(t.fill(`evenodd`),this.pendingEOFill=!1):t.fill()),i&&t.restore(),e&&this.consumePath(a)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=NORMAL_CLIP}eoClip(){this.pendingClip=EO_CLIP}beginText(){this.current.textMatrix=IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){let e=this.pendingTextPaths,t=this.ctx;if(e===void 0){t.beginPath();return}t.save(),t.beginPath();for(let n of e)t.setTransform(...n.transform),t.translate(n.x,n.y),n.addToPath(t,n.fontSize);t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,t){let n=this.commonObjs.get(e),r=this.current;if(!n)throw Error(`Can't find font for ${e}`);if(r.fontMatrix=n.fontMatrix||FONT_IDENTITY_MATRIX,(r.fontMatrix[0]===0||r.fontMatrix[3]===0)&&warn(`Invalid font matrix for font `+e),t<0?(t=-t,r.fontDirection=-1):r.fontDirection=1,this.current.font=n,this.current.fontSize=t,n.isType3Font)return;let i=n.loadedName||`sans-serif`,a=n.systemFontInfo?.css||`"${i}", ${n.fallbackName}`,o=`normal`;n.black?o=`900`:n.bold&&(o=`bold`);let c=n.italic?`italic`:`normal`,u=t;t<MIN_FONT_SIZE?u=MIN_FONT_SIZE:t>MAX_FONT_SIZE&&(u=MAX_FONT_SIZE),this.current.fontSizeScale=t/u,this.ctx.font=`${c} ${o} ${u}px ${a}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,n,r,i,a){this.current.textMatrix=[e,t,n,r,i,a],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,n,r){let i=this.ctx,a=this.current,o=a.font,c=a.textRenderingMode,u=a.fontSize/a.fontSizeScale,K=c&TextRenderingMode.FILL_STROKE_MASK,Y=!!(c&TextRenderingMode.ADD_TO_PATH_FLAG),X=a.patternFill&&!o.missingFile,ee;(o.disableFontFace||Y||X)&&(ee=o.getPathGenerator(this.commonObjs,e)),o.disableFontFace||X?(i.save(),i.translate(t,n),i.beginPath(),ee(i,u),r&&i.setTransform(...r),(K===TextRenderingMode.FILL||K===TextRenderingMode.FILL_STROKE)&&i.fill(),(K===TextRenderingMode.STROKE||K===TextRenderingMode.FILL_STROKE)&&i.stroke(),i.restore()):((K===TextRenderingMode.FILL||K===TextRenderingMode.FILL_STROKE)&&i.fillText(e,t,n),(K===TextRenderingMode.STROKE||K===TextRenderingMode.FILL_STROKE)&&i.strokeText(e,t,n)),Y&&(this.pendingTextPaths||=[]).push({transform:getCurrentTransform(i),x:t,y:n,fontSize:u,addToPath:ee})}get isFontSubpixelAAEnabled(){let{context:e}=this.cachedCanvases.getCanvas(`isFontSubpixelAAEnabled`,10,10);e.scale(1.5,1),e.fillText(`I`,0,10);let t=e.getImageData(0,0,10,10).data,n=!1;for(let e=3;e<t.length;e+=4)if(t[e]>0&&t[e]<255){n=!0;break}return shadow(this,`isFontSubpixelAAEnabled`,n)}showText(e){let t=this.current,n=t.font;if(n.isType3Font)return this.showType3Text(e);let r=t.fontSize;if(r===0)return;let i=this.ctx,a=t.fontSizeScale,o=t.charSpacing,c=t.wordSpacing,u=t.fontDirection,K=t.textHScale*u,Y=e.length,X=n.vertical,ee=X?1:-1,te=n.defaultVMetrics,ce=r*t.fontMatrix[0],ue=t.textRenderingMode===TextRenderingMode.FILL&&!n.disableFontFace&&!t.patternFill;i.save(),i.transform(...t.textMatrix),i.translate(t.x,t.y+t.textRise),u>0?i.scale(K,-1):i.scale(K,1);let de;if(t.patternFill){i.save();let e=t.fillColor.getPattern(i,this,getCurrentTransformInverse(i),PathType.FILL);
71de=getCurrentTransform(i),i.restore(),i.fillStyle=e}let fe=t.lineWidth,me=t.textMatrixScale;if(me===0||fe===0){let e=t.textRenderingMode&TextRenderingMode.FILL_STROKE_MASK;(e===TextRenderingMode.STROKE||e===TextRenderingMode.FILL_STROKE)&&(fe=this.getSinglePixelWidth())}else fe/=me;if(a!==1&&(i.scale(a,a),fe/=a),i.lineWidth=fe,n.isInvalidPDFjsFont){let n=[],r=0;for(let t of e)n.push(t.unicode),r+=t.width;i.fillText(n.join(``),0,0),t.x+=r*ce*K,i.restore(),this.compose();return}let ge=0,Te=0;for(;Te<Y;++Te){let t=e[Te];if(typeof t==`number`){ge+=ee*t*r/1e3;continue}let K=!1,Y=(t.isSpace?c:0)+o,fe=t.fontChar,me=t.accent,Oe,Ae,ze=t.width;if(X){let e=t.vmetric||te,n=-(t.vmetric?e[1]:ze*.5)*ce,r=e[2]*ce;ze=e?-e[0]:ze,Oe=n/a,Ae=(ge+r)/a}else Oe=ge/a,Ae=0;if(n.remeasure&&ze>0){let e=i.measureText(fe).width*1e3/r*a;if(ze<e&&this.isFontSubpixelAAEnabled){let t=ze/e;K=!0,i.save(),i.scale(t,1),Oe/=t}else ze!==e&&(Oe+=(ze-e)/2e3*r/a)}if(this.contentVisible&&(t.isInFont||n.missingFile)){if(ue&&!me)i.fillText(fe,Oe,Ae);else if(this.paintChar(fe,Oe,Ae,de),me){let e=Oe+r*me.offset.x/a,t=Ae-r*me.offset.y/a;this.paintChar(me.fontChar,e,t,de)}}let qe=X?ze*ce-Y*u:ze*ce+Y*u;ge+=qe,K&&i.restore()}X?t.y-=ge:t.x+=ge*K,i.restore(),this.compose()}showType3Text(e){let t=this.ctx,n=this.current,r=n.font,i=n.fontSize,a=n.fontDirection,o=r.vertical?1:-1,c=n.charSpacing,u=n.wordSpacing,K=n.textHScale*a,Y=n.fontMatrix||FONT_IDENTITY_MATRIX,X=e.length,ee=n.textRenderingMode===TextRenderingMode.INVISIBLE,te,ce,ue,de;if(!(ee||i===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,t.save(),t.transform(...n.textMatrix),t.translate(n.x,n.y),t.scale(K,a),te=0;te<X;++te){if(ce=e[te],typeof ce==`number`){de=o*ce*i/1e3,this.ctx.translate(de,0),n.x+=de*K;continue}let a=(ce.isSpace?u:0)+c,X=r.charProcOperatorList[ce.operatorListId];if(!X){warn(`Type3 character "${ce.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=ce,this.save(),t.scale(i,i),t.transform(...Y),this.executeOperatorList(X),this.restore()),ue=Util.applyTransform([ce.width,0],Y)[0]*i+a,t.translate(ue,0),n.x+=ue*K}t.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,n,r,i,a){this.ctx.rect(n,r,i-n,a-r),this.ctx.clip(),this.endPath()}getColorN_Pattern(t){let n;if(t[0]===`TilingPattern`){let r=t[1],i=this.baseTransform||getCurrentTransform(this.ctx);n=new TilingPattern(t,r,this.ctx,{createCanvasGraphics:t=>new e(t,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})},i)}else n=this._getPattern(t[1],t[2]);return n}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,n){this.ctx.strokeStyle=this.current.strokeColor=Util.makeHexColor(e,t,n)}
71setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor=`transparent`}setFillRGBColor(e,t,n){this.ctx.fillStyle=this.current.fillColor=Util.makeHexColor(e,t,n),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor=`transparent`,this.current.patternFill=!1}_getPattern(e,t=null){let n;return this.cachedPatterns.has(e)?n=this.cachedPatterns.get(e):(n=getShadingPattern(this.getObject(e)),this.cachedPatterns.set(e,n)),t&&(n.matrix=t),n}shadingFill(e){if(!this.contentVisible)return;let t=this.ctx;this.save(),t.fillStyle=this._getPattern(e).getPattern(t,this,getCurrentTransformInverse(t),PathType.SHADING);let n=getCurrentTransformInverse(t);if(n){let{width:e,height:r}=t.canvas,[i,a,o,c]=Util.getAxialAlignedBoundingBox([0,0,e,r],n);this.ctx.fillRect(i,a,o-i,c-a)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){unreachable$1(`Should not call beginInlineImage`)}beginImageData(){unreachable$1(`Should not call beginImageData`)}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),e&&this.transform(...e),this.baseTransform=getCurrentTransform(this.ctx),t)){let e=t[2]-t[0],n=t[3]-t[1];this.ctx.rect(t[0],t[1],e,n),this.current.updateRectMinMax(getCurrentTransform(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);let t=this.ctx;e.isolated||info(`TODO: Support non-isolated groups.`),e.knockout&&warn(`Knockout groups not supported.`);let n=getCurrentTransform(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw Error(`Bounding box is required.`);let r=Util.getAxialAlignedBoundingBox(e.bbox,getCurrentTransform(t)),i=[0,0,t.canvas.width,t.canvas.height];r=Util.intersect(r,i)||[0,0,0,0];let a=Math.floor(r[0]),o=Math.floor(r[1]),c=Math.max(Math.ceil(r[2])-a,1),u=Math.max(Math.ceil(r[3])-o,1);this.current.startNewPathAndClipBox([0,0,c,u]);let K=`groupAt`+this.groupLevel;e.smask&&(K+=`_smask_`+this.smaskCounter++%2);let Y=this.cachedCanvases.getCanvas(K,c,u),X=Y.context;X.translate(-a,-o),X.transform(...n),e.smask?this.smaskStack.push({canvas:Y.canvas,context:X,offsetX:a,offsetY:o,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(a,o),t.save()),copyCtxState(t,X),this.ctx=X,this.setGState([[`BM`,`source-over`],[`ca`,1],[`CA`,1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;let t=this.ctx,n=this.groupStack.pop();if(this.ctx=n,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();let e=getCurrentTransform(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...e);let n=Util.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],e);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(n)}}beginAnnotation(e,t,n,r,i){if(_assertClassBrand(_CanvasGraphics_brand,this,_restoreInitialState).call(this),resetCtxToDefault(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),t){let r=t[2]-t[0],a=t[3]-t[1];if(i&&this.annotationCanvasMap){n=n.slice(),n[4]-=t[0],n[5]-=t[1],t=t.slice(),t[0]=t[1]=0,t[2]=r,t[3]=a;let[i,o]=Util.singularValueDecompose2dScale(getCurrentTransform(this.ctx)),{viewportScale:c}=this,u=Math.ceil(r*this.outputScaleX*c),K=Math.ceil(a*this.outputScaleY*c);this.annotationCanvas=this.canvasFactory.create(u,K);let{canvas:Y,context:X}=this.annotationCanvas;this.annotationCanvasMap.set(e,Y),this.annotationCanvas.savedCtx=this.ctx,this.ctx=X,this.ctx.save(),this.ctx.setTransform(i,0,0,-o,0,a*o),resetCtxToDefault(this.ctx)}else resetCtxToDefault(this.ctx),this.endPath(),this.ctx.rect(t[0],t[1],r,a),this.ctx.clip(),this.ctx.beginPath()}
71this.current=new CanvasExtraState(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...n),this.transform(...r)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),_assertClassBrand(_CanvasGraphics_brand,this,_drawFilter).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;let t=e.count;e=this.getObject(e.data,e),e.count=t;let n=this.ctx,r=this.processingType3;if(r&&(r.compiled===void 0&&(r.compiled=compileType3Glyph(e)),r.compiled)){r.compiled(n);return}let i=this._createMaskCanvas(e),a=i.canvas;n.save(),n.setTransform(1,0,0,1,0,0),n.drawImage(a,i.offsetX,i.offsetY),n.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t,n=0,r=0,i,a){if(!this.contentVisible)return;e=this.getObject(e.data,e);let o=this.ctx;o.save();let c=getCurrentTransform(o);o.transform(t,n,r,i,0,0);let u=this._createMaskCanvas(e);o.setTransform(1,0,0,1,u.offsetX-c[4],u.offsetY-c[5]);for(let e=0,K=a.length;e<K;e+=2){let K=Util.transform(c,[t,n,r,i,a[e],a[e+1]]),[Y,X]=Util.applyTransform([0,0],K);o.drawImage(u.canvas,Y,X)}o.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return;let t=this.ctx,n=this.current.fillColor,r=this.current.patternFill;for(let i of e){let{data:e,width:a,height:o,transform:c}=i,u=this.cachedCanvases.getCanvas(`maskCanvas`,a,o),K=u.context;K.save(),putBinaryImageMask(K,this.getObject(e,i)),K.globalCompositeOperation=`source-in`,K.fillStyle=r?n.getPattern(K,this,getCurrentTransformInverse(t),PathType.FILL):n,K.fillRect(0,0,a,o),K.restore(),t.save(),t.transform(...c),t.scale(1,-1),drawImageAtIntegerCoords(t,u.canvas,0,0,a,o,0,-1,1,1),t.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return;let t=this.getObject(e);if(!t){warn(`Dependent image isn't ready yet`);return}this.paintInlineImageXObject(t)}paintImageXObjectRepeat(e,t,n,r){if(!this.contentVisible)return;let i=this.getObject(e);if(!i){warn(`Dependent image isn't ready yet`);return}let a=i.width,o=i.height,c=[];for(let e=0,i=r.length;e<i;e+=2)c.push({transform:[t,0,0,n,r[e],r[e+1]],x:0,y:0,w:a,h:o});this.paintInlineImageXObjectGroup(i,c)}applyTransferMapsToCanvas(e){return this.current.transferMaps!==`none`&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter=`none`),e.canvas}applyTransferMapsToBitmap(e){if(this.current.transferMaps===`none`)return e.bitmap;let{bitmap:t,width:n,height:r}=e,i=this.cachedCanvases.getCanvas(`inlineImage`,n,r),a=i.context;return a.filter=this.current.transferMaps,a.drawImage(t,0,0),a.filter=`none`,i.canvas}paintInlineImageXObject(e){if(!this.contentVisible)return;let t=e.width,n=e.height,r=this.ctx;if(this.save(),!isNodeJS){let{filter:e}=r;e!==`none`&&e!==``&&(r.filter=`none`)}r.scale(1/t,-1/n);let i;if(e.bitmap)i=this.applyTransferMapsToBitmap(e);else if(typeof HTMLElement==`function`&&e instanceof HTMLElement||!e.data)i=e;else{let r=this.cachedCanvases.getCanvas(`inlineImage`,t,n).context;putBinaryImageData(r,e),i=this.applyTransferMapsToCanvas(r)}let a=this._scaleImage(i,getCurrentTransformInverse(r));r.imageSmoothingEnabled=getImageSmoothingEnabled(getCurrentTransform(r),e.interpolate),drawImageAtIntegerCoords(r,a.img,0,0,a.paintWidth,a.paintHeight,0,-n,t,n),this.compose(),this.restore()}paintInlineImageXObjectGroup(e,t){if(!this.contentVisible)return;let n=this.ctx,r;if(e.bitmap)r=e.bitmap;else{let t=e.width,n=e.height,i=this.cachedCanvases.getCanvas(`inlineImage`,t,n).context;putBinaryImageData(i,e),r=this.applyTransferMapsToCanvas(i)}for(let e of t)n.save(),n.transform(...e.transform),n.scale(1,-1),drawImageAtIntegerCoords(n,r,e.x,e.y,e.w,e.h,0,-1,1,1),n.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){e===`OC`?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){let t=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);let n=this.ctx;this.pendingClip&&=(t||(this.pendingClip===EO_CLIP?n.clip(`evenodd`):n.clip()),null),this.current.startNewPathAndClipBox(this.current.clipBox),n.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){let e=getCurrentTransform(this.ctx);if(e[1]===0&&e[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{let t=Math.abs(e[0]*e[3]-e[2]*e[1]),n=Math.hypot(e[0],e[2]),r=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(n,r)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){let{lineWidth:e}=this.current,{a:t,b:n,c:r,d:i}=this.ctx.getTransform(),a,o;if(n===0&&r===0){let n=Math.abs(t),r=Math.abs(i);if(n===r){if(e===0)a=o=1/n;else{let t=n*e;a=o=t<1?1/t:1}}else if(e===0)a=1/n,o=1/r;else{let t=n*e,i=r*e;a=t<1?1/t:1,o=i<1?1/i:1}}else{let c=Math.abs(t*i-n*r),u=Math.hypot(t,n),K=Math.hypot(r,i);if(e===0)a=K/c,o=u/c;else{let t=e*c;a=K>t?K/t:1,o=u>t?u/t:1}}this._cachedScaleForStroking[0]=a,this._cachedScaleForStroking[1]=o}return this._cachedScaleForStroking}rescaleAndStroke(e){let{ctx:t}=this,{lineWidth:n}=this.current,[r,i]=this.getScaleForStroking();if(t.lineWidth=n||1,r===1&&i===1){t.stroke();return}let a=t.getLineDash();if(e&&t.save(),t.scale(r,i),a.length>
710){let e=Math.max(r,i);t.setLineDash(a.map(t=>t/e)),t.lineDashOffset/=e}t.stroke(),e&&t.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}};function _restoreInitialState(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&=(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),null)}function _drawFilter(){if(this.pageColors){let e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(e!==`none`){let t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}}for(let e in OPS)CanvasGraphics.prototype[e]!==void 0&&(CanvasGraphics.prototype[OPS[e]]=CanvasGraphics.prototype[e]);var GlobalWorkerOptions=class e{static get workerPort(){return _assertClassBrand(e,this,_port)._}static set workerPort(t){if(!(typeof Worker<`u`&&t instanceof Worker)&&t!==null)throw Error("Invalid `workerPort` type.");_port._=_assertClassBrand(e,this,t)}static get workerSrc(){return _assertClassBrand(e,this,_src)._}static set workerSrc(t){if(typeof t!=`string`)throw Error("Invalid `workerSrc` type.");_src._=_assertClassBrand(e,this,t)}},_port={_:null},_src={_:``},CallbackKind={UNKNOWN:0,DATA:1,ERROR:2},StreamKind={UNKNOWN:0,CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function wrapReason(e){switch(e instanceof Error||typeof e==`object`&&e||unreachable$1(`wrapReason: Expected "reason" to be a (possibly cloned) Error.`),e.name){case`AbortException`:return new AbortException(e.message);case`MissingPDFException`:return new MissingPDFException(e.message);case`PasswordException`:return new PasswordException(e.message,e.code);case`UnexpectedResponseException`:return new UnexpectedResponseException(e.message,e.status);case`UnknownErrorException`:return new UnknownErrorException(e.message,e.details);default:return new UnknownErrorException(e.message,e.toString())}}var _messageAC=new WeakMap,_MessageHandler_brand=new WeakSet,MessageHandler=class{constructor(e,t,n){_classPrivateMethodInitSpec(this,_MessageHandler_brand),_classPrivateFieldInitSpec(this,_messageAC,new AbortController),this.sourceName=e,this.targetName=t,this.comObj=n,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),n.addEventListener(`message`,_assertClassBrand(_MessageHandler_brand,this,_onMessage).bind(this),{signal:_classPrivateFieldGet2(_messageAC,this).signal})}on(e,t){let n=this.actionHandler;if(n[e])throw Error(`There is already an actionName called "${e}"`);n[e]=t}send(e,t,n){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},n)}sendWithPromise(e,t,n){let r=this.callbackId++,i=Promise.withResolvers();this.callbackCapabilities[r]=i;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:r,data:t},n)}catch(e){i.reject(e)}return i.promise}sendWithStream(e,t,n,r){let i=this.streamId++,a=this.sourceName,o=this.targetName,c=this.comObj;return new ReadableStream({start:n=>{let u=Promise.withResolvers();return this.streamControllers[i]={controller:n,startCall:u,pullCall:null,cancelCall:null,isClosed:!1},c.postMessage({sourceName:a,targetName:o,action:e,streamId:i,data:t,desiredSize:n.desiredSize},r),u.promise},pull:e=>{let t=Promise.withResolvers();return this.streamControllers[i].pullCall=t,c.postMessage({sourceName:a,targetName:o,stream:StreamKind.PULL,streamId:i,desiredSize:e.desiredSize}),t.promise},cancel:e=>{assert(e instanceof Error,`cancel must have a valid reason`);let t=Promise.withResolvers();return this.streamControllers[i].cancelCall=t,this.streamControllers[i].isClosed=!0,c.postMessage({sourceName:a,targetName:o,stream:StreamKind.CANCEL,streamId:i,reason:wrapReason(e)}),t.promise}},n)}destroy(){_classPrivateFieldGet2(_messageAC,this)?.abort(),_classPrivateFieldSet2(_messageAC,this,null)}};function _onMessage({data:e}){if(e.targetName!==this.sourceName)return;if(e.stream){_assertClassBrand(_MessageHandler_brand,this,_processStreamMessage).call(this,e);return}if(e.callback){let t=e.callbackId,n=this.callbackCapabilities[t];if(!n)throw Error(`Cannot resolve callback ${t}`);if(delete this.callbackCapabilities[t],e.callback===CallbackKind.DATA)n.resolve(e.data);else if(e.callback===CallbackKind.ERROR)n.reject(wrapReason(e.reason));else throw Error(`Unexpected callback case`);return}let t=this.actionHandler[e.action];if(!t)throw Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){let n=this.sourceName,r=e.sourceName,i=this.comObj;new Promise(function(n){n(t(e.data))}).then(function(t){i.postMessage({sourceName:n,targetName:r,callback:CallbackKind.DATA,callbackId:e.callbackId,data:t})},function(t){i.postMessage({sourceName:n,targetName:r,callback:CallbackKind.ERROR,callbackId:e.callbackId,reason:wrapReason(t)})});return}if(e.streamId){_assertClassBrand(_MessageHandler_brand,this,_createStreamSink).call(this,e);return}t(e.data)}function _createStreamSink(e){let t=e.streamId,n=this.sourceName,r=e.sourceName,i=this.comObj,a=this,o=this.actionHandler[e.action],c={enqueue(e,a=1,o){if(this.isCancelled)return;let c=this.desiredSize;this.desiredSize-=a,c>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),i.postMessage({sourceName:n,targetName:r,stream
71:StreamKind.ENQUEUE,streamId:t,chunk:e},o)},close(){this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:n,targetName:r,stream:StreamKind.CLOSE,streamId:t}),delete a.streamSinks[t])},error(e){assert(e instanceof Error,`error must have a valid reason`),!this.isCancelled&&(this.isCancelled=!0,i.postMessage({sourceName:n,targetName:r,stream:StreamKind.ERROR,streamId:t,reason:wrapReason(e)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[t]=c,new Promise(function(t){t(o(e.data,c))}).then(function(){i.postMessage({sourceName:n,targetName:r,stream:StreamKind.START_COMPLETE,streamId:t,success:!0})},function(e){i.postMessage({sourceName:n,targetName:r,stream:StreamKind.START_COMPLETE,streamId:t,reason:wrapReason(e)})})}function _processStreamMessage(e){let t=e.streamId,n=this.sourceName,r=e.sourceName,i=this.comObj,a=this.streamControllers[t],o=this.streamSinks[t];switch(e.stream){case StreamKind.START_COMPLETE:e.success?a.startCall.resolve():a.startCall.reject(wrapReason(e.reason));break;case StreamKind.PULL_COMPLETE:e.success?a.pullCall.resolve():a.pullCall.reject(wrapReason(e.reason));break;case StreamKind.PULL:if(!o){i.postMessage({sourceName:n,targetName:r,stream:StreamKind.PULL_COMPLETE,streamId:t,success:!0});break}o.desiredSize<=0&&e.desiredSize>0&&o.sinkCapability.resolve(),o.desiredSize=e.desiredSize,new Promise(function(e){e(o.onPull?.())}).then(function(){i.postMessage({sourceName:n,targetName:r,stream:StreamKind.PULL_COMPLETE,streamId:t,success:!0})},function(e){i.postMessage({sourceName:n,targetName:r,stream:StreamKind.PULL_COMPLETE,streamId:t,reason:wrapReason(e)})});break;case StreamKind.ENQUEUE:if(assert(a,`enqueue should have stream controller`),a.isClosed)break;a.controller.enqueue(e.chunk);break;case StreamKind.CLOSE:if(assert(a,`close should have stream controller`),a.isClosed)break;a.isClosed=!0,a.controller.close(),_assertClassBrand(_MessageHandler_brand,this,_deleteStreamController).call(this,a,t);break;case StreamKind.ERROR:assert(a,`error should have stream controller`),a.controller.error(wrapReason(e.reason)),_assertClassBrand(_MessageHandler_brand,this,_deleteStreamController).call(this,a,t);break;case StreamKind.CANCEL_COMPLETE:e.success?a.cancelCall.resolve():a.cancelCall.reject(wrapReason(e.reason)),_assertClassBrand(_MessageHandler_brand,this,_deleteStreamController).call(this,a,t);break;case StreamKind.CANCEL:if(!o)break;new Promise(function(t){t(o.onCancel?.(wrapReason(e.reason)))}).then(function(){i.postMessage({sourceName:n,targetName:r,stream:StreamKind.CANCEL_COMPLETE,streamId:t,success:!0})},function(e){i.postMessage({sourceName:n,targetName:r,stream:StreamKind.CANCEL_COMPLETE,streamId:t,reason:wrapReason(e)})}),o.sinkCapability.reject(wrapReason(e.reason)),o.isCancelled=!0,delete this.streamSinks[t];break;default:throw Error(`Unexpected stream case`)}}async function _deleteStreamController(e,t){await Promise.allSettled([e.startCall?.promise,e.pullCall?.promise,e.cancelCall?.promise]),delete this.streamControllers[t]}var _metadataMap=new WeakMap,_data=new WeakMap,Metadata=class{constructor({parsedData:e,rawData:t}){_classPrivateFieldInitSpec(this,_metadataMap,void 0),_classPrivateFieldInitSpec(this,_data,void 0),_classPrivateFieldSet2(_metadataMap,this,e),_classPrivateFieldSet2(_data,this,t)}getRaw(){return _classPrivateFieldGet2(_data,this)}get(e){return _classPrivateFieldGet2(_metadataMap,this).get(e)??null}getAll(){return objectFromMap(_classPrivateFieldGet2(_metadataMap,this))}has(e){return _classPrivateFieldGet2(_metadataMap,this).has(e)}},INTERNAL=Symbol(`INTERNAL`),_isDisplay=new WeakMap,_isPrint=new WeakMap,_userSet=new WeakMap,_visible=new WeakMap,OptionalContentGroup=class{constructor(e,{name:t,intent:n,usage:r,rbGroups:i}){_classPrivateFieldInitSpec(this,_isDisplay,!1),_classPrivateFieldInitSpec(this,_isPrint,!1),_classPrivateFieldInitSpec(this,_userSet,!1),_classPrivateFieldInitSpec(this,_visible,!0),_classPrivateFieldSet2(_isDisplay,this,!!(e&RenderingIntentFlag.DISPLAY)),_classPrivateFieldSet2(_isPrint,this,
71!!(e&RenderingIntentFlag.PRINT)),this.name=t,this.intent=n,this.usage=r,this.rbGroups=i}get visible(){if(_classPrivateFieldGet2(_userSet,this))return _classPrivateFieldGet2(_visible,this);if(!_classPrivateFieldGet2(_visible,this))return!1;let{print:e,view:t}=this.usage;return _classPrivateFieldGet2(_isDisplay,this)?t?.viewState!==`OFF`:!_classPrivateFieldGet2(_isPrint,this)||e?.printState!==`OFF`}_setVisible(e,t,n=!1){e!==INTERNAL&&unreachable$1("Internal method `_setVisible` called."),_classPrivateFieldSet2(_userSet,this,n),_classPrivateFieldSet2(_visible,this,t)}},_cachedGetHash=new WeakMap,_groups=new WeakMap,_initialHash=new WeakMap,_order=new WeakMap,_OptionalContentConfig_brand=new WeakSet,OptionalContentConfig=class{constructor(e,t=RenderingIntentFlag.DISPLAY){if(_classPrivateMethodInitSpec(this,_OptionalContentConfig_brand),_classPrivateFieldInitSpec(this,_cachedGetHash,null),_classPrivateFieldInitSpec(this,_groups,new Map),_classPrivateFieldInitSpec(this,_initialHash,null),_classPrivateFieldInitSpec(this,_order,null),this.renderingIntent=t,this.name=null,this.creator=null,e!==null){this.name=e.name,this.creator=e.creator,_classPrivateFieldSet2(_order,this,e.order);for(let n of e.groups)_classPrivateFieldGet2(_groups,this).set(n.id,new OptionalContentGroup(t,n));if(e.baseState===`OFF`)for(let e of _classPrivateFieldGet2(_groups,this).values())e._setVisible(INTERNAL,!1);for(let t of e.on)_classPrivateFieldGet2(_groups,this).get(t)._setVisible(INTERNAL,!0);for(let t of e.off)_classPrivateFieldGet2(_groups,this).get(t)._setVisible(INTERNAL,!1);_classPrivateFieldSet2(_initialHash,this,this.getHash())}}isVisible(e){if(_classPrivateFieldGet2(_groups,this).size===0)return!0;if(!e)return info(`Optional content group not defined.`),!0;if(e.type===`OCG`)return _classPrivateFieldGet2(_groups,this).has(e.id)?_classPrivateFieldGet2(_groups,this).get(e.id).visible:(warn(`Optional content group not found: ${e.id}`),!0);if(e.type===`OCMD`){if(e.expression)return _assertClassBrand(_OptionalContentConfig_brand,this,_evaluateVisibilityExpression).call(this,e.expression);if(!e.policy||e.policy===`AnyOn`){for(let t of e.ids){if(!_classPrivateFieldGet2(_groups,this).has(t))return warn(`Optional content group not found: ${t}`),!0;if(_classPrivateFieldGet2(_groups,this).get(t).visible)return!0}return!1}if(e.policy===`AllOn`){for(let t of e.ids){if(!_classPrivateFieldGet2(_groups,this).has(t))return warn(`Optional content group not found: ${t}`),!0;if(!_classPrivateFieldGet2(_groups,this).get(t).visible)return!1}return!0}if(e.policy===`AnyOff`){for(let t of e.ids){if(!_classPrivateFieldGet2(_groups,this).has(t))return warn(`Optional content group not found: ${t}`),!0;if(!_classPrivateFieldGet2(_groups,this).get(t).visible)return!0}return!1}if(e.policy===`AllOff`){for(let t of e.ids){if(!_classPrivateFieldGet2(_groups,this).has(t))return warn(`Optional content group not found: ${t}`),!0;if(_classPrivateFieldGet2(_groups,this).get(t).visible)return!1}return!0}return warn(`Unknown optional content policy ${e.policy}.`),!0}return warn(`Unknown group type ${e.type}.`),!0}setVisibility(e,t=!0,n=!0){let r=_classPrivateFieldGet2(_groups,this).get(e);if(!r){warn(`Optional content group not found: ${e}`);return}if(n&&t&&r.rbGroups.length)for(let t of r.rbGroups)for(let n of t)n!==e&&_classPrivateFieldGet2(_groups,this).get(n)?._setVisible(INTERNAL,!1,!0);r._setVisible(INTERNAL,!!t,!0),_classPrivateFieldSet2(_cachedGetHash,this,null)}setOCGState({state:e,preserveRB:t}){let n;for(let r of e){switch(r){case`ON`:case`OFF`:case`Toggle`:n=r;continue}let e=_classPrivateFieldGet2(_groups,this).get(r);if(e)switch(n){case`ON`:this.setVisibility(r,!0,t);break;case`OFF`:this.setVisibility(r,!1,t);break;case`Toggle`:this.setVisibility(r,!e.visible,t)}}_classPrivateFieldSet2(_cachedGetHash,this,null)}get hasInitialVisibility(){return _classPrivateFieldGet2(_initialHash,this)===null||this.getHash()===_classPrivateFieldGet2(_initialHash,this)}getOrder(){return _classPrivateFieldGet2(_groups,this).size?_classPrivateFieldGet2(_order,this)?_classPrivateFieldGet2(_order,this).slice():[..._classPrivateFieldGet2(_groups,this).keys()]:null}getGroups(){return _classPrivateFieldGet2(_groups,this).size>0?objectFromMap(_classPrivateFieldGet2(_groups,this)):null}getGroup(e){return _classPrivateFieldGet2(_groups,this).get(e)||null}getHash(){if(_classPrivateFieldGet2(_cachedGetHash,this)!==null)return _classPrivateFieldGet2(_cachedGetHash,this);let e=new MurmurHash3_64;
71for(let[t,n]of _classPrivateFieldGet2(_groups,this))e.update(`${t}:${n.visible}`);return _classPrivateFieldSet2(_cachedGetHash,this,e.hexdigest())}};function _evaluateVisibilityExpression(e){let t=e.length;if(t<2)return!0;let n=e[0];for(let r=1;r<t;r++){let t=e[r],i;if(Array.isArray(t))i=_assertClassBrand(_OptionalContentConfig_brand,this,_evaluateVisibilityExpression).call(this,t);else if(_classPrivateFieldGet2(_groups,this).has(t))i=_classPrivateFieldGet2(_groups,this).get(t).visible;else return warn(`Optional content group not found: ${t}`),!0;switch(n){case`And`:if(!i)return!1;break;case`Or`:if(i)return!0;break;case`Not`:return!i;default:return!0}}return n===`And`}var PDFDataTransportStream=class{constructor(e,{disableRange:t=!1,disableStream:n=!1}){assert(e,`PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.`);let{length:r,initialData:i,progressiveDone:a,contentDispositionFilename:o}=e;if(this._queuedChunks=[],this._progressiveDone=a,this._contentDispositionFilename=o,i?.length>0){let e=i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!n,this._isRangeSupported=!t,this._contentLength=r,this._fullRequestReader=null,this._rangeReaders=[],e.addRangeListener((e,t)=>{this._onReceiveData({begin:e,chunk:t})}),e.addProgressListener((e,t)=>{this._onProgress({loaded:e,total:t})}),e.addProgressiveReadListener(e=>{this._onReceiveData({chunk:e})}),e.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),e.transportReady()}_onReceiveData({begin:e,chunk:t}){let n=t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer;e===void 0?this._fullRequestReader?this._fullRequestReader._enqueue(n):this._queuedChunks.push(n):assert(this._rangeReaders.some(function(t){return t._begin===e&&(t._enqueue(n),!0)}),"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(e){e.total===void 0?this._rangeReaders[0]?.onProgress?.({loaded:e.loaded}):this._fullRequestReader?.onProgress?.({loaded:e.loaded,total:e.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){let t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){assert(!this._fullRequestReader,`PDFDataTransportStream.getFullReader can only be called once.`);let e=this._queuedChunks;return this._queuedChunks=null,new PDFDataTransportStreamReader(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;
71let n=new PDFDataTransportStreamRangeReader(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(let t of this._rangeReaders.slice(0))t.cancel(e);this._pdfDataRangeTransport.abort()}},PDFDataTransportStreamReader=class{constructor(e,t,n=!1,r=null){this._stream=e,this._done=n||!1,this._filename=isPdfFile(r)?r:null,this._queuedChunks=t||[],this._loaded=0;for(let e of this._queuedChunks)this._loaded+=e.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};let e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(let e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||=!0}},PDFDataTransportStreamRangeReader=class{constructor(e,t,n){this._stream=e,this._begin=t,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(this._requests.length===0)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(let e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){let e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};let e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(let e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}};function getFilenameFromContentDispositionHeader(e){let t=!0,n=r(`filename\\*`,`i`).exec(e);if(n){n=n[1];let e=c(n);return e=unescape(e),e=u(e),e=K(e),a(e)}if(n=o(e),n)return a(K(n));if(n=r(`filename`,`i`).exec(e),n){n=n[1];let e=c(n);return e=K(e),a(e)}function r(e,t){return RegExp(`(?:^|;)\\s*`+e+`\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)`,t)}function i(e,n){if(e){if(!/^[\x00-\xFF]+$/.test(n))return n;try{let r=new TextDecoder(e,{fatal:!0}),i=stringToBytes(n);n=r.decode(i),t=!1}catch{}}return n}function a(e){return t&&/[\x80-\xff]/.test(e)&&(e=i(`utf-8`,e),t&&(e=i(`iso-8859-1`,e))),e}function o(e){let t=[],n,i=r(`filename\\*((?!0\\d)\\d+)(\\*?)`,`ig`);for(;(n=i.exec(e))!==null;){let[,e,r,i]=n;if(e=parseInt(e,10),e in t){if(e===0)break;continue}t[e]=[r,i]}let a=[];for(let e=0;e<t.length&&e in t;++e){let[n,r]=t[e];r=c(r),n&&(r=unescape(r),e===0&&(r=u(r))),a.push(r)}return a.join(``)}function c(e){if(e.startsWith(`"`)){let t=e.slice(1).split(`\\"`);for(let e=0;e<t.length;++e){let n=t[e].indexOf(`"`);n!==-1&&(t[e]=t[e].slice(0,n),t.length=e+1),t[e]=t[e].replaceAll(/\\(.)/g,`$1`)}e=t.join(`"`)}return e}function u(e){let t=e.indexOf(`'`);return t===-1?e:i(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,``))}function K(e){return!e.startsWith(`=?`)||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(e,t,n,r){if(n===`q`||n===`Q`)return r=r.replaceAll(`_`,` `),r=r.replaceAll(/=([0-9a-fA-F]{2})/g,function(e,t){return String.fromCharCode(parseInt(t,16))}),i(t,r);try{r=atob(r)}catch{}return i(t,r)})}return``}function createHeaders(e,t){let n=new Headers;if(!e||!t||typeof t!=`object`)return n;for(let e in t){let r=t[e];r!==void 0&&n.append(e,r)}return n}function validateRangeRequestCapabilities({responseHeaders:e,isHttp:t,rangeChunkSize:n,disableRange:r}){let i={allowRangeRequests:!1,suggestedLength:void 0},a=parseInt(e.get(`Content-Length`),10);return!Number.isInteger(a)||(i.suggestedLength=a,a<=2*n)||r||!t||e.get(`Accept-Ranges`)!==`bytes`||(e.get(`Content-Encoding`)||`identity`)!==`identity`||(i.allowRangeRequests=!0),i}function extractFilenameFromHeader(e){let t=e.get(`Content-Disposition`);if(t){let e=getFilenameFromContentDispositionHeader(t);if(e.includes(`%`))try{e=decodeURIComponent(e)}catch{}if(isPdfFile(e))return e}return null}function createResponseStatusError(e,t){return e===404||e===0&&t.startsWith(`file:`)?new MissingPDFException(`Missing PDF "`+t+`".`):new UnexpectedResponseException(`Unexpected server response 
71(${e}) while retrieving PDF "${t}".`,e)}function validateResponseStatus(e){return e===200||e===206}function createFetchOptions(e,t,n){return{method:`GET`,headers:e,signal:n.signal,mode:`cors`,credentials:t?`include`:`same-origin`,redirect:`follow`}}function getArrayBuffer(e){return e instanceof Uint8Array?e.buffer:e instanceof ArrayBuffer?e:(warn(`getArrayBuffer - unexpected data format: ${e}`),new Uint8Array(e).buffer)}var PDFFetchStream=class{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.headers=createHeaders(this.isHttp,e.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return assert(!this._fullRequestReader,`PDFFetchStream.getFullReader can only be called once.`),this._fullRequestReader=new PDFFetchStreamReader(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;let n=new PDFFetchStreamRangeReader(this,e,t);return this._rangeRequestReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(let t of this._rangeRequestReaders.slice(0))t.cancel(e)}},PDFFetchStreamReader=class{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;let t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange;let n=new Headers(e.headers),r=t.url;fetch(r,createFetchOptions(n,this._withCredentials,this._abortController)).then(t=>{if(!validateResponseStatus(t.status))throw createResponseStatusError(t.status,r);this._reader=t.body.getReader(),this._headersCapability.resolve();let n=t.headers,{allowRangeRequests:i,suggestedLength:a}=validateRangeRequestCapabilities({responseHeaders:n,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=i,this._contentLength=a||this._contentLength,this._filename=extractFilenameFromHeader(n),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new AbortException(`Streaming is disabled.`))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;let{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:getArrayBuffer(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}},PDFFetchStreamRangeReader=class{constructor(e,t,n){this._stream=e,this._reader=null,this._loaded=0;let r=e.source;this._withCredentials=r.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!r.disableStream,this._abortController=new AbortController;let i=new Headers(e.headers);i.append(`Range`,`bytes=${t}-${n-1}`);let a=r.url;fetch(a,createFetchOptions(i,this._withCredentials,this._abortController)).then(e=>{if(!validateResponseStatus(e.status))throw createResponseStatusError(e.status,a);this._readCapability.resolve(),this._reader=e.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;let{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded}),{value:getArrayBuffer(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}},OK_RESPONSE=200,PARTIAL_CONTENT_RESPONSE=206;function network_getArrayBuffer(e){let t=e.response;return typeof t==`string`?stringToBytes(t).buffer:t}var NetworkManager=class{constructor({url:e,httpHeaders:t,withCredentials:n}){this.url=e,this.isHttp=/^https?:/i.test(e),this.headers=createHeaders(this.isHttp,t),this.withCredentials=n||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,n){let r={begin:e,end:t};for(let e in n)r[e]=n[e];return this.request(r)}requestFull(e){return this.request(e)}request(e){let t=new XMLHttpRequest,n=this.currXhrId++,r=this.pendingRequests[n]={xhr:t};t.open(`GET`,this.url),t.withCredentials=this.withCredentials;for(let[e,n]of this.headers)t.setRequestHeader(e,n);return this.isHttp&&`begin`in e&&`end`in e?(t.setRequestHeader(`Range`,`bytes=${e.begin}-${e.end-1}`),r.expectedStatus=PARTIAL_CONTENT_RESPONSE):r.expectedStatus=OK_RESPONSE,t.responseType=`arraybuffer`,e.onError&&(t.onerror=function(n){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,n),t.onprogress=this.onProgress.bind(this,n),r.onHeadersReceived=e.onHeadersReceived,r.onDone=e.onDone,r.onError=e.onError,r.onProgress=e.onProgress,t.send(null),n}onProgress(e,t){let n=this.pendingRequests[e];n&&n.onProgress?.(t)}onStateChange(e,t){let n=this.pendingRequests[e];if(!n)return;let r=n.xhr;if(r.readyState>=2&&n.onHeadersReceived&&(n.onHeadersReceived(),delete n.onHeadersReceived),r.readyState!==4||!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],r.status===0&&this.isHttp){n.onError?.(r.status);return}let i=r.status||OK_RESPONSE;if((i!==OK_RESPONSE||n.expectedStatus!==PARTIAL_CONTENT_RESPONSE)&&i!==n.expectedStatus){n.onError?.(r.status);return}let a=network_getArrayBuffer(r);if(i===PARTIAL_CONTENT_RESPONSE){let e=r.getResponseHeader(`Content-Range`),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);n.onDone({begin:parseInt(t[1],10),chunk:a})}else a?n.onDone({begin:0,chunk:a}):n.onError?.(r.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}
71abortRequest(e){let t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}},PDFNetworkStream=class{constructor(e){this._source=e,this._manager=new NetworkManager(e),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){let t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return assert(!this._fullRequestReader,`PDFNetworkStream.getFullReader can only be called once.`),this._fullRequestReader=new PDFNetworkStreamFullRequestReader(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){let n=new PDFNetworkStreamRangeRequestReader(this._manager,e,t);return n.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(let t of this._rangeRequestReaders.slice(0))t.cancel(e)}},PDFNetworkStreamFullRequestReader=class{constructor(e,t){this._manager=e;let n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(n),this._headersCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){let e=this._fullRequestId,t=this._manager.getRequestXhr(e),n=new Headers(t.getAllResponseHeaders().trim().split(/[\r\n]+/).map(e=>{let[t,...n]=e.split(`: `);return[t,n.join(`: `)]})),{allowRangeRequests:r,suggestedLength:i}=validateRangeRequestCapabilities({responseHeaders:n,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});r&&(this._isRangeSupported=!0),this._contentLength=i||this._contentLength,this._filename=extractFilenameFromHeader(n),this._isRangeSupported&&this._manager.abortRequest(e),this._headersCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(let e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=createResponseStatusError(e,this._url),this._headersCapability.reject(this._storedError);for(let e of this._requests)e.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){this.onProgress?.({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};let e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersCapability.reject(e);for(let e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}},PDFNetworkStreamRangeRequestReader=class{constructor(e,t,n){this._manager=e;let r={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(t,n,r),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){this.onClosed?.(this)}_onDone(e){let t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;for(let e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=createResponseStatusError(e,this._url);for(let e of this._requests)e.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){this.isStreamingSupported||this.onProgress?.({loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){let e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};let e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(let e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest
71(this._requestId),this._close()}},urlRegex=/^[a-z][a-z0-9\-+.]+:/i;function parseUrlOrPath(e){if(urlRegex.test(e))return new URL(e);let t=NodePackages.get(`url`);return new URL(t.pathToFileURL(e))}function createRequest(e,t,n){return e.protocol===`http:`?NodePackages.get(`http`).request(e,{headers:t},n):NodePackages.get(`https`).request(e,{headers:t},n)}var PDFNodeStream=class{constructor(e){this.source=e,this.url=parseUrlOrPath(e.url),this.isHttp=this.url.protocol===`http:`||this.url.protocol===`https:`,this.isFsUrl=this.url.protocol===`file:`,this.headers=createHeaders(this.isHttp,e.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return assert(!this._fullRequestReader,`PDFNodeStream.getFullReader can only be called once.`),this._fullRequestReader=this.isFsUrl?new PDFNodeStreamFsFullReader(this):new PDFNodeStreamFullReader(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;let n=this.isFsUrl?new PDFNodeStreamFsRangeReader(this,e,t):new PDFNodeStreamRangeReader(this,e,t);return this._rangeRequestReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(let t of this._rangeRequestReaders.slice(0))t.cancel(e)}},BaseFullReader=class{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;let t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;let e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){if(!this._readableStream){this._error(e);return}this._readableStream.destroy(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on(`readable`,()=>{this._readCapability.resolve()}),e.on(`end`,()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on(`error`,e=>{this._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new AbortException(`streaming is disabled`)),this._storedError&&this._readableStream.destroy(this._storedError)}},BaseRangeReader=class{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();let t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;let e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){if(!this._readableStream){this._error(e);return}this._readableStream.destroy(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on(`readable`,()=>{this._readCapability.resolve()}),e.on(`end`,()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on(`error`,e=>{this._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}},PDFNodeStreamFullReader=class extends BaseFullReader{constructor(e){super(e);let t=Object.fromEntries(e.headers),n=t=>{if(t.statusCode===404){let e=new MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=e,this._headersCapability.reject(e);return}this._headersCapability.resolve(),this._setReadableStream(t);let n=new Headers(this._readableStream.headers),{allowRangeRequests:r,suggestedLength:i}=validateRangeRequestCapabilities({responseHeaders:n,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=r,this._contentLength=i||this._contentLength,this._filename=extractFilenameFromHeader(n)};this._request=createRequest(this._url,t,n),this._request.on(`error`,e=>{this._storedError=e,this._headersCapability.reject(e)}),this._request.end()}},PDFNodeStreamRangeReader=class extends BaseRangeReader{constructor(e,t,n){super(e);let r=Object.fromEntries(e.headers);r.Range=`bytes=${t}-${n-1}`;let i=e=>{if(e.statusCode===404){let e=new MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=e;return}this._setReadableStream(e)};this._request=createRequest(this._url,r,i),this._request.on(`error`,e=>{this._storedError=e}),this._request.end()}},PDFNodeStreamFsFullReader=class extends BaseFullReader{constructor(e){super(e);let t=NodePackages.get(`fs`);t.promises.lstat(this._url).then(e=>{this._contentLength=e.size,this._setReadableStream(t.createReadStream(this._url)),this._headersCapability.resolve()},e=>{e.code===`ENOENT`&&(e=new MissingPDFException(`Missing PDF "${this._url}".`)),this._storedError=e,this._headersCapability.reject(e)})}},PDFNodeStreamFsRangeReader=class extends BaseRangeReader{constructor(e,t,n){super(e);let r=NodePackages.get(`fs`);this._setReadableStream(r.createReadStream(this._url,{start:t,end:n-1}))}},MAX_TEXT_DIVS_TO_RENDER=1e5,DEFAULT_FONT_SIZE=30,DEFAULT_FONT_ASCENT=.8,_capability=new WeakMap,_container2=new WeakMap,_disableProcessItems=new WeakMap,_fontInspectorEnabled=new WeakMap,_lang=new WeakMap,_layoutTextParams=new WeakMap,_pageHeight=new WeakMap,_pageWidth=new WeakMap,_reader=new WeakMap,_rootContainer=new WeakMap,_rotation2=new WeakMap,_scale=new WeakMap,_styleCache=new WeakMap,_textContentItemsStr=new WeakMap,_textContentSource=new WeakMap,_textDivs=new WeakMap,_textDivProperties=new WeakMap,_transform=new WeakMap,_TextLayer_brand=new WeakSet,TextLayer$1=class e{constructor({textContentSource:t,container:n,viewport:r}){if(_classPrivateMethodInitSpec(this,_TextLayer_brand),_classPrivateFieldInitSpec(this,_capability,Promise.withResolvers()),_classPrivateFieldInitSpec(this,_container2,null),_classPrivateFieldInitSpec(this,_disableProcessItems,!1),_classPrivateFieldInitSpec(this,_fontInspectorEnabled,!!globalThis.FontInspector?.enabled),_classPrivateFieldInitSpec(this,_lang,null),_classPrivateFieldInitSpec(this,_layoutTextParams,null),_classPrivateFieldInitSpec(this,_pageHeight,0),_classPrivateFieldInitSpec(this,_pageWidth,0),_classPrivateFieldInitSpec(this,_reader,null),_classPrivateFieldInitSpec(this,_rootContainer,null),_classPrivateFieldInitSpec(this,_rotation2,0),_classPrivateFieldInitSpec(this,_scale,0),_classPrivateFieldInitSpec(this,_styleCache,Object.create(null)),_classPrivateFieldInitSpec(this,_textContentItemsStr,[]),_classPrivateFieldInitSpec(this,_textContentSource,null),_classPrivateFieldInitSpec(this,_textDivs,[]),_classPrivateFieldInitSpec(this,_textDivProperties,new WeakMap),_classPrivateFieldInitSpec(this,_transform,null),t instanceof ReadableStream)_classPrivateFieldSet2(_textContentSource,this,t);else if(typeof t==`object`)_classPrivateFieldSet2(_textContentSource,this,new ReadableStream({start(e){e.enqueue(t),e.close()}}));else throw Error(`No "textContentSource" parameter specified.`);_classPrivateFieldSet2(_container2,this,_classPrivateFieldSet2(_rootContainer,this,n)),_classPrivateFieldSet2(_scale,this,r.scale*(globalThis.devicePixelRatio||1)),_classPrivateFieldSet2(_rotation2,this,r.rotation),_classPrivateFieldSet2(_layoutTextParams,this,{div:null,properties:null,ctx:null});let{pageWidth:i,pageHeight:a,pageX:o,pageY:c}=r.rawDims;_classPrivateFieldSet2(_transform,this,[1,0,0,-1,-o,c+a]),_classPrivateFieldSet2(_pageWidth,this,i),_classPrivateFieldSet2(_pageHeight,this,a),_ensureMinFontSizeComputed.call(e),setLayerDimensions(n,r),_classPrivateFieldGet2(_capability,this).promise.finally(()=>{_pendingTextLayers._.delete(this),_classPrivateFieldSet2(_layoutTextParams,this,null),_classPrivateFieldSet2(_styleCache,this,null)}
71).catch(()=>{})}static get fontFamilyMap(){let{isWindows:e,isFirefox:t}=util_FeatureTest.platform;return shadow(this,`fontFamilyMap`,new Map([[`sans-serif`,`${e&&t?`Calibri, `:``}sans-serif`],[`monospace`,`${e&&t?`Lucida Console, `:``}monospace`]]))}render(){let e=()=>{_classPrivateFieldGet2(_reader,this).read().then(({value:t,done:n})=>{if(n){_classPrivateFieldGet2(_capability,this).resolve();return}_classPrivateFieldGet2(_lang,this)??_classPrivateFieldSet2(_lang,this,t.lang),Object.assign(_classPrivateFieldGet2(_styleCache,this),t.styles),_assertClassBrand(_TextLayer_brand,this,_processItems).call(this,t.items),e()},_classPrivateFieldGet2(_capability,this).reject)};return _classPrivateFieldSet2(_reader,this,_classPrivateFieldGet2(_textContentSource,this).getReader()),_pendingTextLayers._.add(this),e(),_classPrivateFieldGet2(_capability,this).promise}update({viewport:t,onBefore:n=null}){let r=t.scale*(globalThis.devicePixelRatio||1),i=t.rotation;if(i!==_classPrivateFieldGet2(_rotation2,this)&&(n?.(),_classPrivateFieldSet2(_rotation2,this,i),setLayerDimensions(_classPrivateFieldGet2(_rootContainer,this),{rotation:i})),r!==_classPrivateFieldGet2(_scale,this)){n?.(),_classPrivateFieldSet2(_scale,this,r);let t={div:null,properties:null,ctx:_getCtx.call(e,_classPrivateFieldGet2(_lang,this))};for(let e of _classPrivateFieldGet2(_textDivs,this))t.properties=_classPrivateFieldGet2(_textDivProperties,this).get(e),t.div=e,_assertClassBrand(_TextLayer_brand,this,_layout).call(this,t)}}cancel(){let e=new AbortException(`TextLayer task cancelled.`);_classPrivateFieldGet2(_reader,this)?.cancel(e).catch(()=>{}),_classPrivateFieldSet2(_reader,this,null),_classPrivateFieldGet2(_capability,this).reject(e)}get textDivs(){return _classPrivateFieldGet2(_textDivs,this)}get textContentItemsStr(){return _classPrivateFieldGet2(_textContentItemsStr,this)}static cleanup(){if(!(_assertClassBrand(e,this,_pendingTextLayers)._.size>0)){_assertClassBrand(e,this,_ascentCache)._.clear();for(let{canvas:t}of _assertClassBrand(e,this,_canvasContexts)._.values())t.remove();_assertClassBrand(e,this,_canvasContexts)._.clear()}}};_TextLayer=TextLayer$1;function _processItems(e){if(_classPrivateFieldGet2(_disableProcessItems,this))return;_classPrivateFieldGet2(_layoutTextParams,this).ctx??=_getCtx.call(_TextLayer,_classPrivateFieldGet2(_lang,this));let t=_classPrivateFieldGet2(_textDivs,this),n=_classPrivateFieldGet2(_textContentItemsStr,this);for(let r of e){if(t.length>MAX_TEXT_DIVS_TO_RENDER){warn(`Ignoring additional textDivs for performance reasons.`),_classPrivateFieldSet2(_disableProcessItems,this,!0);return}if(r.str===void 0){if(r.type===`beginMarkedContentProps`||r.type===`beginMarkedContent`){let e=_classPrivateFieldGet2(_container2,this);_classPrivateFieldSet2(_container2,this,document.createElement(`span`)),_classPrivateFieldGet2(_container2,this).classList.add(`markedContent`),r.id!==null&&_classPrivateFieldGet2(_container2,this).setAttribute(`id`,`${r.id}`),e.append(_classPrivateFieldGet2(_container2,this))}else r.type===`endMarkedContent`&&_classPrivateFieldSet2(_container2,this,_classPrivateFieldGet2(_container2,this).parentNode);continue}n.push(r.str),_assertClassBrand(_TextLayer_brand,this,_appendText).call(this,r)}}function _appendText(e){let t=document.createElement(`span`),n={angle:0,canvasWidth:0,hasText:e.str!==``,hasEOL:e.hasEOL,fontSize:0};_classPrivateFieldGet2(_textDivs,this).push(t);let r=Util.transform(_classPrivateFieldGet2(_transform,this),e.transform),i=Math.atan2(r[1],r[0]),a=_classPrivateFieldGet2(_styleCache,this)[e.fontName];a.vertical&&(i+=Math.PI/2);let o=_classPrivateFieldGet2(_fontInspectorEnabled,this)&&a.fontSubstitution||a.fontFamily;o=_TextLayer.fontFamilyMap.get(o)||o;let c=Math.hypot(r[2],r[3]),u=c*_getAscent.call(_TextLayer,o,_classPrivateFieldGet2(_lang,this)),K,Y;i===0?(K=r[4],Y=r[5]-u):(K=r[4]+u*Math.sin(i),Y=r[5]-u*Math.cos(i));let X=`calc(var(--scale-factor)*`,ee=t.style;_classPrivateFieldGet2(_container2,this)===_classPrivateFieldGet2(_rootContainer,this)?(ee.left=`${(100*K/_classPrivateFieldGet2(_pageWidth,this)).toFixed(2)}
71%`,ee.top=`${(100*Y/_classPrivateFieldGet2(_pageHeight,this)).toFixed(2)}%`):(ee.left=`${X}${K.toFixed(2)}px)`,ee.top=`${X}${Y.toFixed(2)}px)`),ee.fontSize=`${X}${(_minFontSize._*c).toFixed(2)}px)`,ee.fontFamily=o,n.fontSize=c,t.setAttribute(`role`,`presentation`),t.textContent=e.str,t.dir=e.dir,_classPrivateFieldGet2(_fontInspectorEnabled,this)&&(t.dataset.fontName=a.fontSubstitutionLoadedName||e.fontName),i!==0&&(n.angle=180/Math.PI*i);let te=!1;if(e.str.length>1)te=!0;else if(e.str!==` `&&e.transform[0]!==e.transform[3]){let t=Math.abs(e.transform[0]),n=Math.abs(e.transform[3]);t!==n&&Math.max(t,n)/Math.min(t,n)>1.5&&(te=!0)}if(te&&(n.canvasWidth=a.vertical?e.height:e.width),_classPrivateFieldGet2(_textDivProperties,this).set(t,n),_classPrivateFieldGet2(_layoutTextParams,this).div=t,_classPrivateFieldGet2(_layoutTextParams,this).properties=n,_assertClassBrand(_TextLayer_brand,this,_layout).call(this,_classPrivateFieldGet2(_layoutTextParams,this)),n.hasText&&_classPrivateFieldGet2(_container2,this).append(t),n.hasEOL){let e=document.createElement(`br`);e.setAttribute(`role`,`presentation`),_classPrivateFieldGet2(_container2,this).append(e)}}function _layout(e){let{div:t,properties:n,ctx:r}=e,{style:i}=t,a=``;if(_minFontSize._>1&&(a=`scale(${1/_minFontSize._})`),n.canvasWidth!==0&&n.hasText){let{fontFamily:e}=i,{canvasWidth:o,fontSize:c}=n;_ensureCtxFont.call(_TextLayer,r,c*_classPrivateFieldGet2(_scale,this),e);let{width:u}=r.measureText(t.textContent);u>0&&(a=`scaleX(${o*_classPrivateFieldGet2(_scale,this)/u}) ${a}`)}n.angle!==0&&(a=`rotate(${n.angle}deg) ${a}`),a.length>0&&(i.transform=a)}function _getCtx(e=null){let t=_assertClassBrand(_TextLayer,this,_canvasContexts)._.get(e||=``);if(!t){let n=document.createElement(`canvas`);n.className=`hiddenCanvasElement`,n.lang=e,document.body.append(n),t=n.getContext(`2d`,{alpha:!1,willReadFrequently:!0}),_assertClassBrand(_TextLayer,this,_canvasContexts)._.set(e,t),_assertClassBrand(_TextLayer,this,_canvasCtxFonts)._.set(t,{size:0,family:``})}return t}function _ensureCtxFont(e,t,n){let r=_assertClassBrand(_TextLayer,this,_canvasCtxFonts)._.get(e);(t!==r.size||n!==r.family)&&(e.font=`${t}px ${n}`,r.size=t,r.family=n)}function _ensureMinFontSizeComputed(){if(_assertClassBrand(_TextLayer,this,_minFontSize)._!==null)return;let e=document.createElement(`div`);e.style.opacity=0,e.style.lineHeight=1,e.style.fontSize=`1px`,e.style.position=`absolute`,e.textContent=`X`,document.body.append(e),_minFontSize._=_assertClassBrand(_TextLayer,this,e.getBoundingClientRect().height),e.remove()}function _getAscent(e,t){let n=_assertClassBrand(_TextLayer,this,_ascentCache)._.get(e);if(n)return n;let r=_assertClassBrand(_TextLayer,this,_getCtx).call(this,t);r.canvas.width=r.canvas.height=DEFAULT_FONT_SIZE,_assertClassBrand(_TextLayer,this,_ensureCtxFont).call(this,r,DEFAULT_FONT_SIZE,e);let i=r.measureText(``),a=i.fontBoundingBoxAscent,o=Math.abs(i.fontBoundingBoxDescent);if(a){let t=a/(a+o);return _assertClassBrand(_TextLayer,this,_ascentCache)._.set(e,t),r.canvas.width=r.canvas.height=0,t}r.strokeStyle=`red`,r.clearRect(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE),r.strokeText(`g`,0,0);let c=r.getImageData(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE).data;o=0;for(let e=c.length-1-3;e>=0;e-=4)if(c[e]>0){o=Math.ceil(e/4/DEFAULT_FONT_SIZE);break}r.clearRect(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE),r.strokeText(`A`,0,DEFAULT_FONT_SIZE),c=r.getImageData(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE).data,a=0;for(let e=0,t=c.length;e<t;e+=4)if(c[e]>0){a=DEFAULT_FONT_SIZE-Math.floor(e/4/DEFAULT_FONT_SIZE);break}r.canvas.width=r.canvas.height=0;let u=a?a/(a+o):DEFAULT_FONT_ASCENT;return _assertClassBrand(_TextLayer,this,_ascentCache)._.set(e,u),u}var _ascentCache={_:new Map},_canvasContexts={_:new Map},_canvasCtxFonts={_:new WeakMap},_minFontSize={_:null},_pendingTextLayers={_:new Set},XfaText=class e{static textContent(t){let n=[],r={items:n,styles:Object.create(null)};function i(t){if(!t)return;let r=null,a=t.name;if(a===`#text`)r=t.value;else if(e.shouldBuildText(a))t?.attributes?.textContent?r=t.attributes.textContent:t.value&&(r=t.value);else return;if(r!==null&&n.push({str:r}),t.children)for(let e of t.children)i(e)}return i(t),r}static shouldBuildText(e){return e!==`textarea`&&e!==`input`&&e!==`option`&&e!==`select`}},DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=isNodeJS?NodeCanvasFactory:DOMCanvasFactory,DefaultCMapReaderFactory=isNodeJS?NodeCMapReaderFactory:DOMCMapReaderFactory,DefaultFilterFactory=isNodeJS?NodeFilterFactory:DOMFilterFactory,DefaultStandardFontDataFactory=isNodeJS?NodeStandardFontDataFactory:DOMStandardFontDataFactory;function getDocument$1(e={}){typeof e==`string`||e instanceof URL?e={url:e}:(e instanceof ArrayBuffer||ArrayBuffer.isView(e))&&(e={data:e});let t=new PDFDocumentLoadingTask,{docId:n}=t,r=e.url?getUrlProp(e.url):null,i=e.data?getDataProp(e.data):null,a=e.httpHeaders||null,o=e.withCredentials===!0,c=e.password??null,u=e.range instanceof PDFDataRangeTransport$1?e.range:null,K=Number.isInteger(e.rangeChunkSize)&&e.rangeChunkSize>0?e.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE,Y=e.worker instanceof PDFWorker?e.worker:null,X=e.verbosity,ee=typeof e.docBaseUrl==`string`&&!isDataScheme(e.docBaseUrl)?e.docBaseUrl:null,te=typeof e.cMapUrl==`string`?e.cMapUrl:null,ce=e.cMapPacked!==!1,ue=e.CMapReaderFactory||DefaultCMapReaderFactory,de=typeof e.standardFontDataUrl==`string`?e.standardFontDataUrl:null,fe=e.StandardFontDataFactory||DefaultStandardFontDataFactory,me=e.stopAtErrors!==!0,ge=Number.isInteger(e.maxImageSize)&&e.maxImageSize>-1?e.maxImageSize:-1,Te=e.isEvalSupported!==!1,Oe=typeof e.isOffscreenCanvasSupported==`boolean`?e.isOffscreenCanvasSupported:!isNodeJS,Ae=typeof e.isChrome==`boolean`?e.isChrome:!util_FeatureTest.platform.isFirefox&&typeof window<`u`&&!!window?.chrome,ze=Number.isInteger(e.canvasMaxAreaInBytes)?e.canvasMaxAreaInBytes:-1,qe=typeof e.disableFontFace==`boolean`?e.disableFontFace:isNodeJS,Ye=e.fontExtraProperties===!0,Ze=e.enableXfa===!0,Qe=e.ownerDocument||globalThis.document,et=e.disableRange===!0,nt=e.disableStream===!0,rt=e.disableAutoFetch===!0,it=e.pdfBug===!0,at=e.CanvasFactory||DefaultCanvasFactory,ot=e.FilterFactory||DefaultFilterFactory,st=e.enableHWA===!0,ct=u?u.length:e.length??NaN,lt=typeof e.useSystemFonts==`boolean`?e.useSystemFonts:!isNodeJS&&!qe,ut=typeof e.useWorkerFetch==`boolean`?e.useWorkerFetch:ue===DOMCMapReaderFactory&&fe===DOMStandardFontDataFactory&&te&&de&&isValidFetchUrl(te,document.baseURI)&&isValidFetchUrl(de,document.baseURI);e.canvasFactory&&deprecated("`canvasFactory`-instance option, please use `CanvasFactory` instead."),e.filterFactory&&deprecated("`filterFactory`-instance option, please use `FilterFactory` instead.");let dt=null;setVerbosityLevel(X);let ft={canvasFactory:new at({ownerDocument:Qe,enableHWA:st}),filterFactory:new ot({docId:n,ownerDocument:Qe}),cMapReaderFactory:ut?null:new ue({baseUrl:te,isCompressed:ce}),standardFontDataFactory:ut?null:new fe({baseUrl:de})};if(!Y){let e={verbosity:X,port:GlobalWorkerOptions.workerPort};Y=e.port?PDFWorker.fromPort(e):new PDFWorker(e),t._worker=Y}let pt={docId:n,apiVersion:`4.8.69`,data:i,password:c,disableAutoFetch:rt,rangeChunkSize:K,length:ct,docBaseUrl:ee,enableXfa:Ze,evaluatorOptions:{maxImageSize:ge,disableFontFace:qe,ignoreErrors:me,isEvalSupported:Te,isOffscreenCanvasSupported:Oe,isChrome:Ae,canvasMaxAreaInBytes:ze,fontExtraProperties:Ye,useSystemFonts:lt,cMapUrl:ut?te:null,standardFontDataUrl:ut?de:null}}
71,mt={disableFontFace:qe,fontExtraProperties:Ye,ownerDocument:Qe,pdfBug:it,styleElement:null,loadingParams:{disableAutoFetch:rt,enableXfa:Ze}};return Y.promise.then(function(){if(t.destroyed)throw Error(`Loading aborted`);if(Y.destroyed)throw Error(`Worker was destroyed`);let e=Y.messageHandler.sendWithPromise(`GetDocRequest`,pt,i?[i.buffer]:null),c;if(u)c=new PDFDataTransportStream(u,{disableRange:et,disableStream:nt});else if(!i){if(!r)throw Error("getDocument - no `url` parameter provided.");let e;e=isNodeJS?typeof fetch<`u`&&typeof Response<`u`&&`body`in Response.prototype&&isValidFetchUrl(r)?PDFFetchStream:PDFNodeStream:isValidFetchUrl(r)?PDFFetchStream:PDFNetworkStream,c=new e({url:r,length:ct,httpHeaders:a,withCredentials:o,rangeChunkSize:K,disableRange:et,disableStream:nt})}return e.then(e=>{if(t.destroyed)throw Error(`Loading aborted`);if(Y.destroyed)throw Error(`Worker was destroyed`);let r=new MessageHandler(n,e,Y.port),i=new WorkerTransport(r,t,c,mt,ft);t._transport=i,r.send(`Ready`,null)})}).catch(t._capability.reject),t}function getUrlProp(e){if(e instanceof URL)return e.href;try{return new URL(e,window.location).href}catch{if(isNodeJS&&typeof e==`string`)return e}throw Error(`Invalid PDF url data: either string or URL-object is expected in the url property.`)}function getDataProp(e){if(isNodeJS&&typeof Buffer<`u`&&e instanceof Buffer)throw Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength)return e;if(typeof e==`string`)return stringToBytes(e);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)||typeof e==`object`&&!isNaN(e?.length))return new Uint8Array(e);throw Error(`Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.`)}function isRefProxy(e){return typeof e==`object`&&Number.isInteger(e?.num)&&e.num>=0&&Number.isInteger(e?.gen)&&e.gen>=0}var PDFDocumentLoadingTask=class{constructor(){var e,t;this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId=`d${_docId2._=(e=_docId2._,t=e++,e),t}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await this._transport?.destroy()}catch(e){throw this._worker?.port&&delete this._worker._pendingDestroy,e}this._transport=null,this._worker&&=(this._worker.destroy(),null)}},_docId2={_:0},PDFDataRangeTransport$1=class{constructor(e,t,n=!1,r=null){this.length=e,this.initialData=t,this.progressiveDone=n,this.contentDispositionFilename=r,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(let n of this._rangeListeners)n(e,t)}onDataProgress(e,t){this._readyCapability.promise.then(()=>{for(let n of this._progressListeners)n(e,t)})}onDataProgressiveRead(e){this._readyCapability.promise.then(()=>{for(let t of this._progressiveReadListeners)t(e)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(let e of this._progressiveDoneListeners)e()})}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){unreachable$1(`Abstract method PDFDataRangeTransport.requestDataRange`)}abort(){}},PDFDocumentProxy=class{constructor(e,t){this._pdfInfo=e,this._transport=t}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return shadow(this,`isPureXfa`,!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}
71getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:e=`display`}={}){let{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getOptionalContentConfig(t)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e){return this._transport.cachedPageNumber(e)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}},_delayedCleanupTimeout=new WeakMap,_pendingCleanup=new WeakMap,_PDFPageProxy_brand=new WeakSet,PDFPageProxy=class{constructor(e,t,n,r=!1){_classPrivateMethodInitSpec(this,_PDFPageProxy_brand),_classPrivateFieldInitSpec(this,_delayedCleanupTimeout,null),_classPrivateFieldInitSpec(this,_pendingCleanup,!1),this._pageIndex=e,this._pageInfo=t,this._transport=n,this._stats=r?new StatTimer:null,this._pdfBug=r,this.commonObjs=n.commonObjs,this.objs=new PDFObjects,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:t=this.rotate,offsetX:n=0,offsetY:r=0,dontFlip:i=!1}={}){return new PageViewport({viewBox:this.view,scale:e,rotation:t,offsetX:n,offsetY:r,dontFlip:i})}getAnnotations({intent:e=`display`}={}){let{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return shadow(this,`isPureXfa`,!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:e,viewport:t,intent:n=`display`,annotationMode:r=AnnotationMode.ENABLE,transform:i=null,background:a=null,optionalContentConfigPromise:o=null,annotationCanvasMap:c=null,pageColors:u=null,printAnnotationStorage:K=null,isEditing:Y=!1}){this._stats?.time(`Overall`);let X=this._transport.getRenderingIntent(n,r,K,Y),{renderingIntent:ee,cacheKey:te}=X;_classPrivateFieldSet2(_pendingCleanup,this,!1),_assertClassBrand(_PDFPageProxy_brand,this,_abortDelayedCleanup).call(this),o||=this._transport.getOptionalContentConfig(ee);let ce=this._intentStates.get(te);ce||(ce=Object.create(null),this._intentStates.set(te,ce)),ce.streamReaderCancelTimeout&&(clearTimeout(ce.streamReaderCancelTimeout),ce.streamReaderCancelTimeout=null);let ue=!!(ee&RenderingIntentFlag.PRINT);ce.displayReadyCapability||(ce.displayReadyCapability=Promise.withResolvers(),ce.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time(`Page Request`),this._pumpOperatorList(X));let de=e=>{ce.renderTasks.delete(fe),(this._maybeCleanupAfterRender||ue)&&_classPrivateFieldSet2(_pendingCleanup,this,!0),_assertClassBrand(_PDFPageProxy_brand,this,_tryCleanup).call(this,!ue),e?(fe.capability.reject(e),this._abortOperatorList({intentState:ce,reason:e instanceof Error?e:Error(e)})):fe.capability.resolve(),this._stats&&(this._stats.timeEnd(`Rendering`),this._stats.timeEnd(`Overall`),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats)
71)},fe=new InternalRenderTask({callback:de,params:{canvasContext:e,viewport:t,transform:i,background:a},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:c,operatorList:ce.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!ue,pdfBug:this._pdfBug,pageColors:u});(ce.renderTasks||=new Set).add(fe);let me=fe.task;return Promise.all([ce.displayReadyCapability.promise,o]).then(([e,t])=>{if(this.destroyed){de();return}if(this._stats?.time(`Rendering`),!(t.renderingIntent&ee))throw Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");fe.initializeGraphics({transparency:e,optionalContentConfig:t}),fe.operatorListChanged()}).catch(de),me}getOperatorList({intent:e=`display`,annotationMode:t=AnnotationMode.ENABLE,printAnnotationStorage:n=null,isEditing:r=!1}={}){function i(){o.operatorList.lastChunk&&(o.opListReadCapability.resolve(o.operatorList),o.renderTasks.delete(c))}let a=this._transport.getRenderingIntent(e,t,n,r,!0),o=this._intentStates.get(a.cacheKey);o||(o=Object.create(null),this._intentStates.set(a.cacheKey,o));let c;return o.opListReadCapability||(c=Object.create(null),c.operatorListChanged=i,o.opListReadCapability=Promise.withResolvers(),(o.renderTasks||=new Set).add(c),o.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time(`Page Request`),this._pumpOperatorList(a)),o.opListReadCapability.promise}streamTextContent({includeMarkedContent:e=!1,disableNormalization:t=!1}={}){return this._transport.messageHandler.sendWithStream(`GetTextContent`,{pageIndex:this._pageIndex,includeMarkedContent:e===!0,disableNormalization:t===!0},{highWaterMark:100,size(e){return e.items.length}})}getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then(e=>XfaText.textContent(e));let t=this.streamTextContent(e);return new Promise(function(e,n){function r(){i.read().then(function({value:t,done:n}){if(n){e(a);return}a.lang??=t.lang,Object.assign(a.styles,t.styles),a.items.push(...t.items),r()},n)}let i=t.getReader(),a={items:[],styles:Object.create(null),lang:null};r()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;let e=[];for(let t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:Error(`Page was destroyed.`),force:!0}),!t.opListReadCapability)for(let n of t.renderTasks)e.push(n.completed),n.cancel();return this.objs.clear(),_classPrivateFieldSet2(_pendingCleanup,this,!1),_assertClassBrand(_PDFPageProxy_brand,this,_abortDelayedCleanup).call(this),Promise.all(e)}cleanup(e=!1){_classPrivateFieldSet2(_pendingCleanup,this,!0);let t=_assertClassBrand(_PDFPageProxy_brand,this,_tryCleanup).call(this,!1);return e&&t&&(this._stats&&=new StatTimer),t}_startRenderPage(e,t){let n=this._intentStates.get(t);n&&(this._stats?.timeEnd(`Page Request`),n.displayReadyCapability?.resolve(e))}_renderPageChunk(e,t){for(let n=0,r=e.length;n<r;n++)t.operatorList.fnArray.push(e.fnArray[n]),t.operatorList.argsArray.push(e.argsArray[n]);t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots;for(let e of t.renderTasks)e.operatorListChanged();e.lastChunk&&_assertClassBrand(_PDFPageProxy_brand,this,_tryCleanup).call(this,!0)}_pumpOperatorList({renderingIntent:e,cacheKey:t,annotationStorageSerializable:n,modifiedIds:r}){let{map:i,transfer:a}=n,o=this._transport.messageHandler.sendWithStream(`GetOperatorList`,{pageIndex:this._pageIndex,intent:e,cacheKey:t,annotationStorage:i,modifiedIds:r},a).getReader(),c=this._intentStates.get(t);c.streamReader=o;let u=()=>{o.read().then(({value:e,done:t})=>{if(t){c.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(e,c),u())},e=>{if(c.streamReader=null,!this._transport.destroyed){if(c.operatorList){c.operatorList.lastChunk=!0;for(let e of c.renderTasks)e.operatorListChanged();_assertClassBrand(_PDFPageProxy_brand,this,_tryCleanup).call(this,!0)}if(c.displayReadyCapability)c.displayReadyCapability.reject(e);else if(c.opListReadCapability)c.opListReadCapability.reject(e);else throw e}})};u()}_abortOperatorList({intentState:e,reason:t,force:n=!1}){if(e.streamReader){if(e.streamReaderCancelTimeout&&=(clearTimeout(e.streamReaderCancelTimeout),null),!n){if(e.renderTasks.size>0)return;if(t instanceof RenderingCancelledException){let n=RENDERING_CANCELLED_TIMEOUT;t.extraDelay>0&&t.extraDelay<1e3&&(n+=t.extraDelay),e.streamReaderCancelTimeout=setTimeout(()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:t,force:!0})},n);return}}if(e.streamReader.cancel(new AbortException(t.message)).catch(()=>{}),e.streamReader=null,!this._transport.destroyed){for(let[t,n]of this._intentStates)if(n===e){this._intentStates.delete(t);break}this.cleanup()}}}get stats(){return this._stats}};function _tryCleanup(e=!1){if(_assertClassBrand(_PDFPageProxy_brand,this,_abortDelayedCleanup).call(this),!_classPrivateFieldGet2(_pendingCleanup,this)||this.destroyed)return!1;if(e)return _classPrivateFieldSet2(_delayedCleanupTimeout,this,setTimeout(()=>{_classPrivateFieldSet2(_delayedCleanupTimeout,this,null),_assertClassBrand(_PDFPageProxy_brand,this,_tryCleanup).call(this,!1)},DELAYED_CLEANUP_TIMEOUT)),!1;for(let{renderTasks:e,operatorList:t}of this._intentStates.values())if(e.size>0||!t.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),_classPrivateFieldSet2(_pendingCleanup,this,!1),!0}function _abortDelayedCleanup(){_classPrivateFieldGet2(_delayedCleanupTimeout,this)&&(clearTimeout(_classPrivateFieldGet2(_delayedCleanupTimeout,this)),_classPrivateFieldSet2(_delayedCleanupTimeout,this,null))}var _listeners=new WeakMap,_deferred=new WeakMap,LoopbackPort=class{constructor(){_classPrivateFieldInitSpec(this,_listeners,new Map),_classPrivateFieldInitSpec(this,_deferred,Promise.resolve())}postMessage(e,t){let n={data:structuredClone(e,t?{transfer:t}:null)};_classPrivateFieldGet2(_deferred,this).then(()=>{for(let[e]of _classPrivateFieldGet2(_listeners,this))e.call(this,n)})}addEventListener(e,t,n=null){let r=null;if(n?.signal instanceof AbortSignal){let{signal:i}=n;if(i.aborted){warn("LoopbackPort - cannot use an `aborted` signal.");return}let a=()=>this.removeEventListener(e,t);r=()=>i.removeEventListener(`abort`,a),i.addEventListener(`abort`,a)}_classPrivateFieldGet2(_listeners,this).set(t,r)}removeEventListener(e,t){_classPrivateFieldGet2(_listeners,this).get(t)?.(),_classPrivateFieldGet2(_listeners,this).delete(t)}terminate(){for(let[,e]of _classPrivateFieldGet2(_listeners,this))e?.();
71_classPrivateFieldGet2(_listeners,this).clear()}},_PDFWorker_brand=new WeakSet,PDFWorker=class e{constructor({name:e=null,port:t=null,verbosity:n=getVerbosityLevel()}={}){if(_classPrivateMethodInitSpec(this,_PDFWorker_brand),this.name=e,this.destroyed=!1,this.verbosity=n,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,t){if(_workerPorts._?.has(t))throw Error(`Cannot use more than one PDFWorker per port.`);(_workerPorts._||=new WeakMap).set(t,this),this._initializeFromPort(t);return}this._initialize()}get promise(){return isNodeJS?Promise.all([NodePackages.promise,this._readyCapability.promise]):this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new MessageHandler(`main`,`worker`,e),this._messageHandler.on(`ready`,function(){}),_assertClassBrand(_PDFWorker_brand,this,_resolve).call(this)}_initialize(){if(_isWorkerDisabled._||_get_mainThreadWorkerMessageHandler.call(e)){this._setupFakeWorker();return}let{workerSrc:t}=e;try{e._isSameOrigin(window.location.href,t)||(t=e._createCDNWrapper(new URL(t,window.location).href));let n=new Worker(t,{type:`module`}),r=new MessageHandler(`main`,`worker`,n),i=()=>{a.abort(),r.destroy(),n.terminate(),this.destroyed?this._readyCapability.reject(Error(`Worker was destroyed`)):this._setupFakeWorker()},a=new AbortController;n.addEventListener(`error`,()=>{this._webWorker||i()},{signal:a.signal}),r.on(`test`,e=>{if(a.abort(),this.destroyed||!e){i();return}this._messageHandler=r,this._port=n,this._webWorker=n,_assertClassBrand(_PDFWorker_brand,this,_resolve).call(this)}),r.on(`ready`,e=>{if(a.abort(),this.destroyed){i();return}try{o()}catch{this._setupFakeWorker()}});let o=()=>{let e=new Uint8Array;r.send(`test`,e,[e.buffer])};o();return}catch{info(`The worker has been disabled.`)}this._setupFakeWorker()}_setupFakeWorker(){_isWorkerDisabled._||=(warn(`Setting up fake worker.`),!0),e._setupFakeWorkerGlobal.then(e=>{var t,n;if(this.destroyed){this._readyCapability.reject(Error(`Worker was destroyed`));return}let r=new LoopbackPort;this._port=r;let i=`fake${_fakeWorkerId._=(t=_fakeWorkerId._,n=t++,t),n}`,a=new MessageHandler(i+`_worker`,i,r);e.setup(a,r),this._messageHandler=new MessageHandler(i,i+`_worker`,r),_assertClassBrand(_PDFWorker_brand,this,_resolve).call(this)}).catch(e=>{this._readyCapability.reject(Error(`Setting up fake worker failed: "${e.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&=(this._webWorker.terminate(),null),_workerPorts._?.delete(this._port),this._port=null,this._messageHandler&&=(this._messageHandler.destroy(),null)}static fromPort(t){if(!t?.port)throw Error(`PDFWorker.fromPort - invalid method signature.`);let n=_assertClassBrand(e,this,_workerPorts)._?.get(t.port);if(n){if(n._pendingDestroy)throw Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return n}return new e(t)}static get workerSrc(){if(GlobalWorkerOptions.workerSrc)return GlobalWorkerOptions.workerSrc;throw Error(`No "GlobalWorkerOptions.workerSrc" specified.`)}static get _setupFakeWorkerGlobal(){return shadow(this,`_setupFakeWorkerGlobal`,(async()=>_get_mainThreadWorkerMessageHandler.call(_assertClassBrand(e,this))?_get_mainThreadWorkerMessageHandler.call(_assertClassBrand(e,this)):(await __vitePreload(()=>import(this.workerSrc),[])).WorkerMessageHandler)())}};_PDFWorker=PDFWorker;function _resolve(){this._readyCapability.resolve(),this._messageHandler.send(`configure`,{verbosity:this.verbosity})}function _get_mainThreadWorkerMessageHandler(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}var _fakeWorkerId={_:0},_isWorkerDisabled={_:!1},_workerPorts={_:void 0};isNodeJS&&(_isWorkerDisabled._=_assertClassBrand(_PDFWorker,_PDFWorker,!0),GlobalWorkerOptions.workerSrc||=`./pdf.worker.mjs`),_PDFWorker._isSameOrigin=(e,t)=>{let n;try{if(n=new URL(e),!n.origin||n.origin===`null`)return!1}catch{return!1}let r=new URL(t,n);return n.origin===r.origin},_PDFWorker._createCDNWrapper=e=>{let t=`await import("${e}");`;return URL.createObjectURL(new Blob([t],{type:`text/javascript`}))};var _methodPromises=new WeakMap,_pageCache=new WeakMap,_pagePromises=new WeakMap,_pageRefCac
71he=new WeakMap,_passwordCapability=new WeakMap,_WorkerTransport_brand=new WeakSet,WorkerTransport=class{constructor(e,t,n,r,i){_classPrivateMethodInitSpec(this,_WorkerTransport_brand),_classPrivateFieldInitSpec(this,_methodPromises,new Map),_classPrivateFieldInitSpec(this,_pageCache,new Map),_classPrivateFieldInitSpec(this,_pagePromises,new Map),_classPrivateFieldInitSpec(this,_pageRefCache,new Map),_classPrivateFieldInitSpec(this,_passwordCapability,null),this.messageHandler=e,this.loadingTask=t,this.commonObjs=new PDFObjects,this.fontLoader=new FontLoader({ownerDocument:r.ownerDocument,styleElement:r.styleElement}),this.loadingParams=r.loadingParams,this._params=r,this.canvasFactory=i.canvasFactory,this.filterFactory=i.filterFactory,this.cMapReaderFactory=i.cMapReaderFactory,this.standardFontDataFactory=i.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return shadow(this,`annotationStorage`,new AnnotationStorage)}getRenderingIntent(e,t=AnnotationMode.ENABLE,n=null,r=!1,i=!1){let a=RenderingIntentFlag.DISPLAY,o=SerializableEmpty;switch(e){case`any`:a=RenderingIntentFlag.ANY;break;case`display`:break;case`print`:a=RenderingIntentFlag.PRINT;break;default:warn(`getRenderingIntent - invalid intent: ${e}`)}let c=a&RenderingIntentFlag.PRINT&&n instanceof PrintAnnotationStorage?n:this.annotationStorage;switch(t){case AnnotationMode.DISABLE:a+=RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case AnnotationMode.ENABLE:break;case AnnotationMode.ENABLE_FORMS:a+=RenderingIntentFlag.ANNOTATIONS_FORMS;break;case AnnotationMode.ENABLE_STORAGE:a+=RenderingIntentFlag.ANNOTATIONS_STORAGE,o=c.serializable;break;default:warn(`getRenderingIntent - invalid annotationMode: ${t}`)}r&&(a+=RenderingIntentFlag.IS_EDITING),i&&(a+=RenderingIntentFlag.OPLIST);let{ids:u,hash:K}=c.modifiedIds,Y=[a,o.hash,K];return{renderingIntent:a,cacheKey:Y.join(`_`),annotationStorageSerializable:o,modifiedIds:u}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),_classPrivateFieldGet2(_passwordCapability,this)?.reject(Error(`Worker was destroyed during onPassword callback`));let e=[];for(let t of _classPrivateFieldGet2(_pageCache,this).values())e.push(t._destroy());_classPrivateFieldGet2(_pageCache,this).clear(),_classPrivateFieldGet2(_pagePromises,this).clear(),_classPrivateFieldGet2(_pageRefCache,this).clear(),this.hasOwnProperty(`annotationStorage`)&&this.annotationStorage.resetModified();let t=this.messageHandler.sendWithPromise(`Terminate`,null);return e.push(t),Promise.all(e).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),_classPrivateFieldGet2(_methodPromises,this).clear(),this.filterFactory.destroy(),TextLayer$1.cleanup(),this._networkStream?.cancelAllRequests(new AbortException(`Worker was terminated.`)),this.messageHandler&&=(this.messageHandler.destroy(),null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){let{messageHandler:e,loadingTask:t}=this;e.on(`GetReader`,(e,t)=>{assert(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then(function({value:e,done:n}){if(n){t.close();return}assert(e instanceof ArrayBuffer,`GetReader - expected an ArrayBuffer.`),t.enqueue(new Uint8Array(e),1,[e])}).catch(e=>{t.error(e)})},t.onCancel=e=>{this._fullReader.cancel(e),t.ready.catch(e=>{if(!this.destroyed)throw e})}}),e.on(`ReaderHeadersReady`,async e=>{await this._fullReader.headersReady;let{isStreamingSupported:n,isRangeSupported:r,contentLength:i}=this._fullReader;return(!n||!r)&&(this._lastProgress&&t.onProgress?.(this._lastProgress),this._fullReader.onProgress=e=>{t.onProgress?.({loaded:e.loaded,total:e.total})}),{isStreamingSupported:n,isRangeSupported:r,contentLength:i}}),e.on(`GetRangeReader`,(e,t)=>{assert(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");let n=this._networkStream.getRangeReader(e.begin,e.end);if(!n){t.close();return}t.onPull=()=>{n.read().then(function({value:e,done:n}){if(n){t.close();return}assert(e instanceof ArrayBuffer,`GetRangeReader - expected an ArrayBuffer.`),t.enqueue(new Uint8Array(e),1,[e])}).catch(e=>{t.error(e)})},t.onCancel=e=>{n.cancel(e),t.ready.catch(e=>{if(!this.destroyed)throw e})}}),e.on(`GetDoc`,({pdfInfo:e})=>{this._numPages=e.numPages,this._htmlForXfa=e.htmlForXfa,delete e.htmlForXfa,t._capability.resolve(new PDFDocumentProxy(e,this))}),e.on(`DocException`,function(e){let n;switch(e.name){case`PasswordException`:n=new PasswordException(e.message,e.code);break;case`InvalidPDFException`:n=new InvalidPDFException(e.message);break;case`MissingPDFException`:n=new MissingPDFException(e.message);break;case`UnexpectedResponseException`:n=new UnexpectedResponseException(e.message,e.status);break;case`UnknownErrorException`:n=new UnknownErrorException(e.message,e.details);break;default:unreachable$1(`DocException - expected a valid Error.`)}t._capability.reject(n)}),e.on(`PasswordRequest`,e=>{if(_classPrivateFieldSet2(_passwordCapability,this,Promise.withResolvers()),t.onPassword){let n=e=>{e instanceof Error?_classPrivateFieldGet2(_passwordCapability,this).reject(e):_classPrivateFieldGet2(_passwordCapability,this).resolve({password:e})};try{t.onPassword(n,e.code)}catch(e){_classPrivateFieldGet2(_passwordCapability,this).reject(e)}}else _classPrivateFieldGet2(_passwordCapability,this).reject(new PasswordException(e.message,e.code));return _classPrivateFieldGet2(_passwordCapability,this).promise}),e.on(`DataLoaded`,e=>{t.onProgress?.({loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)}),e.on(`StartRenderPage`,e=>{this.destroyed||_classPrivateFieldGet2(_pageCache,this).get(e.pageIndex)._startRenderPage(e.transparency,e.cacheKey)}),e.on(`commonobj`,([t,n,r])=>
71{if(this.destroyed||this.commonObjs.has(t))return null;switch(n){case`Font`:let{disableFontFace:i,fontExtraProperties:a,pdfBug:o}=this._params;if(`error`in r){let e=r.error;warn(`Error during font loading: ${e}`),this.commonObjs.resolve(t,e);break}let c=new FontFaceObject(r,{disableFontFace:i,inspectFont:o&&globalThis.FontInspector?.enabled?(e,t)=>globalThis.FontInspector.fontAdded(e,t):null});this.fontLoader.bind(c).catch(()=>e.sendWithPromise(`FontFallback`,{id:t})).finally(()=>{!a&&c.data&&(c.data=null),this.commonObjs.resolve(t,c)});break;case`CopyLocalImage`:let{imageRef:u}=r;assert(u,`The imageRef must be defined.`);for(let e of _classPrivateFieldGet2(_pageCache,this).values())for(let[,n]of e.objs)if(n?.ref===u)return n.dataLen?(this.commonObjs.resolve(t,structuredClone(n)),n.dataLen):null;break;case`FontPath`:case`Image`:case`Pattern`:this.commonObjs.resolve(t,r);break;default:throw Error(`Got unknown common object type ${n}`)}return null}),e.on(`obj`,([e,t,n,r])=>{if(this.destroyed)return;let i=_classPrivateFieldGet2(_pageCache,this).get(t);if(!i.objs.has(e)){if(i._intentStates.size===0){r?.bitmap?.close();return}switch(n){case`Image`:i.objs.resolve(e,r),r?.dataLen>MAX_IMAGE_SIZE_TO_CACHE&&(i._maybeCleanupAfterRender=!0);break;case`Pattern`:i.objs.resolve(e,r);break;default:throw Error(`Got unknown object type ${n}`)}}}),e.on(`DocProgress`,e=>{this.destroyed||t.onProgress?.({loaded:e.loaded,total:e.total})}),e.on(`FetchBuiltInCMap`,async e=>{if(this.destroyed)throw Error(`Worker was destroyed.`);if(!this.cMapReaderFactory)throw Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.");return this.cMapReaderFactory.fetch(e)}),e.on(`FetchStandardFontData`,async e=>{if(this.destroyed)throw Error(`Worker was destroyed.`);if(!this.standardFontDataFactory)throw Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.");return this.standardFontDataFactory.fetch(e)})}getData(){return this.messageHandler.sendWithPromise(`GetData`,null)}saveDocument(){this.annotationStorage.size<=0&&warn("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");let{map:e,transfer:t}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise(`SaveDocument`,{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:this._fullReader?.filename??null},t).finally(()=>{this.annotationStorage.resetModified()})}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(Error(`Invalid page request.`));let t=e-1,n=_classPrivateFieldGet2(_pagePromises,this).get(t);if(n)return n;let r=this.messageHandler.sendWithPromise(`GetPage`,{pageIndex:t}).then(n=>{if(this.destroyed)throw Error(`Transport destroyed`);n.refStr&&_classPrivateFieldGet2(_pageRefCache,this).set(n.refStr,e);let r=new PDFPageProxy(t,n,this,this._params.pdfBug);return _classPrivateFieldGet2(_pageCache,this).set(t,r),r});return _classPrivateFieldGet2(_pagePromises,this).set(t,r),r}getPageIndex(e){return isRefProxy(e)?this.messageHandler.sendWithPromise(`GetPageIndex`,{num:e.num,gen:e.gen}):Promise.reject(Error(`Invalid pageIndex request.`))}getAnnotations(e,t){return this.messageHandler.sendWithPromise(`GetAnnotations`,{pageIndex:e,intent:t})}getFieldObjects(){return _assertClassBrand(_WorkerTransport_brand,this,_cacheSimpleMethod).call(this,`GetFieldObjects`)}hasJSActions(){return _assertClassBrand(_WorkerTransport_brand,this,_cacheSimpleMethod).call(this,`HasJSActions`)}getCalculationOrderIds(){return this.messageHandler.sendWithPromise(`GetCalculationOrderIds`,null)}getDestinations(){return this.messageHandler.sendWithPromise(`GetDestinations`,null)}getDestination(e){return typeof e==`string`?this.messageHandler.sendWithPromise(`GetDestination`,{id:e}):Promise.reject(Error(`Invalid destination request.`))}getPageLabels(){return this.messageHandler.sendWithPromise(`GetPageLabels`,null)}getPageLayout(){return this.messageHandler.sendWithPromise(`GetPageLayout`,null)}getPageMode(){return this.messageHandler.sendWithPromise(`GetPageMode`,null)}
71getViewerPreferences(){return this.messageHandler.sendWithPromise(`GetViewerPreferences`,null)}getOpenAction(){return this.messageHandler.sendWithPromise(`GetOpenAction`,null)}getAttachments(){return this.messageHandler.sendWithPromise(`GetAttachments`,null)}getDocJSActions(){return _assertClassBrand(_WorkerTransport_brand,this,_cacheSimpleMethod).call(this,`GetDocJSActions`)}getPageJSActions(e){return this.messageHandler.sendWithPromise(`GetPageJSActions`,{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise(`GetStructTree`,{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise(`GetOutline`,null)}getOptionalContentConfig(e){return _assertClassBrand(_WorkerTransport_brand,this,_cacheSimpleMethod).call(this,`GetOptionalContentConfig`).then(t=>new OptionalContentConfig(t,e))}getPermissions(){return this.messageHandler.sendWithPromise(`GetPermissions`,null)}getMetadata(){let e=`GetMetadata`,t=_classPrivateFieldGet2(_methodPromises,this).get(e);if(t)return t;let n=this.messageHandler.sendWithPromise(e,null).then(e=>({info:e[0],metadata:e[1]?new Metadata(e[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return _classPrivateFieldGet2(_methodPromises,this).set(e,n),n}getMarkInfo(){return this.messageHandler.sendWithPromise(`GetMarkInfo`,null)}async startCleanup(e=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise(`Cleanup`,null);for(let e of _classPrivateFieldGet2(_pageCache,this).values())if(!e.cleanup())throw Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`);this.commonObjs.clear(),e||this.fontLoader.clear(),_classPrivateFieldGet2(_methodPromises,this).clear(),this.filterFactory.destroy(!0),TextLayer$1.cleanup()}}cachedPageNumber(e){if(!isRefProxy(e))return null;let t=e.gen===0?`${e.num}R`:`${e.num}R${e.gen}`;return _classPrivateFieldGet2(_pageRefCache,this).get(t)??null}};function _cacheSimpleMethod(e,t=null){let n=_classPrivateFieldGet2(_methodPromises,this).get(e);if(n)return n;let r=this.messageHandler.sendWithPromise(e,t);return _classPrivateFieldGet2(_methodPromises,this).set(e,r),r}var INITIAL_DATA=Symbol(`INITIAL_DATA`),_objs=new WeakMap,_PDFObjects_brand=new WeakSet;_Symbol$iterator=Symbol.iterator;var PDFObjects=class{constructor(){_classPrivateMethodInitSpec(this,_PDFObjects_brand),_classPrivateFieldInitSpec(this,_objs,Object.create(null))}get(e,t=null){if(t){let n=_assertClassBrand(_PDFObjects_brand,this,_ensureObj).call(this,e);return n.promise.then(()=>t(n.data)),null}let n=_classPrivateFieldGet2(_objs,this)[e];if(!n||n.data===INITIAL_DATA)throw Error(`Requesting object that isn't resolved yet ${e}.`);return n.data}has(e){let t=_classPrivateFieldGet2(_objs,this)[e];return!!t&&t.data!==INITIAL_DATA}resolve(e,t=null){let n=_assertClassBrand(_PDFObjects_brand,this,_ensureObj).call(this,e);n.data=t,n.resolve()}clear(){for(let e in _classPrivateFieldGet2(_objs,this)){let{data:t}=_classPrivateFieldGet2(_objs,this)[e];t?.bitmap?.close()}_classPrivateFieldSet2(_objs,this,Object.create(null))}*[_Symbol$iterator](){for(let e in _classPrivateFieldGet2(_objs,this)){let{data:t}=_classPrivateFieldGet2(_objs,this)[e];t!==INITIAL_DATA&&(yield[e,t])}}};function _ensureObj(e){return _classPrivateFieldGet2(_objs,this)[e]||={...Promise.withResolvers(),data:INITIAL_DATA}}var _internalRenderTask=new WeakMap,RenderTask=class{constructor(e){_classPrivateFieldInitSpec(this,_internalRenderTask,null),_classPrivateFieldSet2(_internalRenderTask,this,e),this.onContinue=null}get promise(){return _classPrivateFieldGet2(_internalRenderTask,this).capability.promise}cancel(e=0){_classPrivateFieldGet2(_internalRenderTask,this).cancel(null,e)}get separateAnnots(){let{separateAnnots:e}=_classPrivateFieldGet2(_internalRenderTask,this).operatorList;if(!e)return!1;let{annotationCanvasMap:t}=_classPrivateFieldGet2(_internalRenderTask,this);return e.form||e.canvas&&t?.size>0}},_rAF=new WeakMap,InternalRenderTask=class{constructor({callback:e,params:t,objs:n,commonObjs:r,annotationCanvasMap:i,operatorList:a,pageIndex:o,canvasFactory:c,filterFactory:u,useRequestAnimationFrame:K=!1,pdfBug:Y=!1,pageColors:X=null}){_classPrivateFieldInitSpec(this,_rAF,null),this.callback=e,this.params=t,this.objs=n,this.commonObjs=r,this.annotationCanvasMap=i,this.operatorListIdx=null,this.operatorList=a,this._pageIndex=o,this.canvasFactory=c,this.filterFactory=u,this._pdfBug=Y,this.pageColors=X,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=K===!0&&typeof window<`u`,this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:e=!1,optionalContentConfig:t}){if(this.cancelled)return;
71if(this._canvas){if(_canvasInUse._.has(this._canvas))throw Error(`Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.`);_canvasInUse._.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());let{canvasContext:n,viewport:r,transform:i,background:a}=this.params;this.gfx=new CanvasGraphics(n,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:t},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:i,viewport:r,transparency:e,background:a}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(e=null,t=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),_classPrivateFieldGet2(_rAF,this)&&(window.cancelAnimationFrame(_classPrivateFieldGet2(_rAF,this)),_classPrivateFieldSet2(_rAF,this,null)),_canvasInUse._.delete(this._canvas),this.callback(e||new RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,t))}operatorListChanged(){if(!this.graphicsReady){this.graphicsReadyCallback||=this._continueBound;return}this.stepper?.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?_classPrivateFieldSet2(_rAF,this,window.requestAnimationFrame(()=>{_classPrivateFieldSet2(_rAF,this,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),_canvasInUse._.delete(this._canvas),this.callback())))}},_canvasInUse={_:new WeakSet},version$1=`4.8.69`,build=`3634dab10`;function makeColorComp(e){return Math.floor(Math.max(0,Math.min(1,e))*255).toString(16).padStart(2,`0`)}function scaleAndClamp(e){return Math.max(0,Math.min(255,255*e))}var ColorConverters=class{static CMYK_G([e,t,n,r]){return[`G`,1-Math.min(1,.3*e+.59*n+.11*t+r)]}static G_CMYK([e]){return[`CMYK`,0,0,0,1-e]}static G_RGB([e]){return[`RGB`,e,e,e]}static G_rgb([e]){return e=scaleAndClamp(e),[e,e,e]}static G_HTML([e]){let t=makeColorComp(e);return`#${t}${t}${t}`}static RGB_G([e,t,n]){return[`G`,.3*e+.59*t+.11*n]}static RGB_rgb(e){return e.map(scaleAndClamp)}static RGB_HTML(e){return`#${e.map(makeColorComp).join(``)}`}static T_HTML(){return`#00000000`}static T_rgb(){return[null]}static CMYK_RGB([e,t,n,r]){return[`RGB`,1-Math.min(1,e+r),1-Math.min(1,n+r),1-Math.min(1,t+r)]}static CMYK_rgb([e,t,n,r]){return[scaleAndClamp(1-Math.min(1,e+r)),scaleAndClamp(1-Math.min(1,n+r)),scaleAndClamp(1-Math.min(1,t+r))]}static CMYK_HTML(e){let t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK([e,t,n]){let r=1-e,i=1-t,a=1-n;return[`CMYK`,r,i,a,Math.min(r,i,a)]}},BaseSVGFactory=class{create(e,t,n=!1){if(e<=0||t<=0)throw Error(`Invalid SVG dimensions`);let r=this._createSVG(`svg:svg`);return r.setAttribute(`version`,`1.1`),n||(r.setAttribute(`width`,`${e}px`),r.setAttribute(`height`,`${t}px`)),r.setAttribute(`preserveAspectRatio`,`none`),r.setAttribute(`viewBox`,`0 0 ${e} ${t}`),r}createElement(e){if(typeof e!=`string`)throw Error(`Invalid SVG element type`);return this._createSVG(e)}_createSVG(e){unreachable$1("Abstract method `_createSVG` called.")}},DOMSVGFactory=class extends BaseSVGFactory{_createSVG(e){return document.createElementNS(SVG_NS,e)}},XfaLayer=class{static setupStorage(e,t,n,r,i){let a=r.getValue(t,{value:null});switch(n.name){case`textarea`:if(a.value!==null&&(e.textContent=a.value),i===`print`)break;e.addEventListener(`input`,e=>{r.setValue(t,{value:e.target.value})});break;case`input`:if(n.attributes.type===`radio`||n.attributes.type===`checkbox`){if(a.value===n.attributes.xfaOn?e.setAttribute(`checked`,!0):a.value===n.attributes.xfaOff&&e.removeAttribute(`checked`),i===`print`)break;e.addEventListener(`change`,e=>{r.setValue(t,{value:e.target.checked?e.target.getAttribute(`xfaOn`):e.target.getAttribute(`xfaOff`)})})}else{if(a.value!==null&&e.setAttribute(`value`,a.value),i===`print`)break;e.addEventListener(`input`,e=>{r.setValue(t,{value:e.target.value})})}break;case`select`:if(a.value!==null){e.setAttribute(`value`,a.value);for(let e of n.children)e.attributes.value===a.value?e.attributes.selected=!0:e.attributes.hasOwnProperty(`selected`)&&delete e.attributes.selected}e.addEventListener(`input`,e=>{let n=e.target.options,i=n.selectedIndex===-1?``:n[n.selectedIndex].value;r.setValue(t,{value:i})})}}static setAttributes({html:e,element:t,storage:n=null,intent:r,linkService:i}){let{attributes:a}=t,o=e instanceof HTMLAnchorElement;a.type===`radio`&&(a.name=`${a.name}-${r}`);for(let[t,n]of Object.entries(a))if(n!=null)switch(t){case`class`:n.length&&e.setAttribute(t,n.join(` `));break;case`dataId`:break;case`id`:e.setAttribute(`data-element-id`,n);break;case`style`:Object.assign(e.style,n);break;case`textContent`:e.textContent=n;break;default:(!o||t!==`href`&&t!==`newWindow`)&&e.setAttribute(t,n)}o&&i.addLinkAttributes(e,a.href,a.newWindow),n&&a.dataId&&this.setupStorage(e,a.dataId,t,n)}static render(e){let t=e.annotationStorage,n=e.linkService,r=e.xfaHtml,i=e.intent||`display`,a=document.createElement(r.name);r.attributes&&this.setAttributes({html:a,element:r,intent:i,linkService:n});let o=i!==`richText`,c=e.div;if(c.append(a),e.viewport){let t=`matrix(${e.viewport.transform.join(`,`)})`;c.style.transform=t}o&&c.setAttribute(`class`,`xfaLayer xfaFont`);let u=[];
71if(r.children.length===0){if(r.value){let e=document.createTextNode(r.value);a.append(e),o&&XfaText.shouldBuildText(r.name)&&u.push(e)}return{textDivs:u}}let K=[[r,-1,a]];for(;K.length>0;){let[e,r,a]=K.at(-1);if(r+1===e.children.length){K.pop();continue}let c=e.children[++K.at(-1)[1]];if(c===null)continue;let{name:Y}=c;if(Y===`#text`){let e=document.createTextNode(c.value);u.push(e),a.append(e);continue}let X=c?.attributes?.xmlns?document.createElementNS(c.attributes.xmlns,Y):document.createElement(Y);if(a.append(X),c.attributes&&this.setAttributes({html:X,element:c,storage:t,intent:i,linkService:n}),c.children?.length>0)K.push([c,-1,X]);else if(c.value){let e=document.createTextNode(c.value);o&&XfaText.shouldBuildText(Y)&&u.push(e),X.append(e)}}for(let e of c.querySelectorAll(`.xfaNonInteractive input, .xfaNonInteractive textarea`))e.setAttribute(`readOnly`,!0);return{textDivs:u}}static update(e){let t=`matrix(${e.viewport.transform.join(`,`)})`;e.div.style.transform=t,e.div.hidden=!1}},DEFAULT_TAB_INDEX=1e3,annotation_layer_DEFAULT_FONT_SIZE=9,GetElementsByNameSet=new WeakSet;function getRectDims(e){return{width:e[2]-e[0],height:e[3]-e[1]}}var AnnotationElementFactory=class{static create(e){switch(e.data.annotationType){case AnnotationType.LINK:return new LinkAnnotationElement(e);case AnnotationType.TEXT:return new TextAnnotationElement(e);case AnnotationType.WIDGET:switch(e.data.fieldType){case`Tx`:return new TextWidgetAnnotationElement(e);case`Btn`:return e.data.radioButton?new RadioButtonWidgetAnnotationElement(e):e.data.checkBox?new CheckboxWidgetAnnotationElement(e):new PushButtonWidgetAnnotationElement(e);case`Ch`:return new ChoiceWidgetAnnotationElement(e);case`Sig`:return new SignatureWidgetAnnotationElement(e)}return new WidgetAnnotationElement(e);case AnnotationType.POPUP:return new PopupAnnotationElement(e);case AnnotationType.FREETEXT:return new FreeTextAnnotationElement(e);case AnnotationType.LINE:return new LineAnnotationElement(e);case AnnotationType.SQUARE:return new SquareAnnotationElement(e);case AnnotationType.CIRCLE:return new CircleAnnotationElement(e);case AnnotationType.POLYLINE:return new PolylineAnnotationElement(e);case AnnotationType.CARET:return new CaretAnnotationElement(e);case AnnotationType.INK:return new InkAnnotationElement(e);case AnnotationType.POLYGON:return new PolygonAnnotationElement(e);case AnnotationType.HIGHLIGHT:return new HighlightAnnotationElement(e);case AnnotationType.UNDERLINE:return new UnderlineAnnotationElement(e);case AnnotationType.SQUIGGLY:return new SquigglyAnnotationElement(e);case AnnotationType.STRIKEOUT:return new StrikeOutAnnotationElement(e);case AnnotationType.STAMP:return new StampAnnotationElement(e);case AnnotationType.FILEATTACHMENT:return new FileAttachmentAnnotationElement(e);default:return new AnnotationElement(e)}}},_updates=new WeakMap,_hasBorder=new WeakMap,_popupElement=new WeakMap,_AnnotationElement_brand=new WeakSet,AnnotationElement=class e{constructor(e,{isRenderable:t=!1,ignoreBorder:n=!1,createQuadrilaterals:r=!1}={}){_classPrivateMethodInitSpec(this,_AnnotationElement_brand),_classPrivateFieldInitSpec(this,_updates,null),_classPrivateFieldInitSpec(this,_hasBorder,!1),_classPrivateFieldInitSpec(this,_popupElement,null),this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,t&&(this.container=this._createContainer(n)),r&&this._createQuadrilaterals()}static _hasPopupData({titleObj:e,contentsObj:t,richText:n}){return!!(e?.str||t?.str||n?.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return e._hasPopupData(this.data)}updateEdited(e){if(!this.container)return;_classPrivateFieldGet2(_updates,this)||_classPrivateFieldSet2(_updates,this,{rect:this.data.rect.slice(0)});let{rect:t}=e;t&&_assertClassBrand(_AnnotationElement_brand,this,_setRectEdited).call(this,t),_classPrivateFieldGet2(_popupElement,this)?.popup.updateEdited(e)}resetEdited(){_classPrivateFieldGet2(_updates,this)&&(_assertClassBrand(_AnnotationElement_brand,this,_setRectEdited).call(this,_classPrivateFieldGet2(_updates,this).rect),_classPrivateFieldGet2(_popupElement,this)?.popup.resetEdited(),_classPrivateFieldSet2(_updates,this,null))}_createContainer(e){let{data:t,parent:{page:n,viewport:r}}=this,i=document.createElement(`section`);i.setAttribute(`data-annotation-id`,t.id),this instanceof WidgetAnnotationElement||(i.tabIndex=DEFAULT_TAB_INDEX);let{style:a}=i;if(a.zIndex=this.parent.zIndex++,t.alternativeText&&(i.title=t.alternativeText),t.noRotate&&i.classList.add(`norotate`),!t.rect||this instanceof PopupAnnotationElement){let{rotation:e}=t;return!t.hasOwnCanvas&&e!==0&&this.setRotation(e,i),i}let{width:o,height:c}=getRectDims(t.rect);if(!e&&t.borderStyle.width>0){a.borderWidth=`${t.borderStyle.width}px`;let e=t.borderStyle.horizontalCornerRadius,n=t.borderStyle.verticalCornerRadius;switch(e>0||n>0?a.borderRadius=`calc(${e}px * var(--scale-factor)) / calc(${n}px * var(--scale-factor))`:this instanceof RadioButtonWidgetAnnotationElement&&(a.borderRadius=`calc(${o}px * var(--scale-factor)) / calc(${c}px * var(--scale-factor))`),t.borderStyle.style){case AnnotationBorderStyleType.SOLID:a.borderStyle=`solid`;break;case AnnotationBorderStyleType.DASHED:a.borderStyle=`dashed`;break;case AnnotationBorderStyleType.BEVELED:warn(`Unimplemented border style: beveled`);break;case AnnotationBorderStyleType.INSET:warn(`Unimplemented border style: inset`);break;case AnnotationBorderStyleType.UNDERLINE:a.borderBottomStyle=`solid`}let r=t.borderColor||null;r?(_classPrivateFieldSet2(_hasBorder,this,!0),a.borderColor=Util.makeHexColor(r[0]|0,r[1]|0,r[2]|0)):a.borderWidth=0}let u=Util.normalizeRect([t.rect[0],n.view[3]-t.rect[1]+n.view[1],t.rect[2],n.view[3]-t.rect[3]+n.view[1]]),{pageWidth:K,pageHeight:Y,pageX:X,pageY:ee}=r.rawDims;a.left=`${100*(u[0]-X)/K}%`,a.top=`${100*(u[1]-ee)/Y}%`;let{rotation:te}=t;return t.hasOwnCanvas||te===0?(a.width=`${100*o/K}%`,a.height=`${100*c/Y}%`):this.setRotation(te,i),i}setRotation(e,t=this.container){if(!this.data.rect)return;let{pageWidth:n,pageHeight:r}=this.parent.viewport.rawDims,{width:i,height:a}=getRectDims(this.data.rect),o,c;e%180==0?(o=100*i/n,c=100*a/r):(o=100*a/n,c=100*i/r),t.style.width=`${o}%`,t.style.height=`${c}%`,t.setAttribute(`data-main-rotation`,(360-e)%360)}
vendor: 16,016 bytes, lines 71-72
71get _commonActions(){let e=(e,t,n)=>{let r=n.detail[e],i=r[0],a=r.slice(1);n.target.style[t]=ColorConverters[`${i}_HTML`](a),this.annotationStorage.setValue(this.data.id,{[t]:ColorConverters[`${i}_rgb`](a)})};return shadow(this,`_commonActions`,{display:e=>{let{display:t}=e.detail,n=t%2==1;this.container.style.visibility=n?`hidden`:`visible`,this.annotationStorage.setValue(this.data.id,{noView:n,noPrint:t===1||t===2})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{let{hidden:t}=e.detail;this.container.style.visibility=t?`hidden`:`visible`,this.annotationStorage.setValue(this.data.id,{noPrint:t,noView:t})},focus:e=>{setTimeout(()=>e.target.focus({preventScroll:!1}),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:t=>{e(`bgColor`,`backgroundColor`,t)},fillColor:t=>{e(`fillColor`,`backgroundColor`,t)},fgColor:t=>{e(`fgColor`,`color`,t)},textColor:t=>{e(`textColor`,`color`,t)},borderColor:t=>{e(`borderColor`,`borderColor`,t)},strokeColor:t=>{e(`strokeColor`,`borderColor`,t)},rotation:e=>{let t=e.detail.rotation;this.setRotation(t),this.annotationStorage.setValue(this.data.id,{rotation:t})}})}_dispatchEventFromSandbox(e,t){let n=this._commonActions;for(let r of Object.keys(t.detail))(e[r]||n[r])?.(t)}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;let t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;let n=this._commonActions;for(let[r,i]of Object.entries(t)){let a=n[r];a&&(a({detail:{[r]:i},target:e}),delete t[r])}}_createQuadrilaterals(){if(!this.container)return;let{quadPoints:e}=this.data;if(!e)return;let[t,n,r,i]=this.data.rect.map(e=>Math.fround(e));if(e.length===8){let[a,o,c,u]=e.subarray(2,6);if(r===a&&i===o&&t===c&&n===u)return}let{style:a}=this.container,o;if(_classPrivateFieldGet2(_hasBorder,this)){let{borderColor:e,borderWidth:t}=a;a.borderWidth=0,o=[`url('data:image/svg+xml;utf8,`,`<svg xmlns="http://www.w3.org/2000/svg"`,` preserveAspectRatio="none" viewBox="0 0 1 1">`,`<g fill="transparent" stroke="${e}" stroke-width="${t}">`],this.container.classList.add(`hasBorder`)}let c=r-t,u=i-n,{svgFactory:K}=this,Y=K.createElement(`svg`);Y.classList.add(`quadrilateralsContainer`),Y.setAttribute(`width`,0),Y.setAttribute(`height`,0);let X=K.createElement(`defs`);Y.append(X);let ee=K.createElement(`clipPath`),te=`clippath_${this.data.id}`;ee.setAttribute(`id`,te),ee.setAttribute(`clipPathUnits`,`objectBoundingBox`),X.append(ee);for(let n=2,r=e.length;n<r;n+=8){let r=e[n],a=e[n+1],Y=e[n+2],X=e[n+3],te=K.createElement(`rect`),ce=(Y-t)/c,ue=(i-a)/u,de=(r-Y)/c,fe=(a-X)/u;te.setAttribute(`x`,ce),te.setAttribute(`y`,ue),te.setAttribute(`width`,de),te.setAttribute(`height`,fe),ee.append(te),o?.push(`<rect vector-effect="non-scaling-stroke" x="${ce}" y="${ue}" width="${de}" height="${fe}"/>`)}_classPrivateFieldGet2(_hasBorder,this)&&(o.push(`</g></svg>')`),a.backgroundImage=o.join(``)),this.container.append(Y),this.container.style.clipPath=`url(#${te})`}_createPopup(){let{data:e}=this,t=_classPrivateFieldSet2(_popupElement,this,new PopupAnnotationElement({data:{color:e.color,titleObj:e.titleObj,modificationDate:e.modificationDate,contentsObj:e.contentsObj,richText:e.richText,parentRect:e.rect,borderStyle:0,id:`popup_${e.id}`,rotation:e.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(t.render())}render(){unreachable$1("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){let n=[];if(this._fieldObjects){let r=this._fieldObjects[e];if(r)for(let{page:e,id:i,exportValues:a}of r){if(e===-1||i===t)continue;let r=typeof a==`string`?a:null,o=document.querySelector(`[data-element-id="${i}"]`);if(o&&!GetElementsByNameSet.has(o)){warn(`_getElementsByName - element not allowed: ${i}`);continue}n.push({id:i,exportValue:r,domElement:o})}return n}for(let r of document.getElementsByName(e)){let{exportValue:e}=r,i=r.getAttribute(`data-element-id`);i!==t&&GetElementsByNameSet.has(r)&&n.push({id:i,exportValue:e,domElement:r})}return n}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){let e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(let t of e)t.classList.add(`highlightArea`);else e.classList.add(`highlightArea`)}_editOnDoubleClick(){if(!this._isEditable)return;let{annotationEditorType:e,data:{id:t}}=this;this.container.addEventListener(`dblclick`,()=>{this.linkService.eventBus?.dispatch(`switchannotationeditormode`,{source:this,mode:e,editId:t})})}};function _setRectEdited(e){let{container:{style:t},data:{rect:n,rotation:r},parent:{viewport:{rawDims:{pageWidth:i,pageHeight:a,pageX:o,pageY:c}}}}=this;n?.splice(0,4,...e);let{width:u,height:K}=getRectDims(e);t.left=`${100*(e[0]-o)/i}%`,t.top=`${100*(a-e[3]+c)/a}%`,r===0?(t.width=`${100*u/i}%`,t.height=`${100*K/a}%`):this.setRotation(r)}var _LinkAnnotationElement_brand=new WeakSet,LinkAnnotationElement=class extends AnnotationElement{constructor(e,t=null){super(e,{isRenderable:!0,ignoreBorder:!!t?.ignoreBorder,createQuadrilaterals:!0}),_classPrivateMethodInitSpec(this,_LinkAnnotationElement_brand),this.isTooltipOnly=e.data.isTooltipOnly}render(){let{data:e,linkService:t}=this,n=document.createElement(`a`);n.setAttribute(`data-element-id`,e.id);let r=!1;return e.url?(t.addLinkAttributes(n,e.url,e.newWindow),r=!0):e.action?(this._bindNamedAction(n,e.action),r=!0):e.attachment?(_assertClassBrand(_LinkAnnotationElement_brand,this,_bindAttachment).call(this,n,e.attachment,e.attachmentDest),r=!0):e.setOCGState?(_assertClassBrand(_LinkAnnotationElement_brand,this,_bindSetOCGState).call(this,n,e.setOCGState),r=!0):e.dest?(this._bindLink(n,e.dest),r=!0):(e.actions&&(e.actions.Action||e.actions[`Mouse Up`]||e.actions[`Mouse Down`])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(n,e),r=!0),e.resetForm?(this._bindResetFormAction(n,e.resetForm),r=!0):this.isTooltipOnly&&!r&&(this._bindLink(n,``),r=!0)),this.container.classList.add(`linkAnnotation`),r&&this.container.append(n),this.container}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.goToDestination(t),!1),(t||t===``)&&_assertClassBrand(_LinkAnnotationElement_brand,this,_setInternalLink).call(this)}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(``),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),_assertClassBrand(_LinkAnnotationElement_brand,this,_setInternalLink).call(this)}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl(``);let n=new Map([[`Action`,`onclick`],[`Mouse Up`,`onmouseup`],[`Mouse Down`,`onmousedown`]]);for(let r of Object.keys(t.actions)){let i=n.get(r);i&&(e[i]=()=>(this.linkService.eventBus?.dispatch(`dispatcheventinsandbox`,{source:this,detail:{id:t.id,name:r}}),!1))}e.onclick||=()=>!1,_assertClassBrand(_LinkAnnotationElement_brand,this,_setInternalLink).call(this)}_bindResetFormAction(e,t){let n=e.onclick;if(n||(e.href=this.linkService.getAnchorUrl(``)),_assertClassBrand(_LinkAnnotationElement_brand,this,_setInternalLink).call(this),!this._fieldObjects){warn('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),n||(e.onclick=()=>!1);return}e.onclick=()=>{n?.();let{fields:e,refs:r,include:i}=t,a=[];if(e.length!==0||r.length!==0){let t=new Set(r);for(let n of e){let e=this._fieldObjects[n]||[];for(let{id:n}of e)t.add(n)}for(let e of Object.values(this._fieldObjects))for(let n of e)t.has(n.id)===i&&a.push(n)}else for(let e of Object.values(this._fieldObjects))a.push(...e);let o=this.annotationStorage,c=[];for(let e of a){let{id:t}=e;switch(c.push(t),e.type){case`text`:{let n=e.defaultValue||``;o.setValue(t,{value:n});break}case`checkbox`:case`radiobutton`:{let n=e.defaultValue===e.exportValues;o.setValue(t,{value:n});break}case`combobox`:case`listbox`:{let n=e.defaultValue||``;o.setValue(t,{value:n});break}default:continue}let n=document.querySelector(`[data-element-id="${t}"]`);if(n){if(!GetElementsByNameSet.has(n)){warn(`_bindResetFormAction - element not allowed: ${t}`);continue}n.dispatchEvent(new Event(`resetform`))}}return this.enableScripting&&this.linkService.eventBus?.dispatch(`dispatcheventinsandbox`,{source:this,detail:{id:`app`,ids:c,name:`ResetForm`}}),!1}}};function _setInternalLink(){this.container.setAttribute(`data-internal-link`,``)}function _bindAttachment(e,t,n=null){e.href=this.linkService.getAnchorUrl(``),t.description&&(e.title=t.description),e.onclick=()=>(this.downloadManager?.openOrDownloadData(t.content,t.filename,n),!1),_assertClassBrand(_LinkAnnotationElement_brand,this,_setInternalLink).call(this)}function _bindSetOCGState(e,t){e.href=this.linkService.getAnchorUrl(``),e.onclick=()=>(this.linkService.executeSetOCGState(t),!1),_assertClassBrand(_LinkAnnotationElement_brand,this,_setInternalLink).call(this)}var TextAnnotationElement=class extends AnnotationElement{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add(`textAnnotation`);let e=document.createElement(`img`);return e.src=this.imageResourcesPath+`annotation-`+this.data.name.toLowerCase()+`.svg`,e.setAttribute(`data-l10n-id`,`pdfjs-text-annotation-type`),e.setAttribute(`data-l10n-args`,JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}},WidgetAnnotationElement=class extends AnnotationElement{render(){return this.container}showElementAndHideCanvas(e){this.data.hasOwnCanvas&&(e.previousSibling?.nodeName===`CANVAS`&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){return util_FeatureTest.platform.isMac?e.metaKey:e.ctrlKey}_setEventListener(e,t,n,r,i){n.includes(`mouse`)?e.addEventListener(n,e=>{this.linkService.eventBus?.dispatch(`dispatcheventinsandbox`,{source:this,detail:{id:this.data.id,name:r,value:i(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})}):e.addEventListener(n,e=>{if(n===`blur`){if(!t.focused||!e.relatedTarget)return;t.focused=!1}else if(n===`focus`){if(t.focused)return;t.focused=!0}i&&this.linkService.eventBus?.dispatch(`dispatcheventinsandbox`,{source:this,detail:{id:this.data.id,name:r,value:i(e)}})})}_setEventListeners(e,t,n,r){for(let[i,a]of n)(a===`Action`||this.data.actions?.[a])&&((a===`Focus`||a===`Blur`)&&(t||={focused:!1}),this._setEventListener(e,t,i,a,r),a===`Focus`&&!this.data.actions?.Blur?this._setEventListener(e,t,`blur`,`Blur`,null):a===`Blur`&&!this.data.actions?.Focus&&this._setEventListener(e,t,`focus`,`Focus`,null))}_setBackgroundColor(e){let t=this.data.backgroundColor||null;e.style.backgroundColor=t===null?`transparent`:Util.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){let t=[`left`,`center`,`right`],{fontColor:n}=this.data.defaultAppearanceData,r=this.data.defaultAppearanceData.fontSize||annotation_layer_DEFAULT_FONT_SIZE,i=e.style,a,o=2,c=e=>Math.round(10*e)/10;if(this.data.multiLine){let e=Math.abs(this.data.rect[3]-this.data.rect[1]-2),t=e/(Math.round(e/(LINE_FACTOR*r))||1);a=Math.min(r,c(t/LINE_FACTOR))}else{let e=Math.abs(this.data.rect[3]-this.data.rect[1]-2);a=Math.min(r,c(e/LINE_FACTOR))}i.fontSize=`calc(${a}px * var(--scale-factor))`,i.color=Util.makeHexColor(n[0],n[1],n[2]),this.data.textAlignment!==null&&(i.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute(`required`,!0):e.removeAttribute(`required`),e.setAttribute(`aria-required`,t)}},TextWidgetAnnotationElement=class extends WidgetAnnotationElement{constructor(e){let t=e.renderForms||e.data.hasOwnCanvas||!e.data.hasAppearance&&!!e.data.fieldValue;super(e,{isRenderable:t})}setPropertyOnSiblings(e,t,n,r){let i=this.annotationStorage;for(let a of this._getElementsByName(e.name,e.id))a.domElement&&(a.domElement[t]=n),i.setValue(a.id,{[r]:n})}render(){let e=this.annotationStorage,t=this.data.id;this.container.classList.add(`textWidgetAnnotation`);let n=null;if(this.renderForms){let r=e.getValue(t,{value:this.data.fieldValue}),i=r.value||``,a=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;a&&i.length>a&&(i=i.slice(0,a));let o=r.formattedValue||this.data.textContent?.join(`
72`)||null;o&&this.data.comb&&(o=o.replaceAll(/\s+/g,``));let c={userValue:i,formattedValue:o,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(n=document.createElement(`textarea`),n.textContent=o??i,this.data.doNotScroll&&(n.style.overflowY=`hidden`)):(n=document.createElement(`input`),n.type=`text`,n.setAttribute(`value`,o??i),this.data.doNotScroll&&(n.style.overflowX=`hidden`)),this.data.hasOwnCanvas&&(n.hidden=!0),GetElementsByNameSet.add(n),n.setAttribute(`data-element-id`,t),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=DEFAULT_TAB_INDEX,this._setRequired(n,this.data.required),a&&(n.maxLength=a),n.addEventListener(`input`,r=>{e.setValue(t,{value:r.target.value}),this.setPropertyOnSiblings(n,`value`,r.target.value,`value`),c.formattedValue=null}),n.addEventListener(`resetform`,e=>{let t=this.data.defaultFieldValue??``;n.value=c.userValue=t,c.formattedValue=null});let u=e=>{let{formattedValue:t}=c;t!=null&&(e.target.value=t),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){n.addEventListener(`focus`,e=>{if(c.focused)return;let{target:t}=e;c.userValue&&(t.value=c.userValue),c.lastCommittedValue=t.value,c.commitKey=1,this.data.actions?.Focus||(c.focused=!0)}),n.addEventListener(`updatefromsandbox`,n=>{this.showElementAndHideCanvas(n.target),this._dispatchEventFromSandbox({value(n){c.userValue=n.detail.value??``,e.setValue(t,{value:c.userValue.toString()}),n.target.value=c.userValue},formattedValue(n){let{formattedValue:r}=n.detail;c.formattedValue=r,r!=null&&n.target!==document.activeElement&&(n.target.value=r),e.setValue(t,{formattedValue:r})},selRange(e){e.target.setSelectionRange(...e.detail.selRange)},charLimit:n=>{let{charLimit:r}=n.detail,{target:i}=n;if(r===0){i.removeAttribute(`maxLength`);return}i.setAttribute(`maxLength`,r);let a=c.userValue;!a||a.length<=r||(a=a.slice(0,r),i.value=c.userValue=a,e.setValue(t,{value:a}),this.linkService.eventBus?.dispatch(`dispatcheventinsandbox`,{source:this,detail:{id:t,name:`Keystroke`,value:a,willCommit:!0,commitKey:1,selStart:i.selectionStart,selEnd:i.selectionEnd}}))}},n)}),n.addEventListener(`keydown`,e=>{c.commitKey=1;let n=-1;if(e.key===`Escape`?n=0:e.key===`Enter`&&!this.data.multiLine?n=2:e.key===`Tab`&&(c.commitKey=3),n===-1)return;let{value:r}=e.target;c.lastCommittedValue!==r&&(c.lastCommittedValue=r,c.userValue=r,this.linkService.eventBus?.dispatch(`dispatcheventinsandbox`,{source:this,detail:{id:t,name:`Keystroke`,value:r,willCommit:!0,commitKey:n,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))});let r=u;u=null,n.addEventListener(`blur`,e=>{if(!c.focused||!e.relatedTarget)return;this.data.actions?.Blur||(c.focused=!1);let{value:n}=e.target;c.userValue=n,c.lastCommittedValue!==n&&this.linkService.eventBus?.dispatch(`dispatcheventinsandbox`,{source:this,detail:{id:t,name:`Keystroke`,value:n,willCommit:!0,commitKey:c.commitKey,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}),r(e)}),this.data.actions?.Keystroke&&n.addEventListener(`beforeinput`,e=>{c.lastCommittedValue=null;let{data:n,target:r}=e,{value:i,selectionStart:a,selectionEnd:o}=r,u=a,K=o;switch(e.inputType){case`deleteWordBackward`:{let e=i.substring(0,a).match(/\w*[^\w]*$/);e&&(u-=e[0].length);break}case`deleteWordForward`:{let e=i.substring(a).match(/^[^\w]*\w*/);e&&(K+=e[0].length);break}case`deleteContentBackward`:a===o&&--u;break;case`deleteContentForward`:a===o&&(K+=1)}e.preventDefault(),this.linkService.eventBus?.dispatch(`dispatcheventinsandbox`,{source:this,detail:{id:t,name:`Keystroke`,value:i,change:n||``,willCommit:!1,selStart:u,selEnd:K}})}),this._setEventListeners(n,c,[[`focus`,`Focus`],[`blur`,`Blur`],[`mousedown`,`Mouse Down`],[`mou
72seenter`,`Mouse Enter`],[`mouseleave`,`Mouse Exit`],[`mouseup`,`Mouse Up`]],e=>e.target.value)}if(u&&n.addEventListener(`blur`,u),this.data.comb){let e=(this.data.rect[2]-this.data.rect[0])/a;n.classList.add(`comb`),n.style.letterSpacing=`calc(${e}px * var(--scale-factor) - 1ch)`}}else n=document.createElement(`div`),n.textContent=this.data.fieldValue,n.style.verticalAlign=`middle`,n.style.display=`table-cell`,this.data.hasOwnCanvas&&(n.hidden=!0);return this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}},SignatureWidgetAnnotationElement=class extends WidgetAnnotationElement{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}},CheckboxWidgetAnnotationElement=class extends WidgetAnnotationElement{constructor(e){super(e,{isRenderable:e.renderForms})}render(){let e=this.annotationStorage,t=this.data,n=t.id,r=e.getValue(n,{value:t.exportValue===t.fieldValue}).value;typeof r==`string`&&(r=r!==`Off`,e.setValue(n,{value:r})),this.container.classList.add(`buttonWidgetAnnotation`,`checkBox`);let i=document.createElement(`input`);return GetElementsByNameSet.add(i),i.setAttribute(`data-element-id`,n),i.disabled=t.readOnly,this._setRequired(i,this.data.required),i.type=`checkbox`,i.name=t.fieldName,r&&i.setAttribute(`checked`,!0),i.setAttribute(`exp
72ortValue`,t.exportValue),i.tabIndex=DEFAULT_TAB_INDEX,i.addEventListener(`change`,r=>{let{name:i,checked:a}=r.target;for(let r of this._getElementsByName(i,n)){let n=a&&r.exportValue===t.exportValue;r.domElement&&(r.domElement.checked=n),e.setValue(r.id,{value:n})}e.setValue(n,{value:a})}),i.addEventListener(`resetform`,e=>{let n=t.defaultFieldValue||`Off`;e.target.checked=n===t.exportValue}),this.enableScripting&&this.hasJSActions&&(i.addEventListener(`updatefromsandbox`,t=>{this._dispatchEventFromSandbox({value(t){t.target.checked=t.detail.value!==`Off`,e.setValue(n,{value:t.target.checked})}},t)}),this._setEventListeners(i,null,[[`change`,`Validate`],[`change`,`Action`],[`focus`,`Focus`],[`blur`,`Blur`],[`mousedown`,`Mouse Down`],[`mouseenter`,`Mouse Enter`],[`mouseleave`,`Mouse Exit`],[`mouseup`,`Mouse Up`]],e=>e.target.checked)),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}},RadioButtonWidgetAnnotationElement=class extends WidgetAnnotationElement{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add(`buttonWidgetAnnotation`,`radioButton`);let e=this.annotationStorage,t=this.data,n=t.id,r=e.getValue(n,{value:t.fieldValue===t.buttonValue}).value;if(typeof r==`string`&&(r=r!==t.buttonValue,e.setValue(n,{value:r})),r)for(let r of this._getElementsByName(t.fieldName,n))e.setValue(r.id,{value:!1});let i=document.createElement(`input`);if(GetElementsByNameSet.add(i),i.setAttribute(`data-element-id`,n),i.disabled=t.readOnly,this._setRequired(i,this.data.required),i.type=`radio`,i.name=t.fieldName,r&&i.setAttribute(`checked`,!0),i.tabIndex=DEFAULT_TAB_INDEX,i.addEventListener(`change`,t=>{let{name:r,checked:i}=t.target;for(let t of this._getElementsByName(r,n))e.setValue(t.id,{value:!1});e.setValue(n,{value:i})}),i.addEventListener(`resetform`,e=>{let n=t.defaultFieldValue;e.target.checked=n!=null&&n===t.buttonValue}),this.enableScripting&&this.hasJSActions){let r=t.buttonValue;i.addEventListener(`updatefromsandbox`,t=>{this._dispatchEventFromSandbox({value:t=>{let i=r===t.detail.value;for(let r of this._getElementsByName(t.target.name)){let t=i&&r.id===n;r.domElement&&(r.domElement.checked=t),e.setValue(r.id,{value:t})}}},t)}),this._setEventListeners(i,null,[[`change`,`Validate`],[`change`,`Action`],[`focus`,`Focus`],[`blur`,`Blur`],[`mousedown`,`Mouse Down`],[`mouseenter`,`Mouse Enter`],[`mouseleave`,`Mouse Exit`],[`mouseup`,`Mouse Up`]],e=>e.target.checked)}return this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}},PushButtonWidgetAnnotationElement=class extends LinkAnnotationElement{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){let e=super.render();e.classList.add(`buttonWidgetAnnotation`,`pushButton`);let t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener(`updatefromsandbox`,e=>{this._dispatchEventFromSandbox({},e)})),e}},ChoiceWidgetAnnotationElement=class extends WidgetAnnotationElement{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add(`choiceWidgetAnnotation`);let e=this.annotationStorage,t=this.data.id,n=e.getValue(t,{value:this.data.fieldValue}),r=document.createElement(`select`);GetElementsByNameSet.add(r),r.setAttribute(`data-element-id`,t),r.disabled=this.data.readOnly,this._setRequired(r,this.data.required),r.name=this.data.fieldName,r.tabIndex=DEFAULT_TAB_INDEX;let i=this.data.combo&&this.data.options.length>0;this.data.combo||(r.size=this.data.options.length,this.data.multiSelect&&(r.multiple=!0)),r.addEventListener(`resetform`,e=>{let t=this.data.defaultFieldValue;for(let e of r.options)e.selected=e.value===t});for(let e of this.data.options){let t=document.createElement(`option`);t.textContent=e.displayValue,t.value=e.exportValue,n.value.includes(e.exportValue)&&(t.setAttribute(`selected`,!0),i=!1),r.append(t)}let a=null;if(i){let e=document.createElement(`option`);e.value=` `,e.setAttribute(`hidden`,!0),e.setAttribute(`selected`,!0),r.prepend(e),a=()=>{e.remove(),r.removeEventListener(`input`,a),a=null},r.addEventListener(`input`,a)}let o=e=>{let t=e?`value`:`textContent`,{options:n,multiple:i}=r;return i?Array.prototype.filter.call(n,e=>e.selected).map(e=>e[t]):n.selectedIndex===-1?null:n[n.selectedIndex][t]},c=o(!1),u=e=>{let t=e.target.options;return Array.prototype.map.call(t,e=>({displayValue:e.textContent,exportValue:e.value}))};return this.enableScripting&&this.hasJSActions?(r.addEventListener(`updatefromsandbox`,n=>{this._dispatchEventFromSandbox({value(n){a?.();let i=n.detail.value,u=new Set(Array.isArray(i)?i:[i]);for(let e of r.options)e.selected=u.has(e.value);
vendor: 5,159 bytes, line 72
72e.setValue(t,{value:o(!0)}),c=o(!1)},multipleSelection(e){r.multiple=!0},remove(n){let i=r.options,a=n.detail.remove;i[a].selected=!1,r.remove(a),i.length>0&&Array.prototype.findIndex.call(i,e=>e.selected)===-1&&(i[0].selected=!0),e.setValue(t,{value:o(!0),items:u(n)}),c=o(!1)},clear(n){for(;r.length!==0;)r.remove(0);e.setValue(t,{value:null,items:[]}),c=o(!1)},insert(n){let{index:i,displayValue:a,exportValue:K}=n.detail.insert,Y=r.children[i],X=document.createElement(`option`);X.textContent=a,X.value=K,Y?Y.before(X):r.append(X),e.setValue(t,{value:o(!0),items:u(n)}),c=o(!1)},items(n){let{items:i}=n.detail;for(;r.length!==0;)r.remove(0);for(let e of i){let{displayValue:t,exportValue:n}=e,i=document.createElement(`option`);i.textContent=t,i.value=n,r.append(i)}r.options.length>0&&(r.options[0].selected=!0),e.setValue(t,{value:o(!0),items:u(n)}),c=o(!1)},indices(n){let r=new Set(n.detail.indices);for(let e of n.target.options)e.selected=r.has(e.index);e.setValue(t,{value:o(!0)}),c=o(!1)},editable(e){e.target.disabled=!e.detail.editable}},n)}),r.addEventListener(`input`,n=>{let r=o(!0),i=o(!1);e.setValue(t,{value:r}),n.preventDefault(),this.linkService.eventBus?.dispatch(`dispatcheventinsandbox`,{source:this,detail:{id:t,name:`Keystroke`,value:c,change:i,changeEx:r,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(r,null,[[`focus`,`Focus`],[`blur`,`Blur`],[`mousedown`,`Mouse Down`],[`mouseenter`,`Mouse Enter`],[`mouseleave`,`Mouse Exit`],[`mouseup`,`Mouse Up`],[`input`,`Action`],[`input`,`Validate`]],e=>e.target.value)):r.addEventListener(`input`,function(n){e.setValue(t,{value:o(!0)})}),this.data.combo&&this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}},PopupAnnotationElement=class extends AnnotationElement{constructor(e){let{data:t,elements:n}=e;super(e,{isRenderable:AnnotationElement._hasPopupData(t)}),this.elements=n,this.popup=null}render(){this.container.classList.add(`popupAnnotation`);let e=this.popup=new PopupElement({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),t=[];for(let n of this.elements)n.popup=e,n.container.ariaHasPopup=`dialog`,t.push(n.data.id),n.addHighlightArea();return this.container.setAttribute(`aria-controls`,t.map(e=>`${AnnotationPrefix}${e}`).join(`,`)),this.container}},_boundKeyDown=new WeakMap,_boundHide=new WeakMap,_boundShow=new WeakMap,_boundToggle=new WeakMap,_color=new WeakMap,_container3=new WeakMap,_contentsObj=new WeakMap,_dateObj=new WeakMap,_elements=new WeakMap,_parent=new WeakMap,_parentRect=new WeakMap,_pinned=new WeakMap,_popup=new WeakMap,_position2=new WeakMap,_rect=new WeakMap,_richText=new WeakMap,_titleObj=new WeakMap,_updates2=new WeakMap,_wasVisible=new WeakMap,_PopupElement_brand=new WeakSet,PopupElement=class{constructor({container:e,color:t,elements:n,titleObj:r,modificationDate:i,contentsObj:a,richText:o,parent:c,rect:u,parentRect:K,open:Y}){_classPrivateMethodInitSpec(this,_PopupElement_brand),_classPrivateFieldInitSpec(this,_boundKeyDown,_assertClassBrand(_PopupElement_brand,this,_keyDown).bind(this)),_classPrivateFieldInitSpec(this,_boundHide,_assertClassBrand(_PopupElement_brand,this,_hide).bind(this)),_classPrivateFieldInitSpec(this,_boundShow,_assertClassBrand(_PopupElement_brand,this,_show).bind(this)),_classPrivateFieldInitSpec(this,_boundToggle,_assertClassBrand(_PopupElement_brand,this,_toggle).bind(this)),_classPrivateFieldInitSpec(this,_color,null),_classPrivateFieldInitSpec(this,_container3,null),_classPrivateFieldInitSpec(this,_contentsObj,null),_classPrivateFieldInitSpec(this,_dateObj,null),_classPrivateFieldInitSpec(this,_elements,null),_classPrivateFieldInitSpec(this,_parent,null),_classPrivateFieldInitSpec(this,_parentRect,null),_classPrivateFieldInitSpec(this,_pinned,!1),_classPrivateFieldInitSpec(this,_popup,null),_classPrivateFieldInitSpec(this,_position2,null),_classPrivateFieldInitSpec(this,_rect,null),_classPrivateFieldInitSpec(this,_richText,null),_classPrivateFieldInitSpec(this,_titleObj,null),_classPrivateFieldInitSpec(this,_updates2,null),_classPrivateFieldInitSpec(this,_wasVisible,!1),_classPrivateFieldSet2(_container3,this,e),_classPrivateFieldSet2(_titleObj,this,r),_classPrivateFieldSet2(_contentsObj,this,a),_classPrivateFieldSet2(_richText,this,o),_classPrivateFieldSet2(_parent,this,c),_classPrivateFieldSet2(_color,this,t),_classPrivateFieldSet2(_rect,this,u),_classPrivateFieldSet2(_parentRect,this,K),_classPrivateFieldSet2(_elements,this,n),_classPrivateFieldSet2(_dateObj,this,PDFDateString.toDateObject(i)),this.trigger=n.flatMap(e=>e.getElementsToTriggerPopup());for(let e of this.trigger)e.addEventListener(`click`,_classPrivateFieldGet2(_boundToggle,this)),e.addEventListener(`mouseenter`,_classPrivateFieldGet2(_boundShow,this)),e.addEventListener(`mouseleave`,_classPrivateFieldGet2(_boundHide,this)),e.classList.add(`popupTriggerArea`);
72for(let e of n)e.container?.addEventListener(`keydown`,_classPrivateFieldGet2(_boundKeyDown,this));_classPrivateFieldGet2(_container3,this).hidden=!0,Y&&_assertClassBrand(_PopupElement_brand,this,_toggle).call(this)}render(){if(_classPrivateFieldGet2(_popup,this))return;let e=_classPrivateFieldSet2(_popup,this,document.createElement(`div`));if(e.className=`popup`,_classPrivateFieldGet2(_color,this)){let t=e.style.outlineColor=Util.makeHexColor(..._classPrivateFieldGet2(_color,this));if(CSS.supports(`background-color`,`color-mix(in srgb, red 30%, white)`))e.style.backgroundColor=`color-mix(in srgb, ${t} 30%, white)`;else{let t=.7;e.style.backgroundColor=Util.makeHexColor(..._classPrivateFieldGet2(_color,this).map(e=>Math.floor(.7*(255-e)+e)))}}let t=document.createElement(`span`);t.className=`header`;let n=document.createElement(`h1`);if(t.append(n),{dir:n.dir,str:n.textContent}=_classPrivateFieldGet2(_titleObj,this),e.append(t),_classPrivateFieldGet2(_dateObj,this)){let e=document.createElement(`span`);e.classList.add(`popupDate`),e.setAttribute(`data-l10n-id`,`pdfjs-annotation-date-time-string`),e.setAttribute(`data-l10n-args`,JSON.stringify({dateObj:_classPrivateFieldGet2(_dateObj,this).valueOf()})),t.append(e)}let r=_get_html.call(_assertClassBrand(_PopupElement_brand,this));if(r)XfaLayer.render({xfaHtml:r,intent:`richText`,div:e}),e.lastChild.classList.add(`richText`,`popupContent`);else{let t=this._formatContents(_classPrivateFieldGet2(_contentsObj,this));e.append(t)}_classPrivateFieldGet2(_container3,this).append(e)}_formatContents({str:e,dir:t}){let n=document.createElement(`p`);n.classList.add(`popupContent`),n.dir=t;let r=e.split(/(?:\r\n?|\n)/);for(let e=0,t=r.length;e<t;++e){let i=r[e];n.append(document.createTextNode(i)),e<t-1&&n.append(document.createElement(`br`))}return n}updateEdited({rect:e,popupContent:t}){_classPrivateFieldGet2(_updates2,this)||_classPrivateFieldSet2(_updates2,this,{contentsObj:_classPrivateFieldGet2(_contentsObj,this),richText:_classPrivateFieldGet2(_richText,this)}),e&&_classPrivateFieldSet2(_position2,this,null),t&&(_classPrivateFieldSet2(_richText,this,_assertClassBrand(_PopupElement_brand,this,_makePopupContent).call(this,t)),_classPrivateFieldSet2(_contentsObj,this,null)),_classPrivateFieldGet2(_popup,this)?.remove(),_classPrivateFieldSet2(_popup,this,null)}resetEdited(){_classPrivateFieldGet2(_updates2,this)&&({contentsObj:_toSetter(_classPrivateFieldSet2,[_contentsObj,this])._,richText:_toSetter(_classPrivateFieldSet2,[_richText,this])._}=_classPrivateFieldGet2(_updates2,this),_classPrivateFieldSet2(_updates2,this,null),_classPrivateFieldGet2(_popup,this)?.remove(),_classPrivateFieldSet2(_popup,this,null),_classPrivateFieldSet2(_position2,this,null))}forceHide(){_classPrivateFieldSet2(_wasVisible,this,this.isVisible),_classPrivateFieldGet2(_wasVisible,this)&&(_classPrivateFieldGet2(_container3,this).hidden=!0)}maybeShow(){_classPrivateFieldGet2(_wasVisible,this)&&(_classPrivateFieldGet2(_popup,this)||_assertClassBrand(_PopupElement_brand,this,_show).call(this),_classPrivateFieldSet2(_wasVisible,this,!1),_classPrivateFieldGet2(_container3,this).hidden=!1)}get isVisible(){return _classPrivateFieldGet2(_container3,this).hidden===!1}};function _get_html(){let e=_classPrivateFieldGet2(_richText,this),t=_classPrivateFieldGet2(_contentsObj,this);return e?.str&&(!t?.str||t.str===e.str)&&_classPrivateFieldGet2(_richText,this).html||null}function _get_fontSize(){return _get_html.call(_assertClassBrand(_PopupElement_brand,this))?.attributes?.style?.fontSize||0}function _get_fontColor(){return _get_html.call(_assertClassBrand(_PopupElement_brand,this))?.attributes?.style?.color||null}function _makePopupContent(e){let t=[],n={str:e,html:{name:`div`,attributes:{dir:`auto`},children:[{name:`p`,children:t}]}},r={style:{color:_get_fontColor.call(_assertClassBrand(_PopupElement_brand,this)),fontSize:_get_fontSize.call(_assertClassBrand(_PopupElement_brand,this))?`calc(${_get_fontSize.call(_assertClassBrand(_PopupElement_brand,this))}px * var(--scale-factor))`:``}};for(let n of e.split(`
73`))t.push({name:`span`,value:n,attributes:r});return n}function _keyDown(e){e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||(e.key===`Enter`||e.key===`Escape`&&_classPrivateFieldGet2(_pinned,this))&&_assertClassBrand(_PopupElement_brand,this,_toggle).call(this)}function _setPosition(){if(_classPrivateFieldGet2(_position2,this)!==null)return;let{page:{view:e},viewport:{rawDims:{pageWidth:t,pageHeight:n,pageX:r,pageY:i}}}=_classPrivateFieldGet2(_parent,this),a=!!_classPrivateFieldGet2(_parentRect,this),o=_classPrivateFieldGet2(a?_parentRect:_rect,this);for(let e of _classPrivateFieldGet2(_elements,this))if(!o||Util.intersect(e.data.rect,o)!==null){o=e.data.rect,a=!0;break}let c=Util.normalizeRect([o[0],e[3]-o[1]+e[1],o[2],e[3]-o[3]+e[1]]),u=a?o[2]-o[0]+5:0,K=c[0]+u,Y=c[1];_classPrivateFieldSet2(_position2,this,[100*(K-r)/t,100*(Y-i)/n]);let{style:X}=_classPrivateFieldGet2(_container3,this);X.left=`${_classPrivateFieldGet2(_position2,this)[0]}%`,X.top=`${_classPrivateFieldGet2(_position2,this)[1]}%`}function _toggle(){_classPrivateFieldSet2(_pinned,this,!_classPrivateFieldGet2(_pinned,this)),_classPrivateFieldGet2(_pinned,this)?(_assertClassBrand(_PopupElement_brand,this,_show).call(this),_classPrivateFieldGet2(_container3,this).addEventListener(`click`,_classPrivateFieldGet2(_boundToggle,this)),_classPrivateFieldGet2(_container3,this).addEventListener(`ke
73ydown`,_classPrivateFieldGet2(_boundKeyDown,this))):(_assertClassBrand(_PopupElement_brand,this,_hide).call(this),_classPrivateFieldGet2(_container3,this).removeEventListener(`click`,_classPrivateFieldGet2(_boundToggle,this)),_classPrivateFieldGet2(_container3,this).removeEventListener(`keydown`,_classPrivateFieldGet2(_boundKeyDown,this)))}function _show(){_classPrivateFieldGet2(_popup,this)||this.render(),this.isVisible?_classPrivateFieldGet2(_pinned,this)&&_classPrivateFieldGet2(_container3,this).classList.add(`focused`):(_assertClassBrand(_PopupElement_brand,this,_setPosition).call(this),_classPrivateFieldGet2(_container3,this).hidden=!1,_classPrivateFieldGet2(_container3,this).style.zIndex=parseInt(_classPrivateFieldGet2(_container3,this).style.zIndex)+1e3)}function _hide(){_classPrivateFieldGet2(_container3,this).classList.remove(`focused`),!_classPrivateFieldGet2(_pinned,this)&&this.isVisible&&(_classPrivateFieldGet2(_container3,this).hidden=!0,_classPrivateFieldGet2(_container3,this).style.zIndex=parseInt(_classPrivateFieldGet2(_container3,this).style.zIndex)-1e3)}var FreeTextAnnotationElement=class extends AnnotationElement{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=AnnotationEditorType.FREETEXT}render(){if(this.container.classList.add(`freeTextAnnotation`),this.textContent){let e=document.createElement(`div`);e.classList.add(`annotationTextContent`),e.setAttribute(`role`,`comment`);for(let t of this.textContent){let n=document.createElement(`span`);n.textContent=t,e.append(n)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}},_line=new WeakMap,LineAnnotationElement=class extends AnnotationElement{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),_classPrivateFieldInitSpec(this,_line,null)}render(){this.container.classList.add(`lineAnnotation`);let e=this.data,{width:t,height:n}=getRectDims(e.rect),r=this.svgFactory.create(t,n,!0),i=_classPrivateFieldSet2(_line,this,this.svgFactory.createElement(`svg:line`));return i.setAttribute(`x1`,e.rect[2]-e.lineCoordinates[0]),i.setAttribute(`y1`,e.rect[3]-e.lineCoordinates[1]),i.setAttribute(`x2`,e.rect[2]-e.lineCoordinates[2]),i.setAttribute(`y2`,e.rect[3]-e.lineCoordinates[3]),i.setAttribute(`stroke-width`,e.borderStyle.width||1),i.setAttribute(`stroke`,`transparent`),i.setAttribute(`fill`,`transparent`),r.append(i),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return _classPrivateFieldGet2(_line,this)}addHighlightArea(){this.container.classList.add(`highlightArea`)}},_square=new WeakMap,SquareAnnotationElement=class extends AnnotationElement{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),_classPrivateFieldInitSpec(this,_square,null)}render(){this.container.classList.add(`squareAnnotation`);let e=this.data,{width:t,height:n}=getRectDims(e.rect),r=this.svgFactory.create(t,n,!0),i=e.borderStyle.width,a=_classPrivateFieldSet2(_square,this,this.svgFactory.createElement(`svg:rect`));return a.setAttribute(`x`,i/2),a.setAttribute(`y`,i/2),a.setAttribute(`width`,t-i),a.setAttribute(`height`,n-i),a.setAttribute(`stroke-width`,i||1),a.setAttribute(`stroke`,`transparent`),a.setAttribute(`fill`,`transparent`),r.append(a),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return _classPrivateFieldGet2(_square,this)}addHighlightArea(){this.container.classList.add(`highlightArea`)}},_circle=new WeakMap,CircleAnnotationElement=class extends AnnotationElement{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),_classPrivateFieldInitSpec(this,_circle,null)}render(){this.container.classList.add(`circleAnnotation`);let e=this.data,{width:t,height:n}=getRectDims(e.rect),r=this.svgFactory.create(t,n,!0),i=e.borderStyle.width,a=_classPrivateFieldSet2(_circle,this,this.svgFactory.createElement(`svg:ellipse`));return a.setAttribute(`cx`,t/2),a.setAttribute(`cy`,n/2),a.setAttribute(`rx`,t/2-i/2),a.setAttribute(`ry`,n/2-i/2),a.setAttribute(`stroke-width`,i||1),a.setAttribute(`stroke`,`transparent`),a.setAttribute(`fill`,`transparent`),r.append(a),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return _classPrivateFieldGet2(_circle,this)}addHighlightArea(){this.container.classList.add(`highlightArea`)}},_polyline=new WeakMap,PolylineAnnotationElement=class extends AnnotationElement{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),_classPrivateFieldInitSpec(this,_polyline,null),this.containerClassName=`polylineAnnotation`,this.svgElementName=`svg:polyline`}render(){this.container.classList.add(this.containerClassName);let{data:{rect:e,vertices:t,borderStyle:n,popupRef:r}}=this;if(!t)return this.container;let{width:i,height:a}=getRectDims(e),o=this.svgFactory.create(i,a,!0),c=[];for(let n=0,r=t.length;n<r;n+=2){let r=t[n]-e[0],i=e[3]-t[n+1];c.push(`${r},${i}`)}c=c.join(` `);let u=_classPrivateFieldSet2(_polyline,this,this.svgFactory.createElement(this.svgElementName));return u.setAttribute(`points`,c),u.setAttribute(`stroke-width`,n.width||1),u.setAttribute(`stroke`,`transparent`),u.setAttribute(`fill`,`transparent`),o.append(u),this.container.append(o),!r&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return _classPrivateFieldGet2(_polyline,this)}addHighlightArea(){this.container.classList.add(`highlightArea`)}},PolygonAnnotationElement=class extends PolylineAnnotationElement{constructor(e){super(e),this.containerClassName=`polygonAnnotation`,this.svgElementName=`svg:polygon`}},CaretAnnotationElement=class extends AnnotationElement{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add(`caretAnnotation`),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}
73,_polylines=new WeakMap,InkAnnotationElement=class extends AnnotationElement{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),_classPrivateFieldInitSpec(this,_polylines,[]),this.containerClassName=`inkAnnotation`,this.svgElementName=`svg:polyline`,this.annotationEditorType=this.data.it===`InkHighlight`?AnnotationEditorType.HIGHLIGHT:AnnotationEditorType.INK}render(){this.container.classList.add(this.containerClassName);let{data:{rect:e,inkLists:t,borderStyle:n,popupRef:r}}=this,{width:i,height:a}=getRectDims(e),o=this.svgFactory.create(i,a,!0);for(let r of t){let t=[];for(let n=0,i=r.length;n<i;n+=2){let i=r[n]-e[0],a=e[3]-r[n+1];t.push(`${i},${a}`)}t=t.join(` `);let i=this.svgFactory.createElement(this.svgElementName);_classPrivateFieldGet2(_polylines,this).push(i),i.setAttribute(`points`,t),i.setAttribute(`stroke-width`,n.width||1),i.setAttribute(`stroke`,`transparent`),i.setAttribute(`fill`,`transparent`),o.append(i)}return!r&&this.hasPopupData&&this._createPopup(),this.container.append(o),this._editOnDoubleClick(),this.container}getElementsToTriggerPopup(){return _classPrivateFieldGet2(_polylines,this)}addHighlightArea(){this.container.classList.add(`highlightArea`)}},HighlightAnnotationElement=class extends AnnotationElement{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=AnnotationEditorType.HIGHLIGHT}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add(`highlightAnnotation`),this._editOnDoubleClick(),this.container}},UnderlineAnnotationElement=class extends AnnotationElement{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add(`underlineAnnotation`),this.container}},SquigglyAnnotationElement=class extends AnnotationElement{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add(`squigglyAnnotation`),this.container}},StrikeOutAnnotationElement=class extends AnnotationElement{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add(`strikeoutAnnotation`),this.container}},StampAnnotationElement=class extends AnnotationElement{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=AnnotationEditorType.STAMP}render(){return this.container.classList.add(`stampAnnotation`),this.container.setAttribute(`role`,`img`),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}},_trigger=new WeakMap,_FileAttachmentAnnotationElement_brand=new WeakSet,FileAttachmentAnnotationElement=class extends AnnotationElement{constructor(e){super(e,{isRenderable:!0}),_classPrivateMethodInitSpec(this,_FileAttachmentAnnotationElement_brand),_classPrivateFieldInitSpec(this,_trigger,null);let{file:t}=this.data;this.filename=t.filename,this.content=t.content,this.linkService.eventBus?.dispatch(`fileattachmentannotation`,{source:this,...t})}render(){this.container.classList.add(`fileAttachmentAnnotation`);let{container:e,data:t}=this,n;t.hasAppearance||t.fillAlpha===0?n=document.createElement(`div`):(n=document.createElement(`img`),n.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(t.name)?`paperclip`:`pushpin`}.svg`,t.fillAlpha&&t.fillAlpha<1&&(n.style=`filter: opacity(${Math.round(t.fillAlpha*100)}%);`)),n.addEventListener(`dblclick`,_assertClassBrand(_FileAttachmentAnnotationElement_brand,this,_download).bind(this)),_classPrivateFieldSet2(_trigger,this,n);let{isMac:r}=util_FeatureTest.platform;return e.addEventListener(`keydown`,e=>{e.key===`Enter`&&(r?e.metaKey:e.ctrlKey)&&_assertClassBrand(_FileAttachmentAnnotationElement_brand,this,_download).call(this)}),!t.popupRef&&this.hasPopupData?this._createPopup():n.classList.add(`popupTriggerArea`),e.append(n),e}getElementsToTriggerPopup(){return _classPrivateFieldGet2(_trigger,this)}addHighlightArea(){this.container.classList.add(`highlightArea`)}};function _download(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}var _accessibilityManager=new WeakMap,_annotationCanvasMap=new WeakMap,_editableAnnotations=new WeakMap,_structTreeLayer=new WeakMap,_AnnotationLayer_brand=new WeakSet,AnnotationLayer$1=class{constructor({div:e,accessibilityManager:t,annotationCanvasMap:n,annotationEditorUIManager:r,page:i,viewport:
73a,structTreeLayer:o}){_classPrivateMethodInitSpec(this,_AnnotationLayer_brand),_classPrivateFieldInitSpec(this,_accessibilityManager,null),_classPrivateFieldInitSpec(this,_annotationCanvasMap,null),_classPrivateFieldInitSpec(this,_editableAnnotations,new Map),_classPrivateFieldInitSpec(this,_structTreeLayer,null),this.div=e,_classPrivateFieldSet2(_accessibilityManager,this,t),_classPrivateFieldSet2(_annotationCanvasMap,this,n),_classPrivateFieldSet2(_structTreeLayer,this,o||null),this.page=i,this.viewport=a,this.zIndex=0,this._annotationEditorUIManager=r}hasEditableAnnotations(){return _classPrivateFieldGet2(_editableAnnotations,this).size>0}async render(e){let{annotations:t}=e,n=this.div;setLayerDimensions(n,this.viewport);let r=new Map,i={data:null,layer:n,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||``,renderForms:e.renderForms!==!1,svgFactory:new DOMSVGFactory,annotationStorage:e.annotationStorage||new AnnotationStorage,enableScripting:e.enableScripting===!0,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(let e of t){if(e.noHTML)continue;let t=e.annotationType===AnnotationType.POPUP;if(t){let t=r.get(e.id);if(!t)continue;i.elements=t}else{let{width:t,height:n}=getRectDims(e.rect);if(t<=0||n<=0)continue}i.data=e;let n=AnnotationElementFactory.create(i);if(!n.isRenderable)continue;if(!t&&e.popupRef){let t=r.get(e.popupRef);t?t.push(n):r.set(e.popupRef,[n])}let a=n.render();e.hidden&&(a.style.visibility=`hidden`),await _assertClassBrand(_AnnotationLayer_brand,this,_appendElement).call(this,a,e.id),n._isEditable&&(_classPrivateFieldGet2(_editableAnnotations,this).set(n.data.id,n),this._annotationEditorUIManager?.renderAnnotationElement(n))}_assertClassBrand(_AnnotationLayer_brand,this,_setAnnotationCanvasMap).call(this)}update({viewport:e}){let t=this.div;this.viewport=e,setLayerDimensions(t,{rotation:e.rotation}),_assertClassBrand(_AnnotationLayer_brand,this,_setAnnotationCanvasMap).call(this),t.hidden=!1}getEditableAnnotations(){return Array.from(_classPrivateFieldGet2(_editableAnnotations,this).values())}getEditableAnnotation(e){return _classPrivateFieldGet2(_editableAnnotations,this).get(e)}};async function _appendElement(e,t){let n=e.firstChild||e,r=n.id=`${AnnotationPrefix}${t}`,i=await _classPrivateFieldGet2(_structTreeLayer,this)?.getAriaAttributes(r);if(i)for(let[e,t]of i)n.setAttribute(e,t);this.div.append(e),_classPrivateFieldGet2(_accessibilityManager,this)?.moveElementInDOM(this.div,e,n,!1)}function _setAnnotationCanvasMap(){if(!_classPrivateFieldGet2(_annotationCanvasMap,this))return;let e=this.div;for(let[t,n]of _classPrivateFieldGet2(_annotationCanvasMap,this)){let r=e.querySelector(`[data-annotation-id="${t}"]`);if(!r)continue;n.className=`annotationContent`;let{firstChild:i}=r;i?i.nodeName===`CANVAS`?i.replaceWith(n):i.classList.contains(`annotationContent`)?i.after(n):i.before(n):r.append(n)}_classPrivateFieldGet2(_annotationCanvasMap,this).clear()}var EOL_PATTERN=/\r\n?|\n/g,_color2=new WeakMap,_content=new WeakMap,_editorDivId=new WeakMap,_editModeAC=new WeakMap,_fontSize=new WeakMap,_FreeTextEditor_brand=new WeakSet,FreeTextEditor=class e extends AnnotationEditor{static get _keyboardManager(){let t=e.prototype,n=e=>e.isEmpty(),r=AnnotationEditorUIManager.TRANSLATE_SMALL,i=AnnotationEditorUIManager.TRANSLATE_BIG;return shadow(this,`_keyboardManager`,new KeyboardManager([[[`ctrl+s`,`mac+meta+s`,`ctrl+p`,`mac+meta+p`],t.commitOrRemove,{bubbles:!0}],[[`ctrl+Enter`,`mac+meta+Enter`,`Escape`,`mac+Escape`],t.commitOrRemove],[[`ArrowLeft`,`mac+ArrowLeft`],t._translateEmpty,{args:[-r,0],checker:n}],[[`ctrl+ArrowLeft`,`mac+shift+ArrowLeft`],t._translateEmpty,{args:[-i,0],checker:n}],[[`ArrowRight`,`mac+ArrowRight`],t._translateEmpty,{args:[r,0],checker:n}],[[`ctrl+ArrowRight`,`mac+shift+ArrowRight`],t._translateEmpty,{args:[i,0],checker:n}],[[`ArrowUp`,`mac+ArrowUp`],t._translateEmpty,{args:[0,-r],checker:n}],[[`ctrl+ArrowUp`,`mac+shift+ArrowUp`],t._translateEmpty,{args:[0,-i],checker:n}],[[`ArrowDown`,`mac+ArrowDown`],t._translateEmpty,{args:[0,r],checker:n}],[[`ctrl+ArrowDown`,`mac+shift+ArrowDown`],t._translateEmpty,{args:[0,i],checker:n}]]))}constructor(t){super({...t,name:`freeTextEditor`}),_classPrivateMethodInitSpec(this,_FreeTextEditor_brand),_classPrivateFieldInitSpec(this,_color2,void 0),_classPrivateFieldInitSpec(this,_content,``),_classPrivateFieldInitSpec(this,_editorDivId,`${this.id}-editor`),_classPrivateFieldInitSpec(this,_editModeAC,null),_classPrivateFieldInitSpec(this,_fontSize,void 0),_classPrivateFieldSet2(_color2,this,t.color||e._defaultColor||AnnotationEditor._defaultLineColor),_classPrivateFieldSet2(_fontSize,this,t.fontSize||e._defaultFontSize)}static initialize(e,t){AnnotationEditor.initialize(e,t);let n=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(n.getPropertyValue(`--freetext-padding`))}static updateDefaultParams(t,n){switch(t){case AnnotationEditorParamsType.FREETEXT_S
73IZE:e._defaultFontSize=n;break;case AnnotationEditorParamsType.FREETEXT_COLOR:e._defaultColor=n}}updateParams(e,t){switch(e){case AnnotationEditorParamsType.FREETEXT_SIZE:_assertClassBrand(_FreeTextEditor_brand,this,_updateFontSize).call(this,t);break;case AnnotationEditorParamsType.FREETEXT_COLOR:_assertClassBrand(_FreeTextEditor_brand,this,_updateColor).call(this,t)}}static get defaultPropertiesToUpdate(){return[[AnnotationEditorParamsType.FREETEXT_SIZE,e._defaultFontSize],[AnnotationEditorParamsType.FREETEXT_COLOR,e._defaultColor||AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[AnnotationEditorParamsType.FREETEXT_SIZE,_classPrivateFieldGet2(_fontSize,this)],[AnnotationEditorParamsType.FREETEXT_COLOR,_classPrivateFieldGet2(_color2,this)]]}_translateEmpty(e,t){this._uiManager.translateSelectedEditors(e,t,!0)}getInitialTranslation(){let t=this.parentScale;return[-e._internalPadding*t,-(e._internalPadding+_classPrivateFieldGet2(_fontSize,this))*t]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(this.isInEditMode())return;this.parent.setEditingState(!1),this.parent.updateToolbar(AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove(`enabled`),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute(`aria-activedescendant`),_classPrivateFieldSet2(_editModeAC,this,new AbortController);let e=this._uiManager.combinedSignal(_classPrivateFieldGet2(_editModeAC,this));this.editorDiv.addEventListener(`keydown`,this.editorDivKeydown.bind(this),{signal:e}),this.editorDiv.addEventListener(`focus`,this.editorDivFocus.bind(this),{signal:e}),this.editorDiv.addEventListener(`blur`,this.editorDivBlur.bind(this),{signal:e}),this.editorDiv.addEventListener(`input`,this.editorDivInput.bind(this),{signal:e}),this.editorDiv.addEventListener(`paste`,this.editorDivPaste.bind(this),{signal:e})}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add(`enabled`),this.editorDiv.contentEditable=!1,this.div.setAttribute(`aria-activedescendant`,_classPrivateFieldGet2(_editorDivId,this)),this._isDraggable=!0,_classPrivateFieldGet2(_editModeAC,this)?.abort(),_classPrivateFieldSet2(_editModeAC,this,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add(`freetextEditing`))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){this.width||(this.enableEditMode(),this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===``}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add(`freetextEditing`)),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();let e=_classPrivateFieldGet2(_content,this),t=_classPrivateFieldSet2(_content,this,_assertClassBrand(_FreeTextEditor_brand,this,_extractText).call(this).trimEnd());if(e===t)return;let n=e=>{if(_classPrivateFieldSet2(_content,this,e),!e){this.remove();return}_assertClassBrand(_FreeTextEditor_brand,this,_setContent).call(this),this._uiManager.rebuild(this),_assertClassBrand(_FreeTextEditor_brand,this,_setEditorDimensions).call(this)};this.addCommands({cmd:()=>{n(t)},undo:()=>{n(e)},mustExec:!1}),_assertClassBrand(_FreeTextEditor_brand,this,_setEditorDimensions).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(e){this.enterInEditMode()}keydown(e){e.target===this.div&&e.key===`Enter`&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(t){e._keyboardManager.exec(this,t)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle(`freetextEditing`,this.isEmpty())}disableEditing(){this.editorDiv.setAttribute(`role`,`comment`),this.editorDiv.removeAttribute(`aria-multiline`)}enableEditing(){this.editorDiv.setAttribute(`role`,`textbox`),this.editorDiv.setAttribute(`aria-multiline`,!0)}
vendor: 5,642 bytes, lines 73-79
73render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),this.editorDiv=document.createElement(`div`),this.editorDiv.className=`internal`,this.editorDiv.setAttribute(`id`,_classPrivateFieldGet2(_editorDivId,this)),this.editorDiv.setAttribute(`data-l10n-id`,`pdfjs-free-text2`),this.editorDiv.setAttribute(`data-l10n-attrs`,`default-content`),this.enableEditing(),this.editorDiv.contentEditable=!0;let{style:n}=this.editorDiv;if(n.fontSize=`calc(${_classPrivateFieldGet2(_fontSize,this)}px * var(--scale-factor))`,n.color=_classPrivateFieldGet2(_color2,this),this.div.append(this.editorDiv),this.overlayDiv=document.createElement(`div`),this.overlayDiv.classList.add(`overlay`,`enabled`),this.div.append(this.overlayDiv),bindEvents(this,this.div,[`dblclick`,`keydown`]),this.width){let[n,r]=this.parentDimensions;if(this.annotationElementId){let{position:i}=this._initialData,[a,o]=this.getInitialTranslation();[a,o]=this.pageTranslationToScreen(a,o);let[c,u]=this.pageDimensions,[K,Y]=this.pageTranslation,X,ee;switch(this.rotation){case 0:X=e+(i[0]-K)/c,ee=t+this.height-(i[1]-Y)/u;break;case 90:X=e+(i[0]-K)/c,ee=t-(i[1]-Y)/u,[a,o]=[o,-a];break;case 180:X=e-this.width+(i[0]-K)/c,ee=t-(i[1]-Y)/u,[a,o]=[-a,-o];break;case 270:X=e+(i[0]-K-this.height*u)/c,ee=t+(i[1]-Y-this.width*c)/u,[a,o]=[-o,a]}this.setAt(X*n,ee*r,a,o)}else this.setAt(e*n,t*r,this.width*n,this.height*r);_assertClassBrand(_FreeTextEditor_brand,this,_setContent).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(t){let n=t.clipboardData||window.clipboardData,{types:r}=n;if(r.length===1&&r[0]===`text/plain`)return;t.preventDefault();let i=_deserializeContent.call(e,n.getData(`text`)||``).replaceAll(EOL_PATTERN,`
74`);if(!i)return;let a=window.getSelection();if(!a.rangeCount)return;this.editorDiv.normalize(),a.deleteFromDocument();let o=a.getRangeAt(0);if(!i.includes(`
75`)){o.insertNode(document.createTextNode(i)),this.editorDiv.normalize(),a.collapseToStart();return}let{startContainer:c,startOffset:u}=o,K=[],Y=[];if(c.nodeType===Node.TEXT_NODE){let t=c.parentElement;if(Y.push(c.nodeValue.slice(u).replaceAll(EOL_PATTERN,``)),t!==this.editorDiv){let n=K;for(let r of this.editorDiv.childNodes){if(r===t){n=Y;continue}n.push(_getNodeContent.call(e,r))}}K.push(c.nodeValue.slice(0,u).replaceAll(EOL_PATTERN,``))}else if(c===this.editorDiv){let t=K,n=0;for(let r of this.editorDiv.childNodes)n++===u&&(t=Y),t.push(_getNodeContent.call(e,r))}_classPrivateFieldSet2(_content,this,`${K.join(`
76`)}${i}${Y.join(`
77`)}`),_assertClassBrand(_FreeTextEditor_brand,this,_setContent).call(this);let X=new Range,ee=K.reduce((e,t)=>e+t.length,0);for(let{firstChild:e}of this.editorDiv.childNodes)if(e.nodeType===Node.TEXT_NODE){let t=e.nodeValue.length;if(ee<=t){X.setStart(e,ee),X.setEnd(e,ee);break}ee-=t}a.removeAllRanges(),a.addRange(X)}get contentDiv(){return this.editorDiv}static async deserialize(t,n,r){let i=null;if(t instanceof FreeTextAnnotationElement){let{data:{defaultAppearanceData:{fontSize:e,fontColor:n},rect:r,rotation:a,id:o,popupRef:c},textContent:u,textPosition:K,parent:{page:{pageNumber:Y}}}=t;if(!u||u.length===0)return null;i=t={annotationType:AnnotationEditorType.FREETEXT,color:Array.from(n),fontSize:e,value:u.join(`
78`),position:K,pageIndex:Y-1,rect:r.slice(0),rotation:a,id:o,deleted:!1,popupRef:c}}let a=await super.deserialize(t,n,r);return _classPrivateFieldSet2(_fontSize,a,t.fontSize),_classPrivateFieldSet2(_color2,a,Util.makeHexColor(...t.color)),_classPrivateFieldSet2(_content,a,_deserializeContent.call(e,t.value)),a.annotationElementId=t.id||null,a._initialData=i,a}serialize(t=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let n=e._internalPadding*this.parentScale,r=this.getRect(n,n),i=AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:_classPrivateFieldGet2(_color2,this)),a={annotationType:AnnotationEditorType.FREETEXT,color:i,fontSize:_classPrivateFieldGet2(_fontSize,this),value:_assertClassBrand(_FreeTextEditor_brand,this,_serializeContent).call(this),pageIndex:this.pageIndex,rect:r,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return t?a:this.annotationElementId&&!_assertClassBrand(_FreeTextEditor_brand,this,_hasElementChanged).call(this,a)?null:(a.id=this.annotationElementId,a)}renderAnnotationElement(t){let n=super.renderAnnotationElement(t);if(this.deleted)return n;let{style:r}=n;r.fontSize=`calc(${_classPrivateFieldGet2(_fontSize,this)}px * var(--scale-factor))`,r.color=_classPrivateFieldGet2(_color2,this),n.replaceChildren();for(let e of _classPrivateFieldGet2(_content,this).split(`
79`)){let t=document.createElement(`div`);t.append(e?document.createTextNode(e):document.createElement(`br`)),n.append(t)}let i=e._internalPadding*this.parentScale;return t.updateEdited({rect:this.getRect(i,i),popupContent:_classPrivateFieldGet2(_content,this)}),n}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}};_FreeTextEditor=FreeTextEditor;function _updateFontSize(e){let t=e=>{this.editorDiv.style.fontSize=`calc(${e}px * var(--scale-factor))`,this.translate(0,-(e-_classPrivateFieldGet2(_fontSize,this))*this.parentScale),_classPrivateFieldSet2(_fontSize,this,e),_assertClassBrand(_FreeTextEditor_brand,this,_setEditorDimensions).call(this)},n=_classPrivateFieldGet2(_fontSize,this);this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.FREETEXT_S
79IZE,overwriteIfSameType:!0,keepUndo:!0})}function _updateColor(e){let t=e=>{_classPrivateFieldSet2(_color2,this,this.editorDiv.style.color=e)},n=_classPrivateFieldGet2(_color2,this);this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function _extractText(){let e=[];this.editorDiv.normalize();let t=null;for(let n of this.editorDiv.childNodes)(t?.nodeType!==Node.TEXT_NODE||n.nodeName!==`BR`)&&(e.push(_getNodeContent.call(_FreeTextEditor,n)),t=n);return e.join(`
80`)}function _setEditorDimensions(){let[e,t]=this.parentDimensions,n;if(this.isAttachedToDOM)n=this.div.getBoundingClientRect();else{let{currentLayer:e,div:t}=this,r=t.style.display,i=t.classList.contains(`hidden`);t.classList.remove(`hidden`),t.style.display=`hidden`,e.div.append(this.div),n=t.getBoundingClientRect(),t.remove(),t.style.display=r,t.classList.toggle(`hidden`,i)}this.rotation%180==this.parentRotation%180?(this.width=n.width/e,this.height=n.height/t):(this.width=n.height/e,this.height=n.width/t),this.fixAndSetPosition()}function _getNodeContent(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(EOL_PATTERN,``)}function _setContent(){if(this.editorDiv.replaceChildren(),_classPrivateFieldGet2(_content,this))for(let e of _classPrivateFieldGet2(_content,this).split(`
81`)){let t=document.createElement(`div`);t.append(e?document.createTextNode(e):document.createElement(`br`)),this.editorDiv.append(t)}}function _serializeContent(){return _classPrivateFieldGet2(_content,this).replaceAll(`\xA0`,` `)}function _deserializeContent(e){return e.replaceAll(` `,`\xA0`)}function _hasElementChanged(e){let{value:t,fontSize:n,color:r,pageIndex:i}=this._initialData;return this._hasBeenMoved||e.value!==t||e.fontSize!==n||e.color.some((e,t)=>e!==r[t])||e.pageIndex!==i}_defineProperty$6(FreeTextEditor,`_freeTextDefaultContent`,``),_defineProperty$6(FreeTextEditor,`_internalPadding`,0),_defineProperty$6(FreeTextEditor,`_defaultColor`,null),_defineProperty$6(FreeTextEditor,`_defaultFontSize`,10),_defineProperty$6(FreeTextEditor,`_type`,`freetext`),_defineProperty$6(FreeTextEditor,`_editorType`,AnnotationEditorType.FREETEXT);var Outline=class{toSVGPath(){unreachable$1("Abstract method `toSVGPath` must be implemented.")}get box(){unreachable$1("Abstract getter `box` must be implemented.")}serialize(e,t){unreachable$1("Abstract method `serialize` must be implemented.")}get classNamesForDrawing(){unreachable$1("Abstract getter `classNamesForDrawing` must be implemented.")}get classNamesForOutlining(){unreachable$1("Abstract getter `classNamesForOutlining` must be implemented.")}get mustRemoveSelfIntersections(){return!1}},_box=new WeakMap,_bottom=new WeakMap,_innerMargin=new WeakMap,_isLTR=new WeakMap,_top=new WeakMap,_last=new WeakMap,_lastX=new WeakMap,_lastY=new WeakMap,_min=new WeakMap,_min_dist=new WeakMap,_scaleFactor=new WeakMap,_thickness=new WeakMap,_points=new WeakMap,_FreeDrawOutliner_brand=new WeakSet,FreeDrawOutliner=class{constructor({x:e,y:t},n,r,i,a,o=0){_classPrivateMethodInitSpec(this,_FreeDrawOutliner_brand),_classPrivateFieldInitSpec(this,_box,void 0),_classPrivateFieldInitSpec(this,_bottom,[]),_classPrivateFieldInitSpec(this,_innerMargin,void 0),_classPrivateFieldInitSpec(this,_isLTR,void 0),_classPrivateFieldInitSpec(this,_top,[]),_classPrivateFieldInitSpec(this,_last,new Float64Array(18)),_classPrivateFieldInitSpec(this,_lastX,void 0),_classPrivateFieldInitSpec(this,_lastY,void 0),_classPrivateFieldInitSpec(this,_min,void 0),_classPrivateFieldInitSpec(this,_min_dist,void 0),_classPrivateFieldInitSpec(this,_scaleFactor,void 0),_classPrivateFieldInitSpec(this,_thickness,void 0),_classPrivateFieldInitSpec(this,_points,[]),_classPrivateFieldSet2(_box,this,n),_classPrivateFieldSet2(_thickness,this,i*r),_classPrivateFieldSet2(_isLTR,this,a),_classPrivateFieldGet2(_last,this).set([NaN,NaN,NaN,NaN,e,t],6),_classPrivateFieldSet2(_innerMargin,this,o),_classPrivateFieldSet2(_min_dist,this,_MIN_DIST._*r),_classPrivateFieldSet2(_min,this,_MIN._*r),_classPrivateFieldSet2(_scaleFactor,this,r),_classPrivateFieldGet2(_points,this).push(e,t)}isEmpty(){return isNaN(_classPrivateFieldGet2(_last,this)[8])}add({x:e,y:t}){_classPrivateFieldSet2(_lastX,this,e),_classPrivateFieldSet2(_lastY,this,t);let[n,r,i,a]=_classPrivateFieldGet2(_box,this),[o,c,u,K]=_classPrivateFieldGet2(_last,this).subarray(8,12),Y=e-u,X=t-K,ee=Math.hypot(Y,X);if(ee<_classPrivateFieldGet2(_min,this))return!1;let te=ee-_classPrivateFieldGet2(_min_dist,this),ce=te/ee,ue=ce*Y,de=ce*X,fe=o,me=c;o=u,c=K,u+=ue,K+=de,_classPrivateFieldGet2(_points,this)?.push(e,t);let ge=-de/te,Te=ue/te,Oe=ge*_classPrivateFieldGet2(_thickness,this),Ae=Te*_classPrivateFieldGet2(_thickness,this);return _classPrivateFieldGet2(_last,this).set(_classPrivateFieldGet2(_last,this).subarray(2,8),0),_classPrivateFieldGet2(_last,this).set([u+Oe,K+Ae],4),_classPrivateFieldGet2(_last,this).set(_classPrivateFieldGet2(_last,this).subarray(14,18),12),_classPrivateFieldGet2(_last,this).set([u-Oe,K-Ae],16),isNaN(_classPrivateFieldGet2(_last,this)[6])?(_classPrivateFieldGet2(_top,this).length===0&&(_classPrivateFieldGet2(_last,this).set([o+Oe,c+Ae],2),_classPrivateFieldGet2(_top,this).push(NaN,NaN,NaN,NaN,(o+Oe-n)/i,(c+Ae-r)/a),_classPrivateFieldGet2(_last,this).set([o-Oe,c-Ae],14),_classPrivateFieldGet2(_bottom,this).push(NaN,NaN,NaN,NaN,(o-Oe-n)/i,(c-Ae-r)/a)),_classPrivateFieldGet2(_last,this).set([fe,me,o,c,u,K],6),!this.isEmpty()):(_classPrivateFieldGet2(_last,this).set([fe,me,o,c,u,K],6),Math.abs(Math.atan2(me-c,fe-o)-Math.atan2(de,ue))<Math.PI/2?([o,c,u,K]=_classPrivateFieldGet2(_last,this).subarray(2,6),_classPrivateFieldGet2(_top,this).push(NaN,NaN,NaN,NaN,((o+u)/2-n)/i,((c+K)/2-r)/a),[o,c,fe,me]=_classPrivateFieldGet2(_last,this).subarray(14,18),_classPrivateFieldGet2(_bottom,this).push(NaN,NaN,NaN,NaN,((fe+o)/2-n)/i,((me+c)/2-r)/a),!0):([fe,me,o,c,u,K]=_classPrivateFieldGet2(_last,this).subarray(0,6),_classPrivateFieldGet2(_top,this).push(((fe+5*o)/6-n)/i,((me+5*c)/6-r)/a,((5*o+u)/6-n)/i,((5*c+K)/6-r)/a,((o+u)/2-n)/i,((c+K)/2-r)/a),[u,K,o,
81c,fe,me]=_classPrivateFieldGet2(_last,this).subarray(12,18),_classPrivateFieldGet2(_bottom,this).push(((fe+5*o)/6-n)/i,((me+5*c)/6-r)/a,((5*o+u)/6-n)/i,((5*c+K)/6-r)/a,((o+u)/2-n)/i,((c+K)/2-r)/a),!0))}toSVGPath(){if(this.isEmpty())return``;let e=_classPrivateFieldGet2(_top,this),t=_classPrivateFieldGet2(_bottom,this);if(isNaN(_classPrivateFieldGet2(_last,this)[6])&&!this.isEmpty())return _assertClassBrand(_FreeDrawOutliner_brand,this,_toSVGPathTwoPoints).call(this);let n=[];n.push(`M${e[4]} ${e[5]}`);for(let t=6;t<e.length;t+=6)isNaN(e[t])?n.push(`L${e[t+4]} ${e[t+5]}`):n.push(`C${e[t]} ${e[t+1]} ${e[t+2]} ${e[t+3]} ${e[t+4]} ${e[t+5]}`);_assertClassBrand(_FreeDrawOutliner_brand,this,_toSVGPathEnd).call(this,n);for(let e=t.length-6;e>=6;e-=6)isNaN(t[e])?n.push(`L${t[e+4]} ${t[e+5]}`):n.push(`C${t[e]} ${t[e+1]} ${t[e+2]} ${t[e+3]} ${t[e+4]} ${t[e+5]}`);return _assertClassBrand(_FreeDrawOutliner_brand,this,_toSVGPathStart).call(this,n),n.join(` `)}newFreeDrawOutline(e,t,n,r,i,a){return new FreeDrawOutline(e,t,n,r,i,a)}getOutlines(){let e=_classPrivateFieldGet2(_top,this),t=_classPrivateFieldGet2(_bottom,this),n=_classPrivateFieldGet2(_last,this),[r,i,a,o]=_classPrivateFieldGet2(_box,this),c=new Float64Array((_classPrivateFieldGet2(_points,this)?.length??0)+2);for(let e=0,t=c.length-2;e<t;e+=2)c[e]=(_classPrivateFieldGet2(_points,this)[e]-r)/a,c[e+1]=(_classPrivateFieldGet2(_points,this)[e+1]-i)/o;if(c[c.length-2]=(_classPrivateFieldGet2(_lastX,this)-r)/a,c[c.length-1]=(_classPrivateFieldGet2(_lastY,this)-i)/o,isNaN(n[6])&&!this.isEmpty())return _assertClassBrand(_FreeDrawOutliner_brand,this,_getOutlineTwoPoints).call(this,c);let u=new Float64Array(_classPrivateFieldGet2(_top,this).length+24+_classPrivateFieldGet2(_bottom,this).length),K=e.length;for(let t=0;t<K;t+=2){if(isNaN(e[t])){u[t]=u[t+1]=NaN;continue}u[t]=e[t],u[t+1]=e[t+1]}K=_assertClassBrand(_FreeDrawOutliner_brand,this,_getOutlineEnd).call(this,u,K);for(let e=t.length-6;e>=6;e-=6)for(let n=0;n<6;n+=2){if(isNaN(t[e+n])){u[K]=u[K+1]=NaN,K+=2;continue}u[K]=t[e+n],u[K+1]=t[e+n+1],K+=2}return _assertClassBrand(_FreeDrawOutliner_brand,this,_getOutlineStart).call(this,u,K),this.newFreeDrawOutline(u,c,_classPrivateFieldGet2(_box,this),_classPrivateFieldGet2(_scaleFactor,this),_classPrivateFieldGet2(_innerMargin,this),_classPrivateFieldGet2(_isLTR,this))}};function _getLastCoords(){let e=_classPrivateFieldGet2(_last,this).subarray(4,6),t=_classPrivateFieldGet2(_last,this).subarray(16,18),[n,r,i,a]=_classPrivateFieldGet2(_box,this);return[(_classPrivateFieldGet2(_lastX,this)+(e[0]-t[0])/2-n)/i,(_classPrivateFieldGet2(_lastY,this)+(e[1]-t[1])/2-r)/a,(_classPrivateFieldGet2(_lastX,this)+(t[0]-e[0])/2-n)/i,(_classPrivateFieldGet2(_lastY,this)+(t[1]-e[1])/2-r)/a]}function _toSVGPathTwoPoints(){let[e,t,n,r]=_classPrivateFieldGet2(_box,this),[i,a,o,c]=_assertClassBrand(_FreeDrawOutliner_brand,this,_getLastCoords).call(this);return`M${(_classPrivateFieldGet2(_last,this)[2]-e)/n} ${(_classPrivateFieldGet2(_last,this)[3]-t)/r} L${(_classPrivateFieldGet2(_last,this)[4]-e)/n} ${(_classPrivateFieldGet2(_last,this)[5]-t)/r} L${i} ${a} L${o} ${c} L${(_classPrivateFieldGet2(_last,this)[16]-e)/n} ${(_classPrivateFieldGet2(_last,this)[17]-t)/r} L${(_classPrivateFieldGet2(_last,this)[14]-e)/n} ${(_classPrivateFieldGet2(_last,this)[15]-t)/r} Z`}function _toSVGPathStart(e){let t=_classPrivateFieldGet2(_bottom,this);e.push(`L${t[4]} ${t[5]} Z`)}function _toSVGPathEnd(e){let[t,n,r,i]=_classPrivateFieldGet2(_box,this),a=_classPrivateFieldGet2(_last,this).subarray(4,6),o=_classPrivateFieldGet2(_last,this).subarray(16,18),[c,u,K,Y]=_assertClassBrand(_FreeDrawOutliner_brand,this,_getLastCoords).call(this);e.push(`L${(a[0]-t)/r} ${(a[1]-n)/i} L${c} ${u} L${K} ${Y} L${(o[0]-t)/r} ${(o[1]-n)/i}`)}function _getOutlineTwoPoints(e){let t=_classPrivateFieldGet2(_last,this),[n,r,i,a]=_classPrivateFieldGet2(_box,this),[o,c,u,K]=_assertClassBrand(_FreeDrawOutliner_brand,this,_getLastCoords).call(this),Y=new Float64Array(36);return Y.set([NaN,NaN,NaN,NaN,(t[2]-n)/i,(t[3]-r)/a,NaN,NaN,NaN,NaN,(t[4]-n)/i,(t[5]-r)/a,NaN,NaN,NaN,NaN,o,c,NaN,NaN,NaN,NaN,u,K,NaN,NaN,NaN,NaN,(t[16]-n)/i,(t[17]-r)/a,NaN,NaN,NaN,NaN,(t[14]-n)/i,(t[15]-r)/a],0),this.newFreeDrawOutline(Y,e,_classPrivateFieldGet2(_box,this),_classPrivateFieldGet2(_scaleFactor,this),_classPrivateFieldGet2(_innerMargin,this),_classPrivateFieldGet2(_isLTR,this))}function _getOutlineStart(e,t){let n=_classPrivateFieldGet2(_bottom,this);return e.set([NaN,NaN,NaN,NaN,n[4],n[5]],t),t+=6}function _getOutlineEnd(e,t){let n=_classPrivateFieldGet2(_last,this).subarray(4,6),r=_classPrivateFieldGet2(_last,this).subarray(16,18),[i,a,o,c]=_classPrivateFieldGet2(_box,this),[u,K,Y,X]=_assertClassBrand(_FreeDrawOutliner_brand,this,_getLastCoords).call(this);return e.set([NaN,NaN,NaN,NaN,(n[0]-i)/o,(n[1]-a)/c,NaN,NaN,NaN,NaN,u,K,NaN,NaN,NaN,NaN,Y,X,NaN,NaN,NaN,NaN,(r[0]-i)/o,(r[1]-a)/c],t),t+=24}var _MIN_DIST={_:8},_MIN={_:_MIN_DIST._+{_:2}._},_box2=new WeakMap,_bbox2=new WeakMap,_innerMargin2=new WeakMap,_isLTR2=new WeakMap,_points2=ne
81w WeakMap,_scaleFactor2=new WeakMap,_outline=new WeakMap,_FreeDrawOutline_brand=new WeakSet,FreeDrawOutline=class extends Outline{constructor(e,t,n,r,i,a){super(),_classPrivateMethodInitSpec(this,_FreeDrawOutline_brand),_classPrivateFieldInitSpec(this,_box2,void 0),_classPrivateFieldInitSpec(this,_bbox2,null),_classPrivateFieldInitSpec(this,_innerMargin2,void 0),_classPrivateFieldInitSpec(this,_isLTR2,void 0),_classPrivateFieldInitSpec(this,_points2,void 0),_classPrivateFieldInitSpec(this,_scaleFactor2,void 0),_classPrivateFieldInitSpec(this,_outline,void 0),_classPrivateFieldSet2(_outline,this,e),_classPrivateFieldSet2(_points2,this,t),_classPrivateFieldSet2(_box2,this,n),_classPrivateFieldSet2(_scaleFactor2,this,r),_classPrivateFieldSet2(_innerMargin2,this,i),_classPrivateFieldSet2(_isLTR2,this,a),_assertClassBrand(_FreeDrawOutline_brand,this,_computeMinMax).call(this,a);let{x:o,y:c,width:u,height:K}=_classPrivateFieldGet2(_bbox2,this);for(let t=0,n=e.length;t<n;t+=2)e[t]=(e[t]-o)/u,e[t+1]=(e[t+1]-c)/K;for(let e=0,n=t.length;e<n;e+=2)t[e]=(t[e]-o)/u,t[e+1]=(t[e+1]-c)/K}toSVGPath(){let e=[`M${_classPrivateFieldGet2(_outline,this)[4]} ${_classPrivateFieldGet2(_outline,this)[5]}`];for(let t=6,n=_classPrivateFieldGet2(_outline,this).length;t<n;t+=6){if(isNaN(_classPrivateFieldGet2(_outline,this)[t])){e.push(`L${_classPrivateFieldGet2(_outline,this)[t+4]} ${_classPrivateFieldGet2(_outline,this)[t+5]}`);continue}e.push(`C${_classPrivateFieldGet2(_outline,this)[t]} ${_classPrivateFieldGet2(_outline,this)[t+1]} ${_classPrivateFieldGet2(_outline,this)[t+2]} ${_classPrivateFieldGet2(_outline,this)[t+3]} ${_classPrivateFieldGet2(_outline,this)[t+4]} ${_classPrivateFieldGet2(_outline,this)[t+5]}`)}return e.push(`Z`),e.join(` `)}serialize([e,t,n,r],i){let a=n-e,o=r-t,c,u;switch(i){case 0:c=_assertClassBrand(_FreeDrawOutline_brand,this,_rescale).call(this,_classPrivateFieldGet2(_outline,this),e,r,a,-o),u=_assertClassBrand(_FreeDrawOutline_brand,this,_rescale).call(this,_classPrivateFieldGet2(_points2,this),e,r,a,-o);break;case 90:c=_assertClassBrand(_FreeDrawOutline_brand,this,_rescaleAndSwap).call(this,_classPrivateFieldGet2(_outline,this),e,t,a,o),u=_assertClassBrand(_FreeDrawOutline_brand,this,_rescaleAndSwap).call(this,_classPrivateFieldGet2(_points2,this),e,t,a,o);break;case 180:c=_assertClassBrand(_FreeDrawOutline_brand,this,_rescale).call(this,_classPrivateFieldGet2(_outline,this),n,t,-a,o),u=_assertClassBrand(_FreeDrawOutline_brand,this,_rescale).call(this,_classPrivateFieldGet2(_points2,this),n,t,-a,o);break;case 270:c=_assertClassBrand(_FreeDrawOutline_brand,this,_rescaleAndSwap).call(this,_classPrivateFieldGet2(_outline,this),n,r,-a,-o),u=_assertClassBrand(_FreeDrawOutline_brand,this,_rescaleAndSwap).call(this,_classPrivateFieldGet2(_points2,this),n,r,-a,-o)}return{outline:Array.from(c),points:[Array.from(u)]}}get box(){return _classPrivateFieldGet2(_bbox2,this)}newOutliner(e,t,n,r,i,a=0){return new FreeDrawOutliner(e,t,n,r,i,a)}getNewOutline(e,t){let{x:n,y:r,width:i,height:a}=_classPrivateFieldGet2(_bbox2,this),[o,c,u,K]=_classPrivateFieldGet2(_box2,this),Y=i*u,X=a*K,ee=n*u+o,te=r*K+c,ce=this.newOutliner({x:_classPrivateFieldGet2(_points2,this)[0]*Y+ee,y:_classPrivateFieldGet2(_points2,this)[1]*X+te},_classPrivateFieldGet2(_box2,this),_classPrivateFieldGet2(_scaleFactor2,this),e,_classPrivateFieldGet2(_isLTR2,this),t??_classPrivateFieldGet2(_innerMargin2,this));for(let e=2;e<_classPrivateFieldGet2(_points2,this).length;e+=2)ce.add({x:_classPrivateFieldGet2(_points2,this)[e]*Y+ee,y:_classPrivateFieldGet2(_points2,this)[e+1]*X+te});return ce.getOutlines()}get mustRemoveSelfIntersections(){return!0}};function _rescale(e,t,n,r,i){let a=new Float64Array(e.length);for(let o=0,c=e.length;o<c;o+=2)a[o]=t+e[o]*r,a[o+1]=n+e[o+1]*i;return a}function _rescaleAndSwap(e,t,n,r,i){let a=new Float64Array(e.length);for(let o=0,c=e.length;o<c;o+=2)a[o]=t+e[o+1]*r,a[o+1]=n+e[o]*i;return a}function _computeMinMax(e){let t=_classPrivateFieldGet2(_outline,this),n=t[4],r=t[5],i=n,a=r,o=n,c=r,u=n,K=r,Y=e?Math.max:Math.min;for(let e=6,X=t.length;e<X;e+=6){if(isNaN(t[e]))i=Math.min(i,t[e+4]),a=Math.min(a,t[e+5]),o=Math.max(o,t[e+4]),c=Math.max(c,t[e+5]),K<t[e+5]?(u=t[e+4],K=t[e+5]):K===t[e+5]&&(u=Y(u,t[e+4]));else{let X=Util.bezierBoundingBox(n,r,...t.slice(e,e+6));
81i=Math.min(i,X[0]),a=Math.min(a,X[1]),o=Math.max(o,X[2]),c=Math.max(c,X[3]),K<X[3]?(u=X[2],K=X[3]):K===X[3]&&(u=Y(u,X[2]))}n=t[e+4],r=t[e+5]}let X=i-_classPrivateFieldGet2(_innerMargin2,this),ee=a-_classPrivateFieldGet2(_innerMargin2,this),te=o-i+2*_classPrivateFieldGet2(_innerMargin2,this),ce=c-a+2*_classPrivateFieldGet2(_innerMargin2,this);_classPrivateFieldSet2(_bbox2,this,{x:X,y:ee,width:te,height:ce,lastPoint:[u,K]})}var _box3=new WeakMap,_verticalEdges=new WeakMap,_intervals=new WeakMap,_HighlightOutliner_brand=new WeakSet,HighlightOutliner=class{constructor(e,t=0,n=0,r=!0){_classPrivateMethodInitSpec(this,_HighlightOutliner_brand),_classPrivateFieldInitSpec(this,_box3,void 0),_classPrivateFieldInitSpec(this,_verticalEdges,[]),_classPrivateFieldInitSpec(this,_intervals,[]);let i=1/0,a=-1/0,o=1/0,c=-1/0,u=10**-4;for(let{x:n,y:r,width:K,height:Y}of e){let e=Math.floor((n-t)/u)*u,X=Math.ceil((n+K+t)/u)*u,ee=Math.floor((r-t)/u)*u,te=Math.ceil((r+Y+t)/u)*u,ce=[e,ee,te,!0],ue=[X,ee,te,!1];_classPrivateFieldGet2(_verticalEdges,this).push(ce,ue),i=Math.min(i,e),a=Math.max(a,X),o=Math.min(o,ee),c=Math.max(c,te)}let K=a-i+2*n,Y=c-o+2*n,X=i-n,ee=o-n,te=_classPrivateFieldGet2(_verticalEdges,this).at(r?-1:-2),ce=[te[0],te[2]];for(let e of _classPrivateFieldGet2(_verticalEdges,this)){let[t,n,r]=e;e[0]=(t-X)/K,e[1]=(n-ee)/Y,e[2]=(r-ee)/Y}_classPrivateFieldSet2(_box3,this,{x:X,y:ee,width:K,height:Y,lastPoint:ce})}getOutlines(){_classPrivateFieldGet2(_verticalEdges,this).sort((e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2]);let e=[];for(let t of _classPrivateFieldGet2(_verticalEdges,this))t[3]?(e.push(..._assertClassBrand(_HighlightOutliner_brand,this,_breakEdge).call(this,t)),_assertClassBrand(_HighlightOutliner_brand,this,_insert).call(this,t)):(_assertClassBrand(_HighlightOutliner_brand,this,_remove).call(this,t),e.push(..._assertClassBrand(_HighlightOutliner_brand,this,_breakEdge).call(this,t)));return _assertClassBrand(_HighlightOutliner_brand,this,_getOutlines).call(this,e)}};function _getOutlines(e){let t=[],n=new Set;for(let n of e){let[e,r,i]=n;t.push([e,r,n],[e,i,n])}t.sort((e,t)=>e[1]-t[1]||e[0]-t[0]);for(let e=0,r=t.length;e<r;e+=2){let r=t[e][2],i=t[e+1][2];r.push(i),i.push(r),n.add(r),n.add(i)}let r=[],i;for(;n.size>0;){let e=n.values().next().value,[t,a,o,c,u]=e;n.delete(e);let K=t,Y=a;for(i=[t,o],r.push(i);;){let e;if(n.has(c))e=c;else if(n.has(u))e=u;else break;n.delete(e),[t,a,o,c,u]=e,K!==t&&(i.push(K,Y,t,Y===a?a:o),K=t),Y=Y===a?o:a}i.push(K,Y)}return new HighlightOutline(r,_classPrivateFieldGet2(_box3,this))}function _binarySearch(e){let t=_classPrivateFieldGet2(_intervals,this),n=0,r=t.length-1;for(;n<=r;){let i=n+r>>1,a=t[i][0];if(a===e)return i;a<e?n=i+1:r=i-1}return r+1}function _insert([,e,t]){let n=_assertClassBrand(_HighlightOutliner_brand,this,_binarySearch).call(this,e);_classPrivateFieldGet2(_intervals,this).splice(n,0,[e,t])}function _remove([,e,t]){let n=_assertClassBrand(_HighlightOutliner_brand,this,_binarySearch).call(this,e);for(let r=n;r<_classPrivateFieldGet2(_intervals,this).length;r++){let[n,i]=_classPrivateFieldGet2(_intervals,this)[r];if(n!==e)break;if(n===e&&i===t){_classPrivateFieldGet2(_intervals,this).splice(r,1);return}}for(let r=n-1;r>=0;r--){let[n,i]=_classPrivateFieldGet2(_intervals,this)[r];if(n!==e)break;if(n===e&&i===t){_classPrivateFieldGet2(_intervals,this).splice(r,1);return}}}function _breakEdge(e){let[t,n,r]=e,i=[[t,n,r]],a=_assertClassBrand(_HighlightOutliner_brand,this,_binarySearch).call(this,r);for(let e=0;e<a;e++){let[n,r]=_classPrivateFieldGet2(_intervals,this)[e];for(let e=0,a=i.length;e<a;e++){let[,o,c]=i[e];if(!(r<=o||c<=n)){if(o>=n){if(c>r)i[e][1]=r;else{if(a===1)return[];i.splice(e,1),e--,a--}continue}i[e][2]=n,c>r&&i.push([t,r,c])}}}return i}var _box4=new WeakMap,_outlines=new WeakMap,HighlightOutline=class extends Outline{constructor(e,t){super(),_classPrivateFieldInitSpec(this,_box4,void 0),_classPrivateFieldInitSpec(this,_outlines,void 0),_classPrivateFieldSet2(_outlines,this,e),_classPrivateFieldSet2(_box4,this,t)}toSVGPath(){let e=[];for(let t of _classPrivateFieldGet2(_outlines,this)){let[n,r]=t;e.push(`M${n} ${r}`);for(let i=2;i<t.length;i+=2){let a=t[i],o=t[i+1];a===n?(e.push(`V${o}`),r=o):o===r&&(e.push(`H${a}`),n=a)}e.push(`Z`)}return e.join(` `)}serialize([e,t,n,r],i){let a=[],o=n-e,c=r-t;for(let t of _classPrivateFieldGet2(_outlines,this)){let n=Array(t.length);for(let i=0;i<t.length;i+=2)n[i]=e+t[i]*o,n[i+1]=r-t[i+1]*c;a.push(n)}return a}get box(){return _classPrivateFieldGet2(_box4,this)}get classNamesForDrawing(){return[`highlight`]}get classNamesForOutlining(){return[`highlightOutline`]}},FreeHighlightOutliner=class extends FreeDrawOutliner{newFreeDrawOutline(e,t,n,r,i,a){return new FreeHighlightOutline(e,t,n,r,i,a)}get classNamesForDrawing(){return[`highlight`,`free`]}},FreeHighlightOutline=class extends FreeDrawOutline{get classNamesForDrawing(){return[`highlight`,`free`]}get classNamesForOutlining(){return[`highlightOutline`,`free`]}newOutliner(e,t,n,r,i,a=0){return new FreeHighlightOutliner(e,t,n,r,i,a)}},_button=new WeakMap,_buttonSwatch=new WeakMap,_defaultColor=new WeakMap,_dropdown=new WeakMap,_dropdownWasFromKeyboard=new WeakMap,_isMainColorPicker=new WeakMap,_editor3=new WeakMap,_eventBus=new WeakMap,_openDropdownAC=new WeakMap,_uiManager3=new WeakMap,_type2=new WeakMap,_ColorPicker_brand=new WeakSet,ColorPicker=class e{static get _keyboardManager(){return shadow(this,`_keyboardManager`,new KeyboardManager([[[`Escape`,`mac+Escape`],e.prototype._hideDropdownFromKeyboard],[[` `,`mac+ `],e.prototype._colorSelectFromKeyboard],[[`ArrowDown`,`ArrowRight`,`mac+ArrowDown`,`mac+ArrowRight`],e.prototype._moveToNext],[[`ArrowUp`,`ArrowLeft`,`mac+ArrowUp`,`mac+ArrowLeft`],e.prototype._moveToPrevious],[[`Home`,`mac+Home`],e.prototype._moveToBeginning],[[`End`,`mac+End`],e.prototype._moveToEnd]]))}constructor({editor:e=null,uiManager:t=null}){_classPrivateMethodInitSpec(this,_ColorPicker_brand),_classPrivateFieldInitSpec(this,_button,null),_classPrivateFieldInitSpec(this,_buttonSwatch,null),_classPrivateFieldInitSpec(this,_defaultColor,void 0),_classPrivateFieldInitSpec(this,_dropdown,null),_classPrivateFieldInitSpec(this,_dropdownWasFromKeyboard,!1),_classPrivateFieldInitSpec(this,_isMainColorPicker,!1),_classPrivateFieldInitSpec(this,_editor3,null),_classPrivateFieldInitSpec(this,_eventBus,void 0),_classPrivateFieldInitSpec(this,_openDropdownAC,null),_classPrivateFieldInitSpec(this,_uiManager3,null),_classPrivateFieldInitSpec(this,_type2,void 0),e?(_classPrivateFieldSet2(_isMainColorPicker,this,!1),_classPrivateFieldSet2(_type2,this,AnnotationEditorParamsType.HIGHLIGHT_COLOR),_classPrivateFieldSet2(_editor3,this,e)):(_classPrivateFieldSet2(_isMainColorPicker,this,!0),_classPrivateFieldSet2(_type2,this,AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR)),_classPrivateFieldSet2(_uiManager3,this,e?._uiManager||t),_classPrivateFieldSet2(_eventBus,this,_classPrivateFieldGet2(_uiManager3,this)._eventBus),_classPrivateFieldSet2(_defaultColor,this,e?.color||_classPrivateFieldGet2(_uiManager3,this)?.highlightColors.values().next().value||`#FFFF98`),_l10nColor._||=Object.freeze({blue:`pdfjs-editor-colorpicker-blue`,green:`pdfjs-editor-colorpicker-green`,pink:`pdfjs-editor-colorpicker-pink`,red:`pdfjs-editor-colorpicker-red`,yellow:`pdfjs-editor-colorpicker-yellow`})}renderButton(){let e=_classPrivateFieldSet2(_button,this,document.createElement(`button`));e.className=`colorPicker`,e.tabIndex=`0`,e.setAttribute(`data-l10n-id`,`pdfjs-editor-colorpicker-button`),e.setAttribute(`aria-haspopup`,!0);let t=_classPrivateFieldGet2(_uiManager3,this)._signal;e.addEventListener(`click`,_assertClassBrand(_ColorPicker_brand,this,_openDropdown).bind(this),{signal:t}
81),e.addEventListener(`keydown`,_assertClassBrand(_ColorPicker_brand,this,_keyDown2).bind(this),{signal:t});let n=_classPrivateFieldSet2(_buttonSwatch,this,document.createElement(`span`));return n.className=`swatch`,n.setAttribute(`aria-hidden`,!0),n.style.backgroundColor=_classPrivateFieldGet2(_defaultColor,this),e.append(n),e}renderMainDropdown(){let e=_classPrivateFieldSet2(_dropdown,this,_assertClassBrand(_ColorPicker_brand,this,_getDropdownRoot).call(this));return e.setAttribute(`aria-orientation`,`horizontal`),e.setAttribute(`aria-labelledby`,`highlightColorPickerLabel`),e}_colorSelectFromKeyboard(e){if(e.target===_classPrivateFieldGet2(_button,this)){_assertClassBrand(_ColorPicker_brand,this,_openDropdown).call(this,e);return}let t=e.target.getAttribute(`data-color`);t&&_assertClassBrand(_ColorPicker_brand,this,_colorSelect).call(this,t,e)}_moveToNext(e){if(!_get_isDropdownVisible.call(_assertClassBrand(_ColorPicker_brand,this))){_assertClassBrand(_ColorPicker_brand,this,_openDropdown).call(this,e);return}if(e.target===_classPrivateFieldGet2(_button,this)){_classPrivateFieldGet2(_dropdown,this).firstChild?.focus();return}e.target.nextSibling?.focus()}_moveToPrevious(e){if(e.target===_classPrivateFieldGet2(_dropdown,this)?.firstChild||e.target===_classPrivateFieldGet2(_button,this)){_get_isDropdownVisible.call(_assertClassBrand(_ColorPicker_brand,this))&&this._hideDropdownFromKeyboard();return}_get_isDropdownVisible.call(_assertClassBrand(_ColorPicker_brand,this))||_assertClassBrand(_ColorPicker_brand,this,_openDropdown).call(this,e),e.target.previousSibling?.focus()}_moveToBeginning(e){if(!_get_isDropdownVisible.call(_assertClassBrand(_ColorPicker_brand,this))){_assertClassBrand(_ColorPicker_brand,this,_openDropdown).call(this,e);return}_classPrivateFieldGet2(_dropdown,this).firstChild?.focus()}_moveToEnd(e){if(!_get_isDropdownVisible.call(_assertClassBrand(_ColorPicker_brand,this))){_assertClassBrand(_ColorPicker_brand,this,_openDropdown).call(this,e);return}_classPrivateFieldGet2(_dropdown,this).lastChild?.focus()}hideDropdown(){_classPrivateFieldGet2(_dropdown,this)?.classList.add(`hidden`),_classPrivateFieldGet2(_openDropdownAC,this)?.abort(),_classPrivateFieldSet2(_openDropdownAC,this,null)}_hideDropdownFromKeyboard(){if(!_classPrivateFieldGet2(_isMainColorPicker,this)){if(!_get_isDropdownVisible.call(_assertClassBrand(_ColorPicker_brand,this))){_classPrivateFieldGet2(_editor3,this)?.unselect();return}this.hideDropdown(),_classPrivateFieldGet2(_button,this).focus({preventScroll:!0,focusVisible:_classPrivateFieldGet2(_dropdownWasFromKeyboard,this)})}}updateColor(e){if(_classPrivateFieldGet2(_buttonSwatch,this)&&(_classPrivateFieldGet2(_buttonSwatch,this).style.backgroundColor=e),!_classPrivateFieldGet2(_dropdown,this))return;let t=_classPrivateFieldGet2(_uiManager3,this).highlightColors.values();for(let n of _classPrivateFieldGet2(_dropdown,this).children)n.setAttribute(`aria-selected`,t.next().value===e)}destroy(){_classPrivateFieldGet2(_button,this)?.remove(),_classPrivateFieldSet2(_button,this,null),_classPrivateFieldSet2(_buttonSwatch,this,null),_classPrivateFieldGet2(_dropdown,this)?.remove(),_classPrivateFieldSet2(_dropdown,this,null)}};_ColorPicker=ColorPicker;function _getDropdownRoot(){let e=document.createElement(`div`),t=_classPrivateFieldGet2(_uiManager3,this)._signal;e.addEventListener(`contextmenu`,noContextMenu,{signal:t}),e.className=`dropdown`,e.role=`listbox`,e.setAttribute(`aria-multiselectable`,!1),e.setAttribute(`aria-orientation`,`vertical`),e.setAttribute(`data-l10n-id`,`pdfjs-editor-colorpicker-dropdown`);for(let[n,r]of _classPrivateFieldGet2(_uiManager3,this).highlightColors){let i=document.createElement(`button`);i.tabIndex=`0`,i.role=`option`,i.setAttribute(`data-color`,r),i.title=n,i.setAttribute(`data-l10n-id`,_l10nColor._[n]);let a=document.createElement(`span`);i.append(a),a.className=`swatch`,a.style.backgroundColor=r,i.setAttribute(`aria-selected`,r===_classPrivateFieldGet2(_defaultColor,this)),i.addEventListener(`click`,_assertClassBrand(_ColorPicker_brand,this,_colorSelect).bind(this,r),{signal:t}),e.append(i)}
81return e.addEventListener(`keydown`,_assertClassBrand(_ColorPicker_brand,this,_keyDown2).bind(this),{signal:t}),e}function _colorSelect(e,t){t.stopPropagation(),_classPrivateFieldGet2(_eventBus,this).dispatch(`switchannotationeditorparams`,{source:this,type:_classPrivateFieldGet2(_type2,this),value:e})}function _keyDown2(e){_ColorPicker._keyboardManager.exec(this,e)}function _openDropdown(e){if(_get_isDropdownVisible.call(_assertClassBrand(_ColorPicker_brand,this))){this.hideDropdown();return}if(_classPrivateFieldSet2(_dropdownWasFromKeyboard,this,e.detail===0),_classPrivateFieldGet2(_openDropdownAC,this)||(_classPrivateFieldSet2(_openDropdownAC,this,new AbortController),window.addEventListener(`pointerdown`,_assertClassBrand(_ColorPicker_brand,this,_pointerDown2).bind(this),{signal:_classPrivateFieldGet2(_uiManager3,this).combinedSignal(_classPrivateFieldGet2(_openDropdownAC,this))})),_classPrivateFieldGet2(_dropdown,this)){_classPrivateFieldGet2(_dropdown,this).classList.remove(`hidden`);return}let t=_classPrivateFieldSet2(_dropdown,this,_assertClassBrand(_ColorPicker_brand,this,_getDropdownRoot).call(this));_classPrivateFieldGet2(_button,this).append(t)}function _pointerDown2(e){_classPrivateFieldGet2(_dropdown,this)?.contains(e.target)||this.hideDropdown()}function _get_isDropdownVisible(){return _classPrivateFieldGet2(_dropdown,this)&&!_classPrivateFieldGet2(_dropdown,this).classList.contains(`hidden`)}var _l10nColor={_:null},_anchorNode=new WeakMap,_anchorOffset=new WeakMap,_boxes=new WeakMap,_clipPathId=new WeakMap,_colorPicker2=new WeakMap,_focusOutlines=new WeakMap,_focusNode=new WeakMap,_focusOffset=new WeakMap,_highlightDiv=new WeakMap,_highlightOutlines=new WeakMap,_id4=new WeakMap,_isFreeHighlight=new WeakMap,_lastPoint=new WeakMap,_opacity=new WeakMap,_outlineId=new WeakMap,_text=new WeakMap,_thickness2=new WeakMap,_methodOfCreation=new WeakMap,_HighlightEditor_brand=new WeakSet,HighlightEditor=class e extends AnnotationEditor{static get _keyboardManager(){let t=e.prototype;return shadow(this,`_keyboardManager`,new KeyboardManager([[[`ArrowLeft`,`mac+ArrowLeft`],t._moveCaret,{args:[0]}],[[`ArrowRight`,`mac+ArrowRight`],t._moveCaret,{args:[1]}],[[`ArrowUp`,`mac+ArrowUp`],t._moveCaret,{args:[2]}],[[`ArrowDown`,`mac+ArrowDown`],t._moveCaret,{args:[3]}]]))}constructor(t){super({...t,name:`highlightEditor`}),_classPrivateMethodInitSpec(this,_HighlightEditor_brand),_classPrivateFieldInitSpec(this,_anchorNode,null),_classPrivateFieldInitSpec(this,_anchorOffset,0),_classPrivateFieldInitSpec(this,_boxes,void 0),_classPrivateFieldInitSpec(this,_clipPathId,null),_classPrivateFieldInitSpec(this,_colorPicker2,null),_classPrivateFieldInitSpec(this,_focusOutlines,null),_classPrivateFieldInitSpec(this,_focusNode,null),_classPrivateFieldInitSpec(this,_focusOffset,0),_classPrivateFieldInitSpec(this,_highlightDiv,null),_classPrivateFieldInitSpec(this,_highlightOutlines,null),_classPrivateFieldInitSpec(this,_id4,null),_classPrivateFieldInitSpec(this,_isFreeHighlight,!1),_classPrivateFieldInitSpec(this,_lastPoint,null),_classPrivateFieldInitSpec(this,_opacity,void 0),_classPrivateFieldInitSpec(this,_outlineId,null),_classPrivateFieldInitSpec(this,_text,``),_classPrivateFieldInitSpec(this,_thickness2,void 0),_classPrivateFieldInitSpec(this,_methodOfCreation,``),this.color=t.color||e._defaultColor,_classPrivateFieldSet2(_thickness2,this,t.thickness||e._defaultThickness),_classPrivateFieldSet2(_opacity,this,t.opacity||e._defaultOpacity),_classPrivateFieldSet2(_boxes,this,t.boxes||null),_classPrivateFieldSet2(_methodOfCreation,this,t.methodOfCreation||``),_classPrivateFieldSet2(_text,this,t.text||``),this._isDraggable=!1,t.highlightId>-1?(_classPrivateFieldSet2(_isFreeHighlight,this,!0),_assertClassBrand(_HighlightEditor_brand,this,_createFreeOutlines).call(this,t),_assertClassBrand(_HighlightEditor_brand,this,_addToDrawLayer).call(this)):_classPrivateFieldGet2(_boxes,this)&&(_classPrivateFieldSet2(_anchorNode,this,t.anchorNode),_classPrivateFieldSet2(_anchorOffset,this,t.anchorOffset),_classPrivateFieldSet2(_focusNode,this,t.focusNode),_classPrivateFieldSet2(_focusOffset,this,t.focu
81sOffset),_assertClassBrand(_HighlightEditor_brand,this,_createOutlines).call(this),_assertClassBrand(_HighlightEditor_brand,this,_addToDrawLayer).call(this),this.rotate(this.rotation))}get telemetryInitialData(){return{action:`added`,type:_classPrivateFieldGet2(_isFreeHighlight,this)?`free_highlight`:`highlight`,color:this._uiManager.highlightColorNames.get(this.color),thickness:_classPrivateFieldGet2(_thickness2,this),methodOfCreation:_classPrivateFieldGet2(_methodOfCreation,this)}}get telemetryFinalData(){return{type:`highlight`,color:this._uiManager.highlightColorNames.get(this.color)}}static computeTelemetryFinalData(e){return{numberOfColors:e.get(`color`).size}}static initialize(t,n){AnnotationEditor.initialize(t,n),e._defaultColor||=n.highlightColors?.values().next().value||`#fff066`}static updateDefaultParams(t,n){switch(t){case AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR:e._defaultColor=n;break;case AnnotationEditorParamsType.HIGHLIGHT_THICKNESS:e._defaultThickness=n}}translateInPage(e,t){}get toolbarPosition(){return _classPrivateFieldGet2(_lastPoint,this)}updateParams(e,t){switch(e){case AnnotationEditorParamsType.HIGHLIGHT_COLOR:_assertClassBrand(_HighlightEditor_brand,this,_updateColor2).call(this,t);break;case AnnotationEditorParamsType.HIGHLIGHT_THICKNESS:_assertClassBrand(_HighlightEditor_brand,this,_updateThickness).call(this,t)}}static get defaultPropertiesToUpdate(){return[[AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR,e._defaultColor],[AnnotationEditorParamsType.HIGHLIGHT_THICKNESS,e._defaultThickness]]}get propertiesToUpdate(){return[[AnnotationEditorParamsType.HIGHLIGHT_COLOR,this.color||e._defaultColor],[AnnotationEditorParamsType.HIGHLIGHT_THICKNESS,_classPrivateFieldGet2(_thickness2,this)||e._defaultThickness],[AnnotationEditorParamsType.HIGHLIGHT_FREE,_classPrivateFieldGet2(_isFreeHighlight,this)]]}async addEditToolbar(){let e=await super.addEditToolbar();return e?(this._uiManager.highlightColors&&(_classPrivateFieldSet2(_colorPicker2,this,new ColorPicker({editor:this})),e.addColorPicker(_classPrivateFieldGet2(_colorPicker2,this))),e):null}disableEditing(){super.disableEditing(),this.div.classList.toggle(`disabled`,!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle(`disabled`,!1)}fixAndSetPosition(){return super.fixAndSetPosition(_assertClassBrand(_HighlightEditor_brand,this,_getRotation).call(this))}getBaseTranslation(){return[0,0]}getRect(e,t){return super.getRect(e,t,_assertClassBrand(_HighlightEditor_brand,this,_getRotation).call(this))}onceAdded(){this.annotationElementId||this.parent.addUndoableEditor(this),this.div.focus()}remove(){_assertClassBrand(_HighlightEditor_brand,this,_cleanDrawLayer).call(this),this._reportTelemetry({action:`deleted`}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(_assertClassBrand(_HighlightEditor_brand,this,_addToDrawLayer).call(this),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){let t=!1;this.parent&&!e?_assertClassBrand(_HighlightEditor_brand,this,_cleanDrawLayer).call(this):e&&(_assertClassBrand(_HighlightEditor_brand,this,_addToDrawLayer).call(this,e),t=!this.parent&&this.div?.classList.contains(`selectedEditor`)),super.setParent(e),this.show(this._isVisible),t&&this.select()}rotate(t){let{drawLayer:n}=this.parent,r;_classPrivateFieldGet2(_isFreeHighlight,this)?(t=(t-this.rotation+360)%360,r=_rotateBbox.call(e,_classPrivateFieldGet2(_highlightOutlines,this).box,t)):r=_rotateBbox.call(e,this,t),n.rotate(_classPrivateFieldGet2(_id4,this),t),n.rotate(_classPrivateFieldGet2(_outlineId,this),t),n.updateBox(_classPrivateFieldGet2(_id4,this),r),n.updateBox(_classPrivateFieldGet2(_outlineId,this),_rotateBbox.call(e,_classPrivateFieldGet2(_focusOutlines,this).box,t))}render(){if(this.div)return this.div;let e=super.render();_classPrivateFieldGet2(_text,this)&&(e.setAttribute(`aria-label`,_classPrivateFieldGet2(_text,this)),e.setAttribute(`role`,`mark`)),_classPrivateFieldGet2(_isFreeHighlight,this)?e.classList.add(`free`):this.div.addEventListener(`keydown`,_assertClassBrand(_HighlightEditor_brand,this,_keydown).bind(this),{signal:this._uiManager._signal});let t=_classPrivateFieldSet2(_highlightDiv,this,document.createElement(`div`));e.append(t),t.setAttribute(`aria-hidden`,`true`),t.className=`internal`,t.style.clipPath=_classPrivateFieldGet2(_clipPathId,this);let[n,r]=this.parentDimensions;return this.setDims(this.width*n,this.height*r),bindEvents(this,_classPrivateFieldGet2(_highlightDiv,this),[`pointerover`,`pointerleave`]),this.enableEditing(),e}pointerover(){this.isSelected||this.parent.drawLayer.addClass(_classPrivateFieldGet2(_outlineId,this),`hovered`)}pointerleave(){this.isSelected||this.parent.drawLayer.removeClass(_classPrivateFieldGet2(_outlineId,this),`hovered`)}_moveCaret(e){switch(this.parent.unselect(this),e){case 0:case 2:_assertClassBrand(_HighlightEditor_brand,this,_setCaret).call(this,!0);break;case 1:case 3:_assertClassBrand(_HighlightEditor_brand,this,_setCaret).call(this,!1)}}select(){super.select(),_classPrivateFieldGet2(_outlineId,this)&&(this.parent?.drawLayer.removeClass(_classPrivateFieldGet2(_outlineId,this),`hovered`),this.parent?.drawLayer.addClass(_classPrivateFieldGet2(_outlineId,this),`selected`))}unselect(){super.unselect(),_classPrivateFieldGet2(_outlineId,this)&&(this.parent?.drawLayer.removeClass(_classPrivateFieldGet2(_outlineId,this),`selected`),_classPrivateFieldGet2(_isFreeHighlight,this)||_assertClassBrand(_HighlightEditor_brand,this,_setCaret).call(this,!1))}get _mustFixPosition(){return!_classPrivateFieldGet2(_isFreeHighlight,this)}show(e=this._isVisible){super.show(e),this.parent&&(this.parent.drawLayer.show(_classPrivateFieldGet2(_id4,this),e),this.parent.drawLayer.show(_classPrivateFieldGet2(_outlineId,this),e))}static startHighlighting(t,n,{target:r,x:i,y:a}){let{x:o,y:c,width:u,height:K}=r.getBoundingClientRect(),Y=new AbortController,X=t.combinedSignal(Y),ee=e=>{e.preventDefault(),e.stopPropagation()},te=n=>{Y.abort(),_assertClassBrand(e,this,_endHighlight).call(this,t,n)};window.addEventListener(`blur`,te,{signal:X}),window.addEventListener(`pointerup`,te,{signal:X}),window.addEventListener(`pointerdown`,ee,{capture:!0,passive:!1,signal:X}),window.addEventListener(`contextmenu`,noContextMenu,{signal:X}),r.addEventListener(`pointermove`,_assertClassBrand(e,this,_highlightMove).bind(this,t),{signal:X}),this._freeHighlight=new FreeHighlightOutliner({x:i,y:a},[o,c,u,K],t.scale,this._defaultThickness/2,n,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=t.drawLayer.draw(this._freeHighlight,this._defaultColor,this._defaultOpacity,!0)}static async deserialize(e,t,n){let r=null;if(e instanceof HighlightAnnotationElement){let{data:{quadPoints:t,rect:n,rotation:i,id:a,color:o,opacity:c,popupRef:u},parent:{page:{pageNumber:K}}}=e;r=e={annotationType:AnnotationEditorType.HIGHLIGHT,color:Array.from(o),opacity:c,quadPoints:t,boxes:null,pageIndex:K-1,rect:n.slice(0),rotation:i,id:a,deleted:!1,popupRef:u}}else if(e instanceof InkAnnotationElement){let{data:{inkLists:t,rect:n,rotation:i,id:a,color:o,borderStyle:{rawWidth:c},popupRef:u},parent:{page:{pageNumber:K}}}=e;r=e={annotationType:AnnotationEditorType.HIGHLIGHT,color:Array.from(o),thickness:c,inkLists:t,boxes:null,pageIndex:K-1,rect:n.slice(0),rotation:i,id:a,deleted:!1,popupRef:u}}let{color:i,quadPoints:a,inkLists:o,opacity:c}=e,u=await super.deserialize(e,t,n);u.color=Util.makeHexColor(...i),_classPrivateFieldSet2(_opacity,u,c||1),o&&_classPrivateFieldSet2(_thickness2,u,e.thickness),u.annotationElementId=e.id||null,u._initialData=r;let[K,Y]=u.pageDimensions,[X,ee]=u.pageTranslation;if(a){let e=_classPrivateFieldSet2(_boxes,u,[]);for(let t=0;t<a.length;t+=8)e.push({x:(a[t]-X)/K,y:1-(a[t+1]-ee)/Y,width:(a[t+2]-a[t])/K,height:(a[t+1]-a[t+5])/Y});
81_assertClassBrand(_HighlightEditor_brand,u,_createOutlines).call(u),_assertClassBrand(_HighlightEditor_brand,u,_addToDrawLayer).call(u),u.rotate(u.rotation)}else if(o){_classPrivateFieldSet2(_isFreeHighlight,u,!0);let e=o[0],n={x:e[0]-X,y:Y-(e[1]-ee)},r=new FreeHighlightOutliner(n,[0,0,K,Y],1,_classPrivateFieldGet2(_thickness2,u)/2,!0,.001);for(let t=0,i=e.length;t<i;t+=2)n.x=e[t]-X,n.y=Y-(e[t+1]-ee),r.add(n);let{id:i,clipPathId:a}=t.drawLayer.draw(r,u.color,u._defaultOpacity,!0);_assertClassBrand(_HighlightEditor_brand,u,_createFreeOutlines).call(u,{highlightOutlines:r.getOutlines(),highlightId:i,clipPathId:a}),_assertClassBrand(_HighlightEditor_brand,u,_addToDrawLayer).call(u)}return u}serialize(e=!1){if(this.isEmpty()||e)return null;if(this.deleted)return this.serializeDeleted();let t=this.getRect(0,0),n=AnnotationEditor._colorManager.convert(this.color),r={annotationType:AnnotationEditorType.HIGHLIGHT,color:n,opacity:_classPrivateFieldGet2(_opacity,this),thickness:_classPrivateFieldGet2(_thickness2,this),quadPoints:_assertClassBrand(_HighlightEditor_brand,this,_serializeBoxes).call(this),outlines:_assertClassBrand(_HighlightEditor_brand,this,_serializeOutlines).call(this,t),pageIndex:this.pageIndex,rect:t,rotation:_assertClassBrand(_HighlightEditor_brand,this,_getRotation).call(this),structTreeParentId:this._structTreeParentId};return this.annotationElementId&&!_assertClassBrand(_HighlightEditor_brand,this,_hasElementChanged2).call(this,r)?null:(r.id=this.annotationElementId,r)}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}};_HighlightEditor=HighlightEditor;function _createOutlines(){let e=new HighlightOutliner(_classPrivateFieldGet2(_boxes,this),.001);_classPrivateFieldSet2(_highlightOutlines,this,e.getOutlines()),{x:this.x,y:this.y,width:this.width,height:this.height}=_classPrivateFieldGet2(_highlightOutlines,this).box;let t=new HighlightOutliner(_classPrivateFieldGet2(_boxes,this),.0025,.001,this._uiManager.direction===`ltr`);_classPrivateFieldSet2(_focusOutlines,this,t.getOutlines());let{lastPoint:n}=_classPrivateFieldGet2(_focusOutlines,this).box;_classPrivateFieldSet2(_lastPoint,this,[(n[0]-this.x)/this.width,(n[1]-this.y)/this.height])}function _createFreeOutlines({highlightOutlines:e,highlightId:t,clipPathId:n}){if(_classPrivateFieldSet2(_highlightOutlines,this,e),_classPrivateFieldSet2(_focusOutlines,this,e.getNewOutline(_classPrivateFieldGet2(_thickness2,this)/2+1.5,.0025)),t>=0)_classPrivateFieldSet2(_id4,this,t),_classPrivateFieldSet2(_clipPathId,this,n),this.parent.drawLayer.finalizeLine(t,e),_classPrivateFieldSet2(_outlineId,this,this.parent.drawLayer.drawOutline(_classPrivateFieldGet2(_focusOutlines,this)));else if(this.parent){let t=this.parent.viewport.rotation;this.parent.drawLayer.updateLine(_classPrivateFieldGet2(_id4,this),e),this.parent.drawLayer.updateBox(_classPrivateFieldGet2(_id4,this),_rotateBbox.call(_HighlightEditor,_classPrivateFieldGet2(_highlightOutlines,this).box,(t-this.rotation+360)%360)),this.parent.drawLayer.updateLine(_classPrivateFieldGet2(_outlineId,this),_classPrivateFieldGet2(_focusOutlines,this)),this.parent.drawLayer.updateBox(_classPrivateFieldGet2(_outlineId,this),_rotateBbox.call(_HighlightEditor,_classPrivateFieldGet2(_focusOutlines,this).box,t))}let{x:r,y:i,width:a,height:o}=e.box;switch(this.rotation){case 0:this.x=r,this.y=i,this.width=a,this.height=o;break;case 90:{let[e,t]=this.parentDimensions;this.x=i,this.y=1-r,this.width=a*t/e,this.height=o*e/t;break}case 180:this.x=1-r,this.y=1-i,this.width=a,this.height=o;break;case 270:{let[e,t]=this.parentDimensions;this.x=1-i,this.y=r,this.width=a*t/e,this.height=o*e/t;break}}let{lastPoint:c}=_classPrivateFieldGet2(_focusOutlines,this).box;_classPrivateFieldSet2(_lastPoint,this,[(c[0]-r)/a,(c[1]-i)/o])}function _updateColor2(e){let t=(e,t)=>{this.color=e,this.parent?.drawLayer.changeColor(_classPrivateFieldGet2(_id4,this),e),_classPrivateFieldGet2(_colorPicker2,this)?.updateColor(e),_classPrivateFieldSet2(_opacity,this,t),this.parent?.drawLayer.changeOpacity(_classPrivateFieldGet2(_id4,this),t)},n=this.color,r=_classPrivateFieldGet2(_opacity,this);this.addCommands({cmd:t.bind(this,e,_HighlightEditor._defaultOpacity),undo:t.bind(this,n,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:`color_changed`,color:this._uiManager.highlightColorNames.get(e)},!0)}function _updateThickness(e){let t=_classPrivateFieldGet2(_thickness2,this),n=e=>{_classPrivateFieldSet2(_thickness2,this,e),_assertClassBrand(_HighlightEditor_brand,this,_changeThickness).call(this,e)};this.addCommands({cmd:n.bind(this,e),undo:n.bind(this,t),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:`thickness_changed`,thickness:e},!0)}function _changeThickness(e){if(!_classPrivateFieldGet2(_isFreeHighlight,this))return;_assertClassBrand(_HighlightEditor_brand,this,_createFreeOutlines).c
81all(this,{highlightOutlines:_classPrivateFieldGet2(_highlightOutlines,this).getNewOutline(e/2)}),this.fixAndSetPosition();let[t,n]=this.parentDimensions;this.setDims(this.width*t,this.height*n)}function _cleanDrawLayer(){_classPrivateFieldGet2(_id4,this)!==null&&this.parent&&(this.parent.drawLayer.remove(_classPrivateFieldGet2(_id4,this)),_classPrivateFieldSet2(_id4,this,null),this.parent.drawLayer.remove(_classPrivateFieldGet2(_outlineId,this)),_classPrivateFieldSet2(_outlineId,this,null))}function _addToDrawLayer(e=this.parent){_classPrivateFieldGet2(_id4,this)===null&&({id:_toSetter(_classPrivateFieldSet2,[_id4,this])._,clipPathId:_toSetter(_classPrivateFieldSet2,[_clipPathId,this])._}=e.drawLayer.draw(_classPrivateFieldGet2(_highlightOutlines,this),this.color,_classPrivateFieldGet2(_opacity,this)),_classPrivateFieldSet2(_outlineId,this,e.drawLayer.drawOutline(_classPrivateFieldGet2(_focusOutlines,this))),_classPrivateFieldGet2(_highlightDiv,this)&&(_classPrivateFieldGet2(_highlightDiv,this).style.clipPath=_classPrivateFieldGet2(_clipPathId,this)))}function _rotateBbox({x:e,y:t,width:n,height:r},i){switch(i){case 90:return{x:1-t-r,y:e,width:r,height:n};case 180:return{x:1-e-n,y:1-t-r,width:n,height:r};case 270:return{x:t,y:1-e-n,width:r,height:n}}return{x:e,y:t,width:n,height:r}}function _keydown(e){_HighlightEditor._keyboardManager.exec(this,e)}function _setCaret(e){if(!_classPrivateFieldGet2(_anchorNode,this))return;let t=window.getSelection();e?t.setPosition(_classPrivateFieldGet2(_anchorNode,this),_classPrivateFieldGet2(_anchorOffset,this)):t.setPosition(_classPrivateFieldGet2(_focusNode,this),_classPrivateFieldGet2(_focusOffset,this))}function _getRotation(){return _classPrivateFieldGet2(_isFreeHighlight,this)?this.rotation:0}function _serializeBoxes(){if(_classPrivateFieldGet2(_isFreeHighlight,this))return null;let[e,t]=this.pageDimensions,[n,r]=this.pageTranslation,i=_classPrivateFieldGet2(_boxes,this),a=new Float32Array(i.length*8),o=0;for(let{x:c,y:u,width:K,height:Y}of i){let i=c*e+n,X=(1-u-Y)*t+r;a[o]=a[o+4]=i,a[o+1]=a[o+3]=X,a[o+2]=a[o+6]=i+K*e,a[o+5]=a[o+7]=X+Y*t,o+=8}return a}function _serializeOutlines(e){return _classPrivateFieldGet2(_highlightOutlines,this).serialize(e,_assertClassBrand(_HighlightEditor_brand,this,_getRotation).call(this))}function _highlightMove(e,t){this._freeHighlight.add(t)&&e.drawLayer.updatePath(this._freeHighlightId,this._freeHighlight)}function _endHighlight(e,t){this._freeHighlight.isEmpty()?e.drawLayer.remove(this._freeHighlightId):e.createAndAddNewEditor(t,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:`main_toolbar`}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=``}function _hasElementChanged2(e){let{color:t}=this._initialData;return e.color.some((e,n)=>e!==t[n])}_defineProperty$6(HighlightEditor,`_defaultColor`,null),_defineProperty$6(HighlightEditor,`_defaultOpacity`,1),_defineProperty$6(HighlightEditor,`_defaultThickness`,12),_defineProperty$6(HighlightEditor,`_type`,`highlight`),_defineProperty$6(HighlightEditor,`_editorType`,AnnotationEditorType.HIGHLIGHT),_defineProperty$6(HighlightEditor,`_freeHighlightId`,-1),_defineProperty$6(HighlightEditor,`_freeHighlight`,null),_defineProperty$6(HighlightEditor,`_freeHighlightClipId`,``);var _baseHeight=new WeakMap,_baseWidth=new WeakMap,_canvasContextMenuTimeoutId=new WeakMap,_currentPath2D=new WeakMap,_disableEditing=new WeakMap,_drawingAC=new WeakMap,_hasSomethingToDraw=new WeakMap,_isCanvasInitialized=new WeakMap,_observer=new WeakMap,_pointerdownAC=new WeakMap,_realWidth=new WeakMap,_realHeight=new WeakMap,_requestFrameCallback=new WeakMap,_InkEditor_brand=new WeakSet,InkEditor=class e extends AnnotationEditor{constructor(e){super({...e,name:`inkEditor`}),_classPrivateMethodInitSpec(this,_InkEditor_brand),_classPrivateFieldInitSpec(this,_baseHeight,0),_classPrivateFieldInitSpec(this,_baseWidth,0),_classPrivateFieldInitSpec(this,_canvasContextMenuTimeoutId,null),_classPrivateFieldInitSpec(this,_currentPath2D,new Path2D),_classPrivateFieldInitSpec(this,_disableEditing,!1),_classPrivateFieldInitSpec(this,_drawingAC,null),_classPrivateFieldInitSpec(this,_hasSomethingToDraw,!1),_classPrivateFieldInitSpec(this,_isCanvasInitialized,!1),_classPrivateFieldInitSpec(this,_observer,null),_classPrivateFieldInitSpec(this,_pointerdownAC,null),_classPrivateFieldInitSpec(this,_realWidth,0),_classPrivateFieldInitSpec(this,_realHeight,0),_classPrivateFieldInitSpec(this,_requestFrameCallback,null),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(e,t){AnnotationEditor.initialize(e,t)}static updateDefaultParams(t,n){switch(t){case AnnotationEditorParamsType.INK_THICKNESS:e._defaultThickness=n;break;case AnnotationEditorParamsType.INK_COLOR:e._defaultColor=n;break;case AnnotationEditorParamsType.INK_OPACITY:e._defaultOpacity=n/100}}updateParams(e,t){switch(e){case AnnotationEditorParamsType.INK_THICKNESS:_assertClassBrand(_InkEditor_brand,this,_updateThickness2).call(this,t);break;case AnnotationEditorParamsType.INK_COLOR:_assertClassBrand(_InkEditor_brand,this,_updateColor3).call(this,t);break;case AnnotationEditorParamsType.INK_OPACITY:_assertClassBrand(_InkEditor_brand,this,_updateOpacity).call(this,t)}}static get defaultPropertiesToUpdate(){return[[AnnotationEditorParamsType.INK_THICKNESS,e._defaultThickness],[AnnotationEditorParamsType.INK_COLOR,e._defaultColor||AnnotationEditor._defaultLineColor],[AnnotationEditorParamsType.INK_OPACITY,Math.round(e._defaultOpacity*100)]]}get propertiesToUpdate(){return[[AnnotationEditorParamsType.INK_THICKNESS,this.thickness||e._defaultThickness],[AnnotationEditorParamsType.INK_COLOR,this.color||e._defaultColor||AnnotationEditor._defaultLineColor],[AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??e._defaultOpacity))]]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.canvas||(_assertClassBrand(_InkEditor_brand,this,_createCanvas).call(this),_assertClassBrand(_InkEditor_brand,this,_createObserver).call(this)),this.isAttachedToDOM||(this.parent.add(this),_assertClassBrand(_InkEditor_brand,this,_setCanvasDims).call(this)),_assertClassBrand(_InkEditor_brand,this,_fitToContent).call(this)))}remove(){this.canvas!==null&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,_classPrivateFieldGet2(_canvasContextMenuTimeoutId,this)&&(clearTimeout(_classPrivateFieldGet2(_canvasContextMenuTimeoutId,this)),_classPrivateFieldSet2(_canvasContextMenuTimeoutId,this,null)),_classPrivateFieldGet2(_observer,this)?.disconnect(),_classPrivateFieldSet2(_observer,this,null),super.remove())}setParent(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&e===null&&this._uiManager.addShouldRescale(this),super.setParent(e)}onScaleChanging(){let[e,t]=this.parentDimensions,n=this.width*e,r=this.height*t;this.setDimensions(n,r)}
81enableEditMode(){_classPrivateFieldGet2(_disableEditing,this)||this.canvas===null||(super.enableEditMode(),this._isDraggable=!1,_assertClassBrand(_InkEditor_brand,this,_addPointerdownListener).call(this))}disableEditMode(){this.isInEditMode()&&this.canvas!==null&&(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove(`editing`),_assertClassBrand(_InkEditor_brand,this,_removePointerdownListener).call(this))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return this.paths.length===0||this.paths.length===1&&this.paths[0].length===0}commit(){_classPrivateFieldGet2(_disableEditing,this)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),_classPrivateFieldSet2(_disableEditing,this,!0),this.div.classList.add(`disabled`),_assertClassBrand(_InkEditor_brand,this,_fitToContent).call(this,!0),this.select(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),this.enableEditMode())}canvasPointerdown(e){e.button===0&&this.isInEditMode()&&!_classPrivateFieldGet2(_disableEditing,this)&&(this.setInForeground(),e.preventDefault(),this.div.contains(document.activeElement)||this.div.focus({preventScroll:!0}),_assertClassBrand(_InkEditor_brand,this,_startDrawing).call(this,e.offsetX,e.offsetY))}canvasPointermove(e){e.preventDefault(),_assertClassBrand(_InkEditor_brand,this,_draw).call(this,e.offsetX,e.offsetY)}canvasPointerup(e){e.preventDefault(),_assertClassBrand(_InkEditor_brand,this,_endDrawing).call(this,e)}canvasPointerleave(e){_assertClassBrand(_InkEditor_brand,this,_endDrawing).call(this,e)}get isResizable(){return!this.isEmpty()&&_classPrivateFieldGet2(_disableEditing,this)}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),this.div.setAttribute(`data-l10n-id`,`pdfjs-ink`);let[n,r,i,a]=_assertClassBrand(_InkEditor_brand,this,_getInitialBBox).call(this);if(this.setAt(n,r,0,0),this.setDims(i,a),_assertClassBrand(_InkEditor_brand,this,_createCanvas).call(this),this.width){let[n,r]=this.parentDimensions;this.setAspectRatio(this.width*n,this.height*r),this.setAt(e*n,t*r,this.width*n,this.height*r),_classPrivateFieldSet2(_isCanvasInitialized,this,!0),_assertClassBrand(_InkEditor_brand,this,_setCanvasDims).call(this),this.setDims(this.width*n,this.height*r),_assertClassBrand(_InkEditor_brand,this,_redraw).call(this),this.div.classList.add(`disabled`)}else this.div.classList.add(`editing`),this.enableEditMode();return _assertClassBrand(_InkEditor_brand,this,_createObserver).call(this),this.div}setDimensions(e,t){let n=Math.round(e),r=Math.round(t);if(_classPrivateFieldGet2(_realWidth,this)===n&&_classPrivateFieldGet2(_realHeight,this)===r)return;_classPrivateFieldSet2(_realWidth,this,n),_classPrivateFieldSet2(_realHeight,this,r),this.canvas.style.visibility=`hidden`;let[i,a]=this.parentDimensions;this.width=e/i,this.height=t/a,this.fixAndSetPosition(),_classPrivateFieldGet2(_disableEditing,this)&&_assertClassBrand(_InkEditor_brand,this,_setScaleFactor).call(this,e,t),_assertClassBrand(_InkEditor_brand,this,_setCanvasDims).call(this),_assertClassBrand(_InkEditor_brand,this,_redraw).call(this),this.canvas.style.visibility=`visible`,this.fixDims()}static async deserialize(t,n,r){if(t instanceof InkAnnotationElement)return null;let i=await super.deserialize(t,n,r);i.thickness=t.thickness,i.color=Util.makeHexColor(...t.color),i.opacity=t.opacity;let[a,o]=i.pageDimensions,c=i.width*a,u=i.height*o,K=i.parentScale,Y=t.thickness/2;_classPrivateFieldSet2(_disableEditing,i,!0),_classPrivateFieldSet2(_realWidth,i,Math.round(c)),_classPrivateFieldSet2(_realHeight,i,Math.round(u));let{paths:X,rect:ee,rotation:te}=t;for(let{bezier:t}of X){t=_fromPDFCoordinates.call(e,t,ee,te);let n=[];i.paths.push(n);let r=K*(t[0]-Y),a=K*(t[1]-Y);for(let e=2,i=t.length;e<i;e+=6){let i=K*(t[e]-Y),o=K*(t[e+1]-Y),c=K*(t[e+2]-Y),u=K*(t[e+3]-Y),X=K*(t[e+4]-Y),ee=K*(t[e+5]-Y);n.push([[r,a],[i,o],[c,u],[X,ee]]),r=X,a=ee}let o=_assertClassBrand(e,this,_buildPath2D).call(this,n);i.bezierPath2D.push(o)}let ce=_assertClassBrand(_InkEditor_brand,i,_getBbox).call(i);return _classPrivateFieldSet2(_baseWidth,i,Math.max(AnnotationEditor.MIN_SIZE,ce[2]-ce[0])),_classPrivateFieldSet2(_baseHeight,i,Math.max(AnnotationEditor.MIN_SIZE,ce[3]-ce[1])),_assertClassBrand(_InkEditor_brand,i,_setScaleFactor).call(i,c,u),i}serialize(){if(this.isEmpty())return null;let e=this.getRect(0,0),t=AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:AnnotationEditorType.INK,color:t,thickness:this.thickness,opacity:this.opacity,paths:_assertClassBrand(_InkEditor_brand,this,_serializePaths).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,e),pageIndex:this.pageIndex,rect:e,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}};_InkEditor=InkEditor;function _updateThickness2(e){let t=e=>{this.thickness=e,_assertClassBrand(_InkEditor_brand,this,_fitToContent).call(this)},n=this.thickness;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}function _updateColor3(e){let t=e=>{this.color=e,_assertClassBrand(_InkEditor_brand,this,_redraw).call(this)},n=this.color;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function _updateOpacity(e){let t=e=>{this.opacity=e,_assertClassBrand(_InkEditor_brand,this,_redraw).call(this)};e/=100;let n=this.opacity;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}function _getInitialBBox(){let{parentRotation:e,parentDimensions:[t,n]}=this;switch(e){case 90:return[0,n,n,t];case 180:return[t,n,t,n];case 270:return[t,0,n,t];default:return[0,0,t,n]}}
81function _setStroke(){let{ctx:e,color:t,opacity:n,thickness:r,parentScale:i,scaleFactor:a}=this;e.lineWidth=r*i/a,e.lineCap=`round`,e.lineJoin=`round`,e.miterLimit=10,e.strokeStyle=`${t}${opacityToHex(n)}`}function _startDrawing(e,t){this.canvas.addEventListener(`contextmenu`,noContextMenu,{signal:this._uiManager._signal}),_assertClassBrand(_InkEditor_brand,this,_removePointerdownListener).call(this),_classPrivateFieldSet2(_drawingAC,this,new AbortController);let n=this._uiManager.combinedSignal(_classPrivateFieldGet2(_drawingAC,this));this.canvas.addEventListener(`pointerleave`,this.canvasPointerleave.bind(this),{signal:n}),this.canvas.addEventListener(`pointermove`,this.canvasPointermove.bind(this),{signal:n}),this.canvas.addEventListener(`pointerup`,this.canvasPointerup.bind(this),{signal:n}),this.isEditing=!0,_classPrivateFieldGet2(_isCanvasInitialized,this)||(_classPrivateFieldSet2(_isCanvasInitialized,this,!0),_assertClassBrand(_InkEditor_brand,this,_setCanvasDims).call(this),this.thickness||=_InkEditor._defaultThickness,this.color||=_InkEditor._defaultColor||AnnotationEditor._defaultLineColor,this.opacity??=_InkEditor._defaultOpacity),this.currentPath.push([e,t]),_classPrivateFieldSet2(_hasSomethingToDraw,this,!1),_assertClassBrand(_InkEditor_brand,this,_setStroke).call(this),_classPrivateFieldSet2(_requestFrameCallback,this,()=>{_assertClassBrand(_InkEditor_brand,this,_drawPoints).call(this),_classPrivateFieldGet2(_requestFrameCallback,this)&&window.requestAnimationFrame(_classPrivateFieldGet2(_requestFrameCallback,this))}),window.requestAnimationFrame(_classPrivateFieldGet2(_requestFrameCallback,this))}function _draw(e,t){let[n,r]=this.currentPath.at(-1);if(this.currentPath.length>1&&e===n&&t===r)return;let i=this.currentPath,a=_classPrivateFieldGet2(_currentPath2D,this);if(i.push([e,t]),_classPrivateFieldSet2(_hasSomethingToDraw,this,!0),i.length<=2){a.moveTo(...i[0]),a.lineTo(e,t);return}i.length===3&&(_classPrivateFieldSet2(_currentPath2D,this,a=new Path2D),a.moveTo(...i[0])),_assertClassBrand(_InkEditor_brand,this,_makeBezierCurve).call(this,a,...i.at(-3),...i.at(-2),e,t)}function _endPath(){if(this.currentPath.length===0)return;let e=this.currentPath.at(-1);_classPrivateFieldGet2(_currentPath2D,this).lineTo(...e)}function _stopDrawing(e,t){_classPrivateFieldSet2(_requestFrameCallback,this,null),e=Math.min(Math.max(e,0),this.canvas.width),t=Math.min(Math.max(t,0),this.canvas.height),_assertClassBrand(_InkEditor_brand,this,_draw).call(this,e,t),_assertClassBrand(_InkEditor_brand,this,_endPath).call(this);let n;if(this.currentPath.length!==1)n=_assertClassBrand(_InkEditor_brand,this,_generateBezierPoints).call(this);else{let r=[e,t];n=[[r,r.slice(),r.slice(),r]]}let r=_classPrivateFieldGet2(_currentPath2D,this),i=this.currentPath;this.currentPath=[],_classPrivateFieldSet2(_currentPath2D,this,new Path2D),this.addCommands({cmd:()=>{this.allRawPaths.push(i),this.paths.push(n),this.bezierPath2D.push(r),this._uiManager.rebuild(this)},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),this.paths.length===0?this.remove():(this.canvas||(_assertClassBrand(_InkEditor_brand,this,_createCanvas).call(this),_assertClassBrand(_InkEditor_brand,this,_createObserver).call(this)),_assertClassBrand(_InkEditor_brand,this,_fitToContent).call(this))},mustExec:!0})}function _drawPoints(){if(!_classPrivateFieldGet2(_hasSomethingToDraw,this))return;_classPrivateFieldSet2(_hasSomethingToDraw,this,!1);let e=Math.ceil(this.thickness*this.parentScale),t=this.currentPath.slice(-3),n=t.map(e=>e[0]),r=t.map(e=>e[1]);Math.min(...n)-e,Math.max(...n)+e,Math.min(...r)-e,Math.max(...r)+e;let{ctx:i}=this;i.save(),i.clearRect(0,0,this.canvas.width,this.canvas.height);for(let e of this.bezierPath2D)i.stroke(e);i.stroke(_classPrivateFieldGet2(_currentPath2D,this)),i.restore()}function _makeBezierCurve(e,t,n,r,i,a,o){let c=(t+r)/2,u=(n+i)/2,K=(r+a)/2,Y=(i+o)/2;e.bezierCurveTo(c+2*(r-c)/3,u+2*(i-u)/3,K+2*(r-K)/3,Y+2*(i-Y)/3,K,Y)}function _generateBezierPoints(){let e=this.currentPath;if(e.length<=2)return[[e[0],e[0],e.at(-1),e.at(-1)]];let t=[],n,[r,i]=e[0];for(n=1;n<e.length-2;n++){let[a,o]=e[n],[c,u]=e[n+1],K=(a+c)/2,Y=(o+u)/2,X=[r+2*(a-r)/3,i+2*(o-i)/3],ee=[K+2*(a-K)/3,Y+2*(o-Y)/3];t.push([[r,i],X,ee,[K,Y]]),[r,i]=[K,Y]}let[a,o]=e[n],[c,u]=e[n+1],K=[r+2*(a-r)/3,i+2*(o-i)/3],Y=[c+2*(a-c)/3,u+2*(o-u)/3];return t.push([[r,i],K,Y,[c,u]]),t}function _redraw(){if(this.isEmpty()){_assertClassBrand(_InkEditor_brand,this,_updateTransform).call(this);return}_assertClassBrand(_InkEditor_brand,this,_setStroke).call(this);let{canvas:e,ctx:t}=this;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height),_assertClassBrand(_InkEditor_brand,this,_updateTransform).call(this);for(let e of this.bezierPath2D)t.stroke(e)}
81function _addPointerdownListener(){if(_classPrivateFieldGet2(_pointerdownAC,this))return;_classPrivateFieldSet2(_pointerdownAC,this,new AbortController);let e=this._uiManager.combinedSignal(_classPrivateFieldGet2(_pointerdownAC,this));this.canvas.addEventListener(`pointerdown`,this.canvasPointerdown.bind(this),{signal:e})}function _removePointerdownListener(){this.pointerdownAC?.abort(),this.pointerdownAC=null}function _endDrawing(e){_classPrivateFieldGet2(_drawingAC,this)?.abort(),_classPrivateFieldSet2(_drawingAC,this,null),_assertClassBrand(_InkEditor_brand,this,_addPointerdownListener).call(this),_classPrivateFieldGet2(_canvasContextMenuTimeoutId,this)&&clearTimeout(_classPrivateFieldGet2(_canvasContextMenuTimeoutId,this)),_classPrivateFieldSet2(_canvasContextMenuTimeoutId,this,setTimeout(()=>{_classPrivateFieldSet2(_canvasContextMenuTimeoutId,this,null),this.canvas.removeEventListener(`contextmenu`,noContextMenu)},10)),_assertClassBrand(_InkEditor_brand,this,_stopDrawing).call(this,e.offsetX,e.offsetY),this.addToAnnotationStorage(),this.setInBackground()}function _createCanvas(){this.canvas=document.createElement(`canvas`),this.canvas.width=this.canvas.height=0,this.canvas.className=`inkEditorCanvas`,this.canvas.setAttribute(`data-l10n-id`,`pdfjs-ink-canvas`),this.div.append(this.canvas),this.ctx=this.canvas.getContext(`2d`)}function _createObserver(){_classPrivateFieldSet2(_observer,this,new ResizeObserver(e=>{let t=e[0].contentRect;t.width&&t.height&&this.setDimensions(t.width,t.height)})),_classPrivateFieldGet2(_observer,this).observe(this.div),this._uiManager._signal.addEventListener(`abort`,()=>{_classPrivateFieldGet2(_observer,this)?.disconnect(),_classPrivateFieldSet2(_observer,this,null)},{once:!0})}function _setCanvasDims(){if(!_classPrivateFieldGet2(_isCanvasInitialized,this))return;let[e,t]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*e),this.canvas.height=Math.ceil(this.height*t),_assertClassBrand(_InkEditor_brand,this,_updateTransform).call(this)}function _setScaleFactor(e,t){let n=_assertClassBrand(_InkEditor_brand,this,_getPadding).call(this),r=(e-n)/_classPrivateFieldGet2(_baseWidth,this),i=(t-n)/_classPrivateFieldGet2(_baseHeight,this);this.scaleFactor=Math.min(r,i)}function _updateTransform(){let e=_assertClassBrand(_InkEditor_brand,this,_getPadding).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+e,this.translationY*this.scaleFactor+e)}function _buildPath2D(e){let t=new Path2D;for(let n=0,r=e.length;n<r;n++){let[r,i,a,o]=e[n];n===0&&t.moveTo(...r),t.bezierCurveTo(i[0],i[1],a[0],a[1],o[0],o[1])}return t}function _toPDFCoordinates(e,t,n){let[r,i,a,o]=t;switch(n){case 0:for(let t=0,n=e.length;t<n;t+=2)e[t]+=r,e[t+1]=o-e[t+1];break;case 90:for(let t=0,n=e.length;t<n;t+=2){let n=e[t];e[t]=e[t+1]+r,e[t+1]=n+i}break;case 180:for(let t=0,n=e.length;t<n;t+=2)e[t]=a-e[t],e[t+1]+=i;break;case 270:for(let t=0,n=e.length;t<n;t+=2){let n=e[t];e[t]=a-e[t+1],e[t+1]=o-n}break;default:throw Error(`Invalid rotation`)}return e}function _fromPDFCoordinates(e,t,n){let[r,i,a,o]=t;switch(n){case 0:for(let t=0,n=e.length;t<n;t+=2)e[t]-=r,e[t+1]=o-e[t+1];break;case 90:for(let t=0,n=e.length;t<n;t+=2){let n=e[t];e[t]=e[t+1]-i,e[t+1]=n-r}break;case 180:for(let t=0,n=e.length;t<n;t+=2)e[t]=a-e[t],e[t+1]-=i;break;case 270:for(let t=0,n=e.length;t<n;t+=2){let n=e[t];e[t]=o-e[t+1],e[t+1]=a-n}break;default:throw Error(`Invalid rotation`)}return e}function _serializePaths(e,t,n,r){let i=[],a=this.thickness/2,o=e*t+a,c=e*n+a;for(let t of this.paths){let n=[],a=[];for(let r=0,i=t.length;r<i;r++){let[u,K,Y,X]=t[r];if(u[0]===X[0]&&u[1]===X[1]&&i===1){let t=e*u[0]+o,r=e*u[1]+c;n.push(t,r),a.push(t,r);break}let ee=e*u[0]+o,te=e*u[1]+c,ce=e*K[0]+o,ue=e*K[1]+c,de=e*Y[0]+o,fe=e*Y[1]+c,me=e*X[0]+o,ge=e*X[1]+c;r===0&&(n.push(ee,te),a.push(ee,te)),n.push(ce,ue,de,fe,me,ge),a.push(ce,ue),r===i-1&&a.push(me,ge)}i.push({bezier:_toPDFCoordinates.call(_InkEditor,n,r,this.rotation),points:_toPDFCoordinates.call(_InkEditor,a,r,this.rotation)})}return i}function _getBbox(){let e=1/0,t=-1/0,n=1/0,r=-1/0;for(let i of this.paths)for(let[a,o,c,u]of i){let i=Util.bezierBoundingBox(...a,...o,...c,...u);
81e=Math.min(e,i[0]),n=Math.min(n,i[1]),t=Math.max(t,i[2]),r=Math.max(r,i[3])}return[e,n,t,r]}function _getPadding(){return _classPrivateFieldGet2(_disableEditing,this)?Math.ceil(this.thickness*this.parentScale):0}function _fitToContent(e=!1){if(this.isEmpty())return;if(!_classPrivateFieldGet2(_disableEditing,this)){_assertClassBrand(_InkEditor_brand,this,_redraw).call(this);return}let t=_assertClassBrand(_InkEditor_brand,this,_getBbox).call(this),n=_assertClassBrand(_InkEditor_brand,this,_getPadding).call(this);_classPrivateFieldSet2(_baseWidth,this,Math.max(AnnotationEditor.MIN_SIZE,t[2]-t[0])),_classPrivateFieldSet2(_baseHeight,this,Math.max(AnnotationEditor.MIN_SIZE,t[3]-t[1]));let r=Math.ceil(n+_classPrivateFieldGet2(_baseWidth,this)*this.scaleFactor),i=Math.ceil(n+_classPrivateFieldGet2(_baseHeight,this)*this.scaleFactor),[a,o]=this.parentDimensions;this.width=r/a,this.height=i/o,this.setAspectRatio(r,i);let c=this.translationX,u=this.translationY;this.translationX=-t[0],this.translationY=-t[1],_assertClassBrand(_InkEditor_brand,this,_setCanvasDims).call(this),_assertClassBrand(_InkEditor_brand,this,_redraw).call(this),_classPrivateFieldSet2(_realWidth,this,r),_classPrivateFieldSet2(_realHeight,this,i),this.setDims(r,i);let K=e?n/this.scaleFactor/2:0;this.translate(c-this.translationX-K,u-this.translationY-K)}_defineProperty$6(InkEditor,`_defaultColor`,null),_defineProperty$6(InkEditor,`_defaultOpacity`,1),_defineProperty$6(InkEditor,`_defaultThickness`,1),_defineProperty$6(InkEditor,`_type`,`ink`),_defineProperty$6(InkEditor,`_editorType`,AnnotationEditorType.INK);var _bitmap=new WeakMap,_bitmapId=new WeakMap,_bitmapPromise=new WeakMap,_bitmapUrl=new WeakMap,_bitmapFile=new WeakMap,_bitmapFileName=new WeakMap,_canvas=new WeakMap,_observer2=new WeakMap,_resizeTimeoutId=new WeakMap,_isSvg=new WeakMap,_hasBeenAddedInUndoStack=new WeakMap,_StampEditor_brand=new WeakSet,StampEditor=class extends AnnotationEditor{constructor(e){super({...e,name:`stampEditor`}),_classPrivateMethodInitSpec(this,_StampEditor_brand),_classPrivateFieldInitSpec(this,_bitmap,null),_classPrivateFieldInitSpec(this,_bitmapId,null),_classPrivateFieldInitSpec(this,_bitmapPromise,null),_classPrivateFieldInitSpec(this,_bitmapUrl,null),_classPrivateFieldInitSpec(this,_bitmapFile,null),_classPrivateFieldInitSpec(this,_bitmapFileName,``),_classPrivateFieldInitSpec(this,_canvas,null),_classPrivateFieldInitSpec(this,_observer2,null),_classPrivateFieldInitSpec(this,_resizeTimeoutId,null),_classPrivateFieldInitSpec(this,_isSvg,!1),_classPrivateFieldInitSpec(this,_hasBeenAddedInUndoStack,!1),_classPrivateFieldSet2(_bitmapUrl,this,e.bitmapUrl),_classPrivateFieldSet2(_bitmapFile,this,e.bitmapFile)}static initialize(e,t){AnnotationEditor.initialize(e,t)}static get supportedTypes(){return shadow(this,`supportedTypes`,[`apng`,`avif`,`bmp`,`gif`,`jpeg`,`png`,`svg+xml`,`webp`,`x-icon`].map(e=>`image/${e}`))}static get supportedTypesStr(){return shadow(this,`supportedTypesStr`,this.supportedTypes.join(`,`))}static isHandlingMimeForPasting(e){return this.supportedTypes.includes(e)}static paste(e,t){t.pasteEditor(AnnotationEditorType.STAMP,{bitmapFile:e.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){return{type:`stamp`,hasAltText:!!this.altTextData?.altText}}static computeTelemetryFinalData(e){let t=e.get(`hasAltText`);return{hasAltText:t.get(!0)??0,hasNoAltText:t.get(!1)??0}}async mlGuessAltText(e=null,t=!0){if(this.hasAltTextData())return null;let{mlManager:n}=this._uiManager;if(!n)throw Error(`No ML.`);if(!await n.isEnabledFor(`altText`))throw Error(`ML isn't enabled for alt text.`);let{data:r,width:i,height:a}=e||this.copyCanvas(null,null,!0).imageData,o=await n.guess({name:`altText`,request:{data:r,width:i,height:a,channels:r.length/(i*a)}});if(!o)throw Error(`No response from the AI service.`);if(o.error)throw Error(`Error from the AI service.`);if(o.cancel)return null;if(!o.output)throw Error(`No valid response from the AI service.`);let c=o.output;return await this.setGuessedAltText(c),t&&!this.hasAltTextData()&&(this.altTextData={alt:c,decorative:!1}),c}remove(){_classPrivateFieldGet2(_bitmapId,this)&&(_classPrivateFieldSet2(_bitmap,this,null),this._uiManager.imageManager.deleteId(_classPrivateFieldGet2(_bitmapId,this)),_classPrivateFieldGet2(_canvas,this)?.remove(),_classPrivateFieldSet2(_canvas,this,null),_classPrivateFieldGet2(_observer2,this)?.disconnect(),_classPrivateFieldSet2(_observer2,this,null),_classPrivateFieldGet2(_resizeTimeoutId,this)&&(clearTimeout(_classPrivateFieldGet2(_resizeTimeoutId,this)),_classPrivateFieldSet2(_resizeTimeoutId,this,null))),super.remove()}rebuild(){if(!this.parent){_classPrivateFieldGet2(_bitmapId,this)&&_assertClassBrand(_StampEditor_brand,this,_getBitmap).call(this);return}super.rebuild(),this.div!==null&&(_classPrivateFieldGet2(_bitmapId,this)&&_classPrivateFieldGet2(_canvas,this)===null&&_assertClassBrand(_StampEditor_brand,this,_getBitmap).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(_classPrivateFieldGet2(_bitmapPromise,this)||_classPrivateFieldGet2(_bitmap,this)||_classPrivateFieldGet2(_bitmapUrl,this)||_classPrivateFieldGet2(_bitmapFile,this)||_classPrivateFieldGet2(_bitmapId,this))}get isResizable(){return!0}
81render(){if(this.div)return this.div;let e,t;if(this.width&&(e=this.x,t=this.y),super.render(),this.div.hidden=!0,this.div.setAttribute(`role`,`figure`),this.addAltTextButton(),_classPrivateFieldGet2(_bitmap,this)?_assertClassBrand(_StampEditor_brand,this,_createCanvas2).call(this):_assertClassBrand(_StampEditor_brand,this,_getBitmap).call(this),this.width&&!this.annotationElementId){let[n,r]=this.parentDimensions;this.setAt(e*n,t*r,this.width*n,this.height*r)}return this.div}copyCanvas(e,t,n=!1){e||=224;let{width:r,height:i}=_classPrivateFieldGet2(_bitmap,this),a=new OutputScale,o=_classPrivateFieldGet2(_bitmap,this),c=r,u=i,K=null;if(t){if(r>t||i>t){let e=Math.min(t/r,t/i);c=Math.floor(r*e),u=Math.floor(i*e)}K=document.createElement(`canvas`);let e=K.width=Math.ceil(c*a.sx),n=K.height=Math.ceil(u*a.sy);_classPrivateFieldGet2(_isSvg,this)||(o=_assertClassBrand(_StampEditor_brand,this,_scaleBitmap).call(this,e,n));let Y=K.getContext(`2d`);Y.filter=this._uiManager.hcmFilter;let X=`white`,ee=`#cfcfd8`;this._uiManager.hcmFilter===`none`?window.matchMedia?.(`(prefers-color-scheme: dark)`).matches&&(X=`#8f8f9d`,ee=`#42414d`):ee=`black`;let te=15,ce=15*a.sx,ue=15*a.sy,de=new OffscreenCanvas(ce*2,ue*2),fe=de.getContext(`2d`);fe.fillStyle=X,fe.fillRect(0,0,ce*2,ue*2),fe.fillStyle=ee,fe.fillRect(0,0,ce,ue),fe.fillRect(ce,ue,ce,ue),Y.fillStyle=Y.createPattern(de,`repeat`),Y.fillRect(0,0,e,n),Y.drawImage(o,0,0,o.width,o.height,0,0,e,n)}let Y=null;if(n){let t,n;if(a.symmetric&&o.width<e&&o.height<e)t=o.width,n=o.height;else if(o=_classPrivateFieldGet2(_bitmap,this),r>e||i>e){let a=Math.min(e/r,e/i);t=Math.floor(r*a),n=Math.floor(i*a),_classPrivateFieldGet2(_isSvg,this)||(o=_assertClassBrand(_StampEditor_brand,this,_scaleBitmap).call(this,t,n))}let c=new OffscreenCanvas(t,n).getContext(`2d`,{willReadFrequently:!0});c.drawImage(o,0,0,o.width,o.height,0,0,t,n),Y={width:t,height:n,data:c.getImageData(0,0,t,n).data}}return{canvas:K,width:c,height:u,imageData:Y}}getImageForAltText(){return _classPrivateFieldGet2(_canvas,this)}static async deserialize(e,t,n){let r=null;if(e instanceof StampAnnotationElement){let{data:{rect:i,rotation:a,id:o,structParent:c,popupRef:u},container:K,parent:{page:{pageNumber:Y}}}=e,X=K.querySelector(`canvas`),ee=n.imageManager.getFromCanvas(K.id,X);X.remove();let te=(await t._structTree.getAriaAttributes(`${AnnotationPrefix}${o}`))?.get(`aria-label`)||``;r=e={annotationType:AnnotationEditorType.STAMP,bitmapId:ee.id,bitmap:ee.bitmap,pageIndex:Y-1,rect:i.slice(0),rotation:a,id:o,deleted:!1,accessibilityData:{decorative:!1,altText:te},isSvg:!1,structParent:c,popupRef:u}}let i=await super.deserialize(e,t,n),{rect:a,bitmap:o,bitmapUrl:c,bitmapId:u,isSvg:K,accessibilityData:Y}=e;u&&n.imageManager.isValidId(u)?(_classPrivateFieldSet2(_bitmapId,i,u),o&&_classPrivateFieldSet2(_bitmap,i,o)):_classPrivateFieldSet2(_bitmapUrl,i,c),_classPrivateFieldSet2(_isSvg,i,K);let[X,ee]=i.pageDimensions;return i.width=(a[2]-a[0])/X,i.height=(a[3]-a[1])/ee,i.annotationElementId=e.id||null,Y&&(i.altTextData=Y),i._initialData=r,_classPrivateFieldSet2(_hasBeenAddedInUndoStack,i,!!r),i}serialize(e=!1,t=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let n={annotationType:AnnotationEditorType.STAMP,bitmapId:_classPrivateFieldGet2(_bitmapId,this),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:_classPrivateFieldGet2(_isSvg,this),structTreeParentId:this._structTreeParentId};if(e)return n.bitmapUrl=_assertClassBrand(_StampEditor_brand,this,_serializeBitmap).call(this,!0),n.accessibilityData=this.serializeAltText(!0),n;let{decorative:r,altText:i}=this.serializeAltText(!1);if(!r&&i&&(n.accessibilityData={type:`Figure`,alt:i}),this.annotationElementId){let e=_assertClassBrand(_StampEditor_brand,this,_hasElementChanged3).call(this,n);if(e.isSame)return null;e.isSameAltText?delete n.accessibilityData:n.accessibilityData.structParent=this._initialData.structParent??-1}if(n.id=this.annotationElementId,t===null)return n;t.stamps||=new Map;let a=_classPrivateFieldGet2(_isSvg,this)?(n.rect[2]-n.rect[0])*(n.rect[3]-n.rect[1]):null;if(!t.stamps.has(_classPrivateFieldGet2(_bitmapId,this)))t.stamps.set(_classPrivateFieldGet2(_bitmapId,this),{area:a,serialized:n}),n.bitmap=_assertClassBrand(_StampEditor_brand,this,_serializeBitmap).call(this,!1);else if(_classPrivateFieldGet2(_isSvg,this)){let e=t.stamps.get(_classPrivateFieldGet2(_bitmapId,this));a>e.area&&(e.area=a,e.serialized.bitmap.close(),e.serialized.bitmap=_assertClassBrand(_StampEditor_brand,this,_serializeBitmap).call(this,!1))}return n}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}};_StampEditor=StampEditor;function _getBitmapFetched(e,t=!1){if(!e){this.remove();return}_classPrivateFieldSet2(_bitmap,this,e.bitmap),t||(_classPrivateFieldSet2(_bitmapId,this,e.id),_classPrivateFieldSet2(_isSvg,this,e.isSvg)),e.file&&_classPrivateFieldSet2(_bitmapFileName,this,e.file.name),_assertClassBrand(_StampEditor_brand,this,_createCanvas2).call(this)}function _getBitmapDone(){if(_classPrivateFieldSet2(_bitmapPromise,this,null),this._uiManager.enableWaiting(!1),_classPrivateFieldGet2(_canvas,this)){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&_classPrivateFieldGet2(_bitmap,this)){this._editToolbar.hide(),this._uiManager.editAltText(this,!0);return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&_classPrivateFieldGet2(_bitmap,this)){this._reportTelemetry({action:`pdfjs.image.image_added`,data:{alt_text_modal:!1,alt_text_type:`empty`}});try{this.mlGuessAltText()}catch{}}this.div.focus()}}function _getBitmap(){if(_classPrivateFieldGet2(_bitmapId,this)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(_classPrivateFieldGet2(_bitmapId,this)).then(e=>_assertClassBrand(_StampEditor_brand,this,_getBitmapFetched).call(this,e,!0)).finally(()=>_assertClassBrand(_StampEditor_brand,this,_getBitmapDone).call(this));return}if(_classPrivateFieldGet2(_bitmapUrl,this)){let e=_classPrivateFieldGet2(_bitmapUrl,this);_classPrivateFieldSet2(_bitmapUrl,this,null),this._uiManager.enableWaiting(!0),_classPrivateFieldSet2(_bitmapPromise,this,this._uiManager.imageManager.getFromUrl(e).then(e=>_assertClassBrand(_StampEditor_brand,this,_getBitmapFetched).call(this,e)).finally(()=>_assertClassBrand(_StampEditor_brand,this,_getBitmapDone).call(this)));return}if(_classPrivateFieldGet2(_bitmapFile,this)){let e=_classPrivateFieldGet2(_bitmapFile,this);_classPrivateFieldSet2(_bitmapFile,this,null),this._uiManager.enableWaiting(!0),_classPrivateFieldSet2(_bitmapPromise,this,this._uiManager.imageManager.getFromFile(e).then(e=>_assertClassBrand(_StampEditor_brand,this,_getBitmapFetched).call(this,e)).finally(()=>_assertClassBrand(_StampEditor_brand,this,_getBitmapDone).call(this)));return}
81let e=document.createElement(`input`);e.type=`file`,e.accept=_StampEditor.supportedTypesStr;let t=this._uiManager._signal;_classPrivateFieldSet2(_bitmapPromise,this,new Promise(n=>{e.addEventListener(`change`,async()=>{if(!e.files||e.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);let t=await this._uiManager.imageManager.getFromFile(e.files[0]);this._reportTelemetry({action:`pdfjs.image.image_selected`,data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),_assertClassBrand(_StampEditor_brand,this,_getBitmapFetched).call(this,t)}n()},{signal:t}),e.addEventListener(`cancel`,()=>{this.remove(),n()},{signal:t})}).finally(()=>_assertClassBrand(_StampEditor_brand,this,_getBitmapDone).call(this))),e.click()}function _createCanvas2(){let{div:e}=this,{width:t,height:n}=_classPrivateFieldGet2(_bitmap,this),[r,i]=this.pageDimensions,a=.75;if(this.width)t=this.width*r,n=this.height*i;else if(t>a*r||n>a*i){let e=Math.min(a*r/t,a*i/n);t*=e,n*=e}let[o,c]=this.parentDimensions;this.setDims(t*o/r,n*c/i),this._uiManager.enableWaiting(!1);let u=_classPrivateFieldSet2(_canvas,this,document.createElement(`canvas`));u.setAttribute(`role`,`img`),this.addContainer(u),(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(e.hidden=!1),_assertClassBrand(_StampEditor_brand,this,_drawBitmap).call(this,t,n),_assertClassBrand(_StampEditor_brand,this,_createObserver2).call(this),_classPrivateFieldGet2(_hasBeenAddedInUndoStack,this)||(this.parent.addUndoableEditor(this),_classPrivateFieldSet2(_hasBeenAddedInUndoStack,this,!0)),this._reportTelemetry({action:`inserted_image`}),_classPrivateFieldGet2(_bitmapFileName,this)&&u.setAttribute(`aria-label`,_classPrivateFieldGet2(_bitmapFileName,this))}function _setDimensions(e,t){let[n,r]=this.parentDimensions;this.width=e/n,this.height=t/r,this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,_classPrivateFieldGet2(_resizeTimeoutId,this)!==null&&clearTimeout(_classPrivateFieldGet2(_resizeTimeoutId,this)),_classPrivateFieldSet2(_resizeTimeoutId,this,setTimeout(()=>{_classPrivateFieldSet2(_resizeTimeoutId,this,null),_assertClassBrand(_StampEditor_brand,this,_drawBitmap).call(this,e,t)},200))}function _scaleBitmap(e,t){let{width:n,height:r}=_classPrivateFieldGet2(_bitmap,this),i=n,a=r,o=_classPrivateFieldGet2(_bitmap,this);for(;i>2*e||a>2*t;){let n=i,r=a;i>2*e&&(i=i>=16384?Math.floor(i/2)-1:Math.ceil(i/2)),a>2*t&&(a=a>=16384?Math.floor(a/2)-1:Math.ceil(a/2));let c=new OffscreenCanvas(i,a);c.getContext(`2d`).drawImage(o,0,0,n,r,0,0,i,a),o=c.transferToImageBitmap()}return o}function _drawBitmap(e,t){let n=new OutputScale,r=Math.ceil(e*n.sx),i=Math.ceil(t*n.sy),a=_classPrivateFieldGet2(_canvas,this);if(!a||a.width===r&&a.height===i)return;a.width=r,a.height=i;let o=_classPrivateFieldGet2(_isSvg,this)?_classPrivateFieldGet2(_bitmap,this):_assertClassBrand(_StampEditor_brand,this,_scaleBitmap).call(this,r,i),c=a.getContext(`2d`);c.filter=this._uiManager.hcmFilter,c.drawImage(o,0,0,o.width,o.height,0,0,r,i)}function _serializeBitmap(e){if(e){if(_classPrivateFieldGet2(_isSvg,this)){let e=this._uiManager.imageManager.getSvgUrl(_classPrivateFieldGet2(_bitmapId,this));if(e)return e}let e=document.createElement(`canvas`);return{width:e.width,height:e.height}=_classPrivateFieldGet2(_bitmap,this),e.getContext(`2d`).drawImage(_classPrivateFieldGet2(_bitmap,this),0,0),e.toDataURL()}if(_classPrivateFieldGet2(_isSvg,this)){let[e,t]=this.pageDimensions,n=Math.round(this.width*e*PixelsPerInch.PDF_TO_CSS_UNITS),r=Math.round(this.height*t*PixelsPerInch.PDF_TO_CSS_UNITS),i=new OffscreenCanvas(n,r);return i.getContext(`2d`).drawImage(_classPrivateFieldGet2(_bitmap,this),0,0,_classPrivateFieldGet2(_bitmap,this).width,_classPrivateFieldGet2(_bitmap,this).height,0,0,n,r),i.transferToImageBitmap()}return structuredClone(_classPrivateFieldGet2(_bitmap,this))}function _createObserver2(){this._uiManager._signal&&(_classPrivateFieldSet2(_observer2,this,new ResizeObserver(e=>{let t=e[0].contentRect;t.width&&t.height&&_assertClassBrand(_StampEditor_brand,this,_setDimensions).call(this,t.width,t.height)})),_classPrivateFieldGet2(_observer2,this).observe(this.div),this._uiManager._signal.addEventListener(`abort`,()=>{_classPrivateFieldGet2(_observer2,this)?.disconnect(),_classPrivateFieldSet2(_observer2,this,null)},{once:!0}))}function _hasElementChanged3(e){let{rect:t,pageIndex:n,accessibilityData:{altText:r}}=this._initialData,i=e.rect.every((e,n)=>Math.abs(e-t[n])<1),a=e.pageIndex===n,o=(e.accessibilityData?.alt||``)===r;return{isSame:i&&a&&o,isSameAltText:o}}_defineProperty$6(StampEditor,`_type`,`stamp`),_defineProperty$6(StampEditor,`_editorType`,AnnotationEditorType.STAMP);var _accessibilityManager2=new WeakMap,_allowClick=new WeakMap,_annotationLayer=new WeakMap,_clickAC=new WeakMap,_editorFocusTimeoutId=new WeakMap,_editors=new WeakMap,_hadPointerDown=new WeakMap,_isCleaningUp=new WeakMap,_isDisabling=new WeakMap,_textLayer=new WeakMap,_textSelectionAC=new WeakMap,_uiManager4=new WeakMap,_AnnotationEditorLayer_brand=new WeakSet,AnnotationEditorLayer=class e{constructor({uiManager:t,pageIndex:n,div:r,structTreeLayer:i,accessibilityManager:a,annotationLayer:o,drawLayer:c,textLayer:u,viewport:K,l10n:Y}){_classPrivateMethodInitSpec(this,_AnnotationEditorLayer_brand),_classPrivateFieldInitSpec(this,_accessibilityManager2,void 0),_classPrivateFieldInitSpec(this,_allowClick,!1),_classPrivateFieldInitSpec(this,_annotationLayer,null),_classPrivateFieldInitSpec(this,_clickAC,null),_classPrivateFieldInitSpec(this,_editorFocusTimeoutId,null),_classPrivateFieldInitSpec(this,_editors,new Map),_classPrivateFieldInitSpec(this,_hadPointerDown,!1),_classPrivateFieldInitSpec(this,_isCleaningUp,!1),_classPrivateFieldInitSpec(this,_isDisabling,!1),_classPrivateFieldInitSpec(this,_textLayer,null),_classPrivateFieldInitSpec(this,_textSelectionAC,null),_classPrivateFieldInitSpec(this,_uiManager4,void 0);let X=[..._editorTypes2._.values()];if(!e._initialized){e._initialized=!0;
81for(let e of X)e.initialize(Y,t)}t.registerEditorTypes(X),_classPrivateFieldSet2(_uiManager4,this,t),this.pageIndex=n,this.div=r,_classPrivateFieldSet2(_accessibilityManager2,this,a),_classPrivateFieldSet2(_annotationLayer,this,o),this.viewport=K,_classPrivateFieldSet2(_textLayer,this,u),this.drawLayer=c,this._structTree=i,_classPrivateFieldGet2(_uiManager4,this).addLayer(this)}get isEmpty(){return _classPrivateFieldGet2(_editors,this).size===0}get isInvisible(){return this.isEmpty&&_classPrivateFieldGet2(_uiManager4,this).getMode()===AnnotationEditorType.NONE}updateToolbar(e){_classPrivateFieldGet2(_uiManager4,this).updateToolbar(e)}updateMode(e=_classPrivateFieldGet2(_uiManager4,this).getMode()){switch(_assertClassBrand(_AnnotationEditorLayer_brand,this,_cleanup).call(this),e){case AnnotationEditorType.NONE:this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case AnnotationEditorType.INK:this.addInkEditorIfNeeded(!1),this.disableTextSelection(),this.togglePointerEvents(!0),this.disableClick();break;case AnnotationEditorType.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);let{classList:t}=this.div;for(let n of _editorTypes2._.values())t.toggle(`${n._type}Editing`,e===n._editorType);this.div.hidden=!1}hasTextLayer(e){return e===_classPrivateFieldGet2(_textLayer,this)?.div}addInkEditorIfNeeded(e){if(_classPrivateFieldGet2(_uiManager4,this).getMode()===AnnotationEditorType.INK){if(!e){for(let e of _classPrivateFieldGet2(_editors,this).values())if(e.isEmpty()){e.setInBackground();return}}this.createAndAddNewEditor({offsetX:0,offsetY:0},!1).setInBackground()}}setEditingState(e){_classPrivateFieldGet2(_uiManager4,this).setEditingState(e)}addCommands(e){_classPrivateFieldGet2(_uiManager4,this).addCommands(e)}toggleDrawing(e=!1){this.div.classList.toggle(`drawing`,!e)}togglePointerEvents(e=!1){this.div.classList.toggle(`disabled`,!e)}toggleAnnotationLayerPointerEvents(e=!1){_classPrivateFieldGet2(_annotationLayer,this)?.div.classList.toggle(`disabled`,!e)}async enable(){this.div.tabIndex=0,this.togglePointerEvents(!0);let e=new Set;for(let t of _classPrivateFieldGet2(_editors,this).values())t.enableEditing(),t.show(!0),t.annotationElementId&&(_classPrivateFieldGet2(_uiManager4,this).removeChangedExistingAnnotation(t),e.add(t.annotationElementId));if(!_classPrivateFieldGet2(_annotationLayer,this))return;let t=_classPrivateFieldGet2(_annotationLayer,this).getEditableAnnotations();for(let n of t){if(n.hide(),_classPrivateFieldGet2(_uiManager4,this).isDeletedAnnotationElement(n.data.id)||e.has(n.data.id))continue;let t=await this.deserialize(n);t&&(this.addOrRebuild(t),t.enableEditing())}}disable(){_classPrivateFieldSet2(_isDisabling,this,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1);let e=new Map,t=new Map;for(let n of _classPrivateFieldGet2(_editors,this).values())if(n.disableEditing(),n.annotationElementId){if(n.serialize()!==null){e.set(n.annotationElementId,n);continue}t.set(n.annotationElementId,n),this.getEditableAnnotation(n.annotationElementId)?.show(),n.remove()}if(_classPrivateFieldGet2(_annotationLayer,this)){let n=_classPrivateFieldGet2(_annotationLayer,this).getEditableAnnotations();for(let r of n){let{id:n}=r.data;if(_classPrivateFieldGet2(_uiManager4,this).isDeletedAnnotationElement(n))continue;let i=t.get(n);if(i){i.resetAnnotationElement(r),i.show(!1),r.show();continue}i=e.get(n),i&&(_classPrivateFieldGet2(_uiManager4,this).addChangedExistingAnnotation(i),i.renderAnnotationElement(r)&&i.show(!1)),r.show()}}_assertClassBrand(_AnnotationEditorLayer_brand,this,_cleanup).call(this),this.isEmpty&&(this.div.hidden=!0);let{classList:n}=this.div;for(let e of _editorTypes2._.values())n.remove(`${e._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),_classPrivateFieldSet2(_isDisabling,this,!1)}getEditableAnnotation(e){return _classPrivateFieldGet2(_annotationLayer,this)?.getEditableAnnotation(e)||null}setActiveEditor(e){_classPrivateFieldGet2(_uiManager4,this).getActive()!==e&&_classPrivateFieldGet2(_uiManager4,this).setActiveEditor(e)}enableTextSelection(){if(this.div.tabIndex=-1,_classPrivateFieldGet2(_textLayer,this)?.div&&!_classPrivateFieldGet2(_textSelectionAC,this)){_classPrivateFieldSet2(_textSelectionAC,this,new AbortController);let e=_classPrivateFieldGet2(_uiManager4,this).combinedSignal(_classPrivateFieldGet2(_textSelectionAC,this));_classPrivateFieldGet2(_textLayer,this).div.addEventListener(`pointerdown`,_assertClassBrand(_AnnotationEditorLayer_brand,this,_textLayerPointerDown).bind(this),{signal:e}),_classPrivateFieldGet2(_textLayer,this).div.classList.add(`highlighting`)}}disableTextSelection(){this.div.tabIndex=0,_classPrivateFieldGet2(_textLayer,this)?.div&&_classPrivateFieldGet2(_textSelectionAC,this)&&(_classPrivateFieldGet2(_textSelectionAC,this).abort(),_classPrivateFieldSet2(_textSelectionAC,this,null),_classPrivateFieldGet2(_textLayer,this).div.classList.remove(`highlighting`))}enableClick(){if(_classPrivateFieldGet2(_clickAC,this))return;_classPrivateFieldSet2(_clickAC,this,new AbortController);let e=_classPrivateFieldGet2(_uiManager4,this).combinedSignal(_classPrivateFieldGet2(_clickAC,this));this.div.addEventListener(`pointerdown`,this.pointerdown.bind(this),{signal:e}),this.div.addEventListener(`pointerup`,this.pointerup.bind(this),{signal:e})}disableClick(){_classPrivateFieldGet2(_clickAC,this)?.abort(),_classPrivateFieldSet2(_clickAC,this,null)}attach(e){_classPrivateFieldGet2(_editors,this).set(e.id,e);let{annotationElementId:t}=e;t&&_classPrivateFieldGet2(_uiManager4,this).isDeletedAnnotationElement(t)&&_classPrivateFieldGet2(_uiManager4,this).removeDeletedAnnotationElement(e)}detach(e){_classPrivateFieldGet2(_editors,this).delete(e.id),_classPrivateFieldGet2(_accessibilityManager2,this)?.removePointerInTextLayer(e.contentDiv),!_classPrivateFieldGet2(_isDisabling,this)&&e.annotationElementId&&_classPrivateFieldGet2(_uiManager4,this).addDeletedAnnotationElement(e)}remove(e){this.detach(e),_classPrivateFieldGet2(_uiManager4,this).removeEditor(e),e.div.remove(),e.isAttachedToDOM=!1,_classPrivateFieldGet2(_isCleaningUp,this)||this.addInkEditorIfNeeded(!1)}changeParent(e){e.parent!==this&&(e.parent&&e.annotationElementId&&(_classPrivateFieldGet2(_uiManager4,this).addDeletedAnnotationElement(e.annotationElementId),AnnotationEditor.deleteAnnotationElement(e),e.annotationElementId=null),this.attach(e),e.parent?.detach(e),e.setParent(this),e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}
81add(e){if(!(e.parent===this&&e.isAttachedToDOM)){if(this.changeParent(e),_classPrivateFieldGet2(_uiManager4,this).addEditor(e),this.attach(e),!e.isAttachedToDOM){let t=e.render();this.div.append(t),e.isAttachedToDOM=!0}e.fixAndSetPosition(),e.onceAdded(),_classPrivateFieldGet2(_uiManager4,this).addToAnnotationStorage(e),e._reportTelemetry(e.telemetryInitialData)}}moveEditorInDOM(e){if(!e.isAttachedToDOM)return;let{activeElement:t}=document;e.div.contains(t)&&!_classPrivateFieldGet2(_editorFocusTimeoutId,this)&&(e._focusEventsAllowed=!1,_classPrivateFieldSet2(_editorFocusTimeoutId,this,setTimeout(()=>{_classPrivateFieldSet2(_editorFocusTimeoutId,this,null),e.div.contains(document.activeElement)?e._focusEventsAllowed=!0:(e.div.addEventListener(`focusin`,()=>{e._focusEventsAllowed=!0},{once:!0,signal:_classPrivateFieldGet2(_uiManager4,this)._signal}),t.focus())},0))),e._structTreeParentId=_classPrivateFieldGet2(_accessibilityManager2,this)?.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addOrRebuild(e){e.needsToBeRebuilt()?(e.parent||=this,e.rebuild(),e.show()):this.add(e)}addUndoableEditor(e){this.addCommands({cmd:()=>e._uiManager.rebuild(e),undo:()=>{e.remove()},mustExec:!1})}getNextId(){return _classPrivateFieldGet2(_uiManager4,this).getId()}combinedSignal(e){return _classPrivateFieldGet2(_uiManager4,this).combinedSignal(e)}canCreateNewEmptyEditor(){return _get_currentEditorType.call(_assertClassBrand(_AnnotationEditorLayer_brand,this))?.canCreateNewEmptyEditor()}pasteEditor(e,t){_classPrivateFieldGet2(_uiManager4,this).updateToolbar(e),_classPrivateFieldGet2(_uiManager4,this).updateMode(e);let{offsetX:n,offsetY:r}=_assertClassBrand(_AnnotationEditorLayer_brand,this,_getCenterPoint).call(this),i=this.getNextId(),a=_assertClassBrand(_AnnotationEditorLayer_brand,this,_createNewEditor).call(this,{parent:this,id:i,x:n,y:r,uiManager:_classPrivateFieldGet2(_uiManager4,this),isCentered:!0,...t});a&&this.add(a)}async deserialize(e){return await _editorTypes2._.get(e.annotationType??e.annotationEditorType)?.deserialize(e,this,_classPrivateFieldGet2(_uiManager4,this))||null}createAndAddNewEditor(e,t,n={}){let r=this.getNextId(),i=_assertClassBrand(_AnnotationEditorLayer_brand,this,_createNewEditor).call(this,{parent:this,id:r,x:e.offsetX,y:e.offsetY,uiManager:_classPrivateFieldGet2(_uiManager4,this),isCentered:t,...n});return i&&this.add(i),i}addNewEditor(){this.createAndAddNewEditor(_assertClassBrand(_AnnotationEditorLayer_brand,this,_getCenterPoint).call(this),!0)}setSelected(e){_classPrivateFieldGet2(_uiManager4,this).setSelected(e)}toggleSelected(e){_classPrivateFieldGet2(_uiManager4,this).toggleSelected(e)}unselect(e){_classPrivateFieldGet2(_uiManager4,this).unselect(e)}pointerup(e){let{isMac:t}=util_FeatureTest.platform;if(!(e.button!==0||e.ctrlKey&&t)&&e.target===this.div&&_classPrivateFieldGet2(_hadPointerDown,this)){if(_classPrivateFieldSet2(_hadPointerDown,this,!1),!_classPrivateFieldGet2(_allowClick,this)){_classPrivateFieldSet2(_allowClick,this,!0);return}if(_classPrivateFieldGet2(_uiManager4,this).getMode()===AnnotationEditorType.STAMP){_classPrivateFieldGet2(_uiManager4,this).unselectAll();return}this.createAndAddNewEditor(e,!1)}}pointerdown(e){if(_classPrivateFieldGet2(_uiManager4,this).getMode()===AnnotationEditorType.HIGHLIGHT&&this.enableTextSelection(),_classPrivateFieldGet2(_hadPointerDown,this)){_classPrivateFieldSet2(_hadPointerDown,this,!1);return}let{isMac:t}=util_FeatureTest.platform;if(e.button!==0||e.ctrlKey&&t||e.target!==this.div)return;_classPrivateFieldSet2(_hadPointerDown,this,!0);let n=_classPrivateFieldGet2(_uiManager4,this).getActive();_classPrivateFieldSet2(_allowClick,this,!n||n.isEmpty())}findNewParent(e,t,n){let r=_classPrivateFieldGet2(_uiManager4,this).findParent(t,n);return r===null||r===this?!1:(r.changeParent(e),!0)}destroy(){_classPrivateFieldGet2(_uiManager4,this).getActive()?.parent===this&&(_classPrivateFieldGet2(_uiManager4,this).commitOrRemove(),_classPrivateFieldGet2(_uiManager4,this).setActiveEditor(null)),_classPrivateFieldGet2(_editorFocusTimeoutId,this)&&(clearTimeout(_classPrivateFieldGet2(_editorFocusTimeoutId,this)),_classPrivateFieldSet2(_editorFocusTimeoutId,this,null));for(let e of _classPrivateFieldGet2(_editors,this).values())_classPrivateFieldGet2(_accessibilityManager2,this)?.removePointerInTextLayer(e.contentDiv),e.setParent(null),e.isAttachedToDOM=!1,e.div.remove();this.div=null,_classPrivateFieldGet2(_editors,this).clear(),_classPrivateFieldGet2(_uiManager4,this).removeLayer(this)}render({viewport:e}){this.viewport=e,setLayerDimensions(this.div,e);for(let e of _classPrivateFieldGet2(_uiManager4,this).getEditors(this.pageIndex))this.add(e),e.rebuild();this.updateMode()}update({viewport:e}){_classPrivateFieldGet2(_uiManager4,this).commitOrRemove(),_assertClassBrand(_AnnotationEditorLayer_brand,this,_cleanup).call(this);let t=this.viewport.rotation,n=e.rotation;if(this.viewport=e,setLayerDimensions(this.div,{rotation:n}),t!==n)for(let e of _classPrivateFieldGet2(_editors,this).values())e.rotate(n);this.addInkEditorIfNeeded(!1)}get pageDimensions(){let{pageWidth:e,pageHeight:t}=this.viewport.rawDims;return[e,t]}get scale(){return _classPrivateFieldGet2(_uiManager4,this).viewParameters.realScale}};function _textLayerPointerDown(e){_classPrivateFieldGet2(_uiManager4,this).unselectAll();let{target:t}=e;if(t===_classPrivateFieldGet2(_textLayer,this).div||(t.getAttribute(`role`)===`img`||t.classList.contains(`endOfContent`))&&_classPrivateFieldGet2(_textLayer,this).div.contains(t)){let{isMac:t}=util_FeatureTest.platform;if(e.button!==0||e.ctrlKey&&t)return;_classPrivateFieldGet2(_uiManager4,this).showAllEditors(`highlight`,!0,!0),_classPrivateFieldGet2(_textLayer,this).div.classList.add(`free`),this.toggleDrawing(),HighlightEditor.startHighlighting(this,_classPrivateFieldGet2(_uiManager4,this).direction===`ltr`,{target:_classPrivateFieldGet2(_textLayer,this).div,x:e.x,y:e.y}),_classPrivateFieldGet2(_textLayer,this).div.addEventListener(`pointerup`,()=>{_classPrivateFieldGet2(_textLayer,this).div.classList.remove(`free`),this.toggleDrawing(!0)},{once:!0,signal:_classPrivateFieldGet2(_uiManager4,this)._signal}),e.preventDefault()}}function _get_currentEditorType(){return _editorTypes2._.get(_classPrivateFieldGet2(_uiManager4,this).getMode())}function _createNewEditor(e){let t=_get_currentEditorType.call(_assertClassBrand(_AnnotationEditorLayer_brand,this));return t?new t.prototype.constructor(e):null}function _getCenterPoint(){let{x:e,y:t,width:n,height:r}=this.div.getBoundingClientRect(),i=Math.max(0,e),a=Math.max(0,t),o=Math.min(window.innerWidth,e+n),c=Math.min(window.innerHeight,t+r),u=(i+o)/2-e,K=(a+c)/2-t,[Y,X]=this.viewport.rotation%180==0?[u,K]:[K,u];return{offsetX:Y,offsetY:X}}function _cleanup(){_classPrivateFieldSet2(_isCleaningUp,this,!0);for(let e of _classPrivateFieldGet2(_editors,this).values())e.isEmpty()&&e.remove();_classPrivateFieldSet2(_isCleaningUp,this,!1)}_defineProperty$6(AnnotationEditorLayer,`_initialized`,!1);var _editorTypes2={_:new Map([FreeTextEditor,InkEditor,StampEditor,HighlightEditor].map(e=>[e._editorType,e]))},_parent2=new WeakMap,_id5=new WeakMap,_mapping=new WeakMap,_toUpdate=new WeakMap,_DrawLayer_brand=new WeakSet,DrawLayer=class e{constructor({pageIndex:e}){_classPrivateMethodInitSpec(this,_DrawLayer_brand),_classPrivateFieldInitSpec(this,_parent2,null),_classPrivateFieldInitSpec(this,_id5,0),_classPrivateFieldInitSpec(this,_mapping,new Map),_classPrivateFieldInitSpec(this,_toUpdate,new Map),this.pageIndex=e}setParent(e){if(!_classPrivateFieldGet2(_parent2,this)){_classPrivateFieldSet2(_parent2,this,e);return}if(_classPrivateFieldGet2(_parent2,this)!==e){if(_classPrivateFieldGet2(_mapping,this).size>0)for(let t of _classPrivateFieldGet2(_mapping,this).values())t.remove(),e.append(t);_classPrivateFieldSet2(_parent2,this,e)}}static get _svgFactory(){return shadow(this,`_svgFactory`,new DOMSVGFactory)}draw(t,n,r,i=!1){var a,o;let c=(_classPrivateFieldSet2(_id5,this,(a=_classPrivateFieldGet2(_id5,this),o=a++,a)),o),u=_assertClassBrand(_DrawLayer_brand,this,_createSVG).call(this,t.box);u.classList.add(...t.classNamesForDrawing);let K=e._svgFactory.createElement(`defs`);u.append(K);let Y=e._svgFactory.createElement(`path`);K.append(Y);let X=`path_p${this.pageIndex}_${c}`;Y.setAttribute(`id`,X),Y.setAttribute(`d`,t.toSVGPath()),i&&_classPrivateFieldGet2(_toUpdate,this).set(c,Y);let ee=_assertClassBrand(_DrawLayer_brand,this,_createClipPath).call(this,K,X),te=e._svgFactory.createElement(`use`);return u.append(te),u.setAttribute(`fill`,n),u.setAttribute(`fill-opacity`,r),te.setAttribute(`href`,`#${X}`),_classPrivateFieldGet2(_mapping,this).set(c,u),{id:c,clipPathId:`url(#${ee})`}}drawOutline(t){var n,r;let i=(_classPrivateFieldSet2(_id5,this,(n=_classPrivateFieldGet2(_id5,this),r=n++,n)),r),a=_assertClassBrand(_DrawLayer_brand,this,_createSVG).call(this,t.box);a.classList.add(...t.classNamesForOutlining);let o=e._svgFactory.createElement(`defs`);a.append(o);let c=e._svgFactory.createElement(`path`);o.append(c);let u=`path_p${this.pageIndex}_${i}`;c.setAttribute(`id`,u),c.setAttribute(`d`,t.toSVGPath()),c.setAttribute(`vector-effect`,`non-scaling-stroke`);let K;if(t.mustRemoveSelfIntersections){let t=e._svgFactory.createElement(`mask`);o.append(t),K=`mask_p${this.pageIndex}_${i}`,t.setAttribute(`id`,K),t.setAttribute(`maskUnits`,`objectBoundingBox`);let n=e._svgFactory.createElement(`rect`);t.append(n),n.setAttribute(`width`,`1`),n.setAttribute(`height`,`1`),n.setAttribute(`fill`,`white`);let r=e._svgFactory.createElement(`use`);t.append(r),r.setAttribute(`href`,`#${u}`),r.setAttribute(`stroke`,`none`),r.setAttribute(`fill`,`black`),r.setAttribute(`fill-rule`,`nonzero`),r.classList.add(`mask`)}let Y=e._svgFactory.createElement(`use`);a.append(Y),Y.setAttribute(`href`,`#${u}`),K&&Y.setAttribute(`mask`,`url(#${K})`);let X=Y.cloneNode();return a.append(X),Y.classList.add(`mainOutline`),X.classList.add(`secondaryOutline`),_classPrivateFieldGet2(_mapping,this).set(i,a),i}finalizeLine(e,t){let n=_classPrivateFieldGet2(_toUpdate,this).get(e);_classPrivateFieldGet2(_toUpdate,this).delete(e),this.updateBox(e,t.box),n.setAttribute(`d`,t.toSVGPath())}updateLine(e,t){_classPrivateFieldGet2(_mapping,this).get(e).firstChild.firstChild.setAttribute(`d`,t.toSVGPath())}updatePath(e,t){_classPrivateFieldGet2(_toUpdate,this).get(e).setAttribute(`d`,t.toSVGPath())}updateBox(t,n){_setBox.call(e,_classPrivateFieldGet2(_mapping,this).get(t),n)}
81show(e,t){_classPrivateFieldGet2(_mapping,this).get(e).classList.toggle(`hidden`,!t)}rotate(e,t){_classPrivateFieldGet2(_mapping,this).get(e).setAttribute(`data-main-rotation`,t)}changeColor(e,t){_classPrivateFieldGet2(_mapping,this).get(e).setAttribute(`fill`,t)}changeOpacity(e,t){_classPrivateFieldGet2(_mapping,this).get(e).setAttribute(`fill-opacity`,t)}addClass(e,t){_classPrivateFieldGet2(_mapping,this).get(e).classList.add(t)}removeClass(e,t){_classPrivateFieldGet2(_mapping,this).get(e).classList.remove(t)}getSVGRoot(e){return _classPrivateFieldGet2(_mapping,this).get(e)}remove(e){_classPrivateFieldGet2(_toUpdate,this).delete(e),_classPrivateFieldGet2(_parent2,this)!==null&&(_classPrivateFieldGet2(_mapping,this).get(e).remove(),_classPrivateFieldGet2(_mapping,this).delete(e))}destroy(){_classPrivateFieldSet2(_parent2,this,null);for(let e of _classPrivateFieldGet2(_mapping,this).values())e.remove();_classPrivateFieldGet2(_mapping,this).clear(),_classPrivateFieldGet2(_toUpdate,this).clear()}};_DrawLayer=DrawLayer;function _setBox(e,{x:t=0,y:n=0,width:r=1,height:i=1}={}){let{style:a}=e;a.top=`${100*n}%`,a.left=`${100*t}%`,a.width=`${100*r}%`,a.height=`${100*i}%`}function _createSVG(e){let t=_DrawLayer._svgFactory.create(1,1,!0);return _classPrivateFieldGet2(_parent2,this).append(t),t.setAttribute(`aria-hidden`,!0),_setBox.call(_DrawLayer,t,e),t}function _createClipPath(e,t){let n=_DrawLayer._svgFactory.createElement(`clipPath`);e.append(n);let r=`clip_${t}`;n.setAttribute(`id`,r),n.setAttribute(`clipPathUnits`,`objectBoundingBox`);let i=_DrawLayer._svgFactory.createElement(`use`);return n.append(i),i.setAttribute(`href`,`#${t}`),i.classList.add(`clip`),r}var __webpack_exports__AbortException=__webpack_exports__.AbortException,__webpack_exports__AnnotationEditorLayer=__webpack_exports__.AnnotationEditorLayer,__webpack_exports__AnnotationEditorParamsType=__webpack_exports__.AnnotationEditorParamsType,__webpack_exports__AnnotationEditorType=__webpack_exports__.AnnotationEditorType,__webpack_exports__AnnotationEditorUIManager=__webpack_exports__.AnnotationEditorUIManager,__webpack_exports__AnnotationLayer=__webpack_exports__.AnnotationLayer,__webpack_exports__AnnotationMode=__webpack_exports__.AnnotationMode,__webpack_exports__ColorPicker=__webpack_exports__.ColorPicker,__webpack_exports__DOMSVGFactory=__webpack_exports__.DOMSVGFactory,__webpack_exports__DrawLayer=__webpack_exports__.DrawLayer,__webpack_exports__FeatureTest=__webpack_exports__.FeatureTest,__webpack_exports__GlobalWorkerOptions=__webpack_exports__.GlobalWorkerOptions,__webpack_exports__ImageKind=__webpack_exports__.ImageKind,__webpack_exports__InvalidPDFException=__webpack_exports__.InvalidPDFException,__webpack_exports__MissingPDFException=__webpack_exports__.MissingPDFException,__webpack_exports__OPS=__webpack_exports__.OPS,__webpack_exports__OutputScale=__webpack_exports__.OutputScale,__webpack_exports__PDFDataRangeTransport=__webpack_exports__.PDFDataRangeTransport,__webpack_exports__PDFDateString=__webpack_exports__.PDFDateString,__webpack_exports__PDFWorker=__webpack_exports__.PDFWorker,__webpack_exports__PasswordResponses=__webpack_exports__.PasswordResponses,__webpack_exports__PermissionFlag=__webpack_exports__.PermissionFlag,__webpack_exports__PixelsPerInch=__webpack_exports__.PixelsPerInch,__webpack_exports__RenderingCancelledException=__webpack_exports__.RenderingCancelledException,__webpack_exports__TextLayer=__webpack_exports__.TextLayer,__webpack_exports__UnexpectedResponseException=__webpack_exports__.UnexpectedResponseException,__webpack_exports__Util=__webpack_exports__.Util,__webpack_exports__VerbosityLevel=__webpack_exports__.VerbosityLevel,__webpack_exports__XfaLayer=__webpack_exports__.XfaLayer,__webpack_exports__build=__webpack_exports__.build,__webpack_exports__createValidAbsoluteUrl=__webpack_exports__.createValidAbsoluteUrl,__webpack_exports__fetchData=__webpack_exports__.fetchData,__webpack_exports__getDocument=__webpack_exports__.getDocument,__webpack_exports__getFilenameFromUrl=__webpack_exports__.getFilenameFromUrl,__webpack_exports__getPdfFilenameFromUrl=__webpack_exports__.getPdfFilenameFromUrl,__webpack_exports__getXfaPageViewport=__webpack_exports__.getXfaPageViewport,__webpack_exports__isDataScheme=__webpack_exports__.isDataScheme,__webpack_exports__isPdfFile=__webpack_exports__.isPdfFile,__webpack_exports__noContextMenu=__webpack_exports__.noContextMenu,__webpack_exports__normalizeUnicode=__webpack_exports__.normalizeUnicode,__webpack_exports__setLayerDimensions=__webpack_exports__.setLayerDimensions,__webpack_exports__shadow=__webpack_exports__.shadow,__webpack_exports__version=__webpack_exports__.version,__spreadArray$1=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;
81r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},clipboardEvents=[`onCopy`,`onCut`,`onPaste`],compositionEvents=[`onCompositionEnd`,`onCompositionStart`,`onCompositionUpdate`],focusEvents=[`onFocus`,`onBlur`],formEvents=[`onInput`,`onInvalid`,`onReset`,`onSubmit`],imageEvents=[`onLoad`,`onError`],keyboardEvents=[`onKeyDown`,`onKeyPress`,`onKeyUp`],mediaEvents=[`onAbort`,`onCanPlay`,`onCanPlayThrough`,`onDurationChange`,`onEmptied`,`onEncrypted`,`onEnded`,`onError`,`onLoadedData`,`onLoadedMetadata`,`onLoadStart`,`onPause`,`onPlay`,`onPlaying`,`onProgress`,`onRateChange`,`onSeeked`,`onSeeking`,`onStalled`,`onSuspend`,`onTimeUpdate`,`onVolumeChange`,`onWaiting`],mouseEvents=[`onClick`,`onContextMenu`,`onDoubleClick`,`onMouseDown`,`onMouseEnter`,`onMouseLeave`,`onMouseMove`,`onMouseOut`,`onMouseOver`,`onMouseUp`],dragEvents=[`onDrag`,`onDragEnd`,`onDragEnter`,`onDragExit`,`onDragLeave`,`onDragOver`,`onDragStart`,`onDrop`],selectionEvents=[`onSelect`],touchEvents=[`onTouchCancel`,`onTouchEnd`,`onTouchMove`,`onTouchStart`],pointerEvents=[`onPointerDown`,`onPointerMove`,`onPointerUp`,`onPointerCancel`,`onGotPointerCapture`,`onLostPointerCapture`,`onPointerEnter`,`onPointerLeave`,`onPointerOver`,`onPointerOut`],uiEvents=[`onScroll`],wheelEvents=[`onWheel`],animationEvents=[`onAnimationStart`,`onAnimationEnd`,`onAnimationIteration`],transitionEvents=[`onTransitionEnd`],otherEvents=[`onToggle`],changeEvents=[`onChange`],allEvents=__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1([],clipboardEvents,!0),compositionEvents,!0),focusEvents,!0),formEvents,!0),imageEvents,!0),keyboardEvents,!0),mediaEvents,!0),mouseEvents,!0),dragEvents,!0),selectionEvents,!0),touchEvents,!0),pointerEvents,!0),uiEvents,!0),wheelEvents,!0),animationEvents,!0),transitionEvents,!0),changeEvents,!0),otherEvents,!0);function makeEventProps(e,t){var n={};return allEvents.forEach(function(r){var i=e[r];i&&(n[r]=t?(function(e){return i(e,t(r))}):i)}),n}function makeCancellablePromise(e){var t=!1;return{promise:new Promise(function(n,r){e.then(function(e){return!t&&n(e)}).catch(function(e){return!t&&r(e)})}),cancel:function(){t=!0}}}var prefix$1=`Invariant failed`;function invariant$2(e,t){if(!e)throw Error(prefix$1)}var require_warning=__commonJSMin(((e,t)=>{var n=!1,r=function(){};if(0)var i;t.exports=r})),import_warning=__toESM(require_warning()),has=Object.prototype.hasOwnProperty;function find$2(e,t,n){for(n of e.keys())if(dequal(n,t))return n}function dequal(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&dequal(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i==`object`&&(i=find$2(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i==`object`&&(i=find$2(t,i),!i)||!dequal(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e==`object`){for(n in r=0,e)if(has.call(e,n)&&++r&&!has.call(t,n)||!(n in t)||!dequal(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var documentContext=(0,import_react.createContext)(null);function Message({children:e,type:t}){return(0,import_jsx_runtime.jsx)(`div`,{className:`react-pdf__message react-pdf__message--${t}`,children:e})}var DEFAULT_LINK_REL=`noopener noreferrer nofollow`,LinkService=class{constructor(){this.externalLinkEnabled=!0,this.externalLinkRel=void 0,this.externalLinkTarget=void 0,this.isInPresentationMode=!1,this.pdfDocument=void 0,this.pdfViewer=void 0}setDocument(e){this.pdfDocument=e}setViewer(e){this.pdfViewer=e}setExternalLinkRel(e){this.externalLinkRel=e}setExternalLinkTarget(e){this.externalLinkTarget=e}setHistory(){}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return invariant$2(this.pdfViewer,`PDF viewer is not initialized.`),this.pdfViewer.currentPageNumber||0}set page(e){invariant$2(this.pdfViewer,`PDF viewer is not initialized.`),this.pdfViewer.currentPageNumber=e}get rotation(){return 0}set rotation(e){}goToDestination(e){return new Promise(t=>{invariant$2(this.pdfDocument,`PDF document not loaded.`),invariant$2(e,`Destination is not specified.`),typeof e==`string`?this.pdfDocument.getDestination(e).then(t):Array.isArray(e)?t(e):e.then(t)}).then(e=>{invariant$2(Array.isArray(e),`"${e}" is not a valid destination array.`);let t=e[0];new Promise(e=>{invariant$2(this.pdfDocument,`PDF document not loaded.`),t instanceof Object?this.pdfDocument.getPageIndex(t).then(t=>{e(t)}).catch(()=>{invariant$2(!1,`"${t}" is not a valid page reference.`)}):typeof t==`number`?e(t):invariant$2(!1,`"${t}" is not a valid destination reference.`)}).then(t=>{let n=t+1;invariant$2(this.pdfViewer,`PDF viewer is not initialized.`),invariant$2(n>=1&&n<=this.pagesCount,`"${n}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({dest:e,pageIndex:t,pageNumber:n})})})}navigateTo(e){this.goToDestination(e)}goToPage(e){let t=e-1;invariant$2(this.pdfViewer,`PDF viewer is not initialized.`),invariant$2(e>=1&&e<=this.pagesCount,`"${e}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({pageIndex:t,pageNumber:e})}
81addLinkAttributes(e,t,n){e.href=t,e.rel=this.externalLinkRel||DEFAULT_LINK_REL,e.target=n?`_blank`:this.externalLinkTarget||``}getDestinationHash(){return`#`}getAnchorUrl(){return`#`}setHash(){}executeNamedAction(){}cachePageRef(){}isPageVisible(){return!0}isPageCached(){return!0}executeSetOCGState(){}},PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},isBrowser$1=typeof window<`u`,isLocalFileSystem=isBrowser$1&&window.location.protocol===`file:`;function isDefined(e){return e!==void 0}function isProvided(e){return isDefined(e)&&e!==null}function isString$4(e){return typeof e==`string`}function isArrayBuffer$1(e){return e instanceof ArrayBuffer}function isBlob$1(e){return invariant$2(isBrowser$1,`isBlob can only be used in a browser environment`),e instanceof Blob}function isDataURI(e){return isString$4(e)&&/^data:/.test(e)}function dataURItoByteString(e){invariant$2(isDataURI(e),`Invalid data URI.`);let[t=``,n=``]=e.split(`,`);return t.split(`;`).indexOf(`base64`)===-1?unescape(n):atob(n)}function getDevicePixelRatio(){return isBrowser$1&&window.devicePixelRatio||1}var allowFileAccessFromFilesTip=`On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.`;function displayCORSWarning(){(0,import_warning.default)(!isLocalFileSystem,`Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ${allowFileAccessFromFilesTip}`)}function cancelRunningTask(e){e?.cancel&&e.cancel()}function makePageCallback(e,t){return Object.defineProperty(e,"width",{get(){return this.view[2]*t},configurable:!0}),Object.defineProperty(e,"height",{get(){return this.view[3]*t},configurable:!0}),Object.defineProperty(e,"originalWidth",{get(){return this.view[2]},configurable:!0}),Object.defineProperty(e,"originalHeight",{get(){return this.view[3]},configurable:!0}),e}function isCancelException(e){return e.name===`RenderingCancelledException`}function loadFromFile(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{if(!r.result)return n(Error(`Error while reading a file.`));t(r.result)},r.onerror=e=>{if(!e.target)return n(Error(`Error while reading a file.`));let{error:t}=e.target;if(!t)return n(Error(`Error while reading a file.`));switch(t.code){case t.NOT_FOUND_ERR:return n(Error(`Error while reading a file: File not found.`));case t.SECURITY_ERR:return n(Error(`Error while reading a file: Security error.`));case t.ABORT_ERR:return n(Error(`Error while reading a file: Aborted.`));default:return n(Error(`Error while reading a file.`))}},r.readAsArrayBuffer(e)})}function reducer(e,t){switch(t.type){case`RESOLVE`:return{value:t.value,error:void 0};case`REJECT`:return{value:!1,error:t.error};case`RESET`:return{value:void 0,error:void 0};default:return e}}function useResolver(){return(0,import_react.useReducer)(reducer,{value:void 0,error:void 0})}var __awaiter=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function c(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?n(e.value):i(e.value).then(o,c)}u((r=r.apply(e,t||[])).next())})},__rest$1=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},{PDFDataRangeTransport}=pdf_exports,defaultOnPassword=(e,t)=>{switch(t){case PasswordResponses.NEED_PASSWORD:e(prompt(`Enter the password to open this PDF file.`));break;case PasswordResponses.INCORRECT_PASSWORD:e(prompt(`Invalid password. Please try again.`))}};function isParameterObject(e){return typeof e==`object`&&!!e&&(`data`in e||`range`in e||`url`in e)}var Document=(0,import_react.forwardRef)(function(e,t){var{children:n,className:r,error:i=`Failed to load PDF file.`,externalLinkRel:a,externalLinkTarget:o,file:c,inputRef:u,imageResourcesPath:K,loading:Y=`Loading PDF…`,noData:X=`No PDF file specified.`,onItemClick:ee,onLoadError:te,onLoadProgress:ce,onLoadSuccess:ue,onPassword:de=defaultOnPassword,onSourceError:fe,onSourceSuccess:me,options:ge,renderMode:Te,rotate:Oe}=e,Ae=__rest$1(e,[`children`,`className`,`error`,`externalLinkRel`,`externalLinkTarget`,`file`,`inputRef`,`imageResourcesPath`,`loading`,`noData`,`onItemClick`,`onLoadError`,`onLoadProgress`,`onLoadSuccess`,`onPassword`,`onSourceError`,`onSourceSuccess`,`options`,`renderMode`,`rotate`]);let[ze,qe]=useResolver(),{value:Ye,error:Ze}=ze,[Qe,et]=useResolver(),{value:nt,error:rt}=Qe,it=(0,import_react.useRef)(new LinkService),at=(0,import_react.useRef)([]),ot=(0,import_react.useRef)(void 0),st=(0,import_react.useRef)(void 0);c&&c!==ot.current&&isParameterObject(c)&&((0,import_warning.default)(!dequal(c,ot.current),`File prop passed to <Document /> changed, but it's equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "file" prop.`),ot.current=c),ge&&ge!==st.current&&((0,import_warning.default)(!dequal(ge,st.current),`Options prop passed to <Document /> changed, but it's equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "options" prop.`),st.current=ge);let ct=(0,import_react.useRef)({scrollPageIntoView:e=>{let{dest:t,pageNumber:n,pageIndex:r=n-1}=e;if(ee){ee({dest:t,pageIndex:r,pageNumber:n});return}let i=at.current[r];if(i){i.scrollIntoView();return}(0,import_warning.default)(!1,`An internal link leading to page ${n} was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document>
81 and handle navigating by yourself or ensure that all pages are rendered within <Document>.`)}});(0,import_react.useImperativeHandle)(t,()=>({linkService:it,pages:at,viewer:ct}),[]);function lt(){me&&me()}function ut(){Ze&&((0,import_warning.default)(!1,Ze.toString()),fe&&fe(Ze))}function dt(){qe({type:`RESET`})}(0,import_react.useEffect)(dt,[c,qe]);let ft=(0,import_react.useCallback)(()=>__awaiter(this,void 0,void 0,function*(){if(!c)return null;if(typeof c==`string`)return isDataURI(c)?{data:dataURItoByteString(c)}:(displayCORSWarning(),{url:c});if(c instanceof PDFDataRangeTransport)return{range:c};if(isArrayBuffer$1(c))return{data:c};if(isBrowser$1&&isBlob$1(c))return{data:yield loadFromFile(c)};if(invariant$2(typeof c==`object`,`Invalid parameter in file, need either Uint8Array, string or a parameter object`),invariant$2(isParameterObject(c),`Invalid parameter object: need either .data, .range or .url`),`url`in c&&typeof c.url==`string`){if(isDataURI(c.url)){let{url:e}=c,t=__rest$1(c,[`url`]),n=dataURItoByteString(e);return Object.assign({data:n},t)}displayCORSWarning()}return c}),[c]);(0,import_react.useEffect)(()=>{let e=makeCancellablePromise(ft());return e.promise.then(e=>{qe({type:`RESOLVE`,value:e})}).catch(e=>{qe({type:`REJECT`,error:e})}),()=>{cancelRunningTask(e)}},[ft,qe]),(0,import_react.useEffect)(()=>{if(Ye!==void 0){if(Ye===!1){ut();return}lt()}},[Ye]);function pt(){nt&&(ue&&ue(nt),at.current=Array(nt.numPages),it.current.setDocument(nt))}function mt(){rt&&((0,import_warning.default)(!1,rt.toString()),te&&te(rt))}(0,import_react.useEffect)(function(){et({type:`RESET`})},[et,Ye]),(0,import_react.useEffect)(function(){if(!Ye)return;let e=__webpack_exports__getDocument(ge?Object.assign(Object.assign({},Ye),ge):Ye);ce&&(e.onProgress=ce),de&&(e.onPassword=de);let t=e,n=t.promise.then(e=>{et({type:`RESOLVE`,value:e})}).catch(e=>{t.destroyed||et({type:`REJECT`,error:e})});return()=>{n.finally(()=>t.destroy())}},[ge,et,Ye]),(0,import_react.useEffect)(()=>{if(nt!==void 0){if(nt===!1){mt();return}pt()}},[nt]),(0,import_react.useEffect)(function(){it.current.setViewer(ct.current),it.current.setExternalLinkRel(a),it.current.setExternalLinkTarget(o)},[a,o]);let ht=(0,import_react.useCallback)((e,t)=>{at.current[e]=t},[]),gt=(0,import_react.useCallback)(e=>{delete at.current[e]},[]),_t=(0,import_react.useMemo)(()=>({imageResourcesPath:K,linkService:it.current,onItemClick:ee,pdf:nt,registerPage:ht,renderMode:Te,rotate:Oe,unregisterPage:gt}),[K,ee,nt,ht,Te,Oe,gt]),vt=(0,import_react.useMemo)(()=>makeEventProps(Ae,()=>nt),[Ae,nt]);function yt(){return(0,import_jsx_runtime.jsx)(documentContext.Provider,{value:_t,children:n})}function bt(){return c?nt==null?(0,import_jsx_runtime.jsx)(Message,{type:`loading`,children:typeof Y==`function`?Y():Y}):nt===!1?(0,import_jsx_runtime.jsx)(Message,{type:`error`,children:typeof i==`function`?i():i}):yt():(0,import_jsx_runtime.jsx)(Message,{type:`no-data`,children:typeof X==`function`?X():X})}return(0,import_jsx_runtime.jsx)(`div`,Object.assign({className:clsx(`react-pdf__Document`,r),ref:u,style:{"--scale-factor":`1`}},vt,{children:bt()}))});function useDocumentContext(){return(0,import_react.useContext)(documentContext)}function mergeRefs$1(){var e=[...arguments].filter(Boolean);return e.length<=1?e[0]||null:function(t){e.forEach(function(e){typeof e==`function`?e(t):e&&(e.current=t)})}}var pageContext=(0,import_react.createContext)(null),PDF_ROLE_TO_HTML_ROLE={Document:null,DocumentFragment:null,Part:`group`,Sect:`group`,Div:`group`,Aside:`note`,NonStruct:`none`,P:null,H:`heading`,Title:null,FENote:`note`,Sub:`group`,Lbl:null,Span:null,Em:null,Strong:null,Link:`link`,Annot:`note`,Form:`form`,Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:`list`,LI:`listitem`,LBody:null,Table:`table`,TR:`row`,TH:`columnheader`,TD:`cell`,THead:`columnheader`,TBody:null,TFoot:null,Caption:null,Figure:`figure`,Formula:null,Artifact:null},HEADING_PATTERN=/^H(\d+)$/;function isPdfRole(e){return e in PDF_ROLE_TO_HTML_ROLE}function isStructTreeNode(e){return`children`in e}function isStructTreeNodeWithOnlyContentChild(e){return isStructTreeNode(e)?e.children.length===1&&0 in e.children&&`id`in e.children[0]:!1}function getRoleAttributes(e){let t={};if(isStructTreeNode(e)){let{role:n}=e,r=n.match(HEADING_PATTERN);if(r)t.role=`heading`,t[`aria-level`]=Number(r[1]);else if(isPdfRole(n)){let e=PDF_ROLE_TO_HTML_ROLE[n];e&&(t.role=e)}}return t}function getBaseAttributes(e){let t={};if(isStructTreeNode(e)){if(e.alt!==void 0&&(t[`aria-label`]=e.alt),e.lang!==void 0&&(t.lang=e.lang),isStru
81ctTreeNodeWithOnlyContentChild(e)){let[n]=e.children;if(n){let e=getBaseAttributes(n);return Object.assign(Object.assign({},t),e)}}}else`id`in e&&(t[`aria-owns`]=e.id);return t}function getAttributes(e){return e?Object.assign(Object.assign({},getRoleAttributes(e)),getBaseAttributes(e)):null}function StructTreeItem({className:e,node:t}){let n=(0,import_react.useMemo)(()=>getAttributes(t),[t]),r=(0,import_react.useMemo)(()=>!isStructTreeNode(t)||isStructTreeNodeWithOnlyContentChild(t)?null:t.children.map((e,t)=>(0,import_jsx_runtime.jsx)(StructTreeItem,{node:e},t)),[t]);return(0,import_jsx_runtime.jsx)(`span`,Object.assign({className:e},n,{children:r}))}function usePageContext(){return(0,import_react.useContext)(pageContext)}function StructTree(){let e=usePageContext();invariant$2(e,`Unable to find Page context.`);let{onGetStructTreeError:t,onGetStructTreeSuccess:n}=e,[r,i]=useResolver(),{value:a,error:o}=r,{customTextRenderer:c,page:u}=e;function K(){a&&n&&n(a)}function Y(){o&&((0,import_warning.default)(!1,o.toString()),t&&t(o))}return(0,import_react.useEffect)(function(){i({type:`RESET`})},[i,u]),(0,import_react.useEffect)(function(){if(c||!u)return;let e=makeCancellablePromise(u.getStructTree()),t=e;return e.promise.then(e=>{i({type:`RESOLVE`,value:e})}).catch(e=>{i({type:`REJECT`,error:e})}),()=>cancelRunningTask(t)},[c,u,i]),(0,import_react.useEffect)(()=>{if(a!==void 0){if(a===!1){Y();return}K()}},[a]),a?(0,import_jsx_runtime.jsx)(StructTreeItem,{className:`react-pdf__Page__structTree structTree`,node:a}):null}var ANNOTATION_MODE=__webpack_exports__AnnotationMode;function Canvas(e){let t=usePageContext();invariant$2(t,`Unable to find Page context.`);let{_className:n,canvasBackground:r,devicePixelRatio:i=getDevicePixelRatio(),onRenderError:a,onRenderSuccess:o,page:c,renderForms:u,renderTextLayer:K,rotate:Y,scale:X}=Object.assign(Object.assign({},t),e),{canvasRef:ee}=e;invariant$2(c,`Attempted to render page canvas, but no page was specified.`);let te=(0,import_react.useRef)(null);function ce(){c&&o&&o(makePageCallback(c,X))}function ue(e){isCancelException(e)||((0,import_warning.default)(!1,e.toString()),a&&a(e))}let de=(0,import_react.useMemo)(()=>c.getViewport({scale:X*i,rotation:Y}),[i,c,Y,X]),fe=(0,import_react.useMemo)(()=>c.getViewport({scale:X,rotation:Y}),[c,Y,X]);(0,import_react.useEffect)(function(){if(!c)return;c.cleanup();let{current:e}=te;if(!e)return;e.width=de.width,e.height=de.height,e.style.width=`${Math.floor(fe.width)}px`,e.style.height=`${Math.floor(fe.height)}px`,e.style.visibility=`hidden`;let t={annotationMode:u?ANNOTATION_MODE.ENABLE_FORMS:ANNOTATION_MODE.ENABLE,canvasContext:e.getContext(`2d`,{alpha:!1}),viewport:de};r&&(t.background=r);let n=c.render(t),i=n;return n.promise.then(()=>{e.style.visibility=``,ce()}).catch(ue),()=>cancelRunningTask(i)},[r,c,u,de,fe]);let me=(0,import_react.useCallback)(()=>{let{current:e}=te;e&&(e.width=0,e.height=0)},[]);return(0,import_react.useEffect)(()=>me,[me]),(0,import_jsx_runtime.jsx)(`canvas`,{className:`${n}__canvas`,dir:`ltr`,ref:mergeRefs$1(ee,te),style:{display:`block`,userSelect:`none`},children:K?(0,import_jsx_runtime.jsx)(StructTree,{}):null})}function isTextItem(e){return`str`in e}function TextLayer(){let e=usePageContext();invariant$2(e,`Unable to find Page context.`);let{customTextRenderer:t,onGetTextError:n,onGetTextSuccess:r,onRenderTextLayerError:i,onRenderTextLayerSuccess:a,page:o,pageIndex:c,pageNumber:u,rotate:K,scale:Y}=e;invariant$2(o,`Attempted to load page text content, but no page was specified.`);let[X,ee]=useResolver(),{value:te,error:ce}=X,ue=(0,import_react.useRef)(null);(0,import_warning.default)(Number.parseInt(window.getComputedStyle(document.body).getPropertyValue(`--react-pdf-text-layer`),10)===1,`TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer`);function de(){te&&r&&r(te)}function fe(){ce&&((0,import_warning.default)(!1,ce.toString()),n&&n(ce))}(0,import_react.useEffect)(function(){ee({type:`RESET`})},[o,ee]),(0,import_react.useEffect)(function(){if(!o)return;let e=makeCancellablePromise(o.getTextContent()),t=e;return e.promise.then(e=>{ee({type:`RESOLVE`,value:e})}).catch(e=>{ee({type:`REJECT`,error:e})}),()=>cancelRunningTask(t)},[o,ee]),(0,import_react.useEffect)(()=>
81{if(te!==void 0){if(te===!1){fe();return}de()}},[te]);let me=(0,import_react.useCallback)(()=>{a&&a()},[a]),ge=(0,import_react.useCallback)(e=>{(0,import_warning.default)(!1,e.toString()),i&&i(e)},[i]);function Te(){let e=ue.current;e&&e.classList.add(`selecting`)}function Oe(){let e=ue.current;e&&e.classList.remove(`selecting`)}let Ae=(0,import_react.useMemo)(()=>o.getViewport({scale:Y,rotation:K}),[o,K,Y]);return(0,import_react.useLayoutEffect)(function(){if(!o||!te)return;let{current:e}=ue;if(!e)return;e.innerHTML=``;let n=new __webpack_exports__TextLayer({container:e,textContentSource:o.streamTextContent({includeMarkedContent:!0}),viewport:Ae}),r=n;return n.render().then(()=>{let n=document.createElement(`div`);n.className=`endOfContent`,e.append(n);let r=e.querySelectorAll(`[role="presentation"]`);if(t){let e=0;te.items.forEach((n,i)=>{if(!isTextItem(n))return;let a=r[e];a&&(a.innerHTML=t(Object.assign({pageIndex:c,pageNumber:u,itemIndex:i},n)),e+=n.str&&n.hasEOL?2:1)})}me()}).catch(ge),()=>cancelRunningTask(r)},[t,ge,me,o,c,u,te,Ae]),(0,import_jsx_runtime.jsx)(`div`,{className:clsx(`react-pdf__Page__textContent`,`textLayer`),onMouseUp:Oe,onMouseDown:Te,ref:ue})}function AnnotationLayer(){let e=useDocumentContext(),t=usePageContext();invariant$2(t,`Unable to find Page context.`);let{imageResourcesPath:n,linkService:r,onGetAnnotationsError:i,onGetAnnotationsSuccess:a,onRenderAnnotationLayerError:o,onRenderAnnotationLayerSuccess:c,page:u,pdf:K,renderForms:Y,rotate:X,scale:ee=1}=Object.assign(Object.assign({},e),t);invariant$2(K,"Attempted to load page annotations, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop."),invariant$2(u,`Attempted to load page annotations, but no page was specified.`),invariant$2(r,`Attempted to load page annotations, but no linkService was specified.`);let[te,ce]=useResolver(),{value:ue,error:de}=te,fe=(0,import_react.useRef)(null);(0,import_warning.default)(Number.parseInt(window.getComputedStyle(document.body).getPropertyValue(`--react-pdf-annotation-layer`),10)===1,`AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations`);function me(){ue&&a&&a(ue)}function ge(){de&&((0,import_warning.default)(!1,de.toString()),i&&i(de))}(0,import_react.useEffect)(function(){ce({type:`RESET`})},[ce,u]),(0,import_react.useEffect)(function(){if(!u)return;let e=makeCancellablePromise(u.getAnnotations()),t=e;return e.promise.then(e=>{ce({type:`RESOLVE`,value:e})}).catch(e=>{ce({type:`REJECT`,error:e})}),()=>{cancelRunningTask(t)}},[ce,u]),(0,import_react.useEffect)(()=>{if(ue!==void 0){if(ue===!1){ge();return}me()}},[ue]);function Te(){c&&c()}function Oe(e){(0,import_warning.default)(!1,`${e}`),o&&o(e)}let Ae=(0,import_react.useMemo)(()=>u.getViewport({scale:ee,rotation:X}),[u,X,ee]);return(0,import_react.useEffect)(function(){if(!K||!u||!r||!ue)return;let{current:e}=fe;if(!e)return;let t=Ae.clone({dontFlip:!0}),i={accessibilityManager:null,annotationCanvasMap:null,annotationEditorUIManager:null,div:e,l10n:null,page:u,structTreeLayer:null,viewport:t},a={annotations:ue,annotationStorage:K.annotationStorage,div:e,imageResourcesPath:n,linkService:r,page:u,renderForms:Y,viewport:t};e.innerHTML=``;try{new __webpack_exports__AnnotationLayer(i).render(a),Te()}catch(e){Oe(e)}return()=>{}},[ue,n,r,u,K,Y,Ae]),(0,import_jsx_runtime.jsx)(`div`,{className:clsx(`react-pdf__Page__annotations`,`annotationLayer`),ref:fe})}var __rest=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},defaultScale=1;function Page(e){let t=useDocumentContext(),n=Object.assign(Object.assign({},t),e),{_className:r=`react-pdf__Page`,_enableRegisterUnregisterPage:i=!0,canvasBackground:a,canvasRef:o,children:c,className:u,customRenderer:K,customTextRenderer:Y,devicePixelRatio:X,error:ee=`Failed to load the page.`,height:te,inputRef:ce,loading:ue=`L
vendor: 7,876 bytes, line 81
81oading page…`,noData:de=`No page specified.`,onGetAnnotationsError:fe,onGetAnnotationsSuccess:me,onGetStructTreeError:ge,onGetStructTreeSuccess:Te,onGetTextError:Oe,onGetTextSuccess:Ae,onLoadError:ze,onLoadSuccess:qe,onRenderAnnotationLayerError:Ye,onRenderAnnotationLayerSuccess:Ze,onRenderError:Qe,onRenderSuccess:et,onRenderTextLayerError:nt,onRenderTextLayerSuccess:rt,pageIndex:it,pageNumber:at,pdf:ot,registerPage:st,renderAnnotationLayer:ct=!0,renderForms:lt=!1,renderMode:ut=`canvas`,renderTextLayer:dt=!0,rotate:ft,scale:pt=defaultScale,unregisterPage:mt,width:ht}=n,gt=__rest(n,`_className._enableRegisterUnregisterPage.canvasBackground.canvasRef.children.className.customRenderer.customTextRenderer.devicePixelRatio.error.height.inputRef.loading.noData.onGetAnnotationsError.onGetAnnotationsSuccess.onGetStructTreeError.onGetStructTreeSuccess.onGetTextError.onGetTextSuccess.onLoadError.onLoadSuccess.onRenderAnnotationLayerError.onRenderAnnotationLayerSuccess.onRenderError.onRenderSuccess.onRenderTextLayerError.onRenderTextLayerSuccess.pageIndex.pageNumber.pdf.registerPage.renderAnnotationLayer.renderForms.renderMode.renderTextLayer.rotate.scale.unregisterPage.width`.split(`.`)),[_t,vt]=useResolver(),{value:yt,error:bt}=_t,xt=(0,import_react.useRef)(null);invariant$2(ot,"Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.");let St=isProvided(at)?at-1:it??null,Ct=at??(isProvided(it)?it+1:null),wt=ft??(yt?yt.rotate:null),Tt=(0,import_react.useMemo)(()=>{if(!yt)return null;let e=1,t=pt??defaultScale;if(ht||te){let t=yt.getViewport({scale:1,rotation:wt});ht?e=ht/t.width:te&&(e=te/t.height)}return t*e},[te,yt,wt,pt,ht]);(0,import_react.useEffect)(function(){return()=>{isProvided(St)&&i&&mt&&mt(St)}},[i,ot,St,mt]);function Et(){if(qe){if(!yt||!Tt)return;qe(makePageCallback(yt,Tt))}if(i&&st){if(!isProvided(St)||!xt.current)return;st(St,xt.current)}}function Dt(){bt&&((0,import_warning.default)(!1,bt.toString()),ze&&ze(bt))}(0,import_react.useEffect)(function(){vt({type:`RESET`})},[vt,ot,St]),(0,import_react.useEffect)(function(){if(!ot||!Ct)return;let e=makeCancellablePromise(ot.getPage(Ct)),t=e;return e.promise.then(e=>{vt({type:`RESOLVE`,value:e})}).catch(e=>{vt({type:`REJECT`,error:e})}),()=>cancelRunningTask(t)},[vt,ot,Ct]),(0,import_react.useEffect)(()=>{if(yt!==void 0){if(yt===!1){Dt();return}Et()}},[yt,Tt]);let Ot=(0,import_react.useMemo)(()=>yt&&isProvided(St)&&Ct&&isProvided(wt)&&isProvided(Tt)?{_className:r,canvasBackground:a,customTextRenderer:Y,devicePixelRatio:X,onGetAnnotationsError:fe,onGetAnnotationsSuccess:me,onGetStructTreeError:ge,onGetStructTreeSuccess:Te,onGetTextError:Oe,onGetTextSuccess:Ae,onRenderAnnotationLayerError:Ye,onRenderAnnotationLayerSuccess:Ze,onRenderError:Qe,onRenderSuccess:et,onRenderTextLayerError:nt,onRenderTextLayerSuccess:rt,page:yt,pageIndex:St,pageNumber:Ct,renderForms:lt,renderTextLayer:dt,rotate:wt,scale:Tt}:null,[r,a,Y,X,fe,me,ge,Te,Oe,Ae,Ye,Ze,Qe,et,nt,rt,yt,St,Ct,lt,dt,wt,Tt]),kt=(0,import_react.useMemo)(()=>makeEventProps(gt,()=>yt&&(Tt?makePageCallback(yt,Tt):void 0)),[gt,yt,Tt]),At=`${St}@${Tt}/${wt}`;function jt(){switch(ut){case`custom`:return invariant$2(K,`renderMode was set to "custom", but no customRenderer was passed.`),(0,import_jsx_runtime.jsx)(K,{},`${At}_custom`);case`none`:return null;default:return(0,import_jsx_runtime.jsx)(Canvas,{canvasRef:o},`${At}_canvas`)}}function Mt(){return dt?(0,import_jsx_runtime.jsx)(TextLayer,{},`${At}_text`):null}function Nt(){return ct?(0,import_jsx_runtime.jsx)(AnnotationLayer,{},`${At}_annotations`):null}function Pt(){return(0,import_jsx_runtime.jsxs)(pageContext.Provider,{value:Ot,children:[jt(),Mt(),Nt(),c]})}function Ft(){return Ct?ot===null||yt==null?(0,import_jsx_runtime.jsx)(Message,{type:`loading`,children:typeof ue==`function`?ue():ue}):ot===!1||yt===!1?(0,import_jsx_runtime.jsx)(Message,{type:`error`,children:typeof ee==`function`?ee():ee}):Pt():(0,import_jsx_runtime.jsx)(Message,{type:`no-data`,children:typeof de==`function`?de():de})}return(0,import_jsx_runtime.jsx)(`div`,Object.assign({className:clsx(r,u),"data-page-number":Ct,ref:mergeRefs$1(ce,xt),style:{"--scale-factor":`${Tt}`,backgroundColor:a||`white`,position:`relative`,minWidth:`min-content`,minHeight:`min-content`}},kt,{children:Ft()}))}function useResolvedElement(e,t){var n=(0,import_react.useRef)(null),r=(0,import_react.useRef)(null);r.current=t;var i=(0,import_react.useRef)(null);(0,import_react.useEffect)(function(){a()});var a=(0,import_react.useCallback)(function(){var t=i.current,a=r.current,o=t||(a?a instanceof Element?a:a.current:null);n.current&&n.current.element===o&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:o,subscriber:e,cleanup:o?e(o):void 0})},[e]);return(0,import_react.useEffect)(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),(0,import_react.useCallback)(function(e){i.current=e,a()},[a])}function extractSize(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:t===`contentBoxSize`?e.contentRect[n===`inlineSize`?`width`:`height`]:void 0}function useResizeObserver(e){e===void 0&&(e={});var t=e.onResize,n=(0,import_react.useRef)(void 0);n.current=t;var r=e.round||Math.round,i=(0,import_react.useRef)(),a=(0,import_react.useState)({width:void 0,height:void 0}),o=a[0],c=a[1],u=(0,import_react.useRef)(!1);(0,import_react.useEffect)(function(){return u.current=!1,function(){u.current=!0}},[]);var K=(0,import_react.useRef)({width:void 0,height:void 0}),Y=useResolvedElement((0,import_react.useCallback)(function(t){return(!i.current||i.current.box!==e.box||i.current.round!==r)&&(i.current={box:e.box,round:r,instance:new ResizeObserver(function(t){var i=t[0],a=e.box===`border-box`?`borderBoxSize`:e.box===`device-pixel-content-box`?`devicePixelContentBoxSize`:`contentBoxSize`,o=extractSize(i,a,`inlineSize`),Y=extractSize(i,a,`blockSize`),X=o?r(o):void 0,ee=Y?r(Y):void 0;if(K.current.width!==X||K.current.height!==ee){var te={width:X,height:ee};K.current.width=X,K.current.height=ee,n.current?n.current(te):u.current||c(te)}})}),i.current.instance.observe(t,{box:e.box}),function(){i.current&&i.current.instance.unobserve(t)}},[e.box,r]),e.ref);return(0,import_react.useMemo)(function(){return{ref:Y,width:o.width,height:o.height}},[Y,o.width,o.height])}var require_dynamicimport=__commonJSMin(((e,t)=>{t.exports=function(e){var t=e.location,n=e.URL;return[t,n].some(function(e){return!e})?function(e){return Promise.reject(Error(`Failed to import: `+e+`: dynamicImport is not supported`))}:(e.__twilioVideoImportedModules={},function(r){return r in e.__twilioVideoImportedModules?Promise.resolve(e.__twilioVideoImportedModules[r]):Function(`scope`,`return import('`+new n(r,t)+`').then(m => scope.__twilioVideoImportedModules['`+r+`'] = m);`)(e)})}(globalThis)})),require_loglevel$1=__commonJSMin(((e,t)=>{var n=function(){},r=`undefined`,i=typeof window!==r&&typeof window.navigator!==r&&/Trident\/|MSIE /.test(window.navigator.userAgent),a=[`trace`,`debug`,`info`,`warn`,`error`];function o(e,t){var n=e[t];if(typeof n.bind==`function`)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch{return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function c(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(e){return e===`debug`&&(e=`log`),typeof console===r?!1:e===`trace`&&i?c:console[e]===void 0?console.log===void 0?n:o(console,`log`):o(console,e)}function K(e,t){for(var r=0;r<a.length;r++){var i=a[r];this[i]=r<e?n:this.methodFactory(i,e,t)}this.log=this.debug}function Y(e,t,n){return function(){typeof console!==r&&(K.call(this,t,n),this[e].apply(this,arguments))}}
81function X(e,t,n){return u(e)||Y.apply(this,arguments)}function ee(e,t,n){var i=this,o,c=`loglevel`;typeof e==`string`?c+=`:`+e:typeof e==`symbol`&&(c=void 0);function u(e){var t=(a[e]||`silent`).toUpperCase();if(typeof window!==r&&c){try{window.localStorage[c]=t;return}catch{}try{window.document.cookie=encodeURIComponent(c)+`=`+t+`;`}catch{}}}function Y(){var e;if(typeof window!==r&&c){try{e=window.localStorage[c]}catch{}if(typeof e===r)try{var t=window.document.cookie,n=t.indexOf(encodeURIComponent(c)+`=`);n!==-1&&(e=/^([^;]+)/.exec(t.slice(n))[1])}catch{}return i.levels[e]===void 0&&(e=void 0),e}}i.name=e,i.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},i.methodFactory=n||X,i.getLevel=function(){return o},i.setLevel=function(t,n){if(typeof t==`string`&&i.levels[t.toUpperCase()]!==void 0&&(t=i.levels[t.toUpperCase()]),typeof t==`number`&&t>=0&&t<=i.levels.SILENT){if(o=t,n!==!1&&u(t),K.call(i,t,e),typeof console===r&&t<i.levels.SILENT)return`No console available for logging`}else throw`log.setLevel() called with invalid level: `+t},i.setDefaultLevel=function(e){Y()||i.setLevel(e,!1)},i.enableAll=function(e){i.setLevel(i.levels.TRACE,e)},i.disableAll=function(e){i.setLevel(i.levels.SILENT,e)};var ee=Y();ee??=t??`WARN`,i.setLevel(ee,!1)}var te=new ee,ce={};te.getLogger=function(e){if(typeof e!=`symbol`&&typeof e!=`string`||e===``)throw TypeError(`You must supply a name when creating a logger.`);var t=ce[e];return t||=ce[e]=new ee(e,te.getLevel(),te.methodFactory),t};var ue=typeof window===r?void 0:window.log;te.noConflict=function(){return typeof window!==r&&window.log===te&&(window.log=ue),te},te.getLoggers=function(){return ce},te.default=te,t.exports=te})),package_exports=__exportAll({author:()=>author,browser:()=>browser,contributors:()=>contributors,default:()=>package_default,dependencies:()=>dependencies,description:()=>description,devDependencies:()=>devDependencies,engines:()=>engines,homepage:()=>homepage,keywords:()=>keywords,license:()=>license,main:()=>main,name:()=>name$1,repository:()=>repository,scripts:()=>scripts,title:()=>title,types:()=>types,version:()=>version}
81),name$1,title,description,version,homepage,author,contributors,keywords,repository,devDependencies,engines,license,main,types,scripts,dependencies,browser,package_default,init_package=__esmMin((()=>{name$1=`twilio-video`,title=`Twilio Video`,description=`Twilio Video JavaScript Library`,version=`2.28.1`,homepage=`https://twilio.com`,author=`Mark Andrus Roberts <[email protected]>`,contributors=[`Ryan Rowland <[email protected]>`,`Manjesh Malavalli <[email protected]>`,`Makarand Patwardhan <[email protected]>`],keywords=[`twilio`,`webrtc`,`library`,`javascript`,`video`,`rooms`],repository={type:`git`,url:`https://github.com/twilio/twilio-video.js.git`},devDependencies={"@babel/core":`^7.14.2`,"@babel/plugin-proposal-class-properties":`^7.18.6`,"@babel/plugin-proposal-object-rest-spread":`^7.20.7`,"@babel/preset-env":`^7.14.2`,"@babel/preset-typescript":`^7.13.0`,"@types/express":`^4.11.0`,"@types/node":`^8.5.1`,"@types/selenium-webdriver":`^3.0.8`,"@types/ws":`^3.2.1`,"@typescript-eslint/eslint-plugin":`^4.13.0`,"@typescript-eslint/parser":`^4.0.0`,"babel-cli":`^6.26.0`,"babel-preset-es2015":`^6.24.1`,browserify:`^17.0.0`,cheerio:`^0.22.0`,cors:`^2.8.5`,electron:`^17.2.0`,envify:`^4.0.0`,eslint:`^6.2.1`,"eslint-config-standard":`^14.0.0`,"eslint-plugin-import":`^2.18.2`,"eslint-plugin-node":`^9.1.0`,"eslint-plugin-promise":`^4.2.1`,"eslint-plugin-standard":`^4.0.1`,express:`^4.16.2`,glob:`^7.1.7`,"ink-docstrap":`^1.3.2`,inquirer:`^7.0.0`,"is-docker":`^2.0.0`,jsdoc:`^3.5.5`,"jsdoc-babel":`^0.5.0`,"json-loader":`^0.5.7`,karma:`6.4.1`,"karma-browserify":`^8.0.0`,"karma-chrome-launcher":`^2.0.0`,"karma-edgium-launcher":`^4.0.0-0`,"karma-electron":`^6.1.0`,"karma-firefox-launcher":`^1.3.0`,"karma-htmlfile-reporter":`^0.3.8`,"karma-junit-reporter":`^1.2.0`,"karma-mocha":`^1.3.0`,"karma-safari-launcher":`^1.0.0`,"karma-spec-reporter":`0.0.32`,"karma-typescript":`^5.5.1`,"karma-typescript-es6-transform":`^5.5.1`,mocha:`^3.2.0`,"mock-require":`^3.0.3`,ncp:`^2.0.0`,"node-http-server":`^8.1.2`,"npm-run-all":`^4.0.2`,nyc:`^15.1.0`,requirejs:`^2.3.3`,rimraf:`^2.6.1`,"simple-git":`^1.126.0`,sinon:`^4.0.1`,"ts-node":`4.0.1`,tslint:`5.8.0`,twilio:`^3.49.0`,"twilio-release-tool":`^1.0.2`,typescript:`4.2.2`,"uglify-js":`^2.8.22`,"vinyl-fs":`^2.4.4`,"vinyl-source-stream":`^1.1.0`,watchify:`^3.11.1`,"webrtc-adapter":`^7.7.1`},engines={node:`>=0.12`},license=`BSD-3-Clause`,main=`./es5/index.js`,types=`./tsdef/index.d.ts`,scripts={"lint:js":`eslint ./lib ./test/*.js ./docker/**/*.js ./test/framework/*.js ./test/lib/*.js ./test/integration/** ./test/unit/** `,"lint:ts":`eslint ./tsdef/*.ts ./lib/**/*.ts`,lint:`npm-run-all lint:js lint:ts`,printVersion:`node --version && npm --version`,"test:unit":`npm-run-all printVersion build:es5 && nyc --report-dir=./coverage --include=lib/**/* --reporter=html --reporter=lcov --reporter=text mocha -r ts-node/register ./test/unit/*`,"test:unit:quick":`nyc --report-dir=./coverage --include=lib/**/* --reporter=html --reporter=lcov mocha -r ts-node/register`,"test:serversiderender":`mocha ./test/serversiderender/index.js`,"test:integration:adapter":`node ./scripts/karma.js karma/integration.adapter.conf.js`,"test:integration":`npm run build:es5 && node ./scripts/karma.js karma/integration.conf.js`,"test:umd:install":`npm install [email protected]`,"test:umd":`mocha ./test/umd/index.js`,"test:crossbrowser:build:clean":`rimraf ./test/crossbrowser/lib ./test/crossbrowser/src/browser/index.js`,"test:crossbrowser:build:lint":`cd ./test/crossbrowser && tslint --project tsconfig.json`,"test:crossbrowser:build:tsc":`cd ./test/crossbrowser && tsc`,"test:crossbrowser:build:browser":`cd ./test/crossbrowser && browserify lib/crossbrowser/src/browser/index.js > src/browser/index.js`,"test:crossbrowser:build":`npm-run-all test:crossbrowser:build:*`,"test:crossbrowser:test":`cd ./test/crossbrowser && mocha --compilers ts:ts-node/register test/integration/spec/**/*.ts`,"test:crossbrowser":`npm-run-all test:crossbrowser:*`,"test:sdkdriver:build:clean":`rimraf ./test/lib/sdkdriver/lib ./test/lib/sdkdriver/test/integration/browser/index.js`,"test:sdkdriver:build:lint":`cd ./test/lib/sdkdriver && tslint --project tsconfig.json`,"test:sdkdriver:build:tsc":`cd ./test/lib/sdkdriver && tsc --rootDir src`,"test:sdkdriver:build":`npm-run-all test:sdkdriver:build:*`,"test:sdkdriver:test:unit":`cd ./test/lib/sdkdriver && mocha --compilers ts:ts-node/register test/unit/spec/**/*.ts`,"test:sdkdriver:test:integration:browser":`cd ./test/lib/sdkdriver/test/integration && browserify browser/browser.js > browser/index.js`,"test:sdkdriver:test:integration:run":`cd ./test/lib/sdkdriver && mocha --compilers ts:ts-node/register test/integration/spec/**/*.ts`,"test:sdkdriver:test:integration":`npm-run-all test:sdkdriver:test:integration:*`,"test:sdkdriver:test":`npm-run-all test:sdkdriver:test:*`,"test:sdkdriver":`npm-run-all test:sdkdriver:*`,"test:framework:angular:install":`cd ./test/framework/twilio-video-angular && rimraf ./node_modules package-lock.json && npm install`,"test:framework:angular:run":`mocha ./test/framework/twilio-video-angular.js`,"test:framework:angular":`npm-run-all test:framework:angular:*`,"test:framework:no-framework:run":`mocha ./test/framework/twilio-video-no-framework.js`,"test:framework:no-framework":`npm-run-all test:framework:no-framework:*`,"test:framework:react:install":`cd ./test/framework/twilio-video-react && rimraf ./node_modules package-lock.json && npm install`,"test:framework:react:test":`node ./scripts/framework.js twilio-video-react`,"test:framework:react:build":`cd ./test/framework/twilio-video-react && npm run build`,"test:framework:react:run":`mocha ./test/framework/twilio-video-react.js`,"test:framework:react":`npm-run-all test:framework:react:*`,"test:framework:install":`npm install chromedriver && npm install selenium-webdriver && npm install geckodriver && npm install puppeteer`,"test:framework":`npm-run-all test:framework:install test:framework:no-framework test:framework:react`,test:`npm-run-all test:unit test:integration`,"build:es5":`rimraf ./es5 && mkdir -p es5 && tsc tsdef/twil
81io-video-tests.ts --noEmit --lib es2018,dom && tsc`,"build:js":`node ./scripts/build.js ./src/twilio-video.js ./LICENSE.md ./dist/twilio-video.js`,"build:min.js":`uglifyjs ./dist/twilio-video.js -o ./dist/twilio-video.min.js --comments "/^! twilio-video.js/" -b beautify=false,ascii_only=true`,build:`npm-run-all clean lint docs test:unit test:integration build:es5 build:js build:min.js test:umd`,"build:quick":`npm-run-all clean lint docs build:es5 build:js build:min.js`,docs:`node ./scripts/docs.js ./dist/docs`,watch:`tsc -w`,clean:`rimraf ./coverage ./es5 ./dist`},dependencies={events:`^3.3.0`,util:`^0.12.4`,ws:`^7.4.6`,xmlhttprequest:`^1.8.0`},browser={ws:`./src/ws.js`,xmlhttprequest:`./src/xmlhttprequest.js`},package_default={name:name$1,title,description,version,homepage,author,contributors,keywords,repository,devDependencies,engines,license,main,types,scripts,dependencies,browser}})),require_constants=__commonJSMin(((e,t)=>{var n=(init_package(),__toCommonJS(package_exports).default);t.exports.SDK_NAME=n.name+`.js`,t.exports.SDK_VERSION=n.version,t.exports.SDP_FORMAT=`unified`,t.exports.hardwareDevicePublisheriPad={hwDeviceManufacturer:`Apple`,hwDeviceModel:`iPad`,hwDeviceType:`tablet`,platformName:`iOS`},t.exports.hardwareDevicePublisheriPhone={hwDeviceManufacturer:`Apple`,hwDeviceModel:`iPhone`,hwDeviceType:`mobile`,platformName:`iOS`},t.exports.DEFAULT_ENVIRONMENT=`prod`,t.exports.DEFAULT_REALM=`us1`,t.exports.DEFAULT_REGION=`gll`,t.exports.DEFAULT_LOG_LEVEL=`warn`,t.exports.DEFAULT_LOGGER_NAME=`twilio-video`,t.exports.WS_SERVER=function(e,t){return t=t===`gll`?`global`:encodeURIComponent(t),e===`prod`?`wss://`+t+`.vss.twilio.com/signaling`:`wss://`+t+`.vss.`+e+`.twilio.com/signaling`},t.exports.PUBLISH_MAX_ATTEMPTS=5,t.exports.PUBLISH_BACKOFF_JITTER=10,t.exports.PUBLISH_BACKOFF_MS=20;function r(e){return[`a`,`e`,`i`,`o`,`u`].includes(e.toLowerCase()[0])?`an`:`a`}t.exports.typeErrors={ILLEGAL_INVOKE:function(e,t){return TypeError(`Illegal call to `+e+`: `+t)},INVALID_TYPE:function(e,t){return TypeError(e+` must be `+r(t)+` `+t)},INVALID_VALUE:function(e,t){return RangeError(e+` must be one of `+t.join(`, `))},REQUIRED_ARGUMENT:function(e){return TypeError(e+` must be specified`)}},t.exports.DEFAULT_FRAME_RATE=24,t.exports.DEFAULT_VIDEO_PROCESSOR_STATS_INTERVAL_MS=1e4,t.exports.DEFAULT_ICE_GATHERING_TIMEOUT_MS=15e3,t.exports.DEFAULT_SESSION_TIMEOUT_SEC=30,t.exports.DEFAULT_NQ_LEVEL_LOCAL=1,t.exp
81orts.DEFAULT_NQ_LEVEL_REMOTE=0,t.exports.MAX_NQ_LEVEL=3,t.exports.ICE_ACTIVITY_CHECK_PERIOD_MS=1e3,t.exports.ICE_INACTIVITY_THRESHOLD_MS=3e3,t.exports.iceRestartBackoffConfig={factor:1.1,min:1,max:t.exports.DEFAULT_SESSION_TIMEOUT_SEC*1e3,jitter:1},t.exports.reconnectBackoffConfig={factor:1.5,min:80,jitter:1},t.exports.subscriptionMode={MODE_COLLABORATION:`collaboration`,MODE_GRID:`grid`,MODE_PRESENTATION:`presentation`},t.exports.trackSwitchOffMode={MODE_DISABLED:`disabled`,MODE_DETECTED:`detected`,MODE_PREDICTED:`predicted`},t.exports.trackPriority={PRIORITY_HIGH:`high`,PRIORITY_LOW:`low`,PRIORITY_STANDARD:`standard`},t.exports.clientTrackSwitchOffControl={MODE_AUTO:`auto`,MODE_MANUAL:`manual`},t.exports.videoContentPreferencesMode={MODE_AUTO:`auto`,MODE_MANUAL:`manual`}})),require_log=__commonJSMin(((e,t)=>{var n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},i=require_loglevel$1().getLogger,a=require_constants(),o=a.DEFAULT_LOG_LEVEL,c=a.DEFAULT_LOGGER_NAME,u=require_constants().typeErrors,K;function Y(e){if(K||=new Map,K.has(e))return K.get(e);var t=new Set;return K.set(e,t),t}var X=function(){function e(t,n,r,a,K){if(typeof t!=`string`)throw u.INVALID_TYPE(`moduleName`,`string`);if(!n)throw u.REQUIRED_ARGUMENT(`component`);typeof r!=`object`&&(r={}),K||=i,de(r),Object.defineProperties(this,{_component:{value:n},_logLevels:{value:r},_warnings:{value:new Set},_loggerName:{get:function(){var e=a&&typeof a==`string`?a:c;return this._logLevelsEqual||(e=e+`-`+t),e}},_logger:{get:function(){var e=K(this._loggerName),n=this._logLevels[t]||o;return n=n===`off`?`silent`:n,e.setDefaultLevel(n),e}},_logLevelsEqual:{get:function(){return new Set(Object.values(this._logLevels)).size===1}},logLevel:{get:function(){return e.getLevelByName(r[t]||o)}},name:{get:n.toString.bind(n)}})}return e.getLevelByName=function(t){return isNaN(t)?(t=t.toUpperCase(),ue(t),e[t]):parseInt(t,10)},e.prototype.createLog=function(t,n){var r=this._loggerName;return this._logLevelsEqual||(r=r.substring(0,r.lastIndexOf(`-`))),new e(t,n,this._logLevels,r)},e.prototype.setLevels=function(e){return de(e),Object.assign(this._logLevels,e),this},e.prototype.log=function(t,i){var a=e._levels[t];if(!a)throw u.INVALID_VALUE(`logLevel`,te);a=a.toLowerCase();var o=[new Date().toISOString(),a,this.name];return(this._logger[a]||function(){}).apply(void 0,r([],n(o.concat(i)))),this},e.prototype.debug=function(){return this.log(e.DEBUG,[].slice.call(arguments))},e.prototype.deprecated=function(e){var t=Y(this._component.constructor);return t.has(e)?this:(t.add(e),this.warn(e))},e.prototype.info=function(){return this.log(e.INFO,[].slice.call(arguments))},e.prototype.warn=function(){return this.log(e.WARN,[].slice.call(arguments))},e.prototype.warnOnce=function(e){return this._warnings.has(e)?this:(this._warnings.add(e),this.warn(e))},e.prototype.error=function(){return this.log(e.ERROR,[].slice.call(arguments))},e.prototype.throw=function(t,n){throw t.clone&&(t=t.clone(n)),this.log(e.ERROR,t),t},e}();Object.defineProperties(X,{DEBUG:{value:0},INFO:{value:1},WARN:{value:2},ERROR:{value:3},OFF:{value:4},_levels:{value:[`DEBUG`,`INFO`,`WARN`,`ERROR`,`OFF`]}});var ee={},te=[],ce=X._levels.map(function(e,t){return ee[e]=!0,te.push(t),e});function ue(e){if(!(e in ee))throw u.INVALID_VALUE(`level`,ce)}function de(e){Object.keys(e).forEach(function(t){ue(e[t].toUpperCase())})}t.exports=X})),require_noisecancellationadapter=__commonJSMin((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function c(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?n(e.value):i(e.value).then(o,c)}u((r=r.apply(e,t||[])).next())})},n=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:c(0),throw:c(1),return:c(2)};
81return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function c(e){return function(t){return u([e,t])}}function u(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.createNoiseCancellationAudioProcessor=void 0;var r=require_dynamicimport();require_log();var i={krisp:{supportedVersion:`1.0.0`,pluginFile:`krispsdk.mjs`},rnnoise:{supportedVersion:`0.6.0`,pluginFile:`rnnoise_sdk.mjs`}},a=function(e){var t=e.supportedVersion,n=e.plugin,r=e.log;if(!n.getVersion||!n.isSupported)throw Error(`Plugin does not export getVersion/isSupported api. Are you using old version of the plugin ?`);var i=n.getVersion();r.debug(`Plugin Version = `+i);var a=t.split(`.`).map(function(e){return Number(e)}),o=i.split(`.`).map(function(e){return Number(e)});if(a.length!==3||o.length!==3)throw Error(`Unsupported Plugin version format: `+t+`, `+i);if(a[0]!==o[0])throw Error(`Major version mismatch: [Plugin version `+i+`],  [Supported Version `+t+`]`);if(o[1]<a[1])throw Error(`Minor version mismatch: [Plugin version `+i+`] < [Supported Version `+t+`]`);var c=new AudioContext,u=n.isSupported(c);if(c.close(),!u)throw Error(`Noise Cancellation plugin is not supported on your browser`)},o=new Map;function c(e,c){return t(this,void 0,void 0,function(){var t,u,K,Y,X,ee,te,ce,ue;return n(this,function(n){switch(n.label){case 0:if(t=o.get(e.vendor),t)return[3,6];if(u=i[e.vendor],!u)throw Error(`Unsupported NoiseCancellationOptions.vendor: `+e.vendor);K=u.supportedVersion,Y=u.pluginFile,X=e.sdkAssetsPath,ee=X+`/`+Y,n.label=1;case 1:return n.trys.push([1,5,,6]),c.debug(`loading noise cancellation sdk: `,ee),[4,r(ee)];case 2:return te=n.sent(),c.debug(`Loaded noise cancellation sdk:`,te),ce=te.default,a({supportedVersion:K,plugin:ce,log:c}),ce.isInitialized()?[3,4]:(c.debug(`initializing noise cancellation sdk: `,X),[4,ce.init({rootDir:X})]);case 3:n.sent(),c.debug(`noise cancellation sdk initialized!`),n.label=4;case 4:return t={vendor:e.vendor,isInitialized:function(){return ce.isInitialized()},isConnected:function(){return ce.isConnected()},isEnabled:function(){return ce.isEnabled()},disconnect:function(){return ce.disconnect()},enable:function(){return ce.enable()},disable:function(){return ce.disable()},destroy:function(){return ce.destroy()},setLogging:function(e){return ce.setLogging(e)},connect:function(e){c.debug(`connect: `,e.id),ce.isConnected()&&ce.disconnect();var t=ce.connect(new MediaStream([e]));if(!t)throw Error(`Error connecting with noise cancellation sdk`);var n=t.getAudioTracks()[0];if(!n)throw Error(`Error getting clean track from noise cancellation sdk`);return ce.enable(),n}}
81,o.set(e.vendor,t),[3,6];case 5:throw ue=n.sent(),c.error(`Error loading noise cancellation sdk:`+ee,ue),ue;case 6:return[2,t]}})})}e.createNoiseCancellationAudioProcessor=c})),require_noisecancellationimpl=__commonJSMin((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function c(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?n(e.value):i(e.value).then(o,c)}u((r=r.apply(e,t||[])).next())})},n=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:c(0),throw:c(1),return:c(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function c(e){return function(t){return u([e,t])}}function u(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>
810&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.applyNoiseCancellation=e.NoiseCancellationImpl=void 0;var r=require_noisecancellationadapter();require_log();var i=function(){function e(e,t){this._processor=e,this._sourceTrack=t,this._disabledPermanent=!1}return Object.defineProperty(e.prototype,"vendor",{get:function(){return this._processor.vendor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sourceTrack",{get:function(){return this._sourceTrack},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._processor.isEnabled()},enumerable:!1,configurable:!0}),e.prototype.enable=function(){if(this._disabledPermanent)throw Error(this.vendor+` noise cancellation is disabled permanently for this track`);return this._processor.enable(),Promise.resolve()},e.prototype.disable=function(){return this._processor.disable(),Promise.resolve()},e.prototype.reacquireTrack=function(e){return t(this,void 0,void 0,function(){var t,r,i;return n(this,function(n){switch(n.label){case 0:return t=this._processor.isEnabled(),this._processor.disconnect(),[4,e()];case 1:return r=n.sent(),this._sourceTrack=r,[4,this._processor.connect(r)];case 2:return i=n.sent(),t?this._processor.enable():this._processor.disable(),[2,i]}})})},e.prototype.disablePermanently=function(){return this._disabledPermanent=!0,this.disable()},e.prototype.stop=function(){this._processor.disconnect(),this._sourceTrack.stop()},e}();e.NoiseCancellationImpl=i;function a(e,a,o){return t(this,void 0,void 0,function(){var t,c,u,K;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,r.createNoiseCancellationAudioProcessor(a,o)];case 1:return t=n.sent(),c=t.connect(e),u=new i(t,e),[2,{cleanTrack:c,noiseCancellation:u}];case 2:return K=n.sent(),o.warn(`Failed to create noise cancellation. Returning normal audio track: `+K),[2,{cleanTrack:e}];case 3:return[2]}})})}e.applyNoiseCancellation=a})),require_util$1=__commonJSMin((e=>{var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};function r(){var e={};return e.promise=new Promise(function(t,n){e.resolve=t,e.reject=n}),e}function i(e,t,n,r){if(!(r in t)&&!r.match(/^on[a-z]+$/)){var i=!1;try{var a=Object.getOwnPropertyDescriptor(e,r);i=a&&!!a.get}catch{}if(!i){var o;try{o=typeof e[r]}catch{}o===`function`&&(t[r]=function(){return this[n][r].apply(this[n],arguments)})}}}function a(e,t,n){for(var r in e)i(e,t,n,r)}function o(e,t){e=Array.isArray(e)?new Set(e):new Set(e.values()),t=Array.isArray(t)?new Set(t):new Set(t.values());var n=new Set;return e.forEach(function(e){t.has(e)||n.add(e)}),n}function c(e,t){return(e instanceof Map||e instanceof Set?Array.from(e.values()):e).reduce(function(e,n){return e.concat(t(n))},[])}function u(){return typeof navigator<`u`&&typeof navigator.userAgent==`string`?navigator.userAgent:null}function K(e){return e===void 0&&(e=u()),/Chrome|CriOS/.test(e)?`chrome`:/Firefox|FxiOS/.test(e)?`firefox`:/Safari|iPhone|iPad|iPod/.test(e)?`safari`:null}function Y(e){e===void 0&&(e=u());var n={chrome:`Chrome|CriOS`,firefox:`Firefox|FxiOS`,safari:`Version`}[K(e)];if(!n)return null;var r=RegExp(`(`+n+`)/([^\\s]+)`),i=t(e.match(r)||[],3)[2];if(!i)return null;var a=i.split(`.`).map(Number);return{major:isNaN(a[0])?null:a[0],minor:isNaN(a[1])?null:a[1]}}function X(e){return e===void 0&&(e=u()),/Mobi/.test(e)&&K()===`chrome`&&/iPad|iPhone|iPod/.test(e)}function ee(e,t){var n=null;Object.defineProperty(e,`on`+t,{get:function(){return n},set:function(e){n&&this.removeEventListener(t,n),typeof e==`function`?(n=e,this.addEventListener(t,n)):n=null}})}function te(e,t,n){return t?e.then(t,n):e}function ce(){return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,function(e){var t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}function ue(e,t,n){Object.getOwnPropertyNames(e).forEach(function(r){de(e,t,n,r)})}function de(e,r,i,a){if(!(a in r)){if(a.match(/^on[a-z]+$/)){Object.defineProperty(r,a,{value:null,writable:!0}),i.addEventListener(a.slice(2),function(){var e=[...arguments];return r.dispatchEvent.apply(r,n([],t(e)))});return}Object.defineProperty(r,a,{enumerable:!0,get:function(){return i[a]}})}}function fe(){return typeof navigator==`object`&&typeof navigator.mediaDevices==`object`&&typeof navigator.mediaDevices.getUserMedia==`function`&&typeof RTCPeerConnection==`function`}function me(e){if(typeof RTCRtpSender<`u`&&typeof RTCRtpSender.getCapabilities==`function`)return Promise.resolve(new Set(RTCRtpSender.getCapabilities(e).co
81decs.map(function(e){return e.mimeType.split(`/`)[1].toLowerCase()})));if(typeof RTCPeerConnection>`u`||RTCPeerConnection.prototype===void 0||typeof RTCPeerConnection.prototype.addTransceiver!=`function`||typeof RTCPeerConnection.prototype.close!=`function`||typeof RTCPeerConnection.prototype.createOffer!=`function`)return Promise.resolve(new Set);var t=new RTCPeerConnection;return t.addTransceiver(e),t.createOffer().then(function(e){var n=e.sdp;return t.close(),new Set((n.match(/^a=rtpmap:.+$/gm)||[]).map(function(e){return e.match(/^a=rtpmap:.+ ([^/]+)/)[1].toLowerCase()}))},function(){return t.close(),new Set})}var ge=new Map;function Te(e,t){var n=ge.get(t);return n?Promise.resolve(n.has(e.toLowerCase())):me(t).then(function(n){return ge.set(t,n),n.has(e.toLowerCase())})}function Oe(){ge.clear()}e.clearCachedSupportedCodecs=Oe,e.defer=r,e.delegateMethods=a,e.difference=o,e.flatMap=c,e.guessBrowser=K,e.guessBrowserVersion=Y,e.isCodecSupported=Te,e.isIOSChrome=X,e.interceptEvent=ee,e.legacyPromise=te,e.makeUUID=ce,e.proxyProperties=ue,e.support=fe})),require_sid=__commonJSMin((e=>{var t=`1234567890abcdef`,n=32;function r(e){for(var t=``,n=0;n<32;n++)t+=`1234567890abcdef`.charAt(Math.floor(Math.random()*16));return``+e+t}e.sessionSID=r(`SS`),e.createSID=r})),require_twiliowarning=__commonJSMin(((e,t)=>{t.exports={recordingMediaLost:`recording-media-lost`}})),require_util=__commonJSMin((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},i=require_constants(),a=i.typeErrors,o=i.trackPriority,c=require_util$1(),u=require_sid().sessionSID,K=require_twiliowarning();function Y(e,t){if(e instanceof t.LocalAudioTrack||e instanceof t.LocalVideoTrack||e instanceof t.LocalDataTrack)return e;if(e instanceof t.MediaStreamTrack)return e.kind===`audio`?new t.LocalAudioTrack(e,t):new t.LocalVideoTrack(e,t);throw a.INVALID_TYPE(`track`,`LocalAudioTrack, LocalVideoTrack, LocalDataTrack, or MediaStreamTrack`)}function X(e,t,n,r){var i={audio:r.LocalAudioTrackPublication,video:r.LocalVideoTrackPublication,data:r.LocalDataTrackPublication}[e.kind];return new i(t,e,n,r)}function ee(e){return e[0].toUpperCase()+e.slice(1)}function te(e,t,n,r){var i=new Set;t.on(`newListener`,function a(o){n.has(o)&&!i.has(o)&&(r.deprecated(e+`#`+o+` has been deprecated and scheduled for removal in [email protected].`+(n.get(o)?` Use `+e+`#`+n.get(o)+` instead.`:``)),i.add(o)),i.size>=n.size&&t.removeListener(`newListener`,a)})}function ce(e,t){e=Array.isArray(e)?new Set(e):new Set(e.values()),t=Array.isArray(t)?new Set(t):new Set(t.values());var n=new Set;return e.forEach(function(e){t.has(e)||n.add(e)}),n}function ue(e,t){return Object.keys(e).reduce(function(n,r){return e[r]!==t&&(n[r]=e[r]),n},{})}function de(e,t){var n=e instanceof Map||e instanceof Set?Array.from(e.values()):e;return t||=function(e){return e},n.reduce(function(e,n){var r=t(n);return e.concat(r)},[])}function fe(){return typeof navigator<`u`&&navigator.userAgent?navigator.userAgent:`Unknown`}function me(){var e=n(fe().match(/\(([^)]+)\)/)||[],2)[1];return n((e===void 0?`unknown`:e).split(`;`).map(function(e){return e.trim()}),1)[0].toLowerCase()}function ge(){return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,function(e){var t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}function Te(e){var t=null;function n(){t=null,e()}return function(){t&&clearTimeout(t),t=setTimeout(n)}}function Oe(e,t,i,a){return new Promise(function(o,c){function u(){var e=[].slice.call(arguments);a&&t.removeListener(a,K),o.apply(void 0,r([],n(e)))}function K(){var e=[].slice.call(arguments);t.removeListener(i,u),c.apply(void 0,r([],n(e)))}t.once(i,u),a&&t.once(a,K),e()})}function Ae(e,t){return t.split(`.`).reduce(function(e,t){return e?e[t]:null},e)}function ze(){var e={};return e.promise=new Promise(function(t,n){e.resolve=t,e.reject=n}),e}function qe(e,t,i,a){if(!(a in t)&&!a.match(/^on[a-z]+$/)){var o;try{o=typeof e[a]}catch{}o===`function`&&(t[a]=function(){for(var e,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return(e=this[i])[a].apply(e,r([],n(t)))})}}function Ye(e,t,n){for(var r in e)qe(e,t,n,r)}function Ze(e,t){if(e===t)return!0;
81if(typeof e!=typeof t)return!1;if(e===null)return t===null;if(t===null)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return Ze(e,t[n])});if(typeof e==`object`){var n=Object.keys(e).sort(),r=Object.keys(t).sort();return!Array.isArray(t)&&Ze(n,r)&&n.every(function(n){return Ze(e[n],t[n])})}return!1}function Qe(e){return typeof e==`object`&&!Array.isArray(e)}function et(e,t,n){Object.getOwnPropertyNames(e).forEach(function(r){nt(e,t,n,r)})}function nt(e,t,i,a){if(!(a in t)){if(a.match(/^on[a-z]+$/)){Object.defineProperty(t,a,{value:null,writable:!0}),i.addEventListener(a.slice(2),function(){var e=[...arguments];t.dispatchEvent.apply(t,r([],n(e)))});return}Object.defineProperty(t,a,{enumerable:!0,get:function(){return i[a]}})}}function rt(e,t,n){return t?e.then(function(e){t(e)},function(e){n(e)}):e}function it(e){return typeof e==`string`?{default:e,media:e,signaling:e,webrtc:e}:e}function at(e,t){return t=t?`Local`:``,t+(e.kind||``).replace(/\w{1}/,function(e){return e.toUpperCase()})+`Track`}function ot(e,t){return t=t?`Local`:``,t+(e.kind||``).replace(/\w{1}/,function(e){return e.toUpperCase()})+`TrackPublication`}function st(e){Object.getOwnPropertyNames(e).forEach(function(t){t.startsWith(`_`)&&lt(e,t)})}function ct(e,i){return function(e){t(a,e);function a(){var t=[...arguments],a=e.apply(this,r([],n(t)))||this;return st(a),ut(a,i),a}return a}(e)}function lt(e,t){var n=Object.getOwnPropertyDescriptor(e,t);n.enumerable=!1,Object.defineProperty(e,t,n)}function ut(e,t){t===void 0&&(t=[]),t.forEach(function(t){e.hasOwnProperty(t)&&lt(e,t)})}function dt(e){return e.map(ht)}function ft(e){return dt(r([],n(e)))}function pt(e){return r([],n(e.entries())).reduce(function(e,t){var r,i=n(t,2),a=i[0],o=i[1];return Object.assign((r={},r[a]=ht(o),r),e)},{})}function mt(e){return Object.entries(e).reduce(function(e,t){var r,i=n(t,2),a=i[0],o=i[1];return Object.assign((r={},r[a]=ht(o),r),e)},{})}function ht(e){return Array.isArray(e)?dt(e):e instanceof Set?ft(e):e instanceof Map?pt(e):e&&typeof e==`object`?mt(e):e}function gt(e){function t(e){return e?`true`:`false`}var r={sessionSID:u,iceServers:(e.iceServers||[]).length,audioTracks:(e.tracks||[]).filter(function(e){return e.kind===`audio`}).length,videoTracks:(e.tracks||[]).filter(function(e){return e.kind===`video`}).length,dataTracks:(e.tracks||[]).filter(function(e){return e.kind===`data`}).length};if([[`audio`],[`automaticSubscription`],[`enableDscp`],[`eventListener`],[`preflight`],[`video`],[`dominantSpeaker`,`enableDominantSpeaker`]].forEach(function(i){var a=n(i,2),o=a[0],c=a[1];c||=o,r[c]=t(!!e[o])}),[[`maxVideoBitrate`],[`maxAudioBitrate`]].forEach(function(t){var i=n(t,2),a=i[0],o=i[1];o||=a,typeof e[a]==`number`?r[o]=e[a]:isNaN(Number(e[a]))||(r[o]=Number(e[a]))}),[[`iceTransportPolicy`],[`region`],[`name`,`roomName`]].forEach(function(t){var i=n(t,2),a=i[0],o=i[1];o||=a,typeof e[a]==`string`?r[o]=e[a]:typeof e[a]==`number`&&a===`name`&&(r[o]=e[a].toString())}),[`preferredAudioCodecs`,`preferredVideoCodecs`].forEach(function(t){t in e&&(r[t]=JSON.stringify(e[t]))}),`networkQuality`in e&&(r.networkQualityConfiguration={},Qe(e.networkQuality)?[`local`,`remote`].forEach(function(t){typeof e.networkQuality[t]==`number`&&(r.networkQualityConfiguration[t]=e.networkQuality[t])}):(r.networkQualityConfiguration.remote=0,r.networkQualityConfiguration.local=+!!e.networkQuality)),e.bandwidthProfile&&e.bandwidthProfile.video){var i=e.bandwidthProfile.video||{};r.bandwidthProfileOptions={},[`mode`,`maxTracks`,`trackSwitchOffMode`,`dominantSpeakerPriority`,`maxSubscriptionBitrate`,`renderDimensions`,`contentPreferencesMode`,`clientTrackSwitchOffControl`].forEach(function(e){typeof i[e]==`number`||typeof i[e]==`string`?r.bandwidthProfileOptions[e]=i[e]:typeof i[e]==`boolean`?r.bandwidthProfileOptions[e]=t(i[e]):typeof i[e]==`object`&&(r.bandwidthProfileOptions[e]=JSON.stringify(i[e]))})}return{group:`room`,name:`connect`,level:`info`,payload:r}}function _t(e){return St(e,[{prop:`video`,type:`object`,transform:vt}])}function vt(e){return St(e,[{prop:`dominantSpeakerPriority`,type:`string`,payloadProp:`active_speaker_priority`}
81,{prop:`maxSubscriptionBitrate`,type:`number`,payloadProp:`max_subscription_bandwidth`},{prop:`maxTracks`,type:`number`,payloadProp:`max_tracks`},{prop:`mode`,type:`string`},{prop:`renderDimensions`,type:`object`,payloadProp:`render_dimensions`,transform:xt},{prop:`trackSwitchOffMode`,type:`string`,payloadProp:`track_switch_off`}])}function yt(e,t,n,r,i,a){var o={transports:[{type:`data-channel`}]};return Object.assign(e?{active_speaker:o}:{},t?{network_quality:o}:{},a?{render_hints:o}:{},i?{publisher_hints:o}:{},n?{track_priority:o}:{},r?{track_switch_off:o}:{})}function bt(e){return St(e,[{prop:`height`,type:`number`},{prop:`width`,type:`number`}])}function xt(e){var t=o.PRIORITY_HIGH,n=o.PRIORITY_LOW,r=o.PRIORITY_STANDARD;return St(e,[{prop:t,type:`object`,transform:bt},{prop:n,type:`object`,transform:bt},{prop:r,type:`object`,transform:bt}])}function St(e,t){return t.reduce(function(t,n){var r,i=n.prop,a=n.type,o=n.payloadProp,c=o===void 0?i:o,u=n.transform,K=u===void 0?function(e){return e}:u;return typeof e[i]===a?Object.assign((r={},r[c]=K(e[i]),r),t):t},{})}function Ct(e){return{rules:[{type:e?`include`:`exclude`,all:!0}],revision:1}}function wt(e){var t={},n=(t[K.recordingMediaLost]=`recordings`,t);return e.map(function(e){return n[e]}).filter(function(e){return!!e})}function Tt(e,t){var n=Math.random();return e-t+Math.floor(2*t*n+.5)}function Et(e,t,n){return t<=e&&e<=n}function Dt(e){return c.guessBrowser()===`chrome`&&e.kind===`video`&&`displaySurface`in e.getSettings()}function Ot(e){return e===void 0&&(e=10),new Promise(function(t){return setTimeout(t,e)})}function kt(e,t){return new Promise(function(n){e.addEventListener(t,function r(i){e.removeEventListener(t,r),n(i)})})}e.constants=i,e.createBandwidthProfilePayload=_t,e.createMediaSignalingPayload=yt,e.createMediaWarningsPayload=wt,e.createRoomConnectEventPayload=gt,e.createSubscribePayload=Ct,e.asLocalTrack=Y,e.asLocalTrackPublication=X,e.capitalize=ee,e.deprecateEvents=te,e.difference=ce,e.filterObject=ue,e.flatMap=de,e.getPlatform=me,e.getUserAgent=fe,e.hidePrivateProperties=st,e.hidePrivateAndCertainPublicPropertiesInClass=ct,e.isDeepEqual=Ze,e.isNonArrayObject=Qe,e.inRange=Et,e.makeUUID=ge,e.oncePerTick=Te,e.promiseFromEvents=Oe,e.getOrNull=Ae,e.defer=ze,e.delegateMethods=Ye,e.proxyProperties=et,e.legacyPromise=rt,e.buildLogLevels=it,e.trackClass=at,e.trackPublicationClass=ot,e.valueToJSON=ht,e.withJitter=Tt,e.isChromeScreenShareTrack=Dt,e.waitForSometime=Ot,e.waitForEvent=kt})),require_sdp$1=__commonJSMin((e=>{var t=require_util$1(),n=t.flatMap,r=t.guessBrowser,i=null;function a(){if(typeof i==`boolean`)return i;if(typeof RTCPeerConnection>`u`)return i=!1,i;try{new RTCPeerConnection({sdpSemantics:`foo`}),i=!1}catch{i=!0}return i}var o=null;function c(){o=null}function u(){if(!o){if(typeof RTCPeerConnection<`u`&&`addTransceiver`in RTCPeerConnection.prototype){var e=new RTCPeerConnection;try{e.addTransceiver(`audio`),o=`unified`}catch{o=`planb`}e.close()}else o=`planb`}return o}function K(e){return!e||!a()?u():{"plan-b":`planb`,"unified-plan":`unified`}[e]}function Y(){return typeof RTCRtpTransceiver<`u`&&`currentDirection`in RTCRtpTransceiver.prototype?`unified`:`planb`}function X(e){return{chrome:K(e),firefox:`unified`,safari:Y()}[r()]||null}function ee(e,t){return(t.match(new RegExp(e,`gm`))||[]).reduce(function(t,n){var r=n.match(new RegExp(e));return r?t.add(r[1]):t},new Set)}function te(e,t){return ee(e,t)}function ce(e){return te(`^a=ssrc:[0-9]+ +msid:.+ +(.+) *$`,e)}function ue(e){return te(`^a=msid:.+ +(.+) *$`,e)}function de(e,t){return ee(`^a=ssrc:([0-9]+) +msid:[^ ]+ +`+t+` *$`,e)}function fe(e,t,n){return t===void 0&&(t=`.*`),n===void 0&&(n=`.*`),e.split(`\r
82m=`).slice(1).map(function(e){return`m=`+e}).filter(function(e){var r=RegExp(`m=`+t,`gm`),i=RegExp(`a=`+n,`gm`);return r.test(e)&&i.test(e)})}function me(e){return Array.from(ee(`^a=ssrc:([0-9]+) +.*$`,e))}function ge(e,t){var r=fe(e),i=RegExp(`^a=msid:[^ ]+ +`+t+` *$`,`gm`),a=r.filter(function(e){return e.match(i)});return new Set(n(a,me))}function Te(e,t,n){return new Map(Array.from(e(n)).map(function(e){return[e,t(n,e)]}))}function Oe(e){return Te(ce,de,e)}function Ae(e){return Te(ue,ge,e)}function ze(e,t,n){var r=e(n),i=new Map;r.forEach(function(e,r){if(!t.has(r)){t.set(r,e);return}var a=Array.from(t.get(r)),o=Array.from(e);a.forEach(function(e,t){var r=o[t];i.set(r,e);var a=`^a=ssrc:`+r+` (.*)$`,c=`a=ssrc:`+e+` $1`;n=n.replace(new RegExp(a,`gm`),c)})});var a=`^(a=ssrc-group:[^ ]+ +)(.*)$`;
82return(n.match(new RegExp(a,`gm`))||[]).forEach(function(e){var t=e.match(new RegExp(a));if(t){var r=t[1],o=t[2].split(` `).map(function(e){return i.get(e)||e}).join(` `);n=n.replace(t[0],r+o)}}),n}function qe(e,t){return ze(Oe,e,t)}function Ye(e,t){return ze(Ae,e,t)}e.clearChromeCachedSdpFormat=c,e.getSdpFormat=X,e.getMediaSections=fe,e.getPlanBTrackIds=ce,e.getUnifiedPlanTrackIds=ue,e.getPlanBSSRCs=de,e.getUnifiedPlanSSRCs=ge,e.updatePlanBTrackIdsToSSRCs=qe,e.updateUnifiedPlanTrackIdsToSSRCs=Ye})),require_getstats=__commonJSMin(((e,t)=>{var n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=require_util$1(),i=r.flatMap,a=r.guessBrowser,o=r.guessBrowserVersion,c=require_sdp$1().getSdpFormat,u=a(),K=o(),Y=u===`chrome`,X=u===`firefox`,ee=u===`safari`,te=Y?K.major:null,ce=32767;function ue(e,t){return e&&typeof e.getStats==`function`?de(e,t):Promise.reject(Error(`Given PeerConnection does not support getStats`))}function de(e,t){var r=Te(e,`audio`,`local`),a=Te(e,`video`,`local`),o=Te(e,`audio`),c=Te(e,`video`),u={activeIceCandidatePair:null,localAudioTrackStats:[],localVideoTrackStats:[],remoteAudioTrackStats:[],remoteVideoTrackStats:[]},K=i([[r,`localAudioTrackStats`,!1],[a,`localVideoTrackStats`,!1],[o,`remoteAudioTrackStats`,!0],[c,`remoteVideoTrackStats`,!0]],function(r){var i=n(r,3),a=i[0],o=i[1],c=i[2];return a.map(function(n){return Oe(e,n,Object.assign({isRemote:c},t)).then(function(e){e.forEach(function(e){e.trackId=n.id,u[o].push(e)})})})});return Promise.all(K).then(function(){return fe(e,t)}).then(function(e){return u.activeIceCandidatePair=e,u})}function fe(e,t){return t===void 0&&(t={}),t.testForChrome!==void 0||Y||t.testForSafari!==void 0||ee?e.getStats().then(me):t.testForFirefox!==void 0||X?e.getStats().then(ge):Promise.reject(Error(`RTCPeerConnection#getStats() not supported`))}function me(e){var t=Array.from(e.values()).find(function(e){var t=e.nominated;return e.type===`candidate-pair`&&t});if(!t)return null;var n=e.get(t.localCandidateId),r=e.get(t.remoteCandidateId),i=[{key:`candidateType`,type:`string`},{key:`ip`,type:`string`},{key:`port`,type:`number`},{key:`priority`,type:`number`},{key:`protocol`,type:`string`},{key:`url`,type:`string`}],a=i.concat([{key:`deleted`,type:`boolean`},{key:`relayProtocol`,type:`string`}]),o=n?a.reduce(function(e,t){var r=t.key,i=t.type;return e[r]=typeof n[r]===i?n[r]:r!==`deleted`&&null,e},{}):null,c=r?i.reduce(function(e,t){var n=t.key,i=t.type;return e[n]=typeof r[n]===i?r[n]:null,e},{}):null;return[{key:`availableIncomingBitrate`,type:`number`},{key:`availableOutgoingBitrate`,type:`number`},{key:`bytesReceived`,type:`number`},{key:`bytesSent`,type:`number`},{key:`consentRequestsSent`,type:`number`},{key:`currentRoundTripTime`,type:`number`},{key:`lastPacketReceivedTimestamp`,type:`number`},{key:`lastPacketSentTimestamp`,type:`number`},{key:`nominated`,type:`boolean`},{key:`priority`,type:`number`},{key:`readable`,type:`boolean`},{key:`requestsReceived`,type:`number`},{key:`requestsSent`,type:`number`},{key:`responsesReceived`,type:`number`},{key:`responsesSent`,type:`number`},{key:`retransmissionsReceived`,type:`number`},{key:`retransmissionsSent`,type:`number`},{key:`state`,type:`string`,fixup:function(e){return e===`inprogress`?`in-progress`:e}},{key:`totalRoundTripTime`,type:`number`},{key:`transportId`,type:`string`},{key:`writable`,type:`boolean`}].reduce(function(e,n){var r=n.key,i=n.type,a=n.fixup;return e[r]=typeof t[r]===i?a?a(t[r]):t[r]:null,e},{localCandidate:o,remoteCandidate:c})}function ge(e){var t=Array.from(e.values()).find(function(e){var t=e.nominated;return e.type===`candidate-pair`&&t});if(!t)return null;var n=e.get(t.localCandidateId),r=e.get(t.remoteCandidateId),i=[{key:`candidateType`,type:`string`},{key:`ip`,ffKeys:[`address`,`ipAddress`],type:`string`},{key:`port`,ffKeys:[`portNumber`],type:`number`},{key:`priority`,type:`number`},{key:`protocol`,ffKeys:[`transport`],type:`string`},{key:`url`,type:`string`}
82],a=i.concat([{key:`deleted`,type:`boolean`},{key:`relayProtocol`,type:`string`}]),o={host:`host`,peerreflexive:`prflx`,relayed:`relay`,serverreflexive:`srflx`},c=n?a.reduce(function(e,t){var r=t.ffKeys,i=t.key,a=t.type,c=r&&r.find(function(e){return e in n})||i;return e[i]=typeof n[c]===a?c===`candidateType`&&o[n[c]]||n[c]:c!==`deleted`&&null,e},{}):null,u=r?i.reduce(function(e,t){var n=t.ffKeys,i=t.key,a=t.type,c=n&&n.find(function(e){return e in r})||i;return e[i]=typeof r[c]===a?c===`candidateType`&&o[r[c]]||r[c]:null,e},{}):null;return[{key:`availableIncomingBitrate`,type:`number`},{key:`availableOutgoingBitrate`,type:`number`},{key:`bytesReceived`,type:`number`},{key:`bytesSent`,type:`number`},{key:`consentRequestsSent`,type:`number`},{key:`currentRoundTripTime`,type:`number`},{key:`lastPacketReceivedTimestamp`,type:`number`},{key:`lastPacketSentTimestamp`,type:`number`},{key:`nominated`,type:`boolean`},{key:`priority`,type:`number`},{key:`readable`,type:`boolean`},{key:`requestsReceived`,type:`number`},{key:`requestsSent`,type:`number`},{key:`responsesReceived`,type:`number`},{key:`responsesSent`,type:`number`},{key:`retransmissionsReceived`,type:`number`},{key:`retransmissionsSent`,type:`number`},{key:`state`,type:`string`},{key:`totalRoundTripTime`,type:`number`},{key:`transportId`,type:`string`},{key:`writable`,type:`boolean`}].reduce(function(e,n){var r=n.key,i=n.type;return e[r]=typeof t[r]===i?t[r]:null,e},{localCandidate:c,remoteCandidate:u})}function Te(e,t,n){var r=n===`local`?`getSenders`:`getReceivers`;if(e[r])return e[r]().map(function(e){return e.track}).filter(function(e){return e&&e.kind===t});var a=n===`local`?`getLocalStreams`:`getRemoteStreams`,o=t===`audio`?`getAudioTracks`:`getVideoTracks`;return i(e[a](),function(e){return e[o]()})}function Oe(e,t,n){return n===void 0&&(n={}),n.testForChrome!==void 0||Y?Ae(e,t,n):n.testForFirefox!==void 0||X?ze(e,t,n):n.testForSafari!==void 0||ee?n.testForSafari!==void 0||c()===`unified`?Ae(e,t,n):Promise.reject(Error([`getStats() is not supported on this version of Safari`,`due to this bug: https://bugs.webkit.org/show_bug.cgi?id=192601`].join(` `))):Promise.reject(Error(`RTCPeerConnection#getStats() not supported`))}function Ae(e,t,n){return te&&te<67?new Promise(function(n,r){e.getStats(function(e){n([qe(e,t)])},null,r)}):e.getStats(t).then(function(e){return Ye(e,n)})}function ze(e,t,n){return e.getStats(t).then(function(e){return[Ze(e,n)]})}function qe(e,t){var n=e.result().find(function(e){return e.type===`ssrc`&&e.stat(`googTrackId`)===t.id}),r={};return n&&(r.timestamp=Math.round(Number(n.timestamp)),r=n.names().reduce(function(e,t){switch(t){case`googCodecName`:e.codecName=n.stat(t);break;case`googRtt`:e.roundTripTime=Number(n.stat(t));break;case`googJitterReceived`:e.jitter=Number(n.stat(t));break;case`googFrameWidthInput`:e.frameWidthInput=Number(n.stat(t));break;case`googFrameHeightInput`:e.frameHeightInput=Number(n.stat(t));break;case`googFrameWidthSent`:e.frameWidthSent=Number(n.stat(t));break;case`googFrameHeightSent`:e.frameHeightSent=Number(n.stat(t));break;case`googFrameWidthReceived`:e.frameWidthReceived=Number(n.stat(t));break;case`googFrameHeightReceived`:e.frameHeightReceived=Number(n.stat(t));break;case`googFrameRateInput`:e.frameRateInput=Number(n.stat(t));break;case`googFrameRateSent`:e.frameRateSent=Number(n.stat(t));break;case`googFrameRateReceived`:e.frameRateReceived=Number(n.stat(t));break;case`ssrc`:e[t]=n.stat(t);break;case`bytesReceived`:case`bytesSent`:case`packetsLost`:case`packetsReceived`:case`packetsSent`:case`audioInputLevel`:case`audioOutputLevel`:e[t]=Number(n.stat(t))}return e},r)),r}function Ye(e,t){var n=t.simulateExceptionWhileStandardizingStats;if(n!==void 0&&n)throw Error(`Error while gathering stats`);var r=null,i=[],a=null,o=null,c=null,u=null,K=null;e.forEach(function(e){switch(e.type){case`inbound-rtp`:r=e;break;case`outbound-rtp`:i.push(e);break;case`media-source`:K=e;break;case`track`:c=e;break;case`codec`:u=e;break;case`remote-inbound-rtp`:a=e;break;case`remote-outbound-rtp`:o=e}});var Y=c?c.remoteSource:!K,X=Y?[r]:i,ee=[],te=Y?o:a;
82return X.forEach(function(e){var t={},n=[e,K,c,u,te&&te.ssrc===e.ssrc?te:null];function r(e){var t=n.find(function(t){return t&&t[e]!==void 0})||null;return t?t[e]:null}var i=r(`ssrc`);typeof i==`number`&&(t.ssrc=String(i));var a=r(`timestamp`);t.timestamp=Math.round(a);var o=r(`mimeType`);typeof o==`string`&&(o=o.split(`/`),t.codecName=o[o.length-1]);var X=r(`roundTripTime`);typeof X==`number`&&(t.roundTripTime=Math.round(X*1e3));var ue=r(`jitter`);typeof ue==`number`&&(t.jitter=Math.round(ue*1e3));var de=r(`frameWidth`);typeof de==`number`&&(Y?t.frameWidthReceived=de:(t.frameWidthSent=de,t.frameWidthInput=c?c.frameWidth:K.width));var fe=r(`frameHeight`);typeof fe==`number`&&(Y?t.frameHeightReceived=fe:(t.frameHeightSent=fe,t.frameHeightInput=c?c.frameHeight:K.height));var me=r(`framesPerSecond`);typeof me==`number`&&(t[Y?`frameRateReceived`:`frameRateSent`]=me);var ge=r(`bytesReceived`);typeof ge==`number`&&(t.bytesReceived=ge);var Te=r(`bytesSent`);typeof Te==`number`&&(t.bytesSent=Te);var Oe=r(`packetsLost`);typeof Oe==`number`&&(t.packetsLost=Oe);var Ae=r(`packetsReceived`);typeof Ae==`number`&&(t.packetsReceived=Ae);var ze=r(`packetsSent`);typeof ze==`number`&&(t.packetsSent=ze);var qe=r(`audioLevel`);typeof qe==`number`&&(qe=Math.round(qe*ce),Y?t.audioOutputLevel=qe:t.audioInputLevel=qe);var Ye=r(`totalPacketSendDelay`);typeof Ye==`number`&&(t.totalPacketSendDelay=Ye);var Ze=r(`totalEncodeTime`);typeof Ze==`number`&&(t.totalEncodeTime=Ze);var Qe=r(`framesEncoded`);typeof Qe==`number`&&(t.framesEncoded=Qe);var et=r(`estimatedPlayoutTimestamp`);typeof et==`number`&&(t.estimatedPlayoutTimestamp=et);var nt=r(`totalDecodeTime`);typeof nt==`number`&&(t.totalDecodeTime=nt);var rt=r(`framesDecoded`);typeof rt==`number`&&(t.framesDecoded=rt);var it=r(`jitterBufferDelay`);typeof it==`number`&&(t.jitterBufferDelay=it);var at=r(`jitterBufferEmittedCount`);typeof at==`number`&&(t.jitterBufferEmittedCount=at),ee.push(t)}),ee}function Ze(e,t){e===void 0&&(e=new Map);var n=t.isRemote,r=t.simulateExceptionWhileStandardizingStats;if(r!==void 0&&r)throw Error(`Error while gathering stats`);var i=null,a=null;e.forEach(function(t){var n=t.isRemote,r=t.remoteId,o=t.type;if(!n)switch(o){case`inbound-rtp`:i=t,a=e.get(r);break;case`outbound-rtp`:a=t,i=e.get(r)}});var o=n?i:a,c=n?a:i;function u(e){return o&&o[e]!==void 0?o[e]:c&&c[e]!==void 0?c[e]:null}var K={},Y=u(`timestamp`);K.timestamp=Math.round(Y);var X=u(`ssrc`);typeof X==`number`&&(K.ssrc=String(X));var ee=u(`bytesSent`);typeof ee==`number`&&(K.bytesSent=ee);var te=u(`packetsLost`);typeof te==`number`&&(K.packetsLost=te);var ce=u(`packetsSent`);typeof ce==`number`&&(K.packetsSent=ce);var ue=u(`roundTripTime`);typeof ue==`number`&&(K.roundTripTime=Math.round(ue*1e3));var de=u(`jitter`);typeof de==`number`&&(K.jitter=Math.round(de*1e3));var fe=u(`framerateMean`);typeof fe==`number`&&(K.frameRateSent=Math.round(fe));var me=u(`bytesReceived`);typeof me==`number`&&(K.bytesReceived=me);var ge=u(`packetsReceived`);typeof ge==`number`&&(K.packetsReceived=ge);var Te=u(`framerateMean`);typeof Te==`number`&&(K.frameRateReceived=Math.round(Te));var Oe=u(`totalPacketSendDelay`);typeof Oe==`number`&&(K.totalPacketSendDelay=Oe);var Ae=u(`totalEncodeTime`);typeof Ae==`number`&&(K.totalEncodeTime=Ae);var ze=u(`framesEncoded`);typeof ze==`number`&&(K.framesEncoded=ze);var qe=u(`estimatedPlayoutTimestamp`);typeof qe==`number`&&(K.estimatedPlayoutTimestamp=qe);var Ye=u(`totalDecodeTime`);typeof Ye==`number`&&(K.totalDecodeTime=Ye);var Ze=u(`framesDecoded`);typeof Ze==`number`&&(K.framesDecoded=Ze);var Qe=u(`jitterBufferDelay`);typeof Qe==`number`&&(K.jitterBufferDelay=Qe);var et=u(`jitterBufferEmittedCount`);return typeof et==`number`&&(K.jitterBufferEmittedCount=et),K}t.exports=ue})),require_getusermedia=__commonJSMin(((e,t)=>{function n(e){return e===void 0&&(e={audio:!0,video:!0}),typeof navigator==`object`&&typeof navigator.mediaDevices==`object`&&typeof navigator.mediaDevices.getUserMedia==`function`?navigator.mediaDevices.getUserMedia(e):Promise.reject(Error(`getUserMedia is not supported`))}t.exports=n})),require_mediastream=__commonJSMin(((e,t)=>{t.exports=typeof MediaStream==`function`?MediaStream:function(){throw Error(`MediaStream is not supported`)}})),require_mediastreamtrack=__commonJSMin(((e,t)=>{t.exports=typeof MediaStreamTrack==`function`?MediaStreamTrack:function(){throw Error(`MediaStreamTrack is not supported`)}})),require_rtcicecandidate=__commonJSMin(((e,t)=>{t.exports=typeof RTCIceCandidate==`function`?RTCIceCandidate:function(){throw Error(`RTCIceCandidate is not supported`)}})),require_chrome$1=__commonJSMin(((e,t)=>{t.exports=function(){function e(e){this.descriptionInitDict=e;var t=e&&e.type===`rollback`?null:new RTCSessionDescription(e);Object.defineProperties(this,{_description:{get:function(){return t}}})}return Object.defineProperty(e.prototype,"sdp",{get:function(){return this._description?this._description.sdp:this.descriptionInitDict.sdp}
vendor: 6,253 bytes, line 82
82,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._description?this._description.type:this.descriptionInitDict.type},enumerable:!1,configurable:!0}),e}()})),require_events=__commonJSMin(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function c(){c.init.call(this)}t.exports=c,t.exports.once=ge,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var u=10;function K(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);u=e}}),c.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},c.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function Y(e){return e._maxListeners===void 0?c.defaultMaxListeners:e._maxListeners}c.prototype.getMaxListeners=function(){return Y(this)},c.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var c=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw c.context=o,c}var u=a[e];if(u===void 0)return!1;if(typeof u==`function`)r(u,this,t);else for(var K=u.length,Y=de(u,K),n=0;n<K;++n)r(Y[n],this,t);return!0};function X(e,t,n,r){var i,o,c;if(K(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),o=e._events),c=o[t]),c===void 0)c=o[t]=n,++e._eventsCount;else if(typeof c==`function`?c=o[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),i=Y(e),i>0&&c.length>i&&!c.warned){c.warned=!0;var u=Error(`Possible EventEmitter memory leak detected. `+c.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);u.name=`MaxListenersExceededWarning`,u.emitter=e,u.type=t,u.count=c.length,a(u)}return e}c.prototype.addListener=function(e,t){return X(this,e,t,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(e,t){return X(this,e,t,!0)};function ee(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function te(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=ee.bind(r);return i.listener=n,r.wrapFn=i,i}c.prototype.once=function(e,t){return K(t),this.on(e,te(this,e,t)),this},c.prototype.prependOnceListener=function(e,t){return K(t),this.prependListener(e,te(this,e,t)),this},c.prototype.removeListener=function(e,t){var n,r,i,a,o;if(K(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():fe(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r<i.length;++r)a=i[r],a!==`removeListener`&&this.removeAllListeners(a);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function ce(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?me(i):de(i,i.length)}c.prototype.listeners=function(e){return ce(this,e,!0)},c.prototype.rawListeners=function(e){return ce(this,e,!1)},c.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):ue.call(e,t)},c.prototype.listenerCount=ue;function ue(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}c.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function de(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function fe(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function me(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function ge(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}Oe(e,t,a,{once:!0}),t!==`error`&&Te(e,i,{once:!0})})}function Te(e,t,n){typeof e.on==`function`&&Oe(e,`error`,t,n)}function Oe(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener==`function`)e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e)}}
82)),require_eventtarget=__commonJSMin(((e,t)=>{var n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},i=require_events().EventEmitter;t.exports=function(){function e(){Object.defineProperties(this,{_eventEmitter:{value:new i}})}return e.prototype.dispatchEvent=function(e){return this._eventEmitter.emit(e.type,e)},e.prototype.addEventListener=function(){var e;return(e=this._eventEmitter).addListener.apply(e,r([],n(arguments)))},e.prototype.removeEventListener=function(){var e;return(e=this._eventEmitter).removeListener.apply(e,r([],n(arguments)))},e}()})),require_latch=__commonJSMin(((e,t)=>{var n=require_util$1().defer,r={high:new Set([`low`]),low:new Set([`high`])},i=function(){function e(e){e===void 0&&(e=`low`);var t=e;Object.defineProperties(this,{_state:{set:function(e){var n=this;if(t!==e){t=e;var r=this._whenDeferreds.get(t);r.forEach(function(e){return e.resolve(n)}),r.clear()}},get:function(){return t}},_whenDeferreds:{value:new Map([[`high`,new Set],[`low`,new Set]])}})}return Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),e.prototype.lower=function(){return this.transition(`low`)},e.prototype.raise=function(){return this.transition(`high`)},e.prototype.transition=function(e){if(!r[this.state].has(e))throw a(this.state,e);return this._state=e,this},e.prototype.when=function(e){if(this.state===e)return Promise.resolve(this);if(!r[this.state].has(e))return Promise.reject(a(this.state,e));var t=n();return this._whenDeferreds.get(e).add(t),t.promise},e}();function a(e,t){return Error(`Cannot transition from "`+e+`" to "`+t+`"`)}t.exports=i})),require_rtcrtpsender=__commonJSMin(((e,t)=>{t.exports=function(){function e(e){Object.defineProperties(this,{track:{enumerable:!0,value:e,writable:!0}})}return e}()})),require_chrome=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},a=require_chrome$1(),o=require_eventtarget(),c=require_latch(),u=require_mediastream(),K=require_rtcrtpsender(),Y=require_sdp$1(),X=Y.getSdpFormat,ee=Y.updatePlanBTrackIdsToSSRCs,te=Y.updateUnifiedPlanTrackIdsToSSRCs,ce=require_util$1(),ue=ce.delegateMethods,de=ce.interceptEvent,fe=ce.isIOSChrome,me=ce.legacyPromise,ge=ce.proxyProperties,Te=X()===`unified`,Oe=function(e){n(t,e);function t(t,n){t===void 0&&(t={});var a=e.call(this)||this,o=Object.assign(t.iceTransportPolicy?{iceTransports:t.iceTransportPolicy}:{},t);de(a,`datachannel`),de(a,`signalingstatechange`);var K=X(o.sdpSemantics),Y=new RTCPeerConnection(o,n);return Object.defineProperties(a,{_appliedTracksToSSRCs:{value:new Map,writable:!0},_localStream:{value:new u},_peerConnection:{value:Y},_pendingLocalOffer:{value:null,writable:!0},_pendingRemoteOffer:{value:null,writable:!0},_rolledBackTracksToSSRCs:{value:new Map,writable:!0},_sdpFormat:{value:K},_senders:{value:new Map},_signalingStateLatch:{value:new c},_tracksToSSRCs:{value:new Map,writable:!0}}),Y.addEventListener(`datachannel`,function(e){et(e.channel),a.dispatchEvent(e)}),Y.addEventListener(`signalingstatechange`,function(){var e=[...arguments];Y.signalingState===`stable`&&(a._appliedTracksToSSRCs=new Map(a._tracksToSSRCs)),!a._pendingLocalOffer&&!a._pendingRemoteOffer&&a.dispatchEvent.apply(a,i([],r(e)))}),Y.ontrack=function(){}
82,typeof Y.addTrack!=`function`&&Y.addStream(a._localStream),ge(RTCPeerConnection.prototype,a,Y),a}return Object.defineProperty(t.prototype,"localDescription",{get:function(){return this._pendingLocalOffer?this._pendingLocalOffer:this._peerConnection.localDescription},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"remoteDescription",{get:function(){return this._pendingRemoteOffer?this._pendingRemoteOffer:this._peerConnection.remoteDescription},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"signalingState",{get:function(){return this._pendingLocalOffer?`have-local-offer`:this._pendingRemoteOffer?`have-remote-offer`:this._peerConnection.signalingState},enumerable:!1,configurable:!0}),t.prototype.addTrack=function(e){for(var t,n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];if(typeof this._peerConnection.addTrack==`function`)return(t=this._peerConnection).addTrack.apply(t,i([e],r(n)));if(this._peerConnection.signalingState===`closed`)throw Error(`Cannot add MediaStreamTrack [`+e.id+`, 
83        `+e.kind+`]: RTCPeerConnection is closed`);var o=this._senders.get(e);if(o&&o.track)throw Error(`Cannot add MediaStreamTrack ['`+e.id+`, 
84        `+e.kind+`]: RTCPeerConnection already has it`);return this._peerConnection.removeStream(this._localStream),this._localStream.addTrack(e),this._peerConnection.addStream(this._localStream),o=new K(e),this._senders.set(e,o),o},t.prototype.removeTrack=function(e){if(this._peerConnection.signalingState===`closed`)throw Error(`Cannot remove MediaStreamTrack: RTCPeerConnection is closed`);if(typeof this._peerConnection.addTrack==`function`)try{return this._peerConnection.removeTrack(e)}catch{}else{var t=e.track;if(!t)return;e=this._senders.get(t),e&&e.track&&(e.track=null,this._peerConnection.removeStream(this._localStream),this._localStream.removeTrack(t),this._peerConnection.addStream(this._localStream))}},t.prototype.getSenders=function(){return typeof this._peerConnection.addTrack==`function`?this._peerConnection.getSenders():Array.from(this._senders.values())},t.prototype.addIceCandidate=function(e){for(var t=this,n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];var o=this.signalingState===`have-remote-offer`?this._signalingStateLatch.when(`low`).then(function(){return t._peerConnection.addIceCandidate(e)}):this._peerConnection.addIceCandidate(e);return n.length>0?me.apply(void 0,i([o],r(n))):o},t.prototype.close=function(){this.signalingState!==`closed`&&(this._pendingLocalOffer=null,this._pendingRemoteOffer=null,this._peerConnection.close())},t.prototype.createAnswer=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=this._pendingRemoteOffer?this._peerConnection.setRemoteDescription(this._pendingRemoteOffer).then(function(){return e._signalingStateLatch.lower(),e._peerConnection.createAnswer()}).then(function(t){return e._pendingRemoteOffer=null,e._rolledBackTracksToSSRCs.clear(),new a({type:`answer`,sdp:nt(e._sdpFormat,e._tracksToSSRCs,t.sdp)})},function(t){throw e._pendingRemoteOffer=null,t}):this._peerConnection.createAnswer().then(function(t){return e._rolledBackTracksToSSRCs.clear(),new a({type:`answer`,sdp:nt(e._sdpFormat,e._tracksToSSRCs,t.sdp)})});return t.length>1?me.apply(void 0,i([o],r(t))):o},t.prototype.createOffer=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=r(t,3),o=i[0],c=i[1],u=i[2]||o||{};if(fe()){if(u.offerToReceiveVideo&&!this._audioTransceiver&&!(Te&&qe(this,`audio`))){delete u.offerToReceiveAudio;try{this._audioTransceiver=Te?this.addTransceiver(`audio`,{direction:`recvonly`}):this.addTransceiver(`audio`)}catch(e){return Promise.reject(e)}}if(u.offerToReceiveVideo&&!this._videoTransceiver&&!(Te&&qe(this,`video`))){delete u.offerToReceiveVideo;try{this._videoTransceiver=Te?this.addTransceiver(`video`,{direction:`recvonly`}):this.addTransceiver(`video`)}catch(e){return Promise.reject(e)}}}var K=this._peerConnection.createOffer(u).then(function(t){return e._rolledBackTracksToSSRCs.clear(),new a({type:t.type,sdp:nt(e._sdpFormat,e._tracksToSSRCs,t.sdp)})});return t.length>1?me(K,o,c):K},t.prototype.createDataChannel=function(e,t){t=Qe(t);
84var n=this._peerConnection.createDataChannel(e,t);return et(n),n},t.prototype.setLocalDescription=function(){var e=[...arguments],t=r(e,3),n=t[0],i=t[1],a=t[2];this._rolledBackTracksToSSRCs.size>0&&(this._tracksToSSRCs=new Map(this._rolledBackTracksToSSRCs),this._rolledBackTracksToSSRCs.clear());var o=Ae(this,!0,n);return e.length>1?me(o,i,a):o},t.prototype.setRemoteDescription=function(){var e=[...arguments],t=r(e,3),n=t[0],i=t[1],a=t[2];this._rolledBackTracksToSSRCs.clear();var o=Ae(this,!1,n);return e.length>1?me(o,i,a):o},t}(o);ue(RTCPeerConnection.prototype,Oe.prototype,`_peerConnection`);function Ae(e,t,n){function r(n){t?e._pendingLocalOffer=n:e._pendingRemoteOffer=n}function i(){t?e._pendingLocalOffer=null:e._pendingRemoteOffer=null}var a=t?e._pendingLocalOffer:e._pendingRemoteOffer,o=t?e._pendingRemoteOffer:e._pendingLocalOffer,c=t?`have-local-offer`:`have-remote-offer`,u=t?`setLocalDescription`:`setRemoteDescription`,K;if(!t&&o&&n.type===`answer`)K=ze(e,n);else if(n.type===`offer`){if(e.signalingState!==c&&e.signalingState!==`stable`)return Promise.reject(Error(`Cannot set `+(t?`local`:`remote`)+` offer in state `+e.signalingState));!a&&e._signalingStateLatch.state===`low`&&e._signalingStateLatch.raise();var Y=e.signalingState;r(Ye(n)),K=Promise.resolve(),e.signalingState!==Y&&K.then(function(){return e.dispatchEvent(new Event(`signalingstatechange`))})}else n.type===`rollback`&&(e.signalingState===c?(i(),e._rolledBackTracksToSSRCs=new Map(e._tracksToSSRCs),e._tracksToSSRCs=new Map(e._appliedTracksToSSRCs),K=Promise.resolve(),K.then(function(){return e.dispatchEvent(new Event(`signalingstatechange`))})):K=Promise.reject(Error(`Cannot rollback `+(t?`local`:`remote`)+` description in `+e.signalingState)));return K||e._peerConnection[u](Ye(n))}function ze(e,t){var n=e._pendingLocalOffer;return e._peerConnection.setLocalDescription(n).then(function(){return e._pendingLocalOffer=null,e.setRemoteDescription(t)}).then(function(){e._signalingStateLatch.lower()})}function qe(e,t){return!!e.getTransceivers().find(function(e){var n=e.receiver,r=(n===void 0?{}:n).track;return(r===void 0?{}:r).kind===t})}function Ye(e){return e instanceof a&&e._description?e._description:new RTCSessionDescription(e)}function Ze(){return`maxRetransmitTime`in RTCDataChannel.prototype&&!(`maxPacketLifeTime`in RTCDataChannel.prototype)}function Qe(e){return e=Object.assign({},e),Ze()&&`maxPacketLifeTime`in e&&(e.maxRetransmitTime=e.maxPacketLifeTime),e}function et(e){return Object.defineProperty(e,"maxRetransmits",{value:e.maxRetransmits===65535?null:e.maxRetransmits}),Ze()&&Object.defineProperty(e,"maxPacketLifeTime",{value:e.maxRetransmitTime===65535?null:e.maxRetransmitTime}),e}function nt(e,t,n){return e===`unified`?te(t,n):ee(t,n)}t.exports=Oe})),require_firefox$1=__commonJSMin(((e,t)=>{t.exports=RTCSessionDescription})),require_firefox=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},a=require_eventtarget(),o=require_firefox$1(),c=require_sdp$1().updateUnifiedPlanTrackIdsToSSRCs,u=require_util$1(),K=u.delegateMethods,Y=u.interceptEvent,X=u.legacyPromise,ee=u.proxyProperties,te=function(e){n(t,e);function t(t){var n=e.call(this)||this;Y(n,`signalingstatechange`);var a=new RTCPeerConnection(t);Object.defineProperties(n,{_initiallyNegotiatedDtlsRole:{value:null,writable:!0},_isClosed:{value:!1,writable:!0},_peerConnection:{value:a},_rollingBack:{value:!1,writable:!0},_tracksToSSRCs:{value:new Map},peerIdentity:{enumerable:!0,value:Promise.resolve({idp:``,name:``})}});var o;return a.addEventListener(`signalingstatechange`,function(){var e=[...arguments];!n._rollingBack&&n.signalingState!==o&&(o=n.signalingState,n._isClosed?setTimeout(function(){return n.dispatchEvent.apply(n,i([],r(e)))}):n.dispatchEvent.apply(n,i([],r(e))))}),ee(RTCPeerConnection.prototype,n,a),n}return Object.defineProperty(t.prototype,"iceGatheringState",{get:function(){return this._isClosed?`complete`:this._peerConnection.iceGatheringState}
84,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localDescription",{get:function(){return de(this._peerConnection.localDescription,this._initiallyNegotiatedDtlsRole)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"signalingState",{get:function(){return this._isClosed?`closed`:this._peerConnection.signalingState},enumerable:!1,configurable:!0}),t.prototype.createAnswer=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var a=this._peerConnection.createAnswer().then(function(t){return ue(e,t),de(t,e._initiallyNegotiatedDtlsRole)});return typeof t[0]==`function`?X.apply(void 0,i([a],r(t))):a},t.prototype.createOffer=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=r(t,3),a=i[0],u=i[1],K=i[2]||a||{},Y;if(this.signalingState===`have-local-offer`||this.signalingState===`have-remote-offer`){var ee=this.signalingState===`have-local-offer`;Y=ce(this,ee,function(){return e.createOffer(K)})}else Y=this._peerConnection.createOffer(K);return Y=Y.then(function(t){return new o({type:t.type,sdp:c(e._tracksToSSRCs,t.sdp)})}),t.length>1?X(Y,a,u):Y},t.prototype.setLocalDescription=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var a=r(t),o=a[0],c=a.slice(1),u;return o&&o.type===`answer`&&this.signalingState===`have-local-offer`&&(u=Promise.reject(Error(`Cannot set local answer in state have-local-offer`))),u?t.length>1?X.apply(void 0,i([u],r(c))):u:(e=this._peerConnection).setLocalDescription.apply(e,i([],r(t)))},t.prototype.setRemoteDescription=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var a=r(t),o=a[0],c=a.slice(1),u;return o&&this.signalingState===`have-remote-offer`&&(o.type===`answer`?u=Promise.reject(Error(`Cannot set remote answer in state have-remote-offer`)):o.type===`offer`&&(u=ce(this,!1,function(){return e._peerConnection.setRemoteDescription(o)}))),u||=this._peerConnection.setRemoteDescription(o),u=u.then(function(){return ue(e,o,!0)}),t.length>1?X.apply(void 0,i([u],r(c))):u},t.prototype.close=function(){this.signalingState!==`closed`&&(this._isClosed=!0,this._peerConnection.close())},t}(a);K(RTCPeerConnection.prototype,te.prototype,`_peerConnection`);function ce(e,t,n){var r=t?`setLocalDescription`:`setRemoteDescription`;return e._rollingBack=!0,e._peerConnection[r](new o({type:`rollback`})).then(n).then(function(t){return e._rollingBack=!1,t},function(t){throw e._rollingBack=!1,t})}function ue(e,t,n){if(!(e._initiallyNegotiatedDtlsRole||t.type===`offer`)){var r=t.sdp.match(/a=setup:([a-z]+)/);if(r){var i=r[1];e._initiallyNegotiatedDtlsRole=n?{active:`passive`,passive:`active`}[i]:i}}}function de(e,t){return e&&e.type===`answer`&&t?new o({type:e.type,sdp:e.sdp.replace(/a=setup:[a-z]+/g,`a=setup:`+t)}):e}t.exports=te})),require_safari=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},a=require_eventtarget(),o=require_latch(),c=require_sdp$1(),u=c.getSdpFormat,K=c.updatePlanBTrackIdsToSSRCs,Y=c.updateUnifiedPlanTrackIdsToSSRCs,X=require_util$1(),ee=X.delegateMethods,te=X.interceptEvent,ce=X.proxyProperties,ue=u()===`unified`,de=ue?Y:K,fe=function(e){n(t,e);function t(t){var n=e.call(this)||this;te(n,`datachannel`),te(n,`iceconnectionstatechange`),te(n,`signalingstatechange`),te(n,`track`);var a=new RTCPeerConnection(t);return Object.defineProperties(n,{_appliedTracksToSSRCs:{value:new Map,writable:!0},_audioTransceiver:{value:null,writable:!0},_isClosed:{value:!1,writable:!0},_peerConnection:{value:a},_pendingLocalOffer:{value:null,writable:!0},_pendingRemoteOffer:{value:null,writable:!0},_rolledBackTracksToSSRCs:{value:new Map,writable:!0},_signalingStateLatch:{value:new o},_tracksToSSRCs:{value:new Map,writable:!0},_videoTransceiver:{value:null,writable:!0}}),a.addEventListener(`datachannel`,function(e){Oe(e.channel),n.dispatchEvent(e)}),a.addEventListener(`iceconnectionstatechange`,function(){var e=[...arguments];n._isClosed||n.dispatchEvent.apply(n,i([],r(e)))}),a.addEventListener(`signalingstatechange`,function(){var e=[...arguments];n._isClosed||(a.signalingState===`stable`&&(n._appliedTracksToSSRCs=new Map(n._tracksToSSRCs)),!n._pendingLocalOffer&&!n._pendingRemoteOffer&&n.dispatchEvent.apply(n,i([],r(e))))}),a.addEventListener(`track`,function(e){n._pendingRemoteOffer=null,n.dispatchEvent(e)}),ce(RTCPeerConnection.prototype,n,a),n}return Object.defineProperty(t.prototype,"localDescription",{get:function(){return this._pendingLocalOffer||this._peerConnection.localDescription}
84,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iceConnectionState",{get:function(){return this._isClosed?`closed`:this._peerConnection.iceConnectionState},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iceGatheringState",{get:function(){return this._isClosed?`complete`:this._peerConnection.iceGatheringState},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"remoteDescription",{get:function(){return this._pendingRemoteOffer||this._peerConnection.remoteDescription},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"signalingState",{get:function(){return this._isClosed?`closed`:this._pendingLocalOffer?`have-local-offer`:this._pendingRemoteOffer?`have-remote-offer`:this._peerConnection.signalingState},enumerable:!1,configurable:!0}),t.prototype.addIceCandidate=function(e){var t=this;return this.signalingState===`have-remote-offer`?this._signalingStateLatch.when(`low`).then(function(){return t._peerConnection.addIceCandidate(e)}):this._peerConnection.addIceCandidate(e)},t.prototype.createOffer=function(e){var t=this;if(e=Object.assign({},e),e.offerToReceiveVideo&&!this._audioTransceiver&&!(ue&&Te(this,`audio`))){delete e.offerToReceiveAudio;try{this._audioTransceiver=ue?this.addTransceiver(`audio`,{direction:`recvonly`}):this.addTransceiver(`audio`)}catch(e){return Promise.reject(e)}}if(e.offerToReceiveVideo&&!this._videoTransceiver&&!(ue&&Te(this,`video`))){delete e.offerToReceiveVideo;try{this._videoTransceiver=ue?this.addTransceiver(`video`,{direction:`recvonly`}):this.addTransceiver(`video`)}catch(e){return Promise.reject(e)}}return this._peerConnection.createOffer(e).then(function(e){return t._rolledBackTracksToSSRCs.clear(),new RTCSessionDescription({type:e.type,sdp:de(t._tracksToSSRCs,e.sdp)})})},t.prototype.createAnswer=function(e){var t=this;return this._pendingRemoteOffer?this._peerConnection.setRemoteDescription(this._pendingRemoteOffer).then(function(){return t._signalingStateLatch.lower(),t._peerConnection.createAnswer()}).then(function(e){return t._pendingRemoteOffer=null,t._rolledBackTracksToSSRCs.clear(),ue?new RTCSessionDescription({type:e.type,sdp:de(t._tracksToSSRCs,e.sdp)}):e},function(e){throw t._pendingRemoteOffer=null,e}):this._peerConnection.createAnswer(e).then(function(e){return t._rolledBackTracksToSSRCs.clear(),ue?new RTCSessionDescription({type:e.type,sdp:de(t._tracksToSSRCs,e.sdp)}):e})},t.prototype.createDataChannel=function(e,t){var n=this._peerConnection.createDataChannel(e,t);return Oe(n),n},t.prototype.removeTrack=function(e){e.replaceTrack(null),this._peerConnection.removeTrack(e)},t.prototype.setLocalDescription=function(e){return this._rolledBackTracksToSSRCs.size>0&&(this._tracksToSSRCs=new Map(this._rolledBackTracksToSSRCs),this._rolledBackTracksToSSRCs.clear()),me(this,!0,e)},t.prototype.setRemoteDescription=function(e){return this._rolledBackTracksToSSRCs.clear(),me(this,!1,e)},t.prototype.close=function(){var e=this;this._isClosed||(this._isClosed=!0,this._peerConnection.close(),setTimeout(function(){e.dispatchEvent(new Event(`iceconnectionstatechange`)),e.dispatchEvent(new Event(`signalingstatechange`))}))},t}(a);ee(RTCPeerConnection.prototype,fe.prototype,`_peerConnection`);function me(e,t,n){function r(n){t?e._pendingLocalOffer=n:e._pendingRemoteOffer=n}function i(){t?e._pendingLocalOffer=null:e._pendingRemoteOffer=null}var a=t?e._pendingLocalOffer:e._pendingRemoteOffer,o=t?e._pendingRemoteOffer:e._pendingLocalOffer,c=t?`have-local-offer`:`have-remote-offer`,u=t?`setLocalDescription`:`setRemoteDescription`;if(!t&&o&&n.type===`answer`)return ge(e,n);if(n.type===`offer`){if(e.signalingState!==c&&e.signalingState!==`stable`)return Promise.reject(Error(`Cannot set `+(t?`local`:`remote`)+`
85        offer in state `+e.signalingState));!a&&e._signalingStateLatch.state===`low`&&e._signalingStateLatch.raise();var K=e.signalingState;return r(n),e.signalingState===K?Promise.resolve():Promise.resolve().then(function(){return e.dispatchEvent(new Event(`signalingstatechange`))})}return n.type===`rollback`?e.signalingState===c?(i(),e._rolledBackTracksToSSRCs=new Map(e._tracksToSSRCs),e._tracksToSSRCs=new Map(e._appliedTracksToSSRCs),Promise.resolve().then(function(){return e.dispatchEvent(new Event(`signalingstatechange`))})):Promise.reject(Error(`Cannot rollback 
86        `+(t?`local`:`remote`)+` description in `+e.signalingState)):e._peerConnection[u](n)}function ge(e,t){var n=e._pendingLocalOffer;return e._peerConnection.setLocalDescription(n).then(function(){return e._pendingLocalOffer=null,e.setRemoteDescription(t)}).then(function(){return e._signalingStateLatch.lower()})}function Te(e,t){return!!e.getTransceivers().find(function(e){var n=e.receiver,r=(n===void 0?{}:n).track;return(r===void 0?{}:r).kind===t})}function Oe(e){return Object.defineProperties(e,{maxPacketLifeTime:{value:e.maxPacketLifeTime===65535?null:e.maxPacketLifeTime},maxRetransmits:{value:e.maxRetransmits===65535?null:e.maxRetransmits}})}t.exports=fe})),require_rtcpeerconnection=__commonJSMin(((e,t)=>{if(typeof RTCPeerConnection==`function`){var n=require_util$1().guessBrowser;switch(n()){case`chrome`:t.exports=require_chrome();break;case`firefox`:t.exports=require_firefox();break;case`safari`:t.exports=require_safari();break;default:t.exports=RTCPeerConnection}}
86else t.exports=function(){throw Error(`RTCPeerConnection is not supported`)}})),require_rtcsessiondescription=__commonJSMin(((e,t)=>{if(typeof RTCSessionDescription==`function`){var n=require_util$1().guessBrowser;switch(n()){case`chrome`:t.exports=require_chrome$1();break;case`firefox`:t.exports=require_firefox$1();break;default:t.exports=RTCSessionDescription}}else t.exports=function(){throw Error(`RTCSessionDescription is not supported`)}})),require_webrtc=__commonJSMin(((e,t)=>{var n={};Object.defineProperties(n,{getStats:{enumerable:!0,value:require_getstats()},getUserMedia:{enumerable:!0,value:require_getusermedia()},MediaStream:{enumerable:!0,value:require_mediastream()},MediaStreamTrack:{enumerable:!0,value:require_mediastreamtrack()},RTCIceCandidate:{enumerable:!0,value:require_rtcicecandidate()},RTCPeerConnection:{enumerable:!0,value:require_rtcpeerconnection()},RTCSessionDescription:{enumerable:!0,value:require_rtcsessiondescription()}}),t.exports=n})),require_inherits=__commonJSMin(((e,t)=>{t.exports=function(e,t){if(e&&t){if(e.super_=t,typeof Object.create==`function`)e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});else{var n=function(){function e(){}return e}();n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}}})),require_browserdetection=__commonJSMin(((e,t)=>{var n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a};function r(){return/Android/.test(navigator.userAgent)}function i(){return!!(navigator&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2)}function a(){return i()&&window.screen.width>=744&&(/Macintosh/i.test(navigator.userAgent)||/iPad/.test(navigator.userAgent)||/iPad/.test(navigator.platform))}function o(){return i()&&window.screen.width<=476&&(/Macintosh/i.test(navigator.userAgent)||/iPhone/.test(navigator.userAgent)||/iPhone/.test(navigator.platform))}function c(){return a()||o()}function u(){return/Mobi/.test(navigator.userAgent)}function K(e){return e===`chrome`&&/Edge/.test(navigator.userAgent)&&(typeof chrome>`u`||chrome.runtime===void 0)}function Y(e){return e===`chrome`?`brave`in navigator?`brave`:n((ee(navigator.userAgent).reduce(function(e,t){return e.replace(t,``)},navigator.userAgent).match(/[^\s]+/g)||[]).map(function(e){return e.split(`/`)[0].toLowerCase()})).slice(2).find(function(e){return![`chrome`,`mobile`,`safari`].includes(e)})||null:null}function X(e){return e===`safari`?`brave`in navigator?`brave`:[`edge`,`edg`].find(function(e){return navigator.userAgent.toLowerCase().includes(e)})||null:null}function ee(e){for(var t=[],n=[],r=0;r<e.length;r++)if(e[r]===`(`)t.push(r);else if(e[r]===`)`&&t.length>0){var i=t.pop();t.length===0&&n.push(e.substring(i,r+1))}return n}t.exports={isAndroid:r,isIOS:c,isIpad:a,isIphone:o,isMobile:u,isNonChromiumEdge:K,mobileWebKitBrowser:X,rebrandedChromeBrowser:Y}})),require_detectsilence=__commonJSMin(((e,t)=>{function n(e){return e=typeof e==`number`?e:0,new Promise(function(t){return setTimeout(t,e)})}function r(e,t,r){r=typeof r==`number`?r:250;var i=e.createMediaStreamSource(t),a=e.createAnalyser();a.fftSize=2048,i.connect(a);var o=new Uint8Array(a.fftSize),c=!1;setTimeout(function(){c=!0},r);function u(){return c?Promise.resolve(!0):(a.getByteTimeDomainData(o),o.some(function(e){return e!==128&&e!==0})?Promise.resolve(!1):n().then(u))}return u().then(function(e){return i.disconnect(),e},function(e){throw i.disconnect(),e})}t.exports=r})),require_audiocontext=__commonJSMin(((e,t)=>{var n=typeof AudioContext<`u`?AudioContext:typeof webkitAudioContext<`u`?webkitAudioContext:null;t.exports=new(function(){function e(t){t=Object.assign({AudioContext:n},t),Object.defineProperties(this,{_AudioContext:{value:t.AudioContext},_audioContext:{value:null,writable:!0},_holders:{value:new Set},AudioContextFactory:{enumerable:!0,value:e}})}return e.prototype.getOrCreate=function(e){if(!this._holders.has(e)&&(this._holders.add(e),this._AudioContext&&!this._audioContext))try{this._audioContext=new this._AudioContext}catch{}return this._audioContext},e.prototype.release=function(e){this._holders.has(e)&&(this._holders.delete(e),!this._holders.size&&this._audioContext&&(this._audioContext.close(),this._audioContext=null))},e}())})),require_detectsilentaudio=__commonJSMin(((e,t)=>{var n=require_detectsilence(),r=3,i=250;function a(e){var t=require_audiocontext(),a={},o=t.getOrCreate(a),c=r;function u(){return c--,n(o,e.srcObject,i).then(function(e){return e?c>0?u():!0:!1}).catch(function(){return!0})}return u().finally(function(){t.release(a)})}t.exports=a})),require_localmediarestartdeferreds=__commonJSMin(((e,t)=>{var n=require_util().defer;t.exports=new(function(){function e(){Object.defineProperties(this,{_audio:{value:n(),writable:!0},_video:{value:n(),writable:!0}}),this._audio.resolve(),this._video.resolve()}return e.prototype.resolveDeferred=function(e){e===`audio`?this._audio.resolve():this._video.resolve()},e.prototype.startDeferred=function(e){e===`audio`?this._audio=n():this._video=n()},e.prototype.whenResolved=function(e){return e===`audio`?this._audio.promise:this._video.promise},e}())})),require_eventemitter=__commonJSMin(((e,t)=>{var n=require_events().EventEmitter,r=require_util().hidePrivateAndCertainPublicPropertiesInClass;t.exports=r(n,[`domain`])})),require_track$1=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
86t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_eventemitter(),i=require_util(),a=i.buildLogLevels,o=i.valueToJSON,c=require_constants().DEFAULT_LOG_LEVEL,u=require_log(),K=0;t.exports=function(e){n(t,e);function t(t,n,r){var i=this;r=Object.assign({name:t,log:null,logLevel:c},r),i=e.call(this)||this;var o=String(r.name),Y=a(r.logLevel),X=r.log?r.log.createLog(`media`,i):new u(`media`,i,Y,r.loggerName);return Object.defineProperties(i,{_instanceId:{value:++K},_log:{value:X},kind:{enumerable:!0,value:n},name:{enumerable:!0,value:o}}),i}return t.prototype.toJSON=function(){return o(this)},t}(r)})),require_mediatrack=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_browserdetection().isIOS,i=require_webrtc().MediaStream,a=require_util(),o=a.waitForEvent,c=a.waitForSometime,u=require_localmediarestartdeferreds(),K=function(e){n(t,e);function t(t,n){var a=this;n=Object.assign({playPausedElementsIfNotBackgrounded:r()&&typeof document==`object`&&typeof document.addEventListener==`function`&&typeof document.visibilityState==`string`},n),a=e.call(this,t.id,t.kind,n)||this;var o=!1;return n=Object.assign({MediaStream:i},n),Object.defineProperties(a,{_attachments:{value:new Set},_dummyEl:{value:null,writable:!0},_elShims:{value:new WeakMap},_isStarted:{get:function(){return o},set:function(e){o=e}},_playPausedElementsIfNotBackgrounded:{value:n.playPausedElementsIfNotBackgrounded},_shouldShimAttachedElements:{value:n.workaroundWebKitBug212780||n.playPausedElementsIfNotBackgrounded},_unprocessedTrack:{value:null,writable:!0},_MediaStream:{value:n.MediaStream},isStarted:{enumerable:!0,get:function(){return o}},mediaStreamTrack:{enumerable:!0,get:function(){return this._unprocessedTrack||t.track}},processedTrack:{enumerable:!0,value:null,writable:!0}}),a._initialize(),a}return t.prototype._start=function(){this._log.debug(`Started`),this._isStarted=!0,this._dummyEl&&(this._dummyEl.oncanplay=null),this.emit(`started`,this)},t.prototype._initialize=function(){var e=this;this._log.debug(`Initializing`),this._dummyEl=this._createElement(),this.mediaStreamTrack.addEventListener(`ended`,function t(){e._end(),e.mediaStreamTrack.removeEventListener(`ended`,t)}),this._dummyEl&&(this._dummyEl.muted=!0,this._dummyEl.oncanplay=this._start.bind(this,this._dummyEl),this._attach(this._dummyEl,this.mediaStreamTrack),this._attachments.delete(this._dummyEl))},t.prototype._end=function(){this._log.debug(`Ended`),this._dummyEl&&=(this._dummyEl.remove(),this._dummyEl.srcObject=null,this._dummyEl.oncanplay=null,null)},t.prototype.attach=function(e){var t=this;if(typeof e==`string`?e=this._selectElement(e):e||=this._createElement(),this._log.debug(`Attempting to attach to element:`,e),e=this._attach(e),this._shouldShimAttachedElements&&!this._elShims.has(e)){var n=this._playPausedElementsIfNotBackgrounded?function(){return Y(e,t._log)}:null;this._elShims.set(e,X(e,n))}return e},t.prototype._attach=function(e,t){t===void 0&&(t=this.processedTrack||this.mediaStreamTrack);var n=e.srcObject;n instanceof this._MediaStream||(n=new this._MediaStream);var r=t.kind===`audio`?`getAudioTracks`:`getVideoTracks`;return n[r]().forEach(function(e){n.removeTrack(e)}),n.addTrack(t),e.srcObject=n,e.autoplay=!0,e.playsInline=!0,this._attachments.has(e)||this._attachments.add(e),e},t.prototype._selectElement=function(e){var t=document.querySelector(e);if(!t)throw Error(`Selector matched no element: `+e);return t},t.prototype._updateElementsMediaStreamTrack=function(){var e=this;this._log.debug(`Reattaching all elements to update mediaStreamTrack`),this._getAllAttachedElements().forEac
86h(function(t){return e._attach(t)})},t.prototype._createElement=function(){return typeof document<`u`?document.createElement(this.kind):null},t.prototype.detach=function(e){var t=typeof e==`string`?[this._selectElement(e)]:e?[e]:this._getAllAttachedElements();return this._log.debug(`Attempting to detach from elements:`,t),this._detachElements(t),e?t[0]:t},t.prototype._detachElements=function(e){return e.map(this._detachElement.bind(this))},t.prototype._detachElement=function(e){if(!this._attachments.has(e))return e;var t=e.srcObject;return t instanceof this._MediaStream&&t.removeTrack(this.processedTrack||this.mediaStreamTrack),this._attachments.delete(e),this._shouldShimAttachedElements&&this._elShims.has(e)&&(this._elShims.get(e).unShim(),this._elShims.delete(e)),e},t.prototype._getAllAttachedElements=function(){var e=[];return this._attachments.forEach(function(t){e.push(t)}),e},t}(require_track$1());function Y(e,t){var n=e.tagName.toLowerCase();t.warn(`Unintentionally paused:`,e),Promise.race([o(document,`visibilitychange`),c(1e3)]).then(function(){document.visibilityState===`visible`&&u.whenResolved(`audio`).then(function(){return t.info(`Playing unintentionally paused <`+n+`> element`),t.debug(`Element:`,e),e.play()}).then(function(){t.info(`Successfully played unintentionally paused <`+n+`> element`),t.debug(`Element:`,e)}).catch(function(r){t.warn(`Error while playing unintentionally paused <`+n+`> element:`,{error:r,el:e})})})}function X(e,t){t===void 0&&(t=null);var n=e.pause,r=e.play,i=!1;e.pause=function(){return i=!0,n.call(e)},e.play=function(){return i=!1,r.call(e)};var a=t?function(){i||t()}:null;return a&&e.addEventListener(`pause`,a),{pausedIntentionally:function(){return i},unShim:function(){e.pause=n,e.play=r,a&&e.removeEventListener(`pause`,a)}}}t.exports=K})),require_audiotrack=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){return e.call(this,t,n)||this}return t.prototype.attach=function(){return e.prototype.attach.apply(this,arguments)},t.prototype.detach=function(){return e.prototype.detach.apply(this,arguments)},t}(require_mediatrack())})),require_detectsilentvideo=__commonJSMin(((e,t)=>{var n=null,r=3,i=50,a=250,o=50;function c(e){try{var t=n.getContext(`2d`);t.drawImage(e,0,0,50,50);var r=t.getImageData(0,0,50,50).data.filter(function(e,t){return(t+1)%4});return Math.max.apply(Math,r)===0}catch(e){return console.log(`Error checking silence: `,e),!1}}function u(e){return n||=document.createElement(`canvas`),new Promise(function(t){var n=3;setTimeout(function r(){return n--,c(e)?n>0?setTimeout(r,250):t(!0):t(!1)},250)})}t.exports=u})),require_documentvisibilitymonitor=__commonJSMin(((e,t)=>{t.exports=new(function(){function e(e){var t=this;e===void 0&&(e=1),Object.defineProperties(this,{_listeners:{value:[]},_onVisibilityChange:{value:function(){t._emitVisible(document.visibilityState===`visible`)}}});for(var n=0;n<e;n++)this._listeners.push([])}return e.prototype.clear=function(){for(var e=this._listeners.length,t=0;t<e;t++)this._listeners[t]=[]},e.prototype._listenerCount=function(){return this._listeners.reduce(function(e,t){return e+t.length},0)},e.prototype._emitVisible=function(e){for(var t=this,n=Promise.resolve(),r=function(r){n=n.then(function(){return t._emitVisiblePhase(r,e)})},i=1;i<=this._listeners.length;i++)r(i);return n},e.prototype._emitVisiblePhase=function(e,t){var n=this._listeners[e-1];return Promise.all(n.map(function(e){var n=e(t);return n instanceof Promise?n:Promise.resolve(n)}))},e.prototype._start=function(){document.addEventListener(`visibilitychange`,this._onVisibilityChange)},e.prototype._stop=function(){document.removeEventListener(`visibilitychange`,this._onVisibilityChange)},e.prototype.onVisibilityChange=function(e,t){if(typeof e!=`number`||e<=0||e>this._listeners.length)throw Error(`invalid phase: `,e);return this._listeners[e-1].push(t),this._listenerCount()===1&&this._start(),this},e.prototype.offVisibilityChange=function(e,t){if(typeof e!=`number`||e<=0||e>this._listeners.length)throw Error(`invalid phase: `,e);var n=this._listeners[e-1],r=n.indexOf(t);return r!==-1&&(n.splice(r,1),this._listenerCount()===0&&this._stop()),this},e}())(2)})),require_workaround180748=__commonJSMin(((e,t)=>{var n=require_detectsilence();function r(e,t,r,i,a){i=typeof i==`number`?i:3;var o=0,c=require_audiocontext(),u={},K=c.getOrCreate(u);function Y(){return t(r).then(function(t){return(r.audio?n(K,t,a).catch(function(t){return e.warn(`Encountered an error while detecting silence`,t),!0}):Promise.resolve(!1)).then(function(n){return n?i<=0?(e.warn(`Got a silent audio MediaStreamTrack. Normally we would try to get a new one, but we've run out of retries; returning it anyway.`),t):(e.warn(`Got a silent audio MediaStreamTrack. Stopping all MediaStreamTracks and calling getUserMedia again. This is retry #`+ ++o+`.`),t.getTracks().forEac
86h(function(e){return e.stop()}),i--,Y()):(e.info(`Got a non-silent audio MediaStreamTrack; returning it.`),t)})})}return Y().then(function(e){return c.release(u),e},function(e){throw c.release(u),e})}t.exports=r})),require_queueingeventemitter=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};t.exports=function(e){n(t,e);function t(){var t=e.call(this)||this;return Object.defineProperties(t,{_queuedEvents:{value:new Map}}),t}return t.prototype.dequeue=function(e){var t=this,n=!0;if(!e)return this._queuedEvents.forEach(function(e,t){n=this.dequeue(t)&&n},this),n;var a=this._queuedEvents.get(e)||[];return this._queuedEvents.delete(e),a.reduce(function(n,a){return t.emit.apply(t,i([],r([e].concat(a))))&&n},n)},t.prototype.queue=function(){var e=[].slice.call(arguments);if(this.emit.apply(this,i([],r(e))))return!0;var t=e[0];return this._queuedEvents.has(t)||this._queuedEvents.set(t,[]),this._queuedEvents.get(t).push(e.slice(1)),!1},t}(require_events().EventEmitter)})),require_transceiver$2=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this)||this;return Object.defineProperties(r,{id:{enumerable:!0,value:t},kind:{enumerable:!0,value:n}}),r}return t.prototype.stop=function(){this.emit(`stopped`)},t}(require_queueingeventemitter())})),require_transceiver$1=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this,t,n.kind)||this;return Object.defineProperties(r,{_track:{value:n,writable:!0},enabled:{enumerable:!0,get:function(){return this._track.enabled}},readyState:{enumerable:!0,get:function(){return this._track.readyState}},track:{enumerable:!0,get:function(){return this._track}}}),r}return t.prototype.stop=function(){this.track.stop(),e.prototype.stop.call(this)},t}(require_transceiver$2())})),require_sender$1=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
86t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a};t.exports=function(e){n(t,e);function t(t){var n=e.call(this,t.id,t)||this;return Object.defineProperties(n,{_clones:{value:new Set},_eventsToReemitters:{value:new Map([[`mute`,function(){return n.queue(`muted`)}],[`unmute`,function(){return n.queue(`unmuted`)}]])},_senders:{value:new Set},_senderToPublisherHintCallbacks:{value:new Map},isPublishing:{enumerable:!0,get:function(){return!!this._clones.size}},muted:{enumerable:!0,get:function(){return this._track.muted}}}),n._reemitMediaStreamTrackEvents(),n}return t.prototype._reemitMediaStreamTrackEvents=function(e){e===void 0&&(e=this._track);var t=this,n=t._eventsToReemitters,r=t._track;n.forEach(function(t,n){return e.addEventListener(n,t)}),r!==e&&(n.forEach(function(e,t){return r.removeEventListener(t,e)}),r.muted!==e.muted&&n.get(e.muted?`mute`:`unmute`)())},t.prototype.clone=function(){var e=new t(this.track.clone());return this._clones.add(e),e},t.prototype.removeClone=function(e){this._clones.delete(e)},t.prototype.setMediaStreamTrack=function(e){var t=this,n=Array.from(this._clones),r=Array.from(this._senders);return Promise.all(n.map(function(t){return t.setMediaStreamTrack(e.clone())}).concat(r.map(function(n){return t._replaceTrack(n,e)}))).finally(function(){t._reemitMediaStreamTrackEvents(e),t._track=e})},t.prototype.addSender=function(e,t){return this._senders.add(e),t&&this._senderToPublisherHintCallbacks.set(e,t),this},t.prototype.removeSender=function(e){return this._senders.delete(e),this._senderToPublisherHintCallbacks.delete(e),this},t.prototype.setPublisherHint=function(e){var t=r(Array.from(this._senderToPublisherHintCallbacks.values()),1)[0];return t?t(e):Promise.resolve(`COULD_NOT_APPLY_HINT`)},t.prototype._replaceTrack=function(e,t){var n=this;return e.replaceTrack(t).then(function(e){return n.setPublisherHint(null).catch(function(){}),n.emit(`replaced`),e})},t}(require_transceiver$1())})),require_localmediatrack=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_webrtc().getUserMedia,i=require_browserdetection().isIOS,a=require_util(),o=a.capitalize,c=a.defer,u=a.waitForSometime,K=a.waitForEvent,Y=require_constants().typeErrors.ILLEGAL_INVOKE,X=require_detectsilentaudio(),ee=require_detectsilentvideo(),te=require_documentvisibilitymonitor(),ce=require_localmediarestartdeferreds(),ue=require_workaround180748(),de=require_sender$1();function fe(e){return function(e){n(t,e);function t(t,n){var a=this,o=i()&&typeof document==`object`&&typeof document.addEventListener==`function`&&typeof document.visibilityState==`string`;n=Object.assign({getUserMedia:r,isCreatedByCreateLocalTracks:!1,workaroundWebKitBug1208516:o,gUMSilentTrackWorkaround:ue},n);var c=new de(t),u=c.kind;return a=e.call(this,c,n)||this,Object.defineProperties(a,{_constraints:{value:typeof n[u]==`object`?n[u]:{},writable:!0},_getUserMedia:{value:n.getUserMedia},_gUMSilentTrackWorkaround:{value:n.gUMSilentTrackWorkaround},_eventsToReemitters:{value:new Map([[`muted`,function(){return a.emit(`muted`,a)}],[`unmuted`,function(){return a.emit(`unmuted`,a)}]])},_workaroundWebKitBug1208516:{value:n.workaroundWebKitBug1208516},_workaroundWebKitBug1208516Cleanup:{value:null,writable:!0},_didCallEnd:{value:!1,writable:!0},_isCreatedByCreateLocalTracks:{value:n.isCreatedByCreateLocalTracks},_noiseCancellation:{value:n.noiseCancellation||null},_trackSender:{value:c},id:{enumerable:!0,value:c.id},isEnabled:{enumerable:!0,get:function(){return c.enabled}},isMuted:{enumerable:!0,get:function(){return c.muted}},isStopped:{enumerable:!0,get:function(){return c.readyState===`ended`}}}),a._workaroundWebKitBug1208516&&(a._workaroundWebKitBug1208516Cleanup=me(a)),a._reemitTrackSenderEvents(),a}return t.prototype._end=function(){var t=this;this._didCallEnd||(e.prototype._end.call(this),this._didCallEnd=!0,this._eventsToReemitters.forEac
86h(function(e,n){return t._trackSender.removeListener(n,e)}),this.emit(`stopped`,this))},t.prototype._initialize=function(){this._didCallEnd&&=!1,this._eventsToReemitters&&this._reemitTrackSenderEvents(),e.prototype._initialize.call(this)},t.prototype._reacquireTrack=function(e){var t,n=this,r=n._getUserMedia,i=n._gUMSilentTrackWorkaround,a=n._log,o=n.mediaStreamTrack.kind;a.info(`Re-acquiring the MediaStreamTrack`),a.debug(`Constraints:`,e);var c=Object.assign({audio:!1,video:!1},(t={},t[o]=e,t));return(this._workaroundWebKitBug1208516Cleanup?i(a,r,c):r(c)).then(function(e){return e.getTracks()[0]})},t.prototype._reemitTrackSenderEvents=function(){var e=this;this._eventsToReemitters.forEach(function(t,n){return e._trackSender.on(n,t)}),this._trackSender.dequeue(`muted`),this._trackSender.dequeue(`unmuted`)},t.prototype._restart=function(e){var t=this,n=this._log;return e||=this._constraints,this._stop(),this._reacquireTrack(e).catch(function(t){throw n.error(`Failed to re-acquire the MediaStreamTrack:`,{error:t,constraints:e}),t}).then(function(r){return n.info(`Re-acquired the MediaStreamTrack`),n.debug(`MediaStreamTrack:`,r),t._constraints=Object.assign({},e),t._setMediaStreamTrack(r)})},t.prototype._setMediaStreamTrack=function(e){var t=this;return e.enabled=this.mediaStreamTrack.enabled,this._stop(),(this._unprocessedTrack?Promise.resolve().then(function(){t._unprocessedTrack=e}):this._trackSender.setMediaStreamTrack(e).catch(function(n){t._log.warn(`setMediaStreamTrack failed:`,{error:n,mediaStreamTrack:e})})).then(function(){t._initialize(),t._getAllAttachedElements().forEach(function(e){return t._attach(e)})})},t.prototype._stop=function(){return this.mediaStreamTrack.stop(),this._end(),this},t.prototype.enable=function(e){return e=typeof e!=`boolean`||e,e!==this.mediaStreamTrack.enabled&&(this._log.info((e?`En`:`Dis`)+`abling`),this.mediaStreamTrack.enabled=e,this.emit(e?`enabled`:`disabled`,this)),this},t.prototype.disable=function(){return this.enable(!1)},t.prototype.restart=function(e){var t=this,n=this.kind;if(!this._isCreatedByCreateLocalTracks)return Promise.reject(Y(`restart`,`can only be called on a`+(` Local`+o(n)+`Track that is created using createLocalTracks`)+(` or createLocal`+o(n)+`Track.`)));this._workaroundWebKitBug1208516Cleanup&&=(this._workaroundWebKitBug1208516Cleanup(),null);var r=this._restart(e);return this._workaroundWebKitBug1208516&&(r=r.finally(function(){t._workaroundWebKitBug1208516Cleanup=me(t)})),r},t.prototype.stop=function(){return this._log.info(`Stopping`),this._workaroundWebKitBug1208516Cleanup&&=(this._workaroundWebKitBug1208516Cleanup(),null),this._stop()},t}(e)}function me(e){var t=e._log,n=e.kind,r=e._noiseCancellation,i={audio:X,video:ee}[n],a=function(){return r?r.sourceTrack:e.mediaStreamTrack},o=e._dummyEl,Y=a(),ue=null;function de(){return o.play().then(function(){return i(o)}).then(function(e){return e?t.warn(`Silence detected`):t.info(`Non-silence detected`),e}).catch(function(e){t.warn(`Failed to detect silence:`,e)}).finally(function(){e.processedTrack||o.pause()})}function fe(){var t=e._workaroundWebKitBug1208516Cleanup,n=e.isStopped&&!!t,r=a().muted;return Promise.resolve().then(function(){return document.visibilityState===`visible`&&!ue&&(r||n||de())})}function me(){return Promise.race([K(Y,`unmute`),u(50)]).then(function(){return fe()}).then(function(r){return r&&!ue&&(ue=c(),e._restart().finally(function(){o=e._dummyEl,Oe(),Y=a(),Te(),ue.resolve(),ue=null}).catch(function(e){t.error(`failed to restart track: `,e)})),(ue&&ue.promise||Promise.resolve()).finally(function(){return ce.resolveDeferred(n)})}).catch(function(e){t.error(`error in maybeRestart: `+e.message)})}function ge(){var t=e._log,n=e.kind;t.info(`Muted`),t.debug(`LocalMediaTrack:`,e),ce.startDeferred(n)}function Te(){Y.addEventListener(`ended`,me),Y.addEventListener(`mute`,ge),Y.addEventListener(`unmute`,me)}function Oe(){Y.removeEventListener(`ended`,me),Y.removeEventListener(`mute`,ge),Y.removeEventListener(`unmute`,me)}var Ae=function(e){return e?me():!1};return te.onVisibilityChange(1,Ae),Te(),function(){te.offVisibilityChange(1,Ae),Oe()}}t.exports=fe})),require_localaudiotrack$1=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
86t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_browserdetection().isIOS,i=require_detectsilentaudio(),a=require_util$1().isIOSChrome,o=require_audiotrack();t.exports=function(e){n(t,e);function t(t,n){var i=this,a=n?.noiseCancellation||null;i=e.call(this,t,n)||this;var o=i._log,c=t.label,u=c===void 0?``:c,K=t.getSettings(),Y=K.deviceId,X=Y===void 0?``:Y,ee=K.groupId;return Object.defineProperties(i,{_currentDefaultDeviceInfo:{value:{deviceId:X,groupId:ee===void 0?``:ee,label:u},writable:!0},_defaultDeviceCaptureMode:{value:!r()&&i._isCreatedByCreateLocalTracks&&typeof navigator==`object`&&typeof navigator.mediaDevices==`object`&&typeof navigator.mediaDevices.addEventListener==`function`&&typeof navigator.mediaDevices.enumerateDevices==`function`?n?.defaultDeviceCaptureMode||`auto`:`manual`},_onDeviceChange:{value:function(){navigator.mediaDevices.enumerateDevices().then(function(e){var t=e.find(function(e){var t=e.deviceId;return e.kind===`audioinput`&&t!=="default"});t&&[`deviceId`,`groupId`].some(function(e){return t[e]!==i._currentDefaultDeviceInfo[e]})&&(o.info(`Default device changed, restarting the LocalAudioTrack`),o.debug(`Old default device: "`+i._currentDefaultDeviceInfo.deviceId+`" => "`+i._currentDefaultDeviceInfo.label+`"`),o.debug(`New default device: "`+t.deviceId+`" => "`+t.label+`"`),i._currentDefaultDeviceInfo=t,i._restartDefaultDevice().catch(function(e){return o.warn(`Failed to restart: `+e.message)}))},function(e){o.warn(`Failed to run enumerateDevices(): `+e.message)})}},_restartOnDefaultDeviceChangeCleanup:{value:null,writable:!0},noiseCancellation:{enumerable:!0,value:a,writable:!1}}),o.debug(`defaultDeviceCaptureMode:`,i._defaultDeviceCaptureMode),i._maybeRestartOnDefaultDeviceChange(),i}return t.prototype.toString=function(){return`[LocalAudioTrack #`+this._instanceId+`: `+this.id+`]`},t.prototype.attach=function(t){return t=e.prototype.attach.call(this,t),t.muted=!0,t},t.prototype._end=function(){return e.prototype._end.apply(this,arguments)},t.prototype._maybeRestartOnDefaultDeviceChange=function(){var e=this,t=this,n=t._constraints,r=t._defaultDeviceCaptureMode,i=t._log,a=(this.noiseCancellation?this.noiseCancellation.sourceTrack:this.mediaStreamTrack).getSettings().deviceId,o=function(e){return e!==a||e==="default"},c=function e(t){return t===void 0&&(t={}),typeof t==`string`?o(t):Array.isArray(t)?t.every(o):t.exact?e(t.exact):!t.ideal||e(t.ideal)}(n.deviceId);r===`auto`&&c?this._restartOnDefaultDeviceChangeCleanup||=(i.info(`LocalAudioTrack will be restarted if the default device changes`),navigator.mediaDevices.addEventListener(`devicechange`,this._onDeviceChange),function(){i.info(`Cleaning up the listener to restart the LocalAudioTrack if the default device changes`),navigator.mediaDevices.removeEventListener(`devicechange`,e._onDeviceChange),e._restartOnDefaultDeviceChangeCleanup=null}):(i.info(`LocalAudioTrack will NOT be restarted if the default device changes`),this._restartOnDefaultDeviceChangeCleanup&&this._restartOnDefaultDeviceChangeCleanup())},t.prototype._reacquireTrack=function(t){var n=this;return this._log.debug(`_reacquireTrack: `,t),this.noiseCancellation?this.noiseCancellation.reacquireTrack(function(){return e.prototype._reacquireTrack.call(n,t)}):e.prototype._reacquireTrack.call(this,t)},t.prototype._restartDefaultDevice=function(){var e=this,t=Object.assign({},this._constraints),n=Object.assign({},t,{deviceId:this._currentDefaultDeviceInfo.deviceId});return this.restart(n).then(function(){e._constraints=t,e._maybeRestartOnDefaultDeviceChange()})},t.prototype._setMediaStreamTrack=function(t){var n=this,r=this,o=r._log,c=r.noiseCancellation,u=e.prototype._setMediaStreamTrack.call(this,t);return a()&&c&&(o.debug(`iOS Chrome detected, checking if the restarted Krisp audio is silent`),u=u.then(function(){return i(n._dummyEl)}).then(function(t){return o.debug(`Krisp audio is `+(t?`silent, using source audio`:`not silent`)),t&&c.disablePermanently().then(function(){return e.prototype._setMediaStreamTrack.call(n,c.sourceTrack)})})),u},t.prototype.disable=function(){return e.prototype.disable.apply(this,arguments)},t.prototype.enable=function(){return e.prototype.enable.apply(this,arguments)},t.prototype.restart=function(){return e.prototype.restart.apply(this,arguments)},t.prototype.stop=function(){return this.noiseCancellation&&this.noiseCancellation.stop(),this._restartOnDefaultDeviceChangeCleanup&&this._restartOnDefaultDeviceChangeCleanup(),e.prototype.stop.apply(this,arguments)},t}
86(require_localmediatrack()(o))})),require_localaudiotrack=__commonJSMin(((e,t)=>{var n=require_inherits(),r=require_localaudiotrack$1();function i(e,t){var n=new r(e,t);return Object.setPrototypeOf(n,i.prototype),n}n(i,r),t.exports=i})),require_videoprocessoreventobserver=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_events().EventEmitter,i=require_constants().DEFAULT_VIDEO_PROCESSOR_STATS_INTERVAL_MS;t.exports=function(e){n(t,e);function t(t){var n=e.call(this)||this;return Object.defineProperties(n,{_lastStatsSaveTime:{value:null,writable:!0},_lastStatsPublishTime:{value:null,writable:!0},_log:{value:t},_processorInfo:{value:null,writable:!0},_stats:{value:null,writable:!0}}),n.on(`add`,function(e){n._lastStatsSaveTime=Date.now(),n._lastStatsPublishTime=Date.now(),n._processorInfo=e,n._stats=[],n._reemitEvent(`add`,n._getEventData())}),n.on(`remove`,function(){var e=n._getEventData();n._lastStatsSaveTime=null,n._lastStatsPublishTime=null,n._processorInfo=null,n._stats=null,n._reemitEvent(`remove`,e)}),n.on(`start`,function(){n._reemitEvent(`start`,n._getEventData())}),n.on(`stop`,function(e){n._reemitEvent(`stop`,Object.assign({message:e},n._getEventData()))}),n.on(`stats`,function(){return n._maybeEmitStats()}),n}return t.prototype._getEventData=function(){if(!this._processorInfo)return{};var e=this._processorInfo,t=e.processor,n={captureHeight:e.captureHeight,captureWidth:e.captureWidth,inputFrameRate:e.inputFrameRate,isRemoteVideoTrack:e.isRemoteVideoTrack,inputFrameBufferType:e.inputFrameBufferType,outputFrameBufferContextType:e.outputFrameBufferContextType};return n.name=t._name||`VideoProcessor`,[`assetsPath`,`blurFilterRadius`,`debounce`,`fitType`,`isSimdEnabled`,`maskBlurRadius`,`pipeline`,`version`].forEach(function(e){var r=t[`_`+e];r!==void 0&&(n[e]=r)}),Object.keys(n).forEach(function(e){var t=n[e];typeof t==`boolean`&&(n[e]=t?`true`:`false`)}),n},t.prototype._maybeEmitStats=function(){if(this._stats&&this._processorInfo){var e=this._processorInfo.processor._benchmark;if(e){var t=Date.now();if(!(t-this._lastStatsSaveTime<1e3)){var n={outputFrameRate:e.getRate(`totalProcessingDelay`)};if([`captureFrameDelay`,`imageCompositionDelay`,`inputImageResizeDelay`,`processFrameDelay`,`segmentationDelay`].forEach(function(t){n[t]=e.getAverageDelay(t)}),this._lastStatsSaveTime=t,this._stats.push(n),!(t-this._lastStatsPublishTime<i)){this._lastStatsPublishTime=t;var r=this._stats.splice(0).reduce(function(e,t,r){return Object.keys(n).forEach(function(n){e[n]||(e[n]=0),e[n]=(e[n]*r+t[n])/(r+1)}),e},{});Object.keys(r).forEach(function(e){r[e]=parseFloat(r[e].toFixed(2))}),this._reemitEvent(`stats`,Object.assign({},r,this._getEventData()))}}}}},t.prototype._reemitEvent=function(e,t){this._log.debug(`VideoProcessor:`+e,t),this.emit(`event`,{name:e,data:t})},t}(r)})),require_videotrack=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_mediatrack(),i=require_videoprocessoreventobserver(),a=require_constants().DEFAULT_FRAME_RATE,o=function(e){n(t,e);function t(t,n){var r=e.call(this,t,n)||this;return Object.defineProperties(r,{_captureTimeoutId:{value:null,writable:!0},_isCapturing:{value:!1,writable:!0},_inputFrame:{value:null,writable:!0},_outputFrame:{value:null,writable:!0},_processorEventObserver:{value:null,writable:!0},_processorOptions:{value:{},writable:!0},_unmuteHandler:{value:null,writable:!0},dimensions:{enumerable:!0,value:{width:null,height:null}},processor:{enumerable:!0,value:null,writable:!0}}),r._processorEventObserver=new(n.VideoProcessorEventObserver||i)(r._log),r}return t.prototype._checkIfCanCaptureFrames=function(e){e===void 0&&(e=!1);var t=!0,n=``,r=this.mediaStreamTrack,i=r.enabled,a=r.readyState;
86return i||(t=!1,n=`MediaStreamTrack is disabled`),a===`ended`&&(t=!1,n=`MediaStreamTrack is ended`),this.processor||(t=!1,n=`VideoProcessor not detected.`),!this._attachments.size&&!e&&(t=!1,n=`VideoTrack is not publishing and there is no attached element.`),n&&this._log.debug(n),{canCaptureFrames:t,message:n}},t.prototype._captureFrames=function(){var e=this;if(this._isCapturing){this._log.debug(`Ignoring captureFrames call. Capture is already in progress`);return}if(!this._checkIfCanCaptureFrames().canCaptureFrames){this._isCapturing=!1,this._log.debug(`Cannot capture frames. Ignoring captureFrames call.`);return}this._isCapturing=!0,this._processorEventObserver.emit(`start`),this._log.debug(`Start capturing frames`);var t=Date.now(),n;this._dummyEl.play().then(function(){var r=function(t){clearTimeout(e._captureTimeoutId);var r=e.mediaStreamTrack.getSettings().frameRate,i=Math.floor(1e3/(r===void 0?a:r))-n;(i<0||typeof n!=`number`)&&(i=0),e._captureTimeoutId=setTimeout(t,i)},i=function(){var a=e._checkIfCanCaptureFrames();if(!a.canCaptureFrames){e._isCapturing=!1,e._processorEventObserver.emit(`stop`,a.message),e._log.debug(`Cannot capture frames. Stopping capturing frames.`);return}t=Date.now();var o=e.mediaStreamTrack.getSettings(),c=o.width,u=c===void 0?0:c,K=o.height,Y=K===void 0?0:K;e._outputFrame&&e._outputFrame.width!==u&&(e._outputFrame.width=u,e._outputFrame.height=Y),e._inputFrame&&(e._inputFrame.width!==u&&(e._inputFrame.width=u,e._inputFrame.height=Y),e._inputFrame.getContext(`2d`).drawImage(e._dummyEl,0,0,u,Y));var X=null;try{var ee=e._processorOptions.inputFrameBufferType===`video`?e._dummyEl:e._inputFrame;X=e.processor.processFrame(ee,e._outputFrame)}catch(t){e._log.debug(`Exception detected after calling processFrame.`,t)}(X instanceof Promise?X:Promise.resolve(X)).then(function(){e._outputFrame&&(typeof e.processedTrack.requestFrame==`function`&&e.processedTrack.requestFrame(),e._processorEventObserver.emit(`stats`))}).finally(function(){n=Date.now()-t,r(i)})};r(i)}).catch(function(t){return e._log.error(`Video element cannot be played`,{error:t,track:e})})},t.prototype._initialize=function(){var n=this;e.prototype._initialize.call(this),this._dummyEl&&(this._dummyEl.onloadedmetadata=function(){c(n,n._dummyEl)&&(n.dimensions.width=n._dummyEl.videoWidth,n.dimensions.height=n._dummyEl.videoHeight)},this._dummyEl.onresize=function(){c(n,n._dummyEl)&&(n.dimensions.width=n._dummyEl.videoWidth,n.dimensions.height=n._dummyEl.videoHeight,n.isStarted&&(n._log.debug(`Dimensions changed:`,n.dimensions),n.emit(t.DIMENSIONS_CHANGED,n)))})},t.prototype._restartProcessor=function(){var e=this.processor;if(e){var t=Object.assign({},this._processorOptions);this.removeProcessor(e),this.addProcessor(e,t)}},t.prototype._start=function(n){return this.dimensions.width=n.videoWidth,this.dimensions.height=n.videoHeight,this._log.debug(`Dimensions:`,this.dimensions),this.emit(t.DIMENSIONS_CHANGED,this),e.prototype._start.call(this,n)},t.prototype.addProcessor=function(e,t){var n=this;if(!e||typeof e.processFrame!=`function`)throw Error(`Received an invalid VideoProcessor from addProcessor.`);if(this.processor)throw Error(`A VideoProcessor has already been added.`);if(!this._dummyEl)throw Error(`VideoTrack has not been initialized.`);this._log.debug(`Adding VideoProcessor to the VideoTrack`,e),this._unmuteHandler||(this._unmuteHandler=function(){n._log.debug(`mediaStreamTrack unmuted`),n.processedTrack.muted&&(n._log.debug(`mediaStreamTrack is unmuted but processedTrack is muted. Restarting processor.`),n._restartProcessor())},this.mediaStreamTrack.addEventListener(`unmute`,this._unmuteHandler)),this._processorOptions=t||{};var r=this._processorOptions,i=r.inputFrameBufferType,o=r.outputFrameBufferContextType;if(typeof OffscreenCanvas>`u`&&i===`offscreencanvas`)throw Error(`OffscreenCanvas is not supported by this browser.`);if(i&&i!==`video`&&i!==`canvas`&&i!==`offscreencanvas`)throw Error(`Invalid inputFrameBufferType of `+i);i||=typeof OffscreenCanvas>`u`?`canvas`:`offscreencanvas`;var c=this.mediaStreamTrack.getSettings(),u=c.width,K=u===void 0?0:u,Y=c.height,X=Y===void 0?0:Y,ee=c.frameRate,te=ee===void 0?a:ee;if(i===`offscreencanvas`&&(this._inputFrame=new OffscreenCanvas(K,X)),i===`canvas`&&(this._inputFrame=document.createElement(`canvas`)),this._inputFrame&&(this._inputFrame.width=K,this._inputFrame.height=X),this._outputFrame=document.createElement(`canvas`),this._outputFrame.width=K,this._outputFrame.height=X,o||=`2d`,!this._outputFrame.getContext(o))throw Error(`Cannot get outputFrameBufferContextType: `+o+`.`);var ce=typeof CanvasCaptureMediaStreamTrack<`u`&&CanvasCaptureMediaStreamTrack.prototype&&typeof CanvasCaptureMediaStreamTrack.prototype.requestFrame==`function`?0:void 0;return this.processedTrack=this._outputFrame.captureStream(ce).getTracks()[0],this.processedTrack.enabled=this.mediaStreamTrack.enabled,this.processor=e,this._processorEventObserver.emit(`add`,{processor:e,captureHeight:X,captureWidth:K,inputFrameRate:te,isRemoteVideoTrack:this.toString().includes(`RemoteVideoTrack`),inputFrameBufferType:i,outputFrameBufferContextType:o}),this._updateElementsMediaStreamTrack(),this._captureFrames(),this},t.prototype.attach=function(){var t=e.prototype.attach.apply(this,arguments);return this.processor&&this._captureFrames(),t},t.prototype.detach=function(){return e.prototype.detach.apply(this,arguments)},t.prototype.removeProcessor=function(e){if(!e)throw Error(`Received an invali
86d VideoProcessor from removeProcessor.`);if(!this.processor)throw Error(`No existing VideoProcessor detected.`);if(e!==this.processor)throw Error(`The provided VideoProcessor is different than the existing one.`);return this._processorEventObserver.emit(`remove`),this._log.debug(`Removing VideoProcessor from the VideoTrack`,e),clearTimeout(this._captureTimeoutId),this.mediaStreamTrack.removeEventListener(`unmute`,this._unmuteHandler),this._processorOptions={},this._unmuteHandler=null,this._isCapturing=!1,this.processor=null,this.processedTrack=null,this._inputFrame=null,this._outputFrame=null,this._updateElementsMediaStreamTrack(),this},t}(r);o.DIMENSIONS_CHANGED=`dimensionsChanged`;function c(e,t){return e.dimensions.width!==t.videoWidth||e.dimensions.height!==t.videoHeight}t.exports=o})),require_localvideotrack$1=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_browserdetection().isIOS,i=require_detectsilentvideo(),a=function(e){n(t,e);function t(t,n){var i=this;return n=Object.assign({workaroundSilentLocalVideo:r()&&typeof document<`u`&&typeof document.createElement==`function`},n),i=e.call(this,t,n)||this,Object.defineProperties(i,{_workaroundSilentLocalVideo:{value:n.workaroundSilentLocalVideo?o:null},_workaroundSilentLocalVideoCleanup:{value:null,writable:!0}}),i._workaroundSilentLocalVideo&&(i._workaroundSilentLocalVideoCleanup=i._workaroundSilentLocalVideo(i,document)),i}return t.prototype.toString=function(){return`[LocalVideoTrack #`+this._instanceId+`: `+this.id+`]`},t.prototype._checkIfCanCaptureFrames=function(){return e.prototype._checkIfCanCaptureFrames.call(this,this._trackSender.isPublishing)},t.prototype._end=function(){return e.prototype._end.apply(this,arguments)},t.prototype._setSenderMediaStreamTrack=function(e){var t=this,n=this.mediaStreamTrack,r=e?this.processedTrack:n;return this._trackSender.setMediaStreamTrack(r).catch(function(e){return t._log.warn(`setMediaStreamTrack failed on LocalVideoTrack RTCRtpSender`,{error:e,mediaStreamTrack:r})}).then(function(){t._unprocessedTrack=e?n:null})},t.prototype.addProcessor=function(){this._log.debug(`Adding VideoProcessor to the LocalVideoTrack`);var t=e.prototype.addProcessor.apply(this,arguments);return this.processedTrack?(this._log.debug(`Updating LocalVideoTrack's MediaStreamTrack with the processed MediaStreamTrack`,this.processedTrack),this._setSenderMediaStreamTrack(!0),t):this._log.warn(`Unable to add a VideoProcessor to the LocalVideoTrack`)},t.prototype.removeProcessor=function(){var t=this;this._log.debug(`Removing VideoProcessor from the LocalVideoTrack`);var n=e.prototype.removeProcessor.apply(this,arguments);return this._log.debug(`Updating LocalVideoTrack's MediaStreamTrack with the original MediaStreamTrack`),this._setSenderMediaStreamTrack().then(function(){return t._updateElementsMediaStreamTrack()}),n},t.prototype.disable=function(){var t=e.prototype.disable.apply(this,arguments);return this.processedTrack&&(this.processedTrack.enabled=!1),t},t.prototype.enable=function(t){t===void 0&&(t=!0);var n=e.prototype.enable.apply(this,arguments);return this.processedTrack&&(this.processedTrack.enabled=t,t&&(this._captureFrames(),this._log.debug(`Updating LocalVideoTrack's MediaStreamTrack with the processed MediaStreamTrack`,this.processedTrack),this._setSenderMediaStreamTrack(!0))),n},t.prototype.restart=function(){var t=this;this._workaroundSilentLocalVideoCleanup&&=(this._workaroundSilentLocalVideoCleanup(),null);var n=e.prototype.restart.apply(this,arguments);return this.processor&&n.then(function(){t._restartProcessor()}),this._workaroundSilentLocalVideo&&n.finally(function(){t._workaroundSilentLocalVideoCleanup=t._workaroundSilentLocalVideo(t,document)}),n},t.prototype.stop=function(){return this._workaroundSilentLocalVideoCleanup&&=(this._workaroundSilentLocalVideoCleanup(),null),e.prototype.stop.apply(this,arguments)},t}(require_localmediatrack()(require_videotrack()));function o(e,t){var n=e._log,r=e._dummyEl,a=e.mediaStreamTrack;function o(){e.isEnabled&&(n.info(`Unmuted, checking silence`),r.play().then(function(){return i(r,t)}).then(function(t){if(!t){n.info(`Non-silent frames detected, so no need to restart`);return}return n.warn(`Silence detected, restarting`),e._stop(),e._restart()}).catch(function(e){n.warn(`Failed to detect silence and restart:`,e)}).finally(function(){r=e._dummyEl,r&&!r.paused&&!e.processedTrack&&r.pause(),a.removeEventListener(`unmute`,o),a=e.mediaStreamTrack,a.addEventListener(`unmute`,o)}))}return a.addEventListener(`unmute`,o),function(){a.removeEventListener(`unmute`,o)}}t.exports=a})),require_localvideotrack=__commonJSMin(((e,t)=>{var n=require_inherits(),r=require_localvideotrack$1();function i(e,t){var n=new r(e,t);return Object.setPrototypeOf(n,i.prototype),n}n(i,r),t.exports=i})),require_transceiver=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
86t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n,r,i){var a=e.call(this,t,`data`)||this;return Object.defineProperties(a,{maxPacketLifeTime:{enumerable:!0,value:n},maxRetransmits:{enumerable:!0,value:r},ordered:{enumerable:!0,value:i}}),a}return t}(require_transceiver$2())})),require_sender=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_transceiver(),i=require_util().makeUUID;t.exports=function(e){n(t,e);function t(t,n,r){var a=e.call(this,i(),t,n,r)||this;return Object.defineProperties(a,{_clones:{value:new Set},_dataChannels:{value:new Set}}),a}return t.prototype._addClone=function(e){this._clones.add(e)},t.prototype.removeClone=function(e){this._clones.delete(e)},t.prototype.addDataChannel=function(e){return this._dataChannels.add(e),this},t.prototype.clone=function(){var e=this,n=new t(this.maxPacketLifeTime,this.maxRetransmits,this.ordered);return this._addClone(n),n.once(`stopped`,function(){return e.removeClone(n)}),n},t.prototype.removeDataChannel=function(e){return this._dataChannels.delete(e),this},t.prototype.send=function(e){return this._dataChannels.forEach(function(t){try{t.send(e)}catch{}}),this._clones.forEach(function(t){try{t.send(e)}catch{}}),this},t.prototype.stop=function(){this._dataChannels.forEach(function(e){return e.close()}),this._clones.forEach(function(e){return e.stop()}),e.prototype.stop.call(this)},t}(r)})),require_localdatatrack$1=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_track$1(),i=require_sender();t.exports=function(e){n(t,e);function t(t){var n=this;t=Object.assign({DataTrackSender:i,maxPacketLifeTime:null,maxRetransmits:null,ordered:!0}
86,t);var r=t.DataTrackSender,a=new r(t.maxPacketLifeTime,t.maxRetransmits,t.ordered);return n=e.call(this,a.id,`data`,t)||this,Object.defineProperties(n,{_trackSender:{value:a},id:{enumerable:!0,value:a.id},maxPacketLifeTime:{enumerable:!0,value:t.maxPacketLifeTime},maxRetransmits:{enumerable:!0,value:t.maxRetransmits},ordered:{enumerable:!0,value:t.ordered},reliable:{enumerable:!0,value:t.maxPacketLifeTime===null&&t.maxRetransmits===null}}),n}return t.prototype.send=function(e){this._trackSender.send(e)},t}(r)})),require_localdatatrack=__commonJSMin(((e,t)=>{var n=require_inherits(),r=require_localdatatrack$1();function i(e){var t=new r(e);return Object.setPrototypeOf(t,i.prototype),t}n(i,r),t.exports=i})),require_es5$1=__commonJSMin(((e,t)=>{t.exports={LocalAudioTrack:require_localaudiotrack(),LocalVideoTrack:require_localvideotrack(),LocalDataTrack:require_localdatatrack()}})),require_createlocaltracks=__commonJSMin((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)},n=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function c(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?n(e.value):i(e.value).then(o,c)}u((r=r.apply(e,t||[])).next())})},r=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:c(0),throw:c(1),return:c(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function c(e){return function(t){return u([e,t])}}function u(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>
860&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},i=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},a=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.createLocalTracks=void 0;var o=require_noisecancellationimpl(),c=require_util().buildLogLevels,u=require_webrtc(),K=u.getUserMedia,Y=u.MediaStreamTrack,X=require_es5$1(),ee=X.LocalAudioTrack,te=X.LocalDataTrack,ce=X.LocalVideoTrack,ue=require_log(),de=require_constants(),fe=de.DEFAULT_LOG_LEVEL,me=de.DEFAULT_LOGGER_NAME,ge=de.typeErrors.INVALID_VALUE,Te=require_workaround180748(),Oe=0;function Ae(e){return n(this,void 0,void 0,function(){var u,X,de,Ae,ze,qe,Ye,Ze,Qe,et,nt,rt,it,at=this;return r(this,function(ot){switch(ot.label){case 0:if(u=!(e&&(`audio`in e||`video`in e)),X=t({audio:u,getUserMedia:K,loggerName:me,logLevel:fe,LocalAudioTrack:ee,LocalDataTrack:te,LocalVideoTrack:ce,MediaStreamTrack:Y,Log:ue,video:u},e),de=`[createLocalTracks #`+ ++Oe+`]`,Ae=c(X.logLevel),ze=new X.Log(`default`,de,Ae,X.loggerName),qe=Object.assign({log:ze},X),delete qe.name,X.audio===!1&&X.video===!1)return ze.info(`Neither audio nor video requested, so returning empty LocalTracks`),[2,[]];if(X.tracks)return ze.info(`Adding user-provided LocalTracks`),ze.debug(`LocalTracks:`,X.tracks),[2,X.tracks];if(Ye={audio:typeof X.audio==`object`&&X.audio.name?{name:X.audio.name}:{defaultDeviceCaptureMode:`auto`},video:typeof X.video==`object`&&X.video.name?{name:X.video.name}:{}},Ye.audio.isCreatedByCreateLocalTracks=!0,Ye.video.isCreatedByCreateLocalTracks=!0,typeof X.audio==`object`){if(typeof X.audio.workaroundWebKitBug1208516==`boolean`&&(Ye.audio.workaroundWebKitBug1208516=X.audio.workaroundWebKitBug1208516),`noiseCancellationOptions`in X.audio&&(Ze=X.audio.noiseCancellationOptions,delete X.audio.noiseCancellationOptions),!(`defaultDeviceCaptureMode`in X.audio))Ye.audio.defaultDeviceCaptureMode=`auto`;else if([`auto`,`manual`].every(function(e){return e!==X.audio.defaultDeviceCaptureMode}))throw ge(`CreateLocalAudioTrackOptions.defaultDeviceCaptureMode`,[`auto`,`manual`]);else Ye.audio.defaultDeviceCaptureMode=X.audio.defaultDeviceCaptureMode}typeof X.video==`object`&&typeof X.video.workaroundWebKitBug1208516==`boolean`&&(Ye.video.workaroundWebKitBug1208516=X.video.workaroundWebKitBug1208516),typeof X.audio==`object`&&delete X.audio.name,typeof X.video==`object`&&delete X.video.name,Qe={audio:X.audio,video:X.video},et=typeof X.audio==`object`&&X.audio.workaroundWebKitBug180748,ot.label=1;case 1:return ot.trys.push([1,4,,5]),[4,et?Te(ze,X.getUserMedia,Qe):X.getUserMedia(Qe)];case 2:return nt=ot.sent(),rt=a(a([],i(nt.getAudioTracks())),i(nt.getVideoTracks())),ze.info(`Call to getUserMedia successful; got tracks:`,rt),[4,Promise.all(rt.map(function(e){return n(at,void 0,void 0,function(){var n,i,a;return r(this,function(r){switch(r.label){case 0:return e.kind===`audio`&&Ze?[4,o.applyNoiseCancellation(e,Ze,ze)]:[3,2];case 1:return n=r.sent(),i=n.cleanTrack,a=n.noiseCancellation,[2,new qe.LocalAudioTrack(i,t(t(t({},Ye.audio),qe),{noiseCancellation:a}))];case 2:if(e.kind===`audio`)return[2,new qe.LocalAudioTrack(e,t(t
86({},Ye.audio),qe))];r.label=3;case 3:return[2,new qe.LocalVideoTrack(e,t(t({},Ye.video),qe))]}})})}))];case 3:return[2,ot.sent()];case 4:throw it=ot.sent(),ze.warn(`Call to getUserMedia failed:`,it),it;case 5:return[2]}})})}e.createLocalTracks=Ae})),require_timer=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Timer=void 0,e.Timer=function(){function e(){this._end=void 0,this.start()}return e.prototype.start=function(){return this._start=Date.now(),this},e.prototype.stop=function(){return this._end=Date.now(),this},e.prototype.getTimeMeasurement=function(){return{start:this._start,end:this._end,duration:this._end===void 0?void 0:this._end-this._start}},e}()})),require_mos=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mosToScore=e.calculateMOS=void 0;var t=94.768;function n(e,n,r){var i=e+n*2+10,a=0;switch(!0){case i<160:a=t-i/40;break;case i<1e3:a=t-(i-120)/10}switch(!0){case r<=a/2.5:a=Math.max(a-r*2.5,6.52);break;default:a=0}return 1+.035*a+7e-6*a*(a-60)*(100-a)}e.calculateMOS=n;function r(e){var t=0;return t=e?e>4.2?5:e>4?4:e>3.6?3:e>3?2:1:0,t}e.mosToScore=r})),require_getCombinedConnectionStats=__commonJSMin((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function c(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?n(e.value):i(e.value).then(o,c)}u((r=r.apply(e,t||[])).next())})},n=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:c(0),throw:c(1),return:c(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function c(e){return function(t){return u([e,t])}}function u(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>
860&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a};Object.defineProperty(e,"__esModule",{value:!0}),e.getCombinedConnectionStats=void 0;function i(e,t,n,r){var i=[];return e.forEach(function(e){(r.length===0||r.includes(e.type))&&(n.length===0||n.includes(e.kind))&&typeof e[t]==`number`&&i.push(e[t])}),i}function a(e){var a=e.publisher,u=e.subscriber;return t(this,void 0,void 0,function(){var e,t,K,Y,X,ee,te,ce,ue,de,fe,me,ge,Te,Oe;return n(this,function(n){switch(n.label){case 0:return[4,Promise.all([a,u].map(function(e){return e.getStats()}))];case 1:return e=r.apply(void 0,[n.sent(),2]),t=e[0],K=e[1],Y=i(K,`timestamp`,[`audio`],[`inbound-rtp`]),X=Y.length>0?Y[0]:0,ee=i(K,`jitter`,[`audio`],[`inbound-rtp`]).reduce(function(e,t){return Math.max(e,t)},0),te=i(K,`packetsReceived`,[`audio`,`video`],[`inbound-rtp`]).reduce(function(e,t){return e+t},0),ce=i(K,`packetsLost`,[`audio`,`video`],[`inbound-rtp`]).reduce(function(e,t){return e+t},0),ue=i(t,`roundTripTime`,[`audio`,`video`],[`remote-inbound-rtp`]).reduce(function(e,t){return Math.max(e,t)},0),de=i(K,`currentRoundTripTime`,[],[`candidate-pair`]).reduce(function(e,t){return Math.max(e,t)},0),fe=(de||ue)*1e3,me=i(t,`bytesSent`,[],[`candidate-pair`]).reduce(function(e,t){return e+t},0),ge=i(K,`bytesReceived`,[],[`candidate-pair`]).reduce(function(e,t){return e+t}
86,0),Te=c(K),Oe=[],K.forEach(function(e){(e.type===`local-candidate`||e.type===`remote-candidate`)&&Oe.push(o(e))}),[2,{timestamp:X,jitter:ee,packets:te,packetsLost:ce,roundTripTime:fe,bytesSent:me,bytesReceived:ge,selectedIceCandidatePairStats:Te,iceCandidateStats:Oe}]}})})}e.getCombinedConnectionStats=a;function o(e){return[{key:`transportId`,type:`string`},{key:`candidateType`,type:`string`},{key:`port`,altKeys:[`portNumber`],type:`number`},{key:`address`,altKeys:[`ip`,`ipAddress`],type:`string`},{key:`priority`,type:`number`},{key:`protocol`,altKeys:[`transport`],type:`string`},{key:`url`,type:`string`},{key:`relayProtocol`,type:`string`}].reduce(function(t,n){var r=[n.key];n.altKeys&&(r=r.concat(n.altKeys));var i=r.find(function(t){return t in e});return i&&typeof e[i]===n.type&&(t[n.key]=e[i]),t},{})}function c(e){var t=null,n=[];e.forEach(function(e){e.type===`transport`&&e.selectedCandidatePairId?t=e.selectedCandidatePairId:e.type===`candidate-pair`&&n.push(e)});var r=n.find(function(e){return e.selected||t&&e.id===t});if(!r)return null;var i=r,a=e.get(i.localCandidateId),c=e.get(i.remoteCandidateId);return!a||!c?null:{localCandidate:o(a),remoteCandidate:o(c)}}})),require_statemachine=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},a=require_events().EventEmitter,o=require_util(),c=function(e){n(t,e);function t(t,n){var r=e.call(this)||this,i=null,a=t;return n=ee(n),Object.defineProperties(r,{_lock:{get:function(){return i},set:function(e){i=e}},_reachableStates:{value:Y(n)},_state:{get:function(){return a}
86,set:function(e){a=e}},_states:{value:n},_whenDeferreds:{value:new Set},isLocked:{enumerable:!0,get:function(){return i!==null}},state:{enumerable:!0,get:function(){return a}}}),r.on(`stateChanged`,function(e){r._whenDeferreds.forEach(function(t){t.when(e,t.resolve,t.reject)})}),r}return t.prototype._whenPromise=function(e){var t=this;if(typeof e!=`function`)return Promise.reject(Error(`when() executor must be a function`));var n=o.defer();return n.when=e,this._whenDeferreds.add(n),n.promise.then(function(e){return t._whenDeferreds.delete(n),e},function(e){throw t._whenDeferreds.delete(n),e})},t.prototype.bracket=function(e,t){var n,r=this;function i(e){if(r.hasLock(n)&&r.releaseLockCompletely(n),e)throw e}return this.takeLock(e).then(function(e){return n=e,t(n)}).then(function(e){return i(),e},i)},t.prototype.hasLock=function(e){return this._lock===e},t.prototype.preempt=function(e,t,n){if(!u(this._states,this.state,e))throw Error(`Cannot transition from "`+this.state+`" to "`+e+`"`);var r;this.isLocked&&(r=this._lock,this._lock=null);var i=null;t&&(i=this.takeLockSync(t));var a=i?null:this.takeLockSync(`preemption`);return this.transition(e,i||a,n),r&&r.resolve(),a&&this.releaseLock(a),i},t.prototype.releaseLock=function(e){if(!this.isLocked)throw Error(`Could not release the lock for `+e.name+` because the StateMachine is not locked`);if(!this.hasLock(e))throw Error(`Could not release the lock for `+e.name+` because `+this._lock.name+` has the lock`);e.depth===0?(this._lock=null,e.resolve()):e.depth--},t.prototype.releaseLockCompletely=function(e){if(!this.isLocked)throw Error(`Could not release the lock for `+e.name+` because the StateMachine is not locked`);if(!this.hasLock(e))throw Error(`Could not release the lock for `+e.name+` because `+this._lock.name+` has the lock`);e.depth=0,this._lock=null,e.resolve()},t.prototype.takeLock=function(e){var t=this;if(typeof e==`object`){var n=e;return new Promise(function(e){e(t.takeLockSync(n))})}var r=e;if(this.isLocked){var i=this.takeLock.bind(this,r);return this._lock.promise.then(i)}return Promise.resolve(this.takeLockSync(r))},t.prototype.takeLockSync=function(e){var t=typeof e==`string`?null:e,n=t?t.name:e;if(t&&!this.hasLock(t)||!t&&this.isLocked)throw Error(`Could not take the lock for `+n+` because the lock for `+this._lock.name+` was not released`);if(t)return t.depth++,t;var r=K(n);return this._lock=r,r},t.prototype.transition=function(e,t,n){if(n||=[],this.isLocked){if(!t)throw Error(`You must provide the key in order to transition`);if(!this.hasLock(t))throw Error(`Could not transition using the key for `+t.name+` because `+this._lock.name+` has the lock`)}else if(t)throw Error(`Key provided for `+t.name+`, but the StateMachine was not locked (possibly due to preemption)`);if(!u(this._states,this.state,e))throw Error(`Cannot transition from "`+this.state+`" to "`+e+`"`);this._state=e,this.emit.apply(this,i([],r([`stateChanged`,e].concat(n))))},t.prototype.tryTransition=function(e,t,n){try{this.transition(e,t,n)}catch{return!1}return!0},t.prototype.when=function(e){var t=this;return this.state===e?Promise.resolve(this):u(this._reachableStates,this.state,e)?this._whenPromise(function(n,r,i){n===e?r(t):u(t._reachableStates,n,e)||i(te(n,e))}):Promise.reject(te(this.state,e))},t}(a);function u(e,t,n){return e.get(t).has(n)}function K(e){var t=o.defer();return t.name=e,t.depth=0,t}function Y(e){return Array.from(e.keys()).reduce(function(t,n){return t.set(n,X(e,n))},new Map)}function X(e,t,n){return n||=new Set,e.get(t).forEach(function(t){n.has(t)||(n.add(t),X(e,t,n).forEach(n.add,n))}),n}function ee(e){var t=new Map;for(var n in e)t.set(n,new Set(e[n]));return t}function te(e,t){return Error(`"`+t+`" cannot be reached from "`+e+`"`)}t.exports=c})),require_networkmonitor=__commonJSMin(((e,t)=>{t.exports=function(){function e(e,t){var n=this;t=Object.assign({navigator,window},t);var r=t.navigator,i=r.connection||{type:null},a=i.type,o=i.type?{_events:{value:[`change`,`typechange`]},_listener:{value:function(){var t=a!==n.type&&n.isOnline;a=n.type,t&&e()}},_target:{value:i}}:{_events:{value:[`online`]},_listener:{value:e},_target:{value:t.window}},c=o._events,u=o._listener,K=o._target;Object.defineProperties(this,{isOnline:{enumerable:!0,get:function(){return typeof r.onLine!=`boolean`||r.onLine}},type:{enumerable:!0,get:function(){return i.type||null}},_listener:u,_events:c,_target:K})}return e.prototype.start=function(){var e=this;
86this._events.forEach(function(t){e._target.addEventListener(t,e._listener)})},e.prototype.stop=function(){var e=this;this._events.forEach(function(t){e._target.removeEventListener(t,e._listener)})},e}()})),require_timeout=__commonJSMin(((e,t)=>{t.exports=function(){function e(e,t,n){n===void 0&&(n=!0),Object.defineProperties(this,{_delay:{value:t,writable:!0},_fn:{value:e},_timeout:{value:null,writable:!0}}),n&&this.start()}return Object.defineProperty(e.prototype,"delay",{get:function(){return this._delay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSet",{get:function(){return!!this._timeout},enumerable:!1,configurable:!0}),e.prototype.setDelay=function(e){this._delay=e},e.prototype.start=function(){var e=this;this.isSet||(this._timeout=setTimeout(function(){var t=e._fn;e.clear(),t()},this._delay))},e.prototype.clear=function(){clearTimeout(this._timeout),this._timeout=null},e.prototype.reset=function(){this.clear(),this.start()},e}()})),require_ws=__commonJSMin(((e,t)=>{t.exports=WebSocket})),require_twilioconnection=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},a=require_statemachine(),o=require_util(),c=o.buildLogLevels,u=o.makeUUID,K=require_log(),Y=require_networkmonitor(),X=require_timeout(),ee=0,te={closed:[],connecting:[`closed`,`open`,`waiting`],early:[`closed`,`connecting`],open:[`closed`],waiting:[`closed`,`connecting`,`early`,`open`]},ce={closed:`close`,open:`open`,waiting:`waiting`},ue=2,de=3,fe=3,me=5e3,ge=15e3,Te=5e3,Oe=200,Ae=1e3,ze=3e3,qe=3001,Ye=3002,Ze=3003,Qe=3004,et=3005,nt=3006,rt=3007,it=globalThis,at=it.WebSocket?it.WebSocket:require_ws(),ot={BUSY:`busy`,FAILED:`failed`,LOCAL:`local`,REMOTE:`remote`,TIMEOUT:`timeout`},st=new Map([[ze,ot.TIMEOUT],[qe,ot.TIMEOUT],[Ye,ot.FAILED],[Ze,ot.FAILED],[Qe,ot.TIMEOUT],[nt,ot.BUSY],[rt,ot.TIMEOUT]]),ct=function(e){n(t,e);function t(t,n){var a=e.call(this,`early`,te)||this;n=Object.assign({helloBody:null,maxConsecutiveFailedHellos:fe,maxConsecutiveMissedHeartbeats:de,requestedHeartbeatTimeout:me,openTimeout:ge,welcomeTimeout:Te,Log:K,WebSocket:at},n);var o=c(n.logLevel),u=new n.Log(`default`,a,o,n.loggerName),X=n.networkMonitor?new Y(function(){var e=X.type,t=`Network changed`+(e?` to `+e:``);u.debug(t),a._close({code:Qe,reason:t})}):null;Object.defineProperties(a,{_busyWaitTimeout:{value:null,writable:!0},_consecutiveHeartbeatsMissed:{value:0,writable:!0},_cookie:{value:null,writable:!0},_eventObserver:{value:n.eventObserver},_heartbeatTimeout:{value:null,writable:!0},_hellosLeft:{value:n.maxConsecutiveFailedHellos,writable:!0},_instanceId:{value:++ee},_log:{value:u},_messageQueue:{value:[]},_networkMonitor:{value:X},_options:{value:n},_openTimeout:{value:null,writable:!0},_sendHeartbeatTimeout:{value:null,writable:!0},_serverUrl:{value:t},_welcomeTimeout:{value:null,writable:!0},_ws:{value:null,writable:!0}});var ue={connecting:`info`,early:`info`,open:`info`,waiting:`warning`,closed:`info`};return a.on(`stateChanged`,function(e){var t=[...arguments].slice(1);e in ce&&a.emit.apply(a,i([ce[e]],r(t)));var n={name:e,group:`signaling`,level:ue[a.state]};if(e===`closed`){var o=r(t,1)[0];n.payload={reason:o},n.level=o===ot.LOCAL?`info`:`error`}a._eventObserver.emit(`event`,n)}),a._eventObserver.emit(`event`,{name:a.state,group:`signaling`,level:ue[a.state]}),a._connect(),a}return t.prototype.toString=function(){return`[TwilioConnection #`+this._instanceId+`: `+this._ws.url+`]`},t.prototype._close=function(e){var t=e.code,n=e.reason;if(this.state!==`closed`){this._openTimeout&&this._openTimeout.clear(),this._welcomeTimeout&&this._welcomeTimeout.clear(),this._heartbeatTimeout&&this._heartbeatTimeout.clear(),this._sendHeartbeatTimeout&&this._sendHeartbeatTimeout.clear(),this._networkMonitor&&this._networkMonitor.stop(),this._busyWaitTimeout&&t!==et&&this._busyWaitTimeout.clear(),this._messageQueue.splice(0);var r=this._log;t===Ae?(r.debug(`Closed`),this.transition(`closed`,null,[ot.LOCAL])):(r.warn(`Closed: `+t+` - `+n),t!==et&&this.transition(`closed`,null,[st.get(t)||ot.REMOTE]));var i=this._ws.readyState,a=this._options.WebSocket;i!==a.CLOSING&&i!==a.CLOSED&&this._ws.close(t,n)}},t.prototype._connect=function(){var e=this,t=this._log;if(this.state===`waiting`)this.transition(`early`);else if(this.state!==`early`){t.warn(`Unexpected state "`+this.state+`" for connecting to the TCMP server.`);return}this._ws=new this._options.WebSocket(this._serverUrl);var n=this._ws;t.debug(`Created a new WebSocket:`,n),n.addEventListener(`close`,function(t){return e._close(t)});var r=this._options.openTimeout;this._openTimeout=new X(function(){var t=`Failed to open in `+r+` ms`;e._close({code:rt,reason:t})},r),n.addEventListener(`open`,function(){t.debug(`WebSocket opened:`,n),e._openTimeout.clear(),e._startHandshake(),e._networkMonitor&&e._networkMonitor.start()}),n.addEventListener(`message`,function(n){t.debug(`Incoming: `+n.data);try{n=JSON.parse(n.data)}catch(t){e.emit(`error`,t);return}switch(n.type){case`bad`:e._handleBad(n);break;case`busy`:e._handleBusy(n);break;case`bye`:break;case`msg`:e._handleMessage(n);case`heartbeat`:e._handleHeartbeat();break;case`welcome`:e._handleWelcome(n);break;default:e._log.debug(`Unknown message type: `+n.type),e.emit(`error`,Error(`Unknown message type: `+n.type))}})},t.prototype._handleBad=function(e){var t=e.reason,n=this._log;if(![`connecting`,`open`].includes(this.state)){n.warn(`Unexpected state "`+this.state+`" for handling a "bad" message from the TCMP server.`);return}if(this.state===`connecting`){n.warn(`Closing: `+Ye+` - `+t),this._close({code:Ye,reason:t});return}
86n.debug(`Error: `+t),this.emit(`error`,Error(t))},t.prototype._handleBusy=function(e){var t=this,n=e.cookie,r=e.keepAlive,i=e.retryAfter,a=this._log;if(![`connecting`,`waiting`].includes(this.state)){a.warn(`Unexpected state "`+this.state+`" for handling a "busy" message from the TCMP server.`);return}this._busyWaitTimeout&&this._busyWaitTimeout.clear(),this._welcomeTimeout&&this._welcomeTimeout.clear();var o=i<0?`Received terminal "busy" message`:`Received "busy" message, retrying after `+i+` ms`;if(i<0){a.warn(`Closing: `+nt+` - `+o),this._close({code:nt,reason:o});return}var c=this._options.maxConsecutiveFailedHellos;this._hellosLeft=c,this._cookie=n||null,r?(a.warn(o),this._busyWaitTimeout=new X(function(){return t._startHandshake()},i)):(a.warn(`Closing: `+et+` - `+o),this._close({code:et,reason:o}),this._busyWaitTimeout=new X(function(){return t._connect()},i)),this.transition(`waiting`,null,[r,i])},t.prototype._handleHeartbeat=function(){if(this.state!==`open`){this._log.warn(`Unexpected state "`+this.state+`" for handling a "heartbeat" message from the TCMP server.`);return}this._heartbeatTimeout.reset()},t.prototype._handleHeartbeatTimeout=function(){if(this.state===`open`){var e=this._log,t=this._options.maxConsecutiveMissedHeartbeats;e.debug(`Consecutive heartbeats missed: `+t);var n=`Missed `+t+` "heartbeat" messages`;e.warn(`Closing: `+qe+` - `+n),this._close({code:qe,reason:n})}},t.prototype._handleMessage=function(e){var t=e.body;if(this.state!==`open`){this._log.warn(`Unexpected state "`+this.state+`" for handling a "msg" message from the TCMP server.`);return}this.emit(`message`,t)},t.prototype._handleWelcome=function(e){var t=this,n=e.negotiatedTimeout,r=this._log;if(![`connecting`,`waiting`].includes(this.state)){r.warn(`Unexpected state "`+this.state+`" for handling a "welcome" message from the TCMP server.`);return}this.state===`waiting`&&(r.debug(`Received "welcome" message, no need to retry connection.`),this._busyWaitTimeout.clear());var i=n*this._options.maxConsecutiveMissedHeartbeats,a=n-Oe;this._welcomeTimeout.clear(),this._heartbeatTimeout=new X(function(){return t._handleHeartbeatTimeout()},i),this._messageQueue.splice(0).forEach(function(e){return t._send(e)}),this._sendHeartbeatTimeout=new X(function(){return t._sendHeartbeat()},a),this.transition(`open`)},t.prototype._handleWelcomeTimeout=function(){if(this.state===`connecting`){var e=this._log;if(this._hellosLeft<=0){var t=`All handshake attempts failed`;e.warn(`Closing: `+ze+` - `+t),this._close({code:ze,reason:t});return}var n=this._options.maxConsecutiveFailedHellos;e.warn(`Handshake attempt `+(n-this._hellosLeft)+` failed`),this._startHandshake()}},t.prototype._send=function(e){if(this._ws.readyState===this._options.WebSocket.OPEN){var t=JSON.stringify(e);this._log.debug(`Outgoing: `+t);try{this._ws.send(t),this._sendHeartbeatTimeout&&this._sendHeartbeatTimeout.reset()}catch{var n=`Failed to send message`;this._log.warn(`Closing: `+Ze+` - `+n),this._close({code:Ze,reason:n})}}},t.prototype._sendHeartbeat=function(){this.state!==`closed`&&this._send({type:`heartbeat`})},t.prototype._sendHello=function(){var e=this._options,t=e.helloBody,n=e.requestedHeartbeatTimeout,r={id:u(),timeout:n,type:`hello`,version:ue};this._cookie&&(r.cookie=this._cookie),t&&(r.body=t),this._send(r)},t.prototype._sendOrEnqueue=function(e){var t=this;this.state!==`closed`&&(this.state===`open`?function(e){return t._send(e)}:function(e){return t._messageQueue.push(e)})(e)},t.prototype._startHandshake=function(){var e=this;if([`early`,`waiting`].includes(this.state)&&this.transition(`connecting`),this.state===`connecting`){this._hellosLeft--,this._sendHello();var t=this._options.welcomeTimeout;this._welcomeTimeout=new X(function(){return e._handleWelcomeTimeout()},t)}},t.prototype.close=function(){this.state!==`closed`&&(this._sendOrEnqueue({type:`bye`}),this._close({code:Ae,reason:`Normal`}))},t.prototype.sendMessage=function(e){this._sendOrEnqueue({body:e,type:`msg`})},t}(a);ct.CloseReason=ot,t.exports=ct})),require_twilioerror=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
86t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};t.exports=function(e){n(t,e);function t(n){var a=this,o=[].slice.call(arguments,1);a=e.apply(this,i([],r(o)))||this,Object.setPrototypeOf(a,t.prototype);var c=Error.apply(a,o);return c.name=`TwilioError`,Object.defineProperty(a,"code",{value:n,enumerable:!0}),Object.getOwnPropertyNames(c).forEach(function(e){Object.defineProperty(this,e,{value:c[e],enumerable:!0})},a),a}return t.prototype.toString=function(){var e=this.message?`: `+this.message:``;return this.name+` `+this.code+e},t}(Error)})),require_twilio_video_errors=__commonJSMin((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=require_twilioerror(),r={};e.createTwilioError=function(e,t){return e=typeof e==`number`?e:0,t=typeof t==`string`&&t?t:`Unknown error`,r[e]?new r[e]:new n(e,t)};var i=function(e){t(n,e);function n(){var t=e.call(this,20101,`Invalid Access Token`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.AccessTokenInvalidError=i,Object.defineProperty(r,20101,{value:i});var a=function(e){t(n,e);function n(){var t=e.call(this,20102,`Invalid Access Token header`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.AccessTokenHeaderInvalidError=a,Object.defineProperty(r,20102,{value:a});var o=function(e){t(n,e);function n(){var t=e.call(this,20103,`Invalid Access Token issuer/subject`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.AccessTokenIssuerInvalidError=o,Object.defineProperty(r,20103,{value:o});var c=function(e){t(n,e);function n(){var t=e.call(this,20104,`Access Token expired or expiration date invalid`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.AccessTokenExpiredError=c,Object.defineProperty(r,20104,{value:c});var u=function(e){t(n,e);function n(){var t=e.call(this,20105,`Access Token not yet valid`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.AccessTokenNotYetValidError=u,Object.defineProperty(r,20105,{value:u});var K=function(e){t(n,e);function n(){var t=e.call(this,20106,`Invalid Access Token grants`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.AccessTokenGrantsInvalidError=K,Object.defineProperty(r,20106,{value:K});var Y=function(e){t(n,e);function n(){var t=e.call(this,20107,`Invalid Access Token signature`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.AccessTokenSignatureInvalidError=Y,Object.defineProperty(r,20107,{value:Y});var X=function(e){t(n,e);function n(){var t=e.call(this,53e3,`Signaling connection error`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.SignalingConnectionError=X,Object.defineProperty(r,53e3,{value:X});var ee=function(e){t(n,e);function n(){var t=e.call(this,53001,`Signaling connection disconnected`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.SignalingConnectionDisconnectedError=ee,Object.defineProperty(r,53001,{value:ee});var te=function(e){t(n,e);function n(){var t=e.call(this,53002,`Signaling connection timed out`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.SignalingConnectionTimeoutError=te,Object.defineProperty(r,53002,{value:te});var ce=function(e){t(n,e);
86function n(){var t=e.call(this,53003,`Client received an invalid signaling message`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.SignalingIncomingMessageInvalidError=ce,Object.defineProperty(r,53003,{value:ce});var ue=function(e){t(n,e);function n(){var t=e.call(this,53004,`Client sent an invalid signaling message`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.SignalingOutgoingMessageInvalidError=ue,Object.defineProperty(r,53004,{value:ue});var de=function(e){t(n,e);function n(){var t=e.call(this,53006,`Video server is busy`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.SignalingServerBusyError=de,Object.defineProperty(r,53006,{value:de});var fe=function(e){t(n,e);function n(){var t=e.call(this,53100,`Room name is invalid`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomNameInvalidError=fe,Object.defineProperty(r,53100,{value:fe});var me=function(e){t(n,e);function n(){var t=e.call(this,53101,`Room name is too long`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomNameTooLongError=me,Object.defineProperty(r,53101,{value:me});var ge=function(e){t(n,e);function n(){var t=e.call(this,53102,`Room name contains invalid characters`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomNameCharsInvalidError=ge,Object.defineProperty(r,53102,{value:ge});var Te=function(e){t(n,e);function n(){var t=e.call(this,53103,`Unable to create Room`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomCreateFailedError=Te,Object.defineProperty(r,53103,{value:Te});var Oe=function(e){t(n,e);function n(){var t=e.call(this,53104,`Unable to connect to Room`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomConnectFailedError=Oe,Object.defineProperty(r,53104,{value:Oe});var Ae=function(e){t(n,e);function n(){var t=e.call(this,53105,`Room contains too many Participants`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomMaxParticipantsExceededError=Ae,Object.defineProperty(r,53105,{value:Ae});var ze=function(e){t(n,e);function n(){var t=e.call(this,53106,`Room not found`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomNotFoundError=ze,Object.defineProperty(r,53106,{value:ze});var qe=function(e){t(n,e);function n(){var t=e.call(this,53107,`MaxParticipants is out of range`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomMaxParticipantsOutOfRangeError=qe,Object.defineProperty(r,53107,{value:qe});var Ye=function(e){t(n,e);function n(){var t=e.call(this,53108,`RoomType is not valid`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomTypeInvalidError=Ye,Object.defineProperty(r,53108,{value:Ye});var Ze=function(e){t(n,e);function n(){var t=e.call(this,53109,`Timeout is out of range`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomTimeoutOutOfRangeError=Ze,Object.defineProperty(r,53109,{value:Ze});var Qe=function(e){t(n,e);function n(){var t=e.call(this,53110,`StatusCallbackMethod is invalid`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomStatusCallbackMethodInvalidError=Qe,Object.defineProperty(r,53110,{value:Qe});var et=function(e){t(n,e);function n(){var t=e.call(this,53111,`StatusCallback is invalid`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomStatusCallbackInvalidError=et,Object.defineProperty(r,53111,{value:et});var nt=function(e){t(n,e);
86function n(){var t=e.call(this,53112,`Status is invalid`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomStatusInvalidError=nt,Object.defineProperty(r,53112,{value:nt});var rt=function(e){t(n,e);function n(){var t=e.call(this,53113,`Room exists`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomRoomExistsError=rt,Object.defineProperty(r,53113,{value:rt});var it=function(e){t(n,e);function n(){var t=e.call(this,53114,`Room creation parameter(s) incompatible with the Room type`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomInvalidParametersError=it,Object.defineProperty(r,53114,{value:it});var at=function(e){t(n,e);function n(){var t=e.call(this,53115,`MediaRegion is invalid`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomMediaRegionInvalidError=at,Object.defineProperty(r,53115,{value:at});var ot=function(e){t(n,e);function n(){var t=e.call(this,53116,`There are no media servers available in the MediaRegion`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomMediaRegionUnavailableError=ot,Object.defineProperty(r,53116,{value:ot});var st=function(e){t(n,e);function n(){var t=e.call(this,53117,`The subscription operation requested is not supported for the Room type`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomSubscriptionOperationNotSupportedError=st,Object.defineProperty(r,53117,{value:st});var ct=function(e){t(n,e);function n(){var t=e.call(this,53118,`Room completed`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomCompletedError=ct,Object.defineProperty(r,53118,{value:ct});var lt=function(e){t(n,e);function n(){var t=e.call(this,53124,`The AudioOnly flag is not supported for the Room type`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomAudioOnlyFlagNotSupportedError=lt,Object.defineProperty(r,53124,{value:lt});var ut=function(e){t(n,e);function n(){var t=e.call(this,53125,`The track kind is not supported by the Room`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.RoomTrackKindNotSupportedError=ut,Object.defineProperty(r,53125,{value:ut});var dt=function(e){t(n,e);function n(){var t=e.call(this,53200,`Participant identity is invali
86d`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.ParticipantIdentityInvalidError=dt,Object.defineProperty(r,53200,{value:dt});var ft=function(e){t(n,e);function n(){var t=e.call(this,53201,`Participant identity is too long`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.ParticipantIdentityTooLongError=ft,Object.defineProperty(r,53201,{value:ft});var pt=function(e){t(n,e);function n(){var t=e.call(this,53202,`Participant identity contains invalid characters`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.ParticipantIdentityCharsInvalidError=pt,Object.defineProperty(r,53202,{value:pt});var mt=function(e){t(n,e);function n(){var t=e.call(this,53203,`The maximum number of published tracks allowed in the Room at the same time has been reached`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.ParticipantMaxTracksExceededError=mt,Object.defineProperty(r,53203,{value:mt});var ht=function(e){t(n,e);function n(){var t=e.call(this,53204,`Participant not found`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.ParticipantNotFoundError=ht,Object.defineProperty(r,53204,{value:ht});var gt=function(e){t(n,e);function n(){var t=e.call(this,53205,`Participant disconnected because of duplicate identity`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.ParticipantDuplicateIdentityError=gt,Object.defineProperty(r,53205,{value:gt});var _t=function(e){t(n,e);function n(){var t=e.call(this,53300,`Track is invalid`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.TrackInvalidError=_t,Object.defineProperty(r,53300,{value:_t});var vt=function(e){t(n,e);function n(){var t=e.call(this,53301,`Track name is invalid`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.TrackNameInvalidError=vt,Object.defineProperty(r,53301,{value:vt});var yt=function(e){t(n,e);function n(){var t=e.call(this,53302,`Track name is too long`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.TrackNameTooLongError=yt,Object.defineProperty(r,53302,{value:yt});var bt=function(e){t(n,e);function n(){var t=e.call(this,53303,`Track name contains invalid characters`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.TrackNameCharsInvalidError=bt,Object.defineProperty(r,53303,{value:bt});var xt=function(e){t(n,e);function n(){var t=e.call(this,53304,`Track name is duplicated`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.TrackNameIsDuplicatedError=xt,Object.defineProperty(r,53304,{value:xt});var St=function(e){t(n,e);function n(){var t=e.call(this,53305,`The server has reached capacity and cannot fulfill this request`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.TrackServerTrackCapacityReachedError=St,Object.defineProperty(r,53305,{value:St});var Ct=function(e){t(n,e);function n(){var t=e.call(this,53400,`Client is unable to create or apply a local media description`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.MediaClientLocalDescFailedError=Ct,Object.defineProperty(r,53400,{value:Ct});var wt=function(e){t(n,e);function n(){var t=e.call(this,53401,`Server is unable to create or apply a local media description`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.MediaServerLocalDescFailedError=wt,Object.defineProperty(r,53401,{value:wt});var Tt=function(e){t(n,e);function n(){var t=e.call(this,53402,`Client is unable to apply a remote media description`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.MediaClientRemoteDescFailedError=Tt,Object.defineProperty(r,53402,{value:Tt});var Et=function(e){t(n,e);function n(){var t=e.call(this,53403,`Server is unable to apply a remote media description`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.MediaServerRemoteDescFailedError=Et,Object.defineProperty(r,53403,{value:Et});var Dt=function(e){t(n,e);function n(){var t=e.call(this,53404,`No supported codec`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.MediaNoSupportedCodecError=Dt,Object.defineProperty(r,53404,{value:Dt});var Ot=function(e){t(n,e);function n(){var t=e.call(this,53405,`Media connection failed or Media activity ceased`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.MediaConnectionError=Ot,Object.defineProperty(r,53405,{value:Ot});var kt=function(e){t(n,e);function n(){var t=e.call(this,53407,`Media connection failed due to DTLS handshake failure`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.MediaDTLSTransportFailedError=kt,Object.defineProperty(r,53407,{value:kt});var At=function(e){t(n,e);function n(){var t=e.call(this,53500,`Unable to acquire configuration`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.ConfigurationAcquireFailedError=At,Object.defineProperty(r,53500,{value:At});var jt=function(e){t(n,e);function n(){var t=e.call(this,53501,`Unable to acquire TURN credentials`)||this;return Object.setPrototypeOf(t,n.prototype),t}return n}(n);e.ConfigurationAcquireTurnFailedError=jt,Object.defineProperty(r,53501,{value:jt})})),require_getturncredentials=__commonJSMin((e=>
86{Object.defineProperty(e,"__esModule",{value:!0}),e.getTurnCredentials=void 0;var t=require_twilioconnection(),n=require_constants().ICE_VERSION,r=require_twilio_video_errors(),i=r.createTwilioError,a=r.SignalingConnectionError,o=require_events();function c(e,r){return new Promise(function(c,u){var K=new t(r,{networkMonitor:null,eventObserver:new o.EventEmitter,helloBody:{edge:`roaming`,preflight:!0,token:e,type:`ice`,version:n}}),Y=!1;K.once(`close`,function(){Y||(Y=!0,u(new a))}),K.on(`message`,function(e){var t=e.code,n=e.message,r=e.ice_servers,a=e.type;(a===`iced`||a===`error`)&&!Y&&(Y=!0,a===`iced`?c(r):u(i(t,n)),K.close())})})}e.getTurnCredentials=c})),require_makestat=__commonJSMin((e=>{var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.makeStat=void 0;function r(e){return e&&e.length?{min:Math.min.apply(Math,n([],t(e))),max:Math.max.apply(Math,n([],t(e))),average:e.reduce(function(e,t){return e+t},0)/e.length}:null}e.makeStat=r})),require_syntheticaudio=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.syntheticAudio=void 0;function t(){var e=require_audiocontext(),t={},n=e.getOrCreate(t),r=n.createOscillator(),i=r.connect(n.createMediaStreamDestination());r.start();var a=i.stream.getAudioTracks()[0],o=a.stop;return a.stop=function(){o.call(a),e.release(t)},a}e.syntheticAudio=t})),require_syntheticvideo=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.syntheticVideo=void 0;function t(e){var t=e===void 0?{}:e,n=t.width,r=n===void 0?640:n,i=t.height,a=i===void 0?480:i,o=Object.assign(document.createElement(`canvas`),{width:r,height:a}),c=o.getContext(`2d`);c.fillStyle=`green`,c.fillRect(0,0,o.width,o.height);var u=!1;requestAnimationFrame(function e(){if(!u){var t=Math.round(Math.random()*255),n=Math.round(Math.random()*255),i=Math.round(Math.random()*255),o=Math.round(Math.random()*255);c.fillStyle=`rgba(`+t+`, `+n+`, `+i+`, `+o+`)`,c.fillRect(Math.random()*r,Math.random()*a,50,50),requestAnimationFrame(e)}});var K=o.captureStream(30).getTracks()[0],Y=K.stop;return K.stop=function(){u=!0,Y.call(K)},K}e.syntheticVideo=t})),require_movingaveragedelta=__commonJSMin(((e,t)=>{t.exports=function(){function e(){Object.defineProperties(this,{_samples:{value:[{denominator:0,numerator:0},{denominator:0,numerator:0}]}})}return e.prototype.get=function(){var e=this._samples,t=e[1].denominator-e[0].denominator||1/0;return(e[1].numerator-e[0].numerator)/t},e.prototype.putSample=function(e,t){var n=this._samples;n.shift(),n.push({denominator:t,numerator:e})},e}()})),require_eventobserver=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_events().EventEmitter,i=[`signaling`,`room`,`media`,`quality`,`video-processor`,`preflight`],a=[`debug`,`error`,`info`,`warning`];t.exports=function(e){n(t,e);function t(t,n,r,o){o===void 0&&(o=null);var c=e.call(this)||this;return c.on(`event`,function(e){var c=e.name,u=e.group,K=e.level,Y=e.payload;if(typeof c!=`string`)throw r.error(`Unexpected name: `,c),Error(`Unexpected name: `,c);if(!i.includes(u))throw r.error(`Unexpected group: `,u),Error(`Unexpected group: `,u);if(!a.includes(K))throw r.error(`Unexpected level: `,K),Error(`Unexpected level: `,K);var X=Date.now(),ee=X-n,te=Object.assign({elapsedTime:ee,level:K},Y||{});t.publish(u,c,te);var ce=Object.assign({elapsedTime:ee,group:u,level:K,name:c,timestamp:X},Y?{payload:Y}:{});r[{debug:`debug`,error:`error`,info:`info`,warning:`warn`}[K]](`event`,ce),o&&u===`signaling`&&o.emit(`event`,ce)}),c}return t}(r)})),require_insightspublisher=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
86t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=require_events().EventEmitter,a=require_util().getUserAgent,o=5,c=50,u=1e3,K=globalThis,Y=K.WebSocket?K.WebSocket:require_ws(),X=require_constants(),ee=X.hardwareDevicePublisheriPad,te=X.hardwareDevicePublisheriPhone,ce=require_util(),ue=require_browserdetection(),de=function(e){n(t,e);function t(t,n,r,i,u,K){var X=e.call(this)||this;return K=Object.assign({gateway:me(i,u)+`/v1/VideoEvents`,maxReconnectAttempts:o,reconnectIntervalMs:c,userAgent:a(),WebSocket:Y},K),Object.defineProperties(X,{_connectTimestamp:{value:0,writable:!0},_eventQueue:{value:[]},_readyToConnect:{value:ce.defer()},_reconnectAttemptsLeft:{value:K.maxReconnectAttempts,writable:!0},_ws:{value:null,writable:!0},_WebSocket:{value:K.WebSocket}}),X._readyToConnect.promise.then(function(e){var i=e.roomSid,a=e.participantSid,o=X;X.on(`disconnected`,function e(c){if(o._session=null,c&&o._reconnectAttemptsLeft>0){o.emit(`reconnecting`),Te(o,t,n,r,i,a,K);return}o.removeListener(`disconnected`,e)}),fe(X,t,n,r,i,a,K)}).catch(function(){}),X}return t.prototype.connect=function(e,t){this._readyToConnect.resolve({roomSid:e,participantSid:t})},t.prototype._publish=function(e){e.session=this._session,this._ws.send(JSON.stringify(e))},t.prototype.disconnect=function(){if(this._ws===null||this._ws.readyState===this._WebSocket.CLOSING||this._ws.readyState===this._WebSocket.CLOSED)return!1;try{this._ws.close()}catch{}return this.emit(`disconnected`),!0},t.prototype.publish=function(e,t,n){return this._ws!==null&&(this._ws.readyState===this._WebSocket.CLOSING||this._ws.readyState===this._WebSocket.CLOSED)?!1:((typeof this._session==`string`?this._publish.bind(this):this._eventQueue.push.bind(this._eventQueue))({group:e,name:t,payload:n,timestamp:Date.now(),type:`event`,version:1}),!0)},t}(i);function fe(e,t,n,i,a,o,c){e._connectTimestamp=Date.now(),e._reconnectAttemptsLeft--,e._ws=new c.WebSocket(c.gateway);var K=e._ws;K.addEventListener(`close`,function(t){if(t.code===u){e.emit(`disconnected`);return}e.emit(`disconnected`,Error(`WebSocket Error `+t.code+`: `+t.reason))}),K.addEventListener(`message`,function(t){ge(e,JSON.parse(t.data),c)}),K.addEventListener(`open`,function(){var e={type:`connect`,token:t,version:1};e.publisher={name:n,sdkVersion:i,userAgent:c.userAgent,participantSid:o,roomSid:a},ue.isIpad()?e.publisher=r(r({},e.publisher),ee):ue.isIphone()&&(e.publisher=r(r({},e.publisher),te)),K.send(JSON.stringify(e))})}function me(e,t){return e===`prod`?`wss://sdkgw.`+t+`.twilio.com`:`wss://sdkgw.`+e+`-`+t+`.twilio.com`}function ge(e,t,n){switch(t.type){case`connected`:e._session=t.session,e._reconnectAttemptsLeft=n.maxReconnectAttempts,e._eventQueue.splice(0).forEach(e._publish,e),e.emit(`connected`);break;case`error`:e._ws.close(),e.emit(`disconnected`,Error(t.message))}}function Te(e,t,n,r,i,a,o){var c=Date.now()-e._connectTimestamp,u=o.reconnectIntervalMs-c;if(u>0){setTimeout(function(){fe(e,t,n,r,i,a,o)},u);return}fe(e,t,n,r,i,a,o)}t.exports=de})),require_preflighttest=__commonJSMin((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=e&&e.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)},r=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function c(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?n(e.value):i(e.value).then(o,c)}u((r=r.apply(e,t||[])).next())})},i=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:c(0),throw:c(1),return:c(2)};
86return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function c(e){return function(t){return u([e,t])}}function u(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.runPreflight=e.PreflightTest=void 0;var a=require_constants(),o=require_timer(),c=require_mos(),u=require_getCombinedConnectionStats(),K=require_getturncredentials(),Y=require_makestat(),X=require_syntheticaudio(),ee=require_syntheticvideo(),te=require_util(),ce=require_constants().WS_SERVER,ue=require_log(),de=require_eventemitter(),fe=require_movingaveragedelta(),me=require_eventobserver(),ge=require_insightspublisher(),Te=require_sid(),Oe=Te.createSID,Ae=Te.sessionSID,ze=require_twilio_video_errors(),qe=ze.SignalingConnectionTimeoutError,Ye=ze.MediaConnectionError,Ze=1e3,Qe=10*Ze,et={mediaAcquired:`mediaAcquired`,connected:`connected`,mediaSubscribed:`mediaSubscribed`,mediaStarted:`mediaStarted`,dtlsConnected:`dtlsConnected`,peerConnectionConnected:`peerConnectionConnected`,iceConnected:`iceConnected`};function nt(e){return e!=null}var rt=0,it=function(e){t(de,e);function de(t,n){var r=e.call(this)||this;r._testTiming=new o.Timer,r._dtlsTiming=new o.Timer,r._iceTiming=new o.Timer,r._peerConnectionTiming=new o.Timer,r._mediaTiming=new o.Timer,r._connectTiming=new o.Timer,r._sentBytesMovingAverage=new fe,r._packetLossMovingAverage=new fe,r._progressEvents=[],r._receivedBytesMovingAverage=new fe;var i=n,c=i.environment,u=c===void 0?`prod`:c,K=i.region,Y=K===void 0?`gll`:K,X=i.duration,ee=X===void 0?Qe:X,te=i.wsServer||ce(u,Y);return r._log=new ue(`default`,r,a.DEFAULT_LOG_LEVEL,a.DEFAULT_LOGGER_NAME),r._testDuration=ee,r._instanceId=rt++,r._testTiming.start(),r._runPreflightTest(t,u,te),r}return de.prototype.toString=function(){return`[Preflight #`+this._instanceId+`]`},de.prototype.stop=function(){this._stopped=!0},de.prototype._generatePreflightReport=function(e){return this._testTiming.stop(),{testTiming:this._testTiming.getTimeMeasurement(),networkTiming:{dtls:this._dtlsTiming.getTimeMeasurement(),ice:this._iceTiming.getTimeMeasurement(),peerConnection:this._peerConnectionTiming.getTimeMeasurement(),connect:this._connectTiming.getTimeMeasurement(),media:this._mediaTiming.getTimeMeasurement()},stats:{jitter:Y.makeStat(e?.jitter),rtt:Y.makeStat(e?.rtt),packetLoss:Y.makeStat(e?.packetLoss)},selectedIceCandidatePairStats:e?e.selectedIceCandidatePairStats:null,iceCandidateStats:e?e.iceCandidateStats:[],progressEvents:this._progressEvents,mos:Y.makeStat(e?.mos)}},de.prototype._executePreflightStep=function(e,t,n){return r(this,void 0,void 0,function(){var r,a,o,c,u;return i(this,function(i){switch(i.label){case 0:if(this._log.debug(`Executing step: `,e),r=this._testDuration+10*Ze,this._stopped)throw Error(`stopped`);a=Promise.resolve().then(t),o=null,c=new Promise(function(t,i){o=setTimeout(function(){i(n||Error(e+` timeout.`))},r)}),i.label=1;case 1:return i.trys.push([1,,3,4]),[4,Promise.race([c,a])];case 2:return u=i.sent(),[2,u];case 3:return o!==null&&clearTimeout(o),[7];case 4:return[2]}})})},de.prototype._collectNetworkTimings=function(e){var t=this;return new Promise(function(n){var r;e.addEventListener(`iceconnectionstatechange`,function(){e.iceConnectionState===`checking`&&t._iceTiming.start(),e.iceConnectionState===`connected`&&(t._iceTiming.stop(),t._updateProgress(et.iceConnected),(!r||r&&r.state===`connected`)&&n())}),e.addEventListener(`connectionstatechange`,function(){e.connectionState===`connecting`&&t._peerConnectionTiming.start(),e.connectionState===`connected`&&(t._peerConnectionTiming.stop(),t._updateProgress(et.peerConnectionConnected))});var i=e.getSenders().map(function(e){return e.transport}).find(nt);i!==void 0&&(r=i,r.addEventListener(`statechange`,function(){r.state===`connecting`&&t._dtlsTiming.start(),r.state===`connected`&&(t._dtlsTiming.stop(),t._updateProgress(et.dtlsConnected),e.iceConnectionState===`connected`&&n())}))})},de.prototype._setupInsights=function(e){var t=e.token,n=e.environment,r=n===void 0?a.DEFAULT_ENVIRONMENT:n,i=e.realm,o=i===void 0?a.DEFAULT_REALM:i,c=new ge(t,a.SDK_NAME,a.SDK_VERSION,r,o,{});c.connect(`PREFLIGHT_ROOM_SID`,`PREFLIGHT_PARTICIPANT`);var u=new me(c,Date.now(),this._log),K=void 0;return{reportToInsights:function(e){var t,n,r=e.report,i=r.stats.jitter||K,a=r.stats.rtt||K,o=r.stats.packetLoss||K,Y=r.mos||K,X=new Map;
86r.iceCandidateStats.forEach(function(e){if(e.candidateType&&e.protocol){var t=X.get(e.candidateType)||[];t.indexOf(e.protocol)<0&&t.push(e.protocol),X.set(e.candidateType,t)}});var ee=JSON.stringify(Object.fromEntries(X)),te={name:`report`,group:`preflight`,level:r.error?`error`:`info`,payload:{sessionSID:Ae,preflightSID:Oe(`PF`),progressEvents:JSON.stringify(r.progressEvents),testTiming:r.testTiming,dtlsTiming:r.networkTiming.dtls,iceTiming:r.networkTiming.ice,peerConnectionTiming:r.networkTiming.peerConnection,connectTiming:r.networkTiming.connect,mediaTiming:r.networkTiming.media,selectedLocalCandidate:r.selectedIceCandidatePairStats?.localCandidate,selectedRemoteCandidate:r.selectedIceCandidatePairStats?.remoteCandidate,iceCandidateStats:ee,jitterStats:i,rttStats:a,packetLossStats:o,mosStats:Y,error:r.error}};u.emit(`event`,te),setTimeout(function(){return c.disconnect()},2e3)}}},de.prototype._runPreflightTest=function(e,t,a){return r(this,void 0,void 0,function(){var o,c,u,Y,te,ce,ue,de,fe,me,ge,Te,Oe=this;return i(this,function(Ae){switch(Ae.label){case 0:o=[],c=[],u=this._setupInsights({token:e,environment:t}).reportToInsights,Ae.label=1;case 1:return Ae.trys.push([1,8,9,10]),Y=[],[4,this._executePreflightStep(`Acquire media`,function(){return[X.syntheticAudio(),ee.syntheticVideo({width:640,height:480})]})];case 2:return o=Ae.sent(),this._updateProgress(et.mediaAcquired),this.emit(`debug`,{localTracks:o}),this._connectTiming.start(),[4,this._executePreflightStep(`Get turn credentials`,function(){return K.getTurnCredentials(e,a)},new qe)];case 3:return te=Ae.sent(),this._connectTiming.stop(),this._updateProgress(et.connected),ce=new RTCPeerConnection({iceServers:te,iceTransportPolicy:`relay`,bundlePolicy:`max-bundle`}),ue=new RTCPeerConnection({iceServers:te,bundlePolicy:`max-bundle`}),c.push(ce),c.push(ue),this._mediaTiming.start(),[4,this._executePreflightStep(`Setup Peer Connections`,function(){return r(Oe,void 0,void 0,function(){var e,t,n,r;return i(this,function(i){switch(i.label){case 0:return ce.addEventListener(`icecandidate`,function(e){return e.candidate&&ue.addIceCandidate(e.candidate)}),ue.addEventListener(`icecandidate`,function(e){return e.candidate&&ce.addIceCandidate(e.candidate)}),o.forEach(function(e){return ce.addTrack(e)}),e=new Promise(function(e){var t=[];ue.addEventListener(`track`,function(n){t.push(n.track),t.length===o.length&&e(t)})}),[4,ce.createOffer()];case 1:return t=i.sent(),n=t,[4,ce.setLocalDescription(n)];case 2:return i.sent(),[4,ue.setRemoteDescription(n)];case 3:return i.sent(),[4,ue.createAnswer()];case 4:return r=i.sent(),[4,ue.setLocalDescription(r)];case 5:return i.sent(),[4,ce.setRemoteDescription(r)];case 6:return i.sent(),[4,this._collectNetworkTimings(ce)];case 7:return i.sent(),[2,e]}})})},new Ye)];case 4:return de=Ae.sent(),this.emit(`debug`,{remoteTracks:de}),de.forEach(function(e){e.addEventListener(`ended`,function(){return Oe._log.warn(e.kind+`:ended`)}),e.addEventListener(`mute`,function(){return Oe._log.warn(e.kind+`:muted`)}),e.addEventListener(`unmute`,function(){return Oe._log.warn(e.kind+`:unmuted`)})}),this._updateProgress(et.mediaSubscribed),[4,this._executePreflightStep(`Wait for tracks to start`,function(){return new Promise(function(e){var t=document.createElement(`video`);t.autoplay=!0,t.playsInline=!0,t.muted=!0,t.srcObject=new MediaStream(de),Y.push(t),Oe.emit(`debugElement`,t),t.oncanplay=e})},new Ye)];case 5:return Ae.sent(),this._mediaTiming.stop(),this._updateProgress(et.mediaStarted),[4,this._executePreflightStep(`Collect stats for duration`,function(){return Oe._collectRTCStatsForDuration(Oe._testDuration,at(),ce,ue)})];case 6:return fe=Ae.sent(),[4,this._executePreflightStep(`Generate report`,function(){return Oe._generatePreflightReport(fe)})];case 7:return me=Ae.sent(),u({report:me}),this.emit(`completed`,me),[3,10];case 8:return ge=Ae.sent(),Te=this._generatePreflightReport(),u({report:n(n({},Te),{error:ge?.toString()})}),this.emit(`failed`,ge,Te),[3,10];case 9:return c.forEach(function(e){return e.close()}),o.forEach(function(e){return e.stop()}),[7];case 10:return[2]}})})},de.prototype._collectRTCStats=function(e,t,n){return r(this,void 0,void 0,function(){var r,a,o,K,Y,X,ee,te,ce,ue,de,fe,me,ge;return i(this,function(i){switch(i.label){case 0:return[4,u.getCombinedConnectionStats({publisher:t,subscriber:n})];case 1:return r=i.sent(),a=r.timestamp,o=r.bytesSent,K=r.bytesReceived,Y=r.packets,X=r.packetsLost,ee=r.roundTripTime,te=r.jitter,ce=r.selectedIceCandidatePairStats,ue=r.iceCandidateStats,de=e.jitter.length>0,e.jitter.push(te),e.rtt.push(ee),this._sentBytesMovingAverage.putSample(o,a),this._receivedBytesMovingAverage.putSample(K,a),this._packetLossMovingAverage.putSample(X,Y),de&&(e.outgoingBitrate.push(this._sentBytesMovingAverage.get()*1e3*8),e.incomingBitrate.push(this._receivedBytesMovingAverage.get()*1e3*8),fe=this._packetLossMovingAverage.get(),me=Math.min(100,fe*100),e.packetLoss.push(me),ge=c.calculateMOS(ee,te,fe),e.mos.push(ge)),e.selectedIceCandidatePairStats||=ce,e.iceCandidateStats.length===0&&(e.iceCandidateStats=ue),[2]}})})},de.prototype._collectRTCStatsForDuration=function(e,t,n,a){return r(this,void 0,void 0,function(){var r,o,c;return i(this,function(i){switch(i.label){case 0:return r=Date.now(),o=Math.min(1e3,e),[4,te.waitForSometime(o)];case 1:return i.sent(),[4,this._collectRTCStats(t,n,a)];case 2:return i.sent(),c=e-(Date.now()-r),c>0?[4,this._collectRTCStatsForDuration(c,t,n,a)]:[3,4];case 3:t=i.sent(),i.label=4;case 4:return[2,t]}})})},de.prototype._updateProgress=function(e){var t=Date.now()-this._testTiming.getTimeMeasurement().start;this._progressEvents.push({duration:t,name:e}
86),this.emit(`progress`,e)},de}(de);e.PreflightTest=it;function at(){return{mos:[],jitter:[],rtt:[],outgoingBitrate:[],incomingBitrate:[],packetLoss:[],selectedIceCandidatePairStats:null,iceCandidateStats:[]}}function ot(e,t){return t===void 0&&(t={}),new it(e,t)}e.runPreflight=ot})),require_cancelablepromise=__commonJSMin(((e,t)=>{var n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};t.exports=function(){function e(e,t){var n=this;Object.defineProperties(this,{_isCancelable:{writable:!0,value:!0},_isCanceled:{writable:!0,value:!1},_onCancel:{value:t}}),Object.defineProperty(this,"_promise",{value:new Promise(function(t,r){e(function(e){n._isCancelable=!1,t(e)},function(e){n._isCancelable=!1,r(e)},function(){return n._isCanceled})})})}
86return e.reject=function(t){return new e(function(e,n){n(t)},function(){})},e.resolve=function(t){return new e(function(e){e(t)},function(){})},e.prototype.cancel=function(){return this._isCancelable&&(this._isCanceled=!0,this._onCancel()),this},e.prototype.catch=function(){var t=[].slice.call(arguments),i=this._promise;return new e(function(e,a){i.catch.apply(i,r([],n(t))).then(e,a)},this._onCancel)},e.prototype.then=function(){var t=[].slice.call(arguments),i=this._promise;return new e(function(e,a){i.then.apply(i,r([],n(t))).then(e,a)},this._onCancel)},e.prototype.finally=function(){var t=[].slice.call(arguments),i=this._promise;return new e(function(e,a){i.finally.apply(i,r([],n(t))).then(e,a)},this._onCancel)},e}()})),require_cancelableroompromise=__commonJSMin(((e,t)=>{var n=require_cancelablepromise();function r(e,t,r,i){var a,o=Error(`Canceled`);return new n(function(c,u,K){var Y;e(function(e){return K()?n.reject(o):(Y=t(e),r(Y).then(function(e){if(K())throw o;return a=e(),a}))}).then(function(e){if(K())throw e.disconnect(),o;c(i(Y,e))}).catch(function(e){u(e)})},function(){a&&a.cancel()})}t.exports=r})),require_encodingparameters=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this)||this;return t=Object.assign({maxAudioBitrate:null,maxVideoBitrate:null},t),Object.defineProperties(r,{maxAudioBitrate:{value:t.maxAudioBitrate,writable:!0},maxVideoBitrate:{value:t.maxVideoBitrate,writable:!0},adaptiveSimulcast:{value:n}}),r}return t.prototype.toJSON=function(){return{maxAudioBitrate:this.maxAudioBitrate,maxVideoBitrate:this.maxVideoBitrate}},t.prototype.update=function(e){var t=this;e=Object.assign({maxAudioBitrate:this.maxAudioBitrate,maxVideoBitrate:this.maxVideoBitrate},e),[`maxAudioBitrate`,`maxVideoBitrate`].reduce(function(n,r){return t[r]!==e[r]&&(t[r]=e[r],n=!0),n},!1)&&this.emit(`changed`)},t}(require_events().EventEmitter)})),require_validate=__commonJSMin((e=>{var t=require_util().isNonArrayObject,n=require_constants(),r=n.typeErrors,i=n.clientTrackSwitchOffControl,a=n.videoContentPreferencesMode,o=n.subscriptionMode,c=n.trackPriority,u=n.trackSwitchOffMode;function K(e){var t=X(e,`options.bandwidthProfile`);return!e||t||(t=X(e.video,`options.bandwidthProfile.video`,[{prop:`contentPreferencesMode`,values:Object.values(a)},{prop:`dominantSpeakerPriority`,values:Object.values(c)},{prop:`maxSubscriptionBitrate`,type:`number`},{prop:`maxTracks`,type:`number`},{prop:`mode`,values:Object.values(o)},{prop:`clientTrackSwitchOffControl`,values:Object.values(i)},{prop:`trackSwitchOffMode`,values:Object.values(u)}]),t)?t:e.video?`maxTracks`in e.video&&`clientTrackSwitchOffControl`in e.video?TypeError(`options.bandwidthProfile.video.maxTracks is deprecated. Use options.bandwidthProfile.video.clientTrackSwitchOffControl instead.`):`renderDimensions`in e.video&&`contentPreferencesMode`in e.video?TypeError(`options.bandwidthProfile.video.renderDimensions is deprecated. Use options.bandwidthProfile.video.contentPreferencesMode instead.`):ee(e.video.renderDimensions):null}function Y(e,t){if(!(e instanceof t.LocalAudioTrack||e instanceof t.LocalDataTrack||e instanceof t.LocalVideoTrack||e instanceof t.MediaStreamTrack))throw r.INVALID_TYPE(`track`,`LocalAudioTrack, LocalVideoTrack, LocalDataTrack, or MediaStreamTrack`)}function X(e,n,i){return i===void 0&&(i=[]),e===void 0?null:e===null||!t(e)?r.INVALID_TYPE(n,`object`):i.reduce(function(t,i){var a=i.prop,o=i.type,c=i.values;if(t||!(a in e))return t;var u=e[a];return o&&typeof u!==o||o===`number`&&isNaN(u)?r.INVALID_TYPE(n+`.`+a,o):Array.isArray(c)&&!c.includes(u)?r.INVALID_VALUE(n+`.`+a,c):t},null)}function ee(e){var t=`options.bandwidthProfile.video.renderDimensions`,n=X(e,t);return e?n||Object.values(c).reduce(function(n,r){return n||X(e[r],t+`.`+r,[{prop:`height`,type:`number`},{prop:`width`,type:`number`}])},null):n}e.validateBandwidthProfile=K,e.validateLocalTrack=Y,e.validateObject=X}
86)),require_trackpublication=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_eventemitter(),i=require_util(),a=i.buildLogLevels,o=i.valueToJSON,c=require_constants().DEFAULT_LOG_LEVEL,u=require_log(),K=0;t.exports=function(e){n(t,e);function t(t,n,r){var i=e.call(this)||this;r=Object.assign({logLevel:c},r);var o=a(r.logLevel);return Object.defineProperties(i,{_instanceId:{value:K++},_log:{value:r.log?r.log.createLog(`default`,i):new u(`default`,i,o,r.loggerName)},trackName:{enumerable:!0,value:t},trackSid:{enumerable:!0,value:n}}),i}return t.prototype.toJSON=function(){return o(this)},t.prototype.toString=function(){return`[TrackPublication #`+this._instanceId+`: `+this.trackSid+`]`},t}(r)})),require_localtrackpublication$2=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},a=require_trackpublication(),o=require_constants(),c=o.typeErrors,u=o.trackPriority;t.exports=function(e){n(t,e);function t(t,n,a,o){var c=e.call(this,n.name,t.sid,o)||this;return Object.defineProperties(c,{_reemitSignalingEvent:{value:function(){var e=[...arguments];return c.emit.apply(c,i([e&&e.length?`warning`:`warningsCleared`],r(e)))}},_reemitTrackEvent:{value:function(){return c.emit(c.isTrackEnabled?`trackEnabled`:`trackDisabled`)}},_signaling:{value:t},_unpublish:{value:a},isTrackEnabled:{enumerable:!0,get:function(){return this.track.kind===`data`||this.track.isEnabled}},kind:{enumerable:!0,value:n.kind},priority:{enumerable:!0,get:function(){return t.updatedPriority}},track:{enumerable:!0,value:n}}),[`disabled`,`enabled`].forEach(function(e){return n.on(e,c._reemitTrackEvent)}),[`warning`,`warningsCleared`].forEach(function(e){return t.on(e,c._reemitSignalingEvent)}),c}return t.prototype.toString=function(){return`[LocalTrackPublication #`+this._instanceId+`: `+this.trackSid+`]`},t.prototype.setPriority=function(e){var t=Object.values(u);if(!t.includes(e))throw c.INVALID_VALUE(`priority`,t);return this._signaling.setPriority(e),this},t.prototype.unpublish=function(){var e=this;return[`disabled`,`enabled`].forEach(function(t){return e.track.removeListener(t,e._reemitTrackEvent)}),[`warning`,`warningsCleared`].forEach(function(t){return e._signaling.removeListener(t,e._reemitSignalingEvent)}),this._unpublish(this),this},t}(a)})),require_localaudiotrackpublication=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n,r,i){return e.call(this,t,n,r,i)||this}return t.prototype.toString=function(){return`[LocalAudioTrackPublication #`+this._instanceId+`: `+this.trackSid+`]`},t}(require_localtrackpublication$2())})),require_localdatatrackpublication=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
86t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n,r,i){return e.call(this,t,n,r,i)||this}return t.prototype.toString=function(){return`[LocalDataTrackPublication #`+this._instanceId+`: `+this.trackSid+`]`},t}(require_localtrackpublication$2())})),require_localvideotrackpublication=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n,r,i){return e.call(this,t,n,r,i)||this}return t.prototype.toString=function(){return`[LocalVideoTrackPublication #`+this._instanceId+`: `+this.trackSid+`]`},t}(require_localtrackpublication$2())})),require_remotemediatrack=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},a=require_constants(),o=a.typeErrors,c=a.trackPriority,u=require_browserdetection().isIOS,K=require_documentvisibilitymonitor();function Y(e){return function(e){n(t,e);function t(t,n,r,i,a,o,c){var K=this;return c=Object.assign({workaroundWebKitBug212780:u()&&typeof document==`object`&&typeof document.addEventListener==`function`&&typeof document.visibilityState==`string`},c),K=e.call(this,n,c)||this,Object.defineProperties(K,{_isEnabled:{value:r,writable:!0},_isSwitchedOff:{value:i,writable:!0},_priority:{value:null,writable:!0},_setPriority:{value:a},_setRenderHint:{value:function(e){K._log.debug(`updating render hint:`,e),o(e)}},isEnabled:{enumerable:!0,get:function(){return this._isEnabled}},isSwitchedOff:{enumerable:!0,get:function(){return this._isSwitchedOff}},priority:{enumerable:!0,get:function(){return this._priority}},sid:{enumerable:!0,value:t},_workaroundWebKitBug212780:{value:c.workaroundWebKitBug212780},_workaroundWebKitBug212780Cleanup:{value:null,writable:!0}}),K}return t.prototype.setPriority=function(e){var t=i([null],r(Object.values(c)));if(!t.includes(e))throw o.INVALID_VALUE(`priority`,t);return this._priority!==e&&(this._priority=e,this._setPriority(e)),this},t.prototype._setEnabled=function(e){this._isEnabled!==e&&(this._isEnabled=e,this.emit(this._isEnabled?`enabled`:`disabled`,this))},t.prototype._setSwitchedOff=function(e){this._isSwitchedOff!==e&&(this._isSwitchedOff=e,this.emit(e?`switchedOff`:`switchedOn`,this))},t.prototype.attach=function(t){var n=e.prototype.attach.call(this,t);return this.mediaStreamTrack.enabled!==!0&&(this.mediaStreamTrack.enabled=!0,this.processedTrack&&(this.processedTrack.enabled=!0),this.processor&&this._captureFrames()),this._workaroundWebKitBug212780&&(this._workaroundWebKitBug212780Cleanup=this._workaroundWebKitBug212780Cleanup||X(this)),n},t.prototype.detach=function(t){var n=e.prototype.detach.call(this,t);return this._attachments.size===0&&(this.mediaStreamTrack.enabled=!1,this.processedTrack&&(this.processedTrack.enabled=!1),this._workaroundWebKitBug212780Cleanup&&=(this._workaroundWebKitBug212780Cleanup(),null)),n},t}(e)}
86function X(e){var t=e._log,n=e.kind;function r(r){r&&e._attachments.forEach(function(r){var i=e._elShims.get(r);r.paused&&i&&!i.pausedIntentionally()&&(t.info(`Playing inadvertently paused <`+n+`> element`),t.debug(`Element:`,r),t.debug(`RemoteMediaTrack:`,e),r.play().then(function(){t.info(`Successfully played inadvertently paused <`+n+`> element`),t.debug(`Element:`,r),t.debug(`RemoteMediaTrack:`,e)}).catch(function(i){t.warn(`Error while playing inadvertently paused <`+n+`> element:`,{err:i,el:r,remoteMediaTrack:e})}))})}return K.onVisibilityChange(2,r),function(){K.offVisibilityChange(2,r)}}t.exports=Y})),require_remoteaudiotrack=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_audiotrack();t.exports=function(e){n(t,e);function t(t,n,r,i,a,o,c){return e.call(this,t,n,r,i,a,o,c)||this}return t.prototype.toString=function(){return`[RemoteAudioTrack #`+this._instanceId+`: `+this.sid+`]`},t.prototype._start=function(){e.prototype._start.call(this),this._dummyEl&&=(this._dummyEl.srcObject=null,null)},t.prototype.setPriority=function(t){return e.prototype.setPriority.call(this,t)},t}(require_remotemediatrack()(r))})),require_remotetrackpublication$2=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this,t.name,t.sid,n)||this;Object.defineProperties(r,{_signaling:{value:t},_track:{value:null,writable:!0},isSubscribed:{enumerable:!0,get:function(){return!!this._track}},isTrackEnabled:{enumerable:!0,get:function(){return t.isEnabled}},kind:{enumerable:!0,value:t.kind},publishPriority:{enumerable:!0,get:function(){return t.priority}},track:{enumerable:!0,get:function(){return this._track}}});var i=t.error,a=t.isEnabled,o=t.isSwitchedOff,c=t.priority;return t.on(`updated`,function(){if(i!==t.error){i=t.error,r.emit(`subscriptionFailed`,t.error);return}a!==t.isEnabled&&(a=t.isEnabled,r.track&&r.track._setEnabled(t.isEnabled),r.emit(t.isEnabled?`trackEnabled`:`trackDisabled`)),o!==t.isSwitchedOff&&(r._log.debug(r.trackSid+`: `+(o?`OFF`:`ON`)+` => `+(t.isSwitchedOff?`OFF`:`ON`)),o=t.isSwitchedOff,r.track?(r.track._setSwitchedOff(t.isSwitchedOff),r.emit(o?`trackSwitchedOff`:`trackSwitchedOn`,r.track)):o&&r._log.warn(`Track was not subscribed when switched Off.`)),c!==t.priority&&(c=t.priority,r.emit(`publishPriorityChanged`,c))}),r}return t.prototype.toString=function(){return`[RemoteTrackPublication #`+this._instanceId+`: `+this.trackSid+`]`},t.prototype._subscribed=function(e){!this._track&&e&&(this._track=e,this.emit(`subscribed`,e))},t.prototype._unsubscribe=function(){if(this._track){var e=this._track;this._track=null,this.emit(`unsubscribed`,e)}},t}(require_trackpublication())})),require_remoteaudiotrackpublication=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
86t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){return e.call(this,t,n)||this}return t.prototype.toString=function(){return`[RemoteAudioTrackPublication #`+this._instanceId+`: `+this.trackSid+`]`},t}(require_remotetrackpublication$2())})),require_remotedatatrack=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},a=require_track$1(),o=require_constants(),c=o.typeErrors,u=o.trackPriority;t.exports=function(e){n(t,e);function t(t,n,r){var i=e.call(this,n.id,`data`,r)||this;return Object.defineProperties(i,{_isSwitchedOff:{value:!1,writable:!0},_priority:{value:null,writable:!0},isEnabled:{enumerable:!0,value:!0},isSwitchedOff:{enumerable:!0,get:function(){return this._isSwitchedOff}},maxPacketLifeTime:{enumerable:!0,value:n.maxPacketLifeTime},maxRetransmits:{enumerable:!0,value:n.maxRetransmits},ordered:{enumerable:!0,value:n.ordered},priority:{enumerable:!0,get:function(){return this._priority}},reliable:{enumerable:!0,value:n.maxPacketLifeTime===null&&n.maxRetransmits===null},sid:{enumerable:!0,value:t}}),n.on(`message`,function(e){i.emit(`message`,e,i)}),i}return t.prototype.setPriority=function(e){var t=i([null],r(Object.values(u)));if(!t.includes(e))throw c.INVALID_VALUE(`priority`,t);return this._priority=e,this},t.prototype._setEnabled=function(){},t.prototype._setSwitchedOff=function(e){this._isSwitchedOff!==e&&(this._isSwitchedOff=e,this.emit(e?`switchedOff`:`switchedOn`,this))},t}(a)})),require_remotedatatrackpublication=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){return e.call(this,t,n)||this}return t.prototype.toString=function(){return`[RemoteDataTrackPublication #`+this._instanceId+`: `+this.trackSid+`]`},t}(require_remotetrackpublication$2())})),require_nullobserver=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=function(){function e(e){Object.defineProperties(this,{_callback:{value:e}})}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.makeVisible=function(e){var t=this._makeFakeEntry(e,!0);this._callback([t])},e.prototype.makeInvisible=function(e){var t=this._makeFakeEntry(e,!1);this._callback([t])},e.prototype._makeFakeEntry=function(e,t){return{target:e,isIntersecting:t}},e}();t.exports={NullIntersectionObserver:function(e){n(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(r),NullResizeObserver:function(e){n(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.resize=function(e){var t=this._makeFakeEntry(e,!0);this._callback([t])},t}(r),NullObserver:r}})),require_remotevideotrack=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
86t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=require_remotemediatrack(),a=require_videotrack(),o=require_documentvisibilitymonitor(),c=require_nullobserver().NullObserver,u=require_timeout(),K=i(a),Y=50,X=function(e){n(t,e);function t(t,n,r,i,a,o,K){var X=this;return K=Object.assign({clientTrackSwitchOffControl:`auto`,contentPreferencesMode:`auto`,enableDocumentVisibilityTurnOff:!0},K),K=Object.assign({IntersectionObserver:typeof IntersectionObserver>`u`||K.clientTrackSwitchOffControl!==`auto`?c:IntersectionObserver,ResizeObserver:typeof ResizeObserver>`u`||K.contentPreferencesMode!==`auto`?c:ResizeObserver},K),X=e.call(this,t,n,r,i,a,o,K)||this,Object.defineProperties(X,{_enableDocumentVisibilityTurnOff:{value:K.enableDocumentVisibilityTurnOff===!0&&K.clientTrackSwitchOffControl===`auto`},_documentVisibilityTurnOffCleanup:{value:null,writable:!0},_clientTrackSwitchOffControl:{value:K.clientTrackSwitchOffControl},_contentPreferencesMode:{value:K.contentPreferencesMode},_invisibleElements:{value:new WeakSet},_elToPipCallbacks:{value:new WeakMap},_elToPipWindows:{value:new WeakMap},_turnOffTimer:{value:new u(function(){X._setRenderHint({enabled:!1})},Y,!1)},_resizeObserver:{value:new K.ResizeObserver(function(e){e.find(function(e){return!X._invisibleElements.has(e.target)})&&ce(X)})},_intersectionObserver:{value:new K.IntersectionObserver(function(e){var t=!1;e.forEach(function(e){!X._invisibleElements.has(e.target)!==e.isIntersecting&&(e.isIntersecting?(X._log.debug(`intersectionObserver detected: Off => On`),X._invisibleElements.delete(e.target)):(X._log.debug(`intersectionObserver detected: On => Off`),X._invisibleElements.add(e.target)),t=!0)}),t&&(te(X),ce(X))},{threshold:.25})}}),X}return t.prototype._start=function(t){var n=e.prototype._start.call(this,t);return te(this),n},t.prototype.switchOn=function(){if(this._clientTrackSwitchOffControl!==`manual`)throw Error(`Invalid state. You can call switchOn only when bandwidthProfile.video.clientTrackSwitchOffControl is set to "manual"`);return this._setRenderHint({enabled:!0}),this},t.prototype.switchOff=function(){if(this._clientTrackSwitchOffControl!==`manual`)throw Error(`Invalid state. You can call switchOff only when bandwidthProfile.video.clientTrackSwitchOffControl is set to "manual"`);return this._setRenderHint({enabled:!1}),this},t.prototype.setContentPreferences=function(e){if(this._contentPreferencesMode!==`manual`)throw Error(`Invalid state. You can call switchOn only when bandwidthProfile.video.contentPreferencesMode is set to "manual"`);return e.renderDimensions&&this._setRenderHint({renderDimensions:e.renderDimensions}),this},t.prototype._unObservePip=function(e){var t=this._elToPipCallbacks.get(e);t&&(e.removeEventListener(`enterpictureinpicture`,t.onEnterPip),e.removeEventListener(`leavepictureinpicture`,t.onLeavePip),this._elToPipCallbacks.delete(e))},t.prototype._observePip=function(e){var t=this;if(!this._elToPipCallbacks.get(e)){var n=function(n){return t._onEnterPip(n,e)},r=function(n){return t._onLeavePip(n,e)};e.addEventListener(`enterpictureinpicture`,n),e.addEventListener(`leavepictureinpicture`,r),this._elToPipCallbacks.set(e,{onEnterPip:n,onLeavePip:r,onResizePip:function(n){return t._onResizePip(n,e)}})}},t.prototype._onEnterPip=function(e,t){this._log.debug(`onEnterPip`);var n=e.pictureInPictureWindow;this._elToPipWindows.set(t,n);var r=this._elToPipCallbacks.get(t).onResizePip;n.addEventListener(`resize`,r),te(this)},t.prototype._onLeavePip=function(e,t){this._log.debug(`onLeavePip`),this._elToPipWindows.delete(t);var n=this._elToPipCallbacks.get(t).onResizePip;e.pictureInPictureWindow.removeEventListener(`resize`,n),te(this)},t.prototype._onResizePip=function(){ce(this)},t.prototype.attach=function(t){var n=e.prototype.attach.call(this,t);return this._clientTrackSwitchOffControl===`auto`&&this._invisibleElements.add(n),this._intersectionObserver.observe(n),this._resizeObserver.observe(n),this._enableDocumentVisibilityTurnOff&&(this._documentVisibilityTurnOffCleanup=this._documentVisibilityTurnOffCleanup||ee(this)),this._observePip(n),n},t.prototype.detach=function(t){var n=this,r=e.prototype.detach.call(this,t);
86return(Array.isArray(r)?r:[r]).forEach(function(e){n._intersectionObserver.unobserve(e),n._resizeObserver.unobserve(e),n._invisibleElements.delete(e),n._unObservePip(e)}),this._attachments.size===0&&(this._documentVisibilityTurnOffCleanup&&=(this._documentVisibilityTurnOffCleanup(),null)),te(this),ce(this),r},t.prototype.addProcessor=function(){return e.prototype.addProcessor.apply(this,arguments)},t.prototype.removeProcessor=function(){return e.prototype.removeProcessor.apply(this,arguments)},t.prototype.toString=function(){return`[RemoteVideoTrack #`+this._instanceId+`: `+this.sid+`]`},t.prototype.setPriority=function(t){return e.prototype.setPriority.call(this,t)},t}(K);function ee(e){function t(){te(e)}return o.onVisibilityChange(1,t),function(){o.offVisibilityChange(1,t)}}function te(e){if(e._clientTrackSwitchOffControl===`auto`){var t=e._getAllAttachedElements().filter(function(t){return!e._invisibleElements.has(t)});e._getAllAttachedElements().filter(function(t){return e._elToPipWindows.has(t)}).length>0||document.visibilityState===`visible`&&t.length>0?(e._turnOffTimer.clear(),e._setRenderHint({enabled:!0})):e._turnOffTimer.isSet||e._turnOffTimer.start()}}function ce(e){if(e._contentPreferencesMode===`auto`){var t=e._getAllAttachedElements().filter(function(t){return!e._invisibleElements.has(t)}),n=e._getAllAttachedElements().map(function(t){var n=e._elToPipWindows.get(t);return n?{clientHeight:n.height,clientWidth:n.width}:{clientHeight:0,clientWidth:0}}),i=t.concat(n);if(i.length>0){var a=r(i.sort(function(e,t){return t.clientHeight+t.clientWidth-e.clientHeight-e.clientWidth-1}),1)[0],o={height:a.clientHeight,width:a.clientWidth};e._setRenderHint({renderDimensions:o})}}}t.exports=X})),require_remotevideotrackpublication=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){return e.call(this,t,n)||this}return t.prototype.toString=function(){return`[RemoteVideoTrackPublication #`+this._instanceId+`: `+this.trackSid+`]`},t}(require_remotetrackpublication$2())})),require_participant$1=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},a=require_eventemitter(),o=require_remoteaudiotrack(),c=require_remoteaudiotrackpublication(),u=require_remotedatatrack(),K=require_remotedatatrackpublication(),Y=require_remotevideotrack(),X=require_remotevideotrackpublication(),ee=require_util(),te=0,ce=function(e){n(t,e);function t(t,n){var r=e.call(this)||this;n=Object.assign({RemoteAudioTrack:o,RemoteAudioTrackPublication:c,RemoteDataTrack:u,RemoteDataTrackPublication:K,RemoteVideoTrack:Y,RemoteVideoTrackPublication:X,tracks:[]},n);var i=ue(n.tracks),a=n.log.createLog(`default`,r),ee=new Map(i.audioTracks),ce=new Map(i.dataTracks),me=new Map(i.tracks),ge=new Map(i.videoTracks);return Object.defineProperties(r,{_RemoteAudioTrack:{value:n.RemoteAudioTrack},_RemoteAudioTrackPublication:{value:n.RemoteAudioTrackPublication},_RemoteDataTrack:{value:n.RemoteDataTrack},_RemoteDataTrackPublication:{value:n.RemoteDataTrackPublication},_RemoteVideoTrack:{value:n.RemoteVideoTrack},_RemoteVideoTrackPublication:{value:n.RemoteVideoTrackPublication},_audioTracks:{value:ee},_dataTracks:{value:ce},_instanceId:{value:++te},_clientTrackSwitchOffControl:{value:n.clientTrackSwitchOffControl},_contentPreferencesMode:{value:n.contentPreferencesMode},_log:{value:a},_signaling:{value:t},_tracks:{value:me},_trackEventReemitters:{value:new Map},_trackPublicationEventReemitters:{value:new Map},_trackSignalingUpdatedEventCallbacks:{value:new Map},_videoTracks:{value:ge},audioTracks:{enumerable:!0,value:new Map},dataTracks:{enumerable:!0,value:new Map},identity:{enumerable:!0,get:function(){return t.identity}},networkQualityLevel:{enumerable:!0,get:function(){return t.networkQualityLevel}},networkQualityStats:{enumerable:!0,get:function(){return t.networkQualityStats}},sid:{enumerable:!0,get:function(){return t.sid}},state:{enumerable:!0,get:function(){return t.state}},tracks:{enumerable:!0,value:new Map},videoTracks:{enumerable:!0,value:new Map}}),r._tracks.forEach(fe.bind(null,r)),t.on(`networkQualityLevelChanged`,function(){return r.emit(`networkQualityLevelChanged`,r.networkQualityLevel,r.networkQualityStats&&(r.networkQualityStats.audio||r.networkQualityStats.video)?r.networkQualityStats:null)}),de(r,t),a.info(`Created a new Participant`+(r.identity?`: `+r.identity:``)),r}return t.prototype._getTrackEvents=function(){return[[`dimensionsChanged`,`trackDimensionsChanged`],[`message`,`trackMessage`],[`started`,`trackStarted`]]},t.prototype._getTrackPublicationEvents=function(){return[]},t.prototype.toString=function(){return`[Participant #`+this._instanceId+`: `+this.sid+`]`},t.prototype._addTrack=function(e,t){var n=this._log;return this._tracks.has(t)?null:(this._tracks.set(t,e),{audio:this._audioTracks,video:this._videoTracks,data:this._dataTracks}[e.kind].set(t,e),fe(this,e,t),n.info(`Added a new `+ee.trackClass(e)+`:`,t),n.debug(ee.trackClass(e)+`:`,e),e)},t.prototype._addTrackPublication=function(e){var t=this._log;return this.tracks.has(e.trackSid)?null:(this.tracks.set(e.trackSid,e),{audio:this.audioTracks,data:this.dataTracks,video:this.videoTracks}[e.kind].set(e.trackSid,e),me(this,e),t.info(`Added a new `+ee.trackPublicationClass(e)+`:`,e.trackSid),t.debug(ee.trackPublicationClass(e)+`:`,e),e)},t.prototype._handleTrackSignalingEvents=function(){var e=this,t=e._log,
86n=e._clientTrackSwitchOffControl,i=e._contentPreferencesMode,a=this;if(this.state===`disconnected`)return;var o=this._RemoteAudioTrack,c=this._RemoteAudioTrackPublication,u=this._RemoteVideoTrack,K=this._RemoteVideoTrackPublication,Y=this._RemoteDataTrack,X=this._RemoteDataTrackPublication,ee=this._signaling;function te(e){var n={audio:c,data:X,video:K}[e.kind],r=new n(e,{log:t});a._addTrackPublication(r);var i=e.isSubscribed;i&&ue(e),a._trackSignalingUpdatedEventCallbacks.set(e.sid,function(){if(i!==e.isSubscribed){if(i=e.isSubscribed,i){ue(e);return}de(e)}}),e.on(`updated`,a._trackSignalingUpdatedEventCallbacks.get(e.sid))}function ce(e){e.isSubscribed&&e.setTrackTransceiver(null);var t=a._trackSignalingUpdatedEventCallbacks.get(e.sid);t&&(e.removeListener(`updated`,t),a._trackSignalingUpdatedEventCallbacks.delete(e.sid));var n=a.tracks.get(e.sid);n&&a._removeTrackPublication(n)}function ue(e){var r=e.isEnabled,c=e.name,K=e.kind,X=e.sid,te=e.trackTransceiver,ce=e.isSwitchedOff,ue={audio:o,video:u,data:Y}[K],de=a.tracks.get(X);if(ue&&K===te.kind){var fe={log:t,name:c,clientTrackSwitchOffControl:n,contentPreferencesMode:i},me=K===`data`?new ue(X,te,fe):new ue(X,te,r,ce,function(e){return ee.updateSubscriberTrackPriority(X,e)},function(t){e.isSubscribed&&ee.updateTrackRenderHint(X,t)},fe);a._addTrack(me,de,te.id)}}function de(e){var t=r(Array.from(a._tracks.entries()).find(function(t){return r(t,2)[1].sid===e.sid}),2),n=t[0],i=t[1],o=a.tracks.get(e.sid);i&&a._removeTrack(i,o,n)}ee.on(`trackAdded`,te),ee.on(`trackRemoved`,ce),ee.tracks.forEach(te),ee.on(`stateChanged`,function e(n){n===`disconnected`?(t.debug(`Removing event listeners`),ee.removeListener(`stateChanged`,e),ee.removeListener(`trackAdded`,te),ee.removeListener(`trackRemoved`,ce)):n===`connected`&&(t.info(`reconnected`),setTimeout(function(){return a.emit(`reconnected`)},0))})},t.prototype._removeTrack=function(e,t){if(!this._tracks.has(t))return null;this._tracks.delete(t),{audio:this._audioTracks,video:this._videoTracks,data:this._dataTracks}[e.kind].delete(t),(this._trackEventReemitters.get(t)||new Map).forEach(function(t,n){e.removeListener(n,t)});var n=this._log;return n.info(`Removed a `+ee.trackClass(e)+`:`,t),n.debug(ee.trackClass(e)+`:`,e),e},t.prototype._removeTrackPublication=function(e){if(e=this.tracks.get(e.trackSid),!e)return null;this.tracks.delete(e.trackSid),{audio:this.audioTracks,data:this.dataTracks,video:this.videoTracks}[e.kind].delete(e.trackSid),(this._trackPublicationEventReemitters.get(e.trackSid)||new Map).forEach(function(t,n){e.removeListener(n,t)});var t=this._log;return t.info(`Removed a `+ee.trackPublicationClass(e)+`:`,e.trackSid),t.debug(ee.trackPublicationClass(e)+`:`,e),e},t.prototype.toJSON=function(){return ee.valueToJSON(this)},t}(a);function ue(e){var t=e.map(function(e){return[e.id,e]}),n=t.filter(function(e){return e[1].kind===`audio`}),r=t.filter(function(e){return e[1].kind===`video`});return{audioTracks:n,dataTracks:t.filter(function(e){return e[1].kind===`data`}),tracks:t,videoTracks:r}}function de(e,t){var n=e._log;e.state!==`disconnected`&&t.on(`stateChanged`,function r(i){n.debug(`Transitioned to state:`,i),e.emit(i,e),i===`disconnected`&&(n.debug(`Removing Track event reemitters`),t.removeListener(`stateChanged`,r),e._tracks.forEach(function(t){var n=e._trackEventReemitters.get(t.id);t&&n&&n.forEach(function(e,n){t.removeListener(n,e)})}),t.tracks.forEach(function(t){var n=e._tracks.get(t.id),r=e._trackEventReemitters.get(t.id);n&&r&&r.forEach(function(e,t){n.removeListener(t,e)})}),e._trackEventReemitters.clear(),e.tracks.forEach(function(t){e._trackPublicationEventReemitters.get(t.trackSid).forEach(function(e,n){t.removeListener(n,e)})}),e._trackPublicationEventReemitters.clear())})}function fe(e,t,n){var a=new Map;e.state!==`disconnected`&&(e._getTrackEvents().forEach(function(n){var o=n[0],c=n[1];a.set(o,function(){var t=[c].concat([].slice.call(arguments));return e.emit.apply(e,i([],r(t)))}),t.on(o,a.get(o))}),e._trackEventReemitters.set(n,a))}function me(e,t){var n=new Map;e.state!==`disconnected`&&(e._getTrackPublicationEvents().forEac
86h(function(a){var o=r(a,2),c=o[0],u=o[1];n.set(c,function(){var n=[...arguments];e.emit.apply(e,i(i([u],r(n)),[t]))}),t.on(c,n.get(c))}),e._trackPublicationEventReemitters.set(t.trackSid,n))}t.exports=ce})),require_localparticipant$2=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_webrtc().MediaStreamTrack,i=require_util(),a=i.asLocalTrack,o=i.asLocalTrackPublication,c=i.trackClass,u=require_constants(),K=u.typeErrors,Y=u.trackPriority,X=require_validate().validateLocalTrack,ee=require_es5$1(),te=ee.LocalAudioTrack,ce=ee.LocalDataTrack,ue=ee.LocalVideoTrack,de=require_localaudiotrackpublication(),fe=require_localdatatrackpublication(),me=require_localvideotrackpublication(),ge=function(e){n(t,e);function t(t,n,i){var a=this;i=Object.assign({LocalAudioTrack:te,LocalVideoTrack:ue,LocalDataTrack:ce,MediaStreamTrack:r,LocalAudioTrackPublication:de,LocalVideoTrackPublication:me,LocalDataTrackPublication:fe,shouldStopLocalTracks:!1,tracks:n},i);var o=i.shouldStopLocalTracks?new Set(n.filter(function(e){return e.kind!==`data`})):new Set;return a=e.call(this,t,i)||this,Object.defineProperties(a,{_eventObserver:{value:i.eventObserver},_LocalAudioTrack:{value:i.LocalAudioTrack},_LocalDataTrack:{value:i.LocalDataTrack},_LocalVideoTrack:{value:i.LocalVideoTrack},_MediaStreamTrack:{value:i.MediaStreamTrack},_LocalAudioTrackPublication:{value:i.LocalAudioTrackPublication},_LocalDataTrackPublication:{value:i.LocalDataTrackPublication},_LocalVideoTrackPublication:{value:i.LocalVideoTrackPublication},_tracksToStop:{value:o},signalingRegion:{enumerable:!0,get:function(){return t.signalingRegion}}}),a._handleTrackSignalingEvents(),a}return t.prototype._addTrack=function(t,n,r){var i=e.prototype._addTrack.call(this,t,n);return i&&this.state!==`disconnected`&&this._addLocalTrack(t,r),i},t.prototype._addLocalTrack=function(e,t){var n,r=e.noiseCancellation?.vendor;this._signaling.addTrack(e._trackSender,e.name,t,r),this._log.info(`Added a new `+c(e,!0)+`:`,e.id),this._log.debug(c(e,!0)+`:`,e)},t.prototype._removeTrack=function(t,n){var r=e.prototype._removeTrack.call(this,t,n);return r&&this.state!==`disconnected`&&(this._signaling.removeTrack(t._trackSender),this._log.info(`Removed a `+c(t,!0)+`:`,t.id),this._log.debug(c(t,!0)+`:`,t)),r},t.prototype._getTrackEvents=function(){return e.prototype._getTrackEvents.call(this).concat([[`disabled`,`trackDisabled`],[`enabled`,`trackEnabled`],[`stopped`,`trackStopped`]])},t.prototype.toString=function(){return`[LocalParticipant #`+this._instanceId+(this.sid?`: `+this.sid:``)+`]`},t.prototype._handleTrackSignalingEvents=function(){var e=this,t=this._log;if(this.state!==`disconnected`){var n=function(n){var r=e._signaling.getPublication(n._trackSender);r&&(r.disable(),t.debug(`Disabled the `+c(n,!0)+`:`,n.id))},r=function(n){var r=e._signaling.getPublication(n._trackSender);r&&(r.enable(),t.debug(`Enabled the `+c(n,!0)+`:`,n.id))},i=function(t){var n=e._signaling.getPublication(t._trackSender);return n&&n.stop(),n},a=function(o){t.debug(`Transitioned to state:`,o),o===`disconnected`?(t.debug(`Removing LocalTrack event listeners`),e._signaling.removeListener(`stateChanged`,a),e.removeListener(`trackDisabled`,n),e.removeListener(`trackEnabled`,r),e.removeListener(`trackStopped`,i),e._tracks.forEach(function(e){var t=i(e);t&&e._trackSender.removeClone(t._trackTransceiver)}),t.info(`LocalParticipant disconnected. Stopping `+e._tracksToStop.size+` automatically-acquired LocalTracks`),e._tracksToStop.forEach(function(e){e.stop()})):o===`connected`&&(t.info(`reconnected`),setTimeout(function(){return e.emit(`reconnected`)},0))};this.on(`trackDisabled`,n),this.on(`trackEnabled`,r),this.on(`trackStopped`,i),this._signaling.on(`stateChanged`,a),this._tracks.forEach(function(n){e._addLocalTrack(n,Y.PRIORITY_STANDARD),e._getOrCreateLocalTrackPublication(n).catch(function(e){t.warn(`Failed to get or create LocalTrackPublication for `+n+`:`,e)}
86)})}},t.prototype._getOrCreateLocalTrackPublication=function(e){var t=Te(this.tracks,e);if(t)return Promise.resolve(t);var n=this._log,r=this,i=this._signaling.getPublication(e._trackSender);return i?new Promise(function(a,u){function K(){var Y=i.error;if(Y){i.removeListener(`updated`,K),n.warn(`Failed to publish the `+c(e,!0)+`: `+Y.message),r._removeTrack(e,e.id),setTimeout(function(){r.emit(`trackPublicationFailed`,Y,e)}),u(Y);return}if(!r._tracks.has(e.id)){i.removeListener(`updated`,K),u(Error(`The `+e+` was unpublished`));return}if(i.sid){i.removeListener(`updated`,K);var X={log:n,LocalAudioTrackPublication:r._LocalAudioTrackPublication,LocalDataTrackPublication:r._LocalDataTrackPublication,LocalVideoTrackPublication:r._LocalVideoTrackPublication};t=Te(r.tracks,e);var ee=function(e){return r.emit(`trackWarning`,e,t)},te=function(){return r.emit(`trackWarningsCleared`,t)};t||(t=o(e,i,function(e){t.removeListener(`trackWarning`,ee),t.removeListener(`trackWarningsCleared`,te),r.unpublishTrack(e.track)},X),r._addTrackPublication(t)),t.on(`warning`,ee),t.on(`warningsCleared`,te);var ce=r._signaling.state;(ce===`connected`||ce===`connecting`)&&(e._processorEventObserver&&e._processorEventObserver.on(`event`,function(e){r._eventObserver.emit(`event`,{name:e.name,payload:e.data,group:`video-processor`,level:`info`})}),e.processedTrack&&(e._captureFrames(),e._setSenderMediaStreamTrack(!0))),ce===`connected`&&setTimeout(function(){r.emit(`trackPublished`,t)}),a(t)}}i.on(`updated`,K)}):Promise.reject(Error(`Unexpected error: The `+e+` cannot be published`))},t.prototype.publishTrack=function(e,t){var n=Te(this.tracks,e);if(n)return Promise.resolve(n);t=Object.assign({log:this._log,priority:Y.PRIORITY_STANDARD,LocalAudioTrack:this._LocalAudioTrack,LocalDataTrack:this._LocalDataTrack,LocalVideoTrack:this._LocalVideoTrack,MediaStreamTrack:this._MediaStreamTrack},t);var r;try{r=a(e,t)}catch(e){return Promise.reject(e)}var i=r.noiseCancellation,o=this._signaling.audioProcessors;i&&!o.includes(i.vendor)&&(this._log.warn(i.vendor+` is not supported in this room. disabling it permanently`),i.disablePermanently());var c=Object.values(Y);if(!c.includes(t.priority))return Promise.reject(K.INVALID_VALUE(`LocalTrackPublishOptions.priority`,c));var u=this._addTrack(r,r.id,t.priority)||this._tracks.get(r.id);return this._getOrCreateLocalTrackPublication(u)},t.prototype.publishTracks=function(e){if(!Array.isArray(e))throw K.INVALID_TYPE(`tracks`,`Array of LocalAudioTrack, LocalVideoTrack, LocalDataTrack, or MediaStreamTrack`);return Promise.all(e.map(this.publishTrack,this))},t.prototype.setBandwidthProfile=function(){this._log.warn(`setBandwidthProfile is not implemented yet and may be available in future versions of twilio-video.js`)},t.prototype.setNetworkQualityConfiguration=function(e){if(typeof e!=`object`||!e)throw K.INVALID_TYPE(`networkQualityConfiguration`,`NetworkQualityConfiguration`);return[`local`,`remote`].forEach(function(t){if(t in e&&(typeof e[t]!=`number`||isNaN(e[t])))throw K.INVALID_TYPE(`networkQualityConfiguration.`+t,`number`)}),this._signaling.setNetworkQualityConfiguration(e),this},t.prototype.setParameters=function(e){if(e!==void 0&&typeof e!=`object`)throw K.INVALID_TYPE(`encodingParameters`,`EncodingParameters, null or undefined`);if(e){if(this._signaling.getParameters().adaptiveSimulcast&&e.maxVideoBitrate)throw K.INVALID_TYPE(`encodingParameters`,`encodingParameters.maxVideoBitrate is not compatible with "preferredVideoCodecs=auto"`);[`maxAudioBitrate`,`maxVideoBitrate`].forEach(function(t){if(e[t]!==void 0&&typeof e[t]!=`number`&&e[t]!==null)throw K.INVALID_TYPE(`encodingParameters.`+t,`number, null or undefined`)})}else e===null&&(e={maxAudioBitrate:null,maxVideoBitrate:null});return this._signaling.setParameters(e),this},t.prototype.unpublishTrack=function(e){X(e,{LocalAudioTrack:this._LocalAudioTrack,LocalDataTrack:this._LocalDataTrack,LocalVideoTrack:this._LocalVideoTrack,MediaStreamTrack:this._MediaStreamTrack});var t=this._tracks.get(e.id);if(!t||(this._signaling.getPublication(t._trackSender).publishFailed(Error(`The `+t+` was unpublished`)),t=this._removeTrack(t,t.id),!t))return null;var n=Te(this.tracks,t);return n&&this._removeTrackPublication(n),n},t.prototype.unpublishTracks=function(e){var t=this;if(!Array.isArray(e))throw K.INVALID_TYPE(`tracks`,`Array of LocalAudioTrack, LocalVideoTrack, LocalDataTrack, or MediaStreamTrack`);return e.reduce(function(e,n){var r=t.unpublishTrack(n);return r?e.concat(r):e},[])},t}(require_participant$1());function Te(e,t){return Array.from(e.values()).find(function(e){return e.track===t||e.track.mediaStreamTrack===t})||null}t.exports=ge})),require_null=__commonJSMin(((e,t)=>{t.exports=function(){function e(){Object.defineProperties(this,{_c
86onnected:{writable:!0,value:!0}})}return e.prototype.connect=function(){},e.prototype.disconnect=function(){return this._connected?(this._connected=!1,!0):!1},e.prototype.publish=function(){return this._connected},e}()})),require_networkqualityconfiguration=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=require_events().EventEmitter,a=require_constants(),o=a.DEFAULT_NQ_LEVEL_LOCAL,c=a.DEFAULT_NQ_LEVEL_REMOTE,u=a.MAX_NQ_LEVEL,K=require_util().inRange;t.exports=function(e){n(t,e);function t(t){var n=e.call(this)||this;return t=Object.assign({local:o,remote:c},t),Object.defineProperties(n,{local:{value:K(t.local,o,u)?t.local:o,writable:!0},remote:{value:K(t.remote,c,u)?t.remote:c,writable:!0}}),n}return t.prototype.update=function(e){var t=this;e=Object.assign({local:this.local,remote:this.remote},e),[[`local`,o,3],[`remote`,c,3]].forEach(function(n){var i=r(n,3),a=i[0],o=i[1],c=i[2];t[a]=typeof e[a]==`number`&&K(e[a],o,c)?e[a]:o})},t}(i)})),require_remoteparticipant$2=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r._handleTrackSignalingEvents(),r.once(`disconnected`,r._unsubscribeTracks.bind(r)),r}return t.prototype.toString=function(){return`[RemoteParticipant #`+this._instanceId+(this.sid?`: `+this.sid:``)+`]`},t.prototype._addTrack=function(t,n,r){return e.prototype._addTrack.call(this,t,r)?(n._subscribed(t),this.emit(`trackSubscribed`,t,n),t):null},t.prototype._addTrackPublication=function(t){var n=e.prototype._addTrackPublication.call(this,t);return n?(this.emit(`trackPublished`,n),n):null},t.prototype._getTrackPublicationEvents=function(){return i(i([],r(e.prototype._getTrackPublicationEvents.call(this))),[[`subscriptionFailed`,`trackSubscriptionFailed`],[`trackDisabled`,`trackDisabled`],[`trackEnabled`,`trackEnabled`],[`publishPriorityChanged`,`trackPublishPriorityChanged`],[`trackSwitchedOff`,`trackSwitchedOff`],[`trackSwitchedOn`,`trackSwitchedOn`]])},t.prototype._unsubscribeTracks=function(){var e=this;this.tracks.forEach(function(t){if(t.isSubscribed){var n=t.track;t._unsubscribe(),e.emit(`trackUnsubscribed`,n,t)}})},t.prototype._removeTrack=function(t,n,r){var i=this._tracks.get(r);return i?(e.prototype._removeTrack.call(this,i,r),n._unsubscribe(),this.emit(`trackUnsubscribed`,i,n),i):null},t.prototype._removeTrackPublication=function(t){this._signaling.clearTrackHint(t.trackSid);var n=e.prototype._removeTrackPublication.call(this,t);
86return n?(this.emit(`trackUnpublished`,n),n):null},t}(require_participant$1())})),require_trackstats=__commonJSMin(((e,t)=>{t.exports=function(){function e(e,t){if(typeof e!=`string`)throw Error(`Track id must be a string`);Object.defineProperties(this,{trackId:{value:e,enumerable:!0},trackSid:{value:t.trackSid,enumerable:!0},timestamp:{value:t.timestamp,enumerable:!0},ssrc:{value:t.ssrc,enumerable:!0},packetsLost:{value:typeof t.packetsLost==`number`?t.packetsLost:null,enumerable:!0},codec:{value:typeof t.codecName==`string`?t.codecName:null,enumerable:!0}})}return e}()})),require_localtrackstats=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n,r){var i=e.call(this,t,n)||this;return Object.defineProperties(i,{bytesSent:{value:typeof n.bytesSent==`number`?n.bytesSent:r?0:null,enumerable:!0},packetsSent:{value:typeof n.packetsSent==`number`?n.packetsSent:r?0:null,enumerable:!0},roundTripTime:{value:typeof n.roundTripTime==`number`?n.roundTripTime:r?0:null,enumerable:!0}}),i}return t}(require_trackstats())})),require_localaudiotrackstats=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return Object.defineProperties(i,{audioLevel:{value:typeof n.audioInputLevel==`number`?n.audioInputLevel:null,enumerable:!0},jitter:{value:typeof n.jitter==`number`?n.jitter:null,enumerable:!0}}),i}return t}(require_localtrackstats())})),require_localvideotrackstats=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this,a=null;typeof n.frameWidthInput==`number`&&typeof n.frameHeightInput==`number`&&(a={},Object.defineProperties(a,{width:{value:n.frameWidthInput,enumerable:!0},height:{value:n.frameHeightInput,enumerable:!0}}));var o=null;return typeof n.frameWidthSent==`number`&&typeof n.frameHeightSent==`number`&&(o={},Object.defineProperties(o,{width:{value:n.frameWidthSent,enumerable:!0},height:{value:n.frameHeightSent,enumerable:!0}})),Object.defineProperties(i,{captureDimensions:{value:a,enumerable:!0},dimensions:{value:o,enumerable:!0},captureFrameRate:{value:typeof n.frameRateInput==`number`?n.frameRateInput:null,enumerable:!0},frameRate:{value:typeof n.frameRateSent==`number`?n.frameRateSent:null,enumerable:!0}}),i}return t}(require_localtrackstats())})),require_remotetrackstats=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
86t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this,t,n)||this;return Object.defineProperties(r,{bytesReceived:{value:typeof n.bytesReceived==`number`?n.bytesReceived:null,enumerable:!0},packetsReceived:{value:typeof n.packetsReceived==`number`?n.packetsReceived:null,enumerable:!0}}),r}return t}(require_trackstats())})),require_remoteaudiotrackstats=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this,t,n)||this;return Object.defineProperties(r,{audioLevel:{value:typeof n.audioOutputLevel==`number`?n.audioOutputLevel:null,enumerable:!0},jitter:{value:typeof n.jitter==`number`?n.jitter:null,enumerable:!0}}),r}return t}(require_remotetrackstats())})),require_remotevideotrackstats=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=null;return typeof n.frameWidthReceived==`number`&&typeof n.frameHeightReceived==`number`&&(i={},Object.defineProperties(i,{width:{value:n.frameWidthReceived,enumerable:!0},height:{value:n.frameHeightReceived,enumerable:!0}})),Object.defineProperties(r,{dimensions:{value:i,enumerable:!0},frameRate:{value:typeof n.frameRateReceived==`number`?n.frameRateReceived:null,enumerable:!0}}),r}return t}(require_remotetrackstats())})),require_statsreport=__commonJSMin(((e,t)=>{var n=require_localaudiotrackstats(),r=require_localvideotrackstats(),i=require_remoteaudiotrackstats(),a=require_remotevideotrackstats();t.exports=function(){function e(e,t,o){if(typeof e!=`string`)throw Error(`RTCPeerConnection id must be a string`);Object.defineProperties(this,{peerConnectionId:{value:e,enumerable:!0},localAudioTrackStats:{value:t.localAudioTrackStats.map(function(e){return new n(e.trackId,e,o)}),enumerable:!0},localVideoTrackStats:{value:t.localVideoTrackStats.map(function(e){return new r(e.trackId,e,o)}),enumerable:!0},remoteAudioTrackStats:{value:t.remoteAudioTrackStats.map(function(e){return new i(e.trackId,e)}),enumerable:!0},remoteVideoTrackStats:{value:t.remoteVideoTrackStats.map(function(e){return new a(e.trackId,e)}),enumerable:!0}})}return e}()})),require_room$2=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},a=require_eventemitter(),o=require_remoteparticipant$2(),c=require_statsreport(),u=require_util(),K=u.flatMap,Y=u.valueToJSON,X=0,ee=function(e){n(t,e);function t(t,n,r){var i=e.call(this)||this,a=r.log.createLog(`default`,i),o=new Map;return Object.defineProperties(i,{_log:{value:a},_clientTrackSwitchOffControl:{value:r.clientTrackSwitchOffControl||`disabled`},_contentPreferencesMode:{value:r.contentPreferencesMode||`disabled`},_instanceId:{value:++X},_options:{value:r},_participants:{value:o},_signaling:{value:n},dominantSpeaker:{enumerable:!0,get:function(){return this.participants.get(n.dominantSpeakerSid)||null}},isRecording:{enumerable:!0,get:function(){return n.recording.isEnabled||!1}},localParticipant:{enumerable:!0,value:t},name:{enumerable:!0,value:n.name},participants:{enumerable:!0,value:o},sid:{enumerable:!0,value:n.sid},state:{enumerable:!0,get:function(){return n.state}},mediaRegion:{enumerable:!0,value:n.mediaRegion}}),de(i,t),fe(i,n.recording),me(i,n),te(i),a.info(`Created a new Room:`,i.name),a.debug(`Initial RemoteParticipants:`,Array.from(i._participants.values())
86),i}return t.prototype.toString=function(){return`[Room #`+this._instanceId+`: `+this.sid+`]`},t.prototype.disconnect=function(){return this._log.info(`Disconnecting`),this._signaling.disconnect(),this},t.prototype.getStats=function(){var e=this;return this._signaling.getStats().then(function(t){return Array.from(t).map(function(t){var n=r(t,2),i=n[0],a=n[1];return new c(i,Object.assign({},a,{localAudioTrackStats:ce(e,a.localAudioTrackStats),localVideoTrackStats:ce(e,a.localVideoTrackStats)}))})})},t.prototype.refreshInactiveMedia=function(){var e=this.localParticipant.tracks,t=Array.from(e.values()).filter(function(e){return e.track.kind!==`data`}).map(function(e){return e.track}),n=K(this.participants,function(e){return Array.from(e.tracks.values())}).filter(function(e){var t=e.track;return t&&t.kind!==`data`}).map(function(e){return e.track}),r=t.concat(n),i=new Event(`unmute`);t.forEach(function(e){var t=e.isMuted,n=e.mediaStreamTrack;t&&n.dispatchEvent(i)});var a=new Event(`pause`);return r.forEach(function(e){var t=e._attachments,n=e._elShims;return t.forEach(function(e){var t=n.get(e);e.paused&&t&&!t.pausedIntentionally()&&e.dispatchEvent(a)})}),this},t.prototype.toJSON=function(){return Y(this)},t}(a);function te(e){var t=e.localParticipant._signaling.audioProcessors;e.localParticipant.audioTracks.forEach(function(n){var r=n.track.noiseCancellation;r&&!t.includes(r.vendor)&&(e._log.warn(r.vendor+` is not supported in this room. disabling it permanently`),r.disablePermanently())})}function ce(e,t){var n=e.localParticipant._signaling;return t.reduce(function(e,t){var r=n.tracks.get(t.trackId),i=n.getSender(r);return i?[Object.assign({},t,{trackId:i.id})].concat(e):e},[])}function ue(e,t){var n=e._log,a=e._clientTrackSwitchOffControl,c=e._contentPreferencesMode,u=new o(t,{log:n,clientTrackSwitchOffControl:a,contentPreferencesMode:c});n.info(`A new RemoteParticipant connected:`,u),e._participants.set(u.sid,u),e.emit(`participantConnected`,u);var K=[[`reconnected`,`participantReconnected`],[`reconnecting`,`participantReconnecting`],`trackDimensionsChanged`,`trackDisabled`,`trackEnabled`,`trackMessage`,`trackPublished`,`trackPublishPriorityChanged`,`trackStarted`,`trackSubscribed`,`trackSubscriptionFailed`,`trackSwitchedOff`,`trackSwitchedOn`,`trackUnpublished`,`trackUnsubscribed`].map(function(t){var n=r(Array.isArray(t)?t:[t,t],2),a=n[0],o=n[1];function c(){var t=[].slice.call(arguments);t.unshift(o),t.push(u),e.emit.apply(e,i([],r(t)))}return u.on(a,c),[a,c]});u.once(`disconnected`,function(){var t=e.dominantSpeaker;n.info(`RemoteParticipant disconnected:`,u),e._participants.delete(u.sid),K.forEach(function(e){u.removeListener(e[0],e[1])}),e.emit(`participantDisconnected`,u),u===t&&e.emit(`dominantSpeakerChanged`,e.dominantSpeaker)})}function de(e,t){var n=[`trackWarning`,`trackWarningsCleared`].map(function(n){return{eventName:n,handler:function(){var a=[...arguments];return e.emit.apply(e,i([n],r(i(i([],r(a)),[t]))))}}});n.forEach(function(e){var n=e.eventName,r=e.handler;return t.on(n,r)}),e.once(`disconnected`,function(){return n.forEach(function(e){var n=e.eventName,r=e.handler;return t.removeListener(n,r)})})}function fe(e,t){t.on(`updated`,function(){var n=t.isEnabled;e._log.info(`Recording `+(n?`started`:`stopped`)),e.emit(`recording`+(n?`Started`:`Stopped`))})}function me(e,t){var n=e._log;n.debug(`Creating a new RemoteParticipant for each ParticipantSignaling in the RoomSignaling`),t.participants.forEac
86h(ue.bind(null,e)),n.debug(`Setting up RemoteParticipant creation for all subsequent ParticipantSignalings that connect to the RoomSignaling`),t.on(`participantConnected`,ue.bind(null,e)),t.on(`dominantSpeakerChanged`,function(){return e.emit(`dominantSpeakerChanged`,e.dominantSpeaker)}),t.on(`stateChanged`,function r(i,a){switch(n.info(`Transitioned to state:`,i),i){case`disconnected`:e.participants.forEach(function(e){e._unsubscribeTracks()}),e.emit(i,e,a),e.localParticipant.tracks.forEach(function(e){e.unpublish()}),t.removeListener(`stateChanged`,r);break;case`reconnecting`:setTimeout(function(){return e.emit(`reconnecting`,a)},0);break;default:setTimeout(function(){return e.emit(`reconnected`)},0)}})}t.exports=ee})),require_backoff=__commonJSMin(((e,t)=>{t.exports=function(){function e(e){Object.defineProperties(this,{_min:{value:e.min||100},_max:{value:e.max||1e4},_jitter:{value:e.jitter>0&&e.jitter<=1?e.jitter:0},_factor:{value:e.factor||2},_attempts:{value:0,writable:!0},_duration:{enumerable:!1,get:function(){var e=this._min*this._factor**+this._attempts;if(this._jitter){var t=Math.random(),n=Math.floor(t*this._jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this._max)|0}},_timeoutID:{value:null,writable:!0}})}return e.prototype.backoff=function(e){var t=this,n=this._duration;this._timeoutID&&=(clearTimeout(this._timeoutID),null),this._timeoutID=setTimeout(function(){t._attempts++,e()},n)},e.prototype.reset=function(){this._attempts=0,this._timeoutID&&=(clearTimeout(this._timeoutID),null)},e}()})),require_simulcast=__commonJSMin(((e,t)=>{var n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=require_util(),i=r.difference,a=r.flatMap;function o(){return String(Math.floor(Math.random()*4294967295))}var c=function(){function e(e,t,n){Object.defineProperties(this,{cName:{enumerable:!0,value:n},isSimulcastEnabled:{enumerable:!0,value:!1,writable:!0},primarySSRCs:{enumerable:!0,value:new Set},rtxPairs:{enumerable:!0,value:new Map},streamId:{enumerable:!0,value:t},trackId:{enumerable:!0,value:e}})}return e.prototype.addSimulcastSSRCs=function(){if(!this.isSimulcastEnabled){var e=[o(),o()];e.forEach(function(e){this.primarySSRCs.add(e)},this),this.rtxPairs.size&&e.forEach(function(e){this.rtxPairs.set(o(),e)},this)}},e.prototype.addSSRC=function(e,t,n){t?this.rtxPairs.set(e,t):this.primarySSRCs.add(e),this.isSimulcastEnabled=this.isSimulcastEnabled||n},e.prototype.toSdpLines=function(e){var t=this,n=e?[]:Array.from(this.rtxPairs.entries()).map(function(e){return e.reverse()}),r=Array.from(this.primarySSRCs.values()),i=a(n.length?a(n):r,function(e){return[`a=ssrc:`+e+` cname:`+t.cName,`a=ssrc:`+e+` msid:`+t.streamId+` `+t.trackId]}),o=n.map(function(e){return`a=ssrc-group:FID `+e.join(` `)}),c=[`a=ssrc-group:SIM `+r.join(` `)];return o.concat(i).concat(c)},e}();function u(e,t){return(e.match(new RegExp(t,`gm`))||[]).map(function(e){return(e.match(new RegExp(t))||[]).slice(1)})}function K(e){return new Set(a(u(e,`^a=ssrc-group:SIM ([0-9]+) ([0-9]+) ([0-9]+)$`)))}function Y(e,t,n){var r=`a=ssrc:`+t+` `+n+`:(.+)`;return e.match(new RegExp(r))[1]}function X(e){return new Map(u(e,`^a=ssrc-group:FID ([0-9]+) ([0-9]+)$`).map(function(e){return e.reverse()}))}function ee(e){var t=n(a(u(e,`^a=msid:(.+) (.+)$`)),2),r=t[0],i=t[1];return a(u(e,`^a=ssrc:(.+) cname:.+$`)).map(function(e){return[e,r,i]})}function te(e){var t=K(e),n=X(e);return ee(e).reduce(function(r,i){var a=i[0],o=i[1],u=i[2],K=r.get(u)||new c(u,o,Y(e,a,`cname`)),X=n.get(a)||null;return K.addSSRC(a,X,t.has(a)),r.set(u,K)},new Map)}function ce(e,t){var n=te(e),r=Array.from(n.keys()),o=Array.from(t.keys()),c=i(r,o),u=i(o,r);a(c,function(e){return n.get(e)}).forEach(function(e){e.addSimulcastSSRCs(),t.set(e.trackId,e)}),o=Array.from(t.keys());var K=a(i(o,u),function(e){return t.get(e)}),Y=!e.match(/a=rtpmap:[0-9]+ rtx/),X=a(K,function(e){return e.toSdpLines(Y)}
86),ee=a(new Set(e.split(`\r
87`).concat(X))),ce=`a=x-google-flag:conference`;return e.match(ce)||ee.push(ce),ee.join(`\r
88`)}t.exports=ce})),require_sdp=__commonJSMin((e=>{var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=require_util(),r=n.difference,i=n.flatMap,a=require_simulcast(),o={0:`PCMU`,8:`PCMA`};function c(e){return Array.from(K(e)).reduce(function(e,t){var n=t[0],r=t[1],i=e.get(r)||[];return e.set(r,i.concat(n))},new Map)}function u(e){return ee(e).reduce(function(e,t){var n=X(t);return n?e.set(n,t):e},new Map)}function K(e){return te(e).reduce(function(t,n){var r=RegExp(`a=rtpmap:`+n+` ([^/]+)`),i=e.match(r),a=i?i[1].toLowerCase():o[n]?o[n].toLowerCase():``;return t.set(n,a)},new Map)}function Y(e,n){var r=RegExp(`^a=fmtp:`+e+` (.+)$`,`m`),i=n.match(r);return i&&i[1].split(`;`).reduce(function(e,n){var r=t(n.split(`=`),2),i=r[0],a=r[1];return e[i]=isNaN(a)?a:parseInt(a,10),e},{})}function X(e){var t=e.match(/^a=mid:(.+)$/m);return t&&t[1]}function ee(e,t,n){return e.replace(/\r\n\r\n$/,`\r
89`).split(`\r
90m=`).slice(1).map(function(e){return`m=`+e}).filter(function(e){var r=RegExp(`m=`+(t||`.*`),`gm`),i=RegExp(`a=`+(n||`.*`),`gm`);return r.test(e)&&i.test(e)})}function te(e){var t=e.split(`\r
91`)[0].match(/([0-9]+)/g);return t?t.slice(1).map(function(e){return parseInt(e,10)}):[]}function ce(e,t){t=t.map(function(e){return e.codec.toLowerCase()});var n=i(t,function(t){return e.get(t)||[]}),a=i(r(Array.from(e.keys()),t),function(t){return e.get(t)});return n.concat(a)}function ue(e,t){var n=t.split(`\r
92`),r=n[0],i=n.slice(1);return r=r.replace(/([0-9]+\s?)+$/,e.join(` `)),[r].concat(i).join(`\r
93`)}function de(e,t,n){var r=ee(e);return[e.split(`\r
94m=`)[0]].concat(r.map(function(e){if(!/^m=(audio|video)/.test(e))return e;var r=e.match(/^m=(audio|video)/)[1],i=c(e),a=ce(i,r===`audio`?t:n),o=ue(a,e),u=i.get(`pcma`)||[],K=i.get(`pcmu`)||[];return(r===`audio`?new Set(u.concat(K)):new Set).has(a[0])?o.replace(/\r\nb=(AS|TIAS):([0-9]+)/g,``):o})).join(`\r
95`)}function fe(e,t){var n=ee(e);return[e.split(`\r
96m=`)[0]].concat(n.map(function(e){if(e=e.replace(/\r\n$/,``),!/^m=video/.test(e))return e;var n=c(e),r=te(e),i=new Set(n.get(`vp8`)||[]);return r.some(function(e){return i.has(e)})?a(e,t):e}),``).join(`\r
97`)}function me(e,t,n,r,i){var a=n.get(e)||[];if(a.length<=1)return a;var o=Y(t,i);if(!o)return a;var c=a.find(function(e){var t=Y(e,r);return t&&Object.keys(o).every(function(e){return o[e]===t[e]})});return typeof c==`number`?[c]:a}function ge(e,n,r){if(!/^m=(audio|video)/.test(e))return e;var a=X(e),o=a&&n.get(a);if(!o)return e;var u=K(o),ee=c(e),ce=i(Array.from(u),function(n){var i=t(n,2),a=i[0],c=i[1];return c!==`rtx`&&!r.includes(c)?me(c,a,ee,e,o):[]}),de=ee.get(`rtx`)||[];ce=ce.concat(de.filter(function(t){var n=Y(t,e);return n&&ce.includes(n.apt)}));var fe=e.split(`\r
98`).filter(function(e){var t=e.match(/^a=(rtpmap|fmtp|rtcp-fb):(.+) .+$/),n=t&&t[2];return!t||n&&ce.includes(parseInt(n,10))});return ue(te(e).filter(function(e){return ce.includes(e)}),fe.join(`\r
99`))}function Te(e,t){var n=ee(e),r=e.split(`\r
100m=`)[0],i=u(t);return[r].concat(n.map(function(e){return ge(e,i,[])})).join(`\r
101`)}function Oe(e,t,n,r){r===void 0&&(r=!1);var i=u(n),a=u(t),o=ee(e);return[e.split(`\r
102m=`)[0]].concat(o.map(function(e){if(e=e.replace(/\r\n$/,``),!/^m=video/.test(e))return e;var t=e.match(/^a=mid:(.+)$/m),n=t&&t[1];if(!n)return e;var o=i.get(n),c=K(o),u=te(o),Y=u.length&&c.get(u[0])===`vp8`;return r||!Y?a.get(n).replace(/\r\n$/,``):e}),``).join(`\r
103`)}function Ae(e,n,r){return ze(e,Array.from(r).reduce(function(r,i){var a=t(i,2),o=a[0],c=a[1];return ee(e,o,`send(only|recv)`).map(X).filter(function(e){return!n.has(e)}).forEach(function(e,t){return r.set(e,c[t])}),r},new Map))}function ze(e,n){var r=ee(e);return[e.split(`\r
104m=`)[0]].concat(r.map(function(e){if(!/^m=(audio|video)/.test(e))return e;var r=X(e);if(!r)return e;var i=n.get(r);if(!i)return e;var a=(e.match(/^a=msid:(.+)$/m)||[])[1];if(!a)return e;var o=t(a.split(` `),2),c=o[0],u=o[1],K=RegExp(`msid:`+c+(u?` `+u:``)+`$`,`gm`);return e.replace(K,`msid:`+c+` `+i)})).join(`\r
105`)}function qe(e,t){return e.split(`\r
106`).filter(function(e){return!t.find(function(t){return RegExp(`a=ssrc:.*`+t+`:`,`g`).test(e)})}).join(`\r
107`)}function Ye(e){var t=ee(e);return[e.split(`\r
108m=`)[0]].concat(t.map(function(e){if(!/^m=video/.test(e))return e;var t=c(e).get(`rtx`);if(!t)return e;var n=new Set(te(e));t.forEach(function(e){return n.delete(e)});var r=e.match(/a=ssrc-group:FID [0-9]+ ([0-9]+)/),i=r&&r[1],a=[/^a=fmtp:.+ apt=.+$/,/^a=rtpmap:.+ rtx\/.+$/,/^a=ssrc-group:.+$/].concat(i?[RegExp(`^a=ssrc:`+i+` .+$`)]:[]);return e=e.split(`\r
109`).filter(function(e){return a.every(function(t){return!t.test(e)})}).join(`\r
110`),ue(Array.from(n),e)})).join(`\r
111`)}function Ze(e,n){var r=Object.entries(n).map(function(e){var n=t(e,2),r=n[0],i=n[1];return r+`=`+i}).join(`;`);return`a=fmtp:`+e+` `+r}function Qe(e,t){var n=ee(e),r=e.split(`\r
112m=`)[0];return t||=n.filter(function(e){return/^m=audio/.test(e)}).map(X),[r].concat(n.map(function(e){if(!/^m=audio/.test(e))return e;var n=c(e).get(`opus`);
112if(!n)return e;var r=Y(n,e);if(!r)return e;var i=Ze(n,r),a=new RegExp(i),o=X(e);t.includes(o)?r.usedtx=1:delete r.usedtx;var u=Ze(n,r);return e.replace(a,u)})).join(`\r
113`)}e.addOrRewriteNewTrackIds=Ae,e.addOrRewriteTrackIds=ze,e.createCodecMapForMediaSection=c,e.createPtToCodecName=K,e.disableRtx=Ye,e.enableDtxForOpus=Qe,e.filterLocalCodecs=Te,e.getMediaSections=ee,e.removeSSRCAttributes=qe,e.revertSimulcast=Oe,e.setCodecPreferences=de,e.setSimulcast=fe})),require_filter=__commonJSMin(((e,t)=>{t.exports=function(){function e(e){e=Object.assign({getKey:function(e){return e},getValue:function(e){return e},isLessThanOrEqualTo:function(e,t){return e<=t}},e),Object.defineProperties(this,{_getKey:{value:e.getKey},_getValue:{value:e.getValue},_isLessThanOrEqualTo:{value:e.isLessThanOrEqualTo},_map:{value:new Map}})}return e.prototype.toMap=function(){return new Map(this._map)},e.prototype.updateAndFilter=function(e){return e.filter(this.update,this)},e.prototype.update=function(e){var t=this._getKey(e),n=this._getValue(e);return this._map.has(t)&&this._isLessThanOrEqualTo(n,this._map.get(t))?!1:(this._map.set(t,n),!0)},e}()})),require_icebox=__commonJSMin(((e,t)=>{var n=require_filter();t.exports=function(){function e(){Object.defineProperties(this,{_filter:{value:new n({getKey:function(e){return e.ufrag},isLessThanOrEqualTo:function(e,t){return e.revision<=t.revision}})},_ufrag:{writable:!0,value:null},ufrag:{enumerable:!0,get:function(){return this._ufrag}}})}return e.prototype.setUfrag=function(e){this._ufrag=e;var t=this._filter.toMap().get(e);return t?t.candidates:[]},e.prototype.update=function(e){e.candidates=e.candidates||[];var t=this._filter.toMap().get(e.ufrag),n=t?t.candidates:[];return this._filter.update(e)&&this._ufrag===e.ufrag?e.candidates.slice(n.length):[]},e}()})),require_iceconnectionmonitor=__commonJSMin(((e,t)=>{var n=require_constants(),r=n.ICE_ACTIVITY_CHECK_PERIOD_MS,i=n.ICE_INACTIVITY_THRESHOLD_MS;t.exports=function(){function e(e,t){t=Object.assign({activityCheckPeriodMs:r,inactivityThresholdMs:i},t),Object.defineProperties(this,{_activityCheckPeriodMs:{value:t.activityCheckPeriodMs},_inactivityThresholdMs:{value:t.inactivityThresholdMs},_lastActivity:{value:null,writable:!0},_peerConnection:{value:e},_timer:{value:null,writable:!0},_onIceConnectionStateChanged:{value:null,writable:!0}})}return e.prototype._getActivePairStat=function(e){return Array.from(e.values()).find(function(e){return e.type===`candidate-pair`&&e.nominated})||{bytesReceived:0,timestamp:Math.round(new Date().getTime())}},e.prototype._getIceConnectionStats=function(){var e=this;return this._peerConnection.getStats().then(function(t){return e._getActivePairStat(t)}).catch(function(){return null})},e.prototype._scheduleInactivityCallback=function(e){var t=this;e&&this._onIceConnectionStateChanged===null?(this._onIceConnectionStateChanged=function(){t._peerConnection.iceConnectionState===`disconnected`&&e()},this._peerConnection.addEventListener(`iceconnectionstatechange`,this._onIceConnectionStateChanged)):!e&&this._onIceConnectionStateChanged&&(this._peerConnection.removeEventListener(`iceconnectionstatechange`,this._onIceConnectionStateChanged),this._onIceConnectionStateChanged=null)},e.prototype.start=function(e){var t=this;this.stop(),this._timer=setInterval(function(){t._getIceConnectionStats().then(function(n){n&&((!t._lastActivity||t._lastActivity.bytesReceived!==n.bytesReceived)&&(t._lastActivity=n,t._scheduleInactivityCallback(null)),n.timestamp-t._lastActivity.timestamp>=t._inactivityThresholdMs&&(t._peerConnection.iceConnectionState===`disconnected`?e():t._onIceConnectionStateChanged===null&&t._scheduleInactivityCallback(e)))})},this._activityCheckPeriodMs)},e.prototype.stop=function(){this._scheduleInactivityCallback(null),this._timer!==null&&(clearInterval(this._timer),this._timer=null,this._lastActivity=null)},e}()})),require_transport=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
113t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t){var n=e.call(this)||this;return Object.defineProperties(n,{_dataChannel:{value:t},_messageQueue:{value:[]}}),t.addEventListener(`open`,function(){n._messageQueue.splice(0).forEach(function(e){return n._publish(e)})}),t.addEventListener(`message`,function(e){var t=e.data;try{var r=JSON.parse(t);n.emit(`message`,r)}catch{}}),n.publish({type:`ready`}),n}return t.prototype._publish=function(e){var t=JSON.stringify(e);try{this._dataChannel.send(t)}catch{}},t.prototype.publish=function(e){var t=this._dataChannel;return t.readyState===`closing`||t.readyState===`closed`?!1:t.readyState===`connecting`?(this._messageQueue.push(e),!0):(this._publish(e),!0)},t}(require_events().EventEmitter)})),require_receiver$1=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_transceiver(),i=require_transport();t.exports=function(e){n(t,e);function t(t){var n=e.call(this,t.label,t.maxPacketLifeTime,t.maxRetransmits,t.ordered)||this;return Object.defineProperties(n,{_dataChannel:{value:t}}),t.binaryType=`arraybuffer`,t.addEventListener(`message`,function(e){n.emit(`message`,e.data)}),t.addEventListener(`close`,function(){n.emit(`close`)}),n}return t.prototype.stop=function(){this._dataChannel.close(),e.prototype.stop.call(this)},t.prototype.toDataTransport=function(){return new i(this._dataChannel)},t}(r)})),require_receiver=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){return e.call(this,t,n)||this}return t}(require_transceiver$1())})),require_trackmatcher=__commonJSMin(((e,t)=>{var n=require_sdp().getMediaSections;t.exports=function(){function e(){Object.defineProperties(this,{_midsToTrackIds:{value:new Map,writable:!0}})}return e.prototype.match=function(e){return this._midsToTrackIds.get(e.transceiver.mid)||null},e.prototype.update=function(e){var t=n(e,`(audio|video)`);this._midsToTrackIds=t.reduce(function(e,t){var n=t.match(/^a=mid:(.+)$/m)||[],r=t.match(/^a=msid:.+ (.+)$/m)||[],i=n[1],a=r[1];return i&&a?e.set(i,a):e},this._midsToTrackIds)},e}()})),require_issue8329=__commonJSMin(((e,t)=>{var n=require_webrtc().RTCSessionDescription,r=require_sdp(),i=r.createPtToCodecName,a=r.getMediaSections;function o(e){var t={type:e.type};return e.type!==`rollback`&&(t.sdp=c(e.sdp)),new n(t)}function c(e){var t=a(e);return[e.split(`\r
114m=`)[0]].concat(t.map(u)).join(`\r
115`)}function u(e){var t=i(e);e=K(e,t);var n=Y(t),r=n.get(`rtx`)||new Set,a=new Set,o=ee(X(e,t,r,a),a),c=Array.from(a);return[`h264`,`vp8`,`vp9`].reduce(function(e,t){var r=n.get(t)||new Set;return Array.from(r).reduce(function(e,t){return o.has(t)?e:e.add(t)},e)},new Set).forEach(function(t){if(c.length){var n=c.shift();e=te(e,n),e=ue(e,n,t)}}),c.forEach(function(t){e=te(e,t),e=ce(e,t)}),e}function K(e,t){return Array.from(t.keys()).reduce(function(e,n){var r=RegExp(`^a=rtpmap:`+n+` rtx.+$`,`gm`);return(e.match(r)||[]).slice(+(t.get(n)===`rtx`)).reduce(function(e,t){var r=RegExp(`\r
116`+t),i=RegExp(`\r
117a=fmtp:`+n+` apt=[0-9]+`);return e.replace(r,``).replace(i,``)},e)},e)}function Y(e){var t=new Map;return e.forEach(function(e,n){var r=t.get(e)||new Set;return t.set(e,r.add(n))}),t}function X(e,t,n,r){return Array.from(n).reduce(function(n,i){var a=RegExp(`a=fmtp:`+i+` apt=(\\d+)`),o=e.match(a);if(!o)return r.add(i),n;var c=Number.parseInt(o[1]);return!t.has(c)||t.get(c)===`rtx`?(r.add(i),n):n.set(i,c)},new Map)}function ee(e,t){var n=Array.from(e).reduce(function(e,t){var n=t[0],r=t[1],i=e.get(r)||new Set;return e.set(r,i.add(n))},new Map);return Array.from(n).reduce(function(e,n){var r=n[0],i=Array.from(n[1]);return i.length>1?(i.forEach(function(e){t.add(e)}),e):e.set(r,i[0])},new Map)}function te(e,t){var n=RegExp(`a=fmtp:`+t+`.*\r
118`,`gm`);return e.replace(n,``)}function ce(e,t){var n=RegExp(`a=rtpmap:`+t+`.*\r
119`,`gm`);return e.replace(n,``)}function ue(e,t,n){return e.endsWith(`\r
120`)?e+`a=fmtp:`+t+` apt=`+n+`\r
121`:e+`\r
122a=fmtp:`+t+` apt=`+n}t.exports=o})),require_peerconnection=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
122t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},a=require_backoff(),o=require_webrtc(),c=o.RTCIceCandidate,u=o.RTCPeerConnection,K=o.RTCSessionDescription,Y=o.getStats,X=require_util$1(),ee=require_constants(),te=ee.DEFAULT_ICE_GATHERING_TIMEOUT_MS,ce=ee.DEFAULT_LOG_LEVEL,ue=ee.DEFAULT_SESSION_TIMEOUT_SEC,de=ee.iceRestartBackoffConfig,fe=require_sdp(),me=fe.addOrRewriteNewTrackIds,ge=fe.addOrRewriteTrackIds,Te=fe.createCodecMapForMediaSection,Oe=fe.disableRtx,Ae=fe.enableDtxForOpus,ze=fe.filterLocalCodecs,qe=fe.getMediaSections,Ye=fe.removeSSRCAttributes,Ze=fe.revertSimulcast,Qe=fe.setCodecPreferences,et=fe.setSimulcast,nt=require_timeout(),rt=require_twilio_video_errors(),it=rt.MediaClientLocalDescFailedError,at=rt.MediaClientRemoteDescFailedError,ot=require_util(),st=ot.buildLogLevels,ct=ot.getPlatform,lt=ot.isChromeScreenShareTrack,ut=ot.oncePerTick,dt=ot.defer,ft=require_icebox(),pt=require_iceconnectionmonitor(),mt=require_receiver$1(),ht=require_receiver(),gt=require_statemachine(),_t=require_log(),vt=require_trackmatcher(),yt=require_issue8329(),bt=X.guessBrowser(),xt=ct(),St=/android/.test(xt),Ct=bt===`chrome`,wt=bt===`firefox`,Tt=bt===`safari`,Et=0,Dt={open:[`closed`,`updating`],updating:[`closed`,`open`],closed:[]},Ot=function(e){n(t,e);function t(t,n,r,i){var o=e.call(this,`open`,Dt)||this;i=Object.assign({enableDscp:!1,dummyAudioMediaStreamTrack:null,isChromeScreenShareTrack:lt,iceServers:[],logLevel:ce,offerOptions:{},revertSimulcast:Ze,sessionTimeout:ue*1e3,setCodecPreferences:Qe,setSimulcast:et,Backoff:a,IceConnectionMonitor:pt,RTCIceCandidate:c,RTCPeerConnection:u,RTCSessionDescription:K,Timeout:nt},i);var Y=Nt(i),X=st(i.logLevel),ee=i.RTCPeerConnection;i.enableDscp===!0&&(i.chromeSpecificConstraints=i.chromeSpecificConstraints||{},i.chromeSpecificConstraints.optional=i.chromeSpecificConstraints.optional||[],i.chromeSpecificConstraints.optional.push({googDscp:!0}));var fe=i.log?i.log.createLog(`webrtc`,o):new _t(`webrtc`,o,X,i.loggerName),me=new ee(Y,i.chromeSpecificConstraints);i.dummyAudioMediaStreamTrack&&me.addTrack(i.dummyAudioMediaStreamTrack),Object.defineProperties(o,{_appliedTrackIdsToAttributes:{value:new Map,writable:!0},_dataChannels:{value:new Map},_dataTrackReceivers:{value:new Set},_descriptionRevision:{writable:!0,value:0},_didGenerateLocalCandidates:{writable:!0,value:!1},_enableDscp:{value:i.enableDscp},_encodingParameters:{value:n},_isChromeScreenShareTrack:{value:i.isChromeScreenShareTrack},_iceGatheringFailed:{value:!1,writable:!0},_iceGatheringTimeout:{value:new i.Timeout(function(){return o._handleIceGatheringTimeout()},te,!1)},_iceRestartBackoff:{value:new i.Backoff(de)},_instanceId:{value:++Et},_isIceConnectionInactive:{writable:!0,value:!1},_isIceLite:{writable:!0,value:!1},_isIceRestartBackoffInProgress:{writable:!0,value:!1},_isRestartingIce:{writable:!0,value:!1},_lastIceConnectionState:{writable:!0,value:null},_lastStableDescriptionRevision:{writable:!0,value:0},_localCandidates:{writable:!0,value:[]},_localCodecs:{value:new Set},_localCandidatesRevision:{writable:!0,value:1},_localDescriptionWithoutSimulcast:{writable:!0,value:null},_localDescription:{writable:!0,value:null},_localUfrag:{writable:!0,value:null},_log:{value:fe},_eventObserver:{value:i.eventObserver},_remoteCodecMaps:{value:new Map},_rtpSenders:{value:new Map},_rtpNewSenders:{value:new Set},_iceConnectionMonitor:{value:new i.IceConnectionMonitor(me)},_mediaTrackReceivers:{value:new Set},_needsAnswer:{writable:!0,value:!1},_negotiationRole:{writable:!0,value:null},_offerOptions:{writable:!0,value:i.offerOptions},_onEncodingParametersChanged:{value:ut(function(){o._needsAnswer||Ut(o)})},_peerConnection:{value:me},_preferredAudioCodecs:{value:r.audio},_preferredVideoCodecs:{value:r.video},_shouldApplyDtx:{value:r.audio.every(function(e){return e.codec!==`opus`})||r.audio.some(function(e){var t=e.codec,n=e.dtx;return t===`opus`&&n})},_queuedDescription:{writable:!0,value:null},_iceReconnectTimeout:{value:new i.Timeout(function(){fe.debug(`ICE re
122connect timed out`),o.close()},i.sessionTimeout,!1)},_recycledTransceivers:{value:{audio:[],video:[]}},_replaceTrackPromises:{value:new Map},_remoteCandidates:{writable:!0,value:new ft},_setCodecPreferences:{value:wt&&St&&r.video[0]&&r.video[0].codec.toLowerCase()!==`h264`?function(e){return e}:i.setCodecPreferences},_setSimulcast:{value:i.setSimulcast},_revertSimulcast:{value:i.revertSimulcast},_RTCIceCandidate:{value:i.RTCIceCandidate},_RTCPeerConnection:{value:i.RTCPeerConnection},_RTCSessionDescription:{value:i.RTCSessionDescription},_shouldOffer:{writable:!0,value:!1},_shouldRestartIce:{writable:!0,value:!1},_trackIdsToAttributes:{value:new Map,writable:!0},_trackMatcher:{writable:!0,value:null},_mediaTrackSenderToPublisherHints:{value:new Map},id:{enumerable:!0,value:t}}),n.on(`changed`,o._onEncodingParametersChanged),me.addEventListener(`connectionstatechange`,o._handleConnectionStateChange.bind(o)),me.addEventListener(`datachannel`,o._handleDataChannelEvent.bind(o)),me.addEventListener(`icecandidate`,o._handleIceCandidateEvent.bind(o)),me.addEventListener(`iceconnectionstatechange`,o._handleIceConnectionStateChange.bind(o)),me.addEventListener(`icegatheringstatechange`,o._handleIceGatheringStateChange.bind(o)),me.addEventListener(`signalingstatechange`,o._handleSignalingStateChange.bind(o)),me.addEventListener(`track`,o._handleTrackEvent.bind(o));var ge=o;return o.on(`stateChanged`,function e(t){t===`closed`&&(ge.removeListener(`stateChanged`,e),ge._dataChannels.forEach(function(e,t){ge.removeDataTrackSender(t)}))}),o}return t.prototype.toString=function(){return`[PeerConnectionV2 #`+this._instanceId+`: `+this.id+`]`},t.prototype.setEffectiveAdaptiveSimulcast=function(e){this._log.debug(`Setting setEffectiveAdaptiveSimulcast: `,e),this._preferredVideoCodecs.forEach(function(t){`adaptiveSimulcast`in t&&(t.adaptiveSimulcast=e)})},Object.defineProperty(t.prototype,"_shouldApplySimulcast",{get:function(){return!Ct&&!Tt?!1:this._preferredVideoCodecs.some(function(e){return e.codec.toLowerCase()===`vp8`&&e.simulcast&&e.adaptiveSimulcast!==!1})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"connectionState",{get:function(){return this.iceConnectionState===`failed`?`failed`:this._peerConnection.connectionState||this.iceConnectionState},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iceConnectionState",{get:function(){return this._isIceConnectionInactive&&this._peerConnection.iceConnectionState===`disconnected`||this._iceGatheringFailed?`failed`:this._peerConnection.iceConnectionState},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isApplicationSectionNegotiated",{get:function(){return this._peerConnection.signalingState===`closed`?!0:this._peerConnection.localDescription?qe(this._peerConnection.localDescription.sdp,`application`).length>0:!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isAdaptiveSimulcastEnabled",{get:function(){var e=this._preferredVideoCodecs.find(function(e){return`adaptiveSimulcast`in e});return e&&e.adaptiveSimulcast===!0},enumerable:!1,configurable:!0}),t.prototype._maybeUpdateEncodings=function(e,t,n){if(n===void 0&&(n=!1),e.kind!==`video`||e.readyState===`ended`)return!1;var r=e.getSettings(),i=r.height,a=r.width;if(typeof i!=`number`||typeof a!=`number`)return!1;var o=X.guessBrowser();return o===`safari`||o===`chrome`&&this._isAdaptiveSimulcastEnabled?(this._updateEncodings(e,t,n),!0):!1},t.prototype._updateEncodings=function(e,t,n){if(this._isChromeScreenShareTrack(e)){var r=[{scaleResolutionDownBy:1},{scaleResolutionDownBy:1}];t.forEach(function(e,t){var i=r[t];i?(e.scaleResolutionDownBy=i.scaleResolutionDownBy,n&&delete e.active):(e.active=!1,delete e.scaleResolutionDownBy)})}else{var i=e.getSettings(),a=i.width,o=i.height,c=[{pixels:518400,maxActiveLayers:3},{pixels:129600,maxActiveLayers:2},{pixels:0,maxActiveLayers:1}],u=a*o,K=c.find(function(e){return u>=e.pixels}),Y=Math.min(t.length,K.maxActiveLayers);t.forEach(function(e,t){t<Y?(e.scaleResolutionDownBy=1<<Y-t-1,n&&(e.active=!0)):(e.active=!1,delete e.scaleResolutionDownBy)})}this._log.debug(`_updateEncodings:`,t.map(function(e,t){var n=e.active,r=e.scaleResolutionDownBy;return`[`+t+`: `+n+`, `+(r||0)+`]`}).join(`, `))},t.prototype._addIceCandidate=function(e){var t=this;return Promise.resolve().then(function(){return e=new t._RTCIceCandidate(e),t._peerConnection.addIceCandidate(e)}).catch(function(n){t._log.warn(`Failed to add RTCIceCandidate `+(e?`"`+e.candidate+`"`:`null`)+`: `+n.message)})},t.prototype._addIceCandidates=function(e){return Promise.all(e.map(this._addIceCandidate,this)).then(function(){})},t.prototype._addOrUpdateTransceiver=function(e){var t=this,n=Rt(this,e.kind);if(n&&n.sender){var r=n.sender.track?n.sender.track.id:null;return r&&this._log.warn(`Reusing transceiver: `+n.mid+`] `+r+` => `+e.id),this._replaceTrackPromises.set(n,n.sender.replaceTrack(e).then(function(){n.direction=`sendrecv`},function(){}).finally(function(){t._replaceTrackPromises.delete(n)})),n}return this._peerConnection.addTransceiver(e)},t.prototype._checkIceBox=function(e){var t=Mt(e);
122if(!t)return Promise.resolve();var n=this._remoteCandidates.setUfrag(t);return this._addIceCandidates(n)},t.prototype._answer=function(e){var t=this;return Promise.resolve().then(function(){return t._negotiationRole||=`answerer`,t._setRemoteDescription(e)}).catch(function(){throw new at}).then(function(){return t._peerConnection.createAnswer()}).then(function(n){n=wt?new t._RTCSessionDescription({sdp:Oe(n.sdp),type:n.type}):yt(n);var r=Ye(n.sdp,[`mslabel`,`label`]);if(t._shouldApplySimulcast){var i=r;r=t._setSimulcast(i,t._trackIdsToAttributes),r=t._revertSimulcast(r,i,e.sdp)}return r=r.replace(/42e015/g,`42e01f`),t._setLocalDescription({type:n.type,sdp:r})}).then(function(){return t._checkIceBox(e)}).then(function(){return t._queuedDescription&&t._updateDescription(t._queuedDescription)}).then(function(){return t._queuedDescription=null,t._maybeReoffer(t._peerConnection.localDescription)}).catch(function(e){var n=e instanceof at?e:new it;throw t._publishMediaWarning({message:`Failed to _answer`,code:n.code,error:e}),n})},t.prototype._close=function(){return this._iceConnectionMonitor.stop(),this._peerConnection.signalingState!==`closed`&&(this._peerConnection.close(),this.preempt(`closed`),this._encodingParameters.removeListener(`changed`,this._onEncodingParametersChanged),!0)},t.prototype._handleConnectionStateChange=function(){this.emit(`connectionStateChanged`)},t.prototype._handleDataChannelEvent=function(e){var t=this,n=e.channel,r=new mt(n);this._dataTrackReceivers.add(r),n.addEventListener(`close`,function(){t._dataTrackReceivers.delete(r)}),this.emit(`trackAdded`,r)},t.prototype._handleGlare=function(e){var t=this;return this._log.debug(`Glare detected; rolling back`),this._isRestartingIce&&(this._log.debug(`An ICE restart was in progress; we'll need to restart ICE again after rolling back`),this._isRestartingIce=!1,this._shouldRestartIce=!0),Promise.resolve().then(function(){return t._trackIdsToAttributes=new Map(t._appliedTrackIdsToAttributes),t._setLocalDescription({type:`rollback`})}).then(function(){return t._needsAnswer=!1,t._answer(e)}).then(function(e){return e?Promise.resolve():t._offer()})},t.prototype._publishMediaWarning=function(e){var t=e.message,n=e.code,r=e.error,i=e.sdp;this._eventObserver.emit(`event`,{level:`warning`,name:`error`,group:`media`,payload:{message:t,code:n,context:JSON.stringify({error:r.message,sdp:i})}})},t.prototype._handleIceCandidateEvent=function(e){e.candidate&&(this._log.debug(`Clearing ICE gathering timeout`),this._didGenerateLocalCandidates=!0,this._iceGatheringTimeout.clear(),this._localCandidates.push(e.candidate));var t={ice:{candidates:this._isIceLite?[]:this._localCandidates.slice(),ufrag:this._localUfrag},id:this.id};e.candidate||(t.ice.complete=!0),this._isIceLite&&e.candidate||(t.ice.revision=this._localCandidatesRevision++,this.emit(`candidates`,t))},t.prototype._handleIceConnectionStateChange=function(){var e=this,t=this._peerConnection.iceConnectionState,n=[`connected`,`completed`].includes(t),r=this._log;r.debug(`ICE connection state is "`+t+`"`),n&&(this._iceReconnectTimeout.clear(),this._iceRestartBackoff.reset()),this._lastIceConnectionState!==`failed`&&t===`failed`&&!this._shouldRestartIce&&!this._isRestartingIce?(r.warn(`ICE failed`),this._initiateIceRestartBackoff()):[`disconnected`,`failed`].includes(this._lastIceConnectionState)&&n&&r.debug(`ICE reconnected`),t===`connected`?(this._isIceConnectionInactive=!1,this._iceConnectionMonitor.start(function(){e._iceConnectionMonitor.stop(),!e._shouldRestartIce&&!e._isRestartingIce&&(r.warn(`ICE Connection Monitor detected inactivity`),e._isIceConnectionInactive=!0,e._initiateIceRestartBackoff(),e.emit(`iceConnectionStateChanged`),e.emit(`connectionStateChanged`))})):[`disconnected`,`completed`].includes(t)||(this._iceConnectionMonitor.stop(),this._isIceConnectionInactive=!1),this._lastIceConnectionState=t,this.emit(`iceConnectionStateChanged`)},t.prototype._handleIceGatheringTimeout=function(){this._log.warn(`ICE failed to gather any local candidates`),this._iceGatheringFailed=!0,this._initiateIceRestartBackoff(),this.emit
122(`iceConnectionStateChanged`),this.emit(`connectionStateChanged`)},t.prototype._handleIceGatheringStateChange=function(){var e=this._peerConnection.iceGatheringState,t=this._log;t.debug(`ICE gathering state is "`+e+`"`);var n=this._iceGatheringTimeout,r=n.delay,i=n.isSet;e===`gathering`&&!this._didGenerateLocalCandidates&&!i&&(t.debug(`Starting ICE gathering timeout: `+r),this._iceGatheringFailed=!1,this._iceGatheringTimeout.start())},t.prototype._handleSignalingStateChange=function(){this._peerConnection.signalingState===`stable`&&(this._appliedTrackIdsToAttributes=new Map(this._trackIdsToAttributes))},t.prototype._handleTrackEvent=function(e){var t=this,n=this._peerConnection.remoteDescription?this._peerConnection.remoteDescription.sdp:null;this._trackMatcher=this._trackMatcher||new vt,this._trackMatcher.update(n);var r=e.track,i=new ht(this._trackMatcher.match(e)||r.id,r);this._mediaTrackReceivers.forEach(function(e){e.track.id===i.track.id&&t._mediaTrackReceivers.delete(e)}),this._mediaTrackReceivers.add(i),r.addEventListener(`ended`,function(){return t._mediaTrackReceivers.delete(i)}),this.emit(`trackAdded`,i)},t.prototype._initiateIceRestart=function(){if(this._peerConnection.signalingState!==`closed`){var e=this._log;e.warn(`Attempting to restart ICE`),this._didGenerateLocalCandidates=!1,this._isIceRestartBackoffInProgress=!1,this._shouldRestartIce=!0;var t=this._iceReconnectTimeout,n=t.delay;t.isSet||(e.debug(`Starting ICE reconnect timeout: `+n),this._iceReconnectTimeout.start()),this.offer().catch(function(t){e.error(`offer failed in _initiateIceRestart with: `+t.message)})}},t.prototype._initiateIceRestartBackoff=function(){var e=this;this._peerConnection.signalingState===`closed`||this._isIceRestartBackoffInProgress||(this._log.warn(`An ICE restart has been scheduled`),this._isIceRestartBackoffInProgress=!0,this._iceRestartBackoff.backoff(function(){return e._initiateIceRestart()}))},t.prototype._maybeReoffer=function(e){var t=this._shouldOffer;if(e&&e.sdp){var n=this._peerConnection.getSenders().filter(function(e){return e.track});t=[`audio`,`video`].reduce(function(t,r){var i=qe(e.sdp,r,`(sendrecv|sendonly)`),a=n.filter(Pt.bind(null,r));return t||i.length<a.length},t);var r=this._dataChannels.size>0,i=qe(e.sdp,`application`).length>0;t||=r&&!i}return(t?this._offer():Promise.resolve()).then(function(){return t})},t.prototype._offer=function(){var e=this,t=Object.assign({},this._offerOptions);return this._needsAnswer=!0,this._shouldRestartIce&&(this._shouldRestartIce=!1,this._isRestartingIce=!0,t.iceRestart=!0),Promise.all(this._replaceTrackPromises.values()).then(function(){return e._peerConnection.createOffer(t)}).catch(function(t){var n=new it;throw e._publishMediaWarning({message:`Failed to create offer`,code:n.code,error:t}),n}).then(function(t){t=wt?new e._RTCSessionDescription({sdp:Oe(t.sdp),type:t.type}):yt(t);var n=Ye(t.sdp,[`mslabel`,`label`]);n=e._peerConnection.remoteDescription?ze(n,e._peerConnection.remoteDescription.sdp):n;var r=e._setCodecPreferences(n,e._preferredAudioCodecs,e._preferredVideoCodecs);return e._shouldOffer=!1,e._negotiationRole||=`offerer`,e._shouldApplySimulcast&&(e._localDescriptionWithoutSimulcast={type:`offer`,sdp:r},r=e._setSimulcast(r,e._trackIdsToAttributes)),e._setLocalDescription({type:`offer`,sdp:r})})},t.prototype._getMediaTrackSenderId=function(e){var t=Array.from(this._rtpSenders.keys()).find(function(t){return t.track.id===e});return t?t.id:e},t.prototype._addOrRewriteLocalTrackIds=function(e){var t=this,n=this._peerConnection.getTransceivers().filter(function(e){var t=e.sender;return!e.stopped&&t&&t.track}),r=n.filter(function(e){return e.mid}),i=new Map(r.map(function(e){var n=e.mid,r=e.sender;return[n,t._getMediaTrackSenderId(r.track.id)]})),a=ge(e.sdp,i),o=n.filter(function(e){return!e.mid}),c=me(a,i,new Map([`audio`,`video`].map(function(e){return[e,o.filter(function(t){return t.sender.track.kind===e}).map(function(e){var n=e.sender;return t._getMediaTrackSenderId(n.track.id)})]})));return new this._RTCSessionDescription({sdp:c,type:e.type})},t.prototype._rollbackAndApplyOffer=function(e){var t=this;return this._setLocalDescription({type:`rollback`}).then(function(){return t._setLocalDescription(e)})},t.prototype._setLocalDescription=function(e){var t=this;return e.type!==`rollback`&&this._shouldApplyDtx&&(e=new this._RTCSessionDescription({sdp:Ae(e.sdp),type:e.type})),this._peerConnection.setLocalDescription(e).catch(function(n){t._log.warn(`Calling set
122LocalDescription with an RTCSessionDescription of type "`+e.type+`" failed with the error "`+n.message+`".`,n);var r=new it,i={message:`Calling setLocalDescription with an RTCSessionDescription of type "`+e.type+`" failed`,code:r.code,error:n};throw e.sdp&&(t._log.warn(`The SDP was `+e.sdp),i.sdp=e.sdp),t._publishMediaWarning(i),r}).then(function(){e.type!==`rollback`&&(t._localDescription=t._addOrRewriteLocalTrackIds(e),t._shouldApplyDtx&&(t._localDescription=new t._RTCSessionDescription({sdp:Ae(t._localDescription.sdp,[]),type:t._localDescription.type})),t._localCandidates=[],e.type===`offer`?t._descriptionRevision++:e.type===`answer`&&(t._lastStableDescriptionRevision=t._descriptionRevision,Ht(t)),t._localUfrag=Mt(e),t.emit(`description`,t.getState()))})},t.prototype._setRemoteDescription=function(e){var t=this;return e.sdp&&(e.sdp=this._setCodecPreferences(e.sdp,this._preferredAudioCodecs,this._preferredVideoCodecs),this._shouldApplyDtx?e.sdp=Ae(e.sdp):e.sdp=Ae(e.sdp,[]),wt&&(e.sdp=Ft(e.sdp)),this._peerConnection.remoteDescription||(this._isIceLite=/a=ice-lite/.test(e.sdp))),e=new this._RTCSessionDescription(e),Promise.resolve().then(function(){if(e.type===`answer`&&t._localDescriptionWithoutSimulcast){var n=t._preferredVideoCodecs.find(function(e){return`adaptiveSimulcast`in e}),r=!!n&&n.adaptiveSimulcast===!1,i=t._revertSimulcast(t._localDescription.sdp,t._localDescriptionWithoutSimulcast.sdp,e.sdp,r);if(t._localDescriptionWithoutSimulcast=null,i!==t._localDescription.sdp)return t._rollbackAndApplyOffer({type:t._localDescription.type,sdp:i})}}).then(function(){return t._peerConnection.setRemoteDescription(e)}).then(function(){e.type===`answer`&&(t._isRestartingIce&&=(t._log.debug(`An ICE restart was in-progress and is now completed`),!1),Ht(t))},function(n){throw t._log.warn(`Calling setRemoteDescription with an RTCSessionDescription of type "`+e.type+`" failed with the error "`+n.message+`".`,n),e.sdp&&t._log.warn(`The SDP was `+e.sdp),n})},t.prototype._updateDescription=function(e){var t=this;switch(e.type){case`answer`:case`pranswer`:if(e.revision!==this._descriptionRevision||this._peerConnection.signalingState!==`have-local-offer`)return Promise.resolve();this._descriptionRevision=e.revision;break;case`close`:return this._close();case`create-offer`:return e.revision<=this._lastStableDescriptionRevision?Promise.resolve():this._needsAnswer?(this._queuedDescription=e,Promise.resolve()):(this._descriptionRevision=e.revision,this._offer());case`offer`:return e.revision<=this._lastStableDescriptionRevision||this._peerConnection.signalingState===`closed`?Promise.resolve():this._peerConnection.signalingState===`have-local-offer`?this._needsAnswer&&this._lastStableDescriptionRevision===0?(this._queuedDescription=e,Promise.resolve()):(this._descriptionRevision=e.revision,this._handleGlare(e)):(this._descriptionRevision=e.revision,this._answer(e).then(function(){}))}var n=e.revision;return Promise.resolve().then(function(){return t._setRemoteDescription(e)}).catch(function(n){var r=new at;throw t._publishMediaWarning({message:`Calling setRemoteDescription with an RTCSessionDescription of type "`+e.type+`" failed`,code:r.code,error:n,sdp:e.sdp}),r}).then(function(){return t._lastStableDescriptionRevision=n,t._needsAnswer=!1,t._checkIceBox(e)}).then(function(){return t._queuedDescription&&t._updateDescription(t._queuedDescription)}).then(function(){return t._queuedDescription=null,t._maybeReoffer(t._peerConnection.localDescription).then(function(){})})},t.prototype._updateIce=function(e){var t=this._remoteCandidates.update(e);return this._addIceCandidates(t)},t.prototype.addDataTrackSender=function(e){if(!this._dataChannels.has(e))try{var t={ordered:e.ordered};e.maxPacketLifeTime!==null&&(t.maxPacketLifeTime=e.maxPacketLifeTime),e.maxRetransmits!==null&&(t.maxRetransmits=e.maxRetransmits);var n=this._peerConnection.createDataChannel(e.id,t);e.addDataChannel(n),this._dataChannels.set(e,n)}catch(t){this._log.warn(`Error creating an RTCDataChannel for DataTrack "`+e.id+`": `+t.message)}},t.prototype._handleQueuedPublisherHints=function(){var e=this;this._peerConnection.signalingState===`stable`&&this._mediaTrackSenderToPublisherHints.forEac
122h(function(t,n){var r=t.deferred,i=t.encodings;e._mediaTrackSenderToPublisherHints.delete(n),e._setPublisherHint(n,i).then(function(e){return r.resolve(e)}).catch(function(e){return r.reject(e)})})},t.prototype._setPublisherHint=function(e,t){var n=this;if(wt)return Promise.resolve(`COULD_NOT_APPLY_HINT`);this._mediaTrackSenderToPublisherHints.has(e)&&(this._mediaTrackSenderToPublisherHints.get(e).deferred.resolve(`REQUEST_SKIPPED`),this._mediaTrackSenderToPublisherHints.delete(e));var r=this._rtpSenders.get(e);if(!r)return this._log.warn(`Could not apply publisher hint because RTCRtpSender was not found`),Promise.resolve(`UNKNOWN_TRACK`);if(this._peerConnection.signalingState===`closed`)return this._log.warn(`Could not apply publisher hint because signalingState was "closed"`),Promise.resolve(`COULD_NOT_APPLY_HINT`);if(this._peerConnection.signalingState!==`stable`){this._log.debug(`Queuing up publisher hint because signalingState:`,this._peerConnection.signalingState);var i=dt();return this._mediaTrackSenderToPublisherHints.set(e,{deferred:i,encodings:t}),i.promise}var a=r.getParameters();return t!==null&&t.forEach(function(e){var t=e.enabled,r=e.layer_index;a.encodings.length>r?(n._log.debug(`layer:`+r+`, active:`+a.encodings[r].active+` => `+t),a.encodings[r].active=t):n._log.warn(`invalid layer:`+r+`, active:`+t)}),this._maybeUpdateEncodings(r.track,a.encodings,t===null),r.setParameters(a).then(function(){return`OK`}).catch(function(e){return n._log.error(`Failed to apply publisher hints:`,e),`COULD_NOT_APPLY_HINT`})},t.prototype.addMediaTrackSender=function(e){var t=this;if(!(this._peerConnection.signalingState===`closed`||this._rtpSe
122nders.has(e))){var n=this._addOrUpdateTransceiver(e.track).sender;e.addSender(n,function(n){return t._setPublisherHint(e,n)}),this._rtpNewSenders.add(n),this._rtpSenders.set(e,n)}},t.prototype.close=function(){this._close()&&(this._descriptionRevision++,this._localDescription={type:`close`},this.emit(`description`,this.getState()))},t.prototype.getTrackReceivers=function(){return Array.from(this._dataTrackReceivers).concat(Array.from(this._mediaTrackReceivers))},t.prototype.getState=function(){if(!this._localDescription)return null;var e=this._localDescription.type===`answer`?this._lastStableDescriptionRevision:this._descriptionRevision,t={type:this._localDescription.type,revision:e};return this._localDescription.sdp&&(t.sdp=this._localDescription.sdp),{description:t,id:this.id}},t.prototype.offer=function(){var e=this;return this._needsAnswer||this._isRestartingIce?(this._shouldOffer=!0,Promise.resolve()):this.bracket(`offering`,function(t){return e.transition(`updating`,t),(e._needsAnswer||e._isRestartingIce?Promise.resolve():e._offer()).then(function(){e.tryTransition(`open`,t)},function(n){throw e.tryTransition(`open`,t),n})})},t.prototype.removeDataTrackSender=function(e){var t=this._dataChannels.get(e);t&&(e.removeDataChannel(t),this._dataChannels.delete(e),t.close())},t.prototype.removeMediaTrackSender=function(e){var t=this._rtpSenders.get(e);t&&(this._peerConnection.signalingState!==`closed`&&this._peerConnection.removeTrack(t),e.removeSender(t),this._mediaTrackSenderToPublisherHints.has(e)&&(this._mediaTrackSenderToPublisherHints.get(e).deferred.resolve(`UNKNOWN_TRACK`),this._mediaTrackSenderToPublisherHints.delete(e)),this._rtpNewSenders.delete(t),this._rtpSe
122nders.delete(e))},t.prototype.setConfiguration=function(e){typeof this._peerConnection.setConfiguration==`function`&&this._peerConnection.setConfiguration(Nt(e))},t.prototype.setIceReconnectTimeout=function(e){return this._iceReconnectTimeout.setDelay(e),this._log.debug(`Updated ICE reconnection timeout period:`,this._iceReconnectTimeout.delay),this},t.prototype.update=function(e){var t=this;return this.bracket(`updating`,function(n){if(t.state===`closed`)return Promise.resolve();t.transition(`updating`,n);var r=[];return e.ice&&r.push(t._updateIce(e.ice)),e.description&&r.push(t._updateDescription(e.description)),Promise.all(r).then(function(){t.tryTransition(`open`,n)},function(e){throw t.tryTransition(`open`,n),e})})},t.prototype.getStats=function(){var e=this;return Y(this._peerConnection).then(function(t){return jt(e,t)})},t}(gt);function kt(e,t){var n=e._getMediaTrackSenderId(t.trackId);return Object.assign(t,{trackId:n})}function At(e,t){var n=i([],r(e._mediaTrackReceivers)).find(function(e){return e.track.id===t.trackId}),a=n?n.id:null;return Object.assign(t,{trackId:a})}function jt(e,t){return Object.assign(t,{remoteAudioTrackStats:t.remoteAudioTrackStats.map(function(t){return At(e,t)}),remoteVideoTrackStats:t.remoteVideoTrackStats.map(function(t){return At(e,t)}),localAudioTrackStats:t.localAudioTrackStats.map(function(t){return kt(e,t)}),localVideoTrackStats:t.localVideoTrackStats.map(function(t){return kt(e,t)})})}function Mt(e){if(e.sdp){var t=e.sdp.match(/^a=ice-ufrag:([a-zA-Z0-9+/]+)/m);if(t)return t[1]}return null}function Nt(e){return Object.assign({bundlePolicy:`max-bundle`,rtcpMuxPolicy:`require`},e)}function Pt(e,t){var n=t.track;return n&&n.kind===e&&n.readyState!==`ended`}function Ft(e){return e.replace(/a=msid:[^ ]+ /g,`a=msid:- `)}function It(e,t){return!e.stopped&&!t._replaceTrackPromises.has(e)&&[`inactive`,`recvonly`].includes(e.direction)}function Rt(e,t){var n={audio:e._preferredAudioCodecs.map(function(e){return e.codec.toLowerCase()}),video:e._preferredVideoCodecs.map(function(e){return e.codec.toLowerCase()})}[t],r=e._recycledTransceivers[t],i=n.find(function(t){return e._localCodecs.has(t)});if(!i)return r.shift();var a=r.find(function(t){var n=e._remoteCodecMaps.get(t.mid);return n&&n.has(i)});return a&&r.splice(r.indexOf(a),1),a}function zt(e){var t=e._peerConnection.localDescription;t&&t.sdp&&qe(t.sdp).forEach(function(t){Te(t).forEach(function(t,n){return e._localCodecs.add(n)})})}function Bt(e){var t=e._peerConnection.remoteDescription;t&&t.sdp&&qe(t.sdp).forEach(function(t){var n=t.match(/^a=mid:(.+)$/m);if(n&&n[1]){var r=n[1],i=Te(t);e._remoteCodecMaps.set(r,i)}})}function Vt(e){e._recycledTransceivers.audio=[],e._recycledTransceivers.video=[],e._peerConnection.getTransceivers().forEach(function(t){if(It(t,e)){var n=t.receiver.track;e._recycledTransceivers[n.kind].push(t)}})}function Ht(e){Vt(e),zt(e),Bt(e),Ut(e).then(function(){e._handleQueuedPublisherHints()})}function Ut(e){var t=e._encodingParameters,n=t.maxAudioBitrate,r=t.maxVideoBitrate,i=new Map([[`audio`,n],[`video`,r]]),a=[];return e._peerConnection.getSenders().filter(function(e){return e.track}).forEach(function(t){var n=i.get(t.track.kind),r=t.getParameters();n===null||n===0?Wt(r):e._isChromeScreenShareTrack(t.track)?e._log.warn(`Not setting maxBitrate for `+t.track.kind+` Track `+t.track.id+` because it appears to be screen share track: `+t.track.label):Gt(r,n),!wt&&r.encodings.length>0&&(t.track.kind===`audio`?r.encodings[0].priority=`high`:e._isChromeScreenShareTrack(t.track)&&(r.encodings[0].priority=`medium`),e._enableDscp&&(r.encodings[0].networkPriority=`high`));var o=e._rtpNewSenders.has(t);e._maybeUpdateEncodings(t.track,r.encodings,o),e._rtpNewSenders.delete(t);var c=t.setParameters(r).catch(function(n){e._log.warn(`Error while setting encodings parameters for `+t.track.kind+` Track `+t.track.id+`: `+(n.message||n.name))});a.push(c)}),Promise.all(a)}
122function Wt(e){Array.isArray(e.encodings)&&e.encodings.forEach(function(e){return delete e.maxBitrate})}function Gt(e,t){wt?e.encodings=[{maxBitrate:t}]:e.encodings.forEach(function(e){e.maxBitrate=t})}t.exports=Ot})),require_peerconnectionmanager=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},a=require_util$1().guessBrowser,o=require_peerconnection(),c=require_sender$1(),u=require_queueingeventemitter(),K=require_util(),Y=require_twilio_video_errors().MediaConnectionError,X=a()===`firefox`,ee=function(e){n(t,e);function t(t,n,r){var i=e.call(this)||this;r=Object.assign({audioContextFactory:X?require_audiocontext():null,PeerConnectionV2:o},r);var a=r.audioContextFactory?r.audioContextFactory.getOrCreate(i):null,u=a?{offerToReceiveVideo:!0}:{offerToReceiveAudio:!0,offerToReceiveVideo:!0};return Object.defineProperties(i,{_audioContextFactory:{value:r.audioContextFactory},_closedPeerConnectionIds:{value:new Set},_configuration:{writable:!0,value:null},_configurationDeferred:{writable:!0,value:K.defer()},_connectionState:{value:`new`,writable:!0},_dummyAudioTrackSender:{value:a?new c(te(a)):null},_encodingParameters:{value:t},_iceConnectionState:{writable:!0,value:`new`},_dataTrackSenders:{writable:!0,value:new Set},_lastConnectionState:{value:`new`,writable:!0},_lastIceConnectionState:{writable:!0,value:`new`},_mediaTrackSenders:{writable:!0,value:new Set},_offerOptions:{value:u},_peerConnections:{value:new Map},_preferredCodecs:{value:n},_sessionTimeout:{value:null,writable:!0},_PeerConnectionV2:{value:r.PeerConnectionV2}}),i}return t.prototype.setEffectiveAdaptiveSimulcast=function(e){this._peerConnections.forEach(function(t){return t.setEffectiveAdaptiveSimulcast(e)}),this._preferredCodecs.video.forEach(function(t){`adaptiveSimulcast`in t&&(t.adaptiveSimulcast=e)})},Object.defineProperty(t.prototype,"connectionState",{get:function(){return this._connectionState},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iceConnectionState",{get:function(){return this._iceConnectionState},enumerable:!1,configurable:!0}),t.prototype._closeAbsentPeerConnections=function(e){var t=new Set(e.map(function(e){return e.id}));return this._peerConnections.forEach(function(e){t.has(e.id)||e._close()}),this},t.prototype._getConfiguration=function(){return this._configurationDeferred.promise},t.prototype._getOrCreate=function(e,t){var n=this,r=this,i=this._peerConnections.get(e);if(!i){var a=this._PeerConnectionV2,o=Object.assign({dummyAudioMediaStreamTrack:this._dummyAudioTrackSender?this._dummyAudioTrackSender.track:null,offerOptions:this._offerOptions},this._sessionTimeout?{sessionTimeout:this._sessionTimeout}:{},t);try{i=new a(e,this._encodingParameters,this._preferredCodecs,o)}catch{throw new Y}this._peerConnections.set(i.id,i),i.on(`candidates`,this.queue.bind(this,`candidates`)),i.on(`description`,this.queue.bind(this,`description`)),i.on(`trackAdded`,this.queue.bind(this,`trackAdded`)),i.on(`stateChanged`,function e(t){t===`closed`&&(i.removeListener(`stateChanged`,e),r._dataTrackSenders.forEach(function(e){return i.removeDataTrackSender(e)}),r._mediaTrackSenders.forEach(function(e){return i.removeMediaTrackSender(e)}),r._peerConnections.delete(i.id),r._closedPeerConnectionIds.add(i.id),ze(r),Ae(r))}),i.on(`connectionStateChanged`,function(){return ze(n)}),i.on(`iceConnectionStateChanged`,function(){return Ae(n)}
122),this._dataTrackSenders.forEach(i.addDataTrackSender,i),this._mediaTrackSenders.forEach(i.addMediaTrackSender,i),Ae(this)}return i},t.prototype.close=function(){return this._peerConnections.forEach(function(e){e.close()}),this._dummyAudioTrackSender&&this._dummyAudioTrackSender.stop(),this._audioContextFactory&&this._audioContextFactory.release(this),Ae(this),this},t.prototype.createAndOffer=function(){var e=this;return this._getConfiguration().then(function(t){var n;do n=K.makeUUID();while(e._peerConnections.has(n));return e._getOrCreate(n,t)}).then(function(e){return e.offer()}).then(function(){return e})},t.prototype.getTrackReceivers=function(){return K.flatMap(this._peerConnections,function(e){return e.getTrackReceivers()})},t.prototype.getStates=function(){var e=[];return this._peerConnections.forEach(function(t){var n=t.getState();n&&e.push(n)}),e},t.prototype.setConfiguration=function(e){return this._configuration&&(this._configurationDeferred=K.defer(),this._peerConnections.forEach(function(t){t.setConfiguration(e)})),this._configuration=e,this._configurationDeferred.resolve(e),this},t.prototype.setIceReconnectTimeout=function(e){return this._sessionTimeout===null&&(this._peerConnections.forEach(function(t){t.setIceReconnectTimeout(e)}),this._sessionTimeout=e),this},t.prototype.setTrackSenders=function(e){var t=new Set(e.filter(function(e){return e.kind===`data`})),n=new Set(e.filter(function(e){return e&&(e.kind===`audio`||e.kind===`video`)})),r=de(this,t,n);return this._dataTrackSenders=t,this._mediaTrackSenders=n,ce(this,r),this},t.prototype.update=function(e,t){var n=this;return t===void 0&&(t=!1),t&&this._closeAbsentPeerConnections(e),this._getConfiguration().then(function(t){return Promise.all(e.map(function(e){return n._closedPeerConnectionIds.has(e.id)?null:n._getOrCreate(e.id,t).update(e)}))}).then(function(){return n})},t.prototype.getStats=function(){var e=Array.from(this._peerConnections.values());return Promise.all(e.map(function(e){return e.getStats().then(function(t){return[e.id,t]})})).then(function(e){return new Map(e)})},t}(u);function te(e){return e.createMediaStreamDestination().stream.getAudioTracks()[0]}function ce(e,t){(t.data.add.size||t.data.remove.size||t.media.add.size||t.media.remove.size)&&e._peerConnections.forEach(function(e){t.data.remove.forEach(e.removeDataTrackSender,e),t.media.remove.forEach(e.removeMediaTrackSender,e),t.data.add.forEach(e.addDataTrackSender,e),t.media.add.forEach(e.addMediaTrackSender,e),(t.media.add.size||t.media.remove.size||t.data.add.size&&!e.isApplicationSectionNegotiated)&&e.offer()})}function ue(e,t){return{add:K.difference(t,e._dataTrackSenders),remove:K.difference(e._dataTrackSenders,t)}}function de(e,t,n){return{data:ue(e,t),media:fe(e,n)}}function fe(e,t){return{add:K.difference(t,e._mediaTrackSenders),remove:K.difference(e._mediaTrackSenders,t)}}var me={new:0,checking:1,connecting:2,connected:3,completed:4,disconnected:-1,failed:-2,closed:-3},ge;function Te(){return Object.keys(me).reduce(function(e,t){var n;return Object.assign(e,(n={},n[me[t]]=t,n))},{})}function Oe(e){return e.length?(ge||=Te(),e.reduce(function(e,t){return ge[Math.max(me[e],me[t])]})):`new`}function Ae(e){e._lastIceConnectionState=e.iceConnectionState,e._iceConnectionState=Oe(i([],r(e._peerConnections.values())).map(function(e){return e.iceConnectionState})),e.iceConnectionState!==e._lastIceConnectionState&&e.emit(`iceConnectionStateChanged`)}function ze(e){e._lastConnectionState=e.connectionState,e._connectionState=Oe(i([],r(e._peerConnections.values())).map(function(e){return e.connectionState})),e.connectionState!==e._lastConnectionState&&e.emit(`connectionStateChanged`)}t.exports=ee})),require_mediasignaling=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
122t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_events(),i=0;t.exports=function(e){n(t,e);function t(t,n,r){var a=e.call(this)||this;return Object.defineProperties(a,{_instanceId:{value:i++},channel:{value:n},_log:{value:r.log.createLog(`default`,a)},_getReceiver:{value:t},_receiverPromise:{value:null,writable:!0},_transport:{value:null,writable:!0}}),a}return Object.defineProperty(t.prototype,"isSetup",{get:function(){return!!this._receiverPromise},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return`[MediaSignaling #`+this._instanceId+`:`+this.channel+`]`},t.prototype.setup=function(e){var t=this;this._teardown(),this._log.info(`setting up msp transport for id:`,e);var n=this._getReceiver(e).then(function(e){if(e.kind!==`data`&&t._log.error(`Expected a DataTrackReceiver`),t._receiverPromise===n){try{t._transport=e.toDataTransport(),t.emit(`ready`,t._transport)}catch(e){t._log.error(`Failed to toDataTransport: `+e.message)}e.once(`close`,function(){return t._teardown()})}});this._receiverPromise=n},t.prototype._teardown=function(){this._transport&&(this._log.info(`Tearing down`),this._transport=null,this._receiverPromise=null,this.emit(`teardown`))},t}(r)})),require_dominantspeakersignaling=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this,t,`active_speaker`,n)||this;return Object.defineProperties(r,{_loudestParticipantSid:{value:null,writable:!0}}),r.on(`ready`,function(e){e.on(`message`,function(e){e.type===`active_speaker`&&r._setLoudestParticipantSid(e.participant)})}),r}return Object.defineProperty(t.prototype,"loudestParticipantSid",{get:function(){return this._loudestParticipantSid},enumerable:!1,configurable:!0}),t.prototype._setLoudestParticipantSid=function(e){this.loudestParticipantSid!==e&&(this._loudestParticipantSid=e,this.emit(`updated`))},t}(require_mediasignaling())})),require_icereport=__commonJSMin(((e,t)=>{t.exports=function(){function e(e,t,n,r){Object.defineProperties(this,{availableSend:{enumerable:!0,value:n},recv:{enumerable:!0,value:t},rtt:{enumerable:!0,value:r},send:{enumerable:!0,value:e}})}return e.of=function(t,n){var r=(n.timestamp-t.timestamp)/1e3,i=n.bytesSent-t.bytesSent,a=n.bytesReceived-t.bytesReceived,o=r>0?i/r*8:0,c=r>0?a/r*8:0,u=n.availableOutgoingBitrate,K=n.currentRoundTripTime;return new e(o,c,u,K)},e}()})),require_icereportfactory=__commonJSMin(((e,t)=>{var n=require_icereport();t.exports=function(){function e(){Object.defineProperties(this,{lastReport:{enumerable:!0,value:new n(0,0),writable:!0},lastStats:{enumerable:!0,value:null,writable:!0}})}return e.prototype.next=function(e){var t=this.lastStats;if(this.lastStats=e,t){var r=t.id===e.id?n.of(t,e):new n(0,0);this.lastReport=r}return this.lastReport},e}()})),require_average=__commonJSMin(((e,t)=>{function n(e){return e=e.filter(function(e){return typeof e==`number`}),e.length<1?void 0:e.reduce(function(e,t){return t+e})/e.length}t.exports=n})),require_senderorreceiverreport=__commonJSMin(((e,t)=>{t.exports=function(){function e(e,t,n){Object.defineProperties(this,{id:{enumerable:!0,value:e},trackId:{enumerable:!0,value:t},bitrate:{enumerable:!0,value:n}})}return e}()})),require_sum=__commonJSMin(((e,t)=>{function n(e){return e.reduce(function(e,t){return typeof t==`number`?t+e:e},0)}t.exports=n})),require_receiverreport=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
122t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_average(),i=require_senderorreceiverreport(),a=require_sum();t.exports=function(e){n(t,e);function t(t,n,r,i,a,o,c){var u=e.call(this,t,n,r)||this,K=a>0?i/a:0;return Object.defineProperties(u,{deltaPacketsLost:{enumerable:!0,value:i},deltaPacketsReceived:{enumerable:!0,value:a},fractionLost:{enumerable:!0,value:o},jitter:{enumerable:!0,value:c},phonyFractionLost:{enumerable:!0,value:K}}),u}return t.of=function(e,n,r){if(n.id!==r.id)throw Error(`RTCStats IDs must match`);var i=(r.timestamp-n.timestamp)/1e3,a=r.bytesReceived-n.bytesReceived,o=i>0?a/i*8:0,c=Math.max(r.packetsLost-n.packetsLost,0),u=r.packetsReceived-n.packetsReceived,K=r.fractionLost,Y=r.jitter;return new t(n.id,e,o,c,u,K,Y)},t.summarize=function(e){var t=e.map(function(e){return e.summarize()});return{bitrate:a(t.map(function(e){return e.bitrate})),fractionLost:r(t.map(function(e){return e.fractionLost})),jitter:r(t.map(function(e){return e.jitter}))}},t.prototype.summarize=function(){return{bitrate:this.bitrate,fractionLost:typeof this.fractionLost==`number`?this.fractionLost:this.phonyFractionLost,jitter:this.jitter}},t}(i)})),require_senderreport=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_average(),i=require_senderorreceiverreport(),a=require_sum();t.exports=function(e){n(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r)||this;return Object.defineProperties(a,{rtt:{enumerable:!0,value:i}}),a}return t.of=function(e,n,r,i){if(n.id!==r.id)throw Error(`RTCStats IDs must match`);var a=(r.timestamp-n.timestamp)/1e3,o=r.bytesSent-n.bytesSent,c=a>0?o/a*8:0,u=i&&typeof i.roundTripTime==`number`?i.roundTripTime/1e3:void 0;return new t(n.id,e,c,u)},t.summarize=function(e){return{bitrate:a(e.map(function(e){return e.bitrate})),rtt:r(e.map(function(e){return e.rtt}))}},t}(i)})),require_peerconnectionreport=__commonJSMin(((e,t)=>{var n=require_receiverreport(),r=require_senderreport();t.exports=function(){function e(e,t,n){Object.defineProperties(this,{ice:{enumerable:!0,value:e},audio:{enumerable:!0,value:t},video:{enumerable:!0,value:n}})}return e.prototype.summarize=function(){var e=this.audio.send.concat(this.video.send),t=r.summarize(e),i=this.audio.recv.concat(this.video.recv),a=n.summarize(i);return{ice:this.ice,send:t,recv:a,audio:{send:r.summarize(this.audio.send),recv:n.summarize(this.audio.recv)},video:{send:r.summarize(this.video.send),recv:n.summarize(this.video.recv)}}},e}()})),require_senderorreceiverreportfactory=__commonJSMin(((e,t)=>{t.exports=function(){function e(e,t,n){Object.defineProperties(this,{id:{enumerable:!0,value:e,writable:!0},trackId:{enumerable:!0,value:t,writable:!0},lastStats:{enumerable:!0,value:n,writable:!0}})}return e}()})),require_receiverreportfactory=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_receiverreport();t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this,n.id,t,n)||this;return Object.defineProperties(r,{lastReport:{enumerable:!0,value:null,writable:!0}}),r}return t.prototype.next=function(e,t){var n=this.lastStats;this.lastStats=t,this.trackId=e;var i=r.of(e,n,t);return this.lastReport=i,i},t}(require_senderorreceiverreportfactory())})),require_senderreportfactory=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
122t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_senderorreceiverreportfactory(),i=require_senderreport();t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this,n.id,t,n)||this;return Object.defineProperties(r,{lastReport:{enumerable:!0,value:null,writable:!0}}),r}return t.prototype.next=function(e,t,n){var r=this.lastStats;this.lastStats=t,this.trackId=e;var a=i.of(e,r,t,n);return this.lastReport=a,a},t}(r)})),require_peerconnectionreportfactory=__commonJSMin(((e,t)=>{var n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},i=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},a=require_util$1().guessBrowser,o=require_icereportfactory(),c=require_peerconnectionreport(),u=require_receiverreportfactory(),K=require_senderreportfactory(),Y=function(){function e(e){Object.defineProperties(this,{pc:{enumerable:!0,value:e},ice:{enumerable:!0,value:new o},audio:{enumerable:!0,value:{send:new Map,recv:new Map}},video:{enumerable:!0,value:{send:new Map,recv:new Map}},lastReport:{enumerable:!0,value:null,writable:!0}})}return e.prototype.next=function(){var e=this;return(a()===`firefox`?ze(this):qe(this)).then(function(){var t=r([],n(e.audio.send.values())),i=r([],n(e.video.send.values())),a=r([],n(e.audio.recv.values())),o=r([],n(e.video.recv.values())),u=new c(e.ice.lastReport,{send:t.map(function(e){return e.lastReport}).filter(function(e){return e}),recv:a.map(function(e){return e.lastReport}).filter(function(e){return e})},{send:i.map(function(e){return e.lastReport}).filter(function(e){return e}),recv:o.map(function(e){return e.lastReport}).filter(function(e){return e})});return e.lastReport=u,u})},e}();function X(e){return Promise.all(e.map(function(e){var t=e.track.id;return e.getStats().then(function(e){var n,r;try{for(var a=i(e.values()),o=a.next();!o.done;o=a.next()){var c=o.value;c.type===`inbound-rtp`&&(c.id=t+`-`+c.id)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[t,e]})})).then(function(e){return new Map(e)})}function ee(e,t,n,r,i){var a=t[r.mediaType];if(!i){var o=n.get(r.trackId);o&&(i=o.trackIdentifier)}if(a&&i){if(a.has(r.id))return a.get(r.id);var c=new e(i,r);a.set(r.id,c)}return null}function te(e){return{audio:e.audio.send,video:e.video.send}}function ce(e){return{audio:e.audio.recv,video:e.video.recv}}function ue(e,t,n,r){return ee(K,te(e),t,n,r)}function de(e,t,n,r){return ee(u,ce(e),t,n,r)}function fe(e){return{audio:new Set(e.audio.send.keys()),video:new Set(e.video.send.keys())}}function me(e){return{audio:new Set(e.audio.recv.keys()),video:new Set(e.video.recv.keys())}}function ge(e,t,n,r){var o,c;try{for(var u=i(t.values()),K=u.next();!K.done;K=u.next()){var Y=K.value;if(Y.type===`outbound-rtp`&&!Y.isRemote){if(a()!==`firefox`&&!Y.trackId)continue;var X=n[Y.mediaType];X&&X.delete(Y.id);var ee=ue(e,t,Y,r);if(ee){var te=t.get(Y.remoteId);ee.next(r||ee.trackId,Y,te)}}}}catch(e){o={error:e}}finally{try{K&&!K.done&&(c=u.return)&&c.call(u)}finally{if(o)throw o.error}}}function Te(e,t,n,r){var a,o;try{for(var c=i(t.values()),u=c.next();!u.done;u=c.next()){var K=u.value;if(K.type===`inbound-rtp`&&!K.isRemote){var Y=n[K.mediaType];Y&&Y.delete(K.id);var X=de(e,t,K,r);X&&X.next(r||X.trackId,K)}}}catch(e){a={error:e}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(a)throw a.error}}}function Oe(e,t){var n=function(n){var r=e[n];t[n].forEach(function(e){return r.delete(e)})};for(var r in t)n(r)}function Ae(e,t){var n,r,a,o,c;try{for(var u=i(t.values()),K=u.next();!K.done;K=u.next()){var Y=K.value;Y.type===`transport`&&(c=t.get(Y.selectedCandidatePairId))}}catch(e){n={error:e}}finally{try{K&&!K.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}if(c){e.next(c);return}try{for(var X=i(t.values()),ee=X.next();!ee.done;ee=X.next()){var Y=ee.value;Y.type===`candidate-pair`&&Y.nominated&&(!(`selected`in Y)||Y.selected)&&e.next(Y)}}catch(e){a={error:e}}finally{try{ee&&!ee.done&&(o=X.return)&&o.call(X)}finally{if(a)throw a.error}}}function ze(e){var t=e.pc.getTransceivers().filter(function(e){return e.currentDirection&&e.currentDirection.match(/send/)&&e.sender.track}).map(function(e){return e.sender}),r=e.pc.getTransceivers().filter(function(e){return e.currentDirection&&e.currentDirection.match(/recv/)}).map(function(e){return e.receiver});return Promise.all([X(t),X(r),e.pc.getStats()]).then(function(t){var r=n(t,3),i=r[0],a=r[1],o=r[2],c=te(e),u=fe(e);
122i.forEach(function(t,n){return ge(e,t,u,n)}),Oe(c,u);var K=ce(e),Y=me(e);a.forEach(function(t,n){return Te(e,t,Y,n)}),Oe(K,Y),Ae(e.ice,o)})}function qe(e){return e.pc.getStats().then(function(t){var n=te(e),r=fe(e);ge(e,t,r),Oe(n,r);var i=ce(e),a=me(e);Te(e,t,a),Oe(i,a),Ae(e.ice,t)})}t.exports=Y})),require_networkqualitymonitor=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=require_events(),a=require_peerconnectionreportfactory(),o=function(e){n(t,e);function t(t,n){var r=e.call(this)||this;return Object.defineProperties(r,{_factories:{value:new WeakMap},_manager:{value:t},_signaling:{value:n}}),n.on(`updated`,function(){return r.emit(`updated`)}),r}return Object.defineProperty(t.prototype,"level",{get:function(){return this._signaling.level},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"levels",{get:function(){return this._signaling.levels},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"remoteLevels",{get:function(){return this._signaling.remoteLevels},enumerable:!1,configurable:!0}),t.prototype.start=function(){var e=this;this.stop();var t=setTimeout(function(){e._timeout===t&&c(e).then(function(n){if(e._timeout===t){if(n.length){var i=r(n,1)[0];e._signaling.put(i)}e.start()}})},200);this._timeout=t},t.prototype.stop=function(){clearTimeout(this._timeout),this._timeout=null},t}(i);function c(e){var t=(e._manager._peerConnections?Array.from(e._manager._peerConnections.values()):[]).map(function(e){return e._peerConnection}).filter(function(e){return e.signalingState!==`closed`}).map(function(t){if(e._factories.has(t))return e._factories.get(t);var n=new a(t);return e._factories.set(t,n),n}).map(function(e){return e.next().catch(function(){return null})});return Promise.all(t).then(function(e){return e.filter(function(e){return e}).map(function(e){return e.summarize()})})}t.exports=o})),require_asyncvar=__commonJSMin(((e,t)=>{var n=require_util().defer;t.exports=function(){function e(){Object.defineProperties(this,{_deferreds:{value:[]},_hasValue:{value:!1,writable:!0},_value:{value:null,writable:!0}})}return e.prototype.put=function(e){this._hasValue=!0,this._value=e;var t=this._deferreds.shift();return t&&t.resolve(e),this},e.prototype.take=function(){var e=this;if(this._hasValue&&!this._deferreds.length)return this._hasValue=!1,Promise.resolve(this._value);var t=n();return this._deferreds.push(t),t.promise.then(function(t){return e._hasValue=!1,t})},e}()})),require_networkqualitysignaling=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_mediasignaling(),i=require_asyncvar(),a=require_timeout(),o=5e3,c=function(e){n(t,e);function t(t,n,r){var c=e.call(this,t,`network_quality`,r)||this;return Object.defineProperties(c,{_level:{value:null,writable:!0},_levels:{value:null,writable:!0},_remoteLevels:{value:new Map,writable:!0},_networkQualityInputs:{value:new i},_resendTimer:{value:new a(function(){c._resendTimer.setDelay(c._resendTimer.delay*1.5),c._sendNetworkQualityInputs()},o,!1)},_networkQualityReportLevels:{get:function(){return{reportLevel:n.local,remoteReportLevel:n.remote}}}}),c.on(`ready`,function(e){e.on(`message`,function(e){c._log.debug(`Incoming: `,e),e.type===`network_quality`&&c._handleNetworkQualityMessage(e)})}),c._sendNetworkQualityInputs(),c}return Object.defineProperty(t.prototype,"level",{get:function(){return this._level}
122,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"levels",{get:function(){return this._levels},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"remoteLevels",{get:function(){return this._remoteLevels},enumerable:!1,configurable:!0}),t.prototype._handleNetworkQualityMessage=function(e){var t=this,n=!1,r=null,i=e?e.local:null;typeof i==`number`?(r=i,this._levels=null):typeof i==`object`&&i&&(this._levels=i,r=typeof i.level==`number`?i.level:Math.min(i.audio.send,i.audio.recv,i.video.send,i.video.recv)),r!==null&&this.level!==r&&(this._level=r,n=!0),this._remoteLevels=e&&e.remotes?e.remotes.reduce(function(e,r){return(t._remoteLevels.get(r.sid)||{}).level!==r.level&&(n=!0),e.set(r.sid,r)},new Map):this._remoteLevels,n&&this.emit(`updated`),this._resendTimer.setDelay(o),this._resendTimer.isSet&&setTimeout(function(){return t._sendNetworkQualityInputs()},1e3)},t.prototype._sendNetworkQualityInputs=function(){var e=this;return this._resendTimer.clear(),this._networkQualityInputs.take().then(function(t){e._transport&&e._transport.publish(u(t,e._networkQualityReportLevels))}).finally(function(){e._resendTimer.start()})},t.prototype.put=function(e){this._networkQualityInputs.put(e)},t}(r);function u(e,t){return Object.assign({type:`network_quality`},e,t)}t.exports=c})),require_recording$1=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(){var t=e.call(this)||this;return Object.defineProperties(t,{_isEnabled:{value:null,writable:!0},isEnabled:{enumerable:!0,get:function(){return this._isEnabled}}}),t}return t.prototype.disable=function(){return this.enable(!1)},t.prototype.enable=function(e){return e=typeof e!=`boolean`||e,this.isEnabled!==e&&(this._isEnabled=e,this.emit(`updated`)),this},t}(require_events().EventEmitter)})),require_recording=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(){var t=e.call(this)||this;return Object.defineProperties(t,{_revision:{value:1,writable:!0}}),t}return t.prototype.update=function(e){return e.revision<this._revision?this:(this._revision=e.revision,this.enable(e.is_recording))},t}(require_recording$1())})),require_room$1=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_recording$1(),i=require_statemachine(),a=require_timeout(),o=require_util().buildLogLevels,c=require_constants().DEFAULT_LOG_LEVEL,u=require_log(),K=require_twilio_video_errors(),Y=K.MediaConnectionError,X=K.MediaDTLSTransportFailedError,ee=K.SignalingConnectionDisconnectedError,te=0,ce={connected:[`reconnecting`,`disconnected`],reconnecting:[`connected`,`disconnected`],disconnected:[]},ue=function(e){n(t,e);function t(t,n,i,K){var Y=this;K=Object.assign({logLevel:c,RecordingSignaling:r,Timeout:a},K);var ee=o(K.logLevel);Y=e.call(this,`connected`,ce)||this;var ue=K.RecordingSignaling,fe=new K.Timeout(function(){Y._disconnect(Y._reconnectingError)},K.sessionTimeout,!1);return Object.defineProperties(Y,{_instanceId:{value:te++},_log:{value:K.log?K.log.createLog(`default`,Y):new u(`default`,Y,ee,K.loggerName)}
122,_mediaConnectionIsReconnecting:{writable:!0,value:!1},_options:{value:K},_reconnectingError:{value:null,writable:!0},_sessionTimeout:{value:fe},dominantSpeakerSid:{enumerable:!0,value:null,writable:!0},localParticipant:{enumerable:!0,value:t},name:{enumerable:!0,value:i},participants:{enumerable:!0,value:new Map},recording:{enumerable:!0,value:new ue},sid:{enumerable:!0,value:n}}),Y.on(`connectionStateChanged`,function(){Y.connectionState===`failed`&&![`disconnected`,`failed`].includes(Y.iceConnectionState)&&Y._disconnect(new X)}),Y.on(`iceConnectionStateChanged`,function(){return de(Y)}),Y.on(`signalingConnectionStateChanged`,function(){return de(Y)}),setTimeout(function(){return de(Y)}),Y}return t.prototype._disconnect=function(e){return this.state!==`disconnected`&&(this.preempt(`disconnected`,null,[e]),!0)},t.prototype.toString=function(){return`[RoomSignaling #`+this._instanceId+`: `+(this.localParticipant?this.localParticipant.sid:`null`)+`]`},t.prototype.connectParticipant=function(e){var t=this;return e.state===`disconnected`||this.participants.has(e.sid)?!1:(this.participants.set(e.sid,e),e.on(`stateChanged`,function n(r){r===`disconnected`&&(e.removeListener(`stateChanged`,n),t.participants.delete(e.sid),t.emit(`participantDisconnected`,e))}),this.emit(`participantConnected`,e),!0)},t.prototype.disconnect=function(){return this._disconnect()},t.prototype.setDominantSpeaker=function(e){this.dominantSpeakerSid=e,this.emit(`dominantSpeakerChanged`)},t}(i);function de(e){if(e.state===`disconnected`||e.signalingConnectionState===`disconnected`){e._sessionTimeout.clear();return}var t;e.signalingConnectionState===`reconnecting`?t=e.signalingConnectionState:e.iceConnectionState===`failed`?(e._mediaConnectionIsReconnecting=!0,t=`reconnecting`):e.iceConnectionState===`new`||e.iceConnectionState===`checking`?t=e._mediaConnectionIsReconnecting?`reconnecting`:`connected`:(e._mediaConnectionIsReconnecting=!1,e._reconnectingError=null,e._sessionTimeout.clear(),t=`connected`),t!==e.state&&(t===`reconnecting`?(e._reconnectingError=e.signalingConnectionState===`reconnecting`?new ee:new Y,e._sessionTimeout.start(),e.preempt(t,null,[e._reconnectingError])):e.preempt(t))}t.exports=ue})),require_networkqualitybandwidthstats=__commonJSMin(((e,t)=>{t.exports=function(){function e(e){var t=e.actual,n=t===void 0?null:t,r=e.available,i=r===void 0?null:r,a=e.level,o=a===void 0?null:a;Object.defineProperties(this,{actual:{value:n,enumerable:!0},available:{value:i,enumerable:!0},level:{value:o,enumerable:!0}})}return e}()})),require_networkqualityfractionloststats=__commonJSMin(((e,t)=>{t.exports=function(){function e(e){var t=e.fractionLost,n=t===void 0?null:t,r=e.level,i=r===void 0?null:r;Object.defineProperties(this,{fractionLost:{value:n,enumerable:!0},level:{value:i,enumerable:!0}})}return e}()})),require_networkqualitylatencystats=__commonJSMin(((e,t)=>{t.exports=function(){function e(e){var t=e.jitter,n=t===void 0?null:t,r=e.rtt,i=r===void 0?null:r,a=e.level,o=a===void 0?null:a;Object.defineProperties(this,{jitter:{value:n,enumerable:!0},rtt:{value:i,enumerable:!0},level:{value:o,enumerable:!0}})}return e}()})),require_networkqualitysendorrecvstats=__commonJSMin(((e,t)=>{var n=require_networkqualitybandwidthstats(),r=require_networkqualityfractionloststats(),i=require_networkqualitylatencystats();t.exports=function(){function e(e){var t=e.bandwidth,a=t===void 0?null:t,o=e.fractionLost,c=o===void 0?null:o,u=e.latency,K=u===void 0?null:u;Object.defineProperties(this,{bandwidth:{value:a?new n(a):null,enumerable:!0},fractionLost:{value:c?new r(c):null,enumerable:!0},latency:{value:K?new i(K):null,enumerable:!0}})}return e}()})),require_networkqualitysendstats=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
122t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t){return e.call(this,t)||this}return t}(require_networkqualitysendorrecvstats())})),require_networkqualityrecvstats=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t){return e.call(this,t)||this}return t}(require_networkqualitysendorrecvstats())})),require_networkqualitymediastats=__commonJSMin(((e,t)=>{var n=require_networkqualitysendstats(),r=require_networkqualityrecvstats();t.exports=function(){function e(e){var t=e.send,i=e.recv,a=e.sendStats,o=a===void 0?null:a,c=e.recvStats,u=c===void 0?null:c;Object.defineProperties(this,{send:{value:t,enumerable:!0},recv:{value:i,enumerable:!0},sendStats:{value:o?new n(o):null,enumerable:!0},recvStats:{value:u?new r(u):null,enumerable:!0}})}return e}()})),require_networkqualityaudiostats=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t){return e.call(this,t)||this}return t}(require_networkqualitymediastats())})),require_networkqualityvideostats=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t){return e.call(this,t)||this}return t}(require_networkqualitymediastats())})),require_networkqualitystats=__commonJSMin(((e,t)=>{var n=require_networkqualityaudiostats(),r=require_networkqualityvideostats();t.exports=function(){function e(e){var t=e.level,i=e.audio,a=e.video;Object.defineProperties(this,{level:{value:t,enumerable:!0},audio:{value:i?new n(i):null,enumerable:!0},video:{value:a?new r(a):null,enumerable:!0}})}return e}()})),require_participant=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_statemachine(),i=require_networkqualitystats(),a={connecting:[`connected`],connected:[`disconnected`,`reconnecting`],reconnecting:[`connected`,`disconnected`],disconnected:[]};t.exports=function(e){n(t,e);function t(){var t=e.call(this,`connecting`,a)||this;return Object.defineProperties(t,{_identity:{writable:!0,value:null},_networkQualityLevel:{value:null,writable:!0},_networkQualityStats:{value:null,writable:!0},_sid:{writable:!0,value:null},identity:{enumerable:!0,get:function(){return this._identity}},sid:{enumerable:!0,get:function(){return this._sid}},tracks:{enumerable:!0,value:new Map}}),t}return Object.defineProperty(t.prototype,"networkQualityLevel",{get:function(){return this._networkQualityLevel}
122,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"networkQualityStats",{get:function(){return this._networkQualityStats},enumerable:!1,configurable:!0}),t.prototype.addTrack=function(e){return this.tracks.set(e.id||e.sid,e),this.emit(`trackAdded`,e),this},t.prototype.disconnect=function(){return this.state!==`disconnected`&&(this.preempt(`disconnected`),!0)},t.prototype.removeTrack=function(e){var t=this.tracks.get(e.id||e.sid);return this.tracks.delete(e.id||e.sid),t&&this.emit(`trackRemoved`,e),t||null},t.prototype.setNetworkQualityLevel=function(e,t){this._networkQualityLevel!==e&&(this._networkQualityLevel=e,this._networkQualityStats=t&&(t.audio||t.video)?new i(t):null,this.emit(`networkQualityLevelChanged`))},t.prototype.connect=function(e,t){return this.state===`connecting`||this.state===`reconnecting`?(this._sid||=e,this._identity||=t,this.preempt(`connected`),!0):!1},t.prototype.reconnecting=function(){return this.state===`connecting`||this.state===`connected`?(this.preempt(`reconnecting`),!0):!1},t}(r)})),require_remoteparticipant$1=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this)||this;return r.connect(t,n),r}return t}(require_participant())})),require_track=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n,r,i){var a=e.call(this)||this,o=null;return Object.defineProperties(a,{_error:{value:null,writable:!0},_isEnabled:{value:r,writable:!0},_priority:{value:i,writable:!0},_trackTransceiver:{value:null,writable:!0},_sid:{get:function(){return o},set:function(e){o===null&&(o=e)}},kind:{enumerable:!0,value:n},name:{enumerable:!0,value:t}}),a}return Object.defineProperty(t.prototype,"error",{get:function(){return this._error},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"priority",{get:function(){return this._priority},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sid",{get:function(){return this._sid},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trackTransceiver",{get:function(){return this._trackTransceiver},enumerable:!1,configurable:!0}),t.prototype.disable=function(){return this.enable(!1)},t.prototype.enable=function(e){return e=typeof e!=`boolean`||e,this.isEnabled!==e&&(this._isEnabled=e,this.emit(`updated`)),this},t.prototype.setTrackTransceiver=function(e){return e||=null,this.trackTransceiver!==e&&(this._trackTransceiver=e,this.emit(`updated`)),this},t.prototype.setSid=function(e){return this.sid===null&&(this._sid=e,this.emit(`updated`)),this},t}(require_events().EventEmitter)})),require_remotetrackpublication$1=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
122t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n,r,i,a,o){var c=e.call(this,n,r,i,a)||this;return Object.defineProperties(c,{_isSwitchedOff:{value:o,writable:!0}}),c.setSid(t),c}return Object.defineProperty(t.prototype,"isSubscribed",{get:function(){return!!this.trackTransceiver},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSwitchedOff",{get:function(){return this._isSwitchedOff},enumerable:!1,configurable:!0}),t.prototype.subscribeFailed=function(e){return this.error||(this._error=e,this.emit(`updated`)),this},t.prototype.setPriority=function(e){return this._priority!==e&&(this._priority=e,this.emit(`updated`)),this},t.prototype.setSwitchedOff=function(e){return this._isSwitchedOff!==e&&(this._isSwitchedOff=e,this.emit(`updated`)),this},t}(require_track())})),require_remotetrackpublication=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){return e.call(this,t.sid,t.name,t.kind,t.enabled,t.priority,n)||this}return t.prototype.update=function(e){return this.enable(e.enabled),this.setPriority(e.priority),this},t}(require_remotetrackpublication$1())})),require_remoteparticipant=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_remoteparticipant$1(),i=require_remotetrackpublication();t.exports=function(e){n(t,e);function t(t,n,r,a,o,c){var u=e.call(this,t.sid,t.identity)||this;return c=Object.assign({RemoteTrackPublicationV2:i},c),Object.defineProperties(u,{_revision:{writable:!0,value:null},_RemoteTrackPublicationV2:{value:c.RemoteTrackPublicationV2},_getInitialTrackSwitchOffState:{value:n},updateSubscriberTrackPriority:{value:function(e,t){return r(e,t)}},updateTrackRenderHint:{value:function(e,t){return a(e,t)}},clearTrackHint:{value:function(e){return o(e)}},revision:{enumerable:!0,get:function(){return this._revision}}}),u.update(t)}return t.prototype._getOrCreateTrack=function(e){var t=this._RemoteTrackPublicationV2,n=this.tracks.get(e.sid);return n||(n=new t(e,this._getInitialTrackSwitchOffState(e.sid)),this.addTrack(n)),n},t.prototype.update=function(e){var t=this;if(this.revision!==null&&e.revision<=this.revision)return this;this._revision=e.revision;var n=new Set;switch(e.tracks.forEach(function(e){var r=t._getOrCreateTrack(e);r.update(e),n.add(r)}),this.tracks.forEach(function(e){n.has(e)||t.removeTrack(e)}),e.state){case`disconnected`:this.disconnect();break;case`reconnecting`:this.reconnecting();break;case`connected`:this.connect(this.sid,this.identity)}return this},t}(r)})),require_trackprioritysignaling=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this,t,`track_priority`,n)||this;return Object.defineProperties(r,{_enqueuedPriorityUpdates:{value:new Map}}),r.on(`ready`,function(e){Array.from(r._enqueuedPriorityUpdates.keys()).forEac
122h(function(t){e.publish({type:`track_priority`,track:t,subscribe:r._enqueuedPriorityUpdates.get(t)})})}),r}return t.prototype.sendTrackPriorityUpdate=function(e,t,n){if(t!==`subscribe`)throw Error(`only subscribe priorities are supported, found: `+t);this._enqueuedPriorityUpdates.set(e,n),this._transport&&this._transport.publish({type:`track_priority`,track:e,subscribe:n})},t}(require_mediasignaling())})),require_trackswitchoffsignaling=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this,t,`track_switch_off`,n)||this;return r.on(`ready`,function(e){e.on(`message`,function(e){e.type===`track_switch_off`&&r._setTrackSwitchOffUpdates(e.off||[],e.on||[])})}),r}return t.prototype._setTrackSwitchOffUpdates=function(e,t){this.emit(`updated`,e,t)},t}(require_mediasignaling())})),require_renderhintssignaling=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_mediasignaling(),i=require_timeout(),a=require_util().isDeepEqual,o=2e3,c=1;t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this,t,`render_hints`,n)||this;return Object.defineProperties(r,{_trackSidsToRenderHints:{value:new Map},_responseTimer:{value:new i(function(){r._sendAllHints(),r._responseTimer.setDelay(r._responseTimer.delay*2)},o,!1)}}),r.on(`ready`,function(e){e.on(`message`,function(e){switch(r._log.debug(`Incoming: `,e),e.type){case`render_hints`:r._processHintResults(e&&e.subscriber&&e.subscriber.hints||[]);break;default:r._log.warn(`Unknown message type: `,e.type)}}),r._sendAllHints()}),r}return t.prototype._sendAllHints=function(){var e=this;Array.from(this._trackSidsToRenderHints.keys()).forEach(function(t){var n=e._trackSidsToRenderHints.get(t);n.renderDimensions&&(n.isDimensionDirty=!0),`enabled`in n&&(n.isEnabledDirty=!0)}),this._sendHints()},t.prototype._processHintResults=function(e){var t=this;this._responseTimer.clear(),this._responseTimer.setDelay(o),e.forEach(function(e){e.result!==`OK`&&t._log.debug(`Server error processing hint:`,e)}),this._sendHints()},t.prototype._sendHints=function(){var e=this;if(this._transport&&!this._responseTimer.isSet){var t=[];if(Array.from(this._trackSidsToRenderHints.keys()).forEach(function(n){var r=e._trackSidsToRenderHints.get(n);if(r.isEnabledDirty||r.isDimensionDirty){var i={track:n};r.isEnabledDirty&&=(i.enabled=r.enabled,!1),r.isDimensionDirty&&=(i.render_dimensions=r.renderDimensions,!1),t.push(i)}}),t.length>0){var n={type:`render_hints`,subscriber:{id:c++,hints:t}};this._log.debug(`Outgoing: `,n),this._transport.publish(n),this._responseTimer.start()}}},t.prototype.setTrackHint=function(e,t){var n=this._trackSidsToRenderHints.get(e)||{isEnabledDirty:!1,isDimensionDirty:!1};`enabled`in t&&n.enabled!==t.enabled&&(n.enabled=!!t.enabled,n.isEnabledDirty=!0),t.renderDimensions&&!a(t.renderDimensions,n.renderDimensions)&&(n.renderDimensions=t.renderDimensions,n.isDimensionDirty=!0),this._trackSidsToRenderHints.set(e,n),this._sendHints()},t.prototype.clearTrackHint=function(e){this._trackSidsToRenderHints.delete(e)},t}(r)})),require_publisherhintsignaling=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
122t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_mediasignaling(),i=1;t.exports=function(e){n(t,e);function t(t,n){var r=e.call(this,t,`publisher_hints`,n)||this;return r.on(`ready`,function(e){r._log.debug(`publisher_hints transport ready:`,e),e.on(`message`,function(e){switch(r._log.debug(`Incoming: `,e),e.type){case`publisher_hints`:e.publisher&&e.publisher.hints&&e.publisher.id&&r._processPublisherHints(e.publisher.hints,e.publisher.id);break;default:r._log.warn(`Unknown message type: `,e.type)}})}),r}return t.prototype.sendTrackReplaced=function(e){var t=e.trackSid;if(this._transport){var n={type:`client_reset`,track:t,id:i++};this._log.debug(`Outgoing: `,n),this._transport.publish(n)}},t.prototype.sendHintResponse=function(e){var t=e.id,n=e.hints;if(this._transport){var r={type:`publisher_hints`,id:t,hints:n};this._log.debug(`Outgoing: `,r),this._transport.publish(r)}},t.prototype._processPublisherHints=function(e,t){try{this.emit(`updated`,e,t)}catch(e){this._log.error(`error processing hints:`,e)}},t}(r)})),require_room=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},i=require_dominantspeakersignaling(),a=require_networkqualitymonitor(),o=require_networkqualitysignaling(),c=require_recording(),u=require_room$1(),K=require_remoteparticipant(),Y=require_statsreport(),X=require_trackprioritysignaling(),ee=require_trackswitchoffsignaling(),te=require_renderhintssignaling(),ce=require_publisherhintsignaling(),ue=require_util(),de=ue.constants.DEFAULT_SESSION_TIMEOUT_SEC,fe=ue.createBandwidthProfilePayload,me=ue.defer,ge=ue.difference,Te=ue.filterObject,Oe=ue.flatMap,Ae=ue.oncePerTick,ze=require_movingaveragedelta(),qe=require_twilio_video_errors().createTwilioError,Ye=1e4,Ze=function(e){n(t,e);function t(t,n,r,u,Y){var ue=this;n.options=Object.assign({session_timeout:de},n.options),Y=Object.assign({DominantSpeakerSignaling:i,NetworkQualityMonitor:a,NetworkQualitySignaling:o,RecordingSignaling:c,RemoteParticipantV2:K,TrackPrioritySignaling:X,TrackSwitchOffSignaling:ee,bandwidthProfile:null,sessionTimeout:n.options.session_timeout*1e3,statsPublishIntervalMs:Ye},Y),t.setBandwidthProfile(Y.bandwidthProfile);var fe=n.options,me=fe.signaling_region,ge=fe.audio_processors,Te=ge===void 0?[]:ge;t.setSignalingRegion(me),Te.includes(`krisp`)&&Te.push(`rnnoise`),t.setAudioProcessors(Te),u.setIceReconnectTimeout(Y.sessionTimeout),ue=e.call(this,t,n.sid,n.name,Y)||this;var Oe=function(e){return ue._getTrackReceiver(e)},Ae=ue._log;return Object.defineProperties(ue,{_disconnectedParticipantRevisions:{value:new Map},_NetworkQualityMonitor:{value:Y.NetworkQualityMonitor},_lastBandwidthProfileRevision:{value:t.bandwidthProfileRevision,writable:!0},_mediaStatesWarningsRevision:{value:0,writable:!0},_networkQualityMonitor:{value:null,writable:!0},_networkQualityConfiguration:{value:t.networkQualityConfiguration},_peerConnectionManager:{value:u},_published:{value:new Map},_publishedRevision:{value:0,writable:!0},_RemoteParticipantV2:{value:Y.RemoteParticipantV2},_subscribed:{value:new Map},_subscribedRevision:{value:0,writable:!0},_subscriptionFailures:{value:new Map},_dominantSpeakerSignaling:{value:new Y.DominantSpeakerSignaling(Oe,{log:Ae})},_networkQualitySignaling:{value:new Y.NetworkQualitySignaling(Oe,t.networkQualityConfiguration,{log:Ae})},_renderHintsSignaling:{value:new te(Oe,{log:Ae})},_publisherHintsSignaling:{value:new ce(Oe,{log:Ae})},_trackPrioritySignaling:{value:new Y.TrackPrioritySignaling(Oe,{log:Ae})},_trackSwitchOffSignaling:{value:new Y.TrackSwitchOffSignaling(Oe,{log:Ae})},_pendingSwitchOffStates:{value:new Map},_transport:{value:r},_trackReceiverDeferreds:{value:new Map},mediaRegion:{enumerable:!0,value:n.options.media_region||null}}),ue._initTrackSwitchOffSignaling(),ue._initDominantSpeakerSignaling(),ue._initNetworkQualityMonitorSignaling(),ue._initPublisherHintSignaling(),rt(ue,t),it(ue,u),at(ue,r),ot(ue,r,Y.statsPublishIntervalMs),ue._update(n),ue._peerConnectionManager.setEffectiveAdaptiveSimulcast(ue._publisherHintsSignaling.isSetup),ue}return Object.defineProperty(t.prototype,"connectionState",{get:function(){return this._peerConnectionManager.connectionState}
122,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"signalingConnectionState",{get:function(){return this._transport.state===`syncing`?`reconnecting`:this._transport.state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iceConnectionState",{get:function(){return this._peerConnectionManager.iceConnectionState},enumerable:!1,configurable:!0}),t.prototype._deleteTrackReceiverDeferred=function(e){return this._trackReceiverDeferreds.delete(e)},t.prototype._getOrCreateTrackReceiverDeferred=function(e){var t=this._trackReceiverDeferreds.get(e)||me(),n=this._peerConnectionManager.getTrackReceivers().find(function(t){return t.id===e&&t.readyState!==`ended`});return n?t.resolve(n):this._trackReceiverDeferreds.set(e,t),t},t.prototype._addTrackReceiver=function(e){return this._getOrCreateTrackReceiverDeferred(e.id).resolve(e),this},t.prototype._disconnect=function(t){var n=e.prototype._disconnect.call(this,t);return n&&(this._teardownNetworkQualityMonitor(),this._transport.disconnect(),this._peerConnectionManager.close()),this.localParticipant.tracks.forEach(function(e){e.publishFailed(t||Error(`LocalParticipant disconnected`))}),n},t.prototype._getTrackReceiver=function(e){var t=this;return this._getOrCreateTrackReceiverDeferred(e).promise.then(function(n){return t._deleteTrackReceiverDeferred(e),n})},t.prototype._getInitialTrackSwitchOffState=function(e){var t=this._pendingSwitchOffStates.get(e)||!1;return this._pendingSwitchOffStates.delete(e),t&&this._log.warn(`[`+e+`] was initially switched off! `),t},t.prototype._getTrackSidsToTrackSignalings=function(){var e=Oe(this.participants,function(e){return Array.from(e.tracks)});return new Map(e)},t.prototype._getOrCreateRemoteParticipant=function(e){var t=this,n=this._RemoteParticipantV2,r=this.participants.get(e.sid),i=this;return r||(r=new n(e,function(e){return t._getInitialTrackSwitchOffState(e)},function(e,n){return t._trackPrioritySignaling.sendTrackPriorityUpdate(e,`subscribe`,n)},function(e,n){return t._renderHintsSignaling.setTrackHint(e,n)},function(e){return t._renderHintsSignaling.clearTrackHint(e)}),r.on(`stateChanged`,function e(t){t===`disconnected`&&(r.removeListener(`stateChanged`,e),i.participants.delete(r.sid),i._disconnectedParticipantRevisions.set(r.sid,r.revision))}),this.connectParticipant(r)),r},t.prototype._getState=function(){return{participant:this.localParticipant.getState()}},t.prototype._maybeAddBandwidthProfile=function(e){var t=this.localParticipant,n=t.bandwidthProfile,r=t.bandwidthProfileRevision;return n&&this._lastBandwidthProfileRevision<r?(this._lastBandwidthProfileRevision=r,Object.assign({bandwidth_profile:fe(n)},e)):e},t.prototype._publishNewLocalParticipantState=function(){this._transport.publish(this._maybeAddBandwidthProfile(this._getState()))},t.prototype._publishPeerConnectionState=function(e){this._transport.publish(Object.assign({peer_connections:[e]},this._getState()))},t.prototype._update=function(e){var t=this;if(e.subscribed&&e.subscribed.revision>this._subscribedRevision){this._subscribedRevision=e.subscribed.revision,e.subscribed.tracks.forEach(function(e){e.id?(t._subscriptionFailures.delete(e.sid),t._subscribed.set(e.sid,e.id)):e.error&&!t._subscriptionFailures.has(e.sid)&&t._subscriptionFailures.set(e.sid,e.error)});var n=new Set(e.subscribed.tracks.filter(function(e){return!!e.id}).map(function(e){return e.sid}));this._subscribed.forEach(function(e,r){n.has(r)||t._subscribed.delete(r)})}var r=new Set;return(e.participants||[]).forEach(function(e){if(e.sid!==t.localParticipant.sid){var n=t._disconnectedParticipantRevisions.get(e.sid);if(!(n&&e.revision<=n)){n&&t._disconnectedParticipantRevisions.delete(e.sid);var i=t._getOrCreateRemoteParticipant(e);i.update(e),r.add(i)}}}
122),e.type===`synced`&&this.participants.forEach(function(e){r.has(e)||e.disconnect()}),st(this),e.peer_connections&&this._peerConnectionManager.update(e.peer_connections,e.type===`synced`),e.recording&&this.recording.update(e.recording),e.published&&e.published.revision>this._publishedRevision&&(this._publishedRevision=e.published.revision,e.published.tracks.forEach(function(e){e.sid&&t._published.set(e.id,e.sid)}),this.localParticipant.update(e.published)),e.participant&&this.localParticipant.connect(e.participant.sid,e.participant.identity),[this._dominantSpeakerSignaling,this._networkQualitySignaling,this._trackPrioritySignaling,this._trackSwitchOffSignaling,this._renderHintsSignaling,this._publisherHintsSignaling].forEach(function(t){var n=t.channel;!t.isSetup&&e.media_signaling&&e.media_signaling[n]&&e.media_signaling[n].transport&&e.media_signaling[n].transport.type===`data-channel`&&t.setup(e.media_signaling[n].transport.label)}),e.type===`warning`&&e.states&&e.states.revision>this._mediaStatesWarningsRevision&&(this._mediaStatesWarningsRevision=e.states.revision,this.localParticipant.updateMediaStates(e.states)),this},t.prototype._initPublisherHintSignaling=function(){var e=this;this._publisherHintsSignaling.on(`updated`,function(t,n){Promise.all(t.map(function(t){return e.localParticipant.setPublisherHint(t.track,t.encodings).then(function(e){return{track:t.track,result:e}})})).then(function(t){e._publisherHintsSignaling.sendHintResponse({id:n,hints:t})})});var t=function(t){t.kind===`video`&&t.trackTransceiver.on(`replaced`,function(){e._publisherHintsSignaling.sendTrackReplaced({trackSid:t.sid})})};Array.from(this.localParticipant.tracks.values()).forEach(function(e){return t(e)}),this.localParticipant.on(`trackAdded`,function(e){return t(e)})},t.prototype._initTrackSwitchOffSignaling=function(){var e=this;this._trackSwitchOffSignaling.on(`updated`,function(t,n){try{e._log.debug(`received trackSwitch: `,{tracksOn:n,tracksOff:t});var r=new Map;n.forEach(function(e){return r.set(e,!0)}),t.forEach(function(t){r.get(t)&&e._log.warn(t+` is DUPLICATED in both tracksOff and tracksOn list`),r.set(t,!1)}
122),e.participants.forEach(function(e){e.tracks.forEach(function(e){var t=r.get(e.sid);t!==void 0&&(e.setSwitchedOff(!t),r.delete(e.sid))})}),r.forEach(function(t,n){return e._pendingSwitchOffStates.set(n,!t)})}catch(t){e._log.error(`error processing track switch off:`,t)}})},t.prototype._initDominantSpeakerSignaling=function(){var e=this;this._dominantSpeakerSignaling.on(`updated`,function(){return e.setDominantSpeaker(e._dominantSpeakerSignaling.loudestParticipantSid)})},t.prototype._initNetworkQualityMonitorSignaling=function(){var e=this;this._networkQualitySignaling.on(`ready`,function(){var t=new e._NetworkQualityMonitor(e._peerConnectionManager,e._networkQualitySignaling);e._networkQualityMonitor=t,t.on(`updated`,function(){e.iceConnectionState!==`failed`&&(e.localParticipant.setNetworkQualityLevel(t.level,t.levels),e.participants.forEach(function(e){var n=t.remoteLevels.get(e.sid);n&&e.setNetworkQualityLevel(n.level,n)}))}),t.start()}),this._networkQualitySignaling.on(`teardown`,function(){return e._teardownNetworkQualityMonitor()})},t.prototype._teardownNetworkQualityMonitor=function(){this._networkQualityMonitor&&=(this._networkQualityMonitor.stop(),null)},t.prototype.getStats=function(){var e=this;return this._peerConnectionManager.getStats().then(function(t){return new Map(Array.from(t).map(function(t){var n=r(t,2),i=n[0],a=n[1];return[i,Object.assign({},a,{localAudioTrackStats:et(e,a.localAudioTrackStats),localVideoTrackStats:et(e,a.localVideoTrackStats),remoteAudioTrackStats:nt(e,a.remoteAudioTrackStats),remoteVideoTrackStats:nt(e,a.remoteVideoTrackStats)})]}))})},t}(u);function Qe(e,t){return t.reduce(function(t,n){var r=e.get(n.trackId);return r?[Object.assign({},n,{trackSid:r})].concat(t):t},[])}function et(e,t){return Qe(e._published,t)}function nt(e,t){return Qe(new Map(Array.from(e._subscribed.entries()).map(function(e){var t=r(e,2),n=t[0];return[t[1],n]})),t)}function rt(e,t){var n=Ae(function(){e._publishNewLocalParticipantState()}),r=Ae(function(){var n=Oe(t.tracks,function(e){return e.trackTransceiver});e._peerConnectionManager.setTrackSenders(n)});t.on(`trackAdded`,r),t.on(`trackRemoved`,r),t.on(`updated`,n),e.on(`stateChanged`,function i(a){a===`disconnected`&&(t.removeListener(`trackAdded`,r),t.removeListener(`trackRemoved`,r),t.removeListener(`updated`,n),e.removeListener(`stateChanged`,i),t.disconnect())}),e.on(`signalingConnectionStateChanged`,function(){var t=e.localParticipant,n=e.signalingConnectionState,r=t.identity,i=t.sid;switch(n){case`connected`:t.connect(i,r);break;case`reconnecting`:t.reconnecting()}})}function it(e,t){t.on(`description`,function(t){e._publishPeerConnectionState(t)}),t.dequeue(`description`),t.on(`candidates`,function(t){e._publishPeerConnectionState(t)}),t.dequeue(`candidates`),t.on(`trackAdded`,e._addTrackReceiver.bind(e)),t.dequeue(`trackAdded`),t.getTrackReceivers().forEach(e._addTrackReceiver,e),t.on(`connectionStateChanged`,function(){e.emit(`connectionStateChanged`)}),t.on(`iceConnectionStateChanged`,function(){e.emit(`iceConnectionStateChanged`),e.iceConnectionState===`failed`&&(e.localParticipant.networkQualityLevel!==null&&e.localParticipant.setNetworkQualityLevel(0),e.participants.forEac
122h(function(e){e.networkQualityLevel!==null&&e.setNetworkQualityLevel(0)}))})}function at(e,t){t.on(`message`,e._update.bind(e)),t.on(`stateChanged`,function n(r,i){r===`disconnected`&&(e.state!==`disconnected`&&e._disconnect(i),t.removeListener(`stateChanged`,n)),e.emit(`signalingConnectionStateChanged`)})}function ot(e,t,n){var r=new Map,i=!1,a=setInterval(function(){e.getStats().then(function(e){i=!i,e.forEach(function(e,n){var a=new Y(n,e,!0);t.publishEvent(`quality`,`stats-report`,`info`,{audioTrackStats:a.remoteAudioTrackStats.map(function(t,n){return lt(t,e.remoteAudioTrackStats[n],r)}),localAudioTrackStats:a.localAudioTrackStats.map(function(t,n){return ct(t,e.localAudioTrackStats[n],r)}),localVideoTrackStats:a.localVideoTrackStats.map(function(t,n){return ct(t,e.localVideoTrackStats[n],r)}),peerConnectionId:a.peerConnectionId,videoTrackStats:a.remoteVideoTrackStats.map(function(t,n){return lt(t,e.remoteVideoTrackStats[n],r)})});var o=Oe([`localAudioTrackStats`,`localVideoTrackStats`,`remoteAudioTrackStats`,`remoteVideoTrackStats`],function(e){return a[e].map(function(e){var t=e.ssrc;return e.trackSid+`+`+t})});if(ge(Array.from(r.keys()),o).forEach(function(e){return r.delete(e)}),i){var c=ut(e.activeIceCandidatePair,a.peerConnectionId);t.publishEvent(`quality`,`active-ice-candidate-pair`,`info`,c)}})},function(){})},n);e.on(`stateChanged`,function t(n){n===`disconnected`&&(clearInterval(a),e.removeListener(`stateChanged`,t))})}function st(e){var t=e._getTrackSidsToTrackSignalings();e._subscriptionFailures.forEach(function(n,r){var i=t.get(r);i&&(e._subscriptionFailures.delete(r),i.subscribeFailed(qe(n.code,n.message)))}),t.forEach(function(t){var n=e._subscribed.get(t.sid);(!n||t.isSubscribed&&t.trackTransceiver.id!==n)&&t.setTrackTransceiver(null),n&&e._getTrackReceiver(n).then(function(e){return t.setTrackTransceiver(e)})})}function ct(e,t,n){var r=t.framesEncoded,i=t.packetsSent,a=t.totalEncodeTime,o=t.totalPacketSendDelay,c=Object.assign({},e),u=e.trackSid+`+`+e.ssrc,K=n.get(u)||new Map;if(typeof a==`number`&&typeof r==`number`){var Y=K.get(`avgEncodeDelay`)||new ze;Y.putSample(a*1e3,r),c.avgEncodeDelay=Math.round(Y.get()),K.set(`avgEncodeDelay`,Y)}if(typeof o==`number`&&typeof i==`number`){var X=K.get(`avgPacketSendDelay`)||new ze;X.putSample(o*1e3,i),c.avgPacketSendDelay=Math.round(X.get()),K.set(`avgPacketSendDelay`,X)}return n.set(u,K),c}function lt(e,t,n){var r=t.estimatedPlayoutTimestamp,i=t.framesDecoded,a=t.jitterBufferDelay,o=t.jitterBufferEmittedCount,c=t.totalDecodeTime,u=Object.assign({},e),K=e.trackSid+`+`+e.ssrc,Y=n.get(K)||new Map;if(typeof r==`number`&&(u.estimatedPlayoutTimestamp=r),typeof i==`number`&&typeof c==`number`){var X=Y.get(`avgDecodeDelay`)||new ze;X.putSample(c*1e3,i),u.avgDecodeDelay=Math.round(X.get()),Y.set(`avgDecodeDelay`,X)}if(typeof a==`number`&&typeof o==`number`){var ee=Y.get(`avgJitterBufferDelay`)||new ze;ee.putSample(a*1e3,o),u.avgJitterBufferDelay=Math.round(ee.get()),Y.set(`avgJitterBufferDelay`,ee)}return n.set(K,Y),u}function ut(e,t){return e=Object.assign({availableIncomingBitrate:0,availableOutgoingBitrate:0,bytesReceived:0,bytesSent:0,consentRequestsSent:0,currentRoundTripTime:0,lastPacketReceivedTimestamp:0,lastPacketSentTimestamp:0,nominated:!1,peerConnectionId:t,priority:0,readable:!1,requestsReceived:0,requestsSent:0,responsesReceived:0,responsesSent:0,retransmissionsReceived:0,retransmissionsSent:0,state:`failed`,totalRoundTripTime:0,transportId:``,writable:!1},Te(e||{},null)),e.localCandidate=Object.assign({candidateType:`host`,deleted:!1,ip:``,port:0,priority:0,protocol:`udp`,url:``},Te(e.localCandidate||{},null)),e.remoteCandidate=Object.assign({candidateType:`host`,ip:``,port:0,priority:0,protocol:`udp`,url:``},Te(e.remoteCandidate||{},null)),e}t.exports=Ze})),require_twilioconnectiontransport=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
122t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_statemachine(),i=require_twilioconnection(),a=require_backoff(),o=require_constants().reconnectBackoffConfig,c=require_timeout(),u=require_constants(),K=u.SDK_NAME,Y=u.SDK_VERSION,X=u.SDP_FORMAT,ee=require_util(),te=ee.createBandwidthProfilePayload,ce=ee.createMediaSignalingPayload,ue=ee.createMediaWarningsPayload,de=ee.createSubscribePayload,fe=ee.getUserAgent,me=ee.isNonArrayObject,ge=require_twilio_video_errors(),Te=ge.createTwilioError,Oe=ge.RoomCompletedError,Ae=ge.SignalingConnectionError,ze=ge.SignalingServerBusyError,qe=1,Ye=2,Ze={connecting:[`connected`,`disconnected`],connected:[`disconnected`,`syncing`],syncing:[`connected`,`disconnected`],disconnected:[]},Qe=function(e){n(t,e);function t(t,n,r,c,u,K){var Y=this;return K=Object.assign({Backoff:a,TwilioConnection:i,iceServers:null,trackPriority:!0,trackSwitchOff:!0,renderHints:!0,userAgent:fe()},K),Y=e.call(this,`connecting`,Ze)||this,Object.defineProperties(Y,{_accessToken:{value:n},_automaticSubscription:{value:K.automaticSubscription},_bandwidthProfile:{value:K.bandwidthProfile},_dominantSpeaker:{value:K.dominantSpeaker},_adaptiveSimulcast:{value:K.adaptiveSimulcast},_eventObserver:{value:K.eventObserver,writable:!1},_renderHints:{value:K.renderHints},_iceServersStatus:{value:Array.isArray(K.iceServers)?`overrode`:`acquire`},_localParticipant:{value:r},_name:{value:t},_networkQuality:{value:me(K.networkQuality)||K.networkQuality},_notifyWarnings:{value:K.notifyWarnings},_options:{value:K},_peerConnectionManager:{value:c},_sessionTimer:{value:null,writable:!0},_sessionTimeoutMS:{value:0,writable:!0},_reconnectBackoff:{value:new K.Backoff(o)},_session:{value:null,writable:!0},_trackPriority:{value:K.trackPriority},_trackSwitchOff:{value:K.trackSwitchOff},_twilioConnection:{value:null,writable:!0},_updatesReceived:{value:[]},_updatesToSend:{value:[]},_userAgent:{value:K.userAgent},_wsServer:{value:u}}),rt(Y),Y}return t.prototype._createConnectOrSyncOrDisconnectMessage=function(){if(this.state===`connected`)return null;if(this.state===`disconnected`)return{session:this._session,type:`disconnect`,version:Ye};var e={connecting:`connect`,syncing:`sync`}[this.state],t={name:this._name,participant:this._localParticipant.getState(),peer_connections:this._peerConnectionManager.getStates(),type:e,version:Ye};return t.type===`connect`?(t.ice_servers=this._iceServersStatus,t.publisher={name:K,sdk_version:Y,user_agent:this._userAgent},this._bandwidthProfile&&(t.bandwidth_profile=te(this._bandwidthProfile)),this._notifyWarnings&&(t.participant.media_warnings=ue(this._notifyWarnings)),t.media_signaling=ce(this._dominantSpeaker,this._networkQuality,this._trackPriority,this._trackSwitchOff,this._adaptiveSimulcast,this._renderHints),t.subscribe=de(this._automaticSubscription),t.format=X,t.token=this._accessToken):t.type===`sync`?(t.session=this._session,t.token=this._accessToken):t.type===`update`&&(t.session=this._session),t},t.prototype._createIceMessage=function(){return{edge:`roaming`,token:this._accessToken,type:`ice`,version:qe}},t.prototype._sendConnectOrSyncOrDisconnectMessage=function(){var e=this._createConnectOrSyncOrDisconnectMessage();e&&this._twilioConnection.sendMessage(e)},t.prototype.disconnect=function(e){return this.state!==`disconnected`&&(this.preempt(`disconnected`,null,[e]),this._sendConnectOrSyncOrDisconnectMessage(),this._twilioConnection.close(),!0)},t.prototype.publish=function(e){switch(this.state){case`connected`:return this._twilioConnection.sendMessage(Object.assign({session:this._session,type:`update`,version:Ye},e)),!0;case`connecting`:case`syncing`:return this._updatesToSend.push(e),!0;default:return!1}},t.prototype.publishEvent=function(e,t,n,r){this._eventObserver.emit(`event`,{group:e,name:t,level:n,payload:r})},t.prototype.sync=function(){return this.state===`connected`&&(this.preempt(`syncing`),this._sendConnectOrSyncOrDisconnectMessage(),!0)},t.prototype._setSession=function(e,t){this._session=e,this._sessionTimeoutMS=t*1e3},t.prototype._getReconnectTimer=function(){var e=this;return this._sessionTimeoutMS===0?null:(this._sessionTimer||=new c(function(){e._sessionTimer&&(e._sessionTimeoutMS=0)},this._sessionTimeoutMS),new Promise(function(t){e._reconnectBackoff.backoff(t)}))},t.prototype._clearReconnectTimer=function(){this._reconnectBackoff.reset(),this._sessionTimer&&=(this._sessionTimer.clear(),null)},t}(r);function et(e){return Array.from(e.reduce(function(e,t){var n=e.get(t.id)||t;return(!n.description&&t.description||n.description&&t.description&&t.description.revision>n.description.revision)&&(n.description=t.description),(!n.ice&&t.ice||n.ice&&t.ice&&t.ice.revision>n.ice.revision)&&(n.ice=t.ice),e.set(n.id,n),e},new Map).values())}function nt(e){return e.reduce(function(e,t){return(!e.participant&&t.participant||e.participant&&t.participant&&t.participant.revision>e.participant.revision)&&(e.participant=t.participant),!e.peer_connections&&t.peer_connections?e.peer_connections=et(t.peer_connections):e.peer_connections&&t.peer_connections&&(e.peer_connections=et(e.peer_connections.concat(t.peer_connections))),e},{})}function rt(e){function t(){if(e.state!==`disconnected`){e._twilioConnection&&e._twilioConnection.removeListener(`message`,r);var t=e._iceServersStatus,i=e._options,a=e._wsServer,o=e.state,c=i.TwilioConnection,u=new c(a,Object.assign({helloBody:o===`connecting`&&t===`acquire`?e._createIceMessage():e._createConnectOrSyncOrDisconnectMessage()},i));u.once(`close`,function(e){e===c.CloseReason.LOCAL?n():n(Error(e))}),u.on(`message`,r),e._twilioConnection=u}}
122function n(n){if(e.state!==`disconnected`){if(!n){e.disconnect();return}var r=e._getReconnectTimer();if(!r){var a=n.message===i.CloseReason.BUSY?new ze:new Ae;e.disconnect(a);return}e.state===`connected`&&e.preempt(`syncing`),r.then(t)}}function r(t){if(e.state!==`disconnected`){if(t.type===`error`){e.disconnect(Te(t.code,t.message));return}switch(e.state){case`connected`:switch(t.type){case`connected`:case`synced`:case`update`:case`warning`:e.emit(`message`,t);return;case`disconnected`:e.disconnect(t.status===`completed`?new Oe:null);return;default:return}case`connecting`:switch(t.type){case`iced`:e._options.onIced(t.ice_servers).then(function(){e._sendConnectOrSyncOrDisconnectMessage()});return;case`connected`:e._setSession(t.session,t.options.session_timeout),e.emit(`connected`,t),e.preempt(`connected`);return;case`synced`:case`update`:e._updatesReceived.push(t);return;case`disconnected`:e.disconnect(t.status===`completed`?new Oe:null);return;default:return}case`syncing`:switch(t.type){case`connected`:case`update`:e._updatesReceived.push(t);return;case`synced`:e._clearReconnectTimer(),e.emit(`message`,t),e.preempt(`connected`);return;case`disconnected`:e.disconnect(t.status===`completed`?new Oe:null);return;default:return}default:return}}}e.on(`stateChanged`,function t(n){switch(n){case`connected`:var i=e._updatesToSend.splice(0);i.length&&e.publish(nt(i)),e._updatesReceived.splice(0).forEach(function(t){return e.emit(`message`,t)});return;case`disconnected`:e._twilioConnection.removeListener(`message`,r),e.removeListener(`stateChanged`,t);return;case`syncing`:return;default:return}});var a=e._options,o=e._iceServersStatus,c=a.iceServers,u=a.onIced;o===`overrode`?u(c).then(t):t()}t.exports=Qe})),require_cancelableroomsignalingpromise=__commonJSMin(((e,t)=>{var n=require_cancelablepromise(),r=require_peerconnectionmanager(),i=require_room(),a=require_twilioconnectiontransport(),o=require_twilio_video_errors(),c=o.SignalingConnectionDisconnectedError,u=o.SignalingIncomingMessageInvalidError,K=require_util(),Y=K.flatMap,X=K.createRoomConnectEventPayload;function ee(e,t,o,K,ee,te){te=Object.assign({PeerConnectionManager:r,RoomV2:i,Transport:a},te);var ce=ee.video[0]&&ee.video[0].adaptiveSimulcast===!0,ue=te.PeerConnectionManager,de=te.RoomV2,fe=te.Transport,me=te.iceServers,ge=te.log,Te=new ue(K,ee,te),Oe=Y(o.tracks,function(e){return[e.trackTransceiver]});Te.setTrackSenders(Oe);var Ae=Error(`Canceled`),ze,qe=new n(function(n,r,i){var a=function(e){return i()?(r(Ae),Promise.reject(Ae)):(ge.debug(`Got ICE servers:`,e),te.iceServers=e,Te.setConfiguration(te),Te.createAndOffer().then(function(){if(i())throw r(Ae),Ae;ge.debug(`createAndOffer() succeeded.`),Te.dequeue(`description`)}).catch(function(e){throw ge.error(`createAndOffer() failed:`,e),r(e),e}))},K=te.automaticSubscription,Y=te.bandwidthProfile,ee=te.dominantSpeaker,ue=te.environment,Oe=te.eventObserver,qe=te.loggerName,Ye=te.logLevel,Ze=te.name,Qe=te.networkMonitor,et=te.networkQuality,nt=te.notifyWarnings,rt=te.realm,it=te.sdpSemantics,at=!!Y,ot=!!Y,st=!!Y&&(te.clientTrackSwitchOffControl!==`disabled`||te.contentPreferencesMode!==`disabled`);ze=new fe(Ze,e,o,Te,t,Object.assign({adaptiveSimulcast:ce,automaticSubscription:K,dominantSpeaker:ee,environment:ue,eventObserver:Oe,loggerName:qe,logLevel:Ye,networkMonitor:Qe,networkQuality:et,notifyWarnings:nt,iceServers:me,onIced:a,realm:rt,renderHints:st,sdpSemantics:it,trackPriority:at,trackSwitchOff:ot},Y?{bandwidthProfile:Y}:{}));var ct=X(te);Oe.emit(`event`,ct),ze.once(`connected`,function(e){if(ge.debug(`Transport connected:`,e),i()){r(Ae);return}if(!e.participant){r(new u);return}n(new de(o,e,ze,Te,te))}),ze.once(`stateChanged`,function(e,t){e===`disconnected`?(ze=null,r(t||new c)):ge.debug(`Transport state changed:`,e)})},function(){ze&&=(ze.disconnect(),null)});return qe.catch(function(){ze&&=(ze.disconnect(),null),Te.close()}),qe}t.exports=ee})),require_localparticipant$1=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
122t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();t.exports=function(e){n(t,e);function t(){var t=e.call(this)||this;return Object.defineProperties(t,{_publicationsToTrackSenders:{value:new Map},_trackSendersToPublications:{value:new Map}}),t}return t.prototype.addTrack=function(t,n,r,i){i===void 0&&(i=null);var a=this._createLocalTrackPublicationSignaling(t,n,r,i);return this._trackSendersToPublications.set(t,a),this._publicationsToTrackSenders.set(a,t),e.prototype.addTrack.call(this,a),this},t.prototype.getPublication=function(e){return this._trackSendersToPublications.get(e)||null},t.prototype.getSender=function(e){return this._publicationsToTrackSenders.get(e)||null},t.prototype.removeTrack=function(t){var n=this._trackSendersToPublications.get(t);return n?(this._trackSendersToPublications.delete(t),this._publicationsToTrackSenders.delete(n),e.prototype.removeTrack.call(this,n)&&n.stop(),n):null},t}(require_participant())})),require_localtrackpublication$1=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=function(e){n(t,e);function t(t,n,r){var i=this;t=t.clone();var a=t.kind===`data`||t.track.enabled;return i=e.call(this,n,t.kind,a,r)||this,i.setTrackTransceiver(t),Object.defineProperties(i,{_updatedPriority:{value:r,writable:!0},id:{enumerable:!0,value:t.id}}),i}return Object.defineProperty(t.prototype,"updatedPriority",{get:function(){return this._updatedPriority},enumerable:!1,configurable:!0}),t.prototype.enable=function(t){return t=typeof t!=`boolean`||t,this.trackTransceiver.track.enabled=t,e.prototype.enable.call(this,t)},t.prototype.publishFailed=function(e){return i(this,e)&&this.emit(`updated`),this},t.prototype.setPriority=function(e){return this._updatedPriority!==e&&(this._updatedPriority=e,this.emit(`updated`)),this},t.prototype.setSid=function(t){return this._error?this:e.prototype.setSid.call(this,t)},t.prototype.stop=function(){this.trackTransceiver.stop()},t}(require_track());function i(e,t){return e._sid!==null||e._error?!1:(e._error=t,!0)}t.exports=r})),require_localtrackpublication=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_localtrackpublication$1(),i=require_twiliowarning(),a=require_twilio_video_errors().createTwilioError;t.exports=function(e){n(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return Object.defineProperties(o,{_log:{value:a.log.createLog(`default`,o)},_mediaStates:{value:{recordings:null},writable:!0},_noiseCancellationVendor:{value:i}}),o}return t.prototype.getState=function(){var e={enabled:this.isEnabled,id:this.id,kind:this.kind,name:this.name,priority:this.updatedPriority};return this._noiseCancellationVendor&&(e.audio_processor=this._noiseCancellationVendor),e},t.prototype.toString=function(){return`[LocalTrackPublicationV2: `+this.sid+`]`},t.prototype.update=function(e){switch(e.state){case`ready`:this.setSid(e.sid);break;case`failed`:var t=e.error;this.publishFailed(a(t.code,t.message))}return this},t.prototype.updateMediaStates=function(e){if(!e||!e.recordings||this._mediaStates.recordings===e.recordings)return this;switch(this._mediaStates.recordings=e.recordings,this._mediaStates.recordings){case`OK`:this._log.info(`Warnings have cleared.`),this.emit
122(`warningsCleared`);break;case`NO_MEDIA`:this._log.warn(`Recording media lost.`),this.emit(`warning`,i.recordingMediaLost);break;default:this._log.warn(`Unknown media state detected: `+this._mediaStates.recordings)}return this},t}(r)})),require_localparticipant=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_localparticipant$1(),i=require_localtrackpublication(),a=require_constants().DEFAULT_LOG_LEVEL,o=require_log(),c=require_util(),u=c.buildLogLevels,K=c.isDeepEqual;t.exports=function(e){n(t,e);function t(t,n,r){var c=this;r=Object.assign({logLevel:a,LocalTrackPublicationV2:i},r),c=e.call(this)||this;var K=u(r.logLevel);return Object.defineProperties(c,{_bandwidthProfile:{value:null,writable:!0},_bandwidthProfileRevision:{value:0,writable:!0},_encodingParameters:{value:t},_removeListeners:{value:new Map},_LocalTrackPublicationV2:{value:r.LocalTrackPublicationV2},_log:{value:r.log?r.log.createLog(`default`,c):new o(`default`,c,K,r.loggerName)},_publishedRevision:{writable:!0,value:0},_revision:{writable:!0,value:1},_signalingRegion:{value:null,writable:!0},audioProcessors:{value:[],writable:!0},bandwidthProfile:{enumerable:!0,get:function(){return this._bandwidthProfile}},bandwidthProfileRevision:{enumerable:!0,get:function(){return this._bandwidthProfileRevision}},networkQualityConfiguration:{enumerable:!0,value:n},revision:{enumerable:!0,get:function(){return this._revision}},signalingRegion:{enumerable:!0,get:function(){return this._signalingRegion}}}),c}return t.prototype.toString=function(){return`[LocalParticipantSignaling: `+this.sid+`]`},t.prototype.setSignalingRegion=function(e){this._signalingRegion||=e},t.prototype.setBandwidthProfile=function(e){K(this._bandwidthProfile,e)||(this._bandwidthProfile=JSON.parse(JSON.stringify(e)),this._bandwidthProfileRevision++,this.didUpdate())},t.prototype.setAudioProcessors=function(e){this.audioProcessors=e},t.prototype.getParameters=function(){return this._encodingParameters},t.prototype.setParameters=function(e){return this._encodingParameters.update(e),this},t.prototype.update=function(e){return this._publishedRevision>=e.revision?this:(this._publishedRevision=e.revision,e.tracks.forEach(function(e){var t=this.tracks.get(e.id);t&&t.update(e)},this),this)},t.prototype.updateMediaStates=function(e){return!e||!e.tracks||Array.from(this.tracks.values()).forEach(function(t){var n=e.tracks[t.sid];n&&t.updateMediaStates(n)}),this},t.prototype._createLocalTrackPublicationSignaling=function(e,t,n,r){return new this._LocalTrackPublicationV2(e,t,n,r,{log:this._log})},t.prototype.addTrack=function(t,n,r,i){var a=this;e.prototype.addTrack.call(this,t,n,r,i);var o=this.getPublication(t),c=o.isEnabled,u=o.updatedPriority,K=function(){(c!==o.isEnabled||u!==o.updatedPriority)&&(a.didUpdate(),c=o.isEnabled,u=o.updatedPriority)};return o.on(`updated`,K),this._removeListener(o),this._removeListeners.set(o,function(){return o.removeListener(`updated`,K)}),this.didUpdate(),this},t.prototype._removeListener=function(e){var t=this._removeListeners.get(e);t&&t()},t.prototype.getState=function(){return{revision:this.revision,tracks:Array.from(this.tracks.values()).map(function(e){return e.getState()})}},t.prototype.didUpdate=function(){this._revision++,this.emit(`updated`)},t.prototype.removeTrack=function(t){var n=e.prototype.removeTrack.call(this,t);return n&&(t.removeClone(n.trackTransceiver),this._removeListener(n),this.didUpdate()),n},t.prototype.setNetworkQualityConfiguration=function(e){this.networkQualityConfiguration.update(e)},t.prototype.setPublisherHint=function(e,t){var n=Array.from(this.tracks.values()).find(function(t){return t.sid===e});return n?n.trackTransceiver.setPublisherHint(t):(this._log.warn(`track:`+e+` not found`),Promise.resolve(`UNKNOWN_TRACK`))},t}(r)})),require_signaling=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
122t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_participant(),i=require_room$1(),a=require_statemachine(),o={closed:[`opening`],opening:[`closed`,`open`],open:[`closed`,`closing`],closing:[`closed`,`open`]};t.exports=function(e){n(t,e);function t(){return e.call(this,`closed`,o)||this}return t.prototype._close=function(e){return this.transition(`closing`,e),this.transition(`closed`,e),Promise.resolve(this)},t.prototype._connect=function(e,t,n,r,a){e.connect(`PA00000000000000000000000000000000`,`test`);var o=Promise.resolve(new i(e,`RM00000000000000000000000000000000`,a));return o.cancel=function(){},o},t.prototype._open=function(e){return this.transition(`opening`,e),this.transition(`open`,e),Promise.resolve(this)},t.prototype.close=function(){var e=this;return this.bracket(`close`,function(t){switch(e.state){case`closed`:return e;case`open`:return e._close(t);default:throw Error(`Unexpected Signaling state "`+e.state+`"`)}})},t.prototype.connect=function(e,t,n,r,i){var a=this;return this.bracket(`connect`,function o(c){switch(a.state){case`closed`:return a._open(c).then(o.bind(null,c));case`open`:return a.releaseLockCompletely(c),a._connect(e,t,n,r,i);default:throw Error(`Unexpected Signaling state "`+a.state+`"`)}})},t.prototype.createLocalParticipantSignaling=function(){return new r},t.prototype.open=function(){var e=this;return this.bracket(`open`,function(t){switch(e.state){case`closed`:return e._open(t);case`open`:return e;default:throw Error(`Unexpected Signaling state "`+e.state+`"`)}})},t}(a)})),require_v2=__commonJSMin(((e,t)=>{var n=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),r=require_cancelableroomsignalingpromise(),i=require_localparticipant();t.exports=function(e){n(t,e);function t(t,n){var i=this;return n=Object.assign({createCancelableRoomSignalingPromise:r},n),i=e.call(this)||this,Object.defineProperties(i,{_createCancelableRoomSignalingPromise:{value:n.createCancelableRoomSignalingPromise},_options:{value:n},_wsServer:{value:t}}),i}return t.prototype._connect=function(e,t,n,r,i){return i=Object.assign({},this._options,i),this._createCancelableRoomSignalingPromise.bind(null,t,this._wsServer,e,n,r,i)},t.prototype.createLocalParticipantSignaling=function(e,t){return new i(e,t)},t}(require_signaling())})),require_connect=__commonJSMin(((e,t)=>{var n=require_webrtc().MediaStreamTrack,r=require_util$1(),i=r.guessBrowser,a=r.guessBrowserVersion,o=r.isCodecSupported,c=require_cancelableroompromise(),u=require_encodingparameters(),K=require_localparticipant$2(),Y=require_insightspublisher(),X=require_null(),ee=require_es5$1(),te=ee.LocalAudioTrack,ce=ee.LocalDataTrack,ue=ee.LocalVideoTrack,de=require_networkqualityconfiguration(),fe=require_room$2(),me=require_v2(),ge=require_util(),Te=ge.asLocalTrack,Oe=ge.buildLogLevels,Ae=ge.filterObject,ze=ge.isNonArrayObject,qe=require_constants(),Ye=qe.DEFAULT_ENVIRONMENT,Ze=qe.DEFAULT_LOG_LEVEL,Qe=qe.DEFAULT_LOGGER_NAME,et=qe.DEFAULT_REALM,nt=qe.DEFAULT_REGION,rt=qe.WS_SERVER,it=qe.SDK_NAME,at=qe.SDK_VERSION,ot=qe.typeErrors,st=require_cancelablepromise(),ct=require_eventobserver(),lt=require_log(),ut=require_validate().validateBandwidthProfile,dt=i()===`safari`&&a(),ft=0,pt=!1,mt=!1;if(dt){var ht=dt.major,gt=dt.minor;mt=ht<12||ht===12&&gt<1}var _t=new Set([{didWarn:!1,shouldDelete:!0,name:`abortOnIceServersTimeout`},{didWarn:!1,shouldDelete:!0,name:`dscpTagging`,newName:`enableDscp`},{didWarn:!1,shouldDelete:!0,name:`iceServersTimeout`},{didWarn:!1,shouldDelete:!1,name:`eventListener`,newName:`Video.Logger`},{didWarn:!1,shouldDelete:!1,name:`logLevel`,newName:`Video.Logger`}]),vt=new Set([{didWarn:!1,shouldDelete:!1,name:`maxTracks`,newName:`bandwidthProfile.video.clientTrackSwitchOffControl`},{didWarn:!1,shouldDelete:!1,name:`renderDimensions`,newName:`bandwidthProfile.video.contentPreferencesMode`}]);function yt(e,t){if(t===void 0&&(t={}),!ze(t))return st.reject(ot.INVALID_TYPE(`options`,`object`));var r=t.Log||lt,i=t.loggerName||Qe,a=t.logLevel||Ze,ee=Oe(a),fe=`[connect #`+ ++ft+`]`,ge;try{ge=new r(`default`,fe,ee,i)}catch(e){return st.reject(e)}xt(t,ge,_t);var qe=t.preferredVideoCodecs===`auto`;if(qe&&(t.preferredVideoCodecs=[{codec:`VP8`,simulcast:!0,adaptiveSimulcast:!0}]),t.maxVideoBitrate&&qe)return ge.error(`ConnectOptions "maxVideoBitrate" is not compatible with "preferredVideoCodecs=auto"`),st.reject(ot.ILLEGAL_INVOKE(`connect`,`ConnectOptions "maxVideoBitrate" is not compatible with "preferredVideoCodecs=auto"`));t=Object.assign({automaticSubscription:!0,dominantSpeaker:!1,enableDscp:!1,environment:Ye,eventListener:null,insights:!0,LocalAudioTrack:te,LocalDataTrack:ce,LocalParticipant:K,LocalVideoTrack:ue,Log:r,MediaStreamTrack:n,loggerName:i,logLevel:a,maxAudioBitrate:null,maxVideoBitrate:null,name:null,networkMonitor:!0,networkQuality:!1,preferredAudioCodecs:[],preferredVideoCodecs:[],realm:et,region:nt,signaling:me},Ae(t));var dt={};typeof t.wsServerInsights==`string`&&(dt.gateway=t.wsServerInsights);var ht=new(t.insights?Y:X)(e,it,at,t.environment,t.realm,dt),gt=rt(t.environment,t.region),yt=new ct(ht,Date.now(),ge,t.eventListener);if(t=Object.assign({eventObserver:yt,wsServer:gt},t),t.log=ge,mt&&!pt&&ge.logLevel!==`error`&&ge.logLevel!==`off`&&(pt=!0,ge.warn([`Support for Safari 12.0 and below is limited because it does not support VP8.`,`This means you may experience codec issues in Group Rooms. You may also`,`experience codec issues in Peer-to-Peer (P2P) Rooms containing Android- or`,`iOS-based Participants who do not support H.264. However, P2P Rooms`,`with browser-based Participants should work. For more information, please`,`refer to this guide: https://www.twilio.com/docs/video/javascript-v2-developing-safari-11`].join(` `))),typeof e!=`string`)return st.reject(ot.INVALID_TYPE(`token`,`string`));var bt=Object.assign({},t);if(delete bt.name,`tracks`in t){if(!Array.isArray(t.tracks))return st.reject(ot.INVALID_TYPE(`options.tracks`,`Array of LocalAudioTrack, LocalVideoTrack or MediaStreamTrack`));try{t.tracks=t.tracks.map(function(e){return Te(e,bt)})}catch(e){return st.reject(e)}}var Dt=ut(t.bandwidthProfile);if(Dt)return st.reject(Dt);t.clientTrackSwitchOffControl=`disabled`,t.contentPreferencesMode=`disabled`,t.bandwidthProfile&&(t.clientTrackSwitchOffControl=`auto`,t.contentPreferencesMode=`auto`,t.bandwidthProfile.video&&(xt(t.bandwidthProfile.video,ge,vt),`maxTracks`in t.bandwidthProfile.video?t.clientTrackSwitchOffControl=`disabled`:t.bandwidthProfile.video.clientTrackSwitchOffControl===`manual`?t.clientTrackSwitchOffControl=`manual`:t.clientTrackSwitchOffControl=`auto`,`renderDimensions`in t.bandwidthProfile.video?t.contentPreferencesMode=`disabled`:t.bandwidthProfile.video.contentPreferencesMode===`manual`?t.contentPreferencesMode=`manual`:t.contentPreferencesMode=`auto`));var Ot=t.signaling,kt=new Ot(t.wsServer,t);ge.info(`Connecting to a Room`),ge.debug(`Options:`,t);var At=new u({maxAudioBitrate:t.maxAudioBitrate,maxVideoBitrate:t.maxVideoBitrate},qe),jt={audio:t.preferredAudioCodecs.map(Et),video:t.preferredVideoCodecs.map(Et)},Mt=new de(ze(t.networkQuality)?t.networkQuality:{});[`audio`,`video`].forEach(function(e){return jt[e].forEach(function(t){var n=t.codec;return o(n,e).then(function(t){return!t&&ge.warn(`The preferred `+e+` codec "`+n+`" will be ignored as it is not supported by the browser.`)})})});var Nt=c(Tt.bind(null,t),St.bind(null,kt,ge,At,Mt,t),wt.bind(null,e,t,kt,At,jt),Ct.bind(null,t));return Nt.then(function(e){return ht.connect(e.sid,e.localParticipant.sid),ge.info(`Connected to Room:`,e.toString()),ge.info(`Room name:`,e.name),ge.debug(`Room:`,e),e.once(`disconnected`,function(){return ht.disconnect()}),e},function(e){ht.disconnect(),Nt._isCanceled?ge.info(`Attempt to connect to a Room was canceled`):ge.info(`Error while connecting to a Room:`,e)}),Nt}var bt={H264:`H264`,VP8:`VP8`};
122function xt(e,t,n){n.forEach(function(n){var r=n.didWarn,i=n.name,a=n.newName,o=n.shouldDelete;i in e&&e[i]!==void 0&&(a&&o&&(e[a]=e[i]),o&&delete e[i],!r&&![`error`,`off`].includes(t.level)&&(t.warn(`The ConnectOptions "`+i+`" is `+(a?`deprecated and scheduled for removal. Please use "`+a+`" instead.`:`no longer applicable and will be ignored.`)),n.didWarn=!0))})}function St(e,t,n,r,i,a){var o=e.createLocalParticipantSignaling(n,r);return t.debug(`Creating a new LocalParticipant:`,o),new i.LocalParticipant(o,a,i)}function Ct(e,t,n){var r=new fe(t,n,e),i=e.log;return i.debug(`Creating a new Room:`,r),n.on(`stateChanged`,function e(t){t===`disconnected`&&(i.info(`Disconnected from Room:`,r.toString()),n.removeListener(`stateChanged`,e))}),r}function wt(e,t,n,r,i,a){return t.log.debug(`Creating a new RoomSignaling`),n.connect(a._signaling,e,r,i,t)}function Tt(e,t){var n=e.log;return e.shouldStopLocalTracks=!e.tracks,e.shouldStopLocalTracks?n.info(`LocalTracks were not provided, so they will be acquired automatically before connecting to the Room. LocalTracks will be released if connecting to the Room fails or if the Room is disconnected`):(n.info(`Getting LocalTracks`),n.debug(`Options:`,e)),e.createLocalTracks(e).then(function(r){var i=t(r);return i.catch(function(){e.shouldStopLocalTracks&&(n.info(`The automatically acquired LocalTracks will now be stopped`),r.forEach(function(e){e.stop()}))}),i})}function Et(e){var t=typeof e==`string`?{codec:e}:e;switch(t.codec.toLowerCase()){case`opus`:return Object.assign({dtx:!0},t);case`vp8`:return Object.assign({simulcast:!1},t);default:return t}}t.exports=yt})),require_createlocaltrack=__commonJSMin(((e,t)=>{var n=require_constants(),r=n.DEFAULT_LOG_LEVEL,i=n.DEFAULT_LOGGER_NAME;function a(e,t){t=Object.assign({loggerName:i,logLevel:r},t);var n={};n.loggerName=t.loggerName,n.logLevel=t.logLevel,delete t.loggerName,delete t.logLevel;var a=t.createLocalTracks;return delete t.createLocalTracks,n[e]=Object.keys(t).length>0?t:!0,a(n).then(function(e){return e[0]})}function o(e){return a(`audio`,e)}function c(e){return a(`video`,e)}t.exports={audio:o,video:c}})),require_support=__commonJSMin(((e,t)=>{var n=require_util$1(),r=n.guessBrowser,i=n.support,a=require_sdp$1().getSdpFormat,o=require_browserdetection(),c=o.isAndroid,u=o.isMobile,K=o.isNonChromiumEdge,Y=o.rebrandedChromeBrowser,X=o.mobileWebKitBrowser,ee=[`crios`,`edg`,`edge`,`electron`,`headlesschrome`],te=[`chrome`,`firefox`],ce=[`chrome`,`safari`],ue=[];function de(){var e=r();if(!e)return!1;var t=Y(e),n=X(e),o=c()?te:ce;return!!e&&i()&&a()===`unified`&&(!t||ee.includes(t))&&!K(e)&&(!n||ue.includes(n))&&(!u()||o.includes(e))}t.exports=de})),require_es5=__commonJSMin(((e,t)=>{var n=e&&e.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var r=require_createlocaltracks(),i=require_preflighttest(),a={connect:require_connect(),createLocalAudioTrack:require_createlocaltrack().audio,createLocalVideoTrack:require_createlocaltrack().video,isSupported:require_support()(),version:(init_package(),__toCommonJS(package_exports).default).version,Logger:require_loglevel$1(),LocalAudioTrack:require_es5$1().LocalAudioTrack,LocalDataTrack:require_es5$1().LocalDataTrack,LocalVideoTrack:require_es5$1().LocalVideoTrack};function o(e,t){var i=n({createLocalTracks:r.createLocalTracks},t);return a.connect(e,i)}function c(e){var t=n({createLocalTracks:r.createLocalTracks},e);return a.createLocalAudioTrack(t)}function u(e){var t=n({createLocalTracks:r.createLocalTracks},e);return a.createLocalVideoTrack(t)}var K=a.isSupported,Y=a.version,X=a.Logger,ee=a.LocalAudioTrack,te=a.LocalVideoTrack,ce=a.LocalDataTrack;t.exports={connect:o,createLocalAudioTrack:c,createLocalVideoTrack:u,createLocalTracks:r.createLocalTracks,runPreflight:i.runPreflight,isSupported:K,version:Y,Logger:X,LocalAudioTrack:ee,LocalVideoTrack:te,LocalDataTrack:ce}})),t$12=Symbol.for(`@ts-pattern/matcher`),e$7=Symbol.for(`@ts-pattern/isVariadic`),n$10=`@ts-pattern/anonymous-select-key`,r$10=e=>!!(e&&typeof e==`object`),i$8=e=>
122e&&!!e[t$12],s$12=(e,t,n)=>{if(i$8(e)){let{matched:r,selections:i}=e[t$12]().match(t);return r&&i&&Object.keys(i).forEach(e=>n(e,i[e])),r}if(r$10(e)){if(!r$10(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],i=[],a=[];for(let t of e.keys()){let n=e[t];i$8(n)&&n[e$7]?a.push(n):a.length?i.push(n):r.push(n)}if(a.length){if(a.length>1)throw Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<r.length+i.length)return!1;let e=t.slice(0,r.length),o=i.length===0?[]:t.slice(-i.length),c=t.slice(r.length,i.length===0?1/0:-i.length);return r.every((t,r)=>s$12(t,e[r],n))&&i.every((e,t)=>s$12(e,o[t],n))&&(a.length===0||s$12(a[0],c,n))}return e.length===t.length&&e.every((e,r)=>s$12(e,t[r],n))}return Reflect.ownKeys(e).every(r=>{let i=e[r];return(r in t||i$8(a=i)&&a[t$12]().matcherType===`optional`)&&s$12(i,t[r],n);var a})}return Object.is(t,e)},o$13=e=>{var t,n,r;return r$10(e)?i$8(e)?(r=e[t$12]()).getSelectionKeys?.call(r)??[]:c$11(Array.isArray(e)?e:Object.values(e),o$13):[]},c$11=(e,t)=>e.reduce((e,n)=>e.concat(t(n)),[]);function a$6(...e){if(e.length===1){let[t]=e;return e=>s$12(t,e,()=>{})}if(e.length===2){let[t,n]=e;return s$12(t,n,()=>{})}throw Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function u$5(e){return Object.assign(e,{optional:()=>h$6(e),and:t=>m$5(e,t),or:t=>d$12(e,t),select:t=>t===void 0?y$6(e):y$6(t,e)})}function l$8(e){return Object.assign((e=>Object.assign(e,{[Symbol.iterator](){let t=0,n=[{value:Object.assign(e,{[e$7]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var e;return n[t++]??n.at(-1)}}}}))(e),{optional:()=>l$8(h$6(e)),select:t=>l$8(t===void 0?y$6(e):y$6(t,e))})}function h$6(e){return u$5({[t$12]:()=>({match:t=>{let n={},r=(e,t)=>{n[e]=t};return t===void 0?(o$13(e).forEach(e=>r(e,void 0)),{matched:!0,selections:n}):{matched:s$12(e,t,r),selections:n}},getSelectionKeys:()=>o$13(e),matcherType:`optional`})})}var f$8=(e,t)=>{for(let n of e)if(!t(n))return!1;return!0},g$5=(e,t)=>{for(let[n,r]of e.entries())if(!t(r,n))return!1;return!0};function m$5(...e){return u$5({[t$12]:()=>({match:t=>{let n={},r=(e,t)=>{n[e]=t};return{matched:e.every(e=>s$12(e,t,r)),selections:n}},getSelectionKeys:()=>c$11(e,o$13),matcherType:`and`})})}function d$12(...e){return u$5({[t$12]:()=>({match:t=>{let n={},r=(e,t)=>{n[e]=t};return c$11(e,o$13).forEach(e=>r(e,void 0)),{matched:e.some(e=>s$12(e,t,r)),selections:n}},getSelectionKeys:()=>c$11(e,o$13),matcherType:`or`})})}function p$7(e){return{[t$12]:()=>({match:t=>({matched:!!e(t)})})}}function y$6(...e){let t=typeof e[0]==`string`?e[0]:void 0,n=e.length===2?e[1]:typeof e[0]==`string`?void 0:e[0];return u$5({[t$12]:()=>({match:e=>{let r={[t??n$10]:e};return{matched:n===void 0||s$12(n,e,(e,t)=>{r[e]=t}),selections:r}},getSelectionKeys:()=>[t??n$10].concat(n===void 0?[]:o$13(n))})})}function v$4(e){return typeof e==`number`}function b$5(e){return typeof e==`string`}function w$6(e){return typeof e==`bigint`}var S$5=u$5(p$7(function(e){return!0})),O$4=S$5,j$3=e=>Object.assign(u$5(e),{startsWith:t=>{return j$3(m$5(e,(n=t,p$7(e=>b$5(e)&&e.startsWith(n)))));var n},endsWith:t=>{return j$3(m$5(e,(n=t,p$7(e=>b$5(e)&&e.endsWith(n)))));var n},minLength:t=>j$3(m$5(e,(e=>p$7(t=>b$5(t)&&t.length>=e))(t))),length:t=>j$3(m$5(e,(e=>p$7(t=>b$5(t)&&t.length===e))(t))),maxLength:t=>j$3(m$5(e,(e=>p$7(t=>b$5(t)&&t.length<=e))(t))),includes:t=>{return j$3(m$5(e,(n=t,p$7(e=>b$5(e)&&e.includes(n)))));var n},regex:t=>{return j$3(m$5(e,(n=t,p$7(e=>b$5(e)&&!!e.match(n)))));var n}}),K$2=j$3(p$7(b$5)),x$5=e=>Object.assign(u$5(e),{between:(t,n)=>x$5(m$5(e,((e,t)=>p$7(n=>v$4(n)&&e<=n&&t>=n))(t,n))),lt:t=>x$5(m$5(e,(e=>p$7(t=>v$4(t)&&t<e))(t))),gt:t=>x$5(m$5(e,(e=>p$7(t=>v$4(t)&&t>e))(t))),lte:t=>x$5(m$5(e,(e=>p$7(t=>v$4(t)&&t<=e))(t))),gte:t=>x$5(m$5(e,(e=>p$7(t=>v$4(t)&&t>=e))(t))),int:()=>x$5(m$5(e,p$7(e=>v$4(e)&&Number.isInteger(e)))),finite:()=>x$5(m$5(e,p$7(e=>v$4(e)&&Number.isFinite(e)))),positive:()=>x$5(m$5(e,p$7(e=>v$4(e)&&e>0))),negative:()=>x$5(m$5(e,p$7(e=>v$4(e)&&e<0)))}),E$5=x$5(p$7(v$4)),A$4=e=>Object.assign(u$5(e),{between:(t,n)=>A$4(m$5(e,((e,t)=>
122p$7(n=>w$6(n)&&e<=n&&t>=n))(t,n))),lt:t=>A$4(m$5(e,(e=>p$7(t=>w$6(t)&&t<e))(t))),gt:t=>A$4(m$5(e,(e=>p$7(t=>w$6(t)&&t>e))(t))),lte:t=>A$4(m$5(e,(e=>p$7(t=>w$6(t)&&t<=e))(t))),gte:t=>A$4(m$5(e,(e=>p$7(t=>w$6(t)&&t>=e))(t))),positive:()=>A$4(m$5(e,p$7(e=>w$6(e)&&e>0))),negative:()=>A$4(m$5(e,p$7(e=>w$6(e)&&e<0)))}),N$4={__proto__:null,matcher:t$12,optional:h$6,array:function(...e){return l$8({[t$12]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};let n=e[0],r={};if(t.length===0)return o$13(n).forEach(e=>{r[e]=[]}),{matched:!0,selections:r};let i=(e,t)=>{r[e]=(r[e]||[]).concat([t])};return{matched:t.every(e=>s$12(n,e,i)),selections:r}},getSelectionKeys:()=>e.length===0?[]:o$13(e[0])})})},set:function(...e){return u$5({[t$12]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};if(e.length===0)return{matched:!0};let r=(e,t)=>{n[e]=(n[e]||[]).concat([t])},i=e[0];return{matched:f$8(t,e=>s$12(i,e,r)),selections:n}},getSelectionKeys:()=>e.length===0?[]:o$13(e[0])})})},map:function(...e){return u$5({[t$12]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};let r=(e,t)=>{n[e]=(n[e]||[]).concat([t])};if(e.length===0)return{matched:!0};var i;if(e.length===1)throw Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${e[0]?.toString()}`);let[a,o]=e;return{matched:g$5(t,(e,t)=>{let n=s$12(a,t,r),i=s$12(o,e,r);return n&&i}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...o$13(e[0]),...o$13(e[1])]})})},intersection:m$5,union:d$12,not:function(e){return u$5({[t$12]:()=>({match:t=>({matched:!s$12(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:`not`})})},when:p$7,select:y$6,any:S$5,_:O$4,string:K$2,number:E$5,bigint:A$4(p$7(w$6)),boolean:u$5(p$7(function(e){return typeof e==`boolean`})),symbol:u$5(p$7(function(e){return typeof e==`symbol`})),nullish:u$5(p$7(function(e){return e==null})),nonNullable:u$5(p$7(function(e){return e!=null})),instanceOf:function(e){return u$5(p$7(function(e){return t=>t instanceof e}(e)))},shape:function(e){return u$5(p$7(a$6(e)))}},W$2=class extends Error{constructor(e){let t;try{t=JSON.stringify(e)}catch{t=e}super(`Pattern matching error: no pattern matches value ${t}`),this.input=void 0,this.input=e}},$$1={matched:!1,value:void 0};function z$3(e){return new I$6(e,$$1)}var I$6=class e{constructor(e,t){this.input=void 0,this.state=void 0,this.input=e,this.state=t}with(...t){if(this.state.matched)return this;let n=t[t.length-1],r=[t[0]],i;t.length===3&&typeof t[1]==`function`?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let a=!1,o={},c=(e,t)=>{a=!0,o[e]=t},u=!r.some(e=>s$12(e,this.input,c))||i&&!i(this.input)?$$1:{matched:!0,value:n(a?n$10 in o?o[n$10]:o:this.input,this.input)};return new e(this.input,u)}when(t,n){if(this.state.matched)return this;let r=!!t(this.input);return new e(this.input,r?{matched:!0,value:n(this.input,this.input)}:$$1)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new W$2(this.input)}run(){return this.exhaustive()}returnType(){return this}},ConsoleApiName={log:`log`,debug:`debug`,info:`info`,warn:`warn`,error:`error`},globalConsole=console,originalConsoleMethods={};Object.keys(ConsoleApiName).forEach(function(e){originalConsoleMethods[e]=globalConsole[e]});var PREFIX=`Datadog Browser SDK:`,display={debug:originalConsoleMethods.debug.bind(globalConsole,PREFIX),log:originalConsoleMethods.log.bind(globalConsole,PREFIX),info:originalConsoleMethods.info.bind(globalConsole,PREFIX),warn:originalConsoleMethods.warn.bind(globalConsole,PREFIX),error:originalConsoleMethods.error.bind(globalConsole,PREFIX)};function catchUserErrors(e,t){return function(){var n=[...arguments];try{return e.apply(void 0,n)}catch(e){display.error(t,e)}}}var ExperimentalFeature;(function(e){e.PAGEHIDE=`pagehide`,e.FEATURE_FLAGS=`feature_flags`,e.RESOURCE_PAGE_STATES=`resource_page_states`,e.COLLECT_FLUSH_REASON=`collect_flush_reason`,e.ZERO_LCP_TELEMETRY=`zero_lcp_telemetry`,e.DISABLE_REPLAY_INLINE_CSS=`disable_replay_inline_css`,e.WRITABLE_RESOURCE_GRAPHQL=`writable_resource_graphql`,e.CUSTOM_VITALS=`custom_vitals`})(ExperimentalFeature||={});var enabledExperimentalFeatures=new Set;function addExperimentalFeatures(e){e.forEach(function(e){enabledExperimentalFeatures.add(e)})}function isExperimentalFeatureEnabled(e){return enabledExperimentalFeatures.has(e)}function getExperimentalFeatures(){return enabledExperimentalFeatures}function performDraw(e){return e!==0&&Math.random()*100<=e}function round(e,t){return+e.toFixed(t)}function isPercentage(e){return isNumber$1(e)&&e>=0&&e<=100}function isNumber$1(e){return typeof e==`number`}var ONE_SECOND=1e3,ONE_MINUTE=60*ONE_SECOND,ONE_HOUR=60*ONE_MINUTE,ONE_DAY=24*ONE_HOUR,ONE_YEAR=365*ONE_DAY;function relativeToClocks(e){return{relative:e,timeStamp:getCorrectedTimeStamp(e)}}function timeStampToClocks(e){return{relative:getRelativeTime(e),timeStamp:e}}function getCorrectedTimeStamp(e){var t=dateNow()-performance.now();return t>getNavigationStart()?Math.round(addDuration(t,e)):getTimeStamp(e)}function currentDrift(){return Math.round(dateNow()-addDuration(getNavigationStart(),performance.now()))}function toServerDuration(e){return isNumber$1(e)?round(e*1e6,0):e}function dateNow(){return new Date().getTime()}function timeStampNow(){return dateNow()}function relativeNow(){return performance.now()}function clocksNow(){return{relative:relativeNow(),timeStamp:timeStampNow()}}function clocksOrigin(){return{relative:0,timeStamp:getNavigationStart()}}function elapsed(e,t){return t-e}function addDuration(e,t){return e+t}function getRelativeTime(e){return e-getNavigationStart()}function getTimeStamp(e){return Math.round(addDuration(getNavigationStart(),e))}function looksLikeRelativeTime(e){return e<ONE_YEAR}var navigationStart;function getNavigationStart(){return navigationStart===void 0&&(navigationStart=performance.timing.navigationStart),navigationStart}var ONE_KIBI_BYTE=1024,ONE_MEBI_BYTE=1024*ONE_KIBI_BYTE,HAS_MULTI_BYTES_CHARACTERS=/[^\u0000-\u007F]/;function computeBytesCount(e){return HAS_MULTI_BYTES_CHARACTERS.test(e)?window.TextEncoder===void 0?new Blob([e]).size:new TextEncoder().encode(e).length:e.length}function concatBuffers(e){for(var t=e.reduce(function(e,t){return e+t.length},0),n=new Uint8Array(t),r=0,i=0,a=e;i<a.length;i++){var o=a[i];n.set(o,r),r+=o.length}return n}function includes(e,t){return e.indexOf(t)!==-1}function arrayFrom(e){if(Array.from)return Array.from(e);var t=[];if(e instanceof Set)e.forEach(function(e){return t.push(e)});else for(var n=0;n<e.length;n++)t.push(e[n]);return t}function find$1(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n))return r}}function findLast(e,t){for(var n=e.length-1;n>=0;--n){var r=e[n];if(t(r,n,e))return r}}function forEach$2(e,t){Array.prototype.forEach.call(e,t)}function objectValues(e){return Object.keys(e).map(function(t){return e[t]})}function objectEntries(e){return Object.keys(e).map(function(t){return[t,e[t]]})}function startsWith(e,t){return e.slice(0,t.length)===t}function endsWith$1(e,t){return e.slice(-t.length)===t}function elementMatches(e,t){return e.matches?e.matches(t):e.msMatchesSelector?e.msMatchesSelector(t):!1}function cssEscape(e){return window.CSS&&window.CSS.escape?window.CSS.escape(e):e.replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(e,t){return t?e===`\0`?`
122�`:`${e.slice(0,-1)}\\${e.charCodeAt(e.length-1).toString(16)} `:`\\${e}`})}function assign(e){return[...arguments].slice(1).forEach(function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}),e}function shallowClone(e){return assign({},e)}function objectHasValue(e,t){return Object.keys(e).some(function(n){return e[n]===t})}function isEmptyObject$1(e){return Object.keys(e).length===0}function mapValues(e,t){for(var n={},r=0,i=Object.keys(e);r<i.length;r++){var a=i[r];n[a]=t(e[a])}return n}function getGlobalObject(){if(typeof globalThis==`object`)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var e=_dd_temp_;return delete Object.prototype._dd_temp_,typeof e!=`object`&&(e=typeof self==`object`?self:typeof window==`object`?window:{}),e}function getZoneJsOriginalValue(e,t){var n=getGlobalObject(),r;return n.Zone&&typeof n.Zone.__symbol__==`function`&&(r=e[n.Zone.__symbol__(t)]),r||=e[t],r}var __spreadArray=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},onMonitorErrorCollected,debugMode=!1;function startMonitorErrorCollection(e){onMonitorErrorCollected=e}function setDebugMode(e){debugMode=e}function monitor(e){return function(){return callMonitored(e,this,arguments)}}function callMonitored(e,t,n){try{return e.apply(t,n)}catch(e){if(displayIfDebugEnabled(e),onMonitorErrorCollected)try{onMonitorErrorCollected(e)}catch(e){displayIfDebugEnabled(e)}}}function displayIfDebugEnabled(){var e=[...arguments];debugMode&&display.error.apply(display,__spreadArray([`[MONITOR]`],e,!1))}function setTimeout$1(e,t){return getZoneJsOriginalValue(getGlobalObject(),`setTimeout`)(monitor(e),t)}function clearTimeout$1(e){getZoneJsOriginalValue(getGlobalObject(),`clearTimeout`)(e)}function setInterval$1(e,t){return getZoneJsOriginalValue(getGlobalObject(),`setInterval`)(monitor(e),t)}function clearInterval$1(e){getZoneJsOriginalValue(getGlobalObject(),`clearInterval`)(e)}var Observable=function(){function e(e){this.onFirstSubscribe=e,this.observers=[]}return e.prototype.subscribe=function(e){var t=this;return!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0),this.observers.push(e),{unsubscribe:function(){t.observers=t.observers.filter(function(t){return e!==t}),!t.observers.length&&t.onLastUnsubscribe&&t.onLastUnsubscribe()}}},e.prototype.notify=function(e){this.observers.forEach(function(t){return t(e)})},e}();function mergeObservables(){var e=[...arguments];return new Observable(function(t){var n=e.map(function(e){return e.subscribe(function(e){return t.notify(e)})});return function(){return n.forEach(function(e){return e.unsubscribe()})}})}function throttle$2(e,t,n){var r=n&&n.leading!==void 0?n.leading:!0,i=n&&n.trailing!==void 0?n.trailing:!0,a=!1,o,c;return{throttled:function(){var n=[...arguments];if(a){o=n;return}r?e.apply(void 0,n):o=n,a=!0,c=setTimeout$1(function(){i&&o&&e.apply(void 0,o),a=!1,o=void 0},t)},cancel:function(){clearTimeout$1(c),a=!1,o=void 0}}}function noop$1(){}function generateUUID(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,generateUUID)}var COMMA_SEPARATED_KEY_VALUE=/([\w-]+)\s*=\s*([^;]+)/g;function findCommaSeparatedValue(e,t){for(COMMA_SEPARATED_KEY_VALUE.lastIndex=0;;){var n=COMMA_SEPARATED_KEY_VALUE.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function findCommaSeparatedValues(e){var t=new Map;for(COMMA_SEPARATED_KEY_VALUE.lastIndex=0;;){var n=COMMA_SEPARATED_KEY_VALUE.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function safeTruncate(e,t,n){n===void 0&&(n=``);var r=e.charCodeAt(t-1),i=r>=55296&&r<=56319?t+1:t;return e.length<=i?e:`${e.slice(0,i)}${n}`}var SESSION_TIME_OUT_DELAY=4*ONE_HOUR,SESSION_EXPIRATION_DELAY=15*ONE_MINUTE;function isIE(){return detectBrowserCached()===0}function isChromium(){return detectBrowserCached()===1}function isSafari(){return detectBrowserCached()===2}var browserCache;function detectBrowserCached(){return browserCache??=detectBrowser()}function detectBrowser(e){var t;e===void 0&&(e=window);var n=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(n)?1:e.navigator.vendor?.indexOf(`Apple`)===0||/safari/i.test(n)&&!/chrome|android/i.test(n)?2:e.document.documentMode?0:3}function setCookie(e,t,n,r){var i=new Date;i.setTime(i.getTime()+n);var a=`expires=${i.toUTCString()}`,o=r&&r.crossSite?`none`:`strict`,c=r&&r.domain?`;domain=${r.domain}`:``,u=r&&r.secure?`;secure`:``,K=r&&r.partitioned?`;partitioned`:``;document.cookie=`${e}=${t};${a};path=/;samesite=${o}${c}${u}${K}`}function getCookie(e){return findCommaSeparatedValue(document.cookie,e)}var initCookieParsed;function getInitCookie(e){return initCookieParsed||=findCommaSeparatedValues(document.cookie),initCookieParsed.get(e)}function deleteCookie(e,t){setCookie(e,``,0,t)}function areCookiesAuthorized(e){if(document.cookie===void 0||document.cookie===null)return!1;try{var t=`dd_cookie_test_${generateUUID()}`,n=`test`;
122setCookie(t,n,ONE_MINUTE,e);var r=getCookie(t)===n;return deleteCookie(t,e),r}catch(e){return display.error(e),!1}}var getCurrentSiteCache;function getCurrentSite(){if(getCurrentSiteCache===void 0){for(var e=`dd_site_test_${generateUUID()}`,t=`test`,n=window.location.hostname.split(`.`),r=n.pop();n.length&&!getCookie(e);)r=`${n.pop()}.${r}`,setCookie(e,t,ONE_SECOND,{domain:r});deleteCookie(e,{domain:r}),getCurrentSiteCache=r}return getCurrentSiteCache}var SESSION_STORE_KEY=`_dd_s`,SESSION_ENTRY_REGEXP=/^([a-z]+)=([a-z0-9-]+)$/,SESSION_ENTRY_SEPARATOR=`&`;function isSessionInExpiredState(e){return isEmptyObject$1(e)}function expandSessionState(e){e.expire=String(dateNow()+SESSION_EXPIRATION_DELAY)}function toSessionString(e){return objectEntries(e).map(function(e){return`${e[0]}=${e[1]}`}).join(SESSION_ENTRY_SEPARATOR)}function toSessionState(e){var t={};return isValidSessionString(e)&&e.split(SESSION_ENTRY_SEPARATOR).forEach(function(e){var n=SESSION_ENTRY_REGEXP.exec(e);if(n!==null){var r=n[1];t[r]=n[2]}}),t}function isValidSessionString(e){return!!e&&(e.indexOf(SESSION_ENTRY_SEPARATOR)!==-1||SESSION_ENTRY_REGEXP.test(e))}var OLD_SESSION_COOKIE_NAME=`_dd`,OLD_RUM_COOKIE_NAME=`_dd_r`,OLD_LOGS_COOKIE_NAME=`_dd_l`,RUM_SESSION_KEY$1=`rum`,LOGS_SESSION_KEY=`logs`;function tryOldCookiesMigration(e){if(!getInitCookie(`_dd_s`)){var t=getInitCookie(`_dd`),n=getInitCookie(OLD_RUM_COOKIE_NAME),r=getInitCookie(OLD_LOGS_COOKIE_NAME),i={};t&&(i.id=t),r&&/^[01]$/.test(r)&&(i[LOGS_SESSION_KEY]=r),n&&/^[012]$/.test(n)&&(i.rum=n),isSessionInExpiredState(i)||(expandSessionState(i),e.persistSession(i))}}function selectCookieStrategy(e){var t=buildCookieOptions(e);return areCookiesAuthorized(t)?{type:`Cookie`,cookieOptions:t}:void 0}function initCookieStrategy(e){var t={isLockEnabled:isChromium(),persistSession:persistSessionCookie(e),retrieveSession:retrieveSessionCookie,clearSession:deleteSessionCookie(e)};return tryOldCookiesMigration(t),t}function persistSessionCookie(e){return function(t){setCookie(SESSION_STORE_KEY,toSessionString(t),SESSION_EXPIRATION_DELAY,e)}}function retrieveSessionCookie(){return toSessionState(getCookie(SESSION_STORE_KEY))}function deleteSessionCookie(e){return function(){deleteCookie(SESSION_STORE_KEY,e)}}function buildCookieOptions(e){var t={};return t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie||!!e.useCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie||!!e.useCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=getCurrentSite()),t}var LOCAL_STORAGE_TEST_KEY=`_dd_test_`;function selectLocalStorageStrategy(){try{var e=generateUUID(),t=`${LOCAL_STORAGE_TEST_KEY}${e}`;localStorage.setItem(t,e);var n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:`LocalStorage`}:void 0}catch{return}}function initLocalStorageStrategy(){return{isLockEnabled:!1,persistSession:persistInLocalStorage,retrieveSession:retrieveSessionFromLocalStorage,clearSession:clearSessionFromLocalStorage}}function persistInLocalStorage(e){localStorage.setItem(SESSION_STORE_KEY,toSessionString(e))}function retrieveSessionFromLocalStorage(){return toSessionState(localStorage.getItem(SESSION_STORE_KEY))}function clearSessionFromLocalStorage(){localStorage.removeItem(SESSION_STORE_KEY)}var LOCK_RETRY_DELAY=10,LOCK_MAX_TRIES=100,bufferedOperations=[],ongoingOperations;function processSessionStoreOperations(e,t,n){var r;n===void 0&&(n=0);var i=t.isLockEnabled,a=t.retrieveSession,o=t.persistSession,c=t.clearSession;if(ongoingOperations||=e,e!==ongoingOperations){bufferedOperations.push(e);return}if(i&&n>=100){next(t);return}var u,K=a();if(i){if(K.lock){retryLater(e,t,n);return}if(u=generateUUID(),K.lock=u,o(K),K=a(),K.lock!==u){retryLater(e,t,n);return}}var Y=e.process(K);if(i&&(K=a(),K.lock!==u)){retryLater(e,t,n);return}if(Y&&(isSessionInExpiredState(Y)?c():(expandSessionState(Y),o(Y))),i&&!(Y&&isSessionInExpiredState(Y))){if(K=a(),K.lock!==u){retryLater(e,t,n);return}delete K.lock,o(K),Y=K}(r=e.after)==null||r.call(e,Y||K),next(t)}function retryLater(e,t,n){setTimeout$1(function(){processSessionStoreOperations(e,t,n+1)},10)}function next(e){ongoingOperations=void 0;var t=bufferedOperations.shift();t&&processSessionStoreOperations(t,e)}var STORAGE_POLL_DELAY=ONE_SECOND;function selectSessionStoreStrategyType(e){var t=selectCookieStrategy(e);return!t&&e.allowFallbackToLocalStorage&&(t=selectLocalStorageStrategy()),t}function startSessionStore(e,t,n){var r=new Observable,i=new Observable,a=e.type===`Cookie`?initCookieStrategy(e.cookieOptions):initLocalStorageStrategy(),o=a.clearSession,c=a.retrieveSession,u=setInterval$1(ce,STORAGE_POLL_DELAY),K=Oe(),Y=throttle$2(function(){var e;processSessionStoreOperations({process:function(t){var n=ue(t);return e=de(n),n},after:function(t){e&&!fe()&&Te(t),K=t}},a)},STORAGE_POLL_DELAY),X=Y.throttled,ee=Y.cancel;function te(){processSessionStoreOperations({process:function(e){return fe()?ue(e):void 0}},a)}function ce(){processSessionStoreOperations({process:function(e){return Ae(e)?void 0:{}},after:ue},a)}function ue(e){return Ae(e)||(e={}),fe()&&(me(e)?ge():K=e),e}function de(e){var r=n(e[t]),i=r.trackingType,a=r.isTracked;return e[t]=i,a&&!e.id&&(e.id=generateUUID(),e.created=String(dateNow())),a}function fe(){return K[t]!==void 0}function me(e){return K.id!==e.id||K[t]!==e[t]}function ge(){K={},i.notify()}function Te(e){K=e,r.notify()}function Oe(){var e=c();return Ae(e)?e:{}}function Ae(e){return(e.created===void 0||dateNow()-Number(e.created)<SESSION_TIME_OUT_DELAY)&&(e.expire===void 0||dateNow()<Number(e.expire))}return{expandOrRenewSession:X,expandSession:te,getSession:function(){return K},renewObservable:r,expireObservable:i,expire:function(){ee(),o(),ue({})},stop:function(){clearInterval$1(u)}}}var TrackingConsent={GRANTED:`granted`,NOT_GRANTED:`not-granted`};function createTrackingConsentState(e){var t=new Observable;return{tryToInit:function(t){e||=t},update:function(n){e=n,t.notify()},isGranted:function(){return e===TrackingConsent.GRANTED},observable:t}}
122function jsonStringify(e,t,n){if(typeof e!=`object`||!e)return JSON.stringify(e);var r=detachToJsonMethod(Object.prototype),i=detachToJsonMethod(Array.prototype),a=detachToJsonMethod(Object.getPrototypeOf(e)),o=detachToJsonMethod(e);try{return JSON.stringify(e,t,n)}catch{return`<error: unable to serialize object>`}finally{r(),i(),a(),o()}}function detachToJsonMethod(e){var t=e,n=t.toJSON;return n?(delete t.toJSON,function(){t.toJSON=n}):noop$1}function normalizeUrl(e){return buildUrl(e,location.href).href}function isValidUrl(e){try{return!!buildUrl(e)}catch{return!1}}function getPathName(e){var t=buildUrl(e).pathname;return t[0]===`/`?t:`/${t}`}function buildUrl(e,t){var n=getSupportedUrl();if(n)try{return t===void 0?new n(e):new n(e,t)}catch(n){throw Error(`Failed to construct URL: ${String(n)} ${jsonStringify({url:e,base:t})}`)}if(t===void 0&&!/:/.test(e))throw Error(`Invalid URL: '${e}'`);var r=document,i=r.createElement(`a`);if(t!==void 0){r=document.implementation.createHTMLDocument(``);var a=r.createElement(`base`);a.href=t,r.head.appendChild(a),r.body.appendChild(i)}return i.href=e,i}var originalURL=URL,isURLSupported;function getSupportedUrl(){if(isURLSupported===void 0)try{isURLSupported=new originalURL(`http://test/path`).href===`http://test/path`}catch{isURLSupported=!1}return isURLSupported?originalURL:void 0}var INTAKE_SITE_STAGING=`datad0g.com`,INTAKE_SITE_FED_STAGING=`dd0g-gov.com`,INTAKE_SITE_US1=`datadoghq.com`,INTAKE_SITE_EU1=`datadoghq.eu`,INTAKE_SITE_US1_FED=`ddog-gov.com`;function createEndpointBuilder(e,t,n){var r=createEndpointUrlWithParametersBuilder(e,t);return{build:function(i,a){return r(buildEndpointParameters(e,t,n,i,a))},urlPrefix:r(``),trackType:t}}function createEndpointUrlWithParametersBuilder(e,t){var n=`/api/v2/${t}`,r=e.proxy;if(typeof r==`string`){var i=normalizeUrl(r);return function(e){return`${i}?ddforward=${encodeURIComponent(`${n}?${e}`)}`}}if(typeof r==`function`)return function(e){return r({path:n,parameters:e})};var a=buildEndpointHost(e);return function(e){return`https://${a}${n}?${e}`}}function buildEndpointHost(e){var t=e.site,n=t===void 0?INTAKE_SITE_US1:t,r=e.internalAnalyticsSubdomain;if(r&&n===`datadoghq.com`)return`${r}.${INTAKE_SITE_US1}`;if(n===`dd0g-gov.com`)return`http-intake.logs.${n}`;var i=n.split(`.`),a=i.pop();return`browser-intake-${i.join(`-`)}.${a}`}function buildEndpointParameters(e,t,n,r,i){var a=e.clientToken,o=e.internalAnalyticsSubdomain,c=i.retry,u=i.flushReason,K=i.encoding,Y=[`sdk_version:5.11.0`,`api:${r}`].concat(n);u&&isExperimentalFeatureEnabled(ExperimentalFeature.COLLECT_FLUSH_REASON)&&Y.push(`flush_reason:${u}`),c&&Y.push(`retry_count:${c.count}`,`retry_after:${c.lastFailureStatus}`);var X=[`ddsource=browser`,`ddtags=${encodeURIComponent(Y.join(`,`))}`,`dd-api-key=${a}`,`dd-evp-origin-version=5.11.0`,`dd-evp-origin=browser`,`dd-request-id=${generateUUID()}`];return K&&X.push(`dd-evp-encoding=${K}`),t===`rum`&&X.push(`batch_time=${timeStampNow()}`),o&&X.reverse(),X.join(`&`)}var TAG_SIZE_LIMIT=200;function buildTags(e){var t=e.env,n=e.service,r=e.version,i=e.datacenter,a=[];return t&&a.push(buildTag(`env`,t)),n&&a.push(buildTag(`service`,n)),r&&a.push(buildTag(`version`,r)),i&&a.push(buildTag(`datacenter`,i)),a}var FORBIDDEN_CHARACTERS=/[^a-z0-9_:./-]/;function buildTag(e,t){var n=200-e.length-1;return(t.length>n||FORBIDDEN_CHARACTERS.test(t))&&display.warn(`${e} value doesn't meet tag requirements and will be sanitized`),`${e}:${t.replace(/,/g,`_`)}`}function computeTransportConfiguration(e){var t=buildTags(e),n=computeEndpointBuilders(e,t),r=objectValues(n).map(function(e){return e.urlPrefix});return assign({isIntakeUrl:function(e){return r.some(function(t){return e.indexOf(t)===0})},replica:computeReplicaConfiguration(e,r,t),site:e.site||`datadoghq.com`},n)}function computeEndpointBuilders(e,t){return{logsEndpointBuilder:createEndpointBuilder(e,`logs`,t),rumEndpointBuilder:createEndpointBuilder(e,`rum`,t),sessionReplayEndpointBuilder:createEndpointBuilder(e,`replay`,t)}}function computeReplicaConfiguration(e,t,n){if(e.replica){var r=assign({},e,{site:INTAKE_SITE_US1,clientToken:e.replica.clientToken}),i={logsEndpointBuilder:createEndpointBuilder(r,`logs`,n),rumEndpointBuilder:createEndpointBuilder(r,`rum`,n)};return t.push.apply(t,objectValues(i).map(function(e){return e.urlPrefix})),assign({applicationId:e.replica.applicationId},i)}}var DefaultPrivacyLevel={ALLOW:`allow`,MASK:`mask`,MASK_USER_INPUT:`mask-user-input`};function validateAndBuildConfiguration(e){var t,n,r,i;if(!e||!e.clientToken){display.error(`Client Token is not configured, we will not send any data.`);return}if(e.sessionSampleRate!==void 0&&!isPercentage(e.sessionSampleRate)){display.error(`Session Sample Rate should be a number between 0 and 100`);return}if(e.telemetrySampleRate!==void 0&&!isPercentage(e.telemetrySampleRate)){display.error(`Telemetry Sample Rate should be a number between 0 and 100`);return}if(e.telemetryConfigurationSampleRate!==void 0&&!isPercentage(e.telemetryConfigurationSampleRate)){display.error(`Telemetry Configuration Sample Rate should be a number between 0 and 100`);return}if(e.trackingConsent!==void 0&&!objectHasValue(TrackingConsent,e.trackingConsent)){display.error(`Tracking Consent should be either "granted" or "not-granted"`);return}return Array.isArray(e.enableExperimentalFeatures)&&addExperimentalFeatures(e.enableExperimentalFeatures.filter(function(e){return objectHasValue(ExperimentalFeature,e)})),assign({beforeSend:e.beforeSend&&catchUserErrors(e.beforeSend,`beforeSend threw an error:`),sessionStoreStrategyType:selectSessionStoreStrategyType(e),sessionSampleRate:e.sessionSampleRate??100,telemetrySampleRate:e.telemetrySampleRate??20,telemetryConfigurationSampleRate:e.telemetryConfigurationSampleRate??5,service:e.service,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:e.trackingConsent??TrackingConsent.GRANTED,batchBytesLimit:16*ONE_KIBI_BYTE,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*ONE_SECOND,batchMessagesLimit:50,messageBytesLimit:256*ONE_KIBI_BYTE},computeTransportConfiguration(e))}function serializeConfiguration(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,use_before_send:!!e.beforeSend,use_cross_site_session_cookie:e.useCrossSiteSessionCookie,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents}}function instrumentMethod(e,t,n){var r=e[t],i=createInstrumentedMethod(r,n),a=function(){if(typeof i==`function`)return i.apply(this,arguments)};return e[t]=a,{stop:function(){e[t]===a?e[t]=r:i=r}}}function createInstrumentedMethod(e,t){return function(){var n=arguments,r,i;return callMonitored(t,null,[{target:this,parameters:n,onPostCall:function(e){i=e}}]),typeof e==`function`&&(r=e.apply(this,n)),i&&callMonitored(i,null,[r]),r}}function instrumentSetter(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r.set||!r.configurable)return{stop:noop$1};var i=noop$1,a=function(e,t){setTimeout$1(function(){a!==i&&n(e,t)},0)},o=function(e){r.set.call(this,e),a(this,e)};
122return Object.defineProperty(e,t,{set:o}),{stop:function(){var n;Object.getOwnPropertyDescriptor(e,t)?.set===o&&Object.defineProperty(e,t,r),a=i}}}var UNKNOWN_FUNCTION=`?`;function computeStackTrace(e){var t=[],n=tryToGetString(e,`stack`),r=String(e);return n&&startsWith(n,r)&&(n=n.slice(r.length)),n&&n.split(`
123`).forEach(function(e){var n=parseChromeLine(e)||parseChromeAnonymousLine(e)||parseWinLine(e)||parseGeckoLine(e);n&&(!n.func&&n.line&&(n.func=UNKNOWN_FUNCTION),t.push(n))}),{message:tryToGetString(e,`message`),name:tryToGetString(e,`name`),stack:t}}var fileUrl=`((?:file|https?|blob|chrome-extension|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)`,filePosition=`(?::(\\d+))`,CHROME_LINE_RE=RegExp(`^\\s*at (.*?) ?\\(${fileUrl}${filePosition}?${filePosition}?\\)?\\s*\$`,`i`),CHROME_EVAL_RE=RegExp(`\\((\\S*)${filePosition}${filePosition}\\)`);function parseChromeLine(e){var t=CHROME_LINE_RE.exec(e);if(t){var n=t[2]&&t[2].indexOf(`native`)===0,r=t[2]&&t[2].indexOf(`eval`)===0,i=CHROME_EVAL_RE.exec(t[2]);return r&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||UNKNOWN_FUNCTION,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}}var CHROME_ANONYMOUS_FUNCTION_RE=RegExp(`^\\s*at ?${fileUrl}${filePosition}?${filePosition}??\\s*\$`,`i`);function parseChromeAnonymousLine(e){var t=CHROME_ANONYMOUS_FUNCTION_RE.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:UNKNOWN_FUNCTION,line:t[2]?+t[2]:void 0,url:t[1]}}var WINJS_LINE_RE=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function parseWinLine(e){var t=WINJS_LINE_RE.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||UNKNOWN_FUNCTION,line:+t[3],url:t[2]}}var GECKO_LINE_RE=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,GECKO_EVAL_RE=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function parseGeckoLine(e){var t=GECKO_LINE_RE.exec(e);if(t){var n=t[3]&&t[3].indexOf(` > eval`)>-1,r=GECKO_EVAL_RE.exec(t[3]);return n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0),{args:t[2]?t[2].split(`,`):[],column:t[5]?+t[5]:void 0,func:t[1]||UNKNOWN_FUNCTION,line:t[4]?+t[4]:void 0,url:t[3]}}}function tryToGetString(e,t){if(typeof e==`object`&&e&&t in e){var n=e[t];return typeof n==`string`?n:void 0}}function computeStackTraceFromOnErrorMessage(e,t,n,r){var i=[{url:t,column:r,line:n}],a=tryToParseMessage(e);return{name:a.name,message:a.message,stack:i}}var ERROR_TYPES_RE=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function tryToParseMessage(e){var t,n,r;return{}.toString.call(e)===`[object String]`&&(t=ERROR_TYPES_RE.exec(e),n=t[1],r=t[2]),{name:n,message:r}}var SANITIZE_DEFAULT_MAX_CHARACTER_COUNT=220*ONE_KIBI_BYTE,JSON_PATH_ROOT_ELEMENT=`$`,KEY_DECORATION_LENGTH=3;function sanitize(e,t){var n;t===void 0&&(t=SANITIZE_DEFAULT_MAX_CHARACTER_COUNT);var r=detachToJsonMethod(Object.prototype),i=detachToJsonMethod(Array.prototype),a=[],o=new WeakMap,c=sanitizeProcessor(e,JSON_PATH_ROOT_ELEMENT,void 0,a,o),u=JSON.stringify(c)?.length||0;if(u>t){warnOverCharacterLimit(t,`discarded`,e);return}for(;a.length>0&&u<t;){var K=a.shift(),Y=0;if(Array.isArray(K.source))for(var X=0;X<K.source.length;X++){var ee=sanitizeProcessor(K.source[X],K.path,X,a,o);if(u+=ee===void 0?4:JSON.stringify(ee).length,u+=Y,Y=1,u>t){warnOverCharacterLimit(t,`truncated`,e);break}K.target[X]=ee}else for(var X in K.source)if(Object.prototype.hasOwnProperty.call(K.source,X)){var ee=sanitizeProcessor(K.source[X],K.path,X,a,o);if(ee!==void 0&&(u+=JSON.stringify(ee).length+Y+X.length+KEY_DECORATION_LENGTH,Y=1),u>t){warnOverCharacterLimit(t,`truncated`,e);break}K.target[X]=ee}}return r(),i(),c}function sanitizeProcessor(e,t,n,r,i){var a=tryToApplyToJSON(e);if(!a||typeof a!=`object`)return sanitizePrimitivesAndFunctions(a);var o=sanitizeObjects(a);if(o!==`[Object]`&&o!==`[Array]`&&o!==`[Error]`)return o;var c=e;if(i.has(c))return`[Reference seen at ${i.get(c)}]`;var u=n===void 0?t:`${t}.${n}`,K=Array.isArray(a)?[]:{};return i.set(c,u),r.push({source:a,target:K,path:u}),K}function sanitizePrimitivesAndFunctions(e){return typeof e==`bigint`?`[BigInt] ${e.toString()}`:typeof e==`function`?`[Function] ${e.name||`unknown`}`:typeof e==`symbol`?`[Symbol] ${e.description||e.toString()}`:e}function sanitizeObjects(e){try{if(e instanceof Event)return{isTrusted:e.isTrusted};var t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t&&t[1])return`[${t[1]}]`}catch{}return`[Unserializable]`}function tryToApplyToJSON(e){var t=e;if(t&&typeof t.toJSON==`function`)try{return t.toJSON()}catch{}return e}function warnOverCharacterLimit(e,t,n){display.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}var NO_ERROR_STACK_PRESENT_MESSAGE=`No stack, consider using an instance of Error`;function computeRawError(e){var t=e.stackTrace,n=e.originalError,r=e.handlingStack,i=e.startClocks,a=e.nonErrorPrefix,o=e.source,c=e.handling,u=n instanceof Error,K=computeMessage(t,u,a,n),Y=hasUsableStack(u,t)?toStackTraceString(t):NO_ERROR_STACK_PRESENT_MESSAGE,X=u?flattenErrorCauses(n,o):void 0;return{startClocks:i,source:o,handling:c,handlingStack:r,originalError:n,type:t?.name,message:K,stack:Y,causes:X,fingerprint:tryToGetFingerprint(n)}}function computeMessage(e,t,n,r){return e?.message&&e?.name?e.message:t?`Empty message`:`${n} ${jsonStringify(sanitize(r))}`}function hasUsableStack(e,t){return t===void 0?!1:e?!0:t.stack.length>0&&(t.stack.length>1||t.stack[0].url!==void 0)}function tryToGetFingerprint(e){return e instanceof Error&&`dd_f
123ingerprint`in e?String(e.dd_fingerprint):void 0}function toStackTraceString(e){var t=formatErrorMessage(e);return e.stack.forEach(function(e){var n=e.func===`?`?`<anonymous>`:e.func,r=e.args&&e.args.length>0?`(${e.args.join(`, `)})`:``,i=e.line?`:${e.line}`:``,a=e.line&&e.column?`:${e.column}`:``;t+=`
124  at ${n}${r} @ ${e.url}${i}${a}`}),t}function formatErrorMessage(e){return`${e.name||`Error`}: ${e.message}`}function createHandlingStack(){var e=2,t=Error(),n;if(!t.stack)try{throw t}catch{}return callMonitored(function(){var e=computeStackTrace(t);e.stack=e.stack.slice(2),n=toStackTraceString(e)}),n}function flattenErrorCauses(e,t){for(var n=e,r=[];n?.cause instanceof Error&&r.length<10;){var i=computeStackTrace(n.cause);r.push({message:n.cause.message,source:t,type:i?.name,stack:i&&toStackTraceString(i)}),n=n.cause}return r.length?r:void 0}var ErrorSource={AGENT:`agent`,CONSOLE:`console`,CUSTOM:`custom`,LOGGER:`logger`,NETWORK:`network`,SOURCE:`source`,REPORT:`report`};function trackRuntimeError(e){var t=function(t,n){var r=computeRawError({stackTrace:t,originalError:n,startClocks:clocksNow(),nonErrorPrefix:`Uncaught`,source:ErrorSource.SOURCE,handling:`unhandled`});e.notify(r)},n=instrumentOnError(t).stop,r=instrumentUnhandledRejection(t).stop;return{stop:function(){n(),r()}}}function instrumentOnError(e){return instrumentMethod(window,`onerror`,function(t){var n=t.parameters,r=n[0],i=n[1],a=n[2],o=n[3],c=n[4];e(c instanceof Error?computeStackTrace(c):computeStackTraceFromOnErrorMessage(r,i,a,o),c??r)})}function instrumentUnhandledRejection(e){return instrumentMethod(window,`onunhandledrejection`,function(t){var n=t.parameters[0].reason||`Empty reason`;e(computeStackTrace(n),n)})}function makePublicApi(e){var t=assign({version:`5.11.0`,onReady:function(e){e()}},e);return Object.defineProperty(t,"_setDebug",{get:function(){return setDebugMode},enumerable:!1}),t}function defineGlobal(e,t,n){var r=e[t];e[t]=n,r&&r.q&&r.q.forEach(function(e){return catchUserErrors(e,`onReady callback threw an error:`)()})}function displayAlreadyInitializedError(e,t){t.silentMultipleInit||display.error(`${e} is already initialized.`)}var DOM_EVENT;(function(e){e.BEFORE_UNLOAD=`beforeunload`,e.CLICK=`click`,e.DBL_CLICK=`dblclick`,e.KEY_DOWN=`keydown`,e.LOAD=`load`,e.POP_STATE=`popstate`,e.SCROLL=`scroll`,e.TOUCH_START=`touchstart`,e.TOUCH_END=`touchend`,e.TOUCH_MOVE=`touchmove`,e.VISIBILITY_CHANGE=`visibilitychange`,e.PAGE_SHOW=`pageshow`,e.FREEZE=`freeze`,e.RESUME=`resume`,e.DOM_CONTENT_LOADED=`DOMContentLoaded`,e.POINTER_DOWN=`pointerdown`,e.POINTER_UP=`pointerup`,e.POINTER_CANCEL=`pointercancel`,e.HASH_CHANGE=`hashchange`,e.PAGE_HIDE=`pagehide`,e.MOUSE_DOWN=`mousedown`,e.MOUSE_UP=`mouseup`,e.MOUSE_MOVE=`mousemove`,e.FOCUS=`focus`,e.BLUR=`blur`,e.CONTEXT_MENU=`contextmenu`,e.RESIZE=`resize`,e.CHANGE=`change`,e.INPUT=`input`,e.PLAY=`play`,e.PAUSE=`pause`,e.SECURITY_POLICY_VIOLATION=`securitypolicyviolation`,e.SELECTION_CHANGE=`selectionchange`,e.STORAGE=`storage`})(DOM_EVENT||={});function addEventListener(e,t,n,r,i){return addEventListeners(e,t,[n],r,i)}function addEventListeners(e,t,n,r,i){var a=i===void 0?{}:i,o=a.once,c=a.capture,u=a.passive,K=monitor(function(t){(t.isTrusted||t.__ddIsTrusted||e.allowUntrustedEvents)&&(o&&ee(),r(t))}),Y=u?{capture:c,passive:u}:c,X=getZoneJsOriginalValue(t,`addEventListener`);n.forEach(function(e){return X.call(t,e,K,Y)});function ee(){var e=getZoneJsOriginalValue(t,`removeEventListener`);n.forEach(function(n){return e.call(t,n,K,Y)})}return{stop:ee}}var RawReportType={intervention:`intervention`,deprecation:`deprecation`,cspViolation:`csp_violation`};function initReportObservable(e,t){var n=[];includes(t,RawReportType.cspViolation)&&n.push(createCspViolationReportObservable(e));var r=t.filter(function(e){return e!==RawReportType.cspViolation});return r.length&&n.push(createReportObservable(r)),mergeObservables.apply(void 0,n)}function createReportObservable(e){return new Observable(function(t){if(window.ReportingObserver){var n=monitor(function(e,n){return e.forEach(function(e){t.notify(buildRawReportFromReport(e))})}),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),function(){r.disconnect()}}})}function createCspViolationReportObservable(e){return new Observable(function(t){return addEventListener(e,document,DOM_EVENT.SECURITY_POLICY_VIOLATION,function(e){t.notify(buildRawReportFromCspViolation(e))}).stop})}function buildRawReportFromReport(e){var t=e.type,n=e.body;return{type:t,subtype:n.id,message:`${t}: ${n.message}`,originalReport:e,stack:buildStack(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)}}function buildRawReportFromCspViolation(e){var t=RawReportType.cspViolation,n=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return{type:RawReportType.cspViolation,subtype:e.effectiveDirective,message:`${t}: ${n}`,stack:buildStack(e.effectiveDirective,e.originalPolicy?`${n} of the policy "${safeTruncate(e.originalPolicy,100,`...`)}"`:`no policy`,e.sourceFile,e.lineNumber,e.columnNumber),originalReport:e}}function buildStack(e,t,n,r,i){return n?toStackTraceString({name:e,message:t,stack:[{func:`?`,url:n,line:r??void 0,column:i??void 0}]}):void 0}function sendToExtension(e,t){var n=window.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}function getType(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e}function mergeInto(e,t,n){if(n===void 0&&(n=createCircularReferenceChecker()),t===void 0)return e;if(typeof t!=`object`||!t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){var r=t.flags||[t.global?`g`:``,t.ignoreCase?`i`:``,t.multiline?`m`:``,t.sticky?`y`:``,t.unicode?`u`:``].join(``);return new RegExp(t.source,r)}if(!n.hasAlreadyBeenSeen(t)){if(Array.isArray(t)){for(var i=Array.isArray(e)?e:[],a=0;a<t.length;++a)i[a]=mergeInto(i[a],t[a],n);return i}var o=getType(e)===`object`?e:{};for(var c in t)Object.prototype.hasOwnProperty.call(t,c)&&(o[c]=mergeInto(o[c],t[c],n)
124);return o}}function deepClone(e){return mergeInto(void 0,e)}function combine(){for(var e=[...arguments],t,n=0,r=e;n<r.length;n++){var i=r[n];i!=null&&(t=mergeInto(t,i))}return t}function createCircularReferenceChecker(){if(typeof WeakSet<`u`){var e=new WeakSet;return{hasAlreadyBeenSeen:function(t){var n=e.has(t);return n||e.add(t),n}}}var t=[];return{hasAlreadyBeenSeen:function(e){var n=t.indexOf(e)>=0;return n||t.push(e),n}}}function getConnectivity(){var e,t=window.navigator;return{status:t.onLine?`connected`:`not_connected`,interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:t.connection?.effectiveType}}var TelemetryType={log:`log`,configuration:`configuration`},ALLOWED_FRAME_URLS=[`https://www.datadoghq-browser-agent.com`,`https://www.datad0g-browser-agent.com`,`https://d3uc069fcn7uxw.cloudfront.net`,`https://d20xtzwzcl0ceb.cloudfront.net`,`http://localhost`,`<anonymous>`],TELEMETRY_EXCLUDED_SITES=[INTAKE_SITE_US1_FED],telemetryConfiguration={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1,telemetryConfigurationEnabled:!1},onRawTelemetryEventCollected;function startTelemetry(e,t){var n,r=new Observable;telemetryConfiguration.telemetryEnabled=!includes(TELEMETRY_EXCLUDED_SITES,t.site)&&performDraw(t.telemetrySampleRate),telemetryConfiguration.telemetryConfigurationEnabled=telemetryConfiguration.telemetryEnabled&&performDraw(t.telemetryConfigurationSampleRate);var i=getRuntimeEnvInfo();onRawTelemetryEventCollected=function(t){if(telemetryConfiguration.telemetryEnabled){var n=a(e,t,i);r.notify(n),sendToExtension(`telemetry`,n)}},startMonitorErrorCollection(addTelemetryError),assign(telemetryConfiguration,{maxEventsPerPage:t.maxTelemetryEventsPerPage,sentEventCount:0});function a(e,t,r){return combine({type:`telemetry`,date:timeStampNow(),service:e,version:`5.11.0`,source:`browser`,_dd:{format_version:2},telemetry:combine(t,{runtime_env:r,connectivity:getConnectivity()}),experimental_features:arrayFrom(getExperimentalFeatures())},n===void 0?{}:n())}return{setContextProvider:function(e){n=e},observable:r,enabled:telemetryConfiguration.telemetryEnabled}}function getRuntimeEnvInfo(){return{is_local_file:window.location.protocol===`file:`,is_worker:`WorkerGlobalScope`in self}}function isTelemetryReplicationAllowed(e){return e.site===INTAKE_SITE_STAGING}function addTelemetryDebug(e,t){displayIfDebugEnabled(ConsoleApiName.debug,e,t),addTelemetry(assign({type:TelemetryType.log,message:e,status:`debug`},t))}function addTelemetryError(e,t){addTelemetry(assign({type:TelemetryType.log,status:`error`},formatError(e),t))}function addTelemetryConfiguration(e){telemetryConfiguration.telemetryConfigurationEnabled&&addTelemetry({type:TelemetryType.configuration,configuration:e})}function addTelemetry(e){onRawTelemetryEventCollected&&telemetryConfiguration.sentEventCount<telemetryConfiguration.maxEventsPerPage&&(telemetryConfiguration.sentEventCount+=1,onRawTelemetryEventCollected(e))}function formatError(e){if(e instanceof Error){var t=computeStackTrace(e);return{error:{kind:t.name,stack:toStackTraceString(scrubCustomerFrames(t))},message:t.message}}return{error:{stack:NO_ERROR_STACK_PRESENT_MESSAGE},message:`Uncaught ${jsonStringify(e)}`}}function scrubCustomerFrames(e){return e.stack=e.stack.filter(function(e){return!e.url||ALLOWED_FRAME_URLS.some(function(t){return startsWith(e.url,t)})}),e}function removeItem(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}var END_OF_TIMES=1/0,CLEAR_OLD_VALUES_INTERVAL=ONE_MINUTE,ValueHistory=function(){function e(e,t){var n=this;this.expireDelay=e,this.maxEntries=t,this.entries=[],this.clearOldValuesInterval=setInterval$1(function(){return n.clearOldValues()},CLEAR_OLD_VALUES_INTERVAL)}return e.prototype.add=function(e,t){var n=this,r={value:e,startTime:t,endTime:END_OF_TIMES,remove:function(){removeItem(n.entries,r)},close:function(e){r.endTime=e}};return this.maxEntries&&this.entries.length>=this.maxEntries&&this.entries.pop(),this.entries.unshift(r),r},e.prototype.find=function(e){e===void 0&&(e=END_OF_TIMES);for(var t=0,n=this.entries;t<n.length;t++){var r=n[t];if(r.startTime<=e){if(e<=r.endTime)return r.value;break}}},e.prototype.closeActive=function(e){var t=this.entries[0];t&&t.endTime===END_OF_TIMES&&t.close(e)},e.prototype.findAll=function(e,t){e===void 0&&(e=END_OF_TIMES),t===void 0&&(t=0);var n=addDuration(e,t);return this.entries.filter(function(t){return t.startTime<=n&&e<=t.endTime}).map(function(e){return e.value})},e.prototype.reset=function(){this.entries=[]},e.prototype.stop=function(){clearInterval$1(this.clearOldValuesInterval)},e.prototype.clearOldValues=function(){for(var e=relativeNow()-this.expireDelay;this.entries.length>0&&this.entries[this.entries.length-1].endTime<e;)this.entries.pop()},e}(),VISIBILITY_CHECK_DELAY=ONE_MINUTE,SESSION_CONTEXT_TIMEOUT_DELAY=SESSION_TIME_OUT_DELAY,
124stopCallbacks=[];function startSessionManager(e,t,n,r){var i=new Observable,a=new Observable,o=startSessionStore(e.sessionStoreStrategyType,t,n);stopCallbacks.push(function(){return o.stop()});var c=new ValueHistory(SESSION_CONTEXT_TIMEOUT_DELAY);stopCallbacks.push(function(){return c.stop()}),o.renewObservable.subscribe(function(){c.add(u(),relativeNow()),i.notify()}),o.expireObservable.subscribe(function(){a.notify(),c.closeActive(relativeNow())}),o.expandOrRenewSession(),c.add(u(),clocksOrigin().relative),r.observable.subscribe(function(){r.isGranted()?o.expandOrRenewSession():o.expire()}),trackActivity(e,function(){r.isGranted()&&o.expandOrRenewSession()}),trackVisibility(e,function(){return o.expandSession()});function u(){return{id:o.getSession().id,trackingType:o.getSession()[t]}}return{findActiveSession:function(e){return c.find(e)},renewObservable:i,expireObservable:a,expire:o.expire}}function trackActivity(e,t){var n=addEventListeners(e,window,[DOM_EVENT.CLICK,DOM_EVENT.TOUCH_START,DOM_EVENT.KEY_DOWN,DOM_EVENT.SCROLL],t,{capture:!0,passive:!0}).stop;stopCallbacks.push(n)}function trackVisibility(e,t){var n=function(){document.visibilityState===`visible`&&t()},r=addEventListener(e,document,DOM_EVENT.VISIBILITY_CHANGE,n).stop;stopCallbacks.push(r);var i=setInterval$1(n,VISIBILITY_CHECK_DELAY);stopCallbacks.push(function(){clearInterval$1(i)})}function isServerError(e){return e>=500}function tryToClone(e){try{return e.clone()}catch{return}}var MAX_ONGOING_BYTES_COUNT=80*ONE_KIBI_BYTE,MAX_ONGOING_REQUESTS=32,MAX_QUEUE_BYTES_COUNT=3*ONE_MEBI_BYTE,MAX_BACKOFF_TIME=ONE_MINUTE,INITIAL_BACKOFF_TIME=ONE_SECOND;function sendWithRetryStrategy(e,t,n,r,i){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?send(e,t,n,{onSuccess:function(){return retryQueuedPayloads(0,t,n,r,i)},onFailure:function(){t.queuedPayloads.enqueue(e),scheduleRetry(t,n,r,i)}}):t.queuedPayloads.enqueue(e)}function scheduleRetry(e,t,n,r){e.transportStatus===2&&setTimeout$1(function(){send(e.queuedPayloads.first(),e,t,{onSuccess:function(){e.queuedPayloads.dequeue(),e.currentBackoffTime=INITIAL_BACKOFF_TIME,retryQueuedPayloads(1,e,t,n,r)},onFailure:function(){e.currentBackoffTime=Math.min(MAX_BACKOFF_TIME,e.currentBackoffTime*2),scheduleRetry(e,t,n,r)}})},e.currentBackoffTime)}function send(e,t,n,r){var i=r.onSuccess,a=r.onFailure;t.bandwidthMonitor.add(e),n(e,function(n){t.bandwidthMonitor.remove(e),shouldRetryRequest(n)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:n.status},a()):(t.transportStatus=0,i())})}function retryQueuedPayloads(e,t,n,r,i){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i({message:`Reached max ${r} events size queued for upload: ${MAX_QUEUE_BYTES_COUNT/ONE_MEBI_BYTE}MiB`,source:ErrorSource.AGENT,startClocks:clocksNow()}),t.queueFullReported=!0);var a=t.queuedPayloads;for(t.queuedPayloads=newPayloadQueue();a.size()>0;)sendWithRetryStrategy(a.dequeue(),t,n,r,i)}function shouldRetryRequest(e){return e.type!==`opaque`&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||isServerError(e.status))}function newRetryState(){return{transportStatus:0,currentBackoffTime:INITIAL_BACKOFF_TIME,bandwidthMonitor:newBandwidthMonitor(),queuedPayloads:newPayloadQueue(),queueFullReported:!1}}function newPayloadQueue(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:function(){return e[0]},dequeue:function(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:function(){return e.length},isFull:function(){return this.bytesCount>=MAX_QUEUE_BYTES_COUNT}}}function newBandwidthMonitor(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=MAX_ONGOING_BYTES_COUNT&&this.ongoingRequestCount<32},add:function(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove:function(e){--this.ongoingRequestCount,this.ongoingByteCount-=e.bytesCount}}}function createHttpRequest(e,t,n,r){var i=newRetryState(),a=function(r,i){return fetchKeepAliveStrategy(e,t,n,r,i)};return{send:function(e){sendWithRetryStrategy(e,i,a,t.trackType,r)},sendOnExit:function(r){sendBeaconStrategy(e,t,n,r)}}}function sendBeaconStrategy(e,t,n,r){if(navigator.sendBeacon&&r.bytesCount<n)try{var i=t.build(`beacon`,r);if(navigator.sendBeacon(i,r.data))return}catch(e){reportBeaconError(e)}sendXHR(e,t.build(`xhr`,r),r.data)}var hasReportedBeaconError=!1;function reportBeaconError(e){hasReportedBeaconError||(hasReportedBeaconError=!0,addTelemetryError(e))}function fetchKeepAliveStrategy(e,t,n,r,i){if(isKeepAliveSupported()&&r.bytesCount<n){var a=t.build(`fetch`,r);fetch(a,{method:`POST`,body:r.data,keepalive:!0,mode:`cors`}).then(monitor(function(e){return i?.({status:e.status,type:e.type})}),monitor(function(){sendXHR(e,t.build(`xhr`,r),r.data,i)}))}
124else sendXHR(e,t.build(`xhr`,r),r.data,i)}function isKeepAliveSupported(){try{return window.Request&&`keepalive`in new Request(`http://a`)}catch{return!1}}function sendXHR(e,t,n,r){var i=new XMLHttpRequest;i.open(`POST`,t,!0),n instanceof Blob&&i.setRequestHeader(`Content-Type`,n.type),addEventListener(e,i,`loadend`,function(){r?.({status:i.status})},{once:!0}),i.send(n)}function getEventBridge(){var e=getEventBridgeGlobal();if(e)return{getCapabilities:function(){var t;return JSON.parse(e.getCapabilities?.call(e)||`[]`)},getPrivacyLevel:function(){var t;return e.getPrivacyLevel?.call(e)},getAllowedWebViewHosts:function(){return JSON.parse(e.getAllowedWebViewHosts())},send:function(t,n,r){var i=r?{id:r}:void 0;e.send(JSON.stringify({eventType:t,event:n,view:i}))}}}function bridgeSupports(e){var t=getEventBridge();return!!t&&includes(t.getCapabilities(),e)}function canUseEventBridge(e){var t;e===void 0&&(e=getGlobalObject().location?.hostname);var n=getEventBridge();return!!n&&n.getAllowedWebViewHosts().some(function(t){return e===t||endsWith$1(e,`.${t}`)})}function getEventBridgeGlobal(){return getGlobalObject().DatadogEventBridge}var PageExitReason={HIDDEN:`visibility_hidden`,UNLOADING:`before_unload`,PAGEHIDE:`page_hide`,FROZEN:`page_frozen`};function createPageExitObservable(e){return new Observable(function(t){var n=isExperimentalFeatureEnabled(ExperimentalFeature.PAGEHIDE),r=addEventListeners(e,window,[DOM_EVENT.VISIBILITY_CHANGE,DOM_EVENT.FREEZE,DOM_EVENT.PAGE_HIDE],function(e){e.type===DOM_EVENT.PAGE_HIDE&&n?t.notify({reason:PageExitReason.PAGEHIDE}):e.type===DOM_EVENT.VISIBILITY_CHANGE&&document.visibilityState===`hidden`?t.notify({reason:PageExitReason.HIDDEN}):e.type===DOM_EVENT.FREEZE&&t.notify({reason:PageExitReason.FROZEN})},{capture:!0}).stop,i=noop$1;return n||(i=addEventListener(e,window,DOM_EVENT.BEFORE_UNLOAD,function(){t.notify({reason:PageExitReason.UNLOADING})}).stop),function(){r(),i()}})}function isPageExitReason(e){return includes(objectValues(PageExitReason),e)}var Batch=function(){function e(e,t,n,r){var i=this;this.encoder=e,this.request=t,this.flushController=n,this.messageBytesLimit=r,this.upsertBuffer={},this.flushSubscription=this.flushController.flushObservable.subscribe(function(e){return i.flush(e)})}return e.prototype.add=function(e){this.addOrUpdate(e)},e.prototype.upsert=function(e,t){this.addOrUpdate(e,t)},e.prototype.stop=function(){this.flushSubscription.unsubscribe()},e.prototype.flush=function(e){var t=objectValues(this.upsertBuffer).join(`
125`);this.upsertBuffer={};var n=isPageExitReason(e.reason),r=n?this.request.sendOnExit:this.request.send;if(n&&this.encoder.isAsync){var i=this.encoder.finishSync();i.outputBytesCount&&r(formatPayloadFromEncoder(i,e));var a=[i.pendingData,t].filter(Boolean).join(`
126`);a&&r({data:a,bytesCount:computeBytesCount(a),flushReason:e.reason})}else t&&this.encoder.write(this.encoder.isEmpty?t:`
127${t}`),this.encoder.finish(function(t){r(formatPayloadFromEncoder(t,e))})},e.prototype.addOrUpdate=function(e,t){var n=jsonStringify(e),r=this.encoder.estimateEncodedBytesCount(n);if(r>=this.messageBytesLimit){display.warn(`Discarded a message whose size was bigger than the maximum allowed size ${this.messageBytesLimit}KB.`);return}this.hasMessageFor(t)&&this.remove(t),this.push(n,r,t)},e.prototype.push=function(e,t,n){var r=this;this.flushController.notifyBeforeAddMessage(t),n===void 0?this.encoder.write(this.encoder.isEmpty?e:`
128${e}`,function(e){r.flushController.notifyAfterAddMessage(e-t)}):(this.upsertBuffer[n]=e,this.flushController.notifyAfterAddMessage())},e.prototype.remove=function(e){var t=this.upsertBuffer[e];delete this.upsertBuffer[e];var n=this.encoder.estimateEncodedBytesCount(t);this.flushController.notifyAfterRemoveMessage(n)},e.prototype.hasMessageFor=function(e){return e!==void 0&&this.upsertBuffer[e]!==void 0},e}();function formatPayloadFromEncoder(e,t){return{data:typeof e.output==`string`?e.output:new Blob([e.output],{type:`text/plain`}),bytesCount:e.outputBytesCount,encoding:e.encoding,flushReason:t.reason}}function createFlushController(e){var t=e.messagesLimit,n=e.bytesLimit,r=e.durationLimit,i=e.pageExitObservable,a=e.sessionExpireOb
128servable,o=i.subscribe(function(e){return X(e.reason)}),c=a.subscribe(function(){return X(`session_expire`)}),u=new Observable(function(){return function(){o.unsubscribe(),c.unsubscribe()}}),K=0,Y=0;function X(e){if(Y!==0){var t=Y,n=K;Y=0,K=0,ce(),u.notify({reason:e,messagesCount:t,bytesCount:n})}}var ee;function te(){ee===void 0&&(ee=setTimeout$1(function(){X(`duration_limit`)},r))}function ce(){clearTimeout$1(ee),ee=void 0}return{flushObservable:u,get messagesCount(){return Y},notifyBeforeAddMessage:function(e){K+e>=n&&X(`bytes_limit`),Y+=1,K+=e,te()},notifyAfterAddMessage:function(e){e===void 0&&(e=0),K+=e,Y>=t?X(`messages_limit`):K>=n&&X(`bytes_limit`)},notifyAfterRemoveMessage:function(e){K-=e,--Y,Y===0&&ce()}}}function startBatchWithReplica(e,t,n,r,i,a){var o=u(e,t),c=n&&u(e,n);function u(e,t){var n=t.endpoint,o=t.encoder;return new Batch(o,createHttpRequest(e,n,e.batchBytesLimit,r),createFlushController({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageExitObservable:i,sessionExpireObservable:a}),e.messageBytesLimit)}return{flushObservable:o.flushController.flushObservable,add:function(e,t){t===void 0&&(t=!0),o.add(e),c&&t&&c.add(n.transformMessage?n.transformMessage(e):e)},upsert:function(e,t){o.upsert(e,t),c&&c.upsert(n.transformMessage?n.transformMessage(e):e,t)},stop:function(){o.stop(),c?.stop()}}}function createIdentityEncoder(){var e=``,t=0;return{isAsync:!1,get isEmpty(){return!e},write:function(n,r){var i=computeBytesCount(n);t+=i,e+=n,r&&r(i)},finish:function(e){e(this.finishSync())},finishSync:function(){var n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:``};return e=``,t=0,n},estimateEncodedBytesCount:function(e){return e.length}}}var AbstractLifeCycle=function(){function e(){this.callbacks={}}return e.prototype.notify=function(e,t){var n=this.callbacks[e];n&&n.forEach(function(e){return e(t)})},e.prototype.subscribe=function(e,t){var n=this;return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:function(){n.callbacks[e]=n.callbacks[e].filter(function(e){return t!==e})}}},e}();function createEventRateLimiter(e,t,n){var r=0,i=!1;return{isLimitReached:function(){if(r===0&&setTimeout$1(function(){r=0},ONE_MINUTE),r+=1,r<=t||i)return i=!1,!1;if(r===t+1){i=!0;try{n({message:`Reached max number of ${e}s by minute: ${t}`,source:ErrorSource.AGENT,startClocks:clocksNow()})}finally{i=!1}}return!0}}}function runOnReadyState(e,t,n){if(document.readyState===t||document.readyState===`complete`)n();else{var r=t===`complete`?DOM_EVENT.LOAD:DOM_EVENT.DOM_CONTENT_LOADED;addEventListener(e,window,r,n,{once:!0})}}var xhrObservable,xhrContexts=new WeakMap;function initXhrObservable(e){return xhrObservable||=createXhrObservable(e),xhrObservable}function createXhrObservable(e){return new Observable(function(t){var n=instrumentMethod(XMLHttpRequest.prototype,`open`,openXhr).stop,r=instrumentMethod(XMLHttpRequest.prototype,`send`,function(n){sendXhr(n,e,t)}).stop,i=instrumentMethod(XMLHttpRequest.prototype,`abort`,abortXhr).stop;return function(){n(),r(),i()}})}function openXhr(e){var t=e.target,n=e.parameters,r=n[0],i=n[1];xhrContexts.set(t,{state:`open`,method:String(r).toUpperCase(),url:normalizeUrl(String(i))})}function sendXhr(e,t,n){var r=e.target,i=xhrContexts.get(r);if(i){var a=i;a.state=`start`,a.startClocks=clocksNow(),a.isAborted=!1,a.xhr=r;var o=!1,c=instrumentMethod(r,`onreadystatechange`,function(){r.readyState===XMLHttpRequest.DONE&&u()}).stop,u=function(){if(K(),c(),!o){o=!0;var e=i;e.state=`complete`,e.duration=elapsed(a.startClocks.timeStamp,timeStampNow()),e.status=r.status,n.notify(shallowClone(e))}},K=addEventListener(t,r,`loadend`,u).stop;n.notify(a)}}function abortXhr(e){var t=e.target,n=xhrContexts.get(t);n&&(n.isAborted=!0)}var fetchObservable;function initFetchObservable(){return fetchObservable||=createFetchObservable(),fetchObservable}function createFetchObservable(){return new Observable(function(e){if(window.fetch)return instrumentMethod(window,`fetch`,function(t){return beforeSend(t,e)}).stop})}function beforeSend(e,t){var n=e.parameters,r=e.onPostCall,i=n[0],a=n[1],o=a&&a.method;o===void 0&&i instanceof Request&&(o=i.method);var c=o===void 0?`GET`:String(o).toUpperCase(),u=i instanceof Request?i.url:normalizeUrl(String(i)),K={state:`start`,init:a,input
128:i,method:c,startClocks:clocksNow(),url:u};t.notify(K),n[0]=K.input,n[1]=K.init,r(function(e){return afterSend(t,e,K)})}function afterSend(e,t,n){var r=function(t){var r=n;r.state=`resolve`,`stack`in t||t instanceof Error?(r.status=0,r.isAborted=t instanceof DOMException&&t.code===DOMException.ABORT_ERR,r.error=t):`status`in t&&(r.response=t,r.responseType=t.type,r.status=t.status,r.isAborted=!1),e.notify(r)};t.then(monitor(r),monitor(r))}var consoleObservablesByApi={};function initConsoleObservable(e){var t=e.map(function(e){return consoleObservablesByApi[e]||(consoleObservablesByApi[e]=createConsoleObservable(e)),consoleObservablesByApi[e]});return mergeObservables.apply(void 0,t)}function createConsoleObservable(e){return new Observable(function(t){var n=globalConsole[e];return globalConsole[e]=function(){var r=[...arguments];n.apply(console,r);var i=createHandlingStack();callMonitored(function(){t.notify(buildConsoleLog(r,e,i))})},function(){globalConsole[e]=n}})}function buildConsoleLog(e,t,n){var r=e.map(function(e){return formatConsoleParameters(e)}).join(` `),i,a,o;if(t===ConsoleApiName.error){var c=find$1(e,function(e){return e instanceof Error});i=c?toStackTraceString(computeStackTrace(c)):void 0,a=tryToGetFingerprint(c),o=c?flattenErrorCauses(c,`console`):void 0}return{api:t,message:r,stack:i,handlingStack:n,fingerprint:a,causes:o}}function formatConsoleParameters(e){return typeof e==`string`?sanitize(e):e instanceof Error?formatErrorMessage(computeStackTrace(e)):jsonStringify(sanitize(e),void 0,2)}var BUFFER_LIMIT=500,BoundedBuffer=function(){function e(){this.buffer=[]}return e.prototype.add=function(e){this.buffer.push(e)>BUFFER_LIMIT&&this.buffer.splice(0,1)},e.prototype.remove=function(e){removeItem(this.buffer,e)},e.prototype.drain=function(e){this.buffer.forEach(function(t){return t(e)}),this.buffer.length=0},e}();function createContextManager(e){var t={},n=new Observable,r={getContext:function(){return deepClone(t)},setContext:function(i){getType(i)===`object`?(t=sanitize(i),e.updateCustomerData(t)):r.clearContext(),n.notify()},setContextProperty:function(r,i){t[r]=sanitize(i),e.updateCustomerData(t),n.notify()},removeContextProperty:function(r){delete t[r],e.updateCustomerData(t),n.notify()},clearContext:function(){t={},e.resetCustomerData(),n.notify()},changeObservable:n};return r}var CONTEXT_STORE_KEY_PREFIX=`_dd_c`,storageListeners=[];function storeContextManager(e,t,n,r){var i=buildStorageKey(n,r);storageListeners.push(addEventListener(e,window,DOM_EVENT.STORAGE,function(e){i===e.key&&a()})),t.changeObservable.subscribe(o),t.setContext(combine(c(),t.getContext()));function a(){t.setContext(c())}function o(){localStorage.setItem(i,JSON.stringify(t.getContext()))}function c(){var e=localStorage.getItem(i);return e===null?{}:JSON.parse(e)}}function buildStorageKey(e,t){return`${CONTEXT_STORE_KEY_PREFIX}_${e}_${t}`}var CUSTOMER_DATA_BYTES_LIMIT=3*ONE_KIBI_BYTE,CUSTOMER_COMPRESSED_DATA_BYTES_LIMIT=16*ONE_KIBI_BYTE,BYTES_COMPUTATION_THROTTLING_DELAY=200;function createCustomerDataTrackerManager(e){e===void 0&&(e=2);var t=new Map,n=!1;function r(r){if(r===void 0&&(r=0),!(n||e===0)){var i=e===2?CUSTOMER_DATA_BYTES_LIMIT:CUSTOMER_COMPRESSED_DATA_BYTES_LIMIT,a=r;t.forEach(function(e){a+=e.getBytesCount()}),a>i&&(displayCustomerDataLimitReachedWarning(i),n=!0)}}return{createDetachedTracker:function(){var e=createCustomerDataTracker(function(){return r(e.getBytesCount())});return e},getOrCreateTracker:function(e){return t.has(e)||t.set(e,createCustomerDataTracker(r)),t.get(e)},setCompressionStatus:function(t){e===0&&(e=t,r())},getCompressionStatus:function(){return e},stop:function(){t.forEach(function(e){return e.stop()}),t.clear()}}}function createCustomerDataTracker(e){var t=0,n=throttle$2(function(n){t=computeBytesCount(jsonStringify(n)),e()},200),r=n.throttled,i=n.cancel,a=function(){i(),t=0};return{updateCustomerData:function(e){isEmptyObject$1(e)?a():r(e)},resetCustomerData:a,getBytesCount:function(){return t},stop:function(){i()}}}function displayCustomerDataLimitReachedWarning(e){display.warn(`Customer data exceeds the recommended ${e/ONE_KIBI_BYTE}KiB threshold. More details: https://docs.datadoghq.com/real_user_monitoring/browser/troubleshooting/#customer-data-exceeds-the-recommended-threshold-warning`)}function readBytesFromStream(e,t,n){var r=e.getReader(),i=[],a=0;o();function o(){r.read().then(monitor(function(e){if(e.done){c();return}n.collectStreamBody&&i.push(e.value),a+=e.value.length,a>n.bytesLimit?c():o()}),monitor(function(e){return t(e)}))}function c(){r.cancel().catch(noop$1);var e,o;if(n.collectStreamBody){var c;if(i.length===1)c=i[0];else{c=new Uint8Array(a);var u=0;
128i.forEach(function(e){c.set(e,u),u+=e.length})}e=c.slice(0,n.bytesLimit),o=c.length>n.bytesLimit}t(void 0,e,o)}}var SYNTHETICS_TEST_ID_COOKIE_NAME=`datadog-synthetics-public-id`,SYNTHETICS_RESULT_ID_COOKIE_NAME=`datadog-synthetics-result-id`,SYNTHETICS_INJECTS_RUM_COOKIE_NAME=`datadog-synthetics-injects-rum`;function willSyntheticsInjectRum(){return!!(window._DATADOG_SYNTHETICS_INJECTS_RUM||getInitCookie(`datadog-synthetics-injects-rum`))}function getSyntheticsTestId(){var e=window._DATADOG_SYNTHETICS_PUBLIC_ID||getInitCookie(`datadog-synthetics-public-id`);return typeof e==`string`?e:void 0}function getSyntheticsResultId(){var e=window._DATADOG_SYNTHETICS_RESULT_ID||getInitCookie(`datadog-synthetics-result-id`);return typeof e==`string`?e:void 0}function sanitizeUser(e){var t=assign({},e);return[`id`,`name`,`email`].forEach(function(e){e in t&&(t[e]=String(t[e]))}),t}function checkUser(e){var t=getType(e)===`object`;return t||display.error(`Unsupported user:`,e),t}function isMatchOption(e){var t=getType(e);return t===`string`||t===`function`||e instanceof RegExp}function matchList(e,t,n){return n===void 0&&(n=!1),e.some(function(e){try{if(typeof e==`function`)return e(t);if(e instanceof RegExp)return e.test(t);if(typeof e==`string`)return n?startsWith(t,e):e===t}catch(e){display.error(e)}return!1})}function buildCommonContext(e,t,n){return{context:e.getContext(),user:t.getContext(),hasReplay:n.isRecording()?!0:void 0}}function isTracingOption(e){var t=e;return getType(t)===`object`&&isMatchOption(t.match)&&Array.isArray(t.propagatorTypes)}function clearTracingIfNeeded(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function startTracer(e,t){return{clearTracingIfNeeded,traceFetch:function(n){return injectHeadersIfTracingAllowed(e,n,t,function(e){var t;if(n.input instanceof Request&&!n.init?.headers)n.input=new Request(n.input),Object.keys(e).forEach(function(t){n.input.headers.append(t,e[t])});else{n.init=shallowClone(n.init);var r=[];n.init.headers instanceof Headers?n.init.headers.forEach(function(e,t){r.push([t,e])}):Array.isArray(n.init.headers)?n.init.headers.forEach(function(e){r.push(e)}):n.init.headers&&Object.keys(n.init.headers).forEach(function(e){r.push([e,n.init.headers[e]])}),n.init.headers=r.concat(objectEntries(e))}})},traceXhr:function(n,r){return injectHeadersIfTracingAllowed(e,n,t,function(e){Object.keys(e).forEach(function(t){r.setRequestHeader(t,e[t])})})}}}function injectHeadersIfTracingAllowed(e,t,n,r){if(isTracingSupported()&&n.findTrackedSession()){var i=find$1(e.allowedTracingUrls,function(e){return matchList([e.match],t.url,!0)});i&&(t.traceId=new TraceIdentifier,t.spanId=new TraceIdentifier,t.traceSampled=!isNumber$1(e.traceSampleRate)||performDraw(e.traceSampleRate),r(makeTracingHeaders(t.traceId,t.spanId,t.traceSampled,i.propagatorTypes)))}}function isTracingSupported(){return getCrypto()!==void 0}function getCrypto(){return window.crypto||window.msCrypto}function makeTracingHeaders(e,t,n,r){var i={};return r.forEach(function(r){switch(r){case`datadog`:assign(i,{"x-datadog-origin":`rum`,"x-datadog-parent-id":t.toDecimalString(),"x-datadog-sampling-priority":n?`1`:`0`,"x-datadog-trace-id":e.toDecimalString()});break;case`tracecontext`:assign(i,{traceparent:`00-0000000000000000${e.toPaddedHexadecimalString()}-${t.toPaddedHexadecimalString()}-0${n?`1`:`0`}`});break;case`b3`:assign(i,{b3:`${e.toPaddedHexadecimalString()}-${t.toPaddedHexadecimalString()}-${n?`1`:`0`}`});break;case`b3multi`:assign(i,{"X-B3-TraceId":e.toPaddedHexadecimalString(),"X-B3-SpanId":t.toPaddedHexadecimalString(),"X-B3-Sampled":n?`1`:`0`})}}),i}var TraceIdentifier=function(){function e(){this.buffer=new Uint8Array(8),getCrypto().getRandomValues(this.buffer),this.buffer[0]=this.buffer[0]&127}return e.prototype.toString=function(e){var t=this.readInt32(0),n=this.readInt32(4),r=``;do{var i=t%e*4294967296+n;t=Math.floor(t/e),n=Math.floor(i/e),r=(i%e).toString(e)+r}while(t||n);return r},e.prototype.toDecimalString=function(){return this.toString(10)},e.prototype.toPaddedHexadecimalString=function(){var e=this.toString(16);return Array(17-e.length).join(`0`)+e},e.prototype.readInt32=function(e){return this.buffer[e]*16777216+(this.buffer[e+1]<<16)+(this.buffer[e+2]<<8)+this.buffer[e+3]},e}(),DEFAULT_PROPAGATOR_TYPES=[`tracecontext`,`datadog`];function validateAndBuildRumConfiguration(e){var t,n;if(!e.applicationId){display.error(`Application ID is not configured, no RUM data will be collected.`);return}if(e.sessionReplaySampleRate!==void 0&&!isPercentage(e.sessionReplaySampleRate)){display.error(`Session Replay Sample Rate should be a number between 0 and 100`);return}if(e.traceSampleRate!==void 0&&!isPercentage(e.traceSampleRate)){display.error(`Trace Sample Rate should be a number between 0 and 100`);return}if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){display.error(`Excluded A
128ctivity Urls should be an array`);return}var r=validateAndBuildTracingOptions(e);if(r){var i=validateAndBuildConfiguration(e);if(i)return assign({applicationId:e.applicationId,version:e.version,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:e.sessionReplaySampleRate??0,startSessionReplayRecordingManually:!!e.startSessionReplayRecordingManually,traceSampleRate:e.traceSampleRate,allowedTracingUrls:r,excludedActivityUrls:e.excludedActivityUrls??[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!e.trackUserInteractions,trackViewsManually:!!e.trackViewsManually,trackResources:!!e.trackResources,trackLongTasks:!!e.trackLongTasks,subdomain:e.subdomain,defaultPrivacyLevel:objectHasValue(DefaultPrivacyLevel,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:DefaultPrivacyLevel.MASK,customerDataTelemetrySampleRate:1},i)}}function validateAndBuildTracingOptions(e){if(e.allowedTracingUrls!==void 0){if(!Array.isArray(e.allowedTracingUrls)){display.error(`Allowed Tracing URLs should be an array`);return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){display.error(`Service needs to be configured when tracing is enabled`);return}var t=[];return e.allowedTracingUrls.forEach(function(e){isMatchOption(e)?t.push({match:e,propagatorTypes:DEFAULT_PROPAGATOR_TYPES}):isTracingOption(e)?t.push(e):display.warn(`Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter`,e)}),t}return[]}function getSelectedTracingPropagators(e){var t=new Set;return Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0&&e.allowedTracingUrls.forEach(function(e){isMatchOption(e)?DEFAULT_PROPAGATOR_TYPES.forEach(function(e){return t.add(e)}):getType(e)===`object`&&Array.isArray(e.propagatorTypes)&&e.propagatorTypes.forEach(function(e){return t.add(e)})}),arrayFrom(t)}function serializeRumConfiguration(e){var t=serializeConfiguration(e);return assign({session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0,selected_tracing_propagators:getSelectedTracingPropagators(e),default_privacy_level:e.defaultPrivacyLevel,use_excluded_activity_urls:Array.isArray(e.excludedActivityUrls)&&e.excludedActivityUrls.length>0,use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks},t)}function createPreStartStrategy(e,t,n,r){var i=e.ignoreInitIfSyntheticsWillInjectRum,a=e.startDeflateWorker,o=new BoundedBuffer,c,u,K,Y,X=n.observable.subscribe(ee);function ee(){if(K&&Y&&n.isGranted()){X.unsubscribe();var e;if(Y.trackViewsManually){if(!c)return;o.remove(c.callback),e=c.options}var t=r(K,Y,u,e);o.drain(t)}}return{init:function(e){if(!e){display.error(`Missing configuration`);return}var t=canUseEventBridge();if(t&&(e=overrideInitConfigurationForBridge(e)),K=e,Y){displayAlreadyInitializedError(`DD_RUM`,e);return}if(!(i&&willSyntheticsInjectRum())){var r=validateAndBuildRumConfiguration(e);if(r){if(!t&&!r.sessionStoreStrategyType){display.warn(`No storage available for session. We will not send any data.`);return}r.compressIntakeRequests&&!t&&a&&(u=a(r,`Datadog RUM`,noop$1),!u)||(Y=r,n.tryToInit(r.trackingConsent),ee())}}},get initConfiguration(){return K},getInternalContext:noop$1,stopSession:noop$1,addTiming:function(e,t){t===void 0&&(t=timeStampNow()),o.add(function(n){return n.addTiming(e,t)})},startView:function(e,t){t===void 0&&(t=clocksNow());var n=function(n){n.startView(e,t)};o.add(n),c||(c={options:e,callback:n},ee())}
128,addAction:function(e,n){n===void 0&&(n=t()),o.add(function(t){return t.addAction(e,n)})},addError:function(e,n){n===void 0&&(n=t()),o.add(function(t){return t.addError(e,n)})},addFeatureFlagEvaluation:function(e,t){o.add(function(n){return n.addFeatureFlagEvaluation(e,t)})},startDurationVital:function(e){o.add(function(t){return t.startDurationVital(e)})},stopDurationVital:function(e){o.add(function(t){return t.stopDurationVital(e)})}}}function overrideInitConfigurationForBridge(e){var t,n;return assign({},e,{applicationId:`00000000-aaaa-0000-aaaa-000000000000`,clientToken:`empty`,sessionSampleRate:100,defaultPrivacyLevel:e.defaultPrivacyLevel??getEventBridge()?.getPrivacyLevel()})}var RUM_STORAGE_KEY=`rum`;function makeRumPublicApi(e,t,n){n===void 0&&(n={});var r=createCustomerDataTrackerManager(0),i=createContextManager(r.getOrCreateTracker(2)),a=createContextManager(r.getOrCreateTracker(1)),o=createTrackingConsentState();function c(){return buildCommonContext(i,a,t)}var u=createPreStartStrategy(n,c,o,function(K,X,ee,te){isExperimentalFeatureEnabled(ExperimentalFeature.CUSTOM_VITALS)&&(Y.startDurationVital=monitor(function(e,t){u.startDurationVital({name:sanitize(e),startClocks:t?.startTime?timeStampToClocks(t.startTime):clocksNow(),context:sanitize(t?.context)})}),Y.stopDurationVital=monitor(function(e,t){u.stopDurationVital({name:sanitize(e),stopClocks:t?.stopTime?timeStampToClocks(t.stopTime):clocksNow(),context:sanitize(t?.context)})})),K.storeContextsAcrossPages&&(storeContextManager(X,i,RUM_STORAGE_KEY,2),storeContextManager(X,a,RUM_STORAGE_KEY,1)),r.setCompressionStatus(ee?1:2);var ce=e(K,X,t,r,c,te,ee&&n.createDeflateEncoder?function(e){return n.createDeflateEncoder(X,ee,e)}:createIdentityEncoder,o);return t.onRumStart(ce.lifeCycle,X,ce.session,ce.viewContexts,ee),u=createPostStartStrategy(K,ce),ce}),K=monitor(function(e){var t=typeof e==`object`?e:{name:e};u.startView(t)}),Y=makePublicApi({init:monitor(function(e){return u.init(e)}),setTrackingConsent:monitor(function(e){return o.update(e)}),setGlobalContextProperty:monitor(function(e,t){return i.setContextProperty(e,t)}),removeGlobalContextProperty:monitor(function(e){return i.removeContextProperty(e)}),getGlobalContext:monitor(function(){return i.getContext()}),setGlobalContext:monitor(function(e){return i.setContext(e)}),clearGlobalContext:monitor(function(){return i.clearContext()}),getInternalContext:monitor(function(e){return u.getInternalContext(e)}),getInitConfiguration:monitor(function(){return deepClone(u.initConfiguration)}),addAction:monitor(function(e,t){u.addAction({name:sanitize(e),context:sanitize(t),startClocks:clocksNow(),type:`custom`})}),addError:function(e,t){var n=createHandlingStack();callMonitored(function(){u.addError({error:e,handlingStack:n,context:sanitize(t),startClocks:clocksNow()})})},addTiming:monitor(function(e,t){u.addTiming(sanitize(e),t)}),setUser:monitor(function(e){checkUser(e)&&a.setContext(sanitizeUser(e))}),getUser:monitor(function(){return a.getContext()}),setUserProperty:monitor(function(e,t){var n,r=sanitizeUser((n={},n[e]=t,n))[e];a.setContextProperty(e,r)}),removeUserProperty:monitor(function(e){return a.removeContextProperty(e)}),clearUser:monitor(function(){return a.clearContext()}),startView:K,stopSession:monitor(function(){u.stopSession()}),addFeatureFlagEvaluation:monitor(function(e,t){u.addFeatureFlagEvaluation(sanitize(e),sanitize(t))}),getSessionReplayLink:monitor(function(){return t.getSessionReplayLink()}),startSessionReplayRecording:monitor(function(){return t.start()}),stopSessionReplayRecording:monitor(function(){return t.stop()})});return Y}function createPostStartStrategy(e,t){return assign({init:function(e){displayAlreadyInitializedError(`DD_RUM`,e)},initConfiguration:e},t)}function createDOMMutationObservable(){var e=getMutationObserverConstructor();return new Observable(function(t){if(e){var n=new e(monitor(function(){return t.notify()}));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),function(){return n.disconnect()}}})}function getMutationObserverConstructor(){var e,t=window;if(t.Zone&&(e=getZoneJsOriginalValue(t,`MutationObserver`),t.MutationObserver&&e===t.MutationObserver)){var n=getZoneJsOriginalValue(new t.MutationObserver(noop$1),`originalInstance`);e=n&&n.constructor}return e||=t.MutationObserver,e}var FAKE_INITIAL_DOCUMENT=`initial_document`,RESOURCE_TYPES=[[`document`,function(e){return FAKE_INITIAL_DOCUMENT===e}],[`xhr`,function(e){return e===`xmlhttprequest`}],[`fetch`,function(e){return e===`fetch`}],[`beacon`,function(e){return e===`beacon`}],[`css`,function(e,t){return/\.css$/i.test(t)}],[`js`,function(e,t){return/\.js$/i.test(t)}],[`image`,function(e,t){return includes([`image`,`img`,`icon`],e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null}],[`font`,function(e,t){return/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null}],[`media`,function(e,t){return includes([`audio`,`video`],e)||/\.(mp3|mp4)$/i.exec(t)!==null}]];function computeResourceKind(e){var t=e.name;if(!isValidUrl(t))return addTelemetryDebug(`Failed to construct URL for "${e.name}"`),`other`;for(var n=getPathName(t),r=0,i=RESOURCE_TYPES;r<i.length;r++){var a=i[r],o=a[0],c=a[1];if(c(e.initiatorType,n))return o}return`other`}function areInOrder(){for(var e=[...arguments],t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function isRequestKind(e){return e.initiatorType===`xmlhttprequest`||e.initiatorType===`fetch`}function computePerformanceResourceDuration(e){var t=e.duration,n=e.startTime,r=e.responseEnd;return toServerDuration(t===0&&n<r?elapsed(n,r):t)}function computePerformanceResourceDetails(e){var t=toValidEntry(e);if(t){var n=t.startTime,r=t.fetchStart,i=t.redirectStart,a=t.redirectEnd,o=t.domainLookupStart,c=t.domainLookupEnd,u=t.connectStart,K=t.secureConnectionStart,Y=t.connectEnd,X=t.requestStart,ee=t.responseStart,te=t.responseEnd,ce={download:formatTiming(n,ee,te),first_byte:formatTiming(n,X,ee)};return Y!==r&&(ce.connect=formatTiming(n,u,Y),areInOrder(u,K,Y)&&(ce.ssl=formatTiming(n,K,Y))),c!==r&&(ce.dns=formatTiming(n,o,c)),hasRedirection(e)&&(ce.redirect=formatTiming(n,i,a)),ce}}
128function toValidEntry(e){if(areInOrder(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd)){if(!hasRedirection(e))return e;var t=e.redirectStart,n=e.redirectEnd;if(t<e.startTime&&(t=e.startTime),n<e.startTime&&(n=e.fetchStart),areInOrder(e.startTime,t,n,e.fetchStart))return assign({},e,{redirectEnd:n,redirectStart:t})}}function hasRedirection(e){return e.fetchStart!==e.startTime}function formatTiming(e,t,n){return{duration:toServerDuration(elapsed(t,n)),start:toServerDuration(elapsed(e,t))}}function computeSize(e){if(e.startTime<e.responseStart)return e.decodedBodySize}function isAllowedRequestUrl(e,t){return t&&!e.isIntakeUrl(t)}function isTextNode(e){return e.nodeType===Node.TEXT_NODE}function isCommentNode(e){return e.nodeType===Node.COMMENT_NODE}function isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}function isNodeShadowHost(e){return isElementNode(e)&&!!e.shadowRoot}function isNodeShadowRoot(e){var t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&isElementNode(t.host)}function hasChildNodes(e){return e.childNodes.length>0||isNodeShadowHost(e)}function forEachChildNodes(e,t){e.childNodes.forEach(t),isNodeShadowHost(e)&&t(e.shadowRoot)}function getParentNode(e){return isNodeShadowRoot(e)?e.host:e.parentNode}var INITIAL_DOCUMENT_OUTDATED_TRACE_ID_THRESHOLD=2*ONE_MINUTE;function getDocumentTraceId(e){var t=getDocumentTraceDataFromMeta(e)||getDocumentTraceDataFromComment(e);if(!(!t||t.traceTime<=dateNow()-INITIAL_DOCUMENT_OUTDATED_TRACE_ID_THRESHOLD))return t.traceId}function getDocumentTraceDataFromMeta(e){var t=e.querySelector(`meta[name=dd-trace-id]`),n=e.querySelector(`meta[name=dd-trace-time]`);return createDocumentTraceData(t&&t.content,n&&n.content)}function getDocumentTraceDataFromComment(e){var t=findTraceComment(e);if(t)return createDocumentTraceData(findCommaSeparatedValue(t,`trace-id`),findCommaSeparatedValue(t,`trace-time`))}function createDocumentTraceData(e,t){var n=t&&Number(t);if(e&&n)return{traceId:e,traceTime:n}}function findTraceComment(e){for(var t=0;t<e.childNodes.length;t+=1){var n=getTraceCommentFromNode(e.childNodes[t]);if(n)return n}if(e.body)for(var t=e.body.childNodes.length-1;t>=0;--t){var r=e.body.childNodes[t],n=getTraceCommentFromNode(r);if(n)return n;if(!isTextNode(r))break}}function getTraceCommentFromNode(e){if(e&&isCommentNode(e)){var t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}var RumPerformanceEntryType;(function(e){e.EVENT=`event`,e.FIRST_INPUT=`first-input`,e.LARGEST_CONTENTFUL_PAINT=`largest-contentful-paint`,e.LAYOUT_SHIFT=`layout-shift`,e.LONG_TASK=`longtask`,e.NAVIGATION=`navigation`,e.PAINT=`paint`,e.RESOURCE=`resource`})(RumPerformanceEntryType||={});function supportPerformanceObject(){return window.performance!==void 0&&`getEntries`in performance}function supportPerformanceTimingEvent(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function startPerformanceCollection(e,t){var n=[];if(retrieveInitialDocumentResourceTiming(t,function(n){handleRumPerformanceEntries(e,t,[n])}),supportPerformanceObject()){var r=performance.getEntries();setTimeout$1(function(){return handleRumPerformanceEntries(e,t,r)})}if(window.PerformanceObserver){var i=monitor(function(n){return handleRumPerformanceEntries(e,t,n.getEntries())}),a=[RumPerformanceEntryType.RESOURCE,RumPerformanceEntryType.NAVIGATION,RumPerformanceEntryType.LONG_TASK,RumPerformanceEntryType.PAINT],o=[RumPerformanceEntryType.LARGEST_CONTENTFUL_PAINT,RumPerformanceEntryType.FIRST_INPUT,RumPerformanceEntryType.LAYOUT_SHIFT,RumPerformanceEntryType.EVENT];try{o.forEach(function(e){var t=new window.PerformanceObserver(i);t.observe({type:e,buffered:!0,durationThreshold:40}),n.push(function(){return t.disconnect()})})}catch{a.push.apply(a,o)}var c=new PerformanceObserver(i);if(c.observe({entryTypes:a}),n.push(function(){return c.disconnect()}),supportPerformanceObject()&&`addEventListener`in performance){var u=addEventListener(t,performance,`resourcetimingbufferfull`,function(){performance.clearResourceTimings()}).stop;n.push(u)}}if(supportPerformanceTimingEvent(RumPerformanceEntryType.NAVIGATION)||retrieveNavigationTiming(t,function(n){handleRumPerformanceEntries(e,t,[n])}),!supportPerformanceTimingEvent(RumPerformanceEntryType.FIRST_INPUT)){var K=retrieveFirstInputTiming(t,function(n){handleRumPerformanceEntries(e,t,[n])}).stop;n.push(K)}
128return{stop:function(){n.forEach(function(e){return e()})}}}function retrieveInitialDocumentResourceTiming(e,t){runOnReadyState(e,`interactive`,function(){var e,n={entryType:RumPerformanceEntryType.RESOURCE,initiatorType:FAKE_INITIAL_DOCUMENT,traceId:getDocumentTraceId(document),toJSON:function(){return assign({},e,{toJSON:void 0})}};if(supportPerformanceTimingEvent(RumPerformanceEntryType.NAVIGATION)&&performance.getEntriesByType(RumPerformanceEntryType.NAVIGATION).length>0){var r=performance.getEntriesByType(RumPerformanceEntryType.NAVIGATION)[0];e=assign(r.toJSON(),n)}else{var i=computeRelativePerformanceTiming();e=assign(i,{decodedBodySize:0,duration:i.responseEnd,name:window.location.href,startTime:0},n)}t(e)})}function retrieveNavigationTiming(e,t){function n(){t(assign(computeRelativePerformanceTiming(),{entryType:RumPerformanceEntryType.NAVIGATION}))}runOnReadyState(e,`complete`,function(){setTimeout$1(n)})}function retrieveFirstInputTiming(e,t){var n=dateNow(),r=!1,i=addEventListeners(e,window,[DOM_EVENT.CLICK,DOM_EVENT.MOUSE_DOWN,DOM_EVENT.KEY_DOWN,DOM_EVENT.TOUCH_START,DOM_EVENT.POINTER_DOWN],function(t){if(t.cancelable){var n={entryType:RumPerformanceEntryType.FIRST_INPUT,processingStart:relativeNow(),processingEnd:relativeNow(),startTime:t.timeStamp,duration:0,name:``};t.type===DOM_EVENT.POINTER_DOWN?a(e,n):o(n)}},{passive:!0,capture:!0}).stop;return{stop:i};function a(e,t){addEventListeners(e,window,[DOM_EVENT.POINTER_UP,DOM_EVENT.POINTER_CANCEL],function(e){e.type===DOM_EVENT.POINTER_UP&&o(t)},{once:!0})}function o(e){if(!r){r=!0,i();var a=e.processingStart-e.startTime;a>=0&&a<dateNow()-n&&t(e)}}}function computeRelativePerformanceTiming(){var e={},t=performance.timing;for(var n in t)if(isNumber$1(t[n])){var r=n,i=t[r];e[r]=i===0?0:getRelativeTime(i)}return e}function handleRumPerformanceEntries(e,t,n){var r=n.filter(function(e){return objectHasValue(RumPerformanceEntryType,e.entryType)}).filter(function(e){return!isIncompleteNavigation(e)&&!isForbiddenResource(t,e)});r.length&&e.notify(0,r)}function isIncompleteNavigation(e){return e.entryType===RumPerformanceEntryType.NAVIGATION&&e.loadEventEnd<=0}function isForbiddenResource(e,t){return t.entryType===RumPerformanceEntryType.RESOURCE&&!isAllowedRequestUrl(e,t.name)}function getSyntheticsContext(){var e=getSyntheticsTestId(),t=getSyntheticsResultId();if(e&&t)return{test_id:e,result_id:t,injected:willSyntheticsInjectRum()}}function getCiTestContext(){var e,t=window.Cypress?.env(`traceId`);if(typeof t==`string`)return{test_execution_id:t}}function limitModification(e,t,n){var r=deepClone(e),i=n(r);return objectEntries(t).forEach(function(t){var n=t[0],i=t[1],a=get$1(r,n),o=getType(a);o===i?set(e,n,sanitize(a)):i===`object`&&(o===`undefined`||o===`null`)&&set(e,n,{})}),i}function get$1(e,t){for(var n=e,r=0,i=t.split(`.`);r<i.length;r++){var a=i[r];if(!isValidObjectContaining(n,a))return;n=n[a]}return n}function set(e,t,n){for(var r=e,i=t.split(`.`),a=0;a<i.length;a+=1){var o=i[a];if(!isValidObject(r))return;a===i.length-1?r[o]=n:r=r[o]}}function isValidObject(e){return getType(e)===`object`}function isValidObjectContaining(e,t){return isValidObject(e)&&Object.prototype.hasOwnProperty.call(e,t)}var VIEW_MODIFIABLE_FIELD_PATHS={"view.name":`string`,"view.url":`string`,"view.referrer":`string`},USER_CUSTOMIZABLE_FIELD_PATHS={context:`object`},modifiableFieldPathsByEvent;function startRumAssembly(e,t,n,r,i,a,o,c,u){var K,Y;modifiableFieldPathsByEvent=(K={},K.view=VIEW_MODIFIABLE_FIELD_PATHS,K.error=assign({"error.message":`string`,"error.stack":`string`,"error.resource.url":`string`,"error.fingerprint":`string`},USER_CUSTOMIZABLE_FIELD_PATHS,VIEW_MODIFIABLE_FIELD_PATHS),K.resource=assign({"resource.url":`string`},isExperimentalFeatureEnabled(ExperimentalFeature.WRITABLE_RESOURCE_GRAPHQL)&&{"resource.graphql":`object`},USER_CUSTOMIZABLE_FIELD_PATHS,VIEW_MODIFIABLE_FIELD_PATHS),K.action=assign({"action.target.name":`string`},USER_CUSTOMIZABLE_FIELD_PATHS,VIEW_MODIFIABLE_FIELD_PATHS),K.long_task=assign({},USER_CUSTOMIZABLE_FIELD_PATHS,VIEW_MODIFIABLE_FIELD_PATHS),K.vital=assign({},USER_CUSTOMIZABLE_FIELD_PATHS,VIEW_MODIFIABLE_FIELD_PATHS),K);var X=(Y={},Y.error=createEventRateLimiter(`error`,e.eventRateLimiterThreshold,u),Y.action=createEventRateLimiter(`action`,e.eventRateLimiterThreshold,u),Y.vital=createEventRateLimiter(`vital`,e.eventRateLimiterThreshold,u),Y),ee=getSyntheticsContext(),te=getCiTestContext();t.subscribe(12,function(u){var K=u.startTime,Y=u.rawRumEvent,ce=u.domainContext,ue=u.savedCommonContext,de
128=u.customerContext,fe=r.findView(K),me=i.findUrl(K),ge=n.findTrackedSession(K);if(ge&&fe&&me){var Te=ue||c(),Oe=a.findActionId(K),Ae=combine({_dd:{format_version:2,drift:currentDrift(),configuration:{session_sample_rate:round(e.sessionSampleRate,3),session_replay_sample_rate:round(e.sessionReplaySampleRate,3)},browser_sdk_version:canUseEventBridge()?`5.11.0`:void 0},application:{id:e.applicationId},date:timeStampNow(),service:fe.service||e.service,version:fe.version||e.version,source:`browser`,session:{id:ge.id,type:ee?`synthetics`:te?`ci_test`:`user`},view:{id:fe.id,name:fe.name,url:me.url,referrer:me.referrer},action:needToAssembleWithAction(Y)&&Oe?{id:Oe}:void 0,synthetics:ee,ci_test:te,display:o.get(),connectivity:getConnectivity()},Y);Ae.context=combine(Te.context,de),`has_replay`in Ae.session||(Ae.session.has_replay=Te.hasReplay),Ae.type===`view`&&(Ae.session.sampled_for_replay=ge.sessionReplayAllowed),isEmptyObject$1(Te.user)||(Ae.usr=Te.user),shouldSend(Ae,e.beforeSend,ce,X)&&(isEmptyObject$1(Ae.context)&&delete Ae.context,t.notify(13,Ae))}})}function shouldSend(e,t,n,r){var i;if(t){var a=limitModification(e,modifiableFieldPathsByEvent[e.type],function(e){return t(e,n)});if(a===!1&&e.type!==`view`)return!1;a===!1&&display.warn(`Can't dismiss view events using beforeSend!`)}return!r[e.type]?.isLimitReached()}function needToAssembleWithAction(e){return[`error`,`resource`,`long_task`].indexOf(e.type)!==-1}function startInternalContext(e,t,n,r,i){return{get:function(a){var o=n.findView(a),c=i.findUrl(a),u=t.findTrackedSession(a);if(u&&o&&c){var K=r.findActionId(a);return{application_id:e,session_id:u.id,user_action:K?{id:K}:void 0,view:{id:o.id,name:o.name,referrer:c.referrer,url:c.url}}}}}}var LifeCycle=AbstractLifeCycle,VIEW_CONTEXT_TIME_OUT_DELAY=SESSION_TIME_OUT_DELAY;function startViewContexts(e){var t=new ValueHistory(VIEW_CONTEXT_TIME_OUT_DELAY);e.subscribe(2,function(e){t.add(n(e),e.startClocks.relative)}),e.subscribe(6,function(e){var n=e.endClocks;t.closeActive(n.relative)}),e.subscribe(10,function(){t.reset()});function n(e){return{service:e.service,version:e.version,id:e.id,name:e.name,startClocks:e.startClocks}}return{findView:function(e){return t.find(e)},stop:function(){t.stop()}}}var nextRequestIndex=1;function startRequestCollection(e,t,n){var r=startTracer(t,n);trackXhr(e,t,r),trackFetch(e,t,r)}function trackXhr(e,t,n){var r=initXhrObservable(t).subscribe(function(r){var i=r;if(isAllowedRequestUrl(t,i.url))switch(i.state){case`start`:n.traceXhr(i,i.xhr),i.requestIndex=getNextRequestIndex(),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case`complete`:n.clearTracingIfNeeded(i),e.notify(8,{duration:i.duration,method:i.method,requestIndex:i.requestIndex,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:`xhr`,url:i.url,xhr:i.xhr})}});return{stop:function(){return r.unsubscribe()}}}function trackFetch(e,t,n){var r=initFetchObservable().subscribe(function(r){var i=r;if(isAllowedRequestUrl(t,i.url))switch(i.state){case`start`:n.traceFetch(i),i.requestIndex=getNextRequestIndex(),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case`resolve`:waitForResponseToComplete(i,function(t){n.clearTracingIfNeeded(i),e.notify(8,{duration:t,method:i.method,requestIndex:i.requestIndex,responseType:i.responseType,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:`fetch`,url:i.url,response:i.response,init:i.init,input:i.input})})}});return{stop:function(){return r.unsubscribe()}}}function getNextRequestIndex(){var e=nextRequestIndex;return nextRequestIndex+=1,e}function waitForResponseToComplete(e,t){var n=e.response&&tryToClone(e.response);!n||!n.body?t(elapsed(e.startClocks.timeStamp,timeStampNow())):readBytesFromStream(n.body,function(){t(elapsed(e.startClocks.timeStamp,timeStampNow()))},{bytesLimit:1/0,collectStreamBody:!1})}function trackEventCounts(e){var t=e.lifeCycle,n=e.isChildEvent,r=e.onChange,i=r===void 0?noop$1:r,a={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=t.subscribe(13,function(e){var t;if(e.type!==`view`&&e.type!==`vital`&&n(e))switch(e.type){case`error`:a.errorCount+=1,i();break;case`action`:a.actionCount+=1,e.action.frustration&&(a.frustrationCount+=e.action.frustration.type.length),i();break;case`long_task`:a.longTaskCount+=1,i();break;case`resource`:e._dd?.discarded||(a.resourceCount+=1,i())}});return{stop:function(){o.unsubscribe()},eventCounts:a}}var PAGE_ACTIVITY_VALIDATION_DELAY=100,PAGE_ACTIVITY_END_DELAY=100;function waitPageActivityEnd(e,t,n,r,i){return doWaitPageActivityEnd(createPageActivityObservable(e,t,n),r,i)}
128function doWaitPageActivityEnd(e,t,n){var r,i=!1,a=setTimeout$1(monitor(function(){return K({hadActivity:!1})}),100),o=n===void 0?void 0:setTimeout$1(monitor(function(){return K({hadActivity:!0,end:timeStampNow()})}),n),c=e.subscribe(function(e){var t=e.isBusy;clearTimeout$1(a),clearTimeout$1(r);var n=timeStampNow();t||(r=setTimeout$1(monitor(function(){return K({hadActivity:!0,end:n})}),100))}),u=function(){i=!0,clearTimeout$1(a),clearTimeout$1(r),clearTimeout$1(o),c.unsubscribe()};function K(e){i||(u(),t(e))}return{stop:u}}function createPageActivityObservable(e,t,n){return new Observable(function(r){var i=[],a,o=0;i.push(t.subscribe(u),e.subscribe(0,function(e){e.some(function(e){return e.entryType===RumPerformanceEntryType.RESOURCE&&!isExcludedUrl(n,e.name)})&&u()}),e.subscribe(7,function(e){isExcludedUrl(n,e.url)||(a===void 0&&(a=e.requestIndex),o+=1,u())}),e.subscribe(8,function(e){isExcludedUrl(n,e.url)||a===void 0||e.requestIndex<a||(--o,u())}));var c=trackWindowOpen(u).stop;return function(){c(),i.forEach(function(e){return e.unsubscribe()})};function u(){r.notify({isBusy:o>0})}})}function isExcludedUrl(e,t){return matchList(e.excludedActivityUrls,t)}function trackWindowOpen(e){return instrumentMethod(window,`open`,e)}var DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE=`data-dd-action-name`;function getActionNameFromElement(e,t){return getActionNameFromElementProgrammatically(e,`data-dd-action-name`)||t&&getActionNameFromElementProgrammatically(e,t)||getActionNameFromElementForStrategies(e,t,priorityStrategies)||getActionNameFromElementForStrategies(e,t,fallbackStrategies)||``}function getActionNameFromElementProgrammatically(e,t){var n;if(supportsElementClosest())n=e.closest(`[${t}]`);else for(var r=e;r;){if(r.hasAttribute(t)){n=r;break}r=r.parentElement}if(n)return truncate(normalizeWhitespace(n.getAttribute(t).trim()))}var priorityStrategies=[function(e,t){if(supportsLabelProperty()){if(`labels`in e&&e.labels&&e.labels.length>0)return getTextualContent(e.labels[0],t)}else if(e.id){var n=e.ownerDocument&&find$1(e.ownerDocument.querySelectorAll(`label`),function(t){return t.htmlFor===e.id});return n&&getTextualContent(n,t)}},function(e){if(e.nodeName===`INPUT`){var t=e,n=t.getAttribute(`type`);if(n===`button`||n===`submit`||n===`reset`)return t.value}},function(e,t){if(e.nodeName===`BUTTON`||e.nodeName===`LABEL`||e.getAttribute(`role`)===`button`)return getTextualContent(e,t)},function(e){return e.getAttribute(`aria-label`)},function(e,t){var n=e.getAttribute(`aria-labelledby`);if(n)return n.split(/\s+/).map(function(t){return getElementById(e,t)}).filter(function(e){return!!e}).map(function(e){return getTextualContent(e,t)}).join(` `)},function(e){return e.getAttribute(`alt`)},function(e){return e.getAttribute(`name`)},function(e){return e.getAttribute(`title`)},function(e){return e.getAttribute(`placeholder`)},function(e,t){if(`options`in e&&e.options.length>0)return getTextualContent(e.options[0],t)}],fallbackStrategies=[function(e,t){return getTextualContent(e,t)}],MAX_PARENTS_TO_CONSIDER=10;function getActionNameFromElementForStrategies(e,t,n){for(var r=e,i=0;i<=MAX_PARENTS_TO_CONSIDER&&r&&r.nodeName!==`BODY`&&r.nodeName!==`HTML`&&r.nodeName!==`HEAD`;){for(var a=0,o=n;a<o.length;a++){var c=o[a],u=c(r,t);if(typeof u==`string`){var K=u.trim();if(K)return truncate(normalizeWhitespace(K))}}if(r.nodeName===`FORM`)break;r=r.parentElement,i+=1}}function normalizeWhitespace(e){return e.replace(/\s+/g,` `)}function truncate(e){return e.length>100?`${safeTruncate(e,100)} [...]`:e}function getElementById(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}function getTextualContent(e,t){if(!e.isContentEditable){if(`innerText`in e){var n=e.innerText,r=function(t){for(var r=e.querySelectorAll(t),i=0;i<r.length;i+=1){var a=r[i];if(`innerText`in a){var o=a.innerText;o&&o.trim().length>0&&(n=n.replace(o,``))}}};return supportsInnerTextScriptAndStyleRemoval()||r(`script, style`),r(`[${DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE}]`),t&&r(`[${t}]`),n}return e.textContent}}function supportsInnerTextScriptAndStyleRemoval(){return!isIE()}var supportsLabelPropertyResult;function supportsLabelProperty(){return supportsLabelPropertyResult===void 0&&(supportsLabelPropertyResult=`labels`in HTMLInputElement.prototype),supportsLabelPropertyResult}var supportsElementClosestResult;function supportsElementClosest(){return supportsElementClosestResult===void 0&&(supportsElementClosestResult=`closest`in HTMLElement.prototype),supportsElementClosestResult}var STABLE_ATTRIBUTES=[DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE,`data-testid`,`data-test`,`data-qa`,`data-cy`,`data-test-id`,`data-qa-id`,`data-testing`,`data-component`,`data-element`,`data-source-file`],GLOBALLY_UNIQUE_SELECTOR_GETTERS=[getStableAttributeSelector,getIDSelector],UNIQUE_AMONG_CHILDREN_SELECTOR_GETTERS=[getStableAttributeSelector,getClassSelector,getTagNameSelector];function getSelectorFromElement(e,t){for(var n=``,r=e;
128r&&r.nodeName!==`HTML`;){var i=findSelector(r,GLOBALLY_UNIQUE_SELECTOR_GETTERS,isSelectorUniqueGlobally,t,n);if(i)return i;n=findSelector(r,UNIQUE_AMONG_CHILDREN_SELECTOR_GETTERS,isSelectorUniqueAmongSiblings,t,n)||combineSelector(getPositionSelector(r),n),r=r.parentElement}return n}function isGeneratedValue(e){return/[0-9]/.test(e)}function getIDSelector(e){if(e.id&&!isGeneratedValue(e.id))return`#${cssEscape(e.id)}`}function getClassSelector(e){if(e.tagName!==`BODY`&&e.classList.length>0)for(var t=0;t<e.classList.length;t+=1){var n=e.classList[t];if(!isGeneratedValue(n))return`${cssEscape(e.tagName)}.${cssEscape(n)}`}}function getTagNameSelector(e){return cssEscape(e.tagName)}function getStableAttributeSelector(e,t){if(t){var n=o(t);if(n)return n}for(var r=0,i=STABLE_ATTRIBUTES;r<i.length;r++){var a=i[r],n=o(a);if(n)return n}function o(t){if(e.hasAttribute(t))return`${cssEscape(e.tagName)}[${t}="${cssEscape(e.getAttribute(t))}"]`}}function getPositionSelector(e){for(var t=e.parentElement.firstElementChild,n=1;t&&t!==e;)t.tagName===e.tagName&&(n+=1),t=t.nextElementSibling;return`${cssEscape(e.tagName)}:nth-of-type(${n})`}function findSelector(e,t,n,r,i){for(var a=0,o=t;a<o.length;a++){var c=o[a],u=c(e,r);if(u){var K=combineSelector(u,i);if(n(e,K))return K}}}function isSelectorUniqueGlobally(e,t){return e.ownerDocument.querySelectorAll(t).length===1}function isSelectorUniqueAmongSiblings(e,t){return e.parentElement.querySelectorAll(supportScopeSelector()?combineSelector(`:scope`,t):t).length===1}function combineSelector(e,t){return t?`${e}>${t}`:e}var supportScopeSelectorCache;function supportScopeSelector(){if(supportScopeSelectorCache===void 0)try{document.querySelector(`:scope`),supportScopeSelectorCache=!0}catch{supportScopeSelectorCache=!1}return supportScopeSelectorCache}var MAX_DURATION_BETWEEN_CLICKS=ONE_SECOND,MAX_DISTANCE_BETWEEN_CLICKS=100;function createClickChain(e,t){var n=[],r=0,i;a(e);function a(e){e.stopObservable.subscribe(o),n.push(e),clearTimeout$1(i),i=setTimeout$1(c,MAX_DURATION_BETWEEN_CLICKS)}function o(){r===1&&n.every(function(e){return e.isStopped()})&&(r=2,t(n))}function c(){clearTimeout$1(i),r===0&&(r=1,o())}return{tryAppend:function(e){return r===0?n.length>0&&!areEventsSimilar(n[n.length-1].event,e.event)?(c(),!1):(a(e),!0):!1},stop:function(){c()}}}function areEventsSimilar(e,t){return e.target===t.target&&mouseEventDistance(e,t)<=100&&e.timeStamp-t.timeStamp<=MAX_DURATION_BETWEEN_CLICKS}function mouseEventDistance(e,t){return Math.sqrt((e.clientX-t.clientX)**2+(e.clientY-t.clientY)**2)}function listenActionEvents(e,t){var n=t.onPointerDown,r=t.onPointerUp,i,a={selection:!1,input:!1},o,c=[addEventListener(e,window,DOM_EVENT.POINTER_DOWN,function(e){isValidPointerEvent(e)&&(i=isSelectionEmpty(),a={selection:!1,input:!1},o=n(e))},{capture:!0}),addEventListener(e,window,DOM_EVENT.SELECTION_CHANGE,function(){(!i||!isSelectionEmpty())&&(a.selection=!0)},{capture:!0}),addEventListener(e,window,DOM_EVENT.POINTER_UP,function(e){if(isValidPointerEvent(e)&&o){var t=a;r(o,e,function(){return t}),o=void 0}},{capture:!0}),addEventListener(e,window,DOM_EVENT.INPUT,function(){a.input=!0},{capture:!0})];return{stop:function(){c.forEach(function(e){return e.stop()})}}}function isSelectionEmpty(){var e=window.getSelection();return!e||e.isCollapsed}function isValidPointerEvent(e){return e.target instanceof Element&&e.isPrimary!==!1}var MIN_CLICKS_PER_SECOND_TO_CONSIDER_RAGE=3;function computeFrustration(e,t){if(isRage(e))return t.addFrustration(`rage_click`),e.some(isDead)&&t.addFrustration(`dead_click`),t.hasError&&t.addFrustration(`error_click`),{isRage:!0};var n=e.some(function(e){return e.getUserActivity().selection});return e.forEach(function(e){e.hasError&&e.addFrustration(`error_click`),isDead(e)&&!n&&e.addFrustration(`dead_click`)}),{isRage:!1}}function isRage(e){if(e.some(function(e){return e.getUserActivity().selection}))return!1;for(var t=0;t<e.length-(MIN_CLICKS_PER_SECOND_TO_CONSIDER_RAGE-1);t+=1)if(e[t+MIN_CLICKS_PER_SECOND_TO_CONSIDER_RAGE-1].event.timeStamp-e[t].event.timeStamp<=1e3)return!0;return!1}var DEAD_CLICK_EXCLUDE_SELECTOR=`input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *`;function isDead(e){return e.hasPageActivity||e.getUserActivity().input?!1:!elementMatches(e.event.target,DEAD_CLICK_EXCLUDE_SELECTOR)}var CLICK_ACTION_MAX_DURATION=10*ONE_SECOND,ACTION_CONTEXT_TIME_OUT_DELAY=5*ONE_MINUTE;function trackClickActions(e,t,n){var r=new ValueHistory(ACTION_CONTEXT_TIME_OUT_DELAY),i=new Observable,a;e.subscribe(10,function(){r.reset()}),e.subscribe(5,u);var o=listenActionEvents(n,{onPointerDown:function(r){return processPointerDown(n,e,t,r)},onPointerUp:function(a,o,u){var K=a.clickActionBase,Y=a.hadActivityOnPointerDown;return startClickAction(n,e,t,r,i,c,K,o,u,Y)}}).stop;return{stop:function(){u(),i.notify(),o()},actionContexts:{findActionId:function(e){return r.findAll(e)}}};function c(e){if(!a||!a.tryAppend(e)){var t=e.clone();a=createClickChain(e,function(e){finalizeClicks(e,t)})}}function u(){a&&a.stop()}}function processPointerDown(e,t,n,r){var i=computeClickActionBase(r,e.actionNameAttribute),a=!1;return waitPageActivityEnd(t,n,e,function(e){a=e.hadActivity},100),{clickActionBase:i,hadActivityOnPointerDown:function(){return a}}}function startClickAction(e,t,n,r,i,a,o,c,u,K){var Y=newClick(t,r,u,o,c);a(Y);var X=waitPageActivityEnd(t,n,e,function(e){e.hadActivity&&e.end<Y.startClocks.timeStamp?Y.discard():e.hadActivity?Y.stop(e.end):K()?Y.stop(Y.startClocks.timeStamp):Y.stop()},CLICK_ACTION_MAX_DURATION).stop,ee=t.subscribe(5,function(e){var t=e.endClocks;Y.stop(t.timeStamp)}),te=i.subscribe(function(){Y.stop()});Y.stopObservable.subscribe(function(){ee.unsubscribe(),X(),te.unsubscribe()})}function computeClickActionBase(e,t){var n=e.target.getBoundingClientRect();return{type:`click`,target:{width:Math.round(n.width),height:Math.round(n.height),selector:getSelectorFromElement(e.target,t)},position:{x:Math.round(e.clientX-n.left),y:Math.round(e.clientY-n.top)},name:getActionNameFromElement(e.target,t)}}function newClick(e,t,n,r,i){var a=generateUUID(),o=clocksNow(),c=t.add(a,o.relative),u=trackEventCounts({lifeCycle:e,isChildEvent:function(e){return e.action!==void 0&&(Array.isArray(e.action.id)?includes(e.action.id,a):e.action.id===a)}}),K=0,Y,X=[],ee=new Observable;function te(e){K===0&&(Y=e,K=1,Y?c.close(getRelativeTime(Y)):c.remove(),u.stop(),ee.notify())}return{event:i,stop:te,stopObservable:ee,get hasError(){return u.eventCounts.errorCount>0},get hasPageActivity(){return Y!==void 0},getUserActivity:n,addFrustration:function(e){X.push(e)},startClocks:o,isStopped:function(){return K===1||K===2},clone:function(){return newClick(e,t,n,r,i)},validate:function(t){if(te(),K===1){var n=u.eventCounts,c=n.resourceCount,ee=n.errorCount,ce=n.longTaskCount,ue=assign({type:`click`,duration:Y&&elapsed(o.timeStamp,Y),startClocks:o,id:a,frustrationTypes:X,counts:{resourceCount:c,errorCount:ee,longTaskCount:ce},events:t??[i],event:i},r);e.notify(1,ue),K=2}},discard:function(){te(),K=2}}}function finalizeClicks(e,t){computeFrustration(e,t).isRage?(e.forEach(function(e){return e.discard()}),t.stop(timeStampNow()),t.validate(e.map(function(e){return e.event}))):(t.discard(),e.forEach(function(e){return e.validate()}))}function startActionCollection(e,t,n,r){e.subscribe(1,function(t){return e.notify(12,processAction(t,r))});var i={findActionId:noop$1};
128return n.trackUserInteractions&&(i=trackClickActions(e,t,n).actionContexts),{addAction:function(t,n){e.notify(12,assign({savedCommonContext:n},processAction(t,r)))},actionContexts:i}}function processAction(e,t){var n=isAutoAction(e)?{action:{id:e.id,loading_time:toServerDuration(e.duration),frustration:{type:e.frustrationTypes},error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position}}}:void 0;return{customerContext:isAutoAction(e)?void 0:e.context,rawRumEvent:combine({action:{id:generateUUID(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:`action`,view:{in_foreground:t.wasInPageStateAt(`active`,e.startClocks.relative)}},n),startTime:e.startClocks.relative,domainContext:isAutoAction(e)?{events:e.events}:{}}}function isAutoAction(e){return e.type!==`custom`}function trackConsoleError(e){var t=initConsoleObservable([ConsoleApiName.error]).subscribe(function(t){return e.notify({startClocks:clocksNow(),message:t.message,stack:t.stack,fingerprint:t.fingerprint,source:ErrorSource.CONSOLE,handling:`handled`,handlingStack:t.handlingStack})});return{stop:function(){t.unsubscribe()}}}function trackReportError(e,t){var n=initReportObservable(e,[RawReportType.cspViolation,RawReportType.intervention]).subscribe(function(e){return t.notify({startClocks:clocksNow(),message:e.message,stack:e.stack,type:e.subtype,source:ErrorSource.REPORT,handling:`unhandled`,originalError:e.originalReport})});return{stop:function(){n.unsubscribe()}}}function startErrorCollection(e,t,n,r){var i=new Observable;return trackConsoleError(i),trackRuntimeError(i),trackReportError(t,i),i.subscribe(function(t){return e.notify(14,{error:t})}),doStartErrorCollection(e,n,r)}function doStartErrorCollection(e,t,n){return e.subscribe(14,function(r){var i=r.error,a=r.customerContext,o=r.savedCommonContext;e.notify(12,assign({customerContext:a,savedCommonContext:o},processError(i,t,n)))}),{addError:function(t,n){var r=t.error,i=t.handlingStack,a=t.startClocks,o=t.context,c=computeRawError({stackTrace:r instanceof Error?computeStackTrace(r):void 0,originalError:r,handlingStack:i,startClocks:a,nonErrorPrefix:`Provided`,source:ErrorSource.CUSTOM,handling:`handled`});e.notify(14,{customerContext:o,savedCommonContext:n,error:c})}}}function processError(e,t,n){var r={date:e.startClocks.timeStamp,error:{id:generateUUID(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,type:e.type,handling:e.handling,causes:e.causes,source_type:`browser`,fingerprint:e.fingerprint},type:`error`,view:{in_foreground:t.wasInPageStateAt(`active`,e.startClocks.relative)}},i=n.findFeatureFlagEvaluations(e.startClocks.relative);return i&&!isEmptyObject$1(i)&&(r.feature_flags=i),{rawRumEvent:r,startTime:e.startClocks.relative,domainContext:{error:e.originalError}}}function startLongTaskCollection(e,t,n){e.subscribe(0,function(r){for(var i=0,a=r;i<a.length;i++){var o=a[i];if(o.entryType!==RumPerformanceEntryType.LONG_TASK||!n.findTrackedSession(o.startTime)||!t.trackLongTasks)break;var c=relativeToClocks(o.startTime),u={date:c.timeStamp,long_task:{id:generateUUID(),duration:toServerDuration(o.duration)},type:`long_task`,_dd:{discarded:!1}};e.notify(12,{rawRumEvent:u,startTime:c.relative,domainContext:{performanceEntry:o}})}})}function matchRequestTiming(e){if(performance&&`getEntriesByName`in performance){var t=performance.getEntriesByName(e.url,`resource`);if(t.length&&`toJSON`in t[0]){var n=t.map(function(e){return e.toJSON()}).filter(toValidEntry).filter(function(t){return isBetween(t,e.startClocks.relative,endTime({startTime:e.startClocks.relative,duration:e.duration}))});if(n.length===1)return n[0]}}}function endTime(e){return addDuration(e.startTime,e.duration)}function isBetween(e,t,n){var r=1;return e.startTime>=t-r&&endTime(e)<=addDuration(n,r)}function startResourceCollection(e,t,n,r){e.subscribe(8,function(i){var a=processRequest(i,t,n,r);a&&e.notify(12,a)}),e.subscribe(0,function(i){for(var a=0,o=i;a<o.length;a++){var c=o[a];if(c.entryType===RumPerformanceEntryType.RESOURCE&&!isRequestKind(c)){var u=processResourceEntry(c,t,n,r);u&&e.notify(12,u)}}})}function processRequest(e,t,n,r){var i,a=matchRequestTiming(e),o=a?relativeToClocks(a.startTime):e.startClocks,c=shouldIndexResource(t,n,o),u=computeRequestTracingInfo(e,t);if(c||u){var K=e.type===`xhr`?`xhr`:`fetch`,Y=a?computePerformanceEntryMetrics(a):void 0,X=computeRequestDuration(r,o,e.duration),ee=computePageStateInfo(r,o,a?.duration??e.duration),te=combine({date:o.timeStamp,resource:{id:generateUUID(),type:K,duration:X,method:e.method,status_code:e.status,url:e.url},type:`resource`,_dd:{discarded:!c}},u,Y,ee);return{startTime:o.relative,rawRumEvent:te,domainContext:{performanceEntry:a,xhr:e.xhr,response:e.response,requestInput:e.input,requestInit:e.init,error:e.error}}}}function processResourceEntry(e,t,n,r){var i=relativeToClocks(e.startTime),a=shouldIndexResource(t,n,i),o=computeEntryTracingInfo(e,t);if(a||o){var c=computeResourceKind(e),u=computePerformanceEntryMetrics(e),K=computePageStateInfo(r,i,e.duration),Y=combine({date:i.timeStamp,resource:{id:generateUUID(),type:c,url:e.name,status_code:discardZeroStatus(e.responseStatus)},type:`resource`,_dd:{discarded:!a}},o,u,K);return{startTime:i.relative,rawRumEvent:Y,domainContext:{performanceEntry:e}}}}function shouldIndexResource(e,t,n){return e.trackResources&&t.findTrackedSession(n.relative)}function computePerformanceEntryMetrics(e){return{resource:assign({duration:computePerformanceResourceDuration(e),size:computeSize(e)}
128,computePerformanceResourceDetails(e))}}function computeRequestTracingInfo(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toDecimalString(),trace_id:e.traceId.toDecimalString(),rule_psr:getRulePsr(t)}}}function computeEntryTracingInfo(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,rule_psr:getRulePsr(t)}}}function getRulePsr(e){return isNumber$1(e.traceSampleRate)?e.traceSampleRate/100:void 0}function computePageStateInfo(e,t,n){if(isExperimentalFeatureEnabled(ExperimentalFeature.RESOURCE_PAGE_STATES))return{_dd:{page_states:e.findAll(t.relative,n),page_was_discarded:String(document.wasDiscarded)}}}function computeRequestDuration(e,t,n){return e.wasInPageStateDuringPeriod(`frozen`,t.relative,n)?void 0:toServerDuration(n)}function discardZeroStatus(e){return e===0?void 0:e}function trackViewEventCounts(e,t,n){var r=trackEventCounts({lifeCycle:e,isChildEvent:function(e){return e.view.id===t},onChange:n});return{stop:r.stop,eventCounts:r.eventCounts}}var FCP_MAXIMUM_DELAY=10*ONE_MINUTE;function trackFirstContentfulPaint(e,t,n){return{stop:e.subscribe(0,function(e){var r=find$1(e,function(e){return e.entryType===RumPerformanceEntryType.PAINT&&e.name===`first-contentful-paint`&&e.startTime<t.timeStamp&&e.startTime<FCP_MAXIMUM_DELAY});r&&n(r.startTime)}).unsubscribe}}function trackFirstInput(e,t,n,r){return{stop:e.subscribe(0,function(e){var i=find$1(e,function(e){return e.entryType===RumPerformanceEntryType.FIRST_INPUT&&e.startTime<n.timeStamp});if(i){var a=elapsed(i.startTime,i.processingStart),o=void 0;i.target&&isElementNode(i.target)&&(o=getSelectorFromElement(i.target,t.actionNameAttribute)),r({delay:a>=0?a:0,time:i.startTime,targetSelector:o})}}).unsubscribe}}function trackNavigationTimings(e,t){return{stop:e.subscribe(0,function(e){for(var n=0,r=e;n<r.length;n++){var i=r[n];i.entryType===RumPerformanceEntryType.NAVIGATION&&t({domComplete:i.domComplete,domContentLoaded:i.domContentLoadedEventEnd,domInteractive:i.domInteractive,loadEvent:i.loadEventEnd,firstByte:i.responseStart>=0&&i.responseStart<=relativeNow()?i.responseStart:void 0})}}).unsubscribe}}var LCP_MAXIMUM_DELAY=10*ONE_MINUTE,wrongLcpReported=!1,previousLcp;function trackLargestContentfulPaint(e,t,n,r,i){var a=1/0,o=addEventListeners(t,r,[DOM_EVENT.POINTER_DOWN,DOM_EVENT.KEY_DOWN],function(e){a=e.timeStamp},{capture:!0,once:!0}).stop,c=0,u=e.subscribe(0,function(e){var r=findLast(e,function(e){return e.entryType===RumPerformanceEntryType.LARGEST_CONTENTFUL_PAINT&&e.startTime<a&&e.startTime<n.timeStamp&&e.startTime<LCP_MAXIMUM_DELAY&&e.size>c});if(r){var o=void 0;r.element&&(o=getSelectorFromElement(r.element,t.actionNameAttribute)),isExperimentalFeatureEnabled(ExperimentalFeature.ZERO_LCP_TELEMETRY)&&monitorLcpEntries(r,e.filter(function(e){return e.entryType===RumPerformanceEntryType.LARGEST_CONTENTFUL_PAINT})),i({value:r.startTime,targetSelector:o}),c=r.size}}).unsubscribe;return{stop:function(){o(),u()}}}function monitorLcpEntries(e,t){if(!wrongLcpReported){var n=e.startTime===0?`LCP with startTime = 0`:previousLcp!==void 0&&e.startTime<previousLcp.startTime?`LCP with startTime < previous LCP`:previousLcp!==void 0&&e.size<previousLcp.size?`LCP with size < previous LCP`:void 0;n&&(wrongLcpReported=!0,addTelemetryDebug(n,{debug:{entry:toSerializableLCP(e),previousLcp,timeOrigin:performance.timeOrigin,now:relativeNow(),lcpEntries:t.map(toSerializableLCP)}})),previousLcp=toSerializableLCP(e)}}function toSerializableLCP(e){var t=e.toJSON();return delete t.element,t}function trackFirstHidden(e,t){t===void 0&&(t=window);var n,r;return document.visibilityState===`hidden`?n=0:(n=1/0,r=addEventListeners(e,t,[DOM_EVENT.PAGE_HIDE,DOM_EVENT.VISIBILITY_CHANGE],function(e){(e.type===DOM_EVENT.PAGE_HIDE||document.visibilityState===`hidden`)&&(n=e.timeStamp,r())},{capture:!0}).stop),{get timeStamp(){return n},stop:function(){r?.()}}}function trackInitialViewMetrics(e,t,n,r){var i={},a=trackNavigationTimings(e,function(e){n(e.loadEvent),i.navigationTimings=e,r()}).stop,o=trackFirstHidden(t),c=trackFirstContentfulPaint(e,o,function(e){i.firstContentfulPaint=e,r()}).stop,u=trackLargestContentfulPaint(e,t,o,window,function(e){i.largestContentfulPaint=e,r()}).stop,K=trackFirstInput(e,t,o,function(e){i.firstInput=e,r()}).stop;function Y(){a(),c(),u(),K(),o.stop()}return{stop:Y,initialViewMetrics:i}}function trackCumulativeLayoutShift(e,t,n){if(!isLayoutShiftSupported())return{stop:noop$1};var r=0;n({value:0});var i=slidingSessionWindow();return{stop:t.subscribe(0,function(t){for(var a=0,o=t;a<o.length;a++){var c=o[a];if(c.entryType===RumPerformanceEntryType.LAYOUT_SHIFT&&!c.hadRecentInput&&(i.update(c),i.value(
128)>r)){r=i.value();var u=round(r,4),K=i.largestLayoutShiftTarget(),Y=void 0;K&&K.isConnected&&(Y=getSelectorFromElement(K,e.actionNameAttribute)),n({value:u,targetSelector:Y})}}}).unsubscribe}}function slidingSessionWindow(){var e=0,t,n,r=0,i,a;return{update:function(o){var c,u;t===void 0||o.startTime-n>=1e3||o.startTime-t>=5e3?(t=n=o.startTime,e=o.value,r=0,i=void 0):(e+=o.value,n=o.startTime),o.value>r&&(r=o.value,a=o.startTime,i=o.sources?.length?find$1(o.sources,function(e){return!!e.node&&isElementNode(e.node)})?.node:void 0)},value:function(){return e},largestLayoutShiftTarget:function(){return i},largestLayoutShiftTime:function(){return a}}}function isLayoutShiftSupported(){return supportPerformanceTimingEvent(RumPerformanceEntryType.LAYOUT_SHIFT)}var observer,interactionCountEstimate=0,minKnownInteractionId=1/0,maxKnownInteractionId=0;function initInteractionCountPolyfill(){`interactionCount`in performance||observer||(observer=new window.PerformanceObserver(monitor(function(e){e.getEntries().forEach(function(e){var t=e;t.interactionId&&(minKnownInteractionId=Math.min(minKnownInteractionId,t.interactionId),maxKnownInteractionId=Math.max(maxKnownInteractionId,t.interactionId),interactionCountEstimate=(maxKnownInteractionId-minKnownInteractionId)/7+1)})})),observer.observe({type:`event`,buffered:!0,durationThreshold:0}))}var getInteractionCount=function(){return observer?interactionCountEstimate:window.performance.interactionCount||0},MAX_INTERACTION_ENTRIES=10,MAX_INP_VALUE=1*ONE_MINUTE;function trackInteractionToNextPaint(e,t,n,r){if(!isInteractionToNextPaintSupported())return{getInteractionToNextPaint:function(){},setViewEnd:noop$1,stop:noop$1};var i=trackViewInteractionCount(n),a=i.getViewInteractionCount,o=i.stopViewInteractionCount,c=1/0,u=trackLongestInteractions(a),K=-1,Y;return{getInteractionToNextPaint:function(){if(K>=0)return{value:Math.min(K,MAX_INP_VALUE),targetSelector:Y};if(a())return{value:0}}
128,setViewEnd:function(e){c=e,o()},stop:r.subscribe(0,function(n){for(var r=0,i=n;r<i.length;r++){var a=i[r];(a.entryType===RumPerformanceEntryType.EVENT||a.entryType===RumPerformanceEntryType.FIRST_INPUT)&&a.interactionId&&a.startTime>=t&&a.startTime<=c&&u.process(a)}var o=u.estimateP98Interaction();o&&(K=o.duration,Y=o.target&&isElementNode(o.target)?getSelectorFromElement(o.target,e.actionNameAttribute):void 0)}).unsubscribe}}function trackLongestInteractions(e){var t=[];function n(){t.sort(function(e,t){return t.duration-e.duration}).splice(MAX_INTERACTION_ENTRIES)}return{process:function(e){var r=t.findIndex(function(t){return e.interactionId===t.interactionId}),i=t[t.length-1];r===-1?(t.length<MAX_INTERACTION_ENTRIES||e.duration>i.duration)&&(t.push(e),n()):e.duration>t[r].duration&&(t[r]=e,n())},estimateP98Interaction:function(){return t[Math.min(t.length-1,Math.floor(e()/50))]}}}function trackViewInteractionCount(e){initInteractionCountPolyfill();var t=e===`initial_load`?0:getInteractionCount(),n={stopped:!1};function r(){return getInteractionCount()-t}return{getViewInteractionCount:function(){return n.stopped?n.interactionCount:r()},stopViewInteractionCount:function(){n={stopped:!0,interactionCount:r()}}}}function isInteractionToNextPaintSupported(){return supportPerformanceTimingEvent(RumPerformanceEntryType.EVENT)&&window.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype}function trackLoadingTime(e,t,n,r,i,a){var o=r===`initial_load`,c=!0,u=[];function K(){!c&&!o&&u.length>0&&a(Math.max.apply(Math,u))}return{stop:waitPageActivityEnd(e,t,n,function(e){c&&(c=!1,e.hadActivity&&u.push(elapsed(i.timeStamp,e.end)),K())}
128).stop,setLoadEvent:function(e){o&&(o=!1,u.push(e),K())}}}function getScrollX(){var e,t=window.visualViewport;return e=t?t.pageLeft-t.offsetLeft:window.scrollX===void 0?window.pageXOffset||0:window.scrollX,Math.round(e)}function getScrollY(){var e,t=window.visualViewport;return e=t?t.pageTop-t.offsetTop:window.scrollY===void 0?window.pageYOffset||0:window.scrollY,Math.round(e)}var viewportObservable;function initViewportObservable(e){return viewportObservable||=createViewportObservable(e),viewportObservable}function createViewportObservable(e){return new Observable(function(t){var n=throttle$2(function(){t.notify(getViewportDimension())},200).throttled;return addEventListener(e,window,DOM_EVENT.RESIZE,n,{capture:!0,passive:!0}).stop})}function getViewportDimension(){var e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}var THROTTLE_SCROLL_DURATION=ONE_SECOND;function trackScrollMetrics(e,t,n,r){r===void 0&&(r=createScrollValuesObservable(e));var i=0,a=0,o=0,c=r.subscribe(function(e){var r=e.scrollDepth,c=e.scrollTop,u=e.scrollHeight,K=!1;if(r>i&&(i=r,K=!0),u>a){a=u;var Y=relativeNow();o=elapsed(t.relative,Y),K=!0}K&&n({maxDepth:Math.min(i,a),maxDepthScrollTop:c,maxScrollHeight:a,maxScrollHeightTime:o})});return{stop:function(){return c.unsubscribe()}}}function computeScrollValues(){var e=getScrollY(),t=getViewportDimension().height;return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(t+e),scrollTop:e}}function createScrollValuesObservable(e,t){return t===void 0&&(t=THROTTLE_SCROLL_DURATION),new Observable(function(n){function r(){n.notify(computeScrollValues())}if(window.ResizeObserver){var i=throttle$2(r,t,{leading:!1,trailing:!0}),a=document.scrollingElement||document.documentElement,o=new ResizeObserver(monitor(i.throttled));o.observe(a);var c=addEventListener(e,window,DOM_EVENT.SCROLL,i.throttled,{passive:!0});return function(){i.cancel(),o.unobserve(a),c.stop()}}})}function trackCommonViewMetrics(e,t,n,r,i,a){var o={},c=trackLoadingTime(e,t,n,i,a,function(e){o.loadingTime=e,r()}),u=c.stop,K=c.setLoadEvent,Y=trackScrollMetrics(n,a,function(e){o.scroll=e}).stop,X=trackCumulativeLayoutShift(n,e,function(e){o.cumulativeLayoutShift=e,r()}).stop,ee=trackInteractionToNextPaint(n,a.relative,i,e),te=ee.stop,ce=ee.getInteractionToNextPaint;return{stop:function(){u(),X(),Y()},stopINPTracking:te,setLoadEvent:K,setViewEnd:ee.setViewEnd,getCommonViewMetrics:function(){return o.interactionToNextPaint=ce(),o}}}var THROTTLE_VIEW_UPDATE_PERIOD=3e3,SESSION_KEEP_ALIVE_INTERVAL=5*ONE_MINUTE,KEEP_TRACKING_AFTER_VIEW_DELAY=5*ONE_MINUTE;function trackViews(e,t,n,r,i,a,o){var c=new Set,u=Y(`initial_load`,clocksOrigin(),o);X();var K;a&&(K=ee(i));function Y(i,a,o){var u=newView(t,n,r,e,i,a,o);return c.add(u),u.stopObservable.subscribe(function(){c.delete(u)}),u}function X(){t.subscribe(10,function(){u=Y(`route_change`,void 0,{name:u.name,service:u.service,version:u.version})}),t.subscribe(9,function(){u.end({sessionIsActive:!1})}),t.subscribe(11,function(e){(e.reason===PageExitReason.UNLOADING||e.reason===PageExitReason.PAGEHIDE)&&u.end()})}function ee(e){return e.subscribe(function(e){var t=e.oldLocation,n=e.newLocation;areDifferentLocation(t,n)&&(u.end(),u=Y(`route_change`))})}return{addTiming:function(e,t){t===void 0&&(t=timeStampNow()),u.addTiming(e,t)},startView:function(e,t){u.end({endClocks:t}),u=Y(`route_change`,t,e)},stop:function(){K?.unsubscribe(),u.end(),c.forEach(function(e){return e.stop()})}}}function newView(e,t,n,r,i,a,o){a===void 0&&(a=clocksNow());var c=generateUUID(),u=new Observable,K={},Y=0,X,ee=shallowClone(r),te=!0,ce,ue,de;o&&(ce=o.name,ue=o.service,de=o.version);var fe={id:c,name:ce,startClocks:a,service:ue,version:de};e.notify(2,fe),e.notify(3,fe);var me=throttle$2(st,THROTTLE_VIEW_UPDATE_PERIOD,{leading:!1}),ge=me.throttled,Te=me.cancel,Oe=trackCommonViewMetrics(e,t,n,ge,i,a),Ae=Oe.setLoadEvent,ze=Oe.setViewEnd,qe=Oe.stop,Ye=Oe.stopINPTracking,Ze=Oe.getCommonViewMetrics,Qe=i===`initial_load`?trackInitialViewMetrics(e,n,Ae,ge):{stop:noop$1,initialViewMetrics:{}},et=Qe.stop,nt=Qe.initialViewMetrics,rt=trackViewEventCounts(e,c,ge),it=rt.stop,at=rt.eventCounts,ot=setInterval$1(st,SESSION_KEEP_ALIVE_INTERVAL);st();function st(){Te(),Y+=1;var t=X===void 0?timeStampNow():X.timeStamp;e.notify(4,{customTimings:K,documentVersion:Y,id:c,name:ce,service:ue,version:de,loadingType:i,location:ee,startClocks:a,commonViewMetrics:Ze(),initialViewMetrics:nt,duration:elapsed(a.timeStamp,t),isActive:X===void 0,sessionIsActive:te,eventCounts:at})}return{name:ce,service:ue,version:de,stopObservable:u,end:function(t){var n=this,r,i;t===void 0&&(t={}),!X&&(X=t.endClocks??clocksNow(),te=t.sessionIsActive??!0,e.notify(5,{endClocks:X}),e.notify(6,{endClocks:X}),clearInterval$1(ot),ze(X.relative),qe(),st(),setTimeout$1(function(){n.stop()},KEEP_TRACKING_AFTER_VIEW_DELAY))},stop:function(){et(),it(),Ye(),u.notify()},addTiming:function(e,t){if(!X){var n=looksLikeRelativeTime(t)?t:elapsed(a.timeStamp,t);K[sanitizeTiming(e)]=n,ge()}}}}function sanitizeTiming(e){var t=e.replace(/[^a-zA-Z0-9-_.@$]/g,`_`);return t!==e&&display.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function areDifferentLocation(e,t){return e.pathname!==t.pathname||!isHashAnAnchor(t.hash)&&getPathFromHash(t.hash)!==getPathFromHash(e.hash)}function isHashAnAnchor(e){var t=e.substring(1);return t!==``&&!!document.getElementById(t)}function getPathFromHash(e){var t=e.indexOf(`?`);return t<0?e:e.slice(0,t)}function startViewCollection(e,t,n,r,i,a,o,c,u){return e.subscribe(4,function(n){return e.notify(12,processViewUpdate(n,t,a,c,o))}),trackViews(n,e,r,t,i,!t.trackViewsManually,u)}function processViewUpdate(e,t,n,r,i){var a,o,c,u,K,Y,X,ee,te,ce,ue,de,fe,me,ge=r.getReplayStats(e.id),Te=n.findFeatureFlagEvaluations(e.startClocks.relative),Oe=i.findAll(e.startClocks.relative,e.duration),Ae={_dd:{document_version:e.documentVersion,replay_stats:ge,page_states:Oe,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:`view`,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:e.commonViewMetrics.cumulativeLayoutShift?.value,cumulative_layout_shift_target_selector:e.commonViewMetrics.cumulativeLayoutShift?.targetSelector,first_byte:toServerDuration(e.initialViewMetrics.navigationTimings?.firstByte),dom_complete:toServerDuration(e.initialViewMetrics.navigationTimings?.domComplete),dom_content_loaded:toServerDuration(e.initialViewMetrics.navigationTimings?.domContentLoaded),dom_interactive:toServerDuration(e.initialViewMetrics.navigationTimings?.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:toServerDuration(e.initialViewMetrics.firstContentfulPaint),first_input_delay:toServerDuration(e.initialViewMetrics.firstInput?.delay),first_input_time:toServerDuration(e.initialViewMetrics.firstInput?.time),first_input_target_selector:e.initialViewMetrics.firstInput?.targetSelector,interaction_to_next_paint:toServerDuration(e.commonViewMetrics.interactionToNextPaint?.value),interaction_to_next_paint_target_selector:e.commonViewMetrics.interactionToNextPaint?.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:toServerDuration(e.initialViewMetrics.largestContentfulPaint?.value),largest_contentful_paint_target_selector:e.initialViewMetrics.largestContentfulPaint?.targetSelector,load_event:toServerDuration(e.initialViewMetrics.navigationTimings?.loadEvent),loading_time:discardNegativeDuration(toServerDuration(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},resource:{count:e.eventCounts.resourceCount},time_spent:toServerDuration(e.duration)},feature_flags:Te&&!isEmptyObject$1(Te)?Te:void 0,display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:toServerDuration(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,session:{has_replay:ge?!0:void 0,is_active:e.sessionIsActive?void 0:!1},privacy:{replay_level:t.defaultPrivacyLevel}};return isEmptyObject$1(e.customTimings)||(Ae.view.custom_timings=mapValues(e.customTimings,toServerDuration)),{rawRumEvent:Ae,startTime:e.startClocks.relative,domainContext:{location:e.location}}}function discardNegativeDuration(e){return isNumber$1(e)&&e<0?void 0:e}var RUM_SESSION_KEY=`rum`;function startRumSessionManager(e,t,n){var r=startSessionManager(e,`rum`,function(t){return computeSessionState(e,t)},n);return r.expireObservable.subscribe(function(){t.notify(9)}
128),r.renewObservable.subscribe(function(){t.notify(10)}),{findTrackedSession:function(e){var t=r.findActiveSession(e);if(t&&isTypeTracked(t.trackingType))return{id:t.id,sessionReplayAllowed:t.trackingType===`1`}},expire:r.expire,expireObservable:r.expireObservable}}function startRumSessionManagerStub(){var e={id:`00000000-aaaa-0000-aaaa-000000000000`,sessionReplayAllowed:bridgeSupports(`records`)};return{findTrackedSession:function(){return e},expire:noop$1,expireObservable:new Observable}}function computeSessionState(e,t){var n=hasValidRumSession(t)?t:performDraw(e.sessionSampleRate)?performDraw(e.sessionReplaySampleRate)?`1`:`2`:`0`;return{trackingType:n,isTracked:isTypeTracked(n)}}function hasValidRumSession(e){return e===`0`||e===`1`||e===`2`}function isTypeTracked(e){return e===`2`||e===`1`}function startRumBatch(e,t,n,r,i,a,o){var c=e.replica,u=startBatchWithReplica(e,{endpoint:e.rumEndpointBuilder,encoder:o(2)},c&&{endpoint:c.rumEndpointBuilder,transformMessage:function(e){return combine(e,{application:{id:c.applicationId}})},encoder:o(3)},r,i,a);return t.subscribe(13,function(e){e.type===`view`?u.upsert(e,e.view.id):u.add(e)}),n.subscribe(function(t){return u.add(t,isTelemetryReplicationAllowed(e))}),u}function startRumEventBridge(e){var t=getEventBridge();e.subscribe(13,function(e){t.send(`rum`,e)})}var URL_CONTEXT_TIME_OUT_DELAY=SESSION_TIME_OUT_DELAY;function startUrlContexts(e,t,n){var r=new ValueHistory(URL_CONTEXT_TIME_OUT_DELAY),i;e.subscribe(2,function(e){var t=e.startClocks,a=n.href;r.add(o({url:a,referrer:i||document.referrer}),t.relative),i=a}),e.subscribe(6,function(e){var t=e.endClocks;r.closeActive(t.relative)});var a=t.subscribe(function(e){var t=e.newLocation,n=r.find();if(n){var i=relativeNow();r.closeActive(i),r.add(o({url:t.href,referrer:n.referrer}),i)}});function o(e){return{url:e.url,referrer:e.referrer}}return{findUrl:function(e){return r.find(e)},stop:function(){a.unsubscribe(),r.stop()}}}function createLocationChangeObservable(e,t){var n=shallowClone(t);return new Observable(function(r){var i=trackHistory(e,o).stop,a=trackHash(e,o).stop;function o(){if(n.href!==t.href){var e=shallowClone(t);r.notify({newLocation:e,oldLocation:n}),n=e}}return function(){i(),a()}})}function trackHistory(e,t){var n=instrumentMethod(history,`pushState`,function(e){var n=e.onPostCall;n(t)}).stop,r=instrumentMethod(history,`replaceState`,function(e){var n=e.onPostCall;n(t)}).stop,i=addEventListener(e,window,DOM_EVENT.POP_STATE,t).stop;return{stop:function(){n(),r(),i()}}}function trackHash(e,t){return addEventListener(e,window,DOM_EVENT.HASH_CHANGE,t)}var FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY=SESSION_TIME_OUT_DELAY;function startFeatureFlagContexts(e,t){if(!isExperimentalFeatureEnabled(ExperimentalFeature.FEATURE_FLAGS))return{findFeatureFlagEvaluations:function(){},addFeatureFlagEvaluation:noop$1,stop:noop$1};var n=new ValueHistory(FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY);return e.subscribe(2,function(e){var r=e.startClocks;n.add({},r.relative),t.resetCustomerData()}),e.subscribe(6,function(e){var t=e.endClocks;n.closeActive(t.relative)}),{findFeatureFlagEvaluations:function(e){return n.find(e)},addFeatureFlagEvaluation:function(e,r){var i=n.find();i&&(i[e]=r,t.updateCustomerData(i))},stop:function(){return t.stop()}}}var MEASURES_PERIOD_DURATION=10*ONE_SECOND,currentPeriodMeasures,currentBatchMeasures,batchHasRumEvent;function startCustomerDataTelemetry(e,t,n,r,i){t.enabled&&performDraw(e.customerDataTelemetrySampleRate)&&(initCurrentPeriodMeasures(),initCurrentBatchMeasures(),n.subscribe(13,function(e){batchHasRumEvent=!0,updateMeasure(currentBatchMeasures.globalContextBytes,r.getOrCreateTracker(2).getBytesCount()),updateMeasure(currentBatchMeasures.userContextBytes,r.getOrCreateTracker(1).getBytesCount()),updateMeasure(currentBatchMeasures.featureFlagBytes,includes([`view`,`error`],e.type)?r.getOrCreateTracker(0).getBytesCount():0)}),i.subscribe(function(e){var t=e.bytesCount,n=e.messagesCount;batchHasRumEvent&&(currentPeriodMeasures.batchCount+=1,updateMeasure(currentPeriodMeasures.batchBytesCount,t),updateMeasure(currentPeriodMeasures.batchMessagesCount,n),mergeMeasure(currentPeriodMeasures.globalContextBytes,currentBatchMeasures.globalContextBytes),mergeMeasure(currentPeriodMeasures.userContextBytes,currentBatchMeasures.userContextBytes),mergeMeasure(currentPeriodMeasures.featureFlagBytes,currentBatchMeasures.featureFlagBytes),initCurrentBatchMeasures())}
128),setInterval$1(sendCurrentPeriodMeasures,MEASURES_PERIOD_DURATION))}function sendCurrentPeriodMeasures(){currentPeriodMeasures.batchCount!==0&&(addTelemetryDebug(`Customer data measures`,currentPeriodMeasures),initCurrentPeriodMeasures())}function createMeasure(){return{min:1/0,max:0,sum:0}}function updateMeasure(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function mergeMeasure(e,t){e.sum+=t.sum,e.min=Math.min(e.min,t.min),e.max=Math.max(e.max,t.max)}function initCurrentPeriodMeasures(){currentPeriodMeasures={batchCount:0,batchBytesCount:createMeasure(),batchMessagesCount:createMeasure(),globalContextBytes:createMeasure(),userContextBytes:createMeasure(),featureFlagBytes:createMeasure()}}function initCurrentBatchMeasures(){batchHasRumEvent=!1,currentBatchMeasures={globalContextBytes:createMeasure(),userContextBytes:createMeasure(),featureFlagBytes:createMeasure()}}var MAX_PAGE_STATE_ENTRIES=4e3,MAX_PAGE_STATE_ENTRIES_SELECTABLE=500,PAGE_STATE_CONTEXT_TIME_OUT_DELAY=SESSION_TIME_OUT_DELAY;function startPageStateHistory(e,t){t===void 0&&(t=500);var n=new ValueHistory(PAGE_STATE_CONTEXT_TIME_OUT_DELAY,MAX_PAGE_STATE_ENTRIES),r;a(getPageState(),relativeNow());var i=addEventListeners(e,window,[DOM_EVENT.PAGE_SHOW,DOM_EVENT.FOCUS,DOM_EVENT.BLUR,DOM_EVENT.VISIBILITY_CHANGE,DOM_EVENT.RESUME,DOM_EVENT.FREEZE,DOM_EVENT.PAGE_HIDE],function(e){a(computePageState(e),e.timeStamp)},{capture:!0}).stop;function a(e,t){t===void 0&&(t=relativeNow()),e!==r&&(r=e,n.closeActive(t),n.add({state:r,startTime:t},t))}var o={findAll:function(e,r){var i=n.findAll(e,r);if(i.length!==0){for(var a=[],o=Math.max(0,i.length-t),c=i.length-1;c>=o;c--){var u=i[c],K=elapsed(e,u.startTime);a.push({state:u.state,start:toServerDuration(K)})}return a}},wasInPageStateAt:function(e,t){return o.wasInPageStateDuringPeriod(e,t,0)},wasInPageStateDuringPeriod:function(e,t,r){return n.findAll(t,r).some(function(t){return t.state===e})},addPageState:a,stop:function(){i(),n.stop()}};return o}function computePageState(e){return e.type===DOM_EVENT.FREEZE?`frozen`:e.type===DOM_EVENT.PAGE_HIDE?e.persisted?`frozen`:`terminated`:getPageState()}function getPageState(){return document.visibilityState===`hidden`?`hidden`:document.hasFocus()?`active`:`passive`}function startDisplayContext(e){var t=getViewportDimension();return{get:function(){return{viewport:t}},stop:initViewportObservable(e).subscribe(function(e){t=e}).unsubscribe}}function startVitalCollection(e,t){var n=new Map;e.subscribe(10,function(){n.clear()});function r(e){return!t.wasInPageStateDuringPeriod(`frozen`,e.startClocks.relative,e.value)}return{startDurationVital:function(e){n.set(e.name,e)},stopDurationVital:function(t){var i=n.get(t.name);if(i){var a=buildDurationVital(i,t);n.delete(a.name),r(a)&&e.notify(12,processVital(a))}}}}function buildDurationVital(e,t){return{name:e.name,type:`duration`,startClocks:e.startClocks,value:elapsed(e.startClocks.timeStamp,t.stopClocks.timeStamp),context:combine(e.context,t.context)}}function processVital(e){var t;return{rawRumEvent:{date:e.startClocks.timeStamp,vital:{id:generateUUID(),type:e.type,name:e.name,custom:(t={},t[e.name]=e.value,t)},type:`vital`},startTime:e.startClocks.relative,customerContext:e.context,domainContext:{}}}function startRum(e,t,n,r,i,a,o,c){var u=[],K=new LifeCycle;K.subscribe(13,function(e){return sendToExtension(`rum`,e)});var Y=startRumTelemetry(t);Y.setContextProvider(function(){var e,n;return{application:{id:t.applicationId},session:{id:ue.findTrackedSession()?.id},view:{id:Te.findView()?.id},action:{id:ze.findActionId()}}});var X=function(e){K.notify(14,{error:e}),addTelemetryDebug(`Error reported to customer`,{"error.message":e.message})},ee=startFeatureFlagContexts(K,r.getOrCreateTracker(0)),te=createPageExitObservable(t),ce=te.subscribe(function(e){K.notify(11,e)});u.push(function(){return ce.unsubscribe()});var ue=canUseEventBridge()?startRumSessionManagerStub():startRumSessionManager(t,K,c);if(canUseEventBridge())startRumEventBridge(K);else{var de=startRumBatch(t,K,Y.observable,X,te,ue.expireObservable,o);u.push(function(){return de.stop()}),startCustomerDataTelemetry(t,Y,K,r,de.flushObservable)}var fe=createDOMMutationObservable(),me=createLocationChangeObservable(t,location),ge=startRumEventCollection(K,t,location,ue,me,fe,i,X),Te=ge.viewContexts,Oe=ge.pageStateHistory,Ae=ge.urlContexts,ze=ge.actionContexts,qe=ge.addAction,Ye=ge.stop;u.push(Ye),addTelemetryConfiguration(serializeRumConfiguration(e)),startLongTaskCollection(K,t,ue),startResourceCollection(K,t,ue,Oe);var Ze=startViewCollection(K,t,location,fe,me,ee,Oe,n,a),Qe=Ze.addTiming,et=Ze.startView,nt=Ze.stop;u.push(nt);var rt=startErrorCollection(K,t,Oe,ee).addError;startRequestCollection(K,t,ue);var it=startPerformanceCollection(K,t).stop;u.push(it);var at=startVitalCollection(K,Oe),ot=startInternalContext(t.applicationId,ue,Te,ze,Ae);return{addAction:qe,addError:rt,addTiming:Qe,addFeatureFlagEvaluation:ee.addFeatureFlagEvaluation,startView:et,lifeCycle:K,viewContexts:Te,session:ue,stopSession:function(){return ue.expire()},getInternalContext:ot.get,startDurationVital:at.startDurationVital,stopDurationVital:at.stopDurationVital,stop:function(){u.forEach(function(e){return e()})}}}function startRumTelemetry(e){var t=startTelemetry(`browser-rum-sdk`,e);if(canUseEventBridge()){var n=getEventBridge();t.observable.subscribe(function(e){return n.send(`internal_telemetry`,e)})}return t}function startRumEventCollection(e,t,n,r,i,a,o,c){var u=startViewContexts(e),K=startUrlContexts(e,i,n),Y=startPageStateHistory(t),X=startActionCollection(e,a,t,Y),ee=X.addAction,te=X.actionContexts,ce=startDisplayContext(t);return startRumAssembly(t,e,r,u,K,te,ce,o,c),{viewContexts:u,pageStateHistory:Y,urlContexts:K,addAction:ee,actionContexts:te,stop:function(){ce.stop(),Y.stop(),K.stop(),u.stop(),Y.stop()}}}function getSessionReplayUrl(e,t){var n=t.session,r=t.viewContext,i=t.errorType,a=n?n.id:`no-session-id`,o=[];return i!==void 0&&o.push(`error-type=${i}`),r&&(o.push(`seed=${r.id}`),o.push(`from=${r.startClocks.timeStamp}`)),`${getDatadogSiteUrl(e)}${`/rum/replay/sessions/${a}`}?${o.join(`&`)}`}function getDatadogSiteUrl(e){var t=e.site,n=e.subdomain||getSiteDefaultSubdomain(e);return`https://${n?`${n}.`:``}${t}`}function getSiteDefaultSubdomain(e){switch(e.site){case INTAKE_SITE_US1:case INTAKE_SITE_EU1:return`app`;case INTAKE_SITE_STAGING:return`dd`;default:return}}var RecordType={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},NodeType={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},IncrementalSource={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},MouseInteractionType={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},MediaInteractionType={Play:0,Pause:1}
128,MAX_STATS_HISTORY=10,statsPerView;function getSegmentsCount(e){return getOrCreateReplayStats(e).segments_count}function addSegment(e){getOrCreateReplayStats(e).segments_count+=1}function addRecord(e){getOrCreateReplayStats(e).records_count+=1}function addWroteData(e,t){getOrCreateReplayStats(e).segments_total_raw_size+=t}function getReplayStats(e){return statsPerView?.get(e)}function getOrCreateReplayStats(e){statsPerView||=new Map;var t;return statsPerView.has(e)?t=statsPerView.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},statsPerView.set(e,t),statsPerView.size>10&&deleteOldestStats()),t}function deleteOldestStats(){if(statsPerView){if(statsPerView.keys)statsPerView.delete(statsPerView.keys().next().value);else{var e=!0;statsPerView.forEach(function(t,n){e&&=(statsPerView.delete(n),!1)})}}}function assembleIncrementalSnapshot(e,t){return{data:assign({source:e},t),type:RecordType.IncrementalSnapshot,timestamp:timeStampNow()}}var NodePrivacyLevel={IGNORE:`ignore`,HIDDEN:`hidden`,ALLOW:DefaultPrivacyLevel.ALLOW,MASK:DefaultPrivacyLevel.MASK,MASK_USER_INPUT:DefaultPrivacyLevel.MASK_USER_INPUT},PRIVACY_ATTR_NAME=`data-dd-privacy`,PRIVACY_ATTR_VALUE_ALLOW=`allow`,PRIVACY_ATTR_VALUE_MASK=`mask`,PRIVACY_ATTR_VALUE_MASK_USER_INPUT=`mask-user-input`,PRIVACY_ATTR_VALUE_HIDDEN=`hidden`,PRIVACY_CLASS_ALLOW=`dd-privacy-allow`,PRIVACY_CLASS_MASK=`dd-privacy-mask`,PRIVACY_CLASS_MASK_USER_INPUT=`dd-privacy-mask-user-input`,PRIVACY_CLASS_HIDDEN=`dd-privacy-hidden`,CENSORED_IMG_MARK=`data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`,FORM_PRIVATE_TAG_NAMES={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},MAX_ATTRIBUTE_VALUE_CHAR_LENGTH=1e5,TEXT_MASKING_CHAR=`x`;function getNodePrivacyLevel(e,t,n){if(n&&n.has(e))return n.get(e);var r=getParentNode(e),i=r?getNodePrivacyLevel(r,t,n):t,a=reducePrivacyLevel(getNodeSelfPrivacyLevel(e),i);return n&&n.set(e,a),a}function reducePrivacyLevel(e,t){switch(t){case NodePrivacyLevel.HIDDEN:case NodePrivacyLevel.IGNORE:return t}switch(e){case NodePrivacyLevel.ALLOW:case NodePrivacyLevel.MASK:case NodePrivacyLevel.MASK_USER_INPUT:case NodePrivacyLevel.HIDDEN:case NodePrivacyLevel.IGNORE:return e;default:return t}}function getNodeSelfPrivacyLevel(e){if(isElementNode(e)){var t=e.getAttribute(PRIVACY_ATTR_NAME);if(e.tagName===`BASE`)return NodePrivacyLevel.ALLOW;if(e.tagName===`INPUT`){var n=e;if(n.type===`password`||n.type===`email`||n.type===`tel`||n.type===`hidden`)return NodePrivacyLevel.MASK;var r=n.getAttribute(`autocomplete`);if(r&&r.indexOf(`cc-`)===0)return NodePrivacyLevel.MASK}if(t===`hidden`||e.classList.contains(`dd-privacy-hidden`))return NodePrivacyLevel.HIDDEN;if(t===`mask`||e.classList.contains(`dd-privacy-mask`))return NodePrivacyLevel.MASK;if(t===`mask-user-input`||e.classList.contains(`dd-privacy-mask-user-input`))return NodePrivacyLevel.MASK_USER_INPUT;if(t===`allow`||e.classList.contains(`dd-privacy-allow`))return NodePrivacyLevel.ALLOW;if(shouldIgnoreElement(e))return NodePrivacyLevel.IGNORE}}function shouldMaskNode(e,t){switch(t){case NodePrivacyLevel.MASK:case NodePrivacyLevel.HIDDEN:case NodePrivacyLevel.IGNORE:return!0;case NodePrivacyLevel.MASK_USER_INPUT:return isTextNode(e)?isFormElement$1(e.parentNode):isFormElement$1(e);default:return!1}}function isFormElement$1(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;var t=e;if(t.tagName===`INPUT`)switch(t.type){case`button`:case`color`:case`reset`:case`submit`:return!1}return!!FORM_PRIVATE_TAG_NAMES[t.tagName]}var censorText=function(e){return e.replace(/\S/g,TEXT_MASKING_CHAR)};function getTextContent(e,t,n){var r,i=e.parentElement?.tagName,a=e.textContent||``;if(!t||a.trim()){var o=n;if(i===`SCRIPT`)a=`***`;else if(o===NodePrivacyLevel.HIDDEN)a=`***`;else if(shouldMaskNode(e,o)){if(i===`DATALIST`||i===`SELECT`||i===`OPTGROUP`){if(!a.trim())return}else a=i===`OPTION`?`***`:censorText(a)}return a}}function shouldIgnoreElement(e){if(e.nodeName===`SCRIPT`)return!0;if(e.nodeName===`LINK`){var t=i(`rel`);return/preload|prefetch/i.test(t)&&i(`as`)===`script`||t===`shortcut icon`||t===`icon`}if(e.nodeName===`META`){var n=i(`name`),t=i(`rel`),r=i(`property`);return/^msapplication-tile(image|color)$/.test(n)||n===`application-name`||t===`icon`||t===`apple-touch-icon`||t===`shortcut icon`||n===`keywords`||n===`de
128scription`||/^(og|twitter|fb):/.test(r)||/^(og|twitter):/.test(n)||n===`pinterest`||n===`robots`||n===`googlebot`||n===`bingbot`||e.hasAttribute(`http-equiv`)||n===`author`||n===`generator`||n===`framework`||n===`publisher`||n===`progid`||/^article:/.test(r)||/^product:/.test(r)||n===`google-site-verification`||n===`yandex-verification`||n===`csrf-token`||n===`p:domain_verify`||n===`verify-v1`||n===`verification`||n===`shopify-checkout-api-token`}function i(t){return(e.getAttribute(t)||``).toLowerCase()}return!1}var serializedNodeIds=new WeakMap;function hasSerializedNode(e){return serializedNodeIds.has(e)}function nodeAndAncestorsHaveSerializedNode(e){for(var t=e;t;){if(!hasSerializedNode(t)&&!isNodeShadowRoot(t))return!1;t=getParentNode(t)}return!0}function getSerializedNodeId(e){return serializedNodeIds.get(e)}function setSerializedNodeId(e,t){serializedNodeIds.set(e,t)}function getElementInputValue(e,t){var n=e.tagName,r=e.value;if(shouldMaskNode(e,t)){var i=e.type;return n===`INPUT`&&(i===`button`||i===`submit`||i===`reset`)?r:!r||n===`OPTION`?void 0:`***`}if(n===`OPTION`||n===`SELECT`)return e.value;if(n===`INPUT`||n===`TEXTAREA`)return r}var URL_IN_CSS_REF=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,ABSOLUTE_URL=/^[A-Za-z]+:|^\/\//,DATA_URI=/^data:.*,/i;function switchToAbsoluteUrl(e,t){return e.replace(URL_IN_CSS_REF,function(e,n,r,i,a,o){var c=r||a||o;if(!t||!c||ABSOLUTE_URL.test(c)||DATA_URI.test(c))return e;var u=n||i||``;return`url(${u}${makeUrlAbsolute(c,t)}${u})`})}function makeUrlAbsolute(e,t){try{return buildUrl(e,t).href}catch{return e}}var TAG_NAME_REGEX=/[^a-z1-6-_]/;function getValidTagName(e){var t=e.toLowerCase().trim();return TAG_NAME_REGEX.test(t)?`div`:t}function censoredImageForSize(e,t){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${t}' style='background-color:silver'%3E%3C/svg%3E`}function serializeStyleSheets(e){if(e!==void 0&&e.length!==0)return e.map(function(e){var t=e.cssRules||e.rules;return{cssRules:Array.from(t,function(e){return e.cssText}),disabled:e.disabled||void 0,media:e.media.length>0?Array.from(e.media):void 0}})}function serializeAttribute(e,t,n,r){if(t===NodePrivacyLevel.HIDDEN)return null;var i=e.getAttribute(n);if(t===NodePrivacyLevel.MASK&&n!==`data-dd-privacy`&&!STABLE_ATTRIBUTES.includes(n)&&n!==r.actionNameAttribute){var a=e.tagName;switch(n){case`title`:case`alt`:case`placeholder`:return`***`}if(a===`IMG`&&(n===`src`||n===`srcset`)){var o=e;if(o.naturalWidth>0)return censoredImageForSize(o.naturalWidth,o.naturalHeight);var c=e.getBoundingClientRect(),u=c.width,K=c.height;return u>0||K>0?censoredImageForSize(u,K):CENSORED_IMG_MARK}if(a===`SOURCE`&&(n===`src`||n===`srcset`))return CENSORED_IMG_MARK;if(a===`A`&&n===`href`||i&&startsWith(n,`data-`))return`***`}return!i||typeof i!=`string`?i:i.length>1e5&&i.slice(0,5)===`data:`?`data:truncated`:i}function serializeAttributes(e,t,n){var r;if(t===NodePrivacyLevel.HIDDEN)return{};for(var i={},a=getValidTagName(e.tagName),o=e.ownerDocument,c=0;c<e.attributes.length;c+=1){var u=e.attributes.item(c).name,K=serializeAttribute(e,t,u,n.configuration);K!==null&&(i[u]=K)}if(e.value&&(a===`textarea`||a===`select`||a===`option`||a===`input`)){var Y=getElementInputValue(e,t);Y!==void 0&&(i.value=Y)}if(a===`option`&&t===NodePrivacyLevel.ALLOW){var X=e;X.selected&&(i.selected=X.selected)}if(a===`link`){var ee=Array.from(o.styleSheets).find(function(t){return t.href===e.href}),te=getCssRulesString(ee);te&&ee&&!isExperimentalFeatureEnabled(ExperimentalFeature.DISABLE_REPLAY_INLINE_CSS)&&(i._cssText=te)}if(a===`style`&&e.sheet){var te=getCssRulesString(e.sheet);te&&(i._cssText=te)}var ce=e;a===`input`&&(ce.type===`radio`||ce.type===`checkbox`)&&(t===NodePrivacyLevel.ALLOW?i.checked=!!ce.checked:shouldMaskNode(ce,t)&&delete i.checked),(a===`audio`||a===`video`)&&(i.rr_mediaState=e.paused?`paused`:`played`);var ue,de,fe=n.serializationContext;switch(fe.status){case 0:ue=Math.round(e.scrollTop),de=Math.round(e.scrollLeft),(ue||de)&&fe.elementsScrollPositions.set(e,{scrollTop:ue,scrollLeft:de});break;case 1:fe.elementsScrollPositions.has(e)&&(r=fe.elementsScrollPositions.get(e),ue=r.scrollTop,de=r.scrollLeft)}return de&&(i.rr_scrollLeft=de),ue&&(i.rr_scrollTop=ue),i}function getCssRulesString(e){if(!e)return null;var t;try{t=e.rules||e.cssRules}catch{}return t?switchToAbsoluteUrl(Array.from(t,isSafari()?getCssRuleStringForSafari:getCssRuleString).join(``),e.href):null}function getCssRuleStringForSafari(e){return isCSSStyleRule(e)&&e.selectorText.includes(`:`)?e.cssText.replace(/(\[[\w-]+[^\\])(:[^\]]+\])/g,`$1\\$2`):getCssRuleString(e)}function getCssRuleString(e){return isCSSImportRule(e)&&getCssRulesString(e.styleSheet)||e.cssText}function isCSSImportRule(e){return`styleSheet`in e}function isCSSStyleRule(e){return`selectorText`in e}function serializeNodeWithId(e,t){var n=serializeNode(e,t);if(!n)return null;var r=getSerializedNodeId(e)||generateNextId(),i=n;return i.id=r,setSerializedNodeId(e,r),t.serializedNodeIds&&t.serializedNodeIds.add(r),i}var _nextId=1;function generateNextId(){return _nextId++}function serializeChildNodes(e,t){var n=[];return forEachChildNodes(e,function(e){var r=serializeNodeWithId(e,t);r&&n.push(r)}),n}function serializeNode(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return serializeDocumentNode(e,t);case e.DOCUMENT_FRAGMENT_NODE:return serializeDocumentFragmentNode(e,t);case e.DOCUMENT_TYPE_NODE:return serializeDocumentTypeNode(e);case e.ELEMENT_NODE:return serializeElementNode(e,t);case e.TEXT_NODE:return serializeTextNode(e,t);case e.CDATA_SECTION_NODE:return serializeCDataNode()}}function serializeDocumentNode(e,t){return{type:NodeType.Document,childNodes:serializeChildNodes(e,t),adoptedStyleSheets:serializeStyleSheets(e.adoptedStyleSheets)}}function serializeDocumentFragmentNode(e,t){var n=isNodeShadowRoot(e);return n&&t.serializationContext.shadowRootsController.addShadowRoot(e),{type:NodeType.DocumentFragment,childNodes:serializeChildNodes(e,t),isShadowRoot:n,adoptedStyleSheets:n?serializeStyleSheets(e.adoptedStyleSheets):void 0}}function serializeDocumentTypeNode(e){return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId}}function serializeElementNode(e,t){var n,r=getValidTagName(e.tagName),i=isSVGElement(e)||void 0,a=reducePrivacyLevel(getNodeSelfPrivacyLevel(e),t.parentNodePrivacyLevel);if(a===NodePrivacyLevel.HIDDEN){var o=e.getBoundingClientRect(),c=o.width,u=o.height;return{type:NodeType.Element,tagName:r,attributes:(n={rr_width:`${c}px`,rr_height:`${u}px`},n[PRIVACY_ATTR_NAME]=PRIVACY_ATTR_VALUE_HIDDEN,n),childNodes:[],isSVG:i}}if(a!==NodePrivacyLevel.IGNORE){var K=serializeAttributes(e,a,t),Y=[];if(hasChildNodes(e)&&r!==`style`){var X=void 0;X=t.parentNodePrivacyLevel===a&&t.ignoreWhiteSpace===(r===`head`)?t:assign({},t,{parentNodePrivacyLevel:a,ignoreWhiteSpace:r===`head`}),Y=serializeChildNodes(e,X)}return{type:NodeType.Element,tagName:r,attributes:K,childNodes:Y,isSVG:i}}}function isSVGElement(e){return e.tagName===`svg`||e instanceof SVGElement}function serializeTextNode(e,t){var n=getTextContent(e,t.ignoreWhiteSpace||!1,t.parentNodePrivacyLevel);if(n!==void 0)return{type:NodeType.Text,textContent:n}}function serializeCDataNode(){return{type:NodeType.CDATA,textContent:``}}function serializeDocument(e,t,n){return serializeNodeWithId(e,{serializationContext:n,parentNodePrivacyLevel:t.defaultPrivacyLevel,configuration:t})}function isTouchEvent(e){return!!e.changedTouches}function getEventTarget(e){return e.composed===!0&&isNodeShadowHost(e.target)?e.composedPath()[0]:e.target}var TOLERANCE=25;function isVisualViewportFactoredIn(e){return Math.abs(e.pageTop-e.offsetTop-window.scrollY)>TOLERANCE||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>TOLERANCE}var convertMouseEventToLayoutCoordinates=function(e,t){var n=window.visualVie
128wport,r={layoutViewportX:e,layoutViewportY:t,visualViewportX:e,visualViewportY:t};if(n)isVisualViewportFactoredIn(n)?(r.layoutViewportX=Math.round(e+n.offsetLeft),r.layoutViewportY=Math.round(t+n.offsetTop)):(r.visualViewportX=Math.round(e-n.offsetLeft),r.visualViewportY=Math.round(t-n.offsetTop));else return r;return r},getVisualViewport=function(e){return{scale:e.scale,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,pageLeft:e.pageLeft,pageTop:e.pageTop,height:e.height,width:e.width}},MOUSE_MOVE_OBSERVER_THRESHOLD=50;function initMoveObserver(e,t){var n=throttle$2(function(e){var n=getEventTarget(e);if(hasSerializedNode(n)){var r=tryToComputeCoordinates(e);if(!r)return;t([{id:getSerializedNodeId(n),timeOffset:0,x:r.x,y:r.y}],isTouchEvent(e)?IncrementalSource.TouchMove:IncrementalSource.MouseMove)}},MOUSE_MOVE_OBSERVER_THRESHOLD,{trailing:!1}),r=n.throttled,i=n.cancel,a=addEventListeners(e,document,[DOM_EVENT.MOUSE_MOVE,DOM_EVENT.TOUCH_MOVE],r,{capture:!0,passive:!0}).stop;return function(){a(),i()}}function tryToComputeCoordinates(e){var t=isTouchEvent(e)?e.changedTouches[0]:e,n=t.clientX,r=t.clientY;if(window.visualViewport){var i=convertMouseEventToLayoutCoordinates(n,r),a=i.visualViewportX,o=i.visualViewportY;n=a,r=o}if(!Number.isFinite(n)||!Number.isFinite(r)){e.isTrusted&&addTelemetryDebug(`mouse/touch event without x/y`);return}return{x:n,y:r}}var SCROLL_OBSERVER_THRESHOLD=100;function initScrollObserver(e,t,n,r){var i=throttle$2(function(e){var i=getEventTarget(e);if(i&&getNodePrivacyLevel(i,n)!==NodePrivacyLevel.HIDDEN&&hasSerializedNode(i)){var a=getSerializedNodeId(i),o=i===document?{scrollTop:getScrollY(),scrollLeft:getScrollX()}:{scrollTop:Math.round(i.scrollTop),scrollLeft:Math.round(i.scrollLeft)};r.set(i,o),t({id:a,x:o.scrollLeft,y:o.scrollTop})}},SCROLL_OBSERVER_THRESHOLD),a=i.throttled,o=i.cancel,c=addEventListener(e,document,DOM_EVENT.SCROLL,a,{capture:!0,passive:!0}).stop;return function(){c(),o()}}var _a={},eventTypeToMouseInteraction=(_a[DOM_EVENT.POINTER_UP]=MouseInteractionType.MouseUp,_a[DOM_EVENT.MOUSE_DOWN]=MouseInteractionType.MouseDown,_a[DOM_EVENT.CLICK]=MouseInteractionType.Click,_a[DOM_EVENT.CONTEXT_MENU]=MouseInteractionType.ContextMenu,_a[DOM_EVENT.DBL_CLICK]=MouseInteractionType.DblClick,_a[DOM_EVENT.FOCUS]=MouseInteractionType.Focus,_a[DOM_EVENT.BLUR]=MouseInteractionType.Blur,_a[DOM_EVENT.TOUCH_START]=MouseInteractionType.TouchStart,_a[DOM_EVENT.TOUCH_END]=MouseInteractionType.TouchEnd,_a);function initMouseInteractionObserver(e,t,n){return addEventListeners(e,document,Object.keys(eventTypeToMouseInteraction),function(r){var i=getEventTarget(r);if(getNodePrivacyLevel(i,e.defaultPrivacyLevel)!==NodePrivacyLevel.HIDDEN&&hasSerializedNode(i)){var a=getSerializedNodeId(i),o=eventTypeToMouseInteraction[r.type],c;if(o!==MouseInteractionType.Blur&&o!==MouseInteractionType.Focus){var u=tryToComputeCoordinates(r);if(!u)return;c={id:a,type:o,x:u.x,y:u.y}}else c={id:a,type:o};t(assign({id:n.getIdForEvent(r)},assembleIncrementalSnapshot(IncrementalSource.MouseInteraction,c)))}},{capture:!0,passive:!0}).stop}function initInputObserver(e,t,n){n===void 0&&(n=document);var r=e.defaultPrivacyLevel,i=new WeakMap,a=n!==document,o=addEventListeners(e,n,a?[DOM_EVENT.CHANGE]:[DOM_EVENT.INPUT,DOM_EVENT.CHANGE],function(e){var t=getEventTarget(e);(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)&&K(t)},{capture:!0,passive:!0}).stop,c;if(a)c=noop$1;else{var u=[instrumentSetter(HTMLInputElement.prototype,`value`,K),instrumentSetter(HTMLInputElement.prototype,`checked`,K),instrumentSetter(HTMLSelectElement.prototype,`value`,K),instrumentSetter(HTMLTextAreaElement.prototype,`value`,K),instrumentSetter(HTMLSelectElement.prototype,`selectedIndex`,K)];c=function(){u.forEach(function(e){return e.stop()})}}return function(){c(),o()};function K(e){var t=getNodePrivacyLevel(e,r);if(t!==NodePrivacyLevel.HIDDEN){var n=e.type,i;if(n===`radio`||n===`checkbox`){if(shouldMaskNode(e,t))return;i={isChecked:e.checked}}else{var a=getElementInputValue(e,t);if(a===void 0)return;i={text:a}}Y(e,i);var o=e.name;n===`radio`&&o&&e.checked&&forEach$2(document.querySelectorAll(`input[type="radio"][name="${cssEscape(o)}"]`),function(t){t!==e&&Y(t,{isChecked:!1}
128)})}}function Y(e,n){if(hasSerializedNode(e)){var r=i.get(e);(!r||r.text!==n.text||r.isChecked!==n.isChecked)&&(i.set(e,n),t(assign({id:getSerializedNodeId(e)},n)))}}}function initStyleSheetObserver(e){function t(e,t){e&&hasSerializedNode(e.ownerNode)&&t(getSerializedNodeId(e.ownerNode))}var n=[instrumentMethod(CSSStyleSheet.prototype,`insertRule`,function(n){var r=n.target,i=n.parameters,a=i[0],o=i[1];t(r,function(t){return e({id:t,adds:[{rule:a,index:o}]})})}),instrumentMethod(CSSStyleSheet.prototype,`deleteRule`,function(n){var r=n.target,i=n.parameters[0];t(r,function(t){return e({id:t,removes:[{index:i}]})})})];typeof CSSGroupingRule<`u`?r(CSSGroupingRule):(r(CSSMediaRule),r(CSSSupportsRule));function r(r){n.push(instrumentMethod(r.prototype,`insertRule`,function(n){var r=n.target,i=n.parameters,a=i[0],o=i[1];t(r.parentStyleSheet,function(t){var n=getPathToNestedCSSRule(r);n&&(n.push(o||0),e({id:t,adds:[{rule:a,index:n}]}))})}),instrumentMethod(r.prototype,`deleteRule`,function(n){var r=n.target,i=n.parameters[0];t(r.parentStyleSheet,function(t){var n=getPathToNestedCSSRule(r);n&&(n.push(i),e({id:t,removes:[{index:n}]}))})}))}return function(){return n.forEach(function(e){return e.stop()})}}function getPathToNestedCSSRule(e){for(var t=[],n=e;n.parentRule;){var r=Array.from(n.parentRule.cssRules).indexOf(n);t.unshift(r),n=n.parentRule}if(n.parentStyleSheet){var i=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return t.unshift(i),t}}function initMediaInteractionObserver(e,t,n){return addEventListeners(e,document,[DOM_EVENT.PLAY,DOM_EVENT.PAUSE],function(e){var r=getEventTarget(e);r&&getNodePrivacyLevel(r,n)!==NodePrivacyLevel.HIDDEN&&hasSerializedNode(r)&&t({id:getSerializedNodeId(r),type:e.type===DOM_EVENT.PLAY?MediaInteractionType.Play:MediaInteractionType.Pause})},{capture:!0,passive:!0}).stop}function initFrustrationObserver(e,t,n){return e.subscribe(12,function(e){var r,i,a;e.rawRumEvent.type===`action`&&e.rawRumEvent.action.type===`click`&&e.rawRumEvent.action.frustration?.type?.length&&`events`in e.domainContext&&e.domainContext.events?.length&&t({timestamp:e.rawRumEvent.date,type:RecordType.FrustrationRecord,data:{frustrationTypes:e.rawRumEvent.action.frustration.type,recordIds:e.domainContext.events.map(function(e){return n.getIdForEvent(e)})}})}).unsubscribe}var VISUAL_VIEWPORT_OBSERVER_THRESHOLD=200;function initViewportResizeObserver(e,t){return initViewportObservable(e).subscribe(t).unsubscribe}function initVisualViewportResizeObserver(e,t){var n=window.visualViewport;if(!n)return noop$1;var r=throttle$2(function(){t(getVisualViewport(n))},VISUAL_VIEWPORT_OBSERVER_THRESHOLD,{trailing:!1}),i=r.throttled,a=r.cancel,o=addEventListeners(e,n,[DOM_EVENT.RESIZE,DOM_EVENT.SCROLL],i,{capture:!0,passive:!0}).stop;return function(){o(),a()}}var MUTATION_PROCESS_MAX_DELAY=100;function createMutationBatch(e){var t=noop$1,n=[];function r(){t(),e(n),n=[]}return{addMutations:function(e){n.length===0&&(t=requestIdleCallback(r,{timeout:MUTATION_PROCESS_MAX_DELAY})),n.push.apply(n,e)},flush:r,stop:function(){t()}}}function requestIdleCallback(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){var n=window.requestIdleCallback(monitor(e),t);return function(){return window.cancelIdleCallback(n)}}
128var r=window.requestAnimationFrame(monitor(e));return function(){return window.cancelAnimationFrame(r)}}function initMutationObserver(e,t,n,r){var i=getMutationObserverConstructor();if(!i)return{stop:noop$1,flush:noop$1};var a=createMutationBatch(function(r){processMutations(r.concat(o.takeRecords()),e,t,n)}),o=new i(monitor(a.addMutations));return o.observe(r,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:function(){o.disconnect(),a.stop()},flush:function(){a.flush()}}}function processMutations(e,t,n,r){var i=new Map;e.filter(function(e){return e.type===`childList`}).forEach(function(e){e.removedNodes.forEach(function(e){traverseRemovedShadowDom(e,r.removeShadowRoot)})});var a=e.filter(function(e){return e.target.isConnected&&nodeAndAncestorsHaveSerializedNode(e.target)&&getNodePrivacyLevel(e.target,n.defaultPrivacyLevel,i)!==NodePrivacyLevel.HIDDEN}),o=processChildListMutations(a.filter(function(e){return e.type===`childList`}),n,r,i),c=o.adds,u=o.removes,K=o.hasBeenSerialized,Y=processCharacterDataMutations(a.filter(function(e){return e.type===`characterData`&&!K(e.target)}),n,i),X=processAttributesMutations(a.filter(function(e){return e.type===`attributes`&&!K(e.target)}),n,i);(Y.length||X.length||u.length||c.length)&&t({adds:c,removes:u,texts:Y,attributes:X})}function processChildListMutations(e,t,n,r){for(var i=new Set,a=new Map,o=function(e){e.addedNodes.forEach(function(e){i.add(e)}),e.removedNodes.forEach(function(t){i.has(t)||a.set(t,e.target),i.delete(t)})},c=0,u=e;c<u.length;c++){var K=u[c];o(K)}var Y=Array.from(i);sortAddedAndMovedNodes(Y);for(var X=new Set,ee=[],te=0,ce=Y;te<ce.length;te++){var ue=ce[te];if(!Te(ue)){var de=getNodePrivacyLevel(ue.parentNode,t.defaultPrivacyLevel,r);if(de!==NodePrivacyLevel.HIDDEN&&de!==NodePrivacyLevel.IGNORE){var fe=serializeNodeWithId(ue,{serializedNodeIds:X,parentNodePrivacyLevel:de,serializationContext:{status:2,shadowRootsController:n},configuration:t});if(fe){var me=getParentNode(ue);ee.push({nextId:Oe(ue),parentId:getSerializedNodeId(me),node:fe})}}}}var ge=[];return a.forEach(function(e,t){hasSerializedNode(t)&&ge.push({parentId:getSerializedNodeId(e),id:getSerializedNodeId(t)})}),{adds:ee,removes:ge,hasBeenSerialized:Te};function Te(e){return hasSerializedNode(e)&&X.has(getSerializedNodeId(e))}function Oe(e){for(var t=e.nextSibling;t;){if(hasSerializedNode(t))return getSerializedNodeId(t);t=t.nextSibling}return null}}function processCharacterDataMutations(e,t,n){for(var r,i=[],a=new Set,o=e.filter(function(e){return!a.has(e.target)&&(a.add(e.target),!0)}),c=0,u=o;c<u.length;c++){var K=u[c];if(K.target.textContent!==K.oldValue){var Y=getNodePrivacyLevel(getParentNode(K.target),t.defaultPrivacyLevel,n);Y!==NodePrivacyLevel.HIDDEN&&Y!==NodePrivacyLevel.IGNORE&&i.push({id:getSerializedNodeId(K.target),value:getTextContent(K.target,!1,Y)??null})}}return i}function processAttributesMutations(e,t,n){for(var r=[],i=new Map,a=e.filter(function(e){var t=i.get(e.target);return!t?.has(e.attributeName)&&(t?t.add(e.attributeName):i.set(e.target,new Set([e.attributeName])),!0)}),o=new Map,c=0,u=a;c<u.length;c++){var K=u[c];if(K.target.getAttribute(K.attributeName)!==K.oldValue){var Y=getNodePrivacyLevel(K.target,t.defaultPrivacyLevel,n),X=serializeAttribute(K.target,Y,K.attributeName,t),ee=void 0;if(K.attributeName===`value`){var te=getElementInputValue(K.target,Y);if(te===void 0)continue;ee=te}else ee=typeof X==`string`?X:null;var ce=o.get(K.target);ce||(ce={id:getSerializedNodeId(K.target),attributes:{}},r.push(ce),o.set(K.target,ce)),ce.attributes[K.attributeName]=ee}}return r}function sortAddedAndMovedNodes(e){e.sort(function(e,t){var n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_CONTAINS||n&Node.DOCUMENT_POSITION_FOLLOWING?1:n&Node.DOCUMENT_POSITION_PRECEDING?-1:0})}function traverseRemovedShadowDom(e,t){isNodeShadowHost(e)&&t(e.shadowRoot),forEachChildNodes(e,function(e){return traverseRemovedShadowDom(e,t)})}function initFocusObserver(e,t){return addEventListeners(e,window,[DOM_EVENT.FOCUS,DOM_EVENT.BLUR],function(){t({has_focus:document.hasFocus()})}).stop}function initRecordIds(){var e=new WeakMap,t=1;return{getIdForEvent:function(n){return e.has(n)||e.set(n,t++),e.get(n)}}}function initViewEndObserver(e,t){return e.subscribe(5,function(){t({timestamp:timeStampNow(),type:RecordType.ViewEnd})}).unsubscribe}function initObservers(e,t){var n=initRecordIds(),r=initMutationObserver(t.mutationCb,t.configuration,t.shadowRootsController,document),i=initMoveObserver(e,t.mousemoveCb),a=initMouseInteractionObserver(e,t.mouseInteractionCb,n),o=initScrollObserver(e,t.scrollCb,t.configuration.defaultPrivacyLevel,t.elementsScrollPositions),c=initViewportResizeObserver(e,t.viewportResizeCb),u=initInputObserver(e,t.inputCb),K=initMediaInteractionObserver(e,t.mediaInteractionCb,t.configuration.defaultPrivacyLevel),Y=initStyleSheetObserver(t.styleSheetCb),X=initFocusObserver(e,t.focusCb),ee=initVisualViewportResizeObserver(e,t.visualVie
128wportResizeCb),te=initFrustrationObserver(t.lifeCycle,t.frustrationCb,n),ce=initViewEndObserver(t.lifeCycle,t.viewEndCb);return{flush:function(){r.flush()},stop:function(){r.stop(),i(),a(),o(),c(),u(),K(),Y(),X(),ee(),te(),ce()}}}function createElementsScrollPositions(){var e=new WeakMap;return{set:function(t,n){(t!==document||document.scrollingElement)&&e.set(t===document?document.scrollingElement:t,n)},get:function(t){return e.get(t)},has:function(t){return e.has(t)}}}var initShadowRootsController=function(e,t){var n=t.mutationCb,r=t.inputCb,i=new Map,a={addShadowRoot:function(t){if(!i.has(t)){var o=initMutationObserver(n,e,a,t),c=o.stop,u=o.flush,K=initInputObserver(e,r,t);i.set(t,{flush:u,stop:function(){c(),K()}})}},removeShadowRoot:function(e){var t=i.get(e);t&&(t.stop(),i.delete(e))},stop:function(){i.forEach(function(e){var t=e.stop;return t()})},flush:function(){i.forEach(function(e){var t=e.flush;return t()})}};return a};function startFullSnapshots(e,t,n,r,i,a){var o=function(n,i){n===void 0&&(n=timeStampNow()),i===void 0&&(i={status:0,elementsScrollPositions:e,shadowRootsController:t});var a=getViewportDimension(),o=a.width,c=[{data:{height:a.height,href:window.location.href,width:o},type:RecordType.Meta,timestamp:n},{data:{has_focus:document.hasFocus()},type:RecordType.Focus,timestamp:n},{data:{node:serializeDocument(document,r,i),initialOffset:{left:getScrollX(),top:getScrollY()}},type:RecordType.FullSnapshot,timestamp:n}];return window.visualViewport&&c.push({data:getVisualViewport(window.visualViewport),type:RecordType.VisualViewport,timestamp:n}),c};return a(o()),{stop:n.subscribe(3,function(n){i(),a(o(n.startClocks.timeStamp,{shadowRootsController:t,status:1,elementsScrollPositions:e}))}).unsubscribe}}function record(e){var t=e.emit,n=e.configuration,r=e.lifeCycle;if(!t)throw Error(`emit function is required`);var i=function(n){t(n),sendToExtension(`record`,{record:n}),addRecord(e.viewContexts.findView().id)},a=createElementsScrollPositions(),o=function(e){i(assembleIncrementalSnapshot(IncrementalSource.Mutation,e))},c=function(e){return i(assembleIncrementalSnapshot(IncrementalSource.Input,e))},u=initShadowRootsController(n,{mutationCb:o,inputCb:c}),K=startFullSnapshots(a,u,r,n,Y,function(e){return e.forEach(function(e){return i(e)})}).stop;function Y(){u.flush(),te()}var X=initObservers(n,{lifeCycle:e.lifeCycle,configuration:n,elementsScrollPositions:a,inputCb:c,mediaInteractionCb:function(e){return i(assembleIncrementalSnapshot(IncrementalSource.MediaInteraction,e))},mouseInteractionCb:function(e){return i(e)},mousemoveCb:function(e,t){return i(assembleIncrementalSnapshot(t,{positions:e}))},mutationCb:o,scrollCb:function(e){return i(assembleIncrementalSnapshot(IncrementalSource.Scroll,e))},styleSheetCb:function(e){return i(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule,e))},viewportResizeCb:function(e){return i(assembleIncrementalSnapshot(IncrementalSource.ViewportResize,e))},frustrationCb:function(e){return i(e)},focusCb:function(e){return i({data:e,type:RecordType.Focus,timestamp:timeStampNow()})},visualViewportResizeCb:function(e){i({data:e,type:RecordType.VisualViewport,timestamp:timeStampNow()})},viewEndCb:function(e){Y(),i(e)},shadowRootsController:u}),ee=X.stop,te=X.flush;return{stop:function(){u.stop(),ee(),K()},flushMutations:Y,shadowRootsController:u}}function buildReplayPayload(e,t,n){var r=new FormData;r.append(`segment`,new Blob([e],{type:`application/octet-stream`}),`${t.session.id}-${t.start}`);var i=assign({raw_segment_size:n,compressed_segment_size:e.byteLength},t),a=JSON.stringify(i);return r.append(`event`,new Blob([a],{type:`application/json`})),{data:r,bytesCount:e.byteLength}}var Segment$1=function(){function e(e,t,n){this.encoder=e,this.encodedBytesCount=0;var r=t.view.id;this.metadata=assign({start:1/0,end:-1/0,creation_reason:n,records_count:0,has_full_snapshot:!1,index_in_view:getSegmentsCount(r),source:`browser`},t),addSegment(r)}return e.prototype.addRecord=function(e,t){var n=this,r;this.metadata.start=Math.min(this.metadata.start,e.timestamp),this.metadata.end=Math.max(this.metadata.end,e.timestamp),this.metadata.records_count+=1,(r=this.metadata).has_full_snapshot||(r.has_full_snapshot=e.type===RecordType.FullSnapshot);var i=this.encoder.isEmpty?`{"records":[`:`,`;this.encoder.write(i+JSON.stringify(e),function(e){n.encodedBytesCount+=e,t(n.encodedBytesCount)})},e.prototype.flush=function(e){var t=this;if(this.encoder.isEmpty)throw Error(`Empty segment flushed`);this.encoder.write(`],${JSON.stringify(this.metadata).slice(1)}
129`),this.encoder.finish(function(n){addWroteData(t.metadata.view.id,n.rawBytesCount),e(t.metadata,n)})},e}(),SEGMENT_DURATION_LIMIT=30*ONE_SECOND,SEGMENT_BYTES_LIMIT=6e4;function startSegmentCollection(e,t,n,r,i,a){return doStartSegmentCollection(e,function(){return computeSegmentContext(t.applicationId,n,r)},i,a)}function doStartSegmentCollection(e,t,n,r){var i={status:0,nextSegmentCreationReason:`init`},a=e.subscribe(3,function(){c(`view_change`)}).unsubscribe,o=e.subscribe(11,function(e){c(e.reason)}).unsubscribe;function c(e){i.status===1&&(i.segment.flush(function(t,r){var i=buildReplayPayload(r.output,t,r.rawBytesCount);isPageExitReason(e)?n.sendOnExit(i):n.send(i)}),clearTimeout$1(i.expirationTimeoutId)),i=e===`stop`?{status:2}:{status:0,nextSegmentCreationReason:e}}return{addRecord:function(e){if(i.status!==2){if(i.status===0){var n=t();if(!n)return;i={status:1,segment:new Segment$1(r,n,i.nextSegmentCreationReason),expirationTimeoutId:setTimeout$1(function(){c(`segment_duration_limit`)},SEGMENT_DURATION_LIMIT)}}i.segment.addRecord(e,function(e){e>SEGMENT_BYTES_LIMIT&&c(`segment_bytes_limit`)})}},stop:function(){c(`stop`),a(),o()}}}function computeSegmentContext(e,t,n){var r=t.findTrackedSession(),i=n.findView();if(r&&i)return{application:{id:e},session:{id:r.id},view:{id:i.id}}}function startRecordBridge(e){var t=getEventBridge();return{addRecord:function(n){var r=e.findView();t.send(`record`,n,r.id)}}}function startRecording(e,t,n,r,i,a){var o=[],c=a||createHttpRequest(t,t.sessionReplayEndpointBuilder,SEGMENT_BYTES_LIMIT,function(t){e.notify(14,{error:t}),addTelemetryDebug(`Error reported to customer`,{"error.message":t.message})}),u;if(canUseEventBridge())u=startRecordBridge(r).addRecord;else{var K=startSegmentCollection(e,t,n,r,c,i);u=K.addRecord,o.push(K.stop)}var Y=record({emit:u,configuration:t,lifeCycle:e,viewContexts:r}).stop;return o.push(Y),{stop:function(){o.forEach(function(e){return e()})}}}function isBrowserSupported(){return typeof Array.from==`function`&&typeof CSSSupportsRule==`function`&&typeof URL.createObjectURL==`function`&&`forEac
vendor: 23,179 bytes, line 129
129h`in NodeList.prototype}function getSessionReplayLink(e,t,n,r){var i=t.findTrackedSession(),a=getErrorType(i,r);return getSessionReplayUrl(e,{viewContext:n.findView(),errorType:a,session:i})}function getErrorType(e,t){if(!isBrowserSupported())return`browser-not-supported`;if(!e)return`rum-not-tracked`;if(!e.sessionReplayAllowed)return`incorrect-session-plan`;if(!t)return`replay-not-started`}function createDeflateEncoder(e,t,n){var r=0,i=[],a,o=0,c=[],u=addEventListener(e,t,`message`,function(e){var t=e.data;if(t.type===`wrote`&&t.streamId===n){r+=t.additionalBytesCount,i.push(t.result),a=t.trailer;var o=c.shift();o&&o.id===t.id?o.writeCallback?o.writeCallback(t.result.byteLength):o.finishCallback&&o.finishCallback():(u(),addTelemetryDebug(`Worker responses received out of order.`))}}).stop;function K(){var e=i.length===0?new Uint8Array:concatBuffers(i.concat(a)),t={rawBytesCount:r,output:e,outputBytesCount:e.byteLength,encoding:`deflate`};return r=0,i=[],t}function Y(){o>0&&(t.postMessage({action:`reset`,streamId:n}),o=0)}return{isAsync:!0,get isEmpty(){return o===0},write:function(e,r){t.postMessage({action:`write`,id:o,data:e,streamId:n}),c.push({id:o,writeCallback:r,data:e}),o+=1},finish:function(e){Y(),c.length?(c.forEach(function(e){delete e.writeCallback}),c[c.length-1].finishCallback=function(){return e(K())}):e(K())},finishSync:function(){Y();var e=c.map(function(e){return delete e.writeCallback,delete e.finishCallback,e.data}).join(``);return assign(K(),{pendingData:e})},estimateEncodedBytesCount:function(e){return e.length/8},stop:function(){u()}}}var INITIALIZATION_TIME_OUT_DELAY=10*ONE_SECOND;function createDeflateWorker(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob([`!function(){"use strict";function t(t){for(var e=t.reduce((function(t,e){return t+e.length}),0),a=new Uint8Array(e),n=0,r=0,i=t;r<i.length;r++){var s=i[r];a.set(s,n),n+=s.length}return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=256,n=286,r=30,i=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),_=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),l=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=new Array(576);e(o);var d=new Array(60);e(d);var u=new Array(512);e(u);var f=new Array(256);e(f);var c=new Array(29);e(c);var p,g,w,v=new Array(r);function b(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function m(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(v);var y=function(t){return t<256?u[t]:u[256+(t>>>7)]},k=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},z=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,k(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},x=function(t,e,a){z(t,a[2*e],a[2*e+1])},A=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=function(t,e,a){var n,r,s=new Array(16),_=0;for(n=1;n<=i;n++)s[n]=_=_+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=A(s[h]++,h))}},Z=function(t){var e;for(e=0;e<n;e++)t.dyn_ltree[2*e]=0;for(e=0;e<r;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},U=function(t){t.bi_valid>8?k(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},R=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&S(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!S(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},L=function(t,e,n){var r,i,h,l,o=0;if(0!==t.last_lit)do{r=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],i=t.pending_buf[t.l_buf+o],o++,0===r?x(t,i,e):(h=f[i],x(t,h+a+1,e),0!==(l=s[h])&&(i-=c[h],z(t,i,l)),r--,h=y(r),x(t,h,n),0!==(l=_[h])&&(r-=v[h],z(t,r,l)))}while(o<t.last_lit);x(t,256,e)},F=function(t,e){var a,n,r,s=e.dyn_tree,_=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,o=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==s[2*a]?(t.heap[++t.heap_len]=o=a,t.depth[a]=0):s[2*a+1]=0;for(;t.heap_len<2;)s[2*(r=t.heap[++t.heap_len]=o<2?++o:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=_[2*r+1]);for(e.max_code=o,a=t.heap_len>>1;a>=1;a--)R(t,s,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],R(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,s[2*r]=s[2*a]+s[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,s[2*a+1]=s[2*n+1]=r,t.heap[1]=r++,R(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,s,_,h,l=e.dyn_tree,o=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(s=0;s<=i;s++)t.bl_count[s]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=l[2*l[2*(n=t.heap[a])+1]+1]+1)>p&&(s=p,g++),l[2*n+1]=s,n>o||(t.bl_count[s]++,_=0,n>=c&&(_=f[n-c]),h=l[2*n],t.opt_len+=h*(s+_),u&&(t.static_len+=h*(d[2*n+1]+_)));if(0!==g){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(s=p;0!==s;s--)for(n=t.bl_count[s];0!==n;)(r=t.heap[--a])>o||(l[2*r+1]!==s&&(t.opt_len+=(s-l[2*r+1])*l[2*r],l[2*r+1]=s),n--)}}(t,e),E(s,o,t.bl_count)},T=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++_<h&&r===s||(_<l?t.bl_tree[2*r]+=_:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):_<=10?t.bl_tree[34]++:t.bl_tree[36]++,_=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4))},I=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++_<h&&r===s)){if(_<l)do{x(t,r,t.bl_tree)}while(0!=--_);else 0!==r?(r!==i&&(x(t,r,t.bl_tree),_--),x(t,16,t.bl_tree),z(t,_-3,2)):_<=10?(x(t,17,t.bl_tree),z(t,_-3,3)):(x(t,18,t.bl_tree),z(t,_-11,7));_=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4)}},N=!1,O=function(t,e,a,n){z(t,0+(n?1:0),3),function(t,e,a,n){U(t),n&&(k(t,a),k(t,~a)),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a,!0)},D=function(t,e,n,r){var i,s,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),F(t,t.l_desc),F(t,t.d_desc),_=function(t){var e;for(T(t,t.dyn_ltree,t.l_desc.max_code),T(t,t.dyn_dtree,t.d_desc.max_code),F(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*l[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==e?O(t,e,n,r):4===t.strategy||s===i?(z(t,2+(r?1:0),3),L(t,o,d)):(z(t,4+(r?1:0),3),function(t,e,a,n){var r;for(z(t,e-257,5),z(t,a-1,5),z(t,n-4,4),r=0;r<n;r++)z(t,t.bl_tree[2*l[r]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),L(t,t.dyn_ltree,t.dyn_dtree)),Z(t),r&&U(t)},B={_tr_init:function(t){N||(!function(){var t,e,a,l,m,y=new Array(16);for(a=0,l=0;l<28;l++)for(c[l]=a,t=0;t<1<<s[l];t++)f[a++]=l;for(f[a-1]=l,m=0,l=0;l<16;l++)for(v[l]=m,t=0;t<1<<_[l];t++)u[m++]=l;for(m>>=7;l<r;l++)for(v[l]=m<<7,t=0;t<1<<_[l]-7;t++)u[256+m++]=l;for(e=0;e<=i;e++)y[e]=0;for(t=0;t<=143;)o[2*t+1]=8,t++,y[8]++;for(;t<=255;)o[2*t+1]=9,t++,y[9]++;for(;t<=279;)o[2*t+1]=7,t++,y[7]++;for(;t<=287;)o[2*t+1]=8,t++,y[8]++;for(E(o,287,y),t=0;t<r;t++)d[2*t+1]=5,d[2*t]=A(t,5);p=new b(o,s,257,n,i),g=new b(d,_,0,r,i),w=new b(new Array(0),h,0,19,7)}(),N=!0),t.l_desc=new m(t.dyn_ltree,p),t.d_desc=new m(t.dyn_dtree,g),t.bl_desc=new m(t.bl_tree,w),t.bi_buf=0,t.bi_valid=0,Z(t)},_tr_stored_block:O,_tr_flush_block:D,_tr_tally:function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(f[n]+a+1)]++,t.dyn_dtree[2*y(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){z(t,2,3),x(t,256,o),function(t){16===t.bi_valid?(k(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},C=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16|0},H=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),M=function(t,e,a,n){var r=H,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},Y={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},P=B._tr_init,j=B._tr_stored_block,G=B._tr_flush_block,X=B._tr_tally,W=B._tr_align,q=K.Z_NO_FLUSH,J=K.Z_PARTIAL_FLUSH,Q=K.Z_FULL_FLUSH,V=K.Z_FINISH,$=K.Z_BLOCK,tt=K.Z_OK,et=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,nt=K.Z_DATA_ERROR,rt=K.Z_BUF_ERROR,it=K.Z_DEFAULT_COMPRESSION,st=K.Z_FILTERED,_t=K.Z_HUFFMAN_ONLY,ht=K.Z_RLE,lt=K.Z_FIXED,ot=K.Z_DEFAULT_STRATEGY,dt=K.Z_UNKNOWN,ut=K.Z_DEFLATED,ft=258,ct=262,pt=103,gt=113,wt=666,vt=function(t,e){return t.msg=Y[e],e},bt=function(t){return(t<<1)-(t>4?9:0)},mt=function(t){for(var e=t.length;--e>=0;)t[e]=0},yt=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},kt=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},zt=function(t,e){G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,kt(t.strm)},xt=function(t,e){t.pending_buf[t.pending++]=e},At=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,_=t.nice_match,h=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,l=t.window,o=t.w_mask,d=t.prev,u=t.strstart+ft,f=l[i+s-1],c=l[i+s];t.prev_length>=t.good_match&&(r>>=2),_>t.lookahead&&(_=t.lookahead);do{if(l[(a=e)+s]===c&&l[a+s-1]===f&&l[a]===l[i]&&l[++a]===l[i+1]){i+=2,a++;do{}while(l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&i<u);if(n=ft-(u-i),i=u-ft,n>s){if(t.match_start=e,s=n,n>=_)break;f=l[i+s-1],c=l[i+s]}}}while((e=d[e&o])>h&&0!=--r);return s<=t.lookahead?s:t.lookahead},Zt=function(t){var e,a,n,r,i,s,_,h,l,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-ct)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,_=t.window,h=t.strstart+t.lookahead,l=r,o=void 0,(o=s.avail_in)>l&&(o=l),a=0===o?0:(s.avail_in-=o,_.set(s.input.subarray(s.next_in,s.next_in+o),h),1===s.state.wrap?s.adler=C(s.adler,_,o,h):2===s.state.wrap&&(s.adler=M(s.adler,_,o,h)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=yt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<ct&&0!==t.strm.avail_in)},Ut=function(t,e){for(var a,n;;){if(t.lookahead<ct){if(Zt(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a)),t.match_length>=3)if(n=X(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);else n=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2},St=function(t,e){for(var a,n,r;;){if(t.lookahead<ct){if(Zt(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a),t.match_length<=5&&(t.strategy===st||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=X(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(zt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=X(t,0,t.window[t.strstart-1]))&&zt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=X(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2};function Rt(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var Lt=[new Rt(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Zt(t),0===t.lookahead&&e===q)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,zt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-ct&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(zt(t,!1),t.strm.avail_out),1)})),new Rt(4,4,8,4,Ut),new Rt(4,5,16,8,Ut),new Rt(4,6,32,32,Ut),new Rt(4,4,16,16,St),new Rt(8,16,32,32,St),new Rt(8,16,128,128,St),new Rt(8,32,128,256,St),new Rt(32,128,258,1024,St),new Rt(32,258,258,4096,St)];function Ft(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ut,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),mt(this.dyn_ltree),mt(this.dyn_dtree),mt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),mt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),mt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Tt=function(t){if(!t||!t.state)return vt(t,at);t.total_in=t.total_out=0,t.data_type=dt;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:gt,t.adler=2===e.wrap?0:1,e.last_flush=q,P(e),tt},It=function(t){var e,a=Tt(t);return a===tt&&((e=t.state).window_size=2*e.w_size,mt(e.head),e.max_lazy_match=Lt[e.level].max_lazy,e.good_match=Lt[e.level].good_length,e.nice_match=Lt[e.level].nice_length,e.max_chain_length=Lt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Nt=function(t,e,a,n,r,i){if(!t)return at;var s=1;if(e===it&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||a!==ut||n<8||n>15||e<0||e>9||i<0||i>lt)return vt(t,at);8===n&&(n=9);var _=new Ft;return t.state=_,_.strm=t,_.wrap=s,_.gzhead=null,_.w_bits=n,_.w_size=1<<_.w_bits,_.w_mask=_.w_size-1,_.hash_bits=r+7,_.hash_size=1<<_.hash_bits,_.hash_mask=_.hash_size-1,_.hash_shift=~~((_.hash_bits+3-1)/3),_.window=new Uint8Array(2*_.w_size),_.head=new Uint16Array(_.hash_size),_.prev=new Uint16Array(_.w_size),_.lit_bufsize=1<<r+6,_.pending_buf_size=4*_.lit_bufsize,_.pending_buf=new Uint8Array(_.pending_buf_size),_.d_buf=1*_.lit_bufsize,_.l_buf=3*_.lit_bufsize,_.level=e,_.strategy=i,_.method=a,It(t)},Ot={deflateInit:function(t,e){return Nt(t,e,ut,15,8,ot)},deflateInit2:Nt,deflateReset:It,deflateResetKeep:Tt,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?at:(t.state.gzhead=e,tt):at},deflate:function(t,e){var a,n;if(!t||!t.state||e>$||e<0)return t?vt(t,at):at;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===wt&&e!==V)return vt(t,0===t.avail_out?rt:at);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,xt(r,31),xt(r,139),xt(r,8),r.gzhead?(xt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),xt(r,255&r.gzhead.time),xt(r,r.gzhead.time>>8&255),xt(r,r.gzhead.time>>16&255),xt(r,r.gzhead.time>>24&255),xt(r,9===r.level?2:r.strategy>=_t||r.level<2?4:0),xt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(xt(r,255&r.gzhead.extra.length),xt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=M(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(xt(r,0),xt(r,0),xt(r,0),xt(r,0),xt(r,0),xt(r,9===r.level?2:r.strategy>=_t||r.level<2?4:0),xt(r,3),r.status=gt);else{var s=ut+(r.w_bits-8<<4)<<8;s|=(r.strategy>=_t||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(s|=32),s+=31-s%31,r.status=gt,At(r,s),0!==r.strstart&&(At(r,t.adler>>>16),At(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending!==r.pending_buf_size));)xt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,xt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,xt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=pt)}else r.status=pt;if(r.status===pt&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&kt(t),r.pending+2<=r.pending_buf_size&&(xt(r,255&t.adler),xt(r,t.adler>>8&255),t.adler=0,r.status=gt)):r.status=gt),0!==r.pending){if(kt(t),0===t.avail_out)return r.last_flush=-1,tt}else if(0===t.avail_in&&bt(e)<=bt(i)&&e!==V)return vt(t,rt);if(r.status===wt&&0!==t.avail_in)return vt(t,rt);if(0!==t.avail_in||0!==r.lookahead||e!==q&&r.status!==wt){var _=r.strategy===_t?function(t,e){for(var a;;){if(0===t.lookahead&&(Zt(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2}(r,e):r.strategy===ht?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=ft){if(Zt(t),t.lookahead<=ft&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+ft;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=ft-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=X(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2}(r,e):Lt[r.level].func(r,e);if(3!==_&&4!==_||(r.status=wt),1===_||3===_)return 0===t.avail_out&&(r.last_flush=-1),tt;if(2===_&&(e===J?W(r):e!==$&&(j(r,0,0,!1),e===Q&&(mt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),kt(t),0===t.avail_out))return r.last_flush=-1,tt}return e!==V?tt:r.wrap<=0?et:(2===r.wrap?(xt(r,255&t.adler),xt(r,t.adler>>8&255),xt(r,t.adler>>16&255),xt(r,t.adler>>24&255),xt(r,255&t.total_in),xt(r,t.total_in>>8&255),xt(r,t.total_in>>16&255),xt(r,t.total_in>>24&255)):(At(r,t.adler>>>16),At(r,65535&t.adler)),kt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?tt:et)},deflateEnd:function(t){if(!t||!t.state)return at;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==pt&&e!==gt&&e!==wt?vt(t,at):(t.state=null,e===gt?vt(t,nt):tt)},deflateSetDictionary:function(t,e){var a=e.length;if(!t||!t.state)return at;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return at;if(1===r&&(t.adler=C(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(mt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);
129i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,_=t.next_in,h=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Zt(n);n.lookahead>=3;){var l=n.strstart,o=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[l+3-1]),n.prev[l&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=l,l++}while(--o);n.strstart=l,n.lookahead=2,Zt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=_,t.input=h,t.avail_in=s,n.wrap=r,tt},deflateInfo:"pako deflate (from Nodeca project)"};for(var Dt=new Uint8Array(256),Bt=0;Bt<256;Bt++)Dt[Bt]=Bt>=252?6:Bt>=248?5:Bt>=240?4:Bt>=224?3:Bt>=192?2:1;Dt[254]=Dt[254]=1;var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Ht=Object.prototype.toString,Mt=K.Z_NO_FLUSH,Yt=K.Z_SYNC_FLUSH,Kt=K.Z_FULL_FLUSH,Pt=K.Z_FINISH,jt=K.Z_OK,Gt=K.Z_STREAM_END,Xt=K.Z_DEFAULT_COMPRESSION,Wt=K.Z_DEFAULT_STRATEGY,qt=K.Z_DEFLATED;function Jt(){this.options={level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;var e=Ot.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==jt)throw new Error(Y[e]);if(t.header&&Ot.deflateSetHeader(this.strm,t.header),t.dictionary){var a;if(a="[object ArrayBuffer]"===Ht.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(e=Ot.deflateSetDictionary(this.strm,a))!==jt)throw new Error(Y[e]);this._dict_set=!0}}function Qt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:String(e),streamId:a})}}function Vt(t){var e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}Jt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?Pt:Mt,"[object ArrayBuffer]"===Ht.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===Yt||n===Kt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((a=Ot.deflate(r,n))===Gt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=Ot.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===jt;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===jt&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,_=t.length;i<_;i++){var h=t[i];r.set(h,s),s+=h.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e){void 0===e&&(e=self);try{var a=new Map;e.addEventListener("message",(function(n){try{var r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"5.11.0"};case"write":var n=e.get(a.streamId);n||(n=new Jt,e.set(a.streamId,n));var r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);var e,a,n,r,i,s=t.length,_=0;for(r=0;r<s;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<s&&56320==(64512&(n=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(n-56320),r++),_+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(_),i=0,r=0;i<_;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<s&&56320==(64512&(n=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(n-56320),r++),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,K.Z_SYNC_FLUSH),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:Vt(n),additionalBytesCount:i.length};case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){Qt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}}))}catch(t){Qt(e,t)}}()}();`])))}var state={status:0};function startDeflateWorker(e,t,n,r){switch(r===void 0&&(r=createDeflateWorker),state.status===0&&doStartDeflateWorker(e,t,r),state.status){case 1:return state.initializationFailureCallbacks.push(n),state.worker;case 3:return state.worker}}function getDeflateWorkerStatus(){return state.status}function doStartDeflateWorker(e,t,n){n===void 0&&(n=createDeflateWorker);try{var r=n(e),i=addEventListener(e,r,`error`,function(n){onError(e,t,n)}).stop,a=addEventListener(e,r,`message`,function(n){var r=n.data;r.type===`errored`?onError(e,t,r.error,r.streamId):r.type===`initialized`&&onInitialized(r.version)}).stop;r.postMessage({action:`init`}),setTimeout$1(function(){return onTimeout(t)},INITIALIZATION_TIME_OUT_DELAY),state={status:1,worker:r,stop:function(){i(),a()},initializationFailureCallbacks:[]}}catch(n){onError(e,t,n)}}
129function onTimeout(e){state.status===1&&(display.error(`${e} failed to start: a timeout occurred while initializing the Worker`),state.initializationFailureCallbacks.forEach(function(e){return e()}),state={status:2})}function onInitialized(e){state.status===1&&(state={status:3,worker:state.worker,stop:state.stop,version:e})}function onError(e,t,n,r){if(state.status===1||state.status===0){if(display.error(`${t} failed to start: an error occurred while creating the Worker:`,n),n instanceof Event||n instanceof Error&&isMessageCspRelated(n.message)){var i=void 0;i=e.workerUrl?`Please make sure the Worker URL ${e.workerUrl} is correct and CSP is correctly configured.`:`Please make sure CSP is correctly configured.`,display.error(`${i} See documentation at https://docs.datadoghq.com/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else addTelemetryError(n);state.status===1&&state.initializationFailureCallbacks.forEach(function(e){return e()}),state={status:2}}else addTelemetryError(n,{worker_version:state.status===3&&state.version,stream_id:r})}function isMessageCspRelated(e){return includes(e,`Content Security Policy`)||includes(e,`requires 'TrustedScriptURL'`)}function makeRecorderApi(e,t){if(canUseEventBridge()&&!bridgeSupports(`records`)||!isBrowserSupported())return{start:noop$1,stop:noop$1,getReplayStats:function(){},onRumStart:noop$1,isRecording:function(){return!1},getSessionReplayLink:function(){}};var n={status:1},r=function(){n={status:1}},i=function(){n={status:0}},a=noop$1;return{start:function(){return r()},stop:function(){return i()},getSessionReplayLink:function(){return a()},onRumStart:function(o,c,u,K,Y){c.startSessionReplayRecordingManually&&(n={status:0}),o.subscribe(9,function(){(n.status===2||n.status===3)&&(i(),n={status:1})}),o.subscribe(11,function(e){(e.reason===PageExitReason.UNLOADING||e.reason===PageExitReason.PAGEHIDE)&&i()}),o.subscribe(10,function(){n.status===1&&r()});var X;function ee(){return X||(Y||=startDeflateWorker(c,`Datadog Session Replay`,function(){i()},t),Y&&(X=createDeflateEncoder(c,Y,1))),X}r=function(){var t=u.findTrackedSession();if(!t||!t.sessionReplayAllowed){n={status:1};return}n.status!==2&&n.status!==3&&(n={status:2},runOnReadyState(c,`interactive`,function(){if(n.status===2){var t=ee();if(!t){n={status:0};return}n={status:3,stopRecording:e(o,c,u,K,t).stop}}}))},i=function(){n.status!==0&&(n.status===3&&n.stopRecording(),n={status:0})},a=function(){return getSessionReplayLink(c,u,K,n.status!==0)},n.status===1&&r()},isRecording:function(){return getDeflateWorkerStatus()===3&&n.status===3},getReplayStats:function(e){return getDeflateWorkerStatus()===3?getReplayStats(e):void 0}}}var recorderApi=makeRecorderApi(startRecording),datadogRum=makeRumPublicApi(startRum,recorderApi,{startDeflateWorker,createDeflateEncoder});defineGlobal(getGlobalObject(),`DD_RUM`,datadogRum);var require_client=__commonJSMin((e=>{var t=require_react_dom();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),__typeError=e=>{throw TypeError(e)},__accessCheck=(e,t,n)=>t.has(e)||__typeError(`Cannot `+n),__privateGet=(e,t,n)=>(__accessCheck(e,t,`read from private field`),n?n.call(e):t.get(e)),__privateAdd=(e,t,n)=>t.has(e)?__typeError(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),__privateSet=(e,t,n,r)=>(__accessCheck(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),ABSOLUTE_URL_REGEX=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,PROTOCOL_RELATIVE_URL_REGEX=/^[\\/]{2}/;function normalizeProtocolRelativeUrl(e,t){return t+e.replace(/\\/g,`/`)}var PopStateEventType=`popstate`;function isLocation(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function createBrowserHistory(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return createLocation(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:createPath(t)}return getUrlBasedHistory(t,n,null,e)}function invariant$1(e,t){if(e===!1||e==null)throw Error(t)}function warning$1(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function createKey(){return Math.random().toString(36).substring(2,10)}function getHistoryState(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function createLocation(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?parsePath(t):t,state:n,key:t&&t.key||r||createKey(),mask:i}}function createPath({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function parsePath(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function getUrlBasedHistory(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,c=`POP`,u=null,K=Y();K??(K=0,o.replaceState({...o.state,idx:K},``));function Y(){return(o.state||{idx:null}).idx}function X(){c=`POP`;let e=Y(),t=e==null?null:e-K;K=e,u&&u({action:c,location:ue.location,delta:t})}function ee(e,t){c=`PUSH`;let r=isLocation(e)?e:createLocation(ue.location,e,t);n&&n(r,e),K=Y()+1;let X=getHistoryState(r,K),ee=ue.createHref(r.mask||r);try{o.pushState(X,``,ee)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(ee)}a&&u&&u({action:c,location:ue.location,delta:1})}function te(e,t){c=`REPLACE`;let r=isLocation(e)?e:createLocation(ue.location,e,t);n&&n(r,e),K=Y();let i=getHistoryState(r,K),X=ue.createHref(r.mask||r);o.replaceState(i,``,X),a&&u&&u({action:c,location:ue.location,delta:0})}function ce(e){return createBrowserURLImpl(i,e)}let ue={get action(){return c},get location(){return e(i,o)},listen(e){if(u)throw Error(`A history only accepts one active listener`);return i.addEventListener(PopStateEventType,X),u=e,()=>{i.removeEventListener(PopStateEventType,X),u=null}},createHref(e){return t(i,e)},createURL:ce,encodeLocation(e){let t=ce(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:ee,replace:te,go(e){return o.go(e)}};return ue}function createBrowserURLImpl(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),invariant$1(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:createPath(t);return i=i.replace(/ $/,`%20`),!n&&PROTOCOL_RELATIVE_URL_REGEX.test(i)&&(i=r+i),new URL(i,r)}function createContext$2(e){return{defaultValue:e}}var _map,RouterContextProvider=class{constructor(e){if(__privateAdd(this,_map,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(__privateGet(this,_map).has(e))return __privateGet(this,_map).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){__privateGet(this,_map).set(e,t)}};_map=new WeakMap;var unsupportedLazyRouteObjectKeys=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function isUnsupportedLazyRouteObjectKey(e){return unsupportedLazyRouteObjectKeys.has(e)}var unsupportedLazyRouteFunctionKeys=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function isUnsupportedLazyRouteFunctionKey(e){return unsupportedLazyRouteFunctionKeys.has(e)}function isIndexRoute(e){return e.index===!0}function convertRoutesToDataRoutes(e,t,n=[],r={},i=!1){return e.map((e,a)=>
129{let o=[...n,String(a)],c=typeof e.id==`string`?e.id:o.join(`-`);if(invariant$1(e.index!==!0||!e.children,`Cannot specify children on an index route`),invariant$1(i||!r[c],`Found a route id collision on id "${c}".  Route id's must be globally unique within Data Router usages`),isIndexRoute(e)){let n={...e,id:c};return r[c]=mergeRouteUpdates(n,t(n)),n}{let n={...e,id:c,children:void 0};return r[c]=mergeRouteUpdates(n,t(n)),e.children&&(n.children=convertRoutesToDataRoutes(e.children,t,o,r,i)),n}})}function mergeRouteUpdates(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function matchRoutes(e,t,n=`/`){return matchRoutesImpl(e,t,n,!1)}function matchRoutesImpl(e,t,n,r,i){let a=stripBasename((typeof t==`string`?parsePath(t):t).pathname||`/`,n);if(a==null)return null;let o=i??flattenAndRankRoutes(e),c=null,u=decodePath(a);for(let e=0;c==null&&e<o.length;++e)c=matchRouteBranch(o[e],u,r);return c}function convertRouteMatchToUiMatch(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function flattenAndRankRoutes(e){let t=flattenRoutes(e);return rankRouteBranches(t),t}function flattenRoutes(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,c)=>{let u={relativePath:c===void 0?e.path||``:c,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(u.relativePath.startsWith(`/`)){if(!u.relativePath.startsWith(r)&&o)return;invariant$1(u.relativePath.startsWith(r),`Absolute route path "${u.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(r.length)}let K=joinPaths([r,u.relativePath]),Y=n.concat(u);e.children&&e.children.length>0&&(invariant$1(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${K}".`),flattenRoutes(e.children,t,Y,K,o)),(e.path!=null||e.index)&&t.push({path:K,score:computeScore(K,e.index),routesMeta:Y.map((e,t)=>{let[n,r]=compilePath(e.relativePath,e.caseSensitive,t===Y.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of explodeOptionalSegments(e.path))a(e,t,!0,n)}),t}function explodeOptionalSegments(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=explodeOptionalSegments(r.join(`/`)),c=[];return c.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&c.push(...o),c.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function rankRouteBranches(e){e.sort((e,t)=>e.score===t.score?compareIndexes(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var paramRe=/^:[\w-]+$/,dynamicSegmentValue=3,indexRouteValue=2,emptySegmentValue=1,staticSegmentValue=10,splatPenalty=-2,isSplat=e=>e===`*`;function computeScore(e,t){let n=e.split(`/`),r=n.length;return n.some(isSplat)&&(r+=splatPenalty),t&&(r+=indexRouteValue),n.filter(e=>!isSplat(e)).reduce((e,t)=>e+(paramRe.test(t)?dynamicSegmentValue:t===``?emptySegmentValue:staticSegmentValue),r)}function compareIndexes(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function matchRouteBranch(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let c=r[e],u=e===r.length-1,K=a===`/`?t:t.slice(a.length)||`/`,Y={path:c.relativePath,caseSensitive:c.caseSensitive,end:u},X=c.matcher&&c.compiledParams?matchPathImpl(Y,K,c.matcher,c.compiledParams):matchPath(Y,K),ee=c.route;if(!X&&u&&n&&!r[r.length-1].route.index&&(X=matchPath({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},K)),!X)return null;
129Object.assign(i,X.params),o.push({params:i,pathname:joinPaths([a,X.pathname]),pathnameBase:normalizePathname(joinPaths([a,X.pathnameBase])),route:ee}),X.pathnameBase!==`/`&&(a=joinPaths([a,X.pathnameBase]))}return o}function matchPath(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=compilePath(e.path,e.caseSensitive,e.end);return matchPathImpl(e,t,n,r)}function matchPathImpl(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),c=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=c[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=c[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function compilePath(e,t=!1,n=!0){warning$1(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function decodePath(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return warning$1(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function stripBasename(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function prependBasename({basename:e,pathname:t}){return t===`/`?e:joinPaths([e,t])}var isAbsoluteUrl=e=>ABSOLUTE_URL_REGEX.test(e);function resolvePath(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?parsePath(e):e,a;return n?(n=removeDoubleSlashes(n),a=n.startsWith(`/`)?resolvePathname(n.substring(1),`/`):resolvePathname(n,t)):a=t,{pathname:a,search:normalizeSearch(r),hash:normalizeHash(i)}}function resolvePathname(e,t){let n=removeTrailingSlash(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function getInvalidPathError(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function getPathContributingMatches(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function getResolveToMatches(e){let t=getPathContributingMatches(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function resolveTo(e,t,n,r=!1){let i;typeof e==`string`?i=parsePath(e):(i={...e},invariant$1(!i.pathname||!i.pathname.includes(`?`),getInvalidPathError(`?`,`pathname`,`search`,i)),invariant$1(!i.pathname||!i.pathname.includes(`#`),getInvalidPathError(`#`,`pathname`,`hash`,i)),invariant$1(!i.search||!i.search.includes(`#`),getInvalidPathError(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,c;if(o==null)c=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}c=e>=0?t[e]:`/`}let u=resolvePath(i,c),K=o&&o!==`/`&&o.endsWith(`/`),Y=(a||o===`.`)&&n.endsWith(`/`);return!u.pathname.endsWith(`/`)&&(K||Y)&&(u.pathname+=`/`),u}var removeDoubleSlashes=e=>e.replace(/[\\/]{2,}/g,`/`),joinPaths=e=>removeDoubleSlashes(e.join(`/`)),removeTrailingSlash=e=>e.replace(/\/+$/,``),normalizePathname=e=>removeTrailingSlash(e).replace(/^\/*/,`/`),normalizeSearch=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,normalizeHash=e=>
129!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,SUPPORTED_ERROR_TYPES=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],ErrorResponseImpl=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function isRouteErrorResponse(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function getRoutePattern(e){return joinPaths(e.map(e=>e.route.path).filter(Boolean))||`/`}var isBrowser=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function parseToInfo(e,t){let n=e;if(typeof n!=`string`||!ABSOLUTE_URL_REGEX.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(isBrowser)try{let e=new URL(window.location.href),r=PROTOCOL_RELATIVE_URL_REGEX.test(n)?new URL(normalizeProtocolRelativeUrl(n,e.protocol)):new URL(n),a=stripBasename(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{warning$1(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var UninstrumentedSymbol=Symbol(`Uninstrumented`);function getRouteInstrumentationUpdates(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=wrapImpl(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=wrapImpl(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[UninstrumentedSymbol]??i,a=wrapImpl(n[e],t,(...e)=>getHandlerInfo(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[UninstrumentedSymbol]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[UninstrumentedSymbol]??e,r=wrapImpl(n.middleware,t,(...e)=>getHandlerInfo(e[0]));return r?(r[UninstrumentedSymbol]=t,r):e})),r}function instrumentClientSideRouter(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[UninstrumentedSymbol]??e.navigate,r=wrapImpl(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?createPath(n):`.`,...getRouterInfo(e,r??{})}});r&&(r[UninstrumentedSymbol]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[UninstrumentedSymbol]??e.fetch,r=wrapImpl(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...getRouterInfo(e,i??{})}});r&&(r[UninstrumentedSymbol]=t,e.fetch=r)}return e}function wrapImpl(e,t,n){return e.length===0?null:async(...r)=>{let i=await recurseRight(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function recurseRight(e,t,n,r){let i=e[r],a;if(i){let o,c=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=recurseRight(e,t,n,r-1),a=await o,invariant$1(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(c,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await c(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function getHandlerInfo(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:getReadonlyRequest(t),params:{...r},pattern:i,context:getReadonlyContext(n)}}function getRouterInfo(e,t){return{currentUrl:createPath(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function getReadonlyRequest(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function getReadonlyContext(e){if(isPlainObject$3(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var objectProtoNames=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function isPlainObject$3(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===objectProtoNames}var validMutationMethodsArr=[`POST`,`PUT`,`PATCH`,`DELETE`],validMutationMethods=new Set(validMutationMethodsArr),validRequestMethodsArr=[`GET`,...validMutationMethodsArr],validRequestMethods=new Set(validRequestMethodsArr),redirectStatusCodes=new Set([301,302,303,307,308]),redirectPreserveMethodStatusCodes=new Set([307,308]),IDLE_NAVIGATION={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},IDLE_FETCHER={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},IDLE_BLOCKER={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},defaultMapRouteProperties=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),TRANSITIONS_STORAGE_KEY=`remix-router-transitions`,ResetLoaderDataSymbol
129=Symbol(`ResetLoaderData`),_routes,_branches,_hmrRoutes,_hmrBranches,DataRoutes=class{constructor(e){__privateAdd(this,_routes),__privateAdd(this,_branches),__privateAdd(this,_hmrRoutes),__privateAdd(this,_hmrBranches),__privateSet(this,_routes,e),__privateSet(this,_branches,flattenAndRankRoutes(e))}get stableRoutes(){return __privateGet(this,_routes)}get activeRoutes(){return __privateGet(this,_hmrRoutes)??__privateGet(this,_routes)}get branches(){return __privateGet(this,_hmrBranches)??__privateGet(this,_branches)}get hasHMRRoutes(){return __privateGet(this,_hmrRoutes)!=null}setRoutes(e){__privateSet(this,_routes,e),__privateSet(this,_branches,flattenAndRankRoutes(e))}setHmrRoutes(e){__privateSet(this,_hmrRoutes,e),__privateSet(this,_hmrBranches,flattenAndRankRoutes(e))}commitHmrRoutes(){__privateGet(this,_hmrRoutes)&&(__privateSet(this,_routes,__privateGet(this,_hmrRoutes)),__privateSet(this,_branches,__privateGet(this,_hmrBranches)),__privateSet(this,_hmrRoutes,void 0),__privateSet(this,_hmrBranches,void 0))}};_routes=new WeakMap,_branches=new WeakMap,_hmrRoutes=new WeakMap,_hmrBranches=new WeakMap;function createRouter(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;invariant$1(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||defaultMapRouteProperties,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),...getRouteInstrumentationUpdates(t.map(e=>e.route).filter(Boolean),e)})}let o={},c=new DataRoutes(convertRoutesToDataRoutes(e.routes,a,void 0,o)),u=e.basename||`/`;u.startsWith(`/`)||(u=`/${u}`);let K=e.dataStrategy||defaultDataStrategyWithMiddleware,Y={...e.future},X=null,ee=new Set,te=null,ce=null,ue=null,de=null,fe=e.hydrationData!=null,me=matchRoutesImpl(c.activeRoutes,e.history.location,u,!1,c.branches),ge=!1,Te=null,Oe,Ae;if(me==null&&!e.patchRoutesOnNavigation){let t=getInternalRouterError(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=getShortCircuitMatches(c.activeRoutes);Oe=!0,Ae=!Oe,me=n,Te={[r.id]:t}}else if(me&&!e.hydrationData&&an(me,c.activeRoutes,e.history.location.pathname).active&&(me=null),!me){Oe=!1,Ae=!Oe,me=[];let t=an(null,c.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(ge=!0,me=t.matches)}else if(me.some(e=>e.route.lazy))Oe=!1,Ae=!Oe;else if(!me.some(e=>routeHasLoaderOrMiddleware(e.route)))Oe=!0,Ae=!Oe;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=me;if(n){let e=me.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}Ae=!1,Oe=!0,r.forEach(e=>{let r=getRouteHydrationStatus(e.route,t,n);Ae||=r.renderFallback,Oe&&=!r.shouldLoad})}let ze,qe={historyAction:e.history.action,location:e.history.location,matches:me,initialized:Oe,renderFallback:Ae,navigation:IDLE_NAVIGATION,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||Te,fetchers:new Map,blockers:new Map},Ye=`POP`,Ze=null,Qe=!1,et,nt=!1,rt=new Map,it=null,at=!1,ot=!1,st=new Set,ct=new Map,lt=0,ut=-1,dt=new Map,ft=new Set,pt=new Map,mt=new Map,ht=new Set,gt=new Map,_t,vt=null;function yt(){if(X=e.history.listen(({action:t,location:n,delta:r})=>{if(_t){_t(),_t=void 0;return}warning$1(gt.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=Qt({currentLocation:qe.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{_t=e});e.history.go(r*-1),Zt(i,{state:`blocked`,location:n,proceed(){Zt(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(qe.blockers);e.set(i,IDLE_BLOCKER),St({blockers:e})}}),Ze?.resolve(),Ze=null;return}return Et(t,n)}),n){restoreAppliedTransitions(t,rt);let e=()=>persistAppliedTransitions(t,rt);t.addEventListener(`pagehide`,e),it=()=>t.removeEventListener(`pagehide`,e)}return qe.initialized||Et(`POP`,qe.location,{initialHydration:!0}),ze}
129function bt(){X&&X(),it&&it(),ee.clear(),et&&et.abort(),qe.fetchers.forEach((e,t)=>Ut(qe.fetchers,t)),qe.blockers.forEach((e,t)=>Xt(t))}function xt(e){if(ee.add(e),te){let{newErrors:t}=te;te=null,e(qe,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>ee.delete(e)}function St(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),qe={...qe,...e};let n=[],r=[];qe.fetchers.forEach((e,t)=>{e.state===`idle`&&(ht.has(t)?n.push(t):r.push(t))}),ht.forEach(e=>{!qe.fetchers.has(e)&&!ct.has(e)&&n.push(e)}),ee.size===0&&(te={newErrors:e.errors??null}),[...ee].forEach(r=>r(qe,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ut(qe.fetchers,e)),r.forEach(e=>qe.fetchers.delete(e))}function Ct(t,n,{flushSync:r}={}){let i=qe.actionData!=null&&qe.navigation.formMethod!=null&&isMutationMethod(qe.navigation.formMethod)&&qe.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?qe.actionData:null;let o=n.loaderData?mergeLoaderData(qe.loaderData,n.loaderData,n.matches||[],n.errors):qe.loaderData,u=qe.blockers;u.size>0&&(u=new Map(u),u.forEach((e,t)=>u.set(t,IDLE_BLOCKER)));let K=!at&&rn(t,n.matches||qe.matches),Y=Qe===!0||qe.navigation.formMethod!=null&&isMutationMethod(qe.navigation.formMethod)&&t.state?._isRedirect!==!0;c.commitHmrRoutes(),at||Ye===`POP`||(Ye===`PUSH`?e.history.push(t,t.state):Ye===`REPLACE`&&e.history.replace(t,t.state));let X;if(Ye===`POP`){let e=rt.get(qe.location.pathname);e&&e.has(t.pathname)?X={currentLocation:qe.location,nextLocation:t}:rt.has(t.pathname)&&(X={currentLocation:t,nextLocation:qe.location})}else if(nt){let e=rt.get(qe.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),rt.set(qe.location.pathname,e)),X={currentLocation:qe.location,nextLocation:t}}St({...n,actionData:a,loaderData:o,historyAction:Ye,location:t,initialized:!0,renderFallback:!1,navigation:IDLE_NAVIGATION,revalidation:`idle`,restoreScrollPosition:K,preventScrollReset:Y,blockers:u},{viewTransitionOpts:X,flushSync:r===!0}),Ye=`POP`,Qe=!1,nt=!1,at=!1,ot=!1,Ze?.resolve(),Ze=null,vt?.resolve(),vt=null}async function wt(t,n){if(Ze?.resolve(),Ze=null,typeof t==`number`){Ze||=createDeferred();let n=Ze.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=normalizeNavigateOptions(!1,normalizeTo(qe.location,qe.matches,u,t,n?.fromRouteId,n?.relative),n),o;n?.mask&&(o={pathname:``,search:``,hash:``,...typeof n.mask==`string`?parsePath(n.mask):{...qe.location.mask,...n.mask}});let c=qe.location,K=createLocation(c,r,n&&n.state,void 0,o);K={...K,...e.history.encodeLocation(K)};let Y=n&&n.replace!=null?n.replace:void 0,X=`PUSH`;Y===!0?X=`REPLACE`:Y===!1||i!=null&&isMutationMethod(i.formMethod)&&i.formAction===qe.location.pathname+qe.location.search&&(X=`REPLACE`);let ee=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,te=(n&&n.flushSync)===!0,ce=Qt({currentLocation:c,nextLocation:K,historyAction:X});if(ce){Zt(ce,{state:`blocked`,location:K,proceed(){Zt(ce,{state:`proceeding`,proceed:void 0,reset:void 0,location:K}),wt(t,n)},reset(){let e=new Map(qe.blockers);e.set(ce,IDLE_BLOCKER),St({blockers:e})}});return}await Et(X,K,{submission:i,pendingError:a,preventScrollReset:ee,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:te,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function Tt(){vt||=createDeferred(),Rt(),St({revalidation:`loading`});let e=vt.promise;return qe.navigation.state===`submitting`?e:qe.navigation.state===`idle`?(Et(qe.historyAction,qe.location,{startUninterruptedRevalidation:!0}),e):(Et(Ye||qe.historyAction,qe.navigation.location,{overrideNavigation:qe.navigation,enableViewTransition:nt===!0}),e)}async function Et(t,n,r){et&&et.abort(),et=null,Ye=t,at=(r&&r.startUninterruptedRevalidation)===!0,nn(qe.location,qe.matches),Qe=(r&&r.preventScrollReset)===!0,nt=(r&&r.enableViewTransition)===!0;let i=c.activeRoutes,a=r?.initialHydration&&qe.matches&&qe.matches.length>0&&!ge?qe.matches:matchRoutesImpl(i,n,u,!1,c.branches),o=(r&&r.flushSync)===!0;if(a&&qe.initialized&&!ot&&isHashChangeOnly(qe.location,n)&&!(r&&r.submission&&isMutationMethod(r.submission.formMethod))){Ct(n,{matches:a},{flushSync:o});return}let K=an(a,i,n.pathname);if(K.active&&K.matches&&(a=K.matches),!a){let{error:e,notFoundMatches:t,route:r}=$t(n.pathname);Ct(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let Y=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;et=new AbortController;
129let X=createClientSideRequest(e.history,n,et.signal,r&&r.submission),ee=e.getContext?await e.getContext():new RouterContextProvider,te;if(r&&r.pendingError)te=[findNearestBoundary(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&isMutationMethod(r.submission.formMethod)){let i=await Dt(X,n,r.submission,a,t,ee,K.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(isErrorResult(t)&&isRouteErrorResponse(t.error)&&t.error.status===404){et=null,Ct(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,te=i.pendingActionResult,Y=getLoadingNavigation(n,a,t,r.submission),o=!1,K.active=!1,X=createClientSideRequest(e.history,X.url,X.signal)}let{shortCircuited:ce,matches:ue,loaderData:de,errors:fe,workingFetchers:me}=await Ot(X,n,a,t,ee,K.active,Y,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,te,r&&r.callSiteDefaultShouldRevalidate);ce||(et=null,Ct(n,{matches:ue||a,...getActionDataForCommit(te),loaderData:de,errors:fe,...me?{fetchers:me}:{}}))}async function Dt(t,n,i,K,Y,X,ee,te,ce={}){if(Rt(),St({navigation:getSubmittingNavigation(n,K,Y,i)},{flushSync:ce.flushSync===!0}),ee){let e=await on(K,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=getShortCircuitMatches(c.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=findNearestBoundary(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)K=e.matches;else{let{notFoundMatches:e,error:t,route:r}=$t(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let ue,de=getTargetMatch(K,n);if(!de.route.action&&!de.route.lazy)ue={type:`error`,error:getInternalRouterError(405,{method:t.method,pathname:n.pathname,routeId:de.route.id})};else{let e=await Ft(t,n,getTargetedDataStrategyMatches(a,o,t,n,K,de,te?[]:r,X),X,null);if(ue=e[de.route.id],!ue){for(let t of K)if(e[t.route.id]){ue=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(isRedirectResult(ue)){let n;return n=ce&&ce.replace!=null?ce.replace:normalizeRedirectLocation(ue.response.headers.get(`Location`),new URL(t.url),u,e.history)===qe.location.pathname+qe.location.search,await Pt(t,ue,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(isErrorResult(ue)){let e=findNearestBoundary(K,de.route.id);return(ce&&ce.replace)!==!0&&(Ye=`PUSH`),{matches:K,pendingActionResult:[e.route.id,ue,de.route.id]}}return{matches:K,pendingActionResult:[de.route.id,ue]}}async function Ot(t,n,i,K,Y,X,ee,te,ce,ue,de,fe,me,ge){let Te=ee||getLoadingNavigation(n,i,K,te),Oe=te||ce||getSubmissionFromNavigation(Te),Ae=!at&&!de;if(X){if(Ae){let e=kt(me);St({navigation:Te,...e===void 0?{}:{actionData:e}},{flushSync:fe})}let e=await on(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=getShortCircuitMatches(c.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=findNearestBoundary(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=$t(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let ze=c.activeRoutes,{dsMatches:Ye,revalidatingFetchers:Ze}=getMatchesToLoad(t,Y,a,o,e.history,qe,i,Oe,n,de?[]:r,de===!0,ot,st,ht,pt,ft,ze,u,e.patchRoutesOnNavigation!=null,c.branches,me,ge);if(ut=++lt,!e.dataStrategy&&!Ye.some(e=>e.shouldLoad)&&!Ye.some(e=>e.route.middleware&&e.route.middleware.length>0)&&Ze.length===0){let e=new Map(qe.fetchers),t=qt(e);return Ct(n,{matches:i,loaderData:{},errors:me&&isErrorResult(me[1])?{[me[0]]:me[1].error}:null,...getActionDataForCommit(me),...t?{fetchers:e}:{}},{flushSync:fe}),{shortCircuited:!0}}if(Ae){let e={};if(!X){e.navigation=Te;let t=kt(me);t!==void 0&&(e.actionData=t)}Ze.length>0&&(e.fetchers=At(Ze)),St(e,{flushSync:fe})}
129Ze.forEach(e=>{Gt(e.key),e.controller&&ct.set(e.key,e.controller)});let Qe=()=>Ze.forEach(e=>Gt(e.key));et&&et.signal.addEventListener(`abort`,Qe);let{loaderResults:nt,fetcherResults:rt}=await It(Ye,Ze,t,n,Y);if(t.signal.aborted)return{shortCircuited:!0};et&&et.signal.removeEventListener(`abort`,Qe),Ze.forEach(e=>ct.delete(e.key));let it=findRedirect(nt);if(it)return await Pt(t,it.result,!0,{replace:ue}),{shortCircuited:!0};if(it=findRedirect(rt),it)return ft.add(it.key),await Pt(t,it.result,!0,{replace:ue}),{shortCircuited:!0};let dt=new Map(qe.fetchers),{loaderData:mt,errors:gt}=processLoaderData(qe,i,nt,me,Ze,rt,dt);de&&qe.errors&&(gt={...qe.errors,...gt});let _t=qt(dt),vt=Jt(ut,dt),yt=_t||vt||Ze.length>0;return{matches:i,loaderData:mt,errors:gt,...yt?{workingFetchers:dt}:{}}}function kt(e){if(e&&!isErrorResult(e[1]))return{[e[0]]:e[1].data};if(qe.actionData)return Object.keys(qe.actionData).length===0?null:qe.actionData}function At(e){let t=new Map(qe.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=getLoadingFetcher(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function jt(t,n,r,i){Gt(t);let a=(i&&i.flushSync)===!0,o=c.activeRoutes,K=normalizeTo(qe.location,qe.matches,u,r,n,i?.relative),Y=matchRoutesImpl(o,K,u,!1,c.branches),X=an(Y,o,K);if(X.active&&X.matches&&(Y=X.matches),!Y){Bt(t,n,getInternalRouterError(404,{pathname:K}),{flushSync:a});return}let{path:ee,submission:te,error:ce}=normalizeNavigateOptions(!0,K,i);if(ce){Bt(t,n,ce,{flushSync:a});return}let ue=e.getContext?await e.getContext():new RouterContextProvider,de=(i&&i.preventScrollReset)===!0;if(te&&isMutationMethod(te.formMethod)){await Mt(t,n,ee,Y,ue,X.active,a,de,te,i&&i.defaultShouldRevalidate);return}pt.set(t,{routeId:n,path:ee}),await Nt(t,n,ee,Y,ue,X.active,a,de,te)}async function Mt(t,n,i,K,Y,X,ee,te,ce,ue){Rt(),pt.delete(t),zt(t,getSubmittingFetcher(ce,qe.fetchers.get(t)),{flushSync:ee});let de=new AbortController,fe=createClientSideRequest(e.history,i,de.signal,ce);if(X){let e=await on(K,new URL(fe.url).pathname,fe.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Bt(t,n,e.error,{flushSync:ee});return}if(e.matches)K=e.matches;else{Bt(t,n,getInternalRouterError(404,{pathname:i}),{flushSync:ee});return}}let me=getTargetMatch(K,i);if(!me.route.action&&!me.route.lazy){Bt(t,n,getInternalRouterError(405,{method:ce.formMethod,pathname:i,routeId:n}),{flushSync:ee});return}ct.set(t,de);let ge=lt,Te=getTargetedDataStrategyMatches(a,o,fe,i,K,me,r,Y),Oe=await Ft(fe,i,Te,Y,t),Ae=Oe[me.route.id];if(!Ae){for(let e of Te)if(Oe[e.route.id]){Ae=Oe[e.route.id];break}}if(fe.signal.aborted){ct.get(t)===de&&ct.delete(t);return}if(ht.has(t)){if(isRedirectResult(Ae)||isErrorResult(Ae)){zt(t,getDoneFetcher(void 0));return}}else{if(isRedirectResult(Ae)){if(ct.delete(t),ut>ge){zt(t,getDoneFetcher(void 0));return}return ft.add(t),zt(t,getLoadingFetcher(ce)),Pt(fe,Ae,!1,{fetcherSubmission:ce,preventScrollReset:te})}if(isErrorResult(Ae)){Bt(t,n,Ae.error);return}}let ze=qe.navigation.location||qe.location,Ze=createClientSideRequest(e.history,ze,de.signal),Qe=c.activeRoutes,nt=qe.navigation.state===`idle`?qe.matches:matchRoutesImpl(Qe,qe.navigation.location,u,!1,c.branches);invariant$1(nt,`Didn't find any matches after fetcher action`);let rt=++lt;dt.set(t,rt);let{dsMatches:it,revalidatingFetchers:at}=getMatchesToLoad(Ze,Y,a,o,e.history,qe,nt,ce,ze,r,!1,ot,st,ht,pt,ft,Qe,u,e.patchRoutesOnNavigation!=null,c.branches,[me.route.id,Ae],ue),mt=getLoadingFetcher(ce,Ae.data),gt=new Map(qe.fetchers);gt.set(t,mt),at.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=gt.get(t),r=getLoadingFetcher(void 0,n?n.data:void 0);gt.set(t,r),Gt(t),e.controller&&ct.set(t,e.controller)}),St({fetchers:gt});let _t=()=>at.forEach(e=>Gt(e.key));de.signal.addEventListener(`abort`,_t);let{loaderResults:vt,fetcherResults:yt}=await It(it,at,Ze,ze,Y);if(de.signal.aborted)return;de.signal.removeEventListener(`abort`,_t),dt.delete(t),ct.delete(t),at.forEach(e=>ct.delete(e.key));let bt=qe.fetchers.has(t),xt=e=>{if(!bt)return e;let n=new Map(e.fetchers);return n.set(t,getDoneFetcher(Ae.data)),{...e,fetchers:n}},wt=findRedirect(vt);if(wt)return qe=xt(qe),Pt(Ze,wt.result,!1,{preventScrollReset:te});if(wt=findRedirect(yt),wt)return ft.add(wt.key),qe=xt(qe),Pt(Ze,wt.result,!1,{preventScrollReset:te});let Tt=new Map(qe.fetchers);bt&&Tt.set(t,getDoneFetcher(Ae.data));let{loaderData:Et,errors:Dt}=processLoaderData(qe,nt,vt,void 0,at,yt,Tt);Jt(rt,Tt),qe.navigation.state===`loading`&&rt>ut?(invariant$1(Ye,`Expected pending action`),et&&et.abort(),Ct(qe.navigation.location,{matches:nt,loaderData:Et,errors:Dt,fetchers:Tt})):(St({errors:Dt,loaderData:mergeLoaderData(qe.loaderData,Et,nt,Dt),fetchers:Tt}),ot=!1)}async function Nt(t,n,i,c,u,K,Y,X,ee){let te=qe.fetchers.get(t);zt(t,getLoadingFetcher(ee,te?te.data:void 0),{flushSync:Y});
129let ce=new AbortController,ue=createClientSideRequest(e.history,i,ce.signal);if(K){let e=await on(c,new URL(ue.url).pathname,ue.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Bt(t,n,e.error,{flushSync:Y});return}if(e.matches)c=e.matches;else{Bt(t,n,getInternalRouterError(404,{pathname:i}),{flushSync:Y});return}}let de=getTargetMatch(c,i);ct.set(t,ce);let fe=lt,me=await Ft(ue,i,getTargetedDataStrategyMatches(a,o,ue,i,c,de,r,u),u,t),ge=me[de.route.id];if(!ge){for(let e of c)if(me[e.route.id]){ge=me[e.route.id];break}}if(ct.get(t)===ce&&ct.delete(t),!ue.signal.aborted){if(ht.has(t)){zt(t,getDoneFetcher(void 0));return}if(isRedirectResult(ge)){if(ut>fe){zt(t,getDoneFetcher(void 0));return}ft.add(t),await Pt(ue,ge,!1,{preventScrollReset:X});return}if(isErrorResult(ge)){Bt(t,n,ge.error);return}zt(t,getDoneFetcher(ge.data))}}async function Pt(r,i,a,{submission:o,fetcherSubmission:c,preventScrollReset:K,replace:Y}={}){a||(Ze?.resolve(),Ze=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ot=!0);let X=i.response.headers.get(`Location`);invariant$1(X,`Expected a Location header on the redirect Response`),X=normalizeRedirectLocation(X,new URL(r.url),u,e.history);let ee=createLocation(qe.location,X,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(isAbsoluteUrl(X)){let n=createBrowserURLImpl(t,X,!0);e=n.origin!==t.location.origin||stripBasename(n.pathname,u)==null}if(e){Y?t.location.replace(X):t.location.assign(X);return}}et=null;let te=Y===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:ce,formAction:ue,formEncType:de}=qe.navigation;!o&&!c&&ce&&ue&&de&&(o=getSubmissionFromNavigation(qe.navigation));let fe=o||c;redirectPreserveMethodStatusCodes.has(i.response.status)&&fe&&isMutationMethod(fe.formMethod)?await Et(te,ee,{submission:{...fe,formAction:X},preventScrollReset:K||Qe,enableViewTransition:a?nt:void 0}):await Et(te,ee,{overrideNavigation:getLoadingNavigation(ee,[],te,o),fetcherSubmission:c,preventScrollReset:K||Qe,enableViewTransition:a?nt:void 0})}async function Ft(e,t,n,r,i){let a,o={};try{a=await callDataStrategyImpl(K,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!isMutationMethod(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!qe.loaderData.hasOwnProperty(e.route.id)&&(!qe.errors||!qe.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(isRedirectDataStrategyResult(r)){let i=r.result;o[t]={type:`redirect`,response:normalizeRelativeRoutingRedirectResponse(i,e,t,n,u)}}else o[t]=await convertDataStrategyResultToDataResult(r);return o}async function It(e,t,n,r,i){let a=Ft(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Ft(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:getInternalRouterError(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Rt(){ot=!0,pt.forEach((e,t)=>{ct.has(t)&&st.add(t),Gt(t)})}function zt(e,t,n={}){let r=new Map(qe.fetchers);r.set(e,t),St({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function Bt(e,t,n,r={}){let i=findNearestBoundary(qe.matches,t),a=new Map(qe.fetchers);Ut(a,e),St({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Vt(e){return mt.set(e,(mt.get(e)||0)+1),ht.has(e)&&ht.delete(e),qe.fetchers.get(e)||IDLE_FETCHER}function Ht(e,t){Gt(e,t?.reason),zt(e,getDoneFetcher(null))}function Ut(e,t){let n=qe.fetchers.get(t);ct.has(t)&&!(n&&n.state===`loading`&&dt.has(t))&&Gt(t),pt.delete(t),dt.delete(t),ft.delete(t),ht.delete(t),st.delete(t),e.delete(t)}function Wt(e){let t=(mt.get(e)||0)-1;t<=0?(mt.delete(e),ht.add(e)):mt.set(e,t),St({fetchers:new Map(qe.fetchers)})}function Gt(e,t){let n=ct.get(e);n&&(n.abort(t),ct.delete(e))}function Kt(e,t){for(let n of e){let e=t.get(n);invariant$1(e,`Expected fetcher: ${n}`);let r=getDoneFetcher(e.data);t.set(n,r)}}function qt(e){let t=[],n=!1;for(let r of ft){let i=e.get(r);invariant$1(i,`Expected fetcher: ${r}`),i.state===`loading`&&(ft.delete(r),t.push(r),n=!0)}return Kt(t,e),n}function Jt(e,t){let n=[];for(let[r,i]of dt)if(i<e){let e=t.get(r);invariant$1(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Gt(r),dt.delete(r),n.push(r))}return Kt(n,t),n.length>0}function Yt(e,t){let n=qe.blockers.get(e)||IDLE_BLOCKER;return gt.get(e)!==t&&gt.set(e,t),n}function Xt(e){qe.blockers.delete(e),gt.delete(e)}function Zt(e,t){let n=qe.blockers.get(e)||IDLE_BLOCKER;invariant$1(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(qe.blockers);r.set(e,t),St({blockers:r})}function Qt({currentLocation:e,nextLocation:t,historyAction:n}){if(gt.size===0)return;gt.size>1&&warning$1(!1,`A router only supports one blocker at a time`);let r=Array.from(gt.entries()),[i,a]=r[r.length-1],o=qe.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function $t(e){let t=getInternalRouterError(404,{pathname:e}),n=c.activeRoutes,{matches:r,route:i}=getShortCircuitMatches(n);return{notFoundMatches:r,route:i,error:t}}
129function en(e,t,n){if(ce=e,de=t,ue=n||null,!fe&&qe.navigation===IDLE_NAVIGATION){fe=!0;let e=rn(qe.location,qe.matches);e!=null&&St({restoreScrollPosition:e})}return()=>{ce=null,de=null,ue=null}}function tn(e,t){return ue&&ue(e,t.map(e=>convertRouteMatchToUiMatch(e,qe.loaderData)))||e.key}function nn(e,t){if(ce&&de){let n=tn(e,t);ce[n]=de()}}function rn(e,t){if(ce){let n=tn(e,t),r=ce[n];if(typeof r==`number`)return r}return null}function an(t,n,r){if(e.patchRoutesOnNavigation){let e=c.branches;if(!t)return{active:!0,matches:matchRoutesImpl(n,r,u,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:matchRoutesImpl(n,r,u,!0,e)}}return{active:!1,matches:null}}async function on(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let K=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:K,fetcherKey:i,patch:(e,n)=>{r.aborted||patchRoutesImpl(e,n,c,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:K}}if(r.aborted)return{type:`aborted`};let Y=c.branches,X=matchRoutesImpl(c.activeRoutes,n,u,!1,Y),ee=null;if(X&&(Object.keys(X[0].params).length===0||(ee=matchRoutesImpl(c.activeRoutes,n,u,!0,Y),!(ee&&K.length<ee.length&&sn(K,ee.slice(0,K.length))))))return{type:`success`,matches:X};if(ee||=matchRoutesImpl(c.activeRoutes,n,u,!0,Y),!ee||sn(K,ee))return{type:`success`,matches:null};K=ee}}function sn(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function cn(e){o={},c.setHmrRoutes(convertRoutesToDataRoutes(e,a,void 0,o))}function ln(e,t,n=!1){patchRoutesImpl(e,t,c,o,a,n),c.hasHMRRoutes||St({})}return ze={get basename(){return u},get future(){return Y},get state(){return qe},get routes(){return c.stableRoutes},get branches(){return c.branches},get manifest(){return o},get window(){return t},initialize:yt,subscribe:xt,enableScrollRestoration:en,navigate:wt,fetch:jt,revalidate:Tt,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Vt,resetFetcher:Ht,deleteFetcher:Wt,dispose:bt,getBlocker:Yt,deleteBlocker:Xt,patchRoutes:ln,_internalFetchControllers:ct,_internalSetRoutes:cn,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){St(e)}},e.instrumentations&&(ze=instrumentClientSideRouter(ze,e.instrumentations.map(e=>e.router).filter(Boolean))),ze}function isSubmissionNavigation(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`
129in e&&e.body!==void 0)}function normalizeTo(e,t,n,r,i,a){let o,c;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){c=e;break}}else o=t,c=t[t.length-1];let u=resolveTo(r||`.`,getResolveToMatches(o),stripBasename(e.pathname,n)||e.pathname,a===`path`);if(r??(u.search=e.search,u.hash=e.hash),(r==null||r===``||r===`.`)&&c){let e=hasNakedIndexQuery(u.search);if(c.route.index&&!e)u.search=u.search?u.search.replace(/^\?/,`?index&`):`?index`;else if(!c.route.index&&e){let e=new URLSearchParams(u.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();u.search=n?`?${n}`:``}}return n!==`/`&&(u.pathname=prependBasename({basename:n,pathname:u.pathname})),createPath(u)}function normalizeNavigateOptions(e,t,n){if(!n||!isSubmissionNavigation(n))return{path:t};if(n.formMethod&&!isValidMethod(n.formMethod))return{path:t,error:getInternalRouterError(405,{method:n.formMethod})};let r=()=>({path:t,error:getInternalRouterError(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=stripHashFromPath(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!isMutationMethod(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}
130`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!isMutationMethod(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}invariant$1(typeof FormData==`function`,`FormData is not available in this environment`);let o,c;if(n.formData)o=convertFormDataToSearchParams(n.formData),c=n.formData;else if(n.body instanceof FormData)o=convertFormDataToSearchParams(n.body),c=n.body;else if(n.body instanceof URLSearchParams)o=n.body,c=convertSearchParamsToFormData(o);else if(n.body==null)o=new URLSearchParams,c=new FormData;else try{o=new URLSearchParams(n.body),c=convertSearchParamsToFormData(o)}catch{return r()}let u={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:c,json:void 0,text:void 0};if(isMutationMethod(u.formMethod))return{path:t,submission:u};let K=parsePath(t);return e&&K.search&&hasNakedIndexQuery(K.search)&&o.append(`index`,``),K.search=`?${o}`,{path:createPath(K),submission:u}}function getMatchesToLoad(e,t,n,r,i,a,o,c,u,K,Y,X,ee,te,ce,ue,de,fe,me,ge,Te,Oe){let Ae=Te?isErrorResult(Te[1])?Te[1].error:Te[1].data:void 0,ze=i.createURL(a.location),qe=i.createURL(u),Ye;if(Y&&a.errors){let e=Object.keys(a.errors)[0];Ye=o.findIndex(t=>t.route.id===e)}else if(Te&&isErrorResult(Te[1])){let e=Te[0];Ye=o.findIndex(t=>t.route.id===e)-1}let Ze=Te?Te[1].statusCode:void 0,Qe=Ze&&Ze>=400,et={currentUrl:ze,currentParams:a.matches[0]?.params||{},nextUrl:qe,nextParams:o[0].params,...c,actionResult:Ae,actionStatus:Ze},nt=getRoutePattern(o),rt=o.map((i,o)=>{let{route:c}=i,ee=null;if(Ye!=null&&o>Ye)ee=!1;else if(c.lazy)ee=!0;else if(!routeHasLoaderOrMiddleware(c))ee=!1;else if(Y){let{shouldLoad:e}=getRouteHydrationStatus(c,a.loaderData,a.errors);ee=e}else isNewLoader(a.loaderData,a.matches[o],i)&&(ee=!0);if(ee!==null)return getDataStrategyMatch(n,r,e,u,nt,i,K,t,ee);let te=!1;typeof Oe==`boolean`?te=Oe:Qe?te=!1:X||ze.pathname+ze.search===qe.pathname+qe.search?te=!0:ze.search===qe.search?isNewRouteInstance(a.matches[o],i)&&(te=!0):te=!0;let ce={...et,defaultShouldRevalidate:te},ue=shouldRevalidateLoader(i,ce);return getDataStrategyMatch(n,r,e,u,nt,i,K,t,ue,ce,Oe)}),it=[];return ce.forEach((e,c)=>{if(Y||!o.some(t=>t.route.id===e.routeId)||te.has(c))return;let u=a.fetchers.get(c),ce=u&&u.state!==`idle`&&u.data===void 0,Te=matchRoutesImpl(de,e.path,fe??`/`,!1,ge);if(!Te){if(me&&ce)return;it.push({key:c,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(ue.has(c))return;let Ae=getTargetMatch(Te,e.path),ze=new AbortController,qe=createClientSideRequest
130(i,e.path,ze.signal),Ye=null;if(ee.has(c))ee.delete(c),Ye=getTargetedDataStrategyMatches(n,r,qe,e.path,Te,Ae,K,t);else if(ce)X&&(Ye=getTargetedDataStrategyMatches(n,r,qe,e.path,Te,Ae,K,t));else{let i;i=typeof Oe==`boolean`?Oe:!Qe&&X;let a={...et,defaultShouldRevalidate:i};shouldRevalidateLoader(Ae,a)&&(Ye=getTargetedDataStrategyMatches(n,r,qe,e.path,Te,Ae,K,t,a))}Ye&&it.push({key:c,routeId:e.routeId,path:e.path,matches:Ye,match:Ae,request:qe,controller:ze})}),{dsMatches:rt,revalidatingFetchers:it}}function routeHasLoaderOrMiddleware(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function getRouteHydrationStatus(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!routeHasLoaderOrMiddleware(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function isNewLoader(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function isNewRouteInstance(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function shouldRevalidateLoader(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function patchRoutesImpl(e,t,n,r,i,a){let o;if(e){let t=r[e];invariant$1(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let c=[],u=[];if(t.forEach(e=>{let t=o.find(t=>isSameRoute(e,t));t?u.push({existingRoute:t,newRoute:e}):c.push(e)}),c.length>0){let t=convertRoutesToDataRoutes(c,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&u.length>0)for(let e=0;e<u.length;e++){let{existingRoute:t,newRoute:n}=u[e],r=t,[a]=convertRoutesToDataRoutes([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function isSameRoute(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index!==t.index||e.path!==t.path||e.caseSensitive!==t.caseSensitive?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>isSameRoute(e,t)))??!1}var lazyRoutePropertyCache=new WeakMap,loadLazyRouteProperty=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(invariant$1(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=lazyRoutePropertyCache.get(i);o||(o={},lazyRoutePropertyCache.set(i,o));let c=o[e];if(c)return c;let u=(async()=>{let t=isUnsupportedLazyRouteObjectKey(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)warning$1(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)warning$1(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=u,u},lazyRouteFunctionCache=new WeakMap;function loadLazyRoute(e,t,n,r,i){let a=n[e.id];if(invariant$1(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=lazyRouteFunctionCache.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{invariant$1(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=isUnsupportedLazyRouteFunctionKey(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?warning$1(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?warning$1(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return lazyRouteFunctionCache.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),c=[],u;
130for(let a of o){if(i&&i.includes(a))continue;let o=loadLazyRouteProperty({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(c.push(o),a===t&&(u=o))}let K=c.length>0?Promise.all(c).then(()=>{}):void 0;return K?.catch(()=>{}),u?.catch(()=>{}),{lazyRoutePromise:K,lazyHandlerPromise:u}}async function defaultDataStrategy(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function defaultDataStrategyWithMiddleware(e){return e.matches.some(e=>e.route.middleware)?runClientMiddlewarePipeline(e,()=>defaultDataStrategy(e)):defaultDataStrategy(e)}function runClientMiddlewarePipeline(e,t){return runMiddlewarePipeline(e,t,e=>{if(isRedirectResponse(e))throw e;return e},isDataStrategyResults,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=findNearestBoundary(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function runMiddlewarePipeline(e,t,n,r,i){let{matches:a,...o}=e;return await callRouteMiddleware(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function callRouteMiddleware(e,t,n,r,i,a,o=0){let{request:c}=e;if(c.signal.aborted)throw c.signal.reason??Error(`Request aborted: ${c.method} ${c.url}`);let u=t[o];if(!u)return await n();let[K,Y]=u,X,ee=async()=>{if(X)throw Error("You may only call `next()` once per middleware");try{return X={value:await callRouteMiddleware(e,t,n,r,i,a,o+1)},X.value}catch(e){return X={value:await a(e,K,X)},X.value}};try{let t=await Y(e,ee),n=t==null?void 0:r(t);return i(n)?n:X?n??X.value:(X={value:await ee()},X.value)}catch(e){return await a(e,K,X)}}function getDataStrategyMatchLazyPromises(e,t,n,r,i){let a=loadLazyRouteProperty({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=loadLazyRoute(r.route,isMutationMethod(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function getDataStrategyMatch(e,t,n,r,i,a,o,c,u,K=null,Y){let X=!1,ee=getDataStrategyMatchLazyPromises(e,t,n,a,o);return{...a,_lazyPromises:ee,shouldLoad:u,shouldRevalidateArgs:K,shouldCallHandler(e){return X=!0,K?typeof Y==`boolean`?shouldRevalidateLoader(a,{...K,defaultShouldRevalidate:Y}):typeof e==`boolean`?shouldRevalidateLoader(a,{...K,defaultShouldRevalidate:e}):shouldRevalidateLoader(a,K):u},resolve(e){let{lazy:t,loader:o,middleware:K}=a.route,Y=X||u||e&&!isMutationMethod(n.method)&&(t||o),te=K&&K.length>0&&!o&&!t;return Y&&(isMutationMethod(n.method)||!te)?callLoaderOrAction({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:ee?.handler,lazyRoutePromise:ee?.route,handlerOverride:e,scopedContext:c}):Promise.resolve({type:`data`,result:void 0})}}}function getTargetedDataStrategyMatches(e,t,n,r,i,a,o,c,u=null){return i.map(K=>K.route.id===a.route.id?getDataStrategyMatch(e,t,n,r,getRoutePattern(i),K,o,c,!0,u):{...K,shouldLoad:!1,shouldRevalidateArgs:u,shouldCallHandler:()=>!1,_lazyPromises:getDataStrategyMatchLazyPromises(e,t,n,K,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function callDataStrategyImpl(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let c={request:t,url:createDataFunctionUrl(t,n),pattern:getRoutePattern(r),params:r[0].params,context:a,matches:r},u=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response.  You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=c;return runClientMiddlewarePipeline(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},K=await e({...c,fetcherKey:i,runClientMiddleware:u});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return K}async function callLoaderOrAction({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:c}){let u,K,Y=isMutationMethod(e.method),X=Y?`action`:`loader`,ee=i=>{let a,u=new Promise((e,t)=>
130a=t);K=()=>a(),e.signal.addEventListener(`abort`,K);let Y=a=>typeof i==`function`?i({request:e,url:createDataFunctionUrl(e,t),pattern:n,params:r.params,context:c},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${X}" [routeId: ${r.route.id}]`)),ee=(async()=>{try{return{type:`data`,result:await(o?o(e=>Y(e)):Y())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([ee,u])};try{let t=Y?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([ee(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;u=n}else{await i;let t=Y?r.route.action:r.route.loader;if(t)[u]=await Promise.all([ee(t),a]);else if(X===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw getInternalRouterError(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)u=await ee(t);else{let t=new URL(e.url);throw getInternalRouterError(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{K&&e.signal.removeEventListener(`abort`,K)}return u}async function parseResponseBody(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function convertDataStrategyResultToDataResult(e){let{result:t,type:n}=e;if(isResponse$1(t)){let e;try{e=await parseResponseBody(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new ErrorResponseImpl(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?isDataWithResponseInit(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:dataWithResponseInitToErrorResponse(t),statusCode:isRouteErrorResponse(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:isRouteErrorResponse(t)?t.status:void 0}:isDataWithResponseInit(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function normalizeRelativeRoutingRedirectResponse(e,t,n,r,i){let a=e.headers.get(`Location`);if(invariant$1(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!isAbsoluteUrl(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=normalizeTo(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var invalidProtocols=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function hasInvalidProtocol(e){try{return invalidProtocols.includes(new URL(e).protocol)}catch{return!1}}function normalizeRedirectLocation(e,t,n,r){if(isAbsoluteUrl(e)){let r=e,i=PROTOCOL_RELATIVE_URL_REGEX.test(r)?new URL(normalizeProtocolRelativeUrl(r,t.protocol)):new URL(r);if(hasInvalidProtocol(i.toString()))throw Error(`Invalid redirect location`);let a=stripBasename(i.pathname,n)!=null;if(i.origin===t.origin&&a)return removeDoubleSlashes(i.pathname)+i.search+i.hash}try{if(hasInvalidProtocol(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function createClientSideRequest(e,t,n,r){let i=e.createURL(stripHashFromPath(t)).toString(),a={signal:n};if(r&&isMutationMethod(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?convertFormDataToSearchParams(r.formData):r.formData}return new Request(i,a)}function createDataFunctionUrl(e,t){let n=new URL(e.url),r=typeof t==`string`?parsePath(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.
130search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);n.search=e.size?`?${e.toString()}`:``}else n.search=``;return n.hash=r.hash||``,n}function convertFormDataToSearchParams(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function convertSearchParamsToFormData(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function processRouteLoaderData(e,t,n,r=!1,i=!1){let a={},o=null,c,u=!1,K={},Y=n&&isErrorResult(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let X=n.route.id,ee=t[X];if(invariant$1(!isRedirectResult(ee),`Cannot handle redirect results in processLoaderData`),isErrorResult(ee)){let t=ee.error;if(Y!==void 0&&(t=Y,Y=void 0),o||={},i)o[X]=t;else{let n=findNearestBoundary(e,X);o[n.route.id]??(o[n.route.id]=t)}r||(a[X]=ResetLoaderDataSymbol),u||(u=!0,c=isRouteErrorResponse(ee.error)?ee.error.status:500),ee.headers&&(K[X]=ee.headers)}else a[X]=ee.data,ee.statusCode&&ee.statusCode!==200&&!u&&(c=ee.statusCode),ee.headers&&(K[X]=ee.headers)}),Y!==void 0&&n&&(o={[n[0]]:Y},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:c||200,loaderHeaders:K}}function processLoaderData(e,t,n,r,i,a,o){let{loaderData:c,errors:u}=processRouteLoaderData(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let c=a[n];if(invariant$1(c,`Did not find corresponding fetcher result`),isErrorResult(c)){let t=findNearestBoundary(e.matches,r?.route.id);u&&u[t.route.id]||(u={...u,[t.route.id]:c.error}),o.delete(n)}else if(isRedirectResult(c))invariant$1(!1,`Unhandled fetcher revalidation redirect`);else{let e=getDoneFetcher(c.data);o.set(n,e)}}),{loaderData:c,errors:u}}function mergeLoaderData(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==ResetLoaderDataSymbol).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function getActionDataForCommit(e){return e?isErrorResult(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function findNearestBoundary(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function getShortCircuitMatches(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function getInternalRouterError(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,c=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?c=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(c=`Unable to encode submission body`)):e===403?(o=`Forbidden`,c=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,c=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?c=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(c=`Invalid request method "${r.toUpperCase()}"`)),new ErrorResponseImpl(e||500,o,Error(c),!0)}function findRedirect(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(isRedirectResult(r))return{key:n,result:r}}}function stripHashFromPath(e){return createPath({...typeof e==`string`?parsePath(e):e,hash:``})}function isHashChangeOnly(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function dataWithResponseInitToErrorResponse(e){return new ErrorResponseImpl(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function isDataStrategyResults(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&isDataStrategyResult(t))}function isDataStrategyResult(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function isRedirectDataStrategyResult(e){return isResponse$1(e.result)&&redirectStatusCodes.has(e.result.status)}function isErrorResult(e){return e.type===`error`}function isRedirectResult(e){return(e&&e.type)===`redirect`}function isDataWithResponseInit(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function isResponse$1(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function isRedirectStatusCode(e){return redirectStatusCodes.has(e)}function isRedirectResponse(e){return isResponse$1(e)&&isRedirectStatusCode(e.status)&&e.headers.has(`Location`)}function isValidMethod(e){return validRequestMethods.has(e.toUpperCase())}function isMutationMethod(e){return validMutationMethods.has(e.toUpperCase())}function hasNakedIndexQuery(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function getTargetMatch(e,t){let n=typeof t==`string`?parsePath(t).search:t.search;if(e[e.length-1].route.index&&hasNakedIndexQuery(n||``))return e[e.length-1];let r=getPathContributingMatches(e);return r[r.length-1]}function getSubmissionFromNavigation(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(t&&n&&r){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function getLoadingNavigation(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function getSubmittingNavigation(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function getLoadingFetcher(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function getSubmittingFetcher(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function getDoneFetcher(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function restoreAppliedTransitions(e,t){try{let n=e.sessionStorage.getItem(TRANSITIONS_STORAGE_KEY);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function persistAppliedTransitions(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(TRANSITIONS_STORAGE_KEY,JSON.stringify(n))}catch(e){warning$1(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function createDeferred(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var DataRouterContext=import_react.createContext(null);DataRouterContext.displayName=`DataRouter`;var DataRouterStateContext=import_react.createContext(null);DataRouterStateContext.displayName=`DataRouterState`;var RSCRouterContext=import_react.createContext(!1);function useIsRSCRouterContext(){return import_react.useContext(RSCRouterContext)}var ViewTransitionContext=import_react.createContext({isTransitioning:!1});ViewTransitionContext.displayName=`ViewTransition`;var FetchersContext=import_react.createContext(new Map);FetchersContext.displayName=`Fetchers`;var AwaitContext=import_react.createContext(null);AwaitContext.displayName=`Await`;var NavigationContext=import_react.createContext(null);NavigationContext.displayName=`Navigation`;var LocationContext=import_react.createContext(null);LocationContext.displayName=`Location`;var RouteContext=import_react.createContext({outlet:null,matches:[],isDataRoute:!1});RouteContext.displayName=`Route`;var RouteErrorContext=import_react.createContext(null);RouteErrorContext.displayName=`RouteError`;var ENABLE_DEV_WARNINGS=!0,ERROR_DIGEST_BASE=`REACT_ROUTER_ERROR`,ERROR_DIGEST_REDIRECT=`REDIRECT`,ERROR_DIGEST_ROUTE_ERROR_RESPONSE=`ROUTE_ERROR_RESPONSE`;function decodeRedirectErrorDigest(e){if(e.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_REDIRECT}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function decodeRouteErrorResponseDigest(e){if(e.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_ROUTE_ERROR_RESPONSE}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new ErrorResponseImpl(t.status,t.statusText,t.data)}catch{}}function useHref(e,{relative:t}={}){invariant$1(useInRouterContext(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=import_react.useContext(NavigationContext),{hash:i,pathname:a,search:o}=useResolvedPath(e,{relative:t}),c=a;return n!==`/`&&(c=a===`/`?n:joinPaths([n,a])),r.createHref({pathname:c,search:o,hash:i})}function useInRouterContext(){return import_react.useContext(LocationContext)!=null}function useLocation(){return invariant$1(useInRouterContext(),`useLocation() may be used only in the context of a <Router> component.`),import_react.useContext(LocationContext).location}function useNavigationType(){return import_react.useContext(LocationContext).navigationType}
130var navigateEffectWarning=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function useIsomorphicLayoutEffect$1(e){import_react.useContext(NavigationContext).static||import_react.useLayoutEffect(e)}function useNavigate(){let{isDataRoute:e}=import_react.useContext(RouteContext);return e?useNavigateStable():useNavigateUnstable()}function useNavigateUnstable(){invariant$1(useInRouterContext(),`useNavigate() may be used only in the context of a <Router> component.`);let e=import_react.useContext(DataRouterContext),{basename:t,navigator:n}=import_react.useContext(NavigationContext),{matches:r}=import_react.useContext(RouteContext),{pathname:i}=useLocation(),a=JSON.stringify(getResolveToMatches(r)),o=import_react.useRef(!1);return useIsomorphicLayoutEffect$1(()=>{o.current=!0}),import_react.useCallback((r,c={})=>{if(warning$1(o.current,navigateEffectWarning),!o.current)return;if(typeof r==`number`){n.go(r);return}let u=resolveTo(r,JSON.parse(a),i,c.relative===`path`);e==null&&t!==`/`&&(u.pathname=u.pathname===`/`?t:joinPaths([t,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[t,n,a,i,e])}var OutletContext=import_react.createContext(null);function useOutlet(e){let t=import_react.useContext(RouteContext).outlet;return import_react.useMemo(()=>t&&import_react.createElement(OutletContext.Provider,{value:e},t),[t,e])}function useParams(){let{matches:e}=import_react.useContext(RouteContext);return e[e.length-1]?.params??{}}function useResolvedPath(e,{relative:t}={}){let{matches:n}=import_react.useContext(RouteContext),{pathname:r}=useLocation(),i=JSON.stringify(getResolveToMatches(n));return import_react.useMemo(()=>resolveTo(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function useRoutesImpl(e,t,n){invariant$1(useInRouterContext(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=import_react.useContext(NavigationContext),{matches:i}=import_react.useContext(RouteContext),a=i[i.length-1],o=a?a.params:{},c=a?a.pathname:`/`,u=a?a.pathnameBase:`/`,K=a&&a.route;{let e=K&&K.path||``;warningOnce(c,!K||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
131
132Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let Y=useLocation(),X;if(t){let e=typeof t==`string`?parsePath(t):t;invariant$1(u===`/`||e.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),X=e}else X=Y;let ee=X.pathname||`/`,te=ee;if(u!==`/`){let e=u.replace(/^\//,``).split(`/`);te=`/`+ee.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let ce=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):matchRoutes(e,{pathname:te});warning$1(K||ce!=null,`No routes matched location "${X.pathname}${X.search}${X.hash}" `),warning$1(ce==null||ce[ce.length-1].route.element!==void 0||ce[ce.length-1].route.Component!==void 0||ce[ce.length-1].route.lazy!==void 0,`Matched leaf route at location "${X.pathname}${X.search}${X.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let ue=_renderMatches(ce&&ce.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:joinPaths([u,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?u:joinPaths([u,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&ue?import_react.createElement(LocationContext.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...X},navigationType:`POP`}},ue):ue}function DefaultErrorComponent(){let e=useRouteError(),t=isRouteErrorResponse(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=import_react.createElement(import_react.Fragment,null,import_react.createElement(`p`,null,`💿 Hey developer 👋`),import_react.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,import_react.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,import_react.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),import_react.createElement(import_react.Fragment,null,import_react.createElement(`h2`,null,`Unexpected Application 
132Error!`),import_react.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?import_react.createElement(`pre`,{style:i},n):null,o)}var defaultErrorElement=import_react.createElement(DefaultErrorComponent,null),RenderErrorBoundary=class extends import_react.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=decodeRouteErrorResponseDigest(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:import_react.createElement(RouteContext.Provider,{value:this.props.routeContext},import_react.createElement(RouteErrorContext.Provider,{value:e,children:this.props.component}));return this.context?import_react.createElement(RSCErrorHandler,{error:e},t):t}};RenderErrorBoundary.contextType=RSCRouterContext;var errorRedirectHandledMap=new WeakMap;function RSCErrorHandler({children:e,error:t}){let{basename:n}=import_react.useContext(NavigationContext);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=decodeRedirectErrorDigest(t.digest);if(e){let r=errorRedirectHandledMap.get(t);if(r)throw r;let i=parseToInfo(e.location,n),a=i.absoluteURL||i.to;if(hasInvalidProtocol(a))throw Error(`Invalid redirect location`);if(isBrowser&&!errorRedirectHandledMap.get(t)){if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw errorRedirectHandledMap.set(t,n),n}}return import_react.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function RenderedRoute({routeContext:e,match:t,children:n}){let r=import_react.useContext(DataRouterContext);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),import_react.createElement(RouteContext.Provider,{value:e},n)}function _renderMatches(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);invariant$1(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,c=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:a}=r,u=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||u){n.isStatic&&(o=!0),i=c>=0?i.slice(0,c+1):[i[0]];break}}}}let u=n?.onError,K=r&&u?(e,t)=>{u(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:getRoutePattern(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,u)=>{let Y,X=!1,ee=null,te=null;r&&(Y=a&&n.route.id?a[n.route.id]:void 0,ee=n.route.errorElement||defaultErrorElement,o&&(c<0&&u===0?(warningOnce(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),X=!0,te=null):c===u&&(X=!0,te=n.route.hydrateFallbackElement||null)));let ce=t.concat(i.slice(0,u+1)),ue=()=>{let t;return t=Y?ee:X?te:n.route.Component?import_react.createElement(n.route.Component,null):n.route.element?n.route.element:e,import_react.createElement(RenderedRoute,{match:n,routeContext:{outlet:e,matches:ce,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||u===0)?import_react.createElement(RenderErrorBoundary,{location:r.location,revalidation:r.revalidation,component:ee,error:Y,children:ue(),routeC
132ontext:{outlet:null,matches:ce,isDataRoute:!0},onError:K}):ue()},null)}function getDataRouterConsoleError(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext(e){let t=import_react.useContext(DataRouterContext);return invariant$1(t,getDataRouterConsoleError(e)),t}function useDataRouterState(e){let t=import_react.useContext(DataRouterStateContext);return invariant$1(t,getDataRouterConsoleError(e)),t}function useRouteContext(e){let t=import_react.useContext(RouteContext);return invariant$1(t,getDataRouterConsoleError(e)),t}function useCurrentRouteId(e){let t=useRouteContext(e),n=t.matches[t.matches.length-1];return invariant$1(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function useRouteId(){return useCurrentRouteId(`useRouteId`)}function useNavigation(){let e=useDataRouterState(`useNavigation`);return import_react.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function useMatches(){let{matches:e,loaderData:t}=useDataRouterState(`useMatches`);return import_react.useMemo(()=>e.map(e=>convertRouteMatchToUiMatch(e,t)),[e,t])}function useRouteError(){let e=import_react.useContext(RouteErrorContext),t=useDataRouterState(`useRouteError`),n=useCurrentRouteId(`useRouteError`);return e===void 0?t.errors?.[n]:e}function useNavigateStable(){let{router:e}=useDataRouterContext(`useNavigate`),t=useCurrentRouteId(`useNavigate`),n=import_react.useRef(!1);return useIsomorphicLayoutEffect$1(()=>{n.current=!0}),import_react.useCallback(async(r,i={})=>{warning$1(n.current,navigateEffectWarning),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var alreadyWarned={};function warningOnce(e,t,n){!t&&!alreadyWarned[e]&&(alreadyWarned[e]=!0,warning$1(!1,n))}var alreadyWarned2={};function warnOnce(e,t){!e&&!alreadyWarned2[t]&&(alreadyWarned2[t]=!0,console.warn(t))}var useOptimisticImpl=import_react.useOptimistic,stableUseOptimisticSetter=()=>void 0;function useOptimisticSafe(e){return useOptimisticImpl?useOptimisticImpl(e):[e,stableUseOptimisticSetter]}function mapRouteProperties(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&warning$1(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:import_react.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&warning$1(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:import_react.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&warning$1(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:import_react.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var hydrationRouteProperties=[`HydrateFallback`,`hydrateFallbackElement`],Deferred=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function RouterProvider({router:e,flushSync:t,onError:n,useTransitions:r}){r=useIsRSCRouterContext()||r;let[i,a]=import_react.useState(e.state),[o,c]=useOptimisticSafe(i),[u,K]=import_react.useState(),[Y,X]=import_react.useState({isTransitioning:!1}),[ee,te]=import_react.useState(),[ce,ue]=import_react.useState(),[de,fe]=import_react.useState(),me=import_react.useRef(new Map),ge=import_react.useCallback((i,{deletedFetchers:o,newErrors:u,flushSync:Y,viewTransitionOpts:de})=>{u&&n&&Object.values(u).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:getRoutePattern(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&me.current.set(t,e.data)}),o.forEach(e=>me.current.delete(e)),warnOnce(Y===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable.  Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let ge=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(warnOnce(de==null||ge,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!de||!ge){t&&Y?t(()=>a(i)):r===!1?a(i):import_react.startTransition(()=>{r===!0&&c(e=>getOptimisticRouterState(e,i)),a(i)});return}if(t&&Y){t(()=>{ce&&(ee?.resolve(),ce.skipTransition()),X({isTransitioning:!0,flushSync:!0,currentLocation:de.currentLocation,nextLocation:de.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{te(void 0),ue(void 0),K(void 0),X({isTransitioning:!1})})}),t(()=>ue(n));return}ce?(ee?.resolve(),ce.skipTransition(),fe({state:i,currentLocation:de.currentLocation,nextLocation:de.nextLocation})):(K(i),X({isTransitioning:!0,flushSync:!1,currentLocation:de.currentLocation,nextLocation:de.nextLocation}))},[e.window,t,ce,ee,r,c,n]);import_react.useLayoutEffect(()=>e.subscribe(ge),[e,ge]),import_react.useEffect(()=>{Y.isTransitioning&&!Y.flushSync&&te(new Deferred)},[Y]),import_react.useEffect(()=>{if(ee&&u&&e.window){let t=u,n=ee.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):import_react.startTransition(()=>{r===!0&&c(e=>getOptimisticRouterState(e,t)),a(t)}),await n});i.finished.finally(()=>{te(void 0),ue(void 0),K(void 0),X({isTransitioning:!1})}),ue(i)}},[u,ee,e.window,r,c]),import_react.useEffect(()=>{ee&&u&&o.location.key===u.location.key&&ee.resolve()},[ee,ce,o.location,u]),import_react.useEffect(()=>{!Y.isTransitioning&&de&&(K(de.state),X({isTransitioning:!0,flushSync:!1,currentLocation:de.currentLocation,nextLocation:de.nextLocation}),fe(void 0))},[Y.isTransitioning,de]);let Te=import_react.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),Oe=e.basename||`/`,Ae=import_react.useMemo(()=>({router:e,navigator:Te,static:!1,basename:Oe,onError:n}),[e,Te,Oe,n]);return import_react.createElement(import_react.Fragment,null,import_react.createElement(DataRouterContext.Provider,{value:Ae},import_react.createElement(DataRouterStateContext.Provider,{value:o},import_react.createElement(FetchersContext.Provider,{value:me.current},import_react.createElement(ViewTransitionContext.Provider,{value:Y},import_react.createElement(Router,{basename:Oe,location:o.location,navigationType:o.historyAction,navigator:Te,useTransitions:r},import_react.createElement(MemoizedDataRoutes,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function getOptimisticRouterState(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var MemoizedDataRoutes=import_react.memo(DataRoutes2);function DataRoutes2({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return useRoutesImpl(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Navigate({to:e,replace:t,state:n,relative:r}){invariant$1(useInRouterContext(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=import_react.useContext(NavigationContext);warning$1(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=import_react.useContext(RouteContext),{pathname:o}=useLocation(),c=useNavigate(),u=resolveTo(e,getResolveToMatches(a),o,r===`path`),K=JSON.stringify(u);return import_react.useEffect(()=>{c(JSON.parse(K),{replace:t,state:n,relative:r})},[c,K,r,t,n]),null}function Outlet(e){return useOutlet(e.context)}function Router({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){invariant$1(!useInRouterContext(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),u=import_react.useMemo(()=>({basename:c,navigator:i,static:a,useTransitions:o,future:{}}),[c,i,a,o]);typeof n==`string`&&(n=parsePath(n));let{pathname:K=`/`,search:Y=``,hash:X=``,state:ee=null,key:te=`default`,mask:ce}=n,ue=import_react.useMemo(()=>{let e=stripBasename(K,c);return e==null?null:{location:{pathname:e,search:Y,hash:X,state:ee,key:te,mask:ce},navigationType:r}},[c,K,Y,X,ee,te,r,ce]);
132return warning$1(ue!=null,`<Router basename="${c}"> is not able to match the URL "${K}${Y}${X}" because it does not start with the basename, so the <Router> won't render anything.`),ue==null?null:import_react.createElement(NavigationContext.Provider,{value:u},import_react.createElement(LocationContext.Provider,{children:t,value:ue}))}var AwaitErrorBoundary=class extends import_react.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`<Await> caught the following error during render`,e,t)}render(){let{children:e,errorElement:t,resolve:n}=this.props,r=null,i=0;if(!(n instanceof Promise))i=1,r=Promise.resolve(),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_data",{get:()=>n});else if(this.state.error){i=2;let e=this.state.error;r=Promise.reject().catch(()=>{}),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_error",{get:()=>e})}else n._tracked?(r=n,i=`_error`in r?2:+(`_data`in r)):(i=0,Object.defineProperty(n,"_tracked",{get:()=>!0}),r=n.then(e=>Object.defineProperty(n,"_data",{get:()=>e}),e=>{this.props.onError?.(e),Object.defineProperty(n,"_error",{get:()=>e})}));if(i===2&&!t)throw r._error;if(i===2)return import_react.createElement(AwaitContext.Provider,{value:r,children:t});if(i===1)return import_react.createElement(AwaitContext.Provider,{value:r,children:e});throw r}},defaultMethod=`get`,defaultEncType=`application/x-www-form-urlencoded`;function isHtmlElement(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function isButtonElement(e){return isHtmlElement(e)&&e.tagName.toLowerCase()===`button`}function isFormElement(e){return isHtmlElement(e)&&e.tagName.toLowerCase()===`form`}function isInputElement(e){return isHtmlElement(e)&&e.tagName.toLowerCase()===`input`}function isModifiedEvent(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function shouldProcessLinkClick(e,t){return e.button===0&&(!t||t===`_self`)&&!isModifiedEvent(e)}function createSearchParams(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function getSearchParamsForLocation(e,t){let n=createSearchParams(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var _formDataSupportsSubmitter=null;function isFormDataSubmitterSupported(){if(_formDataSupportsSubmitter===null)try{new FormData(document.createElement(`form`),0),_formDataSupportsSubmitter=!1}catch{_formDataSupportsSubmitter=!0}return _formDataSupportsSubmitter}var supportedFormEncTypes=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function getFormEncType(e){return e!=null&&!supportedFormEncTypes.has(e)?(warning$1(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`),null):e}function getFormSubmissionInfo(e,t){let n,r,i,a,o;if(isFormElement(e)){let o=e.getAttribute(`action`);r=o?stripBasename(o,t):null,n=e.getAttribute(`method`)||defaultMethod,i=getFormEncType(e.getAttribute(`enctype`))||defaultEncType,a=new FormData(e)}else if(isButtonElement(e)||isInputElement(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let c=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=c?stripBasename(c,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||defaultMethod,i=getFormEncType(e.getAttribute(`formenctype`))||getFormEncType(o.getAttribute(`enctype`))||defaultEncType,a=new FormData(o,e),!isFormDataSubmitterSupported()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(isHtmlElement(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=defaultMethod,r=null,i=defaultEncType,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}var objectProtoNames2=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`),ESCAPE_LOOKUP={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},ESCAPE_REGEX=/[&><\u2028\u2029]/g;function escapeHtml(e){return e.replace(ESCAPE_REGEX,e=>ESCAPE_LOOKUP[e])}function invariant2(e,t){if(e===!1||e==null)throw Error(t)}function singleFetchUrl(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>
132`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&stripBasename(i.pathname,t)===`/`?`${removeTrailingSlash(t)}/_root.${r}`:`${removeTrailingSlash(i.pathname)}.${r}`,i}async function loadRouteModule(e,t){if(e.id in t)return t[e.id];try{let n=await __vitePreload(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function isPageLinkDescriptor(e){return e!=null&&typeof e.page==`string`}function isHtmlLinkDescriptor(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function getKeyedPrefetchLinks(e,t,n){return dedupeLinkDescriptors((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await loadRouteModule(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(isHtmlLinkDescriptor).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function getNewMatchesForLinks(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,c=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||c(e,t)):a===`data`?t.filter((t,a)=>{let u=r.routes[t.route.id];if(!u||!u.hasLoader)return!1;if(o(t,a)||c(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function getModuleLinkHrefs(e,t,{includeHydrateFallback:n}={}){return dedupeHrefs(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function dedupeHrefs(e){return[...new Set(e)]}function sortKeys(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function dedupeLinkDescriptors(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!isPageLinkDescriptor(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(sortKeys(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function isFogOfWarEnabled(e,t){return e.mode===`lazy`&&t===!0}function getPartialManifest({sri:e,...t},n){let r=new Set(n.state.matches.map(e=>e.route.id)),i=n.state.location.pathname.split(`/`).filter(Boolean),a=[`/`];for(i.pop();i.length>0;)a.push(`/${i.join(`/`)}`),i.pop();a.forEach(e=>{let t=matchRoutesImpl(n.routes,e,n.basename||`/`,!1,n.branches);t&&t.forEach(e=>r.add(e.route.id))});let o=[...r].reduce((e,n)=>Object.assign(e,{[n]:t.routes[n]}),{});return{...t,routes:o,sri:e?!0:void 0}}function useDataRouterContext2(){let e=import_react.useContext(DataRouterContext);return invariant2(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function useDataRouterStateContext(){let e=import_react.useContext(DataRouterStateContext);return invariant2(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var FrameworkContext=import_react.createContext(void 0);FrameworkContext.displayName=`FrameworkContext`;function useFrameworkContext(){let e=import_react.useContext(FrameworkContext);return invariant2(e,`You must render this element inside a <HydratedRouter> element`),e}function usePrefetchBehavior(e,t){let n=import_react.useContext(FrameworkContext),[r,i]=import_react.useState(!1),[a,o]=import_react.useState(!1),{onFocus:c,onBlur:u,onMouseEnter:K,onMouseLeave:Y,onTouchStart:X}=t,ee=import_react.useRef(null);import_react.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>
132{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return ee.current&&e.observe(ee.current),()=>{e.disconnect()}}},[e]),import_react.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let te=()=>{i(!0)},ce=()=>{i(!1),o(!1)};return n?e===`intent`?[a,ee,{onFocus:composeEventHandlers(c,te),onBlur:composeEventHandlers(u,ce),onMouseEnter:composeEventHandlers(K,te),onMouseLeave:composeEventHandlers(Y,ce),onTouchStart:composeEventHandlers(X,te)}]:[a,ee,{}]:[!1,ee,{}]}function composeEventHandlers(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function getActiveMatches(e,t,n){if(n&&!isHydrated)return[e[0]];if(t){let n=e.findIndex(e=>t[e.route.id]!==void 0);return e.slice(0,n+1)}return e}function PrefetchPageLinks({page:e,...t}){let n=useIsRSCRouterContext(),{nonce:r}=useFrameworkContext(),{router:i}=useDataRouterContext2(),a=import_react.useMemo(()=>matchRoutes(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?import_react.createElement(RSCPrefetchPageLinksImpl,{page:e,matches:a,...t}):import_react.createElement(PrefetchPageLinksImpl,{page:e,matches:a,...t})):null}function useKeyedPrefetchLinks(e){let{manifest:t,routeModules:n}=useFrameworkContext(),[r,i]=import_react.useState([]);return import_react.useEffect(()=>{let r=!1;return getKeyedPrefetchLinks(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function RSCPrefetchPageLinksImpl({page:e,matches:t,...n}){let r=useLocation(),{future:i}=useFrameworkContext(),{basename:a}=useDataRouterContext2(),o=import_react.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=singleFetchUrl(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,c=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:c.push(e.route.id);return o&&c.length>0&&n.searchParams.set(`_routes`,c.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return import_react.createElement(import_react.Fragment,null,o.map(e=>import_react.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function PrefetchPageLinksImpl({page:e,matches:t,...n}){let r=useLocation(),{future:i,manifest:a,routeModules:o}=useFrameworkContext(),{basename:c}=useDataRouterContext2(),{loaderData:u,matches:K}=useDataRouterStateContext(),Y=import_react.useMemo(()=>getNewMatchesForLinks(e,t,K,a,r,`data`),[e,t,K,a,r]),X=import_react.useMemo(()=>getNewMatchesForLinks(e,t,K,a,r,`assets`),[e,t,K,a,r]),ee=import_react.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,K=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!Y.some(t=>t.route.id===e.route.id)&&e.route.id in u&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?K=!0:n.add(e.route.id))}),n.size===0)return[];let X=singleFetchUrl(e,c,i.v8_trailingSlashAwareDataRequests,`data`);return K&&n.size>0&&X.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[X.pathname+X.search]},[c,i.v8_trailingSlashAwareDataRequests,u,r,a,Y,t,e,o]),te=import_react.useMemo(()=>getModuleLinkHrefs(X,a),[X,a]),ce=useKeyedPrefetchLinks(X);return import_react.createElement(import_react.Fragment,null,ee.map(e=>import_react.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),te.map(e=>import_react.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),ce.map(({key:e,link:t})=>import_react.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}var isHydrated=!1;function setIsHydrated(){isHydrated=!0}function Scripts(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:i,routeDiscovery:a,ssr:o,nonce:c}=useFrameworkContext(),{router:u,static:K,staticContext:Y}=useDataRouterContext2(),{matches:X}=useDataRouterStateContext(),ee=useIsRSCRouterContext(),te=isFogOfWarEnabled(a,o);e.nonce==null&&c&&(e={...e,nonce:c}),i&&(i.didRenderScripts=!0);let ce=getActiveMatches(X,null,r);import_react.useEffect(()=>{setIsHydrated()},[]);let ue=import_react.useMemo(()=>{if(ee)return null;let r=Y?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}
132).pipeThrough(new TextEncoderStream());`:` `,i=K?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:``}${te?``:`import ${JSON.stringify(t.url)}`};
133${ce.map((e,n)=>{let r=`route${n}`,i=t.routes[e.route.id];invariant2(i,`Route ${e.route.id} not found in manifest`);let{clientActionModule:a,clientLoaderModule:o,clientMiddlewareModule:c,hydrateFallbackModule:u,module:K}=i,Y=[...a?[{module:a,varName:`${r}_clientAction`}]:[],...o?[{module:o,varName:`${r}_clientLoader`}]:[],...c?[{module:c,varName:`${r}_clientMiddleware`}]:[],...u?[{module:u,varName:`${r}_HydrateFallback`}]:[],{module:K,varName:`${r}_main`}];return Y.length===1?`import * as ${r} from ${JSON.stringify(K)};`:[Y.map(e=>`import * as ${e.varName} from "${e.module}";`).join(`
134`),`const ${r} = {${Y.map(e=>`...${e.varName}`).join(`,`)}};`].join(`
135`)}).join(`
136`)}
137  ${te?`window.__reactRouterManifest = ${JSON.stringify(getPartialManifest(t,u),null,2)};`:``}
138  window.__reactRouterRouteModules = {${ce.map((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`).join(`,`)}};
139
140import(${JSON.stringify(t.entry.module)});`:` `;return import_react.createElement(import_react.Fragment,null,import_react.createElement(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r},type:void 0}),import_react.createElement(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:i},type:`module`,async:!0}))},[]),de=isHydrated||ee?[]:[...new Set(t.entry.imports.concat(getModuleLinkHrefs(ce,t,{includeHydrateFallback:!0})))],fe=typeof t.sri==`object`?t.sri:{};return warnOnce(!ee,`The <Scripts /> element is a no-op when using RSC and can be safely removed.`),isHydrated||ee?null:import_react.createElement(import_react.Fragment,null,typeof t.sri==`object`?import_react.createElement(`script`,{...e,"rr-importmap":``,type:`importmap`,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:fe})}}):null,te?null:import_react.createElement(`link`,{rel:`modulepreload`,href:t.url,crossOrigin:e.crossOrigin,integrity:fe[t.url],nonce:e.nonce,suppressHydrationWarning:!0}),import_react.createElement(`link`,{rel:`modulepreload`,href:t.entry.module,crossOrigin:e.crossOrigin,integrity:fe[t.entry.module],nonce:e.nonce,suppressHydrationWarning:!0}),de.map(t=>import_react.createElement(`link`,{key:t,rel:`modulepreload`,href:t,crossOrigin:e.crossOrigin,integrity:fe[t],nonce:e.nonce,suppressHydrationWarning:!0})),ue)}function mergeRefs(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var RemixErrorBoundary=class extends import_react.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location===e.location?{error:e.error||t.error,location:t.location}:{error:e.error||null,location:e.location}}render(){return this.state.error?import_react.createElement(RemixRootDefaultErrorBoundary,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function RemixRootDefaultErrorBoundary({error:e,isOutsideRemixApp:t}){let{nonce:n}=useFrameworkContext();console.error(e);let r=import_react.createElement(`script`,{nonce:n,dangerouslySetInnerHTML:{__html:`
141        console.log(
142          "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
143        );
144      `}});if(isRouteErrorResponse(e))return import_react.createElement(BoundaryShell,{title:`Unhandled Thrown Response!`},import_react.createElement(`h1`,{style:{fontSize:`24px`}},e.status,` `,e.statusText),r);let i;if(e instanceof Error)i=e;else{let t=e==null?`Unknown Error`:typeof e==`object`&&`toString`in e?e.toString():JSON.stringify(e);i=Error(t)}return import_react.createElement(BoundaryShell,{title:`Application Error!`,isOutsideRemixApp:t},import_react.createElement(`h1`,{style:{fontSize:`24px`}},`Application Error`),import_react.createElement(`pre`,{style:{padding:`2rem`,background:`hsla(10, 50%, 50%, 0.1)`,color:`red`,overflow:`auto`}},i.stack),r)}function BoundaryShell({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:i}=useFrameworkContext();return i.root?.Layout&&!n?r:import_react.createElement(`html`,{lang:`en`},import_react.createElement(`head`,null,import_react.createElement(`meta`,{charSet:`utf-8`}),import_react.createElement(`meta`,{name:`viewport`,content:`width=device-width,initial-scale=1,viewport-fit=cover`}),import_react.createElement(`title`,null,e)),import_react.createElement(`body`,null,import_react.createElement(`main`,{style:{fontFamily:`system-ui, sans-serif`,padding:`2rem`}},r,t?import_react.createElement(Scripts,null):null)))}var isBrowser2=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{isBrowser2&&(window.__reactRouterVersion=`7.18.0`)}catch{}function createBrowserRouter(e,t){return createRouter({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:createBrowserHistory({window:t?.window}),hydrationData:t?.hydrationData||parseHydrationData(),routes:e,mapRouteProperties,hydrationRouteProperties,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.
144instrumentations}).initialize()}function parseHydrationData(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:deserializeErrors(e.errors)}),e}function deserializeErrors(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new ErrorResponseImpl(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&SUPPORTED_ERROR_TYPES.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}function HistoryRouter({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=import_react.useState({action:n.action,location:n.location}),o=import_react.useCallback(e=>{r===!1?a(e):import_react.startTransition(()=>a(e))},[r]);return import_react.useLayoutEffect(()=>n.listen(o),[n,o]),import_react.createElement(Router,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}HistoryRouter.displayName=`unstable_HistoryRouter`;var Link=import_react.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:c,target:u,to:K,preventScrollReset:Y,viewTransition:X,defaultShouldRevalidate:ee,...te},ce){let{basename:ue,navigator:de,useTransitions:fe}=import_react.useContext(NavigationContext),me=typeof K==`string`&&ABSOLUTE_URL_REGEX.test(K),ge=parseToInfo(K,ue);K=ge.to;let Te=useHref(K,{relative:r}),Oe=useLocation(),Ae=null;if(o){let e=resolveTo(o,[],Oe.mask?Oe.mask.pathname:`/`,!0);ue!==`/`&&(e.pathname=e.pathname===`/`?ue:joinPaths([ue,e.pathname])),Ae=de.createHref(e)}let[ze,qe,Ye]=usePrefetchBehavior(n,te),Ze=useLinkClickHandler(K,{replace:a,mask:o,state:c,target:u,preventScrollReset:Y,relative:r,viewTransition:X,defaultShouldRevalidate:ee,useTransitions:fe});function Qe(t){e&&e(t),t.defaultPrevented||Ze(t)}let et=!(ge.isExternal||i),nt=import_react.createElement(`a`,{...te,...Ye,href:(et?Ae:void 0)||ge.absoluteURL||Te,onClick:et?Qe:e,ref:mergeRefs(ce,qe),target:u,"data-discover":!me&&t===`render`?`true`:void 0});return ze&&!me?import_react.createElement(import_react.Fragment,null,nt,import_react.createElement(PrefetchPageLinks,{page:Te})):nt});Link.displayName=`Link`;var NavLink=import_react.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:c,...u},K){let Y=useResolvedPath(a,{relative:u.relative}),X=useLocation(),ee=import_react.useContext(DataRouterStateContext),{navigator:te,basename:ce}=import_react.useContext(NavigationContext),ue=ee!=null&&useViewTransitionState(Y)&&o===!0,de=te.encodeLocation?te.encodeLocation(Y).pathname:Y.pathname,fe=X.pathname,me=ee&&ee.navigation&&ee.navigation.location?ee.navigation.location.pathname:null;t||(fe=fe.toLowerCase(),me=me?me.toLowerCase():null,de=de.toLowerCase()),me&&ce&&(me=stripBasename(me,ce)||me);let ge=de!==`/`&&de.endsWith(`/`)?de.length-1:de.length,Te=fe===de||!r&&fe.startsWith(de)&&fe.charAt(ge)===`/`,Oe=me!=null&&(me===de||!r&&me.startsWith(de)&&me.charAt(de.length)===`/`),Ae={isActive:Te,isPending:Oe,isTransitioning:ue},ze=Te?e:void 0,qe;qe=typeof n==`function`?n(Ae):[n,Te?`active`:null,Oe?`pending`:null,ue?`transitioning`:null].filter(Boolean).join(` `);let Ye=typeof i==`function`?i(Ae):i;return import_react.createElement(Link,{...u,"aria-current":ze,className:qe,ref:K,style:Ye,to:a,viewTransition:o},typeof c==`function`?c(Ae):c)});NavLink.displayName=`NavLink`;var Form$1=import_react.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=defaultMethod,action:c,onSubmit:u,relative:K,preventScrollReset:Y,viewTransition:X,defaultShouldRevalidate:ee,...te},ce)=>{let{useTransitions:ue}=import_react.useContext(NavigationContext),de=useSubmit(),fe=useFormAction(c,{relative:K}),me=o.toLowerCase()===`get`?`get`:`post`,ge=typeof c==`string`&&ABSOLUTE_URL_REGEX.test(c);return import_react.createElement(`form`,{ref:ce,method:me,action:fe,onSubmit:r?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute(`formmethod`)||o,te=()=>de(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:i,state:a,relative:K,preventScrollReset:Y,viewTransition:X,defaultShouldRevalidate:ee});ue&&n!==!1?import_react.startTransition(()=>te()):te()},...te,"data-discover":!ge&&e===`render`?`true`:void 0})});Form$1.displayName=`Form`;function ScrollRestoration({getKey:e,storageKey:t,...n}
144){let r=import_react.useContext(FrameworkContext),{basename:i}=import_react.useContext(NavigationContext),a=useLocation(),o=useMatches();useScrollRestoration({getKey:e,storageKey:t});let c=import_react.useMemo(()=>{if(!r||!e)return null;let t=getScrollRestorationKey(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let u=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),import_react.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${u})(${escapeHtml(JSON.stringify(t||SCROLL_RESTORATION_STORAGE_KEY))}, ${escapeHtml(JSON.stringify(c))})`}})}ScrollRestoration.displayName=`ScrollRestoration`;function getDataRouterConsoleError2(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext3(e){let t=import_react.useContext(DataRouterContext);return invariant$1(t,getDataRouterConsoleError2(e)),t}function useDataRouterState2(e){let t=import_react.useContext(DataRouterStateContext);return invariant$1(t,getDataRouterConsoleError2(e)),t}function useLinkClickHandler(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:c,defaultShouldRevalidate:u,useTransitions:K}={}){let Y=useNavigate(),X=useLocation(),ee=useResolvedPath(e,{relative:o});return import_react.useCallback(te=>{if(shouldProcessLinkClick(te,t)){te.preventDefault();let t=n===void 0?createPath(X)===createPath(ee):n,ce=()=>Y(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:c,defaultShouldRevalidate:u});K?import_react.startTransition(()=>ce()):ce()}},[X,Y,ee,n,r,i,t,e,a,o,c,u,K])}function useSearchParams(e){warning$1(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=import_react.useRef(createSearchParams(e)),n=import_react.useRef(!1),r=useLocation(),i=import_react.useMemo(()=>getSearchParamsForLocation(r.search,n.current?null:t.current),[r.search]),a=useNavigate();return[i,import_react.useCallback((e,t)=>{let r=createSearchParams(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var fetcherId=0,getUniqueFetcherId=()=>`__${String(++fetcherId)}__`;function useSubmit(){let{router:e}=useDataRouterContext3(`useSubmit`),{basename:t}=import_react.useContext(NavigationContext),n=useRouteId(),r=e.fetch,i=e.navigate;return import_react.useCallback(async(e,a={})=>{let{action:o,method:c,encType:u,formData:K,body:Y}=getFormSubmissionInfo(e,t);if(a.navigate===!1){let e=a.fetcherKey||getUniqueFetcherId();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:K,body:Y,formMethod:a.method||c,formEncType:a.encType||u,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:K,body:Y,formMethod:a.method||c,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function useFormAction(e,{relative:t}={}){let{basename:n}=import_react.useContext(NavigationContext),r=import_react.useContext(RouteContext);invariant$1(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...useResolvedPath(e||`.`,{relative:t})},o=useLocation();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:joinPaths([n,a.pathname])),createPath(a)}var SCROLL_RESTORATION_STORAGE_KEY=`react-router-scroll-positions`,savedScrollPositions={};function getScrollRestorationKey(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:stripBasename(e.pathname,n)||e.pathname},t)),i??=e.key,i}function useScrollRestoration({getKey:e,storageKey:t}={}){let{router:n}=useDataRouterContext3(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=useDataRouterState2(`useScrollRestoration`),{basename:a}=import_react.useContext(NavigationContext),o=useLocation(),c=useMatches(),u=useNavigation();import_react.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),usePageHide(import_react.useCallback(()=>
144{if(u.state===`idle`){let t=getScrollRestorationKey(o,c,a,e);savedScrollPositions[t]=window.scrollY}try{sessionStorage.setItem(t||SCROLL_RESTORATION_STORAGE_KEY,JSON.stringify(savedScrollPositions))}catch(e){warning$1(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[u.state,e,a,o,c,t])),typeof document<`u`&&(import_react.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||SCROLL_RESTORATION_STORAGE_KEY);e&&(savedScrollPositions=JSON.parse(e))}catch{}},[t]),import_react.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(savedScrollPositions,()=>window.scrollY,e?(t,n)=>getScrollRestorationKey(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),import_react.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{warning$1(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function usePageHide(e,t){let{capture:n}=t||{};import_react.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function useViewTransitionState(e,{relative:t}={}){let n=import_react.useContext(ViewTransitionContext);invariant$1(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=useDataRouterContext3(`useViewTransitionState`),i=useResolvedPath(e,{relative:t});if(!n.isTransitioning)return!1;let a=stripBasename(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=stripBasename(n.nextLocation.pathname,r)||n.nextLocation.pathname;return matchPath(i.pathname,o)!=null||matchPath(i.pathname,a)!=null}function RouterProvider2(e){return import_react.createElement(RouterProvider,{flushSync:import_react_dom.flushSync,...e})}var renderedRoutesContext=createContext$2(),require_property_expr=__commonJSMin(((e,t)=>{function n(e){this._maxSize=e,this.clear()}n.prototype.clear=function(){this._size=0,this._values=Object.create(null)},n.prototype.get=function(e){return this._values[e]},n.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var r=/[^.^\]^[]+|(?=\[\]|\.\.)/g,i=/^\d+$/,a=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,c=/^\s*(['"]?)(.*?)(\1)\s*$/,u=512,K=new n(u),Y=new n(u),X=new n(u);t.exports={Cache:n,split:te,normalizePath:ee,setter:function(e){var t=ee(e);return Y.get(e)||Y.set(e,function(e,n){for(var r=0,i=t.length,a=e;r<i-1;){var o=t[r];if(o===`__proto__`||o===`constructor`||o===`prototype`)return e;a=a[t[r++]]}a[t[r]]=n})},getter:function(e,t){var n=ee(e);return X.get(e)||X.set(e,function(e){for(var r=0,i=n.length;r<i;)if(e!=null||!t)e=e[n[r++]];else return;return e})},join:function(e){return e.reduce(function(e,t){return e+(ue(t)||i.test(t)?`[`+t+`]`:(e?`.`:``)+t)},``)},forEach:function(e,t,n){ce(Array.isArray(e)?e:te(e),t,n)}};function ee(e){return K.get(e)||K.set(e,te(e).map(function(e){return e.replace(c,`$2`)}))}function te(e){return e.match(r)||[``]}function ce(e,t,n){for(var r=e.length,i,a=0,o,c;a<r;a++)i=e[a],i&&(me(i)&&(i=`"`+i+`"`),c=ue(i),o=!c&&/^\d+$/.test(i),t.call(n,i,c,o,a,e))}function ue(e){return typeof e==`string`&&e&&[`'`,`"`].indexOf(e.charAt(0))!==-1}function de(e){return e.match(a)&&!e.match(i)}function fe(e){return o.test(e)}function me(e){return!ue(e)&&(de(e)||fe(e))}})),require_tiny_case=__commonJSMin(((e,t)=>{var n=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,r=e=>e.match(n)||[],i=e=>e[0].toUpperCase()+e.slice(1),a=(e,t)=>r(e).join(t).toLowerCase(),o=e=>r(e).reduce((e,t)=>
144`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,``);t.exports={words:r,upperFirst:i,camelCase:o,pascalCase:e=>i(o(e)),snakeCase:e=>a(e,`_`),kebabCase:e=>a(e,`-`),sentenceCase:e=>i(a(e,` `)),titleCase:e=>r(e).map(i).join(` `)}})),require_toposort=__commonJSMin(((e,t)=>{t.exports=function(e){return n(r(e),e)},t.exports.array=n;function n(e,t){var n=e.length,r=Array(n),o={},c=n,u=i(t),K=a(e);for(t.forEach(function(e){if(!K.has(e[0])||!K.has(e[1]))throw Error(`Unknown node. There is an unknown node in the supplied edges.`)});c--;)o[c]||Y(e[c],c,new Set);return r;function Y(e,t,i){if(i.has(e)){var a;try{a=`, node was:`+JSON.stringify(e)}catch{a=``}throw Error(`Cyclic dependency`+a)}if(!K.has(e))throw Error(`Found unknown node. Make sure to provided all involved nodes. Unknown node: `+JSON.stringify(e));if(!o[t]){o[t]=!0;var c=u.get(e)||new Set;if(c=Array.from(c),t=c.length){i.add(e);do{var X=c[--t];Y(X,K.get(X),i)}while(t);i.delete(e)}r[--n]=e}}}function r(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function i(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function a(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}})),import_property_expr=require_property_expr(),import_tiny_case=require_tiny_case(),import_toposort=__toESM(require_toposort()),toString$4=Object.prototype.toString,errorToString=Error.prototype.toString,regExpToString=RegExp.prototype.toString,symbolToString$1=typeof Symbol<`u`?Symbol.prototype.toString:()=>``,SYMBOL_REGEXP=/^Symbol\((.*)\)(.*)$/;function printNumber(e){return e==+e?e===0&&1/e<0?`-0`:``+e:`NaN`}function printSimpleValue(e,t=!1){if(e==null||e===!0||e===!1)return``+e;let n=typeof e;if(n===`number`)return printNumber(e);if(n===`string`)return t?`"${e}"`:e;if(n===`function`)return`[Function `+(e.name||`anonymous`)+`]`;if(n===`symbol`)return symbolToString$1.call(e).replace(SYMBOL_REGEXP,`Symbol($1)`);let r=toString$4.call(e).slice(8,-1);return r===`Date`?isNaN(e.getTime())?``+e:e.toISOString(e):r===`Error`||e instanceof Error?`[`+errorToString.call(e)+`]`:r===`RegExp`?regExpToString.call(e):null}function printValue(e,t){let n=printSimpleValue(e,t);return n===null?JSON.stringify(e,function(e,n){let r=printSimpleValue(this[e],t);return r===null?n:r},2):n}function toArray$1(e){return e==null?[]:[].concat(e)}var _Symbol$toStringTag,strReg=/\$\{\s*(\w+)\s*\}/g;_Symbol$toStringTag=Symbol.toStringTag;var ValidationError=class e extends Error{static formatError(e,t){let n=t.label||t.path||`this`;return n!==t.path&&(t=Object.assign({},t,{path:n})),typeof e==`string`?e.replace(strReg,(e,n)=>printValue(t[n])):typeof e==`function`?e(t):e}static isError(e){return e&&e.name===`ValidationError`}constructor(t,n,r,i,a){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this[_Symbol$toStringTag]=`Error`,this.name=`ValidationError`,this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],toArray$1(t).forEach(t=>{if(e.isError(t)){this.errors.push(...t.errors);let e=t.inner.length?t.inner:[t];this.inner.push(...e)}else this.errors.push(t)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],!a&&Error.captureStackTrace&&Error.captureStackTrace(this,e)}},mixed={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{let i=r!=null&&r!==n?` (cast from the value \`${printValue(r,!0)}\`).`:`.`;return t===`mixed`?`${e} must match the configured type. The validated value was: \`${printValue(n,!0)}\``+i:`${e} must be a \`${t}\` type, but the final value was: \`${printValue(n,!0)}\``+i}}
144,string$2={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},number$1={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},boolean$1={isValue:"${path} field must be ${value}"},object={noUnknown:"${path} field has unspecified keys: ${unknown}"},array={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},tuple={notType:e=>{let{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${printValue(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${printValue(n,!0)}\``}return ValidationError.formatError(mixed.notType,e)}},locale=Object.assign(Object.create(null),{mixed,string:string$2,number:number$1,date,object,array,boolean:boolean$1,tuple}),isSchema=e=>e&&e.__isYupSchema__,Condition=class e{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:a}=n,o=typeof r==`function`?r:(...e)=>e.every(e=>e===r);return new e(t,(e,t)=>{var n;return(o(...e)?i:a)?.(t)??t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(t?.value,t?.parent,t?.context)),r=this.fn(n,e,t);if(r===void 0||r===e)return e;if(!isSchema(r))throw TypeError(`conditions must return a schema object`);return r.resolve(t)}},prefixes={context:`$`,value:`.`},Reference=class{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!=`string`)throw TypeError(`ref must be a string, got: `+e);if(this.key=e.trim(),e===``)throw TypeError(`ref must be a non-empty string`);this.isContext=this.key[0]===prefixes.context,this.isValue=this.key[0]===prefixes.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?prefixes.context:this.isValue?prefixes.value:``;this.path=this.key.slice(n.length),this.getter=this.path&&(0,import_property_expr.getter)(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,t?.parent,t?.context)}resolve(){return this}describe(){return{type:`ref`,key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}};Reference.prototype.__isYupRef=!0;var isAbsent=e=>e==null;function createValidation(e){function t({value:t,path:n=``,options:r,originalValue:i,schema:a},o,c){let{name:u,test:K,params:Y,message:X,skipAbsent:ee}=e,{parent:te,context:ce,abortEarly:ue=a.spec.abortEarly,disableStackTrace:de=a.spec.disableStackTrace}=r;function fe(e){return Reference.isRef(e)?e.getValue(t,te,ce):e}function me(e={}){var r;let o=Object.assign({value:t,originalValue:i,label:a.spec.label,path:e.path||n,spec:a.spec},Y,e.params);for(let e of Object.keys(o))o[e]=fe(o[e]);let c=new ValidationError(ValidationError.formatError(e.message||X,o),t,o.path,e.type||u,e.disableStackTrace??de);return c.params=o,c}let ge=ue?o:c,Te={path:n,parent:te,type:u,from:r.from,createError:me,resolve:fe,options:r,originalValue:i,schema:a},Oe=e=>{ValidationError.isError(e)?ge(e):e?c(null):ge(me())},Ae=e=>{ValidationError.isError(e)?ge(e):o(e)};if(ee&&isAbsent(t))return Oe(!0);let ze;try{var qe;if(ze=K.call(Te,t,Te),typeof ze?.then==`function`){if(r.sync)throw Error(`Validation test of type: "${Te.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(ze).then(Oe,Ae)}}catch(e){Ae(e);return}Oe(ze)}return t.OPTIONS=e,t}function getIn$1(e,t,n,r=n){let i,a,o;return t?((0,import_property_expr.forEach)(t,(c,u,K)=>{let Y=u?c.slice(1,c.length-1):c;e=e.resolve({context:r,parent:i,value:n});let X=e.type===`tuple`,ee=K?parseInt(Y,10):0;if(e.innerType||X){if(X&&!K)throw Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&ee>=n.length)throw Error(`Yup.reach cannot resolve an array item at index: ${c}, in the path: ${t}. because there is no value at that index. `);i=n,n&&=n[ee],e=X?e.spec.types[ee]:e.innerType}if(!K){if(!e.fields||!e.fields[Y])throw Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n&&=n[Y],e=e.fields[Y]}a=Y,o=u?`[`+c+`]`:`.`+c}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}var ReferenceSet=class e extends Set{describe(){let e=[];for(let t of this.values())e.push(Reference.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(let n of this.values())t.push(e(n));return t}clone(){return new e(this.values())}merge(e,t){let n=this.clone();
vendor: 8,342 bytes, line 144
144return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}};function clone$1(e,t=new Map){if(isSchema(e)||!e||typeof e!=`object`)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=clone$1(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(let[r,i]of e.entries())n.set(r,clone$1(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(let r of e)n.add(clone$1(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=clone$1(i,t)}else throw Error(`Unable to clone ${e}`);return n}var Schema$1=class{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new ReferenceSet,this._blacklist=new ReferenceSet,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(mixed.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e?.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;let t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=clone$1(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(e.length===0)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!==`mixed`)throw TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();return n.spec=Object.assign({},t.spec,n.spec),n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,r,i;return Object.assign({},e,{from:e.from||[],strict:e.strict??this.spec.strict,abortEarly:e.abortEarly??this.spec.abortEarly,recursive:e.recursive??this.spec.recursive,disableStackTrace:e.disableStackTrace??this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({value:e},t)),r=t.assert===`ignore-optionality`,i=n._cast(e,t);if(t.assert!==!1&&!n.isType(i)){if(r&&isAbsent(i))return i;let a=printValue(e),o=printValue(i);throw TypeError(`The value of ${t.path||`field`} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${a} \n`+(o===a?``:`result of cast: ${o}`))}return i}_cast(e,t){let n=e===void 0?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return n===void 0&&(n=this.getDefault(t)),n}_validate(e,t={},n,r){let{path:i,originalValue:a=e,strict:o=this.spec.strict}=t,c=e;o||(c=this._cast(c,Object.assign({assert:!1},t)));let u=[];for(let e of Object.values(this.internalTests))e&&u.push(e);this.runTests({path:i,value:c,originalValue:a,options:t,tests:u},n,e=>{if(e.length)return r(e,c);this.runTests({path:i,value:c,originalValue:a,options:t,tests:this.tests},n,r)})}runTests(e,t,n){let r=!1,{tests:i,value:a,originalValue:o,path:c,options:u}=e,K=e=>{r||(r=!0,t(e,a))},Y=e=>{r||(r=!0,n(e,a))},X=i.length,ee=[];if(!X)return Y([]);let te={value:a,originalValue:o,path:c,options:u,schema:this};for(let e=0;e<i.length;e++){let t=i[e];t(te,K,function(e){e&&(Array.isArray(e)?ee.push(...e):ee.push(e)),--X<=0&&Y(ee)})}}asNestedTest({key:e,index:t,parent:n,parentPath:r,originalParent:i,options:a}){let o=e??t;if(o==null)throw TypeError("Must include `key` or `index` for nested validations");let c=typeof o==`number`,u=n[o],K=Object.assign({},a,{strict:!0,parent:n,value:u,originalValue:i[o],key:void 0,[c?`index`:`key`]:o,path:c||o.includes(`.`)?`${r||``}[${u?o:`"${o}"`}]`:(r?`${r}.`:``)+e});return(e,t,n)=>this.resolve(K)._validate(u,K,t,n)}validate(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),i=t?.disableStackTrace??r.spec.disableStackTrace;return new Promise((n,a)=>r._validate(e,t,(e,t)=>{ValidationError.isError(e)&&(e.value=t),a(e)},(e,t)=>{e.length?a(new ValidationError(e,t,void 0,void 0,i)):n(t)}))}validateSync(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),i,a=t?.disableStackTrace??r.spec.disableStackTrace;return r._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw ValidationError.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new ValidationError(t,e,void 0,void 0,a);i=n}),i}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(ValidationError.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(ValidationError.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return t==null?t:typeof t==`function`?t.call(this,e):clone$1(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){let n=this.clone({nullable:e});return n.internalTests.nullable=createValidation({message:t,name:`nullable`,test(e){return e!==null||this.schema.spec.nullable}}),n}optionality(e,t){let n=this.clone({optional:e});return n.internalTests.optionality=createValidation({message:t,name:`optionality`,test(e){return e!==void 0||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=mixed.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=mixed.notNull){return this.nullability(!1,e)}required(e=mixed.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=e.length===1?typeof e[0]==`function`?{test:e[0]}:e[0]:e.length===2?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},t.message===void 0&&(t.message=mixed.default),typeof t.test!=`function`)throw TypeError("`test` is a required parameters");let n=this.clone(),r=createValidation(t),i=t.exclusive||t.name&&n.exclusiveTests[t.name]===!0;if(t.exclusive&&!t.name)throw TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>e.OPTIONS.name!==t.name||!i&&e.OPTIONS.test!==r.OPTIONS.test),n.tests.push(r),n}when(e,t){!Array.isArray(e)&&typeof e!=`string`&&(t=e,e=`.`);let n=this.clone(),r=toArray$1(e).map(e=>new Reference(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push(typeof t==`function`?new Condition(r,t):Condition.fromOptions(r,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=createValidation({message:e,name:`typeError`,skipAbsent:!0,test(e){return this.schema._typeCheck(e)?!0:this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=mixed.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=createValidation({message:t,name:`oneOf`,skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return n.includes(e)?!0:this.createError({params:{values:Array.from(t).join(`, `),resolved:n}})}}),n}notOneOf(e,t=mixed.notOneOf){let n=this.clone();
144return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=createValidation({message:t,name:`notOneOf`,test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(`, `),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){let t=(e?this.resolve(e):this).clone(),{label:n,meta:r,optional:i,nullable:a}=t.spec;return{meta:r,label:n,optional:i,nullable:a,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map(e=>({name:e.OPTIONS.name,params:e.OPTIONS.params})).filter((e,t,n)=>n.findIndex(t=>t.name===e.name)===t)}}};Schema$1.prototype.__isYupSchema__=!0;for(let e of[`validate`,`validateSync`])Schema$1.prototype[`${e}At`]=function(t,n,r={}){let{parent:i,parentPath:a,schema:o}=getIn$1(this,t,n,r.context);return o[e](i&&i[a],Object.assign({},r,{parent:i,path:t}))};for(let e of[`equals`,`is`])Schema$1.prototype[e]=Schema$1.prototype.oneOf;for(let e of[`not`,`nope`])Schema$1.prototype[e]=Schema$1.prototype.notOneOf;var returnsTrue=()=>!0;function create$8(e){return new MixedSchema(e)}var MixedSchema=class extends Schema$1{constructor(e){super(typeof e==`function`?{type:`mixed`,check:e}:Object.assign({type:`mixed`,check:returnsTrue},e))}};create$8.prototype=MixedSchema.prototype;function create$7(){return new BooleanSchema}var BooleanSchema=class extends Schema$1{constructor(){super({type:`boolean`,check(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e==`boolean`}}),this.withMutation(()=>{this.transform((e,t,n)=>{if(n.spec.coerce&&!n.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}isTrue(e=boolean$1.isValue){return this.test({message:e,name:`is-value`,exclusive:!0,params:{value:`true`},test(e){return isAbsent(e)||e===!0}})}isFalse(e=boolean$1.isValue){return this.test({message:e,name:`is-value`,exclusive:!0,params:{value:`false`},test(e){return isAbsent(e)||e===!1}})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}};create$7.prototype=BooleanSchema.prototype;var rEmail=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,rUrl=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,rUUID=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,isTrimmed=e=>isAbsent(e)||e===e.trim(),objStringTag={}.toString();function create$6(){return new StringSchema}var StringSchema=class extends Schema$1{constructor(){super({type:`string`,check(e){return e instanceof String&&(e=e.valueOf()),typeof e==`string`}}),this.withMutation(()=>{this.transform((e,t,n)=>{if(!n.spec.coerce||n.isType(e)||Array.isArray(e))return e;let r=e!=null&&e.toString?e.toString():e;return r===objStringTag?e:r})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||mixed.required,name:`required`,skipAbsent:!0,test:e=>!!e.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(e=>e.OPTIONS.name!==`required`),e))}length(e,t=string$2.length){return this.test({message:t,name:`length`,exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=string$2.min){return this.test({message:t,name:`min`,exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=string$2.max){return this.test({name:`max`,exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n=!1,r,i;return t&&(typeof t==`object`?{excludeEmptyString:n=!1,message:r,name:i}=t:r=t),this.test({name:i||`matches`,message:r||string$2.matches,params:{regex:e},skipAbsent:!0,test:t=>t===``&&n||t.search(e)!==-1})}email(e=string$2.email){return this.matches(rEmail,{name:`email`,message:e,excludeEmptyString:!0})}url(e=string$2.url){return this.matches(rUrl,{name:`url`,message:e,excludeEmptyString:!0})}uuid(e=string$2.uuid){return this.matches(rUUID,{name:`uuid`,message:e,excludeEmptyString:!1})}ensure(){return this.default(``).transform(e=>e===null?``:e)}trim(e=string$2.trim){return this.transform(e=>e==null?e:e.trim()).test({message:e,name:`trim`,test:isTrimmed})}lowercase(e=string$2.lowercase){return this.transform(e=>isAbsent(e)?e:e.toLowerCase()).test({message:e,name:`string_case`,exclusive:!0,skipAbsent:!0,test:e=>isAbsent(e)||e===e.toLowerCase()})}uppercase(e=string$2.uppercase){return this.transform(e=>isAbsent(e)?e:e.toUpperCase()).test({message:e,name:`string_case`,exclusive:!0,skipAbsent:!0,test:e=>isAbsent(e)||e===e.toUpperCase()})}};create$6.prototype=StringSchema.prototype;var isNaN$1=e=>e!=+e;function create$5(){return new NumberSchema}var NumberSchema=class extends Schema$1{constructor(){super({type:`number`,check(e){return e instanceof Number&&(e=e.valueOf()),typeof e==`number`&&!isNaN$1(e)}}),this.withMutation(()=>{this.transform((e,t,n)=>{if(!n.spec.coerce)return e;let r=e;if(typeof r==`string`){if(r=r.replace(/\s/g,``),r===``)return NaN;r=+r}return n.isType(r)||r===null?r:parseFloat(r)})})}min(e,t=number$1.min){return this.test({message:t,name:`min`,exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t>=this.resolve(e)}})}max(e,t=number$1.max){return this.test({message:t,name:`max`,exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t<=this.resolve(e)}})}lessThan(e,t=number$1.lessThan){return this.test({message:t,name:`max`,exclusive:!0,params:{less:e},skipAbsent:!0,test(t){return t<this.resolve(e)}})}moreThan(e,t=number$1.moreThan){return this.test({message:t,name:`min`,exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(e=number$1.positive){return this.moreThan(0,e)}negative(e=number$1.negative){return this.lessThan(0,e)}integer(e=number$1.integer){return this.test({name:`integer`,message:e,ski
vendor: 5,784 bytes, line 144
144pAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(e=>isAbsent(e)?e:e|0)}round(e){var t;let n=[`ceil`,`floor`,`round`,`trunc`];if(e=e?.toLowerCase()||`round`,e===`trunc`)return this.truncate();if(n.indexOf(e.toLowerCase())===-1)throw TypeError(`Only valid options for round() are: `+n.join(`, `));return this.transform(t=>isAbsent(t)?t:Math[e](t))}};create$5.prototype=NumberSchema.prototype;var isoReg=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function toNumber(e,t=0){return Number(e)||t}function parseIsoDate(e){let t=isoReg.exec(e);if(!t)return Date.parse?Date.parse(e):NaN;let n={year:toNumber(t[1]),month:toNumber(t[2],1)-1,day:toNumber(t[3],1),hour:toNumber(t[4]),minute:toNumber(t[5]),second:toNumber(t[6]),millisecond:t[7]?toNumber(t[7].substring(0,3)):0,z:t[8]||void 0,plusMinus:t[9]||void 0,hourOffset:toNumber(t[10]),minuteOffset:toNumber(t[11])};if(n.z===void 0&&n.plusMinus===void 0)return new Date(n.year,n.month,n.day,n.hour,n.minute,n.second,n.millisecond).valueOf();let r=0;return n.z!==`Z`&&n.plusMinus!==void 0&&(r=n.hourOffset*60+n.minuteOffset,n.plusMinus===`+`&&(r=0-r)),Date.UTC(n.year,n.month,n.day,n.hour,n.minute+r,n.second,n.millisecond)}var invalidDate=new Date(``),isDate$1=e=>Object.prototype.toString.call(e)===`[object Date]`;function create$4(){return new DateSchema}var DateSchema=class e extends Schema$1{constructor(){super({type:`date`,check(e){return isDate$1(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=parseIsoDate(t),isNaN(t)?e.INVALID_DATE:new Date(t)))})}prepareParam(e,t){let n;if(Reference.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=date.min){let n=this.prepareParam(e,`min`);return this.test({message:t,name:`min`,exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=date.max){let n=this.prepareParam(e,`max`);return this.test({message:t,name:`max`,exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}};DateSchema.INVALID_DATE=invalidDate,create$4.prototype=DateSchema.prototype,create$4.INVALID_DATE=invalidDate;function sortFields(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([e,t])=>`${e}-${t}`));function a(e,t){let a=(0,import_property_expr.split)(e)[0];r.add(a),i.has(`${t}-${a}`)||n.push([t,a])}for(let t of Object.keys(e)){let n=e[t];r.add(t),Reference.isRef(n)&&n.isSibling?a(n.path,t):isSchema(n)&&`deps`in n&&n.deps.forEach(e=>a(e,t))}return import_toposort.default.array(Array.from(r),n).reverse()}function findIndex(e,t){let n=1/0;return e.some((e,r)=>{var i;if((i=t.path)!=null&&i.includes(e))return n=r,!0}),n}function sortByKeyOrder(e){return(t,n)=>findIndex(e,t)-findIndex(e,n)}var parseJson=(e,t,n)=>{if(typeof e!=`string`)return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function deepPartial(e){if(`fields`in e){let t={};for(let[n,r]of Object.entries(e.fields))t[n]=deepPartial(r);return e.setFields(t)}if(e.type===`array`){let t=e.optional();return t.innerType&&=deepPartial(t.innerType),t}return e.type===`tuple`?e.optional().clone({types:e.spec.types.map(deepPartial)}):`optional`in e?e.optional():e}var deepHas=(e,t)=>{let n=[...(0,import_property_expr.normalizePath)(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=(0,import_property_expr.getter)((0,import_property_expr.join)(n),!0)(e);return!!(i&&r in i)},isObject$3=e=>Object.prototype.toString.call(e)===`[object Object]`;function unknown(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>n.indexOf(e)===-1)}var defaultSort=sortByKeyOrder([]);function create$3(e){return new ObjectSchema(e)}var ObjectSchema=class extends Schema$1{constructor(e){super({type:`object`,check(e){return isObject$3(e)||typeof e==`function`}}),this.fields=Object.create(null),this._sortErrors=defaultSort,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let r=super._cast(e,t);if(r===void 0)return this.getDefault(t);if(!this._typeCheck(r))return r;let i=this.fields,a=t.stripUnknown??this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(r).filter(e=>!this._nodes.includes(e))),c={},u=Object.assign({},t,{parent:c,__validating:t.__validating||!1}),K=!1;for(let e of o){let n=i[e],o=e in r;if(n){let i,a=r[e];u.path=(t.path?`${t.path}.`:``)+e,n=n.resolve({value:a,context:t.context,parent:c});let o=n instanceof Schema$1?n.spec:void 0,Y=o?.strict;if(o!=null&&o.strip){K||=e in r;continue}i=!t.__validating||!Y?n.cast(r[e],u):r[e],i!==void 0&&(c[e]=i)}else o&&!a&&(c[e]=r[e]);(o!==e in c||c[e]!==r[e])&&(K=!0)}return K?c:r}_validate(e,t={},n,r){let{from:i=[],originalValue:a=e,recursive:o=this.spec.recursive}=t;t.from=[{schema:this,value:a},...i],t.__validating=!0,t.originalValue=a,super._validate(e,t,n,(e,i)=>{if(!o||!isObject$3(i)){r(e,i);return}a||=i;let c=[];for(let e of this._nodes){let n=this.fields[e];n&&!Reference.isRef(n)&&c.push(n.asNestedTest({options:t,key:e,parent:i,parentPath:t.path,originalParent:a}))}this.runTests({tests:c,value:i,originalValue:a,options:t},n,t=>{r(t.sort(this._sortErrors).concat(e),i)})})}clone(e){let t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){let r=n[e];n[e]=r===void 0?t:r}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if(`default`in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};
vendor: 5,595 bytes, line 144
144return this._nodes.forEach(n=>{var r;let i=this.fields[n],a=e;(r=a)!=null&&r.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[n]})),t[n]=i&&`getDefault`in i?i.getDefault(a):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=sortFields(e,t),n._sortErrors=sortByKeyOrder(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),r)})}partial(){let e={};for(let[t,n]of Object.entries(this.fields))e[t]=`optional`in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return deepPartial(this)}pick(e){let t={};for(let n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){let t=[];for(let n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let r=(0,import_property_expr.getter)(e,!0);return this.transform(i=>{if(!i)return i;let a=i;return deepHas(i,e)&&(a=Object.assign({},i),n||delete a[e],a[t]=r(i)),a})}json(){return this.transform(parseJson)}noUnknown(e=!0,t=object.noUnknown){typeof e!=`boolean`&&(t=e,e=!0);let n=this.test({name:`noUnknown`,exclusive:!0,message:t,test(t){if(t==null)return!0;let n=unknown(this.schema,t);return!e||n.length===0||this.createError({params:{unknown:n.join(`, `)}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=object.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;let n={};for(let r of Object.keys(t))n[e(r)]=t[r];return n})}camelCase(){return this.transformKeys(import_tiny_case.camelCase)}snakeCase(){return this.transformKeys(import_tiny_case.snakeCase)}constantCase(){return this.transformKeys(e=>(0,import_tiny_case.snakeCase)(e).toUpperCase())}describe(e){let t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(let[i,a]of Object.entries(t.fields)){var r;let t=e;(r=t)!=null&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[i]})),n.fields[i]=a.describe(t)}return n}};create$3.prototype=ObjectSchema.prototype;function create$2(e){return new ArraySchema(e)}var ArraySchema=class extends Schema$1{constructor(e){super({type:`array`,spec:{types:e},check(e){return Array.isArray(e)}}),this.innerType=void 0,this.innerType=e}_cast(e,t){let n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1,i=n.map((e,n)=>{let i=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||``}[${n}]`}));return i!==e&&(r=!0),i});return r?i:n}_validate(e,t={},n,r){var i;let a=this.innerType,o=t.recursive??this.spec.recursive;t.originalValue!=null&&t.originalValue,super._validate(e,t,n,(i,c)=>{var u;if(!o||!a||!this._typeCheck(c)){r(i,c);return}let K=Array(c.length);for(let n=0;n<c.length;n++){var Y;K[n]=a.asNestedTest({options:t,index:n,parent:c,parentPath:t.path,originalParent:t.originalValue??e})}this.runTests({value:c,tests:K,originalValue:t.originalValue??e,options:t},n,e=>r(e.concat(i),c))})}clone(e){let t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(parseJson)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!isSchema(e))throw TypeError("`array.of()` sub-schema must be a valid yup schema not: "+printValue(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=array.length){return this.test({message:t,name:`length`,exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return t||=array.min,this.test({message:t,name:`min`,exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return t||=array.max,this.test({message:t,name:`max`,exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:t==null?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>e==null?e:e.filter(t))}describe(e){let t=(e?this.resolve(e):this).clone(),n=super.describe(e);if(t.innerType){var r;let i=e;(r=i)!=null&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=t.innerType.describe(i)}return n}};create$2.prototype=ArraySchema.prototype;function create$1$1(e){return new TupleSchema(e)}var TupleSchema=class extends Schema$1{constructor(e){super({type:`tuple`,spec:{types:e},check(e){let t=this.spec.types;return Array.isArray(e)&&e.length===t.length}}),this.withMutation(()=>{this.typeError(tuple.notType)})}_cast(e,t){let{types:n}=this.spec,r=super._cast(e,t);if(!this._typeCheck(r))return r;let i=!1,a=n.map((e,n)=>{let a=e.cast(r[n],Object.assign({},t,{path:`${t.path||``}[${n}]`}));return a!==r[n]&&(i=!0),a});return i?a:r}_validate(e,t={},n,r){let i=this.spec.types;super._validate(e,t,n,(a,o)=>{var c;if(!this._typeCheck(o)){r(a,o);return}let u=[];for(let[n,r]of i.entries()){var K;u[n]=r.asNestedTest({options:t,index:n,parent:o,parentPath:t.path,originalParent:t.originalValue??e})}this.runTests({value:o,tests:u,originalValue:t.originalValue??e,options:t},n,e=>r(e.concat(a),o))})}describe(e){let t=(e?this.resolve(e):this).clone(),n=super.describe(e);return n.innerType=t.spec.types.map((t,n)=>{var r;let i=e;return(r=i)!=null&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[n]})),t.describe(i)}),n}};create$1$1.prototype=TupleSchema.prototype;
144function create$9(e){return new Lazy(e)}var Lazy=class e{constructor(e){this.type=`lazy`,this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(e,t={})=>{let n=this.builder(e,t);if(!isSchema(n))throw TypeError(`lazy() functions must return a valid schema`);return this.spec.optional&&(n=n.optional()),n.resolve(t)},this.builder=e,this.spec={meta:void 0,optional:!1}}clone(t){let n=new e(this.builder);return n.spec=Object.assign({},this.spec,t),n}optionality(e){return this.clone({optional:e})}optional(){return this.optionality(!0)}resolve(e){return this._resolve(e.value,e)}cast(e,t){return this._resolve(e,t).cast(e,t)}asNestedTest(e){let{key:t,index:n,parent:r,options:i}=e,a=r[n??t];return this._resolve(a,Object.assign({},i,{value:a,parent:r})).asNestedTest(e)}validate(e,t){return this._resolve(e,t).validate(e,t)}validateSync(e,t){return this._resolve(e,t).validateSync(e,t)}validateAt(e,t,n){return this._resolve(t,n).validateAt(e,t,n)}validateSyncAt(e,t,n){return this._resolve(t,n).validateSyncAt(e,t,n)}isValid(e,t){return this._resolve(e,t).isValid(e,t)}isValidSync(e,t){return this._resolve(e,t).isValidSync(e,t)}describe(e){return e?this.resolve(e).describe(e):{type:`lazy`,meta:this.spec.meta,label:void 0}}meta(...e){if(e.length===0)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}};function setLocale(e){Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{locale[t][n]=e[t][n]})})}var require_ReactPropTypesSecret=__commonJSMin(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),require_factoryWithThrowingShims=__commonJSMin(((e,t)=>{var n=require_ReactPropTypesSecret();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var c=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name=`Invariant Violation`,c}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),require_prop_types=__commonJSMin(((e,t)=>{t.exports=require_factoryWithThrowingShims()()})),require_shallowequal=__commonJSMin(((e,t)=>{t.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(t),u=0;u<a.length;u++){var K=a[u];if(!c(K))return!1;var Y=e[K],X=t[K];if(i=n?n.call(r,Y,X,K):void 0,i===!1||i===void 0&&Y!==X)return!1}return!0}})),import_prop_types=__toESM(require_prop_types()),import_react_fast_compare$1=__toESM(require_react_fast_compare$1()),import_browser$2=__toESM(require_browser$2()),import_shallowequal=__toESM(require_shallowequal());function a$5(){return a$5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a$5.apply(this,arguments)}function s$11(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,c$10(e,t)}function c$10(e,t){return c$10=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c$10(e,t)}function u$4(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}var l$7={BASE:`base`,BODY:`body`,HEAD:`head`,HTML:`html`,LINK:`link`,META:`meta`,NOSCRIPT:`noscript`,SCRIPT:`script`,STYLE:`style`,TITLE:`title`,FRAGMENT:`Symbol(react.fragment)`},p$6={rel:[`amphtml`,`canonical`,`alternate`]},f$7={type:[`application/ld+json`]},d$11={charset:``,name:[`robots`,`description`],property:[`og:type`,`og:title`,`og:url`,`og:image`,`og:image:alt`,`og:description`,`twitter:url`,`twitter:title`,`twitter:description`,`twitter:image`,`twitter:image:alt`,`twitter:card`,`twitter:site`]},h$5=Object.keys(l$7).map(function(e){return l$7[e]}
144),m$4={accesskey:`accessKey`,charset:`charSet`,class:`className`,contenteditable:`contentEditable`,contextmenu:`contextMenu`,"http-equiv":`httpEquiv`,itemprop:`itemProp`,tabindex:`tabIndex`},y$5=Object.keys(m$4).reduce(function(e,t){return e[m$4[t]]=t,e},{}),T$5=function(e,t){for(var n=e.length-1;n>=0;--n){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},g$4=function(e){var t=T$5(e,l$7.TITLE),n=T$5(e,`titleTemplate`);if(Array.isArray(t)&&(t=t.join(``)),n&&t)return n.replace(/%s/g,function(){return t});var r=T$5(e,`defaultTitle`);return t||r||void 0},b$4=function(e){return T$5(e,`onChangeClientState`)||function(){}},v$3=function(e,t){return t.filter(function(t){return t[e]!==void 0}).map(function(t){return t[e]}).reduce(function(e,t){return a$5({},e,t)},{})},A$3=function(e,t){return t.filter(function(e){return e[l$7.BASE]!==void 0}).map(function(e){return e[l$7.BASE]}).reverse().reduce(function(t,n){if(!t.length)for(var r=Object.keys(n),i=0;i<r.length;i+=1){var a=r[i].toLowerCase();if(e.indexOf(a)!==-1&&n[a])return t.concat(n)}return t},[])},C$3=function(e,t,n){var r={};return n.filter(function(t){return!!Array.isArray(t[e])||(t[e]!==void 0&&console&&typeof console.warn==`function`&&console.warn(`Helmet: `+e+` should be of type "Array". Instead found type "`+typeof t[e]+`"`),!1)}).map(function(t){return t[e]}).reverse().reduce(function(e,n){var i={};n.filter(function(e){for(var n,a=Object.keys(e),o=0;o<a.length;o+=1){var c=a[o],u=c.toLowerCase();t.indexOf(u)===-1||n===`rel`&&e[n].toLowerCase()===`canonical`||u===`rel`&&e[u].toLowerCase()===`stylesheet`||(n=u),t.indexOf(c)===-1||c!==`innerHTML`&&c!==`cssText`&&c!==`itemprop`||(n=c)}if(!n||!e[n])return!1;var K=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][K]&&(i[n][K]=!0,!0)}).reverse().forEach(function(t){return e.push(t)});for(var a=Object.keys(i),o=0;o<a.length;o+=1){var c=a[o];r[c]=a$5({},r[c],i[c])}return e},[]).reverse()},O$3=function(e,t){if(Array.isArray(e)&&e.length){for(var n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},S$4=function(e){return Array.isArray(e)?e.join(``):e},E$4=function(e,t){return Array.isArray(e)?e.reduce(function(e,n){return function(e,t){for(var n=Object.keys(e),r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1}(n,t)?e.priority.push(n):e.default.push(n),e},{priority:[],default:[]}):{default:e}},I$5=function(e,t){var n;return a$5({},e,((n={})[t]=void 0,n))},P$3=[l$7.NOSCRIPT,l$7.SCRIPT,l$7.STYLE],w$5=function(e,t){return t===void 0&&(t=!0),!1===t?String(e):String(e).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#x27;`)},x$4=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n]===void 0?``+n:n+`="`+e[n]+`"`;return t?t+` `+r:r},``)},L$4=function(e,t){return t===void 0&&(t={}),Object.keys(e).reduce(function(t,n){return t[m$4[n]||n]=e[n],t},t)},j$2=function(e,t){return t.map(function(t,n){var r,i=((r={key:n})[`data-rh`]=!0,r);return Object.keys(t).forEach(function(e){var n=m$4[e]||e;n===`innerHTML`||n===`cssText`?i.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:i[n]=t[e]}),import_react.createElement(e,i)})},M$2=function(e,t,n){switch(e){case l$7.TITLE:return{toComponent:function(){return n=t.titleAttributes,(r={key:e=t.title})[`data-rh`]=!0,i=L$4(n,r),[import_react.createElement(l$7.TITLE,i,e)];var e,n,r,i},toString:function(){return function(e,t,n,r){var i=x$4(n),a=S$4(t);return i?`<`+e+` data-rh="true" `+i+`>`+w$5(a,r)+`</`+e+`>`:`<`+e+` data-rh="true">`+w$5(a,r)+`</`+e+`>`}(e,t.title,t.titleAttributes,n)}};case`bodyAttributes`:case`htmlAttributes`:return{toComponent:function(){return L$4(t)},toString:function(){return x$4(t)}};default:return{toComponent:function(){return j$2(e,t)},toString:function(){return function(e,t,n){return t.reduce(function(t,r){var i=Object.keys(r).filter(function(e){return e!==`innerHTML`&&e!==`cssText`}).reduce(function(e,t){var i=r[t]===void 0?t:t+`="`+w$5(r[t],n)+`"`;return e?e+` `+i:i},``),a=r.innerHTML||r.cssText||``,o=P$3.indexOf(e)===-1;return t+`<`+e+` data-rh="true" `+i+(o?`/>`:`>`+a+`</`+e+`>`)},``)}(e,t,n)}}}},k$2=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,i=e.htmlAttributes,a=e.noscriptTags,o=e.styleTags,c=e.title,u=c===void 0?``:c,K=e.titleAttributes,Y=e.linkTags,X=e.metaTags,ee=e.scriptTags,te={toComponent:function(){},toString:function(){return``}};if(e.prioritizeSeoTags){var ce=function(e){var t=e.linkTags,n=e.scriptTags,r=e.encode,i=E$4(e.metaTags,d$11),a=E$4(t,p$6),o=E$4(n,f$7);return{priorityMethods:{toComponent:function(){return[].concat(j$2(l$7.META,i.priority),j$2(l$7.LINK,a.priority),j$2(l$7.SCRIPT,o.priority))},toString:function(){return M$2(l$7.META,i.priority,r)+` `+M$2(l$7.LINK,a.priority,r)+` `+M$2(l$7.SCRIPT,o.priority,r)}},metaTags:i.default,linkTags:a.default,scriptTags:o.default}}(e);te=ce.priorityMethods,Y=ce.linkTags,X=ce.metaTags,ee=ce.scriptTags}return{priority:te,base:M$2(l$7.BASE,t,r),bodyAttributes:M$2(`bodyAttributes`,n,r),htmlAttributes:M$2(`htmlAttributes`,i,r),link:M$2(l$7.LINK,Y,r),meta:M$2(l$7.META,X,r),noscript:M$2(l$7.NOSCRIPT,a,r),script:M$2(l$7.SCRIPT,ee,r),style:M$2(l$7.STYLE,o,r),title:M$2(l$7.TITLE,{title:u,titleAttributes:K},r)}},H$3=[],N$3=function(e,t){var n=this;t===void 0&&(t=typeof document<`u`),this.instances=[],this.value={setHelmet:function(e){n.context.helmet=e},helmetInstances:{get:function(){return n.canUseDOM?H$3:n.instances},add:function(e){(n.canUseDOM?H$3:n.instances).push(e)},remove:function(e){var t=(n.canUseDOM?H$3:n.instances).indexOf(e);(n.canUseDOM?H$3:n.instances).splice(t,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=k$2({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:``,titleAttributes:{}}))},R$3=import_react.createContext({}),D$6=import_prop_types.default.shape({setHelmet:import_prop_types.default.func,helmetInstances:import_prop_types.default.shape({get:import_prop_types.default.func,add:import_prop_types.default.func,remove:import_prop_types.default.func})}),U=typeof document<`u`,q$3=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new N$3(r.props.context,t.canUseDOM),r}return s$11(t,e),t.prototype.render=function(){return import_react.createElement(R$3.Provider,{value:this.helmetData.value},this.props.children)},t}(import_react.Component);q$3.canUseDOM=U,q$3.propTypes={context:import_prop_types.default.shape({helmet:import_prop_types.default.shape()}),children:import_prop_types.default.node.isRequired},q$3.defaultProps={context:{}},q$3.displayName=`HelmetProvider`;var Y$2=function(e,t){var n,r=document.head||document.querySelector(l$7.HEAD),i=r.querySelectorAll(e+`[data-rh]`),a=[].slice.call(i),o=[];return t&&t.length&&t.forEach(function(t){var r=document.createElement(e);for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(i===`innerHTML`?r.innerHTML=t.innerHTML:i===`cssText`?r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText)):r.setAttribute(i,t[i]===void 0?``:t[i]));r.setAttribute(`data-rh`,`true`),a.some(function(e,t){return n=t,r.isEqualNode(e)})?a.splice(n,1):o.push(r)}),a.forEach(function(e){return e.parentNode.removeChild(e)}),o.forEach(function(e){return r.appendChild(e)}),{oldTags:a,newTags:o}},B$1=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(`data-rh`),i=r?r.split(`,`):[],a=[].concat(i),o=Object.keys(t),c=0;c<o.length;c+=1){var u=o[c],K=t[u]||``;n.getAttribute(u)!==K&&n.setAttribute(u,K),i.indexOf(u)===-1&&i.push(u);var Y=a.indexOf(u);Y!==-1&&a.splice(Y,1)}for(var X=a.length-1;X>=0;--X)n.removeAttribute(a[X]);i.length===a.length?n.removeAttribute(`data-rh`):n.getAttribute(`data-rh`)!==o.join(`,`)&&n.setAttribute(`data-rh`,o.join(`,`))}},K$1=function(e,t){var n=e.baseTag,r=e.htmlAttributes,i=e.linkTags,a=e.metaTags,o=e.noscriptTags,c=e.onCh
vendor: 3,434 bytes, line 144
144angeClientState,u=e.scriptTags,K=e.styleTags,Y=e.title,X=e.titleAttributes;B$1(l$7.BODY,e.bodyAttributes),B$1(l$7.HTML,r),function(e,t){e!==void 0&&document.title!==e&&(document.title=S$4(e)),B$1(l$7.TITLE,t)}(Y,X);var ee={baseTag:Y$2(l$7.BASE,n),linkTags:Y$2(l$7.LINK,i),metaTags:Y$2(l$7.META,a),noscriptTags:Y$2(l$7.NOSCRIPT,o),scriptTags:Y$2(l$7.SCRIPT,u),styleTags:Y$2(l$7.STYLE,K)},te={},ce={};Object.keys(ee).forEach(function(e){var t=ee[e],n=t.newTags,r=t.oldTags;n.length&&(te[e]=n),r.length&&(ce[e]=ee[e].oldTags)}),t&&t(),c(e,te,ce)},_$2=null,z$2=function(e){function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).rendered=!1,t}s$11(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!(0,import_shallowequal.default)(e,this.props)},n.componentDidUpdate=function(){this.emitChange()},n.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},n.emitChange=function(){var e,t,n=this.props.context,r=n.setHelmet,i=null,a=(e=n.helmetInstances.get().map(function(e){var t=a$5({},e.props);return delete t.context,t}),{baseTag:A$3([`href`],e),bodyAttributes:v$3(`bodyAttributes`,e),defer:T$5(e,`defer`),encode:T$5(e,`encodeSpecialCharacters`),htmlAttributes:v$3(`htmlAttributes`,e),linkTags:C$3(l$7.LINK,[`rel`,`href`],e),metaTags:C$3(l$7.META,[`name`,`charset`,`http-equiv`,`property`,`itemprop`],e),noscriptTags:C$3(l$7.NOSCRIPT,[`innerHTML`],e),onChangeClientState:b$4(e),scriptTags:C$3(l$7.SCRIPT,[`src`,`innerHTML`],e),styleTags:C$3(l$7.STYLE,[`cssText`],e),title:g$4(e),titleAttributes:v$3(`titleAttributes`,e),prioritizeSeoTags:O$3(e,`prioritizeSeoTags`)});q$3.canUseDOM?(t=a,_$2&&cancelAnimationFrame(_$2),t.defer?_$2=requestAnimationFrame(function(){K$1(t,function(){_$2=null})}):(K$1(t),_$2=null)):k$2&&(i=k$2(a)),r(i)},n.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},n.render=function(){return this.init(),null},t}(import_react.Component);z$2.propTypes={context:D$6.isRequired},z$2.displayName=`HelmetDispatcher`;var F$4=[`children`],G$2=[`children`],W$1=function(e){function t(){return e.apply(this,arguments)||this}s$11(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!(0,import_react_fast_compare$1.default)(I$5(this.props,`helmetData`),I$5(e,`helmetData`))},n.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case l$7.SCRIPT:case l$7.NOSCRIPT:return{innerHTML:t};case l$7.STYLE:return{cssText:t};default:throw Error(`<`+e.type+` /> elements are self-closing and can not contain children. Refer to our API for more information.`)}},n.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren;return a$5({},r,((t={})[n.type]=[].concat(r[n.type]||[],[a$5({},e.newChildProps,this.mapNestedChildrenToProps(n,e.nestedChildren))]),t))},n.mapObjectTypeChildren=function(e){var t,n,r=e.child,i=e.newProps,a=e.newChildProps,o=e.nestedChildren;switch(r.type){case l$7.TITLE:return a$5({},i,((t={})[r.type]=o,t.titleAttributes=a$5({},a),t));case l$7.BODY:return a$5({},i,{bodyAttributes:a$5({},a)});case l$7.HTML:return a$5({},i,{htmlAttributes:a$5({},a)});default:return a$5({},i,((n={})[r.type]=a$5({},a),n))}},n.mapArrayTypeChildrenToProps=function(e,t){var n=a$5({},t);return Object.keys(e).forEach(function(t){var r;n=a$5({},n,((r={})[t]=e[t],r))}),n}
144,n.warnOnInvalidChildren=function(e,t){return(0,import_browser$2.default)(h$5.some(function(t){return e.type===t}),typeof e.type==`function`?`You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.`:`Only elements types `+h$5.join(`, `)+` are allowed. Helmet does not support rendering <`+e.type+`> elements. Refer to our API for more information.`),(0,import_browser$2.default)(!t||typeof t==`string`||Array.isArray(t)&&!t.some(function(e){return typeof e!=`string`}),`Helmet expects a string as a child of <`+e.type+`>. Did you forget to wrap your children in braces? ( <`+e.type+">{``}</"+e.type+`> ) Refer to our API for more information.`),!0},n.mapChildrenToProps=function(e,t){var n=this,r={};return import_react.Children.forEach(e,function(e){if(e&&e.props){var i=e.props,a=i.children,o=u$4(i,F$4),c=Object.keys(o).reduce(function(e,t){return e[y$5[t]||t]=o[t],e},{}),u=e.type;switch(typeof u==`symbol`?u=u.toString():n.warnOnInvalidChildren(e,a),u){case l$7.FRAGMENT:t=n.mapChildrenToProps(a,t);break;case l$7.LINK:case l$7.META:case l$7.NOSCRIPT:case l$7.SCRIPT:case l$7.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:c,nestedChildren:a});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:c,nestedChildren:a})}}}),this.mapArrayTypeChildrenToProps(r,t)},n.render=function(){var e=this.props,t=e.children,n=u$4(e,G$2),r=a$5({},n),i=n.helmetData;return t&&(r=this.mapChildrenToProps(t,r)),!i||i instanceof N$3||(i=new N$3(i.context,i.instances)),i?import_react.createElement(z$2,a$5({},r,{context:i.value,helmetData:void 0})):import_react.createElement(R$3.Consumer,null,function(e){return import_react.createElement(z$2,a$5({},r,{context:e}))})},t}(import_react.Component);W$1.propTypes={base:import_prop_types.default.object,bodyAttributes:import_prop_types.default.object,children:import_prop_types.default.oneOfType([import_prop_types.default.arrayOf(import_prop_types.default.node),import_prop_types.default.node]),defaultTitle:import_prop_types.default.string,defer:import_prop_types.default.bool,encodeSpecialCharacters:import_prop_types.default.bool,htmlAttributes:import_prop_types.default.object,link:import_prop_types.default.arrayOf(import_prop_types.default.object),meta:import_prop_types.default.arrayOf(import_prop_types.default.object),noscript:import_prop_types.default.arrayOf(import_prop_types.default.object),onChangeClientState:import_prop_types.default.func,script:import_prop_types.default.arrayOf(import_prop_types.default.object),style:import_prop_types.default.arrayOf(import_prop_types.default.object),title:import_prop_types.default.string,titleAttributes:import_prop_types.default.object,titleTemplate:import_prop_types.default.string,prioritizeSeoTags:import_prop_types.default.bool,helmetData:import_prop_types.default.object},W$1.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},W$1.displayName=`Helmet`;function bind(e,t){return function(){return e.apply(t,arguments)}}var{toString:toString$3}=Object.prototype,{getPrototypeOf}=Object,{iterator,toStringTag}=Symbol,hasOwnProperty$12=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),hasOwnInPrototypeChain=(e,t)=>{let n=e,r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),hasOwnProperty$12(n,t))return!0;n=getPrototypeOf(n)}return!1},getSafeProp=(e,t)=>e!=null&&hasOwnInPrototypeChain(e,t)?e[t]:void 0,kindOf=(e=>t=>{let n=toString$3.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:isArray$1}=Array,isUndefined=typeOfTest(`undefined`);function isBuffer$2(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction$4(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var isArrayBuffer=kindOfTest(`ArrayBuffer`);function isArrayBufferView(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&isArrayBuffer(e.buffer),t}var isString$3=typeOfTest(`string`),isFunction$4=typeOfTest(`function`),isNumber=typeOfTest(`number`),isObject$2=e=>typeof e==`object`&&!!e,isBoolean=e=>e===!0||e===!1,isPlainObject$2=e=>{if(!isObject$2(e))return!1;let t=getPrototypeOf(e);return(t===null||t===Object.prototype||getPrototypeOf(t)===null)&&!hasOwnInPrototypeChain(e,toStringTag)&&!hasOwnInPrototypeChain(e,iterator)},isEmptyObject=e=>{if(!isObject$2(e)||isBuffer$2(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},isDate=kindOfTest(`Date`),isFile=kindOfTest(`File`),isReactNativeBlob=e=>!!(e&&e.uri!==void 0),isReactNative=e=>e&&e.getParts!==void 0,isBlob=kindOfTest(`Blob`),isFileList=kindOfTest(`FileList`),isSet$1=kindOfTest(`Set`),isStream=e=>isObject$2(e)&&isFunction$4(e.pipe);function getGlobal(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var G$1=getGlobal(),FormDataCtor=G$1.FormData===void 0?void 0:G$1.FormData,isFormData=e=>{if(!e)return!1;if(FormDataCtor&&e instanceof FormDataCtor)return!0;let t=getPrototypeOf(e);if(!t||t===Object.prototype||!isFunction$4(e.append))return!1;let n=kindOf(e);return n===`formdata`||n===`object`&&isFunction$4(e.toString)&&e.toString()===`[object FormData]`},isURLSearchParams=kindOfTest(`URLSearchParams`),[isReadableStream$1,isRequest,isResponse,isHeaders]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(kindOfTest),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function forEach(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),isArray$1(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(isBuffer$2(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function findKey(e,t){if(isBuffer$2(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-->0;)if(i=n[r],t===i.toLowerCase())return i;return null}var _global=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge$1(...e){let{caseless:t,skipUndefined:n}=isContextDefined(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&typeof i==`string`&&findKey(r,i)||i,o=hasOwnProperty$12(r,a)?r[a]:void 0;isPlainObject$2(o)&&isPlainObject$2(e)?r[a]=merge$1(o,e):isPlainObject$2(e)?r[a]=merge$1({},e):isArray$1(e)?r[a]=e.slice():(!n||!isUndefined(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++){let n=e[t];if(!n||isBuffer$2(n)||(forEach(n,i),typeof n!=`object`||isArray$1(n)))continue;let r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){let t=r[e];propertyIsEnumerable$2.call(n,t)&&i(n[t],t)}}return r}var extend$1=(e,t,n,{allOwnKeys:r}={})=>(forEach(t,(t,r)=>{n&&isFunction$4(t)?Object.defineProperty(e,r,{__proto__:null,value:bind(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,
144configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=(e,t,n,r)=>{let i,a,o,c={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-->0;)o=i[a],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},toArray=e=>{if(!e)return null;if(isArray$1(e))return e;let t=e.length;if(!isNumber(t))return null;let n=Array(t);for(;t-->0;)n[t]=e[t];return n},isTypedArray$1=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&getPrototypeOf(Uint8Array)),forEachEntry=(e,t)=>{let n=(e&&e[iterator]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},matchAll=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},isHTMLForm=kindOfTest(`HTMLFormElement`),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:propertyIsEnumerable$2}=Object.prototype,isRegExp=kindOfTest(`RegExp`),reduceDescriptors=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};forEach(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},freezeMethods=e=>{reduceDescriptors(e,(t,n)=>{if(isFunction$4(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(isFunction$4(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},toObjectSet=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return isArray$1(e)?r(e):r(String(e).split(t)),n},noop=()=>{},toFiniteNumber=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction$4(e.append)&&e[toStringTag]===`FormData`&&e[iterator])}var toJSONObject=e=>{let t=new WeakSet,n=e=>{if(isObject$2(e)){if(t.has(e))return;if(isBuffer$2(e))return e;if(!(`toJSON`in e)){t.add(e);let r;if(isSet$1(e)){r=[];for(let t of e){let e=n(t);!isUndefined(e)&&r.push(e)}}else r=isArray$1(e)?[]:{},forEach(e,(e,t)=>{let i=n(e);!isUndefined(i)&&(r[t]=i)});return t.delete(e),r}}return e};return n(e)},isAsyncFn=kindOfTest(`AsyncFunction`),isThenable=e=>e&&(isObject$2(e)||isFunction$4(e))&&isFunction$4(e.then)&&isFunction$4(e.catch),_setImmediate=((e,t)=>e?setImmediate:t?((e,t)=>(_global.addEventListener(`message`,({source:n,data:r})=>{n===_global&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),_global.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,isFunction$4(_global.postMessage)),asap=typeof queueMicrotask<`u`?queueMicrotask.bind(_global):typeof process<`u`&&process.nextTick||_setImmediate,isIterable=e=>e!=null&&isFunction$4(e[iterator]),isSafeIterable=e=>e!=null&&hasOwnInPrototypeChain(e,iterator)&&isIterable(e),utils_default={isArray:isArray$1,isArrayBuffer,isBuffer:isBuffer$2,isFormData,isArrayBufferView,isString:isString$3,isNumber,isBoolean,isObject:isObject$2,isPlainObject:isPlainObject$2,isEmptyObject,isReadableStream:isReadableStream$1,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isReactNativeBlob,isReactNative,isBlob,isRegExp,isFunction:isFunction$4,isStream,isURLSearchParams,isTypedArray:isTypedArray$1,isFileList,forEach,merge:merge$1,extend:extend$1,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty:hasOwnProperty$12,hasOwnProp:hasOwnProperty$12,hasOwnInPrototypeChain,getSafeProp,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable,isSafeIterable},ignoreDuplicateOf=utils_default.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),parseHeaders_default=e=>{let t={},n,r,i;return e&&e.split(`
145`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim();let a=utils_default.hasOwnProp(t,n);!n||a&&utils_default.hasOwnProp(ignoreDuplicateOf,n)||(n===`set-cookie`?a?t[n].push(r):t[n]=[r]:t[n]=a?t[n]+`, `+r:r)}),t};function trimSPorHTAB(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}
vendor: 4,635 bytes, line 145
145var INVALID_UNICODE_HEADER_VALUE_CHARS=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),INVALID_BYTE_STRING_HEADER_VALUE_CHARS=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function sanitizeValue(e,t){return utils_default.isArray(e)?e.map(e=>sanitizeValue(e,t)):trimSPorHTAB(String(e).replace(t,``))}var sanitizeHeaderValue=e=>sanitizeValue(e,INVALID_UNICODE_HEADER_VALUE_CHARS),sanitizeByteStringHeaderValue=e=>sanitizeValue(e,INVALID_BYTE_STRING_HEADER_VALUE_CHARS);function toByteStringHeaderObject(e){let t=Object.create(null);return utils_default.forEach(e.toJSON(),(e,n)=>{t[n]=sanitizeByteStringHeaderValue(e)}),t}var $internals=Symbol(`internals`);function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return e===!1||e==null?e:utils_default.isArray(e)?e.map(normalizeValue):sanitizeHeaderValue(String(e))}function parseTokens(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var parameterNameRE=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function trimOWS(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}function decodeQuotedString(e){let t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n=``;for(let r=1;r<t;r++){let i=e.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function parseParameters(e){let t=Object.create(null),n=String(e),r=0,i=!1,a=!1;function o(e){let i=trimOWS(n.slice(r,e)),a=i.indexOf(`=`);if(a<1)return;let o=trimOWS(i.slice(0,a));if(!parameterNameRE.test(o))return;let c=o.toLowerCase();if(c===`__proto__`||c===`constructor`||c===`prototype`)return;let u=trimOWS(i.slice(a+1));t[c]=decodeQuotedString(u)}for(let e=0;e<n.length;e++){let t=n.charCodeAt(e);i?a?a=!1:t===92?a=!0:t===34&&(i=!1):t===34?i=!0:(t===44||t===59)&&(o(e),r=e+1)}return o(n.length),t}var isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,n,r,i){if(utils_default.isFunction(r))return r.call(this,t,n);if(i&&(t=n),utils_default.isString(t)){if(utils_default.isString(r))return t.indexOf(r)!==-1;if(utils_default.isRegExp(r))return r.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function buildAccessors(e,t){let n=utils_default.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var AxiosHeaders$1=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=normalizeHeader(t);if(!i)return;let a=utils_default.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=normalizeValue(e))}let a=(e,t)=>utils_default.forEach(e,(e,n)=>i(e,n,t));if(utils_default.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(utils_default.isString(e)&&(e=e.trim())&&!isValidHeaderName(e))a(parseHeaders_default(e),t);else if(utils_default.isObject(e)&&utils_default.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!utils_default.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],utils_default.hasOwnProp(n,i)?(r=n[i],n[i]=utils_default.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=normalizeHeader(e),e){let n=utils_default.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return parseTokens(e);if(utils_default.isFunction(t))return t.call(this,e,n);if(utils_default.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=normalizeHeader(e),e){let n=utils_default.findKey(this,e);return!(!n||this[n]===void 0||t&&!matchHeaderValue(this,this[n],n,t))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=normalizeHeader(e),e){let i=utils_default.findKey(n,e);i&&(!t||matchHeaderValue(n,n[i],i,t))&&(delete n[i],r=!0)}}return utils_default.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||matchHeaderValue(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return utils_default.forEach(this,(r,i)=>{let a=utils_default.findKey(n,i);if(a){t[a]=normalizeValue(r),delete t[i];return}let o=e?formatHeader(i):String(i).trim();o!==i&&delete t[i],t[o]=normalizeValue(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return utils_default.forEach(this,(n,r)=>
vendor: 6,220 bytes, lines 145-146
145{n!=null&&n!==!1&&(t[r]=e&&utils_default.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
146`)}getSetCookie(){let e=this.get(`set-cookie`);return utils_default.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return parseParameters(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[$internals]=this[$internals]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=normalizeHeader(e);t[r]||(buildAccessors(n,e),t[r]=!0)}return utils_default.isArray(e)?e.forEach(r):r(e),this}};AxiosHeaders$1.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),utils_default.reduceDescriptors(AxiosHeaders$1.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),utils_default.freezeMethods(AxiosHeaders$1);var REDACTED=`[REDACTED ****]`;function hasOwnOrPrototypeToJSON(e){if(utils_default.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(utils_default.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function redactConfig(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||utils_default.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof AxiosHeaders$1&&(e=e.toJSON()),r.push(e);let t;if(utils_default.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);utils_default.isUndefined(r)||(t[n]=r)});else{if(!utils_default.isPlainObject(e)&&hasOwnOrPrototypeToJSON(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?REDACTED:i(a);utils_default.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}function stringifySafely$1(e){try{return String(e)}catch{return``}}function aggregateErrorMessage(e){return e.errors.map(e=>{try{return e&&e.message?stringifySafely$1(e.message):stringifySafely$1(e)}catch{return``}}).filter(Boolean).join(`; `)||e.name||`AggregateError`}var AxiosError$1=class e extends Error{static from(t,n,r,i,a,o){let c=t.message;!c&&utils_default.isArray(t.errors)&&t.errors.length&&(c=aggregateErrorMessage(t));let u=new e(c,n||t.code,r,i,a);return Object.defineProperty(u,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),u.name=t.name,t.status!=null&&u.status==null&&(u.status=t.status),o&&Object.assign(u,o),u}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&utils_default.hasOwnProp(e,`redact`)?e.redact:void 0,n=utils_default.isArray(t)&&t.length>0?redactConfig(e,t):utils_default.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};AxiosError$1.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,AxiosError$1.ERR_BAD_OPTION=`ERR_BAD_OPTION`,AxiosError$1.ECONNABORTED=`ECONNABORTED`,AxiosError$1.ETIMEDOUT=`ETIMEDOUT`,AxiosError$1.ECONNREFUSED=`ECONNREFUSED`,AxiosError$1.ERR_NETWORK=`ERR_NETWORK`,AxiosError$1.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,AxiosError$1.ERR_DEPRECATED=`ERR_DEPRECATED`,AxiosError$1.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,AxiosError$1.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,AxiosError$1.ERR_CANCELED=`ERR_CANCELED`,AxiosError$1.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,AxiosError$1.ERR_INVALID_URL=`ERR_INVALID_URL`,AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;var DEFAULT_FORM_DATA_MAX_DEPTH=100;function isVisitable(e){return utils_default.isPlainObject(e)||utils_default.isArray(e)}function removeBrackets(e){return utils_default.endsWith(e,`[]`)?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map(function(e,t){return e=removeBrackets(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function isFlatArray(e){return utils_default.isArray(e)&&!e.some(isVisitable)}var predicates=utils_default.toFlatObject(utils_default,{},null,function(e){return/^is[A-Z]/.test(e)});function toFormData$1(e,t,n){if(!utils_default.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=utils_default.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!utils_default.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||ce,a=n.dots,o=n.indexes,c=n.Blob||typeof Blob<`u`&&Blob,u=n.maxDepth===void 0?100:n.maxDepth,K=c&&utils_default.isSpecCompliantForm(t),Y=[];if(!utils_default.isFunction(i))throw TypeError(`visitor must be a function`);function X(e){if(e===null)return``;if(utils_default.isDate(e))return e.toISOString();if(utils_default.isBoolean(e))return e.toString();if(!K&&utils_default.isBlob(e))throw new AxiosError$1(`Blob is not supported. Use a Buffer instead.`);if(utils_default.isArrayBuffer(e)||utils_default.isTypedArray(e)){if(K&&typeof c==`function`)return new c([e]);throw new AxiosError$1(`Blob is not supported. Use a Buffer instead.`,AxiosError$1.ERR_NOT_SUPPORT)}return e}function ee(e){if(e>u)throw new AxiosError$1(`Object is too deeply nested (`+e+` levels). Max depth: `+u,AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED)}function te(e,t){if(u===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!utils_default.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),ee(t+n.length-1),r})}function ce(e,n,i){let c=e;if(utils_default.isReactNative(t)&&utils_default.isReactNativeBlob(e))return t.append(renderKey(i,n,a),X(e)),!1;if(e&&!i&&typeof e==`object`){if(utils_default.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=te(e,1);else if(utils_default.isArray(e)&&isFlatArray(e)||(utils_default.isFileList(e)||utils_default.endsWith(n,`[]`))&&(c=utils_default.toArray(e)))return n=removeBrackets(n),c.forEac
vendor: 2,602 bytes, line 146
146h(function(e,r){!(utils_default.isUndefined(e)||e===null)&&t.append(o===!0?renderKey([n],r,a):o===null?n:n+`[]`,X(e))}),!1}return isVisitable(e)?!0:(t.append(renderKey(i,n,a),X(e)),!1)}let ue=Object.assign(predicates,{defaultVisitor:ce,convertValue:X,isVisitable});function de(e,n,r=0){if(!utils_default.isUndefined(e)){if(ee(r),Y.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));Y.push(e),utils_default.forEach(e,function(e,a){(!(utils_default.isUndefined(e)||e===null)&&i.call(t,e,utils_default.isString(a)?a.trim():a,n,ue))===!0&&de(e,n?n.concat(a):[a],r+1)}),Y.pop()}}if(!utils_default.isObject(e))throw TypeError(`data must be an object`);return de(e),t}function encode$1(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}var prototype=AxiosURLSearchParams.prototype;prototype.append=function(e,t){this._pairs.push([e,t])},prototype.toString=function(e){let t=e?t=>e.call(this,t,encode$1):encode$1;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function buildURL(e,t,n){if(!t)return e;e||=``;let r=utils_default.isFunction(n)?{serialize:n}:n,i=utils_default.getSafeProp(r,`encode`)||encode,a=utils_default.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):utils_default.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var InterceptorManager=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){utils_default.forEach(this.handlers,function(t){t!==null&&e(t)})}},transitional_default={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},URLSearchParams_default=typeof URLSearchParams<`u`?URLSearchParams:AxiosURLSearchParams,FormData_default=typeof FormData<`u`?FormData:null,Blob_default=typeof Blob<`u`?Blob:null,browser_default={isBrowser:!0,classes:{URLSearchParams:URLSearchParams_default,FormData:FormData_default,Blob:Blob_default},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]}
vendor: 2,138 bytes, line 146
146,utils_exports=__exportAll({hasBrowserEnv:()=>hasBrowserEnv,hasStandardBrowserEnv:()=>hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv:()=>hasStandardBrowserWebWorkerEnv,navigator:()=>_navigator,origin:()=>origin}),hasBrowserEnv=typeof window<`u`&&typeof document<`u`,_navigator=typeof navigator==`object`&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||[`ReactNative`,`NativeScript`,`NS`].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,origin=hasBrowserEnv&&window.location.href||`http://localhost`,platform_default={...utils_exports,...browser_default};function toURLEncodedForm(e,t){return toFormData$1(e,new platform_default.classes.URLSearchParams,{visitor:function(e,t,n,r){return platform_default.isNode&&utils_default.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}var MAX_DEPTH=100;function throwIfDepthExceeded(e){if(e>MAX_DEPTH)throw new AxiosError$1(`FormData field is too deeply nested (`+e+` levels). Max depth: `+MAX_DEPTH,AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED)}function parsePropPath(e){let t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g,r;for(;(r=n.exec(e))!==null;)throwIfDepthExceeded(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function arrayToObject(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function formDataToJSON(e){function t(e,n,r,i){throwIfDepthExceeded(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),c=i>=e.length;return a=!a&&utils_default.isArray(r)?r.length:a,c?(utils_default.hasOwnProp(r,a)?r[a]=utils_default.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!utils_default.hasOwnProp(r,a)||!utils_default.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&utils_default.isArray(r[a])&&(r[a]=arrayToObject(r[a])),!o)}if(utils_default.isFormData(e)&&utils_default.isFunction(e.entries)){let n={};return utils_default.forEachEntry(e,(e,r)=>{t(parsePropPath(e),r,n,0)}),n}return null}var own$5=(e,t)=>e!=null&&utils_default.hasOwnProp(e,t)?e[t]:void 0;
vendor: 4,935 bytes, line 146
146function stringifySafely(e,t,n){if(utils_default.isString(e))try{return(t||JSON.parse)(e),utils_default.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var defaults={transitional:transitional_default,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=utils_default.isObject(e);if(i&&utils_default.isHTMLForm(e)&&(e=new FormData(e)),utils_default.isFormData(e))return r?JSON.stringify(formDataToJSON(e)):e;if(utils_default.isArrayBuffer(e)||utils_default.isBuffer(e)||utils_default.isStream(e)||utils_default.isFile(e)||utils_default.isBlob(e)||utils_default.isReadableStream(e))return e;if(utils_default.isArrayBufferView(e))return e.buffer;if(utils_default.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=own$5(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return toURLEncodedForm(e,t).toString();if((a=utils_default.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=own$5(this,`env`),r=n&&n.FormData;return toFormData$1(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),stringifySafely(e)):e}],transformResponse:[function(e){let t=own$5(this,`transitional`)||defaults.transitional,n=t&&t.forcedJSONParsing,r=own$5(this,`responseType`),i=r===`json`;if(utils_default.isResponse(e)||utils_default.isReadableStream(e))return e;if(e&&utils_default.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,own$5(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?AxiosError$1.from(e,AxiosError$1.ERR_BAD_RESPONSE,this,null,own$5(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform_default.classes.FormData,Blob:platform_default.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};utils_default.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{defaults.headers[e]={}});function transformData(e,t){let n=this||defaults,r=t||n,i=AxiosHeaders$1.from(r.headers),a=r.data;return utils_default.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function isCancel$1(e){return!!(e&&e.__CANCEL__)}var CanceledError$1=class extends AxiosError$1{constructor(e,t,n){super(e??`canceled`,AxiosError$1.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function settle(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new AxiosError$1(`Request failed with status code `+n.status,n.status>=400&&n.status<500?AxiosError$1.ERR_BAD_REQUEST:AxiosError$1.ERR_BAD_RESPONSE,n.config,n.request,n))}function parseProtocol(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function speedometer(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(c){let u=Date.now(),K=r[a];o||=u,n[i]=c,r[i]=u;let Y=a,X=0;for(;Y!==i;)X+=n[Y++],Y%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o<t)return;let ee=K&&u-K;return ee?Math.round(X*1e3/ee):void 0}}function throttle$1(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),c=t-n;c>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-c))},()=>i&&o(i)]}var progressEventReducer=(e,t,n=3)=>{let r=0,i=speedometer(50,250);return throttle$1(n=>{if(!n||typeof n.loaded!=`number`)return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,c=Math.max(0,o==null?a:Math.min(a,o)),u=Math.max(0,c-r),K=i(u);r=Math.max(r,c),e({loaded:c,total:o,progress:o?c/o:void 0,bytes:u,rate:K||void 0,estimated:K&&o?(o-c)/K:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},progressEventDecorator=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},asyncDecorator=(e,t=utils_default.asap)=>(...n)=>t(()=>e(...n)),isURLSameOrigin_default=platform_default.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,platform_default.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(platform_default.origin),platform_default.navigator&&/(msie|trident)/i.test(platform_default.navigator.userAgent)):()=>!0,cookies_default=platform_default.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let c=[`${e}=${encodeURIComponent(t)}`];utils_default.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),utils_default.isString(r)&&c.push(`path=${r}`),utils_default.isString(i)&&c.push(`domain=${i}`),a===!0&&c.push(`secure`),utils_default.isString(o)&&c.push(`SameSite=${o}`),document.cookie=c.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);
vendor: 4,105 bytes, line 146
146if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(e){return typeof e==`string`&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+`/`+t.replace(/^\/+/,``)}var malformedHttpProtocol=/^https?:(?!\/\/)/i,httpProtocolControlCharacters=/[\t\n\r]/g;function stripLeadingC0ControlOrSpace(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function normalizeURLForProtocolCheck(e){return stripLeadingC0ControlOrSpace(e).replace(httpProtocolControlCharacters,``)}function redactFragment(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,n=``)=>`${t}${n}${REDACTED}`)}function redactSensitiveURLParts(e){let t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${REDACTED}@`),n=t.indexOf(`#`),r=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${REDACTED}`);return n===-1?r:`${r}#${redactFragment(t.slice(n+1))}`}function assertValidHttpProtocolURL(e,t){if(typeof e==`string`){let n=normalizeURLForProtocolCheck(e);if(malformedHttpProtocol.test(n))throw new AxiosError$1(`Invalid URL ${JSON.stringify(redactSensitiveURLParts(n))}: missing "//" after protocol`,AxiosError$1.ERR_INVALID_URL,t)}}function buildFullPath(e,t,n,r){assertValidHttpProtocolURL(t,r);let i=!isAbsoluteURL(t);return e&&(i||n===!1)?(assertValidHttpProtocolURL(e,r),combineURLs(e,t)):t}var headersToObject=e=>e instanceof AxiosHeaders$1?{...e}:e,ownEnumerableKeys=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function mergeConfig$1(e,t){e||={},t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return utils_default.isPlainObject(e)&&utils_default.isPlainObject(t)?utils_default.merge.call({caseless:r},e,t):utils_default.isPlainObject(t)?utils_default.merge({},t):utils_default.isArray(t)?t.slice():t}function i(e,t,n,i){if(!utils_default.isUndefined(t))return r(e,t,n,i);if(!utils_default.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!utils_default.isUndefined(t))return r(void 0,t)}function o(e,t){if(!utils_default.isUndefined(t))return r(void 0,t);if(!utils_default.isUndefined(e))return r(void 0,e)}function c(n){let r=utils_default.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!utils_default.isUndefined(r)){if(utils_default.isPlainObject(r)){if(utils_default.hasOwnProp(r,n))return r[n]}else return}let i=utils_default.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(utils_default.isPlainObject(i)&&utils_default.hasOwnProp(i,n))return i[n]}function u(n,i,a){if(utils_default.hasOwnProp(t,a))return r(n,i);if(utils_default.hasOwnProp(e,a))return r(void 0,n)}let K={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:u,headers:(e,t,n)=>i(headersToObject(e),headersToObject(t),n,!0)};return utils_default.forEach(ownEnumerableKeys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=utils_default.hasOwnProp(K,r)?K[r]:i,o=a(utils_default.hasOwnProp(e,r)?e[r]:void 0,utils_default.hasOwnProp(t,r)?t[r]:void 0,r);utils_default.isUndefined(o)&&a!==u||(n[r]=o)}),utils_default.hasOwnProp(t,`validateStatus`)&&utils_default.isUndefined(t.validateStatus)&&c(`validateStatusUndefinedResolves`)===!1&&(utils_default.hasOwnProp(e,`validateStatus`)?n.validateStatus=r(void 0,e.validateStatus):delete n.val
146idateStatus),n}var FORM_DATA_CONTENT_HEADERS=[`content-type`,`content-length`];function setFormDataHeaders(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t||{}).forEach(([t,n])=>{FORM_DATA_CONTENT_HEADERS.includes(t.toLowerCase())&&e.set(t,n)})}var encodeUTF8$1=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));function resolveConfig(e){let t=mergeConfig$1({},e),n=e=>utils_default.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),c=n(`headers`),u=n(`auth`),K=n(`baseURL`),Y=n(`allowAbsoluteUrls`),X=n(`url`);if(t.headers=c=AxiosHeaders$1.from(c),t.url=buildURL(buildFullPath(K,X,Y,t),n(`params`),n(`paramsSerializer`)),u){let t=utils_default.getSafeProp(u,`username`)||``,n=utils_default.getSafeProp(u,`password`)||``;try{c.set(`Authorization`,`Basic `+btoa(t+`:`+(n?encodeUTF8$1(n):``)))}catch(t){throw AxiosError$1.from(t,AxiosError$1.ERR_BAD_OPTION_VALUE,e)}}if(utils_default.isFormData(r)&&(platform_default.hasStandardBrowserEnv||platform_default.hasStandardBrowserWebWorkerEnv||utils_default.isReactNative(r)?c.setContentType(void 0):utils_default.isFunction(r.getHeaders)&&setFormDataHeaders(c,r.getHeaders(),n(`formDataHeaderPolicy`))),platform_default.hasStandardBrowserEnv&&(utils_default.isFunction(i)&&(i=i(t)),i===!0||i==null&&isURLSameOrigin_default(t.url))){let e=a&&o&&cookies_default.read(o);e&&c.set(a,e)}return t}var isXHRAdapterSupported=typeof XMLHttpRequest<`u`,xhr_default=isXHRAdapterSupported&&function(e){return new Promise(function(t,n){let r=resolveConfig(e),i=r.data,a=AxiosHeaders$1.from(r.headers).normalize(),{responseType:o,onUploadProgress:c,onDownloadProgress:u}=r,K,Y,X,ee,te;function ce(){ee&&ee(),te&&te(),r.cancelToken&&r.cancelToken.unsubscribe(K),r.signal&&r.signal.removeEventListener(`abort`,K)}let ue=new XMLHttpRequest;ue.open(r.method.toUpperCase(),r.url,!0),ue.timeout=r.timeout;function de(){if(!ue)return;let r=AxiosHeaders$1.from(`getAllResponseHeaders`in ue&&ue.getAllResponseHeaders());settle(function(e){t(e),ce()},function(e){n(e),ce()},{data:!o||o===`text`||o===`json`?ue.responseText:ue.response,status:ue.status,statusText:ue.statusText,headers:r,config:e,request:ue}),ue=null}`onloadend`in ue?ue.onloadend=de:ue.onreadystatechange=function(){ue&&ue.readyState===4&&(ue.status!==0||ue.responseURL&&ue.responseURL.startsWith(`file:`))&&setTimeout(de)},ue.onabort=function(){ue&&=(n(new AxiosError$1(`Request aborted`,AxiosError$1.ECONNABORTED,e,ue)),ce(),null)},ue.onerror=function(t){let r=new AxiosError$1(t&&t.message?t.message:`Network Error`,AxiosError$1.ERR_NETWORK,e,ue);r.event=t||null,n(r),ce(),ue=null},ue.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||transitional_default;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new AxiosError$1(t,i.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,ue)),ce(),ue=null},i===void 0&&a.setContentType(null),`setRequestHeader`in ue&&utils_default.forEach(toByteStringHeaderObject(a),function(e,t){ue.setRequestHeader(t,e)}),utils_default.isUndefined(r.withCredentials)||(ue.withCredentials=!!r.withCredentials),o&&o!==`json`&&(ue.responseType=r.responseType),u&&([X,te]=progressEventReducer(u,!0),ue.addEventListener(`progress`,X)),c&&ue.upload&&([Y,ee]=progressEventReducer(c),ue.upload.addEventListener(`progress`,Y),ue.upload.addEventListener(`loadend`,ee)),(r.cancelToken||r.signal)&&(K=t=>{ue&&=(n(!t||t.type?new CanceledError$1(null,e,ue):t),ue.abort(),ce(),null)},r.cancelToken&&r.cancelToken.subscribe(K),r.signal&&(r.signal.aborted?K():r.signal.addEventListener(`abort`,K)));let fe=parseProtocol(r.url);if(fe&&!platform_default.protocols.includes(fe)){n(new AxiosError$1(`Unsupported protocol `+fe+`:`,AxiosError$1.ERR_BAD_REQUEST,e)),ce();return}ue.send(i||null)})},composeSignals=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof AxiosError$1?t:new CanceledError$1(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new AxiosError$1(`timeout of ${t}ms exceeded`,AxiosError$1.ETIMEDOUT))},t),o=()=>
146{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>{if(!r){if(e.aborted){i.call(e);return}e.addEventListener(`abort`,i,{once:!0})}});let{signal:c}=n;return c.unsubscribe=()=>utils_default.asap(o),c},streamChunk=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},readBytes=async function*(e,t){for await(let n of readStream(e))yield*streamChunk(n,t)},readStream=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},trackStream=(e,t,n,r)=>{let i=readBytes(e,t),a=0,o,c=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){c(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw c(e),e}},cancel(e){return c(e),i.return()}},{highWaterMark:2})},isHexDigit=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,isPercentEncodedByte=(e,t,n)=>t+2<n&&isHexDigit(e.charCodeAt(t+1))&&isHexDigit(e.charCodeAt(t+2)),hexValue=e=>e<=57?e-48:(e&223)-55,isBase64Char=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,isBase64Whitespace=e=>e===9||e===10||e===12||e===13||e===32,base64Bytes=e=>{let t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},estimateBase64BufferAllocation=e=>{let t=e.length,n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},estimatePercentDecodedBase64Bytes=e=>{let t=e.length,n=0,r=0,i=!1;for(let a=0;a<t;a++){let o=e.charCodeAt(a);if(o===37&&isPercentEncodedByte(e,a,t)&&(o=hexValue(e.charCodeAt(a+1))*16+hexValue(e.charCodeAt(a+2)),a+=2),!isBase64Whitespace(o)){if(o===61){r++;continue}if(!isBase64Char(o)||r>0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!=0||n%4==1?estimateBase64BufferAllocation(e):base64Bytes(n)},estimateDataURLBytes=(e,t)=>{if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let n=e.indexOf(`,`);if(n<0)return 0;let r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let a=0;for(let e=0,t=i.length;e<t;e++){let n=i.charCodeAt(e);if(n===37&&isPercentEncodedByte(i,e,t))a+=1,e+=2;else if(n<128)a+=1;else if(n<2048)a+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=i.charCodeAt(e+1);t>=56320&&t<=57343?(a+=4,e++):a+=3}else a+=3}return a};function estimateDataURLDecodedBytes(e){let t=typeof e==`string`?e.indexOf(`#`):-1;return estimateDataURLBytes(t===-1?e:e.slice(0,t),estimatePercentDecodedBase64Bytes)}var VERSION$1=`1.19.0`,DEFAULT_CHUNK_SIZE=65536,{isFunction:isFunction$3}=utils_default,encodeUTF8=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),decodeURIComponentSafe=e=>{if(!utils_default.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},test=(e,...t)=>{try{return!!e(...t)}catch{return!1}},maybeWithAuthCredentials=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},factory=e=>{let t=utils_default.global!==void 0&&utils_default.global!==null?utils_default.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=utils_default.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,c=i?isFunction$3(i):typeof fetch==`function`,u=isFunction$3(a),K=isFunction$3(o);if(!c)return!1;let Y=c&&isFunction$3(n),X=c&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),ee=u&&Y&&test(()=>{let e=!1,t=new a(platform_default.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),te=K&&Y&&test(()=>utils_default.isReadableStream(new o(``).body)),ce={stream:te&&(e=>e.body)};c&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!ce[e]&&(ce[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new AxiosError$1(`Response type '${e}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,n)})});let ue=async e=>{if(e==null)return 0;if(utils_default.isBlob(e))return e.size;if(utils_default.isSpecCompliantForm(e))return(await new a(platform_default.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(utils_default.isArrayBufferView(e)||utils_default.isArrayBuffer(e))return e.byteLength;if(utils_default.isURLSearchParams(e)&&(e+=``),utils_default.isString(e))return(await X(e)).byteLength},de=async(e,t)=>utils_default.toFiniteNumber(e.getContentLength())??ue(t);return async e=>{let{url:t,method:n,data:c,signal:K,cancelToken:X,timeout:fe,onDownloadProgress:me,onUploadProgress:ge,responseType:Te,headers:Oe,withCredentials:Ae=`same-origin`,fetchOptions:ze,maxContentLength:qe,maxBodyLength:Ye}=resolveConfig(e),Ze=utils_default.isNumber(qe)&&qe>-1,Qe=utils_default.isNumber(Ye)&&Ye>-1,et=t=>utils_default.hasOwnProp(e,t)?e[t]:void 0,nt=i||fetch;Te=Te?(Te+``).toLowerCase():`text`;let rt=composeSignals([K,X&&X.toAbortSignal()],fe),it=null,at=rt&&rt.unsubscribe&&(()=>{rt.unsubscribe()}),ot,st=null,ct=()=>new AxiosError$1(`Request body larger than maxBodyLength limit`,AxiosError$1.ERR_BAD_REQUEST,e,it);try{let i,K=et(`auth`);if(K&&(i={username:utils_default.getSafeProp(K,`username`)||``,password:utils_default.getSafeProp(K,`password`)||``}),maybeWithAuthCredentials(t)){let e=new URL(t,platform_default.origin);!i&&(e.username||e.password)&&(i={username:decodeURIComponentSafe(e.username),password:decodeURIComponentSafe(e.password)}),(e.username||e.password)&&(e.username=``,e.password=``,t=e.href)}if(i&&(Oe.delete(`authorization`),Oe.set(`Authorization`,`Basic `+btoa(encodeUTF8((i.username||``)+`:`+(i.password||``))))),Ze&&typeof t==`string`&&t.startsWith(`data:`)&&estimateDataURLDecodedBytes(t)>qe)throw new AxiosError$1(`maxContentLength size of `+qe+` exceeded`,AxiosError$1.ERR_BAD_RESPONSE,e,it);if(Qe&&n!==`get`&&n!==`head`){let e=await ue(c);if(typeof e==`number`&&isFinite(e)&&(ot=e,e>Ye))throw ct()}let X=Qe&&(utils_default.isReadableStream(c)||utils_default.isStream(c)),fe=(e,t,n
vendor: 4,330 bytes, lines 146-148
146)=>trackStream(e,DEFAULT_CHUNK_SIZE,e=>{if(Qe&&e>Ye)throw st=ct();t&&t(e)},n);if(ee&&n!==`get`&&n!==`head`&&(ge||X)){if(ot??=await de(Oe,c),ot!==0||X){let e=new a(t,{method:`POST`,body:c,duplex:`half`}),n;if(utils_default.isFormData(c)&&(n=e.headers.get(`content-type`))&&Oe.setContentType(n),e.body){let[t,n]=ge&&progressEventDecorator(ot,progressEventReducer(asyncDecorator(ge)))||[];c=fe(e.body,t,n)}}}else if(X&&!u&&Y&&n!==`get`&&n!==`head`)c=fe(c);else if(X&&u&&!ee&&n!==`get`&&n!==`head`)throw new AxiosError$1(`Stream request bodies are not supported by the current fetch implementation`,AxiosError$1.ERR_NOT_SUPPORT,e,it);utils_default.isString(Ae)||(Ae=Ae?`include`:`omit`);let lt=u&&`credentials`in a.prototype;if(utils_default.isFormData(c)){let e=Oe.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&Oe.delete(`content-type`)}Oe.set(`User-Agent`,`axios/`+VERSION$1,!1);let ut={...ze,signal:rt,method:n.toUpperCase(),headers:toByteStringHeaderObject(Oe.normalize()),body:c,duplex:`half`,credentials:lt?Ae:void 0};it=u&&new a(t,ut);let dt=await(u?nt(it,ze):nt(t,ut)),ft=AxiosHeaders$1.from(dt.headers);if(Ze){let t=utils_default.toFiniteNumber(ft.getContentLength());if(t!=null&&t>qe)throw new AxiosError$1(`maxContentLength size of `+qe+` exceeded`,AxiosError$1.ERR_BAD_RESPONSE,e,it)}let pt=te&&(Te===`stream`||Te===`response`);if(te&&dt.body&&(me||Ze||pt&&at)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=dt[e]});let n=utils_default.toFiniteNumber(ft.getContentLength()),[r,i]=me&&progressEventDecorator(n,progressEventReducer(asyncDecorator(me),!0))||[],a=0;dt=new o(trackStream(dt.body,DEFAULT_CHUNK_SIZE,t=>{if(Ze&&(a=t,a>qe))throw new AxiosError$1(`maxContentLength size of `+qe+` exceeded`,AxiosError$1.ERR_BAD_RESPONSE,e,it);r&&r(t)},()=>{i&&i(),at&&at()}),t)}Te||=`text`;let mt=await ce[utils_default.findKey(ce,Te)||`text`](dt,e);if(Ze&&!te&&!pt){let t;if(mt!=null&&(typeof mt.byteLength==`number`?t=mt.byteLength:typeof mt.size==`number`?t=mt.size:typeof mt==`string`&&(t=typeof r==`function`?new r().encode(mt).byteLength:mt.length)),typeof t==`number`&&t>qe)throw new AxiosError$1(`maxContentLength size of `+qe+` exceeded`,AxiosError$1.ERR_BAD_RESPONSE,e,it)}return!pt&&at&&at(),await new Promise((t,n)=>{settle(t,n,{data:mt,headers:AxiosHeaders$1.from(dt.headers),status:dt.status,statusText:dt.statusText,config:e,request:it})})}catch(t){if(at&&at(),rt&&rt.aborted&&rt.reason instanceof AxiosError$1){let n=rt.reason;throw n.config=e,it&&(n.request=it),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(st)throw it&&!st.request&&(st.request=it),st;if(t instanceof AxiosError$1)throw it&&!t.request&&(t.request=it),t;if(t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)){let n=new AxiosError$1(`Network Error`,AxiosError$1.ERR_NETWORK,e,it,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw AxiosError$1.from(t,t&&t.code,e,it,t&&t.response)}}},seedCache=new Map,getFetch=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,c,u,K=seedCache;for(;o--;)c=a[o],u=K.get(c),u===void 0&&K.set(c,u=o?new Map:factory(t)),K=u;return u},adapter=getFetch(),knownAdapters={http:null,xhr:xhr_default,fetch:{get:getFetch}};utils_default.forEach(knownAdapters,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils_default.isFunction(e)||e===null||e===!1;function getAdapter$1(e,t){e=utils_default.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!isResolvedHandle(r)&&(i=knownAdapters[(n=String(r)).toLowerCase()],i===void 0))throw new AxiosError$1(`Unknown adapter '${n}'`);if(i&&(utils_default.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new AxiosError$1(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
147`+e.map(renderReason).join(`
148`):` `+renderReason(e[0]):`as no adapter specified`),AxiosError$1.ERR_NOT_SUPPORT)}return i}
vendor: 4,716 bytes, lines 148-152
148var adapters_default={getAdapter:getAdapter$1,adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError$1(null,e)}function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),adapters_default.getAdapter(e.adapter||defaults.adapter,e)(e).then(function(t){throwIfCancellationRequested(e),e.response=t;try{t.data=transformData.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=AxiosHeaders$1.from(t.headers),t},function(t){if(!isCancel$1(t)&&(throwIfCancellationRequested(e),t&&t.response)){e.response=t.response;try{t.response.data=transformData.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=AxiosHeaders$1.from(t.response.headers)}return Promise.reject(t)})}var validators$1={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{validators$1[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var deprecatedWarnings={};validators$1.transitional=function(e,t,n){function r(e,t){return`[Axios v`+VERSION$1+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new AxiosError$1(r(i,` has been removed`+(t?` in `+t:``)),AxiosError$1.ERR_DEPRECATED);return t&&!deprecatedWarnings[i]&&(deprecatedWarnings[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),!e||e(n,i,a)}},validators$1.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function assertOptions(e,t,n){if(typeof e!=`object`||!e)throw new AxiosError$1(`options must be an object`,AxiosError$1.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-->0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new AxiosError$1(`option `+a+` must be `+n,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new AxiosError$1(`Unknown option `+a,AxiosError$1.ERR_BAD_OPTION)}}var validator_default={assertOptions,validators:validators$1},validators=validator_default.validators,Axios$1=class{constructor(e){this.defaults=e||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(`
149`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(`
150`),r=t===-1?-1:n.indexOf(`
151`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=`
152`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=mergeConfig$1(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&validator_default.assertOptions(n,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean),legacyInterceptorReqResOrdering:validators.transitional(validators.boolean),advertiseZstdAcceptEncoding:validators.transitional(validators.boolean),validateStatusUndefinedResolves:validators.transitional(validators.boolean)},!1),r!=null&&(utils_default.isFunction(r)?t.paramsSerializer={serialize:r}:validator_default.assertOptions(r,{encode:validators.function,serialize:validators.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),validator_default.assertOptions(t,{baseUrl:validators.spelling(`baseURL`),withXsrfToken:validators.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&utils_default.merge(i.common,i[t.method]);i&&utils_default.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=AxiosHeaders$1.concat(a,i);let o=[],c=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;c&&=e.synchronous;let n=t.transitional||transitional_default;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let u=[];this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});let K,Y=0,X;if(!c){let e=[dispatchRequest.bind(this),void 0];for(e.unshift(...o),e.push(...u),X=e.length,K=Promise.resolve(t);Y<X;
152)K=K.then(e[Y++],e[Y++]);return K}X=o.length;let ee=t;for(;Y<X;){let e=o[Y++],t=o[Y++];try{ee=e?e(ee):ee}catch(e){if(!t){K=Promise.reject(e);break}try{let n=t.call(this,e);utils_default.isThenable(n)&&(K=Promise.resolve(n).then(()=>dispatchRequest.call(this,ee)))}catch(e){K=Promise.reject(e)}break}}if(!K)try{K=dispatchRequest.call(this,ee)}catch(e){K=Promise.reject(e)}for(Y=0,X=u.length;Y<X;)K=K.then(u[Y++],u[Y++]);return K}getUri(e){return e=mergeConfig$1(this.defaults,e),buildURL(buildFullPath(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};utils_default.forEach([`delete`,`get`,`head`,`options`],function(e){Axios$1.prototype[e]=function(t,n){return this.request(mergeConfig$1(n||{},{method:e,url:t,data:n&&utils_default.hasOwnProp(n,`data`)?n.data:void 0}))}}),utils_default.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(mergeConfig$1(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Axios$1.prototype[e]=t(),e!==`query`&&(Axios$1.prototype[e+`Form`]=t(!0))});var CancelToken$1=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-->0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new CanceledError$1(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function spread$1(e){return function(t){return e.apply(null,t)}}function isAxiosError$1(e){return utils_default.isObject(e)&&e.isAxiosError===!0}var HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
152alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(HttpStatusCode$1).forEach(([e,t])=>{HttpStatusCode$1[t]=e});function createInstance(e){let t=new Axios$1(e),n=bind(Axios$1.prototype.request,t);return utils_default.extend(n,Axios$1.prototype,t,{allOwnKeys:!0}),utils_default.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return createInstance(mergeConfig$1(e,t))},n}var axios=createInstance(defaults);axios.Axios=Axios$1,axios.CanceledError=CanceledError$1,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel$1,axios.VERSION=VERSION$1,axios.toFormData=toFormData$1,axios.AxiosError=AxiosError$1,axios.Cancel=axios.CanceledError,axios.all=function(e){return Promise.all(e)},axios.spread=spread$1,axios.isAxiosError=isAxiosError$1,axios.mergeConfig=mergeConfig$1,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=e=>formDataToJSON(utils_default.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters_default.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;var{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all:all$1,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig,create:create$1}=axios,require_strict_uri_encode=__commonJSMin(((e,t)=>{t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)})),require_decode_uri_component=__commonJSMin(((e,t)=>{var n=`%[a-f0-9]{2}`,r=RegExp(`(`+n+`)|([^%]+?)`,`gi`),i=RegExp(`(`+n+`)+`,`gi`);function a(e,t){try{return[decodeURIComponent(e.join(``))]}catch{}if(e.length===1)return e;t||=1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],a(n),a(r))}function o(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(r)||[],n=1;n<t.length;n++)e=a(t,n).join(``),t=e.match(r)||[];return e}}function c(e){for(var t={"%FE%FF":`��`,"%FF%FE":`��`},n=i.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{var r=o(n[0]);r!==n[0]&&(t[n[0]]=r)}n=i.exec(e)}t[`%C2`]=`�`;for(var a=Object.keys(t),c=0;c<a.length;c++){var u=a[c];e=e.replace(new RegExp(u,`g`),t[u])}return e}t.exports=function(e){if(typeof e!=`string`)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g,` `),decodeURIComponent(e)}catch{return c(e)}}})),require_split_on_first=__commonJSMin(((e,t)=>{t.exports=(e,t)=>{if(typeof e!=`string`||typeof t!=`string`)throw TypeError("Expected the arguments to be of type `string`");if(t===``)return[e];let n=e.indexOf(t);return n===-1?[e]:[e.slice(0,n),e.slice(n+t.length)]}})),require_filter_obj=__commonJSMin(((e,t)=>{t.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),a=0;a<r.length;a++){var o=r[a],c=e[o];(i?t.indexOf(o)!==-1:t(o,c,e))&&(n[o]=c)}return n}})),require_query_string=__commonJSMin((e=>{var t=require_strict_uri_encode(),n=require_decode_uri_component(),r=require_split_on_first(),i=require_filter_obj(),a=e=>e==null,o=Symbol(`encodeFragmentIdentifier`);function c(e){switch(e.arrayFormat){case`index`:return t=>(n,r)=>{let i=n.length;return r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===``?n:r===null?[...n,[Y(t,e),`[`,i,`]`].join(``)]:[...n,[Y(t,e),`[`,Y(i,e),`]=`,Y(r,e)].join(``)]};case`bracket`:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===``?n:r===null?[...n,[Y(t,e),`[]`].join(``)]:[...n,[Y(t,e),`[]=`,Y(r,e)].join(``)];case`colon-list-separator`:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===``?n:r===null?[...n,[Y(t,e),`:list=`].join(``)]:[...n,[Y(t,e),`:list=`,Y(r,e)].join(``)];case`comma`:case`separator`:case`bracket-separator`:{let t=e.arrayFormat===`bracket-separator`?`[]=`:`=`;return n=>(r,i)=>i===void 0||e.skipNull&&i===null||e.skipEmptyString&&i===``?r:(i=i===null?``:i,r.length===0?[[Y(n,e),t,Y(i,e)].join(``)]:[[r,Y(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===``?n:r===null?[...n,Y(t,e)]:[...n,[Y(t,e),`=`,Y(r,e)].join(``)]}}function u(e){let t;switch(e.arrayFormat){case`index`:return(e,n,r)=>{if(t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,``),!t){r[e]=n;return}r[e]===void 0&&(r[e]={}),r[e][t[1]]=n};case`bracket`:return(e,n,r)=>{if(t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,``),!t){r[e]=n;return}if(r[e]===void 0){r[e]=[n];return}r[e]=[].concat(r[e],n)};case`colon-list-separator`:return(e,n,r)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,``),!t){r[e]=n;return}if(r[e]===void 0){r[e]=[n];return}r[e]=[].concat(r[e],n)};case`comma`:case`separator`:return(t,n,r)=>{let i=typeof n==`string`&&n.includes(e.arrayFormatSeparator),a=typeof n==`string`&&!i&&X(n,e).includes(e.arrayFormatSeparator);n=a?X(n,e):n,r[t]=i||a?n.split(e.arrayFormatSeparator).map(t=>X(t,e)):n===null?n:X(n,e)};case`bracket-separator`:return(t,n,r)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,``),!i){r[t]=n&&X(n,e);return}let a=n===null?[]:n.split(e.arrayFormatSeparator).map(t=>X(t,e));if(r[t]===void 0){r[t]=a;return}r[t]=[].concat(r[t],a)};default:return(e,t,n)=>{if(n[e]===void 0){n[e]=t;return}n[e]=[].concat(n[e],t)}}}function K(e){if(typeof e!=`string`||e.length!==1)throw TypeError(`arrayFormatSeparator must be single character string`)}function Y(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function X(e,t){return t.decode?n(e):e}function ee(e){return Array.isArray(e)?e.sort():typeof e==`object`?ee(Object.keys(e)).sort((e,t)=>
152Number(e)-Number(t)).map(t=>e[t]):e}function te(e){let t=e.indexOf(`#`);return t!==-1&&(e=e.slice(0,t)),e}function ce(e){let t=``,n=e.indexOf(`#`);return n!==-1&&(t=e.slice(n)),t}function ue(e){e=te(e);let t=e.indexOf(`?`);return t===-1?``:e.slice(t+1)}function de(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e==`string`&&e.trim()!==``?e=Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()===`true`||e.toLowerCase()===`false`)&&(e=e.toLowerCase()===`true`),e}function fe(e,t){t=Object.assign({decode:!0,sort:!0,arrayFormat:`none`,arrayFormatSeparator:`,`,parseNumbers:!1,parseBooleans:!1},t),K(t.arrayFormatSeparator);let n=u(t),i=Object.create(null);if(typeof e!=`string`||(e=e.trim().replace(/^[?#&]/,``),!e))return i;for(let a of e.split(`&`)){if(a===``)continue;let[e,o]=r(t.decode?a.replace(/\+/g,` `):a,`=`);o=o===void 0?null:[`comma`,`separator`,`bracket-separator`].includes(t.arrayFormat)?o:X(o,t),n(X(e,t),o,i)}for(let e of Object.keys(i)){let n=i[e];if(typeof n==`object`&&n)for(let e of Object.keys(n))n[e]=de(n[e],t);else i[e]=de(n,t)}return t.sort===!1?i:(t.sort===!0?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce((e,t)=>{let n=i[t];return e[t]=n&&typeof n==`object`&&!Array.isArray(n)?ee(n):n,e},Object.create(null))}e.extract=ue,e.parse=fe,e.stringify=(e,t)=>{if(!e)return``;t=Object.assign({encode:!0,strict:!0,arrayFormat:`none`,arrayFormatSeparator:`,`},t),K(t.arrayFormatSeparator);let n=n=>t.skipNull&&a(e[n])||t.skipEmptyString&&e[n]===``,r=c(t),i={};for(let t of Object.keys(e))n(t)||(i[t]=e[t]);let o=Object.keys(i);return t.sort!==!1&&o.sort(t.sort),o.map(n=>{let i=e[n];return i===void 0?``:i===null?Y(n,t):Array.isArray(i)?i.length===0&&t.arrayFormat===`bracket-separator`?Y(n,t)+`[]`:i.reduce(r(n),[]).join(`&`):Y(n,t)+`=`+Y(i,t)}).filter(e=>e.length>0).join(`&`)},e.parseUrl=(e,t)=>
152{t=Object.assign({decode:!0},t);let[n,i]=r(e,`#`);return Object.assign({url:n.split(`?`)[0]||``,query:fe(ue(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:X(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[o]:!0},n);let r=te(t.url).split(`?`)[0]||``,i=e.extract(t.url),a=e.parse(i,{sort:!1}),c=Object.assign(a,t.query),u=e.stringify(c,n);u&&=`?${u}`;let K=ce(t.url);return t.fragmentIdentifier&&(K=`#${n[o]?Y(t.fragmentIdentifier,n):t.fragmentIdentifier}`),`${r}${u}${K}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[o]:!1},r);let{url:a,query:c,fragmentIdentifier:u}=e.parseUrl(t,r);return e.stringifyUrl({url:a,query:i(c,n),fragmentIdentifier:u},r)},e.exclude=(t,n,r)=>{let i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}})),require_index_umd=__commonJSMin(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.browserMD5File=r()})(e,(function(){function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}var t=e(function(e,t){(function(t){e.exports=t()})(function(e){var t=function(e,t){return e+t&4294967295},n=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`a`,`b`,`c`,`d`,`e`,`f`];function r(e,n,r,i,a,o){return n=t(t(n,e),t(i,o)),t(n<<a|n>>>32-a,r)}function i(e,t,n,i,a,o,c){return r(t&n|~t&i,e,t,a,o,c)}function a(e,t,n,i,a,o,c){return r(t&i|n&~i,e,t,a,o,c)}function o(e,t,n,i,a,o,c){return r(t^n^i,e,t,a,o,c)}function c(e,t,n,i,a,o,c){return r(n^(t|~i),e,t,a,o,c)}function u(e,n){var r=e[0],u=e[1],K=e[2],Y=e[3];r=i(r,u,K,Y,n[0],7,-680876936),Y=i(Y,r,u,K,n[1],12,-389564586),K=i(K,Y,r,u,n[2],17,606105819),u=i(u,K,Y,r,n[3],22,-1044525330),r=i(r,u,K,Y,n[4],7,-176418897),Y=i(Y,r,u,K,n[5],12,1200080426),K=i(K,Y,r,u,n[6],17,-1473231341),u=i(u,K,Y,r,n[7],22,-45705983),r=i(r,u,K,Y,n[8],7,1770035416),Y=i(Y,r,u,K,n[9],12,-1958414417),K=i(K,Y,r,u,n[10],17,-42063),u=i(u,K,Y,r,n[11],22,-1990404162),r=i(r,u,K,Y,n[12],7,1804603682),Y=i(Y,r,u,K,n[13],12,-40341101),K=i(K,Y,r,u,n[14],17,-1502002290),u=i(u,K,Y,r,n[15],22,1236535329),r=a(r,u,K,Y,n[1],5,-165796510),Y=a(Y,r,u,K,n[6],9,-1069501632),K=a(K,Y,r,u,n[11],14,643717713),u=a(u,K,Y,r,n[0],20,-373897302),r=a(r,u,K,Y,n[5],5,-701558691),Y=a(Y,r,u,K,n[10],9,38016083),K=a(K,Y,r,u,n[15],14,-660478335),u=a(u,K,Y,r,n[4],20,-405537848),r=a(r,u,K,Y,n[9],5,568446438),Y=a(Y,r,u,K,n[14],9,-1019803690),K=a(K,Y,r,u,n[3],14,-187363961),u=a(u,K,Y,r,n[8],20,1163531501),r=a(r,u,K,Y,n[13],5,-1444681467),Y=a(Y,r,u,K,n[2],9,-51403784),K=a(K,Y,r,u,n[7],14,1735328473),u=a(u,K,Y,r,n[12],20,-1926607734),r=o(r,u,K,Y,n[5],4,-378558),Y=o(Y,r,u,K,n[8],11,-2022574463),K=o(K,Y,r,u,n[11],16,1839030562),u=o(u,K,Y,r,n[14],23,-35309556),r=o(r,u,K,Y,n[1],4,-1530992060),Y=o(Y,r,u,K,n[4],11,1272893353),K=o(K,Y,r,u,n[7],16,-155497632),u=o(u,K,Y,r,n[10],23,-1094730640),r=o(r,u,K,Y,n[13],4,681279174),Y=o(Y,r,u,K,n[0],11,-358537222),K=o(K,Y,r,u,n[3],16,-722521979),u=o(u,K,Y,r,n[6],23,76029189),r=o(r,u,K,Y,n[9],4,-640364487),Y=o(Y,r,u,K,n[12],11,-421815835),K=o(K,Y,r,u,n[15],16,530742520),u=o(u,K,Y,r,n[2],23,-995338651),r=c(r,u,K,Y,n[0],6,-198630844),Y=c(Y,r,u,K,n[7],10,1126891415),K=c(K,Y,r,u,n[14],15,-1416354905),u=c(u,K,Y,r,n[5],21,-57434055),r=c(r,u,K,Y,n[12],6,1700485571),Y=c(Y,r,u,K,n[3],10,-1894986606),K=c(K,Y,r,u,n[10],15,-1051523),u=c(u,K,Y,r,n[1],21,-2054922799),r=c(r,u,K,Y,n[8],6,1873313359),Y=c(Y,r,u,K,n[15],10,-30611744),K=c(K,Y,r,u,n[6],15,-1560198380),u=c(u,K,Y,r,n[13],21,1309151649),r=c(r,u,K,Y,n[4],6,-145523070),Y=c(Y,r,u,K,n[11],10,-1120210379),K=c(K,Y,r,u,n[2],15,718787259),u=c(u,K,Y,r,n[9],21,-343485551),e[0]=t(r,e[0]),e[1]=t(u,e[1]),e[2]=t(K,e[2]),e[3]=t(Y,e[3])}function K(e){for(var t=[],n=0;n<64;n+=4)t[n>>2]=e.charCodeAt(n)+(e.charCodeAt(n+1)<<8)+(e.charCodeAt(n+2)<<16)+(e.charCodeAt(n+3)<<24);return t}function Y(e){for(var t=[],n=0;n<64;n+=4)t[n>>2]=e[n]+(e[n+1]<<8)+(e[n+2]<<16)+(e[n+3]<<24);return t}function X(e){for(var t=e.length,n=[1732584193,-271733879,-1732584194,271733878],r=64,i,a,o,c,Y;r<=t;r+=64)u(n,K(e.substring(r-64,r)));for(e=e.substring(r-64),i=e.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=0;r<i;r+=1)a[r>>2]|=e.charCodeAt(r)<<(r%4<<3);if(a[r>>2]|=128<<(r%4<<3),r>55)for(u(n,a),r=0;r<16;r+=1)a[r]=0;return o=t*8,o=o.toString(16).match(/(.*?)(.{0,8}
152)$/),c=parseInt(o[2],16),Y=parseInt(o[1],16)||0,a[14]=c,a[15]=Y,u(n,a),n}function ee(e){for(var t=e.length,n=[1732584193,-271733879,-1732584194,271733878],r=64,i,a,o,c,K;r<=t;r+=64)u(n,Y(e.subarray(r-64,r)));for(e=r-64<t?e.subarray(r-64):new Uint8Array,i=e.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=0;r<i;r+=1)a[r>>2]|=e[r]<<(r%4<<3);if(a[r>>2]|=128<<(r%4<<3),r>55)for(u(n,a),r=0;r<16;r+=1)a[r]=0;return o=t*8,o=o.toString(16).match(/(.*?)(.{0,8})$/),c=parseInt(o[2],16),K=parseInt(o[1],16)||0,a[14]=c,a[15]=K,u(n,a),n}function te(e){for(var t=``,r=0;r<4;r+=1)t+=n[e>>r*8+4&15]+n[e>>r*8&15];return t}function ce(e){for(var t=0;t<e.length;t+=1)e[t]=te(e[t]);return e.join(``)}ce(X(`hello`))!==`5d41402abc4b2a76b9719d911017c592`&&(t=function(e,t){var n=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(n>>16)<<16|n&65535}),typeof ArrayBuffer<`u`&&!ArrayBuffer.prototype.slice&&(function(){function t(e,t){return e=e|0||0,e<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i=this.byteLength,a=t(n,i),o=i,c,u,K,Y;return r!==e&&(o=t(r,i)),a>o?new ArrayBuffer(0):(c=o-a,u=new ArrayBuffer(c),K=new Uint8Array(u),Y=new Uint8Array(this,a,c),K.set(Y),u)}})();function ue(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function de(e,t){for(var n=e.length,r=new ArrayBuffer(n),i=new Uint8Array(r),a=0;a<n;a+=1)i[a]=e.charCodeAt(a);return t?i:r}function fe(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function me(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function ge(e){for(var t=[],n=e.length,r=0;r<n-1;r+=2)t.push(parseInt(e.substr(r,2),16));return String.fromCharCode.apply(String,t)}function Te(){this.reset()}return Te.prototype.append=function(e){return this.appendBinary(ue(e)),this},Te.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;for(var t=this._buff.length,n=64;n<=t;n+=64)u(this._hash,K(this._buff.substring(n-64,n)));return this._buff=this._buff.substring(n-64),this},Te.prototype.end=function(e){var t=this._buff,n=t.length,r,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a;for(r=0;r<n;r+=1)i[r>>2]|=t.charCodeAt(r)<<(r%4<<3);return this._finish(i,n),a=ce(this._hash),e&&(a=ge(a)),this.reset(),a},Te.prototype.reset=function(){return this._buff=``,this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},Te.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}},Te.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},Te.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},Te.prototype._finish=function(e,t){var n=t,r,i,a;if(e[n>>2]|=128<<(n%4<<3),n>55)for(u(this._hash,e),n=0;n<16;n+=1)e[n]=0;r=this._length*8,r=r.toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),a=parseInt(r[1],16)||0,e[14]=i,e[15]=a,u(this._hash,e)},Te.hash=function(e,t){return Te.hashBinary(ue(e),t)},Te.hashBinary=function(e,t){var n=ce(X(e));return t?ge(n):n},Te.ArrayBuffer=function(){this.reset()},Te.ArrayBuffer.prototype.append=function(e){var t=me(this._buff.buffer,e,!0),n=t.length,r;for(this._length+=e.byteLength,r=64;r<=n;r+=64)u(this._hash,Y(t.subarray(r-64,r)));return this._buff=r-64<n?new Uint8Array(t.buffer.slice(r-64)):new Uint8Array,this},Te.ArrayBuffer.prototype.end=function(e){for(var t=this._buff,n=t.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=0,a;i<n;i+=1)r[i>>2]|=t[i]<<(i%4<<3);return this._finish(r,n),a=ce(this._hash),e&&(a=ge(a)),this.reset(),a},Te.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array,this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},Te.ArrayBuffer.prototype.getState=function(){var e=Te.prototype.getState.call(this);return e.buff=fe(e.buff),e},Te.ArrayBuffer.prototype.setState=function(e){return e.buff=de(e.buff,!0),Te.prototype.setState.call(this,e)},Te.ArrayBuffer.prototype.destroy=Te.prototype.destroy,Te.ArrayBuffer.prototype._finish=Te.prototype._finish,Te.ArrayBuffer.hash=function(e,t){var n=ce(ee(new Uint8Array(e)));return t?ge(n):n},Te})});
152class n{md5(e,n,r){this.aborted=!1,this.progress=0;let i=0,a=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,o=2097152,c=Math.ceil(e.size/o),u=new t.ArrayBuffer,K=new FileReader;Y(),K.onloadend=e=>{if(u.append(e.target.result),i++,this.progress=i/c,r&&typeof r==`function`&&r(this.progress),this.aborted){n(`aborted`);return}i<c?Y():n(null,u.end())};function Y(){let t=i*o,n=t+o>=e.size?e.size:t+o;K.readAsArrayBuffer(a.call(e,t,n))}}abort(){this.aborted=!0}}return n}))})),require_rollbar_umd_min=__commonJSMin(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.rollbar=r():n.rollbar=r()})(e,(()=>{return e={12:(e,t,n)=>{var r=n(539);e.exports=function(e,t,n){var i,a,o,c,u=r.isType(e,`object`),K=r.isType(e,`array`),Y=[];if(n||={obj:[],mapped:[]},u){if(c=n.obj.indexOf(e),u&&c!==-1)return n.mapped[c]||n.obj[c];n.obj.push(e),c=n.obj.length-1}if(u)for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&Y.push(i);else if(K)for(o=0;o<e.length;++o)Y.push(o);var X=u?{}:[],ee=!0;for(o=0;o<Y.length;++o)a=e[i=Y[o]],X[i]=t(i,a,n),ee&&=X[i]===e[i];return u&&!ee&&(n.mapped[c]=X),ee?e:X}},61:e=>{e.exports={parse:function(e){var t,n,r={protocol:null,auth:null,host:null,path:null,hash:null,href:e,hostname:null,port:null,pathname:null,search:null,query:null};if((t=e.indexOf(`//`))===-1?n=0:(r.protocol=e.substring(0,t),n=t+2),(t=e.indexOf(`@`,n))!==-1&&(r.auth=e.substring(n,t),n=t+1),(t=e.indexOf(`/`,n))===-1){if((t=e.indexOf(`?`,n))===-1)return(t=e.indexOf(`#`,n))===-1?r.host=e.substring(n):(r.host=e.substring(n,t),r.hash=e.substring(t)),r.hostname=r.host.split(`:`)[0],r.port=r.host.split(`:`)[1],r.port&&=parseInt(r.port,10),r;r.host=e.substring(n,t),r.hostname=r.host.split(`:`)[0],r.port=r.host.split(`:`)[1],r.port&&=parseInt(r.port,10),n=t}else r.host=e.substring(n,t),r.hostname=r.host.split(`:`)[0],r.port=r.host.split(`:`)[1],r.port&&=parseInt(r.port,10),n=t;if((t=e.indexOf(`#`,n))===-1?r.path=e.substring(n):(r.path=e.substring(n,t),r.hash=e.substring(t)),r.path){var i=r.path.split(`?`);r.pathname=i[0],r.query=i[1],r.search=r.query?`?`+r.query:null}return r}}},67:(e,t,n)=>{var r=n(539),i=n(91),a={hostname:`api.rollbar.com`,path:`/api/1/item/`,search:null,version:`1`,protocol:`https:`,port:443};function o(e,t,n,r,i){this.options=e,this.transport=t,this.url=n,this.truncation=r,this.jsonBackup=i,this.accessToken=e.accessToken,this.transportOptions=c(e,n)}function c(e,t){return i.getTransportFromOptions(e,a,t)}o.prototype.postItem=function(e,t){var n=i.transportOptions(this.transportOptions,`POST`),r=i.buildPayload(this.accessToken,e,this.jsonBackup),a=this;setTimeout((function(){a.transport.post(a.accessToken,n,r,t)}),0)},o.prototype.buildJsonPayload=function(e,t){var n,a=i.buildPayload(this.accessToken,e,this.jsonBackup);return(n=this.truncation?this.truncation.truncate(a):r.stringify(a)).error?(t&&t(n.error),null):n.value},o.prototype.postJsonPayload=function(e,t){var n=i.transportOptions(this.transportOptions,`POST`);this.transport.postJsonPayload(this.accessToken,n,e,t)},o.prototype.configure=function(e){var t=this.oldOptions;return this.options=r.merge(t,e),this.transportOptions=c(this.options,this.url),this.options.accessToken!==void 0&&(this.accessToken=this.options.accessToken),this},e.exports=o},91:(e,t,n)=>{var r=n(539);e.exports={buildPayload:function(e,t,n){if(!r.isType(t.context,`string`)){var i=r.stringify(t.context,n);t.context=i.error?`Error: could not serialize 'context'`:i.value||``,t.context.length>255&&(t.context=t.context.substr(0,255))}return{access_token:e,data:t}},getTransportFromOptions:function(e,t,n){var r=t.hostname,i=t.protocol,a=t.port,o=t.path,c=t.search,u=e.timeout,K=function(e){var t=typeof window<`u`&&window||typeof self<`u`&&self,n=e.defaultTransport||`xhr`;return t.fetch===void 0&&(n=`xhr`),t.XMLHttpRequest===void 0&&(n=`fetch`),n}(e),Y=e.proxy;if(e.endpoint){var X=n.parse(e.endpoint);r=X.hostname,i=X.protocol,a=X.port,o=X.pathname,c=X.search}return{timeout:u,hostname:r,protocol:i,port:a,path:o,search:c,proxy:Y,transport:K}},transportOptions:function(e,t){var n=e.protocol||`https:`,r=e.port||(n===`http:`?80:n===`https:`?443:void 0),i=e.hostname,a=e.path,o=e.timeout,c=e.transport;return e.search&&(a+=e.search),e.proxy&&(a=n+`//`+i+a,i=e.proxy.host||e.proxy.hostname,r=e.proxy.port,n=e.proxy.protocol||n),{timeout:o,protocol:n,hostname:i,path:a,port:r,method:t,transport:c}},appendPathToPath:function(e,t){var n=/\/$/.test(e),r=/^\//.test(t);return n&&r?t=t.substring(1):n||r||(t=`/`+t),e+t}}},108:function(e,t){var n,r,i;(function(){r=[],(i=typeof(n=function(){function e(e){return!isNaN(parseFloat(e))&&isFinite(e)}function t(e){return e.charAt(0).toUpperCase()+e.substring(1)}function n(e){return function(){return this[e]}}var r=[`isConstructor`,`isEval`,`isNative`,`isToplevel`],i=[`columnNumber`,`lineNumber`],a=[`fileName`,`functionName`,`source`],o=r.concat(i,a,[`args`],[`evalOrigin`]);function c(e){if(e)for(var n=0;n<o.length;n++)e[o[n]]!==void 0&&this[`set`+t(o[n])](e[o[n]])}c.prototype={getArgs:function(){return this.args},setArgs:function(e){if(Object.prototype.toString.call(e)!==`[object Array]`)throw TypeError(`Args must be an Array`);this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof c)this.evalOrigin=e;else{if(!(e instanceof Object))throw TypeError(`Eval Origin must be an Object or StackFrame`);this.evalOrigin=new c(e)}},toString:function(){var e=this.getFileName()||``,t=this.getLineNumber()||``,n=this.getColumnNumber()||``,r=this.getFunctionName()||``;return this.getIsEval()?e?`[eval] (`+e+`:`+t+`:`+n+`)`:`[eval]:`+t+`:`+n:r?r+` (`+e+`:`+t+`:`+n+`)`:e+`:`+t+`:`+n}},c.fromString=function(e){var t=e.indexOf(`(`),n=e.lastIndexOf(`)`),r=e.substring(0,t),i=e.substring(t+1,n).split(`,`),a=e.substring(n+1);if(a.indexOf(`@`)===0)var o=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a,``),u=o[1],K=o[2],Y=o[3];return new c({functionName:r,args:i||void 0,fileName:u,lineNumber:K||void 0,columnNumber:Y||void 0})};for(var u=0;u<r.length;u++)c.prototype[`get`+t(r[u])]=n(r[u]),c.prototype[`set`+t(r[u])]=function(e){return function(t){this[e]=!!t}}(r[u]);for(var K=0;K<i.length;K++)c.prototype[`get`+t(i[K])]=n(i[K]),c.prototype[`set`+t(i[K])]=function(t){return function(n){if(!e(n))throw TypeError(t+` must be a Number`);this[t]=Number(n)}}(i[K]);for(var Y=0;Y<a.length;Y++)c.prototype[`get`+t(a[Y])]=n(a[Y]),c.prototype[`set`+t(a[Y])]=function(e){return function(t){this[e]=String(t)}}(a[Y]);return c})==`function`?n.apply(t,r):n)===void 0||(e.exports=i)})()},175:e=>{e.exports={ieVersion:function(){var e;if(typeof document>`u`)return e;for(var t=3,n=document.createElement(`div`),r=n.getElementsByTagName(`i`);n.innerHTML=`<!--[if gt IE `+ ++t+`]><i></i><![endif]-->`,r[0];);return t>4?t:e}}},197:(e,t,n)=>{var r=n(335),i=n(539),a=n(67),o=n(306),c=n(796),u=n(497),K=n(61),Y=n(203),X=n(962),ee=n(584),te=n(581),ce=n(342);function ue(e,t){this.options=i.handleOptions(Ae,e,null,o),this.options._configuredOptions=e;var n=this.components.telemeter,c=this.components.instrumenter,ce=this.components.polyfillJSON;this.wrapGlobals=this.components.wrapGlobals,this.scrub=this.components.scrub;var ue=this.components.truncation,de=new u(ue),fe=new a(this.options,de,K,ue);
152n&&(this.telemeter=new n(this.options)),this.client=t||new r(this.options,fe,o,this.telemeter,`browser`);var me=ge(),Te=typeof document<`u`&&document;this.isChrome=me.chrome&&me.chrome.runtime,this.anonymousErrorsPending=0,function(e,t,n){e.addTransform(Y.handleDomException).addTransform(Y.handleItemWithError).addTransform(Y.ensureItemHasSomethingToSay).addTransform(Y.addBaseInfo).addTransform(Y.addRequestInfo(n)).addTransform(Y.addClientInfo(n)).addTransform(Y.addPluginInfo(n)).addTransform(Y.addBody).addTransform(X.addMessageWithError).addTransform(X.addTelemetryData).addTransform(X.addConfigToPayload).addTransform(Y.addScrubber(t.scrub)).addTransform(X.addPayloadOptions).addTransform(X.userTransform(o)).addTransform(X.addConfiguredOptions).addTransform(X.addDiagnosticKeys).addTransform(X.itemToPayload)}(this.client.notifier,this,me),this.client.queue.addPredicate(te.checkLevel).addPredicate(ee.checkIgnore).addPredicate(te.userCheckIgnore(o)).addPredicate(te.urlIsNotBlockListed(o)).addPredicate(te.urlIsSafeListed(o)).addPredicate(te.messageIsIgnored(o)),this.setupUnhandledCapture(),c&&(this.instrumenter=new c(this.options,this.client.telemeter,this,me,Te),this.instrumenter.instrument()),i.setupJSON(ce),this.rollbar=this}var de=null;function fe(e){var t=`Rollbar is not initialized`;o.error(t),e&&e(Error(t))}function me(e){for(var t=0,n=e.length;t<n;++t)if(i.isFunction(e[t]))return e[t]}function ge(){return typeof window<`u`&&window||typeof self<`u`&&self}ue.init=function(e,t){return de?de.global(e).configure(e):de=new ue(e,t)},ue.prototype.components={},ue.setComponents=function(e){ue.prototype.components=e},ue.prototype.global=function(e){return this.client.global(e),this},ue.global=function(e){if(de)return de.global(e);fe()},ue.prototype.configure=function(e,t){var n=this.options,r={};return t&&(r={payload:t}),this.options=i.handleOptions(n,e,r,o),this.options._configuredOptions=i.handleOptions(n._configuredOptions,e,r),this.client.configure(this.options,t),this.instrumenter&&this.instrumenter.configure(this.options),this.setupUnhandledCapture(),this},ue.configure=function(e,t){if(de)return de.configure(e,t);fe()},ue.prototype.lastError=function(){return this.client.lastError},ue.lastError=function(){if(de)return de.lastError();fe()},ue.prototype.log=function(){var e=this._createItem(arguments),t=e.uuid;return this.client.log(e),{uuid:t}},ue.log=function(){if(de)return de.log.apply(de,arguments);fe(me(arguments))},ue.prototype.debug=function(){var e=this._createItem(arguments),t=e.uuid;return this.client.debug(e),{uuid:t}},ue.debug=function(){if(de)return de.debug.apply(de,arguments);fe(me(arguments))},ue.prototype.info=function(){var e=this._createItem(arguments),t=e.uuid;return this.client.info(e),{uuid:t}},ue.info=function(){if(de)return de.info.apply(de,arguments);fe(me(arguments))},ue.prototype.warn=function(){var e=this._createItem(arguments),t=e.uuid;return this.client.warn(e),{uuid:t}},ue.warn=function(){if(de)return de.warn.apply(de,arguments);fe(me(arguments))},ue.prototype.warning=function(){var e=this._createItem(arguments),t=e.uuid;return this.client.warning(e),{uuid:t}},ue.warning=function(){if(de)return de.warning.apply(de,arguments);fe(me(arguments))},ue.prototype.error=function(){var e=this._createItem(arguments),t=e.uuid;return this.client.error(e),{uuid:t}},ue.error=function(){if(de)return de.error.apply(de,arguments);fe(me(arguments))},ue.prototype.critical=function(){var e=this._createItem(arguments),t=e.uuid;return this.client.critical(e),{uuid:t}},ue.critical=function(){if(de)return de.critical.apply(de,arguments);fe(me(arguments))},ue.prototype.buildJsonPayload=function(e){return this.client.buildJsonPayload(e)},ue.buildJsonPayload=function(){if(de)return de.buildJsonPayload.apply(de,arguments);fe()},ue.prototype.sendJsonPayload=function(e){return this.client.sendJsonPayload(e)},ue.sendJsonPayload=function(){if(de)return de.sendJsonPayload.apply(de,arguments);fe()},ue.prototype.setupUnhandledCapture=function(){var e=ge();this.unhandledExceptionsInitialized||(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(c.captureUncaughtExceptions(e,this),this.wrapGlobals&&this.options.wrapGlobalEventHandlers&&this.wrapGlobals(e,this),this.unhandledExceptionsInitialized=!0),this.unhandledRejectionsInitialized||(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&(c.captureUnhandledRejections(e,this),this.unhandledRejectionsInitialized=!0)},ue.prototype.handleUncaughtException=function(e,t,n,r,a,o){if(this.options.captureUncaught||this.options.handleUncaughtExceptions){if(this.options.inspectAnonymousErrors&&this.isChrome&&a===null&&t===``)return`anonymous`;var c,u=i.makeUnhandledStackInfo(e,t,n,r,a,`onerror`,`uncaught exception`,ce);i.isError(a)?(c=this._createItem([e,a,o]))._unhandledStackInfo=u:i.isError(t)?(c=this._createItem([e,t,o]))._unhandledStackInfo=u:(c=this._createItem([e,o])).stackInfo=u,c.level=this.options.uncaughtErrorLevel,c._isUncaught=!0,this.client.log(c)}},ue.prototype.handleAnonymousErrors=function(){if(this.options.inspectAnonymousErrors&&this.isChrome){var e=this;try{Error.prepareStackTrace=function(t,n){if(e.options.inspectAnonymousErrors&&e.anonymousErrorsPending){if(--e.anonymousErrorsPending,!t)return;t._isAnonymous=!0,e.handleUncaughtException(t.message,null,null,null,t)}return t.stack}}catch(e){this.options.inspectAnonymousErrors=!1,this.error(`anonymous error handler failed`,e)}}},ue.prototype.handleUnhandledRejection=function(e,t){if(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections){var n=`unhandled rejection was null or undefined!`;if(e){if(e.message)n=e.message;else{var r=i.stringify(e);r.value&&(n=r.value)}}var a,o=e&&e._rollbarContext||t&&t._rollbarContext;i.isError(e)?a=this._createItem([n,e,o]):(a=this._createItem([n,e,o])).stackInfo=i.makeUnhandledStackInfo(n,``,0,0,null,`unhandledrejection`,``,ce),a.level=this.options.uncaughtErrorLevel,a._isUncaught=!0,a._originalArgs=a._originalArgs||[],a._originalArgs.push(t),this.client.log(a)}},ue.prototype.wrap=function(e,t,n){try{var r=i.isFunction(t)?t:function(){return t||{}};if(!i.isFunction(e)||e._isWrap)return e;if(!e._rollbar_wrapped&&(e._rollbar_wrapped=function(){n&&i.isFunction(n)&&n.apply(this,arguments);try{return e.apply(this,arguments)}catch(n){var t=n;throw t&&window._rollbarWrappedError!==t&&(i.isType(t,`string`)&&(t=new String(t)),t._rollbarContext=r()||{},t._rollbarContext._wrappedSource=e.toString(),window._rollbarWrappedError=t),t}},e._rollbar_wrapped._isWrap=!0,e.hasOwnProperty))for(var a in e)e.hasOwnProperty(a)&&a!==`_rollbar_wrapped`&&(e._rollbar_wrapped[a]=e[a]);return e._rollbar_wrapped}catch{return e}},ue.wrap=function(e,t){if(de)return de.wrap(e,t);fe()},ue.prototype.captureEvent=function(){var e=i.createTelemetryEvent(arguments);return this.client.captureEvent(e.type,e.metadata,e.level)},ue.captureEvent=function(){if(de)return de.captureEvent.apply(de,arguments);fe()},ue.prototype.captureDomContentLoaded=function(e,t){return t||=new Date,this.client.captureDomContentLoaded(t)},ue.prototype.captureLoad=function(e,t){return t||=new Date,this.client.captureLoad(t)},ue.prototype.loadFull=function(){o.info(`Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.`)},ue.prototype._createItem=function(e){return i.createItem(e,o,this)};
152var Te=n(441),Oe=n(537),Ae={version:Te.version,scrubFields:Oe.scrubFields,logLevel:Te.logLevel,reportLevel:Te.reportLevel,uncaughtErrorLevel:Te.uncaughtErrorLevel,endpoint:Te.endpoint,verbose:!1,enabled:!0,transmit:!0,sendConfig:!1,includeItemsInTelemetry:!0,captureIp:!0,inspectAnonymousErrors:!0,ignoreDuplicateErrors:!0,wrapGlobalEventHandlers:!1};e.exports=ue},203:(e,t,n)=>{var r=n(539),i=n(342),a=n(306);function o(e,t,n){var i=e.message,a=e.custom;i||=`Item sent with null or missing arguments.`;var o={body:i};a&&(o.extra=r.merge(a)),r.set(e,`data.body`,{message:o}),n(null,e)}function c(e){var t=e.stackInfo.stack;return t&&t.length===0&&e._unhandledStackInfo&&e._unhandledStackInfo.stack&&(t=e._unhandledStackInfo.stack),t}function u(e,t,n){var a=e&&e.data.description,o=e&&e.custom,u=c(e),Y=i.guessErrorClass(t.message),X={exception:{class:K(t,Y[0],n),message:Y[1]}};if(a&&(X.exception.description=a),u){var ee,te,ce,ue,de,fe,me,ge;for(u.length===0&&(X.exception.stack=t.rawStack,X.exception.raw=String(t.rawException)),X.frames=[],me=0;me<u.length;++me)te={filename:(ee=u[me]).url?r.sanitizeUrl(ee.url):`(unknown)`,lineno:ee.line||null,method:ee.func&&ee.func!==`?`?ee.func:`[anonymous]`,colno:ee.column},n.sendFrameUrl&&(te.url=ee.url),te.method&&te.method.endsWith&&te.method.endsWith(`_rollbar_wrapped`)||(ce=ue=de=null,(fe=ee.context?ee.context.length:0)&&(ge=Math.floor(fe/2),ue=ee.context.slice(0,ge),ce=ee.context[ge],de=ee.context.slice(ge)),ce&&(te.code=ce),(ue||de)&&(te.context={},ue&&ue.length&&(te.context.pre=ue),de&&de.length&&(te.context.post=de)),ee.args&&(te.args=ee.args),X.frames.push(te));X.frames.reverse(),o&&(X.extra=r.merge(o))}return X}function K(e,t,n){return e.name?e.name:n.guessErrorClass?t:`(unknown)`}e.exports={handleDomException:function(e,t,n){if(e.err&&i.Stack(e.err).name===`DOMException`){var r=Error();r.name=e.err.name,r.message=e.err.message,r.stack=e.err.stack,r.nested=e.err,e.err=r}n(null,e)},handleItemWithError:function(e,t,n){if(e.data=e.data||{},e.err)try{e.stackInfo=e.err._savedStackTrace||i.parse(e.err,e.skipFrames),t.addErrorContext&&function(e){var t=[],n=e.err;for(t.push(n);n.nested||n.cause;)n=n.nested||n.cause,t.push(n);r.addErrorContext(e,t)}(e)}catch(t){a.error(`Error while parsing the error object.`,t);try{e.message=e.err.message||e.err.description||e.message||String(e.err)}catch(t){e.message=String(e.err)||String(t)}delete e.err}n(null,e)},ensureItemHasSomethingToSay:function(e,t,n){e.message||e.stackInfo||e.custom||n(Error(`No message, stack info, or custom data`),null),n(null,e)},addBaseInfo:function(e,t,n){var i=t.payload&&t.payload.environment||t.environment;e.data=r.merge(e.data,{environment:i,level:e.level,endpoint:t.endpoint,platform:`browser`,framework:`browser-js`,language:`javascript`,server:{},uuid:e.uuid,notifier:{name:`rollbar-browser-js`,version:t.version},custom:e.custom}),n(null,e)},addRequestInfo:function(e){return function(t,n,i){var a={};e&&e.location&&(a.url=e.location.href,a.query_string=e.location.search);var o=`$remote_ip`;n.captureIp?!0!==n.captureIp&&(o+=`_anonymize`):o=null,o&&(a.user_ip=o),Object.keys(a).length>0&&r.set(t,`data.request`,a),i(null,t)}},addClientInfo:function(e){return function(t,n,i){if(!e)return i(null,t);var a=e.navigator||{},o=e.screen||{};r.set(t,`data.client`,{runtime_ms:t.timestamp-e._rollbarStartTime,timestamp:Math.round(t.timestamp/1e3),javascript:{browser:a.userAgent,language:a.language,cookie_enabled:a.cookieEnabled,screen:{width:o.width,height:o.height}}}),i(null,t)}},addPluginInfo:function(e){return function(t,n,i){if(!e||!e.navigator)return i(null,t);for(var a,o=[],c=e.navigator.plugins||[],u=0,K=c.length;u<K;++u)a=c[u],o.push({name:a.name,description:a.description});r.set(t,`data.client.javascript.plugins`,o),i(null,t)}},addBody:function(e,t,n){e.stackInfo?e.stackInfo.traceChain?function(e,t,n){for(var i=e.stackInfo.traceChain,a=[],o=i.length,c=0;c<o;c++){var K=u(e,i[c],t);a.push(K)}r.set(e,`data.body`,{trace_chain:a}),n(null,e)}(e,t,n):function(e,t,n){if(c(e)){var a=u(e,e.stackInfo,t);r.set(e,`data.body`,{trace:a}),n(null,e)}else{var Y=e.stackInfo,X=i.guessErrorClass(Y.message),ee=K(Y,X[0],t),te=X[1];e.message=ee+`: `+te,o(e,0,n)}}
152(e,t,n):o(e,0,n)},addScrubber:function(e){return function(t,n,r){if(e){var i=n.scrubFields||[],a=n.scrubPaths||[];t.data=e(t.data,i,a)}r(null,t)}}}},215:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=function(e){if(!e||n.call(e)!==`[object Object]`)return!1;var r,i=t.call(e,`constructor`),a=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!i&&!a)return!1;for(r in e);return r===void 0||t.call(e,r)};e.exports=function e(){var t,n,i,a,o,c=Object.create(null),u=null,K=arguments.length;for(t=0;t<K;t++)if((u=arguments[t])!=null)for(o in u)n=c[o],c!==(i=u[o])&&(i&&r(i)?(a=n&&r(n)?n:{},c[o]=e(a,i)):i!==void 0&&(c[o]=i));return c}},263:function(e,t,n){var r,i,a;(function(){i=[n(108)],(a=typeof(r=function(e){var t=/(^|@)\S+:\d+/,n=/^\s*at .*(\S+:\d+|\(native\))/m,r=/^(eval@)?(\[native code])?$/;return{parse:function(e){if(e.stacktrace!==void 0||e[`opera#sourceloc`]!==void 0)return this.parseOpera(e);if(e.stack&&e.stack.match(n))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw Error(`Cannot parse given Error object`)},extractLocation:function(e){if(e.indexOf(`:`)===-1)return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,``));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(t){return t.stack.split(`
153`).filter((function(e){return!!e.match(n)}),this).map((function(t){t.indexOf(`(eval `)>-1&&(t=t.replace(/eval code/g,`eval`).replace(/(\(eval at [^()]*)|(\),.*$)/g,``));var n=t.replace(/^\s+/,``).replace(/\(eval code/g,`(`),r=n.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(n=r?n.replace(r[0],``):n).split(/\s+/).slice(1),a=this.extractLocation(r?r[1]:i.pop());return new e({functionName:i.join(` `)||void 0,fileName:[`eval`,`<anonymous>`].indexOf(a[0])>-1?void 0:a[0],lineNumber:a[1],columnNumber:a[2],source:t})}),this)},parseFFOrSafari:function(t){return t.stack.split(`
154`).filter((function(e){return!e.match(r)}),this).map((function(t){if(t.indexOf(` > eval`)>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,`:$1`)),t.indexOf(`@`)===-1&&t.indexOf(`:`)===-1)return new e({functionName:t});var n=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=t.match(n),i=r&&r[1]?r[1]:void 0,a=this.extractLocation(t.replace(n,``));return new e({functionName:i,fileName:a[0],lineNumber:a[1],columnNumber:a[2],source:t})}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf(`
155`)>-1&&e.message.split(`
156`).length>e.stacktrace.split(`
157`).length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,r=t.message.split(`
158`),i=[],a=2,o=r.length;a<o;a+=2){var c=n.exec(r[a]);c&&i.push(new e({fileName:c[2],lineNumber:c[1],source:r[a]}))}return i},parseOpera10:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=t.stacktrace.split(`
159`),i=[],a=0,o=r.length;a<o;a+=2){var c=n.exec(r[a]);c&&i.push(new e({functionName:c[3]||void 0,fileName:c[2],lineNumber:c[1],source:r[a]}))}return i},parseOpera11:function(n){return n.stack.split(`
160`).filter((function(e){return!!e.match(t)&&!e.match(/^Error created at/)}),this).map((function(t){var n,r=t.split(`@`),i=this.extractLocation(r.pop()),a=r.shift()||``,o=a.replace(/<anonymous function(: (\w+))?>/,`$2`).replace(/\([^)]*\)/g,``)||void 0;return a.match(/\(([^)]*)\)/)&&(n=a.replace(/^[^(]+\(([^)]*)\)$/,`$1`)),new e({functionName:o,args:n===void 0||n===`[arguments not available]`?void 0:n.split(`,`),fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:t})}),this)}}})==`function`?r.apply(t,i):r)===void 0||(e.exports=a)})()},306:(e,t,n)=>{n(738);var r=n(175),i=n(539);e.exports={error:function(){var e=Array.prototype.slice.call(arguments,0);e.unshift(`Rollbar:`),r.ieVersion()<=8?console.error(i.formatArgsAsString(e)):console.error.apply(console,e)},info:function(){var e=Array.prototype.slice.call(arguments,0);e.unshift(`Rollbar:`),r.ieVersion()<=8?console.info(i.formatArgsAsString(e)):console.info.apply(console,e)},log:function(){var e=Array.prototype.slice.call(arguments,0);e.unshift(`Rollbar:`),r.ieVersion()<=8?console.log(i.formatArgsAsString(e)):console.log.apply(console,e)}}},335:(e,t,n)=>{var r=n(513),i=n(744),a=n(777),o=n(539);function c(e,t,n,r,Y){this.options=o.merge(e),this.logger=n,c.rateLimiter.configureGlobal(this.options),c.rateLimiter.setPlatformOptions(Y,this.options),this.api=t,this.queue=new i(c.rateLimiter,t,n,this.options);var X=this.options.tracer||null;K(X)?(this.tracer=X,this.options.tracer=`opentracing-tracer-enabled`,this.options._configuredOptions.tracer=`opentracing-tracer-enabled`):this.tracer=null,this.notifier=new a(this.queue,this.options),this.telemeter=r,u(e),this.lastError=null,this.lastErrorHash=`none`}function u(e){e.stackTraceLimit&&(Error.stackTraceLimit=e.stackTraceLimit)}function K(e){if(!e||!e.scope||typeof e.scope!=`function`)return!1;var t=e.scope();return!(!t||!t.active||typeof t.active!=`function`)}c.rateLimiter=new r({maxItems:0,itemsPerMinute:60}),c.prototype.global=function(e){return c.rateLimiter.configureGlobal(e),this},c.prototype.configure=function(e,t){var n=this.options,r={};t&&(r={payload:t}),this.options=o.merge(n,e,r);var i=this.options.tracer||null;return K(i)?(this.tracer=i,this.options.tracer=`opentracing-tracer-enabled`,this.options._configuredOptions.tracer=`opentracing-tracer-enabled`):this.tracer=null,this.notifier&&this.notifier.configure(this.options),this.telemeter&&this.telemeter.configure(this.options),u(e),this.global(this.options),K(e.tracer)&&(this.tracer=e.tracer),this},c.prototype.log=function(e){var t=this._defaultLogLevel();return this._log(t,e)},c.prototype.debug=function(e){this._log(`debug`,e)},c.prototype.info=function(e){this._log(`info`,e)},c.prototype.warn=function(e){this._log(`warning`,e)},c.prototype.warning=function(e){this._log(`warning`,e)},c.prototype.error=function(e){this._log(`error`,e)},c.prototype.critical=function(e){this._log(`critical`,e)},c.prototype.wait=function(e){this.queue.wait(e)},c.prototype.captureEvent=function(e,t,n){return this.telemeter&&this.telemeter.captureEvent(e,t,n)},c.prototype.captureDomContentLoaded=function(e){return this.telemeter&&this.telemeter.captureDomContentLoaded(e)},c.prototype.captureLoad=function(e){return this.telemeter&&this.telemeter.captureLoad(e)},c.prototype.buildJsonPayload=function(e){return this.api.buildJsonPayload(e)},c.prototype.sendJsonPayload=function(e){this.api.postJsonPayload(e)},c.prototype._log=function(e,t){var n;if(t.callback&&(n=t.callback,delete t.callback),this.options.ignoreDuplicateErrors&&this._sameAsLastError(t)){if(n){var r=Error(`ignored identical item`);r.item=t,n(r)}}else try{this._addTracingInfo(t),t.level=t.level||e,this.telemeter&&this.telemeter._captureRollbarItem(t),t.telemetryEvents=this.telemeter&&this.telemeter.copyEvents()||[],this.notifier.log(t,n)}catch(e){n&&n(e),this.logger.error(e)}},c.prototype._defaultLogLevel=function(){return this.options.logLevel||`debug`},c.prototype._sameAsLastError=function(e){if(!e._isUncaught)return!1;var t=function(e){var t=e.message||``,n=(e.err||{}).stack||String(e.err);return t+`::`+n}(e);return this.lastErrorHash===t||(this.lastError=e.err,this.lastErrorHash=t,!1)},c.prototype._addTracingInfo=function(e){if(this.tracer){var t=this.tracer.scope().active();if(function(e){if(!e||!e.context||typeof e.context!=`function`)return!1;var t=e.context();return!!(t&&t.toSpanId&&t.toTraceId&&typeof t.toSpanId==`function`&&typeof t.toTraceId==`function`)}(t)){t.setTag(`rollbar.error_uuid`,e.uuid),t.setTag(`rollbar.has_error`,!0),t.setTag(`error`,!0),t.setTag(`rollbar.item_url`,`https://rollbar.com/item/uuid/?uuid=${e.uuid}`),t.setTag(`rollbar.occurrence_url`,`https://rollbar.com/occurrence/uuid/?uuid=${e.uuid}`);var n=t.context().toSpanId(),r=t.context().toTraceId();e.custom?(e.custom.opentracing_span_id=n,e.custom.opentracing_trace_id=r):e.custom={opentracing_span_id:n,opentracing_trace_id:r}}}},e.exports=c},342:(e,t,n)=>{var r=n(263),i=RegExp(`^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): `);function a(){return null}function o(e){var t={};return t._stackFrame=e,t.url=e.fileName,t.line=e.lineNumber,t.func=e.functionName,t.column=e.columnNumber,t.args=e.args,t.context=null,t}function c(e,t){return{stack:function(){var n=[];t||=0;try{n=r.parse(e)}catch{n=[]}for(var i=[],a=t;a<n.length;a++)i.push(new o(n[a]));return i}(),message:e.message,name:(n=e,i=n.name&&n.name.length&&n.name,a=n.constructor.name&&n.constructor.name.length&&n.constructor.name,i&&a?i===`Error`?a:i:i||a),rawStack:e.stack,rawException:e};var n,i,a}e.exports={guessFunctionName:function(){return`?`},guessErrorClass:function(e){if(!e||!e.match)return[`Unknown error. There was no error message to display.`,``];var t=e.match(i),n=`(unknown)`;return t&&(n=t[t.length-1],e=(e=e.replace((t[t.length-2]||``)+n+`:`,``)).replace(/(^[\s]+|[\s]+$)/g,``)),[n,e]},gatherContext:a,parse:function(e,t){var n=e;if(n.nested||n.cause){for(var r=[];n;)r.push(new c(n,t)),n=n.nested||n.cause,t=0;return r[0].traceChain=r,r[0]}return new c(n,t)},Stack:c,Frame:o}}
160,352:(e,t,n)=>{var r=n(539),i=100;function a(e){this.queue=[],this.options=r.merge(e);var t=this.options.maxTelemetryEvents||i;this.maxQueueSize=Math.max(0,Math.min(t,i))}function o(e,t){return t||{error:`error`,manual:`info`}[e]||`info`}a.prototype.configure=function(e){var t=this.options;this.options=r.merge(t,e);var n=this.options.maxTelemetryEvents||i,a=Math.max(0,Math.min(n,i)),o=0;this.queue.length>a&&(o=this.queue.length-a),this.maxQueueSize=a,this.queue.splice(0,o)},a.prototype.copyEvents=function(){var e=Array.prototype.slice.call(this.queue,0);if(r.isFunction(this.options.filterTelemetry))try{for(var t=e.length;t--;)this.options.filterTelemetry(e[t])&&e.splice(t,1)}catch{this.options.filterTelemetry=null}return e},a.prototype.capture=function(e,t,n,i,a){var c={level:o(e,n),type:e,timestamp_ms:a||r.now(),body:t,source:`client`};i&&(c.uuid=i);try{if(r.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(c))return!1}catch{this.options.filterTelemetry=null}return this.push(c),c},a.prototype.captureEvent=function(e,t,n,r){return this.capture(e,t,n,r)},a.prototype.captureError=function(e,t,n,r){var i={message:e.message||String(e)};return e.stack&&(i.stack=e.stack),this.capture(`error`,i,t,n,r)},a.prototype.captureLog=function(e,t,n,r){return this.capture(`log`,{message:e},t,n,r)},a.prototype.captureNetwork=function(e,t,n,r){t||=`xhr`,e.subtype=e.subtype||t,r&&(e.request=r);var i=this.levelFromStatus(e.status_code);return this.capture(`network`,e,i,n)},a.prototype.levelFromStatus=function(e){return e>=200&&e<400?`info`:e===0||e>=400?`error`:`info`},a.prototype.captureDom=function(e,t,n,r,i){var a={subtype:e,element:t};return n!==void 0&&(a.value=n),r!==void 0&&(a.checked=r),this.capture(`dom`,a,`info`,i)},a.prototype.captureNavigation=function(e,t,n){return this.capture(`navigation`,{from:e,to:t},`info`,n)},a.prototype.captureDomContentLoaded=function(e){return this.capture(`navigation`,{subtype:`DOMContentLoaded`},`info`,void 0,e&&e.getTime())},a.prototype.captureLoad=function(e){return this.capture(`navigation`,{subtype:`load`},`info`,void 0,e&&e.getTime())},a.prototype.captureConnectivityChange=function(e,t){return this.captureNetwork({change:e},`connectivity`,t)},a.prototype._captureRollbarItem=function(e){if(this.options.includeItemsInTelemetry)return e.err?this.captureError(e.err,e.level,e.uuid,e.timestamp):e.message?this.captureLog(e.message,e.level,e.uuid,e.timestamp):e.custom?this.capture(`log`,e.custom,e.level,e.uuid,e.timestamp):void 0},a.prototype.push=function(e){this.queue.push(e),this.queue.length>this.maxQueueSize&&this.queue.shift()},e.exports=a},356:(e,t,n)=>{var r=n(539),i=n(12);function a(e,t){var n=t.split(`.`),i=n.length-1;try{for(var a=0;a<=i;++a)a<i?e=e[n[a]]:e[n[a]]=r.redact()}catch{}}e.exports=function(e,t,n){if(t||=[],n)for(var o=0;o<n.length;++o)a(e,n[o]);var c=function(e){for(var t,n=[],r=0;r<e.length;++r)t=`^\\[?(%5[bB])?`+e[r]+`\\[?(%5[bB])?\\]?(%5[dD])?$`,n.push(new RegExp(t,`i`));return n}(t),u=function(e){for(var t,n=[],r=0;r<e.length;++r)t=`\\[?(%5[bB])?`+e[r]+`\\[?(%5[bB])?\\]?(%5[dD])?`,n.push(RegExp(`(`+t+`=)([^&\\n]+)`,`igm`));return n}(t);function K(e,t){return t+r.redact()}return i(e,(function e(t,n,a){var o=function(e,t){for(var n=0;n<c.length;++n)if(c[n].test(e)){t=r.redact();break}return t}(t,n);return o===n?r.isType(n,`object`)||r.isType(n,`array`)?i(n,e,a):function(e){var t;if(r.isType(e,`string`))for(t=0;t<u.length;++t)e=e.replace(u[t],K);return e}(o):o}))}},364:e=>{e.exports=function(e,t,n,r,i){var a=e[t];e[t]=n(a),r&&r[i].push([e,t,a])}},424:e=>{function t(e,t,n){if(t.hasOwnProperty&&t.hasOwnProperty(`addEventListener`)){for(var r=t.addEventListener;r._rollbarOldAdd&&r.belongsToShim;)r=r._rollbarOldAdd;var i=function(t,n,i){r.call(this,t,e.wrap(n),i)};i._rollbarOldAdd=r,i.belongsToShim=n,t.addEventListener=i;for(var a=t.removeEventListener;a._rollbarOldRemove&&a.belongsToShim;)a=a._rollbarOldRemove;var o=function(e,t,n){a.call(this,e,t&&t._rollbar_wrapped||t,n)};o._rollbarOldRemove=a,o.belongsToShim=n,t.removeEventListener=o}}e.exports=function(e,n,r){if(e){var i,a,o=`EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDB
160Request,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload`.split(`,`);for(i=0;i<o.length;++i)e[a=o[i]]&&e[a].prototype&&t(n,e[a].prototype,r)}}},435:(e,t,n)=>{e.exports=n(538)},440:(e,t,n)=>{var r=n(539),i=n(306);function a(e,t){var n=Error(e);return n.code=t||`ENOTFOUND`,n}e.exports=function(e,t,n,o,c,u,K){var Y;if(!(Y=u?u():function(){var e,t,n=[function(){return new XMLHttpRequest},function(){return new ActiveXObject(`Msxml2.XMLHTTP`)},function(){return new ActiveXObject(`Msxml3.XMLHTTP`)},function(){return new ActiveXObject(`Microsoft.XMLHTTP`)}],r=n.length;for(t=0;t<r;t++)try{e=n[t]();break}catch{}return e}()))return c(Error(`No way to send a request`));try{try{var X=function(){try{if(X&&Y.readyState===4){X=void 0;var e=r.jsonParse(Y.responseText);if((n=Y)&&n.status&&n.status===200)return void c(e.error,e.value);if(function(e){return e&&r.isType(e.status,`number`)&&e.status>=400&&e.status<600}(Y)){if(Y.status===403){var t=e.value&&e.value.message;i.error(t)}c(Error(String(Y.status)))}else c(a(`XHR response had no status code (likely connection failure)`))}}catch(e){c(e&&e.stack?e:Error(e))}var n};Y.open(n,t,!0),Y.setRequestHeader&&(Y.setRequestHeader(`Content-Type`,`application/json`),Y.setRequestHeader(`X-Rollbar-Access-Token`,e)),r.isFiniteNumber(K)&&(Y.timeout=K),Y.onreadystatechange=X,Y.send(o)}catch{if(typeof XDomainRequest<`u`){if(!window||!window.location)return c(Error(`No window available during request, unknown environment`));window.location.href.substring(0,5)===`http:`&&t.substring(0,5)===`https`&&(t=`http`+t.substring(5));var ee=new XDomainRequest;ee.onprogress=function(){},ee.ontimeout=function(){c(a(`Request timed out`,`ETIMEDOUT`))},ee.onerror=function(){c(Error(`Error during request`))},ee.onload=function(){var e=r.jsonParse(ee.responseText);c(e.error,e.value)},ee.open(n,t,!0),ee.send(o)}else c(Error(`Cannot find a method to transport a request`))}}catch(e){c(e)}}},441:e=>{e.exports={version:`2.26.5`,endpoint:`api.rollbar.com/api/1/item/`,logLevel:`debug`,reportLevel:`debug`,uncaughtErrorLevel:`error`,maxItems:0,itemsPerMin:60}},497:(e,t,n)=>{var r=n(539),i=n(534),a=n(440);function o(e){this.truncation=e}o.prototype.get=function(e,t,n,i,a){i&&r.isFunction(i)||(i=function(){}),r.addParamsAndAccessTokenToPath(e,t,n);var o=r.formatUrl(t);this._makeZoneRequest(e,o,`GET`,null,i,a,t.timeout,t.transport)},o.prototype.post=function(e,t,n,i,a){if(i&&r.isFunction(i)||(i=function(){}),!n)return i(Error(`Cannot send empty request`));var o;if((o=this.truncation?this.truncation.truncate(n):r.stringify(n)).error)return i(o.error);var c=o.value,u=r.formatUrl(t);this._makeZoneRequest(e,u,`POST`,c,i,a,t.timeout,t.transport)},o.prototype.postJsonPayload=function(e,t,n,i,a){i&&r.isFunction(i)||(i=function(){});var o=r.formatUrl(t);this._makeZoneRequest(e,o,`POST`,n,i,a,t.timeout,t.transport)},o.prototype._makeZoneRequest=function(){var e=typeof window<`u`&&window||r!==void 0&&r,t=e&&e.Zone&&e.Zone.root,n=Array.prototype.slice.call(arguments);if(t){var r=this;t.run((function(){r._makeRequest.apply(void 0,n)}))}else this._makeRequest.apply(void 0,n)},o.prototype._makeRequest=function(e,t,n,r,o,c,u,K){if(typeof RollbarProxy<`u`)return function(e,t){new RollbarProxy().sendJsonPayload(e,(function(e){}),(function(e){t(Error(e))}))}(r,o);K===`fetch`?i(e,t,n,r,o,u):a(e,t,n,r,o,c,u)},e.exports=o},513:(e,t,n)=>{var r=n(539);function i(e){this.startTime=r.now(),this.counter=0,this.perMinCounter=0,this.platform=null,this.platformOptions={},this.configureGlobal(e)}function a(e,t,n){return!e.ignoreRateLimit&&t>=1&&n>t}function o(e,t,n,r,i,a,o){var c=null;return n&&=Error(n),n||r||(c=function(e,t,n,r,i){var a=t.environment||t.payload&&t.payload.environment,o={body:{message:{body:i?`item per minute limit reached, ignoring errors until timeout`:`maxItems has been hit, ignoring errors until reset.`,extra:{maxItems:n,itemsPerMinute:r}}},language:`javascript`,environment:a,notifier:{version:t.notifier&&t.notifier.version||t.version}};return e===`browser`?(o.platform=`browser`,o.framework=`browser-js`,o.notifier.name=`rollbar-browser-js`):e===`server`?(o.framework=t.framework||`node-js`,o.notifier.name=t.notifier.name):e===`react-native`&&(o.framework=t.framework||`react-native`,o.notifier.name=t.notifier.name),o}
160(e,t,i,a,o)),{error:n,shouldSend:r,payload:c}}i.globalSettings={startTime:r.now(),maxItems:void 0,itemsPerMinute:void 0},i.prototype.configureGlobal=function(e){e.startTime!==void 0&&(i.globalSettings.startTime=e.startTime),e.maxItems!==void 0&&(i.globalSettings.maxItems=e.maxItems),e.itemsPerMinute!==void 0&&(i.globalSettings.itemsPerMinute=e.itemsPerMinute)},i.prototype.shouldSend=function(e,t){var n=(t||=r.now())-this.startTime;(n<0||n>=6e4)&&(this.startTime=t,this.perMinCounter=0);var c=i.globalSettings.maxItems,u=i.globalSettings.itemsPerMinute;if(a(e,c,this.counter))return o(this.platform,this.platformOptions,c+` max items reached`,!1);if(a(e,u,this.perMinCounter))return o(this.platform,this.platformOptions,u+` items per minute reached`,!1);this.counter++,this.perMinCounter++;var K=!a(e,c,this.counter),Y=K;return K&&=!a(e,u,this.perMinCounter),o(this.platform,this.platformOptions,null,K,c,u,Y)},i.prototype.setPlatformOptions=function(e,t){this.platform=e,this.platformOptions=t},e.exports=i},534:(e,t,n)=>{var r=n(306),i=n(539);e.exports=function(e,t,n,a,o,c){var u,K;i.isFiniteNumber(c)&&(u=new AbortController,K=setTimeout((function(){u.abort()}),c)),fetch(t,{method:n,headers:{"Content-Type":`application/json`,"X-Rollbar-Access-Token":e,signal:u&&u.signal},body:a}).then((function(e){return K&&clearTimeout(K),e.json()})).then((function(e){o(null,e)})).catch((function(e){r.error(e.message),o(e)}))}},537:e=>{e.exports={scrubFields:`pw.pass.passwd.password.secret.confirm_password.confirmPassword.password_confirmation.passwordConfirmation.access_token.accessToken.X-Rollbar-Access-Token.secret_key.secretKey.secretToken.cc-number.card number.cardnumber.cardnum.ccnum.ccnumber.cc num.creditcardnumber.credit card number.newcreditcardnumber.new credit card.creditcardno.credit card no.card#.card #.cc-csc.cvc.cvc2.cvv2.ccv2.security code.card verification.name on credit card.name on card.nameoncard.cardholder.card holder.name des karteninhabers.ccname.card type.cardtype.cc type.cctype.payment type.expiration date.expirationdate.expdate.cc-exp.ccmonth.ccyear`.split(`.`)}},538:e=>{e.exports=function(e){var t,n,r,i,a,o,c,u,K,Y,X,ee,te,ce=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function ue(e){return e<10?`0`+e:e}function de(){return this.valueOf()}function fe(e){return ce.lastIndex=0,ce.test(e)?`"`+e.replace(ce,(function(e){var t=r[e];return typeof t==`string`?t:`\\u`+(`0000`+e.charCodeAt(0).toString(16)).slice(-4)}))+`"`:`"`+e+`"`}function me(e,r){var a,o,c,u,K,Y=t,X=r[e];switch(X&&typeof X==`object`&&typeof X.toJSON==`function`&&(X=X.toJSON(e)),typeof i==`function`&&(X=i.call(r,e,X)),typeof X){case`string`:return fe(X);case`number`:return isFinite(X)?String(X):`null`;case`boolean`:case`null`:return String(X);case`object`:if(!X)return`null`;if(t+=n,K=[],Object.prototype.toString.apply(X)===`[object Array]`){for(u=X.length,a=0;a<u;a+=1)K[a]=me(a,X)||`null`;return c=K.length===0?`[]`:t?`[
161`+t+K.join(`,
162`+t)+`
163`+Y+`]`:`[`+K.join(`,`)+`]`,t=Y,c}if(i&&typeof i==`object`)for(u=i.length,a=0;a<u;a+=1)typeof i[a]==`string`&&(c=me(o=i[a],X))&&K.push(fe(o)+(t?`: `:`:`)+c);else for(o in X)Object.prototype.hasOwnProperty.call(X,o)&&(c=me(o,X))&&K.push(fe(o)+(t?`: `:`:`)+c);return c=K.length===0?`{}`:t?`{
164`+t+K.join(`,
165`+t)+`
166`+Y+`}`:`{`+K.join(`,`)+`}`,t=Y,c}}typeof Date.prototype.toJSON!=`function`&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+`-`+ue(this.getUTCMonth()+1)+`-`+ue(this.getUTCDate())+`T`+ue(this.getUTCHours())+`:`+ue(this.getUTCMinutes())+`:`+ue(this.getUTCSeconds())+`Z`:null},Boolean.prototype.toJSON=de,Number.prototype.toJSON=de,String.prototype.toJSON=de),typeof e.stringify!=`function`&&(r={"\b":`\\b`,"	":`\\t`,"\n":`\\n`,"\f":`\\f`,"\r":`\\r`,'"':`\\"`,"\\":`\\\\`},e.stringify=function(e,r,a){var o;if(t=``,n=``,typeof a==`number`)for(o=0;o<a;o+=1)n+=` `;else typeof a==`string`&&(n=a);if(i=r,r&&typeof r!=`function`&&(typeof r!=`object`||typeof r.length!=`number`))throw Error(`JSON.stringify`);return me(``,{"":e})}),typeof e.parse!=`function`&&(e.parse=(Y={"\\":`\\`,'"':`"`,"/":`/`,t:`	`,n:`
167`,r:`\r`,f:`\f`,b:`\b`},X={go:function(){a=`ok`},firstokey:function(){u=K,a=`colon`},okey:function(){u=K,a=`colon`},ovalue:function(){a=`ocomma`},firstavalue:function(){a=`acomma`},avalue:function(){a=`acomma`}},ee={go:function(){a=`ok`},ovalue:function(){a=`ocomma`},firstavalue:function(){a=`acomma`},avalue:function(){a=`acomma`}},te={"{":{go:function(){o.push({state:`ok`}),c={},a=`firstokey`},ovalue:function(){o.push({container:c,state:`ocomma`,key:u}),c={},a=`firstokey`},firstavalue:function(){o.push({container:c,state:`acomma`}),c={},a=`firstokey`},avalue:function(){o.push({container:c,state:`acomma`}),c={},a=`firstokey`}},"}":{firstokey:function(){var e=o.pop();K=c,c=e.container,u=e.key,a=e.state},ocomma:function(){var e=o.pop();c[u]=K,K=c,c=e.container,u=e.key,a=e.state}},"[":{go:function(){o.push({state:`ok`}),c=[],a=`firstavalue`},ovalue:function(){o.push({container:c,state:`ocomma`,key:u}),c=[],a=`firstavalue`},firstavalue:function(){o.push({container:c,state:`acomma`}),c=[],a=`firstavalue`},avalue:function(){o.push({container:c,state:`acomma`}),c=[],a=`firstavalue`}},"]":{firstavalue:function(){var e=o.pop();K=c,c=e.container,u=e.key,a=e.state},acomma:function(){var e=o.pop();c.push(K),K=c,c=e.container,u=e.key,a=e.state}},":":{colon:function(){if(Object.hasOwnProperty.call(c,u))throw SyntaxError(`Duplicate key '`+u+`"`);a=`ovalue`}},",":{ocomma:function(){c[u]=K,a=`okey`},acomma:function(){c.push(K),a=`avalue`}},true:{go:function(){K=!0,a=`ok`},ovalue:function(){K=!0,a=`ocomma`},firstavalue:function(){K=!0,a=`acomma`},avalue:function(){K=!0,a=`acomma`}},false:{go:function(){K=!1,a=`ok`},ovalue:function(){K=!1,a=`ocomma`},firstavalue:function(){K=!1,a=`acomma`},avalue:function(){K=!1,a=`acomma`}},null:{go:function(){K=null,a=`ok`},ovalue:function(){K=null,a=`ocomma`},firstavalue:function(){K=null,a=`acomma`},avalue:function(){K=null,a=`acomma`}}},function(e,t){var n,r,i=/^[\u0020\t\n\r]*(?:([,:\[\]{}]|true|false|null)|(-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)|"((?:[^\r\n\t\\\"]|\\(?:["\\\/trnfb]|u[0-9a-fA-F]{4}))*)")/;a=`go`,o=[];try{for(;n=i.exec(e);)n[1]?te[n[1]][a]():n[2]?(K=+n[2],ee[a]()):(r=n[3],K=r.replace(/\\(?:u(.{4})|([^u]))/g,(function(e,t,n){return t?String.fromCharCode(parseInt(t,16)):Y[n]})),X[a]()),e=e.slice(n[0].length)}catch(e){a=e}if(a!==`ok`||/[^\u0020\t\n\r]/.test(e))throw a instanceof SyntaxError?a:SyntaxError(`JSON`);return typeof t==`function`?function e(n,r){var i,a,o=n[r];if(o&&typeof o==`object`)for(i in K)Object.prototype.hasOwnProperty.call(o,i)&&((a=e(o,i))===void 0?delete o[i]:o[i]=a);return t.call(n,r,o)}({"":K},``):K}))}}
167,539:(e,t,n)=>{var r=n(215),i={};function a(e,t){return t===o(e)}function o(e){var t=typeof e;return t===`object`?e?e instanceof Error?`error`:{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase():`null`:t}function c(e){return a(e,`function`)}function u(e){var t=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`),n=RegExp(`^`+t+`$`);return K(e)&&n.test(e)}function K(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function Y(){var e=me();return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(t===`x`?n:7&n|8).toString(16)}))}var X={strictMode:!1,key:[`source`,`protocol`,`authority`,`userInfo`,`user`,`password`,`host`,`port`,`relative`,`path`,`directory`,`file`,`query`,`anchor`],q:{name:`queryKey`,parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function ee(e,t){var n,r;try{n=i.stringify(e)}catch(i){if(t&&c(t))try{n=t(e)}catch(e){r=e}else r=i}return{error:r,value:n}}function te(e,t){return function(n,r){try{t(n,r)}catch(t){e.error(t)}}}function ce(e){return function e(t,n){var r,i,c,u={};try{for(i in t)(r=t[i])&&(a(r,`object`)||a(r,`array`))?n.includes(r)?u[i]=`Removed circular reference: `+o(r):((c=n.slice()).push(r),u[i]=e(r,c)):u[i]=r}catch(e){u=`Failed cloning custom data: `+e.message}return u}(e,[e])}var ue=[`log`,`network`,`dom`,`navigation`,`error`,`manual`],de=[`critical`,`error`,`warning`,`info`,`debug`];function fe(e,t){for(var n=0;n<e.length;++n)if(e[n]===t)return!0;return!1}function me(){return Date.now?+Date.now():+new Date}e.exports={addParamsAndAccessTokenToPath:function(e,t,n){(n||={}).access_token=e;var r,i=[];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&i.push([r,n[r]].join(`=`));var a=`?`+i.sort().join(`&`);(t||={}).path=t.path||``;var o,c=t.path.indexOf(`?`),u=t.path.indexOf(`#`);c!==-1&&(u===-1||u>c)?(o=t.path,t.path=o.substring(0,c)+a+`&`+o.substring(c+1)):u===-1?t.path+=a:(o=t.path,t.path=o.substring(0,u)+a+o.substring(u))},createItem:function(e,t,n,r,i){for(var a,c,u,K,X,ee,ue=[],de=[],fe=0,ge=e.length;fe<ge;++fe){var Te=o(ee=e[fe]);switch(de.push(Te),Te){case`undefined`:break;case`string`:a?ue.push(ee):a=ee;break;case`function`:K=te(t,ee);break;case`date`:ue.push(ee);break;case`error`:case`domexception`:case`exception`:c?ue.push(ee):c=ee;break;case`object`:case`array`:if(ee instanceof Error||typeof DOMException<`u`&&ee instanceof DOMException){c?ue.push(ee):c=ee;break}if(r&&Te===`object`&&!X){for(var Oe=0,Ae=r.length;Oe<Ae;++Oe)if(ee[r[Oe]]!==void 0){X=ee;break}if(X)break}u?ue.push(ee):u=ee;break;default:if(ee instanceof Error||typeof DOMException<`u`&&ee instanceof DOMException){c?ue.push(ee):c=ee;break}ue.push(ee)}}u&&=ce(u),ue.length>0&&(u||=ce({}),u.extraArgs=ce(ue));var ze={message:a,err:c,custom:u,timestamp:me(),callback:K,notifier:n,diagnostic:{},uuid:Y()};return function(e,t){t&&t.level!==void 0&&(e.level=t.level,delete t.level),t&&t.skipFrames!==void 0&&(e.skipFrames=t.skipFrames,delete t.skipFrames)}(ze,u),r&&X&&(ze.request=X),i&&(ze.lambdaContext=i),ze._originalArgs=e,ze.diagnostic.original_arg_types=de,ze},addErrorContext:function(e,t){var n=e.data.custom||{},i=!1;try{for(var a=0;a<t.length;++a)t[a].hasOwnProperty(`rollbarContext`)&&(n=r(n,ce(t[a].rollbarContext)),i=!0);i&&(e.data.custom=n)}catch(t){e.diagnostic.error_context=`Failed: `+t.message}},createTelemetryEvent:function(e){for(var t,n,r,i,a=0,c=e.length;a<c;++a)switch(o(i=e[a])){case`string`:!t&&fe(ue,i)?t=i:!r&&fe(de,i)&&(r=i);break;case`object`:n=i}return{type:t||`manual`,metadata:n||{},level:r}},filterIp:function(e,t){if(e&&e.user_ip&&!0!==t){var n=e.user_ip;if(t)try{var r;if(n.indexOf(`.`)!==-1)(r=n.split(`.`)).pop(),r.push(`0`),n=r.join(`.`);else if(n.indexOf(`:`)!==-1){if((r=n.split(`:`)).length>2){var i=r.slice(0,3),a=i[2].indexOf(`/`);a!==-1&&(i[2]=i[2].substring(0,a)),n=i.concat(`0000:0000:0000:0000:0000`).join(`:`)}}else n=null}catch{n=null}else n=null;e.user_ip=n}},formatArgsAsString:function(e){var t,n,r,i=[];for(t=0,n=e.length;t<n;++t){switch(o(r=e[t])){case`object`:(r=(r=ee(r)).error||r.value).length>500&&(r=r.substr(0,497)+`...`);break;case`null`:r=`null`;break;case`undefined`:r=`undefined`;break;case`symbol`:r=r.toString()}i.push(r)}return i.join(` `)},formatUrl:function(e,t){if(!(t||=e.protocol)&&e.port&&(e.port===80?t=`http:`:e.port===443&&(t=`https:`)),t||=`https:`,!e.hostname)return null;var n=t+`//`+e.hostname;return e.port&&(n=n+`:`+e.port),e.path&&(n+=e.path),n},get:function(e,t){if(e){var n=t.split(`.`),r=e;try{for(var i=0,a=n.length;i<a;++i)r=r[n[i]]}catch{r=void 0}return r}},handleOptions:function(e,t,n,i){var a=r(e,t,n);return a=function(e,t){return e.hostWhiteList&&!e.hostSafeList&&(e.hostSafeList=e.hostWhiteList,e.hostWhiteList=void 0,t&&t.log(`hostWhiteList is deprecated. Use hostSafeList.`)),e.hostBlackList&&!e.hostBlockList&&(e.hostBlockList=e.hostBlackList,e.hostBlackList=void 0,t&&t.log(`hostBlackList is deprecated. Use hostBlockList.`)),e}(a,i),!t||t.overwriteScrubFields||t.scrubFields&&(a.scrubFields=(e.scrubFields||[]).concat(t.scrubFields)),a},isError:function(e){return a(e,`error`)||a(e,`exception`)},isFiniteNumber:function(e){return Number.isFinite(e)},isFunction:c,isIterable:function(e){var t=o(e);return t===`object`||t===`array`},isNativeFunction:u,isObject:K,isString:function(e){return typeof e==`string`||e instanceof String},isType:a,isPromise:function(e){return K(e)&&a(e.then,`function`)},jsonParse:function(e){var t,n;try{t=i.parse(e)}catch(e){n=e}return{error:n,value:t}},LEVELS:{debug:0,info:1,warning:2,error:3,critical:4},makeUnhandledStackInfo:function(e,t,n,r,i,a,o,c){var u={url:t||``,line:n,column:r};u.func=c.guessFunctionName(u.url,u.line),u.context=c.gatherContext(u.url,u.line);var K=typeof document<`u`&&document&&document.location&&document.location.href,Y=typeof window<`u`&&window&&window.navigator&&window.navigator.userAgent;return{mode:a,message:i?String(i):e||o,url:K,stack:[u],useragent:Y}},merge:r,now:me,redact:function(){return`********`},RollbarJSON:i,sanitizeUrl:function(e){var t=function(e){if(a(e,`string`)){for(var t=X,n=t.parser[t.strictMode?`strict`:`loose`].exec(e),r={},i=0,o=t.key.length;i<o;++i)r[t.key[i]]=n[i]||``;return r[t.q.name]={},r[t.key[12]].replace(t.q.parser,(function(e,n,i){n&&(r[t.q.name][n]=i)})),r}}(e);return t?(t.anchor===``&&(t.source=t.source.replace(`#`,``)),e=t.source.replace(`?`+t.query,``)):`(unknown)`},set:function(e,t,n){if(e){Object.setPrototypeOf(e,null);var r=t.split(`.`),i=r.length;
167if(!(i<1)){if(i!==1)try{for(var a=e[r[0]]||{},o=a,c=1;c<i-1;++c)a[r[c]]=a[r[c]]||{},a=a[r[c]];a[r[i-1]]=n,e[r[0]]=o}catch{return}else e[r[0]]=n}}},setupJSON:function(e){c(i.stringify)&&c(i.parse)||(a(JSON,`undefined`)||(e?(u(JSON.stringify)&&(i.stringify=JSON.stringify),u(JSON.parse)&&(i.parse=JSON.parse)):(c(JSON.stringify)&&(i.stringify=JSON.stringify),c(JSON.parse)&&(i.parse=JSON.parse))),c(i.stringify)&&c(i.parse)||e&&e(i))},stringify:ee,maxByteSize:function(e){for(var t=0,n=e.length,r=0;r<n;r++){var i=e.charCodeAt(r);i<128?t+=1:i<2048?t+=2:i<65536&&(t+=3)}return t},typeName:o,uuid4:Y}},554:(e,t,n)=>{var r=n(944),i=typeof window<`u`&&window._rollbarConfig,a=i&&i.globalAlias||`Rollbar`,o=typeof window<`u`&&window[a]&&typeof window[a].shimId==`function`&&window[a].shimId()!==void 0;if(typeof window>`u`||window._rollbarStartTime||(window._rollbarStartTime=new Date().getTime()),!o&&i){var c=new r(i);window[a]=c}else typeof window<`u`?(window.rollbar=r,window._rollbarDidLoad=!0):typeof self<`u`&&(self.rollbar=r,self._rollbarDidLoad=!0);e.exports=r},581:(e,t,n)=>{var r=n(539);function i(e,t,n){if(!e)return!n;var i,a,o=e.frames;if(!o||o.length===0)return!n;for(var c=t.length,u=o.length,K=0;K<u;K++){if(i=o[K].filename,!r.isType(i,`string`))return!n;for(var Y=0;Y<c;Y++)if(a=t[Y],new RegExp(a).test(i))return!0}return!1}function a(e,t,n,a){var o,c,u=!1;n===`blocklist`&&(u=!0);try{if(o=u?t.hostBlockList:t.hostSafeList,c=r.get(e,`body.trace_chain`)||[r.get(e,`body.trace`)],!o||o.length===0||c.length===0||!c[0])return!u;for(var K=c.length,Y=0;Y<K;Y++)if(i(c[Y],o,u))return!0}catch(e){u?t.hostBlockList=null:t.hostSafeList=null;var X=u?`hostBlockList`:`hostSafeList`;return a.error(`Error while reading your configuration's `+X+` option. Removing custom `+X+`.`,e),!u}return!1}e.exports={checkLevel:function(e,t){var n=e.level,i=r.LEVELS[n]||0,a=t.reportLevel;return!(i<(r.LEVELS[a]||0))},userCheckIgnore:function(e){return function(t,n){var i=!!t._isUncaught;delete t._isUncaught;var a=t._originalArgs;delete t._originalArgs;try{r.isFunction(n.onSendCallback)&&n.onSendCallback(i,a,t)}catch(t){n.onSendCallback=null,e.error(`Error while calling onSendCallback, removing`,t)}try{if(r.isFunction(n.checkIgnore)&&n.checkIgnore(i,a,t))return!1}catch(t){n.checkIgnore=null,e.error(`Error while calling custom checkIgnore(), removing`,t)}return!0}},urlIsNotBlockListed:function(e){return function(t,n){return!a(t,n,`blocklist`,e)}},urlIsSafeListed:function(e){return function(t,n){return a(t,n,`safelist`,e)}},messageIsIgnored:function(e){return function(t,n){var i,a,o,c,u,K;try{if(!(o=n.ignoredMessages)||o.length===0||(K=function(e){var t=e.body,n=[];if(t.trace_chain)for(var i=t.trace_chain,a=0;a<i.length;a++){var o=i[a];n.push(r.get(o,`exception.message`))}return t.trace&&n.push(r.get(t,`trace.exception.message`)),t.message&&n.push(r.get(t,`message.body`)),n}(t),K.length===0))return!0;for(c=o.length,i=0;i<c;i++)for(u=new RegExp(o[i],`gi`),a=0;a<K.length;a++)if(u.test(K[a]))return!1}catch{n.ignoredMessages=null,e.error(`Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.`)}return!0}}}},584:(e,t,n)=>{var r=n(539);e.exports={checkIgnore:function(e,t){return!r.get(t,`plugins.jquery.ignoreAjaxErrors`)||!r.get(e,`body.message.extra.isAjax`)}}},683:(e,t,n)=>{var r=n(539),i=n(974),a=n(364),o=n(356),c=n(61),u=n(790),K={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function Y(e,t){for(var n;e[t].length;)(n=e[t].shift())[0][n[1]]=n[2]}function X(e,t,n,i,a){this.options=e;var o=e.autoInstrument;!1===e.enabled||!1===o?this.autoInstrument={}:(r.isType(o,`object`)||(o=K),this.autoInstrument=r.merge(K,o)),this.scrubTelemetryInputs=!!e.scrubTelemetryInputs,this.telemetryScrubber=e.telemetryScrubber,this.defaultValueScrubber=function(e){for(var t=[],n=0;n<e.length;++n)t.push(new RegExp(e[n],`i`));return function(e){var n=function(e){if(!e||!e.attributes)return null;for(var t=e.attributes,n=0;n<t.length;++n)if(t[n].key===`name`)return t[n].value;return null}(e);if(!n)return!1;for(var r=0;r<t.length;++r)if(t[r].test(n))return!0;return!1}}(e.scrubFields),this.telemeter=t,this.rollbar=n,this.diagnostic=n.client.notifier.diagnostic,this._window=i||{},this._document=a||{},this.replacements={network:[],log:[],navigation:[],connectivity:[]},this.eventRemovers={dom:[],connectivity:[],contentsecuritypolicy:[]},this._location=this._window.location,this._lastHref=this._location&&this._location.href}function ee(e){return typeof URL<`u`&&e instanceof URL}X.prototype.configure=function(e){this.options=r.merge(this.options,e);var t=e.autoInstrument,n=r.merge(this.autoInstrument);!1===e.enabled||!1===t?this.autoInstrument={}:(r.isType(t,`object`)||(t=K),this.autoInstrument=r.merge(K,t)),this.instrument(n),e.scrubTelemetryInputs!==void 0&&(this.scrubTelemetryInputs=!!e.scrubTelemetryInputs),e.telemetryScrubber!==void 0&&(this.telemetryScrubber=e.telemetryScrubber)},X.prototype.instrument=function(e){!this.autoInstrument.network||e&&e.network?!this.autoInstrument.network&&e&&e.network&&this.deinstrumentNetwork():this.instrumentNetwork(),!this.autoInstrument.log||e&&e.log?!this.autoInstrument.log&&e&&e.log&&this.deinstrumentConsole():this.instrumentConsole(),!this.autoInstrument.dom||e&&e.dom?!this.autoInstrument.dom&&e&&e.dom&&this.deinstrumentDom():this.instrumentDom(),!this.autoInstrument.navigation||e&&e.navigation?!this.autoInstrument.navigation&&e&&e.navigation&&this.deinstrumentNavigation():this.instrumentNavigation(),!this.autoInstrument.connectivity||e&&e.connectivity?!this.autoInstrument.connectivity&&e&&e.connectivity&&this.deinstrumentConnectivity():this.instrumentConnectivity(),!this.autoInstrument.contentSecurityPolicy||e&&e.contentSecurityPolicy?!this.autoInstrument.contentSecurityPolicy&&e&&e.contentSecurityPolicy&&this.deinstrumentContentSecurityPolicy():this.instrumentContentSecurityPolicy()},X.prototype.deinstrumentNetwork=function(){Y(this.replacements,`network`)},X.prototype.instrumentNetwork=function(){var e=this;function t(t,n){t in n&&r.isFunction(n[t])&&a(n,t,(function(t){return e.rollbar.wrap(t)}))}if(`XMLHttpRequest`in this._window){var n=this._window.XMLHttpRequest.prototype;a(n,`open`,(function(e){return function(t,n){var i=ee(n);return(r.isType(n,`string`)||i)&&(n=i?n.toString():n,this.__rollbar_xhr?(this.__rollbar_xhr.method=t,this.__rollbar_xhr.url=n,this.__rollbar_xhr.status_code=null,this.__rollbar_xhr.start_time_ms=r.now(),this.__rollbar_xhr.end_time_ms=null):this.__rollbar_xhr={method:t,url:n,status_code:null,start_time_ms:r.now(),end_time_ms:null}),e.apply(this,arguments)}}),this.replacements,`network`),a(n,`setRequestHeader`,(function(t){return function(n,i){return this.__rollbar_xhr||={},r.isType(n,`string`)&&r.isType(i,`string`)&&(e.autoInstrument.networkRequestHeaders&&(this.__rollbar_xhr.request_headers||(this.__rollbar_xhr.request_headers={}),this.__rollbar_xhr.request_headers[n]=i),n.toLowerCase()===`content-type`&&(this.__rollbar_xhr.request_content_type=i)),t.apply(this,arguments)}}),this.replacements,`network`),a(n,`send`,(function(n){return function(i){var o=this;function c(){if(o.__rollbar_xhr&&(o.__rollbar_xhr.status_code===null&&(o.__rollbar_xhr.status_code=0,e.autoInstrument.networkRequestBody&&(o.__rollbar_xhr.request=i),o.__rollbar_event=e.captureNetwork(o.__rollbar_xhr,`xhr`,void 0)),o.readyState<2&&(o.__rollbar_xhr.start_time_ms=r.now()),o.readyState>3)){o.__rollbar_xhr.end_time_ms=r.now();var t=null;if(o.__rollbar_xhr.response_content_type=o.getResponseHeader(`Content-Type`),e.autoInstrument.networkResponseHeaders){var n=e.autoInstrument.networkResponseHeaders;t={};try{var a,c;if(!0===n){var u=o.getAllResponseHeaders();if(u){var K,Y,X=u.trim().split(/[\r\n]+/);for(c=0;c<X.length;c++)a=(K=X[c].split(`: `)).shift(),Y=K.join(`: `),t[a]=Y}}else for(c=0;c<n.length;c++)t[a=n[c]]=o.getResponseHeader(a)}catch{}}var ee=null;if(e.autoInstrument.networkResponseBody)try{ee=o.responseText}catch{}var te=null;(ee||t)&&(te={},ee&&(e.isJsonContentType(o.__rollbar_xhr.response_content_type)?te.body=e.scrubJson(ee):te.body=ee),t&&(te.headers=t)),te&&(o.__rollbar_xhr.response=te);try{var ce=o.status;ce=ce===1223?204:ce,o.__rollbar_xhr.status_code=ce,o.__rollbar_event.level=e.telemeter.levelFromStatus(ce),e.errorOnHttpStatus(o.__rollbar_xhr)}catch{}}}return t(`onload`,o),t(`onerror`,o),t(`onprogress`,o),`onreadystatechange`in o&&r.isFunction(o.onreadystatechange)?a(o,`onreadystatechange`,(function(t){return e.rollbar.wrap(t,void 0,c)})):o.onreadystatechange=c,o.__rollbar_xhr&&e.trackHttpErrors()&&(o.__rollbar_xhr.stack=Error().stack),n.apply(this,arguments)}}),this.replacements,`network`)}`fetch`in this._window&&a(this._window,`fetch`,(function(t){return function(n,a){for(var o=Array(arguments.length),c=0,u=o.length;c<u;c++)o[c]=arguments[c];var K,Y=o[0],X=`GET`,te=ee(Y);r.isType(Y,`string`)||te?K=te?Y.toString():Y:Y&&(K=Y.url,Y.method&&(X=Y.method)),o[1]&&o[1].method&&(X=o[1].method);var ce={method:X,url:K,status_code:null,start_time_ms:r.now(),end_time_ms:null};if(o[1]&&o[1].headers){var ue=i(o[1].headers);ce.request_content_type=ue.get(`Content-Type`),e.autoInstrument.networkRequestHeaders&&(ce.request_headers=e.fetchHeaders(ue,e.autoInstrument.networkRequestHeaders))}return e.autoInstrument.networkRequestBody&&(o[1]&&o[1].body?ce.request=o[1].body:o[0]&&
167!r.isType(o[0],`string`)&&o[0].body&&(ce.request=o[0].body)),e.captureNetwork(ce,`fetch`,void 0),e.trackHttpErrors()&&(ce.stack=Error().stack),t.apply(this,o).then((function(t){ce.end_time_ms=r.now(),ce.status_code=t.status,ce.response_content_type=t.headers.get(`Content-Type`);var n=null;e.autoInstrument.networkResponseHeaders&&(n=e.fetchHeaders(t.headers,e.autoInstrument.networkResponseHeaders));var i=null;return e.autoInstrument.networkResponseBody&&typeof t.text==`function`&&(i=t.clone().text()),(n||i)&&(ce.response={},i&&(typeof i.then==`function`?i.then((function(t){t&&e.isJsonContentType(ce.response_content_type)?ce.response.body=e.scrubJson(t):ce.response.body=t})):ce.response.body=i),n&&(ce.response.headers=n)),e.errorOnHttpStatus(ce),t}))}}),this.replacements,`network`)},X.prototype.captureNetwork=function(e,t,n){return e.request&&this.isJsonContentType(e.request_content_type)&&(e.request=this.scrubJson(e.request)),this.telemeter.captureNetwork(e,t,n)},X.prototype.isJsonContentType=function(e){return!!(e&&r.isType(e,`string`)&&e.toLowerCase().includes(`json`))},X.prototype.scrubJson=function(e){return JSON.stringify(o(JSON.parse(e),this.options.scrubFields))},X.prototype.fetchHeaders=function(e,t){var n={};try{var r;if(!0===t){if(typeof e.entries==`function`)for(var i=e.entries(),a=i.next();!a.done;)n[a.value[0]]=a.value[1],a=i.next()}else for(r=0;r<t.length;r++){var o=t[r];n[o]=e.get(o)}}catch{}return n},X.prototype.trackHttpErrors=function(){return this.autoInstrument.networkErrorOnHttp5xx||this.autoInstrument.networkErrorOnHttp4xx||this.autoInstrument.networkErrorOnHttp0},X.prototype.errorOnHttpStatus=function(e){var t=e.status_code;if(t>=500&&this.autoInstrument.networkErrorOnHttp5xx||t>=400&&this.autoInstrument.networkErrorOnHttp4xx||t===0&&this.autoInstrument.networkErrorOnHttp0){var n=Error(`HTTP request failed with Status `+t);n.stack=e.stack,this.rollbar.error(n,{skipFrames:1})}},X.prototype.deinstrumentConsole=function(){if(`console`in this._window&&this._window.console.log)for(var e;this.replacements.log.length;)e=this.replacements.log.shift(),this._window.console[e[0]]=e[1]},X.prototype.instrumentConsole=function(){if(`console`in this._window&&this._window.console.log){var e=this,t=this._window.console,n=[`debug`,`info`,`warn`,`error`,`log`];try{for(var i=0,a=n.length;i<a;i++)o(n[i])}catch(e){this.diagnostic.instrumentConsole={error:e.message}}}function o(n){var i=t[n],a=t,o=n===`warn`?`warning`:n;t[n]=function(){var t=Array.prototype.slice.call(arguments),n=r.formatArgsAsString(t);e.telemeter.captureLog(n,o),i&&Function.prototype.apply.call(i,a,t)},e.replacements.log.push([n,i])}},X.prototype.deinstrumentDom=function(){(`addEventListener`in this._window||`attachEvent`in this._window)&&this.removeListeners(`dom`)},X.prototype.instrumentDom=function(){if(`addEventListener`in this._window||`attachEvent`in this._window){var e=this.handleClick.bind(this),t=this.handleBlur.bind(this);this.addListener(`dom`,this._window,`click`,`onclick`,e,!0),this.addListener(`dom`,this._window,`blur`,`onfocusout`,t,!0)}},X.prototype.handleClick=function(e){try{var t=u.getElementFromEvent(e,this._document),n=t&&t.tagName,r=u.isDescribedElement(t,`a`)||u.isDescribedElement(t,`button`);n&&(r||u.isDescribedElement(t,`input`,[`button`,`submit`]))?this.captureDomEvent(`click`,t):u.isDescribedElement(t,`input`,[`checkbox`,`radio`])&&this.captureDomEvent(`input`,t,t.value,t.checked)}catch{}},X.prototype.handleBlur=function(e){try{var t=u.getElementFromEvent(e,this._document);t&&t.tagName&&(u.isDescribedElement(t,`textarea`)?this.captureDomEvent(`input`,t,t.value):u.isDescribedElement(t,`select`)&&t.options&&t.options.length?this.handleSelectInputChanged(t):u.isDescribedElement(t,`input`)&&!u.isDescribedElement(t,`input`,[`button`,`submit`,`hidden`,`checkbox`,`radio`])&&this.captureDomEvent(`input`,t,t.value))}catch{}},X.prototype.handleSelectInputChanged=function(e){if(e.multiple)for(var t=0;t<e.options.length;t++)e.options[t].selected&&this.captureDomEvent(`input`,e,e.options[t].value);else e.selectedIndex>=0&&e.options[e.selectedIndex]&&this.captureDomEvent(`input`,e,e.options[e.selectedIndex].value)},X.prototype.captureDomEvent=function(e,t,n,r){if(n!==void 0){if(this.scrubTelemetryInputs||u.getElementType(t)===`password`)n=`[scrubbed]`;else{var i=u.describeElement(t);this.telemetryScrubber?this.telemetryScrubber(i)&&(n=`[scrubbed]`):this.defaultValueScrubber(i)&&(n=`[scrubbed]`)}}var a=u.elementArrayToString(u.treeToArray(t));this.telemeter.captureDom(e,a,n,r)},X.prototype.deinstrumentNavigation=function(){var e=this._window.chrome;!(e&&e.app&&e.app.runtime)&&this._window.history&&this._window.history.pushState&&Y(this.replacements,`navigation`)},X.prototype.instrumentNavigation=function(){var e=this._window.chrome;if(!(e&&e.app&&e.app.runtime)&&this._window.history&&this._window.history.pushState){var t=this;a(this._window,`onpopstate`,(function(e){return function(){var n=t._location.href;t.handleUrlChange(t._lastHref,n),e&&e.apply(this,arguments)}}),this.replacements,`navigation`),a(this._window.history,`pushState`,(function(e){return function(){var n=arguments.length>2?arguments[2]:void 0;return n&&t.handleUrlChange(t._lastHref,n+``),e.apply(this,arguments)}}),this.replacements,`navigation`)}},X.prototype.handleUrlChange=function(e,t){var n=c.parse(this._location.href),r=c.parse(t),i=c.parse(e);this._lastHref=t,n.protocol===r.protocol&&n.host===r.host&&(t=r.path+(r.hash||``)),n.protocol===i.protocol&&n.host===i.host&&(e=i.path+(i.hash||``)),this.telemeter.captureNavigation(e,t)},X.prototype.deinstrumentConnectivity=function(){(`addEventListener`in this._window||`body`in this._document)&&(this._window.addEventListener?this.removeListeners(`connectivity`):Y(this.replacements,`connectivity`))},X.prototype.instrumentConnectivity=function(){if(`addEventListener`in this._window||`body`in this._document){if(this._window.addEventListener)this.addListener(`connectivity`,this._window,`online`,void 0,function(){this.telemeter.captureConnectivityChange(`online`)}.bind(this),!0),this.addListener(`connectivity`,this._window,`offline`,void 0,function(){this.telemeter.captureConnectivityChange(`offline`)}.bind(this),!0);else{var e=this;a(this._document.body,`ononline`,(function(t){return function(){e.telemeter.captureConnectivityChange(`online`),t&&t.apply(this,arguments)}}),this.replacements,`connectivity`),a(this._document.body,`onoffline`,(function(t){return function(){e.telemeter.captureConnectivityChange(`offline`),t&&t.apply(this,arguments)}}),this.replacements,`connectivity`)}}},X.prototype.handleCspEvent=function(e){var t=`Security Policy Violation: blockedURI: `+e.blockedURI+`, violatedDirective: `+e.violatedDirective+`, effectiveDirective: `+e.effectiveDirective+`, `;e.sourceFile&&(t+=`location: `+e.sourceFile+`, line: `+e.lineNumber+`, col: `+e.columnNumber+`, `),t+=`originalPolicy: `+e.originalPolicy,this.telemeter.captureLog(t,`error`),this.handleCspError(t)},X.prototype.handleCspError=function(e){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(e)},X.prototype.deinstrumentContentSecurityPolicy=function(){`addEventListener`in this._document&&this.removeListeners(`contentsecuritypolicy`)},X.prototype.instrumentContentSecurityPolicy=function(){if(`addEventListener`in this._document){var e=this.handleCspEvent.bind(this);this.addListener(`contentsecuritypolicy`,this._document,`securitypolicyviolation`,null,e,!1)}},X.prototype.addListener=function(e,t,n,r,i,a){t.addEventListener?(t.addEventListener(n,i,a),this.eventRemovers[e].push((function(){t.removeEventListener(n,i,a)}))):r&&(t.attachEvent(r,i),this.eventRemovers[e].push((function(){t.detachEvent(r,i)})))},X.prototype.removeListeners=function(e){for(;this.eventRemovers[e].length;)this.eventRemovers[e].shift()()},e.exports=X},738:function(){(function(e){e.console||={};for(var t,n,r=e.console,i=function(){},a=[`memory`],o=`assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn`.split(`,`);t=a.pop();)r[t]||(r[t]={});for(;n=o.pop();)r[n]||(r[n]=i)})(typeof window>`u`?this:window)},744:(e,t,n)=>{var r=n(539);function i(e,t,n,r){this.rateLimiter=e,this.api=t,this.logger=n,this.options=r,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}i.prototype.configure=function(e){this.api&&this.api.configure(e);var t=this.options;return this.options=r.merge(t,e),this},i.prototype.addPredicate=function(e){return r.isFunction(e)&&this.predicates.push(e),this},i.prototype.addPendingItem=function(e){this.pendingItems.push(e)},i.prototype.removePendingItem=function(e){var t=this.pendingItems.indexOf(e);t!==-1&&this.pendingItems.splice(t,1)},i.prototype.addItem=function(e,t,n,i){t&&r.isFunction(t)||(t=function(){});var a=this._applyPredicates(e);if(a.stop)return this.removePendingItem(i),void t(a.err);if(this._maybeLog(e,n),this.removePendingItem(i),this.options.transmit){this.pendingRequests.push(e);try{this._makeApiRequest(e,function(n,r){this._dequeuePendingRequest(e),t(n,r)}.bind(this))}catch(n){this._dequeuePendingRequest(e),t(n)}}else t(Error(`Transmit disabled`))},i.prototype.wait=function(e){r.isFunction(e)&&(this.waitCallback=e,this._maybeCallWait()||(this.waitIntervalID&&=clearInterval(this.waitIntervalID),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},i.prototype._applyPredicates=function(e){for(var t=null,n=0,r=this.predicates.length;n<r;n++)if(!(t=this.predicates[n](e,this.options))||t.err!==void 0)return{stop:!0,err:t.err};return{stop:!1,err:null}},i.prototype._makeApiRequest=function(e,t){var n=this.rateLimiter.shouldSe
167nd(e);n.shouldSend?this.api.postItem(e,function(n,r){n?this._maybeRetry(n,e,t):t(n,r)}.bind(this)):n.error?t(n.error):this.api.postItem(n.payload,t)};var a=[`ECONNRESET`,`ENOTFOUND`,`ESOCKETTIMEDOUT`,`ETIMEDOUT`,`ECONNREFUSED`,`EHOSTUNREACH`,`EPIPE`,`EAI_AGAIN`];i.prototype._maybeRetry=function(e,t,n){var i=!1;if(this.options.retryInterval){for(var o=0,c=a.length;o<c;o++)if(e.code===a[o]){i=!0;break}i&&r.isFiniteNumber(this.options.maxRetries)&&(t.retries=t.retries?t.retries+1:1,t.retries>this.options.maxRetries&&(i=!1))}i?this._retryApiRequest(t,n):n(e)},i.prototype._retryApiRequest=function(e,t){this.retryQueue.push({item:e,callback:t}),this.retryHandle||=setInterval(function(){for(;this.retryQueue.length;){var e=this.retryQueue.shift();this._makeApiRequest(e.item,e.callback)}}.bind(this),this.options.retryInterval)},i.prototype._dequeuePendingRequest=function(e){var t=this.pendingRequests.indexOf(e);t!==-1&&(this.pendingRequests.splice(t,1),this._maybeCallWait())},i.prototype._maybeLog=function(e,t){if(this.logger&&this.options.verbose){var n=t;if(n=(n||=r.get(e,`body.trace.exception.message`))||r.get(e,`body.trace_chain.0.exception.message`))return void this.logger.error(n);(n=r.get(e,`body.message.body`))&&this.logger.log(n)}},i.prototype._maybeCallWait=function(){return!(!r.isFunction(this.waitCallback)||this.pendingItems.length!==0||this.pendingRequests.length!==0||(this.waitIntervalID&&=clearInterval(this.waitIntervalID),this.waitCallback(),0))},e.exports=i},777:(e,t,n)=>{var r=n(539);function i(e,t){this.queue=e,this.options=t,this.transforms=[],this.diagnostic={}}i.prototype.configure=function(e){this.queue&&this.queue.configure(e);var t=this.options;return this.options=r.merge(t,e),this},i.prototype.addTransform=function(e){return r.isFunction(e)&&this.transforms.push(e),this},i.prototype.log=function(e,t){if(t&&r.isFunction(t)||(t=function(){}),!this.options.enabled)return t(Error(`Rollbar is not enabled`));this.queue.addPendingItem(e);var n=e.err;this._applyTransforms(e,function(r,i){if(r)return this.queue.removePendingItem(e),t(r,null);this.queue.addItem(i,t,n,e)}.bind(this))},i.prototype._applyTransforms=function(e,t){var n=-1,r=this.transforms.length,i=this.transforms,a=this.options,o=function(e,c){e?t(e,null):++n===r?t(null,c):i[n](c,a,o)};o(null,e)},e.exports=i},790:e=>{function t(e){return(e.getAttribute(`type`)||``).toLowerCase()}function n(e){if(!e||!e.tagName)return``;var t=[e.tagName];e.id&&t.push(`#`+e.id),e.classes&&t.push(`.`+e.classes.join(`.`));for(var n=0;n<e.attributes.length;n++)t.push(`[`+e.attributes[n].key+`="`+e.attributes[n].value+`"]`);return t.join(``)}function r(e){if(!e||!e.tagName)return null;var t,n,r,i,a={};a.tagName=e.tagName.toLowerCase(),e.id&&(a.id=e.id),(t=e.className)&&typeof t==`string`&&(a.classes=t.split(/\s+/));var o=[`type`,`name`,`title`,`alt`];for(a.attributes=[],i=0;i<o.length;i++)n=o[i],(r=e.getAttribute(n))&&a.attributes.push({key:n,value:r});return a}e.exports={describeElement:r,descriptionToString:n,elementArrayToString:function(e){for(var t,r,i=[],a=0,o=e.length-1;o>=0;o--){if(t=n(e[o]),r=a+3*i.length+t.length,o<e.length-1&&r>=83){i.unshift(`...`);break}i.unshift(t),a+=t.length}return i.join(` > `)},treeToArray:function(e){for(var t,n=[],i=0;e&&i<5&&(t=r(e)).tagName!==`html`;i++)n.unshift(t),e=e.parentNode;return n},getElementFromEvent:function(e,t){return e.target?e.target:t&&t.elementFromPoint?t.elementFromPoint(e.clientX,e.clientY):void 0},isDescribedElement:function(e,n,r){if(e.tagName.toLowerCase()!==n.toLowerCase())return!1;if(!r)return!0;e=t(e);for(var i=0;i<r.length;i++)if(r[i]===e)return!0;return!1},getElementType:t}},796:e=>{e.exports={captureUncaughtExceptions:function(e,t,n){if(e){var r;if(typeof t._rollbarOldOnError==`function`)r=t._rollbarOldOnError;else if(e.onerror){for(r=e.onerror;r._rollbarOldOnError;)r=r._rollbarOldOnError;t._rollbarOldOnError=r}t.handleAnonymousErrors();var i=function(){var n=Array.prototype.slice.call(arguments,0);(function(e,t,n,r){e._rollbarWrappedError&&=(r[4]||=e._rollbarWrappedError,r[5]||=e._rollbarWrappedError._rollbarContext,null);var i=t.handleUncaughtException.apply(t,r);n&&n.apply(e,r),i===`anonymous`&&(t.anonymousErrorsPending+=1)})(e,t,r,n)};n&&(i._rollbarOldOnError=r),e.onerror=i}},captureUnhandledRejections:function(e,t,n){if(e){typeof e._rollbarURH==`function`&&e._rollbarURH.belongsToShim&&e.removeEventListener(`unhandledrejection`,e._rollbarURH);var r=function(e){var n,r,i;try{n=e.reason}catch{n=void 0}try{r=e.promise}catch{r="[unhandledrejection] error getting `promise` from event"}try{i=e.detail,!n&&i&&(n=i.reason,r=i.promise)}catch{}n||="[unhandledrejection] error getting `reason` from event",t&&t.handleUnhandledRejection&&t.handleUnhandledRejection(n,r)};r.belongsToShim=n,e._rollbarURH=r,e.addEventListener(`unhandledrejection`,r)}}}}
167,888:(e,t,n)=>{var r=n(539),i=n(12);function a(e,t){return[e,r.stringify(e,t)]}function o(e,t){var n=e.length;return n>2*t?e.slice(0,t).concat(e.slice(n-t)):e}function c(e,t,n){n=n===void 0?30:n;var i,a=e.data.body;if(a.trace_chain)for(var c=a.trace_chain,u=0;u<c.length;u++)i=o(i=c[u].frames,n),c[u].frames=i;else a.trace&&(i=o(i=a.trace.frames,n),a.trace.frames=i);return[e,r.stringify(e,t)]}function u(e,t){return t&&t.length>e?t.slice(0,e-3).concat(`...`):t}function K(e,t,n){return t=i(t,(function t(n,a,o){switch(r.typeName(a)){case`string`:return u(e,a);case`object`:case`array`:return i(a,t,o);default:return a}})),[t,r.stringify(t,n)]}function Y(e){return e.exception&&(delete e.exception.description,e.exception.message=u(255,e.exception.message)),e.frames=o(e.frames,1),e}function X(e,t){var n=e.data.body;if(n.trace_chain)for(var i=n.trace_chain,a=0;a<i.length;a++)i[a]=Y(i[a]);else n.trace&&=Y(n.trace);return[e,r.stringify(e,t)]}function ee(e,t){return r.maxByteSize(e)>t}e.exports={truncate:function(e,t,n){n=n===void 0?524288:n;for(var r,i,o,u=[a,c,K.bind(null,1024),K.bind(null,512),K.bind(null,256),X];r=u.shift();)if(e=(i=r(e,t))[0],(o=i[1]).error||!ee(o.value,n))return o;return o},raw:a,truncateFrames:c,truncateStrings:K,maybeTruncateValue:u}},944:(e,t,n)=>{var r=n(197),i=n(352),a=n(683),o=n(435),c=n(424),u=n(356),K=n(888);r.setComponents({telemeter:i,instrumenter:a,polyfillJSON:o,wrapGlobals:c,scrub:u,truncation:K}),e.exports=r},962:(e,t,n)=>{var r=n(539);function i(e,t){r.isFunction(e[t])&&(e[t]=e[t].toString())}
167e.exports={itemToPayload:function(e,t,n){var r=e.data;e._isUncaught&&(r._isUncaught=!0),e._originalArgs&&(r._originalArgs=e._originalArgs),n(null,r)},addPayloadOptions:function(e,t,n){var i=t.payload||{};i.body&&delete i.body,e.data=r.merge(e.data,i),n(null,e)},addTelemetryData:function(e,t,n){e.telemetryEvents&&r.set(e,`data.body.telemetry`,e.telemetryEvents),n(null,e)},addMessageWithError:function(e,t,n){if(e.message){var i=`data.body.trace_chain.0`,a=r.get(e,i);if(a||=(i=`data.body.trace`,r.get(e,i)),a){if(!a.exception||!a.exception.description)return r.set(e,i+`.exception.description`,e.message),void n(null,e);var o=r.get(e,i+`.extra`)||{},c=r.merge(o,{message:e.message});r.set(e,i+`.extra`,c)}n(null,e)}else n(null,e)},userTransform:function(e){return function(t,n,i){var a=r.merge(t),o=null;try{r.isFunction(n.transform)&&(o=n.transform(a.data,t))}catch(r){n.transform=null,e.error(`Error while calling custom transform() function. Removing custom transform().`,r),i(null,t);return}r.isPromise(o)?o.then((function(e){e&&(a.data=e),i(null,a)}),(function(e){i(e,t)})):i(null,a)}},addConfigToPayload:function(e,t,n){if(!t.sendConfig)return n(null,e);var i=r.get(e,`data.custom`)||{};i._rollbarConfig=t,e.data.custom=i,n(null,e)},addConfiguredOptions:function(e,t,n){var r=t._configuredOptions;i(r,`transform`),i(r,`checkIgnore`),i(r,`onSendCallback`),delete r.accessToken,e.data.notifier.configured_options=r,n(null,e)},addDiagnosticKeys:function(e,t,n){var i=r.merge(e.notifier.client.notifier.diagnostic,e.diagnostic);if(r.get(e,`err._isAnonymous`)&&(i.is_anonymous=!0),e._isUncaught&&(i.is_uncaught=e._isUncaught),e.err)try{i.raw_error={message:e.err.message,name:e.err.name,constructor_name:e.err.constructor&&e.err.constructor.name,filename:e.err.fileName,line:e.err.lineNumber,column:e.err.columnNumber,stack:e.err.stack}}catch(e){i.raw_error={failed:String(e)}}e.data.notifier.diagnostic=r.merge(e.data.notifier.diagnostic,i),n(null,e)}}},974:e=>{function t(e){return typeof e!=`string`&&(e=String(e)),e.toLowerCase()}function n(e){this.map={},e instanceof n?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}n.prototype.append=function(e,n){e=t(e),n=function(e){return typeof e!=`string`&&(e=String(e)),e}(n);var r=this.map[e];this.map[e]=r?r+`, `+n:n},n.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},n.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},n.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},n.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),function(e){return{next:function(){var t=e.shift();return{done:t===void 0,value:t}}}}(e)},e.exports=function(e){return typeof Headers>`u`?new n(e):new Headers(e)}}},t={},function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}(554);var e,t}))}));function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty$1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _typeof$1(e){"@babel/helpers - typeof";return _typeof$1=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},_typeof$1(e)}function _classCallCheck$1(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function _defineProperties$1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$1(e,t,n){return t&&_defineProperties$1(e.prototype,t),n&&_defineProperties$1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _inherits$1(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$1(e,t)}
167function _getPrototypeOf$1(e){return _getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$1(e)}function _setPrototypeOf$1(e,t){return _setPrototypeOf$1=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_setPrototypeOf$1(e,t)}function _isNativeReflectConstruct$2(){if(typeof Reflect>`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _assertThisInitialized$2(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function _possibleConstructorReturn$1(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return _assertThisInitialized$2(e)}function _createSuper(e){var t=_isNativeReflectConstruct$2();return function(){var n=_getPrototypeOf$1(e),r;if(t){var i=_getPrototypeOf$1(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn$1(this,r)}}var _LEVEL_DEBUG$LEVEL_IN,LEVEL_DEBUG=`debug`,LEVEL_INFO=`info`,LEVEL_WARN=`warn`,LEVEL_ERROR=`error`,LEVEL_CRITICAL=`critical`,constants=(_LEVEL_DEBUG$LEVEL_IN={},_defineProperty$1(_LEVEL_DEBUG$LEVEL_IN,LEVEL_DEBUG,1),_defineProperty$1(_LEVEL_DEBUG$LEVEL_IN,LEVEL_INFO,2),_defineProperty$1(_LEVEL_DEBUG$LEVEL_IN,LEVEL_WARN,3),_defineProperty$1(_LEVEL_DEBUG$LEVEL_IN,LEVEL_ERROR,4),_defineProperty$1(_LEVEL_DEBUG$LEVEL_IN,LEVEL_CRITICAL,5),_LEVEL_DEBUG$LEVEL_IN),prefix=`Invariant failed`;function invariant(e,t){if(!e)throw Error(prefix)}var import_rollbar_umd_min=__toESM(require_rollbar_umd_min()),VALID_LEVELS=constants;function value(e,t){if(typeof e==`function`){var n=[...arguments].slice(2);return e.apply(void 0,n)}return e}function isValidLevel(e){return VALID_LEVELS[e]>=VALID_LEVELS.debug&&VALID_LEVELS[e]<=VALID_LEVELS.critical}function isRollbarInstance(e){var t;return!!(e!=null&&(t=e.options)!=null&&t.accessToken)}var Context=(0,import_react.createContext)();Context.displayName=`Rollbar`;var RollbarInstance=Symbol(`RollbarInstance`),BaseOptions=Symbol(`BaseOptions`),RollbarCtor=Symbol(`RollbarCtor`);function getRollbarFromContext(e){return e[RollbarInstance]}var Provider=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(e){var r;_classCallCheck$1(this,n),r=t.call(this,e);var i=r.props,a=i.config,o=i.Rollbar,c=o===void 0?import_rollbar_umd_min.default:o,u=i.instance;invariant(!u||isRollbarInstance(u),"`instance` must be a configured instance of Rollbar");var K=typeof a==`function`?a():a,Y=u||new c(K);return r.state={rollbar:Y,options:K},r}return _createClass$1(n,[{key:`render`,value:function(){var e,t=this.props,n=t.children,r=t.Rollbar,i=r===void 0?import_rollbar_umd_min.default:r,a=this.state,o=a.rollbar,c=a.options;return import_react.createElement(Context.Provider,{value:(e={},_defineProperty$1(e,RollbarInstance,o),_defineProperty$1(e,BaseOptions,c),_defineProperty$1(e,RollbarCtor,i),e)},n)}}]),n}(import_react.Component);_defineProperty$1(Provider,`propTypes`,{Rollbar:import_prop_types.default.func,config:function(e,t,n){if(!e.config&&!e.instance)return Error(`One of the required props 'config' or 'instance' must be set for ${n}.`);if(e.config){var r=_typeof$1(e.config);return r===`function`||r===`object`&&!Array.isArray(r)?void 0:Error(`${t} must be either an Object or a Function`)}},instance:function(e,t,n){if(!e.config&&!e.instance)return Error(`One of the required props 'config' or 'instance' must be set for ${n}.`);if(e.instance&&!isRollbarInstance(e.instance))return Error(`${t} must be a configured instance of Rollbar`)},children:import_prop_types.default.node});var INITIAL_ERROR_STATE={hasError:!1,error:null},ErrorBoundary=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(e){var r;return _classCallCheck$1(this,n),r=t.call(this,e),_defineProperty$1(_assertThisInitialized$2(r),`resetError`,function(){r.setState(INITIAL_ERROR_STATE)}),invariant(isValidLevel(e.level),`${e.level} is not a valid level setting for Rollbar`),r.state=_objectSpread2
167({},INITIAL_ERROR_STATE),r}return _createClass$1(n,[{key:`componentDidCatch`,value:function(e,t){var n=this.props,r=n.errorMessage,i=n.extra,a=n.level,o=n.callback,c=value(i,{},e,t),u=_objectSpread2(_objectSpread2({},t),c),K=value(a,LEVEL_ERROR,e,t),Y=getRollbarFromContext(this.context);if(!r)Y[K](e,u,o);else{var X=value(r,``,e,t);Y[K](X,e,u,o)}}},{key:`render`,value:function(){var e=this.state,t=e.hasError,n=e.error,r=this.props,i=r.fallbackUI,a=r.children;return t?i?import_react.createElement(i,{error:n,resetError:this.resetError}):null:a}}],[{key:`getDerivedStateFromError`,value:function(e){return{hasError:!0,error:e}}}]),n}(import_react.Component);_defineProperty$1(ErrorBoundary,`contextType`,Context),_defineProperty$1(ErrorBoundary,`propTypes`,{fallbackUI:import_prop_types.default.elementType,errorMessage:import_prop_types.default.oneOfType([import_prop_types.default.string,import_prop_types.default.func]),extra:import_prop_types.default.oneOfType([import_prop_types.default.object,import_prop_types.default.func]),level:import_prop_types.default.oneOfType([import_prop_types.default.string,import_prop_types.default.func]),callback:import_prop_types.default.func,children:import_prop_types.default.node}),_defineProperty$1(ErrorBoundary,`defaultProps`,{level:LEVEL_ERROR});function useRollbar(){return getRollbarFromContext((0,import_react.useContext)(Context))}var i$6=Object.defineProperty,d$10=(e,t,n)=>t in e?i$6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,r$8=(e,t,n)=>(d$10(e,typeof t==`symbol`?t:t+``,n),n),o$11=class{constructor(){r$8(this,`current`,this.detect()),r$8(this,`handoffState`,`pending`),r$8(this,`currentId`,0)}set(e){this.current!==e&&(this.handoffState=`pending`,this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current===`server`}get isClient(){return this.current===`client`}detect(){return typeof window>`u`||typeof document>`u`?`server`:`client`}handoff(){this.handoffState===`pending`&&(this.handoffState=`complete`)}get isHandoffComplete(){return this.handoffState===`complete`}},s$10=new o$11,l$6=(e,t)=>{s$10.isServer?(0,import_react.useEffect)(e,t):(0,import_react.useLayoutEffect)(e,t)};function s$9(e){let t=(0,import_react.useRef)(e);return l$6(()=>{t.current=e},[e]),t}function t$8(e){typeof queueMicrotask==`function`?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function o$10(){let e=[],t={addEventListener(e,n,r,i){return e.addEventListener(n,r,i),t.add(()=>e.removeEventListener(n,r,i))},requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...e){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...e))},setTimeout(...e){let n=setTimeout(...e);return t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return t$8(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=o$10();return e(t),this.add(()=>t.dispose())},add(t){return e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}},dispose(){for(let t of e.splice(0))t()}};return t}function p$5(){let[e]=(0,import_react.useState)(o$10);return(0,import_react.useEffect)(()=>()=>e.dispose(),[e]),e}var o$8=function(e){let t=s$9(e);return import_react.useCallback((...e)=>t.current(...e),[t])};function l$5(){let[e,t]=(0,import_react.useState)(s$10.isHandoffComplete);return e&&s$10.isHandoffComplete===!1&&t(!1),(0,import_react.useEffect)(()=>{e!==!0&&t(!0)},[e]),(0,import_react.useEffect)(()=>s$10.handoff(),[]),e}var o$6,I$4=(o$6=import_react.useId)??function(){let e=l$5(),[t,n]=import_react.useState(e?()=>s$10.nextId():null);return l$6(()=>{t===null&&n(s$10.nextId())},[t]),t==null?void 0:``+t};function u$3(e,t,...n){if(e in t){let r=t[e];return typeof r==`function`?r(...n):r}let r=Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(`, `)}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,u$3),r}function e$5(e){return s$10.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty(`current`)&&e.current instanceof Node?e.current.ownerDocument:document}var c$8=[`[contentEditable=true]`,`[tabindex]`,`a[href]`,`area[href]`,`button:not([disabled])`,`iframe`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`].map(e=>`${e}:not([tabindex='-1'])`).join(`,`),M$1=(e=>(e[e.First=1]=`First`,e[e.Previous=2]=`Previous`,e[e.Next=4]=`Next`,e[e.Last=8]=`Last`,e[e.WrapAround=16]=`WrapAround`,e[e.NoScroll=32]=`NoScroll`,e))(M$1||{}),N$2=(e=>(e[e.Error=0]=`Error`,e[e.Overflow=1]=`Overflow`,e[e.Success=2]=`Success`,e[e.Underflow=3]=`Underflow`,e))(N$2||{}),F$3=(e=>(e[e.Previous=-1]=`Previous`,e[e.Next=1]=`Next`,e))(F$3||{});function f$6(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(c$8)).sort((e,t)=>
167Math.sign((e.tabIndex||2**53-1)-(t.tabIndex||2**53-1)))}var T$4=(e=>(e[e.Strict=0]=`Strict`,e[e.Loose=1]=`Loose`,e))(T$4||{});function h$4(e,t=0){var n;return e!==e$5(e)?.body&&u$3(t,{0(){return e.matches(c$8)},1(){let t=e;for(;t!==null;){if(t.matches(c$8))return!0;t=t.parentElement}return!1}})}var w$4=(e=>(e[e.Keyboard=0]=`Keyboard`,e[e.Mouse=1]=`Mouse`,e))(w$4||{});typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`keydown`,e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible=``)},!0),document.addEventListener(`click`,e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible=``)},!0));var S$3=[`textarea`,`input`].join(`,`);function H$2(e){var t,n;return(e?.matches)?.call(e,S$3)??!1}function I$3(e,t=e=>e){return e.slice().sort((e,n)=>{let r=t(e),i=t(n);if(r===null||i===null)return 0;let a=r.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function O$2(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let a=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?n?I$3(e):e:f$6(e);i.length>0&&o.length>1&&(o=o.filter(e=>!i.includes(e))),r??=a.activeElement;let c=(()=>{if(t&5)return 1;if(t&10)return-1;throw Error(`Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last`)})(),u=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;if(t&8)return o.length-1;throw Error(`Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last`)})(),K=t&32?{preventScroll:!0}:{},Y=0,X=o.length,ee;do{if(Y>=X||Y+X<=0)return 0;let e=u+Y;if(t&16)e=(e+X)%X;else{if(e<0)return 3;if(e>=X)return 1}ee=o[e],ee?.focus(K),Y+=c}while(ee!==a.activeElement);return t&6&&H$2(ee)&&ee.select(),2}function d$9(e,t,n){let r=s$9(t);(0,import_react.useEffect)(()=>{function t(e){r.current(e)}return document.addEventListener(e,t,n),()=>document.removeEventListener(e,t,n)},[e,n])}function L$3(e,t,n=!0){let r=(0,import_react.useRef)(!1);(0,import_react.useEffect)(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function i(n,i){if(!r.current||n.defaultPrevented)return;let a=function e(t){return typeof t==`function`?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e),o=i(n);if(o!==null&&o.getRootNode().contains(o)){for(let e of a){if(e===null)continue;let t=e instanceof HTMLElement?e:e.current;if(t!=null&&t.contains(o)||n.composed&&n.composedPath().includes(t))return}return!h$4(o,T$4.Loose)&&o.tabIndex!==-1&&n.preventDefault(),t(n,o)}}let a=(0,import_react.useRef)(null);d$9(`mousedown`,e=>{var t,n;r.current&&(a.current=e.composedPath?.call(e)?.[0]||e.target)},!0),d$9(`click`,e=>{a.current&&=(i(e,()=>a.current),null)},!0),d$9(`blur`,e=>i(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function i$5(e){var t;if(e.type)return e.type;let n=e.as??`button`;if(typeof n==`string`&&n.toLowerCase()===`button`)return`button`}function s$6(e,t){let[n,r]=(0,import_react.useState)(()=>i$5(e));return l$6(()=>{r(i$5(e))},[e.type,e.as]),l$6(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute(`type`)&&r(`button`)},[n,t]),n}var u$2=Symbol();function T$3(e,t=!0){return Object.assign(e,{[u$2]:t})}function y$4(...e){let t=(0,import_react.useRef)(e);(0,import_react.useEffect)(()=>{t.current=e},[e]);let n=o$8(e=>{for(let n of t.current)n!=null&&(typeof n==`function`?n(e):n.current=e)});return e.every(e=>e==null||e?.[u$2])?void 0:n}function e$4(...e){return e.filter(Boolean).join(` `)}var S$2=(e=>(e[e.None=0]=`None`,e[e.RenderStrategy=1]=`RenderStrategy`,e[e.Static=2]=`Static`,e))(S$2||{}),j$1=(e=>(e[e.Unmount=0]=`Unmount`,e[e.Hidden=1]=`Hidden`,e))(j$1||{});function X$2({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:a=!0,name:o}){let c=N$1(t,e);if(a)return c$7(c,n,r,o);let u=i??0;if(u&2){let{static:e=!1,...t}=c;if(e)return c$7(t,n,r,o)}if(u&1){let{unmount:e=!0,...t}=c;return u$3(+!e,{0(){return null},1(){return c$7({...t,hidden:!0,style:{display:`none`}},n,r,o)}})}return c$7(c,n,r,o)}function c$7(e,t={},n,r){let{as:i=n,children:a,refName:o=`ref`,...c}=g$3(e,[`unmount`,`static`]),u=e.ref===void 0?{}:{[o]:e.ref},K=typeof a==`function`?a(t):a;
167`className`in c&&c.className&&typeof c.className==`function`&&(c.className=c.className(t));let Y={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))typeof i==`boolean`&&(e=!0),i===!0&&n.push(r);e&&(Y[`data-headlessui-state`]=n.join(` `))}if(i===import_react.Fragment&&Object.keys(R$2(c)).length>0){if(!(0,import_react.isValidElement)(K)||Array.isArray(K)&&K.length>1)throw Error([`Passing props on "Fragment"!`,``,`The current component <${r} /> is rendering a "Fragment".`,`However we need to passthrough the following props:`,Object.keys(c).map(e=>`  - ${e}`).join(`
168`),``,`You can apply a few solutions:`,['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',`Render a single element as the child so that we can forward the props onto that element.`].map(e=>`  - ${e}`).join(`
169`)].join(`
170`));let e=K.props,t=typeof e?.className==`function`?(...t)=>e$4(e?.className(...t),c.className):e$4(e?.className,c.className),n=t?{className:t}:{};return(0,import_react.cloneElement)(K,Object.assign({},N$1(K.props,R$2(g$3(c,[`ref`]))),Y,u,w$3(K.ref,u.ref),n))}return(0,import_react.createElement)(i,Object.assign({},g$3(c,[`ref`]),i!==import_react.Fragment&&u,i!==import_react.Fragment&&Y),K)}function w$3(...e){return{ref:e.every(e=>e==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n==`function`?n(t):n.current=t)}}}function N$1(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith(`on`)&&typeof r[e]==`function`?(n[e]??(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t[`aria-disabled`])return Object.assign(t,Object.fromEntries(Object.keys(n).map(e=>[e,void 0])));for(let e in n)Object.assign(t,{[e](t,...r){let i=n[e];for(let e of i){if((t instanceof Event||t?.nativeEvent instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function D$5(e){var t;return Object.assign((0,import_react.forwardRef)(e),{displayName:e.displayName??e.name})}function R$2(e){let t=Object.assign({},e);for(let e in t)t[e]===void 0&&delete t[e];return t}function g$3(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function r$6(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=t?.getAttribute(`disabled`)===``;return r&&i$3(n)?!1:r}function i$3(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}var a$3=`div`,p$4=(e=>(e[e.None=1]=`None`,e[e.Focusable=2]=`Focusable`,e[e.Hidden=4]=`Hidden`,e))(p$4||{});function s$5(e,t){let{features:n=1,...r}=e;return X$2({ourProps:{ref:t,"aria-hidden":(n&2)==2||void 0,style:{position:`fixed`,top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,...(n&4)==4&&(n&2)!=2&&{display:`none`}}},theirProps:r,slot:{},defaultTag:a$3,name:`Hidden`})}var c$6=D$5(s$5),n$8=(0,import_react.createContext)(null);n$8.displayName=`OpenClosedContext`;var d$7=(e=>(e[e.Open=1]=`Open`,e[e.Closed=2]=`Closed`,e[e.Closing=4]=`Closing`,e[e.Opening=8]=`Opening`,e))(d$7||{});function C$2(){return(0,import_react.useContext)(n$8)}function c$5({value:e,children:t}){return import_react.createElement(n$8.Provider,{value:e},t)}var o$4=(e=>(e.Space=` `,e.Enter=`Enter`,e.Escape=`Escape`,e.Backspace=`Backspace`,e.Delete=`Delete`,e.ArrowLeft=`ArrowLeft`,e.ArrowUp=`ArrowUp`,e.ArrowRight=`ArrowRight`,e.ArrowDown=`ArrowDown`,e.Home=`Home`,e.End=`End`,e.PageUp=`PageUp`,e.PageDown=`PageDown`,e.Tab=`Tab`,e))(o$4||{});function s$4(e,t,n){let r=s$9(t);(0,import_react.useEffect)(()=>{function t(e){r.current(e)}return window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)},[e,n])}var s$3=(e=>(e[e.Forwards=0]=`Forwards`,e[e.Backwards=1]=`Backwards`,e))(s$3||{});function n$7(){let e=(0,import_react.useRef)(0);return s$4(`keydown`,t=>{t.key===`Tab`&&(e.current=+!!t.shiftKey)},!0),e}function f$5(){let e=(0,import_react.useRef)(!1);return l$6(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function n$6(...e){return(0,import_react.useMemo)(()=>e$5(...e),[...e])}function E$2(e,t,n,r){let i=s$9(n);(0,import_react.useEffect)(()=>{e??=window;function n(e){i.current(e)}return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)},[e,t,r])}var Fe=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(Fe||{}),Ie=(e=>(e[e.TogglePopover=0]=`TogglePopover`,e[e.ClosePopover=1]=`ClosePopover`,e[e.SetButton=2]=`SetButton`,e[e.SetButtonId=3]=`SetButtonId`,e[e.SetPanel=4]=`SetPanel`,e[e.SetPanelId=5]=`SetPanelId`,e))(Ie||{}),xe$1={0:e=>({...e,popoverState:u$3(e.popoverState,{0:1,1:0})}),1(e){return e.popoverState===1?e:{...e,popoverState:1}},2(e,t){return e.button===t.button?e:{...e,button:t.button}},3(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},4(e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},5(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},le=(0,import_react.createContext)(null);le.displayName=`PopoverContext`;function Q$2(e){let t=(0,import_react.useContext)(le);if(t===null){let t=Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Q$2),t}return t}var ae=(0,import_react.createContext)(null);ae.displayName=`PopoverAPIContext`;function pe(e){let t=(0,import_react.useContext)(ae);if(t===null){let t=Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,pe),t}return t}var se=(0,import_react.createContext)(null);se.displayName=`PopoverGroupContext`;function ve(){return(0,import_react.useContext)(se)}var Z=(0,import_react.createContext)(null);Z.displayName=`PopoverPanelContext`;function Le(){return(0,import_react.useContext)(Z)}function Me(e,t){return u$3(t.type,xe$1,e,t)}var Be=`div`;function De$1(e,t){var n;let r=(0,import_react.useRef)(null),i=y$4(t,T$3(e=>{r.current=e})),a=(0,import_react.useRef)([]),o=(0,import_react.useReducer)(Me,{popoverState:1,buttons:a,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:(0,import_react.createRef)(),afterPanelSentinel:(0,import_react.createRef)()}),[{popoverState:c,button:u,buttonId:K,panel:Y,panelId:X,beforePanelSentinel:ee,afterPanelSentinel:te},ce]=o,ue=n$6(r.current??u),de=(0,import_react.useMemo)(()=>
170{if(!u||!Y)return!1;for(let e of document.querySelectorAll(`body > *`))if(Number(e?.contains(u))^Number(e?.contains(Y)))return!0;let e=f$6(),t=e.indexOf(u),n=(t+e.length-1)%e.length,r=(t+1)%e.length,i=e[n],a=e[r];return!Y.contains(i)&&!Y.contains(a)},[u,Y]),fe=s$9(K),me=s$9(X),ge=(0,import_react.useMemo)(()=>({buttonId:fe,panelId:me,close:()=>ce({type:1})}),[fe,me,ce]),Te=ve(),Oe=Te?.registerPopover,Ae=o$8(()=>{var e;return Te?.isFocusWithinPopoverGroup()??(ue?.activeElement&&(u?.contains(ue.activeElement)||Y?.contains(ue.activeElement)))});(0,import_react.useEffect)(()=>Oe?.(ge),[Oe,ge]),E$2(ue?.defaultView,`focus`,e=>{var t,n,r,i;c===0&&(Ae()||u&&Y&&e.target!==window&&((n=(t=ee.current)?.contains)!=null&&n.call(t,e.target)||(i=(r=te.current)?.contains)!=null&&i.call(r,e.target)||ce({type:1})))},!0),L$3([u,Y],(e,t)=>{ce({type:1}),h$4(t,T$4.Loose)||(e.preventDefault(),u?.focus())},c===0);let ze=o$8(e=>{ce({type:1}),(e?e instanceof HTMLElement?e:`current`in e&&e.current instanceof HTMLElement?e.current:u:u)?.focus()}),qe=(0,import_react.useMemo)(()=>({close:ze,isPortalled:de}),[ze,de]),Ye=(0,import_react.useMemo)(()=>({open:c===0,close:ze}),[c,ze]),Ze=e,Qe={ref:i};return import_react.createElement(Z.Provider,{value:null},import_react.createElement(le.Provider,{value:o},import_react.createElement(ae.Provider,{value:qe},import_react.createElement(c$5,{value:u$3(c,{0:d$7.Open,1:d$7.Closed})},X$2({ourProps:Qe,theirProps:Ze,slot:Ye,defaultTag:Be,name:`Popover`})))))}var he=`button`;function He$1(e,t){let n=I$4(),{id:r=`headlessui-popover-button-${n}`,...i}=e,[a,o]=Q$2(`Popover.Button`),{isPortalled:c}=pe(`Popover.Button`),u=(0,import_react.useRef)(null),K=`headlessui-focus-sentinel-${I$4()}`,Y=ve()?.closeOthers,X=Le()!==null;(0,import_react.useEffect)(()=>{if(!X)return o({type:3,buttonId:r}),()=>{o({type:3,buttonId:null})}},[X,r,o]);let[ee]=(0,import_react.useState)(()=>Symbol()),te=y$4(u,t,X?null:e=>{if(e)a.buttons.current.push(ee);else{let e=a.buttons.current.indexOf(ee);e!==-1&&a.buttons.current.splice(e,1)}a.buttons.current.length>1&&console.warn(`You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported.`),e&&o({type:2,button:e})}),ce=y$4(u,t),ue=n$6(u),de=o$8(e=>{var t,n,r;if(X){if(a.popoverState===1)return;switch(e.key){case o$4.Space:case o$4.Enter:e.preventDefault(),(n=(t=e.target).click)==null||n.call(t),o({type:1}),(r=a.button)==null||r.focus()}}else switch(e.key){case o$4.Space:case o$4.Enter:e.preventDefault(),e.stopPropagation(),a.popoverState===1&&Y?.(a.buttonId),o({type:0});break;case o$4.Escape:if(a.popoverState!==0)return Y?.(a.buttonId);if(!u.current||ue!=null&&ue.activeElement&&!u.current.contains(ue.activeElement))return;e.preventDefault(),e.stopPropagation(),o({type:1})}}),fe=o$8(e=>{X||e.key===o$4.Space&&e.preventDefault()}),me=o$8(t=>{var n,r;r$6(t.currentTarget)||e.disabled||(X?(o({type:1}),(n=a.button)==null||n.focus()):(t.preventDefault(),t.stopPropagation(),a.popoverState===1&&Y?.(a.buttonId),o({type:0}),(r=a.button)==null||r.focus()))}),ge=o$8(e=>{e.preventDefault(),e.stopPropagation()}),Te=a.popoverState===0,Oe=(0,import_react.useMemo)(()=>({open:Te}),[Te]),Ae=s$6(e,u),ze=X?{ref:ce,type:Ae,onKeyDown:de,onClick:me}:{ref:te,id:a.buttonId,type:Ae,"aria-expanded":e.disabled?void 0:a.popoverState===0,"aria-controls":a.panel?a.panelId:void 0,onKeyDown:de,onKeyUp:fe,onClick:me,onMouseDown:ge},qe=n$7(),Ye=o$8(()=>{let e=a.panel;if(!e)return;function t(){u$3(qe.current,{[s$3.Forwards]:()=>O$2(e,M$1.First),[s$3.Backwards]:()=>O$2(e,M$1.Last)})===N$2.Error&&O$2(f$6().filter(e=>e.dataset.headlessuiFocusGuard!==`true`),u$3(qe.current,{[s$3.Forwards]:M$1.Next,[s$3.Backwards]:M$1.Previous}),{relativeTo:a.button})}t()});return import_react.createElement(import_react.Fragment,null,X$2({ourProps:ze,theirProps:i,slot:Oe,defaultTag:he,name:`Popover.Button`}),Te&&!X&&c&&import_react.createElement(c$6,{id:K,features:p$4.Focusable,"data-headlessui-focus-guard":!0,as:`button`,type:`button`,onFocus:Ye}))}var Ge=`div`,_e=S$2.RenderStrategy|S$2.Static;function ke(e,t){let n=I$4(),{id:r=`headlessui-popover-overlay-${n}`,...i}=e,[{popoverState:a},o]=Q$2(`Popover.Overlay`),c=y$4(t),u=C$2(),K=u===null?a===0:(u&d$7.Open)===d$7.Open,Y=o$8(e=>{if(r$6(e.currentTarget))return e.preventDefault();o({type:1})}),X=(0,import_react.useMemo)(()=>({open:a===0}),[a]);return X$2({ourProps:{ref:c,id:r,"aria-hidden":!0,onClick:Y},theirProps:i,slot:X,defaultTag:Ge,features:_e,visible:K,name:`Popover.Overlay`})}var we=`div`,Ne$1=S$2.RenderStrategy|S$2.Static;function Ue(e,t){let n=I$4(),{id:r=`headlessui-popover-panel-${n}`,focus:i=!1,...a}=e,[o,c]=Q$2(`Popover.Panel`),{close:u,isPortalled:K}=pe(`Popover.Panel`),Y=`headlessui-focus-sentinel-before-${I$4()}`,X=`headlessui-focus-sentinel-after-${I$4()}`,ee=(0,import_react.useRef)(null),te=y$4(ee,t,e=>{c({type:4,panel:e})}),ce=n$6(ee);l$6(()=>(c({type:5,panelId:r}),()=>{c({type:5,panelId:null})}),[r,c]);let ue=C$2(),de=ue===null?o.popoverState===0:(ue&d$7.Open)===d$7.Open,fe=o$8(e=>{var t;switch(e.key){case o$4.Escape:if(o.popoverState!==0||!ee.current||ce!=null&&ce.activeElement&&!ee.current.contains(ce.activeElement))return;e.preventDefault(),e.stopPropagation(),c({type:1}),(t=o.button)==null||t.focus()}});(0,import_react.useEffect)(()=>{var t;e.static||o.popoverState===1&&((t=e.unmount)==null||t)&&c({type:4,panel:null})},[o.popoverState,e.unmount,e.static,c]),(0,import_react.useEffect)(()=>
170{if(!i||o.popoverState!==0||!ee.current)return;let e=ce?.activeElement;ee.current.contains(e)||O$2(ee.current,M$1.First)},[i,ee,o.popoverState]);let me=(0,import_react.useMemo)(()=>({open:o.popoverState===0,close:u}),[o,u]),ge={ref:te,id:r,onKeyDown:fe,onBlur:i&&o.popoverState===0?e=>{var t,n,r,i,a;let u=e.relatedTarget;u&&ee.current&&((t=ee.current)!=null&&t.contains(u)||(c({type:1}),((r=(n=o.beforePanelSentinel.current)?.contains)!=null&&r.call(n,u)||(a=(i=o.afterPanelSentinel.current)?.contains)!=null&&a.call(i,u))&&u.focus({preventScroll:!0})))}:void 0,tabIndex:-1},Te=n$7(),Oe=o$8(()=>{let e=ee.current;if(!e)return;function t(){u$3(Te.current,{[s$3.Forwards]:()=>{var t;O$2(e,M$1.First)===N$2.Error&&((t=o.afterPanelSentinel.current)==null||t.focus())},[s$3.Backwards]:()=>{var e;(e=o.button)==null||e.focus({preventScroll:!0})}})}t()}),Ae=o$8(()=>{let e=ee.current;if(!e)return;function t(){u$3(Te.current,{[s$3.Forwards]:()=>{var e;if(!o.button)return;let t=f$6(),n=t.indexOf(o.button),r=t.slice(0,n+1),i=[...t.slice(n+1),...r];for(let t of i.slice())if(t.dataset.headlessuiFocusGuard===`true`||(e=o.panel)!=null&&e.contains(t)){let e=i.indexOf(t);e!==-1&&i.splice(e,1)}O$2(i,M$1.First,{sorted:!1})},[s$3.Backwards]:()=>{var t;O$2(e,M$1.Previous)===N$2.Error&&((t=o.button)==null||t.focus())}})}t()});return import_react.createElement(Z.Provider,{value:r},de&&K&&import_react.createElement(c$6,{id:Y,ref:o.beforePanelSentinel,features:p$4.Focusable,"data-headlessui-focus-guard":!0,as:`button`,type:`button`,onFocus:Oe}),X$2({ourProps:ge,theirProps:a,slot:me,defaultTag:we,features:Ne$1,visible:de,name:`Popover.Panel`}),de&&K&&import_react.createElement(c$6,{id:X,ref:o.afterPanelSentinel,features:p$4.Focusable,"data-headlessui-focus-guard":!0,as:`button`,type:`button`,onFocus:Ae}))}var Ke=`div`;function We(e,t){let n=(0,import_react.useRef)(null),r=y$4(n,t),[i,a]=(0,import_react.useState)([]),o=o$8(e=>{a(t=>{let n=t.indexOf(e);if(n!==-1){let e=t.slice();return e.splice(n,1),e}return t})}),c=o$8(e=>(a(t=>[...t,e]),()=>o(e))),u=o$8(()=>{var e;let t=e$5(n);if(!t)return!1;let r=t.activeElement;return(e=n.current)!=null&&e.contains(r)?!0:i.some(e=>{var n,i;return t.getElementById(e.buttonId.current)?.contains(r)||t.getElementById(e.panelId.current)?.contains(r)})}),K=o$8(e=>{for(let t of i)t.buttonId.current!==e&&t.close()}),Y=(0,import_react.useMemo)(()=>({registerPopover:c,unregisterPopover:o,isFocusWithinPopoverGroup:u,closeOthers:K}),[c,o,u,K]),X=(0,import_react.useMemo)(()=>({}),[]),ee=e,te={ref:r};return import_react.createElement(se.Provider,{value:Y},X$2({ourProps:te,theirProps:ee,slot:X,defaultTag:Ke,name:`Popover.Group`}))}var je=D$5(De$1),Ve=D$5(He$1),$e=D$5(ke),Je=D$5(Ue),Xe=D$5(We),Lt=Object.assign(je,{Button:Ve,Overlay:$e,Panel:Je,Group:Xe});function c$4(e=0){let[t,n]=(0,import_react.useState)(e),r=f$5();return{flags:t,addFlag:(0,import_react.useCallback)(e=>{r.current&&n(t=>t|e)},[t,r]),hasFlag:(0,import_react.useCallback)(e=>!!(t&e),[t]),removeFlag:(0,import_react.useCallback)(e=>{r.current&&n(t=>t&~e)},[n,r]),toggleFlag:(0,import_react.useCallback)(e=>{r.current&&n(t=>t^e)},[n])}}function l$2(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function d$4(e,...t){e&&t.length>0&&e.classList.add(...t)}function v$2(e,...t){e&&t.length>0&&e.classList.remove(...t)}function F$2(e,t){let n=o$10();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[a,o]=[r,i].map(e=>{let[t=0]=e.split(`,`).filter(Boolean).map(e=>e.includes(`ms`)?parseFloat(e):parseFloat(e)*1e3).sort((e,t)=>t-e);return t}),c=a+o;if(c!==0){n.group(n=>{n.setTimeout(()=>{t(),n.dispose()},c),n.addEventListener(e,`transitionrun`,e=>{e.target===e.currentTarget&&n.dispose()})});let r=n.addEventListener(e,`transitionend`,e=>{e.target===e.currentTarget&&(t(),r())})}else t();return n.add(()=>t()),n.dispose}function y$3(e,t,n,r){let i=n?`enter`:`leave`,a=o$10(),o=r===void 0?()=>{}:l$2(r);i===`enter`&&(e.removeAttribute(`hidden`),e.style.display=``);let c=u$3(i,{enter:()=>t.enter,leave:()=>t.leave}),u=u$3(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),K=u$3(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return v$2(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),d$4(e,...c,...K),a.nextFrame(()=>{v$2(e,...K),d$4(e,...u),F$2(e,()=>(v$2(e,...c),d$4(e,...t.entered),o()))}),a.dispose}function D$3({container:e,direction:t,classes:n,onStart:r,onStop:i}){let a=f$5(),o=p$5(),c=s$9(t);l$6(()=>
170{let t=o$10();o.add(t.dispose);let u=e.current;if(u&&c.current!==`idle`&&a.current)return t.dispose(),r.current(c.current),t.add(y$3(u,n.current,c.current===`enter`,()=>{t.dispose(),i.current(c.current)})),t.dispose},[t])}function S$1(e=``){return e.split(` `).filter(e=>e.trim().length>1)}var A$2=(0,import_react.createContext)(null);A$2.displayName=`TransitionContext`;var Ce=(e=>(e.Visible=`visible`,e.Hidden=`hidden`,e))(Ce||{});function Ee(){let e=(0,import_react.useContext)(A$2);if(e===null)throw Error(`A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.`);return e}function be(){let e=(0,import_react.useContext)(I$1);if(e===null)throw Error(`A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.`);return e}var I$1=(0,import_react.createContext)(null);I$1.displayName=`NestingContext`;function _$1(e){return`children`in e?_$1(e.children):e.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e===`visible`).length>0}function ne(e,t){let n=s$9(e),r=(0,import_react.useRef)([]),i=f$5(),a=p$5(),o=o$8((e,t=j$1.Hidden)=>{let o=r.current.findIndex(({el:t})=>t===e);o!==-1&&(u$3(t,{[j$1.Unmount](){r.current.splice(o,1)},[j$1.Hidden](){r.current[o].state=`hidden`}}),a.microTask(()=>{var e;!_$1(r)&&i.current&&((e=n.current)==null||e.call(n))}))}),c=o$8(e=>{let t=r.current.find(({el:t})=>t===e);return t?t.state!==`visible`&&(t.state=`visible`):r.current.push({el:e,state:`visible`}),()=>o(e,j$1.Unmount)}),u=(0,import_react.useRef)([]),K=(0,import_react.useRef)(Promise.resolve()),Y=(0,import_react.useRef)({enter:[],leave:[],idle:[]}),X=o$8((e,n,r)=>{u.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(([t])=>t!==e)),t?.chains.current[n].push([e,new Promise(e=>{u.current.push(e)})]),t?.chains.current[n].push([e,new Promise(e=>{Promise.all(Y.current[n].map(([e,t])=>t)).then(()=>e())})]),n===`enter`?K.current=K.current.then(()=>t?.wait.current).then(()=>r(n)):r(n)}),ee=o$8((e,t,n)=>{Promise.all(Y.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;(e=u.current.shift())==null||e()}).then(()=>n(t))});return(0,import_react.useMemo)(()=>({children:r,register:c,unregister:o,onStart:X,onStop:ee,wait:K,chains:Y}),[c,o,r,X,ee,Y,K])}function Se(){}var xe=[`beforeEnter`,`afterEnter`,`beforeLeave`,`afterLeave`];function re$1(e){var t;let n={};for(let t of xe)n[t]=e[t]??Se;return n}function Pe(e){let t=(0,import_react.useRef)(re$1(e));return(0,import_react.useEffect)(()=>{t.current=re$1(e)},[e]),t}var Re=`div`,ie=S$2.RenderStrategy;
170function ye(e,t){let{beforeEnter:n,afterEnter:r,beforeLeave:i,afterLeave:a,enter:o,enterFrom:c,enterTo:u,entered:K,leave:Y,leaveFrom:X,leaveTo:ee,...te}=e,ce=(0,import_react.useRef)(null),ue=y$4(ce,t),de=te.unmount?j$1.Unmount:j$1.Hidden,{show:fe,appear:me,initial:ge}=Ee(),[Te,Oe]=(0,import_react.useState)(fe?`visible`:`hidden`),Ae=be(),{register:ze,unregister:qe}=Ae,Ye=(0,import_react.useRef)(null);(0,import_react.useEffect)(()=>ze(ce),[ze,ce]),(0,import_react.useEffect)(()=>{if(de===j$1.Hidden&&ce.current){if(fe&&Te!==`visible`){Oe(`visible`);return}return u$3(Te,{hidden:()=>qe(ce),visible:()=>ze(ce)})}},[Te,ce,ze,qe,fe,de]);let Ze=s$9({enter:S$1(o),enterFrom:S$1(c),enterTo:S$1(u),entered:S$1(K),leave:S$1(Y),leaveFrom:S$1(X),leaveTo:S$1(ee)}),Qe=Pe({beforeEnter:n,afterEnter:r,beforeLeave:i,afterLeave:a}),et=l$5();(0,import_react.useEffect)(()=>{if(et&&Te===`visible`&&ce.current===null)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[ce,Te,et]);let nt=ge&&!me,rt=!et||nt||Ye.current===fe?`idle`:fe?`enter`:`leave`,it=c$4(0),at=o$8(e=>u$3(e,{enter:()=>{it.addFlag(d$7.Opening),Qe.current.beforeEnter()},leave:()=>{it.addFlag(d$7.Closing),Qe.current.beforeLeave()},idle:()=>{}})),ot=o$8(e=>u$3(e,{enter:()=>{it.removeFlag(d$7.Opening),Qe.current.afterEnter()},leave:()=>{it.removeFlag(d$7.Closing),Qe.current.afterLeave()},idle:()=>{}})),st=ne(()=>{Oe(`hidden`),qe(ce)},Ae);D$3({container:ce,classes:Ze,direction:rt,onStart:s$9(e=>{st.onStart(ce,e,at)}),onStop:s$9(e=>{st.onStop(ce,e,ot),e===`leave`&&!_$1(st)&&(Oe(`hidden`),qe(ce))})}),(0,import_react.useEffect)(()=>{nt&&(de===j$1.Hidden?Ye.current=null:Ye.current=fe)},[fe,nt,Te]);let ct=te,lt={ref:ue};return me&&fe&&(ct={...ct,className:e$4(te.className,...Ze.current.enter,...Ze.current.enterFrom)}),import_react.createElement(I$1.Provider,{value:st},import_react.createElement(c$5,{value:u$3(Te,{visible:d$7.Open,hidden:d$7.Closed})|it.flags},X$2({ourProps:lt,theirProps:ct,defaultTag:Re,features:ie,visible:Te===`visible`,name:`Transition.Child`})))}function Ne(e,t){let{show:n,appear:r=!1,unmount:i,...a}=e,o=(0,import_react.useRef)(null),c=y$4(o,t);l$5();let u=C$2();if(n===void 0&&u!==null&&(n=(u&d$7.Open)===d$7.Open),![!0,!1].includes(n))throw Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[K,Y]=(0,import_react.useState)(n?`visible`:`hidden`),X=ne(()=>{Y(`hidden`)}),[ee,te]=(0,import_react.useState)(!0),ce=(0,import_react.useRef)([n]);l$6(()=>{ee!==!1&&ce.current[ce.current.length-1]!==n&&(ce.current.push(n),te(!1))},[ce,n]);let ue=(0,import_react.useMemo)(()=>({show:n,appear:r,initial:ee}),[n,r,ee]);(0,import_react.useEffect)(()=>{if(n)Y(`visible`);else if(!_$1(X))Y(`hidden`);else{let e=o.current;if(!e)return;let t=e.getBoundingClientRect();t.x===0&&t.y===0&&t.width===0&&t.height===0&&Y(`hidden`)}},[n,X]);let de={unmount:i};return import_react.createElement(I$1.Provider,{value:X},import_react.createElement(A$2.Provider,{value:ue},X$2({ourProps:{...de,as:import_react.Fragment,children:import_react.createElement(oe,{ref:c,...de,...a})},theirProps:{},defaultTag:import_react.Fragment,features:ie,visible:K===`visible`,name:`Transition`})))}function He(e,t){let n=(0,import_react.useContext)(A$2)!==null,r=C$2()!==null;return import_react.createElement(import_react.Fragment,null,!n&&r?import_react.createElement(q$1,{ref:t,...e}):import_react.createElement(oe,{ref:t,...e}))}var q$1=D$5(Ne),oe=D$5(ye),De=D$5(He),tt=Object.assign(q$1,{Child:De,Root:q$1});function t$3(e){return e.split(`-`)[1]}function e$3(e){return e===`y`?`height`:`width`}function n$4(e){return e.split(`-`)[0]}function o$3(e){return[`top`,`bottom`].includes(n$4(e))?`x`:`y`}function i$2(e,t,n){let{reference:r,floating:i}=e,a=r.x+r.width/2-i.width/2,o=r.y+r.height/2-i.height/2,c=o$3(t),u=e$3(c),K=r[u]/2-i[u]/2,Y=c===`x`,X;switch(n$4(t)){case`top`:X={x:a,y:r.y-i.height};break;case`bottom`:X={x:a,y:r.y+r.height};break;case`right`:X={x:r.x+r.width,y:o};break;case`left`:X={x:r.x-i.width,y:o};break;default:X={x:r.x,y:r.y}}switch(t$3(t)){case`start`:X[c]-=K*(n&&Y?-1:1);break;case`end`:X[c]+=K*(n&&Y?-1:1)}return X}var r$4=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}
170=n,c=a.filter(Boolean),u=await(o.isRTL==null?void 0:o.isRTL(t)),K=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:Y,y:X}=i$2(K,r,u),ee=r,te={},ce=0;for(let n=0;n<c.length;n++){let{name:a,fn:ue}=c[n],{x:de,y:fe,data:me,reset:ge}=await ue({x:Y,y:X,initialPlacement:r,placement:ee,strategy:i,middlewareData:te,rects:K,platform:o,elements:{reference:e,floating:t}});Y=de??Y,X=fe??X,te={...te,[a]:{...te[a],...me}},ge&&ce<=50&&(ce++,typeof ge==`object`&&(ge.placement&&(ee=ge.placement),ge.rects&&(K=!0===ge.rects?await o.getElementRects({reference:e,floating:t,strategy:i}):ge.rects),{x:Y,y:X}=i$2(K,ee,u)),n=-1)}return{x:Y,y:X,placement:ee,strategy:i,middlewareData:te}};function a$2(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e)}function l$1(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function s$2(e,t){var n;t===void 0&&(t={});let{x:r,y:i,platform:a,rects:o,elements:c,strategy:u}=e,{boundary:K=`clippingAncestors`,rootBoundary:Y=`viewport`,elementContext:X=`floating`,altBoundary:ee=!1,padding:te=0}=t,ce=a$2(te),ue=c[ee?X===`floating`?`reference`:`floating`:X],de=l$1(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(ue)))==null||n?ue:ue.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:K,rootBoundary:Y,strategy:u})),fe=X===`floating`?{...o.floating,x:r,y:i}:o.reference,me=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),ge=await(a.isElement==null?void 0:a.isElement(me))&&await(a.getScale==null?void 0:a.getScale(me))||{x:1,y:1},Te=l$1(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:fe,offsetParent:me,strategy:u}):fe);return{top:(de.top-Te.top+ce.top)/ge.y,bottom:(Te.bottom-de.bottom+ce.bottom)/ge.y,left:(de.left-Te.left+ce.left)/ge.x,right:(Te.right-de.right+ce.right)/ge.x}}var c$3=Math.min,f$2=Math.max;function m$2(e,t,n){return f$2(e,c$3(t,n))}var g$2=[`top`,`right`,`bottom`,`left`],d$2=g$2.reduce(((e,t)=>e.concat(t,t+`-start`,t+`-end`)),[]),p$2={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function h$2(e){return e.replace(/left|right|bottom|top/g,(e=>p$2[e]))}function y$2(e,t,n){n===void 0&&(n=!1);let r=t$3(e),i=o$3(e),a=e$3(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=h$2(o)),{main:o,cross:h$2(o)}}var x$2={start:`end`,end:`start`};function w$2(e){return e.replace(/start|end/g,(e=>x$2[e]))}var b$2=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:c,elements:u}=t,{mainAxis:K=!0,crossAxis:Y=!0,fallbackPlacements:X,fallbackStrategy:ee=`bestFit`,fallbackAxisSideDirection:te=`none`,flipAlignment:ce=!0,...ue}=e,de=n$4(r),fe=n$4(o)===o,me=await(c.isRTL==null?void 0:c.isRTL(u.floating)),ge=X||(fe||!ce?[h$2(o)]:function(e){let t=h$2(e);return[w$2(e),t,w$2(t)]}(o));X||te===`none`||ge.push(...function(e,t,n,r){let i=t$3(e),a=function(e,t,n){let r=[`left`,`right`],i=[`right`,`left`],a=[`top`,`bottom`],o=[`bottom`,`top`];switch(e){case`top`:case`bottom`:return n?t?i:r:t?r:i;case`left`:case`right`:return t?a:o;default:return[]}}(n$4(e),n===`start`,r);return i&&(a=a.map((e=>e+`-`+i)),t&&(a=a.concat(a.map(w$2)))),a}(o,ce,te,me));let Te=[o,...ge],Oe=await s$2(t,ue),Ae=[],ze=i.flip?.overflows||[];if(K&&Ae.push(Oe[de]),Y){let{main:e,cross:t}=y$2(r,a,me);Ae.push(Oe[e],Oe[t])}if(ze=[...ze,{placement:r,overflows:Ae}],!Ae.every((e=>e<=0))){var qe,Ye;let e=(i.flip?.index||0)+1,t=Te[e];if(t)return{data:{index:e,overflows:ze},reset:{placement:t}};let n=ze.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0]?.placement;if(!n)switch(ee){case`bestFit`:{var Ze;let e=ze.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},D$2=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){let{x:n,y:r}=t,i=await async function(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=n$4(n),c=t$3(n),u=o$3(n)===`x`,
vendor: 4,083 bytes, line 170
170K=[`left`,`top`].includes(o)?-1:1,Y=a&&u?-1:1,X=typeof t==`function`?t(e):t,{mainAxis:ee,crossAxis:te,alignmentAxis:ce}=typeof X==`number`?{mainAxis:X,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...X};return c&&typeof ce==`number`&&(te=c===`end`?-1*ce:ce),u?{x:te*Y,y:ee*K}:{x:ee*K,y:te*Y}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function L$2(e){return e===`x`?`y`:`x`}var k$1=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,K={x:n,y:r},Y=await s$2(t,u),X=o$3(n$4(i)),ee=L$2(X),te=K[X],ce=K[ee];if(a){let e=X===`y`?`bottom`:`right`;te=m$2(te+Y[X===`y`?`top`:`left`],te,te-Y[e])}if(o){let e=ee===`y`?`bottom`:`right`;ce=m$2(ce+Y[ee===`y`?`top`:`left`],ce,ce-Y[e])}let ue=c.fn({...t,[X]:te,[ee]:ce});return{...ue,data:{x:ue.x-n,y:ue.y-r}}}}};function n$3(e){var t;return e.ownerDocument?.defaultView||window}function o$2(e){return n$3(e).getComputedStyle(e)}function i$1(e){return e instanceof n$3(e).Node}function r$3(e){return i$1(e)?(e.nodeName||``).toLowerCase():``}var l;function c$2(){if(l)return l;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(l=e.brands.map((e=>e.brand+`/`+e.version)).join(` `),l):navigator.userAgent}function s$1(e){return e instanceof n$3(e).HTMLElement}function f$1(e){return e instanceof n$3(e).Element}function u$1(e){return typeof ShadowRoot>`u`?!1:e instanceof n$3(e).ShadowRoot||e instanceof ShadowRoot}function a$1(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=o$2(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![`inline`,`contents`].includes(i)}function d$1(e){return[`table`,`td`,`th`].includes(r$3(e))}function h$1(e){let t=/firefox/i.test(c$2()),n=o$2(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!==`none`||n.perspective!==`none`||!!r&&r!==`none`||t&&n.willChange===`filter`||t&&!!n.filter&&n.filter!==`none`||[`transform`,`perspective`].some((e=>n.willChange.includes(e)))||[`paint`,`layout`,`strict`,`content`].some((e=>{let t=n.contain;return t!=null&&t.includes(e)}))}function p$1(){return/^((?!chrome|android).)*safari/i.test(c$2())}function g$1(e){return[`html`,`body`,`#document`].includes(r$3(e))}var m$1=Math.min,y$1=Math.max,x$1=Math.round;function w$1(e){let t=o$2(e),n=parseFloat(t.width),r=parseFloat(t.height),i=s$1(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,c=x$1(n)!==a||x$1(r)!==o;return c&&(n=a,r=o),{width:n,height:r,fallback:c}}function v$1(e){return f$1(e)?e:e.contextElement}var b$1={x:1,y:1};function L$1(e){let t=v$1(e);if(!s$1(t))return b$1;let n=t.getBoundingClientRect(),{width:r,height:i,fallback:a}=w$1(t),o=(a?x$1(n.width):n.width)/r,c=(a?x$1(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),c&&Number.isFinite(c)||(c=1),{x:o,y:c}}function E$1(e,t,n,r){var i,a;t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),c=v$1(e),u=b$1;t&&(r?f$1(r)&&(u=L$1(r)):u=L$1(e));let K=c?n$3(c):window,Y=p$1()&&n,X=(o.left+(Y&&K.visualViewport?.offsetLeft||0))/u.x,ee=(o.top+(Y&&K.visualViewport?.offsetTop||0))/u.y,te=o.width/u.x,ce=o.height/u.y;if(c){let e=n$3(c),t=r&&f$1(r)?n$3(r):r,n=e.frameElement;for(;n&&r&&t!==e;){let e=L$1(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,X*=e.x,ee*=e.y,te*=e.x,ce*=e.y,X+=t.x,ee+=t.y,n=n$3(n).frameElement}}return l$1({width:te,height:ce,x:X,y:ee})}function T$1(e){return((i$1(e)?e.ownerDocument:e.document)||window.document).documentElement}function R$1(e){return f$1(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function C$1(e){return E$1(T$1(e)).left+R$1(e).scrollLeft}function F$1(e){if(r$3(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||u$1(e)&&e.host||T$1(e);return u$1(t)?t.host:t}function W(e){let t=F$1(e);return g$1(t)?t.ownerDocument.body:s$1(t)&&a$1(t)?t:W(t)}function D$1(e,t){var n;t===void 0&&(t=[]);let r=W(e),i=r===e.ownerDocument?.body,a=n$3(r);
170return i?t.concat(a,a.visualViewport||[],a$1(r)?r:[]):t.concat(r,D$1(r))}function S(e,t,n){let r;if(t===`viewport`)r=function(e,t){let n=n$3(e),r=T$1(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,c=0,u=0;if(i){a=i.width,o=i.height;let e=p$1();(!e||e&&t===`fixed`)&&(c=i.offsetLeft,u=i.offsetTop)}return{width:a,height:o,x:c,y:u}}(e,n);else if(t===`document`)r=function(e){let t=T$1(e),n=R$1(e),r=e.ownerDocument.body,i=y$1(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=y$1(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+C$1(e),c=-n.scrollTop;return o$2(r).direction===`rtl`&&(o+=y$1(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:c}}(T$1(e));else if(f$1(t))r=function(e,t){let n=E$1(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=s$1(e)?L$1(e):{x:1,y:1};return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}(t,n);else{let n={...t};if(p$1()){var i,a;let t=n$3(e);n.x-=t.visualViewport?.offsetLeft||0,n.y-=t.visualViewport?.offsetTop||0}r=n}return l$1(r)}function A$1(e,t){return s$1(e)&&o$2(e).position!==`fixed`?t?t(e):e.offsetParent:null}function H$1(e,t){let n=n$3(e);if(!s$1(e))return n;let r=A$1(e,t);for(;r&&d$1(r)&&o$2(r).position===`static`;)r=A$1(r,t);return r&&(r$3(r)===`html`||r$3(r)===`body`&&o$2(r).position===`static`&&!h$1(r))?n:r||function(e){let t=F$1(e);for(;s$1(t)&&!g$1(t);){if(h$1(t))return t;t=F$1(t)}return null}(e)||n}function V$1(e,t,n){let r=s$1(t),i=T$1(t),a=E$1(e,!0,n===`fixed`,t),o={scrollLeft:0,scrollTop:0},c={x:0,y:0};if(r||!r&&n!==`fixed`){if((r$3(t)!==`body`||a$1(i))&&(o=R$1(t)),s$1(t)){let e=E$1(t,!0);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&(c.x=C$1(i))}return{x:a.left+o.scrollLeft-c.x,y:a.top+o.scrollTop-c.y,width:a.width,height:a.height}}var O$1={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?function(e,t){let n=t.get(e);if(n)return n;let r=D$1(e).filter((e=>f$1(e)&&r$3(e)!==`body`)),i=null,a=o$2(e).position===`fixed`,o=a?F$1(e):e;for(;f$1(o)&&!g$1(o);){let e=o$2(o),t=h$1(o);e.position===`fixed`?i=null:(a?t||i:t||e.position!==`static`||!i||![`absolute`,`fixed`].includes(i.position))?i=e:r=r.filter((e=>e!==o)),o=F$1(o)}return t.set(e,r),r}(t,this._c):[].concat(n),r],o=a[0],c=a.reduce(((e,n)=>{let r=S(t,n,i);return e.top=y$1(r.top,e.top),e.right=m$1(r.right,e.right),e.bottom=m$1(r.bottom,e.bottom),e.left=y$1(r.left,e.left),e}),S(t,o,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=s$1(n),a=T$1(n);if(n===a)return t;let o={scrollLeft:0,scrollTop:0},c={x:1,y:1},u={x:0,y:0};if((i||!i&&r!==`fixed`)&&((r$3(n)!==`body`||a$1(a))&&(o=R$1(n)),s$1(n))){let e=E$1(n);c=L$1(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-o.scrollLeft*c.x+u.x,y:t.y*c.y-o.scrollTop*c.y+u.y}},isElement:f$1,getDimensions:function(e){return w$1(e)},getOffsetParent:H$1,getDocumentElement:T$1,getScale:L$1,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e,i=this.getOffsetParent||H$1,a=this.getDimensions;return{reference:V$1(t,await i(n),r),floating:{x:0,y:0,...await a(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>o$2(e).direction===`rtl`};function P$1(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=!0,animationFrame:c=!1}=r,u=i&&!c,K=u||a?[...f$1(e)?D$1(e):e.contextElement?D$1(e.contextElement):[],...D$1(t)]:[];K.forEach((e=>{u&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)}));let Y,X=null;if(o){let r=!0;X=new ResizeObserver((()=>{r||n(),r=!1})),f$1(e)&&!c&&X.observe(e),f$1(e)||!e.contextElement||c||X.observe(e.contextElement),X.observe(t)}let ee=c?E$1(e):null;return c&&function t(){let r=E$1(e);!ee||r.x===ee.x&&r.y===ee.y&&r.width===ee.width&&r.height===ee.height||n(),ee=r,Y=requestAnimationFrame(t)}(),n(),()=>{var e;K.forEach((e=>{u&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)})),(e=X)==null||e.disconnect(),X=null,c&&cancelAnimationFrame(Y)}}var z$1=(e,t,n)=>{let r=new Map,i={platform:O$1,...n},a={...i.platform,_c:r};return r$4(e,t,{...i,platform:a})},index$2=typeof document<`u`?import_react.useLayoutEffect:import_react.useEffect;function deepEqual(e,t){if(e===t)return!0;
170if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!deepEqual(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!deepEqual(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function useLatestRef(e){let t=import_react.useRef(e);return index$2(()=>{t.current=e}),t}function useFloating$1(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,whileElementsMounted:a,open:o}=e,[c,u]=import_react.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[K,Y]=import_react.useState(r);deepEqual(K,r)||Y(r);let X=import_react.useRef(null),ee=import_react.useRef(null),te=import_react.useRef(c),ce=useLatestRef(a),ue=useLatestRef(i),[de,fe]=import_react.useState(null),[me,ge]=import_react.useState(null),Te=import_react.useCallback(e=>{X.current!==e&&(X.current=e,fe(e))},[]),Oe=import_react.useCallback(e=>{ee.current!==e&&(ee.current=e,ge(e))},[]),Ae=import_react.useCallback(()=>{if(!X.current||!ee.current)return;let e={placement:t,strategy:n,middleware:K};ue.current&&(e.platform=ue.current),z$1(X.current,ee.current,e).then(e=>{let t={...e,isPositioned:!0};ze.current&&!deepEqual(te.current,t)&&(te.current=t,import_react_dom.flushSync(()=>{u(t)}))})},[K,t,n,ue]);index$2(()=>{o===!1&&te.current.isPositioned&&(te.current.isPositioned=!1,u(e=>({...e,isPositioned:!1})))},[o]);let ze=import_react.useRef(!1);index$2(()=>(ze.current=!0,()=>{ze.current=!1}),[]),index$2(()=>{if(de&&me){if(ce.current)return ce.current(de,me,Ae);Ae()}},[de,me,Ae,ce]);let qe=import_react.useMemo(()=>({reference:X,floating:ee,setReference:Te,setFloating:Oe}),[Te,Oe]),Ye=import_react.useMemo(()=>({reference:de,floating:me}),[de,me]);return import_react.useMemo(()=>({...c,update:Ae,refs:qe,elements:Ye,reference:Te,floating:Oe}),[c,Ae,qe,Ye,Te,Oe])}var index$1=typeof document<`u`?import_react.useLayoutEffect:import_react.useEffect,serverHandoffComplete=!1,count=0,genId=()=>`floating-ui-`+count++;function useFloatingId(){let[e,t]=import_react.useState(()=>serverHandoffComplete?genId():void 0);return index$1(()=>{e??t(genId())},[]),import_react.useEffect(()=>{serverHandoffComplete||=!0},[]),e}var useId=import_react.useId||useFloatingId;function createPubSub(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(e=>e!==n))}}}var FloatingTreeContext=import_react.createContext(null),useFloatingTree=()=>import_react.useContext(FloatingTreeContext);function getDocument(e){return e?.ownerDocument||document}function getWindow(e){return getDocument(e).defaultView||window}function isElement(e){return e?e instanceof getWindow(e).Element:!1}var useSafeInsertionEffect=import_react.useInsertionEffect||(e=>e());function useEvent(e){let t=import_react.useRef(()=>{});return useSafeInsertionEffect(()=>{t.current=e}),import_react.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function useFloating(e){e===void 0&&(e={});let{open:t=!1,onOpenChange:n,nodeId:r}=e,i=useFloating$1(e),a=useFloatingTree(),o=import_react.useRef(null),c=import_react.useRef({}),u=import_react.useState(()=>createPubSub())[0],K=useId(),[Y,X]=import_react.useState(null),ee=import_react.useCallback(e=>{let t=isElement(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;i.refs.setReference(t)},[i.refs]),te=import_react.useCallback(e=>{(isElement(e)||e===null)&&(o.current=e,X(e)),(isElement(i.refs.reference.current)||i.refs.reference.current===null||e!==null&&!isElement(e))&&i.refs.setReference(e)},[i.refs]),ce=import_react.useMemo(()=>({...i.refs,setReference:te,setPositionReference:ee,domReference:o}),[i.refs,te,ee]),ue=import_react.useMemo(()=>({...i.elements,domReference:Y}),[i.elements,Y]),de=useEvent(n),fe=import_react.useMemo(()=>({...i,refs:ce,elements:ue,dataRef:c,nodeId:r,floatingId:K,events:u,open:t,onOpenChange:de}),[i,r,K,u,t,de,ce,ue]);return index$1(()=>{let e=a?.nodesRef.current.find(e=>e.id===r);e&&(e.context=fe)}),import_react.useMemo(()=>({...i,context:fe,refs:ce,elements:ue,reference:te,positionReference:ee}),[i,ce,ue,fe,te,ee])}var isMergeableObject=function(e){return isNonNullObject(e)&&!isSpecial(e)};function isNonNullObject(e){return!!e&&typeof e==`object`}function isSpecial(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||isReactElement(e)}var REACT_ELEMENT_TYPE=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function isReactElement(e){return e.$$typeof===REACT_ELEMENT_TYPE}function emptyTarget(e){return Array.isArray(e)?[]:{}}function cloneUnlessOtherwiseSpecified(e,t){return t.clone!==!1&&t.isMergeableObject(e)?deepmerge(emptyTarget(e),e,t):e}function defaultArrayMerge(e,t,n){return e.concat(t).map(function(e){return cloneUnlessOtherwiseSpecified(e,n)})}function mergeObject(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(t){r[t]=cloneUnlessOtherwiseSpecified(e[t],n)}),Object.keys(t).forEach(function(i){r[i]=!n.isMergeableObject(t[i])||!e[i]?cloneUnlessOtherwiseSpecified(t[i],n):deepmerge(e[i],t[i],n)}),r}function deepmerge(e,t,n){n||={},n.arrayMerge=n.arrayMerge||defaultArrayMerge,n.isMergeableObject=n.isMergeableObject||isMergeableObject;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):mergeObject(e,t,n):cloneUnlessOtherwiseSpecified(t,n)}deepmerge.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return deepmerge(e,n,t)},{})};var deepmerge_1=deepmerge,freeGlobal=typeof global==`object`&&global&&global.Object===Object&&global,freeSelf=typeof self==`object`&&self&&self.Object===Object&&self,root$2=freeGlobal||freeSelf||Function(`return this`)(),Symbol$1=root$2.Symbol,objectProto$4=Object.prototype,hasOwnProperty$11=objectProto$4.hasOwnProperty,nativeObjectToString$1=objectProto$4.toString,symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(e){var t=hasOwnProperty$11.call(e,symToStringTag$1),n=e[symToStringTag$1];try{e[symToStringTag$1]=void 0;var r=!0}catch{}var i=nativeObjectToString$1.call(e);return r&&(t?e[symToStringTag$1]=n:delete e[symToStringTag$1]),i}var nativeObjectToString=Object.prototype.toString;function objectToString(e){return nativeObjectToString.call(e)}
vendor: 7,595 bytes, line 170
170var nullTag=`[object Null]`,undefinedTag=`[object Undefined]`,symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag(e){return e==null?e===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}function overArg(e,t){return function(n){return e(t(n))}}var getPrototype=overArg(Object.getPrototypeOf,Object);function isObjectLike(e){return typeof e==`object`&&!!e}var objectTag$3=`[object Object]`,funcProto$1=Function.prototype,objectProto$3=Object.prototype,funcToString$2=funcProto$1.toString,hasOwnProperty$10=objectProto$3.hasOwnProperty,objectCtorString=funcToString$2.call(Object);function isPlainObject$1(e){if(!isObjectLike(e)||baseGetTag(e)!=objectTag$3)return!1;var t=getPrototype(e);if(t===null)return!0;var n=hasOwnProperty$10.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&funcToString$2.call(n)==objectCtorString}var require_react_fast_compare=__commonJSMin(((e,t)=>{var n=Array.isArray,r=Object.keys,i=Object.prototype.hasOwnProperty,a=typeof Element<`u`;function o(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){var c=n(e),u=n(t),K,Y,X;if(c&&u){if(Y=e.length,Y!=t.length)return!1;for(K=Y;K--!==0;)if(!o(e[K],t[K]))return!1;return!0}if(c!=u)return!1;var ee=e instanceof Date,te=t instanceof Date;if(ee!=te)return!1;if(ee&&te)return e.getTime()==t.getTime();var ce=e instanceof RegExp,ue=t instanceof RegExp;if(ce!=ue)return!1;if(ce&&ue)return e.toString()==t.toString();var de=r(e);if(Y=de.length,Y!==r(t).length)return!1;for(K=Y;K--!==0;)if(!i.call(t,de[K]))return!1;if(a&&e instanceof Element&&t instanceof Element)return e===t;for(K=Y;K--!==0;)if(X=de[K],!(X===`_owner`&&e.$$typeof)&&!o(e[X],t[X]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||e.number===-2146828260)return console.warn(`Warning: react-fast-compare does not handle circular references.`,e.name,e.message),!1;throw e}}})),import_react_fast_compare=__toESM(require_react_fast_compare());function warning(e,t){}function listCacheClear(){this.__data__=[],this.size=0}function eq(e,t){return e===t||e!==e&&t!==t}function assocIndexOf(e,t){for(var n=e.length;n--;)if(eq(e[n][0],t))return n;return-1}var splice$1=Array.prototype.splice;function listCacheDelete(e){var t=this.__data__,n=assocIndexOf(t,e);return n<0?!1:(n==t.length-1?t.pop():splice$1.call(t,n,1),--this.size,!0)}function listCacheGet(e){var t=this.__data__,n=assocIndexOf(t,e);return n<0?void 0:t[n][1]}function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var n=this.__data__,r=assocIndexOf(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ListCache(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet;function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function stackGet(e){return this.__data__.get(e)}function stackHas(e){return this.__data__.has(e)}function isObject$1(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var asyncTag=`[object AsyncFunction]`,funcTag$2=`[object Function]`,genTag$1=`[object GeneratorFunction]`,proxyTag=`[object Proxy]`;function isFunction$2(e){if(!isObject$1(e))return!1;var t=baseGetTag(e);return t==funcTag$2||t==genTag$1||t==asyncTag||t==proxyTag}var coreJsData=root$2[`__core-js_shared__`],maskSrcKey=function(){var e=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}var funcToString$1=Function.prototype.toString;function toSource(e){if(e!=null){try{return funcToString$1.call(e)}catch{}try{return e+``}catch{}}return``}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$2=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$9=objectProto$2.hasOwnProperty,reIsNative=RegExp(`^`+funcToString.call(hasOwnProperty$9).replace(reRegExpChar,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function baseIsNative(e){return!isObject$1(e)||isMasked(e)?!1:(isFunction$2(e)?reIsNative:reIsHostCtor).test(toSource(e))}function getValue(e,t){return e?.[t]}function getNative(e,t){var n=getValue(e,t);return baseIsNative(n)?n:void 0}var Map$1=getNative(root$2,`Map`),nativeCreate=getNative(Object,`create`);function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var HASH_UNDEFINED$1=`__lodash_hash_undefined__`,hasOwnProperty$8=Object.prototype.hasOwnProperty;function hashGet(e){var t=this.__data__;if(nativeCreate){var n=t[e];return n===HASH_UNDEFINED$1?void 0:n}return hasOwnProperty$8.call(t,e)?t[e]:void 0}var hasOwnProperty$7=Object.prototype.hasOwnProperty;function hashHas(e){var t=this.__data__;return nativeCreate?t[e]!==void 0:hasOwnProperty$7.call(t,e)}var HASH_UNDEFINED=`__lodash_hash_undefined__`;function hashSet(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=nativeCreate&&t===void 0?HASH_UNDEFINED:t,this}function Hash(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function getMapData(e,t){var n=e.__data__;return isKeyable(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function mapCacheDelete(e){var t=getMapData(this,e).delete(e);return this.size-=+!!t,t}function mapCacheGet(e){return getMapData(this,e).get(e)}function mapCacheHas(e){return getMapData(this,e).has(e)}function mapCacheSet(e,t){var n=getMapData(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function MapCache(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var LARGE_ARRAY_SIZE=200;function stackSet(e,t){var n=this.__data__;if(n instanceof ListCache){var r=n.__data__;if(!Map$1||r.length<LARGE_ARRAY_SIZE-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new MapCache(r)}return n.set(e,t),this.size=n.size,this}function Stack(e){var t=this.__data__=new ListCache(e);this.size=t.size}Stack.prototype.clear=stackClear,Stack.prototype.delete=stackDelete,Stack.prototype.get=stackGet,Stack.prototype.has=stackHas,Stack.prototype.set=stackSet;function arrayEach(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var defineProperty=function(){try{var e=getNative(Object,`defineProperty`);return e({},``,{}),e}catch{}}();function baseAssignValue(e,t,n){t==`__proto__`&&defineProperty?defineProperty(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var hasOwnProperty$6=Object.prototype.hasOwnProperty;function assignValue(e,t,n){var r=e[t];
vendor: 13,255 bytes, line 170
170(!(hasOwnProperty$6.call(e,t)&&eq(r,n))||n===void 0&&!(t in e))&&baseAssignValue(e,t,n)}function copyObject(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var c=t[a],u=r?r(n[c],e[c],c,n,e):void 0;u===void 0&&(u=e[c]),i?baseAssignValue(n,c,u):assignValue(n,c,u)}return n}function baseTimes(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var argsTag$2=`[object Arguments]`;function baseIsArguments(e){return isObjectLike(e)&&baseGetTag(e)==argsTag$2}var objectProto$1=Object.prototype,hasOwnProperty$5=objectProto$1.hasOwnProperty,propertyIsEnumerable$1=objectProto$1.propertyIsEnumerable,isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike(e)&&hasOwnProperty$5.call(e,`callee`)&&!propertyIsEnumerable$1.call(e,`callee`)},isArray=Array.isArray;function stubFalse(){return!1}var freeExports$2=typeof exports==`object`&&exports&&!exports.nodeType&&exports,freeModule$2=freeExports$2&&typeof module==`object`&&module&&!module.nodeType&&module,Buffer$2=freeModule$2&&freeModule$2.exports===freeExports$2?root$2.Buffer:void 0,isBuffer$1=(Buffer$2?Buffer$2.isBuffer:void 0)||stubFalse,MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(e,t){var n=typeof e;return t??=MAX_SAFE_INTEGER$1,!!t&&(n==`number`||n!=`symbol`&&reIsUint.test(e))&&e>-1&&e%1==0&&e<t}var MAX_SAFE_INTEGER=9007199254740991;function isLength(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER}var argsTag$1=`[object Arguments]`,arrayTag$1=`[object Array]`,boolTag$2=`[object Boolean]`,dateTag$2=`[object Date]`,errorTag$1=`[object Error]`,funcTag$1=`[object Function]`,mapTag$4=`[object Map]`,numberTag$2=`[object Number]`,objectTag$2=`[object Object]`,regexpTag$2=`[object RegExp]`,setTag$4=`[object Set]`,stringTag$2=`[object String]`,weakMapTag$2=`[object WeakMap]`,arrayBufferTag$2=`[object ArrayBuffer]`,dataViewTag$3=`[object DataView]`,float32Tag$2=`[object Float32Array]`,float64Tag$2=`[object Float64Array]`,int8Tag$2=`[object Int8Array]`,int16Tag$2=`[object Int16Array]`,int32Tag$2=`[object Int32Array]`,uint8Tag$2=`[object Uint8Array]`,uint8ClampedTag$2=`[object Uint8ClampedArray]`,uint16Tag$2=`[object Uint16Array]`,uint32Tag$2=`[object Uint32Array]`,typedArrayTags={};typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=!0,typedArrayTags[argsTag$1]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag$2]=typedArrayTags[boolTag$2]=typedArrayTags[dataViewTag$3]=typedArrayTags[dateTag$2]=typedArrayTags[errorTag$1]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$4]=typedArrayTags[numberTag$2]=typedArrayTags[objectTag$2]=typedArrayTags[regexpTag$2]=typedArrayTags[setTag$4]=typedArrayTags[stringTag$2]=typedArrayTags[weakMapTag$2]=!1;function baseIsTypedArray(e){return isObjectLike(e)&&isLength(e.length)&&!!typedArrayTags[baseGetTag(e)]}function baseUnary(e){return function(t){return e(t)}}var freeExports$1=typeof exports==`object`&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module==`object`&&module&&!module.nodeType&&module,freeProcess=freeModule$1&&freeModule$1.exports===freeExports$1&&freeGlobal.process,nodeUtil=function(){try{return freeModule$1&&freeModule$1.require&&freeModule$1.require(`util`).types||freeProcess&&freeProcess.binding&&freeProcess.binding(`util`)}catch{}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,hasOwnProperty$4=Object.prototype.hasOwnProperty;function arrayLikeKeys(e,t){var n=isArray(e),r=!n&&isArguments(e),i=!n&&!r&&isBuffer$1(e),a=!n&&!r&&!i&&isTypedArray(e),o=n||r||i||a,c=o?baseTimes(e.length,String):[],u=c.length;for(var K in e)(t||hasOwnProperty$4.call(e,K))&&!(o&&(K==`length`||i&&(K==`offset`||K==`parent`)||a&&(K==`buffer`||K==`byteLength`||K==`byteOffset`)||isIndex(K,u)))&&c.push(K);return c}var objectProto=Object.prototype;function isPrototype(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||objectProto)}var nativeKeys=overArg(Object.keys,Object),hasOwnProperty$3=Object.prototype.hasOwnProperty;function baseKeys(e){if(!isPrototype(e))return nativeKeys(e);var t=[];for(var n in Object(e))hasOwnProperty$3.call(e,n)&&n!=`constructor`&&t.push(n);return t}function isArrayLike(e){return e!=null&&isLength(e.length)&&!isFunction$2(e)}function keys$1(e){return isArrayLike(e)?arrayLikeKeys(e):baseKeys(e)}function baseAssign(e,t){return e&&copyObject(t,keys$1(t),e)}function nativeKeysIn(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var hasOwnProperty$2=Object.prototype.hasOwnProperty;function baseKeysIn(e){if(!isObject$1(e))return nativeKeysIn(e);var t=isPrototype(e),n=[];for(var r in e)(r!=`constructor`||!t&&hasOwnProperty$2.call(e,r))&&n.push(r);return n}function keysIn(e){return isArrayLike(e)?arrayLikeKeys(e,!0):baseKeysIn(e)}function baseAssignIn(e,t){return e&&copyObject(t,keysIn(t),e)}var freeExports=typeof exports==`object`&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module==`object`&&module&&!module.nodeType&&module,Buffer$1=freeModule&&freeModule.exports===freeExports?root$2.Buffer:void 0,allocUnsafe=Buffer$1?Buffer$1.allocUnsafe:void 0;function cloneBuffer(e,t){if(t)return e.slice();var n=e.length,r=allocUnsafe?allocUnsafe(n):new e.constructor(n);return e.copy(r),r}function copyArray(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}function arrayFilter(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function stubArray(){return[]}var propertyIsEnumerable=Object.prototype.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbols=nativeGetSymbols?function(e){return e==null?[]:(e=Object(e),arrayFilter(nativeGetSymbols(e),function(t){return propertyIsEnumerable.call(e,t)}))}:stubArray;function copySymbols(e,t){return copyObject(e,getSymbols(e),t)}function arrayPush(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var getSymbolsIn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)arrayPush(t,getSymbols(e)),e=getPrototype(e);return t}:stubArray;function copySymbolsIn(e,t){return copyObject(e,getSymbolsIn(e),t)}function baseGetAllKeys(e,t,n){var r=t(e);return isArray(e)?r:arrayPush(r,n(e))}function getAllKeys(e){return baseGetAllKeys(e,keys$1,getSymbols)}function getAllKeysIn(e){return baseGetAllKeys(e,keysIn,getSymbolsIn)}var DataView$1=getNative(root$2,`DataView`),Promise$1=getNative(root$2,`Promise`),Set$1=getNative(root$2,`Set`),WeakMap$1=getNative(root$2,`WeakMap`),mapTag$3=`[object Map]`,objectTag$1=`[object Object]`,promiseTag=`[object Promise]`,setTag$3=`[object Set]`,weakMapTag$1=`[object WeakMap]`,dataViewTag$2=`[object DataView]`,dataViewCtorString=toSource(DataView$1),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$1),weakMapCtorString=toSource(WeakMap$1),getTag=baseGetTag;(DataView$1&&getTag(new DataView$1(new ArrayBuffer(1)))!=dataViewTag$2||Map$1&&getTag(new Map$1)!=mapTag$3||Promise$1&&getTag(Promise$1.resolve())!=promiseTag||Set$1&&getTag(new Set$1)!=setTag$3||WeakMap$1&&getTag(new WeakMap$1)!=weakMapTag$1)&&(getTag=function(e){var t=baseGetTag(e),n=t==objectTag$1?e.constructor:void 0,r=n?toSource(n):``;if(r)switch(r){case dataViewCtorString:return dataViewTag$2;case mapCtorString:return mapTag$3;case promiseCtorString:return promiseTag;case setCtorString:return setTag$3;case weakMapCtorString:return weakMapTag$1}return t});var _getTag_default=getTag,hasOwnProperty$1=Object.prototype.hasOwnProperty;function initCloneArray(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&hasOwnProperty$1.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var Uint8Array$1=root$2.Uint8Array;function cloneArrayBuffer(e){var t=new e.constructor(e.byteLength);return new Uint8Array$1(t).set(new Uint8Array$1(e)),t}function cloneDataView(e,t){var n=t?cloneArrayBuffer(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var reFlags=/\w*$/;function cloneRegExp(e){var t=new e.constructor(e.source,reFlags.exec(e));return t.lastIndex=e.lastIndex,t}var symbolProto$1=Symbol$1?Symbol$1.prototype:void 0,symbolValueOf=symbolProto$1?symbolProto$1.valueOf:void 0;function cloneSymbol(e){return symbolValueOf?Object(symbolValueOf.call(e)):{}}function cloneTypedArray(e,t){var n=t?cloneArrayBuffer(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var boolTag$1=`[object Boolean]`,dateTag$1=`[object Date]`,mapTag$2=`[object Map]`,numberTag$1=`[object Number]`,regexpTag$1=`[object RegExp]`,setTag$2=`[object Set]`,stringTag$1=`[object String]`,symbolTag$2=`[object Symbol]`,arrayBufferTag$1=`[object ArrayBuffer]`,dataViewTag$1=`[object DataView]`,float32Tag$1=`[object Float32Array]`,float64Tag$1=`[object Float64Array]`,int8Tag$1=`[object Int8Array]`,int16Tag$1=`[object Int16Array]`,int32Tag$1=`[object Int32Array]`,uint8Tag$1=`[object Uint8Array]`,uint8ClampedTag$1=`[object Uint8ClampedArray]`,uint16Tag$1=`[object Uint16Array]`,uint32Tag$1=`[object Uint32Array]`;function initCloneByTag(e,t,n){var r=e.constructor;switch(t){case arrayBufferTag$1:return cloneArrayBuffer(e);case boolTag$1:case dateTag$1:return new r(+e);case dataViewTag$1:return cloneDataView(e,n);case float32Tag$1:case float64Tag$1:case int8Tag$1:case int16Tag$1:case int32Tag$1:case uint8Tag$1:case uint8ClampedTag$1:case uint16Tag$1:case uint32Tag$1:return cloneTypedArray(e,n);case mapTag$2:return new r;case numberTag$1:case stringTag$1:return new r(e);case regexpTag$1:return cloneRegExp(e);case setTag$2:return new r;case symbolTag$2:return cloneSymbol(e)}}var objectCreate=Object.create,baseCreate=function(){function e(){}return function(t){if(!isObject$1(t))return{};if(objectCreate)return objectCreate(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function initCloneObject(e){return typeof e.constructor==`function`&&!isPrototype(e)?baseCreate(getPrototype(e)):{}}var mapTag$1=`[object Map]`;function baseIsMap(e){return isObjectLike(e)&&_getTag_default(e)==mapTag$1}var nodeIsMap=nodeUtil&&nodeUtil.isMap,isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap,setTag$1=`[object Set]`;function baseIsSet(e){return isObjectLike(e)&&_getTag_default(e)==setTag$1}var nodeIsSet=nodeUtil&&nodeUtil.isSet,isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet,CLONE_DEEP_FLAG$1=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG$2=4,argsTag=`[object Arguments]`,arrayTag=`[object Array]`,boolTag=`[object Boolean]`,dateTag=`[object Date]`,errorTag=`[object Error]`,funcTag=`[object Function]`,genTag=`[object GeneratorFunction]`,mapTag=`[object Map]`,numberTag=`[object Number]`,objectTag=`[object Object]`,regexpTag=`[object RegExp]`,setTag=`[object Set]`,stringTag=`[object String]`,symbolTag$1=`[object Symbol]`,weakMapTag=`[object WeakMap]`,arrayBufferTag=`[object ArrayBuffer]`,dataViewTag=`[object DataView]`,float32Tag=`[object Float32Array]`,float64Tag=`[object Float64Array]`,int8Tag=`[object Int8Array]`,int16Tag=`[object Int16Array]`,int32Tag=`[object Int32Array]`,uint8Tag=`[object Uint8Array]`,uint8ClampedTag=`[object Uint8ClampedArray]`,uint16Tag=`[object Uint16Array]`,uint32Tag=`[object Uint32Array]`,cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag$1]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=!1;function baseClone(e,t,n,r,i,a){var o,c=t&CLONE_DEEP_FLAG$1,u=t&CLONE_FLAT_FLAG,K=t&CLONE_SYMBOLS_FLAG$2;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!isObject$1(e))return e;var Y=isArray(e);if(Y){if(o=initCloneArray(e),!c)return copyArray(e,o)}else{var X=_getTag_default(e),ee=X==funcTag||X==genTag;if(isBuffer$1(e))return cloneBuffer(e,c);if(X==objectTag||X==argsTag||ee&&!i){if(o=u||ee?{}:initCloneObject(e),!c)return u?copySymbolsIn(e,baseAssignIn(o,e)):copySymbols(e,baseAssign(o,e))}else{if(!cloneableTags[X])return i?e:{};o=initCloneByTag(e,X,c)}}a||=new Stack;var te=a.get(e);if(te)return te;a.set(e,o),isSet(e)?e.forEach(function(r){o.add(baseClone(r,t,n,r,e,a))}):isMap(e)&&e.forEach(function(r,i){o.set(i,baseClone(r,t,n,i,e,a))});var ce=Y?void 0:(K?u?getAllKeysIn:getAllKeys:u?keysIn:keys$1)(e);return arrayEach(ce||e,function(r,i){ce&&(i=r,r=e[i]),assignValue(o,i,baseClone(r,t,n,i,e,a))}),o}var CLONE_SYMBOLS_FLAG$1=4;function clone(e){return baseClone(e,CLONE_SYMBOLS_FLAG$1)}function arrayMap(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var symbolTag=`[object Symbol]`;function isSymbol(e){return typeof e==`symbol`||isObjectLike(e)&&baseGetTag(e)==symbolTag}
170var FUNC_ERROR_TEXT=`Expected a function`;function memoize(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(FUNC_ERROR_TEXT);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(memoize.Cache||MapCache),n}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(e){var t=memoize(e,function(e){return n.size===MAX_MEMOIZE_SIZE&&n.clear(),e}),n=t.cache;return t}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(rePropName,function(e,n,r,i){t.push(r?i.replace(reEscapeChar,`$1`):n||e)}),t}),INFINITY$1=1/0;function toKey(e){if(typeof e==`string`||isSymbol(e))return e;var t=e+``;return t==`0`&&1/e==-INFINITY$1?`-0`:t}var INFINITY=1/0,symbolProto=Symbol$1?Symbol$1.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString(e){if(typeof e==`string`)return e;if(isArray(e))return arrayMap(e,baseToString)+``;if(isSymbol(e))return symbolToString?symbolToString.call(e):``;var t=e+``;return t==`0`&&1/e==-INFINITY?`-0`:t}function toString$2(e){return e==null?``:baseToString(e)}function toPath(e){return isArray(e)?arrayMap(e,toKey):isSymbol(e)?[e]:copyArray(stringToPath(toString$2(e)))}var require_react_is_production_min=__commonJSMin((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,c=t?Symbol.for(`react.provider`):60109,u=t?Symbol.for(`react.context`):60110,K=t?Symbol.for(`react.async_mode`):60111,Y=t?Symbol.for(`react.concurrent_mode`):60111,X=t?Symbol.for(`react.forward_ref`):60112,ee=t?Symbol.for(`react.suspense`):60113,te=t?Symbol.for(`react.suspense_list`):60120,ce=t?Symbol.for(`react.memo`):60115,ue=t?Symbol.for(`react.lazy`):60116,de=t?Symbol.for(`react.block`):60121,fe=t?Symbol.for(`react.fundamental`):60117,me=t?Symbol.for(`react.responder`):60118,ge=t?Symbol.for(`react.scope`):60119;function Te(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case K:case Y:case i:case o:case a:case ee:return e;default:switch(e&&=e.$$typeof,e){case u:case X:case ue:case ce:case c:return e;default:return t}}case r:return t}}}function Oe(e){return Te(e)===Y}e.AsyncMode=K,e.ConcurrentMode=Y,e.ContextConsumer=u,e.ContextProvider=c,e.Element=n,e.ForwardRef=X,e.Fragment=i,e.Lazy=ue,e.Memo=ce,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=ee,e.isAsyncMode=function(e){return Oe(e)||Te(e)===K},e.isConcurrentMode=Oe,e.isContextConsumer=function(e){return Te(e)===u},e.isContextProvider=function(e){return Te(e)===c},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return Te(e)===X},e.isFragment=function(e){return Te(e)===i},e.isLazy=function(e){return Te(e)===ue},e.isMemo=function(e){return Te(e)===ce},e.isPortal=function(e){return Te(e)===r},e.isProfiler=function(e){return Te(e)===o},e.isStrictMode=function(e){return Te(e)===a},e.isSuspense=function(e){return Te(e)===ee},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===Y||e===o||e===a||e===ee||e===te||typeof e==`object`&&!!e&&(e.$$typeof===ue||e.$$typeof===ce||e.$$typeof===c||e.$$typeof===u||e.$$typeof===X||e.$$typeof===fe||e.$$typeof===me||e.$$typeof===ge||e.$$typeof===de)},e.typeOf=Te})),require_react_is=__commonJSMin(((e,t)=>{t.exports=require_react_is_production_min()})),require_hoist_non_react_statics_cjs=__commonJSMin(((e,t)=>{var n=require_react_is(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};c[n.ForwardRef]=a,c[n.Memo]=o;function u(e){return n.isMemo(e)?o:c[e.$$typeof]||r}var K=Object.defineProperty,Y=Object.getOwnPropertyNames,X=Object.getOwnPropertySymbols,ee=Object.getOwnPropertyDescriptor,te=Object.getPrototypeOf,ce=Object.prototype;function ue(e,t,n){if(typeof t!=`string`){if(ce){var r=te(t);r&&r!==ce&&ue(e,r,n)}var a=Y(t);X&&(a=a.concat(X(t)));for(var o=u(e),c=u(t),de=0;de<a.length;++de){var fe=a[de];if(!i[fe]&&!(n&&n[fe])&&!(c&&c[fe])&&!(o&&o[fe])){var me=ee(t,fe);try{K(e,fe,me)}catch{}}}}return e}t.exports=ue})),import_hoist_non_react_statics_cjs=__toESM(require_hoist_non_react_statics_cjs()),CLONE_DEEP_FLAG=1,CLONE_SYMBOLS_FLAG=4;function cloneDeep(e){return baseClone(e,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG)}function _extends$1(){return _extends$1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$1.apply(this,arguments)}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function _objectWithoutPropertiesLoose$1(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function _assertThisInitialized$1(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var FormikContext=(0,import_react.createContext)(void 0);FormikContext.displayName=`FormikContext`;var FormikProvider=FormikContext.Provider,FormikConsumer=FormikContext.Consumer;function useFormikContext(){var e=(0,import_react.useContext)(FormikContext);return!e&&warning(!1),e}var isEmptyArray=function(e){return Array.isArray(e)&&e.length===0},isFunction$1=function(e){return typeof e==`function`},isObject=function(e){return typeof e==`object`&&!!e},isInteger=function(e){return String(Math.floor(Number(e)))===e},isString$2=function(e){return Object.prototype.toString.call(e)===`[object String]`},isEmptyChildren=function(e){return import_react.Children.count(e)===0},isPromise=function(e){return isObject(e)&&isFunction$1(e.then)};function getIn(e,t,n,r){r===void 0&&(r=0);for(var i=toPath(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function setIn(e,t,n){for(var r=clone(e),i=r,a=0,o=toPath(t);a<o.length-1;a++){var c=o[a],u=getIn(e,o.slice(0,a+1));if(u&&(isObject(u)||Array.isArray(u)))i=i[c]=clone(u);else{var K=o[a+1];i=i[c]=isInteger(K)&&Number(K)>=0?[]:{}}}return(a===0?e:i)[o[a]]===n?e:(n===void 0?delete i[o[a]]:i[o[a]]=n,a===0&&n===void 0&&delete r[o[a]],r)}function setNestedObjectValues(e,t,n,r){n===void 0&&(n=new WeakMap),r
vendor: 9,401 bytes, line 170
170===void 0&&(r={});for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i],c=e[o];isObject(c)?n.get(c)||(n.set(c,!0),r[o]=Array.isArray(c)?[]:{},setNestedObjectValues(c,t,n,r[o])):r[o]=t}return r}function formikReducer(e,t){switch(t.type){case`SET_VALUES`:return _extends$1({},e,{values:t.payload});case`SET_TOUCHED`:return _extends$1({},e,{touched:t.payload});case`SET_ERRORS`:return(0,import_react_fast_compare.default)(e.errors,t.payload)?e:_extends$1({},e,{errors:t.payload});case`SET_STATUS`:return _extends$1({},e,{status:t.payload});case`SET_ISSUBMITTING`:return _extends$1({},e,{isSubmitting:t.payload});case`SET_ISVALIDATING`:return _extends$1({},e,{isValidating:t.payload});case`SET_FIELD_VALUE`:return _extends$1({},e,{values:setIn(e.values,t.payload.field,t.payload.value)});case`SET_FIELD_TOUCHED`:return _extends$1({},e,{touched:setIn(e.touched,t.payload.field,t.payload.value)});case`SET_FIELD_ERROR`:return _extends$1({},e,{errors:setIn(e.errors,t.payload.field,t.payload.value)});case`RESET_FORM`:return _extends$1({},e,t.payload);case`SET_FORMIK_STATE`:return t.payload(e);case`SUBMIT_ATTEMPT`:return _extends$1({},e,{touched:setNestedObjectValues(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case`SUBMIT_FAILURE`:return _extends$1({},e,{isSubmitting:!1});case`SUBMIT_SUCCESS`:return _extends$1({},e,{isSubmitting:!1});default:return e}}var emptyErrors={},emptyTouched={};function useFormik(e){var t=e.validateOnChange,n=t===void 0||t,r=e.validateOnBlur,i=r===void 0||r,a=e.validateOnMount,o=a!==void 0&&a,c=e.isInitialValid,u=e.enableReinitialize,K=u!==void 0&&u,Y=e.onSubmit,X=_objectWithoutPropertiesLoose$1(e,[`validateOnChange`,`validateOnBlur`,`validateOnMount`,`isInitialValid`,`enableReinitialize`,`onSubmit`]),ee=_extends$1({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:Y},X),te=(0,import_react.useRef)(ee.initialValues),ce=(0,import_react.useRef)(ee.initialErrors||emptyErrors),ue=(0,import_react.useRef)(ee.initialTouched||emptyTouched),de=(0,import_react.useRef)(ee.initialStatus),fe=(0,import_react.useRef)(!1),me=(0,import_react.useRef)({});(0,import_react.useEffect)(function(){return fe.current=!0,function(){fe.current=!1}},[]);var ge=(0,import_react.useState)(0)[1],Te=(0,import_react.useRef)({values:ee.initialValues,errors:ee.initialErrors||emptyErrors,touched:ee.initialTouched||emptyTouched,status:ee.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),Oe=Te.current,Ae=(0,import_react.useCallback)(function(e){var t=Te.current;Te.current=formikReducer(t,e),t!==Te.current&&ge(function(e){return e+1})},[]),ze=(0,import_react.useCallback)(function(e,t){return new Promise(function(n,r){var i=ee.validate(e,t);i==null?n(emptyErrors):isPromise(i)?i.then(function(e){n(e||emptyErrors)},function(e){r(e)}):n(i)})},[ee.validate]),qe=(0,import_react.useCallback)(function(e,t){var n=ee.validationSchema,r=isFunction$1(n)?n(t):n,i=t&&r.validateAt?r.validateAt(t,e):validateYupSchema(e,r);return new Promise(function(e,t){i.then(function(){e(emptyErrors)},function(n){n.name===`ValidationError`?e(yupToFormErrors(n)):t(n)})})},[ee.validationSchema]),Ye=(0,import_react.useCallback)(function(e,t){return new Promise(function(n){return n(me.current[e].validate(t))})},[]),Ze=(0,import_react.useCallback)(function(e){var t=Object.keys(me.current).filter(function(e){return isFunction$1(me.current[e].validate)}),n=t.length>0?t.map(function(t){return Ye(t,getIn(e,t))}):[Promise.resolve(`DO_NOT_DELETE_YOU_WILL_BE_FIRED`)];return Promise.all(n).then(function(e){return e.reduce(function(e,n,r){return n===`DO_NOT_DELETE_YOU_WILL_BE_FIRED`||n&&(e=setIn(e,t[r],n)),e},{})})},[Ye]),Qe=(0,import_react.useCallback)(function(e){return Promise.all([Ze(e),ee.validationSchema?qe(e):{},ee.validate?ze(e):{}]).then(function(e){var t=e[0],n=e[1],r=e[2];return deepmerge_1.all([t,n,r],{arrayMerge})})},[ee.validate,ee.validationSchema,Ze,ze,qe]),et=useEventCallback(function(e){return e===void 0&&(e=Oe.values),Ae({type:`SET_ISVALIDATING`,payload:!0}),Qe(e).then(function(e){return fe.current&&(Ae({type:`SET_ISVALIDATING`,payload:!1}),Ae({type:`SET_ERRORS`,payload:e})),e})});(0,import_react.useEffect)(function(){o&&fe.current===!0&&(0,import_react_fast_compare.default)(te.current,ee.initialValues)&&et(te.current)},[o,et]);var nt=(0,import_react.useCallback)(function(e){var t=e&&e.values?e.values:te.current,n=e&&e.errors?e.errors:ce.current?ce.current:ee.initialErrors||{},r=e&&e.touched?e.touched:ue.current?ue.current:ee.initialTouched||{},i=e&&e.status?e.status:de.current?de.current:ee.initialStatus;te.current=t,ce.current=n,ue.current=r,de.current=i;var a=function(){Ae({type:`RESET_FORM`,payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&typeof e.submitCount==`number`?e.submitCount:0}})};if(ee.onReset){var o=ee.onReset(Oe.values,xt);isPromise(o)?o.then(a):a()}else a()},[ee.initialErrors,ee.initialStatus,ee.initialTouched,ee.onReset]);(0,import_react.useEffect)(function(){fe.current===!0&&!(0,import_react_fast_compare.default)(te.current,ee.initialValues)&&K&&(te.current=ee.initialValues,nt(),o&&et(te.current))},[K,ee.initialValues,nt,o,et]),(0,import_react.useEffect)(function(){K&&fe.current===!0&&!(0,import_react_fast_compare.default)(ce.current,ee.initialErrors)&&(ce.current=ee.initialErrors||emptyErrors,Ae({type:`SET_ERRORS`,payload:ee.initialErrors||emptyErrors}))},[K,ee.initialErrors]),(0,import_react.useEffect)(function(){K&&fe.current===!0&&!(0,import_react_fast_compare.default)(ue.current,ee.initialTouched)&&(ue.current=ee.initialTouched||emptyTouched,Ae({type:`SET_TOUCHED`,payload:ee.initialTouched||emptyTouched}))},[K,ee.initialTouched]),(0,import_react.useEffect)(function(){K&&fe.current===!0&&!(0,import_react_fast_compare.default)(de.current,ee.initialStatus)&&(de.current=ee.initialStatus,Ae({type:`SET_STATUS`,payload:ee.initialStatus}))},[K,ee.initialStatus,ee.initialTouched]);var rt=useEventCallback(function(e){if(me.current[e]&&isFunction$1(me.current[e].validate)){var t=getIn(Oe.values,e),n=me.current[e].validate(t);return isPromise(n)?(Ae({type:`SET_ISVALIDATING`,payload:!0}),n.then(function(e){return e}).then(function(t){Ae({type:`SET_FIELD_ERROR`,payload:{field:e,value:t}}),Ae({type:`SET_ISVALIDATING`,payload:!1})})):(Ae({type:`SET_FIELD_ERROR`,payload:{field:e,value:n}}),Promise.resolve(n))}return ee.validationSchema?(Ae({type:`SET_ISVALIDATING`,payload:!0}),qe(Oe.values,e).then(function(e){return e}).then(function(t){Ae({type:`SET_FIELD_ERROR`,payload:{field:e,value:getIn(t,e)}}),Ae({type:`SET_ISVALIDATING`,payload:!1})})):Promise.resolve()}),it=(0,import_react.useCallback)(function(e,t){var n=t.validate;me.current[e]={validate:n}},[]),at=(0,import_react.useCallback)(function(e){delete me.current[e]},[]),ot=useEventCallback(function(e,t){return Ae({type:`SET_TOUCHED`,payload:e}),(t===void 0?i:t)?et(Oe.values):Promise.resolve()}),st=(0,import_react.useCallback)(function(e){Ae({type:`SET_ERRORS`,payload:e})},[]),ct=useEventCallback(function(e,t){var r=isFunction$1(e)?e(Oe.values):e;return Ae({type:`SET_VALUES`,payload:r}),(t===void 0?n:t)?et(r):Promise.resolve()}),lt=(0,import_react.useCallback)(function(e,t){Ae({type:`SET_FIELD_ERROR`,payload:{field:e,value:t}})},[]),ut=useEventCallback(function(e,t,r){return Ae({type:`SET_FIELD_VALUE`,payload:{field:e,value:t}}),(r===void 0?n:r)?et(setIn(Oe.values,e,t)):Promise.resolve()}),dt=(0,import_react.useCallback)(function(e,t){var n=t,r=e,i;if(!isString$2(e)){e.persist&&e.persist();var a=e.target?e.target:e.currentTarget,o=a.type,c=a.name,u=a.id,K=a.value,Y=a.checked;a.outerHTML;var X=a.options,ee=a.multiple;n=t||c||u,r=/number|range/.test(o)?(i=parseFloat(K),isNaN(i)?``:i):/checkbox/.test(o)?getValueForCheckbox(getIn(Oe.values,n),Y,K):X&&ee?getSelectedValues(X):K}n&&ut(n,r)},[ut,Oe.values]),ft=useEventCallback(function(e){if(isString$2(e))return function(t){return dt(t,e)};dt(e)}),pt=useEventCallback(function(e,t,n){return t===void 0&&(t=!0),Ae({type:`SET_FIELD_TOUCHED`,payload:{field:e,value:t}}),(n===void 0?i:n)?et(Oe.values):Promise.resolve()}),mt=(0,import_react.useCallback)(function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,i=n.id;n.outerHTML,pt(t||r||i,!0)},[pt]),ht=useEventCallback(function(e){if(isString$2(e))return function(t){return mt(t,e)};mt(e)}),gt=(0,import_react.useCallback)(function(e){isFunction$1(e)?Ae({type:`SET_FORMIK_STATE`,payload:e}):Ae({type:`SET_FORMIK_STATE`,payload:function(){return e}})},[]),_t=(0,import_react.useCallback)(function(e){Ae({type:`SET_STATUS`,payload:e})},[]),vt=(0,import_react.useCallback)(function(e){Ae({type:`SET_ISSUBMITTING`,payload:e})},[]),yt=useEventCallback(function(){return Ae({type:`SUBMIT_ATTEMPT`}),et().then(function(e){var t=e instanceof Error;if(!t&&Object.keys(e).length===0){var n;try{if(n=St(),n===void 0)return}catch(e){throw e}return Promise.resolve(n).then(function(e){return fe.current&&Ae({type:`SUBMIT_SUCCESS`}),e}).catch(function(e){if(fe.current)throw Ae({type:`SUBMIT_FAILURE`}),e})}if(fe.current&&(Ae({type:`SUBMIT_FAILURE`}),t))throw e})}),bt=useEventCallback(function(e){e&&e.preventDefault&&isFunction$1(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&isFunction$1(e.stopPropagation)&&e.stopPropagation(),yt().catch(function(e){console.warn(`Warning: An unhandled error was caught from submitForm(
170)`,e)})}),xt={resetForm:nt,validateForm:et,validateField:rt,setErrors:st,setFieldError:lt,setFieldTouched:pt,setFieldValue:ut,setStatus:_t,setSubmitting:vt,setTouched:ot,setValues:ct,setFormikState:gt,submitForm:yt},St=useEventCallback(function(){return Y(Oe.values,xt)}),Ct=useEventCallback(function(e){e&&e.preventDefault&&isFunction$1(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&isFunction$1(e.stopPropagation)&&e.stopPropagation(),nt()}),wt=(0,import_react.useCallback)(function(e){return{value:getIn(Oe.values,e),error:getIn(Oe.errors,e),touched:!!getIn(Oe.touched,e),initialValue:getIn(te.current,e),initialTouched:!!getIn(ue.current,e),initialError:getIn(ce.current,e)}},[Oe.errors,Oe.touched,Oe.values]),Tt=(0,import_react.useCallback)(function(e){return{setValue:function(t,n){return ut(e,t,n)},setTouched:function(t,n){return pt(e,t,n)},setError:function(t){return lt(e,t)}}},[ut,pt,lt]),Et=(0,import_react.useCallback)(function(e){var t=isObject(e),n=t?e.name:e,r=getIn(Oe.values,n),i={name:n,value:r,onChange:ft,onBlur:ht};if(t){var a=e.type,o=e.value,c=e.as,u=e.multiple;a===`checkbox`?o===void 0?i.checked=!!r:(i.checked=!!(Array.isArray(r)&&~r.indexOf(o)),i.value=o):a===`radio`?(i.checked=r===o,i.value=o):c===`select`&&u&&(i.value=i.value||[],i.multiple=!0)}return i},[ht,ft,Oe.values]),Dt=(0,import_react.useMemo)(function(){return!(0,import_react_fast_compare.default)(te.current,Oe.values)},[te.current,Oe.values]),Ot=(0,import_react.useMemo)(function(){return c===void 0||Dt?Oe.errors&&Object.keys(Oe.errors).length===0:c!==!1&&isFunction$1(c)?c(ee):c},[c,Dt,Oe.errors,ee]);return _extends$1({},Oe,{initialValues:te.current,initialErrors:ce.current,initialTouched:ue.current,initialStatus:de.current,handleBlur:ht,handleChange:ft,handleReset:Ct,handleSubmit:bt,resetForm:nt,setErrors:st,setFormikState:gt,setFieldTouched:pt,setFieldValue:ut,setFieldError:lt,setStatus:_t,setSubmitting:vt,setTouched:ot,setValues:ct,submitForm:yt,validateForm:et,validateField:rt,isValid:Ot,dirty:Dt,unregisterField:at,registerField:it,getFieldProps:Et,getFieldMeta:wt,getFieldHelpers:Tt,validateOnBlur:i,validateOnChange:n,validateOnMount:o})}function Formik(e){var t=useFormik(e),n=e.component,r=e.children,i=e.render,a=e.innerRef;return(0,import_react.useImperativeHandle)(a,function(){return t}),(0,import_react.createElement)(FormikProvider,{value:t},n?(0,import_react.createElement)(n,t):i?i(t):r?isFunction$1(r)?r(t):isEmptyChildren(r)?null:import_react.Children.only(r):null)}function yupToFormErrors(e){var t={};if(e.inner){if(e.inner.length===0)return setIn(t,e.path,e.message);for(var n=e.inner,r=Array.isArray(n),i=0,n=r?n:n[Symbol.iterator]();;){var a;if(r){if(i>=n.length)break;a=n[i++]}else{if(i=n.next(),i.done)break;a=i.value}var o=a;getIn(t,o.path)||(t=setIn(t,o.path,o.message))}}return t}function validateYupSchema(e,t,n,r){n===void 0&&(n=!1);var i=prepareDataForValidation(e);return t[n?`validateSync`:`validate`](i,{abortEarly:!1,context:r||i})}function prepareDataForValidation(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);t[r]=Array.isArray(e[r])===!0?e[r].map(function(e){return Array.isArray(e)===!0||isPlainObject$1(e)?prepareDataForValidation(e):e===``?void 0:e}):isPlainObject$1(e[r])?prepareDataForValidation(e[r]):e[r]===``?void 0:e[r]}return t}function arrayMerge(e,t,n){var r=e.slice();return t.forEach(function(t,i){r[i]===void 0?r[i]=n.clone!==!1&&n.isMergeableObject(t)?deepmerge_1(Array.isArray(t)?[]:{},t,n):t:n.isMergeableObject(t)?r[i]=deepmerge_1(e[i],t,n):e.indexOf(t)===-1&&r.push(t)}),r}function getSelectedValues(e){return Array.from(e).filter(function(e){return e.selected}).map(function(e){return e.value})}function getValueForCheckbox(e,t,n){if(typeof e==`boolean`)return!!t;var r=[],i=!1,a=-1;if(Array.isArray(e))r=e,a=e.indexOf(n),i=a>=0;else if(!n||n==`true`||n==`false`)return!!t;return t&&n&&!i?r.concat(n):i?r.slice(0,a).concat(r.slice(a+1)):r}var useIsomorphicLayoutEffect=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?import_react.useLayoutEffect:import_react.useEffect;function useEventCallback(e){var t=(0,import_react.useRef)(e);return useIsomorphicLayoutEffect(function(){t.current=e}),(0,import_react.useCallback)(function(){var e=[...arguments];return t.current.apply(void 0,e)},[])}function useField(e){var t=useFormikContext(),n=t.getFieldProps,r=t.getFieldMeta,i=t.getFieldHelpers,a=t.registerField,o=t.unregisterField,c=isObject(e)?e:{name:e},u=c.name,K=c.validate;(0,import_react.useEffect)(function(){return u&&a(u,{validate:K}),function(){u&&o(u)}},[a,o,u,K]),!u&&warning(!1);var Y=(0,import_react.useMemo)(function(){return i(u)},[i,u]);return[n(c),r(u),Y]}var Form=(0,import_react.forwardRef)(function(e,t){var n=e.action,r=_objectWithoutPropertiesLoose$1(e,[`action`]),i=n??`#`,a=useFormikContext(),o=a.handleReset,c=a.handleSubmit;return(0,import_react.createElement)(`form`,_extends$1({onSubmit:c,ref:t,onReset:o,action:i},r))});Form.displayName=`Form`;var move=function(e,t,n){var r=copyArrayLike(e),i=r[t];return r.splice(t,1),r.splice(n,0,i),r},swap=function(e,t,n){var r=copyArrayLike(e),i=r[t];return r[t]=r[n],r[n]=i,r},insert=function(e,t,n){var r=copyArrayLike(e);return r.splice(t,0,n),r},replace=function(e,t,n){var r=copyArrayLike(e);return r[t]=n,r},copyArrayLike=function(e){if(!e)return[];if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map(function(e){return parseInt(e)}).reduce(function(e,t){return t>e?t:e},0);return Array.from(_extends$1({},e,{length:t+1}))},createAlterationHandler=function(e,t){var n=typeof e==`function`?e:t;return function(e){return Array.isArray(e)||isObject(e)?n(copyArrayLike(e)):e}},FieldArrayInner=function(e){_inheritsLoose(t,e);function t(t){var n=e.call(this,t)||this;return n.updateArrayField=function(e,t,r){var i=n.props,a=i.name,o=i.formik.setFormikState;o(function(n){var i=createAlterationHandler(r,e),o=createAlterationHandler(t,e),c=setIn(n.values,a,e(getIn(n.values,a))),u=r?i(getIn(n.errors,a)):void 0,K=t?o(getIn(n.touched,a)):void 0;return isEmptyArray(u)&&(u=void 0),isEmptyArray(K)&&(K=void 0),_extends$1({},n,{values:c,errors:r?setIn(n.errors,a,u):n.errors,touched:t?setIn(n.touched,a,K):n.touched})})},n.push=function(e){return n.updateArrayField(function(t){return[].concat(copyArrayLike(t),[cloneDeep(e)])},!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField(function(n){return swap(n,e,t)},!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField(function(n){return move(n,e,t)},!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField(function(n){return insert(n,e,t)},function(t){return insert(t,e,null)},function(t){return insert(t,e,null)})},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField(function(n){return replace(n,e,t)},!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField(function(n){var r=n?[e].concat(n):[e];return t=r.length,r},function(e){return e?[null].concat(e):[null]},function(e){return e?[null].concat(e):[null]}),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(_assertThisInitialized$1(n)),n.pop=n.pop.bind(_assertThisInitialized$1(n)),n}var n=t.prototype;return n.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!(0,import_react_fast_compare.default)(getIn(e.formik.values,e.name),getIn(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(e){var t;return this.updateArrayField(function(n){var r=n?copyArrayLike(n):[];return t||=r[e],isFunction$1(r.splice)&&r.splice(e,1),isFunction$1(r.every)&&r.every(function(e){return e===void 0})?[]:r},!0,!0),t},n.pop=function(){var e;return this.updateArrayField(function(t){var n=t.slice();return e||=n&&n.pop&&n.pop(),n},!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,r=t.render,i=t.children,a=t.name,o=t.formik,c=_objectWithoutPropertiesLoose$1(o,[`validate`,`validationSchema`]),u=_extends$1({},e,{form:c,name:a});return n?(0,import_react.createElement)(n,u):r?r(u):i?typeof i==`function`?i(u):isEmptyChildren(i)?null:import_react.Children.only(i):null},t}(import_react.Component);FieldArrayInner.defaultProps={validateOnChange:!0};var require_loglevel=__commonJSMin(((e,t)=>{(function(e,n){typeof define==`function`&&define.amd?define(n):typeof t==`object`&&t.exports?t.exports=n():e.log=n()})(e,function(){var e=function(){},t=`undefined`,n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=[`trace`,`debug`,`info`,`warn`,`error`];function i(e,t){var n=e[t];if(typeof n.bind==`function`)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch{return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function o(r){return r===`debug`&&(r=`log`),typeof console===t?!1:r===`trace`&&n?a:console[r]===void 0?console.log===void 0?e:i(console,`log`):i(console,r)}function c(t,n){for(var i=0;i<r.length;i++){var a=r[i];this[a]=i<t?e:this.methodFactory(a,t,n)}this.log=this.debug}function u(e,n,r){return function(){typeof console!==t&&(c.call(this,n,r),this[e].apply(this,arguments))}}function K(e,t,n){return o(e)||u.apply(this,arguments)}function Y(e,n,i){var a=this,o;n??=`WARN`;var u=`loglevel`;typeof e==`string`?u+=`:`+e:typeof e==`symbol`&&(u=void 0);function Y(e){var n=(r[e]||`silent`).toUpperCase();if(typeof window!==t&&u){try{window.localStorage[u]=n;return}catch{}try{window.document.cookie=encodeURIComponent(u)+`=`+n+`;`}catch{}}}function X(){var e;if(typeof window!==t&&u){try{e=window.localStorage[u]}catch{}if(typeof e===t)try{var n=window.document.cookie,r=n.indexOf(encodeURIComponent(u)+`=`);r!==-1&&(e=/^([^;]+)/.exec(n.slice(r))[1])}catch{}return a.levels[e]===void 0&&(e=void 0),e}}function ee(){if(typeof window!==t&&u){try{window.localStorage.removeItem(u);return}catch{}try{window.document.cookie=encodeURIComponent(u)+`=; expires=Thu, 01 Jan 1970 00:00:00 UTC`}catch{}}}a.name=e,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=i||K,a.getLevel=function(){return o},a.setLevel=function(n,r){if(typeof n==`string`&&a.levels[n.toUpperCase()]!==void 0&&(n=a.levels[n.toUpperCase()]),typeof n==`
170number`&&n>=0&&n<=a.levels.SILENT){if(o=n,r!==!1&&Y(n),c.call(a,n,e),typeof console===t&&n<a.levels.SILENT)return`No console available for logging`}else throw`log.setLevel() called with invalid level: `+n},a.setDefaultLevel=function(e){n=e,X()||a.setLevel(e,!1)},a.resetLevel=function(){a.setLevel(n,!1),ee()},a.enableAll=function(e){a.setLevel(a.levels.TRACE,e)},a.disableAll=function(e){a.setLevel(a.levels.SILENT,e)};var te=X();te??=n,a.setLevel(te,!1)}var X=new Y,ee={};X.getLogger=function(e){if(typeof e!=`symbol`&&typeof e!=`string`||e===``)throw TypeError(`You must supply a name when creating a logger.`);var t=ee[e];return t||=ee[e]=new Y(e,X.getLevel(),X.methodFactory),t};var te=typeof window===t?void 0:window.log;return X.noConflict=function(){return typeof window!==t&&window.log===X&&(window.log=te),X},X.getLoggers=function(){return ee},X.default=X,X})})),require_base64_js=__commonJSMin((e=>{e.fromByteArray=u;for(var t=[],n=[],r=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,i=0,a=r.length;i<a;++i)t[i]=r[i],n[r.charCodeAt(i)]=i;n[45]=62,n[95]=63;function o(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function c(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(o(r));return i.join(``)}function u(e){for(var n,r=e.length,i=r%3,a=[],o=16383,u=0,K=r-i;u<K;u+=o)a.push(c(e,u,u+o>K?K:u+o));return i===1?(n=e[r-1],a.push(t[n>>2]+t[n<<4&63]+`==`)):i===2&&(n=(e[r-2]<<8)+e[r-1],a.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+`=`)),a.join(``)}})),import_base64_js=require_base64_js();function asyncGeneratorStep(e,t,n,r,i,a,o){try{var c=e[a](o),u=c.value}catch(e){n(e);return}c.done?t(u):Promise.resolve(u).then(r,i)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){asyncGeneratorStep(a,r,i,o,c,`next`,e)}function c(e){asyncGeneratorStep(a,r,i,o,c,`throw`,e)}o(void 0)})}}function _classCallCheck(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function _typeof(e){"@babel/helpers - typeof";return _typeof=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},_typeof(e)}function toPrimitive(e,t){if(_typeof(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(_typeof(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function toPropertyKey(e){var t=toPrimitive(e,`string`);return _typeof(t)==`symbol`?t:String(t)}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,toPropertyKey(r.key),r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,n){return t=toPropertyKey(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var require_typeof=__commonJSMin(((e,t)=>{function n(e){"@babel/helpers - typeof";return t.exports=n=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},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),require_regeneratorRuntime=__commonJSMin(((e,t)=>{var n=require_typeof().default;function r(){t.exports=r=function(){return i},t.exports.__esModule=!0,t.exports.default=t.exports;var e,i={},a=Object.prototype,o=a.hasOwnProperty,c=Object.defineProperty||function(e,t,n){e[t]=n.value},u=typeof Symbol==`function`?Symbol:{},K=u.iterator||`@@iterator`,Y=u.asyncIterator||`@@asyncIterator`,X=u.toStringTag||`@@toStringTag`;function ee(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{ee({},``)}catch{ee=function(e,t,n){return e[t]=n}}function te(e,t,n,r){var i=t&&t.prototype instanceof Te?t:Te,a=Object.create(i.prototype);return c(a,`_invoke`,{value:nt(e,n,new ot(r||[]))}),a}function ce(e,t,n){try{return{type:`normal`,arg:e.call(t,n)}}catch(e){return{type:`throw`,arg:e}}}i.wrap=te;var ue=`suspendedStart`,de=`suspendedYield`,fe=`executing`,me=`completed`,ge={};function Te(){}function Oe(){}function Ae(){}var ze={};ee(ze,K,function(){return this});var qe=Object.getPrototypeOf,Ye=qe&&qe(qe(st([])));Ye&&Ye!==a&&o.call(Ye,K)&&(ze=Ye);var Ze=Ae.prototype=Te.prototype=Object.create(ze);function Qe(e){[`next`,`throw`,`return`].forEach(function(t){ee(e,t,function(e){return this._invoke(t,e)})})}function et(e,t){function r(i,a,c,u){var K=ce(e[i],e,a);if(K.type!==`throw`){var Y=K.arg,X=Y.value;return X&&n(X)==`object`&&o.call(X,`__await`)?t.resolve(X.__await).then(function(e){r(`next`,e,c,u)},function(e){r(`throw`,e,c,u)}):t.resolve(X).then(function(e){Y.value=e,c(Y)},function(e){return r(`throw`,e,c,u)})}u(K.arg)}var i;c(this,`_invoke`,{value:function(e,n){function a(){return new t(function(t,i){r(e,n,t,i)})}return i=i?i.then(a,a):a()}})}function nt(t,n,r){var i=ue;return function(a,o){if(i===fe)throw Error(`Generator is already running`);if(i===me){if(a===`throw`)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var c=r.delegate;if(c){var u=rt(c,r);if(u){if(u===ge)continue;return u}}if(r.method===`next`)r.sent=r._sent=r.arg;else if(r.method===`throw`){if(i===ue)throw i=me,r.arg;r.dispatchException(r.arg)}else r.method===`return`&&r.abrupt(`return`,r.arg);i=fe;var K=ce(t,n,r);if(K.type===`normal`){if(i=r.done?me:de,K.arg===ge)continue;return{value:K.arg,done:r.done}}K.type===`throw`&&(i=me,r.method=`throw`,r.arg=K.arg)}}}function rt(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,r===`throw`&&t.iterator.return&&
vendor: 4,289 bytes, line 170
170(n.method=`return`,n.arg=e,rt(t,n),n.method===`throw`)||r!==`return`&&(n.method=`throw`,n.arg=TypeError(`The iterator does not provide a '`+r+`' method`)),ge;var a=ce(i,t.iterator,n.arg);if(a.type===`throw`)return n.method=`throw`,n.arg=a.arg,n.delegate=null,ge;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,n.method!==`return`&&(n.method=`next`,n.arg=e),n.delegate=null,ge):o:(n.method=`throw`,n.arg=TypeError(`iterator result is not an object`),n.delegate=null,ge)}function it(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function at(e){var t=e.completion||{};t.type=`normal`,delete t.arg,e.completion=t}function ot(e){this.tryEntries=[{tryLoc:`root`}],e.forEach(it,this),this.reset(!0)}function st(t){if(t||t===``){var r=t[K];if(r)return r.call(t);if(typeof t.next==`function`)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(o.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw TypeError(n(t)+` is not iterable`)}return Oe.prototype=Ae,c(Ze,`constructor`,{value:Ae,configurable:!0}),c(Ae,`constructor`,{value:Oe,configurable:!0}),Oe.displayName=ee(Ae,X,`GeneratorFunction`),i.isGeneratorFunction=function(e){var t=typeof e==`function`&&e.constructor;return!!t&&(t===Oe||(t.displayName||t.name)===`GeneratorFunction`)},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,Ae):(e.__proto__=Ae,ee(e,X,`GeneratorFunction`)),e.prototype=Object.create(Ze),e},i.awrap=function(e){return{__await:e}},Qe(et.prototype),ee(et.prototype,Y,function(){return this}),i.AsyncIterator=et,i.async=function(e,t,n,r,a){a===void 0&&(a=Promise);var o=new et(te(e,t,n,r),a);return i.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},Qe(Ze),ee(Ze,X,`Generator`),ee(Ze,K,function(){return this}),ee(Ze,`toString`,function(){return`[object Generator]`}),i.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},i.values=st,ot.prototype={constructor:ot,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method=`next`,this.arg=e,this.tryEntries.forEach(at),!t)for(var n in this)n.charAt(0)===`t`&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type===`throw`)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return c.type=`throw`,c.arg=t,n.next=r,i&&(n.method=`next`,n.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if(a.tryLoc===`root`)return r(`end`);if(a.tryLoc<=this.prev){var u=o.call(a,`catchLoc`),K=o.call(a,`finallyLoc`);if(u&&K){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!K)throw Error(`try statement without catch or finally`);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,`finallyLoc`)&&this.prev<r.finallyLoc){var i=r;break}}i&&(e===`break`||e===`continue`)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method=`next`,this.next=i.finallyLoc,ge):this.complete(a)},complete:function(e,t){if(e.type===`throw`)throw e.arg;return e.type===`break`||e.type===`continue`?this.next=e.arg:e.type===`return`?(this.rval=this.arg=e.arg,this.method=`return`,this.next=`end`):e.type===`normal`&&t&&(this.next=t),ge},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),at(n),ge}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if(r.type===`throw`){var i=r.arg;at(n)}return i}}throw Error(`illegal catch attempt`)},delegateYield:function(t,n,r){return this.delegate={iterator:st(t),resultName:n,nextLoc:r},this.method===`next`&&(this.arg=e),ge}},i}
170t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})),require_regenerator=__commonJSMin(((e,t)=>{var n=require_regeneratorRuntime()();t.exports=n;try{regeneratorRuntime=n}catch{typeof globalThis==`object`?globalThis.regeneratorRuntime=n:Function(`r`,`regeneratorRuntime = r`)(n)}})),import_regenerator=__toESM(require_regenerator());function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function _objectWithoutProperties(e,t){if(e==null)return{};var n=_objectWithoutPropertiesLoose(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _arrayLikeToArray$6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray$6(e)}function _iterableToArray(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function _unsupportedIterableToArray$6(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$6(e,t)}}function _nonIterableSpread(){throw TypeError(`Invalid attempt to spread non-iterable instance.
171In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray$6(e)||_nonIterableSpread()}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,c=[],u=!0,K=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);u=!0);}catch(e){K=!0,i=e}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(K)throw i}}return c}}function _nonIterableRest(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
172In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray$6(e,t)||_nonIterableRest()}var require_browser$1=__commonJSMin(((e,t)=>{t.exports=typeof self==`object`?self.FormData:window.FormData})),require_browser=__commonJSMin(((e,t)=>{var n=null;typeof WebSocket<`u`?n=WebSocket:typeof MozWebSocket<`u`?n=MozWebSocket:typeof global<`u`?n=global.WebSocket||global.MozWebSocket:typeof window<`u`?n=window.WebSocket||window.MozWebSocket:typeof self<`u`&&(n=self.WebSocket||self.MozWebSocket),t.exports=n})),import_browser=__toESM(require_browser$1()),import_browser$1=__toESM(require_browser());function _assertThisInitialized(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _inherits(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _possibleConstructorReturn(e,t){if(t&&(_typeof(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return _assertThisInitialized(e)}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _isNativeFunction(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}function _isNativeReflectConstruct(){if(typeof Reflect>`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _construct(e,t,n){return _construct=_isNativeReflectConstruct()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&_setPrototypeOf(i,n.prototype),i},_construct.apply(null,arguments)}function _wrapNativeSuper(e){var t=typeof Map==`function`?new Map:void 0;return _wrapNativeSuper=function(e){if(e===null||!_isNativeFunction(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(n,e)},_wrapNativeSuper(e)}function isString$1(e){return typeof e==`string`}function isMapStringCallback(e,t){return!!t&&isString$1(e)}function map(e,t){var n=[];if(isString$1(e)&&isMapStringCallback(e,t)){for(var r=0,i=e.length;r<i;r++)if(e.charAt(r)){var a=t(e.charAt(r),r,e);n[r]=a}}else if(!isString$1(e)&&!isMapStringCallback(e,t)){for(var o=0,c=e.length;o<c;o++)if(o in e){var u=e[o],K=t(u,o,e);n[o]=K}}return n}var encodeBase64=function(e){return(0,import_base64_js.fromByteArray)(new Uint8Array(map(e,function(e){return e.charCodeAt(0)})))},decodeBase64=function(e){var t={},n=String.fromCharCode,r=e.length,i,a=0,o,c,u=0,K,Y=``,X=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
172+/`;for(i=0;i<64;i++)t[X.charAt(i)]=i;for(c=0;c<r;c++)for(o=t[e.charAt(c)],a=(a<<6)+o,u+=6;u>=8;)((K=a>>>(u-=8)&255)||c<r-2)&&(Y+=n(K));return Y},Campaign=function(){function e(t,n,r){_classCallCheck(this,e),_defineProperty(this,`id`,void 0),_defineProperty(this,`data`,void 0),_defineProperty(this,`client`,void 0),this.client=t,this.id=n,this.data=r}return _createClass(e,[{key:`create`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r,i,a,o,c,u,K,Y,X;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return Y={id:this.id,message_template:this.data?.message_template,segment_ids:this.data?.segment_ids,sender_id:this.data?.sender_id,sender_mode:this.data?.sender_mode,channel_template:this.data?.channel_template,create_channels:this.data?.create_channels,description:this.data?.description,name:this.data?.name,user_ids:this.data?.user_ids},e.next=3,this.client.createCampaign(Y);case 3:return X=e.sent,this.id=X.campaign.id,this.data=X.campaign,e.abrupt(`return`,X);case 7:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`verifyCampaignId`,value:function(){if(!this.id)throw Error(`Campaign id is missing. Either create the campaign using campaign.create() or set the id during instantiation - const campaign = client.campaign(id)`)}},{key:`start`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.verifyCampaignId(),e.next=3,this.client.startCampaign(this.id,t);case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`update`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.verifyCampaignId(),e.abrupt(`return`,this.client.updateCampaign(this.id,t));case 2:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`delete`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.verifyCampaignId(),e.next=3,this.client.deleteCampaign(this.id);case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`stop`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.verifyCampaignId(),e.abrupt(`return`,this.client.stopCampaign(this.id));case 2:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`get`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.verifyCampaignId(),e.abrupt(`return`,this.client.getCampaign(this.id));case 2:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()}]),e}(),https=null;function ownKeys$e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys$e(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$e(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _createForOfIteratorHelper$5(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray$5(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){throw e}),f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
173In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,c;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){o=!0,c=e}),f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw c}}}}function _unsupportedIterableToArray$5(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$5(e,t)}}function _arrayLikeToArray$5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function logChatPromiseExecution(e,t){e.then().catch(function(e){console.warn(`failed to do ${t}, ran into error: `,e)})}var sleep=function(e){return new Promise(function(t){return setTimeout(t,e)})};function isFunction(e){return e&&(Object.prototype.toString.call(e)===`[object Function]`||typeof e==`function`||e instanceof Function)}var chatCodes={TOKEN_EXPIRED:40,WS_CLOSED_SUCCESS:1e3};function isReadableStream(e){return e!==null&&_typeof(e)===`object`&&(e.readable||typeof e._read==`function`)}function isBuffer(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e)}function isFileWebAPI(e){return typeof window<`u`&&`File`in window&&e instanceof File}function isBlobWebAPI(e){return typeof window<`u`&&`Blob`in window&&e instanceof Blob}function isOwnUserBaseProperty(e){return{channel_mutes:!0,devices:!0,mutes:!0,total_unread_count:!0,unread_channels:!0,unread_count:!0,unread_threads:!0,invisible:!0,privacy_settings:!0,roles:!0,push_preferences:!0}[e]}function addFileToFormData(e,t,n){var r=new import_browser.default;return isReadableStream(e)||isBuffer(e)||isFileWebAPI(e)||isBlobWebAPI(e)?t?r.append(`file`,e,t):r.append(`file`,e):r.append(`file`,{uri:e,name:t||e.split(`/`).reverse()[0],contentType:n||void 0,type:n||void 0}),r}function normalizeQuerySort(e){var t=[],n=_createForOfIteratorHelper$5(Array.isArray(e)?e:[e]),r;try{for(n.s();!(r=n.n()).done;){var i=r.value,a=Object.entries(i);a.length>
1731&&console.warn(`client._buildSort() - multiple fields in a single sort object detected. Object's field order is not guaranteed`);for(var o=0,c=a;o<c.length;o++){var u=_slicedToArray(c[o],2),K=u[0],Y=u[1];t.push({field:K,direction:Y})}}}catch(e){n.e(e)}finally{n.f()}return t}function retryInterval(e){var t=Math.min(500+e*2e3,25e3),n=Math.min(Math.max(250,(e-1)*2e3),25e3);return Math.floor(Math.random()*(t-n)+n)}function randomId(){return generateUUIDv4()}function hex(e){for(var t=``,n=0;n<e.length;n++)t+=e[n].toString(16).padStart(2,`0`);return t}function generateUUIDv4(){var e=getRandomBytes(16);return e[6]=e[6]&15|64,e[8]=e[8]&191|128,hex(e.subarray(0,4))+`-`+hex(e.subarray(4,6))+`-`+hex(e.subarray(6,8))+`-`+hex(e.subarray(8,10))+`-`+hex(e.subarray(10,16))}function getRandomValuesWithMathRandom(e){for(var t=2**(8*e.byteLength/e.length),n=0;n<e.length;n++)e[n]=Math.random()*t}var getRandomValues=function(){var e;return typeof crypto<`u`&&crypto?.getRandomValues!==void 0?crypto.getRandomValues.bind(crypto):typeof msCrypto<`u`?msCrypto.getRandomValues.bind(msCrypto):getRandomValuesWithMathRandom}();function getRandomBytes(e){var t=new Uint8Array(e);return getRandomValues(t),t}function convertErrorToJson(e){var t={};if(!e)return t;try{Object.getOwnPropertyNames(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})}catch{return{error:`failed to serialize the error`}}return t}function isOnline(){var e=typeof navigator<`u`?navigator:typeof window<`u`&&window.navigator?window.navigator:void 0;return e?typeof e.onLine!=`boolean`||e.onLine:(console.warn(`isOnline failed to access window.navigator and assume browser is online`),!0)}function addConnectionEventListeners(e){typeof window<`u`&&window.addEventListener&&(window.addEventListener(`offline`,e),window.addEventListener(`online`,e))}function removeConnectionEventListeners(e){typeof window<`u`&&window.removeEventListener&&(window.removeEventListener(`offline`,e),window.removeEventListener(`online`,e))}var axiosParamsSerializer=function(e){var t=[];for(var n in e)e[n]!==void 0&&(Array.isArray(e[n])||_typeof(e[n])===`object`?t.push(`${n}=${encodeURIComponent(JSON.stringify(e[n]))}`):t.push(`${n}=${encodeURIComponent(e[n])}`));return t.join(`&`)};function formatMessage(e){return _objectSpread$e(_objectSpread$e({},e),{},{__html:e.html,pinned_at:e.pinned_at?new Date(e.pinned_at):null,created_at:e.created_at?new Date(e.created_at):new Date,updated_at:e.updated_at?new Date(e.updated_at):new Date,deleted_at:e.deleted_at?new Date(e.deleted_at):null,status:e.status||`received`,reaction_groups:maybeGetReactionGroupsFallback(e.reaction_groups,e.reaction_counts,e.reaction_scores)})}var findIndexInSortedArray=function(e){var t=e.needle,n=e.sortedArray,r=e.selectKey,i=e.selectValueToCompare,a=i===void 0?function(e){return e}:i,o=e.sortDirection,c=o===void 0?`ascending`:o;if(!n.length)return 0;for(var u=0,K=n.length-1,Y=0,X=function(){Y=Math.round((u+K)/2)},ee=a(t);u<=K;){X();var te=a(n[Y]);c===`ascending`&&ee<te||c===`descending`&&ee>=te?K=Y-1:u=Y+1}if(r){for(var ce=r(t),ue=c===`ascending`?-1:1,de=u+ue;0<=de&&de<n.length&&a(n[de])===ee;de+=ue)if(r(n[de])===ce)return de}return u};function addToMessageList(e,t){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`created_at`,i=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0)||n,a=_toConsumableArray(e);if(n&&(a=a.filter(function(e){return!(e.id&&t.id===e.id)})),a.length===0&&i)return a.concat(t);if(a.length===0)return a;var o=t[r].getTime(),c=a.at(-1)[r].getTime()<o;if(c&&i)return a.concat(t);if(c)return a;var u=findIndexInSortedArray({needle:t,sortedArray:a,sortDirection:`ascending`,selectValueToCompare:function(e){return e[r].getTime()},selectKey:function(e){return e.id}});return!n&&t.id&&a[u]&&t.id===a[u].id?(a[u]=t,a):(i&&a.splice(u,0,t),a)}function maybeGetReactionGroupsFallback(e,t,n){if(e)return e;if(t&&n){for(var r={},i=0,a=Object.keys(t);i<a.length;i++){var o=a[i];r[o]={count:t[o],sum_scores:n[o]}}return r}return null}var throttle=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:200,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.leading,i=r===void 0||r,a=n.trailing,o=a!==void 0&&a,c=null,u=null;return function(){var n=[...arguments];if(c){o&&(u=n);return}i&&e.apply(void 0,n),c=setTimeout(function n(){if(u){e.apply(void 0,_toConsumableArray(u)),u=null,c=setTimeout(n,t);return}c=null},t)}},get=function(e,t){return t.split(`.`).reduce(function(e,t){if(e&&_typeof(e)===`object`&&t in e)return e[t]},e)},uniqBy=function(e,t){if(!Array.isArray(e))return[];var n=new Set;return e.filter(function(e){var r=typeof t==`function`?t(e):get(e,t);return!n.has(r)&&(n.add(r),!0)})};function binarySearchByDateEqualOrNearestGreater(e,t){for(var n=0,r=e.length-1;n<=r;){var i=Math.floor((n+r)/2),a=e[i].created_at;if(!a){n+=1;continue}var o=new Date(a);if(o.getTime()===t.getTime())return i;o.getTime()<t.getTime()?n=i+1:r=i-1}return n}var messagePaginationCreatedAtAround=function(e){var t=e.parentSet,n=e.requestedPageSize,r=e.returnedPage,i=e.messagePaginationOptions,a=_objectSpread$e({},t.pagination);if(!(i!=null&&i.created_at_around))return a;var o,c,u,K,Y=new Date(i.created_at_around),X=[r[0],r.slice(-1)[0]],ee=X[0],te=X[1],ce=!!(ee!=null&&ee.created_at)&&new Date(ee.created_at)>Y,ue=!!(te!=null&&te.created_at)&&new Date(te.created_at)<Y,de=n>t.messages.length&&n>r.length,fe=(n>t.messages.length||t.messages.length>=r.length)&&n>r.length;if(ce)o=!1,u=!0,de&&(c=!1,K=!0);else if(ue)c=!1,K=!0,de&&(o=!1,u=!0);else if(fe)c=o=!1,u=K=!0;
173else{var me,ge,Te=ee?.id&&ee.id===t.messages[0]?.id,Oe=te?.id&&te.id===t.messages.slice(-1)[0]?.id;u=Te,K=Oe;var Ae=Math.floor(r.length/2),ze=binarySearchByDateEqualOrNearestGreater(r,Y);ze!==-1&&(o=Ae<=ze,c=Ae>=ze)}return u&&o!==void 0&&(a.hasPrev=o),K&&c!==void 0&&(a.hasNext=c),a},messagePaginationIdAround=function(e){var t,n,r=e.parentSet,i=e.requestedPageSize,a=e.returnedPage,o=e.messagePaginationOptions,c=_objectSpread$e({},r.pagination),u=(o||{}).id_around;if(!u)return c;var K,Y,X=[a[0],a.slice(-1)[0]],ee=X[0],te=X[1],ce=ee?.id===r.messages[0]?.id,ue=te?.id===r.messages.slice(-1)[0]?.id,de=ce,fe=ue,me=Math.floor(a.length/2);if((i>r.messages.length||r.messages.length>=a.length)&&i>a.length)Y=K=!1,de=fe=!0;else if(!a[me])return c;else if(a[me].id===u)K=Y=!0;else{var ge,Te=[a.slice(0,me),a.slice(me)];K=Y=!0;for(var Oe=0;Oe<Te.length;Oe++)ge=Te[Oe].find(function(e){return e.id===u}),ge&&Oe===0&&(K=!1),ge&&Oe===1&&(Y=!1)}return de&&K!==void 0&&(c.hasPrev=K),fe&&Y!==void 0&&(c.hasNext=Y),c},messagePaginationLinear=function(e){var t,n,r=e.parentSet,i=e.requestedPageSize,a=e.returnedPage,o=e.messagePaginationOptions,c=_objectSpread$e({},r.pagination),u,K,Y=[a[0],a.slice(-1)[0]],X=Y[0],ee=Y[1],te=X?.id&&X.id===r.messages[0]?.id,ce=ee?.id&&ee.id===r.messages.slice(-1)[0]?.id,ue=o&&(o.created_at_after_or_equal||o.created_at_after||o.id_gt||o.id_gte),de=o===void 0||o.created_at_before_or_equal||o.created_at_before||o.id_lt||o.id_lte||o.offset,fe=!ue&&!de&&!(o!=null&&o.id_around)&&!(o!=null&&o.created_at_around),me=a.length>=i;(de!==void 0||fe)&&(u=me),ue!==void 0&&(K=me);var ge=a.length===0;return(te||ge)&&u!==void 0&&(c.hasPrev=u),(ce||ge)&&K!==void 0&&(c.hasNext=K),c},messageSetPagination=function(e){var t,n;if(e.parentSet.messages.length<e.returnedPage.length){var r;return(r=e.logger)==null||r.call(e,`error`,`Corrupted message set state: parent set size < returned page size`),e.parentSet.pagination}return(t=e.messagePaginationOptions)!=null&&t.created_at_around?messagePaginationCreatedAtAround(e):(n=e.messagePaginationOptions)!=null&&n.id_around?messagePaginationIdAround(e):messagePaginationLinear(e)},WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL={},getAndWatchChannel=function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i,a,o,c,u,K,Y;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.channel,r=t.client,i=t.id,a=t.members,o=t.options,c=t.type,n||c){e.next=3;break}throw Error(`Channel or channel type have to be provided to query a channel.`);case 3:if(u=n||r.channel(c,i,{members:a}),K=u.id?u.cid:a&&a.length?generateChannelTempCid(u.type,a):void 0,K){e.next=7;break}throw Error(`Channel ID or channel members array have to be provided to query a channel.`);case 7:if(Y=WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[K],!Y){e.next=13;break}return e.next=11,Y;case 11:e.next=20;break;case 13:return e.prev=13,WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[K]=u.watch(o),e.next=17,WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[K];case 17:return e.prev=17,delete WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[K],e.finish(17);case 20:return e.abrupt(`return`,u);case 21:case`end`:return e.stop()}},e,null,[[13,,17,20]])}));return function(t){return e.apply(this,arguments)}}(),generateChannelTempCid=function(e,t){if(t){var n=_toConsumableArray(t).sort().join(`,`);if(n)return`${e}:!members-${n}`}},isChannelPinned=function(e){if(!e)return!1;var t=e.state.membership;return!!(t!=null&&t.pinned_at)},isChannelArchived=function(e){if(!e)return!1;var t=e.state.membership;return!!(t!=null&&t.archived_at)},shouldConsiderArchivedChannels=function(e){return e?typeof e.archived==`boolean`:!1},extractSortValue=function(e){var t,n,r=e.atIndex,i=e.sort,a=e.targetKey;if(!i)return null;var o=null;if(Array.isArray(i)){var c;o=i[r]??null}else{var u=0;for(var K in i){if(u!==r){u++;continue}if(K!==a)return null;o=i;break}}return o?.[a]??null},shouldConsiderPinnedChannels=function(e){var t=findPinnedAtSortOrder({sort:e});return typeof t==`number`&&Math.abs(t)===1},findPinnedAtSortOrder=function(e){var t=e.sort;return extractSortValue({atIndex:0,sort:t,targetKey:`pinned_at`})},findLastPinnedChannelIndex=function(e){var t=e.channels,n=null,r=_createForOfIteratorHelper$5(t),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;if(!isChannelPinned(a))break;
173typeof n==`number`?n++:n=0}}catch(e){r.e(e)}finally{r.f()}return n},promoteChannel=function(e){var t=e.channels,n=e.channelToMove,r=e.channelToMoveIndexWithinChannels,i=e.sort,a=r??t.findIndex(function(e){return e.cid===n.cid}),o=a>=0,c=a===0,u=shouldConsiderPinnedChannels(i),K=isChannelPinned(n);if(c||u&&K)return t;var Y=_toConsumableArray(t);o&&Y.splice(a,1);var X=null;return u&&(X=findLastPinnedChannelIndex({channels:Y})),Y.splice(typeof X==`number`?X+1:0,0,n),Y},DEFAULT_QUERY_CHANNELS_MESSAGE_LIST_PAGE_SIZE=25,DEFAULT_QUERY_CHANNEL_MESSAGE_LIST_PAGE_SIZE=100,DEFAULT_MESSAGE_SET_PAGINATION={hasNext:!1,hasPrev:!1};function ownKeys$d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$d(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys$d(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ChannelState=function(){function e(t){var n=this,r;_classCallCheck(this,e),_defineProperty(this,`_channel`,void 0),_defineProperty(this,`watcher_count`,void 0),_defineProperty(this,`typing`,void 0),_defineProperty(this,`read`,void 0),_defineProperty(this,`pinnedMessages`,void 0),_defineProperty(this,`pending_messages`,void 0),_defineProperty(this,`threads`,void 0),_defineProperty(this,`mutedUsers`,void 0),_defineProperty(this,`watchers`,void 0),_defineProperty(this,`members`,void 0),_defineProperty(this,`unreadCount`,void 0),_defineProperty(this,`membership`,void 0),_defineProperty(this,`last_message_at`,void 0),_defineProperty(this,`isUpToDate`,void 0),_defineProperty(this,`messageSets`,[]),_defineProperty(this,`formatMessage`,function(e){return formatMessage(e)}),_defineProperty(this,`setIsUpToDate`,function(e){n.isUpToDate=e}),_defineProperty(this,`removeMessageFromArray`,function(e,t){var n=e.filter(function(e){return!(e.id&&t.id&&e.id===t.id)});return{removed:n.length<e.length,result:n}}),_defineProperty(this,`updateUserMessages`,function(e){var t=function(e,t){for(var n=0;n<e.length;n++){var r,i=e[n];i.user?.id===t.id&&(e[n]=_objectSpread$d(_objectSpread$d({},i),{},{user:t}))}};for(var r in n.messageSets.forEach(function(n){return t(n.messages,e)}),n.threads)t(n.threads[r],e);t(n.pinnedMessages,e)}),_defineProperty(this,`deleteUserMessages`,function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=function(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=0;r<e.length;r++){var i,a=e[r];a.user?.id===t.id&&(n?e[r]={cid:a.cid,created_at:a.created_at,deleted_at:t.deleted_at,id:a.id,latest_reactions:[],mentioned_users:[],own_reactions:[],parent_id:a.parent_id,reply_count:a.reply_count,status:a.status,thread_participants:a.thread_participants,type:`deleted`,updated_at:a.updated_at,user:a.user}:e[r]=_objectSpread$d(_objectSpread$d({},a),{},{type:`deleted`,deleted_at:t.deleted_at?new Date(t.deleted_at):null}))}};for(var i in n.messageSets.forEach(function(n){return r(n.messages,e,t)}),n.threads)r(n.threads[i],e,t);r(n.pinnedMessages,e,t)}),this._channel=t,this.watcher_count=0,this.typing={},this.read={},this.initMessages(),this.pinnedMessages=[],this.pending_messages=[],this.threads={},this.mutedUsers=[],this.watchers={},this.members={},this.membership={},this.unreadCount=0,this.isUpToDate=!0,this.last_message_at=t?.state?.last_message_at==null?null:new Date(t.state.last_message_at)}return _createClass(e,[{key:`messages`,get:function(){var e;return this.messageSets.find(function(e){return e.isCurrent})?.messages||[]},set:function(e){var t=this.messageSets.findIndex(function(e){return e.isCurrent});this.messageSets[t].messages=e}},{key:`latestMessages`,get:function(){var e;return this.messageSets.find(function(e){return e.isLatest})?.messages||[]},set:function(e){var t=this.messageSets.findIndex(function(e){return e.isLatest});this.messageSets[t].messages=e}},{key:`messagePagination`,get:function(){var e;return this.messageSets.find(function(e){return e.isCurrent})?.pagination||DEFAULT_MESSAGE_SET_PAGINATION}},{key:`addMessageSorted`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`latest`;return this.addMessagesSorted([e],t,!1,n,r)}},{key:`addMessagesSorted`,value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:`current`,a=this.findTargetMessageSet(e,r,i),o=a.messagesToAdd,c=a.targetMessageSetIndex,u=0;u<o.length;u+=1)if(!o[u].shadowed){var K=o[u].created_at instanceof Date,Y=void 0;if(K)Y=o[u];else{var X;Y=this.formatMessage(o[u]),Y.user&&(X=this._channel)!=null&&X.cid&&this._channel.getClient().state.updateUserReference(Y.user,this._channel.cid),n&&Y.id&&this.threads[Y.id]&&delete this.threads[Y.id],this.last_message_at||=new Date(Y.created_at.getTime()),Y.created_at.getTime()>this.last_message_at.getTime()&&(this.last_message_at=new Date(Y.created_at.getTime()))}var ee=Y.parent_id;if((!ee||Y.show_in_channel)&&c!==-1&&(this.messageSets[c].messages=this._addToMessageList(this.messageSets[c].messages,Y,t,`created_at`,r)),ee&&!n){var te=this.threads[ee]||[];this.threads[ee]=this._addToMessageList(te,Y,t,`created_at`,r)}}return{messageSet:this.messageSets[c]}}},{key:`addPinnedMessages`,value:function(e){for(var t=0;t<e.length;t+=1)this.addPinnedMessage(e[t])}},{key:`addPinnedMessage`,value:function(e){this.pinnedMessages=this._addToMessageList(this.pinnedMessages,this.formatMessage(e),!1,`pinned_at`)}},{key:`removePinnedMessage`,value:function(e){var t=this.removeMessageFromArray(this.pinnedMessages,e).result;this.pinnedMessages=t}},{key:`addReaction`,value:function(e,t,n){var r=this;if(t){var i=t;return this._updateMessage(t,function(t){return i.own_reactions=r._addOwnReactionToMessage(t.own_reactions,e,n),r.formatMessage(i)}),i}}},{key:`_addOwnReactionToMessage`,value:function(e,t,n){return e=n?[]:this._removeOwnReactionFromMessage(e,t),e||=[],this._channel.getClient().userID===t.user_id&&e.push(t),e}},{key:`_removeOwnReactionFromMessage`,value:function(e,t){return e&&e.filter(function(e){return e.user_id!==t.user_id||e.type!==t.type})}},{key:`removeReaction`,value:function(e,t){var n=this;if(t){var r=t;return this._updateMessage(t,function(t){return r.own_reactions=n._removeOwnReactionFromMessage(t.own_reactions,e),n.formatMessage(r)}),r}}},{key:`_updateQuotedMessageReferences`,value:function(e){var t=this,n=e.message,r=e.remove,i=function(e){var t,n;return _objectSpread$d(_objectSpread$d({},e),{},{created_at:e.created_at.toISOString(),pinned_at:e.pinned_at?.toISOString(),updated_at:e.updated_at?.toISOString()})},a=function(e){var a=e.reduce(function(e,t){return t.quoted_message_id===n.id&&e.push(_objectSpread$d(_objectSpread$d({},i(t)),{},{quoted_message:r?_objectSpread$d(_objectSpread$d({},n),{},{attachments:[]}):n})),e},[]);t.addMessagesSorted(a,!0)};n.parent_id?n.parent_id&&this.threads[n.parent_id]&&a(this.threads[n.parent_id]):this.messageSets.forEac
173h(function(e){return a(e.messages)})}},{key:`removeQuotedMessageReferences`,value:function(e){this._updateQuotedMessageReferences({message:e,remove:!0})}},{key:`_updateMessage`,value:function(e,t){var n=e.parent_id,r=e.show_in_channel,i=e.pinned;if(n&&this.threads[n]){var a=this.threads[n],o=a.findIndex(function(t){return t.id===e.id});o!==-1&&(a[o]=t(a[o]),this.threads[n]=a)}if(!r&&!n||r){var c=this.findMessageSetIndex(e);if(c!==-1){var u=this.messageSets[c].messages.findIndex(function(t){return t.id===e.id});u!==-1&&(this.messageSets[c].messages[u]=t(this.messageSets[c].messages[u]))}}if(i){var K=this.pinnedMessages.findIndex(function(t){return t.id===e.id});K!==-1&&(this.pinnedMessages[K]=t(this.pinnedMessages[K]))}}},{key:`_addToMessageList`,value:function(e,t){return addToMessageList(e,t,arguments.length>2&&arguments[2]!==void 0&&arguments[2],arguments.length>3&&arguments[3]!==void 0?arguments[3]:`created_at`,arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0)}},{key:`removeMessage`,value:function(e){var t=!1;if(e.parent_id&&this.threads[e.parent_id]){var n=this.removeMessageFromArray(this.threads[e.parent_id],e),r=n.removed,i=n.result;this.threads[e.parent_id]=i,t=r}else{var a,o=e.messageSetIndex??this.findMessageSetIndex(e);if(o!==-1){var c=this.removeMessageFromArray(this.messageSets[o].messages,e),u=c.removed,K=c.result;this.messageSets[o].messages=K,t=u}}return t}},{key:`filterErrorMessages`,value:function(){var e=this.latestMessages.filter(function(e){return e.type!==`error`});this.latestMessages=e}},{key:`clean`,value:function(){for(var e=new Date,t=0,n=Object.entries(this.typing);t<n.length;t++){var r=_slicedToArray(n[t],2),i=r[0],a=r[1],o=typeof a.received_at==`string`?new Date(a.received_at):a.received_at||new Date;e.getTime()-o.getTime()>7e3&&(delete this.typing[i],this._channel.getClient().dispatchEvent({cid:this._channel.cid,type:`typing.stop`,user:{id:i}}))}}},{key:`clearMessages`,value:function(){this.initMessages(),this.pinnedMessages=[]}},{key:`initMessages`,value:function(){this.messageSets=[{messages:[],isLatest:!0,isCurrent:!0,pagination:DEFAULT_MESSAGE_SET_PAGINATION}]}},{key:`loadMessageIntoState`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i,a,o,c,u,K=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=K.length>2&&K[2]!==void 0?K[2]:25,o=!1,c=!1,u=n||t,t!==`latest`){e.next=10;break}if(this.messages!==this.latestMessages){e.next=7;break}return e.abrupt(`return`);case 7:a=this.messageSets.findIndex(function(e){return e.isLatest}),e.next=11;break;case 10:a=this.findMessageSetIndex({id:u});case 11:if(a!==-1&&(this.switchToMessageSet(a),o=!0),c=!n||!!((r=this.threads[n])!=null&&r.find(function(e){return e.id===t})),!(o&&c)){e.next=15;break}return e.abrupt(`return`);case 15:if(o){e.next=18;break}return e.next=18,this._channel.query({messages:{id_around:u,limit:i}},`new`);case 18:if(c||!n){e.next=21;break}return e.next=21,this._channel.getReplies(n,{id_around:t,limit:i});case 21:a=this.findMessageSetIndex({id:u}),a!==-1&&this.switchToMessageSet(a);case 23:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`findMessage`,value:function(e,t){if(t){var n=this.threads[t];return n?n.find(function(t){return t.id===e}):void 0}var r=this.findMessageSetIndex({id:e});if(r!==-1)return this.messageSets[r].messages.find(function(t){return t.id===e})}},{key:`switchToMessageSet`,value:function(e){var t=this.messageSets.find(function(e){return e.isCurrent});t&&(t.isCurrent=!1,this.messageSets[e].isCurrent=!0)}},{key:`areMessageSetsOverlap`,value:function(e,t){return e.some(function(e){return t.find(function(t){return e.id===t.id})})}},{key:`findMessageSetIndex`,value:function(e){return this.messageSets.findIndex(function(t){return!!t.messages.find(function(t){return t.id===e.id})})}},{key:`findTargetMessageSet`,value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`current`,i=e,a;
173if(n){var o=this.messageSets.map(function(e,t){return t}).filter(function(n){return t.areMessageSetsOverlap(t.messageSets[n].messages,e)});switch(r){case`new`:o.length>0?a=o[0]:e.some(function(e){return!e.parent_id})&&(this.messageSets.push({messages:[],isCurrent:!1,isLatest:!1,pagination:DEFAULT_MESSAGE_SET_PAGINATION}),a=this.messageSets.length-1);break;case`current`:a=this.messageSets.findIndex(function(e){return e.isCurrent});break;case`latest`:a=this.messageSets.findIndex(function(e){return e.isLatest});break;default:a=-1}var c=o.splice(0,1)[0],u=_toConsumableArray(o);if(c!==void 0&&c!==a&&u.push(a),u.length>0){var K=this.messageSets[c],Y=this.messageSets.filter(function(e,t){return u.indexOf(t)!==-1});Y.forEach(function(e){K.isLatest=K.isLatest||e.isLatest,K.isCurrent=K.isCurrent||e.isCurrent,K.pagination.hasPrev=e.messages[0].created_at<K.messages[0].created_at?e.pagination.hasPrev:K.pagination.hasPrev,K.pagination.hasNext=K.messages.slice(-1)[0].created_at<e.messages.slice(-1)[0].created_at?e.pagination.hasNext:K.pagination.hasNext,i=[].concat(_toConsumableArray(i),_toConsumableArray(e.messages))}),Y.forEach(function(e){return t.messageSets.splice(t.messageSets.indexOf(e),1)}),a=this.messageSets.findIndex(function(n){return t.areMessageSetsOverlap(n.messages,e)})}}else a=this.findMessageSetIndex(e[0]);return{targetMessageSetIndex:a,messagesToAdd:i}}}]),e}();function _createForOfIteratorHelper$4(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray$4(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
174In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,c;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,c=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw c}}}}function _unsupportedIterableToArray$4(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$4(e,t)}}function _arrayLikeToArray$4(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ownKeys$c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$c(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys$c(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Channel=function(){function e(t,n,r,i){var a=this;_classCallCheck(this,e),_defineProperty(this,`_client`,void 0),_defineProperty(this,`type`,void 0),_defineProperty(this,`id`,void 0),_defineProperty(this,`data`,void 0),_defineProperty(this,`_data`,void 0),_defineProperty(this,`cid`,void 0),_defineProperty(this,`listeners`,void 0),_defineProperty(this,`state`,void 0),_defineProperty(this,`initialized`,void 0),_defineProperty(this,`offlineMode`,void 0),_defineProperty(this,`lastKeyStroke`,void 0),_defineProperty(this,`lastTypingEvent`,void 0),_defineProperty(this,`isTyping`,void 0),_defineProperty(this,`disconnected`,void 0),_defineProperty(this,`push_preferences`,void 0),_defineProperty(this,`create`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=_objectSpread$c(_objectSpread$c({},t),{},{watch:!1,state:!1,presence:!1}),e.next=3,a.query(n,`latest`);case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`_callChannelListeners`,function(e){var t=a,n=[];t.listeners.all&&n.push.apply(n,_toConsumableArray(t.listeners.all)),t.listeners[e.type]&&n.push.apply(n,_toConsumableArray(t.listeners[e.type]));for(var r=0,i=n;r<i.length;r++){var o=i[r];typeof o!=`string`&&o(e)}}),_defineProperty(this,`_channelURL`,function(){if(!a.id)throw Error(`channel id is not defined`);return`${a.getClient().baseURL}
174/channels/${encodeURIComponent(a.type)}/${encodeURIComponent(a.id)}`});var o=/^[\w_-]+$/,c=/^[\w!_-]+$/;if(!o.test(n))throw Error(`Invalid chat type ${n}, letters, numbers and "_-" are allowed`);if(typeof r==`string`&&!c.test(r))throw Error(`Invalid chat id ${r}, letters, numbers and "!-_" are allowed`);this._client=t,this.type=n,this.id=r,this.data=i,this._data=_objectSpread$c({},i),this.cid=`${n}:${r}`,this.listeners={},this.state=new ChannelState(this),this.initialized=!1,this.offlineMode=!1,this.lastTypingEvent=null,this.isTyping=!1,this.disconnected=!1}return _createClass(e,[{key:`getClient`,value:function(){if(this.disconnected===!0)throw Error(`You can't use a channel after client.disconnect() was called`);return this._client}},{key:`getConfig`,value:function(){return this.getClient().configs[this.cid]}},{key:`sendMessage`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getClient().post(this._channelURL()+`/message`,_objectSpread$c({message:t},n));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`sendFile`,value:function(e,t,n,r){return this.getClient().sendFile(`${this._channelURL()}/file`,e,t,n,r)}},{key:`sendImage`,value:function(e,t,n,r){return this.getClient().sendFile(`${this._channelURL()}/image`,e,t,n,r)}},{key:`deleteFile`,value:function(e){return this.getClient().delete(`${this._channelURL()}/file`,{url:e})}},{key:`deleteImage`,value:function(e){return this.getClient().delete(`${this._channelURL()}/image`,{url:e})}},{key:`sendEvent`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkInitialized(),e.next=3,this.getClient().post(this._channelURL()+`/event`,{event:t});case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`search`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.length>1&&i[1]!==void 0?i[1]:{},!(n.offset&&n.next)){e.next=3;break}throw Error(`Cannot specify offset with next`);case 3:if(r=_objectSpread$c(_objectSpread$c({filter_conditions:{cid:this.cid}},n),{},{sort:n.sort?normalizeQuerySort(n.sort):void 0}),typeof t!=`string`){e.next=8;break}r.query=t,e.next=13;break;case 8:if(_typeof(t)!==`object`){e.next=12;break}r.message_filter_conditions=t,e.next=13;break;case 12:throw Error(`Invalid type ${_typeof(t)} for query parameter`);case 13:return e.next=15,this.getClient().wsPromise;case 15:return e.next=17,this.getClient().get(this.getClient().baseURL+`/search`,{payload:r});case 17:return e.abrupt(`return`,e.sent);case 18:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`queryMembers`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i,a,o,c,u=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>1&&u[1]!==void 0?u[1]:[],i=u.length>2&&u[2]!==void 0?u[2]:{},o=this.type,this.id?a=this.id:(n=this.data)!=null&&n.members&&Array.isArray(this.data.members)&&(c=this.data.members),e.next=6,this.getClient().get(this.getClient().baseURL+`/members`,{payload:_objectSpread$c({type:o,id:a,members:c,sort:normalizeQuerySort(r),filter_conditions:t},i)});case 6:return e.abrupt(`return`,e.sent);case 7:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`partialUpdateMember`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw Error(`Please specify the user id`);case 2:return e.next=4,this.getClient().patch(this._channelURL()+`/member/${encodeURIComponent(t)}`,n);case 4:return e.abrupt(`return`,e.sent);case 5:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`sendReaction`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw Error(`Message id is missing`);case 2:if(n&&Object.keys(n).length!==0){e.next=4;break}throw Error(`Reaction object is missing`);case 4:return e.next=6,this.getClient().post(this.getClient().baseURL+`/messages/${encodeURIComponent(t)}/reaction`,_objectSpread$c({reaction:n},r));case 6:return e.abrupt(`return`,e.sent);case 7:case`end`:return e.stop()}},e,this)}));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:`deleteReaction`,value:function(e,t,n){if(this._checkInitialized(),!t||!e)throw Error(`Deleting a reaction requires specifying both the message and reaction type`);var r=this.getClient().baseURL+`/messages/${encodeURIComponent(e)}/reaction/${encodeURIComponent(t)}`;return n?this.getClient().delete(r,{user_id:n}):this.getClient().delete(r,{})}},{key:`update`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r,i,a=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&a[0]!==void 0?a[0]:{},n=a.length>1?a[1]:void 0,r=a.length>2?a[2]:void 0,i=[`config`,`cid`,`created_by`,`id`,`member_count`,`type`,`created_at`,`updated_at`,`last_message_at`,`own_capabilities`],i.forEac
174h(function(e){delete t[e]}),e.next=7,this._update(_objectSpread$c({message:n,data:t},r));case 7:return e.abrupt(`return`,e.sent);case 8:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`updatePartial`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i,a;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getClient().patch(this._channelURL(),t);case 2:return i=e.sent,a=_toConsumableArray(i.channel.own_capabilities||[]).sort().join()!==_toConsumableArray(Array.isArray(this.data?.own_capabilities)?this.data?.own_capabilities:[]).sort().join(),this.data=i.channel,a&&this.getClient().dispatchEvent({type:`capabilities.changed`,cid:this.cid,own_capabilities:i.channel.own_capabilities}),e.abrupt(`return`,i);case 7:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`enableSlowMode`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getClient().post(this._channelURL(),{cooldown:t});case 2:return n=e.sent,this.data=n.channel,e.abrupt(`return`,n);case 5:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`disableSlowMode`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getClient().post(this._channelURL(),{cooldown:0});case 2:return t=e.sent,this.data=t.channel,e.abrupt(`return`,t);case 5:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`delete`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&n[0]!==void 0?n[0]:{},e.next=3,this.getClient().delete(this._channelURL(),_objectSpread$c({},t));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`truncate`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&n[0]!==void 0?n[0]:{},e.next=3,this.getClient().post(this._channelURL()+`/truncate`,t);case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`acceptInvite`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&n[0]!==void 0?n[0]:{},e.next=3,this._update(_objectSpread$c({accept_invite:!0},t));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`rejectInvite`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&n[0]!==void 0?n[0]:{},e.next=3,this._update(_objectSpread$c({reject_invite:!0},t));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`addMembers`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&i[2]!==void 0?i[2]:{},e.next=3,this._update(_objectSpread$c({add_members:t,message:n},r));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`addModerators`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&i[2]!==void 0?i[2]:{},e.next=3,this._update(_objectSpread$c({add_moderators:t,message:n},r));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`assignRoles`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&i[2]!==void 0?i[2]:{},e.next=3,this._update(_objectSpread$c({assign_roles:t,message:n},r));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()}
174,{key:`inviteMembers`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&i[2]!==void 0?i[2]:{},e.next=3,this._update(_objectSpread$c({invites:t,message:n},r));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`removeMembers`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&i[2]!==void 0?i[2]:{},e.next=3,this._update(_objectSpread$c({remove_members:t,message:n},r));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`demoteModerators`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&i[2]!==void 0?i[2]:{},e.next=3,this._update(_objectSpread$c({demote_moderators:t,message:n},r));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`_update`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getClient().post(this._channelURL(),t);case 2:return n=e.sent,this.data=n.channel,e.abrupt(`return`,n);case 5:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`mute`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&n[0]!==void 0?n[0]:{},e.next=3,this.getClient().post(this.getClient().baseURL+`/moderation/mute/channel`,_objectSpread$c({channel_cid:this.cid},t));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`unmute`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&n[0]!==void 0?n[0]:{},e.next=3,this.getClient().post(this.getClient().baseURL+`/moderation/unmute/channel`,_objectSpread$c({channel_cid:this.cid},t));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`archive`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r,i,a=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=a.length>0&&a[0]!==void 0?a[0]:{},n=this.getClient(),r=t.user_id||n.userID,r){e.next=5;break}throw Error(`A user_id is required for archiving a channel`);case 5:return e.next=7,this.partialUpdateMember(r,{set:{archived:!0}});case 7:return i=e.sent,e.abrupt(`return`,i.channel_member);case 9:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`unarchive`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r,i,a=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=a.length>0&&a[0]!==void 0?a[0]:{},n=this.getClient(),r=t.user_id||n.userID,r){e.next=5;break}throw Error(`A user_id is required for unarchiving a channel`);case 5:return e.next=7,this.partialUpdateMember(r,{set:{archived:!1}});case 7:return i=e.sent,e.abrupt(`return`,i.channel_member);case 9:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`pin`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r,i,a=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=a.length>0&&a[0]!==void 0?a[0]:{},n=this.getClient(),r=t.user_id||n.userID,r){e.next=5;break}throw Error(`A user_id is required for pinning a channel`);case 5:return e.next=7,this.partialUpdateMember(r,{set:{pinned:!0}});case 7:return i=e.sent,e.abrupt(`return`,i.channel_member);case 9:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`unpin`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r,i,a=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=a.length>0&&a[0]!==void 0?a[0]:{},n=this.getClient(),r=t.user_id||n.userID,r){e.next=5;break}throw Error(`A user_id is required for unpinning a channel`);case 5:return e.next=7,this.partialUpdateMember(r,{set:{pinned:!1}
174});case 7:return i=e.sent,e.abrupt(`return`,i.channel_member);case 9:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`muteStatus`,value:function(){return this._checkInitialized(),this.getClient()._muteStatus(this.cid)}},{key:`sendAction`,value:function(e,t){if(this._checkInitialized(),!e)throw Error(`Message id is missing`);return this.getClient().post(this.getClient().baseURL+`/messages/${encodeURIComponent(e)}/action`,{message_id:e,form_data:t,id:this.id,type:this.type})}},{key:`keystroke`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this._isTypingIndicatorsEnabled()){e.next=2;break}return e.abrupt(`return`);case 2:if(r=new Date,i=this.lastTypingEvent&&r.getTime()-this.lastTypingEvent.getTime(),this.lastKeyStroke=r,this.isTyping=!0,!(i===null||i>2e3)){e.next=10;break}return this.lastTypingEvent=new Date,e.next=10,this.sendEvent(_objectSpread$c({type:`typing.start`,parent_id:t},n||{}));case 10:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`updateAIState`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&i[2]!==void 0?i[2]:{},e.next=3,this.sendEvent(_objectSpread$c(_objectSpread$c({},r),{},{type:`ai_indicator.update`,message_id:t,ai_state:n}));case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`clearAIIndicator`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sendEvent({type:`ai_indicator.clear`});case 2:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`stopAIResponse`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sendEvent({type:`ai_indicator.stop`});case 2:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`stopTyping`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this._isTypingIndicatorsEnabled()){e.next=2;break}return e.abrupt(`return`);case 2:return this.lastTypingEvent=null,this.isTyping=!1,e.next=6,this.sendEvent(_objectSpread$c({type:`typing.stop`,parent_id:t},n||{}));case 6:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`_isTypingIndicatorsEnabled`,value:function(){var e,t,n,r,i;return(e=this.getConfig())!=null&&e.typing_events?((n=this.getClient().user)==null||(r=n.privacy_settings)==null?void 0:r.typing_indicators?.enabled)??!0:!1}},{key:`lastMessage`,value:function(){var e=this.state.latestMessages.length-5;e<0&&(e=0);var t=this.state.latestMessages.length+1,n=this.state.latestMessages.slice(e,t);return n.sort(function(e,t){return t.created_at.getTime()-e.created_at.getTime()}),n[0]}},{key:`markRead`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.length>0&&r[0]!==void 0?r[0]:{},this._checkInitialized(),(t=this.getConfig())!=null&&t.read_events||this.getClient()._isUsingServerAuth()){e.next=4;break}return e.abrupt(`return`,Promise.resolve(null));case 4:return e.next=6,this.getClient().post(this._channelURL()+`/read`,_objectSpread$c({},n));case 6:return e.abrupt(`return`,e.sent);case 7:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`markUnread`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this._checkInitialized(),(n=this.getConfig())!=null&&n.read_events||this.getClient()._isUsingServerAuth()){e.
174next=3;break}return e.abrupt(`return`,Promise.resolve(null));case 3:return e.next=5,this.getClient().post(this._channelURL()+`/unread`,_objectSpread$c({},t));case 5:return e.abrupt(`return`,e.sent);case 6:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`clean`,value:function(){this.lastKeyStroke&&new Date().getTime()-this.lastKeyStroke.getTime()>1e3&&this.isTyping&&logChatPromiseExecution(this.stopTyping(),`stop typing event`),this.state.clean()}},{key:`watch`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={state:!0,watch:!0,presence:!1},e.next=3,this.getClient().wsPromise;case 3:return this.getClient()._hasConnectionID()||(n.watch=!1),r=_objectSpread$c(_objectSpread$c({},n),t),e.next=7,this.query(r,`latest`);case 7:return i=e.sent,this.initialized=!0,this.data=i.channel,this._client.logger(`info`,`channel:watch() - started watching channel ${this.cid}`,{tags:[`channel`],channel:this}),e.abrupt(`return`,i);case 12:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`stopWatching`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getClient().post(this._channelURL()+`/stop-watching`,{});case 2:return t=e.sent,this._client.logger(`info`,`channel:watch() - stopped watching channel ${this.cid}`,{tags:[`channel`],channel:this}),e.abrupt(`return`,t);case 5:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`getReplies`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r){var i,a;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=r?normalizeQuerySort(r):void 0,e.next=3,this.getClient().get(this.getClient().baseURL+`/messages/${encodeURIComponent(t)}/replies`,_objectSpread$c({sort:i},n));case 3:return a=e.sent,a.messages&&this.state.addMessagesSorted(a.messages),e.abrupt(`return`,a);case 6:case`end`:return e.stop()}},e,this)}));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:`getPinnedMessages`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&r[1]!==void 0?r[1]:[],e.next=3,this.getClient().get(this._channelURL()+`/pinned_messages`,{payload:_objectSpread$c(_objectSpread$c({},t),{},{sort:normalizeQuerySort(n)})});case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`getReactions`,value:function(e,t){return this.getClient().get(this.getClient().baseURL+`/messages/${encodeURIComponent(e)}/reactions`,_objectSpread$c({},t))}},{key:`getMessagesById`,value:function(e){return this.getClient().get(this._channelURL()+`/messages`,{ids:e.join(`,`)})}},{key:`lastRead`,value:function(){var e=this.getClient().userID;if(e)return this.state.read[e]?this.state.read[e].last_read:null}},{key:`_countMessageAsUnread`,value:function(e){var t,n,r,i;return!(e.shadowed||e.silent||e.parent_id&&!e.show_in_channel||e.user?.id===this.getClient().userID||(n=e.user)!=null&&n.id&&this.getClient().userMuteStatus(e.user.id)||Array.isArray(this.data?.own_capabilities)&&!((i=this.data)!=null&&i.own_capabilities.includes(`read-events`))||this.muteStatus().muted)}},{key:`countUnread`,value:function(e){if(!e)return this.state.unreadCount;for(var t=0,n=0;n<this.state.latestMessages.length;n+=1){var r=this.state.latestMessages[n];r.created_at>e&&this._countMessageAsUnread(r)&&t++}return t}},{key:`countUnreadMentions`,value:function(){for(var e=this.lastRead(),t=this.getClient().userID,n=0,r=0;r<this.state.latestMessages.length;r+=1){var i,a=this.state.latestMessages[r];this._countMessageAsUnread(a)&&(!e||a.created_at>e)&&(i=a.mentioned_users)!=null&&i.some(function(e){return e.id===t})&&n++}return n}},{key:`query`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i,a,o,c,u,K,Y,X,ee,te=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=te.length>1&&te[1]!==void 0?te[1]:`current`,e.next=3,this.getClient().wsPromise;case 3:return c=`${this.getClient().baseURL}
174/channels/${encodeURIComponent(this.type)}`,this.id&&(c+=`/${encodeURIComponent(this.id)}`),e.next=7,this.getClient().post(c+`/query`,_objectSpread$c({data:this._data,state:!0},t));case 7:return u=e.sent,this.id||(this.id=u.channel.id,this.cid=u.channel.cid,K=generateChannelTempCid(this.type,u.members.map(function(e){var t;return e.user_id||e.user?.id||``})),K&&K in this.getClient().activeChannels&&delete this.getClient().activeChannels[K],!(this.cid in this.getClient().activeChannels)&&this.getClient()._cacheEnabled()&&(this.getClient().activeChannels[this.cid]=this)),this.getClient()._addChannelConfig(u.channel),Y=this._initializeState(u,o),X=Y.messageSet,X.pagination=_objectSpread$c(_objectSpread$c({},X.pagination),messageSetPagination({parentSet:X,messagePaginationOptions:t?.messages,requestedPageSize:t?.messages?.limit??DEFAULT_QUERY_CHANNEL_MESSAGE_LIST_PAGE_SIZE,returnedPage:u.messages,logger:this.getClient().logger})),this.getClient().polls.hydratePollCache(u.messages,!0),ee=_toConsumableArray(u.channel.own_capabilities||[]).sort().join()!==_toConsumableArray(Array.isArray(this.data?.own_capabilities)?this.data?.own_capabilities:[]).sort().join(),this.data=u.channel,this.offlineMode=!1,ee&&this.getClient().dispatchEvent({type:`capabilities.changed`,cid:this.cid,own_capabilities:u.channel.own_capabilities}),this.getClient().dispatchEvent({type:`channels.queried`,queriedChannels:{channels:[u],isLatestMessageSet:X.isLatest}}),e.abrupt(`return`,u);case 19:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`banUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkInitialized(),e.next=3,this.getClient().banUser(t,_objectSpread$c(_objectSpread$c({},n),{}
174,{type:this.type,id:this.id}));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`hide`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&r[0]!==void 0?r[0]:null,n=r.length>1&&r[1]!==void 0&&r[1],this._checkInitialized(),e.next=5,this.getClient().post(`${this._channelURL()}/hide`,{user_id:t,clear_history:n});case 5:return e.abrupt(`return`,e.sent);case 6:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`show`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&n[0]!==void 0?n[0]:null,this._checkInitialized(),e.next=4,this.getClient().post(`${this._channelURL()}/show`,{user_id:t});case 4:return e.abrupt(`return`,e.sent);case 5:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`unbanUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkInitialized(),e.next=3,this.getClient().unbanUser(t,{type:this.t
174ype,id:this.id});case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`shadowBan`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkInitialized(),e.next=3,this.getClient().shadowBan(t,_objectSpread$c(_objectSpread$c({},n),{},{type:this.type,id:this.id}));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`removeShadowBan`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkInitialized(),e.next=3,this.getClient().removeShadowBan(t,{type:this.type,id:this.id});case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`createCall`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getClient().post(this._channelURL()+`/call`,t);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`vote`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getClient().castPollVote(t,n,r);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:`removeVote`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getClient().removePollVote(t,n,r);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:`on`,value:function(e,t){var n=this,r=t?e:`all`,i=t||e;return r in this.listeners||(this.listeners[r]=[]),this._client.logger(`info`,`Attaching listener for ${r} event on channel ${this.cid}`,{tags:[`event`,`channel`],channel:this}),this.listeners[r].push(i),{unsubscribe:function(){n._client.logger(`info`,`Removing listener for ${r} event from channel ${n.cid}`,{tags:[`event`,`channel`],channel:n}),n.listeners[r]=n.listeners[r].filter(function(e){return e!==i})}}}},{key:`off`,value:function(e,t){var n=t?e:`all`,r=t||e;n in this.listeners||(this.listeners[n]=[]),this._client.logger(`info`,`Removing listener for ${n} event from channel ${this.cid}`,{tags:[`event`,`channel`],channel:this}),this.listeners[n]=this.listeners[n].filter(function(e){return e!==r})}},{key:`_handleChannelEvent`,value:function(e){var t,n,r,i,a,o,c,u,K,Y,X,ee,te,ce,ue,de=this;this._client.logger(`info`,`channel:_handleChannelEvent - Received event of type { ${e.type} } on ${this.cid}`,{tags:[`event`,`channel`],channel:this});var fe=de.state;switch(e.type){case`typing.start`:(t=e.user)!=null&&t.id&&(fe.typing[e.user.id]=e);break;case`typing.stop`:(n=e.user)!=null&&n.id&&delete fe.typing[e.user.id];break;case`message.read`:if((r=e.user)!=null&&r.id&&e.created_at){var me,ge;fe.read[e.user.id]={last_read:new Date(e.created_at),last_read_message_id:e.last_read_message_id,user:e.user,unread_messages:0},e.user?.id===this.getClient().user?.id&&(fe.unreadCount=0)}break;case`user.watching.start`:case`user.updated`:(i=e.user)!=null&&i.id&&(fe.watchers[e.user.id]=e.user);break;case`user.watching.stop`:(a=e.user)!=null&&a.id&&delete fe.watchers[e.user.id];break;case`message.deleted`:e.message&&(this._extendEventWithOwnReactions(e),e.hard_delete?fe.removeMessage(e.message):fe.addMessageSorted(e.message,!1,!1),fe.removeQuotedMessageReferences(e.message),e.message.pinned&&fe.removePinnedMessage(e.message));break;case`message.new`:if(e.message){var Te,Oe,Ae,ze=e.user?.id===this.getClient().user?.id,qe=e.message.parent_id&&!e.message.show_in_channel;if((this.state.isUpToDate||qe)&&fe.addMessageSorted(e.message,ze),e.message.pinned&&fe.addPinnedMessage(e.message),ze||qe)break;
174if((Ae=e.user)!=null&&Ae.id)for(var Ye in fe.read)Ye===e.user.id?fe.read[e.user.id]={last_read:new Date(e.created_at),user:e.user,unread_messages:0}:fe.read[Ye].unread_messages+=1;this._countMessageAsUnread(e.message)&&(fe.unreadCount+=1)}break;case`message.updated`:case`message.undeleted`:e.message&&(this._extendEventWithOwnReactions(e),fe.addMessageSorted(e.message,!1,!1),fe._updateQuotedMessageReferences({message:e.message}),e.message.pinned?fe.addPinnedMessage(e.message):fe.removePinnedMessage(e.message));break;case`channel.truncated`:if((o=e.channel)!=null&&o.truncated_at){var Ze=+new Date(e.channel.truncated_at);fe.messageSets.forEach(function(e,t){e.messages.forEach(function(e){var n=e.created_at,r=e.id;Ze>+n&&fe.removeMessage({id:r,messageSetIndex:t})})}),fe.pinnedMessages.forEach(function(e){var t=e.id;Ze>+e.created_at&&fe.removePinnedMessage({id:t})})}else fe.clearMessages();fe.unreadCount=0,e.message&&(fe.addMessageSorted(e.message),e.message.pinned&&fe.addPinnedMessage(e.message));break;case`member.added`:case`member.updated`:(c=e.member)!=null&&c.user&&(fe.members=_objectSpread$c(_objectSpread$c({},fe.members),{},_defineProperty({},e.member.user.id,e.member))),typeof fe.membership.user?.id==`string`&&typeof e.member?.user?.id==`string`&&e.member.user.id===fe.membership.user.id&&(fe.membership=e.member);break;case`member.removed`:if((X=e.user)!=null&&X.id){var Qe=_objectSpread$c({},fe.members);delete Qe[e.user.id],fe.members=Qe}break;case`notification.mark_unread`:var et,nt,rt;if(!(e.user?.id===this.getClient().user?.id&&e.user))break;var it=e.unread_messages??0;fe.read[e.user.id]={first_unread_message_id:e.first_unread_message_id,last_read:new Date(e.last_read_at),last_read_message_id:e.last_read_message_id,user:e.user,unread_messages:it},fe.unreadCount=it;break;case`channel.updated`:if(e.channel){var at,ot,st,ct,lt,ut,dt,ft;e.channel?.frozen!==void 0&&e.channel.frozen!==de.data?.frozen&&this.query({state:!1,messages:{limit:0},watchers:{limit:0}}),de.data=_objectSpread$c(_objectSpread$c({},e.channel),{},{hidden:e.channel?.hidden??de.data?.hidden,own_capabilities:e.channel?.own_capabilities??de.data?.own_capabilities})}break;case`reaction.new`:e.message&&e.reaction&&(e.message=fe.addReaction(e.reaction,e.message));break;case`reaction.deleted`:e.reaction&&(e.message=fe.removeReaction(e.reaction,e.message));break;case`reaction.updated`:e.reaction&&(e.message=fe.addReaction(e.reaction,e.message,!0));break;case`channel.hidden`:de.data=_objectSpread$c(_objectSpread$c({},de.data),{},{hidden:!0}),e.clear_history&&fe.clearMessages();break;case`channel.visible`:de.data=_objectSpread$c(_objectSpread$c({},de.data),{},{hidden:!1});break;case`user.banned`:if(!((ee=e.user)!=null&&ee.id))break;fe.members[e.user.id]=_objectSpread$c(_objectSpread$c({},fe.members[e.user.id]||{}),{},{shadow_banned:!!e.shadow,banned:!e.shadow,user:_objectSpread$c(_objectSpread$c({},fe.members[e.user.id]?.user||{}),e.user)});break;case`user.unbanned`:if(!((ce=e.user)!=null&&ce.id))break;fe.members[e.user.id]=_objectSpread$c(_objectSpread$c({},fe.members[e.user.id]||{}),{},{shadow_banned:!1,banned:!1,user:_objectSpread$c(_objectSpread$c({},fe.members[e.user.id]?.user||{}),e.user)})}e.watcher_count!==void 0&&(de.state.watcher_count=e.watcher_count)}},{key:`_checkInitialized`,value:function(){if(!this.initialized&&!this.offlineMode&&!this.getClient()._isUsingServerAuth())throw Error(`Channel ${this.cid} hasn't been initialized yet. Make sure to call .watch() and wait for it to resolve`)}},{key:`_initializeState`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`latest`,n=this.getClient(),r=n.state,i=n.user,a=n.userID;if(e.members){this._hydrateMembers({members:e.members});var o=_createForOfIteratorHelper$4(e.members),c;try{for(o.s();!(c=o.n()).done;){var u=c.value;u.user&&r.updateUserReference(u.user,this.cid)}}catch(e){o.e(e)}finally{o.f()}}this.state.membership=e.membership||{};var K=e.messages||[];this.state.messages||this.state.initMessages();var Y=this.state.addMessagesSorted(K,!1,!0,!0,t).messageSet;if(this.state.pinnedMessages||(this.state.pinnedMessages=[]),this.state.addPinnedMessages(e.pinned_messages||[]),e.pending_messages&&(this.state.pending_messages=e.pending_messages),e.watcher_count!==void 0&&(this.state.watcher_count=e.watcher_count),e.watchers){var X=_createForOfIteratorHelper$4(e.watchers),ee;try{for(X.s();!(ee=X.n()).done;){var te=ee.value;te&&(r.updateUserReference(te,this.cid),this.state.watchers[te.id]=te)}}catch(e){X.e(e)}finally{X.f()}}
174if(a!=null){var ce=this.state.last_message_at||new Date;i&&(this.state.read[i.id]={user:i,last_read:ce,unread_messages:0})}if(e.read){var ue=_createForOfIteratorHelper$4(e.read),de;try{for(ue.s();!(de=ue.n()).done;){var fe,me=de.value;this.state.read[me.user.id]={last_read:new Date(me.last_read),last_read_message_id:me.last_read_message_id,unread_messages:me.unread_messages??0,user:me.user},me.user.id===i?.id&&(this.state.unreadCount=this.state.read[me.user.id].unread_messages)}}catch(e){ue.e(e)}finally{ue.f()}}return{messageSet:Y}}},{key:`_extendEventWithOwnReactions`,value:function(e){if(e.message){var t=this.state.findMessage(e.message.id,e.message.parent_id);t&&(e.message.own_reactions=t.own_reactions)}}},{key:`_hydrateMembers`,value:function(e){var t=e.members,n=e.overrideCurrentState,r=n===void 0||n,i=t.reduce(function(e,t){return t.user&&(e[t.user.id]=t),e},{});r?this.state.members=i:!r&&t.length&&(this.state.members=_objectSpread$c(_objectSpread$c({},this.state.members),i))}},{key:`_disconnect`,value:function(){this._client.logger(`info`,`channel:disconnect() - Disconnecting the channel ${this.cid}`,{tags:[`connection`,`channel`],channel:this}),this.disconnected=!0,this.state.setIsUpToDate(!1)}}]),e}();function _createForOfIteratorHelper$3(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray$3(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
175In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,c;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,c=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw c}}}}function _unsupportedIterableToArray$3(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$3(e,t)}}function _arrayLikeToArray$3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ClientState=function(){function e(t){var n=t.client;_classCallCheck(this,e),_defineProperty(this,`client`,void 0),_defineProperty(this,`users`,void 0),_defineProperty(this,`userChannelReferences`,void 0),this.client=n,this.users={},this.userChannelReferences={}}return _createClass(e,[{key:`updateUsers`,value:function(e){var t=_createForOfIteratorHelper$3(e),n;try{for(t.s();!(n=t.n()).done;){var r=n.value;this.updateUser(r)}}catch(e){t.e(e)}finally{t.f()}}},{key:`updateUser`,value:function(e){e!=null&&this.client._cacheEnabled()&&(this.users[e.id]=e)}},{key:`updateUserReference`,value:function(e,t){e!=null&&this.client._cacheEnabled()&&(this.updateUser(e),this.userChannelReferences[e.id]||(this.userChannelReferences[e.id]={}),this.userChannelReferences[e.id][t]=!0)}},{key:`deleteAllChannelReference`,value:function(e){for(var t in this.userChannelReferences)delete this.userChannelReferences[t][e]}}]),e}();function ownKeys$b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$b(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys$b(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var InsightMetrics=function e(){_classCallCheck(this,e),_defineProperty(this,`connectionStartTimestamp`,void 0),_defineProperty(this,`wsConsecutiveFailures`,void 0),_defineProperty(this,`wsTotalFailures`,void 0),_defineProperty(this,`instanceClientId`,void 0),this.connectionStartTimestamp=null,this.wsTotalFailures=0,this.wsConsecutiveFailures=0,this.instanceClientId=randomId()},postInsights=function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=3,i=0;case 2:if(!(i<r)){e.next=17;break}return e.prev=3,e.next=6,axios.post(`https://chat-insights.getstream.io/insights/${t}`,n);case 6:e.next=13;break;case 8:return e.prev=8,e.t0=e.catch(3),e.next=12,sleep((i+1)*3e3);case 12:return e.abrupt(`continue`,14);case 13:return e.abrupt(`break`,17);case 14:i++,e.next=2;break;case 17:case`end`:return e.stop()}},e,null,[[3,8]])}));return function(t,n){return e.apply(this,arguments)}}();function buildWsFatalInsight(e,t){return _objectSpread$b(_objectSpread$b({},t),buildWsBaseInsight(e))}function buildWsBaseInsight(e){var t,n,r,i=e.client;return{ready_state:e.ws?.readyState,url:e._buildUrl(),api_key:i.key,start_ts:i.insightMetrics.connectionStartTimestamp,end_ts:new Date().getTime(),auth_type:i.getAuthType(),token:i.tokenManager.token,user_id:i.userID,user_details:i._user,device:i.options.device,client_id:e.connectionID,ws_details:e.ws,ws_consecutive_failures:i.insightMetrics.wsConsecutiveFailures,ws_total_failures:i.insightMetrics.wsTotalFailures,request_id:e.requestID,online:typeof navigator<`u`?navigator?.onLine:null,user_agent:typeof navigator<`u`?navigator?.userAgent:null,instance_client_id:i.insightMetrics.instanceClientId}}function buildWsSuccessAfterFailureInsight(e){return buildWsBaseInsight(e)}function ownKeys$a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$a(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
175t%2?ownKeys$a(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var isCloseEvent=function(e){return e.code!==void 0},isErrorEvent=function(e){return e.error!==void 0},StableWSConnection=function(){function e(t){var n=this,r=t.client;_classCallCheck(this,e),_defineProperty(this,`client`,void 0),_defineProperty(this,`connectionID`,void 0),_defineProperty(this,`connectionOpen`,void 0),_defineProperty(this,`consecutiveFailures`,void 0),_defineProperty(this,`pingInterval`,void 0),_defineProperty(this,`healthCheckTimeoutRef`,void 0),_defineProperty(this,`isConnecting`,void 0),_defineProperty(this,`isDisconnected`,void 0),_defineProperty(this,`isHealthy`,void 0),_defineProperty(this,`isResolved`,void 0),_defineProperty(this,`lastEvent`,void 0),_defineProperty(this,`connectionCheckTimeout`,void 0),_defineProperty(this,`connectionCheckTimeoutRef`,void 0),_defineProperty(this,`rejectPromise`,void 0),_defineProperty(this,`requestID`,void 0),_defineProperty(this,`resolvePromise`,void 0),_defineProperty(this,`totalFailures`,void 0),_defineProperty(this,`ws`,void 0),_defineProperty(this,`wsID`,void 0),_defineProperty(this,`_buildUrl`,function(){var e=encodeURIComponent(n.client._buildWSPayload(n.requestID)),t=n.client.tokenManager.getToken();return`${n.client.wsBaseURL}/connect?json=${e}&api_key=${n.client.key}&authorization=${t}&stream-auth-type=${n.client.getAuthType()}&X-Stream-Client=${n.client.getUserAgent()}`}),_defineProperty(this,`onlineStatusChanged`,function(e){e.type===`offline`?(n._log(`onlineStatusChanged() - Status changing to offline`),n._setHealth(!1)):e.type===`online`&&(n._log(`onlineStatusChanged() - Status changing to online. isHealthy: ${n.isHealthy}`),n.isHealthy||n._reconnect({interval:10}))}),_defineProperty(this,`onopen`,function(e){n.wsID===e&&n._log(`onopen() - onopen callback`,{wsID:e})}),_defineProperty(this,`onmessage`,function(e,t){if(n.wsID===e){n._log(`onmessage() - onmessage callback`,{event:t,wsID:e});var r=typeof t.data==`string`?JSON.parse(t.data):null;if(!n.isResolved&&r){var i;if(n.isResolved=!0,r.error){var a;(a=n.rejectPromise)==null||a.call(n,n._errorFromWSEvent(r,!1));return}(i=n.resolvePromise)==null||i.call(n,r),n._setHealth(!0)}n.lastEvent=new Date,r&&r.type===`health.check`&&n.scheduleNextPing(),n.client.handleEvent(t),n.scheduleConnectionCheck()}}),_defineProperty(this,`onclose`,function(e,t){if(n.wsID===e){if(n._log(`onclose() - onclose callback - `+t.code,{event:t,wsID:e}),t.code===chatCodes.WS_CLOSED_SUCCESS){var r,i=Error(`WS connection reject with error ${t.reason}`);i.reason=t.reason,i.code=t.code,i.wasClean=t.wasClean,i.target=t.target,(r=n.rejectPromise)==null||r.call(n,i),n._log(`onclose() - WS connection reject with error ${t.reason}`,{event:t})}else{var a;n.consecutiveFailures+=1,n.totalFailures+=1,n._setHealth(!1),n.isConnecting=!1,(a=n.rejectPromise)==null||a.call(n,n._errorFromWSEvent(t)),n._log(`onclose() - WS connection closed. Calling reconnect ...`,{event:t}),n._reconnect()}}}),_defineProperty(this,`onerror`,function(e,t){var r;n.wsID===e&&(n.consecutiveFailures+=1,n.totalFailures+=1,n._setHealth(!1),n.isConnecting=!1,(r=n.rejectPromise)==null||r.call(n,n._errorFromWSEvent(t)),n._log(`onerror() - WS connection resulted into error`,{event:t}),n._reconnect())}),_defineProperty(this,`_setHealth`,function(e){if(e!==n.isHealthy){if(n.isHealthy=e,n.isHealthy){n.client.dispatchEvent({type:`connection.changed`,online:n.isHealthy});return}setTimeout(function(){n.isHealthy||n.client.dispatchEvent({type:`connection.changed`,online:n.isHealthy})},5e3)}}),_defineProperty(this,`_errorFromWSEvent`,function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r,i,a;isCloseEvent(e)&&(r=e.code,i=`unknown`,a=e.reason),isErrorEvent(e)&&(r=e.error.code,i=e.error.StatusCode,a=e.error.message),n._log(`_errorFromWSEvent() - WS failed with code ${r}`,{event:e},`warn`);var o=Error(`WS failed with code ${r} and reason - ${a}`);return o.code=r,o.StatusCode=i,o.isWSFailure=t,o}),_defineProperty(this,`_setupConnectionPromise`,function(){n.isResolved=!1,n.connectionOpen=new Promise(function(e,t){n.resolvePromise=e,n.rejectPromise=t})}),_defineProperty(this,`scheduleNextPing`,function(){n.healthCheckTimeoutRef&&clearTimeout(n.healthCheckTimeoutRef),n.healthCheckTimeoutRef=setTimeout(function(){var e=[{type:`health.check`,client_id:n.client.clientID}];try{var t;(t=n.ws)==null||t.send(JSON.stringify(e))}catch{}},n.pingInterval)}),_defineProperty(this,`scheduleConnectionCheck`,function(){n.connectionCheckTimeoutRef&&clearTimeout(n.connectionCheckTimeoutRef),n.connectionCheckTimeoutRef=setTimeout(function(){var e=new Date;n.lastEvent&&e.getTime()-n.lastEvent.getTime()>n.connectionCheckTimeout&&(n._log(`scheduleConnectionCheck - going to re
175connect`),n._setHealth(!1),n._reconnect())},n.connectionCheckTimeout)}),this.client=r,this.consecutiveFailures=0,this.totalFailures=0,this.isConnecting=!1,this.isDisconnected=!1,this.isResolved=!1,this.isHealthy=!1,this.wsID=1,this.lastEvent=null,this.pingInterval=25e3,this.connectionCheckTimeout=this.pingInterval+1e4,addConnectionEventListeners(this.onlineStatusChanged)}return _createClass(e,[{key:`_log`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`info`;this.client.logger(n,`connection:`+e,_objectSpread$a({tags:[`connection`]},t))}},{key:`setClient`,value:function(e){this.client=e}},{key:`connect`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&r[0]!==void 0?r[0]:15e3,!this.isConnecting){e.next=3;break}throw Error(`You've called connect twice, can only attempt 1 connection at the time`);case 3:return this.isDisconnected=!1,e.prev=4,e.next=7,this._connect();case 7:n=e.sent,this.consecutiveFailures=0,this._log(`connect() - Established ws connection with healthcheck: ${n}`),e.next=23;break;case 12:if(e.prev=12,e.t0=e.catch(4),this.isHealthy=!1,this.consecutiveFailures+=1,e.t0.code!==chatCodes.TOKEN_EXPIRED||this.client.tokenManager.isStatic()){e.next=21;break}this._log(`connect() - WS failure due to expired token, so going to try to reload token and reconnect`),this._reconnect({refreshToken:!0}),e.next=23;break;case 21:if(e.t0.isWSFailure){e.next=23;break}throw Error(JSON.stringify({code:e.t0.code,StatusCode:e.t0.StatusCode,message:e.t0.message,isWSFailure:e.t0.isWSFailure}));case 23:return e.next=25,this._waitForHealthy(t);case 25:return e.abrupt(`return`,e.sent);case 26:case`end`:return e.stop()}},e,this,[[4,12]])}));function t(){return e.apply(this,arguments)}return t}()},{key:`_waitForHealthy`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t=this,n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>0&&r[0]!==void 0?r[0]:15e3,e.abrupt(`return`,Promise.race([_asyncToGenerator(import_regenerator.default.mark(function e(){var r,i;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=50,i=0;case 2:if(!(i<=n)){e.next=18;break}return e.prev=3,e.next=6,t.connectionOpen;case 6:return e.abrupt(`return`,e.sent);case 9:if(e.prev=9,e.t0=e.catch(3),i!==n){e.next=13;break}throw Error(JSON.stringify({code:e.t0.code,StatusCode:e.t0.StatusCode,message:e.t0.message,isWSFailure:e.t0.isWSFailure}));case 13:return e.next=15,sleep(r);case 15:i+=r,e.next=2;break;case 18:case`end`:return e.stop()}},e,null,[[3,9]])}))(),_asyncToGenerator(import_regenerator.default.mark(function e(){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sleep(n);case 2:throw t.isConnecting=!1,Error(JSON.stringify({code:``,StatusCode:``,message:`initial WS connection could not be established`,isWSFailure:!0}));case 4:case`end`:return e.stop()}},e)}))()]));case 2:case`end`:return e.stop()}},e)}));function t(){return e.apply(this,arguments)}return t}()},{key:`disconnect`,value:function(e){var t=this;this._log(`disconnect() - Closing the websocket connection for wsID ${this.wsID}`),this.wsID+=1,this.isConnecting=!1,this.isDisconnected=!0,this.healthCheckTimeoutRef&&clearInterval(this.healthCheckTimeoutRef),this.connectionCheckTimeoutRef&&clearInterval(this.connectionCheckTimeoutRef),removeConnectionEventListeners(this.onlineStatusChanged),this.isHealthy=!1,this.ws&&this.ws.removeAllListeners&&this.ws.removeAllListeners();var n,r=this.ws;return r&&r.close&&r.readyState===r.OPEN?(n=new Promise(function(n){var i=function(e){t._log(`disconnect() - resolving isClosedPromise ${e?`with`:`without`} close frame`,{event:e}),n()};r.onclose=i,setTimeout(i,e??1e3)}),this._log(`disconnect() - Manually closed connection by calling client.disconnect()`),r.close(chatCodes.WS_CLOSED_SUCCESS,`Manually closed connection by calling client.disconnect()`)):(this._log(`disconnect() - ws connection doesn't exist or it is already closed.`),n=Promise.resolve()),delete this.ws,n}},{key:`_connect`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r,i;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.isConnecting||this.isDisconnected&&this.client.options.enableWSFallback)){e.next=2;break}return e.abrupt(`return`);case 2:return this.isConnecting=!0,this.requestID=randomId(),this.client.insightMetrics.connectionStartTimestamp=new Date().getTime(),t=!1,e.prev=6,this._log(`_connect() - waiting for token`),e.next=10,this.client.tokenManager.tokenReady();case 10:t=!0,e.next=15;break;case 13:e.prev=13,e.t0=e.catch(6);case 15:if(e.prev=15,t){e.next=20;break}return this._log(`_connect() - tokenProvider failed before, so going to retry`),e.next=20,this.client.tokenManager.loadToken();case 20:return this._setupConnectionPromise(),n=this._buildUrl(),this._log(`_connect() - Connecting to ${n}`,{wsURL:n,requestID:this.requestID}),this.ws=new import_browser$1.default(n),this.ws.onopen=this.onopen.bind(this,this.wsID),this.ws.onclose
175=this.onclose.bind(this,this.wsID),this.ws.onerror=this.onerror.bind(this,this.wsID),this.ws.onmessage=this.onmessage.bind(this,this.wsID),e.next=30,this.connectionOpen;case 30:if(r=e.sent,this.isConnecting=!1,!r){e.next=36;break}return this.connectionID=r.connection_id,this.client.insightMetrics.wsConsecutiveFailures>0&&this.client.options.enableInsights&&(postInsights(`ws_success_after_failure`,buildWsSuccessAfterFailureInsight(this)),this.client.insightMetrics.wsConsecutiveFailures=0),e.abrupt(`return`,r);case 36:e.next=44;break;case 38:throw e.prev=38,e.t1=e.catch(15),this.isConnecting=!1,this._log(`_connect() - Error - `,e.t1),this.client.options.enableInsights&&(this.client.insightMetrics.wsConsecutiveFailures++,this.client.insightMetrics.wsTotalFailures++,i=buildWsFatalInsight(this,convertErrorToJson(e.t1)),postInsights?.(`ws_fatal`,i)),e.t1;case 44:case`end`:return e.stop()}},e,this,[[6,13],[15,38]])}));function t(){return e.apply(this,arguments)}return t}()},{key:`_reconnect`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&r[0]!==void 0?r[0]:{},this._log(`_reconnect() - Initiating the reconnect`),!(this.isConnecting||this.isHealthy)){e.next=5;break}return this._log(`_reconnect() - Abort (1) since already connecting or healthy`),e.abrupt(`return`);case 5:return n=t.interval,n||=retryInterval(this.consecutiveFailures),e.next=9,sleep(n);case 9:if(!(this.isConnecting||this.isHealthy)){e.next=12;break}return this._log(`_reconnect() - Abort (2) since already connecting or healthy`),e.abrupt(`return`);case 12:if(!(this.isDisconnected&&this.client.options.enableWSFallback)){e.next=15;break}return this._log(`_reconnect() - Abort (3) since disconnect() is called`),e.abrupt(`return`);case 15:if(this._log(`_reconnect() - Destroying current WS connection`),this._destroyCurrentWSConnection(),!t.refreshToken){e.next=20;break}return e.next=20,this.client.tokenManager.loadToken();case 20:return e.prev=20,e.next=23,this._connect();case 23:return this._log(`_reconnect() - Waiting for recoverCallBack`),e.next=26,this.client.recoverState();case 26:this._log(`_reconnect() - Finished recoverCallBack`),this.consecutiveFailures=0,e.next=38;break;case 30:if(e.prev=30,e.t0=e.catch(20),this.isHealthy=!1,this.consecutiveFailures+=1,e.t0.code!==chatCodes.TOKEN_EXPIRED||this.client.tokenManager.isStatic()){e.next=37;break}return this._log(`_reconnect() - WS failure due to expired token, so going to try to reload token and reconnect`),e.abrupt(`return`,this._reconnect({refreshToken:!0}));case 37:e.t0.isWSFailure&&(this._log(`_reconnect() - WS failure, so going to try to reconnect`),this._reconnect());case 38:this._log(`_reconnect() - == END ==`);case 39:case`end`:return e.stop()}},e,this,[[20,30]])}));function t(){return e.apply(this,arguments)}return t}()},{key:`_destroyCurrentWSConnection`,value:function(){this.wsID+=1;try{var e,t;this===null||this===void 0||(e=this.ws)==null||e.removeAllListeners(),this===null||this===void 0||(t=this.ws)==null||t.close()}catch{}}}]),e}(),jwt=null,crypto$1=null;function ownKeys$9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys$9(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$9(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function JWTUserToken(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};throw arguments.length>3&&arguments[3]!==void 0&&arguments[3],typeof t==`string`?(_objectSpread$9({user_id:t},n),Error(`Unable to find jwt crypto, if you are getting this error is probably because you are trying to generate tokens on browser or React Native (or other environment where crypto functions are not available). Please Note: token should only be generated server-side.`)):TypeError(`userId should be a string`)}function JWTServerToken(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n={server:!0},r=_extends({algorithm:`HS256`,noTimestamp:!0},t);return jwt.sign(n,e,r)}function UserFromToken(e){var t=e.split(`.`);if(t.length!==3)return``;var n=t[1],r=decodeBase64(n);return JSON.parse(r).user_id}function DevToken(e){return[`eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9`,encodeBase64(JSON.stringify({user_id:e})),`devtoken`].join(`.`)}function CheckSignature(e,t,n){var r=Buffer.from(t,`utf8`),i=crypto$1.createHmac(`sha256`,r).update(e).digest(`hex`);try{return crypto$1.timingSafeEqual(Buffer.from(i),Buffer.from(n))}catch{return!1}}var TokenManager=function e(t){var n=this;_classCallCheck(this,e),_defineProperty(this,`loadTokenPromise`,void 0),_defineProperty(this,`type`,void 0),_defineProperty(this,`secret`,void 0),_defineProperty(this,`token`,void 0),_defineProperty(this,`tokenProvider`,void 0),_defineProperty(this,`user`,void 0),_defineProperty(this,`setTokenOrProvider`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,r){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n.validateToken(t,r),n.user=r,isFunction(t)&&(n.tokenProvider=t,n.type=`provider`),typeof t==`string`&&(n.token=t,n.type=`static`),!t&&n.user&&n.secret&&(n.token=JWTUserToken(n.secret,r.id,{},{}),n.type=`static`),e.next=7,n.loadToken();case 7:case`end`:return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()),_defineProperty(this,`reset`,function(){n.token=void 0,n.tokenProvider=void 0,n.type=`static`,n.user=void 0,n.loadTokenPromise=null}),_defineProperty(this,`validateToken`,function(e,t){if(!(t&&t.anon&&!e)){if(!n.secret&&!e)throw Error(`User token can not be empty`);if(e&&typeof e!=`string`&&!isFunction(e))throw Error(`user token should either be a string or a function`);if(typeof e==`string`){if(t.anon&&e===``)return;var r=UserFromToken(e);if(e!=null&&(r==null||r===``||r!==t.id))throw Error(`userToken does not have a user_id or is not matching with user.id`)}}}),_defineProperty(this,`tokenReady`,function(){return n.loadTokenPromise}),_defineProperty(this,`loadToken`,function(){return n.loadTokenPromise=new Promise(function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,r){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n.type!==`static`){e.next=2;break}return e.abrupt(`return`,t(n.token));case 2:if(!(n.tokenProvider&&typeof n.tokenProvider!=`string`)){e.next=13;break}return e.prev=3,e.next=6,n.tokenProvider();case 6:n.token=e.sent,e.next=12;break;case 9:return e.prev=9,e.t0=e.catch(3),e.abrupt(`return`,r(Error(`Call to tokenProvider failed with message: ${e.t0}`)));case 12:t(n.token);case 13:case`end`:return e.stop()}},e,null,[[3,9]])}));return function(t,n){return e.apply(this,arguments)}}()),n.loadTokenPromise}),_defineProperty(this,`getToken`,function(){if(n.token||n.user&&n.user.anon&&!n.token)return n.token;if(n.secret)return JWTServerToken(n.secret);throw Error(`Both secret and user tokens are not set. Either client.connectUser wasn't called or client.disconnect was called`)}),_defineProperty(this,`isStatic`,function(){return n.type===`static`}),this.loadTokenPromise=null,t&&(this.secret=t),this.type=`static`,this.secret&&(this.token=JWTServerToken(this.secret))}
175,APIErrorCodes={"-1":{name:`InternalSystemError`,retryable:!0},2:{name:`AccessKeyError`,retryable:!1},3:{name:`AuthenticationFailedError`,retryable:!0},4:{name:`InputError`,retryable:!1},6:{name:`DuplicateUsernameError`,retryable:!1},9:{name:`RateLimitError`,retryable:!0},16:{name:`DoesNotExistError`,retryable:!1},17:{name:`NotAllowedError`,retryable:!1},18:{name:`EventNotSupportedError`,retryable:!1},19:{name:`ChannelFeatureNotSupportedError`,retryable:!1},20:{name:`MessageTooLongError`,retryable:!1},21:{name:`MultipleNestingLevelError`,retryable:!1},22:{name:`PayloadTooBigError`,retryable:!1},23:{name:`RequestTimeoutError`,retryable:!0},24:{name:`MaxHeaderSizeExceededError`,retryable:!1},40:{name:`AuthErrorTokenExpired`,retryable:!1},41:{name:`AuthErrorTokenNotValidYet`,retryable:!1},42:{name:`AuthErrorTokenUsedBeforeIssuedAt`,retryable:!1},43:{name:`AuthErrorTokenSignatureInvalid`,retryable:!1},44:{name:`CustomCommandEndpointMissingError`,retryable:!1},45:{name:`CustomCommandEndpointCallError`,retryable:!0},46:{name:`ConnectionIDNotFoundError`,retryable:!1},60:{name:`CoolDownError`,retryable:!0},69:{name:`ErrWrongRegion`,retryable:!1},70:{name:`ErrQueryChannelPermissions`,retryable:!1},71:{name:`ErrTooManyConnections`,retryable:!0},99:{name:`AppSuspendedError`,retryable:!1}};function isAPIError(e){return e.code!==void 0}function isErrorRetryable(e){if(!e.code)return!1;var t=APIErrorCodes[`${e.code}`];return t?t.retryable:!1}function isConnectionIDError(e){return e.code===46}function isWSFailure(e){if(typeof e.isWSFailure==`boolean`)return e.isWSFailure;try{return JSON.parse(e.message).isWSFailure}catch{return!1}}function isErrorResponse(e){return!e.status||e.status<200||300<=e.status}function ownKeys$8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys$8(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$8(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ConnectionState;(function(e){e.Closed=`CLOSED`,e.Connected=`CONNECTED`,e.Connecting=`CONNECTING`,e.Disconnected=`DISCONNECTED`,e.Init=`INIT`})(ConnectionState||={});var WSConnectionFallback=function(){function e(t){var n=this,r=t.client;_classCallCheck(this,e),_defineProperty(this,`client`,void 0),_defineProperty(this,`state`,void 0),_defineProperty(this,`consecutiveFailures`,void 0),_defineProperty(this,`connectionID`,void 0),_defineProperty(this,`cancelToken`,void 0),_defineProperty(this,`_onlineStatusChanged`,function(e){if(n._log(`_onlineStatusChanged() - ${e.type}`),e.type===`offline`){var t;n._setState(ConnectionState.Closed),(t=n.cancelToken)==null||t.cancel(`disconnect() is called`),n.cancelToken=void 0;return}e.type===`online`&&n.state===ConnectionState.Closed&&n.connect(!0)}),_defineProperty(this,`_req`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,r,i){var a,o;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return!n.cancelToken&&!t.close&&(n.cancelToken=axios.CancelToken.source()),e.prev=1,e.next=4,n.client.doAxiosRequest(`get`,n.client.baseURL.replace(`:3030`,`:8900`)+`/longpoll`,void 0,{config:_objectSpread$8(_objectSpread$8({},r),{},{cancelToken:n.cancelToken?.token}),params:t});case 4:return o=e.sent,n.consecutiveFailures=0,e.abrupt(`return`,o);case 9:if(e.prev=9,e.t0=e.catch(1),n.consecutiveFailures+=1,!(i&&isErrorRetryable(e.t0))){e.next=17;break}return n._log(`_req() - Retryable error, retrying request`),e.next=16,sleep(retryInterval(n.consecutiveFailures));case 16:return e.abrupt(`return`,n._req(t,r,i));case 17:throw e.t0;case 18:case`end`:return e.stop()}},e,null,[[1,9]])}));return function(t,n,r){return e.apply(this,arguments)}}()),_defineProperty(this,`_poll`,_asyncToGenerator(import_regenerator.default.mark(function e(){var t,r,i;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n.state!==ConnectionState.Connected){e.next=25;break}return e.prev=1,e.next=4,n._req({},{timeout:3e4},!0);case 4:if(r=e.sent,(t=r.events)!=null&&t.length)for(i=0;i<r.events.length;i++)n.client.dispatchEvent(r.events[i]);e.next=23;break;case 8:if(e.prev=8,e.t0=e.catch(1),!axios.isCancel(e.t0)){e.next=13;break}return n._log(`_poll() - axios canceled request`),e.abrupt(`return`);case 13:if(!isConnectionIDError(e.t0)){e.next=18;break}return n._log(`_poll() - ConnectionID error, connecting without ID...`),n._setState(ConnectionState.Disconnected),n.connect(!0),e.abrupt(`return`);case 18:if(!isAPIError(e.t0)||isErrorRetryable(e.t0)){e.next=21;break}return n._setState(ConnectionState.Closed),e.abrupt(`return`);case 21:return e.next=23,sleep(retryInterval(n.consecutiveFailures));case 23:e.next=0;break;case 25:case`end`:return e.stop()}},e,null,[[1,8]])}))),_defineProperty(this,`connect`,_asyncToGenerator(import_regenerator.default.mark(function e(){var t,r,i,a=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=a.length>0&&a[0]!==void 0&&a[0],n.state!==ConnectionState.Connecting){e.next=4;break}return n._log(`connect() - connecting already in progress`,{reconnect:t},`warn`),e.abrupt(`return`);case 4:if(n.state!==ConnectionState.Connected){e.next=7;break}return n._log(`connect() - already connected and polling`,{reconnect:t},`warn`),e.abrupt(`return`);case 7:return n._setState(ConnectionState.Connecting),n.connectionID=void 0,e.prev=9,e.next=12,n._req({json:n.client._buildWSPayload()},{timeout:8e3},t);case 12:return r=e.sent,i=r.event,n._setState(ConnectionState.Connected),n.connectionID=i.connection_id,n.client.dispatchEvent(i),n._poll(),t&&n.client.re
175coverState(),e.abrupt(`return`,i);case 22:throw e.prev=22,e.t0=e.catch(9),n._setState(ConnectionState.Closed),e.t0;case 26:case`end`:return e.stop()}},e,null,[[9,22]])}))),_defineProperty(this,`isHealthy`,function(){return!!n.connectionID&&n.state===ConnectionState.Connected}),_defineProperty(this,`disconnect`,_asyncToGenerator(import_regenerator.default.mark(function e(){var t,r,i,a=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>0&&a[0]!==void 0?a[0]:2e3,removeConnectionEventListeners(n._onlineStatusChanged),n._setState(ConnectionState.Disconnected),(t=n.cancelToken)==null||t.cancel(`disconnect() is called`),n.cancelToken=void 0,i=n.connectionID,n.connectionID=void 0,e.prev=7,e.next=10,n._req({close:!0,connection_id:i},{timeout:r},!1);case 10:n._log(`disconnect() - Closed connectionID`),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(7),n._log(`disconnect() - Failed`,{err:e.t0},`error`);case 16:case`end`:return e.stop()}},e,null,[[7,13]])}))),this.client=r,this.state=ConnectionState.Init,this.consecutiveFailures=0,addConnectionEventListeners(this._onlineStatusChanged)}return _createClass(e,[{key:`_log`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`info`;this.client.logger(n,`WSConnectionFallback:`+e,_objectSpread$8({tags:[`connection_fallback`,`connection`]},t))}},{key:`_setState`,value:function(e){this._log(`_setState() - ${e}`),this.state===ConnectionState.Connecting&&e===ConnectionState.Connected&&this.client.dispatchEvent({type:`connection.changed`,online:!0}),(e===ConnectionState.Closed||e===ConnectionState.Disconnected)&&this.client.dispatchEvent({type:`connection.changed`,online:!1}),this.state=e}}]),e}(),Segment=function(){function e(t,n,r,i){_classCallCheck(this,e),_defineProperty(this,`type`,void 0),_defineProperty(this,`id`,void 0),_defineProperty(this,`client`,void 0),_defineProperty(this,`data`,void 0),this.client=t,this.type=n,this.id=r,this.data=i}return _createClass(e,[{key:`create`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r,i,a,o;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o={name:this.data?.name,filter:this.data?.filter,description:this.data?.description,all_sender_channels:this.data?.all_sender_channels,all_users:this.data?.all_users},e.abrupt(`return`,this.client.createSegment(this.type,this.id,o));case 2:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`verifySegmentId`,value:function(){if(!this.id)throw Error(`Segment id is missing. Either create the segment using segment.create() or set the id during instantiation - const segment = client.segment(id)`)}},{key:`get`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.verifySegmentId(),e.abrupt(`return`,this.client.getSegment(this.id));case 2:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`update`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.verifySegmentId(),e.abrupt(`return`,this.client.updateSegment(this.id,t));case 2:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`addTargets`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.verifySegmentId(),e.abrupt(`return`,this.client.addSegmentTargets(this.id,t));case 2:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`removeTargets`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.verifySegmentId(),e.abrupt(`return`,this.client.removeSegmentTargets(this.id,t));case 2:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`delete`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.verifySegmentId(),e.abrupt(`return`,this.client.deleteSegment(this.id
175));case 2:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`targetExists`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.verifySegmentId(),e.abrupt(`return`,this.client.segmentTargetExists(this.id,t));case 2:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`queryTargets`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&i[0]!==void 0?i[0]:{},n=i.length>1&&i[1]!==void 0?i[1]:[],r=i.length>2&&i[2]!==void 0?i[2]:{},this.verifySegmentId(),e.abrupt(`return`,this.client.querySegmentTargets(this.id,t,n,r));case 5:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()}]),e}();function _createSuper$1(e){var t=_isNativeReflectConstruct$1();return function(){var n=_getPrototypeOf(e),r;if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _isNativeReflectConstruct$1(){if(typeof Reflect>`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ErrorFromResponse=function(e){_inherits(n,e);var t=_createSuper$1(n);function n(){var e;_classCallCheck(this,n);var r=[...arguments];return e=t.call.apply(t,[this].concat(r)),_defineProperty(_assertThisInitialized(e),`code`,void 0),_defineProperty(_assertThisInitialized(e),`response`,void 0),_defineProperty(_assertThisInitialized(e),`status`,void 0),e}return n}(_wrapNativeSuper(Error)),VotingVisibility;(function(e){e.anonymous=`anonymous`,e.public=`public`})(VotingVisibility||={});function ownKeys$7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys$7(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$7(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var isPatch=function(e){return typeof e==`function`},StateStore=function e(t){var n=this;_classCallCheck(this,e),this.value=t,_defineProperty(this,`handlerSet`,new Set),_defineProperty(this,`next`,function(e){var t=isPatch(e)?e(n.value):e;if(t!==n.value){var r=n.value;n.value=t,n.handlerSet.forEach(function(e){return e(n.value,r)})}}),_defineProperty(this,`partialNext`,function(e){return n.next(function(t){return _objectSpread$7(_objectSpread$7({},t),e)})}),_defineProperty(this,`getLatestValue`,function(){return n.value}),_defineProperty(this,`subscribe`,function(e){return e(n.value,void 0),n.handlerSet.add(e),function(){n.handlerSet.delete(e)}}),_defineProperty(this,`subscribeWithSelector`,function(t,r){var i;return n.subscribe(function(n){var a=t(n),o=!i;for(var c in Array.isArray(a)&&e.logCount>0&&(console.warn(`[StreamChat]: The API of our StateStore has changed. Instead of returning an array in the selector, please return a named object of properties.`),e.logCount--),i)if(i[c]!==a[c]){o=!0;break}if(o){var u=i;i=a,r(a,u)}})})};_defineProperty(StateStore,`logCount`,5);var _excluded$3=[`limit`,`sort`];function ownKeys$6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
175t%2?ownKeys$6(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$6(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var DEFAULT_PAGE_LIMIT=50,DEFAULT_SORT=[{created_at:-1}],MARK_AS_READ_THROTTLE_TIMEOUT=1e3,THREAD_RESPONSE_RESERVED_KEYS={channel:!0,channel_cid:!0,created_at:!0,created_by_user_id:!0,parent_message_id:!0,title:!0,updated_at:!0,latest_replies:!0,active_participant_count:!0,deleted_at:!0,last_message_at:!0,participant_count:!0,reply_count:!0,read:!0,thread_participants:!0,created_by:!0,parent_message:!0},constructCustomDataObject=function(e){var t={};for(var n in e)if(!THREAD_RESPONSE_RESERVED_KEYS[n]){var r=n;t[r]=e[r]}return t},Thread=function(){function e(t){var n=this,r,i,a=t.client,o=t.threadData;_classCallCheck(this,e),_defineProperty(this,`state`,void 0),_defineProperty(this,`id`,void 0),_defineProperty(this,`client`,void 0),_defineProperty(this,`unsubscribeFunctions`,new Set),_defineProperty(this,`failedRepliesMap`,new Map),_defineProperty(this,`activate`,function(){n.state.partialNext({active:!0})}),_defineProperty(this,`deactivate`,function(){n.state.partialNext({active:!1})}),_defineProperty(this,`reload`,_asyncToGenerator(import_regenerator.default.mark(function e(){var t;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.state.getLatestValue().isLoading){e.next=2;break}return e.abrupt(`return`);case 2:return n.state.partialNext({isLoading:!0}),e.prev=3,e.next=6,n.client.getThread(n.id,{watch:!0});case 6:t=e.sent,n.hydrateState(t);case 8:return e.prev=8,n.state.partialNext({isLoading:!1}),e.finish(8);case 11:case`end`:return e.stop()}},e,null,[[3,,8,11]])}))),_defineProperty(this,`hydrateState`,function(e){if(e!==n){if(e.id!==n.id)throw Error(`Cannot hydrate thread state with using thread's state`);var t=e.state.getLatestValue(),r=t.read,i=t.replyCount,a=t.replies,o=t.parentMessage,c=t.participants,u=t.createdAt,K=t.deletedAt,Y=t.updatedAt,X=Array.from(n.failedRepliesMap.values());n.state.partialNext({read:r,replyCount:i,replies:X.length?a.concat(X):a,parentMessage:o,participants:c,createdAt:u,deletedAt:K,updatedAt:Y,isStateStale:!1})}}),_defineProperty(this,`registerSubscriptions`,function(){n.unsubscribeFunctions.size||(n.unsubscribeFunctions.add(n.subscribeThreadUpdated()),n.unsubscribeFunctions.add(n.subscribeMarkActiveThreadRead()),n.unsubscribeFunctions.add(n.subscribeReloadActiveStaleThread()),n.unsubscribeFunctions.add(n.subscribeMarkThreadStale()),n.unsubscribeFunctions.add(n.subscribeNewReplies()),n.unsubscribeFunctions.add(n.subscribeRepliesRead()),n.unsubscribeFunctions.add(n.subscribeMessageDeleted()),n.unsubscribeFunctions.add(n.subscribeMessageUpdated()))}),_defineProperty(this,`subscribeThreadUpdated`,function(){return n.client.on(`thread.updated`,function(e){if(e.thread&&e.thread.parent_message_id===n.id){var t=e.thread;n.state.partialNext({title:t.title,updatedAt:new Date(t.updated_at),deletedAt:t.deleted_at?new Date(t.deleted_at):null,custom:constructCustomDataObject(t)})}}).unsubscribe}),_defineProperty(this,`subscribeMarkActiveThreadRead`,function(){return n.state.subscribeWithSelector(function(e){return{active:e.active,unreadMessageCount:ownUnreadCountSelector(n.client.userID)(e)}},function(e){var t=e.active,r=e.unreadMessageCount;t&&r&&n.throttledMarkAsRead()})}),_defineProperty(this,`subscribeReloadActiveStaleThread`,function(){return n.state.subscribeWithSelector(function(e){return{active:e.active,isStateStale:e.isStateStale}},function(e){var t=e.active,r=e.isStateStale;t&&r&&n.reload()})}),_defineProperty(this,`subscribeMarkThreadStale`,function(){return n.client.on(`user.watching.stop`,function(e){var t,r,i=n.state.getLatestValue().channel;n.client.userID&&n.client.userID===e.user?.id&&e.channel?.cid===i.cid&&n.state.partialNext({isStateStale:!0})}).unsubscribe}),_defineProperty(this,`subscribeNewReplies`,function(){return n.client.on(`message.new`,function(e){var t,r;if(n.client.userID&&e.message?.parent_id===n.id){var i=e.message.user?.id===n.client.userID,a=n.state.getLatestValue(),o=a.active,c=a.read;n.upsertReplyLocally({message:e.message,timestampChanged:i}),o&&n.throttledMarkAsRead();for(var u={},K=0,Y=Object.keys(c);K<Y.length;K++){var X=Y[K],ee=c[X];if(ee){var te,ce=ee;X===e.user?.id?ce=_objectSpread$6(_objectSpread$6({},ce),{},{lastReadAt:e.created_at?new Date(e.created_at):new Date,user:e.user,unreadMessageCount:0}):o&&X===n.client.userID||(ce=_objectSpread$6(_objectSpread$6({},ce),{},{unreadMessageCount:ee.unreadMessageCount+1})),u[X]=ce}}n.state.partialNext({read:u})}}).unsubscribe}),_defineProperty(this,`subscribeRepliesRead`,function(){return n.client.on(`message.read`,function(e){if(e.user&&e.created_at&&e.thread&&e.thread.parent_message_id===n.id){var t=e.user.id,r=e.created_at,i=e.user;n.state.next(function(n){return _objectSpread$6(_objectSpread$6({},n),{},{read:_objectSpread$6(_objectSpread$6({},n.read),{},_defineProperty({},t,{lastReadAt:new Date(r),user:i,lastReadMessageId:e.last_read_message_id,unreadMessageCount:0}))})})}}).unsubscribe}),_defineProperty(this,`subscribeMessageDeleted`,function(){return n.client.on(`message.deleted`,function(e){e.message&&(e.message.parent_id===n.id&&(e.hard_delete?n.deleteReplyLocally({message:e.message}):n.upsertReplyLocally({message:e.message})),e.message.id===n.id&&n.updateParentMessageLocally({message:e.message}))}).unsubscribe}),_defineProperty(this,`subscribeMessageUpdated`,function(){var e=[`message.updated`,`reaction.new`,`reaction.deleted`,`reaction.updated`].map(function(e){return n.client.on(e,function(e){e.message&&n.updateParentMessageOrReplyLocally(e.message)}).unsubscribe});return function(){return e.forEach(function(e){return e()})}}),_defineProperty(this,`unregisterSubscriptions`,function(){n.unsubscribeFunctions.forEach(function(e){return e()}),n.unsubscribeFunctions.clear()}),_defineProperty(this,`deleteReplyLocally`,function(e){var t,r=e.message,i=n.state.getLatestValue().replies,a=findIndexInSortedArray({needle:formatMessage(r),sortedArray:i,sortDirection:`ascending`,selectValueToCompare:function(e){return e.created_at.getTime()},selectKey:function(e){return e.id}});if(i[a]?.id===r.id){var o=_toConsumableArray(i);o.splice(a,1),n.state.partialNext({replies:o})}}),_defineProperty(this,`upsertReplyLocally`,function(e){var t=e.message,r=e.timestampChanged,i=r!==void 0&&r;
175if(t.parent_id!==n.id)throw Error(`Reply does not belong to this thread`);var a=formatMessage(t);t.status===`failed`?n.failedRepliesMap.set(a.id,a):n.failedRepliesMap.has(t.id)&&n.failedRepliesMap.delete(t.id),n.state.next(function(e){return _objectSpread$6(_objectSpread$6({},e),{},{replies:addToMessageList(e.replies,a,i)})})}),_defineProperty(this,`updateParentMessageLocally`,function(e){var t=e.message;if(t.id!==n.id)throw Error(`Message does not belong to this thread`);n.state.next(function(e){var n,r=formatMessage(t);return _objectSpread$6(_objectSpread$6({},e),{},{deletedAt:r.deleted_at,parentMessage:r,replyCount:t.reply_count??e.replyCount})})}),_defineProperty(this,`updateParentMessageOrReplyLocally`,function(e){e.parent_id===n.id&&n.upsertReplyLocally({message:e}),!e.parent_id&&e.id===n.id&&n.updateParentMessageLocally({message:e})}),_defineProperty(this,`markAsRead`,_asyncToGenerator(import_regenerator.default.mark(function e(){var t,r,i,a=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=a.length>0&&a[0]!==void 0?a[0]:{},r=t.force,i=r!==void 0&&r,n.ownUnreadCount!==0||i){e.next=3;break}return e.abrupt(`return`,null);case 3:return e.next=5,n.channel.markRead({thread_id:n.id});case 5:return e.abrupt(`return`,e.sent);case 6:case`end`:return e.stop()}},e)}))),_defineProperty(this,`throttledMarkAsRead`,throttle(function(){return n.markAsRead()},MARK_AS_READ_THROTTLE_TIMEOUT,{trailing:!0})),_defineProperty(this,`queryReplies`,function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.limit,r=t===void 0?DEFAULT_PAGE_LIMIT:t,i=e.sort,a=i===void 0?DEFAULT_SORT:i,o=_objectWithoutProperties(e,_excluded$3);return n.channel.getReplies(n.id,_objectSpread$6({limit:r},o),a)}),_defineProperty(this,`loadNextPage`,function(){var e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).limit,t=e===void 0?DEFAULT_PAGE_LIMIT:e;return n.loadPage(t)}),_defineProperty(this,`loadPrevPage`,function(){var e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).limit,t=e===void 0?DEFAULT_PAGE_LIMIT:e;return n.loadPage(-t)}),_defineProperty(this,`loadPage`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var r,i,a,o,c,u,K,Y,X,ee,te,ce,ue,de;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.state.getLatestValue(),i=r.pagination,a=t>0?[`isLoadingNext`,`nextCursor`,`push`]:[`isLoadingPrev`,`prevCursor`,`unshift`],o=_slicedToArray(a,3),c=o[0],u=o[1],K=o[2],!(i[c]||i[u]===null)){e.next=4;break}return e.abrupt(`return`);case 4:return Y=_defineProperty({},t>0?`id_gt`:`id_lt`,i[u]),X=Math.abs(t),n.state.partialNext({pagination:_objectSpread$6(_objectSpread$6({},i),{},_defineProperty({},c,!0))}),e.prev=7,e.next=10,n.queryReplies(_objectSpread$6(_objectSpread$6({},Y),{},{limit:X}));case 10:ce=e.sent,ue=ce.messages.map(formatMessage),de=ue.at(t>0?-1:0)?.id??null,n.state.next(function(e){var t,n=e.replies;if(ue.length>0){var r;n=_toConsumableArray(e.replies),(r=n)[K].apply(r,_toConsumableArray(ue))}return _objectSpread$6(_objectSpread$6({},e),{},{replies:n,pagination:_objectSpread$6(_objectSpread$6({},e.pagination),{},(t={},_defineProperty(t,u,ce.messages.length<X?null:de),_defineProperty(t,c,!1),t))})}),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(7),n.client.logger(`error`,e.t0.message),n.state.next(function(e){return _objectSpread$6(_objectSpread$6({},e),{},{pagination:_objectSpread$6(_objectSpread$6({},e.pagination),{},_defineProperty({},c,!1))})});case 20:case`end`:return e.stop()}},e,null,[[7,16]])}));return function(t){return e.apply(this,arguments)}}());var c=a.channel(o.channel.type,o.channel.id,{name:o.channel.name});c._hydrateMembers({members:o.channel.members??[],overrideCurrentState:!1});var u=a.userID?[{user:{id:a.userID},unread_messages:0,last_read:new Date().toISOString()}]:[];this.state=new StateStore({active:!1,isLoading:!1,isStateStale:!1,channel:c,createdAt:new Date(o.created_at),deletedAt:o.deleted_at?new Date(o.deleted_at):null,pagination:repliesPaginationFromInitialThread(o),parentMessage:formatMessage(o.parent_message),participants:o.thread_participants,read:formatReadState(!o.read||o.read.length===0?u:o.read),replies:o.latest_replies.map(formatMessage),replyCount:o.reply_count??0,updatedAt:o.updated_at?new Date(o.updated_at):null,title:o.title,custom:constructCustomDataObject(o)}),this.id=o.parent_message_id,this.client=a}return _createClass(e,[{key:`channel`,get:function(){return this.state.getLatestValue().channel}},{key:`hasStaleState`,get:function(){return this.state.getLatestValue().isStateStale}},{key:`ownUnreadCount`,get:function(){return ownUnreadCountSelector(this.client.userID)(this.state.getLatestValue())}}]),e}(),formatReadState=function(e){return e.reduce(function(e,t){var n;return e[t.user.id]={user:t.user,lastReadMessageId:t.last_read_message_id,unreadMessageCount:t.unread_messages??0,lastReadAt:new Date(t.last_read)},e},{})},repliesPaginationFromInitialThread=function(e){var t,n;return{nextCursor:null,prevCursor:e.latest_replies.length===e.reply_count?null:e.latest_replies.at(0)?.id??null,isLoadingNext:!1,isLoadingPrev:!1}},ownUnreadCountSelector=function(e){return function(t){var n;return e&&t.read[e]?.unreadMessageCount||0}};function ownKeys$5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
175t%2?ownKeys$5(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$5(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var MODERATION_ENTITY_TYPES={user:`stream:user`,message:`stream:chat:v1:message`},Moderation=function(){function e(t){_classCallCheck(this,e),_defineProperty(this,`client`,void 0),this.client=t}return _createClass(e,[{key:`flagUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&i[2]!==void 0?i[2]:{},e.abrupt(`return`,this.flag(MODERATION_ENTITY_TYPES.user,t,``,n,r));case 2:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`flagMessage`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&i[2]!==void 0?i[2]:{},e.abrupt(`return`,this.flag(MODERATION_ENTITY_TYPES.message,t,``,n,r));case 2:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`flag`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r,i){var a,o=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=o.length>4&&o[4]!==void 0?o[4]:{},e.next=3,this.client.post(this.client.baseURL+`/api/v2/moderation/flag`,_objectSpread$5({entity_type:t,entity_id:n,entity_creator_id:r,reason:i},a));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t,n,r,i){return e.apply(this,arguments)}return t}()},{key:`muteUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&r[1]!==void 0?r[1]:{},e.next=3,this.client.post(this.client.baseURL+`/api/v2/moderation/mute`,_objectSpread$5({target_ids:[t]},n));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`unmuteUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.post(this.client.baseURL+`/api/v2/moderation/unmute`,_objectSpread$5({target_ids:[t]},n));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`getUserModerationReport`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&r[1]!==void 0?r[1]:{},e.next=3,this.client.get(this.client.baseURL+`/api/v2/moderation/user_report`,_objectSpread$5({user_id:t},n));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`queryReviewQueue`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&i[0]!==void 0?i[0]:{},n=i.length>1&&i[1]!==void 0?i[1]:[],r=i.length>2&&i[2]!==void 0?i[2]:{},e.next=5,this.client.post(this.client.baseURL+`/api/v2/moderation/review_queue`,_objectSpread$5({filter:t,sort:normalizeQuerySort(n)},r));case 5:return e.abrupt(`return`,e.sent);case 6:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`upsertConfig`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.post(this.client.baseURL+`/api/v2/moderation/config`,t);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`getConfig`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.get(this.client.baseURL+`/api/v2/moderation/config/`+t,n);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`deleteConfig`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.delete(this.client.baseURL+`/api/v2/moderation/config/`+t,n);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`queryConfigs`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&i[2]!==void 0?i[2]:{},e.next=3,this.client.post(this.client.baseURL+`/api/v2/moderation/configs`,_objectSpread$5({filter:t,sort:n},r));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`submitAction`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&i[2]!==void 0?i[2]:{},e.next=3,this.client.post(this.client.baseURL+`/api/v2/moderation/submit_action`,_objectSpread$5({action_type:t,item_id:n},r));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`check`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r,i,a,o){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.post(this.client.baseURL+`/api/v2/moderation/check`,{entity_type:t,entity_id:n,entity_creator_id:r,moderation_payload:i,config_key:a,options:o});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n,r,i,a,o){return e.apply(this,arguments)}return t}()},{key:`addCustomFlags`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r,i,a){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.post(this.client.baseURL+`/api/v2/moderation/custom_check`,{entity_type:t,entity_id:n,entity_creator_id:r,moderation_payload:i,flags:a});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n,r,i,a){return e.apply(this,arguments)}return t}()},{key:`addCustomMessageFlags`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.addCustomFlags(MODERATION_ENTITY_TYPES.message,t,``,{},n);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()}]),e}();function _createForOfIteratorHelper$2(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];
175if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray$2(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
176In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,c;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,c=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw c}}}}function _unsupportedIterableToArray$2(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$2(e,t)}}function _arrayLikeToArray$2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ownKeys$4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys$4(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$4(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var DEFAULT_CONNECTION_RECOVERY_THROTTLE_DURATION=1e3,MAX_QUERY_THREADS_LIMIT=25,THREAD_MANAGER_INITIAL_STATE={active:!1,isThreadOrderStale:!1,threads:[],unreadThreadCount:0,unseenThreadIds:[],lastConnectionDropAt:null,pagination:{isLoading:!1,isLoadingNext:!1,nextCursor:null},ready:!1},ThreadManager=function(){function e(t){var n=this,r=t.client;_classCallCheck(this,e),_defineProperty(this,`state`,void 0),_defineProperty(this,`client`,void 0),_defineProperty(this,`unsubscribeFunctions`,new Set),_defineProperty(this,`threadsByIdGetterCache`,void 0),_defineProperty(this,`resetState`,function(){n.state.next(THREAD_MANAGER_INITIAL_STATE)}),_defineProperty(this,`activate`,function(){n.state.partialNext({active:!0})}),_defineProperty(this,`deactivate`,function(){n.state.partialNext({active:!1})}),_defineProperty(this,`registerSubscriptions`,function(){n.unsubscribeFunctions.size||(n.unsubscribeFunctions.add(n.subscribeUnreadThreadsCountChange()),n.unsubscribeFunctions.add(n.subscribeManageThreadSubscriptions()),n.unsubscribeFunctions.add(n.subscribeReloadOnActivation()),n.unsubscribeFunctions.add(n.subscribeNewReplies()),n.unsubscribeFunctions.add(n.subscribeRecoverAfterConnectionDrop()),n.unsubscribeFunctions.add(n.subscribeChannelDeleted()))}),_defineProperty(this,`subscribeUnreadThreadsCountChange`,function(){var e,t=(n.client.user??{}).unread_threads,r=t===void 0?0:t;n.state.partialNext({unreadThreadCount:r});var i=[`health.check`,`notification.mark_read`,`notification.thread_message_new`,`notification.channel_deleted`].map(function(e){return n.client.on(e,function(e){var t,r=(e.me??e).unread_threads;typeof r==`number`&&n.state.partialNext({unreadThreadCount:r})}).unsubscribe});return function(){return i.forEach(function(e){return e()})}}),_defineProperty(this,`subscribeChannelDeleted`,function(){return n.client.on(`notification.channel_deleted`,function(e){var t=e.cid,r=n.state.getLatestValue().threads.filter(function(e){return e.channel.cid!==t});n.state.partialNext({threads:r})}).unsubscribe}),_defineProperty(this,`subscribeManageThreadSubscriptions`,function(){return n.state.subscribeWithSelector(function(e){return{threads:e.threads}},function(e,t){var r=e.threads,i=(t??{}).threads,a=(i===void 0?[]:i).filter(function(e){return e!==n.threadsById[e.id]});r.forEach(function(e){return e.registerSubscriptions()}),a.forEach(function(e){return e.unregisterSubscriptions()})})}),_defineProperty(this,`subscribeReloadOnActivation`,function(){return n.state.subscribeWithSelector(function(e){return{active:e.active}},function(e){e.active&&n.reload()})}),_defineProperty(this,`subscribeNewReplies`,function(){return n.client.on(`notification.thread_message_new`,function(e){var t,r=e.message?.parent_id;if(r){var i=n.state.getLatestValue(),a=i.unseenThreadIds;i.ready&&(n.threadsById[r]?n.state.partialNext({isThreadOrderStale:!0}):a.includes(r)||n.state.partialNext({unseenThreadIds:a.concat(r)}))}}).unsubscribe}),_defineProperty(this,`subscribeRecoverAfterConnectionDrop`,function(){var e=n.client.on(`connection.changed`,function(e){e.online===!1&&n.state.next(function(e){return e.lastConnectionDropAt?e:_objectSpread$4(_objectSpread$4({},e),{},{lastConnectionDropAt:new Date})})}).unsubscribe,t=throttle(function(){n.state.getLatestValue().lastConnectionDropAt&&n.reload({force:!0})},DEFAULT_CONNECTION_RECOVERY_THROTTLE_DURATION,{trailing:!0}),r=n.client.on(`connection.recovered`,t).unsubscribe;return function(){e(),r()}}),_defineProperty(this,`unregisterSubscriptions`,function(){n.state.getLatestValue().threads.forEach(function(e){return e.unregisterSubscriptions()}),n.unsubscribeFunctions.forEach(function(e){return e()}),n.unsubscribeFunctions.clear()}),_defineProperty(this,`reload`,_asyncToGenerator(import_regenerator.default.mark(function e(){var t,r,i,a,o,c,u,K,Y,X,ee,te,ce,ue,de,fe,me,ge=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=ge.length>0&&ge[0]!==void 0?ge[0]:{},r=t.force,i=r!==void 0&&r,a=n.state.getLatestValue(),o=a.threads,c=a.unseenThreadIds,u=a.isThreadOrderStale,K=a.pagination,Y=a.ready,!K.isLoading){e.next=4;break}return e.abrupt(`return`);case 4:if(i||!Y||c.length||u){e.next=6;break}return e.abrupt(`return`);case 6:return X=o.length+c.length,e.prev=7,n.state.next(function(e){return _objectSpread$4(_objectSpread$4({},e),{},{pagination:_objectSpread$4(_objectSpread$4({},e.pagination),{},{isLoading:!0})})}),e.next=11,n.queryThreads({limit:Math.min(X,MAX_QUERY_THREADS_LIMIT)||MAX_QUERY_THREADS_LIMIT});case 11:ee=e.sent,te=n.threadsById,ce=[],ue=_createForOfIteratorHelper$2(ee.threads);try{for(ue.s();!(de=ue.n()).done;)fe=de.value,me=te[fe.id],me?(ce.push(me),me.hasStaleState&&me.hydrateState(fe)):ce.push(fe)}catch(e){ue.e(e)}finally{ue.f()}n.state.next(function(e){var t;return _objectSpread$4(_objectSpread$4({},e),{},{threads:ce,unseenThreadIds:[],isThreadOrderStale:!1,pagination:_objectSpread$4(_objectSpread$4({},e.pagination),{},{isLoading:!1,nextCursor:ee.next??null}),ready:!0})}),e.next=23;break;case 19:e.prev=19,e.t0=e.catch(7),n.client.logger(`error`,e.t0.message),n.state.next(function(e){return _objectSpread$4(_objectSpread$4({},e),{},{pagination:_objectSpread$4(_objectSpread$4({},e.pagination),{},{isLoading:!1})})});case 23:case`end`:return e.stop()}},e,null,[[7,19]])}))),_defineProperty(this,`queryThreads`,function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return n.client.queryThreads(_objectSpread$4({limit:25,participant_limit:10,reply_limit:10,watch:!0},e))}),_defineProperty(this,`loadNextPage`,_asyncToGenerator(import_regenerator.default.mark(function e(){var t,r,i,a,o=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=o.length>0&&o[0]!==void 0?o[0]:{},r=n.state.getLatestValue(),i=r.pagination,!i.isLoadingNext&&i.nextCursor){e.next=4;break}return e.abrupt(`return`);case 4:return e.prev=4,n.state.partialNext({pagination:_objectSpread$4(_objectSpread$4({},i),{},{isLoadingNext:!0})}),e.next=8,n.queryThreads(_objectSpread$4(_objectSpread$4({},t),{},{next:i.nextCursor}));case 8:a=e.sent,n.state.next(function(e){var t;return _objectSpread$4(_objectSpread$4({},e),{},{threads:a.threads.length?e.threads.concat(a.threads):e.threads,pagination:_objectSpread$4(_objectSpread$4({},e.pagination),{},{nextCursor:a.next??null,isLoadingNext:!1})})}),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(4),n.client.logger(`error`,e.t0.message),n.state.next(function(e){return _objectSpread$4(_objectSpread$4({},e),{},{pagination:_objectSpread$4(_objectSpread$4({},e.pagination),{},{isLoadingNext:!1})})});case 16:case`end`:return e.stop()}},e,null,[[4,12]])}))),this.client=r,this.state=new StateStore(THREAD_MANAGER_INITIAL_STATE),this.threadsByIdGetterCache={threads:[],threadsById:{}}}return _createClass(e,[{key:`threadsById`,get:function(){var e=this.state.getLatestValue().threads;if(e===this.threadsByIdGetterCache.threads)return this.threadsByIdGetterCache.threadsById;var t=e.reduce(function(e,t){return e[t.id]=t,e},{});return this.threadsByIdGetterCache.threads=e,this.threadsByIdGetterCache.threadsById=t,t}}]),e}(),_excluded$2=[`own_votes`,`id`],_excluded2$1=[`id`];function ownKeys$3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
176t%2?ownKeys$3(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var isPollUpdatedEvent=function(e){return e.type===`poll.updated`},isPollClosedEventEvent=function(e){return e.type===`poll.closed`},isPollVoteCastedEvent=function(e){return e.type===`poll.vote_casted`},isPollVoteChangedEvent=function(e){return e.type===`poll.vote_changed`},isPollVoteRemovedEvent=function(e){return e.type===`poll.vote_removed`},isVoteAnswer=function(e){return!!(e!=null&&e.answer_text)},Poll=function(){function e(t){var n=this,r=t.client,i=t.poll;_classCallCheck(this,e),_defineProperty(this,`state`,void 0),_defineProperty(this,`id`,void 0),_defineProperty(this,`client`,void 0),_defineProperty(this,`unsubscribeFunctions`,new Set),_defineProperty(this,`getInitialStateFromPollResponse`,function(e){var t,n=e.own_votes;e.id;var r=_objectWithoutProperties(e,_excluded$2),i=n?.reduce(function(e,t){return isVoteAnswer(t)?e.ownAnswer=t:e.ownVotes.push(t),e},{ownVotes:[]})??{ownVotes:[]},a=i.ownAnswer,o=i.ownVotes;return _objectSpread$3(_objectSpread$3({},r),{},{lastActivityAt:new Date,maxVotedOptionIds:getMaxVotedOptionIds(r.vote_counts_by_option),ownAnswer:a,ownVotesByOptionId:getOwnVotesByOptionId(o)})}),_defineProperty(this,`reinitializeState`,function(e){n.state.partialNext(n.getInitialStateFromPollResponse(e))}),_defineProperty(this,`handlePollUpdated`,function(e){var t;if(!((t=e.poll)!=null&&t.id&&e.poll.id!==n.id)&&isPollUpdatedEvent(e)){var r=_objectWithoutProperties(extractPollData(e.poll),_excluded2$1);n.state.partialNext(_objectSpread$3(_objectSpread$3({},r),{},{lastActivityAt:new Date(e.created_at)}))}}),_defineProperty(this,`handlePollClosed`,function(e){var t;(t=e.poll)!=null&&t.id&&e.poll.id!==n.id||isPollClosedEventEvent(e)&&n.state.partialNext({is_closed:!0,lastActivityAt:new Date(e.created_at)})}),_defineProperty(this,`handleVoteCasted`,function(e){var t;if(!((t=e.poll)!=null&&t.id&&e.poll.id!==n.id)&&isPollVoteCastedEvent(e)){var r=n.data,i=e.poll_vote.user_id===n.client.userID,a=_toConsumableArray(r.latest_answers),o=r.ownAnswer,c=r.ownVotesByOptionId,u=r.maxVotedOptionIds;i&&(isVoteAnswer(e.poll_vote)?o=e.poll_vote:e.poll_vote.option_id&&(c[e.poll_vote.option_id]=e.poll_vote)),isVoteAnswer(e.poll_vote)?a=[e.poll_vote].concat(_toConsumableArray(a)):u=getMaxVotedOptionIds(e.poll.vote_counts_by_option);var K=extractPollEnrichedData(e.poll);n.state.partialNext(_objectSpread$3(_objectSpread$3({},K),{},{latest_answers:a,lastActivityAt:new Date(e.created_at),ownAnswer:o,ownVotesByOptionId:c,maxVotedOptionIds:u}))}}),_defineProperty(this,`handleVoteChanged`,function(e){var t;if(!((t=e.poll)!=null&&t.id&&e.poll.id!==n.id)&&isPollVoteChangedEvent(e)){var r=n.data,i=e.poll_vote.user_id===n.client.userID,a=_toConsumableArray(r.latest_answers),o=r.ownAnswer,c=r.ownVotesByOptionId,u=r.maxVotedOptionIds;if(i){if(isVoteAnswer(e.poll_vote))a=[e.poll_vote].concat(_toConsumableArray(a.filter(function(t){return t.id!==e.poll_vote.id}))),o=e.poll_vote;else if(e.poll_vote.option_id){var K;e.poll.enforce_unique_votes?c=_defineProperty({},e.poll_vote.option_id,e.poll_vote):(c=Object.entries(c).reduce(function(t,n){var r=_slicedToArray(n,2),i=r[0],a=r[1];return i!==e.poll_vote.option_id&&a.id===e.poll_vote.id||(t[i]=a),t},{}),c[e.poll_vote.option_id]=e.poll_vote),o?.id===e.poll_vote.id&&(o=void 0),u=getMaxVotedOptionIds(e.poll.vote_counts_by_option)}}else isVoteAnswer(e.poll_vote)?a=[e.poll_vote].concat(_toConsumableArray(a)):u=getMaxVotedOptionIds(e.poll.vote_counts_by_option);var Y=extractPollEnrichedData(e.poll);n.state.partialNext(_objectSpread$3(_objectSpread$3({},Y),{},{latest_answers:a,lastActivityAt:new Date(e.created_at),ownAnswer:o,ownVotesByOptionId:c,maxVotedOptionIds:u}))}}),_defineProperty(this,`handleVoteRemoved`,function(e){var t;if(!((t=e.poll)!=null&&t.id&&e.poll.id!==n.id)&&isPollVoteRemovedEvent(e)){var r=n.data,i=e.poll_vote.user_id===n.client.userID,a=_toConsumableArray(r.latest_answers),o=r.ownAnswer,c=_objectSpread$3({},r.ownVotesByOptionId),u=r.maxVotedOptionIds;isVoteAnswer(e.poll_vote)?(a=a.filter(function(t){return t.id!==e.poll_vote.id}),i&&(o=void 0)):(u=getMaxVotedOptionIds(e.poll.vote_counts_by_option),i&&e.poll_vote.option_id&&delete c[e.poll_vote.option_id]);var K=extractPollEnrichedData(e.poll);n.state.partialNext(_objectSpread$3(_objectSpread$3({},K),{},{latest_answers:a,lastActivityAt:new Date(e.created_at),ownAnswer:o,ownVotesByOptionId:c,maxVotedOptionIds:u}))}}),_defineProperty(this,`query`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var r,i;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.client.getPoll(t);case 2:return r=e.sent,i=r.poll,n.state.partialNext(_objectSpread$3(_objectSpread$3({},i),{},{lastActivityAt:new Date})),e.abrupt(`return`,i);case 6:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`update`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.client.updatePoll(_objectSpread$3(_objectSpread$3({},t),{},{id:n.id}));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`partialUpdate`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.client.partialUpdatePoll(n.id,t);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`close`,_asyncToGenerator(import_regenerator.default.mark(function e(){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.client.closePoll(n.id);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e)}))),_defineProperty(this,`delete`,_asyncToGenerator(import_regenerator.default.mark(function e(){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.client.deletePoll(n.id);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e)}))),_defineProperty(this,`createOption`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.client.createPollOption(n.id,t);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`updateOption`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.client.updatePollOption(n.id,t);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`deleteOption`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.client.deletePollOption(n.id,t);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`castVote`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,r){var i,a,o,c,u,K;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.data,a=i.max_votes_allowed,o=i.ownVotesByOptionId,c=a&&a===Object.keys(o).length,!c){e.next=8;break}
176if(K=Object.values(o)[0],Object.values(o).slice(1).forEach(function(e){var t;(!((t=K)!=null&&t.created_at)||new Date(e.created_at)<new Date(K.created_at))&&(K=e)}),!((u=K)!=null&&u.id)){e.next=8;break}return e.next=8,n.removeVote(K.id,r);case 8:return e.next=10,n.client.castPollVote(r,n.id,{option_id:t});case 10:return e.abrupt(`return`,e.sent);case 11:case`end`:return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()),_defineProperty(this,`removeVote`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,r){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.client.removePollVote(r,n.id,t);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()),_defineProperty(this,`addAnswer`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,r){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.client.addPollAnswer(r,n.id,t);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()),_defineProperty(this,`removeAnswer`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,r){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.client.removePollVote(r,n.id,t);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()),_defineProperty(this,`queryAnswers`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.client.queryPollAnswers(n.id,t.filter,t.sort,t.options);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`queryOptionVotes`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.client.queryPollVotes(n.id,t.filter,t.sort,t.options);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),this.client=r,this.id=i.id,this.state=new StateStore(this.getInitialStateFromPollResponse(i))}return _createClass(e,[{key:`data`,get:function(){return this.state.getLatestValue()}}]),e}();function getMaxVotedOptionIds(e){for(var t=0,n=[],r=0,i=Object.entries(e??{});r<i.length;r++){var a=_slicedToArray(i[r],2),o=a[0],c=a[1];c>t?(n=[o],t=c):c===t&&n.push(o)}return n}function getOwnVotesByOptionId(e){return e?e.reduce(function(e,t){return isVoteAnswer(t)||!t.option_id||(e[t.option_id]=t),e},{}):{}}function extractPollData(e){return{allow_answers:e.allow_answers,allow_user_suggested_options:e.allow_user_suggested_options,description:e.description,enforce_unique_vote:e.enforce_unique_vote,id:e.id,is_closed:e.is_closed,max_votes_allowed:e.max_votes_allowed,name:e.name,options:e.options,voting_visibility:e.voting_visibility}}function extractPollEnrichedData(e){return{answers_count:e.answers_count,latest_votes_by_option:e.latest_votes_by_option,vote_count:e.vote_count,vote_counts_by_option:e.vote_counts_by_option}}function _createForOfIteratorHelper$1(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray$1(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
177In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,c;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,c=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw c}}}}function _unsupportedIterableToArray$1(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray$1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$1(e,t)}}function _arrayLikeToArray$1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var PollManager=function(){function e(t){var n=this,r=t.client;_classCallCheck(this,e),_defineProperty(this,`client`,void 0),_defineProperty(this,`pollCache`,new Map),_defineProperty(this,`unsubscribeFunctions`,new Set),_defineProperty(this,`fromState`,function(e){return n.pollCache.get(e)}),_defineProperty(this,`registerSubscriptions`,function(){n.unsubscribeFunctions.size||(n.unsubscribeFunctions.add(n.subscribeMessageNew()),n.unsubscribeFunctions.add(n.subscribePollUpdated()),n.unsubscribeFunctions.add(n.subscribePollClosed()),n.unsubscribeFunctions.add(n.subscribeVote
177Casted()),n.unsubscribeFunctions.add(n.subscribeVoteChanged()),n.unsubscribeFunctions.add(n.subscribeVoteRemoved()))}),_defineProperty(this,`unregisterSubscriptions`,function(){n.unsubscribeFunctions.forEach(function(e){return e()}),n.unsubscribeFunctions.clear()}),_defineProperty(this,`createPoll`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var r,i;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.client.createPoll(t);case 2:return r=e.sent,i=r.poll,e.abrupt(`return`,new Poll({client:n.client,poll:i}));case 5:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`getPoll`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var r,i,a;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.fromState(t),!r){e.next=4;break}return n.client.getPoll(t).then(function(e){var t=e.poll;return n.setOrOverwriteInCache(t,!0)}),e.abrupt(`return`,r);case 4:return e.next=6,n.client.getPoll(t);case 6:return i=e.sent,a=i.poll,n.setOrOverwriteInCache(a),e.abrupt(`return`,n.fromState(t));case 10:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`queryPolls`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var r,i,a,o,c,u,K=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=K.length>1&&K[1]!==void 0?K[1]:[],i=K.length>2&&K[2]!==void 0?K[2]:{},e.next=4,n.client.queryPolls(t,r,i);case 4:return a=e.sent,o=a.polls,c=a.next,u=o.map(function(e){return n.setOrOverwriteInCache(e,!0),n.fromState(e.id)}),e.abrupt(`return`,{polls:u,next:c});case 9:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`hydratePollCache`,function(e,t){var r=_createForOfIteratorHelper$1(e),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;if(a.poll){var o=a.poll;n.setOrOverwriteInCache(o,t)}}}catch(e){r.e(e)}finally{r.f()}}),_defineProperty(this,`setOrOverwriteInCache`,function(e,t){if(n.client._cacheEnabled()){var r=n.fromState(e.id);if(r)t&&r.reinitializeState(e);else{var i=new Poll({client:n.client,poll:e});n.pollCache.set(i.id,i)}}}),_defineProperty(this,`subscribePollUpdated`,function(){return n.client.on(`poll.updated`,function(e){var t;if((t=e.poll)!=null&&t.id){var r;(r=n.fromState(e.poll.id))==null||r.handlePollUpdated(e)}}).unsubscribe}),_defineProperty(this,`subscribePollClosed`,function(){return n.client.on(`poll.closed`,function(e){var t;if((t=e.poll)!=null&&t.id){var r;(r=n.fromState(e.poll.id))==null||r.handlePollClosed(e)}}).unsubscribe}),_defineProperty(this,`subscribeVoteCasted`,function(){return n.client.on(`poll.vote_casted`,function(e){var t;if((t=e.poll)!=null&&t.id){var r;(r=n.fromState(e.poll.id))==null||r.handleVoteCasted(e)}}).unsubscribe}),_defineProperty(this,`subscribeVoteChanged`,function(){return n.client.on(`poll.vote_changed`,function(e){var t;if((t=e.poll)!=null&&t.id){var r;(r=n.fromState(e.poll.id))==null||r.handleVoteChanged(e)}}).unsubscribe}),_defineProperty(this,`subscribeVoteRemoved`,function(){return n.client.on(`poll.vote_removed`,function(e){var t;if((t=e.poll)!=null&&t.id){var r;(r=n.fromState(e.poll.id))==null||r.handleVoteRemoved(e)}}).unsubscribe}),_defineProperty(this,`subscribeMessageNew`,function(){return n.client.on(`message.new`,function(e){var t=e.message;if(t){var r=formatMessage(t);n.hydratePollCache([r])}}).unsubscribe}),this.client=r}return _createClass(e,[{key:`data`,get:function(){return this.pollCache}}]),e}();function ownKeys$2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys$2(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$2(Object(n)).forEac
177h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var channelManagerEventToHandlerMapping={"channel.deleted":`channelDeletedHandler`,"channel.hidden":`channelHiddenHandler`,"channel.truncated":`channelTruncatedHandler`,"channel.visible":`channelVisibleHandler`,"message.new":`newMessageHandler`,"member.updated":`memberUpdatedHandler`,"notification.added_to_channel":`notificationAddedToChannelHandler`,"notification.message_new":`notificationNewMessageHandler`,"notification.removed_from_channel":`notificationRemovedFromChannelHandler`},DEFAULT_CHANNEL_MANAGER_OPTIONS={abortInFlightQuery:!1,allowNotLoadedChannelPromotionForEvent:{"channel.visible":!0,"message.new":!0,"notification.added_to_channel":!0,"notification.message_new":!0},lockChannelOrder:!1},DEFAULT_CHANNEL_MANAGER_PAGINATION_OPTIONS={limit:10,offset:0},ChannelManager=function e(t){var n=this,r=t.client,i=t.eventHandlerOverrides,a=i===void 0?{}:i,o=t.options,c=o===void 0?{}:o;_classCallCheck(this,e),_defineProperty(this,`state`,void 0),_defineProperty(this,`client`,void 0),_defineProperty(this,`unsubscribeFunctions`,new Set),_defineProperty(this,`eventHandlers`,new Map),_defineProperty(this,`eventHandlerOverrides`,new Map),_defineProperty(this,`options`,{}),_defineProperty(this,`stateOptions`,{}),_defineProperty(this,`setChannels`,function(e){n.state.next(function(t){var n=t.channels,r=isPatch(e)?e(n):e;return n===r?t:_objectSpread$2(_objectSpread$2({},t),{},{channels:r})})}),_defineProperty(this,`setEventHandlerOverrides`,function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Object.entries(e).reduce(function(e,t){var n=_slicedToArray(t,2),r=n[0],i=n[1];return i&&(e[r]=i),e},{});n.eventHandlerOverrides=new Map(Object.entries(t))}),_defineProperty(this,`setOptions`,function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.options=_objectSpread$2(_objectSpread$2({},DEFAULT_CHANNEL_MANAGER_OPTIONS),e)}),_defineProperty(this,`queryChannels`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var r,i,a,o,c,u,K,Y,X,ee,te,ce,ue,de,fe,me=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=me.length>1&&me[1]!==void 0?me[1]:[],i=me.length>2&&me[2]!==void 0?me[2]:{},a=me.length>3&&me[3]!==void 0?me[3]:{},o=_objectSpread$2(_objectSpread$2({},DEFAULT_CHANNEL_MANAGER_PAGINATION_OPTIONS),i),c=o.offset,u=o.limit,K=n.state.getLatestValue(),Y=K.pagination.isLoading,!Y||n.options.abortInFlightQuery){e.next=7;break}return e.abrupt(`return`);case 7:return e.prev=7,n.stateOptions=a,n.state.next(function(e){return _objectSpread$2(_objectSpread$2({},e),{},{pagination:_objectSpread$2(_objectSpread$2({},e.pagination),{},{isLoading:!0,isLoadingNext:!1,filters:t,sort:r,options:i})})}),e.next=12,n.client.queryChannels(t,r,i,a);case 12:te=e.sent,ce=c+(te?.length??0),ue=_objectSpread$2(_objectSpread$2({},i),{},{offset:ce}),de=n.state.getLatestValue(),fe=de.pagination,n.state.partialNext({channels:te,pagination:_objectSpread$2(_objectSpread$2({},fe),{},{hasNext:(te?.length??0)>=u,isLoading:!1,options:ue}),initialized:!0}),e.next=24;break;case 19:throw e.prev=19,e.t0=e.catch(7),n.client.logger(`error`,e.t0.message),n.state.next(function(e){return _objectSpread$2(_objectSpread$2({},e),{},{pagination:_objectSpread$2(_objectSpread$2({},e.pagination),{},{isLoading:!1})})}),e.t0;case 24:case`end`:return e.stop()}},e,null,[[7,19]])}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`loadNext`,_asyncToGenerator(import_regenerator.default.mark(function e(){var t,r,i,a,o,c,u,K,Y,X,ee,te,ce,ue,de,fe,me,ge;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.state.getLatestValue(),r=t.pagination,i=t.initialized,a=r.filters,o=r.sort,c=r.options,u=r.isLoadingNext,K=r.hasNext,i&&!u&&K){e.next=4;break}return e.abrupt(`return`);case 4:return e.prev=4,ee=_objectSpread$2(_objectSpread$2({},DEFAULT_CHANNEL_MANAGER_PAGINATION_OPTIONS),c),te=ee.offset,ce=ee.limit,n.state.partialNext({pagination:_objectSpread$2(_objectSpread$2({},r),{},{isLoading:!1,isLoadingNext:!0})}),e.next=9,n.client.queryChannels(a,o,c,n.stateOptions);case 9:ue=e.sent,de=n.state.getLatestValue(),fe=de.channels,me=te+(ue?.length??0),ge=_objectSpread$2(_objectSpread$2({},c),{},{offset:me}),n.state.partialNext({channels:uniqBy([].concat(_toConsumableArray(fe||[]),_toConsumableArray(ue)),`cid`),pagination:_objectSpread$2(_objectSpread$2({},r),{},{hasNext:(ue?.length??0)>=ce,isLoading:!1,isLoadingNext:!1,options:ge})}),e.next=21;break;case 16:throw e.prev=16,e.t0=e.catch(4),n.client.logger(`error`,e.t0.message),n.state.next(function(e){return _objectSpread$2(_objectSpread$2({},e),{},{pagination:_objectSpread$2(_objectSpread$2({},e.pagination),{},{isLoadingNext:!1})})}),e.t0;case 21:case`end`:return e.stop()}},e,null,[[4,16]])}))),_defineProperty(this,`notificationAddedToChannelHandler`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var r,i,a,o,c,u,K,Y,X,ee,te,ce;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t?.channel??{},o=a.id,c=a.type,u=a.members,c&&(i=n.options.allowNotLoadedChannelPromotionForEvent)!=null&&i[`notification.added_to_channel`]){e.next=3;break}return e.abrupt(`return`);case 3:return e.next=5,getAndWatchChannel({client:n.client,id:o,members:u?.reduce(function(e,t){var n=t.user,r=t.user_id||n?.id;return r&&e.push(r),e},[]),type:c});case 5:if(K=e.sent,Y=n.state.getLatestValue(),X=Y.pagination,ee=Y.channels,ee){e.next=9;break}return e.abrupt(`return`);case 9:te=X??{},ce=te.sort,n.setChannels(promoteChannel({channels:ee,channelToMove:K,sort:ce}));case 11:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`channelDeletedHandler`,function(e){var t=n.state.getLatestValue().channels;if(t){var r=_toConsumableArray(t),i=r.findIndex(function(t){var n;return t.cid===(e.cid||e.channel?.cid)});i<0||(r.splice(i,1),n.setChannels(r))}}),_defineProperty(this,`channelHiddenHandler`,this.channelDeletedHandler),_defineProperty(this,`newMessageHandler`,function(e){var t,r=n.state.getLatestValue(),i=r.pagination,a=r.channels;if(a){var o=i??{},c=o.filters,u=o.sort,K=e.channel_type,Y=e.channel_id;if(K&&Y){var X=n.client.channel(K,Y),ee=a.indexOf(X),te=ee>=0,ce=isChannelPinned(X),ue=isChannelArchived(X),de=shouldConsiderArchivedChannels(c),fe=shouldConsiderPinnedChannels(u);de&&ue&&!c.archived||de&&!ue&&c.archived||fe&&ce||n.options.lockChannelOrder||!te&&!((t=n.options.allowNotLoadedChannelPromotionForEvent)!=null&&t[`message.new`])||n.setChannels(promoteChannel({channels:a,channelToMove:X,channelToMoveIndexWithinChannels:ee,sort:u}))}}}),_defineProperty(this,`notificationNewMessageHandler`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var r,i,a,o,c,u,K,Y,X,ee,te,ce,ue,de;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t?.channel??{},o=a.id,c=a.type,o&&c){e.next=3;break}return e.abrupt(`return`);case 3:return e.next=5,getAndWatchChannel({client:n.client,id:o,type:c});case 5:if(u=e.sent,K=n.state.getLatestValue(),Y=K.channels,X=K.pagination,ee=X??{},te=ee.filters,ce=ee.sort,ue=shouldConsiderArchivedChannels(te),de=isChannelArchived(u),!(!Y||ue&&de&&!te.archived||ue&&!de&&te.archived||!((i=n.options.allowNotLoadedChannelPromotionForEvent)!=null&&i[`notification.message_new`]))){e.next=12;break}return e.abrupt(`return`);case 12:n.setChannels(promoteChannel({channels:Y,channelToMove:u,sort:ce}));case 13:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`channelVisibleHandler`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var r,i,a,o,c,u,K,Y,X,ee,te,ce;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.channel_type,a=t.channel_id,i&&a){e.next=3;break}return e.abrupt(`return`);case 3:return e.next=5,getAndWatchChannel({client:n.client,id:t.channel_id,type:t.channel_type});
177case 5:if(o=e.sent,c=n.state.getLatestValue(),u=c.channels,K=c.pagination,Y=K??{},X=Y.sort,ee=Y.filters,te=shouldConsiderArchivedChannels(ee),ce=isChannelArchived(o),!(!u||te&&ce&&!ee.archived||te&&!ce&&ee.archived||!((r=n.options.allowNotLoadedChannelPromotionForEvent)!=null&&r[`channel.visible`]))){e.next=12;break}return e.abrupt(`return`);case 12:n.setChannels(promoteChannel({channels:u,channelToMove:o,sort:X}));case 13:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`notificationRemovedFromChannelHandler`,this.channelDeletedHandler),_defineProperty(this,`memberUpdatedHandler`,function(e){var t,r=n.state.getLatestValue(),i=r.pagination,a=r.channels,o=i.filters,c=i.sort;if((t=e.member)!=null&&t.user&&e.member.user.id===n.client.userID&&e.channel_type&&e.channel_id){var u=e.channel_type,K=e.channel_id,Y=shouldConsiderPinnedChannels(c),X=shouldConsiderArchivedChannels(o),ee=extractSortValue({atIndex:0,sort:c,targetKey:`pinned_at`});if(a&&(Y||X)&&!n.options.lockChannelOrder){var te=n.client.channel(u,K),ce=a.indexOf(te),ue=ce>=0,de=isChannelPinned(te),fe=isChannelArchived(te),me=_toConsumableArray(a);if(ue&&me.splice(ce,1),X&&!fe&&o!=null&&o.archived||X&&fe&&!(o!=null&&o.archived)){n.setChannels(me);return}var ge=null;(ee===1||ee===-1&&!de)&&(ge=findLastPinnedChannelIndex({channels:me}));var Te=typeof ge==`number`?ge+1:0;a[Te]!==te&&(me.splice(Te,0,te),n.setChannels(me))}}}),_defineProperty(this,`subscriptionOrOverride`,function(e){var t=channelManagerEventToHandlerMapping[e.type],r=n.eventHandlers.get(t),i=n.eventHandlerOverrides.get(t);if(i&&typeof i==`function`){i(n.setChannels,e);return}r&&typeof r==`function`&&r(e)}),_defineProperty(this,`registerSubscriptions`,function(){if(!n.unsubscribeFunctions.size)for(var e=0,t=Object.keys(channelManagerEventToHandlerMapping);e<t.length;e++){var r=t[e];n.unsubscribeFunctions.add(n.client.on(r,n.subscriptionOrOverride).unsubscribe)}}),_defineProperty(this,`unregisterSubscriptions`,function(){n.unsubscribeFunctions.forEach(function(e){return e()}),n.unsubscribeFunctions.clear()}),this.client=r,this.state=new StateStore({channels:[],pagination:{isLoading:!1,isLoadingNext:!1,hasNext:!1,filters:{},sort:{},options:DEFAULT_CHANNEL_MANAGER_PAGINATION_OPTIONS},initialized:!1}),this.setEventHandlerOverrides(a),this.setOptions(c),this.eventHandlers=new Map(Object.entries({channelDeletedHandler:this.channelDeletedHandler,channelHiddenHandler:this.channelHiddenHandler,channelVisibleHandler:this.channelVisibleHandler,memberUpdatedHandler:this.memberUpdatedHandler,newMessageHandler:this.newMessageHandler,notificationAddedToChannelHandler:this.notificationAddedToChannelHandler,notificationNewMessageHandler:this.notificationNewMessageHandler,notificationRemovedFromChannelHandler:this.notificationRemovedFromChannelHandler}))},_excluded$1=[`created_at`,`updated_at`,`last_active`,`online`],_excluded2=[`params`,`headers`];function _createForOfIteratorHelper(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
178In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,c;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,c=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw c}}}}function _unsupportedIterableToArray(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(e,t)}}function _arrayLikeToArray(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ownKeys$1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread$1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
178t%2?ownKeys$1(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function isString(e){return typeof e==`string`||e instanceof String}var StreamChat=function(){function e(t,n,r){var i=this,a;_classCallCheck(this,e),_defineProperty(this,`_user`,void 0),_defineProperty(this,`activeChannels`,void 0),_defineProperty(this,`threads`,void 0),_defineProperty(this,`polls`,void 0),_defineProperty(this,`anonymous`,void 0),_defineProperty(this,`persistUserOnConnectionFailure`,void 0),_defineProperty(this,`axiosInstance`,void 0),_defineProperty(this,`baseURL`,void 0),_defineProperty(this,`browser`,void 0),_defineProperty(this,`cleaningIntervalRef`,void 0),_defineProperty(this,`clientID`,void 0),_defineProperty(this,`configs`,void 0),_defineProperty(this,`key`,void 0),_defineProperty(this,`listeners`,void 0),_defineProperty(this,`logger`,void 0),_defineProperty(this,`recoverStateOnReconnect`,void 0),_defineProperty(this,`moderation`,void 0),_defineProperty(this,`mutedChannels`,void 0),_defineProperty(this,`mutedUsers`,void 0),_defineProperty(this,`node`,void 0),_defineProperty(this,`options`,void 0),_defineProperty(this,`secret`,void 0),_defineProperty(this,`setUserPromise`,void 0),_defineProperty(this,`state`,void 0),_defineProperty(this,`tokenManager`,void 0),_defineProperty(this,`user`,void 0),_defineProperty(this,`userAgent`,void 0),_defineProperty(this,`userID`,void 0),_defineProperty(this,`wsBaseURL`,void 0),_defineProperty(this,`wsConnection`,void 0),_defineProperty(this,`wsFallback`,void 0),_defineProperty(this,`wsPromise`,void 0),_defineProperty(this,`consecutiveFailures`,void 0),_defineProperty(this,`insightMetrics`,void 0),_defineProperty(this,`defaultWSTimeoutWithFallback`,void 0),_defineProperty(this,`defaultWSTimeout`,void 0),_defineProperty(this,`nextRequestAbortController`,null),_defineProperty(this,`_getConnectionID`,function(){var e,t;return i.wsConnection?.connectionID||i.wsFallback?.connectionID}),_defineProperty(this,`_hasConnectionID`,function(){return!!i._getConnectionID()}),_defineProperty(this,`connectUser`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,a;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.id){e.next=2;break}throw Error(`The "id" field on the user is missing`);case 2:if(!(i.userID===t.id&&i.setUserPromise)){e.next=5;break}return console.warn(`Consecutive calls to connectUser is detected, ideally you should only call this function once in your app.`),e.abrupt(`return`,i.setUserPromise);case 5:if(!i.userID){e.next=7;break}throw Error(`Use client.disconnect() before trying to connect as a different user. connectUser was called twice.`);case 7:return(i._isUsingServerAuth()||i.node)&&!i.options.allowServerSideConnect&&console.warn(`Please do not use connectUser server side. connectUser impacts MAU and concurrent connection usage and thus your bill. If you have a valid use-case, add "allowServerSideConnect: true" to the client options to disable this warning.`),i.userID=t.id,i.anonymous=!1,r=i._setToken(t,n),i._setUser(t),a=i.openConnection(),i.setUserPromise=Promise.all([r,a]).then(function(e){return e[1]}),e.prev=14,e.next=17,i.setUserPromise;case 17:return e.abrupt(`return`,e.sent);case 20:throw e.prev=20,e.t0=e.catch(14),i.persistUserOnConnectionFailure?i.closeConnection():i.disconnectUser(),e.t0;case 24:case`end`:return e.stop()}},e,null,[[14,20]])}));return function(t,n){return e.apply(this,arguments)}}()),_defineProperty(this,`setUser`,this.connectUser),_defineProperty(this,`_setToken`,function(e,t){return i.tokenManager.setTokenOrProvider(t,e)}),_defineProperty(this,`closeConnection`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i.cleaningIntervalRef!=null&&(clearInterval(i.cleaningIntervalRef),i.cleaningIntervalRef=void 0),e.next=3,Promise.all([i.wsConnection?.disconnect(t),i.wsFallback?.disconnect(t)]);case 3:return e.abrupt(`return`,Promise.resolve());case 4:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`createChannelManager`,function(e){var t=e.eventHandlerOverrides,n=t===void 0?{}:t,r=e.options;return new ChannelManager({client:i,eventHandlerOverrides:n,options:r===void 0?{}:r})}),_defineProperty(this,`openConnection`,_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r;return import_regenerator.default.wrap(function(e){for(;;
178)switch(e.prev=e.next){case 0:if(i.userID){e.next=2;break}throw Error(`User is not set on client, use client.connectUser or client.connectAnonymousUser instead`);case 2:if(!((t=i.wsConnection)!=null&&t.isConnecting&&i.wsPromise)){e.next=5;break}return i.logger(`info`,`client:openConnection() - connection already in progress`,{tags:[`connection`,`client`]}),e.abrupt(`return`,i.wsPromise);case 5:if(!(((n=i.wsConnection)!=null&&n.isHealthy||(r=i.wsFallback)!=null&&r.isHealthy())&&i._hasConnectionID())){e.next=8;break}return i.logger(`info`,`client:openConnection() - openConnection called twice, healthy connection already exists`,{tags:[`connection`,`client`]}),e.abrupt(`return`);case 8:return i.clientID=`${i.userID}--${randomId()}`,i.wsPromise=i.connect(),i._startCleaning(),e.abrupt(`return`,i.wsPromise);case 12:case`end`:return e.stop()}},e)}))),_defineProperty(this,`_setupConnection`,this.openConnection),_defineProperty(this,`_normalizeDate`,function(e){if(e instanceof Date&&(e=e.toISOString()),e===``)throw Error(`Don't pass blank string for since, use null instead if resetting the token revoke`);return e}),_defineProperty(this,`disconnectUser`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,a,o;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(i.logger(`info`,`client:disconnect() - Disconnecting the client`,{tags:[`connection`,`client`]}),delete i.user,delete i._user,delete i.userID,i.anonymous=!1,n=i.closeConnection(t),r=0,a=Object.values(i.activeChannels);r<a.length;r++)o=a[r],o._disconnect();return i.activeChannels={},i.state=new ClientState({client:i}),i.threads.resetState(),setTimeout(i.tokenManager.reset),e.abrupt(`return`,n);case 12:case`end`:return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),_defineProperty(this,`disconnect`,this.disconnectUser),_defineProperty(this,`connectAnonymousUser`,function(){(i._isUsingServerAuth()||i.node)&&!i.options.allowServerSideConnect&&console.warn(`Please do not use connectUser server side. connectUser impacts MAU and concurrent connection usage and thus your bill. If you have a valid use-case, add "allowServerSideConnect: true" to the client options to disable this warning.`),i.anonymous=!0,i.userID=randomId();var e={id:i.userID,anon:!0};return i._setToken(e,``),i._setUser(e),i._setupConnection()}),_defineProperty(this,`setAnonymousUser`,this.connectAnonymousUser),_defineProperty(this,`doAxiosRequest`,function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r){var a,o,c,u,K=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=K.length>3&&K[3]!==void 0?K[3]:{},e.next=3,i.tokenManager.tokenReady();case 3:o=i._enrichAxiosOptions(a),e.prev=4,i._logApiRequest(t,n,r,o),e.t0=t,e.next=e.t0===`get`?9:e.t0===`delete`?13:e.t0===`post`?17:e.t0===`postForm`?21:e.t0===`put`?25:e.t0===`patch`?29:e.t0===`options`?33:37;break;case 9:return e.next=11,i.axiosInstance.get(n,o);case 11:return c=e.sent,e.abrupt(`break`,38);case 13:return e.next=15,i.axiosInstance.delete(n,o);case 15:return c=e.sent,e.abrupt(`break`,38);case 17:return e.next=19,i.axiosInstance.post(n,r,o);case 19:return c=e.sent,e.abrupt(`break`,38);case 21:return e.next=23,i.axiosInstance.postForm(n,r,o);case 23:return c=e.sent,e.abrupt(`break`,38);case 25:return e.next=27,i.axiosInstance.put(n,r,o);case 27:return c=e.sent,e.abrupt(`break`,38);case 29:return e.next=31,i.axiosInstance.patch(n,r,o);case 31:return c=e.sent,e.abrupt(`break`,38);case 33:return e.next=35,i.axiosInstance.options(n,o);case 35:return c=e.sent,e.abrupt(`break`,38);case 37:throw Error(`Invalid request type`);case 38:return i._logApiResponse(t,n,c),i.consecutiveFailures=0,e.abrupt(`return`,i.handleResponse(c));case 43:if(e.prev=43,e.t1=e.catch(4),e.t1.client_request_id=o.headers?.[`x-client-request-id`],i._logApiError(t,n,e.t1),i.consecutiveFailures+=1,!e.t1.response){e.next=60;break}if(e.t1.response.data.code!==chatCodes.TOKEN_EXPIRED||i.tokenManager.isStatic()){e.next=57;break}if(!(i.consecutiveFailures>1)){e.next=53;break}return e.next=53,sleep(retryInterval(i.consecutiveFailures));case 53:return i.tokenManager.loadToken(),e.next=56,i.doAxiosRequest(t,n,r,a);case 56:return e.abrupt(`return`,e.sent);case 57:return e.abrupt(`return`,i.handleResponse(e.t1.response));case 60:throw e.t1;case 61:case`end`:return e.stop()}},e,null,[[4,43]])}));return function(t,n,r){return e.apply(this,arguments)}}()),_defineProperty(this,`dispatchEvent`,function(e){e.received_at||=new Date;var t=i._handleClientEvent(e),n=e.cid,r=n?i.activeChannels[n]:void 0;r&&r._handleChannelEvent(e),i._callClientListeners(e),r&&r._callChannelListeners(e),t.forEach(function(e){return e()})}),_defineProperty(this,`handleEvent`,function(e){var t=e.data,n=JSON.parse(t);i.dispatchEvent(n)}),_defineProperty(this,`_updateMemberWatcherReferences`,function(e){for(var t in 
178i.state.userChannelReferences[e.id]||{}){var n=i.activeChannels[t];n!=null&&n.state&&(n.state.members[e.id]&&(n.state.members[e.id].user=e),n.state.watchers[e.id]&&(n.state.watchers[e.id]=e),n.state.read[e.id]&&(n.state.read[e.id].user=e))}}),_defineProperty(this,`_updateUserReferences`,this._updateMemberWatcherReferences),_defineProperty(this,`_updateUserMessageReferences`,function(e){for(var t in i.state.userChannelReferences[e.id]||{}){var n=i.activeChannels[t];n&&n.state?.updateUserMessages(e)}}),_defineProperty(this,`_deleteUserMessageReference`,function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var n in i.state.userChannelReferences[e.id]||{}){var r=i.activeChannels[n];r&&r.state?.deleteUserMessages(e,t)}}),_defineProperty(this,`_handleUserEvent`,function(e){if(e.user){if(e.type===`user.presence.changed`||e.type===`user.updated`){if(e.user.id===i.userID){var t=_objectSpread$1({},i.user||{}),n=_objectSpread$1({},i._user||{});for(var r in i.user)r in e.user||isOwnUserBaseProperty(r)||(delete t[r],delete n[r]);for(var a in e.user)n&&a in n&&(n[a]=e.user[a]);i._user=_objectSpread$1({},n),i.user=_objectSpread$1(_objectSpread$1({},t),e.user)}i.state.updateUser(e.user),i._updateMemberWatcherReferences(e.user)}e.type===`user.updated`&&i._updateUserMessageReferences(e.user),e.type===`user.deleted`&&e.user.deleted_at&&(e.mark_messages_deleted||e.hard_delete)&&i._deleteUserMessageReference(e.user,e.hard_delete)}}),_defineProperty(this,`_callClientListeners`,function(e){var t=i,n=[];t.listeners.all&&n.push.apply(n,_toConsumableArray(t.listeners.all)),t.listeners[e.type]&&n.push.apply(n,_toConsumableArray(t.listeners[e.type]));for(var r=0,a=n;r<a.length;r++){var o=a[r];o(e)}}),_defineProperty(this,`recoverState`,_asyncToGenerator(import_regenerator.default.mark(function e(){var t;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i.logger(`info`,`client:recoverState() - Start of recoverState with connectionID ${i._getConnectionID()}`,{tags:[`connection`]}),t=Object.keys(i.activeChannels),!(t.length&&i.recoverStateOnReconnect)){e.next=10;break}return i.logger(`info`,`client:recoverState() - Start the querying of ${t.length} channels`,{tags:[`connection`,`client`]}),e.next=6,i.queryChannels({cid:{$in:t}},{last_message_at:-1},{limit:30});case 6:i.logger(`info`,`client:recoverState() - Querying channels finished`,{tags:[`connection`,`client`]}),i.dispatchEvent({type:`connection.recovered`}),e.next=11;break;case 10:i.dispatchEvent({type:`connection.recovered`});case 11:i.wsPromise=Promise.resolve(),i.setUserPromise=Promise.resolve();case 13:case`end`:return e.stop()}},e)}))),_defineProperty(this,`getChannelByMembers`,function(e,t){var n,r=(t.members??[]).map(function(e){var t;return typeof e==`string`?e:e.user_id??``}),a=r.sort().join(`,`),o=generateChannelTempCid(e,r);if(!o)throw Error(`Please specify atleast one member when creating unique conversation`);for(var c in i.activeChannels){var u=i.activeChannels[c];if(!u.disconnected&&(c===o||c.indexOf(`${e}:!members-`)===0&&Object.keys(u.state.members).sort().join(`,`)===a))return u}var K=new Channel(i,e,void 0,t);return i._cacheEnabled()&&(i.activeChannels[o]=K),K}),_defineProperty(this,`getChannelById`,function(e,t,n){if(typeof t==`string`&&~t.indexOf(`:`))throw Error(`Invalid channel id ${t}, can't contain the : character`);var r=`${e}:${t}`;if(r in i.activeChannels&&i.activeChannels[r]&&!i.activeChannels[r].disconnected){var a=i.activeChannels[r];return Object.keys(n).length>0&&(a.data=_objectSpread$1(_objectSpread$1({},a.data),n),a._data=_objectSpread$1(_objectSpread$1({},a._data),n)),a}var o=new Channel(i,e,t,n);return i._cacheEnabled()&&(i.activeChannels[o.cid]=o),o}),_defineProperty(this,`updateUsers`,this.upsertUsers),_defineProperty(this,`updateUser`,this.upsertUser),_defineProperty(this,`_unblockMessage`,this.unblockMessage),_defineProperty(this,`markAllRead`,this.markChannelsRead),_defineProperty(this,`_isUsingServerAuth`,function(){return!!i.secret}),_defineProperty(this,`_cacheEnabled`,function(){return!i._isUsingServerAuth()||!i.options.disableCache}),_defineProperty(this,`_buildWSPayload`,function(e){return JSON.stringify({user_id:i.userID,user_details:i._user,device:i.options.device,client_request_id:e})}),this.key=t,this.listeners={},this.state=new ClientState({client:this}),this.mutedChannels=[],this.mutedUsers=[],this.moderation=new Moderation(this),n&&isString(n)&&(this.secret=n);var o=r||(n&&!isString(n)?n:{});this.browser=o.browser===void 0?typeof window<`u`:o.browser,this.node=!this.browser,this.options=_objectSpread$1({timeout:3e3,withCredentials:!1,warmUp:!1,recoverStateOnReconnect:!0,disableCache:!1},o),this.node&&!this.options.httpsAgent&&(this.options.httpsAgent=new https.Agent({keepAlive:!0,keepAliveMsecs:3e3})),this.axiosInstance=axios.create(this.options),this.setBaseURL(this.options.baseURL||`https://chat.stream-io-api.com`),typeof process<`u`&&`env`in process&&{}.STREAM_LOCAL_TEST_RUN&&this.setBaseURL(`http://localhost:3030`),typeof process<`u`&&`env`in process&&{}.STREAM_LOCAL_TEST_HOST&&this.setBaseURL(`http://`+{}.STREAM_LOCAL_TEST_HOST),this.wsConnection=null,this.wsPromise=null,this.setUserPromise=null,this.activeChannels={},this.configs={},this.anonymous=!1,this.persistUserOnConnectionFailure=this.options?.persistUserOnConnectionFailure,this.tokenManager=new TokenManager(this.secret),this.consecutiveFailures=0,this.insightMetrics=new InsightMetrics,this.defaultWSTimeoutWithFallback=6e3,this.defaultWSTimeout=15e3,this.axiosInstance.defaults.paramsSerializer
178=axiosParamsSerializer,this.logger=isFunction(o.logger)?o.logger:function(){return null},this.recoverStateOnReconnect=this.options.recoverStateOnReconnect,this.threads=new ThreadManager({client:this}),this.polls=new PollManager({client:this})}return _createClass(e,[{key:`devToken`,value:function(e){return DevToken(e)}},{key:`getAuthType`,value:function(){return this.anonymous?`anonymous`:`jwt`}},{key:`setBaseURL`,value:function(e){this.baseURL=e,this.wsBaseURL=this.baseURL.replace(`http`,`ws`).replace(`:3030`,`:8800`)}},{key:`_setUser`,value:function(e){this.user=e,this.userID=e.id,this._user=_objectSpread$1({},e)}},{key:`updateAppSettings`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.apn_config,n!=null&&n.p12_cert&&(t=_objectSpread$1(_objectSpread$1({},t),{},{apn_config:_objectSpread$1(_objectSpread$1({},n),{},{p12_cert:Buffer.from(n.p12_cert).toString(`base64`)})})),e.next=4,this.patch(this.baseURL+`/app`,t);case 4:return e.abrupt(`return`,e.sent);case 5:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`revokeTokens`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.updateAppSettings({revoke_tokens_issued_before:this._normalizeDate(t)});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`revokeUserToken`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.revokeUsersToken([t],n);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`revokeUsersToken`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i,a,o;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=n===void 0?new Date().toISOString():this._normalizeDate(n),r=[],i=_createForOfIteratorHelper(t);try{for(i.s();!(a=i.n()).done;)o=a.value,r.push({id:o,set:{revoke_tokens_issued_before:n}})}catch(e){i.e(e)}finally{i.f()}return e.next=6,this.partialUpdateUsers(r);case 6:return e.abrupt(`return`,e.sent);case 7:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`getAppSettings`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(this.baseURL+`/app`);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`testPushSettings`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&r[1]!==void 0?r[1]:{},e.next=3,this.post(this.baseURL+`/check_push`,_objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({user_id:t},n.messageID?{message_id:n.messageID}:{}),n.apnTemplate?{apn_template:n.apnTemplate}:{}),n.firebaseTemplate?{firebase_template:n.firebaseTemplate}:{}),n.firebaseDataTemplate?{firebase_data_template:n.firebaseDataTemplate}:{}),n.skipDevices?{skip_devices:!0}:{}),n.pushProviderName?{push_provider_name:n.pushProviderName}:{}),n.pushProviderType?{push_provider_type:n.pushProviderType}:{}));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`testSQSSettings`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&n[0]!==void 0?n[0]:{},e.next=3,this.post(this.baseURL+`/check_sqs`,t);case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`testSNSSettings`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&n[0]!==void 0?n[0]:{},e.next=3,this.post(this.baseURL+`/check_sns`,t);case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`setGuestUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.anonymous=!0,e.prev=1,e.next=4,this.post(this.baseURL+`/guest`,{user:t});case 4:n=e.sent,e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(1),this.anonymous=!1,e.t0;case 11:return this.anonymous=!1,r=n.user,r.created_at,r.updated_at,r.last_active,r.online,i=_objectWithoutProperties(r,_excluded$1),e.next=15,this.connectUser(i,n.access_token);case 15:return e.abrupt(`return`,e.sent);case 16:case`end`:return e.stop()}},e,this,[[1,7]])}));function t(t){return e.apply(this,arguments)}return t}()},{key:`createToken`,value:function(e,t,n){if(this.secret==null)throw Error(`tokens can only be created server-side using the API Secret`);var r={};return t&&(r.exp=t),n&&(r.iat=n),JWTUserToken(this.secret,e,r,{})}},{key:`on`,value:function(e,t){var n=this,r=t?e:`all`,i=t||e;return r in this.listeners||(this.listeners[r]=[]),this.logger(`info`,`Attaching listener for ${r} event`,{tags:[`event`,`client`]}),this.listeners[r].push(i),{unsubscribe:function(){n.logger(`info`,`Removing listener for ${r} event`,{tags:[`event`,`client`]}),n.listeners[r]=n.listeners[r].filter(function(e){return e!==i})}}}},{key:`off`,value:function(e,t){var n=t?e:`all`,r=t||e;n in this.listeners||(this.listeners[n]=[]),this.logger(`info`,`Removing listener for ${n} event`,{tags:[`event`,`client`]}),this.listeners[n]=this.listeners[n].filter(function(e){return e!==r})}},{key:`_logApiRequest`,value:function(e,t,n,r){this.logger(`info`,`client: ${e} - Request - ${t}`,{tags:[`api`,`api_request`,`client`],url:t,payload:n,config:r})}},{key:`_logApiResponse`,value:function(e,t,n){this.logger(`info`,`client:${e} - Response - url: ${t} > status ${n.status}`,{tags:[`api`,`api_response`,`client`],url:t,response:n})}},{key:`_logApiError`,value:function(e,t,n){this.logger(`error`,`client:${e} - Error - url: ${t}`,{tags:[`api`,`api_response`,`client`],url:t,error:n})}},{key:`get`,value:function(e,t){return this.doAxiosRequest(`get`,e,null,{params:t})}},{key:`put`,value:function(e,t){return this.doAxiosRequest(`put`,e,t)}},{key:`post`,value:function(e,t){return this.doAxiosRequest(`post`,e,t)}},{key:`patch`,value:function(e,t){return this.doAxiosRequest(`patch`,e,t)}},{key:`delete`,value:function(e,t){return this.doAxiosRequest(`delete`,e,null,{params:t})}},{key:`sendFile`,value:function(e,t,n,r,i){var a=addFileToFormData(t,n,r||`multipart/form-data`);return i!=null&&a.append(`user`,JSON.stringify(i)),this.doAxiosRequest(`postForm`,e,a,{headers:a.getHeaders?a.getHeaders():{},config:{timeout:0,maxContentLength:1/0,maxBodyLength:1/0}})}},{key:`errorFromResponse`,value:function(e){var t=new ErrorFromResponse(`StreamChat error HTTP code: ${e.status}`);return e.data&&e.data.code&&(t=Error(`StreamChat error code ${e.data.code}: ${e.data.message}`),t.code=e.data.code),t.response=e,t.status=e.status,t}},{key:`handleResponse`,value:function(e){var t=e.data;if(isErrorResponse(e))throw this.errorFromResponse(e);return t}},{key:`_handleClientEvent`,value:function(e){var t,n,r=this,i=this,a=[];if(this.logger(`info`,`client:_handleClientEvent - Received event of type { ${e.type} }`,{tags:[`event`,`client`],event:e}),(e.type===`user.presence.changed`||e.type===`user.updated`||e.type===`user.deleted`)&&this._handleUserEvent(e),e.type===`health.check`&&e.me&&(i.user=e.me,i.state.updateUser(e.me),i.mutedChannels=e.me.channel_mutes,i.mutedUsers=e.me.mutes),e.channel&&e.type===`notification.message_new`&&this._addChannelConfig(e.channel),e.type===`notification.channel_mutes_updated`&&(t=e.me)!=null&&t.channel_mutes&&(this.mutedChannels=e.me.channel_mutes),e.type===`notification.mutes_updated`&&(n=e.me)!=null&&n.mutes&&(this.mutedUsers=e.me.mutes),e.type===`notification.mark_read`&&e.unread_channels===0&&Object.keys(this.activeChannels).forEac
178h(function(e){return r.activeChannels[e].state.unreadCount=0}),(e.type===`channel.deleted`||e.type===`notification.channel_deleted`)&&e.cid){var o;i.state.deleteAllChannelReference(e.cid),(o=this.activeChannels[e.cid])==null||o._disconnect(),a.push(function(){e.cid&&delete r.activeChannels[e.cid]})}return a}},{key:`_muteStatus`,value:function(e){for(var t,n=0;n<this.mutedChannels.length;n++){var r,i=this.mutedChannels[n];if(i.channel?.cid===e){t={muted:!i.expires||new Date(i.expires).getTime()>new Date().getTime(),createdAt:i.created_at?new Date(i.created_at):new Date,expiresAt:i.expires?new Date(i.expires):null};break}}return t||{muted:!1,createdAt:null,expiresAt:null}}},{key:`connect`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.userID&&this._user){e.next=2;break}throw Error(`Call connectUser or connectAnonymousUser before starting the connection`);case 2:if(this.wsBaseURL){e.next=4;break}throw Error(`Websocket base url not set`);case 4:if(this.clientID){e.next=6;break}throw Error(`clientID is not set`);case 6:if(!this.wsConnection&&(this.options.warmUp||this.options.enableInsights)&&this._sayHi(),this.options.wsConnection&&this.node?(this.options.wsConnection.setClient(this),this.wsConnection=this.options.wsConnection):this.wsConnection=new StableWSConnection({client:this}),e.prev=8,!this.wsFallback){e.next=13;break}return e.next=12,this.wsFallback.connect();case 12:return e.abrupt(`return`,e.sent);case 13:return e.next=15,this.wsConnection.connect(this.options.enableWSFallback?this.defaultWSTimeoutWithFallback:this.defaultWSTimeout);case 15:return e.abrupt(`return`,e.sent);case 18:if(e.prev=18,e.t0=e.catch(8),!(this.options.enableWSFallback&&isWSFailure(e.t0)&&isOnline())){e.next=29;break}return this.logger(`info`,`client:connect() - WS failed, fallback to longpoll`,{tags:[`connection`,`client`]}),this.dispatchEvent({type:`transport.changed`,mode:`longpoll`}),this.wsConnection._destroyCurrentWSConnection(),this.wsConnection.disconnect().then(),this.wsFallback=new WSConnectionFallback({client:this}),e.next=28,this.wsFallback.connect();case 28:return e.abrupt(`return`,e.sent);case 29:throw e.t0;case 30:case`end`:return e.stop()}},e,this,[[8,18]])}));function t(){return e.apply(this,arguments)}return t}()},{key:`_sayHi`,value:function(){var e=this,t=randomId(),n={headers:{"x-client-request-id":t}};this.doAxiosRequest(`get`,this.baseURL+`/hi`,null,n).catch(function(n){e.options.enableInsights&&postInsights(`http_hi_failed`,{api_key:e.key,err:n,client_request_id:t})})}},{key:`queryUsers`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i,a,o=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&o[1]!==void 0?o[1]:[],r=o.length>2&&o[2]!==void 0?o[2]:{},i={presence:!1},e.next=5,this.wsPromise;case 5:return this._hasConnectionID()||(i.presence=!1),e.next=8,this.get(this.baseURL+`/users`,{payload:_objectSpread$1(_objectSpread$1({filter_conditions:t,sort:normalizeQuerySort(n)},i),r)});case 8:return a=e.sent,this.state.updateUsers(a.users),e.abrupt(`return`,a);case 11:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`queryBannedUsers`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&i[0]!==void 0?i[0]:{},n=i.length>1&&i[1]!==void 0?i[1]:[],r=i.length>2&&i[2]!==void 0?i[2]:{},e.next=5,this.get(this.baseURL+`/query_banned_users`,{payload:_objectSpread$1({filter_conditions:t,sort:normalizeQuerySort(n)},r)});case 5:return e.abrupt(`return`,e.sent);case 6:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`queryMessageFlags`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&r[0]!==void 0?r[0]:{},n=r.length>1&&r[1]!==void 0?r[1]:{},e.next=4,this.get(this.baseURL+`/moderation/flags/message`,{payload:_objectSpread$1({filter_conditions:t},n)});case 4:return e.abrupt(`return`,e.sent);case 5:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`queryChannels`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i,a,o,c,u=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&u[1]!==void 0?u[1]:[],r=u.length>2&&u[2]!==void 0?u[2]:{},i=u.length>3&&u[3]!==void 0?u[3]:{},a={state:!0,watch:!0,presence:!1},e.next=6,this.wsPromise;case 6:return this._hasConnectionID()||(a.watch=!1),o=_objectSpread$1(_objectSpread$1({filter_conditions:t,sort:normalizeQuerySort(n)},a),r),e.next=10,this.post(this.baseURL+`/channels`,o);case 10:return c=e.sent,this.dispatchEvent({type:`channels.queried`,queriedChannels:{channels:c.channels,isLatestMessageSet:!0}}),e.abrupt(`return`,this.hydrateActiveChannels(c.channels,i,r));case 13:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`queryReactions`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i,a,o=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>2&&o[2]!==void 0?o[2]:[],i=o.length>3&&o[3]!==void 0?o[3]:{},e.next=4,this.wsPromise;case 4:return a=_objectSpread$1({filter:n,sort:normalizeQuerySort(r)},i),e.next=7,this.post(this.baseURL+`/messages/`+encodeURIComponent(t)+`/reactions`,a);case 7:return e.abrupt(`return`,e.sent);case 8:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`hydrateActiveChannels`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.skipInitialization,i=t.offlineMode,a=i!==void 0&&i,o=[],c=_createForOfIteratorHelper(e),u;try{for(c.s();!(u=c.n()).done;){var K=u.value;this._addChannelConfig(K.channel);
178var Y=this.channel(K.channel.type,K.channel.id);Y.data=K.channel,Y.offlineMode=a,Y.initialized=!a,Y.push_preferences=K.push_preferences;var X=void 0;r===void 0?X=Y._initializeState(K,`latest`).messageSet:r.includes(K.channel.id)||(Y.state.clearMessages(),X=Y._initializeState(K,`latest`).messageSet),X&&(X.pagination=_objectSpread$1(_objectSpread$1({},X.pagination),messageSetPagination({parentSet:X,requestedPageSize:n?.message_limit||DEFAULT_QUERY_CHANNELS_MESSAGE_LIST_PAGE_SIZE,returnedPage:K.messages,logger:this.logger})),this.polls.hydratePollCache(K.messages,!0)),o.push(Y)}}catch(e){c.e(e)}finally{c.f()}return o}},{key:`search`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i,a=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=a.length>2&&a[2]!==void 0?a[2]:{},!(r.offset&&r.next)){e.next=3;break}throw Error(`Cannot specify offset with next`);case 3:if(i=_objectSpread$1(_objectSpread$1({filter_conditions:t},r),{},{sort:r.sort?normalizeQuerySort(r.sort):void 0}),typeof n!=`string`){e.next=8;break}i.query=n,e.next=13;break;case 8:if(_typeof(n)!==`object`){e.next=12;break}i.message_filter_conditions=n,e.next=13;break;case 12:throw Error(`Invalid type ${_typeof(n)} for query parameter`);case 13:return e.next=15,this.wsPromise;case 15:return e.next=17,this.get(this.baseURL+`/search`,{payload:i});case 17:return e.abrupt(`return`,e.sent);case 18:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`setLocalDevice`,value:function(e){var t,n,r;if((t=this.wsConnection)!=null&&t.isConnecting&&this.wsPromise||((n=this.wsConnection)!=null&&n.isHealthy||(r=this.wsFallback)!=null&&r.isHealthy())&&this._hasConnectionID())throw Error(`you can only set device before opening a websocket connection`);this.options.device=e}},{key:`addDevice`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r,i){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/devices`,_objectSpread$1(_objectSpread$1({id:t,push_provider:n},r==null?{}:{user_id:r}),i==null?{}:{push_provider_name:i}));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n,r,i){return e.apply(this,arguments)}return t}()},{key:`getDevices`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(this.baseURL+`/devices`,t?{user_id:t}:{});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`getUnreadCount`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(this.baseURL+`/unread`,t?{user_id:t}:{});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`getUnreadCountBatch`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/unread_batch`,{user_ids:t});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`setPushPreferences`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/push_preferences`,{preferences:t});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`removeDevice`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.delete(this.baseURL+`/devices`,_objectSpread$1({id:t},n?{user_id:n}:{}));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`getRateLimits`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i,a,o,c;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t||{},r=n.serverSide,i=n.web,a=n.android,o=n.ios,c=n.endpoints,e.abrupt(`return`,this.get(this.baseURL+`/rate_limits`,{server_side:r,web:i,android:a,ios:o,endpoints:c?c.join(`,`):void 0}));case 2:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`_addChannelConfig`,value:function(e){var t=e.cid,n=e.config;this._cacheEnabled()&&(this.configs[t]=n)}},{key:`channel`,value:function(e,t){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!this.userID&&!this._isUsingServerAuth())throw Error(`Call connectUser or connectAnonymousUser before creating a channel`);if(~e.indexOf(`:`))throw Error(`Invalid channel group ${e}, can't contain the : character`);return t&&_typeof(t)===`object`?this.getChannelByMembers(e,t):!t&&_typeof(r)===`object`&&(n=r.members)!=null&&n.length?this.getChannelByMembers(e,r):t?this.getChannelById(e,t,r):new Channel(this,e,void 0,r)}},{key:`partialUpdateUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.partialUpdateUsers([t]);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`upsertUsers`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i,a;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n={},r=_createForOfIteratorHelper(t),e.prev=2,r.s();case 4:if((i=r.n()).done){e.next=11;break}if(a=i.value,a.id){e.next=8;break}throw Error(`User ID is required when updating a user`);case 8:n[a.id]=a;case 9:e.next=4;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),r.e(e.t0);case 16:return e.prev=16,r.f(),e.finish(16);case 19:return e.next=21,this.post(this.baseURL+`/users`,{users:n});case 21:return e.abrupt(`return`,e.sent);case 22:case`end`:return e.stop()}},e,this,[[2,13,16,19]])}));function t(t){return e.apply(this,arguments)}return t}()},{key:`upsertUser`,value:function(e){return this.upsertUsers([e])}},{key:`partialUpdateUsers`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=_createForOfIteratorHelper(t),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}if(i=r.value,i.id){e.next=7;break}throw Error(`User ID is required when updating a user`);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:return e.next=19,this.patch(this.baseURL+`/users`,{users:t});case 19:return e.abrupt(`return`,e.sent);case 20:case`end`:return e.stop()}},e,this,[[1,11,14,17]])}));function t(t){return e.apply(this,arguments)}return t}()},{key:`deleteUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.delete(this.baseURL+`/users/${encodeURIComponent(t)}`,n);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`restoreUsers`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/users/restore`,{user_ids:t});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`reactivateUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/users/${encodeURIComponent(t)}/reactivate`,_objectSpread$1({},n));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`reactivateUsers`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/users/reactivate`,_objectSpread$1({user_ids:t},n));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`deactivateUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/users/${encodeURIComponent(t)}/deactivate`,_objectSpread$1({},n));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`deactivateUsers`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/users/deactivate`,_objectSpread$1({user_ids:t},n));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`exportUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(this.baseURL+`/users/${encodeURIComponent(t)}/export`,_objectSpread$1({},n));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`banUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/moderation/ban`,_objectSpread$1({target_user_id:t},n));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`unbanUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.delete(this.baseURL+`/moderation/ban`,_objectSpread$1({target_user_id:t},n));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`shadowBan`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.banUser(t,_objectSpread$1({shadow:!0}
178,n));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`removeShadowBan`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.unbanUser(t,_objectSpread$1({shadow:!0},n));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`blockUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/users/block`,_objectSpread$1({blocked_user_id:t},n?{user_id:n}:{}));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`getBlockedUsers`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(this.baseURL+`/users/block`,_objectSpread$1({},t?{user_id:t}:{}));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`unBlockUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/users/unblock`,_objectSpread$1({blocked_user_id:t},n?{user_id:n}:{}));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`muteUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&i[2]!==void 0?i[2]:{},e.next=3,this.post(this.baseURL+`/moderation/mute`,_objectSpread$1(_objectSpread$1({target_id:t},n?{user_id:n}:{}),r));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`unmuteUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/moderation/unmute`,_objectSpread$1({target_id:t},n?{user_id:n}:{}));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`userMuteStatus`,value:function(e){if(!this.user||!this.wsPromise)throw Error(`Make sure to await connectUser() first.`);for(var t=0;t<this.mutedUsers.length;t+=1)if(this.mutedUsers[t].target.id===e)return!0;return!1}},{key:`flagMessage`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&r[1]!==void 0?r[1]:{},e.next=3,this.post(this.baseURL+`/moderation/flag`,_objectSpread$1({target_message_id:t},n));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`flagUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&r[1]!==void 0?r[1]:{},e.next=3,this.post(this.baseURL+`/moderation/flag`,_objectSpread$1({target_user_id:t},n));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`unflagMessage`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&r[1]!==void 0?r[1]:{},e.next=3,this.post(this.baseURL+`/moderation/unflag`,_objectSpread$1({target_message_id:t},n));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`unflagUser`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&r[1]!==void 0?r[1]:{},e.next=3,this.post(this.baseURL+`/moderation/unflag`,_objectSpread$1({target_user_id:t},n));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`getCallToken`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&r[1]!==void 0?r[1]:{},e.next=3,this.post(this.baseURL+`/calls/${encodeURIComponent(t)}`,_objectSpread$1({},n));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`_queryFlags`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&r[0]!==void 0?r[0]:{},n=r.length>1&&r[1]!==void 0?r[1]:{},e.next=4,this.post(this.baseURL+`/moderation/flags`,_objectSpread$1({filter_conditions:t},n));case 4:return e.abrupt(`return`,e.sent);case 5:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`_queryFlagReports`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&r[0]!==void 0?r[0]:{},n=r.length>1&&r[1]!==void 0?r[1]:{},e.next=4,this.post(this.baseURL+`/moderation/reports`,_objectSpread$1({filter_conditions:t},n));case 4:return e.abrupt(`return`,e.sent);case 5:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`_reviewFlagReport`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&i[2]!==void 0?i[2]:{},e.next=3,this.patch(this.baseURL+`/moderation/reports/${encodeURIComponent(t)}`,_objectSpread$1({review_result:n},r));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`unblockMessage`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&r[1]!==void 0?r[1]:{},e.next=3,this.post(this.baseURL+`/moderation/unblock_message`,_objectSpread$1({target_message_id:t},n));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`markChannelsRead`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&n[0]!==void 0?n[0]:{},e.next=3,this.post(this.baseURL+`/channels/read`,_objectSpread$1({},t));case 3:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`createCommand`,value:function(e){return this.post(this.baseURL+`/commands`,e)}},{key:`getCommand`,value:function(e){return this.get(this.baseURL+`/commands/${encodeURIComponent(e)}`)}},{key:`updateCommand`,value:function(e,t){return this.put(this.baseURL+`/commands/${encodeURIComponent(e)}`,t)}},{key:`deleteCommand`,value:function(e){return this.delete(this.baseURL+`/commands/${encodeURIComponent(e)}`)}},{key:`listCommands`,value:function(){return this.get(this.baseURL+`/commands`)}},{key:`createChannelType`,value:function(e){var t=_extends({},{commands:[`all`]},e);return this.post(this.baseURL+`/channeltypes`,t)}},{key:`getChannelType`,value:function(e){return this.get(this.baseURL+`/channeltypes/${encodeURIComponent(e)}`)}},{key:`updateChannelType`,value:function(e,t){return this.put(this.baseURL+`/channeltypes/${encodeURIComponent(e)}`,t)}},{key:`deleteChannelType`,value:function(e){return this.delete(this.baseURL+`/channeltypes/${encodeURIComponent(e)}`)}},{key:`listChannelTypes`,value:function(){return this.get(this.baseURL+`/channeltypes`)}},{key:`translateMessage`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/messages/${encodeURIComponent(t)}/translate`,{language:n});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`translate`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/translate`,{text:t,source_language:r,de
178stination_language:n});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:`_normalizeExpiration`,value:function(e){var t=null;if(typeof e==`number`){var n=new Date;n.setSeconds(n.getSeconds()+e),t=n.toISOString()}else isString(e)?t=e:e instanceof Date&&(t=e.toISOString());return t}},{key:`_validateAndGetMessageId`,value:function(e,t){var n;if(typeof e==`string`)n=e;else{if(!e.id)throw Error(t);n=e.id}return n}},{key:`pinMessage`,value:function(e,t,n,r){var i=this._validateAndGetMessageId(e,`Please specify the message id when calling unpinMessage`);return this.partialUpdateMessage(i,{set:{pinned:!0,pin_expires:this._normalizeExpiration(t),pinned_at:this._normalizeExpiration(r)}},n)}},{key:`unpinMessage`,value:function(e,t){var n=this._validateAndGetMessageId(e,`Please specify the message id when calling unpinMessage`);return this.partialUpdateMessage(n,{set:{pinned:!1}},t)}},{key:`updateMessage`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r){var i,a;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.id){e.next=2;break}throw Error(`Please specify the message id when calling updateMessage`);case 2:return i=_extends({},t),delete i.id,a=[`command`,`created_at`,`html`,`latest_reactions`,`own_reactions`,`quoted_message`,`reaction_counts`,`reply_count`,`type`,`updated_at`,`user`,`__html`],a.forEach(function(e){i[e]!=null&&delete i[e]}),n!=null&&(isString(n)?i.user_id=n:i.user={id:n.id}),Array.isArray(i.mentioned_users)&&!isString(i.mentioned_users[0])&&(i.mentioned_users=i.mentioned_users.map(function(e){return e.id})),e.next=10,this.post(this.baseURL+`/messages/${encodeURIComponent(t.id)}`,_objectSpread$1({message:i},r));case 10:return e.abrupt(`return`,e.sent);case 11:case`end`:return e.stop()}},e,this)}));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:`partialUpdateMessage`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r,i){var a;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw Error(`Please specify the message id when calling partialUpdateMessage`);case 2:return a=r,r!=null&&isString(r)&&(a={id:r}),e.next=6,this.put(this.baseURL+`/messages/${encodeURIComponent(t)}`,_objectSpread$1(_objectSpread$1(_objectSpread$1({},n),i),{},{user:a}));case 6:return e.abrupt(`return`,e.sent);case 7:case`end`:return e.stop()}},e,this)}));function t(t,n,r,i){return e.apply(this,arguments)}return t}()},{key:`deleteMessage`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r={},n&&(r={hard:!0}),e.next=4,this.delete(this.baseURL+`/messages/${encodeURIComponent(t)}`,r);case 4:return e.abrupt(`return`,e.sent);case 5:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`undeleteMessage`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/messages/${encodeURIComponent(t)}/undelete`,{undeleted_by:n});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`getMessage`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(this.baseURL+`/messages/${encodeURIComponent(t)}`,_objectSpread$1({},n));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`queryThreads`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t=this,n,r,i,a=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>0&&a[0]!==void 0?a[0]:{},r=_objectSpread$1({limit:10,participant_limit:10,reply_limit:3,watch:!0},n),e.next=4,this.post(`${this.baseURL}
178/threads`,r);case 4:return i=e.sent,e.abrupt(`return`,{threads:i.threads.map(function(e){return new Thread({client:t,threadData:e})}),next:i.next});case 6:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`getThread`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i,a=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>1&&a[1]!==void 0?a[1]:{},t){e.next=3;break}throw Error(`Please specify the messageId when calling getThread`);case 3:return r=_objectSpread$1({participant_limit:100,reply_limit:3,watch:!0},n),e.next=6,this.get(`${this.baseURL}/threads/${encodeURIComponent(t)}`,r);case 6:return i=e.sent,e.abrupt(`return`,new Thread({client:this,threadData:i.thread}));case 8:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`partialUpdateThread`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw Error(`Please specify the message id when calling partialUpdateThread`);case 2:r=[`created_at`,`id`,`last_message_at`,`type`,`updated_at`,`user`,`reply_count`,`participants`,`channel`,`custom`],e.t0=import_regenerator.default.keys(_objectSpread$1(_objectSpread$1({},n.set),n.unset));case 4:if((e.t1=e.t0()).done){e.next=10;break}if(i=e.t1.value,!r.includes(i)){e.next=8;break}throw Error(`You cannot set ${i} field on Thread object. ${i} is reserved for server-side use. Please omit ${i} from your set object.`);case 8:e.next=4;break;case 10:return e.next=12,this.patch(`${this.baseURL}/threads/${encodeURIComponent(t)}`,n);case 12:return e.abrupt(`return`,e.sent);case 13:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`getUserAgent`,value:function(){return this.userAgent||`stream-chat-javascript-client-${this.node?`node`:`browser`}-8.56.1`}},{key:`setUserAgent`,value:function(e){this.userAgent=e}},{key:`_enrichAxiosOptions`,value:function(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{params:{},headers:{},config:{}},n=this._getToken(),r=n?{Authorization:n}:void 0,i=null;this.nextRequestAbortController!==null&&(i=this.nextRequestAbortController.signal,this.nextRequestAbortController=null),(e=t.headers)!=null&&e[`x-client-request-id`]||(t.headers=_objectSpread$1(_objectSpread$1({},t.headers),{},{"x-client-request-id":randomId()}));var a=this.options.axiosRequestConfig||{},o=a.params,c=a.headers,u=_objectWithoutProperties(a,_excluded2);return _objectSpread$1(_objectSpread$1(_objectSpread$1({params:_objectSpread$1(_objectSpread$1({user_id:this.userID,connection_id:this._getConnectionID(),api_key:this.key},t.params),o||{}),headers:_objectSpread$1(_objectSpread$1(_objectSpread$1({},r),{},{"stream-auth-type":this.getAuthType(),"X-Stream-Client":this.getUserAgent()},t.headers),c||{})},i?{signal:i}:{}),t.config),u||{})}},{key:`_getToken`,value:function(){return!this.tokenManager||this.anonymous?null:this.tokenManager.getToken()}},{key:`_startCleaning`,value:function(){var e=this;this.cleaningIntervalRef??=setInterval(function(){for(var t=0,n=Object.values(e.activeChannels);t<n.length;t++)n[t].clean()},500)}},{key:`verifyWebhook`,value:function(e,t){return!!this.secret&&CheckSignature(e,this.secret,t)}},{key:`getPermission`,value:function(e){return this.get(`${this.baseURL}/permissions/${encodeURIComponent(e)}`)}},{key:`createPermission`,value:function(e){return this.post(`${this.baseURL}/permissions`,_objectSpread$1({},e))}},{key:`updatePermission`,value:function(e,t){return this.put(`${this.baseURL}/permissions/${encodeURIComponent(e)}`,_objectSpread$1({},t))}},{key:`deletePermission`,value:function(e){return this.delete(`${this.baseURL}/permissions/${encodeURIComponent(e)}`)}},{key:`listPermissions`,value:function(){return this.get(`${this.baseURL}/permissions`)}},{key:`createRole`,value:function(e){return this.post(`${this.baseURL}
178/roles`,{name:e})}},{key:`listRoles`,value:function(){return this.get(`${this.baseURL}/roles`)}},{key:`deleteRole`,value:function(e){return this.delete(`${this.baseURL}/roles/${encodeURIComponent(e)}`)}},{key:`sync`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.post(`${this.baseURL}/sync`,_objectSpread$1({channel_cids:e,last_sync_at:t},n))}},{key:`sendUserCustomEvent`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(`${this.baseURL}/users/${encodeURIComponent(t)}/event`,{event:n});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`createBlockList`,value:function(e){return this.post(`${this.baseURL}/blocklists`,e)}},{key:`listBlockLists`,value:function(e){return this.get(`${this.baseURL}/blocklists`,e)}},{key:`getBlockList`,value:function(e,t){return this.get(`${this.baseURL}/blocklists/${encodeURIComponent(e)}`,t)}},{key:`updateBlockList`,value:function(e,t){return this.put(`${this.baseURL}/blocklists/${encodeURIComponent(e)}`,t)}},{key:`deleteBlockList`,value:function(e,t){return this.delete(`${this.baseURL}/blocklists/${encodeURIComponent(e)}`,t)}},{key:`exportChannels`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=_objectSpread$1({channels:e},t);return this.post(`${this.baseURL}/export_channels`,n)}},{key:`exportUsers`,value:function(e){return this.post(`${this.baseURL}/export/users`,e)}},{key:`exportChannel`,value:function(e,t){return this.exportChannels([e],t)}},{key:`getExportChannelStatus`,value:function(e){return this.get(`${this.baseURL}/export_channels/${encodeURIComponent(e)}`)}},{key:`campaign`,value:function(e,t){return e&&_typeof(e)===`object`?new Campaign(this,null,e):new Campaign(this,e,t)}},{key:`segment`,value:function(e,t,n){return typeof t==`string`?new Segment(this,e,t,n):new Segment(this,e,null,t)}},{key:`validateServerSideAuth`,value:function(){if(!this.secret)throw Error(`Campaigns is a server-side only feature. Please initialize the client with a secret to use this feature.`)}},{key:`createSegment`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r){var i;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),i=_objectSpread$1({id:n,type:t},r),e.abrupt(`return`,this.post(this.baseURL+`/segments`,i));case 3:case`end`:return e.stop()}},e,this)}));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:`createUserSegment`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),e.abrupt(`return`,this.createSegment(`user`,t,n));case 2:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`createChannelSegment`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),e.abrupt(`return`,this.createSegment(`channel`,t,n));case 2:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`getSegment`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),e.abrupt(`return`,this.get(this.baseURL+`/segments/${encodeURIComponent(t)}`));case 2:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`updateSegment`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),e.abrupt(`return`,this.put(this.baseURL+`/segments/${encodeURIComponent(t)}`,n));case 2:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`addSegmentTargets`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),r={target_ids:n},e.abrupt(`return`,this.post(this.baseURL+`/segments/${encodeURIComponent(t)}/addtargets`,r));case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`querySegmentTargets`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i,a=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&a[1]!==void 0?a[1]:{},r=a.length>2&&a[2]!==void 0?a[2]:[],i=a.length>3&&a[3]!==void 0?a[3]:{},this.validateServerSideAuth(),e.abrupt(`return`,this.post(this.baseURL+`/segments/${encodeURIComponent(t)}/targets/query`,_objectSpread$1({filter:n||{},sort:r||[]},i)));case 5:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`removeSegmentTargets`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),r={target_ids:n},e.abrupt(`return`,this.post(this.baseURL+`/segments/${encodeURIComponent(t)}/deletetargets`,r));case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`querySegments`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&i[2]!==void 0?i[2]:{},this.validateServerSideAuth(),e.abrupt(`return`,this.post(this.baseURL+`/segments/query`,_objectSpread$1({filter:t,sort:n},r)));case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`deleteSegment`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),e.abrupt(`return`,this.delete(this.baseURL+`/segments/${encodeURIComponent(t)}`));case 2:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`segmentTargetExists`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),e.abrupt(`return`,this.get(this.baseURL+`/segments/${encodeURIComponent(t)}/target/${encodeURIComponent(n)}`));case 2:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`createCampaign`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),e.abrupt(`return`,this.post(this.baseURL+`/campaigns`,_objectSpread$1({},t)));case 2:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`getCampaign`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),e.abrupt(`return`,this.get(this.baseURL+`/campaigns/${encodeURIComponent(t)}`));case 2:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`startCampaign`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),e.abrupt(`return`,this.post(this.baseURL+`/campaigns/${encodeURIComponent(t)}
178/start`,{scheduled_for:n?.scheduledFor,stop_at:n?.stopAt}));case 2:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`queryCampaigns`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),e.next=3,this.post(this.baseURL+`/campaigns/query`,_objectSpread$1({filter:t,sort:n},r||{}));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:`updateCampaign`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),e.abrupt(`return`,this.put(this.baseURL+`/campaigns/${encodeURIComponent(t)}`,n));case 2:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`deleteCampaign`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),e.abrupt(`return`,this.delete(this.baseURL+`/campaigns/${encodeURIComponent(t)}`));case 2:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`stopCampaign`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.validateServerSideAuth(),e.abrupt(`return`,this.post(this.baseURL+`/campaigns/${encodeURIComponent(t)}/stop`));case 2:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`enrichURL`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(`return`,this.get(this.baseURL+`/og`,{url:t}));case 1:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`getTask`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(`return`,this.get(`${this.baseURL}/tasks/${encodeURIComponent(t)}`));case 1:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`deleteChannels`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&r[1]!==void 0?r[1]:{},e.next=3,this.post(this.baseURL+`/channels/delete`,_objectSpread$1({cids:t},n));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`deleteUsers`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.length>1&&r[1]!==void 0?r[1]:{},n.user===void 0||[`soft`,`hard`,`pruning`].includes(n.user)){e.next=3;break}throw Error(`Invalid delete user options. user must be one of [soft hard pruning]`);case 3:if(n.conversations===void 0||[`soft`,`hard`].includes(n.conversations)){e.next=5;break}throw Error(`Invalid delete user options. conversations must be one of [soft hard]`);case 5:if(n.messages===void 0||[`soft`,`hard`,`pruning`].includes(n.messages)){e.next=7;break}throw Error(`Invalid delete user options. messages must be one of [soft hard pruning]`);case 7:return e.next=9,this.post(this.baseURL+`/users/delete`,_objectSpread$1({user_ids:t},n));case 9:return e.abrupt(`return`,e.sent);case 10:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`_createImportURL`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/import_urls`,{filename:t});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`_createImport`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&r[1]!==void 0?r[1]:{mode:`upsert`},e.next=3,this.post(this.baseURL+`/imports`,_objectSpread$1({path:t},n));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`_getImport`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(this.baseURL+`/imports/${encodeURIComponent(t)}`);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`_listImports`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(this.baseURL+`/imports`,t);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()}
178,{key:`upsertPushProvider`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/push_providers`,{push_provider:t});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`deletePushProvider`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.type,r=t.name,e.next=3,this.delete(this.baseURL+`/push_providers/${encodeURIComponent(n)}/${encodeURIComponent(r)}`);case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`listPushProviders`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(this.baseURL+`/push_providers`);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`createAbortControllerForNextRequest`,value:function(){return this.nextRequestAbortController=new AbortController}},{key:`commitMessage`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/messages/${encodeURIComponent(t)}/commit`);case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`createPoll`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/polls`,_objectSpread$1(_objectSpread$1({},t),n?{user_id:n}:{}));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`getPoll`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(this.baseURL+`/polls/${encodeURIComponent(t)}`,n?{user_id:n}:{});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`updatePoll`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.put(this.baseURL+`/polls`,_objectSpread$1(_objectSpread$1({},t),n?{user_id:n}:{}));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`partialUpdatePoll`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.patch(this.baseURL+`/polls/${encodeURIComponent(t)}`,_objectSpread$1(_objectSpread$1({},n),r?{user_id:r}:{}));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:`deletePoll`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.delete(this.baseURL+`/polls/${encodeURIComponent(t)}`,_objectSpread$1({},n?{user_id:n}:{}));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`closePoll`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(`return`,this.partialUpdatePoll(t,{set:{is_closed:!0}},n));case 1:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:`createPollOption`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/polls/${encodeURIComponent(t)}/options`,_objectSpread$1(_objectSpread$1({},n),r?{user_id:r}:{}));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:`getPollOption`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(this.baseURL+`/polls/${encodeURIComponent(t)}/options/${encodeURIComponent(n)}`,r?{user_id:r}:{});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:`updatePollOption`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.put(this.baseURL+`/polls/${encodeURIComponent(t)}/options`,_objectSpread$1(_objectSpread$1({},n),r?{user_id:r}:{}));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:`deletePollOption`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.delete(this.baseURL+`/polls/${encodeURIComponent(t)}/options/${encodeURIComponent(n)}`,r?{user_id:r}:{});case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:`castPollVote`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r,i){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.post(this.baseURL+`/messages/${encodeURIComponent(t)}/polls/${encodeURIComponent(n)}/vote`,_objectSpread$1({vote:r},i?{user_id:i}:{}));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n,r,i){return e.apply(this,arguments)}return t}()},{key:`addPollAnswer`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r,i){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(`return`,this.castPollVote(t,n,{answer_text:r},i));case 1:case`end`:return e.stop()}},e,this)}));function t(t,n,r,i){return e.apply(this,arguments)}return t}()},{key:`removePollVote`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n,r,i){return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.delete(this.baseURL+`/messages/${encodeURIComponent(t)}/polls/${encodeURIComponent(n)}/vote/${encodeURIComponent(r)}`,_objectSpread$1({},i?{user_id:i}:{}));case 2:return e.abrupt(`return`,e.sent);case 3:case`end`:return e.stop()}},e,this)}));function t(t,n,r,i){return e.apply(this,arguments)}return t}()},{key:`queryPolls`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r,i,a,o=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&o[0]!==void 0?o[0]:{},n=o.length>1&&o[1]!==void 0?o[1]:[],r=o.length>2&&o[2]!==void 0?o[2]:{},i=o.length>3?o[3]:void 0,a=i?`?user_id=${i}`:``,e.next=7,this.post(this.baseURL+`/polls/query${a}`,_objectSpread$1({filter:t,sort:normalizeQuerySort(n)},r));case 7:return e.abrupt(`return`,e.sent);case 8:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`queryPollVotes`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i,a,o,c=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>1&&c[1]!==void 0?c[1]:{},r=c.length>2&&c[2]!==void 0?c[2]:[],i=c.length>3&&c[3]!==void 0?c[3]:{},a=c.length>4?c[4]:void 0,o=a?`?user_id=${a}`:``,e.next=7,this.post(this.baseURL+`/polls/${encodeURIComponent(t)}/votes${o}`,_objectSpread$1({filter:n,sort:normalizeQuerySort(r)},i));case 7:return e.abrupt(`return`,e.sent);case 8:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`queryPollAnswers`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t){var n,r,i,a,o,c=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>1&&c[1]!==void 0?c[1]:{},r=c.length>2&&c[2]!==void 0?c[2]:[],i=c.length>3&&c[3]!==void 0?c[3]:{},a=c.length>4?c[4]:void 0,o=a?`?user_id=${a}`:``,e.next=7,this.post(this.baseURL+`/polls/${encodeURIComponent(t)}/votes${o}`,_objectSpread$1({filter:_objectSpread$1(_objectSpread$1({},n),{},{is_answer:!0}),sort:normalizeQuerySort(r)},i));case 7:return e.abrupt(`return`,e.sent);case 8:case`end`:return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:`queryMessageHistory`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(){var t,n,r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&i[0]!==void 0?i[0]:{},n=i.length>1&&i[1]!==void 0?i[1]:[],r=i.length>2&&i[2]!==void 0?i[2]:{},e.next=5,this.post(this.baseURL+`/messages/history`,_objectSpread$1({filter:t,sort:normalizeQuerySort(n)},r));case 5:return e.abrupt(`return`,e.sent);case 6:case`end`:return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:`updateFlags`,value:function(){var e=_asyncToGenerator(import_regenerator.default.mark(function e(t,n){var r,i=arguments;return import_regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&i[2]!==void 0?i[2]:{},e.next=3,this.post(this.baseURL+`/automod/v1/moderation/update_flags`,_objectSpread$1({message_ids:t,reviewed_by:n},r));case 3:return e.abrupt(`return`,e.sent);case 4:case`end`:return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()}],[{key:`getInstance`,value:function(t,n,r){return e._instance||=typeof n==`string`?new e(t,n,r):new e(t,n),e._instance}}]),e}();_defineProperty(StreamChat,`_instance`,void 0);var Allow=`Allow`,Deny=`Deny`,AnyResource=[`*`],AnyRole=[`*`],MaxPriority=999,MinPriority=1,Permission=function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:AnyResource,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:AnyRole,a=arguments.length>4&&arguments[4]!==void 0&&arguments[4],o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Allow;_classCallCheck(this,e),_defineProperty(this,`name`,void 0),_defineProperty(this,`action`,void 0),_defineProperty(this,`owner`,void 0),_defineProperty(this,`priority`,void 0),_defineProperty(this,`resources`,void 0),_defineProperty(this,`roles`,void 0),this.name=t,this.action=o,this.owner=a,this.priority=n,this.resources=r,this.roles=i},AllowAll=new Permission(`Allow all`,999,AnyResource,AnyRole,!1,Allow),DenyAll=new Permission(`Deny all`,1,AnyResource,AnyRole,!1,Deny),e$2=new Map;function t$2(e){var t=e$2.get(e);t&&t.destroy()}function o$1(e){var t=e$2.get(e);
178t&&t.update()}var r$2=null;typeof window>`u`?((r$2=function(e){return e}).destroy=function(e){return e},r$2.update=function(e){return e}):((r$2=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return function(e){if(e&&e.nodeName&&e.nodeName===`TEXTAREA`&&!e$2.has(e)){var t,n=null,r=window.getComputedStyle(e),i=(t=e.value,function(){o({testForHeightReduction:t===``||!e.value.startsWith(t),restoreTextAlign:null}),t=e.value}),a=function(t){e.removeEventListener(`autosize:destroy`,a),e.removeEventListener(`autosize:update`,c),e.removeEventListener(`input`,i),window.removeEventListener(`resize`,c),Object.keys(t).forEach(function(n){return e.style[n]=t[n]}),e$2.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,textAlign:e.style.textAlign,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener(`autosize:destroy`,a),e.addEventListener(`autosize:update`,c),e.addEventListener(`input`,i),window.addEventListener(`resize`,c),e.style.overflowX=`hidden`,e.style.wordWrap=`break-word`,e$2.set(e,{destroy:a,update:c}),c()}function o(t){var i,a,c=t.restoreTextAlign,u=c===void 0?null:c,K=t.testForHeightReduction,Y=K===void 0||K,X=r.overflowY;if(e.scrollHeight!==0&&(r.resize===`vertical`?e.style.resize=`none`:r.resize===`both`&&(e.style.resize=`horizontal`),Y&&(i=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach(function(e){var t=e[0],n=e[1];t.style.scrollBehavior=`auto`,t.scrollTop=n,t.style.scrollBehavior=null})}}(e),e.style.height=``),a=r.boxSizing===`content-box`?e.scrollHeight-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):e.scrollHeight+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),r.maxHeight!==`none`&&a>parseFloat(r.maxHeight)?(r.overflowY===`hidden`&&(e.style.overflow=`scroll`),a=parseFloat(r.maxHeight)):r.overflowY!==`hidden`&&(e.style.overflow=`hidden`),e.style.height=a+`px`,u&&(e.style.textAlign=u),i&&i(),n!==a&&(e.dispatchEvent(new Event(`autosize:resized`,{bubbles:!0})),n=a),X!==r.overflow&&!u)){var ee=r.textAlign;r.overflow===`hidden`&&(e.style.textAlign=ee===`start`?`end`:`start`),o({restoreTextAlign:ee,testForHeightReduction:!0})}}function c(){o({testForHeightReduction:!0,restoreTextAlign:null})}}(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],t$2),e},r$2.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o$1),e});var n$2=r$2,require_focus_visible=__commonJSMin(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r():typeof define==`function`&&define.amd?define(r):r()})(e,(function(){function e(e){var t=!0,n=!1,r=null,i={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function a(e){return!!(e&&e!==document&&e.nodeName!==`HTML`&&e.nodeName!==`BODY`&&`classList`in e&&`contains`in e.classList)}function o(e){var t=e.type,n=e.tagName;return!!(n===`INPUT`&&i[t]&&!e.readOnly||n===`TEXTAREA`&&!e.readOnly||e.isContentEditable)}function c(e){e.classList.contains(`focus-visible`)||(e.classList.add(`focus-visible`),e.setAttribute(`data-focus-visible-added`,``))}function u(e){e.hasAttribute(`data-focus-visible-added`)&&(e.classList.remove(`focus-visible`),e.removeAttribute(`data-focus-visible-added`))}function K(n){n.metaKey||n.altKey||n.ctrlKey||(a(e.activeElement)&&c(e.activeElement),t=!0)}function Y(e){t=!1}function X(e){a(e.target)&&(t||o(e.target))&&c(e.target)}function ee(e){a(e.target)&&(e.target.classList.contains(`focus-visible`)||e.target.hasAttribute(`data-focus-visible-added`))&&(n=!0,window.clearTimeout(r),r=window.setTimeout(function(){n=!1},100),u(e.target))}function te(e){document.visibilityState===`hidden`&&(n&&(t=!0),ce())}function ce(){document.addEventListener(`mousemove`,de),document.addEventListener(`mousedown`,de),document.addEventListener(`mouseup`,de),document.addEventListener(`pointermove`,de),document.addEventListener(`pointerdown`,de),document.addEventListener(`pointerup`,de),document.addEventListener(`touchmove`,de),document.addEventListener(`touchstart`,de),document.addEventListener(`touchend`,de)}function ue(){document.removeEventListener(`mousemove`,de),document.removeEventListener(`mousedown`,de),document.removeEventListener(`mouseup`,de),document.removeEventListener(`pointermove`,de),document.removeEventListener(`pointerdown`,de),document.removeEventListener(`pointerup`,de),document.removeEventListener(`touchmove`,de),document.removeEventListener(`touchstart`,de),document.removeEventListener(`touchend`,de)}function de(e){e.target.nodeName&&e.target.nodeName.toLowerCase()===`html`||(t=!1,ue())}
vendor: 7,846 bytes, line 178
178document.addEventListener(`keydown`,K,!0),document.addEventListener(`mousedown`,Y,!0),document.addEventListener(`pointerdown`,Y,!0),document.addEventListener(`touchstart`,Y,!0),document.addEventListener(`visibilitychange`,te,!0),ce(),e.addEventListener(`focus`,X,!0),e.addEventListener(`blur`,ee,!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute(`data-js-focus-visible`,``):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add(`js-focus-visible`),document.documentElement.setAttribute(`data-js-focus-visible`,``))}if(typeof window<`u`&&typeof document<`u`){window.applyFocusVisiblePolyfill=e;var t;try{t=new CustomEvent(`focus-visible-polyfill-ready`)}catch{t=document.createEvent(`CustomEvent`),t.initCustomEvent(`focus-visible-polyfill-ready`,!1,!1,{})}window.dispatchEvent(t)}typeof document<`u`&&e(document)}))})),lib_exports=__exportAll({ReactQueryDevtools:()=>ReactQueryDevtools}),ReactQueryDevtools=function(){return null},require_state_machine=__commonJSMin(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define(`StateMachine`,[],r):typeof e==`object`?e.StateMachine=r():n.StateMachine=r()})(e,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=5)})([(function(e,t,n){e.exports=function(e,t){for(var n=1,r,i;n<arguments.length;n++)for(i in r=arguments[n],r)r.hasOwnProperty(i)&&(e[i]=r[i]);return e}}),(function(e,t,n){var r=n(0);e.exports={build:function(e,t){var n,i,a,o=t.plugins;for(n=0,i=o.length;n<i;n++)a=o[n],a.methods&&r(e,a.methods),a.properties&&Object.defineProperties(e,a.properties)},hook:function(e,t,n){var r,i,a,o,c=e.config.plugins,u=[e.context];for(n&&(u=u.concat(n)),r=0,i=c.length;r<i;r++)o=c[r],a=c[r][t],a&&a.apply(o,u)}}}),(function(e,t,n){function r(e){if(e.length===0)return e;var t,n,r=e.split(/[_-]/);if(r.length===1&&r[0][0].toLowerCase()===r[0][0])return e;for(n=r[0].toLowerCase(),t=1;t<r.length;t++)n=n+r[t].charAt(0).toUpperCase()+r[t].substring(1).toLowerCase();return n}r.prepended=function(e,t){return t=r(t),e+t[0].toUpperCase()+t.substring(1)},e.exports=r}),(function(e,t,n){var r=n(0),i=n(2);function a(e,t){e||={},this.options=e,this.defaults=t.defaults,this.states=[],this.transitions=[],this.map={},this.lifecycle=this.configureLifecycle(),this.init=this.configureInitTransition(e.init),this.data=this.configureData(e.data),this.methods=this.configureMethods(e.methods),this.map[this.defaults.wildcard]={},this.configureTransitions(e.transitions||[]),this.plugins=this.configurePlugins(e.plugins,t.plugin)}r(a.prototype,{addState:function(e){this.map[e]||(this.states.push(e),this.addStateLifecycleNames(e),this.map[e]={})},addStateLifecycleNames:function(e){this.lifecycle.onEnter[e]=i.prepended(`onEnter`,e),this.lifecycle.onLeave[e]=i.prepended(`onLeave`,e),this.lifecycle.on[e]=i.prepended(`on`,e)},addTransition:function(e){this.transitions.indexOf(e)<0&&(this.transitions.push(e),this.addTransitionLifecycleNames(e))},addTransitionLifecycleNames:function(e){this.lifecycle.onBefore[e]=i.prepended(`onBefore`,e),this.lifecycle.onAfter[e]=i.prepended(`onAfter`,e),this.lifecycle.on[e]=i.prepended(`on`,e)},mapTransition:function(e){var t=e.name,n=e.from,r=e.to;return this.addState(n),typeof r!=`function`&&this.addState(r),this.addTransition(t),this.map[n][t]=e,e},configureLifecycle:function(){return{onBefore:{transition:`onBeforeTransition`},onAfter:{transition:`onAfterTransition`},onEnter:{state:`onEnterState`},onLeave:{state:`onLeaveState`},on:{transition:`onTransition`}}},configureInitTransition:function(e){return typeof e==`string`?this.mapTransition(r({},this.defaults.init,{to:e,active:!0})):typeof e==`object`?this.mapTransition(r({},this.defaults.init,e,{active:!0})):(this.addState(this.defaults.init.from),this.defaults.init)},configureData:function(e){return typeof e==`function`?e:typeof e==`object`?function(){return e}:function(){return{}}},configureMethods:function(e){return e||{}},configurePlugins:function(e,t){e||=[];for(var n=0,r=e.length,i;n<r;n++)i=e[n],typeof i==`function`&&(e[n]=i=i()),i.configure&&i.configure(this);return e},configureTransitions:function(e){var t,n,r,i,a,o=this.defaults.wildcard;for(n=0;n<e.length;n++)for(r=e[n],i=Array.isArray(r.from)?r.from:[r.from||o],a=r.to||o,t=0;t<i.length;t++)this.mapTransition({name:r.name,from:i[t],to:a})},transitionFor:function(e,t){var n=this.defaults.wildcard;return this.map[e][t]||this.map[n][t]},transitionsFor:function(e){var t=this.defaults.wildcard;return Object.keys(this.map[e]).concat(Object.keys(this.map[t]))},allStates:function(){return this.states},allTransitions:function(){return this.transitions}}),e.exports=a}),(function(e,t,n){var r=n(0),i=n(6),a=n(1),o=[null,[]];function c(e,t){this.context=e,this.config=t,this.state=t.init.from,this.observers=[e]}r(c.prototype,{init:function(e){if(r(this.context,this.config.data.apply(this.context,e)),a.hook(this,`init`),this.config.init.active)return this.fire(this.config.init.name,[])},is:function(e){return Array.isArray(e)?e.indexOf(this.state)>=0:this.state===e},isPending:function(){return this.pending},can:function(e){return!this.isPending()&&!!this.seek(e)},cannot:function(e){return!this.can(e)},allStates:function(){return this.config.allStates()},allTransitions:function(){return this.config.allTransitions()},transitions:function(){return this.config.transitionsFor(this.state)},seek:function(e,t){var n=this.config.defaults.wildcard,r=this.config.transitionFor(this.state,e),i=r&&r.to;return typeof i==`function`?i.apply(this.context,t):i===n?this.state:i},fire:function(e,t){return this.transit(e,this.state,this.seek(e,t),t)},transit:function(e,t,n,r){var i=this.config.lifecycle,a=this.config.options.observeUnchangedState||t!==n;return n?this.isPending()?this.context.onPendingTransition(e,t,n):(this.config.addState(n),this.beginTransit(),r.unshift({transition:e,from:t,to:n,fsm:this.context}),this.observeEvents([this.observersForEvent(i.onBefore.transition),this.observersForEvent(i.onBefore[e]),a?this.observersForEvent(i.onLeave.state):o,a?this.observersForEvent(i.onLeave[t]):o,this.observersForEvent(i.on.transition),a?[`doTransit`,[this]]:o,a?this.observersForEvent(i.onEnter.state):o,a?this.observersForEvent(i.onEnter[n]):o,a?this.observersForEvent(i.on[n]):o,this.observersForEvent(i.onAfter.transition),this.observersForEvent(i.onAfter[e]),this.observersForEvent(i.on[e])],r)):this.context.onInvalidTransition(e,t,n)},beginTransit:function(){this.pending=!0},endTransit:function(e){return this.pending=!1,e},failTransit:function(e){throw this.pending=!1,e},doTransit:function(e){this.state=e.to},observe:function(e){if(e.length===2){var t={};t[e[0]]=e[1],this.observers.push(t)}else this.observers.push(e[0])},observersForEvent:function(e){for(var t=0,n=this.observers.length,r,i=[];t<n;t++)r=this.observers[t],r[e]&&i.push(r);return[e,i,!0]},observeEvents:function(e,t,n,r){if(e.length===0)return this.endTransit(r===void 0||r);var i=e[0][0],o=e[0][1],c=e[0][2];if(t[0].event=i,i&&c&&i!==n&&a.hook(this,`lifecycle`,t),o.length===0)return e.shift(),this.observeEvents(e,t,i,r);var u=o.shift(),K=u[i].apply(u,t);return K&&typeof K.then==`function`?K.then(this.observeEvents.bind(this,e,t,i)).catch(this.failTransit.bind(this)):K===!1?this.endTransit(!1):this.observeEvents(e,t,i,K)},onInvalidTransition:function(e,t,n){throw new i(`transition is invali
178d in current state`,e,t,n,this.state)},onPendingTransition:function(e,t,n){throw new i(`transition is invalid while previous transition is still in progress`,e,t,n,this.state)}}),e.exports=c}),(function(e,t,n){var r=n(0),i=n(2),a=n(1),o=n(3),c=n(4),u={is:function(e){return this._fsm.is(e)},can:function(e){return this._fsm.can(e)},cannot:function(e){return this._fsm.cannot(e)},observe:function(){return this._fsm.observe(arguments)},transitions:function(){return this._fsm.transitions()},allTransitions:function(){return this._fsm.allTransitions()},allStates:function(){return this._fsm.allStates()},onInvalidTransition:function(e,t,n){return this._fsm.onInvalidTransition(e,t,n)},onPendingTransition:function(e,t,n){return this._fsm.onPendingTransition(e,t,n)}},K={state:{configurable:!1,enumerable:!0,get:function(){return this._fsm.state},set:function(e){throw Error(`use transitions to change state`)}}};function Y(e){return ee(this||{},e)}function X(){var e,t;typeof arguments[0]==`function`?(e=arguments[0],t=arguments[1]||{}):(e=function(){this._fsm.apply(this,arguments)},t=arguments[0]||{});var n=new o(t,Y);return te(e.prototype,n),e.prototype._fsm.config=n,e}function ee(e,t){return te(e,new o(t,Y)),e._fsm(),e}function te(e,t){if(typeof e!=`object`||Array.isArray(e))throw Error(`StateMachine can only be applied to objects`);a.build(e,t),Object.defineProperties(e,K),r(e,u),r(e,t.methods),t.allTransitions().forEach(function(t){e[i(t)]=function(){return this._fsm.fire(t,[].slice.call(arguments))}}),e._fsm=function(){this._fsm=new c(this,t),this._fsm.init(arguments)}}Y.version=`3.0.1`,Y.factory=X,Y.apply=ee,Y.defaults={wildcard:`*`,init:{name:`init`,from:`none`}},e.exports=Y}),(function(e,t,n){e.exports=function(e,t,n,r,i){this.message=e,this.transition=t,this.from=n,this.to=r,this.current=i}})])})})),require_persona_react=__commonJSMin(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(require_jsx_runtime(),require_react()):typeof define==`function`&&define.amd?define([`react/jsx-runtime`,`react`],r):typeof e==`object`?e.PersonaReact=r(require_jsx_runtime(),require_react()):n.PersonaReact=r(n[`react/jsx-runtime`],n.react)})(self,((e,t)=>(()=>{var n={706:e=>{e.exports=(()=>{var e={7802:(e,t,n)=>{var r=n(5049),i=n(3036),a=n(78);e.exports=n(1909)||r.call(a,i)},3036:e=>{e.exports=Function.prototype.apply},78:e=>{e.exports=Function.prototype.call},6688:(e,t,n)=>{var r=n(5049),i=n(6785),a=n(78),o=n(7802);e.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new i(`a function is required`);return o(r,a,e)}},1909:e=>{e.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply},2774:(e,t,n)=>{var r=n(8372),i=n(6688),a=i([r(`%String.prototype.indexOf%`)]);e.exports=function(e,t){var n=r(e,!!t);return typeof n==`function`&&a(e,`.prototype.`)>-1?i([n]):n}},7848:e=>{var t=Object.defineProperty||!1;if(t)try{t({},`a`,{value:1})}catch{t=!1}e.exports=t},8372:(e,t,n)=>{var r,i=n(5846),a=n(5293),o=n(9055),c=n(8888),u=n(7900),K=n(5389),Y=n(6785),X=n(4055),ee=n(716),te=n(7450),ce=n(3774),ue=n(7552),de=n(5874),fe=n(9292),me=n(6071),ge=Function,Te=function(e){try{return ge(`"use strict"; return (`+e+`).constructor;`)()}catch{}},Oe=n(6692),Ae=n(7848),ze=function(){throw new Y},qe=Oe?function(){try{return ze}catch{try{return Oe(arguments,`callee`).get}catch{return ze}}}():ze,Ye=n(5634)(),Ze=n(7106),Qe=n(3766),et=n(6822),nt=n(3036),rt=n(78),it={},at=typeof Uint8Array<`u`&&Ze?Ze(Uint8Array):r,ot={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?r:ArrayBuffer,"%ArrayIteratorPrototype%":Ye&&Ze?Ze([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":it,"%AsyncGenerator%":it,"%AsyncGeneratorFunction%":it,"%AsyncIteratorPrototype%":it,"%Atomics%":typeof Atomics>`u`?r:Atomics,"%BigInt%":typeof BigInt>`u`?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":a,"%eval%":eval,"%EvalError%":o,"%Float32Array%":typeof Float32Array>`u`?r:Float32Array,"%Float64Array%":typeof Float64Array>`u`?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?r:FinalizationRegistry,"%Function%":ge,"%GeneratorFunction%":it,"%Int8Array%":typeof Int8Array>`u`?r:Int8Array,"%Int16Array%":typeof Int16Array>`u`?r:Int16Array,"%Int32Array%":typeof Int32Array>
vendor: 4,686 bytes, line 178
178`u`?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ye&&Ze?Ze(Ze([][Symbol.iterator]())):r,"%JSON%":typeof JSON==`object`?JSON:r,"%Map%":typeof Map>`u`?r:Map,"%MapIteratorPrototype%":typeof Map<`u`&&Ye&&Ze?Ze(new Map()[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":Oe,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?r:Promise,"%Proxy%":typeof Proxy>`u`?r:Proxy,"%RangeError%":c,"%ReferenceError%":u,"%Reflect%":typeof Reflect>`u`?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?r:Set,"%SetIteratorPrototype%":typeof Set<`u`&&Ye&&Ze?Ze(new Set()[Symbol.iterator]()):r,"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ye&&Ze?Ze(``[Symbol.iterator]()):r,"%Symbol%":Ye?Symbol:r,"%SyntaxError%":K,"%ThrowTypeError%":qe,"%TypedArray%":at,"%TypeError%":Y,"%Uint8Array%":typeof Uint8Array>`u`?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?r:Uint32Array,"%URIError%":X,"%WeakMap%":typeof WeakMap>`u`?r:WeakMap,"%WeakRef%":typeof WeakRef>`u`?r:WeakRef,"%WeakSet%":typeof WeakSet>`u`?r:WeakSet,"%Function.prototype.call%":rt,"%Function.prototype.apply%":nt,"%Object.defineProperty%":Ae,"%Object.getPrototypeOf%":Qe,"%Math.abs%":ee,"%Math.floor%":te,"%Math.max%":ce,"%Math.min%":ue,"%Math.pow%":de,"%Math.round%":fe,"%Math.sign%":me,"%Reflect.getPrototypeOf%":et};if(Ze)try{null.error}catch(e){ot[`%Error.prototype%`]=Ze(Ze(e))}var st=function e(t){var n;if(t===`%AsyncFunction%`)n=Te(`async function () {}`);else if(t===`%GeneratorFunction%`)n=Te(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=Te(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&Ze&&(n=Ze(i.prototype))}return ot[t]=n,n},ct={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},lt=n(5049),ut=n(5215),dt=lt.call(rt,Array.prototype.concat),ft=lt.call(nt,Array.prototype.splice),pt=lt.call(rt,
178String.prototype.replace),mt=lt.call(rt,String.prototype.slice),ht=lt.call(rt,RegExp.prototype.exec),gt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_t=/\\(\\)?/g,vt=function(e,t){var n,r=e;if(ut(ct,r)&&(r=`%`+(n=ct[r])[0]+`%`),ut(ot,r)){var i=ot[r];if(i===it&&(i=st(r)),i===void 0&&!t)throw new Y(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:n,name:r,value:i}}throw new K(`intrinsic `+e+` does not exist!`)};e.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new Y(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new Y(`"allowMissing" argument must be a boolean`);if(ht(/^%?[^%]*%?$/,e)===null)throw new K("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=mt(e,0,1),n=mt(e,-1);if(t===`%`&&n!==`%`)throw new K("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new K("invalid intrinsic syntax, expected opening `%`");var r=[];return pt(e,gt,(function(e,t,n,i){r[r.length]=n?pt(i,_t,`$1`):t||e})),r}(e),r=n.length>0?n[0]:``,i=vt(`%`+r+`%`,t),a=i.name,o=i.value,c=!1,u=i.alias;u&&(r=u[0],ft(n,dt([0,1],u)));for(var X=1,ee=!0;X<n.length;X+=1){var te=n[X],ce=mt(te,0,1),ue=mt(te,-1);if((ce===`"`||ce===`'`||ce==="`"||ue===`"`||ue===`'`||ue==="`")&&ce!==ue)throw new K(`property names with quotes must have matching quotes`);if(te!==`constructor`&&ee||(c=!0),ut(ot,a=`%`+(r+=`.`+te)+`%`))o=ot[a];else if(o!=null){if(!(te in o)){if(!t)throw new Y(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(Oe&&X+1>=n.length){var de=Oe(o,te);o=(ee=!!de)&&`get`in de&&!(`originalValue`in de.get)?de.get:o[te]}else ee=ut(o,te),o=o[te];ee&&!c&&(ot[a]=o)}}return o}},8160:e=>{e.exports=Object.getOwnPropertyDescriptor},6692:(e,t,n)=>{var r=n(8160);if(r)try{r([],`length`)}catch{r=null}e.exports=r},5634:(e,t,n)=>{var r=typeof Symbol<`u`&&Symbol,i=n(9576);e.exports=function(){return typeof r==`function`&&typeof Symbol==`function`&&typeof r(`foo`)==`symbol`&&typeof Symbol(`bar`)==`symbol`&&i()}},9576:e=>{e.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;for(var r in e[t]=42,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==42||!0!==a.enumerable)return!1}return!0}},9302:(e,t,n)=>{var r,i=n(6688),a=n(8952);try{r=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var o=!!r&&a&&a(Object.prototype,`__proto__`),c=Object,u=c.getPrototypeOf;e.exports=o&&typeof o.get==`function`?i([o.get]):typeof u==`function`&&function(e){return u(e==null?e:c(e))}},6332:e=>{e.exports=Object.getOwnPropertyDescriptor},8952:(e,t,n)=>{var r=n(6332);if(r)try{r([],`length`)}catch{r=null}e.exports=r},9055:e=>{e.exports=EvalError},5293:e=>{e.exports=Error},8888:e=>{e.exports=RangeError},7900:e=>{e.exports=ReferenceError},5389:e=>{e.exports=SyntaxError},6785:e=>{e.exports=TypeError},4055:e=>{e.exports=URIError},5846:e=>{e.exports=Object},2719:e=>{var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n};e.exports=function(e){var i=this;if(typeof i!=`function`||t.apply(i)!==`[object Function]`)throw TypeError(`Function.prototype.bind called on incompatible `+i);for(var a,o=function(e,t){for(var n=[],r=1,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n}(arguments),c=n(0,i.length-o.length),u=[],K=0;K<c;K++)u[K]=`$`+K;if(a=Function(`binder`,`return function (`+function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=`,`);return n}(u)+`){ return binder.apply(this,arguments); }`)((function(){if(this instanceof a){var t=i.apply(this,r(o,arguments));return Object(t)===t?t:this}return i.apply(e,r(o,arguments))})),i.prototype){var Y=function(){};Y.prototype=i.prototype,a.prototype=new Y,Y.prototype=null}return a}}
178,5049:(e,t,n)=>{var r=n(2719);e.exports=Function.prototype.bind||r},3766:(e,t,n)=>{e.exports=n(5846).getPrototypeOf||null},6822:e=>{e.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null},7106:(e,t,n)=>{var r=n(6822),i=n(3766),a=n(9302);e.exports=r?function(e){return r(e)}:i?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return i(e)}:a?function(e){return a(e)}:null},5215:(e,t,n)=>{var r=Function.prototype.call,i=Object.prototype.hasOwnProperty;e.exports=n(5049).call(r,i)},2709:(e,t,n)=>{var r,i=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o=`\\ud800-\\udfff`,c=`\\u2700-\\u27bf`,u=`a-z\\xdf-\\xf6\\xf8-\\xff`,K=`A-Z\\xc0-\\xd6\\xd8-\\xde`,Y=`\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000`,X=`[`+Y+`]`,ee=`[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]`,te=`\\d+`,ce=`[`+c+`]`,ue=`[`+u+`]`,de=`[^`+o+Y+te+c+u+K+`]`,fe=`(?:\\ud83c[\\udde6-\\uddff]){2}`,me=`[\\ud800-\\udbff][\\udc00-\\udfff]`,ge=`[`+K+`]`,Te=`(?:`+ue+`|`+de+`)`,Oe=`(?:`+ge+`|`+de+`)`,Ae=`(?:['’](?:d|ll|m|re|s|t|ve))?`,ze=`(?:['’](?:D|LL|M|RE|S|T|VE))?`,qe=`(?:`+ee+`|\\ud83c[\\udffb-\\udfff])?`,Ye=`[\\ufe0e\\ufe0f]?`,Ze=Ye+qe+`(?:\\u200d(?:`+[`[^`+o+`]`,fe,me].join(`|`)+`)`+Ye+qe+`)*`,Qe=`(?:`+[ce,fe,me].join(`|`)+`)`+Ze,et=RegExp(`['’]`,`g`),nt=RegExp(ee,`g`),rt=RegExp([ge+`?`+ue+`+`+Ae+`(?=`+[X,ge,`$`].join(`|`)+`)`,Oe+`+`+ze+`(?=`+[X,ge+Te,`$`].join(`|`)+`)`,ge+`?`+Te+`+`+Ae,ge+`+`+ze,te,Qe].join(`|`),`g`),it=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=typeof n.g==`object`&&n.g&&n.g.Object===Object&&n.g,ot=typeof self==`object`&&self&&self.Object===Object&&self,st=at||ot||Function(`return this`)(),ct=(r={À:`A`,Á:`A`,Â:`A`,Ã:`A`,Ä:`A`,Å:`A`,à:`a`,á:`a`,â:`a`,ã:`a`,ä:`a`,å:`a`,Ç:`C`,ç:`c`,Ð:`D`,ð:`d`,È:`E`,É:`E`,Ê:`E`,Ë:`E`,è:`e`,é:`e`,ê:`e`,ë:`e`,Ì:`I`,Í:`I`,Î:`I`,Ï:`I`,ì:`i`,í:`i`,î:`i`,ï:`i`,Ñ:`N`,ñ:`n`,Ò:`O`,Ó:`O`,Ô:`O`,Õ:`O`,Ö:`O`,Ø:`O`,ò:`o`,ó:`o`,ô:`o`,õ:`o`,ö:`o`,ø:`o`,Ù:`U`,Ú:`U`,Û:`U`,Ü:`U`,ù:`u`,ú:`u`,û:`u`,ü:`u`,Ý:`Y`,ý:`y`,ÿ:`y`,Æ:`Ae`,æ:`ae`,Þ:`Th`,þ:`th`,ß:`ss`,Ā:`A`,Ă:`A`,Ą:`A`,ā:`a`,ă:`a`,ą:`a`,Ć:`C`,Ĉ:`C`,Ċ:`C`,Č:`C`,ć:`c`,ĉ:`c`,ċ:`c`,č:`c`,Ď:`D`,Đ:`D`,ď:`d`,đ:`d`,Ē:`E`,Ĕ:`E`,Ė:`E`,Ę:`E`,Ě:`E`,ē:`e`,ĕ:`e`,ė:`e`,ę:`e`,ě:`e`,Ĝ:`G`,Ğ:`G`,Ġ:`G`,Ģ:`G`,ĝ:`g`,ğ:`g`,ġ:`g`,ģ:`g`,Ĥ:`H`,Ħ:`H`,ĥ:`h`,ħ:`h`,Ĩ:`I`,Ī:`I`,Ĭ:`I`,Į:`I`,İ:`I`,ĩ:`i`,ī:`i`,ĭ:`i`,į:`i`,ı:`i`,Ĵ:`J`,ĵ:`j`,Ķ:`K`,ķ:`k`,ĸ:`k`,Ĺ:`L`,Ļ:`L`,Ľ:`L`,Ŀ:`L`,Ł:`L`,ĺ:`l`,ļ:`l`,ľ:`l`,ŀ:`l`,ł:`l`,Ń:`N`,Ņ:`N`,Ň:`N`,Ŋ:`N`,ń:`n`,ņ:`n`,ň:`n`,ŋ:`n`,Ō:`O`,Ŏ:`O`,Ő:`O`,ō:`o`,ŏ:`o`,ő:`o`,Ŕ:`R`,Ŗ:`R`,Ř:`R`,ŕ:`r`,ŗ:`r`,ř:`r`,Ś:`S`,Ŝ:`S`,Ş:`S`,Š:`S`,ś:`s`,ŝ:`s`,ş:`s`,š:`s`,Ţ:`T`,Ť:`T`,Ŧ:`T`,ţ:`t`,ť:`t`,ŧ:`t`,Ũ:`U`,Ū:`U`,Ŭ:`U`,Ů:`U`,Ű:`U`,Ų:`U`,ũ:`u`,ū:`u`,ŭ:`u`,ů:`u`,ű:`u`,ų:`u`,Ŵ:`W`,ŵ:`w`,Ŷ:`Y`,ŷ:`y`,Ÿ:`Y`,Ź:`Z`,Ż:`Z`,Ž:`Z`,ź:`z`,ż:`z`,ž:`z`,IJ:`IJ`,ij:`ij`,Œ:`Oe`,œ:`oe`,ʼn:`'n`,ſ:`ss`},function(e){return r?.[e]}),lt=Object.prototype.toString,ut=st.Symbol,dt=ut?ut.prototype:void 0,ft=dt?dt.toString:void 0;function pt(e){return e==null?``:function(e){if(typeof e==`string`)return e;if(function(e){return typeof e==`symbol`||function(e){return!!e&&typeof e==`object`}(e)&&lt.call(e)==`[object Symbol]`}(e))return ft?ft.call(e):``;var t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}(e)}var mt;e.exports=(mt=function(e,t,n){return e+(n?`-`:``)+t.toLowerCase()},function(e){return function(e,t,n,r){for(var i=-1,a=e?e.length:0;++i<a;)n=t(n,e[i],i,e);return n}(function(e,t,n){return function(e){return it.test(e)}(e=pt(e))?function(e){return e.match(rt)||[]}(e):function(e){return e.match(i)||[]}(e)}(function(e){return(e=pt(e))&&e.replace(a,ct).replace(nt,``)}(e).replace(et,``)),mt,``)})},716:e=>{e.exports=Math.abs},7450:e=>{e.exports=Math.floor},713:e=>{e.exports=Number.isNaN||function(e){return e!=e}},3774:e=>{e.exports=Math.max},7552:e=>{e.exports=Math.min},5874:e=>{e.exports=Math.pow},9292:e=>{e.exports=Math.round},6071:(e,t,n)=>{var r=n(713);e.exports=function(e){return r(e)||e===0?e:e<0?-1:1}},5937:(e,t,n)=>{var r=typeof Map==`function`&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,`size`):null,a=r&&i&&typeof i.get==`function`?i.get:null,o=r&&Map.prototype.forEach,c=typeof Set==`function`&&Set.prototype,u=Object.getOwnPropertyDescriptor&&c?Object.getOwnPropertyDescriptor(Set.prototype,`size`):null,K=c&&u&&typeof u.get==`function`?u.get:null,Y=c&&Set.prototype.forEach,X=typeof WeakMap==`function`&&WeakMap.prototype?WeakMap.prototype.has:null,ee=typeof WeakSet==`function`&&WeakSet.prototype?WeakSet.prototype.has:null,te=typeof WeakRef==`function`&&WeakRef.prototype?WeakRef.prototype.deref:null,ce=Boolean.prototype.valueOf,ue=Object.prototype.toString,de=Function.prototype.toString,fe=String.prototype.match,me=String.prototype.slice,ge=String.prototype.replace,Te=String.prototype.toUpperCase,Oe=String.prototype.toLowerCase,Ae=RegExp.prototype.test,ze=Array.prototype.concat,qe=Array.prototype.join,Ye=Array.prototype.slice,Ze=Math.floor,Qe=typeof BigInt==`function`?BigInt.prototype.valueOf:null,et=Object.getOwnPropertySymbols,nt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?Symbol.prototype.toString:null,rt=typeof Symbol==`function`&&typeof Symbol.iterator==`object`,it=typeof Symbol==`function`&&Symbol.toStringTag?Symbol.toStringTag:null,at=Object.prototype.propertyIsEnumerable,ot=(typeof Reflect==`function`?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function st(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||Ae.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e==`number`){var r=e<0?-Ze(-e):Ze(e);if(r!==e){var i=String(r),a=me.call(t,i.length+1);return ge.call(i,n,`$&_`)+`.`+ge.call(ge.call(a,/([0-9]{3})/g,`$&_`),/_$/,``)}}return ge.call(t,n,`$&_`)}var ct=n(2634),lt=ct.custom,ut=vt(lt)?lt:null,dt={__proto__:null,double:`"`,single:`'`},ft={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function pt(e,t,n){var r=dt[n.quoteStyle||t];return r+e+r}function mt(e){return ge.call(String(e),/"/g,`&quot;`)}function ht(e){return!it||!(typeof e==`object`&&(it in e||e[it]!==void 0))}function gt(e){return xt(e)===`[object Array]`&&ht(e)}function _t(e){return xt(e)===`[object RegExp]`&&ht(e)}function vt(e){if(rt)return e&&typeof e==`object`&&e instanceof Symbol;if(typeof e==`symbol`)return!0;
178if(!e||typeof e!=`object`||!nt)return!1;try{return nt.call(e),!0}catch{}return!1}e.exports=function e(t,r,i,c){var u=r||{};if(bt(u,`quoteStyle`)&&!bt(dt,u.quoteStyle))throw TypeError(`option "quoteStyle" must be "single" or "double"`);if(bt(u,`maxStringLength`)&&(typeof u.maxStringLength==`number`?u.maxStringLength<0&&u.maxStringLength!==1/0:u.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ue=!bt(u,`customInspect`)||u.customInspect;if(typeof ue!=`boolean`&&ue!==`symbol`)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(bt(u,`indent`)&&u.indent!==null&&u.indent!==`	`&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(bt(u,`numericSeparator`)&&typeof u.numericSeparator!=`boolean`)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Te=u.numericSeparator;if(t===void 0)return`undefined`;if(t===null)return`null`;if(typeof t==`boolean`)return t?`true`:`false`;if(typeof t==`string`)return Ct(t,u);if(typeof t==`number`){if(t===0)return 1/0/t>0?`0`:`-0`;var Ae=String(t);return Te?st(t,Ae):Ae}if(typeof t==`bigint`){var Ze=String(t)+`n`;return Te?st(t,Ze):Ze}var et=u.depth===void 0?5:u.depth;if(i===void 0&&(i=0),i>=et&&et>0&&typeof t==`object`)return gt(t)?`[Array]`:`[Object]`;var lt,ft=function(e,t){var n;if(e.indent===`	`)n=`	`;else{if(!(typeof e.indent==`number`&&e.indent>0))return null;n=qe.call(Array(e.indent+1),` `)}return{base:n,prev:qe.call(Array(t+1),n)}}(u,i);if(c===void 0)c=[];else if(St(c,t)>=0)return`[Circular]`;function yt(t,n,r){if(n&&(c=Ye.call(c)).push(n),r){var a={depth:u.depth};return bt(u,`quoteStyle`)&&(a.quoteStyle=u.quoteStyle),e(t,a,i+1,c)}return e(t,u,i+1,c)}if(typeof t==`function`&&!_t(t)){var wt=function(e){if(e.name)return e.name;var t=fe.call(de.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),At=kt(t,yt);return`[Function`+(wt?`: `+wt:` (anonymous)`)+`]`+(At.length>0?` { `+qe.call(At,`, `)+` }`:``)}if(vt(t)){var jt=rt?ge.call(String(t),/^(Symbol\(.*\))_[^)]*$/,`$1`):nt.call(t);return typeof t!=`object`||rt?jt:Tt(jt)}if((lt=t)&&typeof lt==`object`&&(typeof HTMLElement<`u`&&lt instanceof HTMLElement||typeof lt.nodeName==`string`&&typeof lt.getAttribute==`function`)){for(var Mt=`<`+Oe.call(String(t.nodeName)),Nt=t.attributes||[],Pt=0;Pt<Nt.length;Pt++)Mt+=` `+Nt[Pt].name+`=`+pt(mt(Nt[Pt].value),`double`,u);return Mt+=`>`,t.childNodes&&t.childNodes.length&&(Mt+=`...`),Mt+`</`+Oe.call(String(t.nodeName))+`>`}if(gt(t)){if(t.length===0)return`[]`;var Ft=kt(t,yt);return ft&&!function(e){for(var t=0;t<e.length;t++)if(St(e[t],`
179`)>=0)return!1;return!0}(Ft)?`[`+Ot(Ft,ft)+`]`:`[ `+qe.call(Ft,`, `)+` ]`}if(function(e){return xt(e)===`[object Error]`&&ht(e)}(t)){var It=kt(t,yt);return`cause`in Error.prototype||!(`cause`in t)||at.call(t,`cause`)?It.length===0?`[`+String(t)+`]`:`{ [`+String(t)+`] `+qe.call(It,`, `)+` }`:`{ [`+String(t)+`] `+qe.call(ze.call(`[cause]: `+yt(t.cause),It),`, `)+` }`}if(typeof t==`object`&&ue){if(ut&&typeof t[ut]==`function`&&ct)return ct(t,{depth:et-i});if(ue!==`symbol`&&typeof t.inspect==`function`)return t.inspect()}if(function(e){if(!a||!e||typeof e!=`object`)return!1;try{a.call(e);try{K.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}(t)){var Rt=[];return o&&o.call(t,(function(e,n){Rt.push(yt(n,t,!0)+` => `+yt(e,t))})),Dt(`Map`,a.call(t),Rt,ft)}if(function(e){if(!K||!e||typeof e!=`object`)return!1;try{K.call(e);try{a.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}(t)){var zt=[];return Y&&Y.call(t,(function(e){zt.push(yt(e,t))})),Dt(`Set`,K.call(t),zt,ft)}if(function(e){if(!X||!e||typeof e!=`object`)return!1;try{X.call(e,X);try{ee.call(e,ee)}catch{return!0}return e instanceof WeakMap}catch{}return!1}(t))return Et(`WeakMap`);if(function(e){if(!ee||!e||typeof e!=`object`)return!1;try{ee.call(e,ee);try{X.call(e,X)}catch{return!0}return e instanceof WeakSet}catch{}return!1}(t))return Et(`WeakSet`);if(function(e){if(!te||!e||typeof e!=`object`)return!1;try{return te.call(e),!0}catch{}return!1}(t))return Et(`WeakRef`);if(function(e){return xt(e)===`[object Number]`&&ht(e)}(t))return Tt(yt(Number(t)));if(function(e){if(!e||typeof e!=`object`||!Qe)return!1;try{return Qe.call(e),!0}catch{}return!1}(t))return Tt(yt(Qe.call(t)));if(function(e){return xt(e)===`[object Boolean]`&&ht(e)}(t))return Tt(ce.call(t));if(function(e){return xt(e)===`[object String]`&&ht(e)}(t))return Tt(yt(String(t)));if(typeof window<`u`&&t===window)return`{ [object Window] }`;if(typeof globalThis<`u`&&t===globalThis||n.g!==void 0&&t===n.g)return`{ [object globalThis] }`;if(!function(e){return xt(e)===`[object Date]`&&ht(e)}(t)&&!_t(t)){var Bt=kt(t,yt),Vt=ot?ot(t)===Object.prototype:t instanceof Object||t.constructor===Object,Ht=t instanceof Object?``:`null prototype`,Ut=!Vt&&it&&Object(t)===t&&it in t?me.call(xt(t),8,-1):Ht?`Object`:``,Wt=(Vt||typeof t.constructor!=`function`?``:t.constructor.name?t.constructor.name+` `:``)+(Ut||Ht?`[`+qe.call(ze.call([],Ut||[],Ht||[]),`: `)+`] `:``);return Bt.length===0?Wt+`{}`:ft?Wt+`{`+Ot(Bt,ft)+`}`:Wt+`{ `+qe.call(Bt,`, `)+` }`}return String(t)};var yt=Object.prototype.hasOwnProperty||function(e){return e in this};function bt(e,t){return yt.call(e,t)}function xt(e){return ue.call(e)}function St(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function Ct(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r=`... `+n+` more character`+(n>1?`s`:``);return Ct(me.call(e,0,t.maxStringLength),t)+r}var i=ft[t.quoteStyle||`single`];return i.lastIndex=0,pt(ge.call(ge.call(e,i,`\\$1`),/[\x00-\x1f]/g,wt),`single`,t)}function wt(e){var t=e.charCodeAt(0),n={8:`b`,9:`t`,10:`n`,12:`f`,13:`r`}[t];return n?`\\`+n:`\\x`+(t<16?`0`:``)+Te.call(t.toString(16))}function Tt(e){return`Object(`+e+`)`}function Et(e){return e+` { ? }`}function Dt(e,t,n,r){return e+` (`+t+`) {`+(r?Ot(n,r):qe.call(n,`, `))+`}`}function Ot(e,t){if(e.length===0)return``;var n=`
180`+t.prev+t.base;return n+qe.call(e,`,`+n)+`
181`+t.prev}function kt(e,t){var n=gt(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=bt(e,i)?t(e[i],e):``}var a,o=typeof et==`function`?et(e):[];if(rt){a={};for(var c=0;c<o.length;c++)a[`$`+o[c]]=o[c]}for(var u in e)bt(e,u)&&(n&&String(Number(u))===u&&u<e.length||rt&&a[`$`+u]instanceof Symbol||(Ae.call(/[^\w$]/,u)?r.push(t(u,e)+`: `+t(e[u],e)):r.push(u+`: `+t(e[u],e))));if(typeof et==`function`)for(var K=0;K<o.length;K++)at.call(e,o[K])&&r.push(`[`+t(o[K])+`]: `+t(e[o[K]],e));return r}},9647:e=>{var t=String.prototype.replace,n=/%20/g,r=`RFC3986`;e.exports={default:r,formatters:{RFC1738:function(e){return t.call(e,n,`+`)},RFC3986:function(e){return String(e)}},RFC1738:`RFC1738`,RFC3986:r}},5882:(e,t,n)=>{var r=n(6738),i=n(4662),a=n(9647),o=Object.prototype.hasOwnProperty,c={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},u=Array.isArray,K=Array.prototype.push,Y=function(e,t){K.apply(e,u(t)?t:[t])},X=Date.prototype.toISOString,ee=a.default,te={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset
181:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,filter:void 0,format:ee,formatter:a.formatters[ee],indices:!1,serializeDate:function(e){return X.call(e)},skipNulls:!1,strictNullHandling:!1},ce={},ue=function e(t,n,a,o,c,K,X,ee,ue,de,fe,me,ge,Te,Oe,Ae,ze,qe){for(var Ye,Ze=t,Qe=qe,et=0,nt=!1;(Qe=Qe.get(ce))!==void 0&&!nt;){var rt=Qe.get(t);if(et+=1,rt!==void 0){if(rt===et)throw RangeError(`Cyclic object value`);nt=!0}Qe.get(ce)===void 0&&(et=0)}if(typeof de==`function`?Ze=de(n,Ze):Ze instanceof Date?Ze=ge(Ze):a===`comma`&&u(Ze)&&(Ze=i.maybeMap(Ze,(function(e){return e instanceof Date?ge(e):e}))),Ze===null){if(K)return ue&&!Ae?ue(n,te.encoder,ze,`key`,Te):n;Ze=``}if(typeof(Ye=Ze)==`string`||typeof Ye==`number`||typeof Ye==`boolean`||typeof Ye==`symbol`||typeof Ye==`bigint`||i.isBuffer(Ze))return ue?[Oe(Ae?n:ue(n,te.encoder,ze,`key`,Te))+`=`+Oe(ue(Ze,te.encoder,ze,`value`,Te))]:[Oe(n)+`=`+Oe(String(Ze))];var it,at=[];if(Ze===void 0)return at;if(a===`comma`&&u(Ze))Ae&&ue&&(Ze=i.maybeMap(Ze,ue)),it=[{value:Ze.length>0?Ze.join(`,`)||null:void 0}];else if(u(de))it=de;else{var ot=Object.keys(Ze);it=fe?ot.sort(fe):ot}var st=ee?String(n).replace(/\./g,`%2E`):String(n),ct=o&&u(Ze)&&Ze.length===1?st+`[]`:st;if(c&&u(Ze)&&Ze.length===0)return ct+`[]`;for(var lt=0;lt<it.length;++lt){var ut=it[lt],dt=typeof ut==`object`&&ut&&ut.value!==void 0?ut.value:Ze[ut];if(!X||dt!==null){var ft=me&&ee?String(ut).replace(/\./g,`%2E`):String(ut),pt=u(Ze)?typeof a==`function`?a(ct,ft):ct:ct+(me?`.`+ft:`[`+ft+`]`);qe.set(t,et);var mt=r();mt.set(ce,qe),Y(at,e(dt,pt,a,o,c,K,X,ee,a===`comma`&&Ae&&u(Ze)?null:ue,de,fe,me,ge,Te,Oe,Ae,ze,mt))}}return at};e.exports=function(e,t){var n,i=e,K=function(e){if(!e)return te;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.encodeDotInKeys!==void 0&&typeof e.encodeDotInKeys!=`boolean`)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!=`function`)throw TypeError(`Encoder has to be a function.`);var t=e.charset||te.charset;if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);var n=a.default;if(e.format!==void 0){if(!o.call(a.formatters,e.format))throw TypeError(`Unknown format option provided.`);n=e.format}var r,i=a.formatters[n],K=te.filter;if((typeof e.filter==`function`||u(e.filter))&&(K=e.filter),r=e.arrayFormat in c?e.arrayFormat:`indices`in e?e.indices?`indices`:`repeat`:te.arrayFormat,`commaRoundTrip`in e&&typeof e.commaRoundTrip!=`boolean`)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var Y=e.allowDots===void 0?!0===e.encodeDotInKeys||te.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix==`boolean`?e.addQueryPrefix:te.addQueryPrefix,allowDots:Y,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:te.allowEmptyArrays,arrayFormat:r,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:te.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:e.delimiter===void 0?te.delimiter:e.delimiter,encode:typeof e.encode==`boolean`?e.encode:te.encode,encodeDotInKeys:typeof e.encodeDotInKeys==`boolean`?e.encodeDotInKeys:te.encodeDotInKeys,encoder:typeof e.encoder==`function`?e.encoder:te.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==`boolean`?e.encodeValuesOnly:te.encodeValuesOnly,filter:K,format:n,formatter:i,serializeDate:typeof e.serializeDate==`function`?e.serializeDate:te.serializeDate,skipNulls:typeof e.skipNulls==`boolean`?e.skipNulls:te.skipNulls,sort:typeof e.sort==`function`?e.sort:null,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:te.strictNullHandling}}(t);typeof K.filter==`function`?i=(0,K.filter)(``,i):u(K.filter)&&(n=K.filter);var X=[];if(typeof i!=`object`||!i)return``;
181var ee=c[K.arrayFormat],ce=ee===`comma`&&K.commaRoundTrip;n||=Object.keys(i),K.sort&&n.sort(K.sort);for(var de=r(),fe=0;fe<n.length;++fe){var me=n[fe],ge=i[me];K.skipNulls&&ge===null||Y(X,ue(ge,me,ee,ce,K.allowEmptyArrays,K.strictNullHandling,K.skipNulls,K.encodeDotInKeys,K.encode?K.encoder:null,K.filter,K.sort,K.allowDots,K.serializeDate,K.format,K.formatter,K.encodeValuesOnly,K.charset,de))}var Te=X.join(K.delimiter),Oe=!0===K.addQueryPrefix?`?`:``;return K.charsetSentinel&&(K.charset===`iso-8859-1`?Oe+=`utf8=%26%2310003%3B&`:Oe+=`utf8=%E2%9C%93&`),Te.length>0?Oe+Te:``}},4662:(e,t,n)=>{var r=n(9647),i=Object.prototype.hasOwnProperty,a=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)e[r]!==void 0&&(n[r]=e[r]);return n},u=1024;e.exports={arrayToObject:c,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:`o`}],n=[],r=0;r<t.length;++r)for(var i=t[r],o=i.obj[i.prop],c=Object.keys(o),u=0;u<c.length;++u){var K=c[u],Y=o[K];typeof Y==`object`&&Y&&n.indexOf(Y)===-1&&(t.push({obj:o,prop:K}),n.push(Y))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(a(n)){for(var r=[],i=0;i<n.length;++i)n[i]!==void 0&&r.push(n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g,` `);if(n===`iso-8859-1`)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},encode:function(e,t,n,i,a){if(e.length===0)return e;var c=e;if(typeof e==`symbol`?c=Symbol.prototype.toString.call(e):typeof e!=`string`&&(c=String(e)),n===`iso-8859-1`)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(e){return`%26%23`+parseInt(e.slice(2),16)+`%3B`}));for(var K=``,Y=0;Y<c.length;Y+=u){for(var X=c.length>=u?c.slice(Y,Y+u):c,ee=[],te=0;te<X.length;++te){var ce=X.charCodeAt(te);ce===45||ce===46||ce===95||ce===126||ce>=48&&ce<=57||ce>=65&&ce<=90||ce>=97&&ce<=122||a===r.RFC1738&&(ce===40||ce===41)?ee[ee.length]=X.charAt(te):ce<128?ee[ee.length]=o[ce]:ce<2048?ee[ee.length]=o[192|ce>>6]+o[128|63&ce]:ce<55296||ce>=57344?ee[ee.length]=o[224|ce>>12]+o[128|ce>>6&63]+o[128|63&ce]:(te+=1,ce=65536+((1023&ce)<<10|1023&X.charCodeAt(te)),ee[ee.length]=o[240|ce>>18]+o[128|ce>>12&63]+o[128|ce>>6&63]+o[128|63&ce])}K+=ee.join(``)}return K},isBuffer:function(e){return!(!e||typeof e!=`object`||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return Object.prototype.toString.call(e)===`[object RegExp]`},maybeMap:function(e,t){if(a(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if(typeof n!=`object`&&typeof n!=`function`){if(a(t))t.push(n);else{if(!t||typeof t!=`object`)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||typeof t!=`object`)return[t].concat(n);var o=t;return a(t)&&!a(n)&&(o=c(t,r)),a(t)&&a(n)?(n.forEach((function(n,a){if(i.call(t,a)){var o=t[a];o&&typeof o==`object`&&n&&typeof n==`object`?t[a]=e(o,n,r):t.push(n)}else t[a]=n})),t):Object.keys(n).reduce((function(t,a){var o=n[a];return t[a]=i.call(t,a)?e(t[a],o,r):o,t}),o)}}}
vendor: 3,359 bytes, line 181
181,6738:(e,t,n)=>{var r=n(6785),i=n(5937),a=n(8709),o=n(885),c=n(8977)||o||a;e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r(`Side channel does not contain `+i(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||=c(),e.set(t,n)}};return t}},8709:(e,t,n)=>{var r=n(5937),i=n(6785),a=function(e,t,n){for(var r,i=e;(r=i.next)!=null;i=r)if(r.key===t)return i.next=r.next,n||(r.next=e.next,e.next=r),r};e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new i(`Side channel does not contain `+r(e))},delete:function(t){var n=e&&e.next,r=function(e,t){if(e)return a(e,t,!0)}(e,t);return r&&n&&n===r&&(e=void 0),!!r},get:function(t){return function(e,t){if(e){var n=a(e,t);return n&&n.value}}(e,t)},has:function(t){return function(e,t){return!!e&&!!a(e,t)}(e,t)},set:function(t,n){e||={next:void 0},function(e,t,n){var r=a(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(e,t,n)}};return t}},885:(e,t,n)=>{var r=n(4885),i=n(2774),a=n(5937),o=n(6785),c=r(`%Map%`,!0),u=i(`Map.prototype.get`,!0),K=i(`Map.prototype.set`,!0),Y=i(`Map.prototype.has`,!0),X=i(`Map.prototype.delete`,!0),ee=i(`Map.prototype.size`,!0);e.exports=!!c&&function(){var e,t={assert:function(e){if(!t.has(e))throw new o(`Side channel does not contain `+a(e))},delete:function(t){if(e){var n=X(e,t);return ee(e)===0&&(e=void 0),n}return!1},get:function(t){if(e)return u(e,t)},has:function(t){return!!e&&Y(e,t)},set:function(t,n){e||=new c,K(e,t,n)}};return t}},1823:e=>{var t=Object.defineProperty||!1;if(t)try{t({},`a`,{value:1})}catch{t=!1}e.exports=t},4885:(e,t,n)=>{var r,i=n(5846),a=n(5293),o=n(9055),c=n(8888),u=n(7900),K=n(5389),Y=n(6785),X=n(4055),ee=n(716),te=n(7450),ce=n(3774),ue=n(7552),de=n(5874),fe=n(9292),me=n(6071),ge=Function,Te=function(e){try{return ge(`"use strict"; return (`+e+`).constructor;`)()}catch{}},Oe=n(5875),Ae=n(1823),ze=function(){throw new Y},qe=Oe?function(){try{return ze}catch{try{return Oe(arguments,`callee`).get}catch{return ze}}}():ze,Ye=n(5639)(),Ze=n(7106),Qe=n(3766),et=n(6822),nt=n(3036),rt=n(78),it={},at=typeof Uint8Array<`u`&&Ze?Ze(Uint8Array):r,ot={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?r:ArrayBuffer,"%ArrayIteratorPrototype%":Ye&&Ze?Ze([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":it,"%AsyncGenerator%":it,"%AsyncGeneratorFunction%":it,"%AsyncIteratorPrototype%":it,"%Atomics%":typeof Atomics>`u`?r:Atomics,"%BigInt%":typeof BigInt>`u`?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":a,"%eval%":eval,"%EvalError%":o,"%Float32Array%":typeof Float32Array>`u`?r:Float32Array,"%Float64Array%":typeof Float64Array>`u`?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?r:FinalizationRegistry,"%Function%":ge,"%GeneratorFunction%":it,"%Int8Array%":typeof Int8Array>`u`?r:Int8Array,"%Int16Array%":typeof Int16Array>`u`?r:Int16Array,"%Int32Array%":typeof Int32Array>
vendor: 4,686 bytes, line 181
181`u`?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ye&&Ze?Ze(Ze([][Symbol.iterator]())):r,"%JSON%":typeof JSON==`object`?JSON:r,"%Map%":typeof Map>`u`?r:Map,"%MapIteratorPrototype%":typeof Map<`u`&&Ye&&Ze?Ze(new Map()[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":Oe,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?r:Promise,"%Proxy%":typeof Proxy>`u`?r:Proxy,"%RangeError%":c,"%ReferenceError%":u,"%Reflect%":typeof Reflect>`u`?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?r:Set,"%SetIteratorPrototype%":typeof Set<`u`&&Ye&&Ze?Ze(new Set()[Symbol.iterator]()):r,"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ye&&Ze?Ze(``[Symbol.iterator]()):r,"%Symbol%":Ye?Symbol:r,"%SyntaxError%":K,"%ThrowTypeError%":qe,"%TypedArray%":at,"%TypeError%":Y,"%Uint8Array%":typeof Uint8Array>`u`?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?r:Uint32Array,"%URIError%":X,"%WeakMap%":typeof WeakMap>`u`?r:WeakMap,"%WeakRef%":typeof WeakRef>`u`?r:WeakRef,"%WeakSet%":typeof WeakSet>`u`?r:WeakSet,"%Function.prototype.call%":rt,"%Function.prototype.apply%":nt,"%Object.defineProperty%":Ae,"%Object.getPrototypeOf%":Qe,"%Math.abs%":ee,"%Math.floor%":te,"%Math.max%":ce,"%Math.min%":ue,"%Math.pow%":de,"%Math.round%":fe,"%Math.sign%":me,"%Reflect.getPrototypeOf%":et};if(Ze)try{null.error}catch(e){ot[`%Error.prototype%`]=Ze(Ze(e))}var st=function e(t){var n;if(t===`%AsyncFunction%`)n=Te(`async function () {}`);else if(t===`%GeneratorFunction%`)n=Te(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=Te(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&Ze&&(n=Ze(i.prototype))}return ot[t]=n,n},ct={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},lt=n(5049),ut=n(5215),dt=lt.call(rt,Array.prototype.concat),ft=lt.call(nt,Array.prototype.splice),pt=lt.call(rt,
181String.prototype.replace),mt=lt.call(rt,String.prototype.slice),ht=lt.call(rt,RegExp.prototype.exec),gt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_t=/\\(\\)?/g,vt=function(e,t){var n,r=e;if(ut(ct,r)&&(r=`%`+(n=ct[r])[0]+`%`),ut(ot,r)){var i=ot[r];if(i===it&&(i=st(r)),i===void 0&&!t)throw new Y(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:n,name:r,value:i}}throw new K(`intrinsic `+e+` does not exist!`)};e.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new Y(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new Y(`"allowMissing" argument must be a boolean`);if(ht(/^%?[^%]*%?$/,e)===null)throw new K("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=mt(e,0,1),n=mt(e,-1);if(t===`%`&&n!==`%`)throw new K("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new K("invalid intrinsic syntax, expected opening `%`");var r=[];return pt(e,gt,(function(e,t,n,i){r[r.length]=n?pt(i,_t,`$1`):t||e})),r}(e),r=n.length>0?n[0]:``,i=vt(`%`+r+`%`,t),a=i.name,o=i.value,c=!1,u=i.alias;u&&(r=u[0],ft(n,dt([0,1],u)));for(var X=1,ee=!0;X<n.length;X+=1){var te=n[X],ce=mt(te,0,1),ue=mt(te,-1);if((ce===`"`||ce===`'`||ce==="`"||ue===`"`||ue===`'`||ue==="`")&&ce!==ue)throw new K(`property names with quotes must have matching quotes`);if(te!==`constructor`&&ee||(c=!0),ut(ot,a=`%`+(r+=`.`+te)+`%`))o=ot[a];else if(o!=null){if(!(te in o)){if(!t)throw new Y(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(Oe&&X+1>=n.length){var de=Oe(o,te);o=(ee=!!de)&&`get`in de&&!(`originalValue`in de.get)?de.get:o[te]}else ee=ut(o,te),o=o[te];ee&&!c&&(ot[a]=o)}}return o}},7189:e=>{e.exports=Object.getOwnPropertyDescriptor},5875:(e,t,n)=>{var r=n(7189);if(r)try{r([],`length`)}catch{r=null}e.exports=r},5639:(e,t,n)=>{var r=typeof Symbol<`u`&&Symbol,i=n(9570);e.exports=function(){return typeof r==`function`&&typeof Symbol==`function`&&typeof r(`foo`)==`symbol`&&typeof Symbol(`bar`)==`symbol`&&i()}},9570:e=>{e.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;for(var r in e[t]=42,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==42||!0!==a.enumerable)return!1}return!0}},8977:(e,t,n)=>{var r=n(8297),i=n(2774),a=n(5937),o=n(885),c=n(6785),u=r(`%WeakMap%`,!0),K=i(`WeakMap.prototype.get`,!0),Y=i(`WeakMap.prototype.set`,!0),X=i(`WeakMap.prototype.has`,!0),ee=i(`WeakMap.prototype.delete`,!0);e.exports=u?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new c(`Side channel does not contain `+a(e))},delete:function(n){if(u&&n&&(typeof n==`object`||typeof n==`function`)){if(e)return ee(e,n)}else if(o&&t)return t.delete(n);return!1},get:function(n){return u&&n&&(typeof n==`object`||typeof n==`function`)&&e?K(e,n):t&&t.get(n)},has:function(n){return u&&n&&(typeof n==`object`||typeof n==`function`)&&e?X(e,n):!!t&&t.has(n)},set:function(n,r){u&&n&&(typeof n==`object`||typeof n==`function`)?(e||=new u,Y(e,n,r)):o&&(t||=o(),t.set(n,r))}};return n}:o},315:e=>{var t=Object.defineProperty||!1;if(t)try{t({},`a`,{value:1})}catch{t=!1}e.exports=t},8297:(e,t,n)=>{var r,i=n(5846),a=n(5293),o=n(9055),c=n(8888),u=n(7900),K=n(5389),Y=n(6785),X=n(4055),ee=n(716),te=n(7450),ce=n(3774),ue=n(7552),de=n(5874),fe=n(9292),me=n(6071),ge=Function,Te=function(e){try{return ge(`"use strict"; return (`+e+`).constructor;`)()}catch{}},Oe=n(4415),Ae=n(315),ze=function(){throw new Y},qe=Oe?function(){try{return ze}catch{try{return Oe(arguments,`callee`).get}catch{return ze}}}():ze,Ye=n(9715)(),Ze=n(7106),Qe=n(3766),et=n(6822),nt=n(3036),rt=n(78),it={},at=typeof Uint8Array<`u`&&Ze?Ze(Uint8Array):r,ot={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?r:ArrayBuffer,"%ArrayIteratorPrototype%":Ye&&Ze?Ze([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":it,"%AsyncGenerator%":it,"%AsyncGeneratorFunction%":it,"%AsyncIteratorPrototype%":it,"%Atomics%":typeof Atomics>`u`?r:Atomics,"%BigInt%":typeof BigInt>`u`?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":a,"%eval%":eval,"%EvalError%":o,"%Float32Array%":typeof Float32Array>`u`?r:Float32Array,"%Float64Array%":typeof Float64Array>`u`?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?r:FinalizationRegistry,"%Function%":ge,"%GeneratorFunction%":it,"%Int8Array%":typeof Int8Array>`u`?r:Int8Array,"%Int16Array%":typeof Int16Array>`u`?r:Int16Array,"%Int32Array%":typeof Int32Array>
vendor: 4,686 bytes, line 181
181`u`?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ye&&Ze?Ze(Ze([][Symbol.iterator]())):r,"%JSON%":typeof JSON==`object`?JSON:r,"%Map%":typeof Map>`u`?r:Map,"%MapIteratorPrototype%":typeof Map<`u`&&Ye&&Ze?Ze(new Map()[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":Oe,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?r:Promise,"%Proxy%":typeof Proxy>`u`?r:Proxy,"%RangeError%":c,"%ReferenceError%":u,"%Reflect%":typeof Reflect>`u`?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?r:Set,"%SetIteratorPrototype%":typeof Set<`u`&&Ye&&Ze?Ze(new Set()[Symbol.iterator]()):r,"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ye&&Ze?Ze(``[Symbol.iterator]()):r,"%Symbol%":Ye?Symbol:r,"%SyntaxError%":K,"%ThrowTypeError%":qe,"%TypedArray%":at,"%TypeError%":Y,"%Uint8Array%":typeof Uint8Array>`u`?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?r:Uint32Array,"%URIError%":X,"%WeakMap%":typeof WeakMap>`u`?r:WeakMap,"%WeakRef%":typeof WeakRef>`u`?r:WeakRef,"%WeakSet%":typeof WeakSet>`u`?r:WeakSet,"%Function.prototype.call%":rt,"%Function.prototype.apply%":nt,"%Object.defineProperty%":Ae,"%Object.getPrototypeOf%":Qe,"%Math.abs%":ee,"%Math.floor%":te,"%Math.max%":ce,"%Math.min%":ue,"%Math.pow%":de,"%Math.round%":fe,"%Math.sign%":me,"%Reflect.getPrototypeOf%":et};if(Ze)try{null.error}catch(e){ot[`%Error.prototype%`]=Ze(Ze(e))}var st=function e(t){var n;if(t===`%AsyncFunction%`)n=Te(`async function () {}`);else if(t===`%GeneratorFunction%`)n=Te(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=Te(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&Ze&&(n=Ze(i.prototype))}return ot[t]=n,n},ct={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},lt=n(5049),ut=n(5215),dt=lt.call(rt,Array.prototype.concat),ft=lt.call(nt,Array.prototype.splice),pt=lt.call(rt,
181String.prototype.replace),mt=lt.call(rt,String.prototype.slice),ht=lt.call(rt,RegExp.prototype.exec),gt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_t=/\\(\\)?/g,vt=function(e,t){var n,r=e;if(ut(ct,r)&&(r=`%`+(n=ct[r])[0]+`%`),ut(ot,r)){var i=ot[r];if(i===it&&(i=st(r)),i===void 0&&!t)throw new Y(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:n,name:r,value:i}}throw new K(`intrinsic `+e+` does not exist!`)};e.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new Y(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new Y(`"allowMissing" argument must be a boolean`);if(ht(/^%?[^%]*%?$/,e)===null)throw new K("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=mt(e,0,1),n=mt(e,-1);if(t===`%`&&n!==`%`)throw new K("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new K("invalid intrinsic syntax, expected opening `%`");var r=[];return pt(e,gt,(function(e,t,n,i){r[r.length]=n?pt(i,_t,`$1`):t||e})),r}(e),r=n.length>0?n[0]:``,i=vt(`%`+r+`%`,t),a=i.name,o=i.value,c=!1,u=i.alias;u&&(r=u[0],ft(n,dt([0,1],u)));for(var X=1,ee=!0;X<n.length;X+=1){var te=n[X],ce=mt(te,0,1),ue=mt(te,-1);if((ce===`"`||ce===`'`||ce==="`"||ue===`"`||ue===`'`||ue==="`")&&ce!==ue)throw new K(`property names with quotes must have matching quotes`);if(te!==`constructor`&&ee||(c=!0),ut(ot,a=`%`+(r+=`.`+te)+`%`))o=ot[a];else if(o!=null){if(!(te in o)){if(!t)throw new Y(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(Oe&&X+1>=n.length){var de=Oe(o,te);o=(ee=!!de)&&`get`in de&&!(`originalValue`in de.get)?de.get:o[te]}else ee=ut(o,te),o=o[te];ee&&!c&&(ot[a]=o)}}return o}},8153:e=>{e.exports=Object.getOwnPropertyDescriptor},4415:(e,t,n)=>{var r=n(8153);if(r)try{r([],`length`)}catch{r=null}e.exports=r},9715:(e,t,n)=>{var r=typeof Symbol<`u`&&Symbol,i=n(3793);e.exports=function(){return typeof r==`function`&&typeof Symbol==`function`&&typeof r(`foo`)==`symbol`&&typeof Symbol(`bar`)==`symbol`&&i()}},3793:e=>{e.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;for(var r in e[t]=42,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==42||!0!==a.enumerable)return!1}return!0}},2634:()=>{}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if(typeof globalThis==`object`)return globalThis;try{return this||Function(`return this`)()}catch{if(typeof window==`object`)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{n.d(r,{default:()=>qe});var e,t,i,a=n(5882),o=n.n(a);(function(e){e.Cancel=`exit`,e.Complete=`complete`,e.Error=`error`,e.Fail=`fail`,e.Load=`load`,e.Ready=`ready`,e.Start=`start`,e.Success=`success`,e.DocumentCameraSelect=`document-camera-select`,e.DocumentCameraCapture=`document-camera-capture`,e.DocumentUpload=`document-upload`,e.OneTimeLinkSent=`one-time-link-sent`,e.OneTimeLinkStart=`one-time-link-start`,e.OneTimeLinkExit=`one-time-link-exit`,e.SelfieCameraSelect=`selfie-camera-select`,e.SelfieCameraCapture=`selfie-camera-capture`,e.SelfieRecordUpload=`selfie-record-upload`,e.LoadCameraFailed=`load-camera-failed`,e.PageChange=`page-change`,e.InquiryLoad=`inquiry-load`,e.CountrySelect=`country-select`,e.VerificationChange=`verification-change`})(e||={}),function(e){e.Open=`open`,e.Exit=`exit`,e.Destroy=`destroy`}(t||={}),function(e){e.Development=`http://localhost:3000`,e.Staging=`https://inquiry.withpersona-staging.com`,e.Canary=`https://canary.withpersona.com`,e.Production=`https://inquiry.withpersona.com`}(i||={});let c=function(){function e(){}return e.log=function(e,t){t===void 0&&(t=`info`)},e}();function u(e){switch(e){case`development`:return i.Development;case`staging`:return i.Staging;case`canary`:return i.Canary;case`production`:case void 0:case null:return i.Production;default:if(typeof e==`string`){var t=e.startsWith(`localhost`)?`http://${e}`:`https://${e}`;if(function(e){try{var t=new URL(e);return!(t.protocol!==`https:`&&t.hostname!==`localhost`||!t.hostname||t.hostname.length===0||t.hostname!==`localhost`&&!t.hostname.includes(`.`))}catch{return!1}}(t))return t.replace(/\/$/,``)}return c.log(`Invalid host: "${e}". Expected 'development', 'staging', 'canary', 'production', or a valid hostname/URL. Falling back to 'production'.`,`error`),i.Production}}var K=n(2709),Y=n.n(K),X=function(){return X=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},X.apply(this,arguments)};function ee(e){return Array.isArray(e)?e.map(ee):function(e){return e!=null&&e.constructor===Object}(e)?Object.keys(e).reduce((function(t,n){var r;return X(X({},t),((r={})[Y()(n)]=ee(e[n]),r))}),{}):e}var te=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
181if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},ce=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(t===void 0||t-->0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},ue=function(){function e(e){this.id=e}return e.prototype.isMounted=function(){return document.getElementById(this.id)!=null},e.prototype.mount=function(e){if(document.getElementById(this.id))console.warn(`persona: stylesheet ${this.id} already appended. skipping.`);else{var t=fe(`style`,{id:this.id},[document.createTextNode(e)]);document.head.appendChild(t)}},e.prototype.unmount=function(){var e,t=document.getElementById(this.id);t==null?console.warn(`persona: no stylesheet ${this.id} to remove. skipping.`):(e=t.parentNode)==null||e.removeChild(t)},e}();function de(e,t,n){var r,i,a,o;n===void 0&&(n=[]);var c=document.createElementNS(`http://www.w3.org/2000/svg`,e);try{for(var u=te(Object.entries(t)),K=u.next();!K.done;K=u.next()){var Y=ce(K.value,2),X=Y[0],ee=Y[1];X===`className`&&(X=`class`),c.setAttribute(X,ee)}}catch(e){r={error:e}}finally{try{K&&!K.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}try{for(var ue=te(n),de=ue.next();!de.done;de=ue.next()){var fe=de.value;!1!==fe&&c.appendChild(fe)}}catch(e){a={error:e}}finally{try{de&&!de.done&&(o=ue.return)&&o.call(ue)}finally{if(a)throw a.error}}return c}function fe(e,t,n){var r,i,a,o;n===void 0&&(n=[]);var c=document.createElement(e);try{for(var u=te(Object.entries(t)),K=u.next();!K.done;K=u.next()){var Y=ce(K.value,2),X=Y[0],ee=Y[1];X===`className`&&(X=`class`),c.setAttribute(X,ee)}}catch(e){r={error:e}}finally{try{K&&!K.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}try{for(var ue=te(n),de=ue.next();!de.done;de=ue.next()){var fe=de.value;!1!==fe&&(typeof fe==`string`?c.appendChild(document.createTextNode(fe)):c.appendChild(fe))}}catch(e){a={error:e}}finally{try{de&&!de.done&&(o=ue.return)&&o.call(ue)}finally{if(a)throw a.error}}return c}function me(e){return typeof e==`string`?e:typeof e==`number`?`${e}px`:``}var ge=[`allow-scripts`,`allow-same-origin`,`allow-popups`],Te=[`allow-forms`,`allow-modals`,`allow-top-navigation-by-user-activation`];function Oe(e,t,n,r){var i=r.accountId,a=r.accountTypeId,c=r.environment,K=r.environmentId,Y=r.fields,X=r.frameAncestors,te=r.frameHeight,ce=r.frameWidth,ue=r.host,de=r.iframeTitle,fe=r.inquiryId,Oe=r.language,Ae=r.messageTargetOrigin,ze=r.referenceId,qe=r.routingCountry,Ye=r.sandboxAttributes,Ze=Ye===void 0?Te:Ye,Qe=r.sessionToken,et=r.styleVariant,nt=r.templateId,rt=r.templateVersionId,it=r.themeSetId,at=r.widgetPadding,ot=!(!nt&&!rt),st=nt?.startsWith(`itmpl_`);if(!ot&&!fe)throw Error(`Either templateId/templateVersionId or inquiryId must be specified to start a flow`);if(ot&&fe)throw Error(`Only one of templateId/templateVersionId or inquiryId should be specified to start a flow`);if(i){if(ze)throw Error(`Cannot pass both accountId and referenceId`);if(a)throw Error(`Cannot pass both accountId and accountTypeId`)}var ct=u(ue),lt=o()({"client-version":`5.3.0`,"container-id":t,"flow-type":n,"routing-country":qe,"template-id":(st?null:nt)||null,"inquiry-template-id":(st?nt:null)||null,"inquiry-template-version-id":rt||null,environment:c,"environment-id":K,"iframe-origin":window.location.origin,"frame-ancestors":X??null,"message-target-origin":Ae||null,"inquiry-id":fe||null,language:Oe,"session-token":Qe,"reference-id":ze,"account-id":i,"account-type-id":a,fields:ee(Y??{}),"style-variant":et||null,"theme-set-id":it,"widget-padding":at},{addQueryPrefix:!0,skipNulls:!0});return e.style.maxHeight=me(te),e.style.maxWidth=me(ce),e.setAttribute(`data-testid`,`persona-widget__iframe`),n===`embedded`&&e.setAttribute(`aria-modal`,`true`),e.title=de??`Verify your identity`,e.className=`persona-widget__iframe`,e.allow=`camera;microphone;
181clipboard-write`,e.setAttribute(`sandbox`,ge.concat(Ze).join(` `)),e.frameBorder=`0`,e.src=ct+`/widget`+lt,e.onload=function(){},e}var Ae=function(e){if(e===`localhost`||/^\d+\.\d+\.\d+\.\d+$/.test(e))return e;var t=e.split(`.`);return t.length<=1?e:t.slice(-2).join(`.`)};function ze(t,n){var r=n.onLoad,i=n.onReady,a=n.onComplete,o=n.onEvent,c=n.onCancel,K=n.onError,Y=n.templateId,X=n.templateVersionId,ee=n.host,te=function(n){var te,ce,ue=u(ee??`production`);if(n.origin!==``)try{if(Ae(new URL(n.origin).host)!==Ae(new URL(ue).host))return}catch{return}if(!(Y&&Y!==n.data.templateId||X&&X!==n.data.templateVersionId||n.data.containerId&&t!==n.data.containerId))switch(o?.(n.data.name,n.data.metadata),n.data.name){case e.Load:r?.();break;case e.Ready:i?.({preferredDimensions:n.data.metadata?.preferredDimensions});break;case e.Complete:case e.Fail:a?.({inquiryId:n.data.metadata.inquiryId,status:n.data.metadata.status,fields:n.data.metadata.fields??n.data.metadata.scopes});break;case e.Cancel:c?.({inquiryId:n.data.metadata.inquiryId,sessionToken:n.data.metadata.sessionToken});break;case e.Error:K?.(n.data.error)}};return window.addEventListener(`message`,te),function(){window.removeEventListener(`message`,te)}}let qe={Client:function(){function e(e){var t,n,r,i,a,o,c,u,K,Y,X,ee=this;this._isLoading=!0,this._isOpen=!1,this.personaCSS=new ue(`persona-widget-styles`),this.globalCSS=new ue(`persona-global-styles`),this.onLoad=function(){var e,t;ee._isLoading=!1,ee.render(),(t=(e=ee.options).onLoad)==null||t.call(e)},this.onReady=function(e){var t,n,r,i=e?.preferredDimensions??{},a=i.minimumWidth,o=i.maximumWidth,c=i.minimumHeight,u=i.maximumHeight;a&&ee.iframeElement.setAttribute(`data-preferred-minimum-width`,a),o&&ee.iframeElement.setAttribute(`data-preferred-maximum-width`,o),c&&ee.iframeElement.setAttribute(`data-preferred-minimum-height`,c),u&&ee.iframeElement.setAttribute(`data-preferred-maximum-height`,u),(r=(n=ee.options).onReady)==null||r.call(n)},this.onComplete=function(e){var t,n,r=e.inquiryId,i=e.status,a=e.fields;ee._isOpen=!1,ee.render(),(n=(t=ee.options).onComplete)==null||n.call(t,{inquiryId:r,status:i,fields:a})},this.onCancel=function(e){var t,n,r=e.inquiryId,i=e.sessionToken;ee._isOpen=!1,ee.render(),(n=(t=ee.options).onCancel)==null||n.call(t,{inquiryId:r,sessionToken:i})},this.options=e,this.containerParent=e.parent??document.body??document.children[0],this.containerElement=fe(`div`,{class:`persona-widget__overlay`,style:`display: ${this._isOpen?`block`:`none`}`}),this.containerId=`persona-widget-`+Array(16).fill(void 0).map((function(){return Math.floor(35*Math.random()).toString(35)})).join(``),this.containerElement.setAttribute(`id`,this.containerId),this.loadingElement=fe(`div`,{class:`persona-widget__centered-frame`},[de(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`114`,height:`114`,class:`persona-widget__loading-spinner`},[de(`path`,{fill:`none`,stroke:`#0F2B72`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M25.887 10.432a56.275 56.275 0 0 0-15.455 15.455 55.86 55.86 0 0 0-5.183 9.678A55.576 55.576 0 0 0 2.066 46.07m-.8 5.438A56.678 56.678 0 0 0 1 57m4.249 21.435a55.86 55.86 0 0 0 5.183 9.678 56.275 56.275 0 0 0 6.97 8.485m8.485 6.97a55.86 55.86 0 0 0 9.678 5.183 55.576 55.576 0 0 0 10.506 3.183c3.535.7 7.19 1.066 10.929 1.066 3.74 0 7.394-.367 10.929-1.066a55.576 55.576 0 0 0 10.506-3.183 55.86 55.86 0 0 0 9.678-5.183 56.275 56.275 0 0 0 15.455-15.455 55.86 55.86 0 0 0 5.183-9.678 55.576 55.576 0 0 0 3.183-10.506A56.274 56.274 0 0 0 113 57c0-3.74-.367-7.394-1.066-10.929a55.576 55.576 0 0 0-3.183-10.506M96.598 17.402a56.275 56.275 0 0 0-8.485-6.97 55.86 55.86 0 0 0-9.678-5.183A55.576 55.576 0 0 0 67.93 2.066 56.274 56.274 0 0 0 57 1c-3.74 0-7.394.367-10.929 1.066m-34.94 30.418A51.76 51.76 0 0 0 7.225 41.9a51.633 51.633 0 0 0-1.98 10 52.63 52.63 0 0 0 .744 15.247 51.633 51.633 0 0 0 7.768 18.743 52.188 52.188 0 0 0 10.254 11.308 52.188 52.188 0 0 0 8.472 5.67m9.417 3.905a51.633 51.633 0 0 0 10 1.98 52.63 52.63 0 0 0 10.197 0 51.939 51.939 0 0 0 10-1.98 51.61 51.61 0 0 0 9.418-3.904 51.984 51.984 0 0 0 8.472-5.671m3.782-3.43a52.308 52.308 0 0 0 3.429-3.78m9.575-17.89a51.633 51.633 0 0 0 1.98-10 52.63 52.63 0 0 0-.744-15.247 51.633 51.633 0 0 0-7.768-18.743 52.188 52.188 0 0 0-10.254-11.308m-4.097-3.043a51.984 51.984 0 0 0-4.375-2.628M67.148 5.99a51.939 51.939 0 0 0-5.05-.743 52.63 52.63 0 0 0-15.246.743 51.633 51.633 0 0 0-18.743 7.768M24.012 16.8a52.308 52.308 0 0 0-3.782 3.43`})])]),this.containerElement.append(this.loadingElement),this.isLoading?this.loadingElement.style.display=`block`:this.loadingElement.style.display=`none`,this.iframeElement=document.createElement(`iframe`),this.unsubscribeFromEvents=ze(this.containerId,{onLoad:this.onLoad??null,onReady:this.onReady??null,onComplete:this.onComplete??null,onCancel:this.onCancel??null,onEvent:this.options.onEvent??null,onError:this.options.onError??null,templateId:this.options.templateId??null,templateVersionId:this.options.templateVersionId??null,host:this.options.host??null}),this.containerElement.appendChild(this.iframeElement),this.containerParent.appendChild(this.containerElement),this.personaCSS.mount(`@keyframes persona-widget__fadeIn {
182  from {
183    background-color: rgba(0, 0, 0, 0);
184    opacity: 0;
185  }
186  to {
187    /* persona-widget__overlay opacity = 0.7 */
188    background-color: rgba(0, 0, 0, 0.7);
189    opacity: 1;
190  }
191}
192
193@keyframes persona-widget__genieSlideIn {
194  from {
195    transform: translate(-50%, -40%) scale(0.8);
196  }
197  90% {
198    transform: translate(-50%, -51%) scale(1.01);
199  }
200  to {
201    transform: translate(-50%, -50%);
202  }
203}
204
205@keyframes persona-widget__slideDown {
206  from {
207    transform: translate(-50%, -55%);
208  }
209  to {
210    transform: translate(-50%, -50%);
211  }
212}
213
214.persona-widget__overlay {
215  position: fixed;
216  left: 0;
217  top: 0;
218  right: 0;
219  bottom: 0;
220  z-index: 9999;
221  animation: persona-widget__fadeIn 0.3s;
222  background-color: rgba(0, 0, 0, 0.7);
223}
224
225.persona-widget__overlay .persona-widget__centered-frame {
226  width: 120px;
227  height: 120px;
228  position: absolute;
229  left: calc(50% - 60px);
230  top: calc(50% - 60px);
231  z-index: 9999;
232}
233
234.persona-widget__overlay .persona-widget__loading-spinner {
235  position: absolute;
236  top: 50%;
237  left: 50%;
238  transform: translate(-50%, -50%);
239}
240
241.persona-widget__overlay .persona-widget__iframe {
242  animation: persona-widget__genieSlideIn 0.3s, persona-widget__slideDown ease-out 0.3s;
243
244  width: 100%;
245  height: 100%;
246
247  margin-left: auto;
248  margin-right: auto;
249  position: absolute;
250  left: 50%;
251  top: 50%;
252  transform: translate(-50%, -50%);
253
254  background-color: #ffffff;
255  border: none;
256  border-radius: 4px;
257  box-shadow: 0px 12px 40px 2px rgba(0, 0, 0, 0.4);
258
259  @media only screen and (min-width: 600.02px) and (min-height: 600.02px) {
260    min-width: attr(data-preferred-minimum-width type(<length> | <percentage>));
261    max-width: attr(data-preferred-maximum-width type(<length> | <percentage>), 400px);
262    min-height: attr(data-preferred-minimum-height type(<length> | <percentage>));
263    max-height: attr(data-preferred-maximum-height type(<length> | <percentage>), 650px);
264  }
265}
266`);try{this.iframeElement=Oe(this.iframeElement,this.containerId,`embedded`,this.options)}catch(e){throw console.error(`Persona`,e),this.destroy(),e}this.render()}return e.preload=function(e){return e===void 0&&(e=`production`),new Promise((function(t){var n=u(e),r=document.createElement(`iframe`);r.frameBorder=`0`,r.style.height=`0px`,r.style.width=`0px`,r.style.display=`none`,r.src=n+`/preload`,document.body.appendChild(r),r.onload=function(){document.body.removeChild(r),t()}}))},e.prototype.render=function(){var e;this.containerElement==null?c.log(`Cannot render client that has been destroyed`,`error`):(this.loadingElement.style.display=this.isLoading?`block`:`none`,this.containerElement.style.display=this.isOpen?`block`:`none`,this.isOpen&&!this.globalCSS.isMounted()?this.globalCSS.mount((e=this.containerId,`
267  /* Don't allow scrolling when widget is open */
268  html body {
269    overflow: hidden !important;
270  }
271
272  /* When the widget takes the full screen, hide everything else to prevent iOS scroll issues. */
273  @media (max-width: 600px), (max-height: 420px) {
274    html body > *:not(#${e}) {
275      display: none !important;
276    }
277  }
278`)):!this.isOpen&&this.globalCSS.isMounted()&&this.globalCSS.unmount())},e.prototype.open=function(){var e;(e=this.iframeElement.contentWindow)==null||e.postMessage({action:t.Open,metadata:{}},this.baseUrl),this._isOpen=!0,this.render()},e.prototype.cancel=function(e){var n;(n=this.iframeElement.contentWindow)==null||n.postMessage({action:t.Exit,metadata:{force:e}},this.baseUrl),this.render()},e.prototype.destroy=function(){var e;(e=this.iframeElement.contentWindow)==null||e.postMessage({action:t.Destroy,metadata:{}},this.baseUrl),this.personaCSS.unmount(),this.globalCSS.unmount(),this.containerParent.removeChild(this.containerElement),this.unsubscribeFromEvents()},Object.defineProperty(e.prototype,"isLoading",{get:function(){return this._isLoading}
278,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseUrl",{get:function(){return u(this.options.host)},enumerable:!1,configurable:!0}),e}(),setupIframe:Oe,setupEvents:ze}})(),r.default})()},155:e=>{e.exports=t},272:t=>{t.exports=e}},r={};function i(e){var t=r[e];if(t!==void 0)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,i),a.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a={};return(()=>{i.d(a,{default:()=>r});var e=i(272),t=i(155),n=i(706);let r=function(r){var i=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(t===void 0||t-->0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}((0,t.useState)(`persona-widget-`+Array(16).fill(void 0).map((function(){return Math.floor(35*Math.random()).toString(35)})).join(``)),2),a=i[0],o=(i[1],(0,t.createRef)());return(0,t.useEffect)((function(){var e,t,i,o,c,u,K,Y,X;return(0,n.setupEvents)(a,{onLoad:r.onLoad??null,onReady:r.onReady??null,onComplete:r.onComplete??null,onCancel:r.onCancel??null,onEvent:r.onEvent??null,onError:r.onError??null,templateId:r.templateId??null,templateVersionId:r.templateVersionId??null,host:r.host??null})}),[]),(0,t.useLayoutEffect)((function(){o.current!=null&&o.current.src===``&&(0,n.setupIframe)(o.current,a,`inline`,r)}),[a,o]),(0,e.jsx)(`iframe`,{ref:o})}})(),a.default})()))})),require_load_script2=__commonJSMin(((e,t)=>{t.exports=function(e,t,n){return new Promise((r,i)=>{let a=document.createElement(`script`);a.async=!0,a.src=e;for(let[e,n]of Object.entries(t||{}))a.setAttribute(e,n);a.onload=()=>{a.onerror=a.onload=null,r(a)},a.onerror=()=>{a.onerror=a.onload=null,i(Error(`Failed to load ${e}`))},(n||document.head||document.getElementsByTagName(`head`)[0]).appendChild(a)})}})),require_build$1=__commonJSMin(((e,t)=>{var n=require_load_script2();function r(e){return e&&e.__esModule?e.default:e}function i(e){Object.defineProperty(e,"__esModule",{value:!0,configurable:!0})}function a(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}i(t.exports),a(t.exports,`init`,function(){return X}),a(t.exports,`default`,function(){return ee});var o=`https://cdn.truv.com/bridge.js`,c=null,u=async()=>{await r(n)(o),c??=window.TruvBridge??null},K=u(),Y=async()=>{if(c)return c;try{let e=K;try{await e}catch{}if(c||(e===K&&(K=u()),await K),!c)throw`TruvBridge is not initialized`;return c}catch(e){throw console.error(`Error loading Truv Bridge`,e),e}},X=e=>{let t={isLoaded:!1,needOpen:!1};return Y().then(n=>{let r=t;r.isLoaded||(t={isLoaded:!0,bridgeInstance:n.init(e)},r.needOpen&&t.bridgeInstance.open())}),{open:()=>{t.isLoaded?t.bridgeInstance.open():t.needOpen=!0},close:()=>{t.isLoaded?t.bridgeInstance.close():t.needOpen=!1}}},ee={init:X}})),require_build=__commonJSMin(((e,t)=>{var n=require_react(),r=require_build$1();function i(e){return e&&e.__esModule?e.default:e}function a(e){Object.defineProperty(e,"__esModule",{value:!0,configurable:!0})}function o(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}a(t.exports),o(t.exports,`TruvBridgeInline`,function(){return u}),o(t.exports,`default`,function(){return K});var c=({isOpened:e,...t})=>{let i=(0,n.useRef)(t);return i.current=t,(0,n.useEffect)(()=>{if(!e)return;let{onSuccess:t,onClose:n,onLoad:a,onEvent:o,...c}=i.current,u=(0,r.init)({...c,onSuccess(e,t){i.current.onSuccess(e,t)},onClose(){i.current.onClose?.()},onLoad(){i.current.onLoad?.()},onEvent(e,t){i.current.onEvent?.(e,t)}});return u.open(),()=>{u.close()}},[e]),null},u=(0,n.forwardRef)(({bridgeParams:e,isOpened:t,...r},a)=>
278{let[o,u]=(0,n.useState)(!1),K=(0,n.useRef)(null);return(0,n.useImperativeHandle)(a,()=>K.current),(0,n.useEffect)(()=>{u(t)},[t]),i(n).createElement(`div`,{...r,ref:K},o&&K.current&&!!e&&i(n).createElement(c,{isOpened:t,...e,position:{type:`inline`,container:K.current}}))}),K=c}));function c$1(e,t,n,r){var i=this,a=(0,import_react.useRef)(null),o=(0,import_react.useRef)(0),c=(0,import_react.useRef)(0),u=(0,import_react.useRef)(null),K=(0,import_react.useRef)([]),Y=(0,import_react.useRef)(),X=(0,import_react.useRef)(),ee=(0,import_react.useRef)(e),te=(0,import_react.useRef)(!0);ee.current=e;var ce=typeof window<`u`,ue=!t&&t!==0&&ce;if(typeof e!=`function`)throw TypeError(`Expected a function`);t=+t||0;var de=!!(n||={}).leading,fe=!(`trailing`in n)||!!n.trailing,me=`maxWait`in n,ge=`debounceOnServer`in n&&!!n.debounceOnServer,Te=me?Math.max(+n.maxWait||0,t):null;return(0,import_react.useEffect)(function(){return te.current=!0,function(){te.current=!1}},[]),(0,import_react.useMemo)(function(){var e=function(e){var t=K.current,n=Y.current;return K.current=Y.current=null,o.current=e,c.current=c.current||e,X.current=ee.current.apply(n,t)},n=function(e,t){ue&&cancelAnimationFrame(u.current),u.current=ue?requestAnimationFrame(e):setTimeout(e,t)},Oe=function(e){if(!te.current)return!1;var n=e-a.current;return!a.current||n>=t||n<0||me&&e-o.current>=Te},Ae=function(t){return u.current=null,fe&&K.current?e(t):(K.current=Y.current=null,X.current)},ze=function e(){var r=Date.now();if(de&&c.current===o.current&&qe(),Oe(r))return Ae(r);if(te.current){var i=t-(r-a.current);n(e,me?Math.min(i,Te-(r-o.current)):i)}},qe=function(){r&&r({})},Ye=function(){if(ce||ge){var r=Date.now(),c=Oe(r);if(K.current=[].slice.call(arguments),Y.current=i,a.current=r,c){if(!u.current&&te.current)return o.current=a.current,n(ze,t),de?e(a.current):X.current;if(me)return n(ze,t),e(a.current)}return u.current||n(ze,t),X.current}};return Ye.cancel=function(){u.current&&(ue?cancelAnimationFrame(u.current):clearTimeout(u.current)),o.current=0,K.current=a.current=Y.current=u.current=null},Ye.isPending=function(){return!!u.current},Ye.flush=function(){return u.current?Ae(Date.now()):X.current},Ye},[de,me,t,Te,fe,ue,ce,ge,r])}function ok$1(){}function unreachable(){}function stringify$1(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var nameRe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nameReJsx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,emptyOptions$2={};function name(e,t){return((t||emptyOptions$2).jsx?nameReJsx:nameRe).test(e)}var re=/[ \t\n\f\r]/g;function whitespace(e){return typeof e==`object`?e.type===`text`&&empty$1(e.value):empty$1(e)}function empty$1(e){return e.replace(re,``)===``}var Schema=class{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}};Schema.prototype.property={},Schema.prototype.normal={},Schema.prototype.space=null;function merge(e,t){let n={},r={},i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Schema(n,r,t)}function normalize$1(e){return e.toLowerCase()}var Info=class{constructor(e,t){this.property=e,this.attribute=t}};Info.prototype.space=null,Info.prototype.boolean=!1,Info.prototype.booleanish=!1,Info.prototype.overloadedBoolean=!1,Info.prototype.number=!1,Info.prototype.commaSeparated=!1,Info.prototype.spaceSeparated=!1,Info.prototype.commaOrSpaceSeparated=!1,Info.prototype.mustUseProperty=!1,Info.prototype.defined=!1;var types_exports=__exportAll({boolean:()=>boolean,booleanish:()=>booleanish,commaOrSpaceSeparated:()=>commaOrSpaceSeparated,commaSeparated:()=>commaSeparated,number:()=>number,overloadedBoolean:()=>overloadedBoolean,spaceSeparated:()=>spaceSeparated}),powers=0,boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}var checks=Object.keys(types_exports),DefinedInfo=class extends Info{constructor(e,t,n,r){let i=-1;
vendor: 5,526 bytes, line 278
278if(super(e,t),mark(this,`space`,r),typeof n==`number`)for(;++i<checks.length;){let e=checks[i];mark(this,checks[i],(n&types_exports[e])===types_exports[e])}}};DefinedInfo.prototype.defined=!0;function mark(e,t,n){n&&(e[t]=n)}var own$4={}.hasOwnProperty;function create(e){let t={},n={},r;for(r in e.properties)if(own$4.call(e.properties,r)){let i=e.properties[r],a=new DefinedInfo(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[normalize$1(r)]=r,n[normalize$1(a.attribute)]=r}return new Schema(t,n,e.space)}var xlink=create({space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),xml=create({space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function caseSensitiveTransform(e,t){return t in e?e[t]:t}function caseInsensitiveTransform(e,t){return caseSensitiveTransform(e,t.toLowerCase())}var xmlns=create({space:`xmlns`,attributes:{xmlnsxlink:`xmlns:xlink`},transform:caseInsensitiveTransform,properties:{xmlns:null,xmlnsXLink:null}}),aria=create({transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:booleanish,ariaAutoComplete:null,ariaBusy:booleanish,ariaChecked:booleanish,ariaColCount:number,ariaColIndex:number,ariaColSpan:number,ariaControls:spaceSeparated,ariaCurrent:null,ariaDescribedBy:spaceSeparated,ariaDetails:null,ariaDisabled:booleanish,ariaDropEffect:spaceSeparated,ariaErrorMessage:null,ariaExpanded:booleanish,ariaFlowTo:spaceSeparated,ariaGrabbed:booleanish,ariaHasPopup:null,ariaHidden:booleanish,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:spaceSeparated,ariaLevel:number,ariaLive:null,ariaModal:booleanish,ariaMultiLine:booleanish,ariaMultiSelectable:booleanish,ariaOrientation:null,ariaOwns:spaceSeparated,ariaPlaceholder:null,ariaPosInSet:number,ariaPressed:booleanish,ariaReadOnly:booleanish,ariaRelevant:null,ariaRequired:booleanish,ariaRoleDescription:spaceSeparated,ariaRowCount:number,ariaRowIndex:number,ariaRowSpan:number,ariaSelected:booleanish,ariaSetSize:number,ariaSort:null,ariaValueMax:number,ariaValueMin:number,ariaValueNow:number,ariaValueText:null,role:null}}),html$2=create({space:`html`,attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},transform:caseInsensitiveTransform,mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:commaSeparated,acceptCharset:spaceSeparated,accessKey:spaceSeparated,action:null,allow:null,allowFullScreen:boolean,allowPaymentRequest:boolean,allowUserMedia:boolean,alt:null,as:null,async:boolean,autoCapitalize:null,autoComplete:spaceSeparated,autoFocus:boolean,autoPlay:boolean,capture:boolean,charSet:null,checked:boolean,cite:null,className:spaceSeparated,cols:number,colSpan:null,content:null,contentEditable:booleanish,controls:boolean,controlsList:spaceSeparated,coords:number|commaSeparated,crossOrigin:null,data:null,dateTime:null,decoding:null,default:boolean,defer:boolean,dir:null,dirName:null,disabled:boolean,download:overloadedBoolean,draggable:booleanish,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:boolean,formTarget:null,headers:spaceSeparated,height:number,hidden:boolean,high:number,href:null,hrefLang:null,htmlFor:spaceSeparated,httpEquiv:spaceSeparated,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:boolean,itemId:null,itemProp:spaceSeparated,itemRef:spaceSeparated,itemScope:boolean,itemType:spaceSeparated,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:boolean,low:number,manifest:null,max:null,maxLength:number,media:null,method:null,min:null,minLength:number,multiple:boolean,muted:boolean,name:null,nonce:null,noModule:boolean,noValidate:boolean,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:boolean,optimum:number,pattern:null,ping:spaceSeparated,placeholder:null,playsInl
278ine:boolean,poster:null,preload:null,readOnly:boolean,referrerPolicy:null,rel:spaceSeparated,required:boolean,reversed:boolean,rows:number,rowSpan:number,sandbox:spaceSeparated,scope:null,scoped:boolean,seamless:boolean,selected:boolean,shape:null,size:number,sizes:null,slot:null,span:number,spellCheck:booleanish,src:null,srcDoc:null,srcLang:null,srcSet:null,start:number,step:null,style:null,tabIndex:number,target:null,title:null,translate:null,type:null,typeMustMatch:boolean,useMap:null,value:booleanish,width:number,wrap:null,align:null,aLink:null,archive:spaceSeparated,axis:null,background:null,bgColor:null,border:number,borderColor:null,bottomMargin:number,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:boolean,declare:boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:number,leftMargin:number,link:null,longDesc:null,lowSrc:null,marginHeight:number,marginWidth:number,noResize:boolean,noHref:boolean,noShade:boolean,noWrap:boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:number,rules:null,scheme:null,scrolling:booleanish,standby:null,summary:null,text:null,topMargin:number,valueType:null,version:null,vAlign:null,vLink:null,vSpace:number,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:boolean,disableRemotePlayback:boolean,prefix:null,property:null,results:number,security:null,unselectable:null}}),svg$1=create({space:`svg`,attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode
278-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},transform:caseSensitiveTransform,properties:{about:commaOrSpaceSeparated,accentHeight:number,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:number,amplitude:number,arabicForm:null,ascent:number,attributeName:null,attributeType:null,azimuth:number,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:number,by:null,calcMode:null,capHeight:number,className:spaceSeparated,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:number,diffuseConstant:number,direction:null,display:null,dur:null,divisor:number,dominantBaseline:null,download:boolean,dx:null,dy:null,edgeMode:null,editable:null,elevation:number,enableBackground:null,end:null,event:null,exponent:number,externalResourcesRequired:null,fill:null,fillOpacity:number,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:commaSeparated,g2:commaSeparated,glyphName:commaSeparated,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:number,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:number,horizOriginX:number,horizOriginY:number,id:null,ideographic:number,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:number,k:number,k1:number,k2:number,k3:number,k4:number,kernelMatrix:commaOrSpaceSeparated,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:number,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:number,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
278Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:number,overlineThickness:number,paintOrder:null,panose1:null,path:null,pathLength:number,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:spaceSeparated,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:number,pointsAtY:number,pointsAtZ:number,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:commaOrSpaceSeparated,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:commaOrSpaceSeparated,rev:commaOrSpaceSeparated,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:commaOrSpaceSeparated,requiredFeatures:commaOrSpaceSeparated,requiredFonts:commaOrSpaceSeparated,requiredFormats:commaOrSpaceSeparated,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:number,specularExponent:number,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:number,strikethroughThickness:number,string:null,stroke:null,strokeDashArray:commaOrSpaceSeparated,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:number,strokeOpacity:number,strokeWidth:null,style:null,surfaceScale:number,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:commaOrSpaceSeparated,tabIndex:number,tableValues:null,target:null,targetX:number,targetY:number,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:commaOrSpaceSeparated,to:null,transform:null,u1:null,u2:null,underlinePosition:number,underlineThickness:number,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:number,values:null,vAlphabetic:number,vMathematical:number,vectorEffect:null,vHanging:number,vIdeographic:number,version:null,vertAdvY:number,vertOriginX:number,vertOriginY:number,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:number,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}
vendor: 4,157 bytes, lines 278-280
278),valid=/^data[-\w.:]+$/i,dash=/-[a-z]/g,cap$1=/[A-Z]/g;function find(e,t){let n=normalize$1(t),r=t,i=Info;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&valid.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(dash,camelcase);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!dash.test(e)){let n=e.replace(cap$1,kebab);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=DefinedInfo}return new i(r,t)}function kebab(e){return`-`+e.toLowerCase()}function camelcase(e){return e.charAt(1).toUpperCase()}var hastToReact={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},html$1=merge([xml,xlink,xmlns,aria,html$2],`html`),svg=merge([xml,xlink,xmlns,aria,svg$1],`svg`);function stringify(e){return e.join(` `).trim()}var require_inline_style_parser=__commonJSMin(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,c=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,K=/^\s+|\s+$/g,Y=`
279`,X=`/`,ee=`*`,te=``,ce=`comment`,ue=`declaration`;t.exports=function(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var K=1,Y=1;function X(e){var t=e.match(r);t&&(K+=t.length);var n=e.lastIndexOf(`
280`);Y=~n?e.length-n:Y+e.length}function ee(){var e={line:K,column:Y};return function(t){return t.position=new te(e),me(),t}}function te(e){this.start=e,this.end={line:K,column:Y},this.source=t.source}te.prototype.content=e;var ce=[];function ue(n){var r=Error(t.source+`:`+K+`:`+Y+`: `+n);if(r.reason=n,r.filename=t.source,r.line=K,r.column=Y,r.source=e,t.silent)ce.push(r);else throw r}function fe(t){var n=t.exec(e);if(n){var r=n[0];return X(r),e=e.slice(r.length),n}}function me(){fe(i)}function ge(e){var t;for(e||=[];t=Te();)t!==!1&&e.push(t);return e}function Te(){var t=ee();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return ue(`End of comment missing`);var r=e.slice(2,n-2);return Y+=2,X(r),e=e.slice(n),Y+=2,t({type:`comment`,comment:r})}}function Oe(){var e=ee(),t=fe(a);if(t){if(Te(),!fe(o))return ue(`property missing ':'`);var r=fe(c),i=e({type:`declaration`,property:de(t[0].replace(n,``)),value:r?de(r[0].replace(n,``)):``});return fe(u),i}}function Ae(){var e=[];ge(e);for(var t;t=Oe();)t!==!1&&(e.push(t),ge(e));return e}return me(),Ae()};function de(e){return e?e.replace(K,``):``}})),require_cjs=__commonJSMin((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0});var n=t(require_inline_style_parser());function r(e,t){var r=null;if(!e||typeof e!=`string`)return r;var i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(function(e){if(e.type===`declaration`){var n=e.property,i=e.value;a?t(n,i,e):i&&(r||={},r[n]=i)}}),r}e.default=r})),import_cjs=__toESM(require_cjs(),1),esm_default$1=import_cjs.default.default||import_cjs.default,pointEnd=point$2(`end`),pointStart=point$2(`start`);function point$2(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function position$1(e){let t=pointStart(e),n=pointEnd(e);if(t&&n)return{start:t,end:n}}function stringifyPosition(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?position(e.position):`start`in e||`end`in e?position(e):`line`in e||`column`in e?point$1(e):``}function point$1(e){return index(e&&e.line)+`:`+index(e&&e.column)}function position(e){return point$1(e&&e.start)+`-`+point$1(e&&e.end)}function index(e){return e&&typeof e==`number`?e:1}
vendor: 6,194 bytes, line 280
280var VFileMessage=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=o?o.line:void 0,this.name=stringifyPosition(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual,this.expected,this.note,this.url}};VFileMessage.prototype.file=``,VFileMessage.prototype.name=``,VFileMessage.prototype.reason=``,VFileMessage.prototype.message=``,VFileMessage.prototype.stack=``,VFileMessage.prototype.column=void 0,VFileMessage.prototype.line=void 0,VFileMessage.prototype.ancestors=void 0,VFileMessage.prototype.cause=void 0,VFileMessage.prototype.fatal=void 0,VFileMessage.prototype.place=void 0,VFileMessage.prototype.ruleId=void 0,VFileMessage.prototype.source=void 0;var own$3={}.hasOwnProperty,emptyMap=new Map,cap=/[A-Z]/g,dashSomething=/-([a-z])/g,tableElements=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),tableCellElement=new Set([`td`,`th`]),docs=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function toJsxRuntime(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=developmentCreate(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=productionCreate(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?svg:html$1,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=one$1(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function one$1(e,t,n){if(t.type===`element`)return element$1(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return mdxExpression(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return mdxJsxElement(e,t,n);if(t.type===`mdxjsEsm`)return mdxEsm(e,t);if(t.type===`root`)return root$1(e,t,n);if(t.type===`text`)return text$3(e,t)}function element$1(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=svg,e.schema=i),e.ancestors.push(t);let a=findComponentFromName(e,t.tagName,!1),o=createElementProps(e,t),c=createChildren(e,t);return tableElements.has(t.tagName)&&(c=c.filter(function(e){return typeof e!=`string`||!whitespace(e)})),addNode(e,o,a,t),addChildren(o,c),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function mdxExpression(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}crashEstree(e,t.position)}function mdxEsm(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);crashEstree(e,t.position)}function mdxJsxElement(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=svg,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:findComponentFromName(e,t.name,!0),o=createJsxElementProps(e,t),c=createChildren(e,t);return addNode(e,o,a,t),addChildren(o,c),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function root$1(e,t,n){let r={};return addChildren(r,createChildren(e,t)),e.create(t,e.Fragment,r,n)}function text$3(e,t){return t.value}function addNode(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function addChildren(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function productionCreate(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function developmentCreate(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),c=pointStart(n);return t(r,i,a,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function createElementProps(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&own$3.call(t.properties,i)){let a=createProperty(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&tableCellElement.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function createJsxElementProps(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else crashEstree(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else crashEstree(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function createChildren(e,t){let n=[],r=-1,i=e.passKeys?new Map:emptyMap;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let c=one$1(e,a,o);c!==void 0&&n.push(c)}return n}function createProperty(e,t,n){let r=find(e.schema,t);
vendor: 6,437 bytes, line 280
280if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?stringify$1(n):stringify(n)),r.property===`style`){let t=typeof n==`object`?n:parseStyle(e,String(n));return e.stylePropertyNameCase===`css`&&(t=transformStylesToCssCasing(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?hastToReact[r.property]||r.property:r.attribute,n]}}function parseStyle(e,t){let n={};try{esm_default$1(t,r)}catch(t){if(!e.ignoreInvalidStyle){let n=t,r=new VFileMessage("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=docs+`#cannot-parse-style-attribute`,r}}return n;function r(e,t){let r=e;r.slice(0,2)!==`--`&&(r.slice(0,4)===`-ms-`&&(r=`ms-`+r.slice(4)),r=r.replace(dashSomething,toCamel)),n[r]=t}}function findComponentFromName(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=name(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=name(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return own$3.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);crashEstree(e)}function crashEstree(e,t){let n=new VFileMessage("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=docs+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function transformStylesToCssCasing(e){let t={},n;for(n in e)own$3.call(e,n)&&(t[transformStyleToCssCasing(n)]=e[n]);return t}function transformStyleToCssCasing(e){let t=e.replace(cap,toDash);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function toCamel(e,t){return t.toUpperCase()}function toDash(e){return`-`+e.toLowerCase()}var urlAttributes={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},emptyOptions$1={};function toString$1(e,t){let n=t||emptyOptions$1;return one(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function one(e,t,n){if(node(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return all(e.children,t,n)}return Array.isArray(e)?all(e,t,n):``}function all(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=one(e[i],t,n);return r.join(``)}function node(e){return!!(e&&typeof e==`object`)}var element=document.createElement(`i`);function decodeNamedCharacterReference(e){let t=`&`+e+`;`;element.innerHTML=t;let n=element.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function splice(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function push(e,t){return e.length>0?(splice(e,e.length,0,t),e):t}var hasOwnProperty={}.hasOwnProperty;function combineExtensions(e){let t={},n=-1;for(;++n<e.length;)syntaxExtension(t,e[n]);return t}function syntaxExtension(e,t){let n;for(n in t){let r=(hasOwnProperty.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){hasOwnProperty.call(r,a)||(r[a]=[]);let e=i[a];constructs(r[a],Array.isArray(e)?e:e?[e]:[])}}}function constructs(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);splice(e,0,0,r)}function decodeNumericCharacterReference(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function normalizeIdentifier(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var unicodePunctuationInternal=regexCheck(/\p{P}/u),asciiAlpha=regexCheck(/[A-Za-z]/),asciiAlphanumeric=regexCheck(/[\dA-Za-z]/),asciiAtext=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(e){return e!==null&&(e<32||e===127)}var asciiDigit=regexCheck(/\d/),asciiHexDigit=regexCheck(/[\dA-Fa-f]/),asciiPunctuation=regexCheck(/[!-/:-@[-`{-~]/);function markdownLineEnding(e){return e!==null&&e<-2}function markdownLineEndingOrSpace(e){return e!==null&&(e<0||e===32)}function markdownSpace(e){return e===-2||e===-1||e===32}function unicodePunctuation(e){return asciiPunctuation(e)||unicodePunctuationInternal(e)}var unicodeWhitespace=regexCheck(/\s/);function regexCheck(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function normalizeUri(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&asciiAlphanumeric(e.charCodeAt(n+1))&&asciiAlphanumeric(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function factorySpace(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return markdownSpace(r)?(e.enter(n),c(r)):t(r)}function c(r){return markdownSpace(r)&&a++<i?(e.consume(r),c):(e.exit(n),t(r))}}var content$1={tokenize:initializeContent};function initializeContent(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),factorySpace(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return markdownLineEnding(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var document$2={tokenize:initializeDocument},containerConstruct={tokenize:tokenizeContainer};function initializeDocument(e){let t=this,n=[],r=0,i,a,o;return c;
vendor: 12,492 bytes, line 280
280function c(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,u,K)(i)}return K(i)}function u(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&me();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}fe(r);let c=n;for(;c<t.events.length;)t.events[c][1].end=Object.assign({},o),c++;return splice(t.events,a+1,0,t.events.slice(n)),t.events.length=c,K(e)}return c(e)}function K(a){if(r===n.length){if(!i)return ee(a);if(i.currentConstruct&&i.currentConstruct.concrete)return ce(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(containerConstruct,Y,X)(a)}function Y(e){return i&&me(),fe(r),ee(e)}function X(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,ce(e)}function ee(n){return t.containerState={},e.attempt(containerConstruct,te,ce)(n)}function te(e){return r++,n.push([t.currentConstruct,t.containerState]),ee(e)}function ce(n){if(n===null){i&&me(),fe(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{contentType:`flow`,previous:a,_tokenizer:i}),ue(n)}function ue(n){if(n===null){de(e.exit(`chunkFlow`),!0),fe(0),e.consume(n);return}return markdownLineEnding(n)?(e.consume(n),de(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,c):(e.consume(n),ue)}function de(e,n){let c=t.sliceStream(e);if(n&&c.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(c),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,c,u;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(c){u=t.events[a][1].end;break}c=!0}for(fe(r),e=n;e<t.events.length;)t.events[e][1].end=Object.assign({},u),e++;splice(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function fe(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function me(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function tokenizeContainer(e,t,n){return factorySpace(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function classifyCharacter(e){if(e===null||markdownLineEndingOrSpace(e)||unicodeWhitespace(e))return 1;if(unicodePunctuation(e))return 2}function resolveAll(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var attention={name:`attention`,tokenize:tokenizeAttention,resolveAll:resolveAllAttention};function resolveAllAttention(e,t){let n=-1,r,i,a,o,c,u,K,Y;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let X=Object.assign({},e[r][1].end),ee=Object.assign({},e[n][1].start);movePoint(X,-u),movePoint(ee,u),o={type:u>1?`strongSequence`:`emphasisSequence`,start:X,end:Object.assign({},e[r][1].end)},c={type:u>1?`strongSequence`:`emphasisSequence`,start:Object.assign({},e[n][1].start),end:ee},a={type:u>1?`strongText`:`emphasisText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?`strong`:`emphasis`,start:Object.assign({},o.start),end:Object.assign({},c.end)},e[r][1].end=Object.assign({},o.start),e[n][1].start=Object.assign({},c.end),K=[],e[r][1].end.offset-e[r][1].start.offset&&(K=push(K,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),K=push(K,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),K=push(K,resolveAll(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),K=push(K,[[`exit`,a,t],[`enter`,c,t],[`exit`,c,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(Y=2,K=push(K,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):Y=0,splice(e,r-1,n-r+3,K),n=r+K.length-Y-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function tokenizeAttention(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=classifyCharacter(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),c(t)}function c(o){if(o===a)return e.consume(o),c;let u=e.exit(`attentionSequence`),K=classifyCharacter(o),Y=!K||K===2&&i||n.includes(o),X=!i||i===2&&K||n.includes(r);return u._open=!!(a===42?Y:Y&&(i||!X)),u._close=!!(a===42?X:X&&(K||!Y)),t(o)}}function movePoint(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var autolink={name:`autolink`,tokenize:tokenizeAutolink};function tokenizeAutolink(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return asciiAlpha(t)?(e.consume(t),o):K(t)}function o(e){return e===43||e===45||e===46||asciiAlphanumeric(e)?(r=1,c(e)):K(e)}function c(t){return t===58?(e.consume(t),r=0,u):(t===43||t===45||t===46||asciiAlphanumeric(t))&&r++<32?(e.consume(t),c):(r=0,K(t))}function u(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||asciiControl(r)?n(r):(e.consume(r),u)}function K(t){return t===64?(e.consume(t),Y):asciiAtext(t)?(e.consume(t),K):n(t)}function Y(e){return asciiAlphanumeric(e)?X(e):n(e)}function X(n){return n===46?(e.consume(n),r=0,Y):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):ee(n)}function ee(t){if((t===45||asciiAlphanumeric(t))&&r++<63){let n=t===45?ee:X;return e.consume(t),n}return n(t)}}var blankLine={tokenize:tokenizeBlankLine,partial:!0};function tokenizeBlankLine(e,t,n){return r;function r(t){return markdownSpace(t)?factorySpace(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||markdownLineEnding(e)?t(e):n(e)}}var blockQuote={name:`blockQuote`,tokenize:tokenizeBlockQuoteStart,continuation:{tokenize:tokenizeBlockQuoteContinuation},exit};function tokenizeBlockQuoteStart(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return markdownSpace(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function tokenizeBlockQuoteContinuation(e,t,n){let r=this;return i;function i(t){return markdownSpace(t)?factorySpace(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(blockQuote,t,n)(r)}}function exit(e){e.exit(`blockQuote`)}var characterEscape={name:`characterEscape`,tokenize:tokenizeCharacterEscape};function tokenizeCharacterEscape(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return asciiPunctuation(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var characterReference={name:`characterReference`,tokenize:tokenizeCharacterReference};function tokenizeCharacterReference(e,t,n){let r=this,i=0,a,o;return c;function c(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),u}function u(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),K):(e.enter(`characterReferenceValue`),a=31,o=asciiAlphanumeric,Y(t))}function K(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=asciiHexDigit,Y):(e.enter(`characterReferenceValue`),a=7,o=asciiDigit,Y(t))}function Y(c){if(c===59&&i){let i=e.exit(`characterReferenceValue`);return o===asciiAlphanumeric&&!decodeNamedCharacterReference(r.sliceSerialize(i))?n(c):(e.enter(`characterReferenceMarker`),e.consume(c),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(c)&&i++<a?(e.consume(c),Y):n(c)}}var nonLazyContinuation={tokenize:tokenizeNonLazyContinuation,partial:!0},codeFenced={name:`codeFenced`,tokenize:tokenizeCodeFenced,concrete:!0};function tokenizeCodeFenced(e,t,n){let r=this,i={tokenize:Oe,partial:!0},a=0,o=0,c;return u;function u(e){return K(e)}function K(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,c=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),Y(t)}function Y(t){return t===c?(o++,e.consume(t),Y):o<3?n(t):(e.exit(`codeFencedFenceSequence`),markdownSpace(t)?factorySpace(e,X,`whitespace`)(t):X(t))}function X(n){return n===null||markdownLineEnding(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(nonLazyContinuation,ue,Te)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),ee(n))}function ee(t){return t===null||markdownLineEnding(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),X(t)):markdownSpace(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),factorySpace(e,te,`whitespace`)(t)):t===96&&t===c?n(t):(e.consume(t),ee)}function te(t){return t===null||markdownLineEnding(t)?X(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),ce(t))}function ce(t){return t===null||markdownLineEnding(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),X(t)):t===96&&t===c?n(t):(e.consume(t),ce)}function ue(t){return e.attempt(i,Te,de)(t)}function de(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),fe}function fe(t){return a>0&&markdownSpace(t)?factorySpace(e,me,`linePrefix`,a+1)(t):me(t)}function me(t){return t===null||markdownLineEnding(t)?e.check(nonLazyContinuation,ue,Te)(t):(e.enter(`codeFlowValue`),ge(t))}function ge(t){return t===null||markdownLineEnding(t)?(e.exit(`codeFlowValue`),me(t)):(e.consume(t),ge)}function Te(n){return e.exit(`codeFenced`),t(n)}function Oe(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),u}function u(t){return e.enter(`codeFencedFence`),markdownSpace(t)?factorySpace(e,K,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):K(t)}function K(t){return t===c?(e.enter(`codeFencedFenceSequence`),Y(t)):n(t)}function Y(t){return t===c?(i++,e.consume(t),Y):i>=o?(e.exit(`codeFencedFenceSequence`),markdownSpace(t)?factorySpace(e,X,`whitespace`)(t):X(t)):n(t)}function X(r){return r===null||markdownLineEnding(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function tokenizeNonLazyContinuation(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var codeIndented={name:`codeIndented`,tokenize:tokenizeCodeIndented},furtherStart={tokenize:tokenizeFurtherStart,partial:!0};function tokenizeCodeIndented(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),factorySpace(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?u(t):markdownLineEnding(t)?e.attempt(furtherStart,o,u)(t):(e.enter(`codeFlowValue`),c(t))}function c(t){return t===null||markdownLineEnding(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),c)}function u(n){return e.exit(`codeIndented`),t(n)}}function tokenizeFurtherStart(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):markdownLineEnding(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):factorySpace(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):markdownLineEnding(e)?i(e):n(e)}}var codeText={name:`codeText`,tokenize:tokenizeCodeText,resolve:resolveCodeText,previous};
vendor: 5,787 bytes, line 280
280function resolveCodeText(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function previous(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function tokenizeCodeText(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),c(t)}function c(t){return t===96?(e.consume(t),r++,c):(e.exit(`codeTextSequence`),u(t))}function u(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),u):t===96?(a=e.enter(`codeTextSequence`),i=0,Y(t)):markdownLineEnding(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),u):(e.enter(`codeTextData`),K(t))}function K(t){return t===null||t===32||t===96||markdownLineEnding(t)?(e.exit(`codeTextData`),u(t)):(e.consume(t),K)}function Y(n){return n===96?(e.consume(n),i++,Y):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,K(n))}}function subtokenize(e){let t={},n=-1,r,i,a,o,c,u,K;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type===`chunkFlow`&&e[n-1][1].type===`listItemPrefix`&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type===`lineEndingBlank`&&(a+=2),a<u.length&&u[a][1].type===`content`))for(;++a<u.length&&u[a][1].type!==`content`;)u[a][1].type===`chunkText`&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,subcontent(e,n)),n=t[n],K=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(o=e[a],o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`);)o[0]===`enter`&&(i&&(e[i][1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);i&&(r[1].end=Object.assign({},e[i][1].start),c=e.slice(i,n),c.unshift(r),splice(e,i,n-i+1,c))}}return!K}function subcontent(e,t){let n=e[t][1],r=e[t][2],i=t-1,a=[],o=n._tokenizer||r.parser[n.contentType](n.start),c=o.events,u=[],K={},Y,X,ee=-1,te=n,ce=0,ue=0,de=[ue];for(;te;){for(;e[++i][1]!==te;);a.push(i),te._tokenizer||(Y=r.sliceStream(te),te.next||Y.push(null),X&&o.defineSkip(te.start),te._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(Y),te._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),X=te,te=te.next}for(te=n;++ee<c.length;)c[ee][0]===`exit`&&c[ee-1][0]===`enter`&&c[ee][1].type===c[ee-1][1].type&&c[ee][1].start.line!==c[ee][1].end.line&&(ue=ee+1,de.push(ue),te._tokenizer=void 0,te.previous=void 0,te=te.next);for(o.events=[],te?(te._tokenizer=void 0,te.previous=void 0):de.pop(),ee=de.length;ee--;){let t=c.slice(de[ee],de[ee+1]),n=a.pop();u.unshift([n,n+t.length-1]),splice(e,n,2,t)}for(ee=-1;++ee<u.length;)K[ce+u[ee][0]]=ce+u[ee][1],ce+=u[ee][1]-u[ee][0]-1;return K}var content={tokenize:tokenizeContent,resolve:resolveContent},continuationConstruct={tokenize:tokenizeContinuation,partial:!0};function resolveContent(e){return subtokenize(e),e}function tokenizeContent(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):markdownLineEnding(t)?e.check(continuationConstruct,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function tokenizeContinuation(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),factorySpace(e,a,`linePrefix`)}function a(i){if(i===null||markdownLineEnding(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function factoryDestination(e,t,n,r,i,a,o,c,u){let K=u||1/0,Y=0;return X;function X(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),ee):t===null||t===32||t===41||asciiControl(t)?n(t):(e.enter(r),e.enter(o),e.enter(c),e.enter(`chunkString`,{contentType:`string`}),ue(t))}function ee(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(c),e.enter(`chunkString`,{contentType:`string`}),te(n))}function te(t){return t===62?(e.exit(`chunkString`),e.exit(c),ee(t)):t===null||t===60||markdownLineEnding(t)?n(t):(e.consume(t),t===92?ce:te)}function ce(t){return t===60||t===62||t===92?(e.consume(t),te):te(t)}function ue(i){return!Y&&(i===null||i===41||markdownLineEndingOrSpace(i))?(e.exit(`chunkString`),e.exit(c),e.exit(o),e.exit(r),t(i)):Y<K&&i===40?(e.consume(i),Y++,ue):i===41?(e.consume(i),Y--,ue):i===null||i===32||i===40||asciiControl(i)?n(i):(e.consume(i),i===92?de:ue)}function de(t){return t===40||t===41||t===92?(e.consume(t),ue):ue(t)}}function factoryLabel(e,t,n,r,i,a){let o=this,c=0,u;return K;function K(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),Y}function Y(K){return c>999||K===null||K===91||K===93&&!u||K===94&&!c&&`_hiddenFootnoteSupport`in o.parser.constructs?n(K):K===93?(e.exit(a),e.enter(i),e.consume(K),e.exit(i),e.exit(r),t):markdownLineEnding(K)?(e.enter(`lineEnding`),e.consume(K),e.exit(`lineEnding`),Y):(e.enter(`chunkString`,{contentType:`string`}),X(K))}function X(t){return t===null||t===91||t===93||markdownLineEnding(t)||c++>999?(e.exit(`chunkString`),Y(t)):(e.consume(t),u||=!markdownSpace(t),t===92?ee:X)}
vendor: 4,125 bytes, line 280
280function ee(t){return t===91||t===92||t===93?(e.consume(t),c++,X):X(t)}}function factoryTitle(e,t,n,r,i,a){let o;return c;function c(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,u):n(t)}function u(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),K(n))}function K(t){return t===o?(e.exit(a),u(o)):t===null?n(t):markdownLineEnding(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),factorySpace(e,K,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),Y(t))}function Y(t){return t===o||t===null||markdownLineEnding(t)?(e.exit(`chunkString`),K(t)):(e.consume(t),t===92?X:Y)}function X(t){return t===o||t===92?(e.consume(t),Y):Y(t)}}function factoryWhitespace(e,t){let n;return r;function r(i){return markdownLineEnding(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):markdownSpace(i)?factorySpace(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var definition={name:`definition`,tokenize:tokenizeDefinition},titleBefore={tokenize:tokenizeTitleBefore,partial:!0};function tokenizeDefinition(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return factoryLabel.call(r,e,c,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function c(t){return i=normalizeIdentifier(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),u):n(t)}function u(t){return markdownLineEndingOrSpace(t)?factoryWhitespace(e,K)(t):K(t)}function K(t){return factoryDestination(e,Y,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function Y(t){return e.attempt(titleBefore,X,X)(t)}function X(t){return markdownSpace(t)?factorySpace(e,ee,`whitespace`)(t):ee(t)}function ee(a){return a===null||markdownLineEnding(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function tokenizeTitleBefore(e,t,n){return r;function r(t){return markdownLineEndingOrSpace(t)?factoryWhitespace(e,i)(t):n(t)}function i(t){return factoryTitle(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return markdownSpace(t)?factorySpace(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||markdownLineEnding(e)?t(e):n(e)}}var hardBreakEscape={name:`hardBreakEscape`,tokenize:tokenizeHardBreakEscape};function tokenizeHardBreakEscape(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return markdownLineEnding(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var headingAtx={name:`headingAtx`,tokenize:tokenizeHeadingAtx,resolve:resolveHeadingAtx};function resolveHeadingAtx(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},splice(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function tokenizeHeadingAtx(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||markdownLineEndingOrSpace(t)?(e.exit(`atxHeadingSequence`),c(t)):n(t)}function c(n){return n===35?(e.enter(`atxHeadingSequence`),u(n)):n===null||markdownLineEnding(n)?(e.exit(`atxHeading`),t(n)):markdownSpace(n)?factorySpace(e,c,`whitespace`)(n):(e.enter(`atxHeadingText`),K(n))}function u(t){return t===35?(e.consume(t),u):(e.exit(`atxHeadingSequence`),c(t))}function K(t){return t===null||t===35||markdownLineEndingOrSpace(t)?(e.exit(`atxHeadingText`),c(t)):(e.consume(t),K)}}var htmlBlockNames=`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.
280iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),htmlRawNames=[`pre`,`script`,`style`,`textarea`],htmlFlow={name:`htmlFlow`,tokenize:tokenizeHtmlFlow,resolveTo:resolveToHtmlFlow,concrete:!0},blankLineBefore={tokenize:tokenizeBlankLineBefore,partial:!0},nonLazyContinuationStart={tokenize:tokenizeNonLazyContinuationStart,partial:!0};function resolveToHtmlFlow(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function tokenizeHtmlFlow(e,t,n){let r=this,i,a,o,c,u;return K;function K(e){return Y(e)}function Y(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),X}function X(c){return c===33?(e.consume(c),ee):c===47?(e.consume(c),a=!0,ue):c===63?(e.consume(c),i=3,r.interrupt?t:lt):asciiAlpha(c)?(e.consume(c),o=String.fromCharCode(c),de):n(c)}function ee(a){return a===45?(e.consume(a),i=2,te):a===91?(e.consume(a),i=5,c=0,ce):asciiAlpha(a)?(e.consume(a),i=4,r.interrupt?t:lt):n(a)}function te(i){return i===45?(e.consume(i),r.interrupt?t:lt):n(i)}function ce(i){return i===`CDATA[`.charCodeAt(c++)?(e.consume(i),c===6?r.interrupt?t:et:ce):n(i)}function ue(t){return asciiAlpha(t)?(e.consume(t),o=String.fromCharCode(t),de):n(t)}function de(c){if(c===null||c===47||c===62||markdownLineEndingOrSpace(c)){let u=c===47,K=o.toLowerCase();return!u&&!a&&htmlRawNames.includes(K)?(i=1,r.interrupt?t(c):et(c)):htmlBlockNames.includes(o.toLowerCase())?(i=6,u?(e.consume(c),fe):r.interrupt?t(c):et(c)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(c):a?me(c):ge(c))}return c===45||asciiAlphanumeric(c)?(e.consume(c),o+=String.fromCharCode(c),de):n(c)}function fe(i){return i===62?(e.consume(i),r.interrupt?t:et):n(i)}function me(t){return markdownSpace(t)?(e.consume(t),me):Ze(t)}function ge(t){return t===47?(e.consume(t),Ze):t===58||t===95||asciiAlpha(t)?(e.consume(t),Te):markdownSpace(t)?(e.consume(t),ge):Ze(t)}function Te(t){return t===45||t===46||t===58||t===95||asciiAlphanumeric(t)?(e.consume(t),Te):Oe(t)}function Oe(t){return t===61?(e.consume(t),Ae):markdownSpace(t)?(e.consume(t),Oe):ge(t)}function Ae(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),u=t,ze):markdownSpace(t)?(e.consume(t),Ae):qe(t)}function ze(t){return t===u?(e.consume(t),u=null,Ye):t===null||markdownLineEnding(t)?n(t):(e.consume(t),ze)}function qe(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||markdownLineEndingOrSpace(t)?Oe(t):(e.consume(t),qe)}function Ye(e){return e===47||e===62||markdownSpace(e)?ge(e):n(e)}function Ze(t){return t===62?(e.consume(t),Qe):n(t)}function Qe(t){return t===null||markdownLineEnding(t)?et(t):markdownSpace(t)?(e.consume(t),Qe):n(t)}function et(t){return t===45&&i===2?(e.consume(t),at):t===60&&i===1?(e.consume(t),ot):t===62&&i===4?(e.consume(t),ut):t===63&&i===3?(e.consume(t),lt):t===93&&i===5?(e.consume(t),ct):markdownLineEnding(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(blankLineBefore,dt,nt)(t)):t===null||markdownLineEnding(t)?(e.exit(`htmlFlowData`),nt(t)):(e.consume(t),et)}function nt(t){return e.check(nonLazyContinuationStart,rt,dt)(t)}function rt(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),it}function it(t){return t===null||markdownLineEnding(t)?nt(t):(e.enter(`htmlFlowData`),et(t))}function at(t){return t===45?(e.consume(t),lt):et(t)}function ot(t){return t===47?(e.consume(t),o=``,st):et(t)}function st(t){if(t===62){let n=o.toLowerCase();return htmlRawNames.includes(n)?(e.consume(t),ut):et(t)}return asciiAlpha(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),st):et(t)}function ct(t){return t===93?(e.consume(t),lt):et(t)}function lt(t){return t===62?(e.consume(t),ut):t===45&&i===2?(e.consume(t),lt):et(t)}function ut(t){return t===null||markdownLineEnding(t)?(e.exit(`htmlFlowData`),dt(t)):(e.consume(t),ut)}function dt(n){return e.exit(`htmlFlow`),t(n)}}function tokenizeNonLazyContinuationStart(e,t,n){let r=this;return i;function i(t){return markdownLineEnding(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function tokenizeBlankLineBefore(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(blankLine,t,n)}}var htmlText={name:`htmlText`,tokenize:tokenizeHtmlText};function tokenizeHtmlText(e,t,n){let r=this,i,a,o;return c;function c(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),u}function u(t){return t===33?(e.consume(t),K):t===47?(e.consume(t),Oe):t===63?(e.consume(t),ge):asciiAlpha(t)?(e.consume(t),qe):n(t)}function K(t){return t===45?(e.consume(t),Y):t===91?(e.consume(t),a=0,ce):asciiAlpha(t)?(e.consume(t),me):n(t)}function Y(t){return t===45?(e.consume(t),te):n(t)}function X(t){return t===null?n(t):t===45?(e.consume(t),ee):markdownLineEnding(t)?(o=X,ot(t)):(e.consume(t),X)}function ee(t){return t===45?(e.consume(t),te):X(t)}function te(e){return e===62?at(e):e===45?ee(e):X(e)}function ce(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?ue:ce):n(t)}function ue(t){return t===null?n(t):t===93?(e.consume(t),de):markdownLineEnding(t)?(o=ue,ot(t)):(e.consume(t),ue)}function de(t){return t===93?(e.consume(t),fe):ue(t)}function fe(t){return t===62?at(t):t===93?(e.consume(t),fe):ue(t)}function me(t){return t===null||t===62?at(t):markdownLineEnding(t)?(o=me,ot(t)):(e.consume(t),me)}function ge(t){return t===null?n(t):t===63?(e.consume(t),Te):markdownLineEnding(t)?(o=ge,ot(t)):(e.consume(t),ge)}function Te(e){return e===62?at(e):ge(e)}function Oe(t){return asciiAlpha(t)?(e.consume(t),Ae):n(t)}function Ae(t){return t===45||asciiAlphanumeric(t)?(e.consume(t),Ae):ze(t)}function ze(t){return markdownLineEnding(t)?(o=ze,ot(t)):markdownSpace(t)?(e.consume(t),ze):at(t)}function qe(t){return t===45||asciiAlphanumeric(t)?(e.consume(t),qe):t===47||t===62||markdownLineEndingOrSpace(t)?Ye(t):n(t)}function Ye(t){return t===47?(e.consume(t),at):t===58||t===95||asciiAlpha(t)?(e.consume(t),Ze):markdownLineEnding(t)?(o=Ye,ot(t)):markdownSpace(t)?(e.consume(t),Ye):at(t)}function Ze(t){return t===45||t===46||t===58||t===95||asciiAlphanumeric(t)?(e.consume(t),Ze):Qe(t)}function Qe(t){return t===61?(e.consume(t),et):markdownLineEnding(t)?(o=
vendor: 18,280 bytes, lines 280-282
280Qe,ot(t)):markdownSpace(t)?(e.consume(t),Qe):Ye(t)}function et(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,nt):markdownLineEnding(t)?(o=et,ot(t)):markdownSpace(t)?(e.consume(t),et):(e.consume(t),rt)}function nt(t){return t===i?(e.consume(t),i=void 0,it):t===null?n(t):markdownLineEnding(t)?(o=nt,ot(t)):(e.consume(t),nt)}function rt(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||markdownLineEndingOrSpace(t)?Ye(t):(e.consume(t),rt)}function it(e){return e===47||e===62||markdownLineEndingOrSpace(e)?Ye(e):n(e)}function at(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ot(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),st}function st(t){return markdownSpace(t)?factorySpace(e,ct,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ct(t)}function ct(t){return e.enter(`htmlTextData`),o(t)}}var labelEnd={name:`labelEnd`,tokenize:tokenizeLabelEnd,resolveTo:resolveToLabelEnd,resolveAll:resolveAllLabelEnd},resourceConstruct={tokenize:tokenizeResource},referenceFullConstruct={tokenize:tokenizeReferenceFull},referenceCollapsedConstruct={tokenize:tokenizeReferenceCollapsed};function resolveAllLabelEnd(e){let t=-1;for(;++t<e.length;){let n=e[t][1];(n.type===`labelImage`||n.type===`labelLink`||n.type===`labelEnd`)&&(e.splice(t+1,n.type===`labelImage`?4:2),n.type=`data`,t++)}return e}function resolveToLabelEnd(e,t){let n=e.length,r=0,i,a,o,c;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let u={type:e[a][1].type===`labelLink`?`link`:`image`,start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},K={type:`label`,start:Object.assign({},e[a][1].start),end:Object.assign({},e[o][1].end)},Y={type:`labelText`,start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[o-2][1].start)};return c=[[`enter`,u,t],[`enter`,K,t]],c=push(c,e.slice(a+1,a+r+3)),c=push(c,[[`enter`,Y,t]]),c=push(c,resolveAll(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),c=push(c,[[`exit`,Y,t],e[o-2],e[o-1],[`exit`,K,t]]),c=push(c,e.slice(o+1)),c=push(c,[[`exit`,u,t]]),splice(e,a,e.length,c),e}function tokenizeLabelEnd(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return c;function c(t){return a?a._inactive?X(t):(o=r.parser.defined.includes(normalizeIdentifier(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),u):n(t)}function u(t){return t===40?e.attempt(resourceConstruct,Y,o?Y:X)(t):t===91?e.attempt(referenceFullConstruct,Y,o?K:X)(t):o?Y(t):X(t)}function K(t){return e.attempt(referenceCollapsedConstruct,Y,X)(t)}function Y(e){return t(e)}function X(e){return a._balanced=!0,n(e)}}function tokenizeResource(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return markdownLineEndingOrSpace(t)?factoryWhitespace(e,a)(t):a(t)}function a(t){return t===41?Y(t):factoryDestination(e,o,c,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return markdownLineEndingOrSpace(t)?factoryWhitespace(e,u)(t):Y(t)}function c(e){return n(e)}function u(t){return t===34||t===39||t===40?factoryTitle(e,K,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):Y(t)}function K(t){return markdownLineEndingOrSpace(t)?factoryWhitespace(e,Y)(t):Y(t)}function Y(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function tokenizeReferenceFull(e,t,n){let r=this;return i;function i(t){return factoryLabel.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(normalizeIdentifier(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function tokenizeReferenceCollapsed(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var labelStartImage={name:`labelStartImage`,tokenize:tokenizeLabelStartImage,resolveAll:labelEnd.resolveAll};function tokenizeLabelStartImage(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var labelStartLink={name:`labelStartLink`,tokenize:tokenizeLabelStartLink,resolveAll:labelEnd.resolveAll};function tokenizeLabelStartLink(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var lineEnding={name:`lineEnding`,tokenize:tokenizeLineEnding};function tokenizeLineEnding(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),factorySpace(e,t,`linePrefix`)}}var thematicBreak$1={name:`thematicBreak`,tokenize:tokenizeThematicBreak};function tokenizeThematicBreak(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,c(e)}function c(a){return a===i?(e.enter(`thematicBreakSequence`),u(a)):r>=3&&(a===null||markdownLineEnding(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function u(t){return t===i?(e.consume(t),r++,u):(e.exit(`thematicBreakSequence`),markdownSpace(t)?factorySpace(e,c,`whitespace`)(t):c(t))}}var list$1={name:`list`,tokenize:tokenizeListStart,continuation:{tokenize:tokenizeListContinuation},exit:tokenizeListEnd},listItemPrefixWhitespaceConstruct={tokenize:tokenizeListItemPrefixWhitespace,partial:!0},indentConstruct={tokenize:tokenizeIndent,partial:!0};function tokenizeListStart(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return c;function c(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:asciiDigit(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(thematicBreak$1,n,K)(t):K(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),u(t)}return n(t)}function u(t){return asciiDigit(t)&&++o<10?(e.consume(t),u):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),K(t)):n(t)}function K(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(blankLine,r.interrupt?n:Y,e.attempt(listItemPrefixWhitespaceConstruct,ee,X))}function Y(e){return r.containerState.initialBlankLine=!0,a++,ee(e)}function X(t){return markdownSpace(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),ee):n(t)}function ee(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function tokenizeListContinuation(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(blankLine,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,factorySpace(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!markdownSpace(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(indentConstruct,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,factorySpace(e,e.attempt(list$1,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function tokenizeIndent(e,t,n){let r=this;return factorySpace(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function tokenizeListEnd(e){e.exit(this.containerState.type)}function tokenizeListItemPrefixWhitespace(e,t,n){let r=this;return factorySpace(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!markdownSpace(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var setextUnderline={name:`setextUnderline`,tokenize:tokenizeSetextUnderline,resolveTo:resolveToSetextUnderline};function resolveToSetextUnderline(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=o,e.push([`exit`,o,t]),e}function tokenizeSetextUnderline(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,c;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){c=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),c(t)}function c(t){return t===i?(e.consume(t),c):(e.exit(`setextHeadingLineSequence`),markdownSpace(t)?factorySpace(e,u,`lineSuffix`)(t):u(t))}function u(r){return r===null||markdownLineEnding(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var flow$1={tokenize:initializeFlow};function initializeFlow(e){let t=this,n=e.attempt(blankLine,r,e.attempt(this.parser.constructs.flowInitial,i,factorySpace(e,e.attempt(this.parser.constructs.flow,i,e.attempt(content,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var resolver={resolveAll:createResolver()},string$1=initializeFactory(`string`),text$2=initializeFactory(`text`);function initializeFactory(e){return{tokenize:t,resolveAll:createResolver(e===`text`?resolveAllLineSuffixes:void 0)};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return u(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),c}function c(e){return u(e)?(t.exit(`data`),i(e)):(t.consume(e),c)}function u(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function createResolver(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function resolveAllLineSuffixes(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,c=0,u;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)c++,o--;if(o)break;o=-1}else if(e===-2)u=!0,c++;else if(e!==-1){a++;break}}if(c){let i={type:n===e.length||u||c<2?`lineSuffix`:`hardBreakTrailing`,start:{line:r.end.line,column:r.end.column-c,offset:r.end.offset-c,_index:r.start._index+a,_bufferIndex:a?o:r.start._bufferIndex+o},end:Object.assign({},r.end)};r.end=Object.assign({},i.start),r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}function createTokenizer(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),i={},a=[],o=[],c=[],u={consume:me,enter:ge,exit:Te,attempt:ze(Oe),check:ze(Ae),interrupt:ze(Ae,{interrupt:!0})},K={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:te,sliceSerialize:ee,now:ce,defineSkip:ue,write:X},Y=t.tokenize.call(K,u);return t.resolveAll&&a.push(t),K;function X(e){return o=push(o,e),de(),o[o.length-1]===null?(qe(t,0),K.events=resolveAll(a,K.events,K),K.events):[]}function ee(e,t){return serializeChunks(te(e),t)}function te(e){return sliceChunks(o,e)}function ce(){let{line:e,column:t,offset:n,_index:i,_bufferIndex:a}=r;return{line:e,column:t,offset:n,_index:i,_bufferIndex:a}}function ue(e){i[e.line]=e.column,Ze()}function de(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)fe(t.charCodeAt(r._bufferIndex));else fe(t)}}function fe(e){Y=Y(e)}function me(e){markdownLineEnding(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,Ze()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),K.previous=e}function ge(e,t){let n=t||{};return n.type=e,n.start=ce(),K.events.push([`enter`,n,K]),c.push(n),n}function Te(e){let t=c.pop();return t.end=ce(),K.events.push([`exit`,t,K]),t}function Oe(e,t){qe(e,t.from)}function Ae(e,t){t.restore()}function ze(e,t){return n;function n(n,r,i){let a,o,c,Y;return Array.isArray(n)?ee(n):`tokenize`in n?ee([n]):X(n);function X(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return ee([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function ee(e){return a=e,o=0,e.length===0?i:te(e[o])}function te(e){return n;function n(n){return Y=Ye(),c=e,e.partial||(K.currentConstruct=e),e.name&&K.parser.constructs.disable.null.includes(e.name)?ue(n):e.tokenize.call(t?Object.assign(Object.create(K),t):K,u,ce,ue)(n)}}function ce(t){return e(c,Y),r}function ue(e){return Y.restore(),++o<a.length?te(a[o]):i}}}function qe(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&splice(K.events,t,K.events.length-t,e.resolve(K.events.slice(t),K)),e.resolveTo&&(K.events=e.resolveTo(K.events,K))}function Ye(){let e=ce(),t=K.previous,n=K.currentConstruct,i=K.events.length,a=Array.from(c);return{restore:o,from:i};function o(){r=e,K.previous=t,K.currentConstruct=n,K.events.length=i,c=a,Ze()}}function Ze(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function sliceChunks(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function serializeChunks(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
281`;break;case-3:o=`\r
282`;break;case-2:o=t?` `:`	`;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}var constructs_exports=__exportAll({attentionMarkers:()=>attentionMarkers,contentInitial:()=>contentInitial,disable:()=>disable,document:()=>document$1,flow:()=>flow,flowInitial:()=>flowInitial,insideSpan:()=>insideSpan,string:()=>string,text:()=>text$1}),document$1={42:list$1,43:list$1,45:list$1,48:list$1,49:list$1,50:list$1,51:list$1,52:list$1,53:list$1,54:list$1,55:list$1,56:list$1,57:list$1,62:blockQuote},contentInitial={91:definition},flowInitial={[-2]:codeIndented,[-1]:codeIndented,32:codeIndented},flow={35:headingAtx,42:thematicBreak$1,45:[setextUnderline,thematicBreak$1],60:htmlFlow,61:setextUnderline,95:thematicBreak$1,96:codeFenced,126:codeFenced},string={38:characterReference,92:characterEscape},text$1={[-5]:lineEnding,[-4]:lineEnding,[-3]:lineEnding,33:labelStartImage,38:characterReference,42:attention,60:[autolink,htmlText],91:labelStartLink,92:[hardBreakEscape,characterEscape],93:labelEnd,95:attention,96:codeText},insideSpan={null:[attention,resolver]},attentionMarkers={null:[42,95]},disable={null:[]};function parse(e){let t={defined:[],lazy:{},constructs:combineExtensions([constructs_exports,...(e||{}).extensions||[]]),content:n(content$1),document:n(document$2),flow:n(flow$1),string:n(string$1),text:n(text$2)};return t;function n(e){return n;function n(n){return createTokenizer(t,e,n)}}}function postprocess(e){for(;!subtokenize(e););return e}var search=/[\0\t\n\r]/g;function preprocess(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let c=[],u,K,Y,X,ee;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),Y=0,t=``,n&&=(i.charCodeAt(0)===65279&&Y++,void 0);Y<i.length;){if(search.lastIndex=Y,u=search.exec(i),X=u&&u.index!==void 0?u.index:i.length,ee=i.charCodeAt(X),!u){t=i.slice(Y);break}if(ee===10&&Y===X&&r)c.push(-3),r=void 0;else switch(r&&=(c.push(-5),void 0),Y<X&&(c.push(i.slice(Y,X)),e+=X-Y),ee){case 0:c.push(65533),e++;break;case 9:for(K=Math.ceil(e/4)*4,c.push(-2);e++<K;)c.push(-1);break;case 10:c.push(-4),e=1;break;default:r=!0,e=1}Y=X+1}return o&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}var characterEscapeOrReference=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function decodeString(e){return e.replace(characterEscapeOrReference,decode)}function decode(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;
vendor: 4,211 bytes, line 282
282return decodeNumericCharacterReference(n.slice(t?2:1),t?16:10)}return decodeNamedCharacterReference(n)||e}var own$2={}.hasOwnProperty;function fromMarkdown(e,t,n){return typeof t!=`string`&&(n=t,t=void 0),compiler(n)(postprocess(parse(n).document().write(preprocess()(e,t,!0))))}function compiler(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Dt),autolinkProtocol:Ye,autolinkEmail:Ye,atxHeading:a(Ct),blockQuote:a(vt),characterEscape:Ye,characterReference:Ye,codeFenced:a(yt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(yt,o),codeText:a(bt,o),codeTextData:Ye,data:Ye,codeFlowValue:Ye,definition:a(xt),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(St),hardBreakEscape:a(wt),hardBreakTrailing:a(wt),htmlFlow:a(Tt,o),htmlFlowData:Ye,htmlText:a(Tt,o),htmlTextData:Ye,image:a(Et),label:o,link:a(Dt),listItem:a(kt),listItemValue:ee,listOrdered:a(Ot,X),listUnordered:a(Ot),paragraph:a(At),reference:ft,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ct),strong:a(jt),thematicBreak:a(Nt)},exit:{atxHeading:u(),atxHeadingSequence:Oe,autolink:u(),autolinkEmail:_t,autolinkProtocol:gt,blockQuote:u(),characterEscapeValue:Ze,characterReferenceMarkerHexadecimal:mt,characterReferenceMarkerNumeric:mt,characterReferenceValue:ht,codeFenced:u(de),codeFencedFence:ue,codeFencedFenceInfo:te,codeFencedFenceMeta:ce,codeFlowValue:Ze,codeIndented:u(fe),codeText:u(it),codeTextData:Ze,data:Ze,definition:u(),definitionDestinationString:Te,definitionLabelString:me,definitionTitleString:ge,emphasis:u(),hardBreakEscape:u(et),hardBreakTrailing:u(et),htmlFlow:u(nt),htmlFlowData:Ze,htmlText:u(rt),htmlTextData:Ze,image:u(ot),label:ct,labelText:st,lineEnding:Qe,link:u(at),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:pt,resourceDestinationString:lt,resourceTitleString:ut,resource:dt,setextHeading:u(qe),setextHeadingLineSequence:ze,setextHeadingText:Ae,strong:u(),thematicBreak:u()}};configure(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:c,exit:K,buffer:o,resume:Y,data:n},u=[],X=-1;for(;++X<e.length;)(e[X][1].type===`listOrdered`||e[X][1].type===`listUnordered`)&&(e[X][0]===`enter`?u.push(X):X=i(e,u.pop(),X));for(X=-1;++X<e.length;){let n=t[e[X][0]];own$2.call(n,e[X][1].type)&&n[e[X][1].type].call(Object.assign({sliceSerialize:e[X][2].sliceSerialize},a),e[X][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||defaultOnError).call(a,void 0,e[0])}for(r.position={start:point(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:point(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},X=-1;++X<t.transforms.length;)r=t.transforms[X](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,c,u,K;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,K=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!K&&!i&&!u&&(u=r),K=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:K=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(c=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;c&&(e[c][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,c=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}u&&(!c||u<c)&&(o._spread=!0),o.end=Object.assign({},c?e[c][1].start:t[1].end),e.splice(c||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,u=void 0,K=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}
vendor: 4,774 bytes, line 282
282function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:point(t.start),end:void 0}}function u(e){return t;function t(t){e&&e.call(this,t),K.call(this,t)}}function K(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||defaultOnError).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+stringifyPosition({start:e.start,end:e.end})+`): it’s not open`);n.position.end=point(e.end)}function Y(){return toString$1(this.stack.pop())}function X(){this.data.expectingFirstListItemValue=!0}function ee(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function ce(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function ue(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function de(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function fe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function me(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=normalizeIdentifier(this.sliceSerialize(e)).toLowerCase()}function ge(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function Te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function Oe(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function Ae(){this.data.setextHeadingSlurpLineEnding=!0}function ze(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function qe(){this.data.setextHeadingSlurpLineEnding=void 0}function Ye(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Mt(),n.position={start:point(e.start),end:void 0},t.push(n)),this.stack.push(n)}function Ze(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=point(e.end)}function Qe(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=point(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(Ye.call(this,e),Ze.call(this,e))}function et(){this.data.atHardBreak=!0}function nt(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function rt(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function it(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function at(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ot(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function st(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=decodeString(t),n.identifier=normalizeIdentifier(t).toLowerCase()}function ct(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function lt(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ut(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function dt(){this.data.inReference=void 0}function ft(){this.data.referenceType=`collapsed`}function pt(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=normalizeIdentifier(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function mt(e){this.data.characterReferenceType=e.type}function ht(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=decodeNumericCharacterReference(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=decodeNamedCharacterReference(t);let i=this.stack.pop();i.value+=r,i.position.end=point(e.end)}function gt(e){Ze.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function _t(e){Ze.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function vt(){return{type:`blockquote`,children:[]}}function yt(){return{type:`code`,lang:null,meta:null,value:``}}function bt(){return{type:`inlineCode`,value:``}}
vendor: 7,479 bytes, lines 282-286
282function xt(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function St(){return{type:`emphasis`,children:[]}}function Ct(){return{type:`heading`,depth:0,children:[]}}function wt(){return{type:`break`}}function Tt(){return{type:`html`,value:``}}function Et(){return{type:`image`,title:null,url:``,alt:null}}function Dt(){return{type:`link`,title:null,url:``,children:[]}}function Ot(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function kt(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function At(){return{type:`paragraph`,children:[]}}function jt(){return{type:`strong`,children:[]}}function Mt(){return{type:`text`,value:``}}function Nt(){return{type:`thematicBreak`}}}function point(e){return{line:e.line,column:e.column,offset:e.offset}}function configure(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?configure(e,r):extension(e,r)}}function extension(e,t){let n;for(n in t)if(own$2.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function defaultOnError(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+stringifyPosition({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+stringifyPosition({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+stringifyPosition({start:t.start,end:t.end})+`) is still open`)}function remarkParse(e){let t=this;t.parser=n;function n(n){return fromMarkdown(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function blockquote(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function hardBreak(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
283`}]}function code(e,t){let n=t.value?t.value+`
284`:``,r={};t.lang&&(r.className=[`language-`+t.lang]);let i={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:`element`,tagName:`pre`,properties:{},children:[i]},e.patch(t,i),i}function strikethrough(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function emphasis(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function footnoteReference(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=normalizeUri(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,c+=1,e.footnoteCounts.set(r,c);let u={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(c>1?`-`+c:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,u);let K={type:`element`,tagName:`sup`,properties:{},children:[u]};return e.patch(t,K),e.applyData(t,K)}function heading(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function html(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function revert(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function imageReference(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return revert(e,t);let i={src:normalizeUri(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function image(e,t){let n={src:normalizeUri(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function inlineCode(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function linkReference(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return revert(e,t);let i={href:normalizeUri(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function link(e,t){let n={href:normalizeUri(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function listItem(e,t,n){let r=e.all(t),i=n?listLoose(n):listItemLoose(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let c=-1;for(;++c<r.length;){let e=r[c];(i||c!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
285`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let u=r[r.length-1];u&&(i||u.type!==`element`||u.tagName!==`p`)&&o.push({type:`text`,value:`
286`});let K={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,K),e.applyData(t,K)}function listLoose(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=listItemLoose(n[r])}return t}function listItemLoose(e){return e.spread??e.children.length>1}function list(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function paragraph(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function root(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function strong(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function table(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=pointStart(t.children[1]),o=pointEnd(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{}
vendor: 3,776 bytes, line 286
286,children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function tableRow(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,c=-1,u=[];for(;++c<o;){let n=t.children[c],r={},o=a?a[c]:void 0;o&&(r.align=o);let K={type:`element`,tagName:i,properties:r,children:[]};n&&(K.children=e.all(n),e.patch(n,K),K=e.applyData(n,K)),u.push(K)}let K={type:`element`,tagName:`tr`,properties:{},children:e.wrap(u,!0)};return e.patch(t,K),e.applyData(t,K)}function tableCell(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var tab=9,space=32;function trimLines(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(trimLine(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(trimLine(t.slice(i),i>0,!1)),a.join(``)}function trimLine(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===tab||t===space;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===tab||t===space;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function text(e,t){let n={type:`text`,value:trimLines(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function thematicBreak(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var handlers={blockquote,break:hardBreak,code,delete:strikethrough,emphasis,footnoteReference,heading,html,imageReference,image,inlineCode,linkReference,link,listItem,list,paragraph,root,strong,table,tableCell,tableRow,text,thematicBreak,toml:ignore,yaml:ignore,definition:ignore,footnoteDefinition:ignore};function ignore(){}var env=typeof self==`object`?self:globalThis,deserializer=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new env[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i)}return n(new env[a](o),i)};return r},deserialize=e=>deserializer(new Map,e)(0),EMPTY=``,{toString}={},{keys}=Object,typeOf=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=toString.call(e).slice(8,-1);switch(n){case`Array`:return[1,EMPTY];case`Object`:return[2,EMPTY];case`Date`:return[3,EMPTY];case`RegExp`:return[4,EMPTY];case`Map`:return[5,EMPTY];case`Set`:return[6,EMPTY]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},shouldSkip=([e,t])=>e===0&&(t===`function`||t===`symbol`),serializer=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,c]=typeOf(r);switch(o){case 0:{let t=r;switch(c){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(c)return i([c,[...r]],r);let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([c,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],u=i([o,n],r);for(let t of keys(r))(e||!shouldSkip(typeOf(r[t])))&&n.push([a(t),a(r[t])]);return u}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(shouldSkip(typeOf(n))||shouldSkip(typeOf(i))))&&t.pu
vendor: 3,111 bytes, lines 286-288
286sh([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!shouldSkip(typeOf(n)))&&t.push(a(n));return n}}let{message:u}=r;return i([o,{name:c,message:u}],r)};return a},serialize=(e,{json:t,lossy:n}={})=>{let r=[];return serializer(!(t||n),!!t,new Map,r)(e),r},esm_default=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?deserialize(serialize(e,t)):structuredClone(e):(e,t)=>deserialize(serialize(e,t));function defaultFootnoteBackContent(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function defaultFootnoteBackLabel(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function footer(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||defaultFootnoteBackContent,r=e.options.footnoteBackLabel||defaultFootnoteBackLabel,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},c=[],u=-1;for(;++u<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[u]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),K=normalizeUri(o.toLowerCase()),Y=0,X=[],ee=e.footnoteCounts.get(o);for(;ee!==void 0&&++Y<=ee;){X.length>0&&X.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(u,Y);typeof e==`string`&&(e={type:`text`,value:e}),X.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+K+(Y>1?`-`+Y:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(u,Y),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let te=a[a.length-1];if(te&&te.type===`element`&&te.tagName===`p`){let e=te.children[te.children.length-1];e&&e.type===`text`?e.value+=` `:te.children.push({type:`text`,value:` `}),te.children.push(...X)}else a.push(...X);let ce={type:`element`,tagName:`li`,properties:{id:t+`fn-`+K},children:e.wrap(a,!0)};e.patch(i,ce),c.push(ce)}if(c.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...esm_default(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
287`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(c,!0)},{type:`text`,value:`
288`}]}}var convert=(function(e){if(e==null)return ok;if(typeof e==`function`)return castFactory(e);if(typeof e==`object`)return Array.isArray(e)?anyFactory(e):propsFactory(e);if(typeof e==`string`)return typeFactory(e);throw Error(`Expected function, string, or object as test`)});function anyFactory(e){let t=[],n=-1;for(;++n<e.length;)t[n]=convert(e[n]);return castFactory(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function propsFactory(e){let t=e;return castFactory(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function typeFactory(e){return castFactory(t);function t(t){return t&&t.type===e}}function castFactory(e){return t;function t(t,n,r){return!!(looksLikeANode(t)&&e.call(this,t,typeof n==`
288number`?n:void 0,r||void 0))}}function ok(){return!0}function looksLikeANode(e){return typeof e==`object`&&!!e&&`type`in e}function color(e){return e}var empty=[],CONTINUE=!0,EXIT=!1,SKIP=`skip`;function visitParents(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=convert(i),o=r?-1:1;c(e,void 0,[])();function c(e,i,u){let K=e&&typeof e==`object`?e:{};if(typeof K.type==`string`){let t=typeof K.tagName==`string`?K.tagName:typeof K.name==`string`?K.name:void 0;Object.defineProperty(Y,"name",{value:`node (`+color(e.type+(t?`<`+t+`>`:``))+`)`})}return Y;function Y(){let K=empty,Y,X,ee;if((!t||a(e,i,u[u.length-1]||void 0))&&(K=toResult(n(e,u)),K[0]===!1))return K;if(`children`in e&&e.children){let t=e;if(t.children&&K[0]!==`skip`)for(X=(r?t.children.length:-1)+o,ee=u.concat(t);X>-1&&X<t.children.length;){let e=t.children[X];if(Y=c(e,X,ee)(),Y[0]===!1)return Y;X=typeof Y[1]==`number`?Y[1]:X+o}}return K}}}function toResult(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?empty:[e]}function visit(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),visitParents(e,a,c,i);function c(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var own$1={}.hasOwnProperty,emptyOptions={};function createState(e,t){let n=t||emptyOptions,r=new Map,i=new Map,a={all:c,applyData,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...handlers,...n.handlers},one:o,options:n,patch,wrap:wrap$1};return visit(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(own$1.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=esm_default(n);return r.children=a.all(e),r}return esm_default(e)}return(a.options.unknownHandler||defaultUnknownHandler)(a,e,t)}function c(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=trimMarkdownSpaceStart(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=trimMarkdownSpaceStart(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function patch(e,t){e.position&&(t.position=position$1(e))}function applyData(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,esm_default(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function defaultUnknownHandler(e,t){let n=t.data||{},r=`value`in t&&!(own$1.call(n,`hProperties`)||own$1.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function wrap$1(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
289`});++r<e.length;)r&&n.push({type:`text`,value:`
290`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
291`}),n}function trimMarkdownSpaceStart(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function toHast(e,t){let n=createState(e,t),r=n.one(e,void 0),i=footer(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
292`},i)),a}function remarkRehype(e,t){return e&&`run`in e?async function(n,r){let i=toHast(n,t);await e.run(i,r)}:function(n){return toHast(n,t||e)}}function bail(e){if(e)throw e}var require_extend=__commonJSMin(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},c=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},u=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},K=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,Y,X=arguments[0],ee=1,te=arguments.length,ce=!1;for(typeof X==`boolean`&&(ce=X,X=arguments[1]||{},ee=2),(X==null||typeof X!=`object`&&typeof X!=`function`)&&(X={});ee<te;++ee)if(t=arguments[ee],t!=null)for(n in t)r=K(X,n),i=K(t,n),X!==i&&(ce&&i&&(c(i)||(a=o(i)))?(a?(a=!1,Y=r&&o(r)?r:[]):Y=r&&c(r)?r:{},u(X,{name:n,newValue:e(ce,Y,i)}
vendor: 4,706 bytes, line 292
292)):i!==void 0&&u(X,{name:n,newValue:i}));return X}})),import_extend=__toESM(require_extend());function isPlainObject(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function trough(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let c=e[++n],u=-1;if(a){r(a);return}for(;++u<t.length;)(o[u]===null||o[u]===void 0)&&(o[u]=t[u]);t=o,c?wrap(c,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function wrap(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o instanceof Promise?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var path={basename,dirname,extname,join,sep:`/`};function basename(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);assertPath$1(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,c=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),c>-1&&(e.codePointAt(i)===t.codePointAt(c--)?c<0&&(r=i):(c=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function dirname(e){if(assertPath$1(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function extname(e){assertPath$1(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let c=e.codePointAt(t);if(c===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),c===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function join(...e){let t=-1,n;for(;++t<e.length;)assertPath$1(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:normalize(n)}function normalize(e){assertPath$1(e);let t=e.codePointAt(0)===47,n=normalizeString(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function normalizeString(e,t){let n=``,r=0,i=-1,a=0,o=-1,c,u;for(;++o<=e.length;){if(o<e.length)c=e.codePointAt(o);else if(c===47)break;else c=47;if(c===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf(`/`),u!==n.length-1){u<0?(n=``,r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else c===46&&a>-1?a++:a=-1}return n}function assertPath$1(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var proc={cwd};function cwd(){return`/`}function isUrl(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function urlToPath(e){if(typeof e==`string`)e=new URL(e);else if(!isUrl(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return getPathFromURLPosix(e)}function getPathFromURLPosix(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var order=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],VFile=class{constructor(e){let t;t=e?isUrl(e)?{path:e}:typeof e==`string`||isUint8Array$1(e)?{value:e}:e:{},this.cwd=proc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<order.length;){let e=order[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)order.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?path.basename(this.path):void 0}
vendor: 9,620 bytes, line 292
292set basename(e){assertNonEmpty(e,`basename`),assertPart(e,`basename`),this.path=path.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?path.dirname(this.path):void 0}set dirname(e){assertPath(this.basename,`dirname`),this.path=path.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?path.extname(this.path):void 0}set extname(e){if(assertPart(e,`extname`),assertPath(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=path.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){isUrl(e)&&(e=urlToPath(e)),assertNonEmpty(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?path.basename(this.path,this.extname):void 0}set stem(e){assertNonEmpty(e,`stem`),assertPart(e,`stem`),this.path=path.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new VFileMessage(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function assertPart(e,t){if(e&&e.includes(path.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+path.sep+"`")}function assertNonEmpty(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function assertPath(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function isUint8Array$1(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var CallableInstance=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};Object.setPrototypeOf(r,t);let i=Object.getOwnPropertyNames(n);for(let e of i){let t=Object.getOwnPropertyDescriptor(n,e);t&&Object.defineProperty(r,e,t)}return r}),own={}.hasOwnProperty,Processor=class e extends CallableInstance{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=trough()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,import_extend.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(assertUnfrozen(`data`,this.frozen),this.namespace[e]=t,this):own.call(this.namespace,e)&&this.namespace[e]||void 0:e?(assertUnfrozen(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=vfile(e),n=this.parser||this.Parser;return assertParser(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),assertParser(`process`,this.parser||this.Parser),assertCompiler(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=vfile(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return c(e);let i=t,a=n.stringify(i,r);looksLikeAValue(a)?r.value=a:r.result=a,c(e,r)});function c(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),assertParser(`processSync`,this.parser||this.Parser),assertCompiler(`processSync`,this.compiler||this.Compiler),this.process(e,r),assertDone(`processSync`,`process`,t),n;function r(e,r){t=!0,bail(e),n=r}}run(e,t,n){assertNode(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=vfile(t);r.run(e,o,c);function c(t,r,o){let c=r||e;t?a(t):i?i(c):n(void 0,c,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),assertDone(`runSync`,`run`,n),r;function i(e,t){bail(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=vfile(t),r=this.compiler||this.Compiler;return assertCompiler(`stringify`,r),assertNode(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(assertUnfrozen(`use`,this.frozen),e!=null){if(typeof e==`function`)c(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)c(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;c(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,import_extend.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function c(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];isPlainObject(o)&&isPlainObject(r)&&(r=(0,import_extend.default)(!0,o,r)),n[i]=[e,r,...a]}}}},unified=new Processor().freeze();function assertParser(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function assertCompiler(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function assertUnfrozen(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(e){if(!isPlainObject(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function assertDone(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function vfile(e){return looksLikeAVFile(e)?e:new VFile(e)}function looksLikeAVFile(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function looksLikeAValue(e){return typeof e==`string`||isUint8Array(e)}function isUint8Array(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var emptyPlugins=[],emptyRemarkRehypeOptions={allowDangerousHtml:!0},safeProtocol=/^(https?|ircs?|mailto|xmpp)$/i,deprecations=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Markdown(e){let t=e.allowedElements,n=e.allowElement,r=e.children||``,i=e.className,a=e.components,o=e.disallowedElements,c=e.rehypePlugins||emptyPlugins,u=e.remarkPlugins||emptyPlugins,K=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...emptyRemarkRehypeOptions}:emptyRemarkRehypeOptions,Y=e.skipHtml,X=e.unwrapDisallowed,ee=e.urlTransform||defaultUrlTransform,te=unified().use(remarkParse).use(u).use(remarkRehype,K).use(c),ce=new VFile;typeof r==`string`?ce.value=r:``+r;for(let t of deprecations)Object.hasOwn(e,t.from)&&``+t.from+(t.to?"use `"+t.to+"` instead":`remove it`)+t.id;let ue=te.parse(ce),de=te.runSync(ue,ce);return i&&(de={type:`element`,tagName:`div`,properties:{className:i},children:de.type===`root`?de.children:[de]}),visit(de,fe),toJsxRuntime(de,{Fragment:import_jsx_runtime.Fragment,components:a,ignoreInvalidStyle:!0,jsx:import_jsx_runtime.jsx,jsxs:import_jsx_runtime.jsxs,passKeys:!0,passNode:!0});function fe(e,r,i){if(e.type===`raw`&&i&&typeof r==`number`)return Y?i.children.splice(r,1):i.children[r]={type:`text`,value:e.value},r;if(e.type===`element`){let t;for(t in urlAttributes)if(Object.hasOwn(urlAttributes,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=urlAttributes[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=ee(String(n||``),t,e))}}if(e.type===`element`){let a=t?!t.includes(e.tagName):o?o.includes(e.tagName):!1;if(!a&&n&&typeof r==`number`&&(a=!n(e,r,i)),a&&i&&typeof r==`number`)return X&&e.children?i.children.splice(r,1,...e.children):i.children.splice(r,1),r}}}function defaultUrlTransform(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||safeProtocol.test(e.slice(0,t))?e:``}var s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)},f,p=function(e){var t;e?function(e){if(e)for(;e.lastChild;
292)e.lastChild.remove()}(typeof e==`string`?document.getElementById(e):e):(t=document.querySelector(`.grecaptcha-badge`))&&t.parentNode&&document.body.removeChild(t.parentNode)},d=function(e,t){p(t),window.___grecaptcha_cfg=void 0;var n=document.querySelector(`#`+e);n&&n.remove(),function(){var e=document.querySelector(`script[src^="https://www.gstatic.com/recaptcha/releases"]`);e&&e.remove()}()},y=function(e){var t=e.render,n=e.onLoadCallbackName,r=e.language,i=e.onLoad,a=e.useRecaptchaNet,o=e.useEnterprise,c=e.scriptProps,u=c===void 0?{}:c,K=u.nonce,Y=K===void 0?``:K,X=u.defer,ee=X!==void 0&&X,te=u.async,ce=te!==void 0&&te,ue=u.id,de=ue===void 0?``:ue,fe=u.appendTo,me=de||`google-recaptcha-v3`;if(function(e){return!!document.querySelector(`#`+e)}(me))i();else{var ge=function(e){return`https://www.`+(e.useRecaptchaNet?`recaptcha.net`:`google.com`)+`/recaptcha/`+(e.useEnterprise?`enterprise.js`:`api.js`)}({useEnterprise:o,useRecaptchaNet:a}),Te=document.createElement(`script`);Te.id=me,Te.src=ge+`?render=`+t+(t===`explicit`?`&onload=`+n:``)+(r?`&hl=`+r:``),Y&&(Te.nonce=Y),Te.defer=!!ee,Te.async=!!ce,Te.onload=i,(fe===`body`?document.body:document.getElementsByTagName(`head`)[0]).appendChild(Te)}},m=function(e){console.warn(e)};(function(e){e.SCRIPT_NOT_AVAILABLE=`Recaptcha script is not available`})(f||={});var v=(0,import_react.createContext)({executeRecaptcha:function(){throw Error(`GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider`)}}),b=v.Consumer;function h(e){var t=e.reCaptchaKey,n=e.useEnterprise,r=n!==void 0&&n,i=e.useRecaptchaNet,a=i!==void 0&&i,o=e.scriptProps,c=e.language,u=e.container,K=e.children,Y=(0,import_react.useState)(null),X=Y[0],ee=Y[1],te=(0,import_react.useRef)(t),ce=JSON.stringify(o),ue=JSON.stringify(u?.parameters);(0,import_react.useEffect)((function(){if(t){var e=o?.id||`google-recaptcha-v3`,n=o?.onLoadCallbackName||`onRecaptchaLoadCallback`;return window[n]=function(){var e=r?window.grecaptcha.enterprise:window.grecaptcha,n=s({badge:`inline`,size:`invisible`,sitekey:t},u?.parameters||{});te.current=e.render(u?.element,n)},y({render:u?.element?`explicit`:t,onLoadCallbackName:n,useEnterprise:r,useRecaptchaNet:a,scriptProps:o,language:c,onLoad:function(){if(window&&window.grecaptcha){var e=r?window.grecaptcha.enterprise:window.grecaptcha;e.ready((function(){ee(e)}))}else m(`<GoogleRecaptchaProvider /> `+f.SCRIPT_NOT_AVAILABLE)},onError:function(){m(`Error loading google recaptcha script`)}}),function(){d(e,u?.element)}}m(`<GoogleReCaptchaProvider /> recaptcha key not provided`)}),[r,a,ce,ue,c,t,u?.element]);var de=(0,import_react.useCallback)((function(e){if(!X||!X.execute)throw Error(`<GoogleReCaptchaProvider /> Google Recaptcha has not been loaded`);return X.execute(te.current,{action:e})}),[X,te]),fe=(0,import_react.useMemo)((function(){return{executeRecaptcha:X?de:void 0,container:u?.element}}),[de,X,u?.element]);return import_react.createElement(v.Provider,{value:fe},K)}var g=function(){return(0,import_react.useContext)(v)};function w(e,t){return e(t={exports:{}},t.exports),t.exports}var $=typeof Symbol==`function`&&Symbol.for,C=$?Symbol.for(`react.element`):60103,P=$?Symbol.for(`react.portal`):60106,x=$?Symbol.for(`react.fragment`):60107,E=$?Symbol.for(`react.strict_mode`):60108,R=$?Symbol.for(`react.profiler`):60114,M=$?Symbol.for(`react.provider`):60109,N=$?Symbol.for(`react.context`):60110,O=$?Symbol.for(`react.async_mode`):60111,_=$?Symbol.for(`react.concurrent_mode`):60111,T=$?Symbol.for(`react.forward_ref`):60112,j=$?Symbol.for(`react.suspense`):60113,L=$?Symbol.for(`react.suspense_list`):60120,k=$?Symbol.for(`react.memo`):60115,F=$?Symbol.for(`react.lazy`):60116,A=$?Symbol.for(`react.block`):60121,V=$?Symbol.for(`react.fundamental`):60117,z=$?Symbol.for(`react.responder`):60118,G=$?Symbol.for(`react.scope`):60119;function I(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case C:switch(e=e.type){case O:case _:case x:case R:case E:case j:return e;default:switch(e&&=e.$$typeof){case N:case T:case F:case k:case M:return e;default:return t}}case P:return t}}}function D(e){return I(e)===_}var q={AsyncMode:O,ConcurrentMode:_,ContextConsumer:N,ContextProvider:M,Element:C,ForwardRef:T,Fragment:x,Lazy:F,Memo:k,Portal:P,Profiler:R,StrictMode:E,Suspense:j,isAsyncMode:function(e){return D(e)||I(e)===O},isConcurrentMode:D,isContextConsumer:function(e){return I(e)===N},isContextProvider:function(e){return I(e)===M},isElement:function(e){return typeof e==`object`&&!!e&&e.$$typeof===C},isForwardRef:function(e){return I(e)===T},isFragment:function(e){return I(e)===x},isLazy:function(e){return I(e)===F},isMemo:function(e){return I(e)===k},isPortal:function(e){return I(e)===P},isProfiler:function(e){return I(e)===R},isStrictMode:function(e){return I(e)===E},isSuspense:function(e){return I(e)===j},isValidElementType:function(e){return typeof e==`string`||typeof e==`function`||e===x||e===_||e===R||e===E||e===j||e===L||t
292ypeof e==`object`&&!!e&&(e.$$typeof===F||e.$$typeof===k||e.$$typeof===M||e.$$typeof===N||e.$$typeof===T||e.$$typeof===V||e.$$typeof===z||e.$$typeof===G||e.$$typeof===A)},typeOf:I},B=w((function(e,t){})),J=(B.AsyncMode,B.ConcurrentMode,B.ContextConsumer,B.ContextProvider,B.Element,B.ForwardRef,B.Fragment,B.Lazy,B.Memo,B.Portal,B.Profiler,B.StrictMode,B.Suspense,B.isAsyncMode,B.isConcurrentMode,B.isContextConsumer,B.isContextProvider,B.isElement,B.isForwardRef,B.isFragment,B.isLazy,B.isMemo,B.isPortal,B.isProfiler,B.isStrictMode,B.isSuspense,B.isValidElementType,B.typeOf,w((function(e){e.exports=q}))),H={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Q={};Q[J.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Q[J.Memo]=H;export{useSearchParams as $,$3017fa7ffdddec74$export$8042c6c013fd5226 as $n,$77b352cf12efcf73$export$c7b26b20d3ced9c5 as $t,axios as A,require_react_dom as An,endOfDay as Ar,string$3 as At,RouterProvider2 as B,$701a24aa0da5b062$export$ea18c227d4417cc3 as Bn,FullStory as Bt,Lt as C,$a2e5df62f93c7633$export$9d32628fc2aea7da as Cn,parse$4 as Cr,literal as Ct,require_index_umd as D,$337b884510726a0d$export$c6fdb837b070b4ff as Dn,isAfter as Dr,object$1 as Dt,Provider as E,$8ac8429251c45e4b$export$dbc0f175b25fb0fb as En,isBefore as Er,number$2 as Et,create$5 as F,$47b897dc8cdb026b$export$8d15029008292ae as Fn,format$1 as Fr,useController as Ft,createBrowserRouter as G,$9bf71ea28793e738$export$10c5169755ce7bd7 as Gn,useIsFetching as Gt,Navigate as H,$18f2051aff69b9bf$export$43bb16f9c6d9e3f7$1 as Hn,isInitialized as Ht,create$6 as I,$bcca50147b47f54d$export$56b2c08e277f365 as In,isValid as Ir,useForm as It,useNavigate as J,$9ab94262bd0047c7$export$420e68273165f4ec$1 as Jn,useQueryClient as Jt,matchPath as K,$9bf71ea28793e738$export$20e40289641fbbb6 as Kn,useQuery as Kt,create$7 as L,$5c3e21d68f1c4674$export$439d29a4e110a164 as Ln,differenceInCalendarDays as Lr,useFormContext as Lt,q$3 as M,$2a41e45df1593e64$export$d39e1813b3bdd0e1 as Mn,addYears as Mr,a$7 as Mt,create$9 as N,$81397a9303501bda$export$23f548e970bdf099 as Nn,addMinutes as Nr,FormProvider as Nt,require_query_string as O,$f2f8a6077418541e$export$542a6fd13ac93354 as On,formatDistanceToNowStrict as Or,record$1 as Ot,create$3 as P,$2d73ec29415bd339$export$712718f7aec83d5 as Pn,addDays as Pr,get$2 as Pt,useRouteError as Q,$875d6693e12af071$export$728d6ba534403756 as Qn,$d6542812f0669241$export$a407b657d3044108 as Qt,create$8 as R,$2baaea4c71418dea$export$294aa081a6c6f55d as Rn,startOfDay as Rr,useFormState as Rt,tt as S,$3e5eb2498db5b506$export$73f7a44322579622 as Sn,isPast as Sr,boolean$2 as St,ErrorBoundary as T,$168583247155ddda$export$dc9c12ed27dd1b49 as Tn,isFuture as Tr,nativeEnum as Tt,Outlet as U,$298d61e98472621b$export$dcf14c9974fe2767 as Un,useMutation as Ut,Link as V,$a916eb452884faea$export$b7a616150fdb9f44 as Vn,init as Vt,ScrollRestoration as W,$f7dceffc5ad7768b$export$4e328f61c538687f as Wn,useIsMutating as Wt,useParams as X,$3ef42575df84b30b$export$9d1611c77c2fe928$1 as Xn,c$12 as Xt,useNavigationType as Y,$df56164dff5785e2$export$4338b53315abf666 as Yn,QueryClient as Yt,useResolvedPath as Z,$bdb11010cef70236$export$f680877a34711e37$1 as Zn,$6cc546b19ee7130a$export$b8cbbb20a51697de as Zt,useFloating as _,$0d5c49892c1215da$export$37b0961d2f4751e2 as _n,Parser as _r,_enum as _t,require_build as a,require_browser$2 as an,$c1d7fb2ec91bae71$export$6d08773d2e66f8f2 as ar,Page as at,b$2 as b,$32489daedd52963e$export$1315d136e6f7581 as bn,format as br,any as bt,lib_exports as c,createColumnHelper as cn,$35ea8db9cb2ccb90$export$99faa760c7908e4f as cr,__webpack_exports__version as ct,StreamChat as d,getExampleNumber as dn,require_jsx_runtime as dr,_classPrivateFieldSet2 as dt,$5e8ad37a45e1c704$export$3d96ec278d3efce4 as en,$a54cdc5c1942b639$export$bca9d026f8e704eb as er,require_client as et,require_loglevel as f,AsYouType as fn,require_react as fr,_classPrivateFieldInitSpec as ft,useFormikContext as g,$430f30ed08ec25fa$export$62b9571f283ff5c2 as gn,require_defaultTheme as gr,ZodIssueCode as gt,useField as h,$f4b273590fab9f93$export$52210f68a14655d0 as hn,twJoin as hr,require_all_settled as ht,c$1 as i,examples_mobile_json_default as in,$fc909762b330b746$export$61c6a8c84e605fb6 as ir,useResizeObserver as it,W$1 as j,$628037886ba31236$export$f9d5c8beee7d008d as jn,subISOWeekYears as jr,union as jt,isAxiosError as k,$86ea4cb521eb2e37$export$2317d149ed6f78c4 as kn,differenceInYears as kr,set$1 as kt,require_focus_visible as l,getCoreRowModel as ln,$fae977aafc393c5c$export$6b862160d295c8e as lr,__vitePreload as lt,Formik as m,require_lottie as mn,extendTailwindMerge as mr,require_with_resolvers as mt,h as n,$5e8ad37a45e1c704$export$b2539bed5023c21c as nn,$f86e6c1ec7da6ebb$export$bc3384a35de93d66 as nr,z$3 as nt,require_persona_react as o,flexRender as on,$de67e98908f0c6ee$export$7f629e9dc1ecf37c as or,Document as ot,Form as p,parsePhoneNumberWithError as pn,require_resolveConfig as pr,require_at as pt,useLocation as q,$46d819fcbaf35654$export$8f71654801c2f7cd as qn,QueryClientProvider as qt,Markdown as r,$5e8ad37a45e1c704$export$e51a686c67fdaa2d as rn,$3c0fc76039f1c516$export$60e84778edff6d26 as rr,require_es5 as rt,require_state_machine as s,useReactTable as sn,$28f99e3e86e6ec45$export$e5fda3247f5d67f9 as sr,__webpack_exports__GlobalWorkerOptions as st,g as t,$5e8ad37a45e1c704$export$3e41faf802a29e71 as tn,$a28c903ee9ad8dc5$export$79fefeb1c2091ac3 as tr,datadogRum as tt,n$2 as u,formatIncompletePhoneNumber as un,$3b62074eb05584b2$export$80ee6245ec4f29ec as ur,_classPrivateFieldGet2 as ut,P$1 as v,$204d9ebcedfb8806$export$ed5abd763a836edc as vn,formatInT
292imeZone as vr,_instanceof as vt,useRollbar as w,$d5336fe17ce95402$export$38eaa17faae8f579 as wn,_defineProperty$6 as wr,nan as wt,k$1 as x,$16f0b7bb276bc17e$export$5591b0b878c1a989 as xn,parseISO as xr,array$1 as xt,D$2 as y,$40df3f8667284809$export$d55e7ee900f34e93 as yn,toZonedTime as yr,_undefined as yt,setLocale as z,$406796ff087fe49b$export$e375f10ce42261c5 as zn,useWatch as zt};
293//# sourceMappingURL=vendor-DARUOhqT.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.